1 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
3 * NEWS (2.5): Fix minor typos.
5 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
7 doc: clean up quotation style in NEWS.
8 * NEWS (2.5): For multi-character tokens in example grammar rules,
9 use "token" not 'token'. In English, use a consistent quotation
10 style; we might as well follow the precedent seen in info pages:
13 2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
15 tests: pacify gcc 4.6.0's -Wunused-but-set-variable.
16 Reported by Jim Meyering at
17 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
19 (Default %printer and %destructor for mid-rule values): Define
20 YYLLOC_DEFAULT so that it uses its Rhs argument.
22 2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
24 glr.c: omit yyresolveLocations when locations are disabled.
25 This prevents gcc 4.6.0's -Wunused-but-set-variable from warning
26 about yyresolveLocations's local yyrhsloc. When locations are
27 enabled, there's no such warning because YYLLOC_DEFAULT then uses
28 yyrhsloc. Reported by Jim Meyering at
29 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
30 * data/glr.c (yyresolveLocations): Omit definition when locations
32 (yyresolveValue): Omit yyresolveLocations invocation when
33 locations are disabled.
35 2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
37 gnulib, autoconf: update.
38 * README-hacking (Updating a submodule): Give advice on how to
39 determine the versions of gnulib and autoconf to which we should
41 (Release Procedure): Note that submodules should be updated.
42 * bootstrap.conf (gnulib_modules): Rename pipe to spawn-pipe as
43 suggested in updated gnulib NEWS.
44 * gnulib: Choose a stable snapshot according to advice in Bison's
46 * po/POTFILES.in (lib/pipe.c): Rename to...
47 (lib/spawn-pipe.c): ... this.
48 * src/output.c: Update to include spawn-pipe.h.
49 * submodules/autoconf: Update to latest for improvement in m4.m4
50 that excludes M4 with buggy strstr. The only other changes to
51 files that we use are copyright updates.
53 2011-04-09 Joel E. Denny <joeldenny@joeldenny.org>
55 Fix missing updates to GPLv3.
56 Reported by Tys Lefering at
57 <http://lists.gnu.org/archive/html/bison-patches/2011-04/msg00000.html>.
58 * src/print-xml.c, src/print-xml.h: In these files.
60 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
62 Add -Wconflicts-sr and -Wconflicts-rr.
63 Thus, conflict reports are now affected by -Werror and -Wnone
64 (unless %expect or %expect-rr is specified). Reported by George
66 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
67 * NEWS (2.5): Document.
68 * doc/bison.texinfo (Bison Options): Document.
69 * src/complain.c, src/complain.h (set_warning_issued): Export
71 * src/conflicts.c (conflicts_print): Suppress conflict report
72 based on -Wno-conflicts-sr and -Wno-conflicts-rr, and treat
73 conflicts as errors if -Werror.
74 * src/getargs.c (warnings_flag): Initialize with
75 warnings_conflicts_sr and warnings_conflicts_rr as well.
76 (warnings_args, warnings_types): Add entries for
77 warnings_conflicts_sr and warnings_conflicts_rr.
79 * src/getargs.h (enum warnings): Add entries for
80 warnings_conflicts_sr and warnings_conflicts_rr.
81 * tests/conflicts.at (-W versus %expect and %expect-rr): New test
83 * tests/local.at (AT_BISON_CHECK_NO_XML): Update now that the
84 conflict report can produce a "warnings being treated as errors"
85 message. Also, check that stderr is now fully scrubbed by -Wnone
86 when the exit status is 0.
88 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
90 Pacify maintainer-check-posix.
91 Adding command-line options after the grammar file name is not
92 permitted, so disable checks that do that when
93 maintainer-check-posix is running.
94 * tests/local.at (AT_BISON_CHECK_NO_XML): Don't run the
95 problematic checks when POSIXLY_CORRECT=1. Also, for readability,
96 remove an unnecessary m4_if.
98 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
100 Add -Wother so -Wnone suppresses all warnings.
101 Reported by George Neuner at
102 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
103 * NEWS (2.5): Document.
104 * THANKS (George Neuner): Add.
105 * doc/bison.texinfo (Bison Options): Document.
106 * src/complain.c, src/complain.h
107 (warn_at, warn_at_indent, warn): Suppress warning if -Wno-other.
108 (midrule_value_at): New warning function, similar to yacc_at in
109 that it's controlled by its own warning category.
110 * src/getargs.c (warnings_flag): Initialize to warnings_other.
111 (warnings_args, warnings_types): Add entry for warnings_other.
113 * src/getargs.h (enum warnings): Add entry for warnings_other.
114 * src/gram.c (grammar_rules_useless_report): If -Wno-other, then
115 don't print useless rules.
116 * src/reader.c (symbol_should_be_used): Rather than adjusting the
117 return value based on whether midrule value warnings are enabled,
118 accept a new parameter for telling the caller whether true is
119 being returned for a potential midrule warning.
120 (grammar_rule_check): Use midrule_value_at for midrule value
121 warnings, and continue to use warn_at for all other warnings. Let
122 them check whether the warnings are enabled.
123 * tests/local.at (AT_BISON_CHECK): Update documentation.
124 (AT_BISON_CHECK_NO_XML): Check that -Wnone and --warnings=none
125 disable all warnings exercised in the test suite.
127 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
129 Don't let -Wnone disable -Werror.
131 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00009.html>.
132 * NEWS (2.5): Document.
133 * src/getargs.c (flags_argmatch): Accept a new argument that
134 specifies what flags "all" and thus "none" affect.
135 (FLAGS_ARGMATCH): Update flags_argmatch invocation.
136 * tests/input.at (-Werror is not affected by -Wnone and -Wall):
139 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
141 * NEWS (2.5): Document fix for -Wno-CATEGORY.
143 2008-11-21 Di-an Jan <dianj@freeshell.org>
145 Implement no-XXX arguments for --warnings, --report, --trace.
146 * src/getargs.c (flags_argmatch): Handles no-XXX.
147 Fix typo in doxygen comment.
149 2011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
151 doc: fix confusing citation of LAC publication.
152 Suggested by Akim Demaille.
153 * doc/bison.texinfo (LAC): Here.
155 2011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
157 lr.default-reductions: rename "full" value to "most".
158 Unlike "consistent" and "accepting", "full" doesn't answer the
159 question of "which states".
160 * doc/bison.texinfo (%define Summary): Update.
161 (Default Reductions): Update.
162 * src/print.c (print_reductions): Update.
163 * src/reader.c (prepare_percent_define_front_end_variables):
165 * src/tables.c (action_row): Update.
166 * tests/input.at (%define enum variables): Update.
167 * tests/reduce.at (%define lr.default-reductions): Update.
169 2011-03-13 Joel E. Denny <joeldenny@joeldenny.org>
171 * src/parse-gram.c, src/parse-gram.h: Regenerate.
173 2011-03-09 Akim Demaille <akim@lrde.epita.fr>
175 named references: fix double free.
176 In `rhs[name]: "a" | "b"', do not free "name" twice.
177 Reported by Tys Lefering.
178 <http://lists.gnu.org/archive/html/bug-bison/2010-06/msg00002.html>
179 * src/named-ref.h, src/named-ref.c (named_ref_copy): New.
180 * src/parse-gram.y (current_lhs): Rename as...
181 (current_lhs_symbol): this.
182 (current_lhs): New function. Use it to free the current lhs
184 * src/reader.c: Bind lhs to a copy of the current named reference.
185 * src/symlist.c: Rely on free (0) being valid.
186 * tests/named-refs.at: Test this.
188 2011-03-09 Akim Demaille <akim@lrde.epita.fr>
190 tests: style changes.
191 * tests/named-refs.at (Redundant words in LHS brackets)
192 (Unresolved references): here.
194 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
196 java: fix parser tracing bug.
197 * NEWS (2.5): Document.
198 * data/lalr1.java (YYParser::YYStack::print): Don't skip top
201 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
203 java: finish fixing parser stack popping bug.
204 * NEWS (2.5): Document.
205 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
206 in clearing the location stack. Also fix pop function that
207 accepts no arguments.
209 2011-03-06 Angelo Borsotti <angelo.borsotti@gmail.com> (tiny change)
211 java: fix parser stack popping bug.
213 <http://lists.gnu.org/archive/html/bug-bison/2011-02/msg00005.html>.
214 * THANKS (Angelo Borsotti): Add.
215 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
216 in clearing the value stack. Previously, the top element of the
217 stack wasn't cleared and so the value was not garbage collected.
219 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
221 doc: cite publication for LAC.
222 * doc/bison.texinfo (LAC): Here.
224 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
226 doc: clean up terminology for mysterious conflicts.
227 * doc/bison.texinfo (Mystery Conflicts): Rename node to...
228 (Mysterious Conflicts): ... this, which is already the section
229 title and the name used in the index. Update all cross-references
230 to this node. Also, don't imply that R/R conflicts are the only
231 kind of mysterious conflict.
233 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
235 lr.default-reductions: rename "all" value to "full".
236 States that shift the error token do not have default reductions,
237 and GLR disables some default reductions, so "all" was a misnomer.
238 * doc/bison.texinfo (%define Summary): Update.
239 (Default Reductions): Update.
240 * src/print.c (print_reductions): Update.
241 * src/reader.c (prepare_percent_define_front_end_variables):
243 * src/tables.c (action_row): Update.
244 * tests/input.at (%define enum variables): Update.
245 * tests/reduce.at (%define lr.default-reductions): Update.
247 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
249 doc: create a new Tuning LR section in the manual.
250 And clean up all other documentation of the features described
252 * NEWS (2.5): Tweak wording of lr.type and parse.lac entries a
253 bit, update the cross-references to the manual, and point out that
254 LAC has caveats. Don't be so adamant that IELR+LAC=canonical LR.
255 That is, as the referenced section in the manual documents, LAC
256 does not fix infinite parsing loops on syntax errors.
257 * doc/bison.texinfo: Consistently drop the "(1)" suffix from LALR,
258 IELR, and LR in @cindex.
259 (%define Summary): Condense the entries for lr.default-reductions,
260 lr.keep-unreachable-states, lr.type, and parse.lac into brief
261 summaries, and cross-reference the appropriate subsections of
262 Tuning LR. For parse.lac, mention that it's only implemented for
263 deterministic parsers in C.
264 (Error Reporting): When mentioning %error-verbose, mention LAC,
265 and add cross-reference to the LAC section.
266 (Tuning LR): New section with an extended version of the
267 documentation removed from %define Summary. Change all
268 cross-references in the manual to point here instead of there.
269 (Calc++ Parser): When mentioning %error-verbose, mention LAC, and
270 add cross-reference to the LAC section.
271 (Table of Symbols): In %error-verbose and YYERROR_VERBOSE entries,
272 add cross-references to Error Reporting.
273 (Glossary): Capitalize entry titles consistently. Add definitions
274 for "defaulted state" and "unreachable state". Expand IELR
275 acronym in IELR's entry.
277 2011-02-20 Joel E. Denny <joeldenny@joeldenny.org>
279 doc: add bibliography to manual.
280 * doc/bison.texinfo (Mystery Conflicts): Cross-reference
281 bibliography instead of citing publications directly.
282 (Generalized LR Parsing): Likewise.
283 (Bibliography): New section. Not all entries are cross-referenced
284 yet, but that will come in future patches.
286 2011-02-19 Joel E. Denny <joeldenny@joeldenny.org>
288 java: test and document previous bug fix.
289 * NEWS (2.5): Document it.
290 * tests/java.at (_AT_DATA_JAVA_CALC_Y): To one of the yyerror
291 invocations, pass a location that spans multiple tokens. Change
292 yyerror to report all of a location rather than just the begin
293 position. Extend yylex and Position to count tokens on a line.
294 Remove getHashCode as it's unused. Update all expected output.
296 2011-02-19 Bernd Kiefer <kiefer@dfki.de> (tiny change)
298 java: fix location handling bug.
300 <http://lists.gnu.org/archive/html/bison-patches/2011-02/msg00005.html>.
301 * data/lalr1.java (YYParser::yylloc): For non-empty RHS, fix
302 reversed access to location stack.
303 * THANKS (Bernd Kiefer): Add.
305 2010-05-11 Akim Demaille <demaille@gostai.com>
308 * doc/bison.texinfo (Local Variables): Move this after the
309 LocalWords, since the latter are looked for in the whole document,
310 while the former are looked for only at its end.
311 Require american spell checking.
313 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
315 doc: clean up new subsections in manual.
316 * doc/bison.texinfo (%define Summary): Reword so it reads well as
317 a separate section. For example, add an intro, and move most of
318 the text outside of the @deffn so it is not indented so far.
319 (%code Summary): Likewise.
320 (Table of Symbols): Reword %code entry to match the %code entry in
323 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
325 doc: finish splitting apart the manual's Decl Summary section.
326 Suggested by Akim Demaille at
327 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
328 * doc/bison.texinfo (Decl Summary): Extract most of the %define
330 (%define Summary): ... this new subsection, and update all
331 cross-references. For readability of the patches, rewriting of
332 the text so it makes sense as a separate subsection will come in a
333 later patch. Moreover, the majority of the text describing the
334 various new LR features should likely move to another new section
337 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
339 doc: begin to split apart the manual's Decl Summary section.
340 Discussed in thread starting at
341 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
342 * doc/bison.texinfo (Decl Summary): Extract most of the %code
344 (%code Summary): ... this new subsection, and update all
345 cross-references. For readability of the patches, rewriting of
346 the text so it makes sense as a separate subsection will come in a
349 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
351 doc: clean up naming of various Bison files.
352 The Bison manual's names for various files associated with a Bison
353 parser has devolved into inconsistency. This patch makes the
354 naming consistent for the most important files. First, it chooses
355 "grammar file" over "input file". The former appears to be more
356 traditional in the Bison manual, and Bison has other input
357 files (skeletons). Second, it chooses "parser implementation
358 file" over names like "parser file", "parser source file", "parser
359 source code file", and "parser output file". The new name makes
360 it clearer where Bison generates the main parser implementation,
361 and it is easily distinguishable from "parser header file".
362 * doc/bison.texinfo: Implement throughout.
364 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
366 doc: give credit to more of Bison's developers.
367 * doc/bison.texinfo (Introduction): Don't imply that only Robert
368 Corbett, Richard Stallman, and Wilfred Hansen have contributed to
369 Bison. However, I don't have time to write a full history, so
370 just point readers to THANKS and ChangeLog.
372 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
374 doc: document experimental features better.
375 * doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
376 LR(1) are experimental. Mention Java. Normally experimental
377 features probably shouldn't be mentioned in the introduction.
378 However, if Bison's limitations to LALR(1), C, and C++ are so
379 important that they should be mentioned here, then it's important
380 to point out that Bison is beginning to escape those limitations.
381 Moreover, these particular experimental features have very little
382 chance of being removed.
383 * src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
386 2011-01-29 Joel E. Denny <joeldenny@joeldenny.org>
388 Do not allow identifiers that start with a dash.
389 This cleans up our previous fixes for a bug whereby Bison
390 discarded `.field' in `$-1.field'. The previous fixes were less
391 restrictive about where a dash could appear in an identifier, but
392 the restrictions were hard to explain. That bug was reported and
393 this final fix was originally suggested by Paul Hilfinger. This
394 also fixes a remaining bug reported by Paul Eggert whereby Bison
395 parses `%token ID -123' as `%token ID - 123' and handles `-' as an
396 identifier. Now, `-' cannot be an identifier. Discussed in
398 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
399 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
400 * NEWS (2.5): Update entry describing the dash extension to
401 grammar symbol names. Also, move that entry before the named
402 references entry because the latter mentions the former.
403 * doc/bison.texinfo (Symbol): Update documentation for symbol
404 names. As suggested by Paul Eggert, mention the effect of periods
405 and dashes on named references.
406 (Decl Summary): Update documentation for unquoted %define values,
407 which, as a side effect, can no longer start with dashes either.
408 * src/scan-code.l (id): Implement.
409 * src/scan-gram.l (id): Implement.
410 * tests/actions.at (Exotic Dollars): Extend test group to exercise
411 bug reported by Paul Hilfinger.
412 * tests/input.at (Symbols): Update test group, and extend to
413 exercise bug reported by Paul Eggert.
414 * tests/named-refs.at (Stray symbols in brackets): Update test
416 ($ or @ followed by . or -): Likewise.
417 * tests/regression.at (Invalid inputs): Likewise.
419 2011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
421 * data/yacc.c: Fix last apostrophe warning from xgettext.
423 2011-01-09 Paul Eggert <eggert@cs.ucla.edu>
425 Fix minor problems encountered by a fresh bootstrap.
426 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
427 as they confuse xgettext, which tries to parse them as C character
428 constants in a preprocessor directive.
429 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
430 that expression might not promote to int on some platforms.
431 * src/parse-gram.c, src/parse-gram.h: Regenerate.
433 2011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
435 Improve error messages for `$' or `@' followed by `.' or `-'.
436 Previously, for this special case of an invalid reference, the
437 usual "symbol not found in production:" was printed. However,
438 because the symbol name was parsed as the empty string, that
439 message was followed immediately by a newline instead of a symbol
440 name. In reality, this is a syntax error, so the reference is
441 invalid regardless of the symbols actually appearing in the
442 production. Discussed at
443 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
444 * src/scan-code.l (parse_ref): Report the above case as a syntax
445 error. Other than that, continue to handle this case like any
446 other invalid reference that Bison manages to parse because
447 "possibly meant" messages can still be helpful to the user.
448 * tests/named-refs.at ($ or @ followed by . or -): New test group.
450 2011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
452 doc: don't use @acronym.
453 Lately, many GNU packages are dropping it. See
454 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
455 * doc/bison.texinfo: Remove all uses.
457 2011-01-05 Alex Rozenman <rozenman@gmail.com>
459 Do not allow identifiers that start with a negative number.
460 Reported by Paul Hilfinger as a side effect of named references
462 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
463 Suggested by Paul Eggert.
464 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
465 * src/scan-gram.l ({letter}, {id}): Likewise.
467 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
469 * ChangeLog (2011-01-02): improve description.
471 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
473 maint: don't update copyright years in bootstrap.
474 * .x-update-copyright: Add entry for bootstrap.
475 * bootstrap: Remove 2011 from copyright years. The bootstrap
476 version we're currently using comes from an older version of
478 * bootstrap.conf (bootstrap_sync): Add comments explaining this
481 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
483 maint: run "make update-copyright".
485 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
487 maint: prepare to use year ranges in copyright notices.
488 * README (Copyright statements): New section explaining the range
489 notation. The GNU maintainers document requires this explanation:
490 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
491 I copied our explanation from coreutils.
492 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
493 disabled Bison's automated use of ranges.
494 * cfg.mk (update-copyright-env): Likewise.
496 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
498 Correct my email address.
499 * ChangeLog: In all recent entries.
500 * THANKS (Joel E. Denny): Here.
502 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
505 * NEWS (2.5): Try to sort entries according to how interesting
506 users might find them.
508 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
511 * NEWS (2.5): Make some minor improvements to wording, and format
512 entries more consistently.
513 * doc/bison.texinfo (Language and Grammar): Point out that IELR
514 and canonical LR are experimental features.
515 (Decl Summary): In list of %define variables, make wording more
516 consistent. Improve discussion of using LALR for GLR.
518 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
521 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
522 other corrections to verbose syntax error messages.
523 * doc/bison.texinfo (Decl Summary): Rewrite entries for
524 lr.default-reductions and lr.type to be clearer, to mention
525 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
527 (Glossary): Add entry for LAC.
529 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
531 parse.lac: implement exploratory stack reallocations.
532 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
533 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
534 with values of "failures" (default) or "full".
535 (b4_declare_parser_state_variables): Add yyesa, yyes, and
536 yyes_capacity variables.
537 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
538 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
540 (YYCOPY_NEEDED): New cpp macro.
541 (YYCOPY): Define if LAC requested.
542 (yy_lac_stack_realloc): New function implementing stack
543 reallocations. Use YYMAXDEPTH for maximum stack size given that
544 the stack should never need to grow larger than the main state
545 stack needs to grow without LAC.
546 (YY_LAC_ESTABLISH): Update yy_lac invocation.
547 (yy_lac): Add arguments for exploratory stack memory data
548 recorded in the main parser. Invoke yy_lac_stack_realloc when
549 reallocation is necessary.
550 (yysyntax_error): Add the same new arguments and pass them to
552 (yypstate_delete): Free yyes if necessary.
553 (yyesa, yyes, yyes_capacity): #define these to yypstate members
554 in the case of push parsing.
555 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
556 Update yysyntax_error invocations. At yyreturn, free yyes if
558 * src/parse-gram.y: %define parse.lac full.
559 * tests/input.at (LAC: errors for %define): Extend for
560 parse.lac-memory-trace.
561 * tests/regression.at (LAC: Exploratory stack): Extend to check
562 that stack reallocs happen when expected.
563 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
564 parse.lac.es-capacity-initial.
566 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
568 parse.lac: implement as %define variable.
569 LAC = lookahead correction. See discussion at
570 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
571 However, one point there must be corrected: because of %nonassoc,
572 LAC is *not* always redundant for lr.type=canonical-lr.
573 * data/yacc.c: Accept values of "none" (default) or "full" for
574 parse.lac. Accept %define parse.lac.es-capacity to specify
575 capacity of LAC's temporary exploratory stack. It defaults to 20
576 and, for now, will not grow dynamically.
577 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
579 (YYBACKUP): Invoke YY_LAC_DISCARD.
580 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
581 yy_lac and track when it needs to be invoked
582 (yy_lac): New function that, given the current stack, determines
583 whether a token can eventually be shifted. Return status mimics
584 yyparse return status.
585 (yysyntax_error): Change yystate argument to yyssp so stack top
586 can be passed to yy_lac. If LAC is requested, build expected
587 token list by invoking yy_lac for every token instead of just
588 checking the current state for lookaheads. Return 2 if yy_lac
590 (yyparse, yypush_parse): Use local variable yy_lac_established and
591 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
592 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
594 * tests/conflicts.at (%nonassoc and eof): Extend to check the
595 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
596 (%error-verbose and consistent errors): Likewise.
597 (LAC: %nonassoc requires splitting canonical LR states): New test
598 group demonstrating how LAC can fix canonical LR.
599 * tests/input.at (LAC: Errors for %define): New test group.
600 * tests/regression.at (LAC: Exploratory stack): New test group.
601 (LAC: Memory exhaustion): New test group.
603 2010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
605 build: use gnulib's new bootstrap_sync option.
606 Now, whenever we update bison's copy of gnulib, bootstrap will
607 update itself the next time it's run.
608 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
609 * bootstrap.conf (bootstrap_sync): Set to true.
610 * gnulib: Update to latest so bootstrap is in sync now.
612 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
614 yysyntax_error: adjust prior fixes for branch-2.5's lalr1.cc.
615 On master, there is no yychar in lalr1.cc, but there is on
616 branch-2.5, and the prior cherry-pick of "Fix handling of yychar
617 manipulation in user semantic actions" wasn't adjusted for that
619 * data/lalr1.cc (yy::parser::parse): Translate yychar before
620 every use of yytoken, and add comments explaining this approach.
621 * tests/conflicts.at (%error-verbose and consistent errors):
622 Extend to test yychar manipulation with lalr1.cc.
624 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
626 yysyntax_error: fix for consistent error with lookahead.
627 * NEWS (2.5): Document.
628 * data/yacc.c (yysyntax_error): In a verbose syntax error
629 message while in a consistent state with a default action (which
630 must be an error action given that yysyntax_error is being
631 invoked), continue to drop the expected token list, but don't
632 drop the unexpected token unless there actually is no lookahead.
633 Moreover, handle that internally instead of returning 1 to tell
634 the caller to do it. With that meaning of 1 gone, renumber
635 return codes more usefully.
636 (yyparse, yypush_parse): Update yysyntax_error usage. Most
637 importantly, set yytoken to YYEMPTY when there's no lookahead.
638 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
639 unexpected token unless there actually is no lookahead.
640 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
641 set yytoken to yyempty_ before invoking yysyntax_error_.
642 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
643 token unless there actually is no lookahead.
644 * data/lalr1.java (YYParser::parse): If there's no lookahead,
645 set yytoken to yyempty_ before invoking yysyntax_error.
646 (YYParser::yysyntax_error): Again, don't drop the unexpected
647 token unless there actually is no lookahead.
648 * tests/conflicts.at (%error-verbose and consistent
649 errors): Extend test group to further reveal how the previous
650 use of the simple "syntax error" message was too general. Test
651 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
653 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
655 * tests/local.at: ... here.
656 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
657 (AT_BISON_OPTION_POPDEFS): Pop it.
658 (AT_FULL_COMPILE): Extend to handle Java.
660 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
662 yysyntax_error: more preparation for readability of next patch.
663 There are no behavioral changes here.
664 * data/glr.c (yyreportSyntaxError): Reorganize.
665 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
666 * tests/conflicts.at (%error-verbose and consistent errors):
669 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
671 yysyntax_error: prepare for readability of next patches.
672 These are purely whitespace changes that result in ugly code
673 but that make the next couple of patches much easier to read.
674 * data/glr.c (yyreportSyntaxError): Reindent.
675 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
676 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
677 * data/yacc.c (yysyntax_error): Reindent.
679 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
681 yysyntax_error: improve invocation readability.
682 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
683 invocation, get rid of the while loop, which is misleading
684 because there are really at most two iterations.
686 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
688 * ChangeLog: Correct some errors in previous entries.
690 2010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
692 maint: re-anchor all .gitignore entries.
693 * bootstrap: Copy from gnulib's latest for the fix to
694 automatically anchor entries it constructs.
695 * gnulib: Update to latest just so it has the same bootstrap.
696 * .gitignore, build-aux/.gitignore, doc/.gitignore:
697 * lib/.gitignore, m4/.gitignore, po/.gitignore:
698 * runtime-po/.gitignore: Re-anchor all entries.
700 2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
702 Fix portability problem on OpenBSD 4.7.
704 Jim Meyering reported this in
705 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
706 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
707 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
709 * src/parse-gram.c, src/parse-gram.h: Regenerate.
710 * tests/regression.at: Tamper with the renamed witness.
712 Adjust to recent changes to gnulib bootstrap.
714 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
715 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
716 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
717 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
718 anymore and don't know of anybody else who does. If someone needs
719 these files, they can resurrect them.
720 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
721 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
722 Omit leading '/', since bootstrap omits it.
723 Adjust file names to match current contents better.
724 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
725 installed just for us.
726 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
727 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
728 needed somehow. Don't have time to look into why.
729 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
730 the GNU malloc behavior, where malloc (0) != NULL unless we're
731 out of storage? If not, we can omit malloc-gnu; but for now I left
734 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
735 uses that convention.
737 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
740 * NEWS (2.4.3): Set date.
742 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
744 maint: add gettext version to release announcements.
745 Suggested by Paul Hilfinger at
746 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
747 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
748 * cfg.mk (bootstrap-tools): Add gettext.
750 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
752 doc: fix -W and %expect documentation some.
753 * NEWS (2.4.3): Mention that there are documentation fixes.
754 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
755 turns conflicts into errors not warnings.
756 (Shift/Reduce): Likewise.
757 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
759 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
761 -Werror: fix for rules useless in parser after conflicts.
762 * NEWS (2.4.3): Document fix.
763 * src/complain.c (error_message): Extend to handle incomplete
764 error messages so warn and warn_at can be used in more cases.
765 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
766 -Werror is always obeyed.
767 * src/reduce.c (reduce_print): Use warn so that the "warnings
768 being treated as errors" message is printed consistently before
769 the first warning message. This makes testing easier.
770 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
771 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
772 --warnings=error when warnings appear in bison's stderr.
774 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
776 maint: enable gnits only at stable releases.
777 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
778 version string should disable gnits. Explain in comments.
780 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
783 * po/POTFILES.in: Add src/graphviz.c.
785 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
787 i18n: fix for gnulib.
788 * po/POTFILES.in: Add remaining gnulib files that have
789 translatable strings.
791 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
793 maint: use announce-gen's new --mail-headers.
794 * HACKING (Announce): Update instructions.
795 * cfg.mk (announcement_Cc_): Define.
796 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
797 required by latest gnulib.
798 * gnulib: Update to latest.
800 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
802 tests: handle Valgrind that complains about >&-.
803 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
804 (Output files: -dv >&-): Skip test group if running
805 maintainer-check-valgrind.
807 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
809 Update from GFDL GFDL 1.2 to 1.3.
810 * doc/bison.texinfo: Update GFDL version number.
811 * doc/fdl.texi: Update to version 1.3, taken from:
812 http://www.gnu.org/licenses/fdl.texi
814 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
816 Do not use date ranges in copyright notices.
817 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
819 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
820 * TODO, bootstrap, bootstrap.conf:
821 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
822 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
823 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
824 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
825 * data/lalr1.java, data/location.cc:
826 * data/xslt/bison.xsl:
827 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
828 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
829 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
830 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
831 * djgpp/subpipe.c, djgpp/subpipe.h:
832 * djgpp/testsuite.sed, doc/bison.texinfo:
833 * doc/refcard.tex, etc/README, etc/bench.pl.in:
834 * examples/calc++/Makefile.am, examples/extexi:
835 * lib/abitset.c, lib/abitset.h:
836 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
837 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
838 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
839 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
840 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
841 * lib/libiberty.h, lib/main.c, lib/timevar.c:
842 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
843 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
844 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
845 * src/AnnotationList.c, src/AnnotationList.h:
846 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
847 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
848 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
849 * src/complain.h, src/conflicts.c, src/conflicts.h:
850 * src/derives.c, src/derives.h, src/files.c, src/files.h:
851 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
852 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
853 * src/ielr.h, src/lalr.c, src/lalr.h:
854 * src/location.c, src/location.h, src/main.c:
855 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
856 * src/named-ref.h, src/nullable.c, src/nullable.h:
857 * src/output.c, src/output.h, src/parse-gram.y:
858 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
859 * src/print_graph.c, src/print_graph.h, src/reader.c:
860 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
861 * src/relation.h, src/scan-code.h, src/scan-code.l:
862 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
863 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
864 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
865 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
866 * tests/actions.at, tests/atlocal.in, tests/c++.at:
867 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
868 * tests/existing.at, tests/glr-regression.at:
869 * tests/headers.at, tests/input.at, tests/java.at:
870 * tests/local.at, tests/named-refs.at:
871 * tests/output.at, tests/push.at, tests/reduce.at:
872 * tests/regression.at, tests/sets.at, tests/skeletons.at:
873 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
874 * data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
875 * tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
877 Don't use date ranges in copyright notices.
879 2010-05-11 Akim Demaille <demaille@gostai.com>
881 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
882 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
883 header file to the implementation file, after the user %code
885 * NEWS (2.5): Document this.
887 2010-05-07 Akim Demaille <demaille@gostai.com>
890 * data/lalr1.cc (YYRHSLOC): New.
891 (YYLLOC_DEFAULT): Use it.
892 * data/glr.cc: If location_type was user defined, do not include
893 location.hh, and do not produce location.hh and position.hh.
894 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
895 Check that glr.cc supports user defined location_type.
896 * NEWS: Document this.
898 2010-05-10 Akim Demaille <demaille@gostai.com>
900 doc: fix lalr1.cc documentation.
901 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
902 (C++ Bison Interface): Fix lalr1.cc skeleton name.
903 (C++ Parser Interface): Fix semantic_type and location_type names.
904 Document yy::parser::token.
905 Reported by Jerry Quinn.
907 2010-05-04 Akim Demaille <demaille@gostai.com>
909 lalr1.cc: don't generate location.hh when location_type is defined
910 * data/bison.m4 (b4_percent_define_use): New.
911 (b4_percent_define_get): Use it.
912 Accept a default value.
913 * data/c++.m4: Do not provide a default value for the %define
914 variable location_type, rather, use b4_percent_define_get with a
915 default argument where its value is needed.
916 * data/lalr1.cc: Do not load location.cc (which outputs both
917 location.hh and position.hh) if the user defined location_type.
918 Do not include location.hh either.
919 * data/glr.cc: Likewise.
921 2010-05-04 Akim Demaille <demaille@gostai.com>
923 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
924 * tests/calc.at (Span): Instead of begin/end, as in the built-in
925 location class, use first and last.
926 Define YYLLOC_DEFAULT to adjust to these changes.
927 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
928 location_type changes.
930 2010-05-04 Akim Demaille <demaille@gostai.com>
932 tests: enhance AT_SYNCLINES_COMPILE.
933 * tests/synclines.at (AT_TEST_SYNCLINE): Move GCC 4.5 protection
935 (AT_SYNCLINES_COMPILE): here.
936 Add more distcc patterns.
938 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
940 tests: fix maintainer-xml-check.
941 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
942 Update output to include comments now produced by --graph.
943 (xsl:template match="automaton"): As for --graph, name the
944 digraph after the grammar file.
945 * src/print-xml.c (escape_bufs): Enlarge array.
946 (print_xml): Add bug-report and url attributes to
947 bison-xml-report element.
949 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
951 In DOT output, convert from "/*" comments to "//" comments.
952 This handles the possibility that a "*/" might appear in
953 variable portions of those comments at some point in the future.
954 * src/graphviz.c (start_graph): Implement.
956 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
958 Document that undefined %prec identifier warnings will remain.
959 * NEWS (2.4.3): Here.
962 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
964 Revert 2009-12-30 change for undefined %prec token complaints.
965 That is, keep them as warnings because that should be sufficient
966 to satisfy POSIX without creating backward compatibility issues.
967 Suggested by Richard Stallman at
968 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
969 * NEWS (2.5): Remove mention of complaint.
970 * src/reader.c (grammar_rule_check): Convert complaint back to
972 * tests/input.at (%prec's token must be defined): Update.
974 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
976 build: don't require src/bison during bootstrap.
977 Suggested by Eric Blake at
978 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
979 * bootstrap.conf (bootstrap_epilogue): New function to make sure
980 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
982 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
984 i18n: fix untranslatable string.
985 Reported by Goran Uddeborg at
986 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
987 * src/muscle-tab.c (muscle_percent_define_insert): Here.
989 2010-04-13 Akim Demaille <demaille@gostai.com>
991 tests: calc: minor refactoring.
992 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
994 2010-04-13 Akim Demaille <demaille@gostai.com>
996 tests: calc: simplify location management.
997 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
998 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
999 define the appropriate AT_LOC accessors.
1000 * tests/calc.at: Use AT_LOC accessors.
1002 2010-04-13 Akim Demaille <demaille@gostai.com>
1005 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
1006 Define AT_LOCATION_TYPE_IF.
1007 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
1008 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
1009 used, provide a user location type and use it.
1010 (Simple LALR1 C++ Calculator): Add a test case for location_type.
1012 2010-04-13 Akim Demaille <demaille@gostai.com>
1014 tests: check fclose's return value.
1015 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
1017 2010-04-13 Akim Demaille <demaille@gostai.com>
1019 tests: don't depend on the actual location type.
1020 * tests/calc.at: Use yy::parser::location_type rather than
1021 yy::location, since the former is always right, and might point to
1022 another type than the latter.
1024 2010-04-13 Akim Demaille <demaille@gostai.com>
1027 * tests/calc.at: Formatting changes.
1029 2010-04-13 Akim Demaille <demaille@gostai.com>
1031 lalr1.cc: remove useless forward declaration.
1032 * data/lalr1.cc: Include location.hh before stack.hh.
1033 Remove the useless forward declarations of position and location.
1034 Reported by Chris Morley.
1035 * data/glr.cc: Likewise.
1037 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
1039 * NEWS (2.4.3): Mention fix for Sun Studio C++.
1041 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
1043 tests: fix for newer Sun Studio C++.
1044 Reported by Dagobert Michelsen at
1045 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
1046 * THANKS (Dagobert Michelsen): Add.
1047 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
1048 Autoconf macro for handling the restrict keyword.
1049 * gnulib: Update to latest, which no longer overrides that macro
1052 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1054 portability: fix pointer arithmetic to conform to C standard.
1055 Reported by Tys Lefering at
1056 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
1057 This fix is already implemented in glr.c and does not apply to
1059 * data/lalr1.cc (yy::parser::parse): Increase size of
1060 yyerror_range and adjust subscripting so you don't have to
1061 subtract one from the beginning of the array.
1062 * data/yacc.c (b4_declare_parser_state_variables,
1063 yyparse, yypush_parse): Likewise.
1065 2010-04-05 Akim Demaille <demaille@gostai.com>
1067 remove useless include.
1068 * src/graphviz.h: Don't include stdbool.h.
1070 2010-04-05 Akim Demaille <demaille@gostai.com>
1072 graph: sign the output file.
1073 * src/graphviz.c (start_graph): Issue comments about Bison.
1074 Suggested by Tys Lefering.
1076 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
1078 portability: fix test suite for GCC 4.5's new #error message.
1079 Reported by Tys Lefering at
1080 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
1081 * NEWS (2.4.3): Mention.
1082 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
1084 2010-03-30 Akim Demaille <demaille@gostai.com>
1087 * src/graphviz.h: Add missing license notice.
1090 2010-03-25 Akim Demaille <demaille@gostai.com>
1092 tests: fix 250: parse.error=verbose overflow.
1093 * tests/regression.at (parse.error=verbose overflow): Avoid the
1094 double inclusion of stdlib.h as it triggers hard errors.
1096 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1098 portability: fix for BSD make.
1099 Reported by Johan van Selst at
1100 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
1101 * tests/Makefile.am ($(TESTSUITE)): Qualify package.m4 in
1102 this dependency list as in package.m4's target rule.
1104 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1106 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
1107 Reported by Johan van Selst at
1108 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
1109 * NEWS (2.4.3): New.
1110 * THANKS (Johan van Selst): Add.
1111 * gnulib: Update to latest.
1113 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1115 maint: update for changes to gnulib's announce-gen.
1116 * HACKING (Announce): RELEASE_TYPE=major must now be written
1117 RELEASE_TYPE=stable.
1119 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1122 * NEWS (2.4.2): Set version and date. For the recent test suite
1123 portability fixes, don't be so optimistic about their success
1124 given the lack of feedback on the affected platforms.
1126 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1128 tests: fix maintainer-xml-check for recent changes.
1129 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
1130 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
1131 output file whose name conflicts with a previous output file
1132 is now never generated.
1134 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1136 portability: fix several issues with M4 subprocess.
1138 M4's output pipe was not being drained upon fatal errors during
1139 scan_skel. As a result, broken-pipe messages from M4 were seen
1140 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
1141 failure in the test suite. The problem was that, on platforms
1142 where the default disposition for SIGPIPE is ignore instead of
1143 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
1144 then reported it. However, there's some sort of race condition,
1145 because the new test group occasionally succeeded.
1146 Reported by Albert Chin at
1147 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
1149 There were also problems with the test suite livelocking on
1150 Tru64 5.1b. Reported by Didier Godefroy at
1151 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
1152 Switching to create_pipe_bidi suggested by Akim Demaille.
1154 To attempt to solve both of these problems, switch to gnulib's
1155 create_pipe_bidi and register M4 process as a slave. Along the
1156 way, clean up file name conflict handling, which was affected by
1157 the broken-pipe problem before the switch.
1158 * NEWS (2.4.2): Document.
1159 * THANKS (Didier Godefroy): Add.
1160 * bootstrap.conf (gnulib_modules): Add pipe.
1161 * gnulib: Update to latest to make sure we have all the latest
1163 * lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
1165 * po/POTFILES.in (lib/subpipe.c): Remove.
1166 * src/files.c (compute_output_file_names): Update invocations
1167 of output_file_name_check.
1168 (output_file_name_check): In the case that the grammar file
1169 would be overwritten, use complain instead of fatal, but replace
1170 the output file name with /dev/null. Use the /dev/null solution
1171 for the case of two conflicting output files as well because it
1172 seems safer in case Bison one day tries to open both files at
1174 * src/files.h (output_file_name_check): Update prototype.
1175 * src/output.c (output_skeleton): Use create_pipe_bidi and
1176 wait_subprocess. Assert that scan_skel completely drains the
1178 * src/scan-skel.l (at_directive_perform): Update
1179 output_file_name_check invocation.
1180 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
1181 grammar file actually isn't overwritten.
1182 (Conflicting output files: -o foo.y): Update expected output.
1183 * tests/skeletons.at (Fatal errors but M4 continues producing
1184 output): New test group.
1186 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
1189 * HACKING (Release Procedure): Add reminder about keeping
1190 POTFILES files up-to-date.
1191 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
1193 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
1196 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
1197 which is already defined in atconfig.
1199 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
1201 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
1203 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
1205 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
1206 * HACKING (Release Procedure): Update notes on copyright years.
1207 * Makefile.am (update-package-copyright-year): New target rule.
1208 * build-aux/update-package-copyright-year: New file.
1209 * cfg.mk (update-copyright): Add update-package-copyright-year
1212 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1214 * bootstrap: Import improvements from latest gnulib.
1216 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1218 build: require Automake 1.11.1 to avoid a security flaw.
1219 * HACKING (Release Procedure): Don't document Automake security
1221 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
1224 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1226 gnulib: update to latest.
1228 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1230 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
1232 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
1234 Thank the developer of the initial push parser implementation.
1235 This unfortunate oversight is several years old.
1236 * THANKS (Odd Arild Olsen): Add.
1238 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
1240 Fix some comments concerning LR(0) versus LALR(1).
1242 Stop equating LR(0) with nondeterminism and LALR(1) with
1243 determinism. That is, if all states are consistent, then LR(0)
1244 tables are deterministic. On the other hand, LALR(1) tables
1245 might be nondeterministic before conflict resolution, and GLR
1246 permits LALR(1) tables to remain nondeterministic.
1247 * src/LR0.c, src/LR0.h: Here.
1248 * src/lalr.c, src/lalr.h: Here.
1249 * src/main.c (main): Here.
1250 * src/state.c, src/state.h: Here.
1252 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
1255 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
1257 maint: run "make update-copyright"
1259 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
1261 POSIX: complain if %prec's token was not defined.
1262 * NEWS (2.5): Document.
1263 * src/reader.c (grammar_rule_check): Convert warning to
1265 * tests/input.at (%prec's token must be defined): Update.
1267 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
1269 POSIX: warn if %prec's token was not defined.
1270 Reported by Florian Krohm at
1271 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
1272 * NEWS (2.4.2): Document.
1273 * src/reader.c (grammar_rule_check): Implement.
1274 (grammar_current_rule_prec_set): Add comments explaining that we
1275 here assume a %prec identifier is a token, but we still manage
1277 * tests/input.at (%prec's token must be defined): New test
1280 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
1282 * HACKING (Release Procedure): Recommend a secure automake.
1284 2008-12-11 Akim Demaille <demaille@gostai.com>
1286 Propagate i18n changes into glr.c.
1287 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1288 building the error message format dynamically.
1289 * data/lalr1.java: Formatting changes.
1291 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
1293 Port small part of master's 11707b2b so future ports are easier.
1294 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
1296 2008-12-11 Akim Demaille <demaille@gostai.com>
1298 Simplify the i18n of the error messages.
1299 * data/lalr1.cc: Comment changes.
1301 2008-11-11 Akim Demaille <demaille@gostai.com>
1304 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1307 2008-11-11 Akim Demaille <demaille@gostai.com>
1309 Support i18n of the parse error messages.
1310 * TODO (lalr1.cc/I18n): Remove.
1311 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1312 error messages, as done in yacc.c.
1313 Stay within the yy* pseudo namespace.
1315 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
1317 Port small part of master's 8901f32e so future ports are easier.
1318 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
1319 argument, but name it in the function definition only when
1320 verbose error messages are enabled and it'll thus be used.
1321 (yy::parser::parse): Update use of yysyntax_error_.
1323 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
1325 portability: `<' and `>' are not always defined on addresses.
1326 Specifically, don't sort objects by their memory addresses when
1327 they're not allocated in the same array or other object. Though
1328 I haven't found a test case where that fails on my platform, C
1329 says the behavior is undefined.
1330 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1331 FIXME. Use new id field of InadequacyList nodes rather than
1332 their memory addresses when sorting.
1333 (AnnotationList__compute_from_inadequacies): Add
1334 inadequacy_list_node_count argument to pass to
1335 InadequacyList__new_conflict.
1336 * src/AnnotationList.h
1337 (AnnotationList__compute_from_inadequacies): Update prototype
1338 and documentation for new argument.
1339 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1340 node_count argument and use it to assign a unique ID.
1341 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1342 (InadequacyList): Add id field.
1343 (InadequacyList__new_conflict): Update prototype and
1344 documentation for new argument.
1345 * src/ielr.c (ielr_compute_annotation_lists): Update
1346 AnnotationList__compute_from_inadequacies invocation.
1348 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
1350 Fix handling of yychar manipulation in user semantic actions.
1351 The problem was that yacc.c didn't always update the yychar
1352 translation afterwards. However, other skeletons appear to be
1353 fine. glr.c appears to already translate yychar before every
1354 use. lalr1.cc does not define yychar and does not document its
1355 replacement, yyla, for users. It does provide yyclearin, but
1356 that does not manipulate yyla and thus requires no translation
1357 update. In lalr1.java, yychar is out of scope during semantic
1359 * NEWS (2.5): Document.
1360 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1362 (yyparse, yypush_parse): Instead, translate before every use of
1363 yytoken, and add comments explaining this approach.
1364 * tests/actions.at (Destroying lookahead assigned by semantic
1365 action): New test group checking that translation happens before
1366 lookahead destructor calls at parser return. Previously,
1367 incorrect destructors were called.
1368 * tests/conflicts.at (%error-verbose and consistent
1369 errors): New test group checking that translation happens at
1370 syntax error detection before the associated verbose error
1371 message and the associated lookahead destructor calls. While
1372 the destructor call is fixed by this patch, the verbose error
1373 message is currently incorrect due to another bug (see
1374 comments in test group), so this is an expected failure for now.
1376 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1378 YYFAIL: warn about uses and remove from lalr1.java.
1379 * NEWS (2.5): Document.
1380 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
1381 and make it private. Update all uses.
1382 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1384 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1387 * NEWS (2.4.2): Document deprecation and the phase-out plan.
1388 * data/lalr1.java (YYParser::YYFAIL): Add comment about
1390 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1391 YYFAIL from GCC cpp's -Wunused-macros.
1392 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1394 (LocalWords): Remove YYFAIL.
1396 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
1399 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1400 function, which is no longer used.
1402 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1404 Add gcc's -Wundef to test suite and fix another warning from it.
1405 * NEWS (2.4.2): Update description of -Wundef fix.
1406 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1407 (WARN_CFLAGS_TEST): New substitution.
1408 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1409 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1411 (NO_WERROR_CFLAGS): Likewise.
1412 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1414 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1416 * data/yacc.c: Reformat m4 a little.
1418 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1420 Document gcc -Wundef fix.
1421 * NEWS (2.4.2): Here.
1422 * THANKS (Jonathan Nieder): Add.
1424 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1426 Simplify y.tab.c when location tracking is disabled.
1427 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1428 tracking is not enabled. Instead, unconditionally define
1429 YY_LOCATION_PRINT as a no-op for backward compatibility.
1431 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1433 Avoid warnings from gcc -Wundef y.tab.c.
1434 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1435 defined before using them.
1436 * data/lalr1.cc: Likewise.
1437 * data/yacc.c: Likewise.
1439 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1441 autoconf: update to latest for fix of M4 detection.
1442 Reported by Eric Blake.
1443 * submodules/autoconf: Update.
1445 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1447 portability: use -DGNULIB_POSIXCHECK.
1448 Reported by Eric Blake. See discussions at
1449 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1451 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1452 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1453 * bootstrap.conf (gnulib_modules): Add all the printf modules
1454 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1455 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1456 (excluded_files): Remove m4/printf-posix.m4.
1457 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1458 lib/libbison.a so gnulib libraries can be linked.
1460 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1462 Enable assertion output and --disable-assert for configure.
1463 * bootstrap.conf (gnulib_modules): Add assert module.
1464 * src/system.h (aver): Define as assert, and summarize the
1465 discussion on this issue.
1467 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1469 Expand GLR acronym in summary of Bison.
1470 Based on discussion with Akim Demaille starting at
1471 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1472 * doc/bison.texinfo (Introduction): Here.
1473 * src/getargs.c (usage): Here.
1475 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1477 Document named references.
1478 * doc/bison.texinfo (Actions): Add new example and xref to
1479 Using Named References node.
1480 (Using Named References): New node.
1482 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1485 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1487 (Sbitset__isEmpty): Use Sbitset instead of char*.
1488 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1489 instead of char. This helps to avoid casting errors.
1490 (Sbitset__or): Use Sbitset instead of char*.
1492 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1494 portability: don't assume 8-bit bytes.
1495 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1496 * src/Sbitset.h (Sbitset__nbytes): Here.
1497 (Sbitset__byteAddress): Here.
1498 (Sbitset__bit_mask): Here.
1499 (Sbitset__last_byte_mask): Here.
1500 (Sbitset__ones): Here.
1501 (SBITSET__FOR_EACH): Here.
1503 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
1505 portability: use va_start and va_end in the same function.
1506 * src/complain.c (error_message): Move va_end from here...
1507 (ERROR_MESSAGE): ... to here.
1509 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1511 * data/bison.m4: Update comments for rename to muscle-tab.h.
1513 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1515 Rename muscle_tab.* to muscle-tab.* for consistency with master.
1516 * src/Makefile.am (bison_SOURCES): Update.
1517 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
1518 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
1519 src/tables.c: Update include.
1520 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
1521 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
1524 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
1527 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1528 replace all uses with UNIQSTR_CONCAT.
1529 * src/uniqstr.c (uniqstr_vsprintf): New function.
1530 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1531 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1534 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1537 * src/parse-gram.y: Clean up sorting of declarations.
1538 Use types to simplify %printer declarations where possible.
1539 Provide %printer for BRACKETED_ID and symbol.prec.
1540 * src/symtab.c: Whitespace change.
1542 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1544 tests: skip tests of file names that platform does not support.
1545 Reported by Michael Raskin at
1546 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1547 * THANKS (Michael Raskin): Add.
1548 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1549 to fail at least for file names containing ":" or "\".
1551 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1553 yysyntax_error: avoid duplicate lookahead collection.
1554 Except when memory reallocation is required, this change
1555 eliminates the need to invoke yysyntax_error twice and thus to
1556 repeat the collection of lookaheads. It also prepares for
1557 future extensions that will make those repetitions more
1558 expensive and that will require additional memory management in
1559 yysyntax_error. Finally, it fixes an obscure bug already
1560 exercised in the test suite.
1561 * data/yacc.c (yysyntax_error): Add arguments for message
1562 buffer variables stored in the parser. Instead of size, return
1563 status similar to yyparse status but indicating success of
1564 message creation. Other than the actual reallocation of the
1565 message buffer, import and clean up memory management code
1567 (yyparse, yypush_parse): ... here.
1568 * tests/regression.at (%error-verbose overflow): No longer an
1571 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1573 yysyntax_error: test memory management more.
1574 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1575 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
1577 (%error-verbose overflow): New test group that reveals an
1578 obscure bug. Expected fail for now.
1580 2008-12-11 Akim Demaille <demaille@gostai.com>
1582 Pass the token type to yysyntax_error.
1583 * data/yacc.c (yysyntax_error): Take the transated token instead
1587 2008-12-11 Akim Demaille <demaille@gostai.com>
1589 Simplify the i18n of the error messages.
1590 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
1591 of building dynamically the format string.
1593 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
1596 * src/symtab.c (symbol_pack): Here because every symbol's number
1597 is always defined by this time.
1599 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1601 Add additional space after periods in NEWS.
1604 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
1606 Use the correct conversion specifier for size_t.
1607 Reported by Jim Meyering.
1608 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1609 because Sbitset__Index is size_t.
1610 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1612 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
1614 tests: don't abuse AT_BISON_CHECK.
1615 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1616 additional shell commands outside of AT_BISON_CHECK.
1618 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
1620 tests: check that parse-gram.y's IELR and LALR are identical.
1621 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1622 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1625 2009-09-16 Akim Demaille <demaille@gostai.com>
1627 doc: comment changes.
1628 * doc/bison.texinfo: Comment changes.
1630 2009-09-16 Akim Demaille <demaille@gostai.com>
1632 doc: spell checking.
1633 * doc/bison.texinfo: here.
1635 2009-09-19 Alex Rozenman <rozenman@gmail.com>
1637 Keep sub-messages aligned. Fix strings for translation.
1638 * src/location.h (location_print): Add return value.
1639 * src/location.c (location_print): Return number of printed
1641 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1643 * src/complain.cpp (indent_ptr): New static variable.
1644 (error_message, complain_at_indent, warn_at_indent): Implement
1645 the alignment mechanism.
1646 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1647 for translations. Use new alignment mechanism.
1648 * tests/named-ref.at: Adjust test-cases.
1649 * NEWS (2.5): Add an announcement about named references.
1651 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
1653 tests: clean up push.at test group titles.
1654 * tests/push.at: Remove "Push Parsing: " from test group titles
1655 because these are already under the banner "Push Parsing Tests".
1657 2009-09-12 Alex Rozenman <rozenman@gmail.com>
1659 Provide an additional sub-message for clarity.
1660 Add "symbol not found in production" error message when
1661 an "invalid reference" is detected in named references
1663 * src/scan-code.l: Update "invalid reference" case.
1664 * tests/named-ref.at: Adjust test-cases.
1666 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1668 Clean up yacc.c a little.
1669 * data/yacc.c: Clean up M4 for readability, and make output
1670 whitespace more consistent. For the main parse function
1671 comment, instead of saying "yyparse or yypush_parse", say either
1672 "yyparse" or "yypush_parse" depending on which it actually is.
1674 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1676 Complain about unused %define variables and %code qualifiers.
1677 * NEWS (2.5): Document.
1678 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1679 * doc/bison.texinfo (Decl Summary): Document complaint, and
1680 improve %define documentation a little otherwise.
1681 * tests/input.at (Reject unused %code qualifiers): Update.
1682 (%define errors): Update.
1683 (%define, --define, --force-define): Update.
1684 (%define backward compatibility): Update.
1685 (Unused %define api.pure): Update.
1686 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1688 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1690 Use aver not assert.
1691 * src/output.c: Don't include assert.h.
1692 (output_skeleton): Use aver not assert.
1693 * src/system.h (aver): In documentation of why, add links to
1694 Paul Eggert's explanations in the mailing lists.
1696 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1698 Use "Unresolved reference" error message when no symbols were found
1699 in a symbolic reference resolution. Remove .expr and -expr from
1700 the shown reference when the reference is unresolved.
1701 * src/scan-code.l: Change the error message, adjust location columns,
1702 rename variable "exact_mode" to "explicit_bracketing".
1703 * tests/named-ref.at: Adjust existing tests and add a new one.
1705 2009-09-03 Akim Demaille <demaille@gostai.com>
1707 * NEWS (2.4.2): Add "Internationalization" item.
1709 2009-09-03 Akim Demaille <demaille@gostai.com>
1711 bootstrap: fix/improve find_tool.
1712 * bootstrap (find_tool): Improve error messages.
1713 Fix typo about find_tool_names.
1715 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1717 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1719 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1720 * src/scan-code.h (code_props_rule_action_init): Rename
1721 named_ref arg to name so it doesn't shadow named_ref type. This
1722 makes it consistent with the function definition in scan-code.l
1725 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1727 %define: accept unquoted values.
1728 * NEWS (2.5): Group all %define changes together, and document
1729 this one. Remove quotes in IELR and canonical LR entry.
1730 * doc/bison.texinfo: Remove quotes in most examples throughout.
1731 (Decl Summary): Update %define documentation.
1732 (Table of Symbols): Likewise.
1733 * src/ielr.c (LrType): Update documentation.
1734 * src/parse-gram.y (content.opt): Add production for ID.
1735 * tests/calc.at: Remove quotes in most tests.
1736 * tests/existing.at: Likewise.
1737 * tests/input.at: Likewise.
1738 * tests/local.at: Likewise.
1739 * tests/push.at: Likewise.
1740 * tests/reduce.at: Likewise.
1741 * tests/torture.at: Likewise.
1743 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1745 %define lr.type: make values lowercase IDs.
1746 That is, "LALR" => "lalr", "IELR" => "ielr", and
1747 "canonical LR" => "canonical-lr".
1748 * NEWS (2.5): Update documentation.
1749 * doc/bison.texinfo (Decl Summary): Likewise.
1750 * src/ielr.c (ielr): Use new values.
1751 * src/ielr.h (ielr): Update documentation.
1752 * src/reader.c (prepare_percent_define_front_end_variables): Use
1753 and validate new values.
1754 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1756 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1758 2009-08-27 Eric Blake <ebb9@byu.net>
1760 scan-gram: avoid portability trap with ctype usage.
1761 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1762 Avoid compiler warning.
1764 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1766 tests: use perl for printing special sequences to files.
1767 And skip tests if perl is not available. This is better than
1768 playing tricks with shell portability. Suggested by Akim
1770 * tests/input.at (Bad character literals): Use it here for
1771 omitting final newlines.
1772 (Bad escapes in literals): Use it here for special characters.
1774 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1776 tests: show a use of %define lr.default-reductions "consistent"
1777 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1778 prevents the omission of expected tokens for %error-verbose.
1780 2009-08-26 Akim Demaille <demaille@gostai.com>
1782 tests: portability fix.
1783 * tests/input.at (Bad escapes in literals): Don't expect "echo
1784 '\0'" to output \ then 0.
1786 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1788 Actually handle the yytable zero value correctly this time.
1789 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
1790 mention zero values in the YYTABLE comments.
1791 * data/glr.c (yytable_value_is_error): Don't check for zero
1793 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1794 * data/yacc.c (yytable_value_is_error): Likewise.
1795 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1796 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1797 * src/tables.h: In header comments, explain why it's useless to
1798 check for a zero value in yytable.
1800 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1802 More fixes related to last two patches.
1803 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1805 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
1806 yytable comments: zero indicates syntax error not default
1808 * data/glr.c (yyis_pact_ninf): Rename to...
1809 (yypact_value_is_default): ... this.
1810 (yyisDefaultedState): Update for rename.
1811 (yyis_table_ninf): Rename to...
1812 (yytable_value_is_error): ... this, and check for value zero
1813 besides just YYTABLE_NINF.
1814 (yygetLRActions): Check for default value from yypact. It
1815 appears that this check is always performed before this function
1816 is invoked, and so adding the check here is probably redundant.
1817 However, the code may evolve after this subtlety is forgotten.
1818 Also, update for rename to yytable_value_is_error. Because that
1819 macro now checks for zero, a different but equivalent branch of
1820 the if-then-else here is evaluated.
1821 (yyreportSyntaxError): Update for rename to
1822 yytable_value_is_error. The zero condition was mishandled
1824 (yyrecoverSyntaxError): Update for renames. No behavioral
1826 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1828 (yy_table_value_is_error_): New function.
1829 (parse): Use new functions where possible. No behavioral
1831 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1832 The zero condition was mishandled before.
1833 * data/yacc.c (yyis_pact_ninf): Rename to...
1834 (yypact_value_is_default): ... this.
1835 (yyis_table_ninf): Rename to...
1836 (yytable_value_is_error): ... this, and check for value zero
1837 besides just YYTABLE_NINF.
1838 (yysyntax_error): Update for rename to yytable_value_is_error.
1839 The zero condition was mishandled before.
1840 (yyparse): Update for renames. No behavioral changes.
1841 * src/tables.h: Improve comments about yypact, yytable, etc.
1842 more. Most importantly, say yytable value of zero means syntax
1843 error not default action.
1845 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1847 Fix %error-verbose for conflicts resolved by %nonassoc.
1848 * NEWS (2.5): Document.
1849 * data/glr.c (yyreportSyntaxError): Fix this by checking
1851 * data/yacc.c (yysyntax_error): Likewise.
1852 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1854 * data/lalr1.java (yysyntax_error): Likewise.
1855 * tests/conflicts.at (%nonassoc and eof): Update expected output
1858 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1860 Some code and documentation improvements.
1861 * data/c.m4 (b4_table_value_equals): New macro to capture
1863 * data/glr.c (yyis_pact_ninf): Use it here.
1864 (yyis_table_ninf): Likewise.
1865 (yyreportSyntaxError): Improve internal comments.
1866 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1867 Use it everywhere possible.
1868 (yyis_table_ninf): Likewise.
1869 (yysyntax_error): Improve internal comments.
1870 * data/lalr1.cc (yysyntax_error_): Likewise.
1871 * data/lalr1.java (yysyntax_error): Likewise.
1872 * src/tables.h: Improve comments about yypact, yytable, etc.
1874 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
1876 Use locale when quoting.
1877 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1878 quote rather than implementing quoting here.
1880 2009-08-20 Eric Blake <ebb9@byu.net>
1882 Make previous patch more robust.
1883 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1885 (output_skeleton): Use it.
1886 Suggested by Akim Demaille.
1888 Import latest m4/m4.m4.
1889 * submodules/autoconf: Update to autoconf 2.64.
1890 * configure.ac (M4_GNU_OPTION): New define.
1891 * src/output.c (output_skeleton): Use it to resolve FIXME.
1892 * NEWS: Mention this.
1894 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
1896 Fix complaints about escape sequences.
1897 Discussed starting at
1898 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1899 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1900 For a \0 and similar escape sequences meaning the null
1901 character, report an invalid escape sequence instead of an
1902 invalid null character because the latter does not actually
1903 appear in the user's input.
1904 In all escape sequence complaints, don't escape the initial
1905 backslash, and don't quote when the sequence appears at the end
1906 of the complaint line unless there's whitespace that quotearg
1908 Consistently say "invalid" not "unrecognized".
1909 Consistently prefer "empty character literal" over "extra
1910 characters in character literal" warning for invalid escape
1911 sequences; that is, consistently discard those sequences.
1912 * tests/input.at (Bad escapes in literals): New.
1914 2009-08-19 Akim Demaille <demaille@gostai.com>
1917 * doc/bison.texinfo: Fix minor Texinfo errors.
1919 2009-08-19 Akim Demaille <demaille@gostai.com>
1921 doc: %initial-action to initialize yylloc.
1922 Reported by Bill Allombert.
1923 * doc/bison.texinfo: Set fill-column to 76.
1924 (Location Type): Document the use of %initial-action to initialize
1927 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
1929 maint: update for gnulib's recent update-copyright changes
1931 * .x-update-copyright (COPYING): Add as it's no longer implied
1932 when .x-update-copyright is present.
1933 * cfg.mk (update-copyright-local): Remove, now ignored.
1934 (update-copyright): Declare update-b4-copyright as a dependency.
1936 2009-08-17 Akim Demaille <demaille@gostai.com>
1938 build: require gettext 0.17.
1940 Suggested by Bruno Haible.
1941 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1942 * configure.ac: require gettext 0.17 to ensure compatibility with
1945 2009-08-17 Akim Demaille <demaille@gostai.com>
1947 build: lower gettext requirements.
1949 Bison was uselessly requiring the formatstring macros from
1950 gettext, which resulted in mo files not being installed on systems
1951 that perfectly supported Bison mo files. Lower the requirement.
1952 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1954 * configure.ac: Require need-ngettext instead of
1955 need-formatstring-macros.
1956 Reported by Martin Jabocs.
1957 Suggested by Bruno Haible.
1958 * INSTALL: Restructure.
1959 (Internationalization): New.
1961 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
1963 maint: fix use of copyright year intervals.
1965 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1966 as now recommended in gnulib/NEWS.
1967 * build-aux/update-b4-copyright: Fix.
1968 * cfg.mk (update-copyright-env): Configure update-copyright.
1970 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
1972 Make it easier to write deterministic tests.
1973 Continues Akim's work from his 2009-06-10 commits.
1974 * src/reader.c (check_and_convert_grammar): Don't add any
1975 symbols after the first symbols_do invocation.
1976 * src/symtab.c (symbols_sorted): New static global.
1977 (user_token_number_redeclaration): Update comments.
1978 (symbol_from_uniqstr): If a new symbol is being created, assert
1979 that symbols_sorted hasn't been allocated yet.
1980 (symbols_free): Free symbols_sorted.
1981 (symbols_cmp, symbols_cmp_qsort): New functions.
1982 (symbols_do): Sort symbol_table into symbols_sorted on first
1984 * tests/input.at (Numbered tokens): Recombine tests now that the
1985 output should be deterministic across multiple numbers.
1987 2009-08-12 Akim Demaille <demaille@gostai.com>
1991 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1993 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1995 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
1997 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1999 Miscellaneous code readability improvements.
2001 * src/reader.c (reader): Move %define front-end variable
2002 defaults and checking into...
2003 (prepare_percent_define_front_end_variables): ... this new
2006 * src/scan-gram.l (INITIAL): For consistency with string
2007 literals, don't store open quote on character literal. It's
2008 discarded before returning anyway.
2009 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
2010 Make length test more readable, and make the character stored
2011 for an empty literal more obvious while consistent with the
2014 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
2015 USER_NUMBER_HAS_STRING_ALIAS throughout.
2016 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
2017 that is repeated in symtab.h. Improve argument names to make it
2018 clear which side of the symbol-string alias pair is which.
2019 (symbol_check_alias_consistency): Improve local variable names
2020 for the same purpose.
2021 * src/symtab.h (struct symbol): Make comments about aliases
2023 (symbol_make_alias): Improve comments and argument name.
2024 * src/output.c (token_definitions_output): Update for rename to
2025 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
2027 2009-08-08 Alex Rozenman <rozenman@gmail.com>
2029 Convert "misleading reference" messages to warnings.
2030 * src/scan-code.l: New function 'show_sub_messages', more
2032 * tests/named-ref.at: Adjust tests.
2034 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
2036 maint: run "make update-copyright"
2038 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
2040 maint: make update-b4-copyright easier to use
2041 * build-aux/update-b4-copyright: In warnings, report line
2042 numbers rather than character positions.
2043 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
2044 that update-copyright runs it.
2047 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
2049 maint: clean up update-b4-copyright code
2050 * build-aux/update-b4-copyright: Do not accept 2-digit
2051 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
2052 Don't accept a `[' in a b4_copyright argument.
2053 Format code more consistently.
2054 Don't assume b4*copyright never occurs.
2056 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2058 maint: automate b4_copyright updates.
2059 * Makefile.am (update-b4-copyright): New target rule.
2060 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
2061 * build-aux/update-b4-copyright: New.
2062 * data/yacc.c: Remove stray characters around b4_copyright
2065 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2067 maint: automate annual package-wide copyright-year update.
2068 * .x-update-copyright: New.
2069 * Makefile.am (EXTRA_DIST): Remove maint.mk.
2070 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
2071 update-copyright. Remove gnumakefile, which is implied by
2072 maintainer-makefile.
2073 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
2075 * maint.mk: Remove, now copied from gnulib.
2076 * examples/extexi: Add missing "(C)" in copyright statement so
2077 update-copyright can recognize it.
2078 * src/LR0.h: Likewise.
2079 * src/print.h: Likewise.
2080 * src/print_graph.h: Likewise.
2081 * src/gram.c: Add missing comma in copyright statement.
2082 * src/gram.h: Likewise.
2084 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2086 Fix "make distcheck".
2087 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
2090 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
2092 Pacify "gcc -Wunused" for the input function from Flex.
2093 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
2095 * src/scan-code.l: Add "%option noinput", which I cannot find in
2096 the Flex manual, but which Flex has supported since at least as
2097 far back as 2.5.4. However, if any of our developers still use
2098 Flex 2.5.4, they'll need to stop configuring with
2099 --enable-gcc-warnings because "%option noinput" didn't work
2100 correctly until Flex 2.5.6.
2101 * src/scan-gram.l: Likewise.
2102 * src/scan-skel.l: Likewise.
2104 2009-07-31 Alex Rozenman <rozenman@gmail.com>
2106 Fix --enable-gcc-warnings problems.
2107 * src/reader.c: Adjust variable names.
2108 * src/scan-code.l: Fix prototypes and adjust names.
2109 * src/named-ref.c: Remove redundant "if".
2111 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2113 Fix a --enable-gcc-warnings problem.
2114 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
2117 2009-07-24 Alex Rozenman <rozenman@gmail.com>
2119 Fix some memory leaks.
2120 * src/named-ref.c: Add a pointer check (named_ref_free).
2121 * src/scan-code.l: New function (variant_table_free). Called in
2123 * src/symlist.c: Call to named_ref_free (symbol_list_free).
2125 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2127 Warn about character literals not of length one.
2128 * NEWS (2.5): Document.
2129 * src/scan-gram.l (INITIAL): Remove comment that we don't check
2131 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
2132 * tests/input.at (Bad character literals): New test group.
2134 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2136 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
2138 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
2140 Some M4 cleanup in the testsuite.
2141 Suggested by Eric Blake at
2142 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
2143 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
2144 complicate the code by distinguishing between a missing value
2145 and an empty string value for an optional argument. This fix is
2146 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
2147 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
2148 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
2149 arguments are not needed because of the following changes.
2151 Bison developers should use GNU M4 and should not use
2152 POSIXLY_CORRECT when building the test suite, so do not
2153 complicate the code by avoiding $10 and above.
2154 Do not quote an empty string value for an optional argument, and
2155 do not distinguish between a missing value and an empty string
2158 2009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
2160 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
2162 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2164 Revert unnecessary column realignment in --help output.
2165 Reported by Akim Demaille at
2166 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
2167 * src/getargs.c (usage): Here.
2169 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2171 Alphabetical order in src/Makefile.am.
2172 * src/Makefile.am: Adjust.
2174 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2176 Style changes and factoring.
2177 * src/named-ref.h: Add comments.
2178 * src/parse-gram.y: Readability and style changes.
2179 * src/reader.c: Factoring: assign_named_ref function.
2180 * src/scan-code.l: Factoring and style changes. Rename
2181 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2182 Use "unsigned" type for variant index. Improve readablity.
2183 * src/scan-gram.l: Change error messages and add comments.
2184 * src/symlist.h: symbol_list_null: New function decl.
2185 * src/symlist.c: symbol_list_null: Implement here.
2186 * tests/named-refs.at: Adjust for new error messages.
2188 2009-06-29 Eric Blake <ebb9@byu.net>
2190 scan-code: avoid compiler warnings
2191 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2193 2009-06-29 Akim Demaille <demaille@gostai.com>
2195 build: avoid concurrent extraction of calc++.
2196 * examples/calc++/Makefile.am (calc.stamp): New.
2197 Depend on it to create the sources of calc++ so that concurrent
2198 builds don't launch several "extexi" in parallel.
2199 Not only this is inefficient, this also builds incorrect sources
2200 with several extractions mixed together.
2202 2009-06-27 Alex Rozenman <rozenman@gmail.com>
2204 Implement support for named symbol references.
2205 * src/parse-gram.y: Add new syntax (named_ref.opt).
2206 * src/reader.c: Store named refs in symbol lists.
2207 * src/reader.h: New argument for symbol_append and
2208 action_append functions.
2209 * src/scan-code.h: Add new field (named_ref) into
2210 code_props data structure. Keeps named ref of midrule
2212 * src/scan-code.l: Support for named refs in semantic
2213 action code. New function 'parse_named_ref'.
2214 * src/scan-gram.l: Support bracketed id.
2215 * src/symlist.c: Store named refs in symbol lists.
2216 * src/symlist.h: New field in symbol list: named_ref.
2217 * src/named-ref.h: New file, a struct for named_ref.
2218 * src/named-ref.cp: New file, named_ref_new function.
2219 * src/local.mk: Add two new files.
2220 * tests/testsuite.at: Include new test group:
2221 * tests/named-refs.at: this new file.
2223 2009-06-25 Akim Demaille <demaille@gostai.com>
2225 hash: check insertion for memory exhaustion.
2226 * src/uniqstr.c (uniqstr_new): New.
2228 2009-06-11 Akim Demaille <demaille@gostai.com>
2231 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2232 * src/print-xml.c: Style changes.
2233 * tests/conflicts.at: Comment changes.
2235 2009-06-11 Akim Demaille <demaille@gostai.com>
2237 xml: beware of user strings used to give a %prec to rules.
2238 * tests/conflicts.at (%prec with user strings): New.
2239 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2242 2009-06-11 Akim Demaille <demaille@gostai.com>
2244 hash: check insertion for memory exhaustion.
2245 * src/muscle-tab.c (muscle_insert, muscle_grow)
2246 * src/state.c (state_hash_insert): Check the return value of
2249 2009-06-10 Akim Demaille <demaille@gostai.com>
2251 deterministic test suite.
2252 Some consistency checks on symbols are performed after all the
2253 symbols were read, by an iteration over the symbol table. This
2254 traversal is nondeterministic, which can be a problem for test
2257 Addresses another form of nondeterminism reported by Joel E. Denny.
2258 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2260 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2262 Use different file names for the three tests to make the
2265 2009-06-10 Akim Demaille <demaille@gostai.com>
2267 deterministic user-token-number redeclaration errors.
2268 Address nondeterminism reported by Joel E. Denny.
2269 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2271 * src/uniqstr.h: Comment changes.
2272 * src/location.h (boundary_cmp, location_cmp): New.
2273 * src/symtab.c (user_token_number_redeclaration): New.
2274 (symbol_translation): Use it.
2275 * tests/input.at (Numbered tokens): Adjust the expected output.
2277 2009-05-25 Akim Demaille <demaille@gostai.com>
2280 * gnulib: Update to latest.
2281 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2282 * m4/.gitignore: Regen.
2283 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2284 Call xalloc_die on hash_insert failures.
2285 Requested by the new __warn_unused_result__ attribute of
2288 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2290 Convert multiple variable definition warnings to complaints.
2291 * NEWS (2.5): Add a new entry for that change.
2292 * doc/bison.texinfo (Decl Summary): Update %define entry.
2293 (Bison Options): Update -D/--define/-F/--force-define entry.
2294 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
2295 * src/muscle_tab.h (muscle_percent_define_insert): Update
2297 * tests/input.at (`%define errors'): Update.
2298 (`%define, --define, --force-define'): Update.
2300 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2302 -F/--force-define and relative %define/-D/--define priorities.
2303 * NEWS (2.5): Add documentation to -D/--define entry.
2304 * build-aux/cross-options.pl: Hard-code association of
2305 --force-define with %define.
2306 * doc/bison.texinfo (Decl Summary): In %define entry,
2307 cross-reference command-line options.
2308 (Bison Options): Add documentation to -D/--define entry.
2309 (Option Cross Key): Widen column for --force-define row.
2310 * src/getargs.c (usage): Document -F/--force-define. Realign
2312 (short_options, long_options, getargs): Parse -F/--force-define,
2313 and update muscle_percent_define_insert invocation.
2314 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
2315 (muscle_percent_define_insert): Add argument with that type.
2316 * src/muscle_tab.c (muscle_percent_define_insert): Implement
2317 -F/--force-define behavior and priorities.
2318 * src/parse-gram.y (prologue_declaration): Update
2319 muscle_percent_define_insert invocations.
2320 * tests/input.at (`%define, --define'): Rename to...
2321 (`%define, --define, --force-define'): ... this and extend.
2323 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2325 Update some comments to make sense for -D.
2326 * data/bison.m4 (b4_check_user_names): In header comments, say
2327 "user occurrence" instead of "grammar occurrence".
2328 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
2329 (muscle_percent_code_grow): Likewise just for consistency.
2331 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2333 * data/c++.m4: Update copyright year.
2335 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2337 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2339 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2341 Handle a trailing `:' in a user-supplied C++ namespace better.
2342 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2343 among the closing braces here. This fix might make the
2344 generated code easier to debug, but otherwise it should be
2345 insignificant because a trailing `:' is a C++ error already.
2347 2009-05-19 Akim Demaille <demaille@gostai.com>
2349 remove useless variable.
2350 * src/getargs.c (skeleton_arg): Remove now useless variable.
2351 Should help the compiler see that this printf-like call is sane.
2353 2009-05-11 Akim Demaille <demaille@gostai.com>
2355 doc: use C++ headers.
2356 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2359 2009-05-05 Akim Demaille <demaille@gostai.com>
2361 fix hexadecimal token number support.
2362 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
2364 2009-05-05 Akim Demaille <demaille@gostai.com>
2366 tests: check token numbers.
2367 * tests/input.at (Numbered tokens): New.
2369 2009-05-04 Akim Demaille <demaille@gostai.com>
2371 bison: catch bad symbol names.
2372 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2373 * tests/input.at: Adjust.
2375 2009-05-04 Akim Demaille <demaille@gostai.com>
2378 * src/scan-gram.l: Untabify to be robust to zealous editors.
2380 2009-05-04 Akim Demaille <demaille@gostai.com>
2382 identifiers: dashes are letters.
2383 Dashes can now start identifiers (symbols and directives).
2385 * src/scan-gram.l ({letter}): Add dash.
2387 * tests/input.at (Symbols): Adjust.
2388 Remove stray comment.
2389 * tests/regression.at (Invalid inputs): Adjust error message.
2390 * doc/bison.texinfo (Symbols): Update.
2392 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2394 Declare %code to be a permanent feature.
2395 * NEWS (2.4.2): Here.
2396 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2398 (Decl Summary): Likewise.
2400 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2402 Convert underscores to dashes in some %define variable names.
2403 For now, just api.push-pull and lr.keep-unreachable-states.
2404 Maintain old names for backward compatibility.
2405 * NEWS (2.5): Document.
2406 * data/c.m4 (b4_identification): Update comment.
2407 * data/yacc.c: Update access.
2408 * doc/bison.texinfo: Update.
2409 * etc/bench.pl.in (bench_grammar): Update use.
2410 * src/files.c (tr): Move to...
2411 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2412 think of a better place to expose it. My logic is that, for all
2413 uses of tr so far, command-line arguments can be involved, and
2414 getargs.h is already included.
2415 * src/main.c (main): Update access.
2416 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2417 variable names to new variable names before assigning value.
2418 * src/reader.c (reader): Update setting default.
2419 * tests/calc.at: Update uses.
2420 * tests/conflicts.at (Unreachable States After Conflict
2421 Resolution): Update use.
2422 * tests/input.at (%define enum variables): Update use.
2423 (%define backward compatibility): New test group.
2424 * tests/push.at: Update uses.
2425 * tests/reduce.at: Update uses.
2426 * tests/torture.at: Update uses.
2428 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2430 Set all front-end %define defaults in one place.
2431 * src/main.c (main): Move lr.keep_unreachable_states default...
2432 * src/reader.c (reader): ... to here.
2434 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2436 Rename lr.default_reductions to lr.default-reductions.
2438 * doc/bison.texinfo: Here.
2439 * src/lalr.c (initialize_LA): Here.
2440 * src/print.c (print_reductions): Here.
2441 * src/reader.c (reader): Here.
2442 * src/tables.c (action_row): Here.
2443 * tests/input.at (%define enum variables): Here.
2444 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2446 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2448 Pacify ./configure --enable-gcc-warnings.
2449 * tests/input.at (Symbols): Prototype yyerror and yylex.
2451 2009-04-21 Akim Demaille <demaille@gostai.com>
2453 tests: check the use of dashes and periods in symbols.
2454 * tests/input.at (Symbol): New test group.
2456 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2458 Document how `%define "var" "value"' is not M4-friendly.
2459 * src/parse-gram.y (variable): In comments here.
2461 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2463 Add copyright updates missed during previous cherry pick.
2464 * src/output.c: Here.
2465 * src/parse-gram.y: Here.
2466 * src/scan-gram.l: Here.
2468 2009-04-20 Akim Demaille <demaille@gostai.com>
2470 variables: accept dashes.
2471 * src/scan-gram.l ({id}): Also accept dashes after the initial
2473 ({directive}): Use {id}.
2474 * src/parse-gram.y: Comment and formatting changes.
2475 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2477 * src/complain.h, src/complain.c (yacc_at): New.
2478 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2480 * src/output.c (token_definitions_output): Do not #define token
2483 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2485 Clean up recent patches a little.
2486 Reported by Akim Demaille.
2487 * doc/bison.texinfo (Understanding): Fix typos.
2488 * src/print.c (print_reductions): Don't use negated variable.
2490 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2492 List accepted values for a %define enum variable with an invalid value.
2493 Suggested by Akim Demaille at
2494 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2495 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2496 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
2497 * tests/input.at (%define lr.default_reductions invalid values): Merge
2499 (%define enum variables): ... here, and update output.
2501 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2503 Rename "default rule" to "default reduction".
2504 This includes changing variable names in code, changing
2505 comments, and renaming %define lr.default_rules to %define
2506 lr.default_reductions.
2507 * NEWS (2.5): Update IELR documentation.
2508 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
2509 Adjust YYDEFACT and yydefact_ documentation.
2510 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2511 and lr.type documentation. Make some other wording
2513 (Glossary): Adjust cross-references and Default Reduction
2515 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2516 Remove a confusing comment pointed out by Akim Demaille.
2517 (initialize_LA): Adjust code.
2518 * src/print-xml.c (print_reductions): Adjust code.
2519 * src/print.c (print_reductions): Adjust code.
2520 * src/reader.c (reader): Adjust code.
2521 * src/tables.c (action_row): Adjust code.
2522 (token_actions): Adjust code.
2523 * src/tables.h: Adjust YYDEFACT documentation.
2524 * tests/input.at (%define lr.default_rules invalid values):
2525 Rename test group to...
2526 (%define lr.default_reductions invalid values): ... this, and
2527 update grammar file and expected output.
2528 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2529 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2531 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2533 Document %define lr.type and lr.default_rules.
2534 * NEWS (2.5): Add an entry.
2535 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2536 besides just LALR(1) and GLR(1).
2537 * doc/bison.texinfo (Introduction): Likewise.
2538 (Language and Grammar): Bison is no longer limited to LALR(1)
2540 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2541 when trying to distinguish from GLR. Talk about LR(1) grammars
2542 rather than LALR(1) grammars.
2543 (Decl Summary): In %define api.push_pull entry, say it applies
2544 to deterministic parsers in C rather than LALR(1) parsers in C.
2545 Add lr.default_rules entry.
2547 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2549 (Generalized LR Parsing): Same changes as for the previous GLR
2551 (Memory Management): Say deterministic rather than LALR(1).
2552 (Understanding): Correct some bison output.
2553 Index discussion of "accepting state".
2554 Say deterministic rather than LALR(1).
2555 (Bison Options): In --yacc entry, say deterministic rather than
2557 In --report, --graph, and --xml entries, just don't mention
2559 (C++ Parsers): Say deterministic rather than LALR(1).
2560 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2561 (Glossary): Add Accepting State, Consistent State, Default Rule,
2562 and IELR(1) definitions.
2563 In Generalized LR (GLR) definition, make same changes as in
2564 previous GLR sections.
2565 In LALR(1) definition, say Bison uses LALR(1) by default rather
2566 than implying Bison is limited to LALR(1).
2567 (LocalWords): Add IELR.
2569 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2571 Finish implementing %define lr.type.
2572 Its value can be "LALR", "IELR", or "canonical LR".
2573 * lib/timevar.def (TV_IELR_PHASE1): New var.
2574 (TV_IELR_PHASE2): New var.
2575 (TV_IELR_PHASE3): New var.
2576 (TV_IELR_PHASE4): New var.
2577 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2578 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2579 Sbitset.h, ielr.h, and ielr.c.
2580 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2581 trace_types): Add trace_ielr.
2582 * src/lalr.h, src/lalr.c (ngotos): Export it.
2584 (goto_follows): ... this, update all uses, and export it.
2585 (set_goto_map): Export it.
2586 (map_goto): Export it.
2587 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2589 (initialize_LA): Export it. Move lookback allocation to...
2590 (lalr): ... here because, for canonical LR, initialize_LA must
2591 be invoked but lookback and much of the rest of LALR isn't
2593 * main.c (main): Instead of lalr, invoke ielr, which invokes
2595 * src/reader.c (reader): Default lr.type to "LALR".
2596 Default lr.default_rules to "accepting" if lr.type is "canonical
2597 LR". Leave the default as "all" otherwise.
2598 Check for a valid lr.type value.
2599 * src/state.h, src/state.c (struct state_list): Add state_list
2601 (state_new): Initialize state_list member to NULL.
2602 (state_new_isocore): New function, exported.
2603 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2604 exercises all values of lr.type.
2605 (GNU AWK Grammar): Rename test group to...
2606 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2607 AT_TEST_EXISTING_GRAMMAR.
2608 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2609 (GNU pic Grammar): Rename test group to...
2610 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2611 AT_TEST_EXISTING_GRAMMAR.
2612 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2613 all values of lr.type.
2614 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2615 (Lane Split): Likewise.
2616 (Complex Lane Split): Likewise.
2617 (Split During Added Lookahead Propagation): Likewise.
2619 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2621 Add new files for IELR and canonical LR implementation.
2622 * src/AnnotationList.c: New.
2623 * src/AnnotationList.h: New.
2624 * src/InadequacyList.c: New.
2625 * src/InadequacyList.h: New.
2626 * src/Sbitset.c: New.
2627 * src/Sbitset.h: New.
2631 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2633 Implement %define lr.default_rules.
2634 Its value describes the states that are permitted to contain
2635 default rules: "all", "consistent", or "accepting".
2636 * src/reader.c (reader): Default lr.default_rules to "all".
2637 Check for a valid lr.default_rules value.
2638 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2639 is "accepting", then only mark the accepting state as
2641 (initialize_LA): Tell state_lookahead_tokens_count whether
2642 lr.default_rules is "accepting".
2643 * src/tables.c (action_row): If lr.default_rules is not "all",
2644 then disable default rules in inconsistent states.
2645 * src/print.c (print_reductions): Use this opportunity to
2646 perform some assertions about whether lr.default_rules was
2648 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2649 helps with checking the parser tables for a grammar.
2650 * tests/input.at (%define lr.default_rules invalid values): New
2652 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2653 AT_TEST_TABLES_AND_PARSE.
2654 (`no %define lr.default_rules'): New test group generated by
2655 AT_TEST_LR_DEFAULT_RULES.
2656 (`%define lr.default_rules "all"'): Likewise.
2657 (`%define lr.default_rules "consistent"'): Likewise.
2658 (`%define lr.default_rules "accepting"'): Likewise.
2660 2009-04-20 Akim Demaille <demaille@gostai.com>
2662 Consistently refer to Yacc, not YACC.
2663 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2665 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2667 Pacify make maintainer-check-posix.
2668 * tests/input.at (%define, --define): Move bison command-line
2669 options before grammar file name.
2671 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2673 Document semicolon warnings.
2676 2008-12-08 Akim Demaille <demaille@gostai.com>
2678 Fix portability issue in the test suite.
2679 * tests/local.at (AT_MATCHES_CHECK): New.
2680 Based on Perl instead of Sed. Sed has too many portability
2681 pitfalls, not ever Sed is GNU Sed.
2682 * tests/actions.at (Fix user actions without a trailing semicolon):
2685 2008-12-07 Di-an Jan <dianj@freeshell.org>
2687 Implement the FIXME that ends an user action with a semicolon
2688 if it seems necessary.
2689 * src/scan-code.l (flex rules section): Flag cpp directive from
2690 any `#' to the first unescaped end-of-line. Semicolon is not
2691 needed after `;', `{', '}', or cpp directives and is needed after
2692 any other token (whitespaces and comments have no effect).
2693 * tests/actions.at (Fix user actions without a trailing semicolon):
2695 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2696 to make user actions complete statements.
2697 Adjust column numbers in error messages.
2698 * tests/regression.at (Fix user actions without a trailing semicolon):
2699 Remove. Covered by new test.
2701 2009-04-14 Akim Demaille <demaille@gostai.com>
2704 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2705 (Table of Symbols): Remove duplicate entry for %debug.
2707 2009-04-10 Eric Blake <ebb9@byu.net>
2709 submodules: update to latest
2710 * submodules/autoconf: Use latest upstream Autoconf.
2712 2009-04-06 Eric Blake <ebb9@byu.net>
2714 Work around autoconf 2.63b bug in testsuite.
2715 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2716 autoconf bug related to # in test.
2718 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2720 * NEWS (2.5): Describe new -D/--define feature.
2722 2008-11-10 Akim Demaille <demaille@gostai.com>
2725 * src/getargs.h, src/getargs.c (trace_muscle): New.
2726 (trace_types, trace_args): Support it.
2727 * src/output.c (output_skeleton): Use it.
2729 2008-11-10 Akim Demaille <demaille@gostai.com>
2732 * src/output.c (muscles_output): New, extracted from...
2733 (output_skeleton): here.
2736 2008-11-21 Akim Demaille <demaille@gostai.com>
2738 Display the changes in cross-options.texi.
2739 * build-aux/cross-options.pl ($sep): New, to separate items.
2740 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
2743 2008-11-20 Di-an Jan <dianj@freeshell.org>
2745 Improves options in the manual.
2746 * doc/bison.texinfo (-g, -x): Add space before argument.
2747 (Option Cross Key): Implement FIXME: listing directives also.
2748 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2749 (Short Option): Special case -d. Put arguments inside @option.
2750 (Bison Directive): Add column, automatically extracted from
2751 src/scan-gram.l (actual name passed as the first argument)
2752 with special case for %define.
2753 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
2754 to build-aux/cross-options.pl.
2755 * src/getargs.c (usage): Document limitations of cross-options.pl.
2756 * src/scan-gram.l: Likewise.
2758 2009-02-25 Akim Demaille <demaille@gostai.com>
2761 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2763 2008-12-08 Akim Demaille <demaille@gostai.com>
2765 Install autoconf as a submodule to get m4sugar.
2766 * .gitmodules: Add submodules/autoconf.
2767 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2768 submodules/autoconf.
2770 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2772 Simplify last patch slightly.
2773 * src/getargs.c (getargs): Here.
2775 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2777 Fix last warning from --enable-gcc-warnings.
2778 * src/getargs.c (getargs): Don't assign const address to non-const
2781 2008-11-17 Di-an Jan <dianj@freeshell.org>
2783 Handle --enable-gcc-warnings.
2784 * src/getargs.c (command_line_location): Set parameters to void.
2786 2008-11-11 Akim Demaille <demaille@gostai.com>
2789 * tests/actions.at, tests/regression.at: Use it.
2791 2008-11-07 Akim Demaille <demaille@gostai.com>
2793 Pass command line location to skeleton_arg and language_argmatch.
2794 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2795 The location argument is now mandatory.
2796 Adjust all dependencies.
2797 (getargs): Use command_line_location.
2799 2008-11-07 Akim Demaille <demaille@gostai.com>
2802 * src/getargs.c (usage): Document -D.
2803 Fix help string for --locations.
2804 (command_line_location): New.
2805 (short_options, long_options, getargs): Support -D, --define.
2806 (getargs): Move -d support at the right place.
2807 * doc/bison.texinfo (Bison Options): Update.
2808 * tests/input.at (%define, --define): New.
2810 2008-11-07 Akim Demaille <demaille@gostai.com>
2812 Initialize the muscle table before parsing the command line.
2813 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2814 (getargs): Define file_name.
2815 * src/main.c (main): Initialize muscle_tab before calling
2817 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2818 its value is not available yet.
2820 2008-11-09 Akim Demaille <demaille@gostai.com>
2822 Require the generation of parse-gram.output.
2823 * src/Makefile.am (YACC): Pass --report=all.
2825 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2827 * NEWS (2.5): New stub.
2829 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2831 Fix options documentation.
2832 * build-aux/cross-options.pl: As in --help output, write optional
2833 arguments as [=ARG] not =[ARG].
2834 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2836 2008-11-07 Akim Demaille <demaille@gostai.com>
2839 * src/getargs.c (usage): Fix help string for -W.
2841 2008-11-07 Akim Demaille <demaille@gostai.com>
2843 Handle more general types of option arguments.
2844 * build-aux/cross-options.pl: The argument ends at the first
2845 space, not the first non-symbol character.
2846 Use @var for each word appearing the argument description.
2848 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2850 Remove spurious initial empty lines.
2851 * data/location.cc: End the @output lines with an @.
2853 2008-11-04 Akim Demaille <demaille@gostai.com>
2855 Remove spurious initial empty lines.
2856 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2857 * data/yacc.c: End the @output lines with an @.
2859 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2861 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2862 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2863 requirements for a correct m4 are stricter.
2864 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
2865 * configure.ac: Update to use AC_PROG_GNU_M4.
2866 Reported by Eric Blake.
2868 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2870 Help with updating web manual.
2871 * HACKING: Incorporate instructions from gnulib/doc/README.
2872 * bootstrap.conf (gnulib_modules): Add gendocs.
2874 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2876 Fix strange %define locations for default values.
2877 Reported by Akim Demaille at
2878 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2879 and discussed again starting at
2880 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2881 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2882 because location information is bogus.
2883 Use angle brackets to delimit fake file name because square brackets
2884 look like underexpanded m4. Choose a better fake file name.
2885 Use negative line numbers.
2886 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2887 * src/location.c (location_print): If line for a boundary is negative,
2888 only print that boundary's file name.
2889 * src/location.h: Document that.
2890 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2891 defaults): Update output.
2893 2008-11-07 Akim Demaille <demaille@gostai.com>
2895 Locations without columns for command line arguments.
2896 * src/location.c (location_print): Don't display negative columns.
2897 * src/location.h: Document this.
2899 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2901 Add reminder about uploading public key to keys.gnupg.net.
2902 * HACKING (Release Procedure): Here.
2904 2009-03-31 Akim Demaille <demaille@gostai.com>
2906 bootstrap: --help to stdout.
2907 * bootstrap (usage): Don't send --help to stderr.
2908 Use a here doc instead of a long string.
2910 2009-03-31 Akim Demaille <demaille@gostai.com>
2912 bootstrap: README-hacking no longer exists
2913 * bootstrap (checkout_only_file): Set to HACKING.
2915 2009-03-26 Akim Demaille <demaille@gostai.com>
2917 doc: merge HACKING and README-hacking.
2918 Two files is confusing.
2919 Reported by Alexandre Duret-Lutz.
2921 * README-hacking: Merge into...
2922 * HACKING (Working from the repository): here.
2924 2009-03-26 Akim Demaille <demaille@gostai.com>
2926 doc: update README-hacking.
2927 * README-hacking: We now use git and git submodules.
2928 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2930 2009-03-26 Akim Demaille <demaille@gostai.com>
2932 lalr1.cc: avoid GCC 4.3 warnings.
2933 GCC 4.3 now warns about "a || b && c" and asks for explicit
2935 Reported by Alexandre Duret-Lutz.
2936 * data/location.cc: Update copyright years.
2937 (Position::operator==): Use parens to make precedence explicit.
2938 Compare lines and columns first, as they are more likely to be
2939 different, and they are faster to compare.
2941 2009-03-26 Akim Demaille <demaille@gostai.com>
2944 * gnulib: Update to latest.
2945 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
2948 2009-01-08 Akim Demaille <demaille@gostai.com>
2950 Fix grep portability issues.
2951 Grep on Solaris does not support -q.
2952 Reported by Summum Bonum.
2954 * NEWS: Add a stub for 2.4.2.
2955 * THANKS: Add Summum Bonum.
2956 * tests/atlocal.in (EGREP): New.
2957 (CC, CXX, XSLTPROC): Make it possible to override them via
2959 * tests/java.at: Use $EGREP instead of egrep.
2960 Use AT_CHECK's ignore instead of grep's -q.
2962 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2965 * NEWS: Set version and date.
2966 * lib/Makefile.am: Update copyright year.
2967 * tests/atlocal.in: Update copyright year.
2969 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2971 Semicolon feature removal is not about future language support.
2972 * NEWS: The semicolon feature is no longer active for newer languages,
2973 so don't claim that it causes trouble for them.
2975 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2977 * gnulib: Update submodule to HEAD.
2979 2008-12-09 Akim Demaille <demaille@gostai.com>
2982 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2984 2008-12-05 Eric Blake <ebb9@byu.net>
2986 Build testsuite with newer autoconf.
2987 * tests/output.at (m4_expand): Don't override in newer autoconf,
2988 where the underlying implementation changed.
2989 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2990 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2991 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2992 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2993 since some of them contain unbalanced ')'.
2995 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2997 * NEWS: Clarify a little.
2999 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
3001 * NEWS: Update for recent changes.
3003 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3005 Fix unexpanded macros in GLR defines file.
3006 Reported by Csaba Raduly at
3007 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3008 * THANKS (Csaba Raduly): Add.
3009 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3010 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3011 lexer in a separate module that includes the defines file.
3012 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
3014 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3015 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3016 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3017 (AT_DATA_SOURCE_PROLOGUE): New.
3018 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3019 (AT_DATA_SOURCE): New.
3020 (AT_FULL_COMPILE): New, copied from master branch and extended to
3021 support an additional source file.
3023 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3025 Don't let maintainer-*-check targets force a version update.
3026 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3029 2008-11-17 Di-an Jan <dianj@freeshell.org>
3031 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3032 Align menus. Adjust word wrapping. Use node names for menu names.
3033 (Examples): Don't abbreviate node names.
3034 (LocalWords): Remove abbreviations.
3035 (Copying): Make description a sentence.
3036 (Java Action Features): Remove period to match the rest of menu.
3038 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
3040 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
3041 * configure.ac: Adjust usage.
3042 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3043 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3044 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
3046 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3048 Don't add a semicolon to actions for %skeleton or %language.
3049 It breaks Java test cases as reported by Akim Demaille.
3050 * src/scan-code.l: Implement.
3052 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3054 Clean up %skeleton and %language priority implementation.
3055 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
3056 remove static qualifier because others will soon need to see it.
3057 (language_prio): Likewise.
3058 (getargs): Use command_line_prio rather than 0.
3059 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
3061 (skeleton_prio): Extern it.
3062 (language_prio): Extern it.
3063 * src/parse-gram.y: Use grammar_prio rather than 1.
3065 2008-11-04 Akim Demaille <demaille@gostai.com>
3067 * NEWS: Mention the trailing semicolon in action.
3069 2008-11-04 Akim Demaille <demaille@gostai.com>
3072 * NEWS: Use more outline-mode markup.
3073 Suggested by Jim Meyering.
3075 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
3077 Fix user actions without a trailing semicolon.
3078 Reported by Sergei Steshenko at
3079 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
3080 * THANKS (Sergei Steshenko): Add.
3081 * src/scan-code.l (SC_RULE_ACTION): Fix it.
3082 * tests/regression.at (Fix user actions without a trailing semicolon):
3085 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3087 Initiate further development.
3088 * NEWS: Create an empty section for new entries.
3089 * gnulib: Update submodule to HEAD.
3091 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3093 * NEWS: Version 2.4.
3095 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3097 Prepare for next release.
3098 * NEWS: Briefly mention changes since 2.3b.
3099 * README: Say GNU m4 1.4.6, which we've been requiring in release
3100 announcements already, not 1.4.3, which breaks the build.
3102 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3104 Say %language is experimental.
3105 We're thinking of extending it's effect on output file naming. See the
3107 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3108 * NEWS: Say it's experimental.
3109 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3110 recommend it over %skeleton for now.
3111 (Bison Options): Likewise.
3112 (C++ Bison Interface): Use %skeleton not %language.
3113 (Calc++ Parser): Use %skeleton not %language.
3114 * src/getargs.c (usage): Say it's experimental.
3116 2008-11-01 Di-an Jan <dianj@freeshell.org>
3117 Paolo Bonzini <bonzini@gnu.org>
3119 Support all Java parser class modifiers.
3120 * data/java.m4 (b4_percent_define_get3): New.
3121 (b4_final_if, b4_strictfp_if): New.
3122 * data/lalr1.java (final, strictfp, extends, implements): Support.
3123 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3125 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3126 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3127 (AT_CHECK_JAVA_GREP): New.
3128 (Java parser class modifiers): New test.
3129 (Java parser class extends and implements): New test.
3131 Model exception propagation better with throws and lex_throws.
3132 * data/java.m4 (b4_list2): New.
3133 (throws): Change default.
3134 * data/lalr1.java (yyaction): Add throws.
3135 (parse): Add lex_throws in addition to throws.
3136 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3137 * tests/java.at (Java throws specifications): New test.
3139 Improve documentation for Java parsers.
3140 * doc/bison.texinfo (Java Parsers): Add subsections.
3141 Don't quote first argument of %define.
3142 (Java Bison Interface): Document output files. Move documentation
3143 of parser class and merge into Java Parser Interface. Document
3144 features that error out. Document directives with no effect.
3145 Move note about Javadoc higher.
3146 (Java Semantic Values): Explicitly mention stype.
3147 Document that generic types cannot be used.
3148 (Java Location Values): Use @deftypeivar. Document constructors.
3149 Correct return value for toString.
3150 (Java Parser Interface): List undocumented constants/fields.
3151 Move documentation of fields added by %parse-param closer to list
3152 of members. Document that token names are added as fields.
3153 Document constructors accurately. Remove error method.
3154 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3155 Interface. Describe %code lexer and yylex accutately.
3156 Remove documentation that does not match the code.
3157 (Java Action Features): New.
3158 (Java Differences): Add reference. Add item on semantic values.
3159 Add note about @{ ... @}. Clarify %% epilogue placement.
3160 (Java Declarations Summary): New.
3163 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3164 (b4_remove_comma): Quote test argument.
3165 (b4_identification): Remove "bison" field.
3166 * tests/java.at (Java parser class and package names): New test.
3167 (Java %parse-param and %lex-param): New test.
3168 (Java stype, position_class and location_class): New test.
3170 2008-10-31 Di-an Jan <dianj@freeshell.org>
3172 * data/lalr1.jave: Update copyright years.
3173 (YYParser): Correct name of "generated from" file in Javadoc:
3174 use b4_file_name instead of @ofile@.
3175 (Location constructor): Correct Javadoc parameter name.
3176 (yylloc): Add missing opening m4 quote after b4_location_if.
3177 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3178 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3179 (YYParser constructor): Correct Javadoc parameter name.
3181 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3183 Always put auxiliary code files in the same dir as other output files.
3184 * src/files.c (compute_file_name_parts): When the user specifies
3185 --output but not --file-prefix, extract the directory prefix from the
3186 file prefix not from the grammar file name. This affects the location
3187 of files like location.hh generated by the C++ skeleton. The includes
3188 in the other output files require this fix.
3189 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3190 for expected output files.
3191 (Output files): Add a test for the above.
3193 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3195 * gnulib: Update submodule to HEAD.
3197 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3199 Update copyright year.
3200 * src/files.c: Here.
3202 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3204 Don't overwrite the input file.
3205 * src/files.c (output_file_name_check): Fatal error if using input file
3207 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3209 (Conflicting output files): Add test.
3211 2008-10-28 Akim Demaille <demaille@gostai.com>
3214 * data/lalr1.cc: Formatting changes.
3216 2008-10-28 Akim Demaille <demaille@gostai.com>
3218 Don't define debugging functions when !YYDEBUG.
3219 * data/lalr1.cc (debug_stream, set_debug_stream)
3220 (debug_level_type, debug_level, set_debug_level): Don't
3221 declare them when YYDEBUG is not defined.
3222 The implementation are already YYDEBUG-aware.
3224 2008-10-28 Akim Demaille <demaille@gostai.com>
3226 Prefer "continue" for empty loop bodies.
3227 * etc/bench.pl.in: Use "continue" instead of {}.
3229 2008-10-28 Akim Demaille <demaille@gostai.com>
3231 Space and comments changes.
3232 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3233 * data/c.m4, data/lalr1.cc: Space changes.
3235 2008-10-28 Akim Demaille <demaille@gostai.com>
3237 Make gnulib a submodule.
3239 * .gitmodules (gnulib): New.
3241 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3243 Fix yyerror_range for user-defined location type in C++. Reported by
3245 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3246 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3247 * THANKS (Georg Sauthoff): Add.
3249 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3251 Update several administrative files mainly to facilitate releasing.
3252 * HACKING (Administrivia): Make the git-merge-changelog notes more
3254 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3255 (Release Procedure): Update for git and add numerous details that were
3257 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3258 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3259 that announcements don't claim we bootstrapped with whatever bison
3260 happened to be in PATH. Add flex as a bootstrap tool.
3261 * Makefile.maint: Remove, previously replaced by maint.mk.
3262 * Makefile.cfg: Remove, and migrate settings to...
3263 * cfg.mk: ... here for the sake of `make announcement'.
3264 * bootstrap.conf (gnulib_modules): Add announce-gen.
3265 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3268 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3270 Small but important bugfixes for the Java skeleton.
3271 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3272 (yy_symbol_print): Call toString on yyvaluep.
3274 2008-08-29 Akim Demaille <demaille@gostai.com>
3276 Clarify UPDATED use.
3277 * doc/bison.texinfo: It refers to the last edition of this file,
3278 not to the release date of Bison.
3279 Reported by Joel E. Denny.
3281 2008-08-29 Akim Demaille <demaille@gostai.com>
3283 * README: Update FAQ pointer.
3284 Reported by Joel E. Denny.
3286 2008-08-27 Eric Blake <ebb9@byu.net>
3288 Resync m4sugar from autoconf.
3289 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3290 (m4_init): Adjust to latest m4.git changes.
3291 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3293 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3294 (_m4_list_cmp): Reduce side effects.
3296 2008-08-27 Akim Demaille <demaille@gostai.com>
3298 Check yyerrok in calc.at.
3299 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3300 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3303 2008-08-27 Akim Demaille <demaille@gostai.com>
3305 Support yyerrok in lalr1.cc.
3306 YYBACKUP is still to import back into lalr1.cc.
3307 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3309 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3311 For maintainer-check*, don't recompile for a $(VERSION) update.
3313 (_is-dist-target): Override the one in GNUmakefile.
3314 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3316 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3318 Update for recent change to gnulib.
3319 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3322 2008-08-15 Eric Blake <ebb9@byu.net>
3324 Remaining m4sugar merge from autoconf.
3325 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3326 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3327 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3328 * src/output.c (output_skeleton): Tell m4 how to find it.
3330 Partial m4sugar merge from autoconf: m4_map.
3331 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3332 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3333 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3334 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3336 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3338 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3341 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3343 Keep .version and PACKAGE_VERSION in sync.
3344 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3345 dependency, and add comments justifying this in more detail. Discussed
3347 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3349 2008-08-06 Eric Blake <ebb9@byu.net>
3351 Partial m4sugar merge from autoconf: m4_shiftn.
3352 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3353 (m4_shift2, m4_shift3): New macros.
3354 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3355 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3356 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3357 * data/java.m4 (b4_remove_comma): Likewise.
3359 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3360 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3361 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3362 (m4_init): Consolidate wrapped text into single m4_wrap.
3363 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3366 2008-08-05 Eric Blake <ebb9@byu.net>
3368 Partial m4sugar merge from autoconf: builtins, version.m4.
3369 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3370 (m4_prepend): Remove, as it is unused and inherently quadratic,
3371 whereas m4_append is linear in newer m4.
3372 (m4_mkstemp): New builtin.
3373 (m4_symbols): Make rename conditional.
3374 (m4_version_prereq): Ensure fatal error if used in bison, which
3375 intentionally lacks version.m4.
3377 Fix comments in m4sugar.
3378 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3380 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3382 Update for recent .gitignore fix in Gnulib.
3383 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3384 anchored .gitignore entries.
3386 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3388 Set gnu or gnits strictness.
3389 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3390 development and gnits strictness for releases. Based on Eric Blake's
3392 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3394 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3396 * NEWS: Clarify documentation of %language.
3398 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3400 Support usage of git-merge-changelog.
3401 * .gitattributes: New.
3402 * HACKING: Document usage of git-merge-changelog.
3403 * bootstrap: Install git-merge-changelog entries in .git/config
3406 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3408 Remove remaining dependence on CVS Id keyword.
3409 * ChangeLog: For the sake of people still using CVS, don't use dollars
3411 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3413 * data/xslt/xml2dot.xsl: Likewise.
3414 * data/xslt/xml2text.xsl: Likewise.
3415 * data/xslt/xml2xhtml.xsl: Likewise.
3416 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3417 * doc/Makefile.am (neutralize): Remove, no longer needed.
3418 (.x.1): Don't use neutralize.
3419 (edit): Don't substitute for ID.
3420 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3422 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3424 Fix dependence on computed configure variables.
3425 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3426 $(top_srcdir)/configure.ac so that changes to computed variables, such
3427 as PACKAGE_VERSION, are seen.
3428 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3430 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3432 Update copyright dates for recent changes.
3433 * Makefile.am: Here.
3434 * src/Makefile.am: Here.
3435 * src/reduce.c: Here.
3436 * tests/reduce.at: Here.
3438 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3440 Use git-version-gen for version names between releases.
3441 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3442 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3443 * .prev-version: New.
3444 * .version.in: Remove.
3445 * ChangeLog: Remove the Id previously used for capturing the CVS
3447 * GNUmakefile: Remove, now copied from Gnulib.
3448 * Makefile.am: Add code suggested by comments in
3449 build-aux/git-version-gen.
3450 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3451 .prev-version, and .version.
3452 * NEWS (2.3b+): Rename to...
3453 (?.?): ... this because we're dropping the "+" version naming scheme,
3454 but, in general, we still can't be sure of our next release name.
3455 * bootstrap: Add a quick hack to remove from .gitignore the
3456 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3457 entry. This should really be fixed in gnulib instead.
3458 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3459 * configure.ac (AC_INIT): Set version name by invoking
3460 build-aux/git-version-gen.
3461 (AC_CONFIG_FILES): Remove .version, now generated by
3462 build-aux/git-version-gen.
3463 * maint.mk: New, copied from coreutils.
3464 * doc/.cvsignore (bison.1): Add.
3465 * doc/.gitignore (/bison.1): Add.
3466 * doc/bison.1: Remove, generated.
3467 * src/.cvsignore (revision.c): Remove.
3468 * src/.gitignore (/revision.c): Remove.
3469 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3470 (BUILT_SOURCES): Remove revision.c.
3471 (revision.c): Remove.
3472 * src/getargs.c (version): Don't print revision after the VERSION.
3473 * src/revision.h: Remove.
3475 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3477 Fix untranslatable composition of sentences. Reported by Goran
3479 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3480 * THANKS (Goran Uddeborg): Add.
3481 * src/reduce.c (reduce_print): Report the number of nonterminals and
3482 rules useless in the grammar in separate sentences.
3483 * tests/reduce.at (Useless Rules): Update output.
3484 (Reduced Automaton): Likewise.
3485 (Underivable Rules): Likewise.
3486 (Empty Language): Likewise.
3488 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3490 Fix some .gitignore and .cvsignore problems.
3491 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3492 (insert_vc_ignore): ... this new function, which prepends `/' to all
3493 .gitignore entries before passing them to insert_sorted_if_absent.
3494 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3495 .cvsignore files are maintained even though Bison developers run
3496 bootstrap while using Git.
3497 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3500 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3501 unneeded. Reported by Eric Blake.
3502 * lib/.gitignore (/*~): Add.
3503 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3504 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3506 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3508 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3510 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3511 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3512 * bootstrap.conf (gnulib_modules): Add unsetenv.
3513 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3514 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3516 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3517 the first argument because it may become position-dependent, and unset
3518 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3519 Add comments explaining these issues in more detail.
3521 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3523 Add .gitignore everywhere based on .cvsignore.
3525 * build-aux/.gitignore: New.
3526 * data/.gitignore: New.
3527 * doc/.gitignore: New.
3528 * etc/.gitignore: New.
3529 * examples/.gitignore: New.
3530 * examples/calc++/.gitignore: New.
3531 * lib/.gitignore: New.
3532 * m4/.gitignore: New.
3533 * po/.gitignore: New.
3534 * runtime-po/.gitignore: New.
3535 * src/.gitignore: New.
3536 * tests/.gitignore: New.
3538 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3540 * NEWS (2.3b+): New section, empty for now.
3541 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3543 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3545 * NEWS (2.3b): Update release date since there has been a delay in
3546 getting the announcements and tarballs out.
3548 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3550 * NEWS: Version 2.3b.
3551 * configure.ac (AC_INIT): Likewise.
3552 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3554 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3556 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3557 been doing it for years.
3558 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3559 (Release Procedure): Add FIXME about make alpha being unmaintained.
3561 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3563 * data/yacc.c: Reformat m4 a little for readability.
3564 * src/lalr.c (build_relations): Correct comment.
3566 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3568 DJGPP specific issue.
3569 * djgpp/config.sed: Fixes required to run configure scripts generated
3572 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3574 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3575 coordinator@translationproject.org.
3577 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3579 * THANKS: Add Eric Blake.
3581 2008-04-23 Eric Blake <ebb9@byu.net>
3583 Revert prior patch, by working around autoconf regression.
3584 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3585 ("Output file name: ("): Uncomment test.
3586 ("Output file name: )"): Likewise.
3587 Based on an idea from Noah Misch.
3589 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3591 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3592 2.61. Reported by Juan Manuel Guerrero at
3593 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3594 * tests/output.at ("Output file name: ("): Comment out test case for
3596 ("Output file name: )"): Likewise.
3598 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3600 * GNUmakefile: Update git-version-gen invocation so make dist
3603 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3605 Update to the current gnulib CVS repository, and fix trigraph handling
3607 * bootstrap: Update gnulib CVS repository URL.
3608 (symlink_to_dir): Encapsulate the code that guarantees the destination
3609 directory exists into...
3610 (check_dst_dir): ... this new function, and...
3611 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3612 fail when copying files into lib/uniwidth/.
3613 * src/output.c (prepare_symbols): When writing yytname muscles, where
3614 symbol names will be encoded in C-string literals, tell quotearg to
3615 escape trigraphs. This used to be the default in gnulib.
3616 * tests/regression.at (Token definitions): Because of the change in
3617 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3618 escapes trigraphs in symbol names. Thus, yytname no longer has
3619 trigraphs unnecessarily doubly escaped. Update test case output.
3620 Extend test case to be sure Bison's own error messages will no longer
3621 have trigraphs in symbol names unnecessarily escaped once.
3623 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3625 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3626 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3627 * .cvsignore: Add .version.
3629 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3630 * configure.ac (AC_CONFIG_FILES): Add .version.
3631 * build-aux/.cvsignore: Add git-version-gen.
3633 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3635 * NEWS (2.3a+): Mention that -g now takes an argument.
3636 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3637 consistency. Update the -g and -x entries now that they take
3638 arguments. Use brackets to indicate optional arguments.
3639 * src/getargs.c (usage): Explain the relationship between arguments of
3640 long and short options more completely. Document --defines and -d
3641 separately since the former takes an argument but, for POSIX Yacc, the
3643 (short_options): Let -W take an optional argument like --warnings.
3644 (getargs): Sort cases.
3646 2008-02-28 Akim Demaille <demaille@gostai.com>
3648 * doc/bison.texinfo: Fix a few typos.
3650 2008-02-28 Akim Demaille <akim@epita.fr>
3652 * doc/bison.texinfo (Bison Options): Document -W.
3653 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3655 2008-02-28 Akim Demaille <akim@epita.fr>
3657 * src/getargs.c (short_options): Split and sort for readability.
3658 -g and -x take optional arguments, just like their long options.
3659 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3661 Fix the handling of $opt which resulted in all the argument to be
3662 considered as optional.
3664 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3666 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3667 say its interface is experimental.
3668 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3670 (Bison Options): In the -L and --language entry, mention Java.
3671 (Java Bison Interface): Say the interface is experimental.
3672 * src/getargs.c (usage): Mention -L and --language.
3674 * NEWS (2.3a+): Say the push parsing interface is experimental.
3675 * doc/bison.texinfo (Push Decl): Likewise.
3676 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3677 (Push Parser Function): Likewise.
3678 (Pull Parser Function): Likewise.
3679 (Parser Create Function): Likewise.
3680 (Parser Delete Function): Likewise.
3681 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3682 yypull_parse, and yypush_parse entries.
3684 * NEWS (2.3a+): Mention XML support, and say the schema is
3686 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3687 * src/getargs.c (usage): Say the XML schema is experimental.
3689 * NEWS (2.3a+): Say option instead of flag.
3691 2008-02-21 Wojciech Polak <polak@gnu.org>
3693 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3696 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3698 Fix impure push parser compile error reported by Bob Rossi at
3699 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3700 * data/yacc.c: Clean up whitespace in the output a little.
3701 (yypstate_allocated): Define for impure push parsers regardless of
3702 whether the pull interface is also requested.
3703 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3704 check impure push parsers without the pull interface.
3706 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3707 yyerror takes arguments specified by %parse-param while yypstate_new
3709 * doc/bison.texinfo (Parser Create Function): Document that
3710 yypstate_new returns 0 for multiple impure parser instances.
3711 * tests/push.at (Push Parsing: Multiple impure instances): Update
3712 expected stderr output.
3714 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3716 * runtime-po/POTFILES.in (push.c): Remove.
3718 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3720 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3721 * data/push.c: Rename to...
3722 * data/yacc.c: ... this, overwriting it.
3723 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3724 `%push-pull-parser' -> `%define api.push_pull "both"'.
3725 Remove old yacc.c tests, and update push.c tests to yacc.c.
3727 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3729 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3730 `"%code top" blocks' instead of `%code "top" blocks'.
3731 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3732 Clean up whitespace in the output a little.
3734 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3736 Fix documentation problems reported by Tim Josling at
3737 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3738 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3739 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3740 integers. Explain the effect of literal string aliases on error
3741 messages. Copy token 0 documentation from the C++ skeleton
3744 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3746 Accept a token number in a %left, %right, or %nonassoc for POSIX
3747 conformance. Reported by Tim Josling at
3748 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3749 * NEWS (2.3a+): Mention.
3750 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3751 and code numbers are treated by precedence declarations.
3752 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3754 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3756 (symbol.prec): New, just like symbol but allows INT.
3757 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3759 * tests/regression.at (Token number in precedence declaration): New
3762 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3764 DJGPP specific issues.
3765 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3766 be changed. Copyright timestamp adjusted.
3767 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3768 be changed. Copyright timestamp adjusted.
3769 * djgpp/config.site: Copyright timestamp adjusted.
3770 * djgpp/config_h.sed: Copyright timestamp adjusted.
3771 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3772 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3773 filename translation list.
3774 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3775 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3776 files shall be created. Before trying to use the temp dir where the
3777 environment variable points to check that the dir really exists. If
3778 not default to the cwd as temp dir. Copyright timestamp adjusted.
3779 * djgpp/subpipe.h: Copyright timestamp adjusted.
3780 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3782 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3784 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3786 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3788 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3789 Problem reported by Claudio Saavedra in
3790 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3792 2008-01-05 Wojciech Polak <polak@gnu.org>
3794 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3795 document's title with the input grammar file name.
3797 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3799 Automate regression testing of the XML/XSLT implementation. Discussed
3801 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3802 * configure.ac (XSLTPROC): New substitution.
3803 * Makefile.am (maintainer-xml-check): New phony target invoking...
3804 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3805 invoking make maintainer-check with BISON_TEST_XML=1.
3806 * tests/atlocal.in (XSLTPROC): New.
3807 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3808 not to report reachable memory when Bison is expected to have a
3809 non-zero exit status and (2) to compare XML/XSLT output with --graph
3810 and --report=all output for every working grammar when
3812 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3813 (AT_BISON_CHECK_XML): New.
3814 (AT_QUELL_VALGRIND): New.
3815 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3816 (AT_CHECK): ... don't redefine this since this was the old way to
3818 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3819 AT_BISON_CHECK invocations.
3820 * tests/c++.at: Likewise.
3821 * tests/calc.at: Likewise.
3822 * tests/conflicts.at: Likewise.
3823 * tests/cxx-type.at: Likewise.
3824 * tests/existing.at: Likewise.
3825 * tests/glr-regression.at: Likewise.
3826 * tests/headers.at: Likewise.
3827 * tests/input.at: Likewise.
3828 * tests/java.at: Likewise.
3829 * tests/output.at: Likewise.
3830 * tests/push.at: Likewise.
3831 * tests/reduce.at: Likewise.
3832 * tests/regression.at: Likewise.
3833 * tests/sets.at: Likewise.
3834 * tests/skeletons.at: Likewise.
3835 * tests/synclines.at: Likewise.
3836 * tests/torture.at: Likewise.
3837 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3838 tends to hang xsltproc.
3839 (Big horizontal): Likewise.
3841 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3843 In XML output, remove redundant class attribute on symbol element.
3844 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3845 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3846 look up a symbol to determine whether it's a nonterminal or terminal.
3847 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3848 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3850 Add prec/assoc information to XML output.
3851 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3852 %prec, add a percent_prec attribute.
3853 * src/print-xml.c (print_grammar): For each terminal that has a
3854 precedence or associativity, add a prec or assoc attribute.
3856 (xml_puts): Use xml_indent.
3857 (xml_printf): Use xml_indent.
3858 * src/print-xml.h (xml_indent): Prototype.
3860 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3861 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3863 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3865 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3866 (bison:ruleByNumber): ... this for clarity.
3867 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3868 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3869 (xsl:template match="reduction"): Update.
3870 (xsl:template match="item"): Update.
3871 (xsl:template match="reduction"): Update.
3873 In the XML output, don't print the list of rules where symbols appear.
3874 Compute it in XSLT instead. Discussed at
3875 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3876 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3877 (bison:ruleByRhs): New.
3878 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3880 (xsl:template match="terminal/rule"): Remove.
3881 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3883 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3885 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3886 bison:ruleByRhs and mode="number-link" for rule template.
3887 (xsl:template match="terminal/rule"): Remove.
3888 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3889 bison:ruleByRhs and mode="number-link" for rule template.
3890 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3892 (xsl:template match="rule" mode="number-link"): ... this.
3893 * src/print-xml.c (print_grammar): Don't print the list of rules.
3895 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3897 Don't let --report affect XML output; always print all information.
3899 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3900 * src/conflicts.c (log_resolution): Implement.
3901 * src/print-xml.c (print_core): Implement.
3902 (print_state): Implement.
3903 (print_xml): Implement.
3905 * NEWS (2.3a+): Fix quotes.
3906 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3907 don't let %verbose clear the list specified by --report.
3909 2007-11-26 Akim Demaille <akim@epita.fr>
3911 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3913 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3915 In the XML output, list useless and unused symbols and rules with the
3916 useful ones and add a "usefulness" attribute. Discussed starting at
3917 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3918 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3919 (grammar_rules_print_xml): Print all rules instead of just those
3920 useful in the grammar, and add a "usefulness" attribute.
3921 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3922 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3923 (print_grammar): Print all nonterminals instead of just useful ones,
3924 and add a "usefulness" attribute to nonterminals and terminals.
3925 (print_xml): Don't print a separate "reductions" or
3926 "rules-useless-in-parser" element.
3927 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3928 (reduce_xml): Remove.
3929 (reduce_token_unused_in_grammar): New.
3930 (reduce_nonterminal_useless_in_grammar): New.
3931 * src/reduce.h (reduce_xml): Remove prototype.
3932 (reduce_token_unused_in_grammar): Add prototype.
3933 (reduce_nonterminal_useless_in_grammar): Add prototype.
3934 * data/xslt/xml2text.xsl: Update for XML changes.
3935 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3936 * tests/reduce.at (Useless Terminals): Update output.
3937 (Useless Rules): Update output.
3938 (Reduced Automaton): Update output.
3940 Say "Terminals unused in grammar" instead of "Unused terminals".
3941 * NEWS (2.3a+): Update.
3942 * doc/bison.texinfo (Understanding): Update example output.
3943 * src/reduce.c (reduce_output): Implement.
3944 * data/xslt/xml2text.xsl: Implement.
3945 * data/xslt/xml2xhtml.xsl: Implement.
3947 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3949 Accept --report-file=FILE to override the default `.output' filename.
3950 * NEWS (2.3a+): Mention.
3951 * doc/bison.texinfo (Bison Options): Add an entry.
3952 * src/files.c (compute_output_file_names): Don't override
3953 spec_verbose_file if already set.
3954 * src/getargs.c (usage): Document --report-file.
3955 (REPORT_FILE_OPTION): New anonymous enum member.
3956 (long_options): Add entry for it.
3957 (getargs): Add case for it setting spec_verbose_file.
3959 * build-aux/cross-options.pl: Don't record a short option just because
3961 * doc/.cvsignore: Add yacc.1.
3963 2007-11-14 Akim Demaille <akim@epita.fr>
3965 * doc/yacc.1.in: New.
3966 * configure.ac, doc/Makefile.am: Adjust.
3967 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3969 Use AC_SUBST for assignments too.
3970 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3972 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3974 * src/gram.c: Remove comments that duplicate comments in gram.h.
3976 When reporting useless rules and nonterminals, say "useless in grammar"
3977 instead of "useless", and say "useless in parser" instead of "never
3978 reduced". Discussed starting at
3979 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3980 * NEWS (2.3a+): Mention this change.
3981 * data/xslt/xml2text.xsl: Update output text and expected input XML
3982 element names to match changes below.
3983 * data/xslt/xml2xhtml.xsl: Likewise.
3984 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3985 Contents: "Rules useless in parser due to conflicts".
3986 * doc/bison.texinfo (Decl Summary): Reword a little.
3987 (Understanding): Update example output for changes below.
3988 * src/gram.c: (rule_useful_p): Rename to...
3989 (rule_useful_in_grammar_p): ... this.
3990 (rule_useless_p): Rename to...
3991 (rule_useless_in_grammar_p): ... this.
3992 (rule_never_reduced_p): Rename to...
3993 (rule_useless_in_parser_p): ... this.
3994 (grammar_rules_print): Update for renames.
3995 (grammar_rules_print_xml): Update for renames.
3996 (grammar_rules_never_reduced_report): Rename to...
3997 (grammar_rules_useless_report): ... this since it is used for either
3998 kind of useless rule.
3999 * src/gram.h: Reword comments and update function names in prototypes.
4000 * src/main.c (main): Say "rule useless in parser due to conflicts".
4001 * src/print-xml.c (print_rules_never_reduced): Rename to...
4002 (print_rules_useless_in_parser): ... this, and rename output XML
4003 element "rules-never-reduced" to "rules-useless-in-parser".
4004 (print_xml): Update for rename.
4005 * src/print.c (print_results): Say "Rules useless in parser due to
4007 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
4008 (nonterminals_reduce): Say "nonterminal useless in grammar".
4009 (reduce_output): Say "Nonterminals useless in grammar".
4010 Say "Rules useless in grammar".
4011 (reduce_xml): Rename output XML element "useless" to
4012 "useless-in-grammar".
4013 (reduce_print): Don't report the count of grammatically useless rules
4014 as "rules never reduced" just because %yacc is specified.
4015 In the correct report of this count, say nonterminal(s) and rule(s)
4016 "useless in grammar".
4017 * tests/conflicts.at (S/R in initial): Update expected output.
4018 (Defaulted Conflicted Reduction): Likewise.
4019 (Unreachable States After Conflict Resolution): Likewise.
4020 * tests/existing.at (GNU pic Grammar): Likewise.
4021 * tests/reduce.at (Useless Nonterminals): Likewise.
4022 (Useless Rules): Likewise.
4023 (Reduced Automaton): Likewise.
4024 (Underivable Rules): Likewise.
4025 (Empty Language): Likewise.
4027 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4029 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4030 here document and before the EOF so that BSD's implementation of Bourne
4031 shell doesn't parse the delimiter as part of the here document.
4032 * doc/.cvsignore: Add cross-options.texi.
4033 * src/getargs.c (usage): Add a blank line after the warning categories.
4035 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
4037 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4039 2007-11-05 Akim Demaille <akim@epita.fr>
4041 Remove Id: from bison.1.
4042 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4043 (perl -0777 -pi -e 's/\.PP\nId): New.
4044 (.x.1): Use it to ignore the version control revision.
4046 2007-11-05 Akim Demaille <demaille@gostai.com>
4048 * build-aux/Makefile.am: Ship cross-options.pl.
4049 * doc/Makefile.am: Always refer to cross-options.texi with
4051 (MAINTAINERCLEANFILES): Add it.
4053 2007-11-04 Akim Demaille <demaille@gostai.com>
4055 Generate the long/short option cross-table.
4056 * build-aux/cross-options.pl: New.
4057 * doc/Makefile.am (cross-options.texi): New.
4058 * doc/bison.texinfo: Use it.
4060 2007-11-04 Akim Demaille <demaille@gostai.com>
4062 Generate bison.1 using help2man.
4063 * doc/common.x, doc/bison.x: New.
4064 * doc/Makefile.am (bison.1, .x.1): New.
4065 The code is taken from autoconf-2.61/man/Makefile.am.
4066 * configure.ac: Look for help2man.
4068 2007-11-04 Akim Demaille <demaille@gostai.com>
4071 * src/getargs.c (usage): Document -W, make it clear that -d,
4072 -g and -x have optional arguments.
4074 2007-11-04 Akim Demaille <demaille@gostai.com>
4076 Find sha1sum when named gsha1sum.
4077 * bootstrap (find_tool): New.
4080 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4082 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4084 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4085 * NEWS (2.3a+): Mention.
4086 * data/bison.m4 (b4_pure_if): Don't define it here.
4087 * data/c.m4 (b4_identification): Depend on individual skeletons to
4088 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4089 values of the %define variables api.pure or api.push_pull. Define
4090 YYPURE, YYPUSH, and YYPULL accordingly.
4091 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4092 glr.cc has already defined b4_pure_flag.
4093 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4094 Remove YYPUSH and YYPULL since they're back in b4_identification again.
4095 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
4096 * doc/bison.texinfo (Pure Decl): Update.
4097 (Push Decl): Update.
4098 (Decl Summary): Add api.pure to %define entry.
4099 In %pure-parser entry, say it's deprecated and reference %define.
4100 (Pure Calling): Update.
4101 (Error Reporting): Update.
4102 (C++ Scanner Interface): Update.
4103 (How Can I Reset the Parser): Update.
4104 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4106 * src/getargs.c (pure_parser): Remove global variable.
4107 * src/getargs.h (pure_parser): Remove extern.
4108 * src/output.c (prepare): Don't define pure_flag muscle.
4109 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4110 wrapper around `%define api.pure'.
4111 * tests/calc.at (Simple LALR Calculator): Update.
4112 (Simple GLR Calculator): Update.
4113 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4115 (GLR: Resolve ambiguity, pure, locations): Update.
4116 (GLR: Merge conflicting parses, pure, no locations): Update.
4117 (GLR: Merge conflicting parses, pure, locations): Update.
4118 * tests/glr-regression.at (Uninitialized location when reporting
4120 * tests/input.at (Unused %define api.pure): New test case.
4121 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4122 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4123 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4125 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4127 %define push_pull -> %define api.push_pull. Discussed starting at
4128 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4129 * data/push.c: Expect the new name.
4130 * data/yacc.c: Likewise.
4131 * doc/bison.texinfo (Push Decl): Update.
4132 (Decl Summary): Update %define entry.
4133 (Push Parser Function): Update.
4134 (Pull Parser Function): Update.
4135 (Parser Create Function): Update.
4136 (Parser Delete Function): Update.
4137 * tests/calc.at (Simple LALR Calculator): Update.
4138 * tests/input.at (%define enum variables): Update.
4139 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4140 (Push Parsing: Multiple impure instances): Update.
4141 (Push Parsing: Unsupported Skeletons): Update.
4142 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4143 (Exploding the Stack Size with Malloc): Update.
4145 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4148 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4150 For the XML output's terminal element, rename @number to @token-number,
4151 and add @symbol-number. In the nonterminal element, rename @number to
4152 @symbol-number. Discussed starting at
4153 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4154 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4156 (xsl:template match="nonterminal"): Likewise.
4157 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4158 (xsl:template match="nonterminal"): Likewise.
4159 * src/print-xml.c (print_grammar): Implement.
4161 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4163 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4164 2007-10-11 change, the child elements here are items not rules.
4165 (xsl:template match="item"): New.
4166 (xsl:template match="rule"): Update for new reduced itemset.
4167 (xsl:template match="point"): Remove.
4168 (xsl:template match="empty"): For consistency with --graph, don't
4169 output "/* empty */".
4170 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4171 line-wrap, don't pass a negative value as first-line-length since this
4172 won't work with the following changes.
4173 (xsl:template name="line-wrap"): Simplify slightly.
4174 (xsl:template name="ws-search"): Eliminate recursion.
4175 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4176 set next to an item whose dot is not at the end of the RHS even if it
4177 happens to be associated with the same rule.
4179 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4181 Add %define lr.keep_unreachable_states.
4182 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4183 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4184 * src/main.c (main): Implement it.
4185 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4186 Extend to test it, and fix a typo.
4188 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4190 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
4191 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4192 the example .output text.
4193 * tests/regression.at (Extra lookahead sets in report): Improve wording
4196 2007-10-17 Wojciech Polak <polak@gnu.org>
4198 * src/print-xml.c (print_grammar): Renamed
4199 <terminal> and <nonterminal> attributes:
4200 "type" to "number" and "symbol" to "name".
4201 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4202 Use new attribute names.
4203 (xsl:template match="nonterminal"): Likewise.
4204 * data/xslt/xml2xhtml.xsl: Likewise.
4206 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4208 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4209 (Option Cross Key): Likewise.
4211 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4212 next to an item whose dot is not at the end of the RHS even if it
4213 happens to be associated with the same rule.
4214 * src/print.c (print_core): Likewise.
4215 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4216 (Resolved SR Conflicts): Update output.
4217 * tests/regression.at (Extra lookahead sets in report): New test case.
4219 2007-10-11 Wojciech Polak <polak@gnu.org>
4221 * src/print-xml.c (print_core): Remove item set
4223 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4224 Improve processing time. Suggested by Joel E. Denny.
4225 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4226 Write xsl:param "required" attribute as comment.
4227 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4228 (xsl:template match="rule"): Support new reduced itemset.
4229 (xsl:template match="point"): Remove.
4230 * data/xslt/xml2xhtml.xsl: Likewise.
4232 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4234 * src/getargs.c (version): Update copyright year.
4236 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4238 Make xml2dot.xsl and --graph produce the same output.
4239 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a ` '
4240 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4242 (xsl:template name="output-node"): Use the new escape template instead
4243 of the string-replace template directly.
4244 (xsl:template name="output-edge"): Likewise.
4245 (xsl:template name="escape"): New, escapes backslashes and newlines in
4246 addition to quotation marks.
4247 * src/graphviz.c (start_graph, output_node, output_edge): Add
4248 whitespace to output for legibility.
4250 Make xml2text.xsl and --report produce the same output, and remove the
4251 XML "conflicts" element since a conflict summary is easily extracted
4253 * data/xslt/bison.xsl: New.
4254 (xsl:template match="state" mode="bison:count-conflicts): New.
4255 * data/xslt/xml2text.xsl: Import bison.xsl.
4256 (xsl:template match="bison-xml-report"): Instead of styling the
4257 "conflicts" element, style the "automaton" element with mode
4258 "conflicts". Unlike the former, the latter lists S/R and R/R
4259 conflicts for a state on the same line.
4260 (xsl:template match="conflicts"): Remove.
4261 (xsl:template match="conflict"): Remove.
4262 (xsl:template match="terminal"): Line-wrap the list of rules in which
4263 the terminal is used.
4264 (xsl:template match="nonterminal"): Likewise for nonterminals.
4265 (xsl:template match="automaton" mode="conflicts"): New.
4266 (xsl:template match="state" mode="conflicts"): New.
4267 (xsl:template name="line-wrap"): New.
4268 (xsl:template name="ws-search"): New.
4269 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4270 (xsl:template match="bison-xml-report"): Instead of styling the
4271 "conflicts" element, style the "automaton" element with mode
4273 (xsl:template match="conflicts"): Remove.
4274 (xsl:template match="conflict"): Remove.
4275 (xsl:template match="automaton" mode="conflicts"): New.
4276 (xsl:template match="state" mode="conflicts): New.
4277 * src/conflicts.c (conflicts_output_xml): Remove.
4278 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4279 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4280 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4281 the corresponding XSLT is easier. Also, never wrap between a word and
4282 the comma that follows it.
4284 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4286 Improve C++ namespace support. Discussed starting at
4287 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4288 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4289 b4_namespace_close): New macros that interpret the %define variable
4290 "namespace" so its value can contain "::" to indicate nested
4292 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4294 * data/lalr1.cc (b4_namespace): Likewise.
4295 * data/location.cc (b4_namespace): Likewise.
4296 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4297 inside a new table in the general %define entry. Document `%define
4298 namespace' there as well. Point the %name-prefix entry to it since it
4299 explains it more completely in the case of C++.
4300 (C++ Bison Interface): Mention `%define namespace' instead of
4302 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4304 * tests/c++.at (Relative namespace references): New test case.
4305 (Absolute namespace references): New test case.
4306 (Syntactically invalid namespace references): New test case.
4307 * tests/input.at (C++ namespace reference errors): New test case.
4309 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4311 Add syncline support and location accessor to internal %define
4313 * data/bison.m4 (b4_percent_define_get_loc): New.
4314 (b4_percent_define_get_syncline): New.
4315 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4316 (b4_percent_define_default): Record defining location as line 1 rather
4317 than 0 for the sake of synchronizing #line's, and define
4318 b4_percent_define_syncline(VARIABLE).
4319 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4320 * src/muscle_tab.c (muscle_syncline_grow): New.
4321 (muscle_code_grow): Use muscle_syncline_grow.
4322 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4323 define b4_percent_define_syncline(VARIABLE).
4324 (muscle_percent_define_get_loc): New.
4325 (muscle_percent_define_get_syncline): New.
4326 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4327 remove some unused variables.
4328 (muscle_percent_define_default): Record defining location as line 1
4329 rather than 0 for the sake of synchronizing #line's, and define
4330 b4_percent_define_syncline(VARIABLE).
4331 (muscle_percent_define_check_values): Use
4332 muscle_percent_define_get_loc.
4333 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4334 (muscle_percent_define_get_syncline): Prototype.
4335 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4336 defaults): Update output for location change.
4337 (Complaining during macro argument expansion): Extend to test
4338 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4340 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4342 Fix some error-reporting macro bugs.
4343 * data/bison.m4 (b4_cat): New.
4344 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4345 to stdout so they don't become arguments to other macros. Update
4346 comments and add examples.
4347 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4349 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4350 after printing the error directive so that M4 doesn't report subsequent
4351 problems that are induced by this problem.
4352 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4353 instead of just in them. Recognize @\n in both places. Both expand to
4354 the empty string. Needed by b4_cat.
4355 * tests/skeletons.at (Complaining during macro argument expansion):
4357 (Fatal errors make M4 exit immediately): New test case.
4359 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4361 Implement --print-datadir.
4362 * src/getargs.c (usage): Mention.
4363 (PRINT_DATADIR_OPTION): New anonymous enum member.
4364 (long_options): Add entry for it.
4365 (getargs): Add case for it calling compute_pkgdatadir.
4366 * src/output.c (output_skeleton): Encapsulate data directory
4367 computation from here...
4368 (prepare): ... and from here...
4369 (compute_pkgdatadir): ... into this new function.
4370 * src/output.h (compute_pkgdatadir): Prototype.
4372 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4374 * src/print-xml.c (escape_bufs): New static global variable
4376 (xml_escape_n): ... the static local variable buf here.
4377 (print_xml): Free memory for escape_bufs.
4378 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4380 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4382 Replace `%push-parser' and `%push-pull-parser' with
4383 `%define push_pull "push"' and `%define push_pull "both"'.
4384 `%define push_pull "pull"' is the default.
4385 * doc/bison.texinfo (Push Decl, Push Parser Function,
4386 Pull Parser Function, Parser Create Function, Parser Delete Function):
4387 Update declarations.
4388 (Decl Summary, Table of Symbols): Replace %push-parser and
4389 %push-pull-parser entries with a %define push_pull entry.
4390 * data/bison.m4 (b4_percent_define_check_values): New macro.
4391 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4393 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4395 * data/push.c: ... to here and compute them from the value of the
4396 %define variable push_pull.
4397 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4398 parsing requests here...
4399 * data/yacc.c: ... hack this to switch to push.c any time
4400 b4_use_push_pull_flag or the %define variable push_pull is set. This
4401 will go away when we mv push.c yacc.c.
4402 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4403 push parsing is not supported since unused %define variables are
4405 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4406 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4407 comments for consistency with b4_percent_define_check_values.
4408 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4410 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4412 (prologue_declaration): Remove %push-parser and %push-pull-parser
4414 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4415 * tests/calc.at: Update declarations.
4416 * tests/input.at (%define enum variables): New test case.
4417 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4419 (Push Parsing: Multiple impure instances): Update declaration.
4420 (Push Parsing: Unsupported Skeletons): New test case.
4421 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4423 (Exploding the Stack Size with Malloc): Update declaration.
4425 2007-09-24 Wojciech Polak <polak@gnu.org>
4427 Add XSLT transformations.
4429 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4430 * data/xslt/xml2text.xsl: Transform XML into plain text.
4431 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4432 * data/Makefile.am (xsltdir): New variable.
4433 (dist_xslt_DATA): Add xslt/*.xsl files.
4435 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4437 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4438 Problem reported by Wojciech Polak.
4439 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4440 (xml_printf): Undo change I made on 21 September; that is,
4441 indent 2 spaces, not 1.
4443 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4445 Pacify ./configure --enable-gcc-warnings.
4446 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4447 `char const *' instead of `char *'.
4448 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4449 local variable `sep'.
4451 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4453 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4455 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4456 (xml_printf): Indent just 1 space for level.
4457 (e_char, xlate_char): Remove.
4458 (xml_escape_string): Rewrite to avoid undefined behavior (used
4459 storage that was freed from the stack).
4460 (xml_escape_n): Don't bother checking for subscript error.
4462 2007-09-21 Wojciech Polak <polak@gnu.org>
4464 Add Bison XML Automaton Report.
4466 Add support for an -x option to generate an XML report.
4467 It is not documented yet.
4468 * src/print-xml.c: New file.
4469 * src/print-xml.h: Likewise.
4470 * lib/timevar.def (TV_XML): New var.
4471 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4472 * src/conflicts.c: Include print-xml.h.
4473 (solved_conflicts_xml_obstack): New var.
4474 (log_resolution, conflicts_solve, conflicts_free):
4475 Add support for XML report.
4476 (conflicts_output_val): New function.
4477 * src/conflicts.h (conflicts_output_val): New decl.
4478 * src/files.c (spec_xml_file): New var.
4479 (compute_output_file_names, output_file_names_free): Add XML support.
4480 * src/files.h (spec_xml_file): New decl.
4481 * src/getargs.c (xml_flag): New var.
4482 (usage, short_options, long_options, getargs): Add XML support.
4483 * src/getargs.h (xml_flag): New decl.
4484 * src/gram.c: Include print-xml.h.
4485 (rule_lhs_print_xml, rule_rhs_print_xml):
4486 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4488 * src/gram.h: Declare external ones.
4489 * src/main.c: Include print-xml.h.
4490 (main): Add XML support.
4491 * src/reduce.c: Include print-xml.h.
4492 (reduce_xml): New function.
4493 * src/reduce.h: Declare it.
4494 * src/state.c: Include print-xml.h.
4495 (state_new): Add XML support.
4496 (state_rule_lookahead_tokens_print_xml): New function.
4497 * src/state.h: Declare it.
4498 (struct state): New member solved_conflicts_xml.
4499 * src/symtab.c (symbol_class_get_string): New function.
4500 * src/symtab.h: Declare it.
4502 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4504 * GNUmakefile: Switch to coreutils's version.
4505 * bootstrap: Likewise.
4506 * Makefile.cfg: Adjust to new GNUmakefile.
4507 * README-hacking: Likewise.
4511 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4512 Bruno Haible <bruno@clisp.org>
4514 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4515 and is a script that invokes bison. Tighten the code. Add comments.
4517 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4519 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4520 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4521 * doc/bison.texinfo (Decl Summary): Fix.
4522 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4523 * tests/input.at (Boolean %define variables): Update output.
4524 * tests/skeletons.at (%define boolean variables: invalid skeleton
4525 defaults): Rename to...
4526 (%define Boolean variables: invalid skeleton defaults): ... this and
4529 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4531 In impure push mode, don't allow more than one yypstate to be allocated
4532 since multiple impure parsers would corrupt yynerrs.
4533 * data/push.c (yypstate_allocated): New static global variable
4535 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4536 exhaustion if yypstate_allocated is 1, but still return 2.
4537 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4538 already 1. Otherwise, set it to 1.
4539 (yypstate_delete): Set it to 0.
4540 * tests/push.at (Push Parsing: Multiple impure instances): New test
4543 2007-08-17 Bob Rossi <bob@brasko.net>
4545 * doc/bison.texinfo (Push Decl): Document the push parser.
4546 (Table of Symbols): Ditto.
4548 (Decl Summary): Ditto.
4549 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4550 Parser Create Function, Parser Delete Function):
4551 Add new push parser symbols.
4552 (Table of Symbols): Document push-parser, push-pull-parser,
4553 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4555 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4558 * doc/gpl-3.0.texi: New file.
4559 * doc/gpl.texi: Remove.
4560 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4561 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4562 * README-hacking, TODO, bootstrap, bootstrap.conf:
4563 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4564 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4565 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4566 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4567 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4568 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4569 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4570 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4571 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4572 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4573 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4574 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4575 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4576 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4577 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4578 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4579 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4580 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4581 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4582 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4583 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4584 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4585 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4586 * src/complain.c, src/complain.h, src/conflicts.c:
4587 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4588 * src/files.h, src/flex-scanner.h, src/getargs.c:
4589 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4590 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4591 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4592 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4593 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4594 * src/print.c, src/print.h, src/print_graph.c:
4595 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4596 * src/reduce.h, src/relation.c, src/relation.h:
4597 * src/revision.h, src/scan-code.h, src/scan-code.l:
4598 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4599 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4600 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4601 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4602 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4603 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4604 * tests/existing.at, tests/glr-regression.at:
4605 * tests/headers.at, tests/input.at, tests/java.at:
4606 * tests/local.at, tests/output.at, tests/push.at:
4607 * tests/reduce.at, tests/regression.at, tests/sets.at:
4608 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4612 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4614 Get rid of broken %no-parser, -n, and --no-parser implementation and
4616 * TODO: Don't mention them.
4617 * doc/bison.1: Likewise.
4618 * doc/bison.texinfo (Decl Summary): Likewise.
4619 (Bison Options): Likewise.
4620 (Option Cross Key): Likewise.
4621 * src/getargs.c (no_parser_flag): Remove global variable.
4622 (usage): Don't print description of -n and --no-parser.
4623 (long_options): Remove --no-parser entry here.
4624 (getargs): Remove -n case in the switch here.
4625 * src/getargs.h (no_parser_flag): Remove extern.
4626 * tests/regression.at (Web2c Actions): Remove comment that mentions
4629 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4631 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4632 name user variables starting with `yy'. Just pass NULL instead of a
4633 dummy local &yylval to yypush_parse.
4634 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4637 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4639 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4640 true since it's then always used regardless of whether yyoverflow is
4641 defined. Reported by Christian Burger at
4642 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4643 * THANKS: Add Christian Burger.
4645 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4646 node names: say "Decl Summary" not "Bison Declaration Summary".
4648 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4650 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4651 determine whether this function has already complained about an invalid
4652 value for a %define boolean variable, don't check whether Bison has
4653 ever examined the value. As written, the check was a tautology.
4654 Instead, record and check for this complaint using a separate muscle.
4656 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4658 Fix push parsing memory leak reported by Brandon Lucia at
4659 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4660 * THANKS: Add Brandon Lucia.
4661 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4662 but the parse never completed and thus freed it.
4663 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4664 * tests/testsuite.at: Include push.at.
4665 * test/push.at: New.
4666 (Push Parsing: Memory Leak for Early Deletion): New test case.
4668 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4670 Improve handling of multiple S/R conflicts in the same state and of S/R
4671 conflicts involving multiple reductions.
4672 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4673 set for a state here or Bison will abort if it is reassigned on a
4674 later conflicted reduction in the same state.
4675 Similarly, don't finalize and assign the solved conflicts report here
4676 or it will be lost if it is reassigned on a later conflicted reduction
4678 (set_conflicts): Instead, assign them both here after all S/R conflicts
4679 in the state have been fully examined.
4680 * src/print.c (shift_set): Rename to...
4681 (no_reduce_set): ... this.
4682 (print_reductions): Update for rename, and add %nonassoc error action
4683 tokens to no_reduce_set so that, when printing the first remaining
4684 reduction on an error action token, the reduction is enclosed in
4686 (print_results): Update for rename.
4687 * tests/conflicts.at (Solved conflicts report for multiple reductions
4688 in a state): New test case.
4689 (%nonassoc error actions for multiple reductions in a state): New test
4692 * src/main.c (main): Don't depend on C99 features.
4694 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4696 * build-aux/.cvsignore: Add compile.
4697 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4700 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4702 * bootstrap (slurp): Create target directories that don't exist.
4703 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4705 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4707 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4709 * closure.c (closure): Likewise.
4710 * state.h (reductions): Comment sorting of rules.
4711 (state): Comment sorting of items.
4713 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4715 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4716 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4717 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4718 definition in order to avoid Gnulib headers since we don't use config.h
4720 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4721 rather than AT_DATA so that config.h is included.
4723 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4725 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4726 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4727 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4728 and so that YYFPRINTF is guaranteed to be defined here.
4730 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4732 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4734 (muscle_percent_define_check_values): ... this more helpful function.
4735 Again, it's not used yet, but it will be.
4736 * src/muscle_tab.h: Likewise.
4738 Improve some comments in parser table construction.
4739 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4740 (generate_states): Don't mention ruleset, which is internal to closure.
4741 * src/closure.c (closure): Explain sorting of core and itemset, which
4742 is required for this function to behave correctly.
4743 * src/closure.h (closure): Mention sorting.
4745 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4747 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4748 move the check for disabled transitions to an aver since conflict
4749 resolution hasn't happened yet.
4751 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4752 labels a state as inconsistent just because it has error transitions.
4753 The original form of this check appeared in revision 1.1 of lalr.c,
4754 which was committed on 1991-12-21. Now (at least), changing the
4755 consistency label on such a state appears to have no useful effect in
4756 any of the places it is examined, which I enumerate below. The key
4757 point to understanding each item in this enumeration is that a state
4758 with an error transition is labelled consistent in the first place only
4759 if it has no rules, so the check cannot matter for states that have
4760 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4761 to try to identify its conflicts, and a state must have *rules* to have
4762 conflicts. (2) Labelling a state as inconsistent will affect how
4763 action_row sets the default *rule* for the state. (3) Labelling a
4764 state as inconsistent will cause build_relations to add lookback edges
4765 to *rules* in that state.
4766 * src/state.h (struct state): Word the comment for member consistent
4769 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4771 Don't depend on C99 features.
4772 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4773 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4774 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4775 * src/state.c (state_mark_reachable_states): Fix for-loop.
4776 (state_remove_unreachable_states): Fix for-loop.
4778 Don't widen struct state with member reachable just to temporarily
4779 record reachability. Instead, use a local bitset.
4780 * src/state.h (struct state): Remove member.
4781 * src/state.c (state_new): Don't initialize it.
4782 (state_mark_reachable_states): Rename to...
4783 (state_record_reachable_states): ... this, and use bitset.
4784 (state_remove_unreachable_states): Use bitset.
4786 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4788 * src/Makefile.am (yacc): Quote target action commands properly so
4789 that the yacc script isn't corrupt. Reported by Hans Aberg at
4790 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4792 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4793 the case of pure parsers. Reported by Frans Englich at
4794 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4795 * THANKS: Add Frans Englich.
4797 * NEWS (2.3a+): In the %code entry, reference section `Bison
4798 Declaration Summary' from the manual now since the %code summary has
4800 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4801 in the rules section must be terminated by semicolons.
4803 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4805 Extend the front-end API for %define variables to more completely
4806 mirror the back-end. This will be useful in the future.
4807 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4808 Update comments to mention the new front-end counterparts of these
4810 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4811 for muscle_string_decode and muscle_location_decode.
4812 (muscle_string_decode): New static function.
4813 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4814 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4816 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4817 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4818 implementation more closely.
4819 (muscle_percent_define_invalid_value): New function.
4820 * src/muscle_tab.h (muscle_percent_define_get,
4821 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4824 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4826 * NEWS (2.3a+): Mention yesterday's state-removal change.
4827 (2.3a): Remove the %language entry, which was added after 2.3a.
4828 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4829 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4830 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4831 tests/existing.at: Update copyright date.
4833 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4835 If conflict resolution makes states unreachable, remove those states,
4836 report rules that are then unused, and don't report conflicts in those
4838 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4839 New global function.
4840 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4842 * src/main.c (main): After conflict resolution, remove the unreachable
4843 states and update all data structures that reference states by number.
4844 * src/state.c (state_new): Initialize each state's reachable member to
4846 (state_mark_reachable_states): New static function.
4847 (state_remove_unreachable_states): New global function.
4848 * src/state.h (struct state): Add member bool reachable.
4849 (state_remove_unreachable_states): Prototype.
4850 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4852 * tests/existing.at (GNU pic Grammar): Update test case output now that
4853 an unused rule is discovered.
4855 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4857 Minor code cleanup in parser table construction.
4858 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4859 (new_itemsets, save_reductions): Update for rename to nitemset.
4860 * src/closure.c (nritemset): Rename to...
4861 (nitemset): ... this since the "r" appears to meaningless and isn't
4862 used in the comments.
4863 (closure): Update for rename.
4864 * src/closure.h (nritemset): Update extern to...
4865 (nitemset): ... this.
4866 * src/lalr.c (LA): Fix a typo in comments.
4867 * src/print.c (print_core): Update for rename to nitemset.
4868 * src/print_graph.c (print_graph): Likewise.
4869 * src/state.h: Fix some typos in header comments.
4871 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4873 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4874 still sticks to ASCII. Sorry!
4876 * README-hacking: New file, taken mostly from coreutils, with changes
4877 for Bison. Contains much of the contents of:
4878 * README-cvs: Remove.
4879 * bootstrap: Sync from gnulib.
4880 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4881 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4883 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4885 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4887 (Java Differences): Fix some typos.
4888 * THANKS: Add Sebastian Setzer.
4890 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4892 * data/java.m4 (b4_single_class_if): Remove.
4893 (b4_abstract_if): Look at "%define abstract".
4895 (b4_union_name): Rename...
4896 (b4_yystype): ... to this. Map to "%define stype".
4897 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4898 b4_maybe_throws): Fix quoting.
4899 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4900 * data/lalr1.java (Lexer interface): Always define.
4901 (Lexer interface within parser class): Remove.
4902 (YYLexer class): New, used when "%code lexer" is present.
4903 (constructor): When "%code lexer" is used, pass %lex-param
4904 to the lexer constructor.
4905 (yylex, yyparse): Remove %lex-param from method invocations
4906 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4908 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4909 abstract". Rename "%define union_name" to "%define stype".
4910 Rename method names according to previous patch.
4911 (Java Scanner Interface): Describe "%code lexer" instead of
4912 "%pure-parser" and "%define single_class".
4913 (Java Differences): Mention "%code lexer".
4915 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4916 Include scanner here, using macros from tests/local.at.
4917 (AT_DATA_CALC_Y): Remove final argument.
4918 (_AT_CHECK_JAVA_CALC): Likewise.
4919 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4920 of %locations and %error-verbose.
4921 (main): Test with and without %lex-param.
4922 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4923 (AT_BISON_OPTION_POPDEFS): Pop it.
4925 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4927 DJGPP spefic issue. Inhibit the use of disallowed characters for
4928 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4929 and concern testsuite case 46.
4930 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4931 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4932 * djgpp/config.bat: Inhibit the use of disallowed characters.
4934 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4936 Miscellaneous %define and %code cleanup.
4937 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4938 values are interpreted.
4939 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4940 documentation a little more.
4941 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4942 muscle_percent_define_insert, muscle_percent_code_grow): New
4944 * src/muscle_tab.h (muscle_percent_define_insert,
4945 muscle_percent_code_grow): Prototype.
4946 * src/parse-gram.y (prologue_declaration): Use
4947 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4948 %define and %code directives.
4950 Make it easy to share %define boolean variables between the front-end
4951 and back-end. Though not used yet, this will be useful in the future.
4952 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4953 Bison uses of names rather than just skeleton uses of names.
4954 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4955 b4_percent_define_skeleton_variables(VARIABLE) to
4956 b4_percent_define_bison_variables(VARIABLE).
4957 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4958 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4959 b4_percent_code_bison_qualifiers(QUALIFIER).
4960 (b4_check_user_names_wrap): Update for renames.
4961 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4962 muscle_percent_define_default): New functions mimicking
4963 b4_percent_define_flag_if and b4_percent_define_default.
4965 For %define variables, report locations for invalid values and
4967 * data/bison.m4 (b4_percent_define_flag_if): Read
4968 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4970 (b4_percent_define_default): Save a special location in
4971 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4972 must later be reported as invalid.
4973 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4975 (muscle_percent_define_insert): Record the location of VARIABLE in
4976 muscle percent_define_loc(VARIABLE), and use it to report the previous
4977 location for a redefinition.
4978 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4979 (muscle_percent_define_default): Update like b4_percent_define_default.
4980 (muscle_grow_user_name_list): Rename to...
4981 (muscle_user_name_list_grow): ... this for consistency and use
4982 muscle_location_grow.
4983 * src/muscle_tab.h (muscle_location_grow): Prototype.
4984 * tests/input.at (%define errors): Update expected output.
4985 * tests/skeletons.at (%define boolean variables: invalid skeleton
4986 defaults): New test case.
4988 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4990 * src/print.c (lookahead_set, state_default_rule): Remove.
4991 (print_reductions): Replace state_default_rule invocation with
4992 equivalent use of yydefact, which was computed in token_actions in
4994 (print_results): Don't allocate lookahead_set.
4996 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
4998 * data/lalr1.java: Prefix all private members with yy.
5000 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
5002 Use YYFPRINTF instead of fprintf where appropriate. Reported by
5003 Sebastien Fricker at
5004 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
5005 * THANKS: Add Sebastien Fricker.
5006 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
5007 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
5008 accept a variable number of arguments.
5010 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5012 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5014 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5016 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5017 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5018 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5020 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5022 Undo my 2007-02-07 change, switching back to the c-strcase module
5023 introduced in the 2007-02-03 change. Bruno Haible reported that
5024 the 2007-02-07 change would be dangerous in Turkish if we add a
5025 language whose name contains "i", since "i" is not lowercase "I"
5027 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5028 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5029 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5030 * m4/.cvsignore: Remove strcase.m4.
5031 * src/getargs.c: Revert 2007-02-07 change, as follows.
5032 Include c-strcase.h.
5033 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5035 2007-02-11 Bruno Haible <bruno@clisp.org>
5037 Enable the Java related testsuite tests when the only Java compiler
5038 found is a gcj < 4.3. Discussed at
5039 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5040 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5042 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5044 * data/Makefile.am: Update copyright date.
5045 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5046 yypstate_new returns NULL.
5047 (yypstate_new): Return NULL if malloc does.
5048 * src/reader.c (packgram): Move translation of rule actions from the
5049 beginning of packgram to...
5050 (check_and_convert_grammar): ... here right before packgram is invoked
5051 so it's easier to write more complete comments, and remove redundant
5054 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5056 As in semantic actions, make @$ in %initial-action, %destructor, and
5057 %printer imply %locations.
5058 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5060 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5061 (@$ in %initial-action implies %locations,
5062 @$ in %destructor implies %locations,
5063 @$ in %printer implies %locations): ... these new test cases.
5065 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5067 Undo most of the 2007-02-03 change, switching to the strcase module
5068 now that gnulib strcase has been fixed.
5069 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5070 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5071 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5072 * m4/.cvsignore: Add strcase.m4.
5073 * src/getargs.c: Revert 2007-02-03 change, as follows.
5074 Don't include c-strcase.h.
5075 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5076 strcasecmp has "unspecified behavior" outside the POSIX locale,
5077 but it works fine in practice if at least one argument is ASCII,
5078 as is the case in Bison.
5080 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
5082 * tests/java.at: Skip tests if only one of javac/java is present.
5083 Reported by Joel E. Denny.
5084 * tests/atlocal.in: Adjust copyright years.
5086 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5088 * data/lalr1.java (Stack): Work around old verifiers that disallow
5089 access to the private fields of an inner class, from the outer class.
5090 We can make Stack's fields public because user code doesn't have access
5091 to the instance of Stack used by parse(). Reported by Paul Eggert.
5093 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5095 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5096 the right spot for these files?
5097 * bootstrap.conf (gnulib_modules): Add c-strcase.
5098 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5100 * src/getargs.c: Include c-strcase.h.
5101 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5102 to avoid unspecified behavior.
5104 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5106 * doc/bison.texinfo (Decl Summary): Correct typo.
5108 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
5110 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5111 Complain if the value does not match empty, "true" or "false".
5112 * data/c++.m4: Adjust default definitions of %define variables.
5113 * data/java.m4: Adjust default definitions of %define variables.
5114 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5116 * tests/input.at (Boolean %define variables): Test new behavior.
5118 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
5120 * NEWS: Mention java.
5121 * TODO: Remove things that are done.
5122 * bootstrap.conf: Add javacomp-script and javaexec-script.
5123 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5125 * data/Makefile.am: Add new files.
5126 * data/java-skel.m4: New.
5127 * data/java.m4: New.
5128 * data/lalr1.java: New.
5130 * doc/bison.texinfo: Put "A Complete C++ Example" under
5131 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5132 under Other Languages.
5134 * src/getargs.c (valid_languages): Add Java.
5135 * src/getargs.h (struct bison_language): Update size of string fields.
5137 * tests/Makefile.am: Add java.at.
5138 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5139 * tests/java.at: New.
5140 * tests/testsuite.at: Include it.
5142 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5145 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5146 at_directive_argv arguments so these no longer have to be global
5147 variables. Also, update the implementation for the following changes.
5148 (fail_for_at_directive_too_many_args,
5149 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5150 (at_directive_name): Remove as at_directive_argv[0] will be used for
5152 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5153 for the directive name.
5154 (at_directive_argc, at_directive_argv): Make these local within
5155 skel_lex instead of global.
5156 (INITIAL): Update directive start action for above changes.
5157 (SC_AT_DIRECTIVE_ARG): Rename to...
5158 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5159 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5160 (scan_skel): Move yylex_destroy to...
5161 (skel_scanner_free): ... here.
5162 * tests/skeletons.at (installed skeleton file name): Rename to...
5163 (installed skeleton file names): ... this.
5165 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5167 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5168 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5169 Summary" not "Directives".
5170 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5171 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5172 since the former is now the more complete one.
5173 (Prologue Alternatives): Likewise and do the same for %defines.
5174 (Table of Symbols): Add summary of %code, add summary of %define, and
5175 move full %code documentation to...
5176 (Decl Summary): ... here for consistency with other entries in these
5178 Move %define entry in order to keep this list alphabetized.
5179 Reword %define entry a little to put less emphasis on the skeleton
5180 concept, which most users shouldn't have to think about.
5182 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5184 Adjust to recent gnulib changes.
5185 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5186 Add string.h, string_.h, unistd_.h, wchar_.h.
5187 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5188 * src/system.h: Don't include <stpcpy.h>; this is now done by
5191 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
5193 Simplify implementation of unqualified %code, implement macros for
5194 uniform treatment of boolean %define flags. Document %define.
5195 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5196 b4_percent_code_ifdef): New.
5197 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5198 * data/c++.m4: Define default value for global_tokens_and_yystype.
5199 * data/glr.cc: Likewise.
5200 * data/location.cc: Use b4_percent_define_flag_if.
5202 * doc/bison.texinfo (Decl Summary): Document %define.
5204 * src/parse-gram.y (Unqualified %code): Change muscle name to
5206 (content.opt): Default to empty.
5208 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5210 Implement support for relative and absolute skeleton file names.
5211 Discussed starting at
5212 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5213 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5214 (Bison Options): Document in --skeleton entry.
5215 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5216 full_skeleton can't necessarily hold all of pkgdatadir.
5217 If the specified skeleton file name contains a `/', don't prepend
5219 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5220 file name contains a `/', prepend the grammar file directory.
5221 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5222 * skeletons.at: New file.
5223 (relative skeleton file names): New test case.
5224 (installed skeleton file names): New test case.
5225 * tests/testsuite.at: Include skeletons.at.
5227 * bootstrap: Update copyright to 2007.
5229 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
5231 * bootstrap: Remove occurrences of .#bootmp from the files.
5233 2007-01-17 Akim Demaille <akim@epita.fr>
5235 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5237 Use per-type %printer.
5239 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5241 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5242 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5243 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5244 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5245 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5246 tests/glr-regression.at, tests/input.at, tests/local.at,
5247 tests/output.at, tests/torture.at: Update copyright to 2007.
5249 2007-01-16 Akim Demaille <akim@epita.fr>
5251 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5253 (Calc++ Scanner): Exit with failure if we can't open the input
5255 Accept "-" standing for stdin.
5256 (Calc++ Top Level): Print the result only if the parsing was
5259 2007-01-16 Akim Demaille <akim@epita.fr>
5261 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5263 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
5264 and Joel E. Denny <jdenny@ces.clemson.edu>
5266 Clean up %define and %code implementation in M4 some. Most
5267 importantly, rename all related macros to be in the b4_percent_define
5268 and b4_percent_code namespaces. Also, complete support for `.' in
5269 %define variable names and %code qualifiers.
5270 * data/bison.m4 (b4_check_user_names): Check for special
5271 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5273 (b4_get_percent_define, b4_get_percent_code): Rename to...
5274 (b4_percent_define_get, b4_percent_code_get): ... these.
5275 Extend documentation with examples.
5276 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5277 b4_percent_define_skeleton_variables and
5278 b4_percent_code_skeleton_qualifiers.
5279 Expect any value for the %define variable `foo' to be stored in the
5280 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5281 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5282 expect any unqualified %code blocks to be stored in a macro named
5283 `b4_percent_code_unqualified'.
5284 Use m4_indir so that %define variable names and %code qualifiers can
5285 contain `.', which is allowed by the grammar parser.
5286 (b4_percent_define_default): New macro to set a default value for a
5288 (m4_wrap): Update wrapped code, and fix some underquoting.
5289 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5290 Expect grammar uses of %define variables and %code qualifiers to be
5291 defined in b4_percent_define_user_variables and
5292 b4_percent_code_user_qualifiers.
5293 * data/c++.m4: Use b4_percent_define_default rather than
5294 m4_define_default. Fix some underquoting. Skeleton usage of %define
5295 variable define_location_comparison now implies skeleton usage of
5296 %define variable filename_type.
5297 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5298 data/push.c, data/yacc.c: Update macro names.
5299 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5302 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5304 DJGPP specific issues.
5306 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5307 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5309 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5311 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5312 run parsers in all tests so that Valgrind is invoked during
5313 maintainer-check-valgrind.
5314 (Duplicate representation of merged trees): Free all semantic values.
5315 (Duplicated user destructor for lookahead): Likewise.
5317 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5319 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5320 command-line prefix.
5321 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5322 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5323 miss Valgrind messages.
5324 (Exploding the Stack Size with Malloc): Likewise.
5326 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5328 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5329 locals. Reported by Juan Manuel Guerrero at
5330 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5331 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5332 Fix some indentation also.
5333 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5334 explaining this issue.
5336 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
5337 and Joel E. Denny <jdenny@ces.clemson.edu>
5339 Simplify union and prologue handling, and escape union and lex/parse
5340 params with digraphs.
5341 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5342 values to the empty string since these are no longer guaranteed
5343 initialized by the front-end.
5344 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5345 braces around b4_user_stype since this is no longer done by the
5347 * src/files.c, src/files.h (pre_prologue_obstack,
5348 post_prologue_obstack): Remove.
5349 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5350 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5351 with digraphs. This fixes lex params and parse params.
5352 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5353 * src/output.c (prepare): Remove muscle insertion of the prologues.
5354 (output): Remove freeing of pre_prologue_obstack and
5355 post_prologue_obstack.
5356 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5357 than prologue_augment for prologue parsing so you don't need prologue
5359 (grammar_declaration): For %union RHS, use `braceless' instead of
5360 "{...}" so that braces are already stripped and code is escaped with
5362 * src/reader.c (prologue_augment): Remove.
5363 (reader): Remove initialization of pre_prologue_obstack and
5364 post_prologue_obstack.
5365 * src/reader.h (prologue_augment): Remove.
5367 * data/c.m4: Remove stray parenthesis.
5369 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5371 Remove quotes from variables names in %define directives and from
5372 qualifiers in %code directives, and restrict the characters that are
5373 allowed in them to M4-friendly ones. For %define, continue to support
5374 the quoted form as a deprecated feature. Discussed starting at
5375 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5376 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5378 * doc/bison.texinfo (Prologue Alternatives): Update.
5379 (Decl Summary): In %defines entry, update mention of `%code requires'
5380 and `%code provides'.
5381 (C++ Location Values): Update %define uses.
5382 (Calc++ Parser Interface): Likewise.
5383 (Calc++ Parser): Likewise, and update `%code requires' uses.
5384 (Table of Symbols): Update %code documentation.
5385 * src/parse-gram.y (prologue_declaration): For %define variables, use
5386 `variable' instead of `STRING'.
5387 (grammar_declaration): For %code qualifiers, use `ID' instead of
5389 (variable): New nonterminal that takes an `ID' or a `STRING'.
5390 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5392 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5393 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5394 (%define errors): Update %define uses.
5396 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5398 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5399 instead of muscle_insert for %define values so that M4-special
5400 characters are replaced with digraphs.
5401 * tests/input.at (%define errors): Extend to check weird values.
5403 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5405 Instead of having skeletons declare all valid %define variables and
5406 %code qualifiers, provide macros that retrieve the associated values
5407 and build these lists automatically. Thus Bison will now warn when a
5408 variable or qualifier is not used by the skeleton in the current
5409 invocation regardless of whether it might sometimes be used by that
5410 skeleton in other invocations. Also, move all %define value macros to
5411 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5412 form, which is replaced by %code.
5413 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5414 (b4_check_user_names): ... this, and change the series of valid name
5415 arguments to a single list argument for names used in the skeleton
5416 similar to the existing list argument for names used in the grammar.
5417 Warn instead of complaining.
5418 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5419 values and %code code, to format %code code properly, and to build
5420 lists of all %define variables and %code qualifiers used in the
5421 skeleton: b4_skeleton_percent_define_variables and
5422 b4_skeleton_percent_code_qualifiers.
5423 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5425 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5426 the skeleton names lists can finish building first. In place of
5427 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5428 expect the lists b4_user_percent_define_variables and
5429 b4_user_percent_code_qualifiers.
5430 * data/c++.m4: Where setting default values for b4_parser_class_name,
5431 b4_location_type, b4_filename_type, b4_namespace, and
5432 b4_define_location_comparison, update their names to the
5433 b4_percent_define_ namespace.
5434 * data/glr.c: Don't use b4_check_percent_define_variables and
5435 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5436 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5437 (b4_parser_class_name, b4_namespace): Define these using
5438 b4_get_percent_define for parser_class_name and namespace.
5439 * data/location.cc: Use b4_get_percent_define.
5440 * data/push.c: Don't use b4_check_percent_define_variables and
5441 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5442 * data/yacc.c: Likewise, and don't call m4_exit in
5443 b4_use_push_for_pull_if or m4_wrap code will never execute.
5444 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5446 (muscle_grow_user_name_list): ... this for consistency with the
5447 terminology used in bison.m4.
5448 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5449 %define variable names, and rename muscle used_percent_define_variables
5450 to user_percent_define_variables.
5451 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5452 user_percent_code_qualifiers.
5454 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5455 {CODE} form is no longer accepted.
5456 * tests/input.at (Reject bad %code qualifiers): Rename to...
5457 (Reject unused %code qualifiers): ... this, and update test output.
5458 (%define error): Update test output.
5460 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5462 Check for unrecognized %define variables similar to checking for
5463 unrecognized %code qualifiers. Check for redefined %define variables.
5464 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5466 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5467 (b4_check_percent_define_variables): New, also wraps it.
5468 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5469 variables using b4_check_percent_define_variables.
5470 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5471 all those exercised in the test suite and all those listed in the
5472 `Default values' section of c++.m4. Are there others?
5473 * data/push.c, data/yacc.c: Declare no valid %define variables.
5474 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5475 similar to muscle_find, but it works even when the muscle stores a
5477 (muscle_grow_used_name_list): New function for constructing the used
5478 name list muscles that b4_check_for_unrecognized_names requires.
5479 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5480 %define'd more than once. Define the b4_used_percent_define_variables
5481 muscle with muscle_grow_used_name_list.
5482 (grammar_declaration): Abbreviate %code code with
5483 muscle_grow_used_name_list.
5484 * tests/input.at (%define errors): New.
5486 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5488 Provide warn_at, complain_at, and fatal_at function callbacks to the
5489 skeletons, and use this for %code qualifier complaints.
5490 * data/bison.m4 (b4_error_at): New, invoked by...
5491 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5492 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5493 @fatal_at(...@) directives.
5494 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5495 qualifiers in b4_used_percent_code_qualifiers and to use
5497 * src/location.c, src/location.h (boundary_set_from_string): New global
5499 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5501 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5502 to b4_used_percent_code_qualifiers.
5503 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5505 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5506 (lineno): Rename to...
5507 (out_lineno): ... this so I don't misunderstand it again.
5508 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5509 here; these newlines are in the input but not the output file.
5510 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5511 (at_directive_perform): ... this new static function, and add handling
5512 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5514 * tests/input.at (Reject bad %code qualifiers): Update test output with
5515 locations and extend.
5517 * tests/output.at (Output file name: [, Output file name: ]): Remove
5518 bogus comment about these tests failing.
5520 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5522 Clean up b4_check_percent_code_qualifiers a little.
5523 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5524 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5525 documentation and add examples.
5526 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5529 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5531 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5532 unreliable -- especially when they're hidden inside another macro.
5533 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5534 data/c.m4: Remove m4_divert(-1).
5535 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5536 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5537 m4_divert_push(0) and m4_divert_pop(0).
5538 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5539 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5540 pushed and popped by m4sugar, should be first on the stack.
5542 Provide warn, complain, and fatal function callbacks to the skeletons.
5543 This provides more flexibility than m4_fatal, improves the error
5544 message format, and captures messages for translation. Discussed
5546 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5547 * data/bison.m4 (b4_error): New, invoked by...
5548 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5549 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5550 directives. Because these M4 macros might be called when the current
5551 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5552 the previous removal of uses of m4_divert, which caused trouble.
5553 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5554 m4_fatal to report unrecognized %code qualifiers.
5555 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5556 push parser requests.
5557 * data/glr.c: Use b4_complain instead of m4_fatal to report
5558 non-deterministic push parser requests.
5559 Update @output usage to @output(...@) form.
5560 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5561 report missing %defines. Update @output usage to @output(...@) form.
5562 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5564 * src/main.c (main): Invoke skel_scanner_free.
5565 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5566 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5567 obstack_for_string from flex-scanner.h.
5568 (YY_DECL): Use to declare skel_lex static.
5569 (decode_at_digraphs): Remove; now handled in the new
5570 SC_AT_DIRECTIVE_ARG start condition.
5571 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5573 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5574 at_directive_argv): New static globals.
5575 (INITIAL): Use fail_for_invalid_at.
5576 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5577 recognize the start of a generalized `@directive(...@)' form and
5579 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5580 directive args (using the new obstack_for_string), to decode the
5581 contained @ diagraphs, and to perform the directive. It recognizes
5582 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5584 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5585 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5587 (scan_skel): Initialize obstack_for_string on the first call.
5588 (skel_scanner_free): New function to free obstack_for_string.
5589 * tests/input.at (Reject bad %code qualifiers): Update test output.
5591 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5593 Consolidate the 4 prologue alternative directives (%code, %requires,
5594 %provides, and %code-top) into a single %code directive with an
5595 optional qualifier field. Discussed at
5596 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5597 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5599 * doc/bison.texinfo (Prologue Alternatives): Update.
5600 (Decl Summary): Update to %code "requires" and %code "provides".
5601 (Calc++ Parser): Update to %code "requires".
5602 (Table of Symbols): Remove entries for %requires, %provides, and
5603 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5604 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5605 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5606 which are skeleton-specific.
5607 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5608 declare what %code qualifiers it supports and to complain if any other
5609 qualifiers were used in the grammar.
5610 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5611 and b4_user_code([b4_percent_code_provides]) in place of
5612 b4_user_requires and b4_user_provides.
5613 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5614 Add b4_user_code([b4_percent_code_top]) and
5615 b4_user_code([b4_percent_code]).
5616 Invoke b4_check_percent_code_qualifiers.
5617 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5618 PERCENT_REQUIRES): Remove.
5619 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5620 %requires. Rewrite the %code RHS as the unqualified form defining the
5621 muscle b4_percent_code. Add another RHS for the qualified %code form,
5622 which defines muscles of the form b4_percent_code_QUALIFIER and the
5623 b4_used_percent_code_qualifiers muscle.
5624 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5625 PERCENT_REQUIRES): Remove.
5626 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5627 %code "requires" and %code "provides".
5628 * tests/input.at (Reject bad %code qualifiers): New.
5630 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5632 Use the new code_props interface for destructors and printers.
5633 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5634 printer_location members, and change the type of the destructor and
5635 printer members to code_props.
5636 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5637 symbol_printer_get, semantic_type_destructor_set,
5638 semantic_type_printer_set, default_tagged_destructor_set,
5639 default_tagless_destructor_set, default_tagged_printer_set,
5640 default_tagless_printer_set): Use code_props in arguments and return
5641 types in place of char const * and location.
5642 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5643 since the locations are now contained in the return of
5644 symbol_destructor_get and symbol_printer_get.
5645 * src/output.c (symbol_destructors_output, symbol_printers_output):
5647 (symbol_code_props_output): ... this to eliminate duplicate code.
5648 (output_skeleton): Update to use symbol_code_props_output.
5649 * src/reader.c (symbol_should_be_used): Update use of
5650 symbol_destructor_get.
5651 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5652 Update uses of the various _destructor_set and _printer_set functions.
5653 * src/symtab.c: (default_tagged_destructor_location,
5654 default_tagless_destructor_location, default_tagged_printer_location,
5655 default_tagless_printer_location): Remove since we...
5656 (default_tagged_destructor, default_tagless_destructor,
5657 default_tagged_printer, default_tagless_printer): ... change the type
5658 of these to code_props.
5659 (symbol_new, semantic_type_new, symbol_destructor_set,
5660 semantic_type_destructor_set, symbol_destructor_get,
5661 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5662 symbol_check_alias_consistency, default_tagged_destructor_set,
5663 default_tagless_destructor_set, default_tagged_printer_set,
5664 default_tagless_printer_set): Update.
5665 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5666 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5668 (symbol_print): Use SYMBOL_CODE_PRINT.
5670 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5672 Use the new code_props interface for rule actions.
5673 * src/symlist.h (symbol_list): Replace action, action_location, and
5674 used members with a code_props action_props member.
5675 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5676 grammar_midrule_action, grammar_current_rule_merge_set,
5677 grammar_current_rule_symbol_append, packgram): Update.
5678 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5679 * src/scan-code.l (handle_action_dollar): Update.
5680 (translate_rule_action): Remove, no longer used.
5681 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5683 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5685 Use the new code_props interface in parse-gram.y.
5686 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5687 Update all uses of translate_* functions to use the new code_props
5688 interface and to use gram_scanner_last_string_free and
5689 code_scanner_last_string_free where possible.
5690 (grammar_declaration): symbol_list_destructor_set and
5691 symbol_list_printer_set now perform the translation, so don't do it
5692 here. Use gram_scanner_last_string_free where possible.
5693 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5694 translate_code): Remove, no longer used.
5695 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5696 symbol_list_printer_set): Perform code translation here rather than
5697 depending on the caller to do so.
5699 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5700 * src/scan-gram.h (gram_last_string): Remove declaration.
5701 * src/scan-gram.l (last_string): Declare it static.
5703 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5705 Encapsulate code properties and related functionality for the various
5706 destructors, printers, and actions into a code_props structure and
5707 interface. This patch merely implements code_props in scan-code.h and
5708 scan-code.l. Future patches will rewrite other modules to use it.
5709 Discussed starting at
5710 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5711 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5712 consistently initialize const structs that have an empty location
5714 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5715 to ensure consistency.
5716 * src/scan-code.h (code_props): New structure.
5717 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5718 function, macro, and const global variable for initializing a
5719 code_props with no code.
5720 (code_props_plain_init, code_props_symbol_action_init,
5721 code_props_rule_action_init, code_props_translate_code): The rest of
5722 the new code_props functional interface. Among other things, the init
5723 functions set the code_props kind field so that
5724 code_props_translate_code will know whether to behave like
5725 translate_symbol_action, translate_rule_action, or translate_code.
5726 These old translate functions must remain until all other modules are
5727 updated to use the new code_props interface.
5728 (code_scanner_last_string_free): New function similar to
5729 gram_scanner_last_string_free.
5730 (code_scanner_free): Add documentation.
5731 * src/scan-code.l: Implement the new interface.
5732 (code_lex): Make it static, add a code_props* argument, and remove the
5734 (last_string): New static global similar to the one in scan-gram.l.
5735 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5737 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5738 code_props since Bison may one day use this information for destructors
5740 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5741 (handle_action_dollar): Use symbol_list_n_get and set used flag
5742 directly since symbol_list_n_used_set is removed.
5743 (translate_action): Add a code_props* argument and remove the rule,
5744 action, and location arguments. Pass the code_props* on to code_lex.
5745 (translate_rule_action, translate_symbol_action, translate_code):
5746 Rewrite as wrappers around the new code_props interface.
5747 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5748 it would eventually need to break the encapsulation of code_props.
5750 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5752 * etc/.cvsignore: New.
5754 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5756 Add maintainer-push-check to run maintainer-check using push parsing in
5757 place of pull parsing where available.
5758 * Makefile.am (maintainer-push-check): New.
5759 * data/bison.m4 (b4_use_push_for_pull_if): New.
5760 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5761 appropriately based on their existing values.
5762 (yypush_parse): Don't print push-parser-specific diagnostics if push
5763 parsing is being used in place of pull parsing.
5764 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5766 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5767 variable, and insert b4_use_push_for_pull_flag into muscles.
5768 * tests/Makefile.am (maintainer-push-check): New.
5770 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5772 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5773 (whether successful or failed) so that yypush_parse can be invoked
5774 again to start a new parse using the same yypstate.
5775 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5776 check multiple yypull_parse invocations on the same yypstate. For pull
5777 mode, extend to check multiple yyparse invocations.
5778 (Exploding the Stack Size with Alloca): Extend to try with
5780 (Exploding the Stack Size with Malloc): Likewise.
5782 * tests/calc.at (Simple LALR Calculator): Don't specify
5783 %skeleton "push.c" since %push-pull-parser implies that now.
5784 * tests/headers.at (export YYLTYPE): Don't check for the push
5785 declarations. Otherwise, this test case can't be used to see if push
5786 mode can truly emulate pull mode.
5787 * tests/input.at (Torturing the Scanner): Likewise.
5788 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5789 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5790 AT_YACC_IF, which now includes the case of push mode since %skeleton
5791 need not be used for push mode. This will be more intuitive once
5792 push.c is renamed to yacc.c.
5794 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5796 For push mode, convert yyparse from a macro to a function, invoke yylex
5797 instead of passing a yylexp argument to yypull_parse, and don't
5798 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5799 Discussed starting at
5800 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5801 * data/bison.m4 (b4_pull_if): New.
5802 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5803 * data/push.c: Improve M4 quoting a little.
5804 (b4_generate_macro_args, b4_parenthesize): Remove.
5805 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5806 any time a pull parser is requested.
5807 Don't #define this as a wrapper around yypull_parse. Instead, when
5808 both push and pull are requested, make it a function that does that
5810 (yypull_parse): If there's a b4_prefix, #define this to
5811 b4_prefix[pull_parse] when both push and pull are requested.
5812 Don't define this as a function unless both push and pull are
5814 Remove the yylexp argument and hard-code yylex invocation instead.
5815 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5817 * src/getargs.c (pull_parser): New global initialized to true.
5818 * getargs.h (pull_parser): extern it.
5819 * src/output.c (prepare): Insert pull_flag muscle.
5820 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5821 (prologue_declaration): Set both push_parser and pull_parser = true for
5822 %push-pull-parser. Set push_parser = true and pull_parser = false for
5824 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5825 %push-parser since there's no backward-compatibility concern here.
5826 Scan %push-pull-parser.
5827 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5828 instead of %push-parser.
5829 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5830 prototype it in the module that calls yyparse.
5831 * tests/input.at (Torturing the Scanner): Likewise.
5832 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5834 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5836 Update etc/bench.pl. Optimize push mode a little (the yyn change
5837 deserves most of the credit).
5838 * Makefile.am (SUBDIRS): Add etc subdirectory.
5839 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5840 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5841 yytoken, yyval, and yyloc declarations to...
5842 (yyparse or yypush_parse): ... here to improve performance. For
5843 yypush_parse invocations after the first, be sure to assign yyn its old
5845 (yypstate_new): Don't bother initializing the yyresult field since the
5846 initial value isn't used.
5847 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5848 remove the #define that, in push mode, set it to yyps->NAME.
5849 * etc/Makefile.am: New.
5850 * etc/bench.pl: Remove and build it instead from...
5851 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5852 "tests/bison" from the build directory by default rather than just
5853 invoking "bison" from $PATH.
5854 (calc_grammar): Update push parser code: don't declare yylval globally,
5855 don't define yyparse_wrapper, and don't #define yyparse.
5856 (bench_grammar): Update to check all working combinations of yacc.c,
5857 push.c, impure, pure, pull, and push.
5859 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5861 For push mode, add pull wrappers around yypush_parse.
5862 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5863 (yypull_parse): New function wrapping yypush_parse.
5864 (yyparse): New #define wrapping yypull_parse.
5865 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5867 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5868 prototype yylex in the module that calls yyparse, and don't prototype
5869 yyparse there. Otherwise, the yyparse expansion won't compile.
5870 * tests/input.at (Torturing the Scanner): Likewise.
5872 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5874 Enable push parsers to operate in impure mode. Thus, %push-parser no
5875 longer implies %pure-parser. The point of this change is to move
5876 towards being able to test the push parser code by running the entire
5877 test suite as if %push-parser had been declared.
5878 * data/push.c (yypush_parse): For impure mode, remove the
5879 yypushed_char, yypushed_val, and yypushed_loc arguments.
5880 Instead, declare these as local variables initialized to the global
5881 yychar, yylval, and yylloc.
5882 For the first yypush_parse invocation only, restore the initial values
5883 of these global variables when it's time to read a token since they
5884 have been overwritten.
5885 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5887 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5888 %pure-parser along with %push-parser since this test case was designed
5889 for pure push parsers.
5890 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5891 (AT_YACC_OR_PUSH_IF): New.
5892 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5893 add a note that it's still wrong for some cases (as it has been for a
5895 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5896 %push-parser no longer implies %pure-parser.
5898 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5900 Remove some unnecessary differences between the pull parser code and
5901 the push parser code. This patch enables yynerrs in push mode.
5902 * data/push.c: Reformat M4 a little.
5903 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5904 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5905 because push mode is on. Instead, if pure mode is on, move yynerrs
5907 (b4_declare_parser_state_variables): ... here.
5908 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5909 to yyps->NAME so it can be used in yypush_parse.
5910 (yypush_parse): Don't omit uses of yynerrs in push mode.
5912 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5914 Fix bug such that the first pushed token's value and location are
5915 sometimes overwritten (sometimes by %initial-action) before being used.
5916 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5917 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5918 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5919 more closely mimic the pull parser logic.
5920 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5921 time to read a token, which is after any initialization of yylval and
5923 (gottoken): Rename label to...
5924 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5927 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5929 Rearrange initialization of the parser state variables so that the
5930 skeleton doesn't have to have a copy for pull mode and another for push
5931 mode. This patch also fixes at least a bug such that yylloc was not
5932 initialized (with b4_location_initial_line and
5933 b4_location_initial_column) upon calling yypush_parse. However, that
5934 initialization now overwrites the first token's location;
5935 %initial-action assigning @$ already did the same thing, and both bugs
5936 will be fixed in a later patch.
5937 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5938 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5939 yyss, yyvs, yyls, and yystacksize.
5940 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5941 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5943 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5944 yyps->NAME so it can be used in yypush_parse.
5945 (yyparse or yypush_parse): For yypush_parse, don't print the
5946 "Starting parse" diagnostic for invocations after the first.
5947 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5948 yypush_parse, only do it for the first invocation.
5949 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5950 initialization to occur in yypush_parse but only on the first
5953 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5955 * data/push.c: Add CPP guards around push parser declarations in both
5956 the header and the code file.
5957 In the code file, move the push parser declarations to the same place
5958 they appear in the header file.
5959 Clean up the M4 some, especially the inconsistent underquoting in
5960 some b4_c_function_def and b4_c_function_decl uses.
5962 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5964 Encapsulate the push parser state variables into an M4 macro so the
5965 push skeleton doesn't have to list them again for pull mode's yyparse.
5966 For push mode, remove yypush_parse's local equivalents of these
5967 variables to eliminate unnecessary copying between the two sets at
5968 run-time. This patch also fixes at least a bug related to multiple
5969 %initial-action invocations in push mode.
5970 * data/push.c (b4_declare_parser_variables): Rename to...
5971 (b4_declare_scanner_communication_variables): ... this for clarity and
5973 (b4_declare_yyparse_variables): Remove and move its contents to the one
5974 spot where it was invoked.
5975 (b4_declare_parser_state_variables): New macro containing the parser
5976 state variables required by push mode.
5977 (struct yypstate): Replace all fields but yynew with
5978 b4_declare_parser_state_variables.
5979 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5980 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5981 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5982 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5983 parser state variable declarations with
5984 b4_declare_parser_state_variables.
5985 Don't initialize parser state variables when calling yypush_parse since
5986 yypstate_new already does that.
5987 Invoke the user's initial action only upon the first yypush_parse
5989 Remove all code that copies between the local parser state variables
5992 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5994 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5995 prevent a name collision in a future patch where these names will
5996 sometimes be #define'd.
5997 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5998 since it no longer has the same name as the existing argument.
5999 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
6001 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
6002 and Joel E. Denny <jdenny@ces.clemson.edu>
6004 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6005 that the argument is case-insensitive, and there's no `=' here.
6006 For the %skeleton entry, mention that %language is better.
6007 (Bison Options): Likewise for --language and --skeleton. Move the
6008 --skeleton entry so that the `Tuning the parser' section is sorted
6009 alphabetically on long options.
6010 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
6011 %language directive in detail here; cross-reference the %language
6012 documentation instead.
6013 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6014 `%require "2.3b"' so that the example is always up-to-date.
6015 (Table of Symbols): Add entries for %language and %skeleton.
6016 * examples/extexi (normalize): Instead of replacing every %require
6017 argument with the current Bison version, just substitute for
6018 `@value{VERSION}'. This guarantees that we're testing what actually
6019 appears in the documentation.
6020 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6021 rather than `@VERSION@'.
6023 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6025 * NEWS: Reword the %language news a bit, and put it earlier.
6027 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6028 Rewrite to simplify the logic.
6029 (language_argmatch): Likewise.
6030 (program_name): We now own this var.
6031 * src/getargs.h (struct bison_language): Use char[] rather than
6034 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6036 * src/complain.c (program_name): Remove decl; no longer needed.
6037 * src/main.c (program_name): Remove; now belongs to getargs.
6039 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
6041 * NEWS: Document %language.
6043 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6045 * data/c-skel.m4, data/c++-skel.m4: New files.
6046 * data/glr.c: Complain on push parsers.
6048 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6050 (Decl Summary): Document %language and %skeleton.
6051 (Command line): Document -L.
6053 * examples/extexi: Rewrite %require directive.
6054 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6056 * src/files.c (compute_exts_from_gc): Look in language structure
6058 (compute_file_name_parts): Check whether .tab should be added.
6059 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6060 (language, skeleton_arg, language_argmatch): New.
6061 (long_options): Add --language.
6062 (getargs): Use skeleton_arg, add -L/--language.
6063 * src/getargs.h: Include location.h.
6064 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6065 * src/output.c (prepare): Pick default skeleton from struct language.
6066 Don't dispatch C skeletons here.
6067 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6068 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6069 * src/scan-gram.l ("%language"): New rule.
6071 * tests/calc.at: Test %skeleton and %language.
6072 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6073 (AT_GLR_IF): Look for %skeleton "glr.cc".
6074 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6075 (AT_YACC_IF): Reject %language.
6077 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6079 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6080 since it wasn't used; only the typedef name 'semantic_type' is needed.
6081 Also, omit trailing white space.
6083 * bootstrap: Sync from coreutils.
6084 (gnulib_extra_files): Add build-aux/announce.gen.
6085 (slurp): Adjust .gitignore files like .cvsignore files.
6086 * build-aux/announce-gen: Remove from CVS, since bootstrap
6089 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6091 Make %push-parser imply %pure-parser. This fixes several bugs; see
6092 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6093 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6095 * data/push.c: Don't bother testing b4_push_if when deciding whether
6096 to expand b4_declare_parser_variables globally.
6097 (yypush_parse): Likewise in here.
6099 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6100 (yy_reduce_print): Reformat M4 for readability.
6102 2006-12-15 Bob Rossi <bob@brasko.net>
6103 and Joel Denny <jdenny@ces.clemson.edu>
6105 * data/push.c (yypstate): Add typedef, and update all uses of
6106 struct yypstate to just yypstate.
6107 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6109 2006-12-14 Bob Rossi <bob@brasko.net>
6111 * data/push.c (yypush_parse): Declare prototype regardless of
6114 2006-12-14 Bob Rossi <bob@brasko.net>
6116 * data/push.c (yyparse): Remove the prototype and the #define when in
6119 2006-12-13 Bob Rossi <bob@brasko.net>
6121 * data/push.c (yypstate_init): Rename to...
6122 (yypstate_new): ... this and use b4_c_function_def.
6123 (yypstate_delete): New.
6124 (yypush_parse): Change parameters yynval and yynlloc to be const.
6125 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6126 yypstate_delete functions.
6128 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6130 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6131 strange test case titles. Reported by Bob Rossi.
6133 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6135 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6136 of potential ambiguities in GLR grammers.
6138 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6140 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6141 `bison ', use m4_index instead of m4_substr since chopping up a string
6142 containing M4-special characters causes problems here.
6144 Fix a couple of bugs related to special characters in user-specified
6145 file names, and make it easier for skeletons to compute output file
6146 names with the same file name prefix as Bison-computed output file
6148 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6149 b4_parser_file_name and b4_spec_defines_file instead of
6150 @output_parser_name@ and @output_header_name@, which are now redundant.
6151 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6152 b4_parser_file_name, b4_spec_defines_file, and the new
6153 @basename(FILENAME@) instead of @output_parser_name@ and
6154 @output_header_name@, which inappropriately escaped the file names as
6156 * src/files.c (all_but_ext): Remove static qualifier.
6157 (compute_output_file_names): Move `free (all_but_ext)' to...
6158 (output_file_names_free): ... here since all_but_ext is needed later.
6159 * src/files.h (all_but_ext): Extern.
6160 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6161 exactly what MUSCLE_INSERT_STRING used to do.
6162 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6163 characters are escaped properly.
6164 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6166 For pkgdatadir muscle, maintain previous functionality by using
6167 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6168 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6169 digraphs would never be expanded. Hopefully no one has M4-special
6170 characters in his Bison installation path.
6171 * src/scan-skel.l: Don't parse @output_header_name@ and
6172 @output_parser_name@ anymore since they're now redundant.
6173 In @output, use decode_at_digraphs.
6174 Parse a new @basename command that invokes last_component.
6175 (decode_at_digraphs): New.
6176 (BASE_QPUTS): Remove unused.
6177 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6178 (Output file name): New tests.
6180 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6182 Warn about output files that are generated by the skeletons and that
6183 conflict with other output files.
6184 * data/glr.c: Don't generate the header file here when glr.cc does.
6185 * src/files.c (file_names, file_names_count): New static globals.
6186 (compute_output_file_names): Invoke output_file_name_check for files
6187 not generated by the skeletons and remove existing checks.
6188 (output_file_name_check): New function that warns about conflicting
6190 (output_file_names_free): Free file_names.
6191 * src/files.h (output_file_name_check): Declare.
6192 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6194 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6195 (Conflicting output files): New tests.
6197 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6199 * doc/bison.texinfo: Fix a couple of typos.
6201 2006-12-08 Bob Rossi <bob@brasko.net>
6203 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6205 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6207 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6208 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6210 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6211 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6213 2006-12-07 Bob Rossi <bob@brasko.net>
6214 and Joel Denny <jdenny@ces.clemson.edu>
6216 * data/push.c (yypvarsinit): Change return type from void* to struct
6217 yypvars*. No longer cast to void* on return.
6218 (struct yypvars): Remove yylen since it need not be remembered between
6219 yypushparse invocations.
6220 (yypushparse): Don't copy between yylen and pv->yylen.
6222 2006-12-05 Bob Rossi <bob@brasko.net>
6224 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6225 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6226 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6227 (struct yypvars): Remove b4_declare_parser_variables.
6228 (yypvarsinit): Remove init code for removed variables.
6229 (global scope): Do not declare b4_declare_parser_variables if
6231 (yypushparse): Add b4_declare_parser_variables.
6232 Init new local variables, and remove init code for removed
6235 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6236 and yyparse for other modes.
6237 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6238 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6239 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6240 (AT_PURE_LEX_IF): True if pure or push parser.
6242 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6244 Document Yacc prologue alternatives and default %destructor's and
6245 %printer's as experimental. Don't mention Java yet. Discussed at
6246 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6247 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6248 (2.3a): Annotate this entry to say the old forms of these features were
6250 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
6251 Table of Symbols): Say they're experimental. Comment out any mention
6252 of Java (we'll want this back eventually).
6254 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6256 Support a file name argument to %defines. Deprecate `=' in
6257 %file-prefix, %name-prefix, and %output. Discussed at
6258 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6259 * NEWS (2.3a+): Mention.
6260 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
6261 form of %defines, and remove `=' from entries for %file-prefix,
6262 %name-prefix, and %output.
6263 * src/parse-gram.y (prologue_declaration): Implement.
6264 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6265 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6266 all but one occurrence of %name-prefix.
6267 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6268 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6269 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6270 occurrence of each of %file-prefix and %output. Add check for %defines
6272 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6273 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6274 Remove the `=' from %output.
6276 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6278 Don't escape $ in test case titles since Autoconf 2.61 now does that
6280 * tests/actions.at (Default %printer and %destructor are not for error
6281 or $undefined): Here.
6282 (Default %printer and %destructor are not for $accept): Here.
6283 * tests/input.at (Invalid $n and @n): Here.
6285 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6287 Rename <!> to <>. Discussed starting at
6288 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6289 * NEWS (2.3a+): Update.
6290 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
6292 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6293 * src/scan-gram.l (INITIAL): Implement.
6294 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6295 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6297 * tests/actions.at (Default tagless %printer and %destructor,
6298 Default tagged and per-type %printer and %destructor,
6299 Default %printer and %destructor are not for error or $undefined,
6300 Default %printer and %destructor are not for $accept,
6301 Default %printer and %destructor for mid-rule values): Update.
6302 * tests/input.at (Default %printer and %destructor redeclared,
6303 Unused values with default %destructor): Update.
6305 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6307 Don't let %prec take a nonterminal.
6308 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6310 * tests/input.at (%prec takes a token): New test checking that %prec
6311 won't take a nonterminal.
6313 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6315 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6316 it was double-quoted.
6317 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6318 grammar is maintained with Bison's highest standards.
6319 * src/getargs.c: Fix some typos in Doxygen comments.
6321 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6323 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6324 later. Reported by Paul Eggert in
6325 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6326 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6327 * src/scan-code.l (translate_action): Don't bother invoking
6328 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6329 (code_scanner_free): Instead of invoking
6330 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6332 * src/scan-gram.l (gram_scanner_free): Likewise.
6333 * src/scan-skel.l (scan_skel): Likewise.
6335 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6337 * src/files.c (tr): Change return type to void.
6338 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6339 has been called previously for the same key.
6340 (muscle_find): Return storage instead of value so that
6341 --enable-gcc-warnings doesn't produce warnings that the return discards
6342 const. aver that the value and storage are the same since storage
6343 could potentially be NULL when value is not.
6344 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6347 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6349 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6350 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6351 us a slightly cleaner distribution, and also works.
6352 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6355 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6356 and Paul Eggert <eggert@cs.ucla.edu>
6358 Don't let Bison leak memory except when it complains.
6359 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6360 (spec_defines_file, dir_prefix): Now char *, not const char *,
6361 since they are freed.
6362 * src/files.c: Likewise.
6363 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6365 (tr): Now operates in-place. All uses changed.
6366 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6368 (compute_file_name_parts, compute_output_file_names): Don't store
6369 read-only data in variables that will be freed.
6370 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6371 src_extension, and header_extension.
6372 (output_file_names_free): New public function to free
6373 spec_verbose_file, spec_graph_file, spec_defines_file,
6374 parser_file_name, and dir_prefix.
6375 * src/getargs.c (getargs): Don't store read-only data in variables that
6377 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6378 (which previously existed but was unused), and quotearg_free.
6379 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6380 * src/muscle_tab.c: Likewise.
6381 (muscle_entry): Make the value char const *,
6382 and add a new storage member that is char * and can be freed.
6383 (muscle_entry_free): New private function.
6384 (muscle_init): Use it instead of free.
6385 (muscle_insert, muscle_grow): Update and use new storage member.
6386 (muscle_code_grow): Free the string passed to muscle_grow
6387 since it's not needed anymore.
6388 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6389 add a new `char *code' member.
6390 ("{...}"): Declare semantic type as code.
6391 * src/scan-code.h (translate_rule_action):
6392 (translate_symbol_action, translate_code, translate_action): Return
6393 `char const *' rather than `char *' since external code should not free
6395 * src/scan-code.l: Likewise.
6396 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6397 which is "{...}" in the parser.
6398 * tests/Makefile.am (maintainer-check-valgrind): Set
6399 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6401 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6403 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6404 expecting a non-zero exit status sets --leak-check=summary and
6405 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6406 this case, and we don't want to hear about it.
6408 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6410 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6411 instead of from the template, to simplify configuration a bit.
6412 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6413 and m4/wint_t.m4, as they are needed with the latest gnulib.
6415 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6417 Disable unset/unused mid-rule value warnings by default, and recognize
6418 --warnings=midrule-values to enable them. Discussed starting at
6419 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6420 * NEWS (2.3a+): Mention.
6421 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6422 warnings): Add entry for midrule-values subargument.
6423 * src/reader.c (symbol_should_be_used): Don't return true just because
6424 the value is a set/used mid-rule value unless
6425 --warnings=midrule-values was specified.
6426 * tests/input.at (Unused values, Unused values before symbol
6427 declarations): Run tests with and without --warnings=midrule-values.
6429 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6430 than LIST_FREE directly.
6432 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6434 Finish implementing --warnings=error, which should not be implied by
6435 --warnings=all (or by its synonyms -W and --warnings without
6437 * src/complain.c (set_warning_issued): New function to report that
6438 warnings are being treated as errors and to record an error if so.
6440 (warn_at, warn): ... here.
6441 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6442 "error - warnings are errors" does not appear above "all - all of the
6444 (getargs): For -W and --warnings without subarguments, don't let
6445 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6446 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6448 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6450 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6451 empty subargument list. For example: `bison --warnings= parser.y'.
6453 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6455 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6456 the parser header file so that gcc doesn't warn.
6458 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6460 Split the default %destructor/%printer into two kinds: <*> and <!>.
6461 Discussed starting at
6462 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6463 * NEWS (2.3a+): Mention.
6464 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6465 previous change today related to mid-rules.
6466 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6467 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6468 (TYPE_TAG_ANY): Add as <*>.
6469 (TYPE_TAG_NONE): Add as <!>.
6470 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6472 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6473 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6474 * src/symlist.c (symbol_list_default_new): Split into tagged and
6476 (symbol_list_destructor_set, symbol_list_printer_set): Split
6477 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6478 SYMLIST_DEFAULT_TAGLESS.
6479 * src/symlist.h: Update symbol_list_default*_new prototypes.
6480 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6481 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6482 * src/symtab.c (default_destructor, default_destructor_location,
6483 default_printer, default_printer_location): Split each into tagged and
6485 (symbol_destructor_get, symbol_destructor_location_get,
6486 symbol_printer_get, symbol_printer_location_get): Implement tagged
6487 default and tagless default cases.
6488 (default_destructor_set, default_printer_set): Split each into tagged
6489 and tagless versions.
6490 * src/symtab.h: Update prototypes.
6491 * tests/actions.at (Default %printer and %destructor): Rename to...
6492 (Default tagless %printer and %destructor): ... this, and extend.
6493 (Per-type %printer and %destructor): Rename to...
6494 (Default tagged and per-type %printer and %destructor): ... this, and
6496 (Default %printer and %destructor for user-defined end token): Extend.
6497 (Default %printer and %destructor are not for error or $undefined):
6499 (Default %printer and %destructor are not for $accept): Update.
6500 (Default %printer and %destructor for mid-rule values): Extend.
6501 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6502 (Unused values with default %destructor): Extend.
6504 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6506 Don't apply the default %destructor/%printer to an unreferenced midrule
6508 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6509 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6510 like $@n instead of just @n so that the default %destructor/%printer
6511 logic doesn't see them as user-defined symbols.
6512 (symbol_is_dummy): Check for both forms of the name.
6513 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6514 name for which the midrule value is referenced in any action.
6515 * tests/actions.at (Default %printer and %destructor for mid-rule
6517 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6518 for change to dummy symbol names.
6520 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6522 Warn about unset midrule $$ if the corresponding $n is used.
6523 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6525 (packgram): Before invoking grammar_rule_check on any rule, make sure
6526 all actions have already been scanned in order to set `used' flags.
6527 Otherwise, checking that a midrule's $$ is set will not always work
6528 properly because the midrule check must forward-reference the midrule's
6530 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6533 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6535 More improvements to the documentation of the prologue alternatives:
6536 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6538 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6539 some text to clarify the relative importance of the new directives and
6540 to show how these directives may be viewed as code labels.
6542 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6544 Similar to the recently removed %before-header, add %code-top as the
6545 alternative to the pre-prologue. Mentioned at
6546 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6547 Also, let the prologue alternatives appear in the grammar section.
6548 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6549 (prologue_declaration): Move the existing prologue alternatives to...
6550 (grammar_declaration): ... here and add %code-top.
6551 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6553 Clean up and extend documentation for the prologue alternatives.
6554 * NEWS (2.3a+): Describe prologue alternatives.
6555 * doc/bison.texinfo (Prologue): Move discussion of prologue
6557 (Prologue Alternatives): ... this new section, and extend it to discuss
6558 all 4 directives in detail.
6559 (Table of Symbols): Clean up discussion of prologue alternatives and
6562 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6564 DJGPP specific issues.
6566 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6567 config.bat accordingly.
6568 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6569 * djgpp/config.site: Likewise.
6571 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
6573 Replace %*-header with %provides, %requires, %code. See discussion at
6574 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6576 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6577 (b4_user_start_header): Remove.
6578 * data/glr.c: Use new macros instead of b4_*start_header
6580 * data/glr.cc: Likewise.
6581 * data/lalr1.cc: Likewise.
6582 * data/push.c: Likewise.
6583 * data/yacc.c: Likewise.
6585 * doc/bison.texinfo: Remove %before-header, rename
6586 %{start,end,after}-header to %requires, %provides, %code.
6588 * src/parse-gram.y: Likewise (also rename token names accordingly).
6589 * src/scan-gram.l: Likewise.
6590 * tests/actions.at: Likewise.
6592 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6594 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6595 Problem reported by Joel E. Denny.
6597 2006-10-14 Jim Meyering <jim@meyering.net>
6599 (Sync from coreutils.)
6600 Work also when the working directory (with e.g. coreutils sources)
6601 is version controlled with git, rather than CVS.
6602 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6604 In messages and comments, say e.g., "checked-out sources",
6605 rather than "CVS sources".
6606 (version_controlled_file): New function. Work for git as well as
6607 for CVS. Don't use grep's -q option.
6608 (slurp): Call it here, in place of CVS-specific code.
6610 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6612 Fix testsuite for ./configure --enable-gcc-warnings:
6613 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6614 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6615 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6616 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6617 * test/regression.at (Diagnostic that expects two alternatives):
6620 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6622 * bootstrap.conf (gnulib_modules): Add config-h.
6623 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6624 worry about HAVE_CONFIG_H.
6625 * lib/abitset.c: Likewise.
6626 * lib/bitset.c: Likewise.
6627 * lib/bitset_stats.c: Likewise.
6628 * lib/bitsetv-print.c: Likewise.
6629 * lib/bitsetv.c: Likewise.
6630 * lib/ebitset.c: Likewise.
6631 * lib/get-errno.c: Likewise.
6632 * lib/lbitset.c: Likewise.
6633 * lib/subpipe.c: Likewise.
6634 * lib/timevar.c: Likewise.
6635 * lib/vbitset.c: Likewise.
6636 * lib/bitset.c: Include "bitset.h" first, to test interface.
6637 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6638 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6639 * lib/bitsetv.c: Include "bitsetv.h" first.
6640 * lib/get-errno.c: Include "get-errno.h" first.
6641 * m4/.cvsignore: Add config-h.m4.
6642 * tests/actions.at (Default %printer and %destructor for ...):
6643 Adjust expected line numbers in output to reflect removal of #if
6644 HAVE_CONFIG_H lines.
6645 * tests/glr-regression.at (Missed %merge type warnings when ...):
6647 * tests/regression.at (Braced code in declaration in rules section):
6649 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6650 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6651 Include <config.h> unconditionally.
6653 * bootstrap: Sync from coreutils, as follows:
6655 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6657 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6658 variable was sometimes used without being initialized. This
6659 messed up the installation of the INSTALL file in some cases.
6661 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6663 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6664 --copy. Inspired by a suggestion from Bruno Haible.
6666 2006-10-03 Jim Meyering <jim@meyering.net>
6668 * bootstrap: Undo last change to this file, since now gnulib-tool
6669 sticks with the automake default in generating dependencies.
6671 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6673 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6674 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6676 * doc/bison.1: Add copyright notice.
6678 * data/glr.c: Don't include <stdarg.h>; not used.
6680 * NEWS: The -g and --graph options now output graphs in Graphviz
6681 DOT format, not VCG format.
6682 * doc/bison.1: Likewise.
6683 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6684 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6686 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6687 * TODO: Remove Graphviz entry.
6688 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6689 remove vcg.c, vcg.h, vcg_defaults.h.
6690 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6691 * src/graphviz.c, src/graphviz.h: New files.
6692 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6693 * src/files.h: Make comment more generic.
6694 * src/main.c (main): Likewise.
6695 * src/print_graph.h: Likewise.
6696 * src/getargs.c (usage): Make usage description more generic.
6697 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6698 (static_graph, fgraph): Remove. All uses changed to pass
6699 arguments instead of sharing a static var.
6700 (print_core, print_actions, print_state, print_graph):
6701 Output graphviz format rather than VCG format.
6702 * tests/.cvsignore: Remove *.vcg; add *.dot.
6703 * tests/output.at: Expect *.dot files, not *.vcg files.
6705 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6706 accommodates the 2006-10-08 change.
6708 2006-10-11 Bob Rossi <bob@brasko.net>
6710 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6711 (b4_yyssa, b4_yyerror_range): New macros.
6712 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6713 (yypvarsinit): Remove init of removed fields.
6714 (yypushparse): Remove use of removed fields; use new macros instead.
6716 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6718 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6719 in a push parser. Reindent slightly to match yacc.c better.
6721 2006-10-11 Bob Rossi <bob@brasko.net>
6723 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6725 (yypvarsinit, yypushparse): Remove init of removed fields.
6726 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6728 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6730 * THANKS: Add Paolo Bonzini and Bob Rossi.
6732 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6734 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6735 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6736 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6737 b4_define_user_cde and uses): Remove.
6738 (b4_comment, b4_prefix, b4_sync_start): New.
6739 * data/bison.m4: New file, with most of the content removed from c.m4.
6740 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6741 * src/output.c (output_skeleton): Pass bison.m4.
6742 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6745 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6747 Fix test failure reported by Tom Lane in
6748 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6749 and try to make such failures easier to catch in the future.
6750 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6751 that's now the caller's responsibility.
6752 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6753 Set yychar = YYEOF if it's negative.
6754 * tests/actions.at (yylex): Abort if asked to read past EOF.
6755 * tests/conflicts.at (yylex): Likewise.
6756 * tests/cxx-type.at (yylex): Likewise.
6757 * tests/glr-regression.at (yylex): Likewise.
6758 * tests/input.at (yylex): Likewise.
6759 * tests/regression.at (yylex): Likewise.
6760 * tests/torture.at (yylex): Likewise.
6762 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6764 Fix problems with translating English-language diagnostics.
6765 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6766 respect to bison-runtime pot generation. The YY_ stuff
6767 wasn't being captured.
6768 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6769 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6770 * runtime-po/POTFILES.in: Add data/push.c.
6772 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6774 Merge bootstrap changes from coreutils.
6776 2006-09-28 Jim Meyering <jim@meyering.net>
6778 Automatically generated dependencies are important even
6779 when all of the sources in a directory come from gnulib.
6780 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6781 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6783 2006-09-23 Jim Meyering <jim@meyering.net>
6785 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6787 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6789 * bootstrap: Add support for --force.
6790 (usage): New function. Describe usage less tersely.
6791 (CVS_only_file): New var.
6793 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6795 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6796 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6797 Adjust white space and comments to match GNU style better.
6799 2006-09-20 Bob Rossi <bob@brasko.net>
6801 * data/push.c (yyresult_get): Remove function.
6802 (YYPUSH_MORE): Add #define.
6803 (yypushparse): Modify return value.
6805 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6807 * stamp-h.in: Remove; no longer needed.
6808 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6809 Remove config.h, config.hin, intl (no longer created).
6810 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6813 Sync bootstrap from coreutils, as follows:
6815 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6817 * bootstrap (symlink_to_gnulib): New function.
6818 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6819 to copies-of-gnulib.
6820 (cp_mark_as_generated, slurp, gnulib_files):
6821 Avoid making a copy if it's the same as the old version.
6822 (gnulib_files): Add support for this variable (used by Bison).
6824 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6826 * src/getargs.c (usage): Rework to use conventions similar to
6827 coreutils, to make translation a bit easier and the code a bit
6828 smaller. Problem reported by Tim Van Holder.
6830 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6832 Use some of gnulib's new modules, taken from coreutils.
6834 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6835 * bootstrap.conf: New file.
6836 (gnulib_modules): Add configmake, inttypes, unistd.
6837 (XGETTEXT_OPTIONS): Add complain, complain_at,
6838 fatal, fatal_at, warn, warn_at, unexpected_end.
6839 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6840 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6842 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6844 (GNULIB_AUTOCONF_SNIPPET): Remove.
6845 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6847 * lib/.cvsignore: Add inttypes_.h.
6848 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6849 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6850 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6851 no-longer-necessary initializations.
6852 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6853 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6854 use the unistd module.
6855 * src/system.h: Likewise.
6856 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6857 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6858 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6859 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6860 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6861 * src/system.h: Include inttypes.h unconditionally, now that we
6862 use the inttypes module. Don't bother to include stdint.h, since
6863 inttypes.h now does that for us.
6864 (LOCALEDIR): Remove, now that we use the configmake module.
6865 * src/getargs.c: Include configmake.h.
6866 * src/main.c: Likewise.
6867 * src/output.c: Likewise.
6868 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6869 not from $abs_top_builddir, since config.h moved.
6872 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6873 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6875 * src/parse-gram.y (symbol_declaration): Don't put statements
6876 before declarations; it's not portable to C89.
6877 * src/scan-code.l (handle_action_at): Likewise.
6879 * src/scan-code.l: Always initialize braces_level; the old code
6880 left it uninitialized and therefore had undefined behavior.
6882 Don't attempt to redefine 'assert', since it runs afoul of
6883 systems where standard headers (mistakenly) include <assert.h>.
6884 Instead, define and use our own alternative, called 'aver'.
6885 * src/reader.c: Don't include assert.h, since we no longer
6887 * src/scan-code.l: Likewise.
6888 * src/system.h (assert): Remove, replacing with....
6889 (aver): New function, taking a bool arg. All uses changed.
6890 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6891 not merely an integer.
6893 2006-09-15 Bob Rossi <bob@brasko.net>
6895 Add support for push parsing. Based on the original work of
6896 Odd Arild Olsen <oao@fibula.no>.
6897 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6898 * data/c.m4 (YYPUSH): New.
6899 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6900 * data/push.c: New file.
6901 * src/getargs.c (push_parser): New var.
6902 * src/getargs.h (push_parser): New declaration.
6903 * src/output.c (prepare): Add macro insertion of `push_flag'.
6904 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6905 (prologue_declaration): Parse %push-parser.
6906 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6907 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6908 list of removed lines from the traces observed.
6909 (AT_CHECK_CALC_LALR): Added push parser tests.
6911 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6913 * NEWS: Version 2.3a.
6914 * configure.ac (AC_INIT): Likewise.
6916 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6917 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6918 due to header ordering dependencies. I don't know why the #define
6921 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6922 runtime cost when YYDEBUG is not defined, and so that some tests
6923 that used to fail now work. Problem and initial suggestion by
6925 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6926 * data/glr.cc (b4_parser_class_name):
6927 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6928 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6929 (yydebug_) [YYDEBUG]: New member.
6930 (yycdebug_): Now defined only if YYDEBUG.
6931 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6932 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6933 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6935 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6936 Define only if YYDEBUG.
6937 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6939 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6940 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6941 AT_CHECK_CALC_GLR_CC that are working now.
6943 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6945 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6946 We don't need them in glr.cc, and glr.c defines them.
6947 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6948 assumes that defining it to anything is the same as defining
6949 it to 1. Problem reported by Paolo Bonzini.
6951 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6953 * data/c.m4 (b4_null, b4_case): Define.
6954 * src/output.c (prepare_symbols): Use b4_null.
6955 (user_actions_output): Use b4_case.
6957 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6959 * data/glr.c (b4_shared_declarations): Put start-header first,
6960 before any #includes that we generate, so that feature-test
6961 macros work. Problem reported by Michael Deutschmann in
6962 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6963 * data/lalr1.cc: Likewise.
6964 * doc/bison.texinfo (Prologue): Document that feature-test macros
6965 should be defined before any Bison declarations.
6966 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6967 that depend on location.hh after, not before, Bison decls, since
6968 we now include location.hh after the first user prologue.
6970 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6971 Sander Brandenburg in
6972 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6973 Also, fix minor white space and comment issues.
6974 (Prologue): Mention that it's better to define feature-test macros
6975 before Bison declarations. Problem reported by Michael Deutschmann.
6977 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6979 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6980 This adjusts to recent gnulib changes.
6982 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6984 Finish implementation of per-type %destructor/%printer. Discussed
6986 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6988 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6989 * NEWS (2.3+): Add a description of this feature to the default
6990 %destructor/%printer description.
6991 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6992 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6993 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6994 list node contains a semantic type.
6995 * src/symtab.c, src/symtab.h: Extend with a table that associates
6996 semantic types with their %destructor's and %printer's.
6997 (semantic_type_from_uniqstr, semantic_type_get,
6998 semantic_type_destructor_set, semantic_type_printer_set): New functions
6999 composing the public interface of that table.
7000 (symbol_destructor_get, symbol_destructor_location_get,
7001 symbol_printer_get, symbol_printer_location_get): If there's no
7002 per-symbol %destructor/%printer, look up the per-type before trying
7004 * tests/actions.at (Per-type %printer and %destructor): New test case.
7005 * tests/input.at (Default %printer and %destructor redeclared):
7006 Extend to check that multiple occurrences of %symbol-default in a
7007 single %destructor/%printer declaration is an error.
7008 (Per-type %printer and %destructor redeclared, Unused values with
7009 per-type %destructor): New test cases.
7011 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7013 Require default %destructor/%printer to be declared using
7014 %symbol-default instead of an empty symbol list, and start working on
7015 new per-type %destructor/%printer. Discussed at
7016 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7017 * NEWS (2.3+): Add %symbol-default to example.
7018 * bison.texinfo (Freeing Discarded Symbols): Likewise.
7019 (Table of Symbols): Add entry for %symbol-default.
7020 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7021 (generic_symlist, generic_symlist_item): New nonterminals for creating
7022 a list in which each item is a symbol, semantic type, or
7024 (grammar_declaration): Use generic_symlist in %destructor and %printer
7025 declarations instead of symbols.1 or an empty list.
7026 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7027 for changes to symbol_list.
7028 * src/reader.c: Update for changes to symbol_list.
7029 * src/scan-code.l: Likewise.
7030 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7031 * src/symlist.c, src/symlist.h: Extend such that a list node may
7032 represent a semantic type or a %symbol-default in addition to just an
7033 ordinary symbol. Add switched functions for setting %destructor's and
7035 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7036 %destructor/%printer declarations.
7038 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7040 Whether the default %destructor/%printer applies to a particular symbol
7041 isn't a question of whether the user *declares* that symbol (in %token,
7042 for example). It's a question of whether the user by any means
7043 *defines* the symbol at all (by simply using a char token, for
7044 example). $end is defined by Bison whereas any other token with token
7045 number 0 is defined by the user. The error token is always defined by
7046 Bison regardless of whether the user declares it with %token, but we
7047 may one day let the user define error as a nonterminal instead.
7048 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7049 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7050 the meaning of "user-defined".
7051 * tests/actions.at (Default %printer and %destructor for user-declared
7052 end token): Rename to...
7053 (Default %printer and %destructor for user-defined end token): ...
7056 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7057 computation of whether to apply the default, don't maintain a list of
7058 every Bison-defined symbol. Instead, just check for a first character
7059 of '$', which a user symbol cannot have, and check for the error token.
7061 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7063 Don't apply the default %destructor or %printer to the error token,
7064 $undefined, or $accept. This change fits the general rule that the
7065 default %destructor and %printer are only for user-declared symbols,
7066 and it solves several difficulties that are described in the new test
7068 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7069 * tests/actions.at (Default %printer and %destructor are not for error
7070 or $undefined, Default %printer and %destructor are not for $accept):
7073 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7075 Allow %start after the first rule.
7076 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7077 when parsing the first rule.
7078 (check_and_convert_grammar): Search for it here after all grammar
7079 declarations have been parsed. Skip midrules, which have dummy LHS
7081 * src/symtab.c (symbol_is_dummy): New function.
7082 * src/symtab.h (symbol_is_dummy): Declare it.
7083 * tests/input.at (%start after first rule): New test.
7085 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7087 Redo some of the previous commit: add back the ability to use
7088 non-aliased/undeclared string literals since it might be useful to
7089 those declaring %token-table.
7090 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7091 commit: don't worry about complaints from symbols_pack.
7092 * src/symtab.c (symbol_new, symbol_class_set,
7093 symbol_check_alias_consistency): Undo changes in previous commit: count
7094 each string literal as a new symbol and token, assign it a symbol
7095 number, and don't complain about non-aliased string literals.
7096 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7097 and token counts but does still set aliased tokens to the same number,
7098 symbol_pack_processor now leaves empty slots in the symbols array.
7100 * tests/regression.at (Undeclared string literal): Remove test case
7101 added in previous commit since non-aliased string literals are allowed
7103 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7104 remove unnecessary string literal declarations.
7105 * tests/sets.at (Firsts): Likewise.
7107 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7109 Don't allow an undeclared string literal, but allow a string literal to
7110 be used before its declaration.
7111 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7112 symbols_pack complained.
7113 * src/symtab.c (symbol_new): Don't count a string literal as a new
7115 (symbol_class_set): Don't count a string literal as a new token, and
7116 don't assign it a symbol number since symbol_make_alias does that.
7117 (symbol_make_alias): It's not necessary to decrement the symbol and
7118 token counts anymore. Don't assume that an alias declaration occurs
7119 before any uses of the identifier or string, and thus don't assert that
7120 one of them has the highest symbol number so far.
7121 (symbol_check_alias_consistency): Complain if there's a string literal
7122 that wasn't declared as an alias.
7123 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7124 symbol_pack asserts that every token has been assigned a symbol number
7125 although undeclared string literals have not.
7126 * tests/regression.at (String alias declared after use, Undeclared
7127 string literal): New test cases.
7128 (Characters Escapes, Web2c Actions): Declare string literals as
7130 * tests/sets.at (Firsts): Likewise.
7132 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7134 In the grammar scanner, STRING_FINISH unclosed constructs and return
7135 them to the parser in order to improve error messages.
7136 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7137 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7138 * tests/input.at (Unclosed constructs): New test case.
7139 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7142 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7145 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7147 Handle string aliases for character tokens correctly.
7148 * src/symtab.c (symbol_user_token_number_set): If the token has an
7149 alias, check and set its alias's user token number instead of its own,
7150 which is set to indicate the alias. Previously, every occurrence of
7151 the character token in the grammar overwrote that alias indicator with
7153 * tests/input.at (String aliases for character tokens): New test.
7155 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7157 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7159 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7161 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7162 to prevent failures when building on older platforms.
7163 Check for autopoint failure.
7164 Set XGETTEXT_OPTIONS to values that check for C format strings,
7165 so that translators are warned about them (this also helps
7166 prevent core dumps).
7168 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7169 function, since it simplifies our code a bit.
7171 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7172 rather than -W, so we don't get bogus warnings about sign comparisons.
7173 Add -Wpointer-arith, since that warning is useful (it reports code
7174 that does not conform to C89 and that some compilers reject).
7175 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7176 since it's no longer needed.
7178 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7180 Clean up scanners a bit.
7181 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7182 definitions so gcc won't warn when obstack_for_string is unused.
7183 * src/scan-code.l: config.h and system.h are already #include'd by
7184 scan-code-c.c, so get rid of them here.
7185 * src/scan-gram.l: Likewise.
7186 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7187 definitions rather than duplicating the rest of it.
7188 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7190 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7192 Suppress signed/unsigned comparison warnings for yycheck.
7193 * data/c.m4 (b4_safest_int_type): New macro.
7194 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7195 a signed int type, cast it to b4_safest_int_type first.
7196 * data/yacc.c: Likewise.
7197 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7200 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7202 * doc/bison.texinfo: Fix some typos.
7204 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7206 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7207 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7209 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7210 the latest gnulib does this a different way.
7211 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7212 translation was patched, so stop omitting it.
7214 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7216 Enable declaration of default %printer/%destructor. Make the parser
7217 use these for all user-declared grammar symbols for which the user does
7218 not declare a specific %printer/%destructor. Thus, the parser uses it
7219 for token 0 if the user declares it but not if Bison generates it as
7220 $end. Discussed starting at
7221 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7222 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7224 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7225 * NEWS (2.3+): Mention.
7226 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7227 declare a %destructor for a mid-rule's semantic value. It's just
7228 impossible to declare one specific to it.
7229 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7230 code. Describe default %destructor form.
7231 * src/parse-gram.y (grammar_declaration): Parse default
7232 %printer/%destructor declarations.
7233 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7234 and symbol_destructor_location_get rather than accessing the destructor
7235 and destructor_location members of struct symbol.
7236 (symbol_printers_output): Likewise but for %printer's.
7237 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7239 * src/symtab.c (default_destructor, default_destructor_location,
7240 default_printer, default_printer_location): New static global
7241 variables to record the default %destructor and %printer.
7242 (symbol_destructor_get, symbol_destructor_location_get,
7243 symbol_printer_get, symbol_printer_location_get): New functions to
7244 compute the appropriate %destructor and %printer for a symbol.
7245 (default_destructor_set, default_printer_set): New functions to set the
7246 default %destructor and %printer.
7247 * src/symtab.h: Prototype all those new functions.
7248 * tests/actions.at (Default %printer and %destructor): New test to
7249 check that the right %printer and %destructor are called, that they're
7250 not called for $end, and that $$ and @$ work correctly.
7251 (Default %printer and %destructor for user-declared end token): New
7252 test to check that the default %printer and %destructor are called for
7253 a user-declared end token.
7254 * tests/input.at (Default %printer and %destructor redeclared, Unused
7255 values with default %destructor): New tests to check related grammar
7256 warnings and errors.
7258 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7260 Clean up handling of %destructor for the end token (token 0).
7261 Discussed starting at
7262 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7264 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7266 Make the skeletons consistent in how they pop the end token and invoke
7268 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7269 state, which has token number 0, since this would invoke the
7270 %destructor for the end token.
7271 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7272 until after shifting the end token, or else it won't be popped.
7273 * data/yacc.c (yyparse): Likewise.
7275 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7276 it's the end token. Upon termination, destroy an unshifted lookahead
7277 even when it's the end token.
7278 * data/lalr1.cc (yy::parser::parse): Likewise.
7279 * data/yacc.c (yyparse): Likewise.
7281 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7282 value warnings for the end token when the user gives the end token a
7285 * tests/actions.at (Printers and Destructors): Test all the above.
7287 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7289 Update to latest gnulib and gettext versions.
7290 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7292 (gnulib_files): Add m4/warning.m4. Don't worry about files
7293 overwritten by autopoint.
7294 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7295 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7297 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7298 so that we can remove the intl files at a better time.
7299 (intl_files_to_remove): Remove aclocal.m4, since it gets
7300 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7301 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7302 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7303 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7304 Remove datarootdir hack; no longer needed.
7305 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7306 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7307 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7309 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7310 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7312 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7314 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7315 it with --assume-autoconf='latest-stable'.
7317 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7319 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7320 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7322 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7323 those from muscle_tab.c since the old ones are misleading.
7325 2006-07-13 Akim Demaille <akim@epita.fr>
7327 Support %define "KEY" {VALUE}.
7328 * src/scan-code.h, src/scan-code.l (translate_action)
7329 (translate_rule_action, translate_symbol_action, translate_code):
7330 Return char *, not const char *.
7331 * src/parse-gram.y (declaration): Rename as...
7332 (prologue_declaration): this.
7333 (string_content): Remove this nonterminal, use STRING.
7334 (braceless, content, content.opt): New nonterminal.
7336 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7338 * src/scan-gram.l (getargs.h): Don't include it.
7340 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7342 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7343 rather than a for-loop that declares a local bool variable. This
7344 should work around a compatibility problem with a Cray x1e C++
7345 compiler reported by Hung Nguyen in
7346 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7347 The for-loop was introduced in the 2004-11-17 change but I don't
7348 know why it was needed.
7350 2006-07-12 Akim Demaille <akim@epita.fr>
7352 * data/c.m4: Comment changes.
7354 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
7356 * src/complain.c (error_message, ERROR_MESSAGE): New.
7358 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7359 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7361 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7363 * NEWS: Instead of %union, you can define and use your own union type
7364 YYSTYPE if your grammar contains at least one <type> tag.
7365 Your YYSTYPE need not be a macro; it can be a typedef.
7366 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7367 (Union Decl, Decl Summary): Document this.
7368 * data/glr.c (YYSTYPE): Implement this.
7369 * data/glr.cc (YYSTYPE): Likewise.
7370 * data/lalr1.cc (YYSTYPE): Likewise.
7371 * data/yacc.c (YYSTYPE): Likewise.
7372 * src/output.c (prepare): Output tag_seen_flag.
7373 * src/parse-gram.y (declaration, grammar_declaration):
7374 Use 'union_seen' rather than 'typed' to determine whether
7375 %union has been seen, since grammars can now be typed without
7377 (symbol_declaration, type.opt, symbol_def):
7378 Keep track of whether a tag has been seen.
7379 * src/reader.c (union_seen, tag_seen): New vars.
7381 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7382 * src/scan-code.l (untyped_var_seen): New variable.
7383 (handle_action_dollar): Adjust to above changes.
7384 (handle_action_dollar, handle_action_at):
7385 Improve overflow checking for outlandish numbers.
7386 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7387 avoid new diagnostics generated by above changes.
7388 * tests/regression.at (YYSTYPE typedef): Add test to check
7389 for type tags without %union.
7391 * src/symlist.c (symbol_list_length): Return int, not unsigned
7392 int, since callers expect int. This may need to get revisited
7393 once we have proper integer overflow checking.
7395 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7396 object is now static.
7398 * src/getargs.c (flags_argmatch): Return void, not int,
7399 to pacify ./configure --enable-gcc-warnings.
7401 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7402 since last_string is already defined to FLEX_PREFIX (last_string).
7404 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7406 Implement --warnings/-W.
7407 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7409 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7411 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7412 (warnings_args, warnings_types): New.
7413 (getargs, short_options, long_options): Accept -W/--warnings.
7414 Sort the options by alphabetical order, upper case letter right
7415 before its lower case.
7417 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7419 Change %merge result type clash warnings to errors. Discussed at
7420 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7421 * src/reader.c (record_merge_function_type): Use complain_at.
7422 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7423 declared later): Update test case results.
7425 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7427 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7428 to be in alphabetical order.
7429 (trace_args): Spelling fixes.
7431 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7433 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7434 so they don't collide with user-defined macros.
7435 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7436 this was never guaranteed, and now that we're using gnulib stdint,
7437 which defines int_fast16_t to long int, the problem is exposed.
7439 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7441 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7442 need the full POSIX semantics (and weren't implementing them
7445 Adjust to Autoconf 2.60 and today's gnulib.
7446 * bootstrap (gnulib_modules): Add stdint.
7447 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7448 no longer copies it.
7449 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7450 since stdint needs the former and wcwidth (which is now required
7451 by mbswidth) needs the latter.
7452 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7453 work around a compatibility glitch between gettext 0.14.6 and
7455 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7456 Do not check for uintptr_t, since new stdint module does the right
7458 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7459 Add stdint.h, stdint_.h, wcwidth.h.
7460 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7461 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7462 stdint.m4, wchar_t.m4, wcwidth.m4.
7463 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7464 usual order for ../lib/*.h files.
7465 (file_name_split): Use last_component, not base_name, to adjust
7467 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7468 for ../lib/*.h files.
7469 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7470 Define unconditionally, since we now assume the stdint module.
7471 * src/scan-skel.l: Include <dirname.h>.
7472 (BASE_QPUTS): Use last_component, not base_name.
7473 * src/system.h: Include <unlocked-io.h> in the usual order
7474 for ../lib/*.h files. Include <stdint.h> unconditionally,
7475 since we now use the stdint module.
7476 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7477 HAVE_UINTPTR_T, since we now use the stdint module.
7478 (base_name): Remove decl, since files now include <dirname.h>
7481 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7483 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7485 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7486 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7488 * tests/calc.at: Adjust.
7490 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7492 * data/c.m4 (b4_basename): New.
7493 (b4_syncline): Also output the location of its invocation (from
7495 (b4_user_action, b4_define_user_action, b4_user_actions)
7496 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7497 (b4_user_stype): New.
7498 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7500 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7502 In the grammar file, the first column is 1 not 0 on the first line as
7503 on every other line.
7504 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7505 * tests/input.at (Torturing the Scanner): Update output.
7507 * src/scan-gram.l (scanner_cursor): Declare it static.
7509 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7511 In warnings, say "previous declaration" rather than "first
7513 * src/symtab.c (redeclaration): Do that here.
7514 * src/reader.c (record_merge_function_type): In the case of a result
7515 type clash, report the previous declaration rather than the very first
7516 one in the grammar file.
7517 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7518 declared later): Add a third declaration to check this behavior.
7519 * tests/input.at (Incompatible Aliases): Update output.
7521 2006-06-27 Akim Demaille <akim@epita.fr>
7523 * doc/Doxyfile.in: New.
7524 * doc/Makefile.am: Use it.
7525 * src/lalr.h, src/symtab.h: Initial doxygenation.
7527 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7529 Don't miss %merge result type warnings just because the LHS types are
7530 declared after the %merge. This continues the effort of the previous
7532 * src/reader.c (get_merge_function): Don't set the merger type yet.
7533 (record_merge_function_type): New function for setting the merger type
7534 and checking for clashes.
7535 (grammar_current_rule_merge_set): Set the location of the %merge for
7537 (packgram): Invoke record_merge_function_type for each rule now that
7538 all symbol type declarations have been parsed.
7539 * src/reader.h (merger_list.type_declaration_location): New member
7540 storing the location of the first %merge from which the type for this
7541 merging function was derived.
7542 * src/symlist.h (symbol_list.merger_declaration_location): New member
7543 storing the location of a rule's %merge, if any.
7544 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7545 declared later): New test to catch the error fixed by the above patch.
7547 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7549 Get action warnings (grammar_rule_check) right even when symbol
7550 declarations appear after the rules. Discussed at
7551 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7553 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7554 Don't mistake the type of $$ in a midrule to be that of its parent
7556 * src/reader.c (grammar_current_rule_end): Don't invoke
7557 grammar_rule_check yet since not all symbol declarations may have been
7559 (grammar_midrule_action): Likewise.
7560 Don't record whether the midrule's $$ has been used yet since actions
7561 haven't been translated yet.
7562 Record the midrule's parent rule and its RHS index within the parent
7564 (grammar_current_rule_action_append): Don't translate the action yet
7565 since not all symbol declarations may have been parsed yet and, thus,
7566 warnings about types for $$, $n, @$, and @n can't be reported yet.
7567 (packgram): Translate the action and invoke grammar_rule_check now that
7568 all symbol declarations have been parsed.
7569 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7570 after parsing the entire grammar file, the symbol list here in the case
7571 of a midrule is actually the midrule's empty RHS, so reference its
7572 parent rule's RHS where necessary.
7573 On the other hand, now that you can already know it's a midrule, you
7574 aren't forced to think $$ has the same type as its parent rule's $$.
7575 (handle_action_at): In the case of a midrule, reference the parent rule
7577 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7579 (symbol_list_length): Now that this is invoked after all rules have
7580 been parsed, a NULL symbol (rather than a NULL symbol list node)
7581 terminates a rule. symbol_list_print already does this correctly.
7582 * src/symlist.h (symbol_list.midrule_parent_rule,
7583 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7584 remember their relationships with their parents.
7585 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7586 fixed by the above patch.
7587 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7589 (Unused values): ... this old test case and...
7590 (Unused values before symbol declarations): ... this new test case.
7591 This one is the same as `Unused values' except that all symbol
7592 declarations appear after the rules in order to catch the rest of the
7593 errors fixed by the above patch.
7595 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7598 * src/reader.c (current_rule): Declare it static since it's no longer
7599 used outside this file.
7600 (grammar_current_rule_action_append): Remove redundant arguments from
7601 translate_rule_action invocation.
7602 * src/reader.h (current_rule): Remove this unused extern.
7603 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7604 * src/scan-code.l (translate_rule_action): Likewise.
7606 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7608 Clean up yesterday's patch.
7609 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7611 * src/reader.c (grammar_current_rule_action_append): ... here for
7612 consistency with grammar_current_rule_symbol_append.
7613 * tests/regression.at (Braced code in declaration in rules section):
7614 Make yyerror and yylex static as usual.
7616 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7618 Fix bug that mistakes braced code in a declaration in the rules section
7619 to be a rule action. Mentioned at
7620 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7621 * src/scan-gram.l: Move midrule action detection from the start of the
7622 scanning of any braced code to...
7623 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7624 action. For readability, use $2 and @2 rather than the equivalent
7626 * tests/regression.at (Braced code in declaration in rules section):
7627 New test to catch the error fixed by the above patch.
7629 Work on code readability some.
7630 * src/scan-code.l (current_rule): Get rid of this misleading and
7631 redundant declaration: it's actually extern'ed in reader.h.
7632 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7633 translate_action): Add a rule argument and use it instead of the global
7635 (translate_rule_action): This already receives current_rule through an
7636 argument, so pass it on to translate_action instead of assigning
7637 current_rule to current_rule.
7638 (translate_symbol_action, translate_code): Pass rule = NULL to
7641 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7643 Rename %before-definitions to %start-header and %after-definitions to
7644 %end-header. Don't use these declarations to separate pre-prologue
7645 blocks from post-prologue blocks. Add new order-independent
7646 declarations %before-header and %after-header as alternatives to the
7647 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7648 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7649 * NEWS (2.3+): Update for these changes.
7650 * data/glr.c (b4_before_definitions): Update to...
7651 (b4_start_header): ... this.
7652 (b4_after_definitions): Update to...
7653 (b4_end_header): ... this.
7654 * data/glr.cc: Likewise.
7655 * data/lalr1.cc: Likewise.
7656 * data/yacc.c: Likewise.
7657 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7658 prologue blocks with %*-header declarations.
7659 (Calc++ Parser): Likewise.
7660 (Decl Summary): Update names.
7661 (Table of Symbols): Update description.
7662 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7663 (PERCENT_END_HEADER): ... this.
7664 (PERCENT_BEFORE_DEFINITIONS): Update to...
7665 (PERCENT_START_HEADER): ... this.
7666 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7667 (declaration): Update token names and m4 macro names.
7668 When parsing %end-header and %start-header, invoke translate_code
7669 before muscle_code_grow, and no longer set global booleans to remember
7670 whether these declarations have been seen.
7671 Parse new %after-header and %before-header.
7672 * src/reader.c (before_definitions, after_definitions): Remove.
7673 (prologue_augment): Accept a new bool argument to specify whether to
7674 augment the pre-prologue or post-prologue.
7675 * src/reader.h (before_definitions, after_definitions): Remove these
7677 (prologue_augment): Add new bool argument.
7678 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7679 (PERCENT_END_HEADER): ... this.
7680 (PERCENT_BEFORE_DEFINITIONS): Update to...
7681 (PERCENT_START_HEADER): ... this.
7682 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7683 * tests/actions.at (Printers and Destructors): Update names.
7685 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7687 Add comparison operators for C++ location classes. Discussed at
7688 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7689 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7690 declaration indicating whether filename_type has an operator==. If
7691 filename_type is `std::string', it defaults to `1', `0' otherwise.
7692 * data/location.cc: Iff b4_define_location_comparison is `1', add
7693 operator== and operator!= for class position and for class location.
7696 * src/scan-action.l: Remove unused file.
7697 * src/symtab.c (symbol_printer_set): Use printer_location not
7698 destructor_location.
7699 * src/symtab.h (struct symbol): Replace incorrect source comment for
7701 * tests/input.at (Incompatible Aliases): Update output with correct
7704 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7706 Don't put the pre-prologue in the header file. For the yacc.c code
7707 file and the glr.c header and code files, move the pre-prologue before
7708 the token definitions. Add new %before-definitions and
7709 %after-definitions to declare code that will go in both the header file
7710 and code file. Discussed at
7711 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7712 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7714 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7715 * NEWS (2.3+): Describe these changes.
7716 * data/glr.c (b4_pre_prologue): Move from within to before...
7717 (b4_shared_declarations): ... this.
7718 Add new b4_before_definitions before b4_token_enums.
7719 Add new b4_after_definitions at the end.
7720 * data/glr.cc (b4_pre_prologue): Replace with...
7721 (b4_before_definitions): ... this in the header file.
7722 (b4_after_definitions): New near the end of the header file.
7723 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7724 code file right before including the header file.
7725 (b4_before_definitions): New in the previous position of
7726 b4_pre_prologue in the header file.
7727 (b4_after_definitions): New near the end of the header file.
7728 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7729 (b4_token_enums_defines): In the code file, move to right before
7730 YYSTYPE for consistency with the header file.
7731 (b4_before_definitions): New right before b4_token_enums_defines in
7732 both the header and code file.
7733 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7734 header and code file.
7735 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7736 of prologues for %union dependencies.
7737 (Decl Summary): In %defines description, mention the effect of
7738 %before-definitions and %after-definitions on the header file.
7739 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7740 than in the pre-prologue so that make check succeeds.
7741 (Table of Symbols): Add entries for %before-definitions and
7743 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7744 %before-definitions.
7745 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7746 (declaration): Parse those declarations and append to
7747 b4_before_definitions and b4_after_definitions, respectively.
7748 * src/reader.c (before_definitions, after_definitions): New bools to
7749 track whether those declarations have been seen.
7750 (prologue_augment): Add to the post-prologue if %union,
7751 %before-definitions, or %after-definitions has been seen.
7752 * src/reader.h (before_definitions, after_definitions): New extern's.
7753 * src/scan-gram.l: Scan the new declarations.
7754 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7755 prologue block in a %before-definitions or a %after-definitions based
7756 on whether the %union is declared.
7757 * tests/regression.at (Early token definitions with --yacc, Early token
7758 definitions without --yacc): Move tests for token definitions into the
7759 post-prologue since token names are no longer defined in the
7762 2006-06-20 Akim Demaille <akim@epita.fr>
7764 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7765 (symbol_get): Use it.
7766 * src/parse-gram.y: Use it.
7768 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7770 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7771 build succeeds when configured with --enable-gcc-warnings.
7773 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7775 * src/parse-gram.y (char_name): New function.
7776 (CHAR, STRING, string_content): For %printer, properly escape.
7777 (ID): Prefer fputs to fprintf.
7778 (id): Reindent to be consistent with other rules.
7779 Properly quote char.
7781 The Translation Project changed its way of publishing translations
7782 to maintainers. I haven't received any responses to my request
7783 for supporting the old way, or for documenting the new way. I
7784 have modified 'bootstrap' to use screen scraping
7785 (in this case, HTML scraping). This is unreliable and inelegant,
7786 but I don't see any better way. Yuck.
7787 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7788 (get_translations): New function, which uses HTML scraping to
7789 deduce locations of latest translations.
7790 Use this function to grab both bison and bison-runtime .po files.
7791 Don't bother priming the pump for the runtime-po domain any more,
7792 as it's now translated better than bison is.
7794 2006-06-19 Akim Demaille <akim@epita.fr>
7796 * src/scan-gram.l: No longer "parse" things after `%union' until
7797 `{'. Rather, return a single "%union" token.
7798 No longer make symbols: return strings, and leave the conversion
7799 to symbols to the parser.
7800 (SC_PRE_CODE, token_type): Remove.
7801 * src/parse-gram.y (%union): New field `character'.
7804 (ID, ID_COLON): Now that the scanner no longer makes them
7805 identifiers, adjust all uses to invoke symbol_get.
7806 (id_colon): New, wraps the conversion from string to symbol.
7807 (%union): Accept a possible union_name.
7808 (symbol): Now can be a char.
7809 * data/c.m4 (b4_union_name): Leave a default value.
7810 * data/glr.c, data/yacc.c: Use it.
7812 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7814 For associating token numbers with token names for "yacc.c", don't use
7815 #define statements unless `--yacc' is specified; always use enum
7816 yytokentype. Most important discussions start at:
7817 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7818 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7820 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7821 * NEWS (2.3+): Mention.
7822 * data/c.m4 (b4_yacc_if): New.
7823 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7825 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7826 on token name definitions.
7827 * src/getargs.c (usage): Capitalize `Yacc' in English.
7828 * src/output.c (prepare): Define b4_yacc_flag.
7829 * tests/regression.at (Early token definitions): Test that tokens names
7830 are defined before the pre-prologue not just before the post-prologue.
7831 Remove this test case and copy to...
7832 (Early token definitions with --yacc): ... this to test #define's.
7833 (Early token definitions without --yacc): ... and this to test enums.
7835 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7837 * NEWS: Reword the post-2.3 change to not be so optimistic about
7838 removing the old "look-ahead" spelling.
7839 Update previous look-ahead/lookahead change reports.
7840 * REFERENCES: look-ahead -> lookahead (since that's
7841 what he actually wrote).
7842 * doc/refcard.tex: look ahead -> lookahead,
7843 look-ahead -> lookahead
7845 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7847 For consistency, use `lookahead' instead of `look-ahead' or
7848 `look_ahead'. Discussed starting at
7849 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7851 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7852 * NEWS: For the next release, note the change to `--report'.
7853 * TODO, doc/bison.1: Update English.
7854 * doc/bison.texinfo: Update English.
7855 (Understanding Your Parser, Bison Options): Document as
7856 `--report=lookahead' rather than `--report=look-ahead'.
7857 * src/conflicts.c: Update English in comments.
7858 (lookahead_set): Rename from look_ahead_set.
7859 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7860 (resolve_sr_conflict): Rename local look_ahead_tokens to
7861 lookahead_tokens, and update other uses.
7862 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7863 count_rr_conflicts, conflicts_free): Update uses.
7864 * src/getargs.c (report_args): Move "lookahead" before alternate
7866 (report_types): Update uses.
7867 (usage): For `--report' usage description, state `lookahead' spelling
7868 rather than `look-ahead'.
7869 * src/getargs.h (report.report_lookahead_tokens): Rename from
7870 report_look_ahead_tokens.
7871 * src/lalr.c: Update English in comments.
7872 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7873 (state_lookahead_tokens_count): Rename from
7874 state_look_ahead_tokens_count.
7875 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7876 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7877 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7879 Update English in output.
7880 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7881 * src/print.c: Update English in comments.
7882 (lookahead_set): Rename from look_ahead_set.
7883 (print_reduction): Rename argument lookahead_token from
7885 (print_core, state_default_rule, print_reductions, print_results):
7887 * src/print_graph.c: Update English in comments.
7888 (print_core): Update uses.
7889 * src/state.c: Update English in comments.
7890 (reductions_new): Update uses.
7891 (state_rule_lookahead_tokens_print): Rename from
7892 state_rule_look_ahead_tokens_print, and update other uses.
7893 * src/state.h: Update English in comments.
7894 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7895 (state_rule_lookahead_tokens_print): Rename from
7896 state_rule_look_ahead_tokens_print.
7897 * src/tables.c: Update English in comments.
7898 (conflict_row, action_row): Update uses.
7899 * tests/glr-regression.at
7900 (Incorrect lookahead during deterministic GLR,
7901 Incorrect lookahead during nondeterministic GLR): Rename
7902 print_look_ahead to print_lookahead.
7903 * tests/torture.at: Update English in comments.
7904 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7905 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7906 (Many lookahead tokens): Update uses.
7907 * data/glr.c: Update English in comments.
7908 * lalr1.cc: Likewise.
7910 * src/conflicts.h: Likewise.
7911 * src/lalr.h: Likewise.
7912 * src/main.c: Likewise.
7913 * src/output.c: Likewise.
7914 * src/parse-gram.c: Likewise.
7915 * src/tables.h: Likewise.
7916 * tests/calc.at: Likewise.
7918 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7920 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7922 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7924 * TODO: Add request from Nelson H. F. Beebe to be able to install
7925 Bison without installing the yacc script.
7927 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7929 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7930 and yytext if they're already #define'd.
7931 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7932 * src/scan-code-c.c: ... here.
7933 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7936 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7938 Get Bison to build again when configured with --enable-gcc-warnings.
7939 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7941 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7942 loc argument as it shadows a global.
7943 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7946 * src/.cvsignore: Add scan-code.c.
7948 2006-06-07 Akim Demaille <akim@epita.fr>
7950 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7952 * src/scan-code.l: here.
7953 * tests/input.at (Torturing the Scanner): Fix another location
7956 2006-06-07 Akim Demaille <akim@epita.fr>
7958 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7960 2006-06-06 Akim Demaille <akim@epita.fr>
7962 Extract the parsing of user actions from the grammar scanner.
7963 As a consequence, the relation between the grammar scanner and
7964 parser is much simpler. We can also split "composite tokens" back
7966 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7967 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7969 * src/location.h, src/location.c (add_column_width)
7970 (location_compute): these.
7971 Fix the column count: the initial column is 0.
7972 (location_print): Be robust to ending column being 0.
7973 * src/location.h (boundary_set): New.
7974 * src/main.c: Adjust to scanner_free being renamed as
7976 * src/output.c: Include scan-code.h.
7977 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7979 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7980 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7981 which is now, again, a separate token.
7982 Adjust all dependencies.
7983 Whereever actions with $ and @ are used, use translate_code.
7984 (action): Remove this nonterminal which is now useless.
7985 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7986 (grammar_current_rule_action_append): Use translate_code.
7987 (packgram): Bound check ruleno, itemno, and rule_length.
7988 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7989 (last_string, last_braced_code_loc, max_left_semantic_context)
7990 (scanner_initialize, scanner_free, scanner_last_string_free)
7991 (gram_out, gram_lineno, YY_DECL_): Move to...
7992 * src/scan-gram.h: this new file.
7993 (YY_DECL): Rename as...
7995 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7996 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7997 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7998 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7999 Move these declarations, and...
8000 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
8002 * src/flex-scanner.h: this new file.
8003 * src/scan-gram.l (rule_length, rule_length_overflow)
8004 (increment_rule_length): Remove.
8005 (last_braced_code_loc): Rename as...
8006 (gram_last_braced_code_loc): this.
8007 Adjust to the changes of the parser.
8008 Move all the handling of $ and @ into...
8009 * src/scan-code.l: here.
8010 * src/scan-gram.l (handle_dollar, handle_at): Remove.
8011 (handle_action_dollar, handle_action_at): Move to...
8012 * src/scan-code.l: here.
8013 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
8014 scan-code.h, scan-code-c.c, scan-gram.h.
8015 (EXTRA_bison_SOURCES): Add scan-code.l.
8016 (BUILT_SOURCES): Add scan-code.c.
8017 (yacc): Be robust to white spaces.
8019 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8020 * tests/regression.at: Adjust the column numbers.
8021 * tests/regression.at: Adjust the error message.
8023 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8025 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8026 Use Akim's wording from
8027 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8029 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8031 Between Bison releases, manually append `+' to the previous Bison
8032 release number, and use that as a signal to automatically print the
8033 ChangeLog's CVS Id keyword from --version. Discussed starting at
8034 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8035 * ChangeLog: Add Id header.
8036 * configure.ac (AC_INIT): Append `+' to `2.3'.
8037 * src/.cvsignore: Add revision.c.
8038 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8039 (BUILT_SOURCES): Add revision.c.
8040 (revision.c): New target rule. This file defines a new global variable
8041 named revision. It initializes it with either the Id from ChangeLog
8042 or, if VERSION doesn't contain `+', with the empty string.
8043 * src/getargs.c (version): Print the value of revision.
8044 * src/revision.h: Extern revision.
8046 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8048 * NEWS: Version 2.3.
8049 * configure.ac (AC_INIT): Likewise.
8051 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8053 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8054 with no arguments, not as an object-like macro. This is for
8055 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8056 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8057 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8060 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8062 * src/getargs.c (usage): Back out yesterday's modification of the
8063 --help output so that we don't have to wait for translation before
8066 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8068 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8069 Problem reported by Akim Demaille.
8071 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8073 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8075 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8077 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8078 generated source code. Problem reported by Frans Englich in
8079 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8081 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8083 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8084 shell, not within 'make', so that 'make' by an ordinary builder
8085 (using GNU make) does not worry about configuring gzip. This also
8086 works around a bug reported independently by Keith Thompson and by
8087 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8088 stderr rather than stdout, messing up the build logs.
8090 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8092 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8093 to make sure that YYID will never be unused. This fixes a 'make
8094 maintainer-check' failure caused by the recent changes to the 'Trivial
8095 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8097 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8099 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8101 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8102 state before an empty RHS is always resolved here. Only the location
8103 of that state is guaranteed to be resolved, and that's enough. This
8104 fixes the remaining bug reported by Derek M. Jones in
8105 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8106 * tests/glr-regression.at (Uninitialized location when reporting
8107 ambiguity): Test the above case.
8108 Also, the embedded comments in this test case claim it checks the case
8109 of an empty RHS that has inherited the initial location. However, the
8110 corresponding LHS was already resolved, so yyresolveLocations didn't
8111 actually have reason to modify it. Fix this by forcing
8112 nondeterministic operation at the beginning of the parse.
8114 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8116 * data/c.m4 (b4_yy_symbol_print_generate):
8117 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8118 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8119 of the bugs reported today by Derek M Jones in
8120 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8121 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8122 defined to be a type name without parens or brackets.
8123 (Location Type): Similarly for YYLTYPE.
8124 * tests/regression.at (Trivial grammars): Put in a test for this
8125 bug that will be caught by 'make maintainer-check' (though not,
8126 alas, by 'make check' unless your compiler is picky).
8128 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8130 * NEWS: Version 2.2.
8131 * configure.ac (AC_INIT): Likewise.
8133 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8135 * data/glr.c (yyreportTree): Make room in yystates for the state
8136 preceding the RHS. This fixes the segmentation fault reported by Derek
8138 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8139 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8140 to the user. Reported for yyreportTree by Derek M. Jones later in the
8142 * THANKS: Add Derek M. Jones.
8143 Update my email address.
8144 Fix typo in Steve Murphy's name.
8146 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8148 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8149 checking against YYLAST that caused the parser to miss a potential
8150 alternative in its diagnostic.
8151 Problem reported by Maria Jose Moron Fernandez in
8152 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8153 * data/lalr1.cc (yysyntax_error_): Likewise.
8154 * data/yacc.c (yysyntax_error): Likewise.
8155 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8156 tokens, in case we run into an older C compiler.
8157 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8158 Use them to check for the off-by-one error fixed above.
8160 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8161 YYSIZE_T, not size_t.
8162 * tests/regression.at (Trivial grammars): New test, to catch
8163 the error fixed by the above patch.
8165 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8167 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8169 Reported by Steve Murphy.
8171 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8173 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8174 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8176 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8178 Implement --trace=m4.
8179 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8180 * src/output.c (output_skeleton): When set, pass -dV to m4.
8182 Factor the handling of flags in m4.
8183 * src/output.c (prepare): Rename the muscle names debug, defines,
8184 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8185 * data/c.m4: Adjust.
8186 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8187 Use b4_define_flag_if to define other b4_FLAG_if macros.
8188 (b4_location_if): As a consequence, rename as...
8189 (b4_locations_if): this, for consistency.
8190 Adjust all the skeletons.
8192 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8194 * etc/bench.pm: Shorten bench names.
8196 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8198 * src/output.h, src/output.c (error_verbose): Move to...
8199 * src/getargs.h, src/getargs.c: here.
8201 Adjust dependencies.
8203 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8205 * data/c.m4 (b4_copyright): Put the special exception for Bison
8206 skeletons here, so we don't have to put it in each skeleton. All
8207 uses changed. Suggested by Akim Demaille. Also, wrap the
8208 copyright notice, in case it is longer than 80 columns. Replace
8209 comma by newline after title.
8211 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8213 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8214 incompatibility, not a bug. Mention that it wasn't fixed as of
8217 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8219 * examples/extexi: Enforce the precedence of concatenation over
8221 Reported by Tommy Nordgren.
8223 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8225 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8226 with the member "token".
8227 Reported by Martin Nylin.
8229 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8231 * data/glr.c: Switch to Bison 2.2 special-exception language in
8232 the copyright notice. Use more-regular format for titles and
8234 * data/glr.cc: Likewise.
8235 * data/location.cc: Likewise.
8236 * data/yacc.cc: Likewise.
8237 * doc/bison.texinfo (Conditions): Document this.
8238 * NEWS: likewise. Upgrade version to 2.2.
8240 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
8242 * data/glr.cc: Remove dead code.
8244 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8246 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8247 that variable and the line breaks the bootstrap. Problem reported
8248 by Juan M. Guerrero.
8250 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8252 * doc/bison.texinfo (Multiple start-symbols): New.
8254 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8256 * etc/README, etc/bench.pl: New.
8258 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
8260 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8262 Reported by Mickael Labau.
8263 * tests/input.at (Torturing the Scanner): Test it.
8265 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8267 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8268 Problem reported by Bob Rossi.
8270 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8272 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8273 and didn't really work.
8274 For the index, use @ifnotinfo, not @iftex.
8275 Minor cleanups of spacing and terminology.
8277 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8279 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8280 of AT_NAME_PREFIX when %name-prefix is not used.
8282 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8284 Apply --prefix to C++ skeletons too: they change the namespace.
8285 The test suite already exercize these cases.
8286 * data/c++.m4 (b4_namespace): New.
8287 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8288 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8289 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8290 * doc/bison.texinfo: Document it.
8291 (Option Cross Key): Use @multitable in all formats. It looks
8292 nicer, even in TeX outputs.
8293 (Rules): Use the same code whatever the output type is.
8294 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8295 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8296 * tests/calc.at: Use it, instead of hard coding `yy'.
8298 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8300 * TODO: Remove dead items.
8302 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8304 * doc/FAQ: Remove, merged into...
8305 * doc/bison.texinfo (FAQ): this.
8306 * doc/Makefile.am (EXTRA_DIST): Adjust.
8308 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8310 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8312 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8313 * doc/bison.texinfo (Calc++ Scanner): Use it.
8315 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8317 Fix two nits reported by twlevo, plus one more that I discovered.
8319 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8320 this is the usual Bison style.
8321 * src/location.h (location_print): Likewise.
8323 * src/reader.h (token_name): Likewise.
8325 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8327 Fix some nits reported by twlevo.
8328 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8329 and "POSIX". Use more-modern syntax for URLs. Mention C++
8330 and ask for Java. Don't hardwire OS version numbers. Add
8332 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8333 * src/conflicts.c (solved_conflicts_obstack): Now static.
8335 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8337 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8338 page. Say "you can use it" not "you may use it" as on the web page;
8339 we're describing capabilities not granting permission.
8341 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8343 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8344 shadowing warnings. Use usual patter for iterating through RHS.
8345 * tests/glr-regression.at
8346 (Uninitialized location when reporting ambiguity):
8347 Modify yylex so that it uses its argument, rather than trying
8348 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8349 const char -> char const.
8351 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8352 Don't use tabs inside commands; it messes up 'ps'.
8353 Problem reported by twlevo.
8355 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8357 * tests/glr-regression.at (Uninitialized location when reporting
8358 ambiguity): New test case.
8359 * data/glr.c (yyresolveLocations): New function, which uses
8361 (yyresolveValue): Invoke yyresolveLocations before reporting an
8363 * doc/bison.texinfo (Default Action for Locations): Note
8364 YYLLOC_DEFAULT's usage for ambiguity locations.
8365 (GLR Semantic Actions): Cross-reference those notes.
8367 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8369 * tests/glr-regression.at (Leaked semantic values when reporting
8370 ambiguity): Remove unnecessary union and type declarations.
8371 (Leaked lookahead after nondeterministic parse syntax error): New test
8373 * data/glr.c (yyparse): Check for zero stacks remaining before
8374 attempting to shift the lookahead so that you don't lose it.
8376 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8378 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8379 * tests/glr-regression.at (Leaked semantic values when reporting
8380 ambiguity): New test case.
8381 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8382 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8383 now unnecessary yystackp parameter.
8384 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8385 destructors can be called.
8387 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8388 in existing testcases.
8390 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8392 Don't leak semantic values for parent RHS when a user action cuts the
8393 parser, and clean up related code a bit.
8394 * tests/glr-regression.at (Leaked merged semantic value if user action
8395 cuts parse): Rename to...
8396 (Leaked semantic values if user action cuts parse): ... this. Add check
8397 for leaked parent RHS values.
8398 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8399 between an unresolved state (non-empty chain of semantic options) and
8400 an incomplete one (signaled by an empty chain).
8401 (yyresolveStates): Document the interface. Move all manipulation of a
8402 successfully or unsuccessfully resolved yyGLRState to...
8403 (yyresolveValue): ... here so that yyresolveValue always leaves a
8404 yyGLRState with consistent data and thus is easier to understand.
8405 Remove the yyvalp and yylocp parameters since they are always just
8406 taken from the yys parameter. When reporting a discarded merged value
8407 in debugging output, note that it is incompletely merged. Document the
8409 (yyresolveAction): If resolving any of the RHS states fails, destroy
8410 them all rather than leaking them. Thus, as long as user actions are
8411 written to clean up the RHS correctly, yyresolveAction always cleans up
8412 the RHS of a semantic option. Document the interface.
8414 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8416 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8417 led to a segmentation fault in GNU Pascal. Problem reported
8420 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8422 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8423 mid-rule action inside a nonterminal symbol in order to declare a
8424 destructor for its semantic value.
8426 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8428 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8429 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8430 __cplusplus && ! defined _STDLIB_H && !
8431 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8432 defined free))]: Include <stdlib.h> rather than rolling our own
8433 declarations of malloc and free, to avoid problems with
8434 incompatible declarations (using 'throw') C++'s stdlib.h. This
8435 should fix Debian bug 340012
8436 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8437 reported by Guillaume Melquiond.
8439 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8441 * NEWS: Clarify symbols versus types in unused-value warnings.
8443 * configure.ac (AC_INIT): Bump version number.
8445 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8447 * NEWS: Version 2.1a.
8448 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8449 since C99 requires this.
8451 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8453 * m4/c-working.m4: New file.
8454 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8456 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8458 * Makefile.maint: Merge from coreutils.
8460 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8462 More portability fixes for problems summarized by Nelson H. F. Beebe.
8464 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8465 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8466 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8467 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8468 messes up because C++ code is compiled in 32-bit mode but linked
8471 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8473 More portability fixes for problems summarized by Nelson H. F. Beebe.
8475 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8476 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8478 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8479 nodist_PROGRAMS, since we don't need to actually compile the
8480 example if we're just doing a plain 'make'. This avoids bothering
8481 the installer unnecessarily about problems due to weird C++
8484 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8486 More portability fixes for problems summarized by Nelson H. F. Beebe.
8488 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8489 than #include "...", and compile with -I'.'. The old method was
8490 not portable, according to Posix and the C standard, and it does
8491 not work with Sun C 5.7, where previous #line directives affect
8492 the working directory used in later #include "..." directives.
8494 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8496 Various DJGGP specific issues in /djgpp
8498 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8500 More portability fixes for problems summarized by Nelson H. F. Beebe.
8502 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8503 '#include <map>' works and that you can apply ++ to iterators.
8505 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8507 Work around portability problems summarized by Nelson H. F. Beebe in
8508 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8510 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8511 that '#include <string>' works.
8513 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8514 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8515 "warning: sorry: semantics of inline function static data `const
8516 unsigned char translate_table[262]' are wrong (you'll wind up with
8519 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8520 or, xor to not_, and_, or_, and xor_, respectively. This works
8521 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8522 random system header somewhere that includes the equivalent of
8525 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8526 -E" works; it apparently doesn't work with PathScale EKO Compiler
8529 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8531 During deterministic GLR operation, user actions should be able to
8532 influence the parse by changing yychar. To make this easier to fix and
8533 to make glr.c easier to evolve in general, don't maintain yytoken in
8534 parallel with yychar; just compute yytoken when needed.
8535 * tests/glr-regression.at (Incorrect lookahead during deterministic
8536 GLR): Check that setting yychar in a user action has the intended
8538 * data/glr.c (yyGLRStack): Remove yytokenp member.
8539 (yyclearin): Don't set *yytokenp.
8540 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8541 yychar rather than *yytokenp to determine the current lookahead.
8542 Compute yytoken locally when needed.
8543 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8546 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8547 after `--report' documentation.
8549 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8551 * src/parse-gram.y (grammar_declaration): Location of printer
8552 symbol is @1, not list->location. Bug reported by twlevo.
8553 * tests/input.at (Incompatible Aliases): Adjust to above change.
8555 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8557 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8558 all the test at once. This makes the output easier to read in the
8561 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8562 got from <http://bro-ids.org/download.html>. The bug is that
8563 when two actions appeared in succession, the second one was
8564 scanned before the first one was added to the grammar rule
8565 as a midrule action. Bison then output the incorrect warning
8566 "parse.y:905.17-906.36: warning: unused value: $3".
8567 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8568 associated with a value.
8569 (rhs): Don't invoke grammar_current_rule_action_append.
8570 (action): Invoke it here instead.
8571 * src/reader.c (grammar_midrule_action): Now extern.
8572 (grammar_current_rule_action_append): Don't invoke
8573 grammar_midrule_action; that is now the scanner's job.
8574 * src/reader.h (last_string, last_braced_code_loc):
8575 (grammar_midrule_action): New decls.
8576 * src/scan-gram.l (last_string): Now extern, sigh.
8577 (last_braced_code_loc): New extern variable.
8578 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8579 rule already has an action.
8580 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8581 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8582 Add some tests to check that the above changes fixed the bug.
8584 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8586 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8587 All used changed. Check whether the symbol has a destructor,
8588 not whether it is typed.
8589 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8590 that the values are still reported as unused. All line numbers
8593 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8595 Work around a bug in bro 0.8, which underparenthesizes its
8596 definition of YYLLOC_DEFAULT.
8597 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8599 * data/lalr1.cc: Likewise.
8600 * data/yacc.cc: Likewise.
8602 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8604 Work around a bug in Pike 7.0, and give the Pike folks a
8605 better way to override the usual int widths.
8606 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8607 user can override the types.
8608 (short): #undef, to work around a bug in Pike 7.0.
8609 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8610 (union yyalloc.yyss): Use yytype_int16 rather than short.
8612 (yysigned_char): Remove.
8613 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8614 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8615 * tests/regression.at (Web2c Actions): Adjust to above changes.
8617 * src/reader.c (check_and_convert_grammar): New function.
8618 (reader): Close the input file even if something went wrong during
8619 parsing. Minor file descriptor leak reported by twlevo.
8621 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8622 to pacify gcc -Wswitch-default.
8623 * src/scan-gram.l (adjust_location): Use a default: break; case
8624 to pacify gcc -Wswitch-default.
8625 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8626 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8627 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8628 Move these decls to scan-skel.l, since they don't need to be
8630 * src/scan-skel.l: Accept the above decls.
8631 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8634 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8636 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8637 since we don't want to insist on a version number at the start
8638 of the changelog every time.
8639 * Makefile.maint: Sync from coreutils a bit better.
8640 (sc_trailing_blank): Renamed from sc_trailing_space.
8642 (sc_no_if_have_config_h, sc_require_config_h):
8643 (sc_prohibit_assert_without_use): New rules.
8644 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8645 (sc_dd_max_sym_length): Fix leading spaces in rule.
8646 (sc_system_h_headers): Prefix with @.
8647 (sc_useless_cpp_parens, m4-check): Output line numbers.
8648 (changelog-check): Allow version only in head.
8649 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8650 satisfy new Makefile.maint rule.
8651 * data/glr.c: Likewise.
8652 * data/glr.cc: Likewise.
8653 * data/lalr1.cc: Likewise.
8654 * data/yacc.c: Likewise.
8655 * lib/ebitsetv.c: Likewise.
8656 * lib/lbitset.c: Likewise.
8657 * lib/subpipe.c: Likewise.
8658 * lib/timevar.c: Likewise.
8659 * src/system.h: Likewise.
8660 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8661 * djgpp/Makefile.maint: Add copyright notice.
8662 * djgpp/README.in: Likewise.
8663 * djgpp/config.bat: Likewise.
8664 * djgpp/config.site: Likewise.
8665 * djgpp/config_h.sed: Likewise.
8666 * djgpp/djunpack.bat: Likewise.
8667 * djgpp/config.sed: Fix copyright notice to match standard format.
8668 * djgpp/subpipe.h: Likewise.
8669 * lib/bitsetv-print.c: Likewise.
8670 * lib/bitsetv.c: Likewise.
8671 * lib/subpipe.h: Likewise.
8672 * lib/timevar.c: Likewise.
8673 * lib/timevar.h: Likewise.
8674 * djgpp/subpipe.c: Use standard recipe for config.h.
8675 * lib/abitset.c: Likewise.
8676 * lib/bitset.c: Likewise.
8677 * lib/bitset_stats.c: Likewise.
8678 * lib/bitsetv-print.c: Likewise.
8679 * lib/bitsetv.c: Likewise.
8680 * lib/ebitsetv.c: Likewise.
8681 * lib/get-errno.c: Likewise.
8682 * lib/lbitset.c: Likewise.
8683 * lib/subpipe.c: Likewise.
8684 * lib/timevar.c: Likewise.
8685 * lib/vbitset.c: Likewise.
8686 * tests/local.at: Likewise.
8687 * src/scan-gram.l: Don't include verify.h, since system.h does
8689 * .x-sc_require_config_h: New file.
8690 * .x-sc_unmarked_diagnostics: New file.
8692 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8694 Be a bit more systematic about using 'abort'.
8695 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8696 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8697 Put 'default: abort ();' before some other case, to satisfy older
8699 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8700 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8701 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8702 * src/conflicts.c (resolve_sr_conflict): Likewise.
8703 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8704 (get_decision_str, get_orientation_str, get_node_alignment_str):
8705 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8706 (get_linestyle_str, get_arrowstyle_str): Likewise.
8707 * src/conflicts.c (resolve_sr_conflict):
8708 Use a default case rather than one for the one remaining enum
8709 value, to catch invalid enum values as well.
8710 * src/lalr.c (set_goto_map, map_goto):
8711 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8712 * src/nullable.c (nullable_compute, token_definitions_output):
8714 * src/reader.c (packgram, reader): Likewise.
8715 * src/state.c (transitions_to, state_new, state_reduction_find):
8717 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8718 (symbol_pack): Likewise.
8719 * src/tables.c (conflict_row, pack_vector): Likewise.
8720 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8721 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8722 * src/system.h: Don't include <assert.h>.
8723 (assert): New macro.
8725 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8726 (Destructor Decl, Parser Function, Pure Calling):
8727 Describe rules for braces inside C code more carefully.
8729 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8731 Fix some porting glitches found by Nelson H. F. Beebe.
8732 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8733 compilers that don't understand that abort () does not return.
8734 * src/state.c (transitions_to): Likewise.
8735 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8736 that '#include <cstdlib>' works.
8737 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8738 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8739 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8740 for the benefit of some pre-C99 compilers.
8742 * bootstrap: Undo changes to gnulib files that autoreconf made.
8744 Minor fixups to get 'make maintainer-check' to work.
8745 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8746 with the new verify.h implementation.
8747 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8748 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8749 * data/yacc.c (YYUSE): Likewise.
8750 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8751 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8752 * src/parse-gram.y (declaration): Don't pass a string constant
8753 to a function that expects char *, since GCC might complain
8754 about the constant value.
8755 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8756 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8757 before #defining them.
8758 * tests/glr-regression.at
8759 (Incorrectly initialized location for empty right-hand side in GLR):
8760 In yyerror, use the msg arg.
8761 (Corrupted semantic options if user action cuts parse):
8762 (Incorrect lookahead during deterministic GLR):
8763 (Incorrect lookahead during nondeterministic GLR):
8764 Don't name a local var 'index'; it shadows string.h's 'index'.
8766 2006-01-19 Akim Demaille <akim@epita.fr>
8768 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8769 location, not just parts of it.
8771 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8773 * NEWS: Document the fact that multiple %unions are now allowed.
8774 * doc/bison.texinfo (Union Decl): Likewise.
8775 * TODO: This feature is now implemented, so remove it from
8778 * Makefile.maint: Merge with coreutils Makefile.maint.
8779 (CVS_LIST): Use build-aux version if available.
8780 (VERSION_REGEXP): New macro.
8781 (syntax-check-rules): Add sc_no_if_have_config_h,
8782 sc_prohibit_assert_without_use, sc_require_config_h,
8783 sc_useless_cpp_parens.
8784 (sc_obsolete_symbols): Check for O_NDELAY.
8785 (sc_dd_max_sym_length): Track coreutils.
8786 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8787 (sc_useless_cpp_parens): New rule.
8788 (news-date-check): Look for version or today's date.
8789 (changelog-check): Don't require version number near head.
8790 (copyright-check): Use current year instead of hardwiring 2005.
8791 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8792 (announcement): Add --gpg-key-ID.
8794 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8797 Avoid undefined behavior that addressed just before the start of an
8798 array. Problem reported by twlevo.
8799 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8800 * src/lalr.c (build_relations): Rely on new sentinel.
8801 * src/gram.c (gram_free): Adjust to new sentinel.
8803 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8805 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8806 yylookaheadNeeds. All uses updated.
8807 (yysplitStack): Rename local yynewLookaheadStatuses to
8808 yynewLookaheadNeeds.
8809 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8810 GLR): In comments, change `lookahead status' to `lookahead need'.
8812 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8814 * data/glr.c (yysplitStack): A little stylistic rewrite.
8816 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8818 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8820 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8822 * doc/bison.texinfo: Fix some typos.
8823 (GLR Semantic Actions): New subsection discussing special
8824 considerations because GLR semantic actions might be deferred.
8825 (Actions): Mention look-ahead usage of yylval.
8826 (Actions and Locations): Mention look-ahead usage of yylloc.
8827 (Special Features for Use in Actions): Add YYEOF entry and mention it
8828 in the yychar entry.
8829 In the yychar entry, remove mention of the local yychar case (pure
8830 parser) since this is irrelevant information when writing semantic
8831 actions and since it's already discussed in `Table of Symbols' where
8832 yychar is otherwise described as an external variable.
8833 In the yychar entry, don't call it the `current' look-ahead since it
8834 isn't when semantic actions are deferred.
8835 In the yychar and yyclearin entries, add note about deferred semantic
8837 Add yylloc and yylval entries discussing look-ahead usage.
8838 (Look-Ahead Tokens): When discussing yychar, don't call it the
8839 `current' look-ahead, and do mention yylval and yylloc.
8840 (Error Recovery): Cross-reference `Action Features' when mentioning
8842 (Table of Symbols): In the yychar entry, don't call it the `current'
8844 In the yylloc and yylval entries, mention look-ahead usage.
8846 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8848 * tests/glr-regression.at: Update copyright year to 2006.
8850 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8852 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8853 use during nondeterministic operation to track which stacks have
8854 actually needed the current lookahead.
8855 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8856 Allocate, deallocate, resize, and otherwise shuffle space for
8857 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8858 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8859 appropriately during nondeterministic operation.
8860 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8861 members to store the current lookahead to be used by the deferred
8863 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8864 from which the RHS is taken. Set the lookahead members of the new
8865 yySemanticOption according to the lookahead status for stack yyk.
8866 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8867 yyaddDeferredAction.
8868 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8869 members of yySemanticOption before invoking yyuserAction, and then set
8870 them back to their current values afterward.
8871 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8872 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8873 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8874 titles for consistency.
8875 (Leaked merged semantic value if user action cuts parse): In order to
8876 suppress lint warnings, use arguments in merge function, and assign
8877 char value < 128 in main.
8878 (Incorrect lookahead during deterministic GLR): New test case.
8879 (Incorrect lookahead during nondeterministic GLR): New test case.
8881 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8883 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8884 !yyvaluep as signal that no semantic value is available to print.
8885 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8886 to print a semantic value.
8888 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8890 * tests/glr-regression.at: For consistency with my newer test cases,
8893 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8895 * data/glr.c (yyresolveValue): When merging semantic options, if at
8896 least one user action succeeds but a later one cuts the parse, then
8897 destroy the semantic value before returning rather than leaking it.
8898 (yyresolveStates): If a user action cuts the parse and thus
8899 yyresolveValue fails, ignore the (unset) semantic value rather than
8900 corrupting the yyGLRState, and empty the semantic options list since
8901 the user actions should have called all necessary destructors.
8902 Simplify code with YYCHK.
8903 * tests/glr-regression.at (Corrupted semantic options if user action
8904 cuts parse): New test case.
8905 (Undesirable destructors if user action cuts parse): New test case.
8906 Before applying any of this patch, this test case never actually failed
8907 for me... but only because the corrupted semantic options usually
8909 (Leaked merged semantic value if user action cuts parse): New test
8912 2006-01-05 Akim Demaille <akim@epita.fr>
8914 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8916 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8918 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8919 _MSC_VER. Problem reported by Cenzato Marco.
8920 (b4_c_function_def): Use it.
8921 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8923 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8924 than rolling our own.
8926 2006-01-04 Akim Demaille <akim@epita.fr>
8928 Also warn about non-used mid-rule values.
8929 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8931 (symbol_list_new): Adjust.
8932 * src/reader.c (symbol_typed_p): New.
8933 (grammar_rule_check): Use it.
8934 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8936 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8938 * tests/actions.at (Exotic Dollars): Adjust.
8940 2006-01-04 Akim Demaille <akim@epita.fr>
8942 * src/reader.c (grammar_midrule_action): If $$ is set in a
8943 mid-rule, move the `used' bit to its lhs.
8944 * tests/input.at (Unused values): New.
8945 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8947 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8949 * doc/bison.texinfo (Bison Options): Say more accurately what
8951 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8952 about declarations in the grammar when in Yacc mode, as POSIX does
8953 not require a diagnostic when the grammar uses extensions.
8955 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8957 Warn about dubious constructions like "%token T T".
8959 * src/symtab.h (struct symbol.declared): New member.
8960 * src/symtab.c (symbol_new): Initialize it to false.
8961 (symbol_class_set): New arg DECLARING, specifying whether
8962 this is a declaration that we want to warn about, if there
8963 is more than one of them. All uses changed.
8965 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8966 Allow multiple %union directives, whose contents concatenate.
8967 * src/parse-gram.y (grammar_declaration): Likewise.
8968 Use muscle_code_grow, so that we don't need stype_line any more.
8971 * src/muscle_tab.c (muscle_grow): Fix comment.
8973 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8974 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8975 Update copyright year to 2006.
8977 2006-01-03 Akim Demaille <akim@epita.fr>
8979 Have glr.cc pass (some of) the calc.at tests.
8980 * data/glr.cc (b4_parse_param_orig): New.
8981 (b4_parse_param): Improve its definition, and bound it more
8982 clearly in the skeleton.
8983 (b4_epilogue): Append, instead of prepending, in order to keep
8985 Simplify the generation of auxiliary functions: locations and
8986 purity are mandated.
8987 (b4_global_tokens_and_yystype): Honor it.
8988 * data/location.cc (c++.m4): Don't include it.
8989 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8991 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8993 Be sure to initialize the first position's filename.
8994 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8996 (AT_CHECK_CALC_GLR_CC): New.
8997 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8999 2006-01-02 Akim Demaille <akim@epita.fr>
9001 * src/output.c (output_skeleton): Don't hard wire the inclusion of
9003 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
9004 * data/glr.cc: Do not include stack.hh.
9006 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
9008 * data/glr.c: Reformat whitespace with tabs.
9009 (b4_lpure_formals): Remove this unused m4 macro.
9010 * tests/cxx-type.at: Reformat whitespace with tabs.
9011 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
9012 since it's a member. Rename type to isNterm for clarity.
9014 2005-12-29 Akim <akim@sulaco.local>
9016 Let glr.cc catch up with symbol_value_print.
9017 * data/glr.cc (b4_yysymprint_generate): Replace by...
9018 (b4_yy_symbol_print_generate): this.
9019 (yy_symbol_print, yy_symbol_value_print): Declare them.
9021 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9023 * src/location.h (boundary): Note that a line or column equal
9024 to INT_MAX indicates an overflow.
9025 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9026 (rule_length_overflow, increment_rule_length, add_column_width):
9028 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9029 (<SC_BRACED_CODE>"}"):
9030 Use increment_rule_length rather than incrementing it by hand.
9031 (adjust_location, handle_syncline): Diagnose overflow.
9032 (handle_action_dollar, handle_action_at):
9033 Fix bug with monstrosities like $-2147483648.
9034 Remove now-unnecessary checks.
9035 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9036 (convert_ucn_to_byte): Verify assumptions.
9037 (handle_syncline): New arg LOC. All callers changed.
9038 Don't store through a value derived from char const * pointer.
9040 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9043 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9045 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9046 Remove unnecessary forward static decls.
9048 2005-12-27 Akim Demaille <akim@epita.fr>
9050 * src/reader.c (grammar_current_rule_check): Also check that $$
9052 Take the rule to check as argument, hence rename as...
9053 (grammar_rule_check): this.
9054 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9056 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9057 (grammar_midrule_action, grammar_symbol_append): Now static.
9058 * tests/torture.at (input): Don't rely on the default action
9059 being always performed.
9060 * tests/calc.at: "Set" $$ even when the action is "cut" with
9062 * tests/actions.at (Exotic Dollars): Instead of using unused
9063 values, check that the warning is issued.
9065 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9067 * NEWS: Improve wording for unused-value warnings.
9069 2005-12-22 Akim Demaille <akim@epita.fr>
9071 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9072 (b4_yysymprint_generate): Rename as...
9073 (b4_yy_symbol_print_generate): this.
9074 Generate yy_symbol_print instead of yysymprint.
9075 Generate also yy_symbol_value_print, and use it.
9077 2005-12-22 Akim Demaille <akim@epita.fr>
9079 * NEWS: Warn about unused values.
9080 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9082 (symbol_list_n_get, symbol_list_n_used_set): New.
9083 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9084 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9085 * src/reader.c (grammar_current_rule_check): Check that values are
9087 * src/symtab.c (symbol_print): Accept 0.
9088 * tests/existing.at: Remove the type information.
9090 Remove useless actions (beware of mid-rule actions: perl -000
9091 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9092 * tests/actions.at (Exotic Dollars): Use unused values.
9093 * tests/calc.at: Likewise.
9094 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9097 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9100 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9102 Undo 2005-12-01 tentative license wording change. The wording is
9103 still being reviewed by the lawyers, and we don't want to wait for
9104 them before publishing a test release. For now, revert to the
9106 * NEWS: Undo 2005-12-01 change.
9107 * data/glr.c: Revert to previous license wording.
9108 * data/glr.cc: Likewise.
9109 * data/lalr1.cc: Likewise.
9110 * data/location.cc: Likewise.
9111 * data/yacc.c: Likewise.
9113 * NEWS: Reword %destructor vs YYABORT etc.
9114 * data/glr.c: Use American spacing, for consistency.
9115 * data/glr.cc: Likewise.
9116 * data/lalr1.cc: Likewise.
9117 * data/yacc.c: Likewise.
9118 * data/yacc.c: Reformat comments slightly.
9119 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9120 for consistency. Fix some spelling errors and reword recently-included
9122 * tests/cxx-type.at: Cast results of malloc, for C++.
9124 2005-12-21 Joel E. Denny <address@hidden>
9126 * tests/cxx-type.at: Construct a tree, count the parents of shared
9127 nodes, and free each node once and only once. Previously, the memory
9128 for semantic values was leaked instead.
9130 2005-12-21 Joel E. Denny <address@hidden>
9132 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9133 (yylval, yylloc): If pure, #define to yystackp->yyval and
9134 yystackp->yyloc similar to yychar and yynerrs.
9135 (yyparse): If pure, remove local yylval and yylloc. Add local
9136 yystackp to accommodate pure definitions of yylval and yylloc.
9137 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9138 yylvalp and yyllocp to &yylval and &yylloc.
9139 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9140 namespace. Previously, nerrs and char were missing, but lval and lloc
9142 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9143 yylvalp and yyllocp parameters since, if pure, these are now always
9144 accessible through yystackp. If not pure, they are still accessible
9146 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9147 `if (YYID (N))' to pacify lint.
9149 2005-12-21 Akim Demaille <akim@epita.fr>
9151 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9152 destroy the RHS symbols of a rule.
9153 * data/yacc.c (yylen): Initialize to 0.
9154 Keep its value to the number of items to possibly shift.
9155 In particular, a regular successful parse that ends on YYFINAL by
9156 a (internal) YYACCEPT must not have yylen != 0.
9157 (yyerrorlab, yyreturn): Pop the RHS.
9158 Reorder a bit to emphasize the `shifting' bits of code.
9159 (YYPOPSTACK): Now accept a number of items to pop.
9160 * data/lalr1.cc: Likewise.
9161 * data/glr.c: Formatting changes.
9162 Use goto instead of fall through.
9163 * doc/bison.texinfo (Destructor Decl): Complete.
9165 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9167 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9168 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9169 * djgpp/config.bat: Replace every occurence of the file name
9170 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9171 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9172 * djgpp/config.sed: Replace every occurence of the file name
9173 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9174 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9175 * djgpp/djunpack.bat: DJGPP specific file.
9176 * djgpp/fnchange.lst: DJGPP specific file.
9177 * djgpp/README.in: Add new information about how to unpack the bison
9178 source on MSDOS and other systems which have 8.3 file name restrictions
9179 using djunpack.bat and fnchange.lst.
9181 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9183 * bootstrap (build_cvs_prefix): Remove; unused.
9184 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9185 when getting gnulib.
9187 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9189 * data/glr.c: Reorder typedef declarations for structs to match order
9190 of struct declarations.
9191 Rename yystack everywhere to yystackp except in yyparse where it's not
9193 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9195 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9196 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9197 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9200 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9202 * tests/sets.at (Accept): Fix typos in regular expression used to
9203 sed out the final state number.
9205 Work around portability problem on Solaris 10: flex-generated
9206 files include <stdio.h> before <config.h>, which messes up
9207 because the latter defines __EXTENSIONS__. Address the problem
9208 by creating two new little files that include <config.h> first,
9209 then include the flex-generated files. Rewrite everyone else
9210 to include <config.h> first, as well.
9211 * lib/timevar.c: Always include "config.h".
9212 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9213 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9214 (EXTRA_bison_SOURCES): New macro.
9215 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9216 * src/system.h: Don't include config.h.
9217 * src/LR0.c: Include <config.h> first.
9218 * src/assoc.c: Likewise.
9219 * src/closure.c: Likewise.
9220 * src/complain.c: Likewise.
9221 * src/conflicts.c: Likewise.
9222 * src/derives.c: Likewise.
9223 * src/files.c: Likewise.
9224 * src/getargs.c: Likewise.
9225 * src/gram.c: Likewise.
9226 * src/lalr.c: Likewise.
9227 * src/location.c: Likewise.
9228 * src/main.c: Likewise.
9229 * src/muscle_tab.c: Likewise.
9230 * src/nullable.c: Likewise.
9231 * src/output.c: Likewise.
9232 * src/parse-gram.y: Likewise.
9233 * src/print.c: Likewise.
9234 * src/print_graph.c: Likewise.
9235 * src/reader.c: Likewise.
9236 * src/reduce.c: Likewise.
9237 * src/relation.c: Likewise.
9238 * src/state.c: Likewise.
9239 * src/symlist.c: Likewise.
9240 * src/symtab.c: Likewise.
9241 * src/tables.c: Likewise.
9242 * src/uniqstr.c: Likewise.
9243 * src/vcg.c: Likewise.
9245 * src/parse-gram.y: Fix minor problems uncovered by lint.
9246 (current_lhs, current_lhs_location): Now static.
9247 (current_assoc): Remove unused variable.
9249 Cleanups so that Bison-generated parsers have less lint.
9250 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9251 Prepend /*ARGSUSED*/, for lint's sake.
9252 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9253 definition if 'lint' is defined.
9254 (YYID): New macro (or function, if lint).
9255 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9256 * data/yacc.c: Likewise.
9257 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9258 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9259 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9261 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9262 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9263 Use YYID(0) rather than 0, for lint.
9264 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9265 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9267 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9269 * tests/glr-regression.at
9270 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9271 Close memory leak reported by twlevo.
9273 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9275 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9277 (yyparse): Iterate another stack in order to call user destructors.
9278 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9280 (Duplicated user destructor for lookahead): This test now is expected
9283 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9285 * NEWS: Document the following change.
9286 * data/yacc.c: Say "parser skeleton" rather than "file", since
9287 it's no longer just a file.
9288 * data/glr.c: Grant a special exception for C GLR parsers, that
9289 reads like the already-existing exception for C LALR(1) parsers.
9290 * data/glr.cc: Likewise.
9291 * data/lalr1.cc: Likewise.
9292 * data/location.cc: Likewise.
9293 * data/yacc.c: Reword the "written by" statement to clarify that
9294 it was the parser skeleton, not the entire output file.
9295 * data/glr.c: Written by Paul Hilfinger.
9296 * data/glr.cc: Written by Akim Demaille.
9297 * data/lalr1.cc: Likewise.
9299 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9301 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9302 Fix typos in previous change that broke 'make check'.
9303 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9305 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9306 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9307 We can revert this once things settle down.
9309 * src/conflicts.c (conflicts_print): Don't print file name twice
9310 when %expect fails because there were no conflicts.
9311 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9313 * tests/conflicts.at (%expect not enough, %expect too much):
9314 (%expect with reduce conflicts): Adjust to new behavior.
9316 2005-11-18 Akim Demaille <akim@epita.fr>
9318 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9320 * NEWS: Document this.
9321 * doc/bison.texinfo (Expect Decl): Likewise.
9323 2005-11-16 Akim Demaille <akim@epita.fr>
9325 Generalize the display of semantic values and locations in traces.
9326 * data/glr.c (yy_reduce_print): Fix indices (again).
9327 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9329 * data/lalr1.cc (yyreduce_print): Rename as...
9330 (yy_reduce_print): this.
9331 Display values and locations.
9332 * data/yacc.c (yy_reduce_print): Likewise.
9333 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9334 (yysymprint): Move higher to be visible from yy_reduce_print).
9336 * tests/calc.at: Adjust the expected length of the traces.
9338 2005-11-14 Akim Demaille <akim@epita.fr>
9340 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9341 from 1 to N, while values and location start at 0.
9342 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9344 2005-11-14 Akim Demaille <akim@epita.fr>
9346 * data/glr.c (yy_reduce_print): Fix the $ number.
9348 2005-11-14 Akim Demaille <akim@epita.fr>
9350 "Use" parse parameters.
9351 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9352 * data/glr.c, data/glr.cc: Use them.
9353 * data/glr.c (YYUSE): Have a C++ definition that supports
9356 2005-11-14 Akim Demaille <akim@epita.fr>
9358 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9360 2005-11-14 Akim Demaille <akim@epita.fr>
9363 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9365 2005-11-12 Akim Demaille <akim@epita.fr>
9367 Let position and location be PODs.
9368 * data/location.cc (position::initialize, location::initialize): New.
9369 (position::position, location::location): Define only if
9370 b4_location_constructors is defined.
9371 * data/lalr1.cc (b4_location_constructors): Define it for backward
9373 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9375 2005-11-12 Akim Demaille <akim@epita.fr>
9377 * data/lalr1.cc: Move the body of the ctor and dtor into the
9378 parser file (instead of the header).
9379 Wrap the implementations in a "namespace yy".
9381 2005-11-12 Akim Demaille <akim@epita.fr>
9383 Have glr.c include its header file when created.
9384 * data/glr.c (b4_shared_declarations): New.
9385 Output them verbatim in the parser if !%defines, otherwise
9386 output then in the header file, and include it instead.
9388 2005-11-11 Akim Demaille <akim@epita.fr>
9390 * data/glr.c: Comment changes.
9392 2005-11-11 Akim Demaille <akim@epita.fr>
9394 When yydebug, report semantic and location values for reductions.
9395 * data/glr.c (yy_reduce_print): Report the semantic values and the
9397 (YY_REDUCE_PRINT): Adjust.
9398 (yyglrReduce): Use them.
9399 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9400 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9401 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9404 2005-11-10 Akim Demaille <akim@epita.fr>
9406 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9407 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9408 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9410 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9412 * m4/cxx.m4, examples/Makefile.am: Don't build
9413 examples/calc++ if no C++ compiler is available. (trivial change)
9415 2005-11-09 Akim Demaille <akim@epita.fr>
9417 * src/scan-skel.l: Use a couple of asserts.
9419 2005-11-03 Akim Demaille <akim@epita.fr>
9421 In some (weird) cases, the final state number is incorrect.
9422 Reported by Alexandre Duret-Lutz.
9423 * src/LR0.c (state_list_append): Remove the computation of
9425 (save_reductions): Do it here.
9426 (get_state): Alpha conversion.
9427 (generate_states): Use a for loop.
9428 * src/gram.h (item_number_is_rule_number)
9429 (item_number_is_symbol_number): New.
9430 * src/state.c: Use assert.
9431 * src/system.h: Include assert.h.
9432 * tests/sets.at (Accept): New.
9434 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9436 * data/glr.c (yyfill): Adjust comment.
9437 (yyresolveAction): Initialize default location properly
9438 for empty right-hand sides.
9439 (yydoAction): Ditto.
9440 Add comment explaining apparently dead code.
9441 * tests/glr-regression.at
9442 (Incorrectly initialized location for empty right-hand side in GLR):
9445 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9447 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9448 gnulib when interrupted. This fixes some race conditions and
9449 works around some portability problems (one noted by Paul
9452 2005-10-22 Akim <akim@epita.fr>
9454 * Makefile.cfg: Adjust to config -> build-aux.
9457 2005-10-21 Akim Demaille <akim@epita.fr>
9459 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9461 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9462 * data/yacc.c (b4_Pure_if): Rename as...
9463 (b4_yacc_pure_if): this.
9464 (YY_SYMBOL_PRINT, yyparse): Adjust.
9465 * doc/bison.texinfo: Formatting changes.
9467 2005-10-21 Akim Demaille <akim@epita.fr>
9469 Finish the transition config -> build-aux.
9470 * configure.ac, Makefile.am: Use build-aux.
9471 * config/prev-version, config/announce-gen, config/Makefile.am:
9473 * build-aux/prev-version, build-aux/announce-gen,
9474 * build-aux/Makefile.am: here.
9476 2005-10-14 Akim Demaille <akim@epita.fr>
9478 * examples/calc++/test: Use set -x only when VERBOSE.
9480 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9482 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9483 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9485 2005-10-13 Akim Demaille <akim@epita.fr>
9487 * src/scan-skel.l: Output the base name parts of the parser and
9489 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9491 Use this to exercise C++ outputs in subdirs.
9492 Reported by Oleg Smolsky.
9494 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9496 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9497 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9498 Problem reported by John P. Hartmann.
9499 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9502 2005-10-12 Akim Demaille <akim@epita.fr>
9504 * src/parse-gram.y (version_check): Exit 63 to please missing
9505 (stands for "version mismatch).
9506 * tests/input.at, doc/bison.texinfo: Adjust.
9508 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9510 Work around portability problems with Visual Age C compiler
9511 (xlc and xlC_r) reported by John P. Hartmann.
9512 * data/location.cc (initial_column, initial_line): Remove.
9513 All uses replaced by 0 and 1.
9514 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9515 that xlc complains about.
9516 * src/scan-skel.l (skel_wrap): Likewise.
9517 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9519 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9520 __STDC_VERSION__. Use it everywhere instead of looking at
9521 __STDC__ and __cplusplus.
9523 2005-10-10 Akim Demaille <akim@epita.fr>
9525 * examples/calc++/test: Be quiet unless VERBOSE.
9527 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9529 * data/c.m4 (yydestruct, yysymprint):
9530 Use YYUSE instead of casting to void.
9531 * data/glr.c (YYUSE): New macro.
9532 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9533 Use it instead of rolling our own.
9534 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9536 Use /*CONSTCOND*/ to suppress lint warnings.
9537 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9538 (YY_STACK_PRINT): Use 'false' not '0'.
9540 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9541 * data/yacc.c (YYUSE): New macro.
9542 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9543 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9544 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9547 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9548 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9550 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9552 Undo the parts of the unlocked-I/O change that substituted
9553 putc or puts for printf. This might hurt performance a bit,
9554 but some people prefer the printf style.
9555 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9556 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9557 All uses replaced by YYFPRINTF and YYDPRINTF.
9558 * data/yacc.c: Likewise.
9559 * lib/bitset.c (bitset_print): Likewise.
9560 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9562 * lib/lbitset.c (debug_lbitset): Likewise.
9563 * src/closure.c (print_firsts, print_fderives): Likewise.
9564 * src/gram.c (grammar_dump): Likewise.
9565 * src/lalr.c (look_ahead_tokens_print): Likewise.
9566 * src/output.c (escaped_output): Likewise.
9567 (user_actions_output): Break apart two printfs.
9568 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9569 * src/reduce.c (reduce_print): Likewise.
9570 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9571 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9573 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9574 Use assignments rather than casts-to-void to suppress
9575 unused-variable warnings. This pacifies 'lint'.
9576 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9577 unused-variable warnings.
9579 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9581 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9583 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9585 Use unlocked I/O for a minor performance improvement on hosts like
9586 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9587 is to use the gnlib unlocked-io module, and to prefer putc and
9588 puts to printf when either will work (since the latter doesn't
9589 come in an unlocked flavor).
9590 * bootstrap (gnulib_modules): Add unlocked-io.
9591 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9592 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9593 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9594 and similarly for puts and putc and printf.
9595 * data/yacc.c: Likewise.
9596 * lib/bitset.c (bitset_print): Likewise.
9597 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9598 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9600 * lib/lbitset.c (debug_lbitset): Likewise.
9601 * src/closure.c (print_firsts, print_fderives): Likewise.
9602 * src/gram.c (grammar_dump): Likewise.
9603 * src/lalr.c (look_ahead_tokens_print): Likewise.
9604 * src/output.c (escaped_output): Likewise.
9605 (user_actions_output): Coalesce two printfs.
9606 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9607 * src/reduce.c (reduce_print): Likewise.
9608 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9609 * src/system.h: Include unlocked-io.h rather than stdio.h.
9611 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9612 this confuses xgettext.
9614 2005-10-02 Akim Demaille <akim@epita.fr>
9616 * bootstrap (gnulib_modules): Add strverscmp.
9617 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9618 * m4/.cvsignore: Add strverscmp.m4.
9619 * src/parse-gram.y (%require): New token, new rule.
9620 (version_check): New.
9621 * src/scan-gram.l (%require): Adjust.
9622 * tests/input.at (AT_REQUIRE): New.
9624 * doc/bison.texinfo (Require Decl): New.
9625 (Calc++ Parser): Use %require.
9627 2005-10-02 Akim Demaille <akim@epita.fr>
9629 * data/location.cc: New.
9631 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9632 Akim Demaille <akim@epita.fr>
9634 Make sure -odir/foo.cc creates dir/location.hh etc.
9635 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9636 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9637 (spec_defines_file): Now const.
9639 (short_base_name): Remove.
9640 * src/files.c: Adjust.
9641 (dirname.h): Include.
9642 (base_name): Don't prototype it.
9643 (finput): Remove, duplicates gram_in.
9644 (full_base_name, short_base_name): Replace by...
9645 (all_but_ext, all_but_tab_ext): these.
9646 (compute_base_names): Rename as...
9647 (compute_file_name_parts): this.
9648 Update to compute the new variables, including dir_prefix.
9649 Adjust dependencies.
9650 * src/output.c (prepare): Output them.
9651 * src/reader.c: Adjust to use gram_in, not finput.
9652 * src/scan-skel.l (@dir_prefix@): New.
9654 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9656 * lib/subpipe.c: New function end_of_output_subpipe() added
9657 to allow support for non-posix systems. This is a no-op function
9660 * lib/subpipe.h: New function end_of_output_subpipe() added
9661 to allow support for non-posix systems. This is a no-op function
9664 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9665 handle the lack of pipe/fork functionality on non-posix systems.
9667 * djgpp/Makefile.maint: DJGPP specific file.
9669 * djgpp/README.in: DJGPP specific file.
9671 * djgpp/config.bat: DJGPP specific configuration file.
9673 * djgpp/config.sed: DJGPP specific configuration file.
9675 * djgpp/config.site: DJGPP specific configuration file.
9677 * djgpp/config_h.sed: DJGPP specific configuration file.
9679 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9681 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9683 2005-10-02 Akim Demaille <akim@epita.fr>
9685 * data/location.cc: New, extract from...
9686 * data/lalr1.cc: here.
9687 (location.hh): Include it after the user prologue, in case the
9688 filename type is defined by the user.
9689 Forward declation location and position before the pre-prologue.
9690 (yyresult_): Rename as...
9691 (yyresult): this, it's a local variable, not an attribute.
9692 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9694 2005-10-01 Akim Demaille <akim@epita.fr>
9696 * examples/extexi: Restore the #line generation.
9698 2005-09-30 Akim Demaille <akim@epita.fr>,
9699 Alexandre Duret-Lutz <adl@gnu.org>
9701 Move the token type and YYSTYPE in the parser class.
9702 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9703 (parser::token): New, from the moved free definition of tokens.
9704 (parser::semantic_value): Now a full definition instead of an
9705 indirection to YYSTYPE.
9706 (b4_post_prologue): No longer included in the header file, but
9707 in the implementation file.
9708 * doc/bison.texi (C+ Language Interface): Update.
9709 * src/parse-gram.y: Support unary %define.
9710 * tests/actions.at: Define global_tokens_and_yystype for backward
9711 compatibility until we update the tests.
9712 * tests/calc.at: Idem.
9713 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9714 to simplify the code.
9716 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9718 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9719 Ah, the good old days! Problem reported by Peter Klein.
9720 * bootstrap (gnulib_modules): Add strerror, strtoul.
9721 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9722 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9724 2005-09-29 Akim Demaille <akim@epita.fr>
9726 * data/c.m4 (b4_error_verbose_if): New.
9727 * data/lalr1.cc: Use it.
9728 (YYERROR_VERBOSE_IF): Remove.
9729 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9730 parser members, replaced by...
9731 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9733 (yysyntax_error_): Takes the state number as argument.
9734 (yyreduce_print_): Use the argument yyrule, not the former
9737 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9739 * bootstrap (gnulib_modules): Add verify.
9740 * lib/.cvsignore: Add verify.h.
9741 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9742 * src/system.h (verify): Remove.
9743 Include verify.h instead.
9744 * src/tables.c (tables_generate): Use new API for 'verify'.
9746 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9748 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9749 local variables whose names begin with 'yy'.
9750 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9751 Trivial changes from Joel E. Denny.
9753 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9755 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9756 don't use alloca any more.
9758 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9759 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9760 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9761 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9762 to match yacc.c, to test more hosts.
9764 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9766 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9767 doesn't affect behavior.
9768 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9770 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9771 This works a bit better with glibc, if user code has already included
9773 * doc/bison.texinfo (Bison Parser): Document that users can't
9774 arbitrarily use malloc and free for other purposes. Document
9775 that <alloca.h> and <malloc.h> might be included.
9776 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9777 user must declare alloca.
9779 * HACKING (release): Forwarn the Translation Project about
9782 2005-09-20 Akim Demaille <akim@epita.fr>
9784 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9786 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9788 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9789 (YYSTACK_ALLOC_MAXIMUM): Use it.
9790 (yysyntax_error): New function.
9791 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9792 multiple syntax errors are reported, and alloca is being used.
9793 Instead, reallocate buffers twice as big each time, so that
9794 we waste at most half the allocated memory. Start with a small
9795 (128-byte) buffer that will suffice in most cases anyway.
9796 Use yysyntax_error to do most of the work.
9798 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9799 yynerrs is the number of errors reported, not the number of
9802 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9803 Mark it as expected to fail.
9804 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9805 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9806 Don't start user-code symbols with "yy", to avoid name space problems.
9808 2005-09-19 Akim Demaille <akim@epita.fr>
9810 Remove the traits, failed experiment.
9811 It never proved useful, and anyway because of the current
9812 definition, it was not possible to have several specialization of
9813 this traits, making it useless.
9814 * data/lalr1.cc (yy:traits): Remove.
9815 Inline its definitions in the parser class.
9817 2005-09-19 Akim Demaille <akim@epita.fr>
9819 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9820 least Mac OSX with a /usr/local install of gettext.
9822 2005-09-19 Akim Demaille <akim@epita.fr>
9824 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9825 and yytoken for similarity with the other skeletons.
9827 2005-09-19 Akim Demaille <akim@epita.fr>
9829 * NEWS, configure.ac: update version number to 2.1a.
9831 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9833 * NEWS: Version 2.1.
9835 * NEWS: Remove notice of yytname change, since it was never in an
9837 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9839 * src/output.c (prepare): Likewise.
9840 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9841 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9842 is not defined. This is an awful hack, but it's enough for now.
9843 All callers changed.
9844 * tests/glr-regression-at (make_value): Args are const pointers now,
9845 to avoid GCC warning.
9846 (Duplicated user destructor for lookahead): New test. Currently
9847 skipped. It fails on my host but I'm not sure it'll always fail.
9849 2005-09-16 Akim Demaille <akim@epita.fr>
9851 * src/symtab.h (struct symbol): Declare the printer and destructor
9852 as const, to avoid accidental calls to free.
9853 (symbol_destructor_set, symbol_printer_set): Adjust.
9854 * src/symtab.c: Adjust.
9856 2005-09-16 Akim Demaille <akim@epita.fr>
9858 * data/c.m4 (b4_token_enums): New.
9859 (b4_token_defines): Rename as...
9860 (b4_token_enums_defines): this.
9861 (b4_token_defines): New, output only the #defines.
9862 * data/yacc.c, data/glr.c: Adjust.
9863 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9864 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9867 2005-09-16 Akim Demaille <akim@epita.fr>
9869 * data/lalr1.cc (yylex_): Remove, inline its code.
9870 (yyreport_syntax_error_): Remove, replaced by...
9871 (yysyntax_error_): this which returns a string and leaves to the
9872 caller the call to the users' error function.
9873 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9874 Move from members of the parser object...
9875 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9876 to local variables of the parse function.
9878 2005-09-16 Akim Demaille <akim@epita.fr>
9880 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9881 since it's in Bison's name space.
9883 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9885 * data/glr.c (yyresolveValue): Add default case to pacify
9886 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9888 * NEWS: Document when yyparse started to return 2.
9889 * doc/bison.texinfo (Parser Function): Document when yyparse
9892 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9893 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9895 (class position): file_name -> filename (reverting). All uses changed.
9897 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9899 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9900 do anything if $@ exists. This reverts part of the 2005-07-07
9903 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9905 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9906 contains obsolete information and isn't worth distributing as a
9907 separate file anyway.
9908 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9909 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9910 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9911 (yyparse): Abort if user code uses longjmp to throw an unexpected
9914 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9916 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9917 Suggested by twlevo@xs4all.nl.
9919 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9920 This avoids a diagnostic from gcc -Wswitch-enum.
9921 Problem reported by twlevo@xs4all.nl.
9923 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9924 standards. Use "file name" or "file" or "name", depending on
9926 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9927 not to hack/foo.tab.c.
9928 (Calc++ Top Level): 2nd arg of main is not const.
9929 * data/glr.c: b4_filename -> b4_file_name.
9930 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9932 (class position): filename -> file_name. All uses changed.
9933 * data/yacc.c: b4_filename -> b4_file_name.
9934 * lib/bitset.h: filename -> file_name in local vars.
9935 * lib/bitset_stats.c: Likewise.
9936 * src/files.c: Likewise.
9937 * src/scan-skel.l ("@output ".*\n): Likewise.
9938 * src/files.c (file_name_split): Renamed from filename_split.
9939 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9941 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9943 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9944 to accommodate latest gnulib.
9946 * tests/glr-regression.at (Duplicate representation of merged trees):
9947 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9949 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9952 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9954 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9955 All uses changed. Invoke user destructor after an error during a
9956 split parse (trivial change from Joel E. Denny).
9958 * tests/glr-regression.at
9959 (User destructor after an error during a split parse): New test case.
9960 Problem reported by Joel E. Denny in:
9961 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9963 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9965 * README-cvs: Give URLs for recommended tools.
9966 Mention Gzip version problem, and bootstrapping issues.
9967 Remove troubleshooting section, as it's somewhat obsolete.
9969 * bootstrap (no_cache): New var, to accommodate different wget
9970 variants. Use it instead of '-C off'. Problem reported by
9973 * data/glr.c (yydestroyStackItem): New function.
9974 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9975 debugging information. Problem reported by Joel E. Denny.
9977 2005-08-25 Akim Demaille <akim@epita.fr>
9979 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9981 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9983 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9984 Don't invoke destructor on unresolved entries.
9985 * tests/glr-regression.at
9986 (User destructor for unresolved GLR semantic value): New test case.
9987 Problem reported by Joel E. Denny in:
9988 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9990 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9992 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9994 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9995 lib-prefix.m4, po.m4.
9997 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9998 in yydestruct diagnostic, since it might not be an error.
9999 Problem reported by Joel Denny near end of
10000 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10001 * data/lalr1.cc (yyerturn): Likewise.
10002 * data/yacc.c (yyreturn): Likewise.
10003 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
10005 * src/files.c: Remove obsolete FIXME comment.
10007 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
10008 with the other templates, and to fix bogus run-on messages such
10009 as the one reported at the end of
10010 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10011 All callers changed to avoid the newline.
10012 (yyprocessOneStack): Output two lines rather than one, to accommodate
10013 the above change. This changes the debug output format slightly.
10015 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10016 reported by Joel E. Denny in
10017 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10019 * tests/glr-regression.at (Duplicate representation of merged trees):
10020 New test, from Joel E. Denny in:
10021 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10022 * THANKS: Add Joel E. Denny.
10024 * configure.ac (AC_INIT): Bump to 2.0c.
10026 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10028 * NEWS: Version 2.0b.
10030 * Makefile.am (SUBDIRS): Put examples before tests, so that
10031 "make check" doesn't finish with "All 1 tests passed".
10033 * tests/regression.at (Token definitions): Don't rely on
10034 AT_PARSER_CHECK for data that contains backslashes. It currently
10035 uses 'echo', and 'echo' isn't portable if its argument contains
10036 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10037 that the byte '\0xff' is not printable in the C locale; it is,
10038 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10039 not printable, so use '\0x81' to test.
10041 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10042 version of GCC, since the macro is used with non-GCC compilers.
10044 Fix core dump reported by Pablo De Napoli in
10045 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10046 * tests/regression.at (Invalid inputs with {}): New test.
10047 * src/parse-gram.y (token_name): Translate type before using
10050 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10051 the user's name space. All uses changed to __attribute__
10053 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10054 Add __attribute__ ((__noreturn__)).
10056 * etc/clcommit: Remove. We weren't using it, and it failed
10057 "make maintainer-distcheck".
10058 * Makefile.maint: Merge from coreutils.
10059 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10060 (syntax-check-rules): Change list of rules as described below.
10061 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10062 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10063 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10064 (sc_trailing_space): New rules.
10065 (sc_xalloc_h_in_src): Remove.
10066 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10067 (sc_space_tab, sc_error_exit_success, sc_changelog):
10068 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10069 (makefile-check, po-check, author_mark_check):
10070 (makefile_path_separator_check, copyright-check):
10071 Use grep -n, to make it easier to find violations.
10072 Use CVS_LIST and CVS_LIST_EXCEPT.
10073 (header_regexp, h_re): Remove.
10075 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10076 (my-distcheck): Use more-modern GCC flags.
10077 (signatures, %.asc): Remove.
10078 (rel-files, announcement): Remove signatures.
10079 Restore old updating code, even though we don't use it, so
10080 that we're the same as coreutils.
10081 (alpha, beta, major): Depend on news-date-check.
10082 Make the upload commands.
10084 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10085 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10086 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10087 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10088 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10089 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10090 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10091 * tests/sets.at: Likewise.
10093 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10094 we comment out the Autoconf version number.
10095 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10096 it's error-prone and "make maintainer-distcheck" rejects it.
10098 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10099 Indent calls to "error" to pacify "make maintainer-distcheck",
10100 when the calls are not intended to be translated.
10101 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10103 * src/Makefile.am (DEFS): Use +=, to pacify
10104 "make maintainer-distcheck".
10105 (bison_SOURCES): Add scan-skel.h.
10106 (sc_tight_scope): New rule, from coreutils.
10108 * src/files.c (src_extension, header_extension):
10109 Now static, not extern.
10110 * src/getargs.c (short_options): Likewise.
10111 * src/muscle_tab.c (muscle_table): Likewise.
10112 * src/parse-gram.y (current_class, current_type, current_prec):
10114 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10115 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10116 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10117 void, to avoid warning when NLS is disabled.
10118 * src/output.c: Include scan-skel.h.
10119 (scan_skel): Remove decl, since scan-skel.h does this.
10121 Indent calls to "error" to pacify "make maintainer-distcheck".
10122 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10123 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10124 "make maintainer-distcheck".
10125 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10126 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10127 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10128 (skel_lex_destroy, scan_skel): Move these decls to...
10129 * src/scan-skel.h: New file.
10130 * src/uniqstr.c (uniqstr_assert):
10131 Indent calls to "error" to pacify "make maintainer-distcheck".
10133 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10136 * tests/torture.at: Revamp to avoid misuse of atoi that
10137 "make maintainer-distcheck" complained about.
10139 * examples/extexi (message): Don't print a message more than once,
10140 and omit line-number decoration that makes Emacs compile think
10141 that informative messages are worth worrying about.
10143 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10145 * configure.ac: Update version number.
10147 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10149 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10150 autogenerated by the maintainer.
10151 * examples/calc++/.cvsignore: Add *.yy.
10153 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10154 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10155 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10157 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10159 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10160 from maintainer-distcheck about casting the argument of 'free'.
10162 * NEWS: Mention recent yytname changes.
10163 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10165 * bootstrap: For translations that have not yet been upgraded to
10166 the new runtime-po domain, prime the pump by extracting the
10167 relevant strings from the obsolete translations. This code can be
10168 removed once the bison-runtime domain has been translated by each
10171 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10172 now that token names are already quoted.
10174 Fix problem reported by Anthony Heading.
10175 * data/glr.c (YYTOKEN_TABLE): New macro.
10176 (yytname): Define if YYTOKEN_TABLE.
10177 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10178 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10179 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10180 * src/output.c (prepare_symbols): Output token_table_flag.
10182 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10184 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10185 again if the first call fails.
10187 * data/glr.c (yytnamerr): New function.
10188 (yyreportSyntaxError): Use it to dequote most string literals.
10189 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10190 with other skeletons. All uses changed.
10191 (yytnameerr_): New function.
10192 (yyreport_syntax_error): Use it to dequote most string literals.
10193 * data/yacc.c (yytnamerr): New function.
10194 (yyerrlab): Use it to decode most string literals.
10195 * doc/bison.texinfo (Decl Summary, Calling Convention):
10196 Clarify quoting convention of yytname.
10197 * src/output.c (prepare_symbols): Quote all names. This undoes
10198 the 2005-04-17 change, which is now accomplished (mostly) via
10199 changes in the parsers as described above.
10200 * tests/regression.at (Token definitions, Web2c Actions):
10201 Undo most 2005-04-17 change here, too.
10203 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10205 Fix more problems reported by twlevo@xs4all.nl.
10206 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10207 remove trailing spaces. This loses the exit status of ./types,
10208 and isn't needed since ./types shouldn't be emitting trailing
10210 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10211 as the stack isn't valid in that case.
10213 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10214 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10215 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10216 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10218 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10219 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10220 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10223 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10224 overly-picky compilers that reject 'char *foo = "bar";'.
10226 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10227 to FILE * parameter, not to stderr. This fixes a typo introduced
10228 in the 2005-07-12 change.
10230 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10231 warnings from GCC 4.
10233 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10234 (yyglrShiftDefer, yysplitStack):
10235 Remove unused parameters b4_pure_formals. All uses changed.
10236 (yyglrShift): Remove unused parameters b4_user_formals.
10238 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10240 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10242 Destructor cleanups and regularization among the three skeletons.
10243 * NEWS: Document the behavior changes.
10244 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10245 stack before failing, as the cleanup code will do it for us now.
10246 * data/lalr1.cc (yyerrlab): Likewise.
10247 * data/glr.c (yyparse): Pop everything off the stack before
10248 freeing it, so that destructors get called properly.
10249 * data/lalr1.cc (yyreturn): Likewise.
10250 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10251 This is more consistent.
10252 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10253 why destructors might be called. 1.875 -> 2.1.
10254 (Destructor Decl, Decl Summary, Table of Symbols):
10255 Some English-language cleanups for %destructor.
10256 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10257 Add output line for destructor of start symbol.
10258 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10259 because of that same extra output line.
10261 * NEWS: Document minor wording changes in diagnostics of
10262 Bison-generated parsers.
10263 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10264 Remove unused formals. All uses changed.
10265 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10266 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10267 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10268 Rename yyoverflowab to yyexhaustedlab.
10269 When memory exhaustion occurs during syntax-error reporting,
10270 report it separately rather than in a single diagnostic; this
10272 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10273 (Memory Exhausted): Renamed from Parser Stack Overflow.
10274 Revamp wording slightly to prefer "memory exhaustion".
10275 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10277 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10279 Add i18n support to the GLR skeleton. Partially fix the C++
10280 skeleton; a C++ expert needs to finish this. Remove debugging
10281 msgids; there's little point to having them translated, since they
10282 can be understood only by someone who can read the
10283 (English-language) source code.
10285 Generate runtime-po/bison-runtime.pot automatically, so that we
10286 don't have to worry about garbage getting in that file. We'll
10287 make sure after the next official release that old msgids don't
10289 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10291 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10292 Now auto-generated.
10293 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10294 Fix typos in explanations of the runtime file.
10295 * bootstrap: Change gettext keyword from YYI18N to YY_.
10296 Use standard Makefile.in.in in runtime-po, since we'll arrange
10297 for backward-compatible bison-runtime.po files in a different way.
10298 * data/glr.c (YY_): New macro, from yacc.c.
10299 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10300 Translate messages intended for users.
10301 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10302 the wording in the other skeletons. We don't know that the memory
10304 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10305 Use same method that yacc.c uses.
10306 Don't translate debugging messages.
10307 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10308 it doesn't work (yet), and requires C++ expertise to fix.
10309 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10310 Move defn to a more logical place, to be consistent with other
10312 Don't translate debugging messages.
10313 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10314 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10315 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10316 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10318 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10319 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10321 * tests/glr-regression.at (Badly Collapsed GLR States):
10323 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10324 yylex should return 0 at EOF rather than aborting.
10326 Improve tests for stack overflow in GLR parser.
10327 Problem reported by twlevo@xs4all.nl.
10328 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10330 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10331 can handle the problem.
10332 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10333 (yyparse): New local variable yyresult to record the result.
10334 Use result of setjmp to set it, rather than storing itinto
10336 (yyDone): Remove label.
10337 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10338 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10339 if YYABORT is used).
10340 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10341 yyparse status; put status > 1 into diagnostic.
10342 Check that status==2 works.
10343 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10344 Use exit status 3 for failure to open (which shouldn't happen).
10346 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10348 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10349 1 on syntax error; just let yyparse do its thing.
10350 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10351 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10352 (Exploding the Stack Size with Alloca):
10353 (Exploding the Stack Size with Malloc):
10354 Expect exit status 2, not 1, since the parser is supposed to blow
10355 its stack. Problem reported by twlevo@xs4all.nl.
10357 * data/glr.c (yyparse): Don't assume that the initial calls
10358 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10359 Print a stack-overflow message and fail instead.
10360 Initialize the line-number information before creating the stack,
10361 so that the stack-overflow message can report line zero safely.
10363 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10365 Fix problems reported by twlevo@xs4all.nl.
10366 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10367 (yyuserMerge): Provide a default case if b4_mergers is empty.
10368 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10369 * tests/glr-regression.at
10370 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10371 Add casts to pacify C++ compilers.
10372 * tests/glr-regression.at (Improper merging of GLR delayed action
10373 sets): Declare yylex before using it.
10374 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10375 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10376 test for valgrind; valgrind is independent of g++.
10377 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10378 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10379 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10380 Use a destructor, so that we can expand the stack. Change
10381 YYSTYPE to char * so that we can free it. Cast result of malloc.
10383 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10385 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10386 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10388 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10390 * PACKAGING: New file, suggested by Bruno Haible and taken from
10391 similar wording in gettext's PACKAGING file.
10392 * NEWS: Mention PACKAGING.
10393 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10395 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10397 * NEWS: Document recent i18n improvements.
10398 * bootstrap: Get runtime translations into runtime-po.
10399 Create runtime-po files automatically, if possible.
10400 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10401 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10402 does not infringe on the user's name space.
10403 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10404 * doc/bison.texinfo (Internationalization): Revamp the English
10405 and Texinfo syntax a bit, to try to make it clearer.
10406 (Bison Options, Option Cross Key): Mention --print-localedir.
10407 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10408 YYENABLE_NLS. Quote a bit more.
10409 * runtime-po/.cvsignore: New file.
10410 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10411 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10412 * runtime-po/quot.sed: Likewise.
10413 * runtime-po/boldquot.sed: Likewise.
10414 * runtime-po/en@quot.header: Likewise.
10415 * runtime-po/en@boldquot.header: Likewise.
10416 * runtime-po/insert-header.sin: Likewise.
10417 * runtime-po/remove-potcdate.sin: Likewise.
10418 * runtime-po/Makevars: Likewise.
10419 * runtime-po/LINGUAS: Likewise.
10420 * runtime-po/de.po: Likewise; we will rely on the translation project
10421 to maintain this, so "bootstrap" should get it.
10422 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10424 * src/main.c (main): Bind the bison-runtime domain, too.
10426 2005-07-12 Bruno Haible <bruno@clisp.org>
10428 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10429 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10430 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10431 * runtime-po: New directory.
10432 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10433 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10434 * runtime-po/Rules-quot: New file, copied from po/.
10435 * runtime-po/quot.sed: Likewise.
10436 * runtime-po/boldquot.sed: Likewise.
10437 * runtime-po/en@quot.header: Likewise.
10438 * runtime-po/en@boldquot.header: Likewise.
10439 * runtime-po/insert-header.sin: Likewise.
10440 * runtime-po/remove-potcdate.sin: Likewise.
10441 * runtime-po/Makevars: New file.
10442 * runtime-po/POTFILES.in: New file.
10443 * runtime-po/LINGUAS: New file.
10444 * runtime-po/bison-runtime.pot: New file.
10445 * runtime-po/de.po: New file.
10446 * m4/bison.m4: New file.
10447 * Makefile.am (SUBDIRS): Add runtime-po.
10448 (aclocaldir, aclocal_DATA): New variables.
10449 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10451 * src/getargs.c (usage): Document --print-localedir option.
10452 (PRINT_LOCALEDIR_OPTION): New enum item.
10453 (long_options): Add --print-localedir option.
10454 (getargs): Handle --print-localedir option.
10455 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10456 (Internationalization): New section.
10458 2005-07-12 Akim Demaille <akim@epita.fr>
10460 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10461 for consistency with the rest of the code.
10462 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10465 2005-07-12 Akim Demaille <akim@epita.fr>
10467 * src/parse-gram.y: Use %printer instead of YYPRINT.
10469 2005-07-12 Akim Demaille <akim@epita.fr>
10471 * src/symtab.h, src/symtab.c (symbol_print): New.
10472 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10473 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10475 2005-07-12 Akim Demaille <akim@epita.fr>
10477 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10478 b4_at_dollar and b4_dollar_dollar.
10480 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10482 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10483 and Pennello's paper.
10485 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10487 * data/yacc.c (yyparse): Undo previous patch. Instead,
10488 set yylsp[0] and yyvsp[0] only if the initial action
10489 sets yylloc and yylval, respectively.
10491 * data/yacc.c (yyparse): In the initial action, set
10492 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10493 This avoids the use of undefined variables if the initial
10494 action does not set yylloc and/or yylval.
10496 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10498 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10499 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10500 Remove from CVS. These files are automatically generated.
10501 * examples/extexi: Clarify that this file is now part of Bison,
10502 not GNU M4, and that it works with any POSIX-compatible Awk.
10503 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10504 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10505 so that we also get calc++-parser.yy. Geneate it.
10506 Use $(AWK), not gawk, since any conforming Awk will do.
10507 Put comment before action, since older 'make' can't handle comment
10509 $(BUILT_SOURCES): List all built sources, not just some of them.
10510 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10511 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10512 $($(calc_sources_generated)): Remove unnecessary test for existence
10513 of target. (This had a shell syntax error anyway; a stray "x".)
10514 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10516 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10518 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10519 implied by the other modules.
10521 2005-07-06 Akim Demaille <akim@epita.fr>
10523 Bind examples/calc++ to the package.
10524 * examples/calc++/Makefile: Remove, replaced by...
10525 * examples/calc++/Makefile.am: ... this new file.
10526 * examples/calc++/test: Remove input.
10527 * examples/calc++/compile: Remove.
10528 * examples/Makefile.am: New.
10529 * configure.ac, Makefile.am: Adjust.
10530 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10532 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10534 * data/glr.c (yyFail): Drastically simplify; since the format argument
10535 never had any % directives, we can simply pass it to yyerror.
10536 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10537 be modified later, as that is the usual style in glr.c.
10538 Problems reported by Paul Hilfinger.
10540 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10541 and size overflow errors.
10542 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10543 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10544 (YYSIZEMAX): New macro.
10545 (yystpcpy): New function, taken from yacc.c.
10546 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10547 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10548 so that we don't have to maintain their signatures.
10549 (yyFail): Check for buffer overflow, by using vsnprintf rather
10550 than vsprintf. Allocate a bigger buffer if possible.
10551 Report an error if buffer allocation fails.
10552 (yyStackOverflow): New function.
10553 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10554 the initialization was successful. It might fail if storage was
10556 (yyexpandGLRStack): Add more checks for storage allocation failure.
10557 Use yyStackOverflow to report failures.
10558 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10559 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10560 Don't assume stack number fits in int.
10561 (yysplitStack): Check for storage allocation failure.
10562 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10563 can print diagnostics on storage allocation failure. All callers
10565 (yyresolveValue): Use yybool for boolean.
10566 (yyreportSyntaxError): Check for size-calculation overflow.
10567 This code is taken from yacc.c.
10568 (yyparse): Check for storage allocation errors when allocating
10571 2005-07-05 Akim Demaille <akim@epita.fr>
10573 Extract calc++ from the documentation.
10574 * doc/bison.texinfo (Calc++): Add the extraction marks.
10575 * examples/extexi: New, from the aborted GNU Programming 2E.
10576 Separate the different paragraph of a file with empty lines.
10577 * examples/Makefile: Use it to extract the whole calc++ example.
10579 2005-06-24 Akim Demaille <akim@epita.fr>
10581 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10584 2005-06-22 Akim Demaille <akim@epita.fr>
10586 * doc/bison.texinfo (C++ Language Interface): First stab.
10587 (C++ Parsers): Remove.
10589 2005-06-22 Akim Demaille <akim@epita.fr>
10591 * data/lalr1.cc (yylex_): Honor %lex-param.
10593 2005-06-22 Akim Demaille <akim@epita.fr>
10595 Start a set of simple examples.
10596 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10597 * examples/calc++/calc++-driver.hh,
10598 * examples/calc++/calc++-parser.yy,
10599 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10600 * examples/calc++/compile, examples/calc++/test: New.
10602 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10604 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10605 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10606 which stems from the 2005-05-27 patch.
10608 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10610 * data/glr.c: Modify treatment of unused parameters to permit use
10611 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10613 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10615 Fix infringement on user name space reported by Janos Zoltan Szabo.
10616 * data/yacc.c (yyparse): strlen -> yystrlen.
10618 2005-05-30 Akim Demaille <akim@epita.fr>
10620 * data/lalr1.cc (_): New.
10621 Translate the various messages.
10623 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10625 Fix infringement on user name space reported by Bruno Haible.
10626 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10627 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10628 the user's name space.
10629 (alloca): Include <stdlib.h> to get it, if it's not built in.
10630 (YYMALLOC, YYFREE): Define only if needed.
10631 (malloc, free): Declare, but only if needed, as this infringes on
10632 the user name space.
10634 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10636 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10637 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10639 * lib/ebitset.c (min, max): Undef before defining.
10640 * lib/vbitset.c (min, max): Likewise.
10641 * lib/subpipe.c (create_subpipe): Save local variables in case
10642 vfork clobbers them.
10644 2005-05-24 Bruno Haible <bruno@clisp.org>
10646 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10647 error message syntax used by gcc-4.0.
10649 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10651 * README: Mention m4 1.4.3. Remove obsolete advice about
10652 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10654 * bootstrap: Remove workaround for problem I encountered with
10655 gettext 0.14.1; it seems to be fixed now.
10657 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10659 * NEWS: Version 2.0a.
10661 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10662 the previous change.
10664 Various maintainer cleanups.
10665 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10666 conftest*, for benefit of CVS commands run at the same time as
10667 "configure". Add build-aux, since "bootstrap" now creates it and
10669 * Makefile.cfg (move_if_change): Remove.
10670 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10671 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10672 (po_repo, do-po-update, po-update, wget_files, get-targets):
10673 (config.guess-url_prefix, config.sub-url_prefix):
10674 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10675 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10676 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10678 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10679 this is now the recommended name.
10680 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10681 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10682 ylwrap. These files now go into build-aux.
10683 * config/move-if-change: Remove.
10684 * config/prev-version.txt: Bump from 1.75 to 2.0.
10686 * bootstrap: Add stdio-safer, unistd-safer modules.
10687 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10689 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10690 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10691 * lib/subpipe.c: Include "unistd-safer.h".
10692 (create_subpipe): Make sure all the newly-created
10693 file descriptors are > 2, so that diagnostics don't
10694 get sent down them (which might cause Bison to hang, in theory).
10695 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10696 * src/files.c (xfopen): Use fopen_safer, not fopen.
10698 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10699 yesterday's yacc.c fix.
10701 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10703 * data/glr.c, data/lalr1.cc: Update copyright date.
10705 Fix a destructor bug reported by Wolfgang Spraul in
10706 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10707 * data/yacc.c (yyabortlab): Don't call destructor, and
10708 don't set yychar to EMPTY.
10709 (yyoverflowlab): Don't call destructor.
10710 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10711 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10712 since we no longer output the message "discarding lookahead token
10715 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10717 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10718 fix a small glitch in debugging output.
10719 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10720 after YY_SYMBOL_PRINT where needed.
10722 (struct yyGLRState): Add some comments.
10723 (struct yySemanticOption): Add some comments.
10724 (union yyGLRStackItem): Add comment.
10726 (yymergeOptionSets): Correct this to properly perform the union,
10727 avoiding infinite reported by Michael Rosien.
10730 * tests/glr-regression.at: Add test for GLR merging error reported
10733 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10735 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10736 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10737 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10738 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10739 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10740 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10741 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10742 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10743 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10744 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10745 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10746 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10747 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10748 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10749 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10750 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10751 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10752 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10753 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10754 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10755 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10756 src/output.h, src/parse-gram.c, src/parse-gram.h,
10757 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10758 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10759 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10760 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10761 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10762 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10763 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10764 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10765 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10766 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10767 tests/reduce.at, tests/regression.at, tests/sets.at,
10768 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10769 Update FSF postal mail address.
10771 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10773 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10774 Problem reported by Ralf Menzel.
10776 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10778 * tests/actions.at: Test that stack overflow invokes destructors.
10779 From Marcus Holland-Moritz.
10780 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10782 (yyreturn): to here. That way, destructors are called properly
10783 even if the stack overflows, or the user calls YYACCEPT or
10784 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10785 (yyoverflowlab): Destroy the lookahead.
10787 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10789 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10791 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10793 * NEWS: Bison-generated C parsers no longer quote literal strings
10794 associated with tokens.
10795 * src/output.c (prepare_symbols): Don't escape strings,
10796 since users don't want to see C escapes.
10797 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10799 * tests/input.at (Torturing the Scanner): Likewise.
10800 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10802 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10804 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10805 the data size is known to be too small and we can't increase it.
10806 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10808 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10810 * src/parse-gram.y: Include quotearg.h.
10811 (string_as_id): Quote $1 before using it as a key, since the
10812 lexer no longer quotes it for us.
10813 (string_content): Don't strip quotes, since lexer no longer
10815 * src/scan-gram.l: Include quotearg.h.
10816 ("\""): Omit quote.
10817 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10818 a key, since the rest of the lexer doesn't quote it.
10819 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10820 * tests/regression.at (Token definitions): Check for backslashes
10823 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10824 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10825 (yyparse): Revamp code to generate long syntax error message, to
10826 make it easier to translate, and to avoid problems with arithmetic
10827 overflow. Change "virtual memory" to "memory" in diagnostic, since
10828 we don't know whether the memory is virtual.
10830 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10832 * NEWS: Bison-generated C parsers now use the _ macro to
10834 * data/yacc.c (_) [!defined _]: New macro.
10835 All English strings wrapped inside this macro.
10836 * doc/bison.texinfo (Bison Parser): Document _.
10837 * po/POTFILES.in: Include src/parse-gram.c, since it now
10838 includes translateable strings that parse-gram.y doesn't.
10840 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10842 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10843 reverting the 2004-10-11 change to this function.
10844 (symbol_check_alias_consistency): Don't call symbol_type_set
10845 if the type name is already correct.
10846 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10848 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10850 * tests/regression.at (Token definitions): Don't use a token named
10851 c, as that generates a "#define c ..." that runs afoul of buggy
10852 stdlib.h that uses the identifier c as a member of struct
10853 drand48_data. Problem reported by Horst Wente.
10855 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10857 * bootstrap: Change translation URL from
10858 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10859 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10860 redirection glitches. Problem reported by twlevo@xs4all.nl.
10862 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10864 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10865 after operands; POSIX says this isn't portable for the c99 command.
10867 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10869 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10870 immediately if a data overrun has occurred; this may help us track
10871 down what may be a spurious failure on MacOS.
10873 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10875 Respond to problems reported by twlevo@xs4all.nl.
10877 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10879 * src/vcg.h: Comment fix.
10880 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10881 (G_CMAX): Change to -1 instead of INT_MAX.
10883 * data/yacc.c (yyparse): Omit spaces before #line.
10885 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10887 * src/tables.c (state_number_to_vector_number): Put it inside an
10888 "#if 0", since it's not currently used. Problem reported by
10891 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10893 * src/output.c (escaped_output): Renamed from
10894 escaped_file_name_output, since we now use it for symbol tags as
10895 well. All uses changed.
10896 (symbol_destructors_output, symbol_printers_output):
10897 Escape symbol tags too.
10898 Problem reported by Matyas Forstner in
10899 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10901 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10903 * src/output.c (user_actions_output, token_definitions_output,
10904 symbol_destructors_output, symbol_printers_output): Likewise.
10905 * src/reader.c (prologue_augment): Likewise.
10906 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10908 * src/vcg.c (output_edge): Don't quote linestyle arg.
10909 Problem reported by twlevo@xs4all.nl.
10911 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10913 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10914 example, reported by Derek M Jones. Also, make the example even
10915 more outrageous, to better illustrate how bad the problem is.
10917 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10919 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10920 putsym. Typo reported by Sebastian Piping.
10922 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10924 * doc/bison.texinfo (Language and Grammar): some -> same
10925 (Epilogue): int he -> in the
10926 Typos reported by Sebastian Piping via Justin Pence.
10928 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10930 * tests/glr-regression.at (Improper handling of embedded actions
10931 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10932 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10933 with dollar signs in test names.
10934 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10935 for a similar reason.
10937 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10939 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10940 wants to redefine G_VIEW.
10942 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10944 * src/vcg.c (get_view_str): Remove case for normal_view.
10945 Problem reported by twlevo@xs4all.nl.
10947 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10949 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10950 Problem reported by twlevo@xs4all.nl.
10952 * doc/bison.texinfo: Change @dircategory from "GNU programming
10953 tools" to "Software development". Requested by Richard Stallman
10956 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10958 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10959 Problem reported by twlevo@xs4all.nl.
10961 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10963 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10964 keyword; it's not needed with modern compilers, and it doesn't
10965 affect correctness with older compilers. Suggested by
10968 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10970 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10971 gcc -Wswitch-default.
10972 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10973 * data/yacc.c (yyparse): Likewise.
10975 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10977 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10978 already. Let config.h define any nonstandard values.
10980 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10982 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10983 for the benefit of slower hosts. Problem reported by
10984 Nelson H. F. Beebe.
10986 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10988 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10989 being defined and not used.
10990 * data/lalr1.cc (yyparse): Likewise.
10991 Use "if (false)" rather than "if (0)".
10993 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10995 * TODO: Mention that we should allow NUL bytes in tokens.
10997 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10999 * src/scan-skel.l (<<EOF>>): Don't close standard output.
11000 Problem reported by Hans Aberg.
11002 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
11004 * src/getargs.c (version): Happy new year; update overall
11005 program copyright date from 2004 to 2005.
11007 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
11008 Problem reported by Hans Aberg.
11009 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
11010 (Output file names.): Add a test for the case when standard output
11013 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
11015 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11016 to fix an oversight in the Bison 2.0 manual.
11018 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11020 * NEWS: Version 2.0. Reformat the existing news items since
11021 1.875, so that related items are grouped together.
11022 * configure.ac (AC_INIT): Bump version to 2.0.
11023 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11025 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11026 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11027 otherwise, we're not testing alloca. Unfortunately there's no
11028 simple way to consult HAVE_ALLOCA here.
11030 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11033 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11034 hand. This avoids a warning about comparing int to size_t when
11035 GCC warnings are enabled.
11037 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11039 * NEWS: Bison-generated parsers no longer default to using the
11040 alloca function (when available) to extend the parser stack, due
11041 to widespread problems in unchecked stack-overflow detection.
11042 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11043 responsibility to set it to a positive value. This lets the user
11044 specify a value that is not a preprocessor constant.
11045 * data/yacc.c (YYMAXDEPTH): Likewise.
11046 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11047 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11048 to be a compile-time constant. However, explain the constraints on it.
11049 Also, explain the constraints on YYINITDEPTH.
11050 (Table of Symbols): Explain that alloca is no longer the default.
11051 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11054 * doc/bison.texinfo (Location Default Action): Mention that n must
11055 be zero when k is zero. Suggested by Frank Heckenbach.
11057 2004-12-22 Akim Demaille <akim@epita.fr>
11059 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11060 (parser::state_type, parser::semantic_type, parser::location_type):
11061 Private, not public.
11062 (parser::parse): Return ints, not bool.
11063 Returning a bool introduces a problem: 0 corresponds to false, and
11064 it seems weird to return false on success. Returning true changes
11065 the conventions for yyparse.
11066 Alternatively we could return void and send an exception.
11067 There is no clear consensus (yet?).
11068 (state_stack, semantic_stack, location_stack): Rename as...
11069 (state_stack_type, semantic_stack_type, location_stack_type): these.
11070 Private, not public.
11071 * tests/c++.at: New.
11072 * tests/testsuite.at, tests/Makefile.am: Adjust.
11074 2004-12-21 Akim Demaille <akim@epita.fr>
11076 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11078 2004-12-21 Akim Demaille <akim@epita.fr>
11080 Don't impose std::string for filenames.
11082 * data/lalr1.cc (b4_filename_type): New.
11083 (position::filename): Use it.
11084 (parser.hh): Move the inclusion of stack.hh and location.hh below
11085 the user code, so that needed headers for the filename type can be
11087 Forward declare them before the user code.
11088 * tests/Makefile.am (check-local, installcheck-local): Pass
11089 TESTSUITEFLAGS to the TESTSUITE.
11091 2004-12-20 Akim Demaille <akim@epita.fr>
11093 Use more STL like names: my_class instead of MyClass.
11095 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11096 (SemanticStack, SemanticType, StateStack, StateType)
11097 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11098 (Parser::value): Rename as...
11099 (location_stack, location_type, rhs_number_type, semantic_stack)
11100 (semantic_type, state_stack, state_type, token_number_type, stack)
11101 (slice, traits, parser::yylloc, parser::yylval): these.
11103 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11105 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11107 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11108 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11110 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11112 Remove uses of 'short int' and 'unsigned short int'. This raises
11113 some arbitrary limits. It uses more memory but nowadays that's
11114 not much of an issue.
11116 This change does not affect the generated parsers; that's a different
11117 task, as some users will want to conserve memory there.
11119 Ideally we should use size_t to represent all object counts, and
11120 something like ptrdiff_t to represent signed differences of object
11121 counts; but that will require more code-cleanup than I have the
11122 time to do right now.
11124 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11125 Use size_t, not int or short int, to count objects.
11126 * src/closure.c (nritemset, closure): Likewise.
11127 * src/closure.h (nritemset, closure): Likewise.
11128 * src/nullable.c (nullable_compute): Likewise.
11129 * src/print.c (print_core): Likewise.
11130 * src/print_graph.c (print_core): Likewise.
11131 * src/state.c (state_compare, state_hash): Likewise.
11132 * src/state.h (struct state): Likewise.
11133 * src/tables.c (default_goto, goto_actions): Likewise.
11135 * src/gram.h (rule_number, rule): Use int, not short int.
11136 * src/output.c (prepare_rules): Likewise.
11137 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11138 errs, reductions): Likewise.
11139 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11141 * src/tables.c (vector_number, tally, action_number,
11142 ACTION_NUMBER_MINIMUM): Likewise.
11143 * src/output.c (muscle_insert_short_int_table): Remove.
11145 2004-12-17 Akim Demaille <akim@epita.fr>
11147 * data/lalr1.cc: Extensive Doxygenation.
11148 (error_): Rename as...
11149 (error): this, since it is visible to the user.
11151 (Parser::message): Now an automatic variable from...
11152 (Parser::yyreport_syntax_error_): here.
11153 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11155 * tests/input.at: Escape $.
11157 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11159 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11160 Parenthesize rhs to avoid obscure problems with mistakes like
11161 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11162 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11163 b4_rhs_location): Likewise.
11164 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11165 b4_rhs_location): Likewise.
11167 2004-12-16 Akim Demaille <akim@epita.fr>
11169 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11170 yacc.c: be sure to stay within yycheck_.
11171 * tests/actions.at: Re-enable C++ tests.
11173 2004-12-16 Akim Demaille <akim@epita.fr>
11175 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11178 2004-12-16 Akim Demaille <akim@epita.fr>
11180 Use #define to handle the %name-prefix.
11182 * data/glr.c, data/yacc.c: Comment changes.
11183 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11184 so that one can refer to yylex in the parser file, and have it
11185 renamed, as is the case with other skeletons.
11187 2004-12-16 Akim Demaille <akim@epita.fr>
11189 Move lalr1.cc internals into yy*.
11191 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11192 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11193 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11194 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11195 (empty_, final_, terror_, errcode_, ntokens_)
11196 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11197 (looka_, ilooka_, error_range_, nerrs_):
11199 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11200 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11201 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11202 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11203 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11204 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11205 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11206 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11209 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11211 Fix some problems reported by twlevo at xs4all.
11212 * src/symtab.c (symbol_new): Report an error if the input grammar
11213 contains too many symbols. This is better than calling abort() later.
11214 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11215 (struct node, struct graph):
11216 Rename member expand to stretch. All uses changed.
11217 (struct graph): Remove member layoutalgorithm. All uses removed.
11218 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11219 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11221 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11223 2004-12-15 Akim Demaille <akim@epita.fr>
11225 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11226 Add more Doxygen comments.
11227 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11228 (report_syntax_error_, translate_): Rename as...
11229 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11230 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11232 2004-12-15 Akim Demaille <akim@epita.fr>
11234 * data/lalr1.cc (lex_): Rename as...
11236 Move the trace here.
11237 Take the %name-prefix into account.
11238 Reported by Alexandre Duret-Lutz.
11240 2004-12-15 Akim Demaille <akim@epita.fr>
11242 Simplify the C++ parser constructor.
11244 * data/lalr1.cc (debug_): Rename as...
11245 (yydebug_): so that the parser's internals are always in the yy*
11248 (b4_parse_param_decl): Remove the leading comma as it is now only
11249 called as unique argument list.
11250 (Parser::Parser): Remove the constructor accepting a location and
11251 an initial debugging level.
11252 Remove from the other ctor the argument for the debugging level.
11253 (debug_level_type, debug_level, set_debug_level): New.
11255 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11258 2004-12-15 Akim Demaille <akim@epita.fr>
11260 Remove b4_root related material: failure experiment
11261 (which goal was to allow to derive from a class).
11263 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11264 definitions and uses.
11266 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11268 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11269 not 2, since it's not portable to subtract 1 from the start of an
11270 array. The new item 0 is never set or used. All uses changed.
11272 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11273 the default definition of YYLLOC_DEFAULT. Problem reported
11274 by Frank Heckenbach.
11276 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11278 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11279 the normal case and one for the error case. Just use the
11280 first one uniformly. Problem reported by Frank Heckenbach.
11281 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11282 use exactly the same macro in both places.
11283 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11284 so that the normal-case YYRHSLOC works for the error case too.
11286 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11287 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11288 * doc/bison.texinfo (Location Default Action): Don't claim that
11289 we have an array of locations. Use the same macro for both glr
11290 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11293 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11295 * HACKING: Update email addresses to send announcements to.
11297 * configure.ac (AC_INIT): Bump version to 1.875f.
11299 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11301 * NEWS: Version 1.875e.
11302 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11304 * src/scan-skel.l: Include "complain.h", for "fatal".
11306 * src/relation.h (relation_print, relation_digraph):
11307 Relation sizes are of type relation_node, not size_t (this is
11308 merely a doc fix, since the two types are equivalent).
11309 (relation_transpose): Relation sizes are of type relation_node,
11311 * src/relation.c: Likewise.
11312 (top, infinity): Now of type relation_node, not int.
11313 (traverse, relation_transpose): Use relation_node, not int.
11315 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11316 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11317 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11319 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11320 specifying whether the test should be skipped. Use it tp
11321 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11322 fail on some hosts, and should be skipped.
11324 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11326 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11327 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11328 unless otherwise specified below.
11330 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11331 to allocate kernel_base, kernel_items, kernel_size, since
11332 they needn't be initialized to 0.
11333 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11334 * src/closure.c (new_closure): Likewise, for itemset.
11335 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11336 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11337 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11338 (build_relations): Likewise for edge, states1, includes.
11339 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11340 * src/reader.c (packgram): Likewise, for ritem, rules.
11341 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11342 * src/relation.c (relation_digraph): Likewise for VERTICES.
11343 (relation_transpose): Likewise for new_R, end_R.
11344 * src/symtab.c (symbols_token_translations_init): Likewise for
11345 token_translations.
11346 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11347 (token_actions): Likewise for yydefact, actrow, conflrow,
11349 (save_column): Likewise for froms[symno], tos[symno].
11350 (goto_actions): Likewise for state_count.
11351 (pack_table): Likewise for base, pos, check.
11352 (tables_generate): Likewise for width.
11354 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11355 for initial core. Just have a separate core, so we needn't worry
11356 about whether kernel_size and kernel_base are initialized.
11358 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11359 kernel_size, kernel_items): Remove unnecessary initialization.
11360 * src/conflicts.c (conflicts): Likewise.
11361 * src/derives.c (derives): Likewise.
11362 * src/muscle_tablc (muscle_insert): Likewise.
11363 * src/relation.c (relation_digraph): Likewise.
11364 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11365 conflrow, conflict_table, conflict_list, table, check):
11368 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11369 This is because all callers pass unsigned int.
11370 * src/closure.h (new_closure): Likewise.
11372 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11373 (build_relations): Initialize includes[i] in all cases.
11374 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11375 and rules[ruleno].precsym. Initialize members in order.
11376 * src/relation.c (relation_transpose): Always initialize new_R[i]
11378 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11380 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11381 conflict_list[0] was always 0, but now it isn't initialized.
11383 * src/table.c (table_grow): When conflict_table grew, the grown
11384 area wasn't cleared. Fix this.
11386 * lib/.cvsignore: Add strdup.c, strdup.h.
11387 * m4/.cvsignore: Add strdup.m4.
11389 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11391 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11392 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11393 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11394 ngotos + 1 without checking for overflow.
11395 (build_relations): Use END_NODE, not -1, to denote end of edges.
11396 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11397 build_relations): Use goto_number, not int, for goto numbers.
11398 * src/tables.c (save_column, default_goto): Likewise.
11400 2004-11-23 Akim Demaille <akim@epita.fr>
11402 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11403 of #defining from yystype.
11404 Don't typedef yystype, C++ does not need it.
11405 This lets it possible to forward declare it as union.
11407 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11409 * bootstrap (gnulib_modules): Add extensions.
11410 Problem reported by Jim Meyering.
11412 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11414 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11415 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11416 src/system.h, src/tables.c: XFREE -> free, to accommodate
11417 recent change to gnulib xalloc.h.
11418 Problem reported by Jim Meyering.
11420 2004-11-17 Akim Demaille <akim@epita.fr>
11422 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11424 2004-11-17 Akim Demaille <akim@epita.fr>,
11425 Alexandre Duret-Lutz <adl@gnu.org>
11427 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11429 (YYCDEBUG): Adjust.
11430 Use it instead of cdebug_.
11431 (Parser::debug_stream, Parser::set_debug_stream): New.
11432 (Parser::symprint_): Define cdebug_ for temporary backward
11434 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11437 2004-11-17 Akim Demaille <akim@epita.fr>
11439 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11440 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11441 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11442 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11444 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11446 * data/glr.c (yyloc_default): Remove; not used.
11447 Problem reported by Frank Heckenbach.
11449 2004-10-25 Akim Demaille <akim@epita.fr>
11451 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11452 Introduce another definition to address simple location arrays.
11453 (yyGLRStack): New member: yyerror_range.
11454 (yyrecoverSyntaxError, yyparse): Update it.
11455 (yyrecoverSyntaxError): Use it when shifting the error token to
11456 have an accurate range, equivalent to the one computed by both
11457 yacc.c and lalr1.cc.
11458 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11459 that column numbers start at column 0, as per GNU Coding
11460 Standards, the others tests, and the doc.
11461 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11462 Adjust to the above change (first column is 0).
11463 And adjust the location of the "<error>", now covering the whole
11466 2004-10-22 Akim Demaille <akim@epita.fr>
11467 and Paul Eggert <eggert@cs.ucla.edu>
11469 Remove some arbitrary limits on goto numbers and relations.
11470 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11471 initial values, since they're never used.
11472 (set_goto_map): ngotos is now unsigned, so test for overflow
11473 by seeing whether it wraps around to zero.
11474 * src/lalr.h (goto_number): Now size_t, not short int.
11475 (GOTO_NUMBER_MAXIMUM): Remove.
11476 * src/relation.c (relation_print, traverse, relation_transpose):
11477 Check for END_NODE rather than looking at sign.
11478 * src/relation.h (END_NODE): New macro.
11479 (relation_node): Now size_t, not short int.
11481 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11483 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11484 keyword, not an identifier. Problem reported by Baron Schwartz in
11485 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11487 2004-10-11 Akim Demaille <akim@epita.fr>
11489 * src/symtab.c (symbol_check_alias_consistency): Also check
11490 type names, destructors, and printers.
11491 Reported by Alexandre Duret-Lutz.
11492 Recode the handling of associativity and precedence in terms
11493 of symbol_precedence_set.
11494 Accept no redeclaration at all, not even equal to the previous
11496 (redeclaration): New.
11497 Use it to factor redeclaration complaints.
11498 (symbol_make_alias): Don't set the type of the alias, let
11499 symbol_check_alias_consistency do it as for other features.
11500 * src/symtab.h (symbol): Add new member prec_location, and
11502 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11503 * tests/input.at (Incompatible Aliases): New.
11505 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11507 .cvsignore fixes to accommodate gnulib changes,
11508 and the practice of naming build directories "_build".
11509 * .cvsignore: Add "_*". Sort.
11510 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11511 * m4/.cvsignore: Add "*_gl.m4".
11513 2004-10-06 Akim Demaille <akim@epita.fr>
11515 * src/parse-gram.y (add_param): Fix the truncation of trailing
11518 2004-10-05 Akim Demaille <akim@epita.fr>
11520 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11521 whether the reducion was empty or not. This leaves room to
11522 improve the use of YYLLOC_DEFAULT in such a case.
11523 lalr1.cc is still experimental, so changing this is acceptable.
11524 And finally, there are probably not many users who changed the
11525 handling of locations in GLR, so changing is admissible too.
11527 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11528 empty reduction, set @$ to an empty location ending the previously
11530 Adjust uses to make sure the code is triggered on empty
11532 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11533 expected output: empty reductions have empty locations.
11535 2004-09-29 Akim Demaille <akim@epita.fr>
11537 * data/lalr1.cc: Move towards a more standard C++ coding style
11538 for templates: Class < T > -> Class<T>.
11540 2004-09-29 Akim Demaille <akim@epita.fr>
11542 * data/lalr1.cc: Reinstall the former ctor, for sake of
11543 compatibility, but warn it will be removed.
11544 Move towards a more standard C++ coding style (i.e., type *var ->
11547 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11549 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11550 since it's less likely to work if NULs are involved in the future.
11552 2004-09-27 Akim Demaille <akim@epita.fr>
11554 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11556 2004-09-27 Akim Demaille <akim@epita.fr>
11558 * data/lalr1.cc (b4_parse_param_decl_1): New.
11559 (b4_parse_param_decl): Use it to have different names between attribute
11560 and argument names.
11561 (b4_cc_constructor_call): Likewise.
11563 2004-09-24 Akim Demaille <akim@epita.fr>
11565 * src/parse-gram.y (add_param): Strip the leading and trailing
11566 blanks from a formal argument declaration.
11567 (YY_LOCATION_PRINT): New.
11569 2004-09-24 Akim Demaille <akim@epita.fr>
11571 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11572 after the location.
11574 2004-09-24 Akim Demaille <akim@epita.fr>
11576 * doc/bison.texinfo (Table of Symbols): Sort.
11578 2004-09-21 Akim Demaille <akim@epita.fr>
11580 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11581 the useless parentheses.
11582 Suggested by Paul Eggert.
11584 2004-09-20 Akim Demaille <akim@epita.fr>
11586 Let the initial-action act on the look-ahead, and use it for the
11587 "initial push" (corresponding to an hypothetical beginning-of-file).
11588 And let lalr1.cc honor %initial-action.
11590 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11592 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11593 (Parser::Parser): Remove the ctor that used to initialize it.
11594 (Parser::parse): Like in the other skeletons, issue the "starting
11595 parse" message before any action.
11596 Honor %initial-action.
11597 Initialize the stacks with the lookahead.
11598 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11600 Push them in the stacks.
11601 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11603 2004-09-20 Akim Demaille <akim@epita.fr>
11605 * doc/bison.texinfo (Initial Action Decl): New.
11607 2004-09-20 Akim Demaille <akim@epita.fr>
11609 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11610 clearer criterion to define it.
11611 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11612 When reducing on an empty RHS, use the latest stacked location as
11614 yylloc is not always available.
11615 * data/glr.c: Likewise.
11616 Also, honor initial-actions.
11618 2004-09-20 Akim Demaille <akim@epita.fr>
11620 * data/yacc.c (YY_LOCATION_PRINT): New.
11621 Define when we know YYLTYPE's structure, i.e., when the default
11622 YYLLOC_DEFAULT is used.
11623 * data/c.m4 (b4_yysymprint_generate): Use it.
11624 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11625 value of the result.
11626 (error_start_): Replace with...
11627 (error_range_): this location array.
11628 This allows to replace code relying on the implementation of
11629 locations by portable code.
11630 * data/yacc.c (yylerrsp): Replace with...
11631 (yyerror_range): this.
11632 Every time a token is popped, update yyerror_range[0], to have an
11633 accurate location for the error token.
11634 * data/glr.c (YY_LOCATION_PRINT): New.
11635 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11636 deference a pointer.
11637 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11638 report the location in %printers.
11640 * src/scan-skel.l: Instead of abort, report error messages to ease
11641 understanding skeleton scanning failures.
11643 2004-09-16 Akim Demaille <akim@epita.fr>
11645 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11646 (iterator, const_iterator): these, to be more in the C++ spirit.
11647 Also, return reverse iterators so that when displaying the stack
11648 we display its bottom first.
11649 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11651 We should probably use vector here though.
11653 2004-09-16 Akim Demaille <akim@epita.fr>
11655 Have more complete shift traces.
11657 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11658 to report Shifts instead of ad hoc YYDPRINTF invocations,
11659 including for the error token.
11660 * data/lalr1.cc (symprint_): Output the location.
11661 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11662 output the location within the %printer.
11663 Activate GLR tests, at least to make sure they compile properly.
11664 They still don't pass though.
11665 * tests/calc.at: Adjust expect verbose output, since now "Entering
11666 state..." is on a different line than the "Shifting" message.
11668 2004-09-08 Akim Demaille <akim@epita.fr>
11670 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11671 Bison directive from the Bison file to the invocation of this
11672 macro, so that these directives are passed to
11673 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11674 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11675 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11676 the extra Bison directives instead of the whole series.
11677 Change the grammar so that there are recoverable errors, and
11678 unrecoverable errors. Now we can have the parser give up before
11679 consuming the whole input. As a result we now can observe that
11680 the lookahead is freed when needed.
11681 Change the parser source to parse argv[1] instead of a hard coded
11683 Simplify yylex, and give a value and location to EOF.
11684 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11685 passed directives already coded in the file.
11686 Add some tests to check the location of "error".
11687 For some tests, the C++ parser is correct, and not yacc.c.
11688 For other tests, they provide different, but unsatisfying, values,
11689 so keep the C++ value so that at least one parser is "correct"
11690 according to the test suite.
11691 (Actions after errors): Remove, this is subsumed by the
11692 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11694 2004-09-06 Akim Demaille <akim@epita.fr>
11696 * data/lalr1.cc: Adjust the indentation of the labels.
11697 (Parser::pop): New.
11700 2004-09-06 Akim Demaille <akim@epita.fr>
11702 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11703 argument, an informative message.
11704 Call YY_SYMBOL_PRINT.
11705 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11706 * data/lalr1.cc (destruct_): Likewise.
11707 In addition, no longer depend on b4_yysymprint_generate and
11708 b4_yydestruct_generate to generate these functions, do it "by
11711 2004-09-03 Akim Demaille <akim@epita.fr>
11713 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11714 invoked, yydestruct the lookahead.
11715 * tests/calc.at (Calculator $1): Update the expected lengths of
11716 traces: there is an added line for the discarded lookahead.
11717 * doc/bison.texinfo (Destructor Decl): Some rewording.
11718 Define "discarded" symbols.
11720 2004-09-02 Akim Demaille <akim@epita.fr>
11722 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11724 2004-09-02 Akim Demaille <akim@epita.fr>
11726 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11727 (YYDSYMPRINTF): Rename as...
11728 (YY_SYMBOL_PRINT): this.
11729 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11731 Use it instead of direct symprint_ calls.
11732 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11735 2004-09-02 Akim Demaille <akim@epita.fr>
11737 * data/lalr1.cc (b4_yysymprint_generate): New.
11738 (symprint_): New member function, defined when YYDEBUG.
11739 Use it consistently instead of token/nterm debugging output by
11741 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11742 %printer calls to use cdebug_ when using lalr1.cc.
11744 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11746 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11747 with #ifdef YYDEBUG.
11749 2004-08-26 Akim Demaille <akim@epita.fr>
11751 * doc/bison.texinfo (Implementing Loops): Rename as...
11752 (Implementing Gotos/Loops): this.
11754 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11756 Adjust to latest gnulib.
11757 * bootstrap (gnulib_modules): Add xalloc-die.
11758 Set LC_ALL=C so that file names sort consistently.
11759 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11760 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11761 uintmax_t.m4, ulonglong.m4.
11762 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11763 po.m4 since we are now using _gl.m4 instead.
11765 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11767 * src/scan-action.l: Remove. Scanning of semantic actions is
11768 handled in scan-gram.l.
11770 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11772 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11774 * src/location.h (struct): The file member is a uniqstr.
11775 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11777 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11779 Fix bug with non-%union parsers that have printers or destructors,
11780 which led to a Bison core dump. Reported by Peter Fales in
11781 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11783 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11784 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11785 not to our own type.
11786 * src/output.c (symbol_destructors_output, symbol_printers_output):
11787 Don't assume %union.
11788 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11789 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11790 UNION-FLAG. All callers changed.
11791 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11792 Use type char, not unsigned int, when declaring an array of char;
11793 this lets us remove a cast.
11794 (Printers and Destructors): Add non-%union test cases.
11796 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11798 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11799 GLR writeups. E.g., avoid frenchspacing and the future tense,
11800 change "lookahead" to "look-ahead", and change "wrt" to "with
11803 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11805 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11806 New sections, split off from the GLR Parsers section. Put the new
11807 Simple GLR Parser near the start of the GLR section, for clarity.
11808 Rewrite connective text.
11810 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11812 * doc/bison.texinfo (Simple GLR Parsers): New section.
11814 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11816 * NEWS, TODO, doc/bison.texinfo:
11817 Use "look-ahead" instead of "lookahead", to be consistent.
11818 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11819 while we're fixing "look-ahead".
11820 * src/conflicts.c (shift_set): Renamed from shiftset.
11821 (look_ahead_set): Renamed from lookaheadset.
11822 * src/print.c: Likewise.
11823 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11824 name for "lookahead".
11825 (report_types, usage): Likewise.
11826 * src/getargs.h (report_look_ahead_tokens): Renamed from
11828 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11829 compute_lookaheads.
11830 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11831 (look_ahead_tokens_print): Renamed from lookaheads_print.
11832 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11833 state_rule_lookaheads_print.
11834 * src/state.h: Likewise.
11835 (reductions.look_ahead_tokens): Renamed from lookaheads.
11836 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11837 AT_DATA_LOOKAHEADS_GRAMMAR.
11839 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11841 * README: Update location of patched M4 distribution.
11843 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11845 Don't assume the C++ compiler takes the same arguments as the C compiler
11847 * configure.ac (O0CXXFLAGS): New var.
11848 * tests/atlocal.in (CXXFLAGS): Use it.
11850 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11852 Fix some "make check" problems with C++ reported by
11853 Albert Chin-A-Young for Tru64 C++ in this thread:
11854 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11856 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11857 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11858 Output to a .cc file for C++, not to a .c file.
11859 * tests/calc.at (AT_CHECK_CALC): Likewise.
11860 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11861 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11863 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11865 * tests/calc.at, tests/actions.at: Workaround for SGI
11866 C++ compiler. (trivial change)
11868 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11870 Spent a few hours checking out which prerequisite versions the
11871 current sources actually require. I went all the way back to
11872 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11873 a seemingly endless set of combinations of versions more recent
11874 than that. The bottom line is that the current sources require
11875 fairly recent versions of the build tools, and it'll be some work
11877 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11878 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11879 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11880 Add comments explaining why those particular versions are
11883 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11884 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11885 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11887 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11888 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11890 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11892 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11893 0.11.5. Suggested by Bruno Haible.
11894 * bootstrap: Remove gettext version checking.
11896 * doc/bison.texinfo (Decl Summary): Also mention that %union
11897 can depend on prerequisite types. Problem reported by Tim
11900 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11902 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11903 * README-alpha: Don't tell people not to package this.
11905 * bootstrap: Don't assume $(...) works; use `...` instead.
11906 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11909 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11910 put into the -d output file, and mention what to do if YYSTYPE is
11911 defined as a macro.
11913 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11915 Undo change made earlier today: it caused autopoint to not bring
11916 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11919 * bootstrap: Check that gettext version matches what's in
11920 configure.ac. Warn users to ignore robots.txt ERROR 404.
11921 * bootstrap: Undo today's earlier change (logged below).
11922 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11924 The gettext version checking is causing more trouble than it's
11925 curing; remove it. Problem reported by Paul Hilfinger.
11927 * bootstrap: Issue a warning that one can expect a message
11928 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11929 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11931 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11933 Ensure that the C++ compiler used for testing actually works on a
11934 simple test program; if not, skip the C++-related tests. Problem
11935 reported by Vin Shelton in:
11936 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11938 * m4/cxx.m4: New file.
11939 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11940 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11941 * tests/local.at (AT_COMPILE_CXX): Use it.
11943 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11945 * data/glr.c (yylloc): Output this macro even if locations are not
11946 being generated, as the GLR parser needs it even in that case.
11947 Problem reported by Troy A. Johnson
11948 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11950 * configure.ac (AC_INIT): Update to 1.875e.
11952 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11954 * NEWS: Version 1.875d.
11955 * configure.ac (AC_INIT): Likewise.
11956 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11958 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11959 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11960 lalr1.cc runs afoul of the first, and the last two are no longer
11961 supported by GCC 3.4.0.
11962 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11963 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11965 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11967 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11968 unsigned int, for compatibility with latest gnulib hash module.
11969 * src/state.c (state_hash, state_hasher): Likewise.
11970 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11971 * src/uniqstr.c (hash_uniqstr): Likewise.
11973 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11975 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11977 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11978 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11979 character and string literals.
11980 (unexpected_end): New function.
11981 (unexpected_eof): Use it.
11982 (unexpected_newline): New function.
11983 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11986 * NEWS: Document %expect-rr.
11988 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11989 Fix typo by replacing $1 with $option.
11990 Remove more 'intl'-related files.
11991 Don't DEFUN AM_INTL_SUBDIR twice.
11993 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11994 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11996 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11997 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11998 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11999 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
12000 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
12001 * src/.cvsignore: Add *.output.
12003 * src/parse-gram.y: Put copyright notice inside %{ %} so it
12004 gets copied to the output file.
12006 2004-04-28 Paul Eggert <eggert@twinsun.com>
12008 Get files from the gnulib and po repositories, instead of relying
12009 on them being in our CVS. Upgrade to latest versions of gnulib
12012 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
12013 * bootstrap: Bootstrap from gnulib and po repositories.
12014 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12015 * README-cvs: Document these changes. Remove version numbers from
12016 mentions of build tools, since they change so often. Mention Flex.
12018 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12019 (gl_USE_SYSTEM_EXTENSIONS): Add.
12020 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12021 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
12023 (AC_ISC_POSIX): Remove; we no longer support this
12024 ancient OS, as it gets in the way of latest Autoconf & gnulib.
12025 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12026 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12027 Do not check for C89 headers, except for locale.h which is used
12028 by the Yacc library and must port to K&R hosts.
12029 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12030 Do not check for C89 functions, except for setlocale which is
12031 used by the Yacc library.
12032 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12033 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12034 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12035 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12036 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12037 AM_GNU_GETTEXT): Remove; now done by:
12038 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12039 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12042 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12043 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12044 Define to empty, as gnulib.mk will do the rest for us.
12045 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12047 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12048 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12050 * src/files.c: Include gnulib's xstrndup.h.
12052 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12053 (REALLOC): Use xnrealloc, for likewise.
12054 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12055 (strnlen, memrchr): Remove decls; functions no longer used.
12056 Include <stpcpy.h>.
12058 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12059 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12060 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12061 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12062 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12063 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12064 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12065 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12066 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12067 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12068 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12069 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12070 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12071 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12072 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12073 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12074 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12075 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12076 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12077 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12078 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12079 Remove, as these files are now generated automatically
12080 by bootstrap or automake.
12082 * po/ChangeLog: Remove: all but one entry was a duplicate
12083 of this file, and I moved that 2000-11-02 entry here.
12085 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12086 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12087 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12088 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12089 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12090 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12091 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12092 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12093 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12094 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12095 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12097 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12098 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12099 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12100 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12101 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12102 * src/.cvsignore: Remove *_.c.
12105 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12106 support it. (The latest stable gzip doesn't.)
12108 2004-04-27 Paul Eggert <eggert@twinsun.com>
12110 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12111 case, as stos_ is now used by destructors due to the 2004-02-09
12114 Remove more K&R C support.
12115 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12116 * lib/subpipe.c (errno): Remove decl.
12117 Include <stdlib.h> unconditionally.
12118 (EXIT_FAILURE): Remove macro.
12119 * src/complain.c (vfprintf, strerror): Remove.
12120 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12122 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12123 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12124 (strchr, strspn, memchr): Remove decls.
12125 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12126 unconditionally. Do not declare perror.
12127 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12130 * src/complain.c (_): Remove useless defn, as system.h defines this.
12132 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12133 with latest obstack.h.
12134 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12135 to procedure types, as obstack.h now does that for us.
12136 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12138 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12139 so that this include file can stand alone.
12140 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12141 does this now. Include subpipe.h first after config.h, to
12142 test whether it can stand alone.
12144 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12145 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12146 unused declaration.
12148 * tests/synclines.at (%union synch line): Put a dummy member in
12149 the union, because empty unions aren't allowed in C. Caught
12152 2004-04-13 Jim Meyering <jim@meyering.net>
12154 * src/conflicts.c (conflicts_print): Correct format string typo:
12155 use `%%' to produce literal `%'. (trivial change)
12157 2004-03-30 Paul Eggert <eggert@twinsun.com>
12159 * src/getargs.c (version): Update copyright year to 2004.
12161 * data/c.m4 (b4_int_type): Use 'short int' rather than
12162 'short', and similarly for 'long', 'unsigned', etc.
12163 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12164 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12165 yy_yypstack, yydumpstack): Likewise.
12166 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12167 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12169 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12170 yy_stack_print, yyparse): Likewise.
12171 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12172 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12173 * lib/bitset.c (bitset_print): Likewise.
12174 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12175 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12176 * lib/bitsetv.c (bitsetv_dump): Likewise.
12177 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12178 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12180 * src/LR0.c (allocate_itemsets): Likewise.
12181 * src/gram.h (rule_number, rule): Likewise.
12182 * src/lalr.h (goto_number): Likewise.
12183 * src/nullable.c (nullable_compute): Likewise.
12184 * src/output.c (prepare_rules): Likewise.
12185 * src/relation.c (relation_print, relation_digraph): Likewise.
12186 * src/relation.h (relation_node): Likewise.
12187 * src/state.h (state_number, transitions, errs, reductions,
12188 struct state): Likewise.
12189 * src/symtab.h (symbol_number, struct symbol): Likewise.
12190 * src/tables.c (vector_number, tally, action_number,
12191 default_goto, goto_actions): Likewise.
12192 * tests/existing.at (GNU Cim Grammar): Likewise.
12193 * tests/regression.at (Web2c Actions): Likewise.
12195 * src/output.c (muscle_insert_short_int_table): Renamed from
12196 muscle_insert_short_table. All uses changed.
12198 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12200 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12201 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12202 Add %expect-rr rule.
12204 * src/scan-gram.l: Recognize %expect-rr.
12206 * src/conflicts.h (expected_sr_conflicts): Rename from
12207 expected_conflicts.
12208 (expected_rr_conflicts): Declare.
12210 * src/conflicts.c (expected_sr_conflicts): Rename from
12211 expected_conflicts.
12212 (expected_rr_conflicts): Define.
12213 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12215 Use expected_sr_conflicts in place of expected_conflicts.
12216 Warn if expected_rr_conflicts used in non-GLR parser.
12218 * doc/bison.texinfo: Add documentation for %expect-rr.
12220 2004-03-08 Paul Eggert <eggert@gnu.org>
12222 Add support for hex token numbers. Suggested by Odd Arild Olsen in
12223 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
12225 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12227 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12228 * src/scan-gram.l (scan_integer): New function.
12230 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12231 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12232 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12233 Say "long int", not "long", for uniformity with GNU style.
12235 2004-02-25 Paul Eggert <eggert@twinsun.com>
12237 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12238 compilers. This fixes a problem with Intel's C++ compiler being
12239 chatty, reported by Guido Trentalancia in
12240 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
12242 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12244 Support %destructor and merge error locations in lalr1.cc.
12246 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12247 (Parser::stos_): Define unconditionally.
12248 (Parser::destruct_): New method. Generate its body with
12249 b4_yydestruct_generate.
12250 (Parser::error_start_): New attribute.
12251 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12252 token which are discarded.
12253 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12254 error_start_ when erroneous token are discarded.
12255 (Parser::parse) <yyerrlab1>: Compute the location of the error
12256 token so that it covers all the discarded tokens.
12257 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12258 it can be called with `%skeleton "lalr1.cc"', and do that.
12260 2004-02-02 Paul Eggert <eggert@twinsun.com>
12262 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12263 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12264 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12265 There's no need to mention top_builddir since Automake does that
12267 (INCLUDES): Remove, as Automake says it's obsolescent.
12268 Contents migrated into AM_CPPFLAGS as described above.
12269 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12271 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12273 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12274 (yyreportSyntaxError): Handle case where lookahead token is
12277 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12279 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12280 resulting parsers are compilable with C++.
12282 2003-12-23 Paul Eggert <eggert@twinsun.com>
12284 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12285 * src/output.c (output_skeleton): Rename local var.
12286 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12287 Bison tokens, as this runs afoul of the 2003-10-07 change that
12288 disallowed NUL bytes in character constants or string literals.
12290 * tests/local.at: Require Autoconf 2.59's Autotest.
12291 * tests/testsuite.at: Don't include local.at, since we now assume
12292 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12294 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12295 multiple inclusion warnings.
12297 2003-12-02 Akim Demaille <akim@epita.fr>
12299 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12303 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12305 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12307 2003-10-07 Paul Eggert <eggert@twinsun.com>
12309 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12310 if testsuite doesn't exist.
12312 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12313 literals, unfortunately.
12314 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12315 Complain about NUL bytes in character constants or string literals.
12317 2003-10-05 Paul Eggert <eggert@twinsun.com>
12319 * NEWS: Don't document %no-default-prec, as it's still
12321 * doc/bison.texinfo: Document %no-default-prec only if
12322 the defaultprec flag is set. Normally it's not.
12324 2003-10-04 Paul Eggert <eggert@twinsun.com>
12326 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12327 non-modifiable lvalue, instead of a modifiable one.
12328 * doc/bison.texinfo (Actions): Document that $$ can
12329 be assigned to. Do not claim that $$ and $N are
12330 array element references: user code should not rely on this.
12332 2003-10-01 Paul Eggert <eggert@twinsun.com>
12334 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12335 (grammar_declaration): Use it.
12336 * src/scan-gram.l: New token %no-default-prec.
12337 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12338 * NEWS, doc/bison.texinfo: Document the above.
12340 2003-10-01 Akim Demaille <akim@epita.fr>
12342 VCG no longer supports long_straight_phase.
12344 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12345 * src/print_graph.c (print_graph): Adjust.
12347 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
12348 and Paul Eggert <eggert@twinsun.com>
12350 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12351 Table of Symbols): Document %default-prec.
12352 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12353 (grammar_declaration): Set default_prec on %default-prec.
12354 * src/scan-gram.l (%default-prec): New token.
12355 * src/reader.h (default_prec): New flag.
12356 * src/reader.c: Likewise.
12357 (packgram): Handle it.
12358 * tests/conflicts.at (%default-prec without %prec,
12359 %default-prec with %prec, %default-prec 1): New tests.
12361 2003-09-30 Paul Eggert <eggert@twinsun.com>
12363 * tests/testsuite.at: Include local.at, not input.at, fixing
12364 a typo in the 2003-08-25 patch.
12366 2003-08-27 Akim Demaille <akim@epita.fr>
12368 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12371 2003-08-26 Akim Demaille <akim@epita.fr>
12373 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12374 "<\#" to avoid magic from Gnus when posting parts of this script.
12376 2003-08-26 Akim Demaille <akim@epita.fr>
12378 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12379 (Parser::parse): here.
12380 Adjust: nerrs and errstatus is now replaced by...
12381 (Parser::nerrs_, Parser::errstatus_): New.
12383 2003-08-25 Akim Demaille <akim@epita.fr>
12385 * config/announce-gen, Makefile.cfg: New.
12386 * Makefile.am: Adjust.
12387 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12388 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12390 2003-08-25 Akim Demaille <akim@epita.fr>
12392 When reducing initial empty rules, Bison parser read an initial
12393 location that is not defined. This results in garbage, and that
12394 affects Bison's own parser. Therefore we need (i) to extend Bison
12395 to support a means to initialize this location, and (ii) to use
12396 this CVS Bison to fix CVS Bison's parser.
12398 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12400 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12401 * src/parse-gram.y: Adjust.
12402 (%initial-action): New.
12403 (%error-verbose): Since we require CVS Bison, there is no reason
12405 * src/scan-gram.l: Adjust.
12406 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12407 * data/yacc.c (yyparse): Use b4_initial_action.
12409 2003-08-25 Akim Demaille <akim@epita.fr>
12411 * doc/bison.texinfo: Don't promote stdout for error messages.
12413 2003-08-25 Akim Demaille <akim@epita.fr>
12415 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12416 From Alexandre Duret-Lutz.
12418 2003-08-25 Akim Demaille <akim@epita.fr>
12422 2003-08-25 Akim Demaille <akim@epita.fr>
12424 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12427 2003-08-25 Akim Demaille <akim@epita.fr>
12429 * data/lalr1.cc (Parser::reduce_print_): New.
12432 2003-08-25 Akim Demaille <akim@epita.fr>
12434 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12435 error recovery loops. This patch is based on
12436 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12437 Also, augment the similarity between lalr1.cc and yacc.c.
12438 Note: the locations of error recovery rules are not correct yet.
12440 * data/lalr1.cc: Comment changes to augment the similarity between
12441 lalr1.cc and yacc.c.
12442 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12443 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12444 yyerrlab), when hitting EOF, pop the whole stack here instead of
12445 merely falling thru the default error handling mechanism.
12446 (yyerrorlab): New label, with the old contents of YYERROR,
12447 plus the following change: pop the stack of rhs corresponding
12448 to the production that invoked YYERROR. That is how Yacc
12449 behaves (required by POSIX).
12450 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12453 2003-08-25 Akim Demaille <akim@epita.fr>
12455 Tune local.at so that people can "autom4te -l autotest calc.at -o
12456 calc" for instance, to extract a sub test suite.
12458 * tests/testsuite.at: Move the initialization, Autotest version
12459 requirement, and AT_TESTED invocation into...
12460 * tests/local.at: here.
12461 * tests/testsuite.at: Include it for compatibility with Autoconf
12463 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12466 2003-08-04 Paul Eggert <eggert@twinsun.com>
12468 Rework code slightly to avoid gcc -Wtraditional warnings.
12469 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12470 The returned value is now stored in *YY0. All callers changed.
12471 * src/output.c (merge_output): Adjust to the above change.
12473 2003-07-26 Paul Eggert <eggert@twinsun.com>
12475 * data/glr.c (YYASSERT): New macro.
12476 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12477 yyresolveStates, yyprocessOneStack):
12478 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12479 Derived from a suggestion by Frank Heckenbach.
12481 2003-07-25 Paul Eggert <eggert@twinsun.com>
12483 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12484 for portability to K&R C (after ansi2knr, presumably). See
12485 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12486 by Frank Heckenbach, though I have omitted the structure-initialization
12487 part of his glr-knr.diff patch since I recall that the Portable
12488 C Compiler didn't require that change.
12490 Let the user specify how to allocate and free memory.
12491 Derived from a suggestion by Frank Heckenbach in
12492 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12493 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12494 All uses of free, malloc, realloc changed to use these macros,
12495 and unnecessary casts removed.
12496 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12498 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12500 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12501 use s.empty() rather than s == "" to test for empty string; see
12502 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12505 2003-06-25 Akim Demaille <akim@epita.fr>
12507 * config/depcomp, config/install-sh: Update from masters.
12509 2003-06-20 Paul Eggert <eggert@twinsun.com>
12511 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12512 and return properly parenthesized result.
12513 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12514 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12515 Remove unnecessary parentheses from uses.
12516 * doc/bison.texinfo (Location Default Action): Describe the
12517 conventions for parentheses.
12519 2003-06-19 Paul Eggert <eggert@twinsun.com>
12521 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12522 yyreportTree): Do not assume that size_t is the same width as int,
12523 when printing sizes. Print sizes using an unsigned format.
12524 Problem reported by Frank Heckenbach in
12525 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12527 Port to Forte Developer 7 C compiler.
12528 * data/glr.c (struct YYLTYPE): If locations are not being used,
12529 declare a single dummy member, as empty structs do not conform
12531 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12532 the Forte Developer 7 C compiler complains that end-of-loop
12533 code is not reached.
12535 2003-06-17 Paul Eggert <eggert@twinsun.com>
12537 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12538 avoid warnings from picky compilers about redefinition of PARAMS.
12540 2003-06-17 Paul Eggert <eggert@twinsun.com>
12544 * NEWS: Document 1.875b.
12546 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12547 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12548 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12549 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12550 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12551 per recent gettext manual's suggestion.
12552 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12553 Use prototypes, not old-style definitions.
12554 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12555 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12556 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12557 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12558 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12559 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12560 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12561 vbitset_or_and_cmp, vbitset_copy): Likewise.
12563 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12564 Do not include <stdlib.h>.
12565 (PARAMS): Define unconditionally for C89.
12566 (ATTRIBUTE_NORETURN): Remove.
12567 (ATTRIBUTE_UNUSED): Define unconditionally.
12569 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12570 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12571 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12572 * lib/vbitset.c, lib/vbitset.h: New files.
12573 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12574 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12577 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12578 `How Can I Reset @code{yyparse}', since texinfo does not allow
12579 arbitrary @ in node names.
12581 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12582 shouldn't be needed according to the gettext 0.12.1 documentation
12583 but which seem to be needed anyway: codeset.m4 glibc21.m4
12584 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12585 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12586 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12588 * lib/.cvsignore: Add stdbool.h.
12589 * m4/.cvsignore: Add nls.m4, po.m4.
12591 Upgrade to CVS gnulib.
12592 * stdbool_.h: File renamed from stdbool.h.in.
12593 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12595 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12596 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12597 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12598 (MOSTLYCLEANFILES): New var.
12599 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12600 (stdbool.h): New rule.
12601 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12602 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12603 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12604 m4/quote.m4: Upgrade to today's gnulib.
12606 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12607 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12608 the tests right now.
12609 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12610 yyerror are declared before use; C99 requires this.
12612 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12614 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12616 (yyrecoverSyntaxError): Correct the logic for setting and testing
12618 Correct comment on handling EOF.
12619 Allow states with only a default reduction, rather than failing
12620 (I can't quite reconstruct why these were not allowed before).
12622 Fixes to avoid problem that $-N rules in GLR parsers can cause
12623 buffer overruns, corrupting state.
12625 * src/output.c (prepare_rules): Output max_left_semantic_context
12627 * src/reader.h (max_left_semantic_context): New variable declaration.
12628 * src/scan-gram.l (max_left_semantic_context): Define.
12629 (handle_action_dollar): Update max_left_semantic_context.
12630 * data/glr.c (YYMAXLEFT): New definition.
12631 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12632 (yyresolveAction): Ditto.
12634 Fixes to problems with location handling in GLR parsers reported by
12635 Frank Heckenbach (2003/06/05).
12637 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12638 (YYRHSLOC): Add parentheses, and define only if locations used.
12639 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12640 locations not used.
12641 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12642 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12644 * tests/cxx-type.at: Exercise location information; update tests
12645 to differentiate output with and without locations.
12646 Remove forward declarations of yylex and yyerror---caused errors
12647 because default YYLTYPE not yet defined.
12648 Change semantic actions to compute strings, rather than printing
12649 them directly (to test proper passing of semantics values). Change
12650 output to prefix notation and update test data and expected results.
12651 (yylex): Track locations.
12652 (stmtMerge): Return value rather than printing, and include arguments
12655 2003-06-03 Paul Eggert <eggert@twinsun.com>
12657 Avoid warnings generated by GCC 2.95.4 when Bison is
12658 configured with --enable-gcc-warnings.
12659 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12660 yy::]b4_parser_class_name[::translate_,
12661 yy::Stack::operator[] (unsigned),
12662 yy::Stack::operator[] (unsigned) const,
12663 yy::Slice::operator[] (unsigned),
12664 yy::Slice::operator[] (unsigned) const):
12665 Rename local vars to avoid warnings.
12666 * tests/glr-regression.at (Improper handling of embedded actions
12667 and $-N in GLR parsers): Remove unused local variable from yylex.
12668 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12669 (void) as arg when not pure, since we now assume C89 when building
12670 Bison. Pacify GCC by using parameter.
12672 2003-06-02 Paul Eggert <eggert@twinsun.com>
12674 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12675 yy::Location::lines, yy::Location::columns): Rename arguments
12676 to avoid shadowing; this removes a warning generated by GCC 3.3.
12678 2003-06-01 Paul Eggert <eggert@twinsun.com>
12680 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12681 to g++, as GCC 3.3 complains if you do it.
12682 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12683 everything that WARNING_CFLAGS has, except omit warnings
12684 not suitable for C++.
12685 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12686 * tests/atlocal.in (CXXFLAGS): New var.
12687 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12689 Fix a GLR parser bug I reported in February; see
12690 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12691 The problem was that GLR parsers did not conform to the C standard,
12692 because actions like { $1 = $2 + $3; } expanded to expressions
12693 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12694 to a local variable. The C standard says that expressions
12695 like (var = f ()) + (var = f ()) have undefined behavior.
12696 Another problem was that GCC sometimes issues warnings that
12697 yyfill and its parameters are unused.
12699 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12700 as possibly unused.
12701 (yyfill): New function.
12703 (yyuserAction): Change type of yynormal to bool, so that it matches
12704 the new yyfill signature. Mark it as possibly unused.
12707 Follow up on a bug I reported in February, where a Bison-generated
12708 parser can loop. Provide a test case and a fix for yacc.c. I
12709 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12710 The original bug report is in:
12711 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12713 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12714 macro's size was becoming unwieldy.
12715 (yyerrlab): Do not discard an empty lookahead symbol, as this
12716 might destroy garbage.
12717 (yyerrorlab): New label, with the old contents of YYERROR,
12718 plus the following change: pop the stack of rhs corresponding
12719 to the production that invoked YYERROR. That is how Yacc
12720 behaves, and POSIX requires this behavior.
12721 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12722 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12723 Define 'alarm' to do nothing if unistd.h is not available.
12724 Add a new rule "exp: '-' error;" to test the above change to
12725 data/yacc.c. Use 'alarm' to abort any test taking longer than
12726 10 seconds, as it's probably looping.
12727 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12728 Also, the new yacc.c generates two fewer diagnostics for an
12731 2003-05-24 Paul Eggert <eggert@twinsun.com>
12733 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12734 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12735 This fixes a problem reported by John Bowman when the Compaq/HP
12736 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12737 -ansi -Wall -gall).
12738 * data/yacc.c (union yyalloc): Likewise.
12739 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12741 Switch from 'int' to 'bool' where that makes sense.
12743 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12744 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12745 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12746 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12747 Return or accept bool, not int. All callers changed.
12748 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12749 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12750 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12751 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12752 bitset_or_and_cmp_): Likewise.
12753 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12754 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12755 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12756 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12757 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12758 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12759 bitset_stats_or_and_cmp): Likewise.
12760 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12761 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12762 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12763 ebitset_xor_cmp): Likewise.
12764 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12765 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12766 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12767 lbitset_xor_cmp): Likewise.
12768 * lib/bbitset.h: Include <stdbool.h>.
12769 (struct bitset_vtable): The following members now return bool, not
12770 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12771 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12773 * src/conflicts.c (count_rr_conflicts): Likewise.
12774 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12776 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12777 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12778 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12779 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12780 graph_flag): Likewise.
12781 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12782 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12783 graph_flag): Likewise.
12784 * src/output.c (error_verbose): Likewise.
12785 * src/output.h (error_verbose): Likewise.
12786 * src/reader.c (start_flag, typed): Likewise.
12787 * src/reader.h (typed): Likewise.
12788 * src/getargs.c (LOCATIONS_OPTION): New constant.
12789 (long_options, getargs): Use it.
12790 * src/lalr.c (build_relations): Use bool, not int.
12791 * src/nullable.c (nullable_compute): Likewise.
12792 * src/print.c (print_reductions): Likewise.
12793 * src/tables.c (action_row, pack_vector): Likewise.
12794 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12795 * src/output.c (prepare): Use it.
12796 * src/output.c (token_definitions_output,
12797 symbol_destructors_output, symbol_destructors_output): Use string,
12798 not boolean integer, to keep track of whether to output separator.
12799 * src/print_graph.c (print_core): Likewise.
12800 * src/state.c (state_rule_lookaheads_print): Likewise.
12802 * config/install-sh: Sync from automake 1.7.5.
12804 2003-05-14 Paul Eggert <eggert@twinsun.com>
12806 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12807 semicolon after a grammar declaration, in the interest of possible
12808 future changes to the Bison input language.
12809 Do not allow a stray semicolon at the start of the grammar.
12810 (rhses.1): Allow one or more semicolons after any rule, including
12811 just before "|" as required by POSIX.
12812 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12815 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12817 %parse-param support for lalr1.cc.
12819 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12820 b4_cc_constructor_calls, b4_cc_constructor_call,
12821 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12823 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12824 parse-param arguments.
12825 (yy::b4_parser_class_name): Declare instance variables to
12826 hold parse-param arguments.
12827 * tests/calc.at: s/value/semantic_value/ because value clashes
12828 with a member of yy::b4_parser_class_name. Adjust C++ code
12829 to handle %parse-param. Enable %parse-param test in C++.
12831 2003-05-12 Paul Eggert <eggert@twinsun.com>
12833 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12834 English a bit. Fix fclose typo. Change "const char" to "char
12835 const", and use ANSI C rather than K&R for "main". Suggest
12836 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12837 and suggest yy_switch_to_buffer.
12839 2003-05-05 Paul Eggert <eggert@twinsun.com>
12841 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12842 C89. This avoids a diagnostic on compilers that define __STDC__
12843 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12844 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12846 2003-05-03 Paul Eggert <eggert@twinsun.com>
12848 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12849 Do not overrun array bounds.
12850 This should fix a bug reported today by Olatunji Oluwabukunmi in
12851 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12853 2003-04-29 Akim Demaille <akim@epita.fr>
12855 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12856 * src/getargs.c, src/getargs.h: here, as bool, not int.
12857 (nondeterministic_parser): New.
12858 * src/parse-gram.y, src/scan-gram.l: Support
12859 %nondeterministic-parser.
12860 * src/output.c (prepare): Use nondeterministic_parser instead
12861 of glr_parser where appropriate.
12862 * src/tables.c (conflict_row, action_row, save_row)
12863 (token_actions, token_actions, pack_vector): Ditto.
12865 2003-04-29 Akim Demaille <akim@epita.fr>
12867 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12869 2003-04-29 Akim Demaille <akim@epita.fr>
12871 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12872 with %pure-parser and %locations to exercise the patch from Yakov
12875 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12877 * data/yacc.c: (b4_lex_param): Corrected for the case where
12878 %lex-param is provided and %pure-parser isn't.
12880 2003-04-27 Paul Eggert <eggert@twinsun.com>
12882 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12883 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12884 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12885 if it is not defined.
12886 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12888 2003-04-26 Paul Eggert <eggert@twinsun.com>
12890 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12891 Declare to be of type suitable for the ninf value itself, not of
12892 type suitable for the corresponding table, since the latter might
12893 be unsigned but the ninf value might be negative. This fixes a
12894 bug reported by Alexandre Duret-Lutz in
12895 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12897 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12898 invokes it. We shouldn't invoke it twice because it will attempt
12899 to put error.o in the archive twice. This fixes a glitch reported
12900 by Martin Mokrejs in
12901 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12903 2003-04-21 Paul Eggert <eggert@twinsun.com>
12905 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12908 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12910 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12911 Fix obvious typo that results in uncompilable GLR parsers
12912 when both %pure-parser and %locations are used. (trivial change)
12914 2003-04-17 Paul Eggert <eggert@twinsun.com>
12916 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12917 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12918 Do not insert the expected token via unput, as this runs afoul
12919 of a POSIX-compatibility bug in flex 2.5.31.
12920 All uses changed to BEGIN the parent state,
12921 since we no longer insert the expected token via unput.
12922 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12923 that is no longer emitted after the above change.
12925 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12926 the first one. This change is from Paul Hilfinger, and it fixes
12927 regression reported by Werner Lemberg in
12928 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12930 (resolve_sr_conflict): Don't invoke state_errs_set
12931 unless one or more tokens have been explicitly made errors.
12932 Otherwise, the above change causes Bison to abort.
12934 * tests/existing.at (GNU pic Grammar): New test case, taken from
12937 2003-03-31 Akim Demaille <akim@epita.fr>
12939 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12941 2003-03-31 Akim Demaille <akim@epita.fr>
12943 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12946 2003-03-31 Akim Demaille <akim@epita.fr>
12948 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12949 From Paul Hilfinger.
12951 2003-03-29 Akim Demaille <akim@epita.fr>
12953 * m4/error.m4: Do not put under dynamic conditions some code which
12954 expansion is under static control.
12956 2003-03-29 Akim Demaille <akim@epita.fr>
12958 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12960 2003-03-29 Akim Demaille <akim@epita.fr>
12962 * doc/bison.texinfo (Strings are Destroyed): New.
12964 2003-03-13 Paul Eggert <eggert@twinsun.com>
12966 * .cvsignore: Add configure.lineno.
12967 * src/.cvsignore: Add yacc.
12968 * tests/.cvsignore: Add testsuite.log.
12969 * doc/fdl.texi: Sync with latest FSF version.
12971 2003-03-12 Paul Eggert <eggert@twinsun.com>
12973 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12974 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12975 cursor, instead of leaving it undefined. This fixes a bug
12976 reported by Tim Van Holder in
12977 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12978 * tests/input.at (Torturing the Scanner): Test the scanner on
12979 an empty input file, which was Tim Van Holder's test case.
12981 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12982 <sys/resource.h> can be included, include sys/time.h and
12983 sys/times.h first, if available. This works around the SunOS
12984 4.1.4 porting bug reported by Bruce Becker in
12985 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12987 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12988 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12989 AC_HEADER_SYS_WAIT.
12991 Merge changes from gnulib. This was prompted because the CVS
12992 snapshot didn't build on Solaris 7 due to strnlen problems.
12994 These changes need to be merged back into gnulib:
12995 * lib/hash.c: Include <stdbool.h> unconditionally.
12996 * m4/onceonly.m4 (m4_quote): New macro.
12997 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12998 Quote AC_FOREACH variable-expansions properly.
12999 The 2003-01-03 obstack.h change also needs merging.
13000 {end of changes requiring merging}
13002 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13003 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
13004 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
13005 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
13006 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
13007 New files, imported from gnulib.
13008 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
13011 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
13012 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
13015 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13017 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13018 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13019 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13020 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13021 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13022 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13023 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13024 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13025 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13026 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13027 (jm_PREREQ_ARGMATCH): Remove.
13028 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13029 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13031 * src/system.h: Include <stdbool.h> unconditionally.
13033 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13034 assuming at least C89 in the bitset code for some time now.
13036 2003-03-03 Akim Demaille <akim@epita.fr>
13040 2003-03-02 Akim Demaille <akim@epita.fr>
13042 * doc/bison.texinfo (Table of Symbols): Reactivate the
13043 documentation for %lex-param, and %parse-param.
13045 2003-03-02 Akim Demaille <akim@epita.fr>
13047 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13048 generate verbose error messages.
13049 Use the number of tokens as an upper bound in yytname, as it
13050 cannot be a non terminal.
13052 2003-03-02 Akim Demaille <akim@epita.fr>
13054 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13057 2003-03-02 Akim Demaille <akim@epita.fr>
13059 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13060 Use them to exercise yycheck overrun.
13061 Based on Andrew Suffield's grammar.
13063 2003-03-02 Akim Demaille <akim@epita.fr>
13065 Create tests/local.at for Bison generic testing macros.
13067 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13068 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13070 * tests/calc.at (AT_CHECK_CALC): Adjust.
13071 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13072 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13073 * tests/local.at: here.
13074 (AT_COMPILE_CXX): Tags the tests using it as c++.
13075 Ignore the test if CXX is not functional.
13077 2003-03-01 Paul Eggert <eggert@twinsun.com>
13079 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13080 not loc->end, since loc->end might contain garbage and this leads
13081 to undefined behavior on some platforms.
13082 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13083 depend on *loc, so that the reader doesn't give the the false
13084 impression that *loc is initialized.
13085 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13086 does not survive the return.
13088 2003-03-01 Akim Demaille <akim@epita.fr>
13090 * src/scan-gram.l (code_start): Always initialize it when entering
13091 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13092 yylex invocation. An alternative would be making it static, but
13093 then it starts with the second %%'s beginning, instead of its end.
13095 2003-02-28 Paul Eggert <eggert@twinsun.com>
13097 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13098 around a UnixWare 7.1.1 porting bug reported by John Hughes in
13099 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
13101 2003-02-26 Paul Eggert <eggert@twinsun.com>
13103 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13104 Remove Sequent/Pyramid discussion (nobody uses them any more).
13105 Merge VMS and MS-DOS discussion; these ports may well be dead
13106 but let's keep mentioning them for now. Put <> around email
13107 addresses. Add copyright notice.
13109 2003-02-24 Paul Eggert <eggert@twinsun.com>
13111 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13112 to avoid collision with flex use of yylineno.
13113 Problem reported by Bruce Lilly in
13114 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
13115 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13116 * data/yacc.c (yy_reduce_print): Likewise.
13118 * config/depcomp: Sync with Automake 1.7.3.
13120 2003-02-21 Akim Demaille <akim@epita.fr>
13122 * data/lalr1.cc: Use temporary variables instead of casts to
13123 change integer types.
13124 Suggested by Paul Eggert.
13126 2003-02-21 Akim Demaille <akim@epita.fr>
13128 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13129 to avoid confusions with lalr1.cc's notion of Position.
13130 Suggested by Paul Eggert.
13132 2003-02-20 Akim Demaille <akim@epita.fr>
13134 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13135 before initial_columns.
13136 (location.hh): Use consistent variable names when defining the
13138 Use "last" so that we subtract from Positions, not from unsigned.
13140 2003-02-20 Akim Demaille <akim@epita.fr>
13142 * data/lalr1.cc (position.hh): New subfile, including the extended
13143 and Doxygen'ed documentation of class Position.
13144 (location.hh): Use it.
13145 Document a` la Doxygen.
13146 With the help of Benoit Perrot.
13148 2003-02-20 Akim Demaille <akim@epita.fr>
13150 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13152 Redefine AT_YYERROR_SEES_LOC_IF using it.
13153 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13155 Don't use the location in yy::Parser::error_ and
13156 yy::Parser::print_ when not %locations.
13157 Activate more lalr1.cc tests.
13159 2003-02-19 Akim Demaille <akim@epita.fr>
13161 * data/lalr1.cc: When displaying a line number, be sure to make it
13164 2003-02-19 Akim Demaille <akim@epita.fr>
13166 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13168 (YYABORT, YYACCEPT, YYERROR): New.
13169 * tests/calc.at: Renable the lalr1.cc test.
13171 2003-02-19 Akim Demaille <akim@epita.fr>
13173 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13174 error recovery, mixing with/without pops and discarding of the
13177 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13179 2003-02-17 Paul Eggert <eggert@twinsun.com>
13181 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13182 * tests/testsuite.at (AT_COMPILE): Use them.
13183 This fixes the testsuite problem reported by Robert Lentz in
13184 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
13186 2003-02-12 Paul Eggert <eggert@twinsun.com>
13188 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13189 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
13190 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
13191 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13192 Check for malloc failure, for consistency with yacc.c.
13193 (yytname_size): Remove, for consistency with yacc.c.
13195 The bug still remains in data/lalr1.cc, as I didn't have time
13198 2003-02-06 Akim Demaille <akim@epita.fr>
13200 * configure.ac (GXX): Rename as...
13201 (CXX): this, to keep the original Autoconf semantics.
13203 * data/lalr1.cc: Fix b4_copyright invocations.
13204 If YYDEBUG is not defined, don't depend upon name_ being defined.
13205 (location.hh): Include string and iostream.
13206 (Position::filename): New member.
13207 (Position::Position ()): New.
13208 (operator<< (Position)): New.
13209 (operator- (Position, int)): New.
13210 (Location::first, Location::last): Rename as...
13211 (Location::begin, Location::end): these, to mock the conventional
13213 (operator<< (Location)): New.
13214 * tests/atlocal.in (CXX): New.
13215 * tests/testsuite.at (AT_COMPILE_CXX): New.
13216 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13217 locations in a more synthetic way.
13218 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13220 Adjust the C locations to match those from Emacs: first column is
13222 Change all the expected results.
13223 Conform to the GCS: simplify the locations when applicable.
13224 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13225 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13226 these CPP macros with the m4 macros new defined by...
13227 (AT_CHECK_PUSHDEFS): this, i.e.:
13228 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
13229 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
13231 (AT_CHECK_POPDEFS): Undefine them.
13232 (AT_CHECK_CALC_LALR1_CC): New.
13233 Use it for the first lalr1.cc test.
13235 2003-02-04 Akim Demaille <akim@epita.fr>
13237 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13238 Location as is defined.
13240 2003-02-04 Akim Demaille <akim@epita.fr>
13242 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13243 name_ being defined.
13245 2003-02-03 Paul Eggert <eggert@twinsun.com>
13247 * src/gram.h (start_symbol): Remove unused decl.
13249 Use more-consistent naming conventions for local vars.
13251 * src/derives.c (derives_compute): Change type of local var from
13252 int to rule_number.
13253 * src/gram.c (grammar_rules_partial_print): Likewise.
13254 * src/print.c (print_core): Likewise.
13255 * src/reduce.c (reduce_grammar_tables): Likewise.
13257 * src/gram.c (grammar_dump): Change name of item_number *
13258 local var from r to rp.
13259 * src/nullable.c (nullable_compute): Likewise.
13261 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13263 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13264 for symbol or symbol_number var.
13265 * src/reader.c (grammar_start_symbol_set): Likewise.
13266 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13268 * src/state.c (transitions_to): Likewise.
13269 * src/state.h: Likewise.
13270 * src/tables.c (symbol_number_to_vector_number): Likewise.
13272 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13275 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13278 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13281 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13282 Use str, not s, for char * var. Use ch, not c, for character var.
13283 Use size for size var.
13285 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13287 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13289 * src/uniqstr.h: Likewise.
13291 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13292 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13293 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13294 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13295 param to have same name as that of enum, so that we don't use
13296 "s" to stand for a non-state.
13298 2003-02-02 Akim Demaille <akim@epita.fr>
13300 * src/scan-skel.l: Scan more than one inert character per yylex
13303 2003-02-01 Paul Eggert <eggert@twinsun.com>
13307 * po/LINGUAS: Add ms.
13309 2003-01-30 Akim Demaille <akim@epita.fr>
13311 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13313 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13315 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13318 Changes in response to error report by S. Eken: GLR mode does not
13319 handle negative $ indices or $ indices in embedded rules correctly.
13320 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13322 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13323 (b4_rhs_location): Ditto.
13324 (yyfill): New function to copy from stack tree into array
13326 (yyuserAction): Modify to allow incremental move of semantic values
13327 to rhs array when in GLR mode.
13328 Define YYFILL to use in user-defined actions to fill semantic array
13330 Remove dummy use of yystack, as there is now a guaranteed use.
13331 (yydoAction): Modify to allow incremental move of semantic values
13332 to rhs array when in GLR mode.
13333 (yyresolveAction): Ditto.
13334 (yyglrShiftDefer): Update comment.
13335 (yyresolveStates): Use X == NULL for pointers, not !X.
13336 (yyglrReduce): Ditto.
13337 (yydoAction): Ditto
13339 * tests/glr-regr1.at: Rename to ...
13340 * tests/glr-regression.at: Add new regression test for the problems
13341 described above (adapted from S. Eken).
13342 Update copyright notice.
13343 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13344 * tests/Makefile.am: Ditto.
13346 2003-01-28 Paul Eggert <eggert@twinsun.com>
13348 * data/lalr1.cc: Do not use @output_header_name@ unless
13349 b4_defines_flag is set. This fixes two bugs reported by
13351 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13352 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13354 2003-01-21 Paul Eggert <eggert@twinsun.com>
13356 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13357 we don't need to worry about yyerrlab1 being reported as an
13358 "unused label" by non-GCC C compilers. The downside is that if
13359 locations are used then a couple of statements are duplicated each
13360 time YYERROR is invoked, but the upside is that the warnings
13362 (yyerrlab1): Move code to YERROR.
13363 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13364 This reverts some of the 2002-12-27 change.
13366 2003-01-17 Paul Eggert <eggert@twinsun.com>
13368 * src/output.c (symbol_printers_output): Fix typo that led
13369 to core dump. Problem reported by Antonio Rus in
13370 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13372 2003-01-13 Akim Demaille <akim@epita.fr>,
13373 Quoc Peyrot <chojin@lrde.epita.fr>,
13374 Robert Anisko <anisko_r@lrde.epita.fr>
13376 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13377 when the stacks contain one element, as the loop would otherwise
13378 free the last state, and then use the top state (the one we just
13379 popped). This means that the initial elements will not be freed
13380 explicitly, as is the case in yacc.c; it is not a problem, as
13381 these elements have fake values.
13383 2003-01-11 Paul Eggert <eggert@twinsun.com>
13385 * NEWS: %expect-violations are now just warnings, reverting
13386 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13387 bootstrapping problem reported by Matthias Klose; see
13388 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13389 * src/conflicts.c (conflicts_print): Likewise.
13390 * tests/conflicts.at (%expect not enough, %expect too much,
13391 %expect with reduce conflicts): Likewise.
13392 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13393 that the warning is enabled if the number of conflicts changes
13394 (not necessarily increases).
13396 * src/getargs.c (version): Update copyright year.
13398 2003-01-09 Akim Demaille <akim@epita.fr>
13400 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13402 2003-01-08 Paul Eggert <eggert@twinsun.com>
13404 * Makefile.maint (WGETFLAGS):
13405 New macro, containing "-C off" to disable proxy caches.
13406 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13407 (rel-check): Use $(WGET) instead of wget.
13409 2003-01-06 Paul Eggert <eggert@twinsun.com>
13411 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13412 the GLR paper of Scott, Johnstone and Hussain.
13414 2003-01-04 Paul Eggert <eggert@twinsun.com>
13416 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13417 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13418 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13419 (EXTRA_LIBRARIES): New var, for liby.a.
13420 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13421 (EXTRA_SCRIPTS): New var, for yacc.
13423 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13424 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13425 Problem reported by Nelson H. F. Beebe.
13427 2003-01-03 Paul Eggert <eggert@twinsun.com>
13429 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13430 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13431 when compiling Bison 1.875's `bitset bset = obstack_alloc
13432 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13434 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13435 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13436 grow to a huge size with typical invocation.
13438 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13439 Use the pattern recommended by Autoconf 2.57, except also protect
13440 against double-definition.
13441 * src/system.h: Likewise.
13442 Portability issues reported by Nelson H. F. Beebe.
13444 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13445 All uses changed. Provide a definition in both C and C++.
13446 (yytrue, yyfalse): Define even if defined (__cplusplus).
13448 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13449 Reported by Nelson H. F. Beebe.
13451 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13453 2003-01-02 Paul Eggert <eggert@twinsun.com>
13455 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13456 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13457 Bug reported by Nelson H. F. Beebe.
13459 2003-01-01 Paul Eggert <eggert@twinsun.com>
13463 2002-12-30 Paul Eggert <eggert@twinsun.com>
13465 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13467 (<INITIAL>","): Here. This causes stray "," to be treated
13470 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13471 last brace in braced code when not in Yacc mode, for compatibility
13472 with Bison 1.35. This resurrects the 2001-12-15 patch to
13475 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13476 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13478 2002-12-28 Paul Eggert <eggert@twinsun.com>
13480 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13481 that of SYM's type. This fixes Debian bug 168069, reported by
13484 2002-12-28 Paul Eggert <eggert@twinsun.com>
13488 Switch back to the Yacc style of conflict reports, undoing some
13489 of the 2002-07-30 change.
13490 * doc/bison.texinfo (Understanding): Use Yacc style for
13491 conflict reports. Also, use new way of locating rules.
13492 * src/conflicts.c (conflict_report):
13493 Renamed from conflict_report_yacc, removing the old
13494 'conflict_report'. Translate the entire conflict report at once,
13495 so that we don't assume that "," has the same interpretation in
13497 (conflicts_output): Use Yacc-style conflict report for each state,
13498 instead of our more-complicated style.
13499 (conflicts_print): Use Yacc-style conflict report, except print
13500 the input file name when not emulating Yacc.
13501 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13502 Conflicted Reduction, %expect not enough, %expect too much,
13503 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13504 * tests/existing.at (GNU Cim Grammar): Likewise.
13505 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13507 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13508 fatal): Don't invoke fflush; it's not needed and it might even be
13509 harmful for stdout, as stdout might not be open.
13510 * src/reduce.c (reduce_print): Likewise.
13512 2002-12-27 Paul Eggert <eggert@twinsun.com>
13514 Fix a bug where error locations were not being recorded correctly.
13515 This problem was originally reported by Paul Hilfinger in
13516 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13518 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13519 top of the location stack's error locations.
13520 (yyerrlab): Set it. When discarding a token, push its location
13521 onto yylerrsp so that we don't lose track of the error's end.
13522 (yyerrlab1): Now is only the target of YYERROR, so that we can
13523 properly record the location of the action that failed. For GCC
13524 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13525 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13526 (yyerrlab2): New label, which yyerrlab now falls through to.
13527 Compute the error's location by applying YYLLOC_DEFAULT to
13528 the locations of all the symbols that went into the error.
13529 * doc/bison.texinfo (Location Default Action): Mention that
13530 YYLLOC_DEFAULT is also invoked for syntax errors.
13531 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13532 Error locations include the locations of all the tokens that were
13533 discarded, not just the last token.
13535 2002-12-26 Paul Eggert <eggert@twinsun.com>
13537 * src/files.c: Include quote.h.
13538 (compute_output_file_names): Warn if we detect conflicting
13539 outputs to the same file. This should catch the misunderstanding
13540 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13542 * src/conflicts.c (conflicts_print): If the user specifies
13543 "%expect N", report an error if there are any reduce/reduce
13544 conflicts. This is what the manual says should happen.
13545 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13546 * tests/conflicts.at (%expect with reduce conflicts): New test.
13548 Don't use m4_include on relative file names, as it doesn't work as
13549 desired if there happens to be a file with that name under ".".
13551 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13552 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13553 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13554 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13555 * src/output.c (output_skeleton): Use full path names when
13556 specifying a file to include; don't rely on include path, as
13557 it's unreliable when the working file contains a file with
13560 2002-12-25 Paul Eggert <eggert@twinsun.com>
13562 Remove obsolete references to bison.simple and bison.hairy.
13563 Problem mentioned by Aubin Mahe in
13564 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13565 * data/glr.c: Comment fix.
13566 * doc/bison.1: Remove references. Also, mention "yacc".
13568 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13571 * src/parse-gram.y (declaration): Use enum "report_states" rather
13572 than its numeric value 1.
13574 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13575 opening a new one. This fixes Debian bug 165349, reported by
13578 2002-12-24 Paul Eggert <eggert@twinsun.com>
13582 * Makefile.maint (cvs-update): Don't assume that the shell
13583 supports $(...), as Solaris sh doesn't.
13585 * src/parse-gram.y (lloc_default): Remove test for empty
13586 nonterminals at the end, since it didn't change the result.
13588 2002-12-24 Paul Eggert <eggert@twinsun.com>
13590 If the user does not define YYSTYPE as a macro, Bison now declares it
13591 using typedef instead of defining it as a macro. POSIX requires this.
13592 For consistency, YYLTYPE is also declared instead of defined.
13594 %union directives can now have a tag before the `{', e.g., the
13595 directive `%union foo {...}' now generates the C code
13596 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13597 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13598 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13599 instead of `yyltype'.
13601 `yystype' and `yyltype' are now obsolescent macros instead of being
13602 typedefs or tags; they are no longer documented and will be
13603 withdrawn in a future release.
13605 * data/glr.c (b4_location_type): Remove.
13606 (YYSTYPE): Renamed from yystype.
13607 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13608 (struct YYLTYPE): Renamed from struct yyltype.
13609 (YYLTYPE): Renamed from yyltype.
13610 (yyltype, yystype): New (and obsolescent) macros,
13611 for backward compatibility.
13612 * data/yacc.c: Likewise.
13614 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13615 does not specify a union tag. This is for compatibility with
13618 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13619 const *, since it is now modified by stripping surrounding { }.
13620 (current_braced_code): Remove.
13621 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13622 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13623 trailing " {...}". Now of type <chars>.
13624 (grammar_declaration): Adjust to bundled tokens.
13625 (code_content): Remove; stripping is now done by add_param.
13626 (print_token_value): Print contents of bundled tokens.
13627 (token_name): New function.
13629 * src/reader.h (braced_code, current_braced_code): Remove.
13630 (token_name): New decl.
13632 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13633 token_type, not braced_code code_kind. All uses changed.
13634 (SC_PRE_CODE): New state, for scanning after a keyword that
13635 has (or usually has) an immediately-following braced code.
13636 (token_type): New local var, to keep track of which token type
13637 to return when scanning braced code.
13638 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13639 <INITIAL>"%parse-param", <INITIAL>"%printer",
13640 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13641 instead of returning a token type immediately.
13642 (<INITIAL>"{"): Set token type.
13643 (<SC_BRACED_CODE>"}"): Use it.
13644 (handle_action_dollar, handle_action_at): Now returns bool
13645 indicating success. Fail if ! current_rule; this prevents a core dump.
13646 (handle_symbol_code_dollar, handle_symbol_code_at):
13647 Remove; merge body into caller.
13648 (handle_dollar, handle_at): Complain in invalid contexts.
13650 * NEWS, doc/bison.texinfo: Document the above.
13651 * NEWS: Fix years and program names in copyright notice.
13653 2002-12-17 Paul Eggert <eggert@twinsun.com>
13655 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13656 Reporting, Table of Symbols): Omit mentions of %lex-param and
13657 %parse-param from the documentation for now.
13659 2002-12-15 Paul Eggert <eggert@twinsun.com>
13661 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13662 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13663 lookahead symbol, and which sets yychar in parser actions) and it
13664 disagreed with the Bison documentation. Bug
13665 reported by Andrew Walrond.
13667 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13668 as the caller now does that.
13669 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13670 (YYEMPTY): Parenthesize right hand side, since others use it.
13671 (yyparse): Don't assume that our generated code is the only code
13674 2002-12-13 Paul Eggert <eggert@twinsun.com>
13678 POSIX requires a "yacc" command.
13679 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13680 (MOSTLYCLEANFILES): Add yacc.
13682 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13683 as an alias for bison y.
13685 * po/LINGUAS: Add da.
13687 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13688 problem with latest <getopt.h>.
13689 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13691 * doc/fdl.texi: Upgrade to 1.2.
13692 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13693 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13694 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13696 * config/install-sh: Sync with autotools.
13698 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13699 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13700 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13701 locations are requested.
13702 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13703 locations are requested.
13705 2002-12-12 Paul Eggert <eggert@twinsun.com>
13707 Remove unportable casts and storage allocation tricks.
13708 While we're at it, remove almost all casts, since they
13709 usually aren't needed and are a sign of trouble.
13711 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13713 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13714 the pointer DSET returned by malloc; this isn't portable.
13715 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13716 Similarly for DERIVES.
13717 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13718 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13719 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13721 * src/derives.c (derives_compute): Do not bother invoking
13722 int_of_rule_number, since rule numbers are integers.
13724 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13725 rather than XMALLOC (char, N).
13727 * src/files.c (filename_split): Rewrite to avoid cast.
13729 * src/gram.h (symbol_number_as_item_number,
13730 item_number_as_symbol_number, rule_number_as_item_number,
13731 item_number_as_rule_number):
13732 Now inline functions rather than macros, to avoid casts.
13733 * src/state.h (state_number_as_int): Likewise.
13734 * src/tables.c (state_number_to_vector_number,
13735 symbol_number_to_vector_number): Likewise.
13737 * src/gram.h (int_of_rule_number): Remove; no longer used.
13739 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13740 since the resulting storage is always stored into.
13742 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13745 * src/muscle_tab.c (muscle_m4_output):
13746 Now inline. Return bool, not int.
13747 * src/state.c (state_compare): Likewise.
13748 * src/symtab.c (symbol_check_defined,
13749 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13750 hash_compare_symbol, hash_symbol):
13752 * src/uniqstr.c (uniqstr_print): Likewise.
13753 * src/muscle_tab.c (muscle_m4_output_processor):
13754 New function, to avoid casts.
13755 * src/state.c (state_comparator, stage_hasher): Likewise.
13756 * src/symtab.c (symbol_check_defined_processor,
13757 symbol_check_alias_consistency_processor, symbol_pack_processor,
13758 symbol_translation_processor, hash_symbol_comparator,
13759 hash_symbol_hasher): Likewise.
13760 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13761 * src/muscle_tab.c (muscles_m4_output):
13762 Use new functions instead of casting old functions unportably.
13763 * src/state.c (state_hash_new): Likewise.
13764 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13765 symbols_token_translations_init):
13767 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13769 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13770 var instead of casting to long, to avoid casts.
13771 (prepare_states): Use MALLOC rather than alloca, so that we don't
13772 have to worry about alloca.
13773 * src/state.c (state_hash_lookup): Likewise.
13775 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13776 local var instead of casting to unsigned char, to avoid casts.
13778 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13779 STATE_ALLOC): Remove.
13780 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13781 rather than calloc, and use offsetof to avoid allocating slightly
13783 (state_new): Initialize all members.
13785 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13787 * src/symtab.c (symbol_free): Remove; unused.
13788 (symbol_get): Remove cast in lhs of assignment.
13789 (symbols_do): Now static. Accept generic arguments, not
13790 hashing-related ones.
13792 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13793 (symbol_processor): Remove.
13794 (symbols_do): Remove decl; now static.
13796 * src/system.h (alloca): Remove; decl no longer needed.
13797 (<stddef.h>): Include, for offsetof.
13798 (<inttypes.>, <stdint.h>): Include if available.
13799 (uintptr_t): New type, if system lacks it.
13800 (CALLOC, MALLOC, REALLOC): New macros.
13801 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13804 * src/tables.c (table_size): Now int, to pacify GCC.
13805 (table_grow, table_ninf_remap): Use signed table size.
13806 (save_row): Don't bother initializing locals when not needed.
13807 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13808 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13810 * src/vcg.h: Correct misspellings.
13812 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13815 * src/getargs.c (getargs): Don't assume EOF == -1.
13817 2002-12-09 Paul Eggert <eggert@twinsun.com>
13819 Change identifier spellings to avoid collisions with names
13820 that are reserved by POSIX.
13822 Don't use names ending in _t, since POSIX reserves them.
13823 For consistency, remove _e and _s endings -- they're weren't
13824 needed to remove ambiguity. All uses changed.
13825 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13826 turn was just renamed from struniq_t.
13827 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13828 which in turn was just renamed from struniq_processor_t.
13829 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13830 in turn was renamed from hash_compare_struniq_t.
13831 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13832 (state_list): Renamed from state_list_t.
13833 * src/assoc.h (assoc): Renamed from assoc_t.
13834 * src/conflicts.c (enum conflict_resolution): Renamed from
13835 enum conflict_resolution_e.
13836 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13837 (rule_list): Renamed from rule_list_t.
13838 * src/getargs.h (enum trace): Renamed from enum trace_e.
13839 (enum report): Renamed from enum report_e.
13840 * src/gram.h (item_number): Renamed from item_number_t.
13841 (rule_number): Renamed from rule_number_t.
13842 (struct rule_s): Remove the "rule_s" part; not used.
13843 (rule): Renamed from rule_t.
13844 (rule_filter): Renamed from rule_filter_t.
13845 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13846 (goto_list): Renamed from goto_list_t.
13847 * src/lalr.h (goto_number): Renamed from goto_number_t.
13848 * src/location.h (location): Renamed from location_t.
13849 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13850 and moved here from:
13851 * src/muscle_tab.h (muscle_entry_t): here.
13852 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13853 (rule_list): Renamed from rule_list_t.
13854 * src/print_graph.c (static_graph): Renamed from graph.
13855 * src/reader.h (braced_code): Renamed from braced_code_t.
13856 Remove brace_code_e tag.
13857 * src/relation.h (relation_node): Renamed from relation_node_t.
13858 (relation_nodes): Renamed from relation_nodes_t.
13859 (relation): Renamed from relation_t.
13860 * src/state.h (state_number): Renamed from state_number_t.
13861 (struct state): Renamed from struct state_s.
13862 (state): Renamed from state_t.
13863 (transitions): Renamed from transitions_t. Unused (and
13864 misspelled) transtion_s tag removed.
13865 (errs): Renamed from errs_t. Unused errs_s tag removed.
13866 (reductions): Renamed from reductions_t. Unused tag
13867 reductions_s removed.
13868 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13869 (struct symbol_list): Renamed from struct symbol_list_s.
13870 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13871 (struct symbol): Renamed from struct symbol_s.
13872 (symbol): Renamed from symbol_t.
13873 * src/tables.c (vector_number): Renamed from vector_number_t.
13874 (action_number): Renamed from action_t.
13875 * src/tables.h (base_number): Renamed from base_t.
13876 * src/vcg.h (enum color): Renamed from enum color_e.
13877 (enum textmode): Renamed from enum textmode_e.
13878 (enum shape): Renamed from enum shape_e.
13879 (struct colorentry): Renamed from struct colorentry_s.
13880 (struct classname): Renamed from struct classname_s.
13881 (struct infoname): Renamed from struct infoname_s.
13882 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13883 (enum decision): Renamed from enum decision_e.
13884 (enum orientation): Renamed from enum orientation_e.
13885 (enum alignment): Renamed from enum alignment_e.
13886 (enum arrow_mode): Renamed from enum arrow_mode_e.
13887 (enum crossing_type): Renamed from enum crossing_type_e.
13888 (enum view): Renamed from enum view_e.
13889 (struct node): Renamed from struct node_s.
13890 (node): Renamed from node_t.
13891 (enum linestyle): Renamed from enum linestyle_e.
13892 (enum arrowstyle): Renamed from enum arrowstyle_e.
13893 (struct edge): Renamed from struct edge.
13894 (edge): Renamed from edge_t.
13895 (struct graph): Renamed from struct graph_s.
13896 (graph): Renamed from graph_t.
13897 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13898 Rename value_t -> value.
13899 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13900 value_t_as_yystype -> value_as_yystype.
13902 Don't include <errno.h> in the mainstream code, since it
13903 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13904 * lib/get-errno.c, lib/get-errno.h: New files.
13905 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13907 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13908 * src/output.c (output_skeleton): Likewise.
13909 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13911 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13913 (handle_action_dollar, handle_action_at): Likewise.
13914 * src/system.h: Do not include <errno.h>.
13915 (TAB_EXT): Renamed from EXT_TAB.
13916 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13918 Avoid str[a-z]*, since <string.h> reserves that name space.
13919 Change all instances of "struniq" in names to "uniqstr", and
13920 likewise for "STRUNIQ" and "UNIQSTR".
13921 * src/uniqstr.c: Renamed from src/struniq.c.
13922 * src/uniqstr.h: Renamed from src/struniq.h.
13923 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13924 * src/files.c (strsuffix): Remove; unused.
13925 (concat2): Renamed from stringappend. Now static.
13926 * src/files.h (strsuffix, stringappend): Remove; unused.
13927 * src/parse-gram.y (<chars>): Renamed from <string>.
13928 (<uniqstr>): Renamed from <struniq>.
13929 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13930 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13931 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13932 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13933 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13934 (N_EXPAND): Renamed from N_STRETCH.
13936 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13937 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13938 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13940 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13941 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13942 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13943 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13944 (BASE_MAXIMUM): Renamed from BASE_MAX.
13945 (BASE_MINIMUM): Renamed from BASE_MIN.
13946 (ACTION_MAX): Remove; unused.
13947 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13948 Unnecessary casts removed from above defines.
13951 Fix misspelling in names.
13952 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13953 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13957 * lib/timevar.c (timevar_report): Renamed from time_report,
13958 for consistency with other names.
13959 * lib/timevar.h (timevar_report): New decl.
13960 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13963 Sort include-file uses.
13965 Reorder all include files under src to be in the order "system.h".
13966 then the ../lib include files in angle brackets (alphabetized),
13967 then the . include files in double-quotes (alphabetized). Fix
13968 dependency breakages encountered in this process, as follows:
13969 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13970 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13971 * src/state.h: Include "symtab.h".
13973 2002-12-08 Paul Eggert <eggert@twinsun.com>
13975 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13976 since this causes problems when __file__ contains character
13977 sequences like "@" that are treated specially by src/scan-skel.l.
13978 Instead, just use the file's basename. This fixes the bug
13979 reported by Martin Mokrejs in
13980 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13982 2002-12-06 Paul Eggert <eggert@twinsun.com>
13984 Add support for rules that do not have trailing semicolons, as
13985 POSIX requires. Improve the quality of locations in Bison
13988 * src/location.c: Include <quotearg.h>.
13989 (empty_location): Now const.
13990 (location_print): New function. Follow the recommendation of the
13991 GNU Coding Standards for locations that span file boundaries.
13992 * src/location.h: Do not include <quotearg.h>; no longer needed.
13993 (boundary): New type.
13994 (location_t): Use it. This allows locations to span file boundaries.
13995 All member uses changed: file -> start.file or end.file (as needed),
13996 first_line -> start.line, first_column -> start.column,
13997 last_line -> end.line, last_column -> end.column.
13998 (equal_boundaries): New function.
13999 (LOCATION_RESET, LOCATION_STEP): Remove.
14000 (LOCATION_PRINT): Remove. All callers changed to use location_print.
14001 (empty_location): Now const.
14002 (location_print): New decl.
14003 * src/parse-gram.y (lloc_default): New function, which handles
14004 empty locations more accurately.
14005 (YYLLOC_DEFAULT): Use it.
14006 (%token COLON): Remove.
14007 (%token ID_COLON): New token.
14009 (declarations, rules): Remove trailing semicolon.
14010 (declaration, rules_or_grammar_declaration):
14011 Allow empty (";") declaration.
14012 (symbol_def): Remove empty actions; no longer needed.
14013 (rules_or_grammar_declaration): Remove trailing semicolon.
14014 (semi_colon.opt): Remove.
14015 * src/reader.h: Include location.h.
14016 (scanner_cursor): New decl.
14017 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14019 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14021 (STEP): Remove. No longer needed, now that adjust_location does
14022 the work. All uses removed.
14023 (scanner_cursor): New var.
14024 (adjust_location): Renamed from extend_location. It now sets
14025 *loc and adjusts the scanner cursor. All uses changed.
14026 Don't bother testing for CR.
14027 (handle_syncline): Remove location arg; now updates scanner cursor.
14028 All callers changed.
14029 (unexpected_end_of_file): Now accepts start boundary of token or
14030 comment, not location. All callers changed. Update scanner cursor,
14032 (SC_AFTER_IDENTIFIER): New state.
14033 (context_state): Renamed from c_context. All uses changed.
14034 (id_loc, code_start, token_start): New local vars.
14035 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14036 processing of Yacc white space and equivalents here.
14037 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14038 instead of returning ID immediately, since we need to search for
14039 a subsequent colon.
14040 (<INITIAL>"'", "\""): Save token_start.
14041 (<INITIAL>"%{", "{", "%%"): Save code_start.
14042 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14043 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14044 BEGIN context_state at end, not INITIAL.
14045 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14046 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14047 Return correct token start.
14048 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14049 the start of a character, string or multiline comment is found.
14050 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14051 Reduction): Adjust reported locations to match the more-precise
14052 results now expected.
14053 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14054 * tests/reduce.at (Useless Rules, Reduced Automaton,
14055 Underivable Rules): Likewise.
14056 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14057 or "|"' now that so many other tokens are allowed by the new grammar.
14059 * src/complain.h (current_file): Remove duplicate decl;
14060 current_file is now owned by files.h.
14061 * src/complain.c, src/scan-gram.l: Include files.h.
14063 2002-12-06 Paul Eggert <eggert@twinsun.com>
14065 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14066 promotes to int; it might be unsigned int.
14067 * data/yacc.c (yy_reduce_print): Likewise.
14069 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14070 be #defined in the prologue, not in the Bison declarations.
14071 This fixes Debian Bug 102878, reported by Shaul Karl.
14073 2002-12-02 Paul Eggert <eggert@twinsun.com>
14075 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14076 * lib/strtoul.c: New file, from gnulib.
14077 This fixes a porting bug reported by Peter Klein in
14078 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
14080 2002-11-30 Paul Eggert <eggert@twinsun.com>
14082 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14083 and put only a forward declaration in the prologue. This is for
14084 consistency with the other scanner helper functions.
14086 Type clashes now generate warnings, not errors, since it
14087 appears that POSIX may allow some grammars with type clashes.
14088 * src/reader.c (grammar_current_rule_check): Warn about
14089 type clashes instead of complaining.
14090 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14092 Add Yacc library, since POSIX requires it.
14093 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14094 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14095 * lib/main.c, lib/yyerror.c: New files.
14097 gram_error can be static; it need not be extern.
14098 * src/reader.h (gram_error): Remove decl.
14099 * src/parse-gram.y (gram_error): Now static. Add static decl.
14100 (print_token_value): Omit parameter names from forward decl,
14103 2002-11-29 Paul Eggert <eggert@twinsun.com>
14105 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14106 be declared before being used. E.g., one should typically
14107 declare them in the prologue. Use GNU coding style in examples.
14108 Put "const" consistently after the type it modifies. Mention
14109 that C99 supports "inline". Mention that yyerror traditionally
14112 %parse-param and %lex-param now take just one argument, the
14113 declaration; the argument name is deduced from the declaration.
14115 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14116 Reporting, Table of Symbols): Document this.
14117 * src/parse-gram.y (add_param): New function.
14119 (declaration): Implement new rule for %parse-param and %lex-param.
14120 * src/scan-gram.l: "," now elicits a warning, rather than being
14121 a token; this is more compatible with byacc.
14122 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14124 2002-11-27 Paul Eggert <eggert@twinsun.com>
14126 Rename identifiers to avoid real and potential collisions.
14128 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14129 to avoid collision with lex macro described by Bruce Lilly in
14130 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14131 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14132 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14133 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14135 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14136 The name "yycontrol" violates the name space rules, and this stuff
14137 wasn't being used anyway.
14138 (input): Remove action; this stuff wasn't being used.
14139 (gram_error): Rename local variable yylloc -> loc.
14140 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14141 (YY_DECL): Don't use "yy" at start of local variables.
14142 All uses changed, e.g., yylloc -> loc.
14143 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14144 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14145 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14146 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14148 * src/parse-gram.y (gram_error): loc is now const *.
14149 * src/reader.h (gram_error): Likewise.
14151 2002-11-24 Paul Eggert <eggert@twinsun.com>
14155 * tests/actions.at (Actions after errors): Use an output format
14156 more similar to that of the Printers and Destructors test.
14157 Test the position of the ';' token too.
14158 (Printers and Destructors): Likewise.
14159 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14160 unnecessarily alarming people when the test fails.
14162 * data/yacc.c (yyerrlab1): Move this label down, so that the
14163 parser does not discard the lookahead token if the user code
14164 invokes YYERROR. This change is required for POSIX conformance.
14166 * lib/error.c: Sync with gnulib.
14168 2002-11-22 Paul Eggert <eggert@twinsun.com>
14170 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14171 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14172 * lib/xmalloc.c: Likewise.
14174 2002-11-20 Paul Eggert <eggert@twinsun.com>
14176 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14178 2002-11-20 Paul Eggert <eggert@twinsun.com>
14180 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14181 should use `if (! x) abort ();' rather than `assert (x);', and
14182 anyway it's one less thing to worry about configuring.
14184 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14185 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14186 and replace all instances of assert with abort.
14187 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14188 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14190 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14191 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14192 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14193 hash_find_entry, hash_rehash, hash_insert): Likewise.
14194 * src/conflicts.c (resolve_sr_conflict): Likewise.
14195 * src/lalr.c (set_goto_map, map_goto): Likewise.
14196 * src/nullable.c (nullable_compute): Likewise.
14197 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14198 * src/reader.c (packgram, reader): Likewise.
14199 * src/state.c (state_new, state_free, state_transitions_set,
14200 state_reduction_find): Likewise.
14201 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14202 symbol_pack): Likewise.
14203 * src/tables.c (conflict_row, pack_vector): Likewise.
14204 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14205 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14206 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14207 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14209 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14210 (ARGMATCH_CONSTRAINT): New macro.
14211 (ARGMATCH_ASSERT): Use it.
14213 * src/system.h (verify): New macro.
14214 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14215 rather than assert.
14216 * src/tables.c (tables_generate): Likewise.
14218 * src/struniq.c (struniq_assert): Now returns void, and aborts
14219 if the assertion is false.
14220 (struniq_assert_p): Remove.
14221 * src/struniq.h: Likewise.
14223 2002-11-18 Paul Eggert <eggert@twinsun.com>
14225 * data/glr.c (yygetLRActions): Replace `yyindex' with
14226 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14227 This fixes the regression with Sun ONE Studio 7 cc that I reported in
14228 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
14230 2002-11-18 Akim Demaille <akim@epita.fr>
14232 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14234 From Tim Van Holder.
14236 2002-11-17 Paul Eggert <eggert@twinsun.com>
14238 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14239 to "SyntaxError" for consistency with my 2002-11-15 change.
14241 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14242 not define to {}, since this breaks the common use of `YYDPRINTF
14243 ((...));' if a single statement is desired (e.g. before `else').
14244 Work around GCC warnings by surrounding corresponding calls with
14246 (yyhasResolvedValue): Remove unused function.
14247 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14249 (yyreportSyntaxError): Renamed from yyreportParseError.
14250 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14252 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14253 extern when possible. Remove unused initializations.
14255 2002-11-16 Akim Demaille <akim@epita.fr>
14257 Augment the similarity between GLR and LALR traces.
14259 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14260 (YY_REDUCE_PRINT): New.
14261 (yyparse): Use them.
14262 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14264 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14265 state reached after the reduction/recovery, since...
14266 (yyparse, yyprocessOneStack): Report the state we are entering in.
14268 2002-11-16 Akim Demaille <akim@epita.fr>
14270 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14271 Add support for --trace=skeleton.
14272 * src/scan-skel.l: %option debug.
14273 Scan strings of non-@ or \n instead of character by character.
14274 (scan_skel): Handle trace_skeleton.
14276 (@output_parser_name@, @output_header_name@): ``Restore'' their
14277 support (used to be M4 macros).
14278 * data/yacc.c: Quote larger chunks, a la glr.c.
14279 * data/lalr1.cc: Likewise.
14280 The header guards are no longer available, so use some other
14281 string than `YYLSP_NEEDED'.
14283 2002-11-16 Akim Demaille <akim@epita.fr>
14285 Make the ``Printers and Destructors'' test more verbose, taking
14286 `yacc.c''s behavior as (possibly wrong) reference.
14288 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14289 instead of fprint on stdout.
14290 Set and report the last_line of the symbols.
14291 Consistently display values and locations.
14293 2002-11-16 Paul Eggert <eggert@twinsun.com>
14295 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14297 2002-11-15 Paul Eggert <eggert@twinsun.com>
14299 * tests/actions.at (Actions after errors): New test case.
14301 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14302 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14303 tests/action.at, tests/calc.at, tests/conflicts.at,
14304 tests/cxx-type.at, tests/regression.at:
14305 "parse error" -> "syntax error" for POSIX compatibility.
14306 "parsing stack overflow..." -> "parser stack overflow" so
14307 that code matches Bison documentation.
14309 2002-11-15 Akim Demaille <akim@epita.fr>
14311 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14312 take two BRACED_CODE, not two string_content.
14313 Free the scanner's obstack when we are done.
14314 (code_content): New.
14315 * tests/calc.at: Adjust.
14316 * doc/bison.texinfo: Adjust.
14317 Also, make sure to include the `,' for these declarations.
14319 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14321 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14322 definition; avoids potential autoreconf problems.
14324 2002-11-15 Akim Demaille <akim@epita.fr>
14326 Always check the value returned by yyparse.
14328 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14329 returned by yyparse.
14330 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14332 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14333 returned by yyparse.
14335 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14337 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14340 2002-11-14 Paul Eggert <eggert@twinsun.com>
14342 * src/output.c (output_skeleton): Call xfopen instead of
14343 duplicating xfopen's body.
14345 Fix bugs reported by Nelson H. F. Beebe in
14346 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14348 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14349 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14350 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14351 file twice in the grammar, as an extra check.
14353 * tests/input.at (Torturing the Scanner): Surround the
14354 backslash-newline tests with "#if 0", to make it less likely that
14355 we'll run into compiler bugs. Bring back solitary \ inside
14356 comment, but add a closing comment to work around HP C bug. Don't
14357 test backslash-newline in C character constant.
14359 2002-11-14 Akim Demaille <akim@epita.fr>
14361 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14362 status of the compiler.
14363 Calling `exit 1' is no longer needed.
14364 Reported by Nelson H. F. Beebe.
14366 2002-11-14 Akim Demaille <akim@epita.fr>
14368 * tests/atlocal.in (CPPFLAGS): We have config.h.
14369 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14371 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14372 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14373 * tests/regression.at, tests/torture.at: Use them for all the
14374 grammars that are to be compiled.
14375 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14376 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14377 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14379 2002-11-14 Akim Demaille <akim@epita.fr>
14381 * doc/bison.texinfo: Various formatting changes (alignments in
14382 samples, additional @group/@end group, GCS in samples.
14383 Use @deffn instead of simple @table to define the directives,
14384 macros, variables etc.
14386 2002-11-13 Paul Eggert <eggert@twinsun.com>
14388 Fix some bugs reported by Albert Chin-A-Young in
14389 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14391 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14392 -o c"; the HP C compiler chatters during compilation.
14393 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14394 * tests/headers.at (export YYLTYPE): Likewise.
14396 * tests/input.at (Torturing the Scanner): Remove lines containing
14397 solitary backslashes, as they tickle a bug in the HP C compiler.
14399 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14400 comments, since they're not portable. Use GNU coding style.
14402 2002-11-13 Akim Demaille <akim@epita.fr>
14404 * data/yacc.c: Leave bigger chunks of quoted text.
14405 (YYDSYMPRINTF): New.
14406 Use it to report symbol activities.
14407 * data/glr.c (YYDSYMPRINTF): New.
14410 2002-11-12 Paul Eggert <eggert@twinsun.com>
14414 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14415 (yyglrReduce): Return yyok, not 0.
14416 This should avoid the enumerated-type warnings reported
14417 by Nelson H. F. Beebe in
14418 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14420 * lib/bbitset.h (BITSET_INLINE): Remove.
14421 * lib/bitset.h [! BITSET_INLINE]: Remove.
14422 (bitset_set, bitset_reset, bitset_test): Rename local vars
14423 to avoid shadowing warnings by GCC.
14425 * data/glr.c (inline): Remove #define. It's the user's
14426 responsibility to #define it away, just like 'const'.
14427 This fixes one of the bugs reported by Nelson H. F. Beebe in
14428 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14430 * Makefile.maint (po-check): Scan .l and .y files instead of the
14431 .c and the .h files that they generate. This fixes the bug
14432 reported by Tim Van Holder in:
14433 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14434 Look for N_ as well as for _. Try to avoid matching #define for
14436 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14437 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14438 * src/scan-gram.l: Revamp regular expressions so that " and '
14439 do not confuse xgettext.
14441 * src/struniq.h (struniq_new): Do not declare the return type
14442 to be 'const'; this violates the C standard.
14443 * src/struniq.c (struniq_new): Likewise.
14445 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14447 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14448 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14451 2002-11-12 Akim Demaille <akim@epita.fr>
14453 * Makefile.maint: Sync with Autoconf:
14454 (local_updates): New.
14456 2002-11-12 Akim Demaille <akim@epita.fr>
14458 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14460 2002-11-12 Akim Demaille <akim@epita.fr>
14462 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14465 2002-11-12 Akim Demaille <akim@epita.fr>
14467 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14470 2002-11-12 Akim Demaille <akim@epita.fr>
14472 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14473 Use it to test the GLR parser.
14475 2002-11-12 Akim Demaille <akim@epita.fr>
14477 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14479 * data/glr.c (yystos): New.
14480 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14481 (YYDSYMPRINT): New.
14482 (yyval): Don't define it, it is handled via M4.
14483 (yyrecoverParseError): Free verbosely the discarded symbols.
14484 * data/yacc.c (yysymprint): Remove, rather...
14485 (b4_yysymprint_generate): invoke.
14486 * data/c.m4 (b4_yysymprint_generate): New.
14487 Accept pointers as arguments, as opposed to the version from
14489 (b4_yydestruct_generate): Likewise.
14490 * tests/cations.at (Printers and Destructors): Use Bison directives
14491 instead of CPP macros.
14492 Don't rely on internal details.
14494 2002-11-12 Akim Demaille <akim@epita.fr>
14496 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14497 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14498 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14499 it against YYEMPTY and so forth), work on yytoken (i.e., set
14500 it to YYEMPTY etc.).
14501 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14502 (b4_symbol_actions): Remove.
14503 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14504 for 0, end-of-input.
14506 2002-11-12 Akim Demaille <akim@epita.fr>
14508 * doc/bison.texinfo (Destructor Decl): New.
14510 2002-11-12 Akim Demaille <akim@epita.fr>
14512 * src/tables.c (tables_generate): Use free for pointers that
14513 cannot be NULL, not XFREE.
14514 (pack_vector): Use assert, not fatal, for bound violations.
14515 * src/state.c (state_new): Likewise.
14516 * src/reader.c (reader): Likewise.
14517 * src/lalr.c (set_goto_map): Likewise.
14518 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14521 2002-11-12 Akim Demaille <akim@epita.fr>
14523 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14525 * src/scan-gram.l (last_string): Is global to the file, not to
14527 * src/parse-gram.y (input): Don't append the epilogue here,
14528 (epilogue.opt): do it here, and free the scanner's obstack.
14529 * src/reader.c (epilogue_set): Rename as...
14530 (epilogue_augment): this.
14531 * data/c.m4 (b4_epilogue): Defaults to empty.
14533 2002-11-12 Akim Demaille <akim@epita.fr>
14535 * src/getargs.c (long_options): Remove duplicates.
14536 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14538 * doc/bison.rnh: Remove.
14539 * doc/bison.texinfo (VMS Invocation): Remove.
14541 2002-11-12 Akim Demaille <akim@epita.fr>
14543 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14544 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14546 Use struniq for symbols.
14548 * src/symtab.h (symbol_t): The tag member is a struniq.
14549 (symbol_type_set): Adjust.
14550 * src/symtab.c (symbol_new): Takes a struniq.
14551 (symbol_free): Don't free the tag member.
14552 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14553 (hash_compare_symbol, hash_symbol): these.
14554 Use the fact that tags as struniqs.
14555 (symbol_get): Use struniq_new.
14556 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14558 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14559 and type members are struniqs.
14560 * src/reader.c (get_merge_function)
14561 (grammar_current_rule_merge_set): Adjust.
14562 (TYPE, current_type): Are struniq.
14564 Use struniq for file names.
14566 * src/files.h, src/files.c (infile): Split into...
14567 (grammar_file, current_file): these.
14568 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14569 * src/reduce.c (reduce_print): Likewise.
14570 * src/getargs.c (getargs): Likewise.
14571 * src/complain.h, src/complain.c: Likewise.
14572 * src/main.c (main): Call struniqs_new early enough to use it for
14574 Don't free the input file name.
14576 2002-11-12 Akim Demaille <akim@epita.fr>
14578 * src/symtab.c (symbol_free): Remove dead deactivated code:
14579 type_name are properly removed.
14580 Don't use XFREE to free items that cannot be NULL.
14581 * src/struniq.h, src/struniq.c: New.
14582 * src/main.c (main): Initialize/free struniqs.
14583 * src/parse-gram.y (%union): Add astruniq member.
14585 * src/scan-gram.l (<{tag}>): Return a struniq.
14586 Free the obstack bit that used to store it.
14587 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14589 2002-11-11 Paul Eggert <eggert@twinsun.com>
14591 Revamp to fix many (but not all) of the C- and M4-related quoting
14592 problems. Among other things, this fixes the Bison bug reported
14593 by Jan Hubicka when processing the Bash grammar; see:
14594 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14596 Use new @ escapes consistently. Represent brackets with @{ and @}
14597 rather than @<:@ and @:>@, since this works a bit better with dumb
14598 editors like vi. Represent @ with @@, since @ is now consistently
14599 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14600 __ofile__, to avoid unexpected expansions. Similarly, use @output
14601 rather than #output.
14603 * data/c.m4 (b4_copyright): Omit file name from comment, since
14604 the file name could contain "*/".
14605 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14606 be quoted. All uses changed.
14608 * data/glr.c: Use new @ escapes consistently.
14609 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14610 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14611 Remove, since they couldn't handle arbitrary characters in file
14613 * data/lalr1.cc: Likewise.
14614 * data/yacc.c: Likewise.
14616 * src/files.c (output_infix): Remove; all uses removed.
14617 * src/files.h: Likewise.
14619 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14620 mishandled funny characters in file names, and anyway it isn't
14622 * data/yacc.c: Likewise.
14623 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14625 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14626 * data/yacc.c: Likewise.
14628 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14630 (muscle_init): Quote filename as a C string.
14631 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14632 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14633 * src/output.c (escaped_file_name_output): New function.
14634 (prepare_symbols): Quote tokens for M4.
14635 (prepare): Don't insert output_infix, output_prefix,
14636 output_parser_name, output_header_name; this is now down by scan-skel.
14637 Insert skeleton as a C string.
14639 * src/output.c (user_actions_output, symbol_destructors_output,
14640 symbol_printers_output): Quote filenames for C and M4.
14641 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14643 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14644 escapes other than \\ and \'; this simplifies the code.
14645 (<SC_STRING>): Likewise, for \\ and \".
14646 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14647 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14648 Use new escapes @{ and @} for [ and ].
14650 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14651 them with auto vars.
14652 Switch to new escape scheme, where @ is the escape character uniformly.
14653 Abort if a stray escape character is found. Avoid unbounded input
14654 buffer when parsing non-escaped text.
14656 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14657 __oline__, #output, $@, and @{ do not have unintended meanings.
14659 2002-11-09 Paul Eggert <eggert@twinsun.com>
14661 Fix the test failure due to GCC warnings described in
14662 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14663 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14664 evaluate to 0 if it's impossible for NINF to be in the respective
14666 (yygetLRActions, yyrecoverParseError): Use them.
14668 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14669 counted in the token inserted at end of file. Now takes
14670 location_t *, not location_t, so that the location can be
14671 adjusted. All uses changed.
14673 * tests/regression.at (Invalid inputs): Adjust wording in
14674 diagnostic to match the new behavior.
14676 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14677 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14678 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14679 abort ();'. This reduces the runtime of the "Many lookaheads"
14680 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14683 2002-11-07 Paul Eggert <eggert@twinsun.com>
14685 * src/parse-gram.y (CHARACTER): Remove unused token.
14688 * src/scan-gram.l: Remove stack option. We no longer use the
14689 stack, since the stack was never deeper than 1; instead, use the
14690 new auto var c_context to record the stacked value.
14692 Remove nounput option. At an unexpected end of file, we now unput
14693 the minimal input necessary to end cleanly; this simplifies the
14696 Avoid unbounded token sizes where this is easy.
14698 (unexpected_end_of_file): New function.
14699 Use it to systematize the error message on unexpected EOF.
14700 (last-string): Now auto, not static.
14701 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14702 (scanner_last_string_free): Remove; not used.
14703 (percent_percent_count): Move decl to just before use.
14704 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14705 not the (never otherwised-used) CHARACTER.
14707 2002-11-07 Akim Demaille <akim@epita.fr>
14709 Let yyerror always receive the msg as last argument, so that
14710 yyerror can be variadic.
14712 * data/yacc.c (b4_yyerror_args): New.
14713 Use it when calling yyerror.
14714 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14715 Use it when calling yyerror.
14716 * doc/bison.texinfo (Error Reporting): Adjust.
14717 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14718 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14720 2002-11-06 Akim Demaille <akim@epita.fr>
14722 #line should have quoted strings.
14723 Ideally, this should be done by m4_quotearg.
14725 * src/scan-skel.l: Include quotearg.h.
14727 * src/output.c (symbol_printers_output)
14728 (symbol_destructors_output): Quote the file name.
14730 2002-11-06 Akim Demaille <akim@epita.fr>
14732 * tests/regression.at (Invalid inputs): Adjust to the recent
14735 2002-11-06 Akim Demaille <akim@epita.fr>
14737 Restore --no-lines.
14738 Reported by Jim Kent.
14740 * data/c.m4 (b4_syncline): New.
14741 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14742 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14743 * src/output.c (user_actions_output): Likewise.
14744 (prepare): Define 'b4_synclines_flag'.
14745 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14747 2002-11-06 Akim Demaille <akim@epita.fr>
14749 * src/main.c (main): Free `infile'.
14750 * src/scan-gram.l (handle_syncline): New.
14752 * src/output.c (user_actions_output, symbol_destructors_output)
14753 (symbol_printers_output): Use the location's file name, not
14755 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14757 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14759 * src/tables.c (matching_state): Don't allow states to match if
14760 either has GLR conflict entries.
14762 2002-11-05 Paul Eggert <eggert@twinsun.com>
14764 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14765 "integer out of range" rather than "invalid value".
14766 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14769 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14770 Also, remove one static variable in the scanner.
14772 * src/scan-gram.l (braces_level): Now auto, not static.
14773 Initialize to zero if the compiler is being picky.
14774 (INITIAL): Clear braces_level instead of incrementing it.
14775 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14776 as POSIX 1003.1-2001 requires.
14777 * src/system.h (IF_LINT): New macro, taken from coreutils.
14778 * configure.ac: Define "lint" if --enable-gcc-warnings.
14780 2002-11-05 Akim Demaille <akim@epita.fr>
14782 * src/scan-gram.l: When it starts with `%', complain about the
14783 whole directive, not just that `invalid character: %'.
14785 2002-11-04 Akim Demaille <akim@epita.fr>
14787 * Makefile.maint: Update from Autoconf.
14788 (update, cvs-update, po-update, do-po-update): New.
14790 2002-11-04 Akim Demaille <akim@epita.fr>
14792 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14794 Have yyerror `use' its arguments.
14795 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14796 returns true when location & yacc & pure & parse-param.
14797 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14799 2002-11-04 Akim Demaille <akim@epita.fr>
14801 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14803 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14806 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14809 2002-11-03 Paul Eggert <eggert@twinsun.com>
14811 * src/reader.c (get_merge_function, grammar_current_rule_check):
14812 Use consistent diagnostics for reporting type name clashes.
14813 Quote the types with <>, for consistency with Yacc.
14814 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14816 2002-11-03 Akim Demaille <akim@epita.fr>
14818 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14820 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14821 (b4_parse_param): Remove.
14822 Use b4_identification.
14823 Propagate b4_pure_args where needed to pass them to yyerror.
14824 * data/glr.m4 (b4_parse_param): Remove.
14825 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14826 (b4_lpure_formals): New.
14827 Use b4_identification.
14828 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14829 b4_user_formals and b4_user_args.
14830 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14831 (yyreportAmbiguity): When using a pure parser, also need
14832 the location, and the parse-params.
14834 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14835 When using a pure parser, also need the parse-params.
14837 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14838 (%pure-parser + %parse-param) LALR and GLR parsers.
14839 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14840 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14841 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14842 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14843 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14844 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14845 * doc/bison.texinfo: Untabify the whole file.
14846 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14847 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14848 (Error Reporting): Adjust to these new directives.
14849 Document %error-verbose, deprecate YYERROR_VERBOSE.
14851 2002-11-03 Akim Demaille <akim@epita.fr>
14853 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14854 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14855 command line options.
14856 * tests/cxx-type.at: Formatting changes.
14858 2002-11-03 Paul Eggert <eggert@twinsun.com>
14860 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14861 to count columns correctly, and to check for invalid inputs.
14863 Use mbsnwidth to count columns correctly. Account for tabs, too.
14864 Include mbswidth.h.
14865 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14866 (extend_location): New function.
14867 (YY_LINES): Remove.
14869 Handle CRLF in C code rather than in Lex code.
14870 (YY_INPUT): New macro.
14871 (no_cr_read): New function.
14873 Scan UCNs, even though we don't fully handle them yet.
14874 (convert_ucn_to_byte): New function.
14876 Handle backslash-newline correctly in C code.
14877 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14878 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14880 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14881 Use {splice} wherever C allows backslash-newline.
14882 YY_STEP after space, newline, vertical-tab.
14883 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14885 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14887 ({int}, handle_action_dollar, handle_action_at): Check for integer
14890 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14892 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14893 as well as \000. Check for UCHAR_MAX, not 255.
14894 Allow \x with an arbitrary positive number of digits, as in C.
14895 Check for overflow here.
14896 Allow \? and UCNs, for compatibility with C.
14898 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14899 with quote slot used by complain_at.
14901 * tests/input.at: Add tests for backslash-newline, m4 quotes
14902 in symbols, long literals, and funny escapes in strings.
14904 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14905 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14906 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14907 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14908 * m4/mbswidth.m4: New file, from GNU coreutils.
14910 * doc/bison.texinfo (Grammar Outline): Document // comments.
14911 (Symbols): Document that trigraphs have no special meaning in Bison,
14912 nor is backslash-newline allowed.
14913 (Actions): Document that trigraphs have no special meaning.
14915 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14918 2002-11-02 Paul Eggert <eggert@twinsun.com>
14920 * src/reader.c: Don't include quote.h; not needed.
14921 (get_merge_function): Reword warning to be consistent with
14922 type clash diagnostic in grammar_current_rule_check.
14924 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14925 bug in trigraph handling.
14927 * src/output.c (prepare_symbols): When printing token names,
14928 escape "[" as "@<:@" and likewise for "]".
14930 * src/system.h (errno): Remove declaration, as we are now
14931 assuming C89 or better, and C89 guarantees errno.
14933 2002-10-30 Paul Eggert <eggert@twinsun.com>
14935 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14936 Check for close failures.
14937 * src/files.h (xfclose): Return void, not int, since it always
14939 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14941 * src/output.c (output_skeleton): Use xfclose rather than fclose
14942 and ferror. xfclose now checks ferror.
14944 * data/glr.c (YYLEFTMOST_STATE): Remove.
14945 (yyreportTree): Use a stack-based leftmost state. This avoids
14946 our continuing battles with bogus warnings about initializers.
14948 2002-10-30 Akim Demaille <akim@epita.fr>
14950 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14953 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14955 * tests/glr-regr1.at: New test for reported regressions.
14956 * tests/testsuite.at: Add glr-regr1.at test.
14957 * tests/Makefile.am: Add glr-regr1.at test.
14959 2002-10-24 Paul Eggert <eggert@twinsun.com>
14963 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14964 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14965 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14966 Don't assume strdup exists; POSIX says its an XSI extension.
14967 Check for buffer overflow on input.
14969 2002-10-24 Akim Demaille <akim@epita.fr>
14971 * src/output.c (output_skeleton): Don't disable M4sugar comments
14972 too soon: it results in comments being expanded.
14973 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14976 2002-10-24 Akim Demaille <akim@epita.fr>
14978 * data/yacc.c (m4_int_type): New.
14979 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14980 char' as only yacc.c wants K&R portability.
14981 * data/glr.c (yysigned_char): Remove.
14982 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14983 Reported by Quoc Peyrot.
14985 2002-10-23 Paul Eggert <eggert@twinsun.com>
14987 * src/main.c (main): With --trace=time, report times even if a
14988 non-fatal error occurs. Formerly, the times were reported in some
14989 such cases but not in others.
14990 * src/reader.c (reader): Just return if a complaint has been issued,
14991 instead of exiting, so that 'main' can report times.
14993 2002-10-22 Akim Demaille <akim@epita.fr>
14995 * src/system.h: Include sys/types.
14996 Reported by Bert Deknuydt.
14998 2002-10-23 Paul Eggert <eggert@twinsun.com>
15000 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
15001 Suggested by Art Haas.
15003 2002-10-22 Paul Eggert <eggert@twinsun.com>
15005 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
15006 decl; not needed any more.
15007 * src/main.c (main): Use return to exit, undoing yesterday's change.
15008 The last OS that we could find where this wouldn't work is
15009 SunOS 3.5, and that's too old to worry about now.
15011 * data/glr.c (struct yyltype): Define members even when not
15012 doing locations. This is more consistent with yacc.c, and it
15013 works around the following bug reports:
15014 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15015 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
15017 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15018 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15019 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15021 2002-10-22 Akim Demaille <akim@epita.fr>
15023 * data/README: New.
15025 2002-10-21 Paul Eggert <eggert@twinsun.com>
15027 Be consistent about 'bool'; the old code used an enum in one
15028 module and an int in another, and this violates the C standard.
15029 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15030 * configure.ac (AC_HEADER_STDBOOL): Add.
15031 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15032 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15033 * src/symtab.c (hash_compare_symbol_t): Likewise.
15034 * src/system.h (bool, false, true): Use a definition consistent
15035 with ../lib/hash.c. All uses changed.
15037 * src/complain.c (warning_issued): Renamed from warn_message_count,
15038 so that we needn't worry about integer overflow (!).
15039 Now of type bool. All uses changed.
15040 (complaint_issued): Renamed from complain_message_count; likewise.
15042 * src/main.c (main): Use exit to exit with failure.
15044 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15045 rather than 1 and 0.
15046 * src/main.c (main): Likewise.
15047 * src/getargs.c (getargs): Likewise.
15048 * src/reader.c (reader): Likewise.
15050 * src/getarg.c (getargs): Remove duplicate code for
15051 "Try `bison --help'".
15053 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15054 What was that "2" for?
15056 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15057 * src/getargs.c (usage): Likewise.
15059 * src/getargs.c (getargs): When there are too few operands, report
15060 the last one. When there are too many, report the first extra
15061 one. This is how diffutils does it.
15063 2002-10-20 Paul Eggert <eggert@twinsun.com>
15065 Remove K&R vestiges.
15066 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15067 * src/complain.c (VA_START): Remove. Assume prototypes.
15068 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15069 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15070 fatal): Assume prototypes.
15071 * src/complain.h: Assume prototypes.
15072 * src/system.h (PARAMS): Remove.
15073 Include <limits.h> unconditionally, since it's guaranteeed even
15074 for a freestanding C89 compiler.
15075 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15076 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
15078 2002-10-20 Akim Demaille <akim@epita.fr>
15080 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15081 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15082 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15083 (yyresolveStates, yyresolveAction, yyresolveStack)
15084 (yyprocessOneStack): Use them.
15085 (yy_reduce_print): New.
15086 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15088 2002-10-20 Akim Demaille <akim@epita.fr>
15090 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15091 arguments and output `void'.
15092 (b4_c_function): Rename as...
15093 (b4_c_function_def): this.
15094 (b4_c_function_decl, b4_c_ansi_function_def)
15095 (b4_c_ansi_function_decl): New.
15096 Change the interpretation of the arguments: before `int, foo', now
15098 * data/yacc.c (yyparse): Prototype and define thanks to these.
15099 Adjust b4_c_function_def uses.
15100 * data/glr.c (yyparse): Likewise, but ANSI only.
15102 2002-10-20 Akim Demaille <akim@epita.fr>
15104 * src/output.c (prepare): Move the definition of `tokens_number',
15105 `nterms_number', `undef_token_number', `user_token_number_max'
15107 (prepare_tokens): Here.
15108 (prepare_tokens): Rename as...
15109 (prepare_symbols): this.
15110 (prepare): Move the definition of `rules_number' to...
15111 (prepare_rules): here.
15112 (prepare): Move the definition of `last', `final_state_number',
15113 `states_number' to...
15114 (prepare_states): here.
15115 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15117 2002-10-20 Akim Demaille <akim@epita.fr>
15119 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15121 2002-10-20 Akim Demaille <akim@epita.fr>
15123 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15126 2002-10-20 Akim Demaille <akim@epita.fr>
15128 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15129 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15131 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15133 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15134 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15137 2002-10-19 Paul Eggert <eggert@twinsun.com>
15139 Do not create a temporary file, as that involves security and
15140 cleanup headaches. Instead, use a pair of pipes.
15141 Derived from a suggestion by Florian Krohm.
15142 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15143 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15144 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15145 (BISON_PREREQ_SUBPIPE): Add.
15146 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15147 Add subpipe.h, subpipe.c.
15148 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15149 * po/POTFILES.in: Add lib/subpipe.c.
15150 * src/output.c: Include "subpipe.h".
15151 (m4_invoke): Remove decl.
15152 (scan_skel): New decl.
15153 (output_skeleton): Use pipe rather than temporary file for m4 input.
15154 Check that m4sugar.m4 is readable, to avoid deadlock.
15155 Check for pipe I/O error.
15156 * src/scan-skel.l (readpipe): Remove decl.
15157 (scan_skel): New function, to be used in place of m4_invoke.
15158 Read from stream rather than file.
15160 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15161 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15162 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15163 this generates a more-accurate value anyway.
15165 * lib/timevar.c (timervar_accumulate): Rename locals to
15166 avoid confusion with similarly-named more-global.
15167 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15169 * src/output.c (prepare): Use xstrdup to convert char const *
15170 to char *, to avoid GCC warning.
15172 2002-10-19 Akim Demaille <akim@epita.fr>
15174 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15175 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15176 Use them to have `calc.y' ready for %pure-parser.
15177 * data/yacc.c (YYLEX): Pass a yylex return type to
15178 b4_c_function_call.
15180 2002-10-19 Akim Demaille <akim@epita.fr>
15182 Prototype support of %lex-param and %parse-param.
15184 * src/parse-gram.y: Add the definition of the %lex-param and
15185 %parse-param tokens, plus their rules.
15186 Drop the `_' version of %glr-parser.
15188 * src/scan-gram.l (INITIAL): Scan them.
15189 * src/muscle_tab.c: Comment changes.
15190 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15191 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15192 (muscle_entry_s): The `value' member is no longer const.
15193 Adjust all dependencies.
15194 * src/muscle_tab.c (muscle_init): Adjust: use
15195 MUSCLE_INSERT_STRING.
15196 Initialize the obstack earlier.
15197 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15198 (muscle_pair_list_grow): New.
15199 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15200 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15201 * tests/calc.at: Use %locations, not --locations.
15202 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15204 2002-10-19 Akim Demaille <akim@epita.fr>
15206 * src/getargs.c (usage): Take status as argument and exit
15208 Report the traditional `Try ... --help' message when status != 0.
15209 (usage, version): Don't take a FILE * as arg, it is pointless.
15210 (getargs): When there is an incorrect number of arguments, make it
15211 an error, and report it GNUlically thanks to `usage ()'.
15213 2002-10-18 Paul Eggert <eggert@twinsun.com>
15215 * data/glr.c (yyreportParseError): Don't assume that sprintf
15216 yields the length of the printed string, as this is not true
15217 on SunOS 4.1.4. Reported by Peter Klein.
15219 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15220 * tests/conflicts.at (%nonassoc and eof): Likewise.
15221 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15223 2002-10-17 Akim Demaille <akim@epita.fr>
15225 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15226 * src/getargs.c (trace_types, trace_args): Adjust.
15227 * src/reader.c (grammar_current_rule_prec_set)
15228 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15229 Standardize error messages.
15230 And s/@prec/%prec/!
15231 (reader): Use trace_flag to enable scanner/parser debugging,
15232 instead of an adhoc scheme.
15233 * src/scan-gram.l: Remove trailing debugging code.
15235 2002-10-16 Paul Eggert <eggert@twinsun.com>
15237 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15240 * NEWS: Officially drop support for building Bison with K&R C,
15241 since it didn't work anyway and it's not worth worrying about.
15242 * Makefile.maint (wget_files): Remove ansi2knr.c.
15243 (ansi2knr.c-url_prefix): Remove.
15244 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15245 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15246 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15248 2002-10-15 Paul Eggert <eggert@twinsun.com>
15250 Stop using the "enum_" trick for K&R-style function definitions;
15251 it confused me, and I was the author! Instead, assume that people
15252 who want to use K&R C compilers (when using these modules in GCC,
15253 perhaps?) will run ansi2knr.
15255 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15256 All uses of "enum_" changed to "enum ".
15257 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15258 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15260 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15261 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15262 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15263 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15264 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15265 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15266 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15267 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15268 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15269 Use function prototypes; this removes the need for declaring
15270 static functions simply to provide their prototypes.
15271 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15272 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15273 bitset_count_, bitset_create, bitset_dump, bitset_first,
15274 bitset_free, bitset_init, bitset_last, bitset_next,
15275 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15276 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15277 bitset_print, bitset_release_memory, bitset_toggle_,
15278 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15279 debug_bitset): Likewise.
15280 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15281 * lib/bitset_stats.c (bitset_log_histogram_print,
15282 bitset_percent_histogram_print, bitset_stats_and,
15283 bitset_stats_and_cmp, bitset_stats_and_or,
15284 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15285 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15286 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15287 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15288 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15289 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15290 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15291 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15292 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15293 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15294 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15295 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15296 bitset_stats_zero): Likewise.
15297 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15298 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15299 bitsetv_dump, debug_bitsetv): Likewise.
15300 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15301 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15302 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15303 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15304 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15305 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15306 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15307 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15308 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15309 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15310 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15312 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15313 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15314 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15315 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15316 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15317 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15318 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15319 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15320 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15321 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15322 lbitset_xor_cmp, lbitset_zero): Likewise.
15324 2002-10-14 Akim Demaille <akim@epita.fr>
15328 2002-10-14 Akim Demaille <akim@epita.fr>
15330 * tests/Makefile.am (maintainer-check-posix): New.
15332 2002-10-14 Akim Demaille <akim@epita.fr>
15334 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15337 2002-10-14 Akim Demaille <akim@epita.fr>
15339 * src/tables.c (table_ninf_remap): base -> tab.
15340 Reported by Matt Rosing.
15342 2002-10-14 Paul Eggert <eggert@twinsun.com>
15344 * tests/action.at, tests/calc.at, tests/conflicts.at,
15345 tests/cxx-type.at, tests/headers.at, tests/input.at,
15346 tests/regression.at, tests/synclines.at, tests/torture.at:
15347 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15348 so that the tests still work even if POSIXLY_CORRECT is set.
15349 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15351 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15352 for portability to K&R hosts. Fix typo: signed char is guaranteed
15353 only to 127, not to 128.
15354 * data/glr.c (yysigned_char): New type.
15355 * data/yacc.c (yysigned_char): Likewise.
15356 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15358 2002-10-13 Paul Eggert <eggert@twinsun.com>
15360 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15361 true due to limited range of data type" warning from GCC.
15363 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15364 by wrapping enum yytokentype's definition inside #ifndef
15365 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15367 2002-10-13 Akim Demaille <akim@epita.fr>
15369 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15370 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15372 2002-10-13 Akim Demaille <akim@epita.fr>
15374 * Makefile.maint: Update from Autoconf 2.54.
15375 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15377 2002-10-13 Akim Demaille <akim@epita.fr>
15379 * src/print.c (print_state): Separate the list of solved conflicts
15380 from the other items.
15381 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15383 2002-10-13 Akim Demaille <akim@epita.fr>
15385 Let nondeterministic skeletons be usable with deterministic
15388 With the patch, GAWK compiled by GCC without -O2 passes its test
15389 suite using a GLR parser driven by LALR tables. It fails with -O2
15390 because `struct stat' gives two different answers on my machine:
15391 88 (definition of an auto var) and later 96 (memset on this var).
15392 Hence the stack is badly corrumpted. The headers inclusion is to
15393 blame: if I move the awk.h inclusion before GLR's system header
15394 inclusion, the two struct stat have the same size.
15396 * src/tables.c (pack_table): Always create conflict_table.
15397 (token_actions): Always create conflict_list.
15398 * data/glr.c (YYFLAG): Remove, unused.
15400 2002-10-13 Akim Demaille <akim@epita.fr>
15402 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15404 (VALGRIND, GXX): New.
15405 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15406 * tests/bison.in: Run $PREBISON a pre-command.
15407 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15408 (maintainer-check-g++): New.
15409 * Makefile.am (maintainer-check): New.
15411 2002-10-13 Akim Demaille <akim@epita.fr>
15413 * data/glr.c: Formatting changes.
15414 Tweak some trace messages to match yacc.c's.
15416 2002-10-13 Akim Demaille <akim@epita.fr>
15418 GLR parsers sometimes raise parse errors instead of performing the
15420 Reported by Charles-Henry de Boysson.
15422 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15423 check the length of the traces when %glr.
15424 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15426 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15428 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15429 (yyltype): Remove the yy prefix from the member names.
15430 (yytable): Complete its comment.
15431 (yygetLRActions): Map error action number from YYTABLE from
15433 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15434 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15435 not satisfying as we could compare an YYACTION computed from
15436 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15437 only value for error actions.
15438 (yyreportParseError): In verbose parse error messages, don't issue
15439 `error' in the list of expected tokens.
15440 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15441 next action to perform to match glr.c's decoding.
15442 (yytable): Complete its comment.
15444 2002-10-13 Paul Eggert <eggert@twinsun.com>
15446 Fix problem reported by Henrik Grubbstroem in
15447 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15448 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15449 because the Bison parser reads the second action before reducing
15451 * src/scan-gram.l (rule_length): New static var.
15452 Use it to keep track of the rule length in the scanner, since
15453 we can't expect the parser to be in lock-step sync with the scanner.
15454 (handle_action_dollar, handle_action_at): Use this var.
15455 * tests/actions.at (Exotic Dollars): Test for the problem.
15457 2002-10-12 Paul Eggert <eggert@twinsun.com>
15459 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15460 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15461 Include <sys/time.h> when checking for clock_t and struct tms.
15462 Use same include order as source.
15463 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15464 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15466 * lib/timevar.c: Update copyright date and clarify comments.
15467 (get_time) [IN_GCC]: Keep the GCC version for reference.
15469 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15470 GCC version as of today, then merge Bison's changes.
15471 Change "GCC" to "Bison" in copyright notice. timevar.def's
15472 author is Akim, so change that too.
15474 * src/reader.c (grammar_current_rule_check):
15475 Don't worry about the default action if $$ is untyped.
15476 Prevents bogus warnings reported by Jim Gifford in
15477 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15479 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15480 * data/glr.c, data/lalr1.cc, data/yacc.c:
15481 Output token definitions before the first part of user declarations.
15482 Fixes compatibility problem reported by Jim Gifford for kbd in
15483 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15485 2002-10-11 Paul Eggert <eggert@twinsun.com>
15487 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15488 (yyparse): here. This undoes some of the 2002-07-25 change.
15489 Compatibility problem reported by Ralf S. Engelschall with
15490 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15492 2002-10-11 Akim Demaille <akim@epita.fr>
15494 * tests/regression.at Characters Escapes): New.
15495 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15497 Reported by Jan Nieuwenhuizen.
15499 2002-10-11 Akim Demaille <akim@epita.fr>
15503 2002-10-10 Paul Eggert <eggert@twinsun.com>
15505 Portability fixes for bitsets; this also avoids several GCC
15508 * lib/abitset.c: Include <stddef.h>, for offsetof.
15509 * lib/lbitset.c: Likewise.
15511 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15512 properly for vectors of objects. Do not assume that adding a
15513 header size to a multiple of a word size yields a value that is
15514 properly aligned for the whole union.
15515 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15517 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15518 unique names for structures.
15519 * lib/ebitset.c (ebitset_bytes): Likewise.
15520 * lib/lbitset.c (lbitset_bytes): Likewise.
15522 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15523 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15524 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15525 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15526 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15527 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15528 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15529 to improve the type-checking that GCC can do.
15530 * lib/bitset.c (bitset_op4_cmp): Likewise.
15531 * lib/bitset_stats.c (bitset_stats_count,
15532 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15533 bitset_stats_copy, bitset_stats_disjoint_p,
15534 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15535 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15536 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15537 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15538 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15539 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15540 bitset_stats_or_and_cmp): Likewise.
15541 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15542 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15543 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15544 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15546 * lib/abitset.h: Include bitset.h, not bbitset.h.
15547 * lib/ebitset.h: Likewise.
15548 * lib/lbitset.h: Likewise.
15550 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15551 All instances of parameters of type enum bitset_opts are now of
15552 type enum_bitset_opts, to conform to the C Standard, and similarly
15553 for enum_bitset_type.
15554 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15555 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15557 Do not use "struct bitset_struct" to mean different things in
15558 different modules. Not only is this confusing, it violates
15559 the C Standard, which requires that structure types in different
15560 modules must be compatible if one is to be passed to the other.
15561 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15562 All instances of "struct bitset_struct *" replaced with "bitset".
15563 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15564 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15565 struct lbitset_struct, struct bitset_stats_struct): New types.
15566 All uses of struct bitset_struct changed to union bitset_union,
15568 * lib/abitset.c (struct abitset_struct, abitset,
15569 struct bitset_struct): Remove.
15570 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15571 struct bitset_struct): Remove.
15572 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15573 bitset_struct): Remove.
15574 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15577 Do not call a function of type T using a call that assumes the
15578 function is of a different type U. Standard C requires that a
15579 function must be called with a type that is compatible with its
15581 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15583 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15585 * lib/ebitset.c (PFV): Remove.
15586 * lib/lbitset.c (PFV): Likewise.
15587 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15588 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15590 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15591 (ebitset_vtable): Use them.
15592 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15593 lbitset_xor): New functions.
15594 (lbitset_vtable): Use them.
15596 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15599 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15601 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15602 Use offsetof, for simplicity.
15604 2002-10-06 Paul Eggert <eggert@twinsun.com>
15606 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15607 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15608 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15609 which was inadvertently undone by the 2002-09-30 patch.
15610 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15611 the same width as int.
15613 2002-10-04 Paul Eggert <eggert@twinsun.com>
15617 * configure.ac (AC_INIT), NEWS: Increment version number.
15619 * doc/bison.texinfo: Minor spelling, grammar, and white space
15621 (Symbols): Mention that any negative value returned from yylex
15622 signifies end-of-input. Warn about negative chars. Mention
15623 the portable Standard C character set.
15625 The GNU coding standard says CFLAGS and YFLAGS are reserved
15626 for the installer to set.
15627 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15628 * src/Makefile.am (AM_CFLAGS): Likewise.
15629 (AM_YFLAGS): Renamed from YFLAGS.
15631 Fix some MAX and MIN problems.
15632 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15633 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15634 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15635 * src/reader.c (reader): Use it.
15637 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15638 POSIX 1003.1-2001 has removed fgrep.
15640 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15642 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15643 interpreted as signed.
15644 * lib/ebitset.c (ebitset_list): Fix bug.
15646 2002-10-01 Paul Eggert <eggert@twinsun.com>
15648 More fixes for 64-bit hosts and large bitsets.
15650 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15651 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15652 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15653 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15654 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15655 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15656 bitset_count_): Likewise.
15657 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15658 bitset_first, bitset_last): Likewise.
15659 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15660 bitset_stats_list_reverse, bitset_stats_size,
15661 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15663 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15664 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15665 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15666 bitsetv_reflexive_transitive_closure): Likewise.
15667 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15668 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15670 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15673 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15674 Use size_t, not unsigned int, to count bytes.
15675 * lib/abitset.h (abitset_bytes): Likewise.
15676 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15678 * lib/bitset.h (bitset_bytes): Likewise.
15679 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15680 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15681 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15682 * lib/ebitset.c (ebitset_bytes): Likewise.
15683 * lib/ebitset.h (ebitset_bytes): Likewise.
15684 * lib/lbitset.c (lbitset_bytes): Likewise.
15685 * lib/lbitset.h (lbitset_bytes): Likewise.
15687 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15688 abitset_subset_p, abitset_disjoint_p, abitset_and,
15689 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15690 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15691 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15692 abitset_or_and, abitset_or_and_cmp):
15693 Use bitset_windex instead of unsigned int.
15694 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15695 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15696 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15697 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15699 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15701 * lib/bitset.c (bitset_print):
15702 Use proper printf formats for widths of integer types.
15703 * lib/bitset_stats.c (bitset_percent_histogram_print,
15704 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15705 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15706 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15707 * lib/lbitset.c (lbitset_bytes): Likewise.
15709 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15710 BITSET_SIZE_MAX): New macros.
15711 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15712 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15713 to BITSET_WINDEX_MAX.
15715 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15716 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15717 since we now return the bitset_bindex type (not int).
15719 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15720 when computing sizes.
15721 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15723 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15724 and avoid cast to unsigned.
15726 2002-09-30 Akim Demaille <akim@epita.fr>
15728 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15729 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15730 Updates from Michael Hayes.
15732 2002-09-30 Art Haas <ahaas@neosoft.com>
15734 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15736 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15739 2002-09-27 Akim Demaille <akim@epita.fr>
15743 2002-09-27 Akim Demaille <akim@epita.fr>
15745 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15746 (Because of AC_LIBSOURCE).
15748 2002-09-27 Akim Demaille <akim@epita.fr>
15750 Playing with Autoscan.
15752 * configure.ac: Remove the old LIBOBJ tweaks.
15753 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15754 * lib/strrchr.c: New.
15755 * lib/strtol.c: New, from the Coreutils 4.5.1.
15757 2002-09-27 Akim Demaille <akim@epita.fr>
15759 Playing with Autoscan.
15761 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15762 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15763 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15764 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15767 2002-09-24 Akim Demaille <akim@epita.fr>
15769 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15770 (Frequently Asked Questions, Parser Stack Overflow): New.
15772 2002-09-13 Akim Demaille <akim@epita.fr>
15774 Playing with autoscan.
15776 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15777 * src/files.c (skeleton_find): Remove, unused.
15778 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15779 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15781 2002-09-13 Akim Demaille <akim@epita.fr>
15783 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15784 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15786 2002-09-13 Akim Demaille <akim@epita.fr>
15788 * configure.ac: Require 2.54.
15789 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15790 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15791 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15792 Remove, provided by Autoconf macros.
15794 2002-09-12 Akim Demaille <akim@epita.fr>
15796 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15798 2002-09-12 Akim Demaille <akim@epita.fr>
15800 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15801 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15802 Reported by Martin Mokrejs.
15804 2002-09-10 Akim Demaille <akim@epita.fr>
15806 * src/parse-gram.y: Associate a human readable string to each
15808 * tests/regression.at (Invalid inputs): Adjust.
15810 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15812 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15813 with an Autoconf-2.5x style configure.ac.
15815 2002-09-06 Paul Eggert <eggert@twinsun.com>
15817 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15818 exception applies only to yacc.c. This is a modification of a
15819 patch originally suggested by Akim Demaille.
15821 2002-09-06 Akim Demaille <akim@epita.fr>
15823 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15825 * data/yacc.c: here.
15827 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15829 (b4_ltype): Default to yy::Location from location.hh.
15831 2002-09-04 Jim Meyering <jim@meyering.net>
15833 * data/yacc.c: Guard the declaration of yytoknum also with
15834 `#ifdef YYPRINT', so it is declared only when used.
15836 2002-09-04 Akim Demaille <akim@epita.fr>
15838 * configure.in: Rename as...
15839 * configure.ac: this.
15842 2002-09-04 Akim Demaille <akim@epita.fr>
15844 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15845 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15846 translate maintainer only messages.
15848 2002-08-12 Paul Eggert <eggert@twinsun.com>
15852 * Makefile.am (SUBDIRS): Remove intl.
15853 (DISTCLEANFILES): Remove.
15854 * NEWS: Mention that GNU M4 is now required. Clarify what is
15855 meant by "larger grammars". Mention the pt_BR translation.
15856 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15857 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15858 Bump version from 0.11.2 to 0.11.5.
15859 (BISON_PREREQ_STAGE): Remove.
15860 (AM_GNU_GETTEXT): Use external gettext.
15861 (AC_OUTPUT): Remove intl/Makefile.
15863 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15865 * data/glr.c: Include string.h, for strlen.
15866 (yyreportParseError): Use size_t for yysize.
15867 (yy_yypstack): No longer nested inside yypstates, as nested
15868 functions are not portable. Do not assume size_t is the
15870 (yypstates): Do not assume that ptrdiff_t is the same width
15871 as int, and similarly for yyposn and YYINDEX.
15873 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15875 * lib/Makefile.am (INCLUDES): Do not include from the intl
15876 directory, which has been removed.
15877 * src/Makefile.am (INCLUDES): Likewise.
15879 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15880 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15883 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15884 * tests/Makefile.am (EXTRA_DIST): Likewise.
15886 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15887 Do not assume that bitset_windex is the same width as unsigned.
15889 * lib/abitset.c (abitset_unused_clear): Do not assume that
15890 bitset_word is the same width as int.
15891 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15892 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15893 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15894 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15895 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15897 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15898 portability to one's complement hosts!).
15899 * lib/ebitset.c (ebitset_op1): Likewise.
15900 * lib/lbitset.c (lbitset_op1): Likewise.
15902 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15903 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15904 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15905 Sync with fileutils.
15906 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15907 lib/gettext.h: Sync with diffutils.
15909 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15910 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15912 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15913 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15916 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15917 size_t; the old version tried to do this but casted improperly.
15918 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15919 (bitset_test): Now returns int, not unsigned long.
15921 * lib/bitset_stats.c: Include "gettext.h".
15923 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15924 name locals "index", as it generates unnecessary warnings on some
15925 hosts that have an "index" function.
15927 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15928 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15929 they need translation.
15930 * src/LR0.c (state_list_append, new_itemsets, get_state,
15931 append_states, generate_states): Likewise.
15932 * src/assoc.c (assoc_to_string): Likewise.
15933 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15934 * src/gram.c (grammar_dump): Likewise.
15935 * src/injections.c (injections_compute): Likewise.
15936 * src/lalr.c (lookaheads_print): Likewise.
15937 * src/relation.c (relation_transpose): Likewise.
15938 * src/scan-gram.l: Likewise.
15939 * src/tables.c (table_grow, pack_vector): Likewise.
15941 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15942 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15943 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15944 * m4/mbstate_t.m4: Sync with fileutils.
15945 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15947 * po/LINGUAS: Add pt_BR.
15948 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15949 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15951 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15953 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15955 * src/complain.c (strerror_r): Remove decl; not needed.
15956 (strerror): Use same pattern as ../lib/error.c.
15958 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15960 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15962 * src/main.c (main): Cast result of bindtextdomain and textdomain
15963 to void, to avoid a GCC warning when --disable-nls is in effect.
15965 * src/scan-gram.l: Use strings rather than escapes when possible,
15966 to minimize the number of warnings from xgettext.
15967 (handle_action_dollar, handle_action_at): Don't use isdigit,
15968 as it mishandles negative chars and it may not work as expected
15969 outside the C locale.
15971 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15972 this is a GCC extension and is not portable to other compilers.
15974 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15975 Do not include <ctype.h>; no longer needed.
15976 Do not include <malloc.h>; no longer needed (and generates
15977 warnings on OpenBSD 3.0).
15979 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15982 * tests/regression.at: Do not use 'cc -c input.c -o input';
15983 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15985 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15986 exit status as failure, not just exit status 1. Sun C exits
15987 with status 2 sometimes.
15989 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15990 Use it for the two large tests.
15992 2002-08-02 Akim Demaille <akim@epita.fr>
15994 * src/conflicts.c (conflicts_output): Don't output rules never
15995 reduced here, since anyway that computation doesn't work.
15996 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15997 (rule_useless_p, rule_never_reduced_p): New.
15998 (grammar_rules_partial_print): Use a filter instead of a range.
15999 Display the title only if needed.
16000 (grammar_rules_print): Adjust.
16001 (grammar_rules_never_reduced_report): New.
16002 * src/tables.c (action_row): Move the computation of rules never
16004 (token_actions): here.
16005 * src/main.c (main): Make the parser before making the report, so
16006 that rules never reduced are computed.
16007 Call grammar_rules_never_reduced_report.
16008 * src/print.c (print_results): Report rules never reduced.
16009 * tests/conflicts.at, tests/reduce.at: Adjust.
16011 2002-08-01 Akim Demaille <akim@epita.fr>
16013 Instead of attaching lookaheads and duplicating the rules being
16014 reduced by a state, attach the lookaheads to the reductions.
16016 * src/state.h (state_t): Remove the `lookaheads',
16017 `lookaheads_rule' member.
16018 (reductions_t): Add a `lookaheads' member.
16019 Use a regular array for the `rules'.
16020 * src/state.c (reductions_new): Initialize the lookaheads member
16022 (state_rule_lookaheads_print): Adjust.
16023 * src/state.h, src/state.c (state_reductions_find): New.
16024 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16025 (count_rr_conflicts): Adjust.
16026 * src/lalr.c (LArule): Remove.
16027 (add_lookback_edge): Adjust.
16028 (state_lookaheads_count): New.
16029 (states_lookaheads_initialize): Merge into...
16030 (initialize_LA): this.
16031 (lalr_free): Adjust.
16032 * src/main.c (main): Don't free nullable and derives too early: it
16033 is used by --verbose.
16034 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16036 2002-08-01 Akim Demaille <akim@epita.fr>
16038 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16040 (set_derives, free_derives): Rename as...
16041 (derives_compute, derives_free): this.
16042 Adjust all dependencies.
16043 * src/nullable.c (set_nullable, free_nullable): Rename as...
16044 (nullable_compute, nullable_free): these.
16045 (rule_list_t): Store rule_t *, not rule_number_t.
16046 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16047 pointers, instead of their numbers.
16048 * src/main.c (main): Call nullable_free, and derives_free earlier,
16049 as they were lo longer used.
16051 2002-08-01 Akim Demaille <akim@epita.fr>
16053 * lib/timevar.c (get_time): Include children time.
16054 * src/lalr.h (LA, LArule): Don't export them: used with the
16056 * src/lalr.c (LA, LArule): Static.
16057 * src/lalr.h, src/lalr.c (lalr_free): New.
16058 * src/main.c (main): Call it.
16059 * src/tables.c (pack_vector): Check whether loc is >= to the
16061 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16062 (tables_generate): do it, since that's also it which allocates
16064 Don't free LA and LArule, main does.
16066 2002-07-31 Akim Demaille <akim@epita.fr>
16068 Separate parser tables computation and output.
16070 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16071 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16072 (yydefgoto, yydefact, high): Move to...
16073 * src/tables.h, src/tables.c: here.
16074 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16075 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16076 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16077 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16078 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16079 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16080 (action_row, save_row, token_actions, save_column, default_goto)
16081 (goto_actions, sort_actions, matching_state, pack_vector)
16082 (table_ninf_remap, pack_table, prepare_actions): Move to...
16083 * src/tables.c: here.
16084 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16085 * src/output.c (token_actions, output_base, output_conflicts)
16086 (output_check): Merge into...
16087 (prepare_actions): this.
16088 (actions_output): Rename as...
16089 (user_actions_output): this.
16090 * src/main.c (main): Call tables_generate and tables_free.
16092 2002-07-31 Akim Demaille <akim@epita.fr>
16094 Steal GCC's --time-report support.
16096 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16097 stolen/adjusted from GCC.
16098 * m4/stage.m4: Remove time related checks.
16099 * m4/timevar.m4: New.
16100 * configure.in: Adjust.
16101 * src/system.h: Adjust to using timevar.h.
16102 * src/getargs.h, src/getargs.c: Support trace_time for
16104 * src/main.c (stage): Remove.
16105 (main): Replace `stage' invocations with timevar calls.
16106 * src/output.c: Insert pertinent timevar calls.
16108 2002-07-31 Akim Demaille <akim@epita.fr>
16110 Let --trace have arguments.
16112 * src/getargs.h (enum trace_e): New.
16113 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16114 (long_options, short_options): --trace/-T takes an optional
16116 Change all the uses of trace_flag to reflect the new flags.
16117 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16119 Strengthen `stage' portability.
16121 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16122 * configure.in: Use it.
16123 Don't check for malloc.h and sys/times.h.
16124 * src/system.h: Include them when appropriate.
16125 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16126 times and struct tms are available.
16128 2002-07-30 Akim Demaille <akim@epita.fr>
16130 In verbose parse error message, don't report `error' as an
16132 * tests/actions.at (Printers and Destructors): Adjust.
16133 * tests/calc.at (Calculator $1): Adjust.
16134 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16135 error message, do not report the parser accepts the error token in
16138 2002-07-30 Akim Demaille <akim@epita.fr>
16140 Normalize conflict related messages.
16142 * src/complain.h, src/complain.c (warn, complain): New.
16143 * src/conflicts.c (conflicts_print): Use them.
16144 (conflict_report_yacc): New, extracted from...
16145 (conflicts_print): here.
16146 * tests/conflicts.at, tests/existing.at: Adjust.
16148 2002-07-30 Akim Demaille <akim@epita.fr>
16150 Report rules which are never reduced by the parser: those hidden
16153 * src/LR0.c (save_reductions): Don't make the final state too
16154 different: save its reduction (accept) instead of having a state
16155 without any action (no shift or goto, no reduce).
16156 Note: the final state is now a ``regular'' state, i.e., the
16157 parsers now contain `reduce 0' as default reduction.
16158 Nevertheless, since they decide to `accept' when yystate =
16159 final_state, they still will not reduce rule 0.
16160 * src/print.c (print_actions, print_reduction): Adjust.
16161 * src/output.c (action_row): Track reduced rules.
16162 (token_actions): Report rules never reduced.
16163 * tests/conflicts.at, tests/regression.at: Adjust.
16165 2002-07-30 Akim Demaille <akim@epita.fr>
16167 `stage' was accidently included in a previous patch.
16168 Initiate its autoconfiscation.
16170 * configure.in: Look for malloc.h and sys/times.h.
16171 * src/main.c (stage): Adjust.
16172 Report only when trace_flag.
16174 2002-07-29 Akim Demaille <akim@epita.fr>
16176 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16178 (errs_t): symbol_t*, not symbol_number_t.
16179 (reductions_t): rule_t*, not rule_number_t.
16180 (FOR_EACH_SHIFT): New.
16181 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16182 * src/print.c, src/print_graph.c: Adjust.
16184 2002-07-29 Akim Demaille <akim@epita.fr>
16186 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16188 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16189 (endtoken, accept): these.
16190 * src/reader.c (reader): Set endtoken's default tag to "$end".
16191 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16192 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16195 2002-07-29 Akim Demaille <akim@epita.fr>
16197 * src/reduce.c (reduce_grammar): When the language is empty,
16198 complain about the start symbol, not the axiom.
16200 * tests/reduce.at (Empty Language): New.
16202 2002-07-26 Akim Demaille <akim@epita.fr>
16204 * src/reader.h, src/reader.c (gram_error): ... can't get
16205 yycontrol without making too strong assumptions on the parser
16207 * src/output.c (prepare_tokens): Use the real 0th value of
16208 token_translations instead of `0'.
16209 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16211 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16212 for the time being: %locations ought to provide it to yyerror.
16214 2002-07-25 Akim Demaille <akim@epita.fr>
16216 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16217 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16218 * tests/regression.at (Web2c Actions): Adjust.
16220 2002-07-25 Akim Demaille <akim@epita.fr>
16222 Stop storing rules from 1 to nrules + 1.
16224 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16225 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16226 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16227 Iterate from 0 to nrules.
16228 Use rule_number_as_item_number and item_number_as_rule_number.
16229 Adjust to `derive' now containing possibly 0.
16230 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16231 Handle the `- 1' part in rule numbers from/to item numbers.
16232 * src/conflicts.c (log_resolution): Fix the message which reversed
16234 * src/output.c (action_row): Initialize default_rule to -1.
16235 (token_actions): Adjust.
16236 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16238 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16240 2002-07-25 Akim Demaille <akim@epita.fr>
16242 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16243 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16244 (b4_c_knr_arg_decl): New.
16245 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16246 yyreport_parse_error.
16248 2002-07-25 Akim Demaille <akim@epita.fr>
16250 * data/yacc.c (yyreport_parse_error): New, extracted from...
16252 (yydestruct, yysymprint): Move above yyparse.
16255 2002-07-25 Akim Demaille <akim@epita.fr>
16257 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16259 (b4_sint_type, b4_uint_type): these.
16260 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16261 * tests/regression.at (Web2c Actions): Adjust.
16263 2002-07-25 Akim Demaille <akim@epita.fr>
16265 * src/gram.h (TIEM_NUMBER_MAX): New.
16266 (item_number_of_rule_number, rule_number_of_item_number): Rename
16268 (rule_number_as_item_number, item_number_as_rule_number): these.
16269 Adjust dependencies.
16270 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16271 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16272 (symbol_number_to_vector_number): New.
16273 (order): Of vector_number_t* type.
16274 (base_t, BASE_MAX, BASE_MIN): New.
16275 (froms, tos, width, pos, check): Of base_t type.
16276 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16277 (actrow): Of action_number_t type.
16278 (conflrow): Of unsigned int type.
16279 (table_ninf, base_ninf): New.
16280 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16281 (muscle_insert_int_table, muscle_insert_base_table)
16282 (muscle_insert_rule_number_table): New.
16283 (prepare_tokens): Output `toknum' as int_table.
16284 (action_row): Returns a rule_number_t.
16285 Use ACTION_MIN, not SHRT_MIN.
16286 (token_actions): yydefact is rule_number_t*.
16287 (table_ninf_remap): New.
16288 (pack_table): Use it for `base' and `table'.
16289 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16291 (YYPACT_NINF, YYTABLE_NINF): these.
16292 (yypact, yytable): Compute their types instead of hard-coded
16294 * tests/regression.at (Web2c Actions): Adjust.
16296 2002-07-19 Akim Demaille <akim@epita.fr>
16298 * src/scan-gram.l (id): Can start with an underscore.
16300 2002-07-16 Akim Demaille <akim@epita.fr>
16302 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16303 Adjust all former `associativity' dependencies.
16304 * src/symtab.c (symbol_new): Default associativity is `undef', not
16306 (symbol_check_alias_consistence): Adjust.
16308 2002-07-09 Akim Demaille <akim@epita.fr>
16310 * doc/bison.texinfo: Properly set the ``header'' part.
16311 Use @dircategory ``GNU programming tools'' as per Texinfo's
16315 2002-07-09 Akim Demaille <akim@epita.fr>
16317 * lib/quotearg.h: Protect against multiple inclusions.
16318 * src/location.h (location_t): Add a `file' member.
16319 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16320 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16321 `error_one_per_line' support.
16323 2002-07-09 Akim Demaille <akim@epita.fr>
16325 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16326 * src/reader.c (lineno): Remove.
16327 Adjust all dependencies.
16328 (get_merge_function): Take a location and use complain_at.
16329 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16330 * tests/regression.at (Invalid inputs, Mixing %token styles):
16333 2002-07-09 Akim Demaille <akim@epita.fr>
16335 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16336 recovery rule, and forbid extensions when --yacc.
16337 (gram_error): Use complain_at.
16338 * src/reader.c (reader): Exit if there were parse errors.
16340 2002-07-09 Akim Demaille <akim@epita.fr>
16342 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16343 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16344 Reported by R Blake <blakers@mac.com>.
16346 2002-07-09 Akim Demaille <akim@epita.fr>
16348 * data/yacc.c: Output the copyright notive in the header.
16350 2002-07-03 Akim Demaille <akim@epita.fr>
16352 * src/output.c (froms, tos): Are state_number_t.
16353 (save_column): sp, sp1, and sp2 are state_number_t.
16354 (prepare): Rename `final' as `final_state_number', `nnts' as
16355 `nterms_number', `nrules' as `rules_number', `nstates' as
16356 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16358 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16359 * data/lalr1.cc (nsym_): Remove, unused.
16361 2002-07-03 Akim Demaille <akim@epita.fr>
16363 * src/lalr.h, src/lalr.c (goto_number_t): New.
16364 * src/lalr.c (goto_list_t): New.
16366 * src/nullable.c (rule_list_t): New.
16368 * src/types.h: Remove.
16370 2002-07-03 Akim Demaille <akim@epita.fr>
16372 * src/closure.c (print_fderives): Use rule_rhs_print.
16373 * src/derives.c (print_derives): Use rule_rhs_print.
16374 (rule_list_t): New, replaces `shorts'.
16375 (set_derives): Add comments.
16376 * tests/sets.at (Nullable, Firsts): Adjust.
16378 2002-07-03 Akim Demaille <akim@epita.fr>
16380 * src/output.c (prepare_actions): Free `tally' and `width'.
16381 (prepare_actions): Allocate and free `order'.
16382 * src/symtab.c (symbols_free): Free `symbols'.
16383 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16384 * src/output.c (m4_invoke): Move to...
16385 * src/scan-skel.l: here.
16386 (<<EOF>>): Close yyout, and free its name.
16388 2002-07-03 Akim Demaille <akim@epita.fr>
16390 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16392 * src/LR0.c (new_state): Merge into...
16393 (state_list_append): this.
16394 (new_states): Merge into...
16395 (generate_states): here.
16396 (set_states): Don't ensure a proper `errs' state member here, do it...
16397 * src/conflicts.c (conflicts_solve): here.
16398 * src/state.h, src/state.c: Comment changes.
16399 (state_t): Rename member `shifts' as `transitions'.
16400 Adjust all dependencies.
16401 (errs_new): For consistency, also take the values as argument.
16402 (errs_dup): Remove.
16403 (state_errs_set): New.
16404 (state_reductions_set, state_transitions_set): Assert that no
16405 previous value was assigned.
16407 (states_free): Use it.
16408 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16409 temporary storage: use `errs' and `nerrs' as elsewhere.
16410 (set_conflicts): Allocate and free this `errs'.
16412 2002-07-02 Akim Demaille <akim@epita.fr>
16414 * lib/libiberty.h: New.
16415 * lib: Update the bitset implementation from upstream.
16416 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16417 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16418 * src/main.c: Adjust bitset stats calls.
16420 2002-07-01 Paul Eggert <eggert@twinsun.com>
16422 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16423 char, so that negative chars don't collide with $.
16425 2002-06-30 Akim Demaille <akim@epita.fr>
16427 Have the GLR tests be `warning' checked, and fix the warnings.
16429 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16430 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16431 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16432 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16433 (yyaddDeferredAction): static.
16434 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16435 (yyreportParseError): yyprefix is const.
16436 yytokenp is used only when verbose.
16437 (yy__GNUC__): Replace with __GNUC__.
16438 (yypdumpstack): yyi is size_t.
16439 (yypreference): Un-yy local variables and arguments, to avoid
16440 clashes with `yyr1'. Anyway, we are not in the user name space.
16441 (yytname_size): be an int, as is compared with ints.
16442 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16444 * tests/cxx-gram.at: Use quotation to protect $1.
16445 Use AT_COMPILE to enable warnings hunts.
16446 Prototype yylex and yyerror.
16448 Include `string.h', not `strings.h'.
16449 Produce and prototype stmtMerge only when used.
16450 yylex takes a location.
16452 2002-06-30 Akim Demaille <akim@epita.fr>
16454 We spend a lot of time in quotearg, in particular when --verbose.
16456 * src/symtab.c (symbol_get): Store a quoted version of the key.
16457 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16458 Adjust all callers.
16460 2002-06-30 Akim Demaille <akim@epita.fr>
16462 * src/state.h (reductions_t): Rename member `nreds' as num.
16463 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16464 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16466 2002-06-30 Akim Demaille <akim@epita.fr>
16468 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16469 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16470 (shifts_to): Rename as...
16471 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16472 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16473 (TRANSITION_IS_DISABLED, transitions_to): these.
16475 2002-06-30 Akim Demaille <akim@epita.fr>
16477 * src/print.c (print_shifts, print_gotos): Merge into...
16478 (print_transitions): this.
16479 (print_transitions, print_errs, print_reductions): Align the
16480 lookaheads columns.
16481 (print_core, print_transitions, print_errs, print_state,
16482 print_grammar): Output empty lines separator before, not after.
16483 (state_default_rule_compute): Rename as...
16484 (state_default_rule): this.
16485 * tests/conflicts.at (Defaulted Conflicted Reduction),
16486 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16487 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16489 2002-06-30 Akim Demaille <akim@epita.fr>
16491 Display items as we display rules.
16493 * src/gram.h, src/gram.c (rule_lhs_print): New.
16494 * src/gram.c (grammar_rules_partial_print): Use it.
16495 * src/print.c (print_core): Likewise.
16496 * tests/conflicts.at (Defaulted Conflicted Reduction),
16497 (Unresolved SR Conflicts): Adjust.
16498 (Unresolved SR Conflicts): Adjust and rename as...
16499 (Resolved SR Conflicts): this, as was meant.
16500 * tests/regression.at (Web2c Report): Adjust.
16502 2002-06-30 Akim Demaille <akim@epita.fr>
16504 * src/print.c (state_default_rule_compute): New, extracted from...
16505 (print_reductions): here.
16506 Pessimize, but clarify the code.
16507 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16509 2002-06-30 Akim Demaille <akim@epita.fr>
16511 * src/output.c (action_row): Let default_rule be always a rule
16514 2002-06-30 Akim Demaille <akim@epita.fr>
16516 * src/closure.c (print_firsts, print_fderives, closure):
16517 Use BITSET_EXECUTE.
16518 * src/lalr.c (lookaheads_print): Likewise.
16519 * src/state.c (state_rule_lookaheads_print): Likewise.
16520 * src/print_graph.c (print_core): Likewise.
16521 * src/print.c (print_reductions): Likewise.
16522 * src/output.c (action_row): Likewise.
16523 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16525 2002-06-30 Akim Demaille <akim@epita.fr>
16527 * src/print_graph.c: Use report_flag.
16529 2002-06-30 Akim Demaille <akim@epita.fr>
16531 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16533 * src/relation.h, src/relation.c (traverse, relation_digraph)
16534 (relation_print, relation_transpose): New.
16536 2002-06-30 Akim Demaille <akim@epita.fr>
16538 * src/state.h, src/state.c (shifts_to): New.
16539 * src/lalr.c (build_relations): Use it.
16541 2002-06-30 Akim Demaille <akim@epita.fr>
16543 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16544 (item_number_of_rule_number, rule_number_of_item_number): New.
16545 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16546 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16547 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16548 Propagate their use.
16549 Much remains to be done, in particular wrt `shorts' from types.h.
16551 2002-06-30 Akim Demaille <akim@epita.fr>
16553 * src/symtab.c (symbol_new): Initialize the `printer' member.
16555 2002-06-30 Akim Demaille <akim@epita.fr>
16557 * src/LR0.c (save_reductions): Remove, replaced by...
16558 * src/state.h, src/state.c (state_reductions_set): New.
16559 (reductions, errs): Rename as...
16560 (reductions_t, errs_t): these.
16561 Adjust all dependencies.
16563 2002-06-30 Akim Demaille <akim@epita.fr>
16565 * src/LR0.c (state_list_t, state_list_append): New.
16566 (first_state, last_state): Now symbol_list_t.
16567 (this_state): Remove.
16568 (new_itemsets, append_states, save_reductions): Take a state_t as
16570 (set_states, generate_states): Adjust.
16571 (save_shifts): Remove, replaced by...
16572 * src/state.h, src/state.c (state_shifts_set): New.
16573 (shifts): Rename as...
16575 Adjust all dependencies.
16576 * src/state.h (state_t): Remove the `next' member.
16578 2002-06-30 Akim Demaille <akim@epita.fr>
16580 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16583 2002-06-30 Akim Demaille <akim@epita.fr>
16585 Use hash.h for the state hash table.
16587 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16588 (allocate_storage): Use state_hash_new.
16589 (free_storage): Use state_hash_free.
16590 (new_state, get_state): Adjust.
16591 * src/lalr.h, src/lalr.c (states): Move to...
16592 * src/states.h (state_t): Remove the `link' member, no longer
16594 * src/states.h, src/states.c: here.
16595 (state_hash_new, state_hash_free, state_hash_lookup)
16596 (state_hash_insert, states_free): New.
16597 * src/states.c (state_table, state_compare, state_hash): New.
16598 * src/output.c (output_actions): Do not free states now, since we
16599 still need to know the final_state number in `prepare', called
16600 afterwards. Do it...
16601 * src/main.c (main): here: call states_free after `output'.
16603 2002-06-30 Akim Demaille <akim@epita.fr>
16605 * src/state.h, src/state.c (state_new): New, extracted from...
16606 * src/LR0.c (new_state): here.
16607 * src/state.h (STATE_ALLOC): Move to...
16608 * src/state.c: here.
16609 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16610 * src/state.h, src/state.c: here.
16612 2002-06-30 Akim Demaille <akim@epita.fr>
16614 * src/reader.c (gensym): Rename as...
16615 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16616 (getsym): Rename as...
16617 (symbol_get): this.
16619 2002-06-30 Akim Demaille <akim@epita.fr>
16621 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16622 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16623 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16624 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16626 2002-06-30 Akim Demaille <akim@epita.fr>
16628 Make the test suite pass with warnings checked.
16630 * tests/actions.at (Printers and Destructors): Improve.
16631 Avoid unsigned vs. signed issues.
16632 * tests/calc.at: Don't exercise the scanner here, do it...
16633 * tests/input.at (Torturing the Scanner): here.
16635 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16637 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16638 reorganize first lines parallel to yacc.c.
16640 2002-06-28 Akim Demaille <akim@epita.fr>
16642 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16643 (b4_token_enum, b4_token_defines): New, factored from...
16644 * data/lalr1.cc, data/yacc.c, glr.c: here.
16646 2002-06-28 Akim Demaille <akim@epita.fr>
16648 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16650 * src/output.c (merger_output): static.
16652 2002-06-28 Akim Demaille <akim@epita.fr>
16654 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16655 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16657 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16659 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16661 Accumulated changelog for new GLR parsing features.
16663 * src/conflicts.c (count_total_conflicts): Change name to
16664 conflicts_total_count.
16665 * src/conflicts.h: Ditto.
16666 * src/output.c (token_actions): Use the new name.
16667 (output_conflicts): Change conflp => conflict_list_heads, and
16668 confl => conflict_list for better readability.
16669 * data/glr.c: Use the new names.
16670 * NEWS: Add self to GLR announcement.
16672 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16674 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16677 * data/bison.glr: Change name to glr.c
16678 * data/glr.c: Renamed from bison.glr.
16679 * data/Makefile.am: Add glr.c
16683 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16684 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16686 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16688 * data/bison.glr: Be sure to restore the
16689 current #line when returning to the skeleton contents after having
16690 exposed the input file's #line.
16692 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16694 * data/bison.glr: Bring up to date with changes to bison.simple.
16696 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16698 * data/bison.glr: Correct definitions that use b4_prefix.
16699 Various reformatting.
16700 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16701 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16702 yytokenp argument; now part of stack.
16703 (yychar): Define to behave as documented.
16704 (yyclearin): Ditto.
16706 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16708 * src/reader.h: Add declaration for free_merger_functions.
16710 * src/reader.c (merge_functions): New variable.
16711 (get_merge_function): New function.
16712 (free_merger_functions): New function.
16713 (readgram): Check for %prec that is not followed by a symbol.
16714 Handle %dprec and %merge declarations.
16715 (packgram): Initialize dprec and merger fields in rules array.
16717 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16718 conflict_list_cnt, conflict_list_free): New variables.
16719 (table_grow): Also grow conflict_table.
16720 (prepare_rules): Output dprec and merger tables.
16721 (conflict_row): New function.
16722 (action_row): Output conflict lists for GLR parser. Don't use
16723 default reduction in conflicted states for GLR parser so that there
16724 are spaces for the conflict lists.
16725 (save_row): Also save conflict information.
16726 (token_actions): Allocate conflict list.
16727 (merger_output): New function.
16728 (pack_vector): Pack conflict table, too.
16729 (output_conflicts): New function to output yyconflp and yyconfl.
16730 (output_check): Allocate conflict_tos.
16731 (output_actions): Output conflict tables, also.
16732 (output_skeleton): Output b4_mergers definition.
16733 (prepare): Output b4_max_rhs_length definition.
16734 Use 'bison.glr' as default skeleton for GLR parsers.
16736 * src/gram.c (glr_parser): New flag.
16737 (grammar_free): Call free_merger_functions.
16739 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16740 all pairs of conflicting reductions, rather than just all tokens
16741 causing conflicts. Needed to size conflict tables.
16742 (conflicts_output): Modify call to count_rr_conflicts for new
16744 (conflicts_print): Ditto.
16745 (count_total_conflicts): New function.
16747 * src/reader.h (merger_list): New type.
16748 (merge_functions): New variable.
16750 * src/lex.h (tok_dprec, tok_merge): New token types.
16752 * src/gram.h (rule_s): Add dprec and merger fields.
16753 (glr_parser): New flag.
16755 * src/conflicts.h (count_total_conflicts): New function.
16757 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16759 * doc/bison.texinfo (Generalized LR Parsing): New section.
16760 (GLR Parsers): New section.
16761 (Language and Grammar): Mention GLR parsing.
16762 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16763 Correct typo ("tge" -> "the").
16765 * data/bison.glr: New skeleton for GLR parsing.
16767 * tests/cxx-gram.at: New tests for GLR parsing.
16769 * tests/testsuite.at: Include cxx-gram.at.
16771 * tests/Makefile.am: Add cxx-gram.at.
16773 * src/parse-gram.y:
16775 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16777 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16779 2002-06-27 Akim Demaille <akim@epita.fr>
16781 * src/options.h, src/options.c: Remove.
16782 * src/getargs.c (short_options, long_options): New.
16784 2002-06-27 Akim Demaille <akim@epita.fr>
16786 * data/bison.simple, data/bison.c++: Rename as...
16787 * data/yacc.c, data/lalr1.cc: these.
16788 * doc/bison.texinfo (Environment Variables): Remove.
16790 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16792 * src/getargs.c (report_argmatch): Initialize strtok().
16794 2002-06-20 Akim Demaille <akim@epita.fr>
16796 * data/bison.simple (b4_symbol_actions): New, replaces...
16797 (b4_symbol_destructor, b4_symbol_printer): these.
16798 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16799 user token numbers.
16801 2002-06-20 Akim Demaille <akim@epita.fr>
16803 * data/bison.simple (yydestructor): Rename as...
16804 (yydestruct): this.
16806 2002-06-20 Akim Demaille <akim@epita.fr>
16808 * src/symtab.h, src/symtab.c (symbol_type_set)
16809 (symbol_destructor_set, symbol_precedence_set): The location is
16811 Adjust all callers.
16813 2002-06-20 Akim Demaille <akim@epita.fr>
16815 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16817 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16819 * src/symtab.h, src/symtab.c (symbol_class_set)
16820 (symbol_user_token_number_set): Likewise.
16821 Adjust all callers.
16822 Promote complain_at.
16823 * tests/input.at (Type Clashes): Adjust.
16825 2002-06-20 Akim Demaille <akim@epita.fr>
16827 * data/bison.simple (YYLEX): Fix the declaration when
16830 2002-06-20 Akim Demaille <akim@epita.fr>
16832 * data/bison.simple (yysymprint): Don't print the token number,
16834 * tests/actions.at (Destructors): Rename as...
16835 (Printers and Destructors): this.
16836 Also exercise %printer.
16838 2002-06-20 Akim Demaille <akim@epita.fr>
16840 * data/bison.simple (YYDSYMPRINT): New.
16841 Use it to remove many of the #if YYDEBUG/if (yydebug).
16843 2002-06-20 Akim Demaille <akim@epita.fr>
16845 * src/symtab.h, src/symtab.c (symbol_t): printer and
16846 printer_location are new members.
16847 (symbol_printer_set): New.
16848 * src/parse-gram.y (PERCENT_PRINTER): New token.
16849 Handle its associated rule.
16850 * src/scan-gram.l: Adjust.
16851 (handle_destructor_at, handle_destructor_dollar): Rename as...
16852 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16853 * src/output.c (symbol_printers_output): New.
16854 (output_skeleton): Call it.
16855 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16856 since there are already many grammar files with a user `yyprint'.
16857 Replace the calls to YYPRINT to calls to yysymprint.
16858 * tests/calc.at: Adjust.
16859 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16860 taking advantage of parser very internal details (stack size!).
16862 2002-06-20 Akim Demaille <akim@epita.fr>
16864 * src/scan-gram.l: Complete the scanner with the missing patterns
16866 Use `quote' and `symbol_tag_get' where appropriate.
16868 2002-06-19 Akim Demaille <akim@epita.fr>
16870 * tests/actions.at (Destructors): Augment to test locations.
16871 * data/bison.simple (yydestructor): Pass it the current location
16872 if locations are enabled.
16873 Prototype only when __STDC__ or C++.
16874 Change the argument names to move into the yy name space: there is
16877 2002-06-19 Akim Demaille <akim@epita.fr>
16879 * data/bison.simple (b4_pure_if): New.
16880 Use it instead of #ifdef YYPURE.
16882 2002-06-19 Akim Demaille <akim@epita.fr>
16884 * data/bison.simple (b4_location_if): New.
16885 Use it instead of #ifdef YYLSP_NEEDED.
16887 2002-06-19 Akim Demaille <akim@epita.fr>
16889 Prepare @$ in %destructor, but currently don't bind it in the
16890 skeleton, as %location use is not cleaned up yet.
16892 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16893 (handle_action_at): New.
16894 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16895 a braced_code_t and a location as additional arguments.
16896 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16897 unquote one when outputting `b4_dollar_dollar'.
16899 * data/bison.simple (b4_eval): Remove.
16900 (b4_symbol_destructor): Adjust.
16901 * tests/input.at (Invalid @n): Adjust.
16903 2002-06-19 Zack Weinberg <zack@codesourcery.com>
16905 * doc/bison.texinfo: Document ability to have multiple
16908 2002-06-18 Akim Demaille <akim@epita.fr>
16910 * src/files.c (compute_base_names): When computing the output file
16911 names from the input file name, strip the directory part.
16913 2002-06-18 Akim Demaille <akim@epita.fr>
16915 * data/bison.simple.new: Comment changes.
16916 Reported by Andreas Schwab.
16918 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16920 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16921 there are no `label `yyoverflowlab' defined but not used' warnings
16922 when yyoverflow is defined.
16924 2002-06-18 Akim Demaille <akim@epita.fr>
16926 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16928 (symbol_destructor_set): Adjust.
16929 * src/output.c (symbol_destructors_output): Output the destructor
16931 Output the symbol name.
16932 * data/bison.simple (b4_symbol_destructor): Adjust.
16934 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16935 and Akim Demaille <akim@epita.fr>
16937 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16938 what's left on the stack when the error recovery hits EOF.
16939 * tests/actions.at (Destructors): Complete to exercise this case.
16941 2002-06-17 Akim Demaille <akim@epita.fr>
16943 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16944 arguments is really empty, not only equal to `[]'.
16945 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16947 (symbol_destructor_set): New.
16948 * src/output.c (symbol_destructors_output): New.
16949 * src/reader.h (brace_code_t, current_braced_code): New.
16950 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16951 (handle_dollar): Rename as...
16952 (handle_action_dollar): this.
16953 (handle_destructor_dollar): New.
16954 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16955 (grammar_declaration): Use it.
16956 * data/bison.simple (yystos): Is always defined.
16957 (yydestructor): New.
16958 * tests/actions.at (Destructors): New.
16959 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16961 2002-06-17 Akim Demaille <akim@epita.fr>
16963 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16964 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16965 rule_length only when needed.
16966 * src/output.c (actions_output, token_definitions_output): Output
16968 * src/symtab.c: Don't access directly to the symbol tag, use
16970 * src/parse-gram.y: Use symbol_list_free.
16972 2002-06-17 Akim Demaille <akim@epita.fr>
16974 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16975 (symbol_list_prepend, get_type_name): Move to...
16976 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16977 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16978 Adjust all callers.
16979 (symbol_list_free): New.
16980 * src/scan-gram.l (handle_dollar): Takes a location.
16981 * tests/input.at (Invalid $n): Adjust.
16983 2002-06-17 Akim Demaille <akim@epita.fr>
16985 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16986 (symbol_list_prepend): New.
16987 * src/parse-gram.y (%union): `list' is a new member.
16988 (symbols.1): New, replaces...
16989 (terms_to_prec.1, nterms_to_type.1): these.
16990 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16991 Take a location as additional argument.
16992 Adjust all callers.
16994 2002-06-15 Akim Demaille <akim@epita.fr>
16996 * src/parse-gram.y: Move %token in the declaration section so that
16997 we don't depend upon CVS Bison.
16999 2002-06-15 Akim Demaille <akim@epita.fr>
17001 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
17002 * src/print.c (print_core): Use it.
17004 2002-06-15 Akim Demaille <akim@epita.fr>
17006 * src/conflicts.c (log_resolution): Accept the rule involved in
17007 the sr conflicts instead of the lookahead number that points to
17009 (flush_reduce): Accept the current lookahead vector as argument,
17010 instead of the index in LA.
17011 (resolve_sr_conflict): Accept the current number of lookahead
17012 bitset to consider for the STATE, instead of the index in LA.
17013 (set_conflicts): Adjust.
17014 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17016 2002-06-15 Akim Demaille <akim@epita.fr>
17018 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17019 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17020 Adjust all dependencies.
17021 * src/lalr.c (initialize_lookaheads): Split into...
17022 (states_lookaheads_count, states_lookaheads_initialize): these.
17025 2002-06-15 Akim Demaille <akim@epita.fr>
17027 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17029 (grammar_rules_print): here.
17030 * src/reduce.c (reduce_output): Use it.
17031 * tests/reduce.at (Useless Rules, Reduced Automaton)
17032 (Underivable Rules): Adjust.
17034 2002-06-15 Akim Demaille <akim@epita.fr>
17036 Copy BYacc's nice way to report the grammar.
17038 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17040 Don't print the rules' location, it is confusing and useless.
17041 (rule_print): Use grammar_rhs_print.
17042 * src/print.c (print_grammar): Use grammar_rules_print.
17044 2002-06-15 Akim Demaille <akim@epita.fr>
17046 Complete and rationalize `useless thing' warnings.
17048 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17049 (symbol_tag_print): New.
17050 Use them everywhere in place of accessing directly the tag member.
17051 * src/gram.h, src/gram.c (rule_print): New.
17052 Use it where a rule used to be printed `by hand'.
17053 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17054 (reduce_grammar_tables): Report the useless rules.
17055 (reduce_print): Useless things are a warning, not an error.
17057 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17058 (Reduced Automaton, Underivable Rules): Adjust.
17059 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17060 * tests/conflicts.at (Unresolved SR Conflicts)
17061 (Solved SR Conflicts): Adjust.
17063 2002-06-15 Akim Demaille <akim@epita.fr>
17065 Let symbols have a location.
17067 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17069 Adjust all callers.
17070 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17071 Use location_t, not int.
17072 * src/symtab.c (symbol_check_defined): Take advantage of the
17074 * tests/regression.at (Invalid inputs): Adjust.
17076 2002-06-15 Akim Demaille <akim@epita.fr>
17078 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17079 (input): Don't try to initialize yylloc here, do it in the
17081 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17082 * src/gram.h (rule_t): Change line and action_line into location
17083 and action_location, of location_t type.
17084 Adjust all dependencies.
17085 * src/location.h, src/location.c (empty_location): New.
17086 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17087 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17088 (grammar_current_rule_symbol_append)
17089 (grammar_current_rule_action_append): Expect a location as argument.
17090 * src/reader.c (grammar_midrule_action): Adjust to attach an
17091 action's location as dummy symbol location.
17092 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17093 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17096 2002-06-14 Akim Demaille <akim@epita.fr>
17098 Grammar declarations may be found in the grammar section.
17100 * src/parse-gram.y (rules_or_grammar_declaration): New.
17101 (declarations): Each declaration may end with a semicolon, not
17103 (grammar_declaration): `"%union"'.
17104 (grammar): Branch to rules_or_grammar_declaration.
17106 2002-06-14 Akim Demaille <akim@epita.fr>
17108 * src/main.c (main): Invoke scanner_free.
17110 2002-06-14 Akim Demaille <akim@epita.fr>
17112 * src/output.c (m4_invoke): Extracted from...
17113 (output_skeleton): here.
17116 2002-06-14 Akim Demaille <akim@epita.fr>
17118 * src/parse-gram.y (directives, directive, gram)
17119 (grammar_directives, precedence_directives, precedence_directive):
17121 (declarations, declaration, grammar, grammar_declaration)
17122 (precedence_declaration, precedence_declarator): these.
17123 (symbol_declaration): New.
17125 2002-06-14 Akim Demaille <akim@epita.fr>
17127 * src/files.c (action_obstack): Remove, unused.
17128 (output_obstack): Remove it, and all its dependencies, as it is no
17130 * src/reader.c (epilogue_set): Build the epilogue in the
17132 * src/output.h, src/output.c (muscle_obstack): Move to...
17133 * src/muscle_tab.h, src/muscle_tab.h: here.
17134 (muscle_init): Initialize muscle_obstack.
17135 (muscle_free): New.
17136 * src/main.c (main): Call it.
17138 2002-06-14 Akim Demaille <akim@epita.fr>
17140 * src/location.h: New, extracted from...
17141 * src/reader.h: here.
17142 * src/Makefile.am (noinst_HEADERS): Merge into
17143 (bison_SOURCES): this.
17145 * src/parse-gram.y: Use location_t instead of Bison's.
17146 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17147 Use location_t instead of ints.
17149 2002-06-14 Akim Demaille <akim@epita.fr>
17151 * data/bison.simple, data/bison.c++: Be sure to restore the
17152 current #line when returning to the skeleton contents after having
17153 exposed the input file's #line.
17155 2002-06-12 Akim Demaille <akim@epita.fr>
17157 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17159 * tests/actions.at (Exotic Dollars): New.
17161 2002-06-12 Akim Demaille <akim@epita.fr>
17163 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17165 * tests/input.at (Torturing the Scanner): New.
17167 2002-06-11 Akim Demaille <akim@epita.fr>
17169 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17170 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17171 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17172 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17173 * src/reader.c (reader): Use it.
17175 2002-06-11 Akim Demaille <akim@epita.fr>
17177 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17178 Adjust all callers.
17179 (scanner_last_string_free): New.
17181 2002-06-11 Akim Demaille <akim@epita.fr>
17183 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17184 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17185 (last_string, YY_OBS_FREE): New.
17186 Use them when returning an ID.
17188 2002-06-11 Akim Demaille <akim@epita.fr>
17190 Have Bison grammars parsed by a Bison grammar.
17192 * src/reader.c, src/reader.h (prologue_augment): New.
17193 * src/reader.c (copy_definition): Remove.
17195 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17196 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17197 (grammar_current_rule_prec_set, grammar_current_rule_check)
17198 (grammar_current_rule_symbol_append)
17199 (grammar_current_rule_action_append): Export.
17200 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17201 (symbol_list_action_append): Remove.
17202 Hook the routines from reader.
17203 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17204 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17206 * src/reader.c (read_declarations): Remove, unused.
17208 * src/parse-gram.y: Handle the epilogue.
17209 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17210 (grammar_start_symbol_set): this.
17211 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17212 * src/reader.c (readgram): Remove, unused.
17213 (reader): Adjust to insert eoftoken and axiom where appropriate.
17215 * src/reader.c (copy_dollar): Replace with...
17216 * src/scan-gram.h (handle_dollar): this.
17217 * src/parse-gram.y: Remove `%thong'.
17219 * src/reader.c (copy_at): Replace with...
17220 * src/scan-gram.h (handle_at): this.
17222 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17225 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17228 * src/reader.h, src/reader.c (grammar_rule_end): New.
17230 * src/parse.y (current_type, current_class): New.
17231 Implement `%nterm', `%token' support.
17232 Merge `%term' into `%token'.
17233 (string_as_id): New.
17234 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17237 * src/parse-gram.y: Be sure to handle properly the beginning of
17240 * src/parse-gram.y: Handle %type.
17241 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17243 * src/parse-gram.y: More directives support.
17244 * src/options.c: No longer handle source directives.
17246 * src/parse-gram.y: Fix %output.
17248 * src/parse-gram.y: Handle %union.
17249 Use the prologue locations.
17250 * src/reader.c (parse_union_decl): Remove.
17252 * src/reader.h, src/reader.c (epilogue_set): New.
17253 * src/parse-gram.y: Use it.
17255 * data/bison.simple, data/bison.c++: b4_stype is now either not
17256 defined, then default to int, or to the contents of %union,
17257 without `union' itself.
17259 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17261 * src/output.c (actions_output): Don't output braces, as they are
17262 already handled by the scanner.
17264 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17265 characters to themselves.
17267 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17268 that the epilogue has a proper #line.
17270 * src/parse-gram.y: Handle precedence/associativity.
17272 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17274 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17275 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17276 at all to define terminals that cannot be emitted.
17278 * src/scan-gram.l: Escape M4 characters.
17280 * src/scan-gram.l: Working properly with escapes in user
17281 strings/characters.
17283 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17284 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17286 Use more modest sizes, as for the time being the parser does not
17287 release memory, and therefore the process swallows a huge amount
17290 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17291 stricter %token grammar.
17293 * src/symtab.h (associativity): Add `undef_assoc'.
17294 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17295 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17297 * tests/regression.at (Invalid %directive): Remove, as it is now
17299 (Invalid inputs): Adjust to the new error messages.
17300 (Token definitions): The new grammar doesn't allow too many
17303 * src/lex.h, src/lex.c: Remove.
17304 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17305 (copy_character, copy_string2, copy_string, copy_identifier)
17306 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17307 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17308 (parse_action): Remove.
17309 * po/POTFILES.in: Adjust.
17311 2002-06-11 Akim Demaille <akim@epita.fr>
17313 * src/reader.c (parse_action): Don't store directly into the
17314 rule's action member: return the action as a string.
17315 Don't require `rule_length' as an argument: compute it.
17316 (grammar_current_rule_symbol_append)
17317 (grammar_current_rule_action_append): New, eved out from
17319 Remove `action_flag', `rulelength', unused now.
17321 2002-06-11 Akim Demaille <akim@epita.fr>
17323 * src/reader.c (grammar_current_rule_prec_set).
17324 (grammar_current_rule_check): New, eved out from...
17326 Remove `xaction', `first_rhs': useless.
17327 * tests/input.at (Type clashes): New.
17328 * tests/existing.at (GNU Cim Grammar): Adjust.
17330 2002-06-11 Akim Demaille <akim@epita.fr>
17332 * src/reader.c (grammar_midrule_action): New, Eved out from
17335 2002-06-11 Akim Demaille <akim@epita.fr>
17337 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17339 (readgram): Use them as replacement of inlined code, crule and
17342 2002-06-11 Akim Demaille <akim@epita.fr>
17344 * src/reader.c (grammar_end, grammar_symbol_append): New.
17345 (readgram): Use them.
17346 Make the use of `p' as local as possible.
17348 2002-06-10 Akim Demaille <akim@epita.fr>
17350 GCJ's parser requires the tokens to be defined before the prologue.
17352 * data/bison.simple: Output the token definition before the user's
17354 * tests/regression.at (Braces parsing, Duplicate string)
17355 (Mixing %token styles): Check the output from bison.
17356 (Early token definitions): New.
17358 2002-06-10 Akim Demaille <akim@epita.fr>
17360 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17361 assigning twice the same user number to a token, so that we can
17363 * src/lex.c (lex): here.
17364 Also use `symbol_class_set' instead of hand written code.
17365 * src/reader.c (parse_assoc_decl): Likewise.
17367 2002-06-10 Akim Demaille <akim@epita.fr>
17369 * src/symtab.c, src/symtab.c (symbol_class_set)
17370 (symbol_user_token_number_set): New.
17371 * src/reader.c (parse_token_decl): Use them.
17372 Use a switch instead of ifs.
17373 Use a single argument.
17375 2002-06-10 Akim Demaille <akim@epita.fr>
17377 Remove `%thong' support as it is undocumented, unused, duplicates
17378 `%token's job, and creates useless e-mail traffic with people who
17379 want to know what it is, why it is undocumented, unused, and
17380 duplicates `%token's job.
17382 * src/reader.c (parse_thong_decl): Remove.
17383 * src/options.c (option_table): Remove "thong".
17384 * src/lex.h (tok_thong): Remove.
17386 2002-06-10 Akim Demaille <akim@epita.fr>
17388 * src/symtab.c, src/symtab.c (symbol_type_set)
17389 (symbol_precedence_set): New.
17390 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17391 (value_components_used): Remove, unused.
17393 2002-06-09 Akim Demaille <akim@epita.fr>
17395 Move symbols handling code out of the reader.
17397 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17398 (axiom): Move to...
17399 * src/symtab.h, src/symtab.c: here.
17401 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17402 * src/reader.c (startval): Rename as...
17403 * src/symtab.h, src/symtab.c (startsymbol): this.
17404 * src/reader.c: Adjust.
17406 * src/reader.c (symbol_check_defined, symbol_make_alias)
17407 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17408 (token_translations_init)
17410 * src/symtab.c: here.
17411 * src/reader.c (packsymbols): Move to...
17412 * src/symtab.h, src/symtab.c (symbols_pack): here.
17413 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17416 2002-06-03 Akim Demaille <akim@epita.fr>
17418 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17421 2002-06-03 Akim Demaille <akim@epita.fr>
17423 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17424 structs with non literals.
17425 * src/scan-skel.l: never-interactive.
17426 * src/conflicts.c (enum conflict_resolution_e): No trailing
17428 * src/getargs.c (usage): Split long literal strings.
17429 Reported by Hans Aberg.
17431 2002-05-28 Akim Demaille <akim@epita.fr>
17433 * data/bison.c++: Use C++ ostreams.
17434 (cdebug_): New member.
17436 2002-05-28 Akim Demaille <akim@epita.fr>
17438 * src/output.c (output_skeleton): Be sure to allocate enough room
17439 for `/' _and_ for `\0' in full_skeleton.
17441 2002-05-28 Akim Demaille <akim@epita.fr>
17443 * data/bison.c++: Catch up with bison.simple:
17444 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17445 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17446 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17447 and popping traces.
17449 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17451 * src/output.c (output_skeleton): Put an explicit path in front of
17452 the skeleton file name, rather than relying on the -I directory,
17453 to partially alleviate effects of having a skeleton file lying around
17454 in the current directory.
17456 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17458 * src/conflicts.c (log_resolution): Correct typo:
17459 obstack_printf should be obstack_fgrow1.
17461 2002-05-26 Akim Demaille <akim@epita.fr>
17463 * src/state.h (state_t): `solved_conflicts' is a new member.
17464 * src/LR0.c (new_state): Set it to 0.
17465 * src/conflicts.h, src/conflicts.c (print_conflicts)
17466 (free_conflicts, solve_conflicts): Rename as...
17467 (conflicts_print, conflicts_free, conflicts_solve): these.
17469 * src/conflicts.c (enum conflict_resolution_e)
17470 (solved_conflicts_obstack): New, used by...
17471 (log_resolution): this.
17472 Adjust to attach the conflict resolution to each state.
17473 Complete the description with the precedence/associativity
17475 (resolve_sr_conflict): Adjust.
17476 * src/print.c (print_state): Output its solved_conflicts.
17477 * tests/conflicts.at (Unresolved SR Conflicts)
17478 (Solved SR Conflicts): Exercise --report=all.
17480 2002-05-26 Akim Demaille <akim@epita.fr>
17482 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17483 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17484 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17485 (token_number_t, item_number_as_token_number)
17486 (token_number_as_item_number, muscle_insert_token_number_table):
17488 (symbol_number_t, item_number_as_symbol_number)
17489 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17490 these, since it is more appropriate.
17492 2002-05-26 Akim Demaille <akim@epita.fr>
17494 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17496 * data/bison.simple (yystos) [YYDEBUG]: New.
17497 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17499 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17501 2002-05-25 Akim Demaille <akim@epita.fr>
17503 * doc/bison.texinfo (Debugging): Split into...
17504 (Tracing): this new section, its former contents, and...
17505 (Understanding): this new section.
17506 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17508 (report_flag): this.
17509 Adjust all dependencies.
17510 (report_args, report_types, report_argmatch): New.
17511 (usage, getargs): Report/support -r, --report.
17513 (struct option_table_struct): Rename as..,
17514 (struct option_table_s): this.
17515 Rename the `set_flag' member to `flag' to match with getopt_long's
17517 * src/options.c (option_table): Split verbose into an entry for
17518 %verbose, and another for --verbose.
17519 Support --report/-r, so remove -r from the obsolete --raw.
17520 * src/print.c: Attach full item sets and lookaheads reports to
17521 report_flag instead of trace_flag.
17522 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17524 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17525 and Paul Eggert <eggert@twinsun.com>
17527 * data/bison.simple (yyparse): Correct error handling to conform to
17528 POSIX and yacc. Specifically, after syntax error is discovered,
17529 do not reduce further before shifting the error token.
17530 Clean up the code a bit by removing the labels yyerrdefault,
17531 yyerrhandle, yyerrpop.
17532 * NEWS: Document the above.
17534 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17536 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17537 type; it isn't always big enough, since it doesn't necessarily
17538 include non-terminals.
17539 (yytranslate): Expand definition of yy_token_number_type, so that
17540 the latter can be removed.
17541 (yy_token_number_type): Remove, only one use.
17542 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17543 don't use TokenNumberType as element type.
17545 * tests/regression.at: Modify expected output to agree with change
17546 to yyr1 and yytranslate.
17548 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17550 * src/reader.c (parse_action): Use copy_character instead of
17553 2002-05-13 Akim Demaille <akim@epita.fr>
17555 * tests/regression.at (Token definitions): Prototype yylex and
17558 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17560 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17561 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17563 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17565 2002-05-07 Akim Demaille <akim@epita.fr>
17567 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17568 avoid GCC warnings.
17570 2002-05-07 Akim Demaille <akim@epita.fr>
17574 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17575 over the RHS of each rule.
17576 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17577 * src/state.h (state_t): Member `nitems' is unsigned short.
17578 * src/LR0.c (get_state): Adjust.
17579 * src/reader.c (packgram): Likewise.
17580 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17582 (muscle_insert_int_table): Remove, unused.
17583 (prepare_rules): Remove `max'.
17585 2002-05-06 Akim Demaille <akim@epita.fr>
17587 * src/closure.c (print_firsts): Display of the symbol tags.
17588 (bitmatrix_print): Move to...
17589 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17591 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17593 2002-05-06 Akim Demaille <akim@epita.fr>
17595 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17598 2002-05-06 Akim Demaille <akim@epita.fr>
17600 * src/LR0.c (new_state, get_state): Instead of using the global
17601 `kernel_size' and `kernel_base', have two new arguments:
17602 `core_size' and `core'.
17605 2002-05-06 Akim Demaille <akim@epita.fr>
17607 * src/reader.c (packgram): No longer end `ritem' with a 0
17608 sentinel: it is not used.
17610 2002-05-05 Akim Demaille <akim@epita.fr>
17612 New experimental feature: display the lookaheads in the report and
17615 * src/print (print_core): When --trace-flag, display the rules
17617 * src/print_graph.c (print_core): Likewise.
17618 Swap the arguments.
17621 2002-05-05 Akim Demaille <akim@epita.fr>
17623 * tests/torture.at (Many lookaheads): New test.
17625 2002-05-05 Akim Demaille <akim@epita.fr>
17627 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17628 (GENERATE_MUSCLE_INSERT_TABLE): this.
17629 (output_int_table, output_unsigned_int_table, output_short_table)
17630 (output_token_number_table, output_item_number_table): Replace with...
17631 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17632 (muscle_insert_short_table, muscle_insert_token_number_table)
17633 (muscle_insert_item_number_table): these.
17634 Adjust all callers.
17635 (prepare_tokens): Don't free `translations', since...
17636 * src/reader.h, src/reader.c (grammar_free): do it.
17638 * src/gram.h, src/gram.c (grammar_free): here.
17639 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17642 2002-05-05 Akim Demaille <akim@epita.fr>
17644 * src/output.c (output_unsigned_int_table): New.
17645 (prepare_rules): `i' is unsigned.
17646 `prhs', `rline', `r2' are unsigned int.
17647 Rename muscle `rhs_number_max' as `rhs_max'.
17648 Output muscles `prhs_max', `rline_max', and `r2_max'.
17650 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17651 to compute types instead of constant types.
17652 * tests/regression.at (Web2c Actions): Adjust.
17654 2002-05-04 Akim Demaille <akim@epita.fr>
17656 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17657 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17658 Adjust dependencies.
17659 * src/output.c (token_definitions_output): Be sure not to output a
17660 `#define 'a'' when fed with `%token 'a' "a"'.
17661 * tests/regression.at (Token definitions): New.
17663 2002-05-03 Paul Eggert <eggert@twinsun.com>
17665 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17668 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17670 * Makefile.am (SUBDIRS): Remove intl.
17671 (EXTRA_DIST): Add config/config.rpath.
17673 2002-05-03 Akim Demaille <akim@epita.fr>
17675 * data/bison.simple (m4_if): Don't output empty enums.
17676 And actually, output valid enum definitions :(.
17678 2002-05-03 Akim Demaille <akim@epita.fr>
17680 * configure.bat: Remove, completely obsolete.
17681 * Makefile.am (EXTRA_DIST): Adjust.
17682 Don't distribute config.rpath...
17683 * config/Makefile.am (EXTRA_DIST): Do it.
17685 2002-05-03 Akim Demaille <akim@epita.fr>
17687 * configure.in (GETTEXT_VERSION): New.
17688 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17690 2002-05-03 Akim Demaille <akim@epita.fr>
17692 * data/bison.simple (b4_token_enum): New.
17693 (b4_token_defines): Use it to output tokens both as #define and
17695 Suggested by Paul Eggert.
17696 * src/output.c (token_definitions_output): Don't output spurious
17699 2002-05-03 Akim Demaille <akim@epita.fr>
17701 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17703 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17705 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17706 Update the stack class, give a try to deque as the default container.
17708 2002-05-02 Akim Demaille <akim@epita.fr>
17710 * data/bison.simple (yyparse): Do not implement @$ = @1.
17711 (YYLLOC_DEFAULT): Adjust to do it.
17712 * doc/bison.texinfo (Location Default Action): Fix.
17714 2002-05-02 Akim Demaille <akim@epita.fr>
17716 * src/reader.c (parse_braces): Merge into...
17717 (parse_action): this.
17719 2002-05-02 Akim Demaille <akim@epita.fr>
17721 * configure.in (ALL_LINGUAS): Remove.
17722 * po/LINGUAS, hr.po: New.
17724 2002-05-02 Akim Demaille <akim@epita.fr>
17726 Remove the so called hairy (semantic) parsers.
17728 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17729 * src/gram.h, src/gram.c (semantic_parser): Remove.
17730 (rule_t): Remove the guard and guard_line members.
17731 * src/lex.h (token_t): remove tok_guard.
17732 * src/options.c (option_table): Remove %guard and %semantic_parser
17734 * src/output.c, src/output.h (guards_output): Remove.
17736 (token_definitions_output): Don't output the `T'
17738 (output_skeleton): Don't output the guards.
17739 * src/files.c, src/files.c (attrsfile): Remove.
17740 * src/reader.c (symbol_list): Remove the guard and guard_line
17742 Adjust dependencies.
17743 (parse_guard): Remove.
17744 * data/bison.hairy: Remove.
17745 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17748 2002-05-02 Akim Demaille <akim@epita.fr>
17750 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17751 (parse_guard): Rename the formal argument `stack_offset' as
17752 `rule_length', which is more readable.
17754 (copy_at, copy_dollar): Instead of outputting the hard coded
17755 values of $$, $n and so forth, output invocation to b4_lhs_value,
17756 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17757 Note: this patch partially drops `semantic-parser' support: it
17758 always does `rule_length - n', where semantic parsers ought to
17760 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17761 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17763 2002-05-02 Akim Demaille <akim@epita.fr>
17765 * configure.in (AC_INIT): Bump to 1.49b.
17766 (AM_INIT_AUTOMAKE): Short invocation.
17768 2002-05-02 Akim Demaille <akim@epita.fr>
17772 2002-05-01 Akim Demaille <akim@epita.fr>
17774 * src/skeleton.h: Remove.
17776 2002-05-01 Akim Demaille <akim@epita.fr>
17778 * src/skeleton.h: Fix the #endif.
17779 Reported by Magnus Fromreide.
17781 2002-04-26 Paul Eggert <eggert@twinsun.com>
17783 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17784 Define if we define YYSTYPE and YYLTYPE, respectively.
17785 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17787 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17789 * src/scan-skel.l: Postprocess quadrigraphs.
17791 * src/reader.c (copy_character): New function, used to output
17792 single characters while replacing `[' and `]' with quadrigraphs, to
17793 avoid troubles with M4 quotes.
17794 (copy_comment): Output characters with copy_character.
17795 (read_additionnal_code): Likewise.
17796 (copy_string2): Likewise.
17797 (copy_definition): Likewise.
17799 * tests/calc.at: Exercise M4 quoting.
17801 2002-04-25 Akim Demaille <akim@epita.fr>
17803 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17804 between `!' and the command.
17805 Reported by Paul Eggert.
17807 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17809 * tests/calc.at: Exercise prologue splitting.
17811 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17812 `b4_post_prologue' instead of `b4_prologue'.
17814 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17816 (output): Free pre_prologue_obstack and post_prologue_obstack.
17817 * src/files.h, src/files.c (attrs_obstack): Remove.
17818 (pre_prologue_obstack, post_prologue_obstack): New.
17819 * src/reader.c (copy_definition): Add a parameter to specify the
17820 obstack to fill, instead of using attrs_obstack unconditionally.
17821 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17822 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17824 2002-04-23 Paul Eggert <eggert@twinsun.com>
17826 * data/bison.simple: Remove unnecessary commentary and white
17827 space differences from 1_29-branch.
17828 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17830 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17831 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17832 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17833 constructors or destructors.
17835 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17837 2002-04-23 Akim Demaille <akim@epita.fr>
17839 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17840 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17841 location with columns.
17842 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17843 All reported by Paul Eggert.
17845 2002-04-22 Akim Demaille <akim@epita.fr>
17847 * src/reduce.c (dump_grammar): Move to...
17848 * src/gram.h, src/gram.c (grammar_dump): here.
17849 Be sure to separate long item numbers.
17850 Don't read the members of a rule's prec if its nil.
17852 2002-04-22 Akim Demaille <akim@epita.fr>
17854 * src/output.c (table_size, table_grow): New.
17855 (MAXTABLE): Remove, replace uses with table_size.
17856 (pack_vector): Instead of dying when the table is too big, grow it.
17858 2002-04-22 Akim Demaille <akim@epita.fr>
17860 * data/bison.simple (yyr1): Its type is that of a token number.
17861 * data/bison.c++ (r1_): Likewise.
17862 * tests/regression.at (Web2c Actions): Adjust.
17864 2002-04-22 Akim Demaille <akim@epita.fr>
17866 * src/reader.c (token_translations_init): 256 is now the default
17867 value for the error token, i.e., it will be assigned another
17868 number if the user assigned 256 to one of her tokens.
17869 (reader): Don't force 256 to error.
17870 * doc/bison.texinfo (Symbols): Adjust.
17871 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17872 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17873 etc. instead of 10, 20, 30 (which was used to `jump' over error
17874 (256) and undefined (2)).
17876 2002-04-22 Akim Demaille <akim@epita.fr>
17878 Propagate more token_number_t.
17880 * src/gram.h (token_number_as_item_number)
17881 (item_number_as_token_number): New.
17882 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17883 Use it to create output_item_number_table and
17884 output_token_number_table.
17885 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17886 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17887 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17888 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17890 2002-04-22 Akim Demaille <akim@epita.fr>
17892 * src/output.h, src/output.c (get_lines_number): Remove.
17894 2002-04-19 Akim Demaille <akim@epita.fr>
17896 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17898 (Debugging): More details about enabling the debugging features.
17899 (Table of Symbols): Describe $$, $n, @$, and @n.
17900 Suggested by Tim Josling.
17902 2002-04-19 Akim Demaille <akim@epita.fr>
17904 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17906 2002-04-10 Akim Demaille <akim@epita.fr>
17908 * src/system.h: Rely on HAVE_LIMITS_H.
17909 Suggested by Paul Eggert.
17911 2002-04-09 Akim Demaille <akim@epita.fr>
17913 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17914 full stderr, and strip it according to the bison options, instead
17915 of composing the error message from different bits.
17916 This makes it easier to check for several error messages.
17917 Adjust all the invocations.
17918 Add an invocation exercising the error token.
17919 Add an invocation demonstrating a stupid error message.
17920 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17922 Error message are for stderr, not stdout.
17924 2002-04-09 Akim Demaille <akim@epita.fr>
17926 * src/gram.h, src/gram.c (error_token_number): Remove, use
17928 * src/reader.c (reader): Don't specify the user token number (2)
17929 for $undefined, as it uselessly prevents using it.
17930 * src/gram.h (token_number_t): Move to...
17931 * src/symtab.h: here.
17932 (state_t.number): Is a token_number_t.
17933 * src/print.c, src/reader.c: Use undeftoken->number instead of
17935 (Even though this 2 is not the same as above: the number of the
17936 undeftoken remains being 2, it is its user token number which
17938 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17939 `user_token_number_max'.
17940 Output `undef_token_number'.
17941 * data/bison.simple, data/bison.c++: Use them.
17942 Be sure to map invalid yylex return values to
17943 `undef_token_number'. This saves us from gratuitous SEGV.
17945 * tests/conflicts.at (Solved SR Conflicts)
17946 (Unresolved SR Conflicts): Adjust.
17947 * tests/regression.at (Web2c Actions): Adjust.
17949 2002-04-08 Akim Demaille <akim@epita.fr>
17951 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17953 Remove the duplicate `typedefs'.
17954 (RhsNumberType): Fix the declaration and various other typos.
17956 * data/bison.simple: Use __ofile__.
17957 * src/scan-skel.l: Handle __ofile__.
17959 2002-04-08 Akim Demaille <akim@epita.fr>
17961 * src/gram.h (item_number_t): New, the type of item numbers in
17962 RITEM. Note that it must be able to code symbol numbers as
17963 positive number, and the negation of rule numbers as negative
17965 Adjust all dependencies (pretty many).
17966 * src/reduce.c (rule): Remove this `short *' pointer: use
17968 * src/system.h (MINSHORT, MAXSHORT): Remove.
17969 Include `limits.h'.
17970 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17971 (shortcpy): Remove.
17972 (MAXTABLE): Move to...
17973 * src/output.c (MAXTABLE): here.
17974 (prepare_rules): Use output_int_table to output rhs.
17975 * data/bison.simple, data/bison.c++: Adjust.
17976 * tests/torture.at (Big triangle): Move the limit from 254 to
17978 * tests/regression.at (Web2c Actions): Ajust.
17980 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17981 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17982 passes, but produces negative #line number, once fixed, GCC is
17983 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17985 * src/state.h (state_h): Code input lines on ints, not shorts.
17987 2002-04-08 Akim Demaille <akim@epita.fr>
17989 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17990 and then the grammar.
17992 2002-04-08 Akim Demaille <akim@epita.fr>
17994 * src/system.h: No longer using strndup.
17996 2002-04-07 Akim Demaille <akim@epita.fr>
17998 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17999 * src/output.c (output_table_data): Return the longest number.
18000 (prepare_tokens): Output `token_number_max').
18001 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
18003 Use them to define yy_token_number_type/TokenNumberType.
18004 Use this type for yytranslate.
18005 * tests/torture.at (Big triangle): Push the limit from 124 to
18007 * tests/regression.at (Web2c Actions): Adjust.
18009 2002-04-07 Akim Demaille <akim@epita.fr>
18011 * tests/torture.at (Big triangle): New.
18012 (GNU AWK Grammar, GNU Cim Grammar): Move to...
18013 * tests/existing.at: here.
18015 2002-04-07 Akim Demaille <akim@epita.fr>
18017 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18019 Adjust dependencies.
18021 2002-04-07 Akim Demaille <akim@epita.fr>
18023 * src/reader.c: Normalize increments to prefix form.
18025 2002-04-07 Akim Demaille <akim@epita.fr>
18027 * src/reader.c, symtab.c: Remove debugging code.
18029 2002-04-07 Akim Demaille <akim@epita.fr>
18031 Rename all the `bucket's as `symbol_t'.
18033 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18034 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18035 * src/symtab.c, src/symtab.h (bucket): Rename as...
18037 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18038 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18039 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18040 (buckets_new, buckets_free, buckets_do): Rename as...
18041 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18042 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18043 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18044 (symbols_new, symbols_free, symbols_do): these.
18046 2002-04-07 Akim Demaille <akim@epita.fr>
18048 Use lib/hash for the symbol table.
18050 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18052 * src/lex.c (lex): Set the `number' member of new terminals.
18053 * src/reader.c (bucket_check_defined, bucket_make_alias)
18054 (bucket_check_alias_consistence, bucket_translation): New.
18055 (reader, grammar_free, readgram, token_translations_init)
18056 (packsymbols): Adjust.
18057 (reader): Number the predefined tokens.
18058 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18059 for predefined tokens.
18060 * src/symtab.h (bucket): Remove all the hash table related
18062 * src/symtab.c (symtab): Replace by...
18063 (bucket_table): this.
18064 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18065 (buckets_new, buckets_do): New.
18067 2002-04-07 Akim Demaille <akim@epita.fr>
18069 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18070 (start_symbol, max_user_token_number, semantic_parser)
18071 (error_token_number): Initialize.
18072 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18075 (errtoken, eoftoken, undeftoken, axiom): Extern.
18077 2002-04-07 Akim Demaille <akim@epita.fr>
18079 * src/gram.h (rule_s): prec and precsym are now pointers
18080 to the bucket giving the priority/associativity.
18081 Member `associativity' removed: useless.
18082 * src/reduce.c, src/conflicts.c: Adjust.
18084 2002-04-07 Akim Demaille <akim@epita.fr>
18086 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18087 Properly escape the symbols' TAG when outputting them.
18089 2002-04-07 Akim Demaille <akim@epita.fr>
18091 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18093 2002-04-07 Akim Demaille <akim@epita.fr>
18095 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18096 (LArule): this, which is an array to rule_t*.
18097 * src/print.c, src/conflicts.c: Adjust.
18099 2002-04-07 Akim Demaille <akim@epita.fr>
18101 * src/gram.h (rule_t): Rename `number' as `user_number'.
18102 `number' is a new member.
18103 Adjust dependencies.
18104 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18106 2002-04-07 Akim Demaille <akim@epita.fr>
18108 As a result of the previous patch, it is no longer needed
18109 to reorder ritem itself.
18111 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18113 2002-04-07 Akim Demaille <akim@epita.fr>
18115 Be sure never to walk through RITEMS, but use only data related to
18116 the rules themselves. RITEMS should be banished.
18118 * src/output.c (output_token_translations): Rename as...
18119 (prepare_tokens): this.
18120 In addition to `translate', prepare the muscles `tname' and
18121 `toknum', which were handled by...
18122 (output_rule_data): this.
18123 Remove, and move the remainder of its outputs into...
18124 (prepare_rules): this new routines, which also merges content from
18125 (output_gram): this.
18126 (prepare_rules): Be sure never to walk through RITEMS.
18127 (output_stos): Rename as...
18128 (prepare_stos): this.
18129 (output): Always invoke prepare_states, after all, just don't use it
18130 in the output if you don't need it.
18132 2002-04-07 Akim Demaille <akim@epita.fr>
18134 * src/LR0.c (new_state): Display `nstates' as the name of the
18135 newly created state.
18136 Adjust to initialize first_state and last_state if needed.
18137 Be sure to distinguish the initial from the final state.
18138 (new_states): Create the itemset of the initial state, and use
18140 * src/closure.c (closure): Now that the initial state has its
18141 items properly set, there is no need for a special case when
18142 creating `ruleset'.
18144 As a result, now the rule 0, reducing to $axiom, is visible in the
18145 outputs. Adjust the test suite.
18147 * tests/conflicts.at (Solved SR Conflicts)
18148 (Unresolved SR Conflicts): Adjust.
18149 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18150 * tests/conflicts.at (S/R in initial): New.
18152 2002-04-07 Akim Demaille <akim@epita.fr>
18154 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18155 the RHS of the rules.
18156 * src/output.c (output_gram): Likewise.
18158 2002-04-07 Akim Demaille <akim@epita.fr>
18160 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18162 Adjust all dependencies.
18163 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18164 `number' of the buckets too.
18165 * src/gram.h: Include `symtab.h'.
18166 (associativity): Move to...
18167 * src/symtab.h: here.
18168 No longer include `gram.h'.
18170 2002-04-07 Akim Demaille <akim@epita.fr>
18172 * src/gram.h, src/gram.c (rules_rhs_length): New.
18173 (ritem_longest_rhs): Use it.
18174 * src/gram.h (rule_t): `number' is a new member.
18175 * src/reader.c (packgram): Set it.
18176 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18177 the end of `rules', and count them out of `nrules'.
18178 (reduce_output, dump_grammar): Adjust.
18179 * src/print.c (print_grammar): It is no longer needed to check for
18180 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18181 * tests/reduce.at (Reduced Automaton): New test.
18183 2002-04-07 Akim Demaille <akim@epita.fr>
18185 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18186 lacking `+ 1' to nrules, Bison reported as useless a token if it
18187 was used solely to set the precedence of the last rule...
18189 2002-04-07 Akim Demaille <akim@epita.fr>
18191 * data/bison.c++, data/bison.simple: Don't output the current file
18192 name in #line, to avoid useless diffs between two identical
18193 outputs under different names.
18195 2002-04-07 Akim Demaille <akim@epita.fr>
18197 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18198 Normalize loops to using `< nrules + 1', not `<= nrules'.
18200 2002-04-07 Akim Demaille <akim@epita.fr>
18204 2002-04-07 Akim Demaille <akim@epita.fr>
18206 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18207 bucket.value as bucket.number.
18209 2002-04-07 Akim Demaille <akim@epita.fr>
18211 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18212 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18213 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18214 RHS, instead of being an index in RITEMS.
18216 2002-04-04 Paul Eggert <eggert@twinsun.com>
18218 * doc/bison.texinfo: Update copyright date.
18219 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18220 (Symbols): Warn about running Bison in one character set,
18221 but compiling and/or running in an incompatible one.
18222 Warn about character code 256, too.
18224 2002-04-03 Paul Eggert <eggert@twinsun.com>
18226 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18227 YYERROR_VERBOSE is nonzero, not whether it is defined.
18229 Merge changes from bison-1_29-branch.
18231 2002-03-20 Paul Eggert <eggert@twinsun.com>
18233 Merge fixes from Debian bison_1.34-1.diff.
18235 * configure.in (AC_PREREQ): 2.53.
18237 2002-03-20 Akim Demaille <akim@epita.fr>
18239 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18241 2002-03-19 Paul Eggert <eggert@twinsun.com>
18243 * src/bison.simple (YYCOPY): New macro.
18244 (YYSTACK_RELOCATE): Use it.
18245 Remove Type arg; no longer needed. All callers changed.
18246 (yymemcpy): Remove; no longer needed.
18248 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18249 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18251 2002-03-19 Akim Demaille <akim@epita.fr>
18253 Test and fix the #line outputs.
18255 * tests/atlocal.at (GCC): New.
18256 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
18257 (Prologue synch line, %union synch line, Postprologue synch line)
18258 (Action synch line, Epilogue synch line): New tests.
18259 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18260 * data/bison.simple, data/bison.c++: Use it.
18262 2002-03-19 Akim Demaille <akim@epita.fr>
18264 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18265 (Solved SR Conflicts, %expect not enough, %expect right)
18266 (%expect too much): Move to...
18267 * tests/conflicts.at: this new file.
18269 2002-03-19 Akim Demaille <akim@epita.fr>
18271 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18272 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18273 that we can move to enums for instance.
18274 * src/output.c (token_definitions_output): Output a list of
18275 `token-name, token-number' instead of the #define.
18276 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18278 2002-03-14 Akim Demaille <akim@epita.fr>
18280 Use Gettext 0.11.1.
18282 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
18284 * data/bison.c++: Make the user able to add members to the generated
18285 parser by subclassing.
18287 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
18289 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18291 Reported by Nicolas Tisserand and Nicolas Burrus.
18293 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18295 * src/reader.c: Warn about lacking semi-colons, do not complain.
18297 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18299 * data/bison.c++: Remove a debug line.
18301 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18303 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18304 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18305 provide a default implementation.
18307 2002-03-04 Akim Demaille <akim@epita.fr>
18309 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18310 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18311 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18312 * tests/semantic.at (Parsing Guards): Similarly.
18313 * src/reader.at (readgram): Complain if the last rule is not ended
18316 2002-03-04 Akim Demaille <akim@epita.fr>
18318 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18319 * src/closure.c: here.
18320 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18322 * src/warshall.h, src/warshall.c: Remove.
18323 * tests/sets.at (Broken Closure): Adjust.
18325 2002-03-04 Akim Demaille <akim@epita.fr>
18327 * src/output.c (output_skeleton): tempdir is const.
18328 bytes_read is unused.
18330 2002-03-04 Akim Demaille <akim@epita.fr>
18332 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18333 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18335 From Michael Hayes.
18337 2002-03-04 Akim Demaille <akim@epita.fr>
18339 * src/closure.c (closure): `r' is unused.
18341 2002-03-04 Akim Demaille <akim@epita.fr>
18343 * tests/sets.at (Broken Closure): Add the ending `;'.
18344 * src/reader.at (readgram): Complain if a rule is not ended with a
18347 2002-03-04 Akim Demaille <akim@epita.fr>
18349 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18350 (count_sr_conflicts): Use bitset_count.
18351 * src/reduce.c (inaccessable_symbols): Ditto.
18352 (bits_size): Remove.
18353 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18355 2002-03-04 Akim Demaille <akim@epita.fr>
18357 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18358 * src/reduce.c: Remove the `bitset_zero's following the
18359 `bitset_create's, as now it is performed by the latter.
18361 2002-03-04 Akim Demaille <akim@epita.fr>
18363 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18364 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18365 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18366 latest sources from Michael.
18368 2002-03-04 Akim Demaille <akim@epita.fr>
18370 * src/output.c (output): Don't free the grammar.
18371 * src/reader.c (grammar_free): New.
18372 * src/main.c (main): Call it and don't free symtab here.
18374 2002-03-04 Akim Demaille <akim@epita.fr>
18376 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18378 Reported by Benoit Perrot.
18380 2002-03-04 Akim Demaille <akim@epita.fr>
18382 Use bitset operations when possible, not loops over bits.
18384 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18386 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18387 * src/reduce.c (useless_nonterminals): Formatting changes.
18388 * src/warshall.c (TC): Use bitset_or.
18390 2002-03-04 Akim Demaille <akim@epita.fr>
18392 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18393 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18396 2002-03-04 Akim Demaille <akim@epita.fr>
18398 * src/lalr.c (F): Now a bitset*.
18399 Adjust all dependencies.
18401 2002-03-04 Akim Demaille <akim@epita.fr>
18403 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18404 Adjust all dependencies.
18406 2002-03-04 Akim Demaille <akim@epita.fr>
18408 * src/L0.c, src/LR0.h (nstates): Be size_t.
18409 Adjust comparisons (signed vs unsigned).
18410 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18412 Adjust all dependencies.
18414 2002-03-04 Akim Demaille <akim@epita.fr>
18416 * src/closure.c (firsts): Now, also a bitset.
18417 Adjust all dependencies.
18418 (varsetsize): Remove, now unused.
18419 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18421 2002-03-04 Akim Demaille <akim@epita.fr>
18423 * src/print.c: Convert to use bitset.h, not hand coded iterations
18426 2002-03-04 Akim Demaille <akim@epita.fr>
18428 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18430 2002-03-04 Akim Demaille <akim@epita.fr>
18432 * src/closure.c (ruleset): Be a bitset.
18433 (rulesetsize): Remove.
18435 2002-03-04 Akim Demaille <akim@epita.fr>
18437 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18438 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18439 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18440 * src/closure.c (fderives): Be an array of bitsets.
18442 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
18444 * data/bison.c++: Merge the two generated headers. Insert a copyright
18445 notice in each output file.
18447 2002-02-28 Akim Demaille <akim@epita.fr>
18449 * data/bison.c++: Copy the prologue of bison.simple to fetch
18450 useful M4 definitions, such as b4_header_guard.
18452 2002-02-25 Akim Demaille <akim@epita.fr>
18454 * src/getargs.c (version): Give the name of the authors, and use a
18455 translator friendly scheme for the bgr
18458 2002-02-25 Akim Demaille <akim@epita.fr>
18460 * src/output.c (header_output): Remove, now handled completely via
18463 2002-02-25 Akim Demaille <akim@epita.fr>
18465 * m4/m4.m4: New, from CVS Autoconf.
18466 * configure.in: Invoke it.
18467 * src/output.c (output_skeleton): Use its result instead of the
18470 2002-02-25 Akim Demaille <akim@epita.fr>
18472 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18474 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18475 * src/output.c (output_skeleton): Use mkstemp to create a real
18477 Move the filling of `skeleton' and its muscle to...
18479 (output): Move the definition of the prologue muscle to...
18481 * src/system.h (DEFAULT_TMPDIR): New.
18483 2002-02-14 Paul Eggert <eggert@twinsun.com>
18485 Remove the support for C++ namespace cleanliness; it was
18486 causing more problems than it was curing, since it didn't work
18487 properly on some nonstandard C++ compilers. This can wait
18488 for a proper C++ parser.
18490 * NEWS: Document this.
18491 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18492 of C++, as it's treated like C now.
18493 * src/bison.simple (YYSTD): Remove.
18494 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18495 Treat C++ just like Standard C instead of trying to support
18496 namespace cleanliness.
18498 2002-02-14 Akim Demaille <akim@epita.fr>
18500 * tests/regression.at (else): Adjust to Andreas' change.
18502 2002-02-14 Akim Demaille <akim@epita.fr>
18504 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18506 2002-02-13 Andreas Schwab <schwab@suse.de>
18508 * src/output.c (output_rule_data): Don't output NULL, it might
18509 not be defined yet.
18511 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
18513 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18514 (Copyright notice): Update.
18516 2002-02-11 Akim Demaille <akim@epita.fr>
18518 * tests/regression.at (%nonassoc and eof): Don't include
18519 nonportable headers.
18521 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
18523 * data/bison.c++: Correct error recovery. Make the user able to
18524 initialize the starting location.
18526 2002-02-07 Akim Demaille <akim@epita.fr>
18528 * tests/input.at: New.
18530 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18532 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18533 more consistent when naming methods and variables. Put preprocessor
18534 directives around tables only needed for debugging.
18536 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18538 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18540 (yy::b4_name::parse): Use print_.
18542 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18544 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18546 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18548 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18550 (yy::b4_name::parse): Build verbose error messages, and use error_.
18552 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18554 * data/bison.c++: Fix m4 quoting in comments.
18556 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18558 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18559 not expanded by m4.
18561 2002-02-05 Akim Demaille <akim@epita.fr>
18563 * data/bison.c++: Adjust to the M4 back end.
18564 More is certainly needed.
18566 2002-02-05 Akim Demaille <akim@epita.fr>
18568 Give a try to M4 as a back end.
18570 * lib/readpipe.c: New, from wdiff.
18571 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18573 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18574 specific values. Now it is m4 that performs the lookup.
18575 * src/parse-skel.y: Remove.
18576 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18577 * src/output.c (actions_output, guards_output)
18578 (token_definitions_output): No longer keeps track of the output
18579 line number, hence remove the second argument.
18580 (guards_output): Check against the guard member of a rule, not the
18583 (output_skeleton): Don't look for the skeleton location, let m4 do
18585 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18587 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18588 (prepare): Given that for the time being changesyntax is not
18589 usable in M4, rename the muscles using `-' to `_'.
18590 Define `defines_flag', `output_parser_name' and `output_header_name'.
18591 * src/output.h (actions_output, guards_output)
18592 (token_definitions_output): Adjust prototypes.
18593 * src/scan-skel.l: Instead of scanning the skeletons, it now
18594 processes the output of m4: `__oline__' and `#output'.
18595 * data/bison.simple: Adjust to be used by M4(sugar).
18596 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18598 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18599 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18600 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18601 shamelessly stolen from CVS Autoconf.
18603 2002-02-05 Akim Demaille <akim@epita.fr>
18605 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18606 * configure.in: Check for the declarations of free and malloc.
18607 * src/muscle_tab.c: Adjust.
18609 2002-02-05 Akim Demaille <akim@epita.fr>
18611 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18612 which have no values.
18614 2002-02-05 Akim Demaille <akim@epita.fr>
18616 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18619 2002-01-29 Paul Eggert <eggert@twinsun.com>
18621 * src/bison.simple (YYSIZE_T): Do not define merely because
18622 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18623 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18625 2002-01-27 Akim Demaille <akim@epita.fr>
18627 Fix `%nonassoc and eof'.
18629 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18630 which were not properly copied! Replace
18631 memcpy (res->errs, src->errs, src->nerrs);
18633 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18635 * tests/regression.at (%nonassoc and eof): Adjust to newest
18636 Autotest: `.' is not in the PATH.
18638 2002-01-27 Akim Demaille <akim@epita.fr>
18640 * tests/sets.at (AT_EXTRACT_SETS): New.
18641 (Nullable): Use it.
18644 2002-01-26 Akim Demaille <akim@epita.fr>
18646 * tests/actions.at, tests/calc.at, tests/headers.at,
18647 * tests/torture.at: Adjust to the newest Autotest which no longer
18648 forces `.' in the PATH.
18650 2002-01-25 Akim Demaille <akim@epita.fr>
18652 * tests/regression.at (%nonassoc and eof): New.
18653 Suggested by Robert Anisko.
18655 2002-01-24 Akim Demaille <akim@epita.fr>
18657 Bison dumps core when trying to complain about broken input files.
18658 Reported by Cris van Pelt.
18660 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18661 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18663 (Invalid inputs): Strengthen: exercise parse_percent_token.
18665 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18667 * src/Makefile.am: Add bison.c++.
18668 * src/bison.c++: New skeleton.
18670 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18674 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18676 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18678 2002-01-20 Marc Autret <marc@gnu.org>
18680 * src/files.c (compute_output_file_names): Fix
18682 2002-01-20 Marc Autret <marc@gnu.org>
18684 * tests/output.at: New test.
18685 * src/files.c (compute_base_names): Don't map extensions when
18686 the YACC flag is set, use defaults.
18687 Reported by Evgeny Stambulchik.
18689 2002-01-20 Marc Autret <marc@gnu.org>
18691 * src/system.h: Need to define __attribute__ away for non-GCC
18692 compilers as well (i.e., the vendor C compiler).
18693 Suggested by Albert Chin-A-Young.
18695 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18697 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18698 canonical definition.
18699 * src/system.h: Use the canonical definition for PARAMS (avoids
18700 a conflict with the macro from lib/hash.h).
18702 2002-01-11 Akim Demaille <akim@epita.fr>
18704 * configure.in: Use AC_FUNC_STRNLEN.
18705 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18707 2002-01-09 Akim Demaille <akim@epita.fr>
18709 * src/files.c, src/files.h (output_infix): New.
18710 (tab_extension): Remove.
18711 (compute_base_names): Compute the former, drop the latter.
18712 * src/output.c (prepare): Insert the muscles `output-infix', and
18714 * src/parse-skel.y (string, string.1): New.
18715 (section.header): Use it.
18716 (section.yacc): Remove.
18717 (prefix): Remove too.
18718 * src/scan-skel.l: Adjust.
18719 * src/bison.simple, src/bison.hairy: Adjust.
18721 2002-01-09 Akim Demaille <akim@epita.fr>
18723 * configure.in (WERROR_CFLAGS): Compute it.
18724 * src/Makefile.am (CFLAGS): Pass it.
18725 * tests/atlocal.in (CFLAGS): Idem.
18726 * src/files.c: Fix a few warnings.
18727 (get_extension_index): Remove, unused.
18729 2002-01-08 Akim Demaille <akim@epita.fr>
18731 * src/getargs.c (AS_FILE_NAME): New.
18732 (getargs): Use it to convert DOSish file names.
18733 * src/files.c (base_name): Rename as full_base_name to avoid
18734 clashes with `base_name ()'.
18735 (filename_split): New.
18736 (compute_base_names): N-th rewrite, using filename_split.
18738 2002-01-08 Akim Demaille <akim@epita.fr>
18740 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18741 New, stolen from the Fileutils 4.1.
18742 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18743 * configure.in: Check for the presence of memrchr, and of its
18746 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18748 * lib/hash.h (__P): Added definition for this macro.
18749 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18750 BUILT_SOURCES, to ensure they are generated first.
18751 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18752 %error-verbose to allow bootstrapping with bison 1.30x.
18754 2002-01-06 Akim Demaille <akim@epita.fr>
18756 * src/reader.c (parse_braces): Don't fetch the next char, the
18757 convention is to fetch on entry.
18758 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18759 'switch' without a following semicolon.
18760 * tests/regression.at (braces parsing): New.
18762 2002-01-06 Akim Demaille <akim@epita.fr>
18764 Bison is dead wrong in its RR conflict reports.
18766 * tests/torture.at (GNU Cim Grammar): New.
18767 * src/conflicts.c (count_rr_conflicts): Fix.
18769 2002-01-06 Akim Demaille <akim@epita.fr>
18771 Creating package.m4 from configure.ac causes too many problems.
18773 * tests/Makefile.am (package.m4): Create it by hand,
18774 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18776 2002-01-06 Akim Demaille <akim@epita.fr>
18778 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18781 2002-01-04 Paul Eggert <eggert@twinsun.com>
18783 * doc/bison.texinfo (Debugging):
18784 Remove YYSTDERR; it's no longer defined or used.
18785 Also, s/cstdio.h/cstdio/.
18787 2002-01-03 Akim Demaille <akim@epita.fr>
18789 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18791 2002-01-03 Akim Demaille <akim@epita.fr>
18793 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18794 tracing code to --trace, wait for a better --trace option, with
18797 2002-01-03 Akim Demaille <akim@epita.fr>
18799 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18800 The ISO C++ standard is extremely clear about it: stderr is
18801 considered a macro, not a regular symbol (see table 94 `Header
18802 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18803 Therefore std:: does not apply to it. It still does with fprintf.
18804 Also, s/cstdio.h/cstdio/.
18806 2002-01-03 Akim Demaille <akim@epita.fr>
18808 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18809 for non system headers.
18811 2002-01-02 Akim Demaille <akim@epita.fr>
18813 Equip the skeleton chain with location tracking, runtime trace,
18814 pure parser and scanner.
18816 * src/parse-skel.y: Request a pure parser, locations, and prefix
18818 (%union): Having several members with the same type does not help
18819 type mismatches, simplify.
18820 (YYPRINT, yyprint): New.
18821 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18822 (skel_error): this.
18824 * src/scan-skel.l: Adjust to these changes.
18825 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18826 (LOCATION_PRINT, skel_control_t): New.
18828 2001-12-30 Akim Demaille <akim@epita.fr>
18830 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18831 replace `gb' with BLANKS.
18832 * src/scan-skel.l: Adjust.
18834 2001-12-30 Akim Demaille <akim@epita.fr>
18836 * src/system.h: We don't need nor want bcopy.
18837 Throw away MS-DOS crap: we don't need getpid.
18838 * configure.in: We don't need strndup. It was even causing
18839 problems: because Flex includes the headers *before* us,
18840 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18842 * lib/xstrndup.c: New.
18843 * src/scan-skel.l: Use it.
18844 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18845 * src/parse-skel.y: Use %directives instead of #defines.
18847 2001-12-30 Akim Demaille <akim@epita.fr>
18849 * src/skeleton.h: New.
18850 * src/output.c (output_parser, output_master_parser): Remove, dead
18852 * src/output.h (get_lines_number, actions_output, guards_output)
18853 (token_definitions_output): Prototype them.
18854 * src/parse-skel.y: Add the license notice.
18855 Include output.h and skeleton.h.
18856 (process_skeleton): Returns void, and takes a single parameter.
18857 * src/scan-skel.l: Add the license notice.
18858 Include skeleton.h.
18859 Don't use %option yylineno: it seems that then Flex imagines
18860 REJECT has been used, and therefore it won't reallocate its
18861 buffers (which makes no other sense to me than a bug). It results
18862 in warnings for `unused: yy_flex_realloc'.
18864 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
18866 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18867 (MUSCLE_INSERT_PREFIX): ...to there.
18868 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18869 (MUSCLE_INSERT_PREFIX): Move from here...
18871 * src/bison.hairy: Add a section directive. Put braces around muscle
18872 names. This parser skeleton is still broken, but Bison should not
18873 choke on a bad muscle 'syntax'.
18874 * src/bison.simple: Add a section directive. Put braces around muscle
18877 * src/files.h (strsuffix, stringappend): Add declarations.
18878 (tab_extension): Add declaration.
18879 (short_base_name): Add declaration.
18881 * src/files.c (strsuffix, stringappend): No longer static. These
18882 functions are used in the skeleton parser.
18883 (tab_extension): New.
18884 (compute_base_names): Use the computations done in this function
18885 to guess if the generated parsers should have '.tab' in their
18887 (short_base_name): No longer static.
18889 * src/output.c (output_skeleton): New.
18890 (output): Disable call to output_master_parser, and give a try to
18891 a new skeleton handling system.
18892 (guards_output, actions_output): No longer static.
18893 (token_definitions_output, get_lines_number): No longer static.
18895 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18897 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18900 * src/parse-skel.y: New file.
18901 * src/scan-skel.l: New file.
18903 2001-12-29 Akim Demaille <akim@epita.fr>
18905 %name-prefix is broken.
18907 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18908 Adjust all dependencies.
18909 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18912 Renaming yylval but not yylloc is not consistent. Now we do.
18914 * src/bison.simple: Prefix yylloc if used.
18915 * doc/bison.texinfo (Decl Summary): Document that.
18917 2001-12-29 Akim Demaille <akim@epita.fr>
18919 * doc/bison.texinfo: Promote `%long-directive' over
18921 Remove all references to fixed-output-files, yacc is enough.
18923 2001-12-29 Akim Demaille <akim@epita.fr>
18925 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18926 user prologue. These are defaults.
18927 * tests/actions.at (Mid-rule actions): Make sure the user can
18928 define YYDEBUG and YYERROR_VERBOSE.
18930 2001-12-29 Akim Demaille <akim@epita.fr>
18932 * src/output.c (header_output): Don't forget to export YYLTYPE and
18934 * tests/headers.at (export YYLTYPE): New, make sure it does.
18935 * tests/regression.at (%union and --defines, Invalid CPP headers):
18937 * tests/headers.at: here.
18939 2001-12-29 Akim Demaille <akim@epita.fr>
18941 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18943 2001-12-29 Akim Demaille <akim@epita.fr>
18945 * tests/actions.at (Mid-rule actions): Output on a single line
18946 instead of several.
18948 2001-12-29 Akim Demaille <akim@epita.fr>
18950 * doc/bison.texinfo: Formatting changes.
18952 2001-12-29 Akim Demaille <akim@epita.fr>
18954 Don't store the token defs in a muscle, just be ready to output it
18955 on command. Now possible via `symbols'. Fixes a memory leak.
18957 * src/output.c (token_definitions_output): New.
18958 (output_parser, header_output): Use it.
18959 * src/reader.c (symbols_save): Remove.
18961 2001-12-29 Akim Demaille <akim@epita.fr>
18963 * src/bison.simple: Do not provide a default for YYSTYPE and
18964 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18967 2001-12-29 Akim Demaille <akim@epita.fr>
18969 Mid-rule actions are simply... ignored!
18971 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18972 the empty-rule associated to the dummy symbol, not to the host
18974 * tests/actions.at (Mid-rule actions): New.
18976 2001-12-29 Akim Demaille <akim@epita.fr>
18980 * src/reader.c (reader): Free grammar.
18982 2001-12-29 Akim Demaille <akim@epita.fr>
18986 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18987 since it allocates it for each state, although only one is needed.
18988 (allocate_storage): Do it here.
18990 2001-12-29 Akim Demaille <akim@epita.fr>
18992 * src/options.h, src/options.c (create_long_option_table): Rename
18994 (long_option_table_new): this, with a clearer prototype.
18995 (percent_table): Remove, unused,
18996 * src/getargs.c (getargs): Adjust.
18998 2001-12-29 Akim Demaille <akim@epita.fr>
19000 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
19001 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
19004 2001-12-29 Akim Demaille <akim@epita.fr>
19006 * src/lalr.c (build_relations): Rename `states' as `states1'.
19007 Sorry, I don't understand exactly what it is, no better name...
19009 2001-12-29 Akim Demaille <akim@epita.fr>
19011 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
19012 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
19013 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
19016 2001-12-29 Akim Demaille <akim@epita.fr>
19018 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19021 2001-12-29 Akim Demaille <akim@epita.fr>
19023 * src/reader.c, src/reader.h (user_toknums): Remove.
19024 Adjust all users to use symbols[i]->user_token_number.
19026 2001-12-29 Akim Demaille <akim@epita.fr>
19028 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19029 Adjust all users to use symbols[i]->prec or ->assoc.
19031 2001-12-29 Akim Demaille <akim@epita.fr>
19033 * src/reader.c, src/reader.h (tags): Remove.
19034 Adjust all users to use symbols[i]->tag.
19036 2001-12-29 Akim Demaille <akim@epita.fr>
19038 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19040 * src/reader.c (packsymbols): Fill this table.
19042 * src/conflicts.c (resolve_sr_conflict): Adjust.
19043 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19045 Use symbols[i]->tag instead of tags[i].
19047 2001-12-29 Akim Demaille <akim@epita.fr>
19049 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19050 In addition, put a comment in there, to replace...
19051 * tests/regression.at (%union and C comments): Remove.
19053 2001-12-29 Akim Demaille <akim@epita.fr>
19055 * tests/regression.at (Web2c Actions): Blindly move the actual
19056 output as expected output. The contents *seem* right to me, but I
19057 can't pretend reading perfectly parser tables... Nonetheless, all
19058 the other tests pass correctly, the table look OK, even though the
19059 presence of `$axiom' is to be noted: AFAICS it is useless (but
19062 2001-12-29 Akim Demaille <akim@epita.fr>
19064 * src/reader.c (readgram): Don't add the rule 0 if there were no
19065 rules read. In other words, add it _after_ having performed
19066 grammar sanity checks.
19067 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19069 2001-12-29 Akim Demaille <akim@epita.fr>
19071 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19072 visible, and some states have now a different number.
19074 2001-12-29 Akim Demaille <akim@epita.fr>
19076 * src/reader.c (readgram): Bind the initial rule's lineno to that
19078 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19079 (Solved SR Conflicts): Adjust rule 0's line number.
19081 2001-12-29 Akim Demaille <akim@epita.fr>
19083 Fix the `GAWK Grammar' failure.
19085 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19086 the reductions of the first state which was mistakenly confused
19087 with the final state because precisely final_state was initialized
19089 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19090 now noticed by Bison.
19091 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19092 have a reduction on $default.
19094 2001-12-29 Akim Demaille <akim@epita.fr>
19096 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19098 * src/closure.c (print_closure): Likewise.
19099 * src/derives.c (print_derives): Likewise.
19100 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19103 2001-12-29 Akim Demaille <akim@epita.fr>
19105 * src/lalr.c (lookaheads_print): New.
19106 (lalr): Call it when --trace-flag.
19107 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19110 2001-12-29 Akim Demaille <akim@epita.fr>
19112 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19113 when walking through ritem, even via rule->rhs.
19114 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19115 (useful_production, useless_nonterminals): Likewise.
19116 (reduce_grammar_tables): Likewise, plus update nritems.
19117 * src/nullable.c (set_nullable): Likewise.
19118 * src/lalr.c (build_relations): Likewise.
19119 * tests/sets.at (Nullable): Adjust.
19120 Fortunately, now, the $axiom is no longer nullable.
19122 2001-12-29 Akim Demaille <akim@epita.fr>
19124 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19126 * src/gram.c (ritem_longest_rhs): Likewise.
19127 * src/reduce.c (nonterminals_reduce): Likewise.
19128 * src/print_graph.c (print_graph): Likewise.
19129 * src/output.c (output_rule_data): Likewise.
19130 * src/nullable.c (set_nullable): Likewise.
19132 2001-12-29 Akim Demaille <akim@epita.fr>
19134 * src/output.c: Comment changes.
19136 2001-12-27 Paul Eggert <eggert@twinsun.com>
19138 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19139 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19140 Sparc, as they were causing more porting problems than the
19141 (minor) performance improvement was worth.
19143 Also, catch up with 1.31's YYSTD.
19145 2001-12-27 Akim Demaille <akim@epita.fr>
19147 * src/output.c (output_gram): Rely on nritems, not the
19148 0-sentinel. See below.
19149 Use -1 as separator, not 0.
19150 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19151 Rely on -1 as separator in yyrhs, instead of 0.
19152 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19153 twice `Now at end of input', therefore there are two lines less to
19156 2001-12-27 Akim Demaille <akim@epita.fr>
19158 * tests/regression.at (Unresolved SR Conflicts):
19159 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19162 2001-12-27 Akim Demaille <akim@epita.fr>
19164 * src/LR0.c (new_state): Recognize the final state by the fact it
19165 is reached by eoftoken.
19166 (insert_start_shifting_state, insert_eof_shifting_state)
19167 (insert_accepting_state, augment_automaton): Remove, since now
19168 these states are automatically computed from the initial state.
19169 (generate_states): Adjust.
19170 * src/print.c: When reporting a rule number to the user, substract
19171 1, so that the axiom rule is rule 0, and the first user rule is 1.
19172 * src/reduce.c: Likewise.
19173 * src/print_graph.c (print_core): For the time being, just as for
19174 the report, depend upon --trace-flags to dump the full set of
19176 * src/reader.c (readgram): Once the grammar read, insert the rule
19177 0: `$axiom: START-SYMBOL $'.
19178 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19179 number of the states has changed (the final state is no longer
19180 necessarily the last), catch up.
19182 2001-12-27 Akim Demaille <akim@epita.fr>
19184 Try to make the use of the eoftoken valid. Given that its value
19185 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19186 is used instead of > 0 where appropriate, (ii), depend upon nritems
19187 instead of the 0-sentinel.
19189 * src/gram.h, src/gram.c (nritems): New.
19190 Expected to be duplication of nitems, but for the time being...
19191 * src/reader.c (packgram): Assert nritems and nitems are equal.
19192 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19193 * src/closure.c (print_closure, print_fderives): Likewise.
19194 * src/gram.c (ritem_print): Likewise.
19195 * src/print.c (print_core, print_grammar): Likewise.
19196 * src/print_graph.c: Likewise.
19198 2001-12-27 Akim Demaille <akim@epita.fr>
19200 * src/main.c (main): If there are complains after grammar
19201 reductions, then output the report anyway if requested, then die.
19202 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19203 * src/reader.c (eoftoken): New.
19204 (parse_token_decl): If the token being defined has value `0', it
19206 (packsymbols): No longer hack `tags' to insert `$' by hand.
19207 Be sure to preserve the value of the eoftoken.
19208 (reader): Make sure eoftoken is defined.
19209 Initialize nsyms to 0: now eoftoken is created just like the others.
19210 * src/print.c (print_grammar): Don't special case the eof token.
19211 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19212 lie anyway, albeit pleasant.
19213 * tests/calc.at: Exercise error messages with eoftoken.
19214 Change the grammar so that empty input is invalid.
19215 Adjust expectations.
19216 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19218 2001-12-27 Akim Demaille <akim@epita.fr>
19220 * configure.in: Check the protos of strchr ans strspn.
19221 Replace strchr if needed.
19222 * src/system.h: Provide the protos of strchr, strspn and memchr if
19224 * lib/strchr.c: New.
19225 * src/reader.c (symbols_save): Use strchr.
19227 2001-12-27 Akim Demaille <akim@epita.fr>
19229 * src/print.c, src/print_graph.c (escape): New.
19230 Use it to quote the TAGS outputs.
19231 * src/print_graph.c (print_state): Now errors are in red, and
19232 reductions in green.
19233 Prefer high to wide: output the state number on a line of its own.
19235 2001-12-27 Akim Demaille <akim@epita.fr>
19237 * src/state.h, src/state.c (reductions_new): New.
19238 * src/LR0.c (set_state_table): Let all the states have a
19239 `reductions', even if reduced to 0.
19240 (save_reductions): Adjust.
19241 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19242 * src/print.c (print_reductions, print_actions): Adjust.
19243 * src/output.c (action_row): Adjust.
19245 2001-12-27 Akim Demaille <akim@epita.fr>
19247 * src/state.h, src/state.c (errs_new, errs_dup): New.
19248 * src/LR0.c (set_state_table): Let all the states have an errs,
19249 even if reduced to 0.
19250 * src/print.c (print_errs, print_reductions): Adjust.
19251 * src/output.c (output_actions, action_row): Adjust.
19252 * src/conflicts.c (resolve_sr_conflict): Adjust.
19254 2001-12-27 Akim Demaille <akim@epita.fr>
19256 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19258 2001-12-27 Akim Demaille <akim@epita.fr>
19260 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19261 * src/print.c: here.
19262 (lookaheadset, shiftset): New, used as additional storage by
19264 (print_results): Adjust.
19265 (print_shifts, print_gotos, print_errs): New, extracted from...
19266 (print_actions): here.
19267 * src/print_graph.c (print_actions): Remove dead code.
19269 2001-12-27 Akim Demaille <akim@epita.fr>
19271 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19274 2001-12-27 Akim Demaille <akim@epita.fr>
19276 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19277 (build_relations): Adjust.
19279 2001-12-27 Akim Demaille <akim@epita.fr>
19281 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19284 2001-12-27 Akim Demaille <akim@epita.fr>
19286 * src/reader.c (packgram): Catch nitems overflows.
19288 2001-12-27 Akim Demaille <akim@epita.fr>
19290 * src/files.c, src/files.h (guard_obstack): Remove.
19291 * src/output.c (output): Adjust.
19292 * src/reader.c (parse_braces): New, factoring...
19293 (copy_action, copy_guard): these two which are renamed as...
19294 (parse_action, parse_guard): these.
19295 As a voluntary consequence, using braces around guards is now
19298 2001-12-27 Akim Demaille <akim@epita.fr>
19300 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19301 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19303 (symbol_list_new): Adjust.
19304 (copy_action): action_line is the first line, not the last.
19305 (copy_guard): Just as for actions, store the `action' only, not
19306 the switch/case/break flesh.
19307 Don't parse the user action that might follow the guard, let...
19308 (readgram): do it, i.e., now, there can be an action after a
19310 In other words the guard is just explicitly optional.
19311 (packgram): Adjust.
19312 * src/output.c (guards_output): New.
19313 (output_parser): Call it when needed.
19314 (output): Also free the guard and attrs obstacks.
19315 * src/files.c, src/files.h (obstack_save): Remove.
19316 (output_files): Remove.
19317 As a result, if one needs the former `.act' file, using an
19318 appropriate skeleton which requires actions and guards is now
19320 * src/main.c (main): Adjust.
19321 * tests/semantic.at: New.
19322 * tests/regression.at: Use `input.y' as input file name.
19323 Avoid 8+3 problems by requiring input.c when the test needs the
19326 2001-12-27 Akim Demaille <akim@epita.fr>
19328 * src/reader.c (symbol_list_new): Be sure to initialize all the
19331 2001-12-27 Akim Demaille <akim@epita.fr>
19333 All the hacks using a final pseudo state are now useless.
19335 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19336 * src/lalr.c (nLA): New.
19337 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19338 instead of lookaheadsp from the pseudo state (nstate + 1).
19340 2001-12-27 Akim Demaille <akim@epita.fr>
19342 * src/output.c (action_row, token_actions): Use a state_t instead
19343 of a integer, and nlookaheads instead of the following state's
19346 2001-12-27 Akim Demaille <akim@epita.fr>
19348 * src/conflicts.c (log_resolution, flush_shift)
19349 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19350 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19351 (conflicts_print, print_reductions): Use a state_t instead of an
19352 integer when referring to a state.
19353 As much as possible, depend upon nlookaheads, instead of the
19354 `lookaheadsp' member of the following state (since lookaheads of
19355 successive states are successive, the difference between state n + 1
19356 and n served as the number of lookaheads for state n).
19357 * src/lalr.c (add_lookback_edge): Likewise.
19358 * src/print.c (print_core, print_actions, print_state)
19359 (print_results): Likewise.
19360 * src/print_graph.c (print_core, print_actions, print_state)
19361 (print_graph): Likewise.
19362 * src/conflicts.h: Adjust.
19364 2001-12-27 Akim Demaille <akim@epita.fr>
19366 * src/bison.hairy: Formatting/comment changes.
19368 Remove `register' indications.
19369 Add plenty of `static'.
19371 2001-12-27 Akim Demaille <akim@epita.fr>
19373 * src/output.c (prepare): Drop the muscle `ntbase' which
19374 duplicates ntokens.
19375 * src/bison.simple: Formatting/comment changes.
19376 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19377 is an undocumented synonym.
19379 2001-12-22 Akim Demaille <akim@epita.fr>
19381 * src/output.c (output_table_data): Change the prototype to use
19382 `int' for array ranges: some invocations do pass an int, not a
19384 Reported by Wayne Green.
19386 2001-12-22 Akim Demaille <akim@epita.fr>
19388 Some actions of web2c.y are improperly triggered.
19389 Reported by Mike Castle.
19391 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19392 * tests/regression.at (Web2c): Rename as...
19393 (Web2c Report): this.
19394 (Web2c Actions): New.
19396 2001-12-22 Akim Demaille <akim@epita.fr>
19398 Reductions in web2c.y are improperly reported.
19399 Reported by Mike Castle.
19401 * src/conflicts.c (print_reductions): Fix.
19402 * tests/regression.at (Web2c): New.
19404 2001-12-18 Akim Demaille <akim@epita.fr>
19406 Some host fail on `assert (!"foo")', which expands to
19407 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19408 Reported by Nelson Beebee.
19410 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19411 `#define it_succeeded 0' and `assert (it_succeeded)'.
19413 2001-12-17 Marc Autret <autret_m@epita.fr>
19415 * src/bison.simple: Don't hard code the skeleton line and filename.
19416 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19417 New line counter 'skeleton_line' (skeleton-line muscle).
19419 2001-12-17 Paul Eggert <eggert@twinsun.com>
19421 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19422 YYDEBUG must be defined to a nonzero value.
19424 * src/bison.simple (yytname): Do not assume that the user defines
19425 YYDEBUG to a properly parenthesized expression.
19427 2001-12-17 Akim Demaille <akim@epita.fr>
19429 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19430 nlookaheads is a new member.
19432 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19433 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19436 2001-12-17 Akim Demaille <akim@epita.fr>
19438 * src/files.h, src/files.c (open_files, close_files): Remove.
19439 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19441 * src/reader.c (reader): Do it.
19443 2001-12-17 Akim Demaille <akim@epita.fr>
19445 * src/conflicts.c (print_reductions): Formatting changes.
19447 2001-12-17 Akim Demaille <akim@epita.fr>
19449 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19450 (flush_reduce): New.
19451 (resolve_sr_conflict): Adjust.
19453 2001-12-17 Akim Demaille <akim@epita.fr>
19455 * src/output.c (output_obstack): Be static and rename as...
19456 (format_obstack): this, to avoid any confusion with files.c's
19458 * src/reader.h (muscle_obstack): Move to...
19459 * src/output.h: here, since it's defined in output.c.
19461 2001-12-17 Akim Demaille <akim@epita.fr>
19463 * src/output.c (action_row, save_column, default_goto)
19464 (sort_actions, matching_state, pack_vector): Better variable
19467 2001-12-17 Akim Demaille <akim@epita.fr>
19469 * src/output.c: Various formatting changes.
19471 2001-12-17 Akim Demaille <akim@epita.fr>
19473 * src/files.c (output_files): Free the output_obstack.
19474 * src/main.c (main): Call print and print_graph conditionally.
19475 * src/print.c (print): Work unconditionally.
19476 * src/print_graph.c (print_graph): Work unconditionally.
19477 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19479 2001-12-16 Marc Autret <autret_m@epita.fr>
19481 * src/output.c (actions_output): Fix. When we use %no-lines,
19482 there is one less line per action.
19484 2001-12-16 Marc Autret <autret_m@epita.fr>
19486 * src/bison.simple: Remove a useless #line directive.
19487 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19488 * src/output.c (get_lines_number): New.
19489 (output_parser): Adjust, now takes care about the lines of a
19491 Fix line numbering.
19492 (actions_output): Computes the number of lines taken by actions.
19493 (output_master_parser): Insert new skeleton which is the name of
19494 the output parser file name.
19496 2001-12-15 Marc Autret <autret_m@epita.fr>
19498 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19500 2001-12-15 Marc Autret <autret_m@epita.fr>
19502 * src/output.c (output_gram): Keep track of the hairy one.
19504 2001-12-15 Akim Demaille <akim@epita.fr>
19506 Make `make distcheck' work.
19508 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19509 system.h which uses libgettext.h.
19511 2001-12-15 Akim Demaille <akim@epita.fr>
19513 * src/nullable.c (set_nullable): Useless rules must be skipped,
19514 otherwise, since we range over their symbols, we might look at a
19515 nonterminal which no longer ``exists'', i.e., it is not counted in
19516 `nvars', hence we overflow our arrays.
19518 2001-12-15 Akim Demaille <akim@epita.fr>
19520 The header can also be produced directly, without any obstack!
19523 * src/files.c, src/files.h (defines_obstack): Remove.
19524 (compute_header_macro): Global.
19525 (defines_obstack_save): Remove.
19526 * src/reader.c (parse_union_decl): No longer output to
19527 defines_obstack: its content can be found in the `stype' muscle
19529 (output_token_translations): Merge into...
19530 (symbols_output): this.
19532 (symbols_save): this.
19534 * src/output.c (header_output): New.
19537 2001-12-15 Akim Demaille <akim@epita.fr>
19539 * src/reader.c (parse_union_decl): Instead of handling two obstack
19540 simultaneously, use one to define the `stype' muscle, and use the
19541 value of the latter to fill defines_obstack.
19542 (copy_comment): Remove.
19543 (copy_comment2): Work for a single obstack.
19545 (copy_comment): this.
19547 2001-12-15 Akim Demaille <akim@epita.fr>
19549 * src/lex.c, src/lex.h (xgetc): No longer static.
19550 * src/reader.c (parse_union_decl): Revamp.
19552 2001-12-15 Akim Demaille <akim@epita.fr>
19554 Still making progress in separating Bison into (i) input, (ii)
19555 process, (iii) output: now we can directly output the parser file
19556 without using table_obstack at all.
19558 * src/files.c, src/files.h (table_obstack): Bye bye.
19559 (parser_file_name): New.
19560 * src/files.c (compute_output_file_names): Compute it.
19561 * src/output.c (actions_output, output_parser)
19562 (output_master_parser): To a file instead of an obstack.
19564 2001-12-15 Akim Demaille <akim@epita.fr>
19566 Attach actions to rules, instead of pre-outputting them to
19569 * src/gram.h (rule_t): action and action_line are new members.
19570 * src/reader.c (symbol_list): Likewise.
19571 (copy_action): Save the actions within the rule.
19572 (packgram): Save them in rule_table.
19573 * src/output.c (actions_output): New.
19574 (output_parser): Use it on `%%actions'.
19575 (output_rule_data): Don't free rule_table.
19577 (prepare): Don't save the `action' muscle.
19578 * src/bison.simple: s/%%action/%%actions/.
19580 2001-12-15 Akim Demaille <akim@epita.fr>
19582 * src/reader.c (copy_action): When --yacc, don't append a `;'
19583 to the user action: let it fail if lacking.
19584 Suggested by Arnold Robbins and Tom Tromey.
19586 2001-12-14 Akim Demaille <akim@epita.fr>
19588 * src/lex.c (literalchar): Simply return the char you decoded, non
19589 longer mess around with obstacks and int pointers.
19590 Adjust all callers.
19592 2001-12-14 Akim Demaille <akim@epita.fr>
19594 * src/lex.c (literalchar): Don't escape the special characters,
19595 just decode them, and keep them as char (before, eol was output as
19596 the 2 char string `\n' etc.).
19597 * src/output.c (output_rule_data): Use quotearg to output the
19600 2001-12-13 Paul Eggert <eggert@twinsun.com>
19602 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19603 Do not infringe on the global user namespace when using C++.
19604 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19605 All uses of `fprintf' and `stderr' changed.
19607 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19609 2001-12-13 Akim Demaille <akim@epita.fr>
19611 The computation of nullable is broken: it doesn't handle empty
19614 * tests/torture.at (GNU AWK Grammar): New.
19615 * tests/sets.at (Nullable): New.
19616 * src/nullable.c (set_nullable): Instead of blindly looping over
19617 `ritems', loop over the rules, and then over their rhs's.
19619 Work around Autotest bugs.
19621 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19622 frame, because Autotest understand lines starting with a `+' as
19623 traces from the shell. Then, they are not processed properly.
19624 Admittedly an Autotest bug, but we don't have time to wait for
19625 Autotest to catch up.
19626 * tests/regression.at (Broken Closure): Adjust to the new table
19629 * tests/sets.at: here.
19631 2001-12-13 Akim Demaille <akim@epita.fr>
19633 * src/closure.c (closure): Use nrules instead of playing tricks
19634 with BITS_PER_WORD.
19636 2001-12-13 Akim Demaille <akim@epita.fr>
19638 * src/print.c (print_actions): Output the handling of `$' as the
19639 traces do: shifting the token EOF. Before EOF was treated as a
19641 * tests/regression.at: Adjust some tests.
19642 * src/print_graph.c (print_core): Complete the set of items via
19643 closure. The next-to-final and final states are still unsatisfying,
19644 but that's to be addressed elsewhere.
19645 No longer output the rule numbers, but do output the state number.
19646 A single loop for the shifts + gotos is enough, but picked a
19647 distinct color for each.
19648 (print_graph): Initialize and finalize closure.
19650 2001-12-13 Akim Demaille <akim@epita.fr>
19652 * src/reader.c (readgram): Remove dead code, an strip useless
19654 (get_type): Remove, unused.
19656 2001-12-12 Akim Demaille <akim@epita.fr>
19658 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19659 on that of lib/error.c.
19661 2001-12-12 Akim Demaille <akim@epita.fr>
19663 Some hosts don't like `/' in includes.
19665 * src/system.h: Include libgettext.h without qualifying the path.
19666 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19669 2001-12-11 Marc Autret <autret_m@epita.fr>
19671 * src/output.c (output_parser): Remove useless muscle.
19673 2001-12-11 Marc Autret <autret_m@epita.fr>
19675 * src/bison.simple: Remove #line just before %%epilogue. It
19676 is now handled in ...
19677 * src/reader.c (read_additionnal_code): Add the output of a
19678 #line for the epilogue.
19680 2001-12-10 Marc Autret <autret_m@epita.fr>
19682 * src/reader.c (copy_definition): Re-use CPP-outed code which
19683 replace precedent remove.
19684 * src/bison.simple: Remove #line before %%prologue because
19685 %%input-line is wrong at this time.
19687 2001-12-10 Marc Autret <autret_m@epita.fr>
19689 * src/reader.c (symbols_output): Clean up.
19690 * src/output.c (output_gram, output): Clean up.
19692 2001-12-10 Akim Demaille <akim@epita.fr>
19694 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19695 * src/LR0.c (set_state_table): here.
19696 * src/lalr.c (lalr): Call it.
19698 2001-12-10 Akim Demaille <akim@epita.fr>
19700 * src/state.h (shifts): Remove the `number' member: shifts are
19701 attached to state, hence no longer need to be labelled with a
19704 2001-12-10 Akim Demaille <akim@epita.fr>
19706 Now that states have a complete set of members, the linked list of
19707 shifts is useless: just fill directly the state's shifts member.
19709 * src/state.h (shifts): Remove the `next' member.
19710 * src/LR0.c (first_state, last_state): Remove.
19711 Adjust the callers.
19712 (augment_automaton): Don't look for the shifts that must be added
19713 a shift on EOF: it is those of the state we looked for! But now,
19714 since shifts are attached, it is no longer needed to looking
19715 merely by its id: its number.
19717 2001-12-10 Akim Demaille <akim@epita.fr>
19719 * src/LR0.c (augment_automaton): Better variable locality.
19720 Remove an impossible branch: if there is a state corresponding to
19721 the start symbol being shifted, then there is shift for the start
19722 symbol from the initial state.
19724 2001-12-10 Akim Demaille <akim@epita.fr>
19726 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19727 only when appropriate: when insert_start_shifting_state' is not
19729 * tests/regression.at (Rule Line Numbers): Adjust.
19731 2001-12-10 Akim Demaille <akim@epita.fr>
19733 * src/LR0.c (augment_automaton): Now that all states have shifts,
19734 merge the two cases addition shifts to the initial state.
19736 2001-12-10 Akim Demaille <akim@epita.fr>
19738 * src/lalr.c (set_state_table): Move to...
19740 * src/lalr.c (lalr): Don't call it...
19741 * src/LR0.c (generate_states): do it.
19742 * src/LR0.h (first_state): Remove, only the table is used.
19744 2001-12-10 Akim Demaille <akim@epita.fr>
19746 * src/LR0.h (first_shift, first_reduction): Remove.
19747 * src/lalr.c: Don't use first_shift: find shifts through the
19750 2001-12-10 Akim Demaille <akim@epita.fr>
19752 * src/LR0.c: Attach shifts to states as soon as they are
19754 * src/lalr.c (set_state_table): Instead of assigning shifts to
19755 state, just assert that the mapping was properly done.
19757 2001-12-10 Akim Demaille <akim@epita.fr>
19759 * src/LR0.c (insert_start_shift): Rename as...
19760 (insert_start_shifting_state): this.
19761 (insert_eof_shifting_state, insert_accepting_state): New.
19762 (augment_automaton): Adjust.
19763 Better locality of the variables.
19764 When looking if the start_symbol is shifted from the initial
19765 state, using `while (... symbol != start_symbol ...)' sounds
19766 better than `while (... symbol < start_symbol ...)': If fail
19767 to see how the order between symbols could be relevant!
19769 2001-12-10 Akim Demaille <akim@epita.fr>
19771 * src/getargs.h: Don't declare `spec_name_prefix' and
19772 `spec_file_prefix', declared by src/files.h.
19773 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19774 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19775 * src/output.c (prepare): Adjust.
19776 * src/reader.c (symbols_output): Likewise.
19777 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19779 2001-12-10 Akim Demaille <akim@epita.fr>
19781 * src/muscle_tab.c (muscle_init): NULL is a better default than
19784 2001-12-10 Akim Demaille <akim@epita.fr>
19786 * src/reader.c (reader): Calling symbols_output once is enough.
19788 2001-12-10 Akim Demaille <akim@epita.fr>
19790 Now that states have a complete set of members, the linked list of
19791 reductions is useless: just fill directly the state's reductions
19794 * src/state.h (struct reductions): Remove member `number' and
19796 * src/LR0.c (first_reduction, last_reduction): Remove.
19797 (save_reductions): Don't link the new reductions, store them in
19799 * src/lalr.c (set_state_table): No need to attach reductions to
19800 states, it's already done.
19801 * src/output.c (output_actions): No longer free the shifts, then
19802 the reductions, then the states: free all the states and their
19805 2001-12-10 Akim Demaille <akim@epita.fr>
19807 * src/options.c (OPTN, DRTV, BOTH): New.
19808 (option_table): Use them.
19810 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19811 the job of system.h.
19812 * src/options.c: Don't include stdio.h and xalloc.h for the same
19815 2001-12-10 Akim Demaille <akim@epita.fr>
19817 * src/output.c (output, prepare): Make sure the values of the
19818 muscles `action' and `prologue' are 0-terminated.
19820 2001-12-10 Akim Demaille <akim@epita.fr>
19822 Clean up GCC warnings.
19824 * src/reader.c (copy_action): `buf' is not used.
19825 (parse_skel_decl): Be static.
19826 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19827 * src/options.h (create_long_option_table): Have a real prototype.
19828 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19829 (hash_delete_at): Return const void *.
19830 Adjust casts to preserve the const.
19832 2001-12-10 Akim Demaille <akim@epita.fr>
19834 * configure.in: Require 2.52g.
19835 M4 is not needed, but AUTOM4TE is.
19836 * m4/m4.m4: Remove.
19837 * tests/Makefile.am: Adjust.
19839 2001-12-10 Akim Demaille <akim@epita.fr>
19841 One structure for states is enough, even though theoretically
19842 there are LR(0) states and LALR(1) states.
19844 * src/lalr.h (state_t): Remove.
19845 (state_table): Be state_t **, not state_t *.
19846 * src/state.h (core, CORE_ALLOC): Rename as...
19847 (state_t, STATE_ALLOC): this.
19848 Add the LALR(1) members: shifts, reductions, errs.
19849 * src/LR0.c (state_table): Rename as...
19850 (state_hash): this, to avoid name clashes with the global
19852 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19853 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19855 2001-12-10 Akim Demaille <akim@epita.fr>
19857 Bison dumps core on bash.y.
19858 Reported by Pascal Bart.
19860 * src/warshall.c (bitmatrix_print): New.
19862 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19863 j must be the outer loop.
19864 * tests/regression.at (Broken Closure): New.
19866 2001-12-05 Akim Demaille <akim@epita.fr>
19868 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19870 Reported by Peter Hamorsky.
19872 2001-12-05 Akim Demaille <akim@epita.fr>
19874 * src/conflicts.c (err_table): Remove.
19875 (resolve_sr_conflict): Adjust.
19876 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19878 (state_t.reductions, state_t.shifts): this.
19880 2001-12-05 Akim Demaille <akim@epita.fr>
19882 * src/reduce.c (reduce_grammar_tables): No longer disable the
19883 removal of useless rules via CPP but via `if (0)', so that the
19884 compiler still check the code is valid.
19885 For instance, it should have noticed `rline' no longer exists: use
19886 the `line' member of rule_t.
19887 * src/gram.c (dummy, rline): Remove, unused.
19889 2001-12-05 Akim Demaille <akim@epita.fr>
19891 * src/output.c (pack_vector): Use assert, not berror.
19892 * src/main.c (berror): Remove, unused.
19894 2001-12-05 Akim Demaille <akim@epita.fr>
19896 New experimental feature: if --verbose --trace output all the
19897 items of a state, not only its kernel.
19899 * src/print.c (print_core): If `trace_flag', then invoke closure
19900 before outputting the items of the state (print_core is no longer
19901 a correct name them).
19902 (print_results): Invoke new_closure/free_closure if needed.
19904 2001-12-05 Akim Demaille <akim@epita.fr>
19906 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19907 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19908 (nitemset): for consistency with the rest of the project.
19910 2001-12-05 Akim Demaille <akim@epita.fr>
19912 * src/closure.c (print_closure): Improve.
19913 (closure): Use it for printing input and output.
19915 2001-12-05 Akim Demaille <akim@epita.fr>
19917 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19918 indexed by nonterminals.
19920 2001-12-05 Akim Demaille <akim@epita.fr>
19922 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19924 * src/warshall.h: Remove accidental duplication of the content.
19926 2001-12-05 Akim Demaille <akim@epita.fr>
19928 * src/closure.c (set_fderives): De-obfuscate.
19930 2001-12-05 Akim Demaille <akim@epita.fr>
19932 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19934 2001-12-05 Akim Demaille <akim@epita.fr>
19936 * src/closure.c (set_firsts): De-obfuscate.
19938 2001-12-05 Akim Demaille <akim@epita.fr>
19940 * src/output.c (action_row): De-obfuscate
19941 using the good o' techniques: arrays not pointers, variable
19942 locality, BITISSET, RESETBIT etc.
19944 2001-12-05 Akim Demaille <akim@epita.fr>
19946 Pessimize the code to simplify it: from now on, all the states
19947 have a valid SHIFTS, which NSHIFTS is possibly 0.
19949 * src/LR0.c (shifts_new): Be global and move to..
19950 * src/state.c, src/state.h: here.
19951 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19952 * src/print_graph: Adjust.
19954 2001-12-05 Akim Demaille <akim@epita.fr>
19956 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19957 * src/conflicts.c: Use it.
19958 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19959 incorrectly ``simplified''.
19961 2001-12-05 Akim Demaille <akim@epita.fr>
19963 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19964 using the good o' techniques: arrays not pointers, variable
19965 locality, BITISSET, RESETBIT etc.
19967 2001-12-05 Akim Demaille <akim@epita.fr>
19969 * src/state.h (SHIFT_SYMBOL): New.
19970 * src/conflicts.c: Use it to deobfuscate.
19972 2001-12-05 Akim Demaille <akim@epita.fr>
19974 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19975 (print_reductions): De-obfuscate using the good o' techniques:
19976 arrays not pointers, variable locality, BITISSET.
19978 2001-12-05 Akim Demaille <akim@epita.fr>
19980 * src/conflicts.c (print_reductions): Arrays, not pointers.
19983 2001-12-05 Akim Demaille <akim@epita.fr>
19985 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19987 2001-12-05 Akim Demaille <akim@epita.fr>
19989 * src/conflicts.c (print_reductions): Improve variable locality.
19991 2001-12-05 Akim Demaille <akim@epita.fr>
19993 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19995 2001-12-05 Akim Demaille <akim@epita.fr>
19997 * src/conflicts.c (print_reductions): Improve variable locality.
19999 2001-12-05 Akim Demaille <akim@epita.fr>
20001 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
20002 * src/lalr.c: Use them.
20004 2001-12-05 Akim Demaille <akim@epita.fr>
20006 * src/LR0.c (augment_automaton): Formatting changes.
20007 Better variable locality.
20009 2001-12-05 Akim Demaille <akim@epita.fr>
20011 * src/lalr.c (matrix_print): New.
20012 (transpose): Use it.
20013 Use arrays instead of pointers.
20015 2001-12-05 Akim Demaille <akim@epita.fr>
20017 * src/lalr.c (maxrhs): Move to...
20018 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20019 * src/lalr.c (build_relations): Adjust.
20021 2001-12-05 Akim Demaille <akim@epita.fr>
20023 * src/lalr.c (transpose): Free the memory allocated to the
20024 argument, as it is replaced by the results by the unique caller.
20025 (build_relations): Merely invoke transpose: it handles the memory
20027 Improve variable locality.
20028 Avoid variables used as mere abbreviations.
20029 (compute_lookaheads): Use arrays instead of pointers.
20031 2001-12-05 Akim Demaille <akim@epita.fr>
20033 * src/lalr.c (initialize_F): Improve variable locality.
20034 Avoid variables used as mere abbreviations.
20036 2001-12-05 Akim Demaille <akim@epita.fr>
20038 * src/derives.c (print_derives): Display the ruleno.
20039 * src/lalr.c (initialize_F, transpose): Better variable locality
20040 to improve readability.
20041 Avoid variables used as mere abbreviations.
20043 2001-12-05 Akim Demaille <akim@epita.fr>
20045 * src/lalr.c (traverse): Use arrays instead of pointers.
20047 2001-12-05 Akim Demaille <akim@epita.fr>
20049 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20050 the handling of squeue.
20051 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20053 2001-12-05 Akim Demaille <akim@epita.fr>
20055 Because useless nonterminals are now kept alive (instead of being
20056 `destroyed'), we now sometimes examine them, and store information
20057 related to them. Hence we need to know their number, and adjust
20058 memory allocations.
20060 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20062 * src/LR0.c (allocate_itemsets): The memory allocated to
20063 `symbol_count' was used for two different purpose: once to count
20064 the number of occurrences of each symbol, and later reassigned to
20065 `shift_symbol', containing the symbol that can be shifted from a
20067 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20069 (new_itemsets): Allocate `shift_symbol' here.
20070 (allocate_itemsets): symbol_count includes useless nonterminals.
20071 Make room for them.
20072 (free_storage): Use `free', not `XFREE', for pointers that cannot
20075 2001-12-05 Akim Demaille <akim@epita.fr>
20077 * src/nullable.c (set_nullable): Deobfuscate the handling of
20079 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20081 2001-12-05 Akim Demaille <akim@epita.fr>
20083 * src/gram.c, src/gram.h (ritem_print): New.
20084 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20085 (This useless function was defined only to work around VMS linkers
20086 that can't handle compilation units with variables only).
20087 * src/reduce.c (dump_grammar): Use it to trace the construction of
20090 2001-12-04 Paul Eggert <eggert@twinsun.com>
20092 * src/bison.simple (union yyalloc): Change member names
20093 to be the same as the stack names.
20094 (yyparse): yyptr is now union yyalloc *, not char *.
20095 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20096 and may generate better code on some machines.
20097 (yystpcpy): Use prototype if __STDC__ is defined, not just
20098 if __cplusplus is defined.
20100 2001-11-30 Akim Demaille <akim@epita.fr>
20102 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20103 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20104 Gettext doesn't compile cleanly, and dies with -Werror.
20105 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20106 Include WARNING_CFLAGS here.
20107 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20108 before being defined.
20110 2001-11-27 Paul Eggert <eggert@twinsun.com>
20112 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20113 First arg is int, not unsigned.
20114 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20115 (SIZE_MAX, UINT_MAX): New macros.
20116 (quotearg_n_options): Abort if N is negative.
20117 Avoid overflow check on hosts where size_t is 64 bits and int
20118 is 32 bits, as overflow is impossible there.
20119 Fix off-by-one typo that caused unnecessary reallocation.
20121 2001-11-29 Paul Eggert <eggert@twinsun.com>
20123 Name space cleanup in generated parser.
20125 * doc/bison.texinfo (Bison Parser): Discuss system headers
20126 and their effect on the user name space.
20128 * src/bison.simple:
20129 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20130 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20131 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20133 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20134 on user names when possible.
20136 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20137 Simplify test for whather <alloca.h> exists.
20139 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20141 (<stdio.h>): Include if YYDEBUG.
20143 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20144 ! defined (yyoverflow) && ! defined (yymemcpy).
20146 (yymemcpy, yyparse): Rename local variables as needed so that
20147 they all begin with 'yy'.
20149 (yystrlen, yystpcpy): New functions.
20151 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20154 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20155 instead of relying on string.h functions. Use YYSTACK_ALLOC
20156 and YYSTACK_FREE instead of malloc and free.
20158 2001-11-30 Akim Demaille <akim@epita.fr>
20160 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20161 before their first uses.
20162 (YYBISON, YYPURE): Move to the top of the output.
20164 2001-11-30 Akim Demaille <akim@epita.fr>
20166 * tests/reduce.at (Useless Nonterminals): Fix.
20168 2001-11-30 Akim Demaille <akim@epita.fr>
20170 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20171 if body instead of `;' to pacify GCC's warnings.
20173 2001-11-30 Akim Demaille <akim@epita.fr>
20175 Instead of mapping the LHS of unused rules to -1, keep the LHS
20176 valid, but flag the rules as invalid.
20178 * src/gram.h (rule_t): `useful' is a new member.
20179 * src/print.c (print_grammar): Adjust.
20180 * src/derives.c (set_derives): Likewise.
20181 * src/reader.c (packgram, reduce_output): Likewise.
20182 * src/reduce.c (reduce_grammar_tables): Likewise.
20183 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20185 2001-11-30 Akim Demaille <akim@epita.fr>
20187 * src/reduce.c (reduce_output): Formatting changes.
20188 * src/print.c (print_results, print_grammar): Likewise.
20189 * tests/regression.at (Rule Line Numbers)
20190 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20192 2001-11-30 Akim Demaille <akim@epita.fr>
20194 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20195 useless nonterminals, move them at the end of the symbol arrays.
20196 (reduce_output): Adjust.
20197 * tests/reduce.at (Useless Nonterminals): Adjust.
20199 2001-11-30 Akim Demaille <akim@epita.fr>
20201 * src/reduce.c: Various comment/formatting changes.
20202 (nonterminals_reduce): New, extracted from...
20203 (reduce_grammar_tables): here.
20204 (reduce_grammar): Call nonterminals_reduce.
20206 2001-11-29 Paul Eggert <eggert@twinsun.com>
20208 * src/bison.simple (YYSTACK_REALLOC): Remove.
20209 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20210 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20212 (union yyalloc): New type.
20213 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20214 an arbitrary restriction on hosts where size_t is wider than int.
20216 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20217 a parser stack overflow. Allocate just one block of memory for all
20218 three stacks, instead of allocating three blocks; this typically is
20219 faster and reduces fragmentation.
20221 Do not limit the number of items in the stack to a value that fits
20222 in 'int', as this is an arbitrary limit on hosts with 64-bit
20223 size_t and 32-bit int.
20225 2001-11-29 Marc Autret <autret_m@epita.fr>
20227 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20228 of defining YYERROR_VERBOSE.
20229 [AT_DATA]: $4 is now out of C declarations in the prologue.
20231 2001-11-28 Marc Autret <autret_m@epita.fr>
20233 * src/reader.c (parse_dquoted_param): New.
20234 (parse_skel_decl): Use it.
20235 * src/lex.h: Add its prototype.
20236 * src/lex.c (literalchar): Become not static.
20238 2001-11-28 Marc Autret <autret_m@epita.fr>
20240 * src/output.h: And put its extern declaration here.
20241 * src/output.c (error_verbose): Define here.
20242 (prepare): Echo name modification.
20243 * src/getargs.h: Clean its extern declaration.
20244 * src/getargs.c (error_verbose_flag): Remove.
20245 (getargs): Remove case 'e'.
20246 * src/options.c (option_table): 'error-verbose' is now seen as simple
20250 * src/reader.c (read_declarations): Remove case tok_include.
20251 (parse_include_decl): Remove.
20252 * src/lex.h (token_t): Remove tok_include.
20253 * src/options.c (option_table): 'include' is now a simple command line
20256 2001-11-28 Marc Autret <autret_m@epita.fr>
20258 * src/bison.simple: Adjust muscle names.
20259 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20260 * src/output.c (prepare): s/_/-/ for the muscles names.
20261 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20263 2001-11-28 Marc Autret <autret_m@epita.fr>
20265 * src/bison.simple: Fix debug.
20266 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20268 2001-11-28 Akim Demaille <akim@epita.fr>
20270 * src/LR0.c (shifts_new): New.
20271 (save_shifts, insert_start_shift, augment_automaton): Use it.
20273 2001-11-28 Akim Demaille <akim@epita.fr>
20275 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20278 2001-11-28 Akim Demaille <akim@epita.fr>
20280 * src/closure.c (closure): Instead of looping over word in array
20281 then bits in words, loop over bits in array.
20283 2001-11-28 Akim Demaille <akim@epita.fr>
20285 * src/closure.c (closure): No longer optimize the special case
20286 where all the bits of `ruleset[r]' are set to 0, to make the code
20289 2001-11-28 Akim Demaille <akim@epita.fr>
20291 * src/closure.c (closure): `r' and `c' are new variables, used to
20292 de-obfuscate accesses to RULESET and CORE.
20294 2001-11-28 Akim Demaille <akim@epita.fr>
20296 * src/reduce.c (reduce_print): Use ngettext.
20297 (dump_grammar): Improve the trace accuracy.
20299 2001-11-28 Akim Demaille <akim@epita.fr>
20301 * src/reduce.c (dump_grammar): Don't translate trace messages.
20303 2001-11-28 Akim Demaille <akim@epita.fr>
20305 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20306 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20307 as all tags are free'ed afterwards.
20308 From Enrico Scholz.
20310 2001-11-27 Paul Eggert <eggert@twinsun.com>
20312 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20313 use alloca when we didn't want to, and vice versa.
20315 2001-11-27 Marc Autret <autret_m@epita.fr>
20317 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20319 * src/output.c (prepare): Remove its update.
20321 2001-11-27 Marc Autret <autret_m@epita.fr>
20323 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20324 Use %error-verbose.
20326 2001-11-27 Marc Autret <autret_m@epita.fr>
20328 * src/bison.simple: Remove YYERROR_VERBOSE using.
20329 Use %%error_verbose.
20330 (yyparse): Likewise.
20331 * src/output.c (prepare): Give its final value.
20332 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20333 * src/getargs.h: Add its extern declaration.
20334 * src/getargs.c (error_verbose_flag): New int.
20335 (getargs): Update to catch new case.
20336 * src/options.c (option_table): 'error-verbose' is a new option.
20337 (shortopts): Update.
20339 2001-11-27 Akim Demaille <akim@epita.fr>
20341 * src/system.h: Use intl/libgettext.h.
20342 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20344 2001-11-27 Akim Demaille <akim@epita.fr>
20346 * tests/torture.at (Exploding the Stack Size with Malloc):
20347 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20349 2001-11-27 Akim Demaille <akim@epita.fr>
20351 * src/files.c: Include error.h.
20352 Reported by Hans Aberg.
20354 2001-11-26 Marc Autret <autret_m@epita.fr>
20356 * src/reader.c (parse_include_decl): New, not yet implemented.
20357 (read_declarations): Add case tok_include.
20358 * src/getargs.h (include): Add its extern definition.
20359 * src/getargs.c (include): New const char *.
20360 (getargs): Add case '-I'.
20361 * src/options.c (option_table): Add include as command line and
20363 * src/lex.h (token_t): Add tok_include.
20365 2001-11-26 Akim Demaille <akim@epita.fr>
20367 * src/reader.c (readgram): Make sure rules for mid-rule actions
20368 have a lineno equal to that of their host rule.
20369 Reported by Hans Aberg.
20370 * tests/regression.at (Rule Line Numbers): New.
20372 2001-11-26 Akim Demaille <akim@epita.fr>
20374 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20377 2001-11-26 Akim Demaille <akim@epita.fr>
20379 * src/complain.c, src/complain.h (error): Remove, provided by
20382 2001-11-26 Akim Demaille <akim@epita.fr>
20384 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20385 issue an error message.
20386 * tests/regression.at (Invalid %directive): New.
20387 Reported by Hans Aberg.
20389 2001-11-26 Akim Demaille <akim@epita.fr>
20391 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20392 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20394 2001-11-26 Akim Demaille <akim@epita.fr>
20396 * src/conflicts.c (conflicts_print): Don't complain at all when
20397 there are no reduce/reduce conflicts, and as many shift/reduce
20398 conflicts as expected.
20399 * tests/regression.at (%expect right): Adjust.
20401 2001-11-23 Akim Demaille <akim@epita.fr>
20403 * lib/alloca.c: Update, from fileutils.
20405 2001-11-23 Akim Demaille <akim@epita.fr>
20407 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20409 2001-11-23 Akim Demaille <akim@epita.fr>
20411 * src/system.h: Include alloca.h.
20412 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20414 2001-11-23 Akim Demaille <akim@epita.fr>
20416 * src/print_graph.c (print_actions): Remove `rule', unused.
20417 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20418 pacify GCC's signed < unsigned warnings.
20419 * src/closure.c (itemsetsize): Likewise.
20420 * src/reader.c (symbol_list_new): Static.
20422 2001-11-23 Akim Demaille <akim@epita.fr>
20424 Attaching lineno to buckets is stupid, since only one copy of each
20425 symbol is kept, only the line of the first occurrence is kept too.
20427 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20428 * src/reader.c (rline_allocated): Remove, unused.
20429 (symbol_list): Have a `line' member.
20430 (symbol_list_new): New.
20431 (readgram): Use it.
20432 * src/print.c (print_grammar): Output the rule line numbers.
20433 * tests/regression.at (Solved SR Conflicts)
20434 (Unresolved SR Conflicts): Adjust.
20435 Reported by Hans Aberg.
20437 2001-11-22 Marc Autret <autret_m@epita.fr>
20439 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20441 2001-11-22 Marc Autret <autret_m@epita.fr>
20443 * src/muscle_tab.c (muscle_init): Remove initialization of
20445 * src/output.c (output_master_parser): Do it here.
20447 2001-11-20 Akim Demaille <akim@epita.fr>
20450 * configure.in (ALL_LINGUAS): Adjust.
20451 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20452 longer contains strings to translate.
20454 2001-11-19 Akim Demaille <akim@epita.fr>
20456 * src/conflicts.c (conflicts_print): Add a missing \n.
20458 2001-11-19 Akim Demaille <akim@epita.fr>
20460 * src/nullable.c (nullable_print): New.
20461 (set_nullable): Call it when tracing.
20462 Better locality of variables.
20464 2001-11-19 Akim Demaille <akim@epita.fr>
20466 * src/print.c (print_actions): Better locality of variables.
20468 2001-11-19 Akim Demaille <akim@epita.fr>
20470 * src/derives.c (print_derives): Fix and enrich.
20471 * src/closure.c (print_fderives): Likewise.
20473 2001-11-19 Akim Demaille <akim@epita.fr>
20475 * src/closure.c (itemsetend): Remove, replaced with...
20476 (itemsetsize): new.
20478 2001-11-19 Akim Demaille <akim@epita.fr>
20480 * src/LR0.c (kernel_end): Remove, replaced with...
20481 (kernel_size): new.
20483 2001-11-19 Akim Demaille <akim@epita.fr>
20485 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20488 2001-11-19 Akim Demaille <akim@epita.fr>
20490 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20492 2001-11-19 Akim Demaille <akim@epita.fr>
20494 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20496 * src/LR0.c: Likewise.
20497 (allocate_itemsets): Use arrays instead of pointers to clarify.
20499 2001-11-19 Akim Demaille <akim@epita.fr>
20501 * src/getargs.c (statistics_flag): Replace with...
20503 (longopts): Accept --trace instead of --statistics.
20504 * src/getargs.h, src/options.c: Adjust.
20505 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20506 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20508 2001-11-19 Akim Demaille <akim@epita.fr>
20510 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20511 pointers to clarify the code.
20512 (save_reductions, save_shifts): Factor common parts of alternatives.
20514 2001-11-19 Akim Demaille <akim@epita.fr>
20516 * src/LR0.c (new_state, get_state): Complete TRACE code.
20517 * src/closure.c: Include `reader.h' to get `tags', needed by the
20519 Rename the conditional DEBUG as TRACE.
20520 Output consistently TRACEs to stderr, not stdout.
20521 * src/derives.c: Likewise.
20522 * src/reduce.c: (inaccessable_symbols): Using if is better style
20524 Use `#if TRACE' instead of `#if 0' for tracing code.
20526 2001-11-19 Akim Demaille <akim@epita.fr>
20528 * src/system.h (LIST_FREE, shortcpy): New.
20529 * src/LR0.c: Use them.
20530 * src/output.c (free_itemsets, free_reductions, free_shifts):
20531 Remove, replaced by LIST_FREE.
20533 2001-11-19 Akim Demaille <akim@epita.fr>
20535 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20536 (REDUCTIONS_ALLOC): New.
20537 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20540 2001-11-19 Akim Demaille <akim@epita.fr>
20542 * src/LR0.c (new_state): Complete trace code.
20543 * src/nullable.c (set_nullable): Don't translate traces.
20545 2001-11-19 Akim Demaille <akim@epita.fr>
20547 * src/print_graph.c (print_core): Better locality of variables.
20548 * src/print.c (print_core): Likewise.
20550 2001-11-19 Akim Demaille <akim@epita.fr>
20552 * src/vcg.c: You do the output, so you are responsible of the
20553 handling of VCG syntax, in particular: use quotearg.
20554 * src/print_graph.c: Don't.
20555 (print_actions): Don't output the actions as part of the nodes,
20556 since that's the job of the edges.
20557 (print_state): Don't output by hand: fill the node description,
20558 and ask for its output.
20560 2001-11-19 Akim Demaille <akim@epita.fr>
20562 * src/bison.simple (yyparse): When verbosely reporting an error,
20563 no longer put additional quotes around token names.
20564 * tests/calc.at: Adjust.
20566 2001-11-19 Akim Demaille <akim@epita.fr>
20568 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20569 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20570 * src/output.c: Adjust.
20572 2001-11-19 Akim Demaille <akim@epita.fr>
20574 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20576 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20578 2001-11-19 Akim Demaille <akim@epita.fr>
20580 * src/gram.h (rule_t): New.
20582 (rrhs, rlhs): Remove, part of state_t.
20583 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20584 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20585 * src/reader.c, src/reduce.c: Adjust.
20587 2001-11-19 Akim Demaille <akim@epita.fr>
20589 * src/reader.c (symbols_output): New, extracted from...
20590 (packsymbols): Here.
20593 2001-11-19 Akim Demaille <akim@epita.fr>
20595 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20596 (maxrhs): this new function.
20598 2001-11-19 Akim Demaille <akim@epita.fr>
20600 * src/lalr.c (F): New macro to access the variable F.
20603 2001-11-19 Akim Demaille <akim@epita.fr>
20605 * src/lalr.h (LA): New macro to access the variable LA.
20606 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20607 * src/lalr.c: Adjust.
20609 2001-11-19 Akim Demaille <akim@epita.fr>
20611 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20612 (set_state_table): handle the `lookaheads' members.
20614 2001-11-19 Akim Demaille <akim@epita.fr>
20616 * src/lalr.h (lookaheads): Removed array, whose contents is now
20618 (state_t): this structure.
20619 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20622 2001-11-19 Akim Demaille <akim@epita.fr>
20624 * src/lalr.h (consistent): Removed array, whose contents is now
20626 (state_t): this structure.
20627 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20630 2001-11-19 Akim Demaille <akim@epita.fr>
20632 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20633 contents are now members of...
20634 (state_t): this structure.
20635 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20638 2001-11-19 Akim Demaille <akim@epita.fr>
20640 * src/lalr.h (state_t): New.
20641 (state_table): Be a state_t * instead of a core **.
20642 (accessing_symbol): Remove, part of state_t.
20643 * src/lalr.c: Adjust.
20644 (set_accessing_symbol): Merge into...
20645 (set_state_table): this.
20646 * src/print_graph.c, src/conflicts.c: Adjust.
20648 2001-11-14 Akim Demaille <akim@epita.fr>
20650 * tests/calc.at, tests/output.at, tests/regression.at,
20651 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20652 now the tests are run in private dirs, therefore AC_CLEANUP and
20653 family can be simplified to 0-ary.
20654 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20655 use abs. path to find config.h.
20656 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20657 stderr, there can be way too much random noise.
20658 Instead pass -Werror to GCC and rely on the exit status.
20659 Reported by Wolfram Wagner.
20661 2001-11-14 Akim Demaille <akim@epita.fr>
20663 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20664 defined only if yyoverflow is defined, to avoid `warning: unused
20666 Reported by The Test Suite.
20668 2001-11-14 Akim Demaille <akim@epita.fr>
20670 * src/print.c: Include reduce.h.
20671 Reported by Hans Aberg.
20673 2001-11-14 Akim Demaille <akim@epita.fr>
20675 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20676 Revert a previous patch: these are really const.
20677 * src/conflicts.c (conflict_report): Additional useless pair of
20678 braces to pacify GCC's warnings for `if () if () {} else {}'.
20679 * src/lex.c (parse_percent_token): Replace equal_offset with
20682 Be sure to strdup `arg' when used, since there is no reason for
20683 token_buffer not to change.
20685 2001-11-14 Akim Demaille <akim@epita.fr>
20687 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20689 * src/main.c (main): Use them.
20690 Suggested by Hans Aberg.
20692 2001-11-12 Akim Demaille <akim@epita.fr>
20694 * src/system.h (ngettext): Now that we use ngettext, be sure to
20695 provide a default definition when NLS are not used.
20697 2001-11-12 Akim Demaille <akim@epita.fr>
20699 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20700 Use @kbd to denote user input.
20701 (Language and Grammar): ANSIfy the example.
20702 Adjust its layout for info/notinfo.
20703 (Location Tracking Calc): Output error messages to stderr.
20704 Output locations in a more GNUtically correct way.
20705 Fix a couple of Englishos.
20706 Adjust @group/@end group pairs.
20708 2001-11-12 Akim Demaille <akim@epita.fr>
20710 %expect was not functioning at all.
20712 * src/conflicts.c (expected_conflicts): Set to -1.
20713 (conflict_report): Use ngettext.
20714 (conflicts_print): Check %expect and make its violation an error.
20715 * doc/bison.texinfo (Expect Decl): Adjust.
20716 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20717 * tests/regression.at (%expect not enough, %expect right)
20718 (%expect too much): New.
20720 2001-11-12 Akim Demaille <akim@epita.fr>
20722 * tests/regression.at (Conflicts): Rename as...
20723 (Unresolved SR Conflicts): this.
20724 (Solved SR Conflicts): New.
20726 2001-11-12 Akim Demaille <akim@epita.fr>
20728 * src/reduce.c (print_results): Rename as...
20729 (reduce_output): This.
20730 Output to OUT, passed as argument, instead of output_obstack.
20731 (dump_grammar): Likewise.
20732 (reduce_free): New.
20734 (reduce_grammar): No longer call reduce_output, since...
20735 * src/print.c (print_results): do it.
20736 * src/main.c (main): Call reduce_free;
20738 2001-11-12 Akim Demaille <akim@epita.fr>
20740 * src/conflicts.c (print_reductions): Accept OUT as argument.
20741 Output to it, not to output_obstack.
20742 * src/print.c (print_actions): Adjust.
20744 2001-11-12 Akim Demaille <akim@epita.fr>
20746 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20747 the result instead of using...
20748 (src_total, rrc_total, src_count, rrc_count): Remove.
20749 (any_conflicts): Remove.
20750 (print_conflicts): Split into...
20751 (conflicts_print, conflicts_output): New.
20752 * src/conflicts.h: Adjust.
20753 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20754 * src/print.c (print_grammar): Issue `\n' between two rules.
20755 * tests/regression.at (Conflicts): New.
20756 Reported by Tom Lane.
20758 2001-11-12 Akim Demaille <akim@epita.fr>
20760 * tests/regression.at (Invalid input): Remove, duplicate with
20761 ``Invalid input: 1''.
20763 2001-11-12 Akim Demaille <akim@epita.fr>
20765 * tests/torture.at (AT_DATA_STACK_TORTURE)
20766 (Exploding the Stack Size with Alloca)
20767 (Exploding the Stack Size with Malloc): New.
20769 2001-11-12 Akim Demaille <akim@epita.fr>
20771 * src/bison.simple (YYSTACK_REALLOC): New.
20772 (yyparse) [!yyoverflow]: Use it and free the old stack.
20773 Reported by Per Allansson.
20775 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20777 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20778 define CPP macro, which substitute YYSTYPE by yystype.
20779 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20780 with yyltype/YYLTYPE. This allows inclusion of the generated
20781 header within the parser if the compiler, such as GGC, accepts
20782 multiple equivalent #defines.
20785 2001-11-05 Akim Demaille <akim@epita.fr>
20787 * src/reader.c (symbols_output): New, extracted from...
20788 (packsymbols): here.
20791 2001-11-05 Akim Demaille <akim@epita.fr>
20793 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20795 2001-11-05 Akim Demaille <akim@epita.fr>
20797 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20800 2001-11-05 Akim Demaille <akim@epita.fr>
20802 * src/options.h (struct option_table_struct): set_flags is void*.
20803 * src/options.c (longopts): Support `--output' and `%output'.
20805 * src/lex.h (tok_setopt): Remove, replaced with...
20806 (tok_intopt, tok_stropt): these new guys.
20807 * src/lex.c (getopt.h): Not needed.
20808 (token_buffer, unlexed_token_buffer): Not const.
20809 (percent_table): Promote `-' over `_' in directive names.
20810 Active `%name-prefix', `file-prefix', and `output'.
20811 (parse_percent_token): Accept possible arguments to directives.
20812 Promote `-' over `_' in directive names.
20814 2001-11-04 Akim Demaille <akim@epita.fr>
20816 * doc/bison.texinfo (Decl Summary): Split the list into
20817 `directives for grammars' and `directives for bison'.
20819 Add description of `%name-prefix', `file-prefix', and `output'.
20820 Promote `-' over `_' in directive names.
20821 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20822 Simplify the description of `--name-prefix'.
20823 Promote `-' over `_' in directive names.
20824 Promote `--output' over `--output-file'.
20825 Fix the description of `--defines'.
20826 * tests/output.at: Exercise %file-prefix and %output.
20828 2001-11-02 Akim Demaille <akim@epita.fr>
20830 * doc/refcard.tex: Update.
20832 2001-11-02 Akim Demaille <akim@epita.fr>
20834 * src/symtab.h (SUNDEF): New.
20835 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20836 stand for `uninitialized', instead of 0.
20837 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20838 * src/lex.c (lex): Adjust.
20840 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20842 Let yylex return it instead of a plain 0.
20843 Reported by Dick Streefland.
20845 2001-11-02 Akim Demaille <akim@epita.fr>
20847 * tests/regression.at (Mixing %token styles): New test.
20849 2001-11-02 Akim Demaille <akim@epita.fr>
20851 * src/reader.c (parse_thong_decl): Formatting changes.
20852 (token_translations_init): New, extracted from...
20853 (packsymbols): Here.
20856 2001-11-01 Akim Demaille <akim@epita.fr>
20858 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20859 Check that `9foo.y' produces correct cpp guards.
20860 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20864 2001-11-01 Akim Demaille <akim@epita.fr>
20866 * tests/regression.at (Invalid input: 2): New.
20867 * src/lex.c (unlexed_token_buffer): New.
20868 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20872 2001-11-01 Akim Demaille <akim@epita.fr>
20874 * tests/calc.at: Catch up with 1.30.
20875 * configure.in: Bump to 1.49a.
20876 Adjust to newer Autotest.
20878 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
20880 * src/conflicts.c: Move global variables rrc_total and src_total ...
20881 (print_conflicts): here.
20882 * src/output.c (output): Free global variable user_toknums.
20883 * src/lex.c (token_obstack): Become static.
20885 2001-10-18 Akim Demaille <akim@epita.fr>
20887 * tests/atlocal.in (GCC): Add.
20888 * tests/calc.at: s/m4_match/m4_bmatch/.
20889 s/m4_patsubst/m4_bpatsubst/.
20890 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20891 * configure.in: AC_SUBST(GCC).
20893 2001-10-14 Marc Autret <autret_m@epita.fr>
20895 * src/options.c (create_long_option_table): Fix.
20897 2001-10-10 Akim Demaille <akim@epita.fr>
20899 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20901 2001-10-04 Akim Demaille <akim@epita.fr>
20903 * src/reader.c (parse_union_decl): Push the caracters in
20904 union_obstack, not attrs_obstack.
20906 2001-10-04 Akim Demaille <akim@epita.fr>
20908 Merge in the branch 1.29.
20910 * src/reader.c (packsymbols): Use a temporary obstack for
20911 `%%tokendef', since output_stack is already used elsewhere.
20913 2001-10-02 Akim Demaille <akim@epita.fr>
20917 2001-10-02 Akim Demaille <akim@epita.fr>
20921 2001-10-02 Akim Demaille <akim@epita.fr>
20923 * tests/regression.at (Invalid CPP headers): New.
20924 From Alexander Belopolsky.
20925 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20927 2001-10-02 Akim Demaille <akim@epita.fr>
20929 * tests/regression.at (Invalid input): New.
20930 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20933 2001-10-02 Akim Demaille <akim@epita.fr>
20935 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20937 2001-10-02 Akim Demaille <akim@epita.fr>
20939 * src/output.c (output_parser): Assert `skeleton'.
20940 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20944 2001-10-01 Marc Autret <autret_m@epita.fr>
20946 * src/lex.h: Echo modifications.
20947 * src/lex.c (unlex): Parameter is now token_t.
20950 2001-10-01 Marc Autret <autret_m@epita.fr>
20952 * src/main.c: Include lex.h.
20955 2001-09-29 Akim Demaille <akim@epita.fr>
20957 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20959 2001-09-28 Akim Demaille <akim@epita.fr>
20961 * tests/testsuite.at: Update to newer Autotest.
20962 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20964 2001-09-27 Akim Demaille <akim@epita.fr>
20966 Position independent wrapper.
20968 * tests/bison: Remove.
20969 * tests/bison.in: New.
20970 * configure.in: Adjust.
20972 2001-09-27 Paul Eggert <eggert@twinsun.com>
20974 Port quotearg fixes from tar 1.13.24.
20976 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20978 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20979 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20981 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20982 * m4/mbrtowc.m4: New file.
20983 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20984 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20986 2001-09-27 Akim Demaille <akim@epita.fr>
20990 2001-09-27 Akim Demaille <akim@epita.fr>
20994 2001-09-25 Akim Demaille <akim@epita.fr>
20996 * src/system.h: Include `xalloc.h'.
20997 Remove it from the C files.
20998 * src/files.c (output_files): Free the obstacks.
20999 * src/lex.c (init_lex): Rename as...
21002 * src/main.c (main): Use it.
21004 2001-09-24 Marc Autret <autret_m@epita.fr>
21006 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
21007 to output informations in fout (FILE*).
21008 (open_graph, close_graph): Likewise.
21009 (output_graph, output_edge, output_node): Likewise.
21010 * src/vcg.h: Update function prototypes.
21011 * src/print_graph.c (print_graph): Open output graph file.
21012 (print_actions): Adjust.
21013 * src/files.h: Remove extern declaration.
21014 * src/files.c: Remove graph_obstack declaration.
21015 (open_files): Remove graph_obstack initialization.
21016 (output_files): Remove graph_obstack saving.
21018 2001-09-24 Marc Autret <autret_m@epita.fr>
21020 * src/files.c (compute_output_file_names): Fix.
21022 2001-09-24 Marc Autret <autret_m@epita.fr>,
21023 Akim Demaille <akim@epita.fr>
21025 * src/reader.c (reader): Remove call to free_symtab ().
21026 * src/main.c (main): Call it here.
21028 * src/conflicts.c (initialize_conflicts): Rename as...
21029 (solve_conflicts): this.
21030 * src/print.c (print_core, print_actions, print_state)
21031 (print_grammar): Dump to a file instead a `output_obstack'.
21032 (print_results): Dump `output_obstack', and then proceed with the
21034 * src/files.c (compute_output_file_names, close_files): New.
21035 (output_files): Adjust.
21036 * src/main.c (main): Adjust.
21038 2001-09-23 Marc Autret <autret_m@epita.fr>
21040 * src/files.c (compute_header_macro): Computes header macro name
21041 from spec_defines_file when given.
21043 2001-09-23 Marc Autret <autret_m@epita.fr>
21045 * src/files.c (output_files): Add default extensions.
21047 2001-09-22 Akim Demaille <akim@epita.fr>
21049 * src/conflicts.c (finalize_conflicts): Rename as...
21050 (free_conflicts): this.
21052 2001-09-22 Akim Demaille <akim@epita.fr>
21054 * src/gram.c (gram_free): Rename back as...
21056 (output_token_translations): Free `token_translations'.
21057 * src/symtab.c (free_symtab): Free the tag field.
21059 2001-09-22 Akim Demaille <akim@epita.fr>
21061 Remove `translations' as it is always set to true.
21063 * src/gram.h: Adjust.
21064 * src/reader.c (packsymbols, parse_token_decl): Adjust
21065 * src/print.c (print_grammar): Adjust.
21066 * src/output.c (output_token_translations): Adjust.
21067 * src/lex.c (lex): Adjust.
21068 * src/gram.c: Be sure the set pointers to NULL.
21069 (dummy): Rename as...
21072 2001-09-22 Akim Demaille <akim@epita.fr>
21074 * configure.in: Invoke AM_LIB_DMALLOC.
21075 * src/system.h: Use dmalloc.
21076 * src/LR0.c: Be sure to have pointers initialized to NULL.
21077 (allocate_itemsets): Allocate kernel_items only if needed.
21079 2001-09-22 Akim Demaille <akim@epita.fr>
21081 * configure.in: Bump to 1.29b.
21082 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21083 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21084 need xmalloc.c in calc.y.
21087 2001-09-21 Akim Demaille <akim@epita.fr>
21090 * Makefile.maint, config/config.guess, config/config.sub,
21091 * config/missing: Update from masters.
21092 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21094 * configure.in (ALL_LINGUAS): Add `tr'.
21096 2001-09-21 Akim Demaille <akim@epita.fr>
21098 * tests/Makefile.am (package.m4): Move to...
21099 ($(srcdir)/$(TESTSUITE)): here.
21101 2001-09-20 Akim Demaille <akim@epita.fr>
21103 * src/complain.c: No longer try to be standalone: use system.h.
21104 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21105 * src/complain.h: Likewise.
21106 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21107 Remove the unused variable `n'.
21108 From Albert Chin-A-Young.
21110 2001-09-18 Marc Autret <autret_m@epita.fr>
21112 * doc/bison.1: Update.
21113 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21115 (Option Cross Key): Update.
21118 2001-09-18 Marc Autret <autret_m@epita.fr>
21120 * tests/regression.at: New test (comment in %union).
21122 2001-09-18 Marc Autret <autret_m@epita.fr>
21124 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21126 Reported by Keith Browne.
21128 2001-09-18 Marc Autret <autret_m@epita.fr>
21130 * tests/output.at: Add tests for --defines and --graph.
21132 2001-09-18 Marc Autret <autret_m@epita.fr>
21134 * tests/output.at: Removes tests of %{header,src}_extension features.
21136 2001-09-18 Akim Demaille <akim@epita.fr>
21138 * tests/Makefile.am (package.m4): New.
21139 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21140 (_AT_CHECK_CALC_ERROR): Likewise.
21141 Factor the `, ' part of verbose error messages.
21143 2001-09-18 Marc Autret <autret_m@epita.fr>
21145 * src/getargs.c (longopts): Declare --defines and --graph as options
21146 with optional arguments.
21147 * src/files.h: Add extern declarations.
21148 * src/files.c (spec_graph_file, spec_defines_file): New.
21149 (output_files): Update.
21150 Remove CPP-outed code.
21152 2001-09-18 Marc Autret <autret_m@epita.fr>
21154 Turn off %{source,header}_extension feature.
21156 * src/files.c (compute_exts_from_gf): Update.
21157 (compute_exts_from_src): Update.
21158 (output_files): CPP-out useless code.
21159 * src/files.h: Remove {header,source}_extension extern declarations.
21160 * src/reader.c (parse_dquoted_param): CPP-out.
21161 (parse_header_extension_decl): Remove.
21162 (parse_source_extension_decl): Remove.
21163 (read_declarations): Remove cases tok_{hdrext,srcext}.
21164 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21165 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21167 2001-09-10 Akim Demaille <akim@epita.fr>
21169 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21170 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21171 (AT_CHECK_OUTPUT): this.
21172 Merely check ls' exit status, its output is useless.
21174 2001-09-10 Akim Demaille <akim@epita.fr>
21176 * tests/calc.at: Use m4_match.
21177 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21179 2001-09-10 Marc Autret <autret_m@epita.fr>,
21180 Akim Demaille <akim@epita.fr>
21182 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21184 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21186 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21187 * src/lex.h: Adjust prototype.
21188 (token_t): Add `tok_undef'.
21189 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21190 (parse_percent_token): Now returns token_t.
21191 Add default statement in switch.
21192 (lex): Separate `c' as an input variable, from the token_t result
21194 (unlexed): Is a token_t.
21196 2001-09-10 Akim Demaille <akim@epita.fr>
21198 * configure.in: Bump to 1.29a.
21200 2001-09-07 Akim Demaille <akim@epita.fr>
21204 2001-08-30 Akim Demaille <akim@epita.fr>
21206 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21207 * m4/atconfig.m4: Remove.
21208 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21209 * tests/bison: New.
21210 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21211 m4_if, m4_patsubst, and m4_regexp.
21212 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21213 `input' file instead of echo.
21215 2001-08-29 Akim Demaille <akim@epita.fr>
21219 2001-08-29 Akim Demaille <akim@epita.fr>
21223 2001-08-29 Paul Eggert <eggert@twinsun.com>
21225 * src/bison.simple (yyparse): Don't take the address of an
21226 item before the start of an array, as that doesn't conform to
21229 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21231 * doc/bison.texinfo (Location Tracking Calc): New node.
21233 2001-08-29 Paul Eggert <eggert@twinsun.com>
21235 * src/output.c (output): Do not define const, as this now
21236 causes more problems than it cures.
21238 2001-08-29 Akim Demaille <akim@epita.fr>
21240 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21242 Be sure to tag the `detailmenu'.
21244 2001-08-29 Akim Demaille <akim@epita.fr>
21246 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21247 download in a tmp dir.
21249 2001-08-28 Marc Autret <autret_m@epita.fr>
21251 * config/depcomp: New file.
21253 2001-08-28 Marc Autret <autret_m@epita.fr>
21255 * doc/bison.1 (mandoc): Adjust.
21256 From Juan Manuel Guerrero.
21258 2001-08-28 Marc Autret <autret_m@epita.fr>
21260 * src/print_graph.c (print_state): Fix.
21262 2001-08-27 Marc Autret <autret_m@epita.fr>
21264 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21266 Echo modifications to the functions prototypes.
21267 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21269 2001-08-27 Marc Autret <autret_m@epita.fr>
21271 * src/vcg.c: Include `xalloc.h'.
21272 (add_colorentry): New.
21273 (add_classname): New.
21274 (add_infoname): New.
21275 * src/vcg.h: Add new prototypes.
21277 2001-08-27 Akim Demaille <akim@epita.fr>
21279 * Makefile.maint: Sync. again with CVS Autoconf.
21281 2001-08-27 Akim Demaille <akim@epita.fr>
21283 * Makefile.maint: Formatting changes.
21284 (po-update, cvs-update, update): New targets.
21287 2001-08-27 Akim Demaille <akim@epita.fr>
21289 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21290 * Makefile.maint: Sync. with CVS Autoconf.
21292 2001-08-27 Marc Autret <autret_m@epita.fr>
21294 * src/vcg.h (struct infoname_s): New.
21295 (struct colorentry_s): New.
21296 (graph_s): New fields {vertical,horizontal}_order in structure.
21297 Add `infoname' field.
21298 Add `colorentry' field;
21299 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21300 (G_HORIZONTAL_ORDER): New.
21302 (G_COLORENTRY): New.
21303 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21304 Add output of `infoname'.
21305 Add output of `colorentry'.
21307 2001-08-27 Marc Autret <autret_m@epita.fr>
21309 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21310 This one shadowed a global parameter.
21312 2001-08-24 Marc Autret <autret_m@epita.fr>
21314 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21315 instead of `unsigned'.
21316 (print_state): Do not call obstack_object_size () in obstack_grow ()
21317 to avoid macro variables shadowing.
21319 2001-08-23 Marc Autret <autret_m@epita.fr>
21321 * src/lex.c (percent_table): Typo: s/naem/name/.
21323 Normalize new options declarations.
21325 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21327 * tests/suite.at: Exercise %header_extension and %source_extension.
21329 2001-08-16 Marc Autret <autret_m@epita.fr>
21331 * src/reader.c (parse_dquoted_param): New.
21332 (parse_header_extension_decl): Use it.
21333 (parse_source_extension_decl): Likewise.
21335 2001-08-16 Marc Autret <autret_m@epita.fr>
21337 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21338 (get_xxxx_str): Use assert () instead of complain ().
21339 Remove return invokations in default cases.
21340 (get_decision_str): Modify default behaviour. Remove second argument.
21341 Echo modifications on calls.
21342 (output_graph): Fix.
21344 2001-08-16 Marc Autret <autret_m@epita.fr>
21346 * src/getargs.c (usage): Update with ``-g, --graph''.
21348 2001-08-16 Marc Autret <autret_m@epita.fr>
21350 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21351 (Option Cross Key): Likewise.
21352 * doc/bison.1: Update.
21354 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
21356 * src/output.c (output_master_parser): Don't finish action_obstack.
21357 (output_parser): Don't care about the muscle action, here.
21358 (prepare): Copy the action_obstack in the action muscle.
21359 (output): Free action_obstack.
21361 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21363 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21364 will contain `%union' declaration.
21365 (parse_union_decl): Delete #line directive output.
21366 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21367 informations about %union.
21368 (parse_union_decl): Copy the union_obstack in the muscle stype.
21369 * src/bison.simple: Add new #line directive.
21370 Add typdef %%stype YYSTYPE.
21372 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21374 * src/bison.simple: Add new `#line' directive.
21376 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
21378 * src/bison.simple: New `#line' directive.
21379 * src/output.c (output_parser): Support new dynamic muscle input_line.
21381 2001-09-22 Marc Autret <autret_m@epita.fr>
21383 * src/output.c (output_master_parser): New.
21384 (output_parser): Be more re-entrant.
21386 2001-09-21 Marc Autret <autret_m@epita.fr>
21388 * src/reader.c (copy_definition, parse_union_decl): Update and use
21390 (copy_action): Likewise.
21391 Use obstack_1grow ().
21392 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21394 2001-09-21 Marc Autret <autret_m@epita.fr>
21396 * src/options.c (option_table): Adjust.
21397 * src/lex.c (parse_percent_token): Fix.
21399 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21401 * src/options.c (symtab.h): Include it, need by lex.h.
21403 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21405 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21406 is now an option_table_struct*.
21407 (option_strcmp): New function option_strcmp.
21408 (parse_percent_token): Call option_strcmp.
21409 * src/getargs.c (xalloc.h, options.h): Include it.
21410 (getargs): Call create_long_option_table.
21411 (getargs): Free longopts at the end of the function.
21412 (shortopts): Move in options.c.
21413 * src/options.c (create_long_option_table): New function. Convert
21414 information from option_table to option structure.
21415 * src/reader.c (options.h): Include it.
21417 * src/Makefile.am: Adjust.
21418 * src/options.c (option_table): Create from longopts and percent_table.
21419 * src/getargs.c (longopts): Delete.
21420 * src/lex.c (struct percent_table_struct): Delete.
21421 (percent_table): Delete.
21422 (options.h): Include it.
21423 * src/options.c: Create.
21424 * src/options.h: Create.
21425 Declare enum opt_access_e.
21426 Define struct option_table_struct.
21428 2001-09-20 Marc Autret <autret_m@epita.fr>
21430 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21433 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
21435 * src/bison.simple: s/%%filename/%%skeleton.
21436 * src/muscle_tab.c (getargs.h): Include it.
21437 (muscle_init): Insert new muscle skeleton.
21439 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
21441 * src/output.c (output_parser): Delete unused variable actions_dumped.
21443 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
21445 * src/output.c (output): Delete call to reader_output_yylsp.
21446 * src/reader.c (reader): Likewise.
21447 * src/reader.h: Delete declaration of reader_output_yylsp.
21449 2001-09-02 Marc Autret <autret_m@epita.fr>
21451 * src/reader.c: Include muscle_tab.h.
21452 (parse_union_decl): Update.
21453 (parse_macro_decl): Rename parse_muscle_decl.
21454 Update to use renamed functions and variable.
21455 (read_declarations, copy_action, read_additionnal_code, : Updated
21456 with correct variables and functions names.
21457 (packsymbols, reader): Likewise.
21459 * src/reader.h (muscle_obstack): Extern declaration update.
21461 * src/output.c: Include muscle_tab.h
21462 In all functions using macro_insert, change by using muscle_insert ().
21463 (macro_obstack): Rename muscle_obstack.
21464 Echo modifications in the whole file.
21465 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21466 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21467 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21469 * src/muscle_tab.h: Update double inclusion macros.
21470 (macro_entry_s): Rename muscle_entry_s.
21473 * src/muscle_tab.c: Include muscle_tab.h.
21474 Rename macro_tabble to muscle_table.
21475 (mhash1, mhash2, mcmp): Use muscle_entry.
21476 (macro_init): Rename muscle_init. Update.
21477 (macro_insert): Rename muscle_insert. Update.
21478 (macro_find): Rename muscle_find. Update.
21480 * src/main.c: Include muscle_tab.h.
21481 (main): Call muscle_init ().
21482 * src/Makefile.am (bison_SOURCES): Echo modifications.
21484 2001-09-02 Marc Autret <autret_m@epita.fr>
21486 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21488 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21490 2001-09-02 Marc Autret <autret_m@epita.fr>
21492 * src/macrotab.c, src/macrotab.h: Remove.
21494 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
21496 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21499 2001-09-01 Marc Autret <autret_m@epita.fr>
21501 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21502 to an explicit value to activate the feature. We do it here.
21504 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21506 * src/output.c (prepare): Delete the `filename' muscule insertion.
21507 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21508 (parse_union_decl): Likewise.
21509 * src/macrotab.c (macro_init): Initialize filename by infile.
21511 2001-08-31 Marc Autret <autret_m@epita.fr>
21513 * src/bison.simple (YYLSP_NEEDED): New definition.
21514 * src/output.c (prepare): Add macro insertion of `locations_flag'
21516 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21518 * src/output.c (prepare): Delete insertion of previous muscles,
21519 and insert the `prefix' muscles.
21520 * src/macrotab.c (macro_init): Likewise.
21521 (macro_init): Initialization prefix directive by `yy'.
21522 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21523 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21524 yylval, yydebug, yyerror, yynerrs and yyparse.
21525 New directive `#define' to substitute yydebug, ... with option
21528 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21530 * src/main.c (main): Standardize.
21531 * src/output.c (output_table_data, output_parser): Likewise.
21532 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21534 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21536 * src/reader.c (read_additionnal_code): Rename %%user_code to
21538 * src/output.c (output): Rename %%declarations to %%prologue.
21539 * src/bison.simple: Echo modifications.
21541 2001-08-31 Marc Autret <autret_m@epita.fr>
21543 * src/reader.c (readgram): CleanUp.
21544 (output_token_defines): Likewise.
21545 (packsymbols): Likewise.
21546 (reader): Likewise.
21547 * src/output.c (output): CPP-out useless code.
21549 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21551 * src/reader.c (reader): Delete obsolete call to function
21552 output_trailers and output_headers.
21553 * src/output.h: Remove obsolete functions prototypes of output_headers
21554 and output_trailers.
21556 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
21558 * src/main.c: Include macrotab.h.
21559 * src/macrotab.h (macro_entry_s): Constify fields.
21560 Adjust functions prototypes.
21561 * src/macrotab.c (macro_insert): Constify key and value.
21562 (macro_find): Constify key.
21563 (macro_insert): Include 'xalloc.h'
21564 (macro_insert): Use XMALLOC.
21565 (macro_find): Constify return value.
21566 * src/output.c (output_table_data): Rename table to table_data.
21567 (output_parser): Constify macro_key, macro_value.
21569 2001-08-30 Marc Autret <autret_m@epita.fr>
21571 * src/reader.c (parse_skel_decl): New.
21572 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21573 * src/lex.h (token_t): New token `tok_skel'.
21574 * src/lex.c (percent_table): Add skeleton option entry.
21577 2001-08-29 Marc Autret <autret_m@epita.fr>
21579 * src/bison.simple: Add %%user_code directive at the end.
21580 * src/reader.c (read_additionnal_code): New.
21582 * src/output.c (output_program): Remove.
21585 2001-08-28 Marc Autret <autret_m@epita.fr>
21587 * src/output.c (output_actions): Clean up.
21588 (output_gram): CPP-out useless code.
21589 * src/reader.c (reader): Clean up, CPP-out useless code.
21591 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
21593 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21595 * src/bison.simple: Add `%%definitions'.
21597 2001-08-28 Marc Autret <autret_m@epita.fr>
21599 * config/depcomp: New file.
21601 2001-08-27 Paul Eggert <eggert@twinsun.com>
21603 * src/bison.simple (yyparse): Don't take the address of an
21604 item before the start of an array, as that doesn't conform to
21607 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21609 * src/output.c (output): Remove the initialization of the macro
21610 obstack. It was done too late here.
21612 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21614 (reader): Initialize the macro obstack here, since we need it to grow
21615 '%define' directives.
21617 * src/reader.h: Declare the macro obstack as extern.
21619 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21621 * src/output.c (output_parser): Fix. Store single '%' characters in
21622 the output obstack instead of throwing them away.
21624 2001-08-27 Akim Demaille <akim@epita.fr>
21626 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21628 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21630 * lib/Makefile.am: Adjust.
21632 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21634 * src/bison.simple: Update and add '%%' directives.
21636 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21638 * src/reader.c (reader): Remove calls to 'output_headers' and
21639 'output_trailers'. Remove some C output.
21640 (readgram): Disable a piece of code that was writing a default
21641 definition for 'YYSTYPE'.
21642 (reader_output_yylsp): Remove.
21643 (packsymbols): Output token defintions to a macro.
21644 (copy_definition): Disable C output.
21646 * src/reader.c (parse_macro_decl): New function used to parse macro
21648 (copy_string2): Put the body of copy_string into this new function.
21649 Add a parameter to let the caller choose whether he wants to copy the
21650 string delimiters or not.
21651 (copy_string): Be a simple call to copy_string2 with the last argument
21653 (read_declarations): Add case for macro definition.
21654 (copy_identifier): New.
21655 (parse_macro_decl): Read macro identifiers using copy_identifier
21658 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21660 * src/output.c (prepare): Add prefixed names.
21661 (output_parser): Output semantic actions.
21662 (output_parser): Fix bug on '%%line' directives.
21664 * src/output.c (output_headers): Remove. The C code printed by this
21665 function should now be in the skeletons.
21666 (output_trailers): Remove.
21667 (output): Disable call to 'reader_output_yylsp'.
21668 (output_rule_data): Do not output tables to the table obstack.
21670 * src/output.c: Remove some C dedicated output.
21671 Improve the use of macro and output obstacks.
21672 (output_defines): Remove.
21674 * src/output.c (output_token_translations): Associate 'translate'
21675 table with a macro. No output to the table obstack.
21676 (output_gram): Same for 'rhs' and 'prhs'.
21677 (output_stos): Same for 'stos'.
21678 (output_rule_data): Same for 'r1' and 'r2'.
21679 (token_actions): Same for 'defact'.
21680 (goto_actions): Same for 'defgoto'.
21681 (output_base): Same for 'pact' and 'pgoto'.
21682 (output_table): Same for 'table'.
21683 (output_check): Same for 'check'.
21685 * src/output.c (output_table_data): New function.
21686 (output_short_table): Remove.
21687 (output_short_or_char_table): Remove.
21689 * src/output.c (output_parser): Replace most of the skeleton copy code
21690 with something new. Skeletons are now processed character by character
21691 rather than line by line, and Bison looks for '%%' macros. This is the
21692 first step in making Bison's output process (a lot) more flexible.
21693 (output_parser): Use the macro table.
21695 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21697 * src/main.c (main): Initialize the macro table.
21699 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21701 * src/lex.c (percent_table): Add tok_define.
21702 * src/lex.h: Add tok_define.
21704 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21706 * src/macrotab.c: New file.
21707 * src/macrotab.h: New file.
21708 * src/Makefile.am: Update.
21710 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21712 * lib/hash.c: New file.
21713 * lib/hash.h: New file.
21714 * lib/Makefile.am: Update.
21716 2001-08-15 Akim Demaille <akim@epita.fr>
21720 2001-08-15 Marc Autret <autret_m@epita.fr>
21722 * src/reader.c (readgram): Indent output macro YYSTYPE.
21723 (packsymbols): Likewise.
21724 (output_token_defines): Likewise.
21725 * src/files.c: Standardize.
21726 (compute_header_macro): New.
21727 (defines_obstack_save): New. Use compute_header_macro.
21728 (output_files): Update. Use defines_obstack_save.
21730 2001-08-15 Akim Demaille <akim@epita.fr>
21732 * doc/bison.texinfo (Table of Symbols): Document
21733 YYSTACK_USE_ALLOCA.
21735 2001-08-15 Akim Demaille <akim@epita.fr>
21737 * missing: Update from CVS Automake.
21738 * config/config.guess, config/config.sub, config/texinfo.tex:
21739 Update from gnu.org.
21741 2001-08-15 Akim Demaille <akim@epita.fr>
21743 * Makefile.maint: Sync with CVS Autoconf.
21745 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21747 * doc/bison.texinfo: Include GNU Free Documentation License from
21749 * doc/fdl.texi: Add to package.
21751 2001-08-14 Marc Autret <autret_m@epita.fr>
21753 Turn on %{source,header}_extension features.
21755 * src/lex.c (percent_table): Un-CPP out header_extension and
21757 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21758 (compute_exts_from_src): Remove conditions. It restores priorities
21761 2001-08-14 Marc Autret <autret_m@epita.fr>
21763 * src/files.c (compute_base_names): Add extensions computing when
21764 `--file-prefix' used.
21765 Standardize function calls.
21767 2001-08-13 Marc Autret <autret_m@epita.fr>
21769 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21770 defining it (defined but null disables alloca).
21772 2001-08-13 Marc Autret <autret_m@epita.fr>
21774 * src/bison.simple (_yy_memcpy): CPP reformat.
21776 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21778 * tests/atconfig.in (CPPFLAGS): Fix.
21780 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21782 * doc/bison.texinfo: Include GNU General Public License from
21784 * doc/gpl.texi: Add to package.
21786 2001-08-10 Marc Autret <autret_m@epita.fr>
21788 * src/print_graph.h: Fix.
21789 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21791 2001-08-10 Akim Demaille <akim@epita.fr>
21793 * src/system.h: Provide default declarations for stpcpy, strndup,
21796 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21798 * doc/bison.texinfo (Locations): Update @$ stuff.
21800 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21802 * src/bison.simple (YYLLOC_DEFAULT): Update.
21805 2001-08-08 Marc Autret <autret_m@epita.fr>
21807 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21808 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21809 Reported by Fabrice Bauzac.
21811 2001-08-08 Marc Autret <autret_m@epita.fr>
21813 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21814 * src/vcg.c (output_node): Fix.
21815 * src/vcg.h: Cleanup.
21816 * src/print_graph.c: Add comments.
21817 (node_output_size): New global variable. Simplify the formatting of
21818 the VCG graph output.
21819 (print_actions): Unused code is now used. It notifies the final state
21820 and no action states in the VCG graph. It also give the reduce actions.
21821 The `shift and goto' edges are red and the `go to state' edges are
21823 Get the current node name and node_obstack by argument.
21824 (node_obstack): New variable.
21825 (print_state): Manage node_obstack.
21826 (print_core): Use node_obstack given by argument.
21827 A node is not only computed here but in print_actions also.
21828 (print_graph): CPP out useless code instead of commenting it.
21830 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
21832 * tests/atconfig.in (CPPFLAGS): Fix.
21834 2001-08-07 Akim Demaille <akim@epita.fr>
21836 * src/print_graph.c (quote): New.
21837 (print_core): Use it.
21839 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21841 * src/vcg.c (complain.h): Include it.
21842 Unepitaize `return' invocations.
21843 [NDEBUG] (main): Remove.
21844 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21845 * src/files.c (open_files): Initialize graph_obstack.
21846 * src/print_graph.c (print_actions): CPP out useless code.
21847 (print_core): Don't output the last `\n' in labels.
21849 * src/files.c (output_files): Output the VCG file.
21850 * src/main.c (main): Invoke print_graph ();
21852 2001-08-06 Marc Autret <autret_m@epita.fr>
21854 Automaton VCG graph output.
21855 Using option ``-g'' or long option ``--graph'', you can generate
21856 a gram_filename.vcg file containing a VCG description of the LALR (1)
21857 automaton of your grammar.
21859 * src/main.c: Call to print_graph() function.
21860 * src/getargs.h: Update.
21861 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21862 (graph_flag): New flag.
21863 (longopts): Update.
21864 (getargs): Add case `g'.
21865 * src/files.c (graph_obstack): New obstack struct.
21866 (open_files): Initialize new obstack.
21867 (output_files): Saves graph_obstack if required.
21868 * src/files.h (graph_obstack): New extern declaration.
21869 * src/Makefile.am: Add new source files.
21871 2001-08-06 Marc Autret <autret_m@epita.fr>
21873 * src/print_graph.c, src/print_graph.h (graph): New.
21874 * src/vcg.h: New file.
21875 * src/vcg.c: New file, VCG graph handling.
21877 2001-08-06 Marc Autret <autret_m@epita.fr>
21879 Add of %source_extension and %header_extension which specify
21880 the source or/and the header output file extension.
21882 * src/files.c (compute_base_names): Remove initialisation of
21883 src_extension and header_extension.
21884 (compute_exts_from_gf): Update.
21885 (compute_exts_from_src): Update.
21886 (output_files): Update.
21887 * src/reader.c (parse_header_extension_decl): New.
21888 (parse_source_extension_decl): New.
21889 (read_declarations): New case statements for the new tokens.
21890 * src/lex.c (percent_table): Add entries for %source_extension
21891 and %header_extension.
21892 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21894 2001-08-06 Marc Autret <autret_m@epita.fr>
21896 * configure.in: Bump to 1.28c.
21897 * doc/bison.texinfo: Texinfo thingies.
21899 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
21901 * tests/atconfig.in (CPPFLAGS): Add.
21902 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21904 2001-08-03 Akim Demaille <akim@epita.fr>
21908 2001-08-03 Akim Demaille <akim@epita.fr>
21910 * tests/Makefile.am (check-local): Ship testsuite.
21911 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21912 Include `string.h'.
21914 2001-08-03 Akim Demaille <akim@epita.fr>
21916 * configure.in: Try using -Wformat when compiling.
21918 2001-08-03 Akim Demaille <akim@epita.fr>
21920 * configure.in: Bump to 1.28b.
21922 2001-08-03 Akim Demaille <akim@epita.fr>
21924 * src/complain.c: Adjust strerror_r portability issues.
21926 2001-08-03 Akim Demaille <akim@epita.fr>
21930 2001-08-03 Akim Demaille <akim@epita.fr>
21932 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21933 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21934 * src/getargs.c: Include complain.h.
21935 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21936 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21938 2001-08-03 Akim Demaille <akim@epita.fr>
21940 * src/reader.c (readgram): Display hidden chars in error messages.
21942 2001-08-03 Akim Demaille <akim@epita.fr>
21944 Update to gettext 0.10.39.
21946 2001-08-03 Akim Demaille <akim@epita.fr>
21948 * lib/strspn.c: New.
21950 2001-08-01 Marc Autret <autret_m@epita.fr>
21952 * doc/bison.texinfo: Update.
21953 * doc/bison.1 (mandoc): Update.
21954 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21955 * src/files.c: Support output files extensions computing.
21956 (src_extension): New static variable.
21957 (header_extension): New static variable.
21958 (tr): New function.
21959 (get_extension_index): New function, gets the index of an extension
21960 filename in a string.
21961 (compute_exts_from_gf): New function, computes extensions from the
21962 grammar file extension.
21963 (compute_exts_from_src): New functions, computes extensions from the
21964 C source file extension, file given by ``-o'' option.
21965 (compute_base_names): Update.
21966 (output_files): Update.
21968 2001-08-01 Robert Anisko <anisko_r@epita.fr>
21970 * doc/bison.texi: Document @$.
21971 (Locations): New section.
21973 2001-07-18 Akim Demaille <akim@epita.fr>
21975 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21976 * config/prev-version.txt, config/move-if-change: New.
21977 * Makefile.am: Adjust.
21979 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
21981 * src/bison.simple (yyparse): Suppress warning `comparaison
21982 between signed and unsigned'.
21984 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
21986 * src/getargs.h (raw_flag): Remove.
21987 * src/getargs.c: Die on `-r'/`--raw'.
21988 * src/lex.c (parse_percent_token): Die on `%raw'.
21989 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21990 * tests/calc.at: Suppress test with option `--raw'.
21992 2001-07-14 Akim Demaille <akim@epita.fr>
21995 * configure.in: Require Autoconf 2.50.
21996 Update to gettext 0.10.38.
21998 2001-03-16 Akim Demaille <akim@epita.fr>
22000 * doc/bison.texinfo: ANSIfy the examples.
22002 2001-03-16 Akim Demaille <akim@epita.fr>
22004 * getargs.c (skeleton): New variable.
22005 (longopts): --skeleton is a new option.
22006 (shortopts, getargs): -S is a new option.
22007 * getargs.h: Declare skeleton.
22008 * output.c (output_parser): Use it.
22010 2001-03-16 Akim Demaille <akim@epita.fr>
22012 * m4/strerror_r.m4: New.
22013 * m4/error.m4: Run AC_FUNC_STRERROR_R.
22014 * lib/error.h, lib/error.c: Update.
22016 2001-03-16 Akim Demaille <akim@epita.fr>
22018 * src/getargs.c (longopts): Clean up.
22020 2001-02-21 Akim Demaille <akim@epita.fr>
22022 * src/reader.c (gensym): `gensym_count' is your own.
22023 Use a static buf to create the symbol name, as token_buffer is no
22026 2001-02-08 Akim Demaille <akim@epita.fr>
22028 * src/conflicts.c (conflict_report): Be sure not to append to res
22029 between two calls, which could happen if both first sprintf were
22030 skipped, but not the first cp += strlen.
22032 2001-02-08 Akim Demaille <akim@epita.fr>
22034 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22035 New, from fileutils 4.0.37.
22036 * configure.in: Require Autoconf 2.49c. I took some time before
22037 making this decision. This is the only way out for portability
22038 issues in Bison, it would mean way too much duplicate effort to
22039 import in Bison features implemented in 2.49c since 2.13.
22040 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22042 2001-02-02 Akim Demaille <akim@epita.fr>
22044 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
22045 * lib/xalloc.h, lib/xmalloc.c: Update.
22047 2001-01-19 Akim Demaille <akim@epita.fr>
22049 Get rid of the ad hoc handling of token_buffer in the scanner: use
22052 * src/lex.c (token_obstack): New.
22053 (init_lex): Initialize it. No longer call...
22054 (grow_token_buffer): this. Remove it.
22055 Adjust all the places which used it to use the obstack.
22057 2001-01-19 Akim Demaille <akim@epita.fr>
22059 * src/lex.h: Rename all the tokens:
22060 s/\bENDFILE\b/tok_eof/g;
22061 s/\bIDENTIFIER\b/tok_identifier/g;
22063 Let them be enums, not #define, to ease debugging.
22064 Adjust all the code.
22066 2001-01-18 Akim Demaille <akim@epita.fr>
22068 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22069 * src/lex.c (maxtoken, grow_token_buffer): Static.
22071 2001-01-18 Akim Demaille <akim@epita.fr>
22073 Since we now use obstacks, more % directives can be enabled.
22075 * src/lex.c (percent_table): Also accept `%yacc',
22076 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22078 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22079 instead of returning a token.
22080 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22081 * src/reader.c (read_declarations): Adjust.
22082 * src/files.c (open_files): Don't call `compute_base_names', don't
22083 compute `attrsfile' since they depend upon data which might be
22084 *in* the input file now.
22085 (output_files): Do it here.
22086 * src/output.c (output_headers): Document the fact that this patch
22087 introduces a guaranteed SEGV for semantic parsers.
22088 * doc/bison.texinfo: Document them.
22089 * tests/suite.at: Exercise these %options.
22091 2000-12-20 Akim Demaille <akim@epita.fr>
22093 Also handle the output file (--verbose) with obstacks.
22095 * files.c (foutput): Remove.
22096 (output_obstack): New.
22097 Adjust all dependencies.
22098 * src/conflicts.c: Return a string.
22099 * src/system.h (obstack_grow_string): Rename as...
22100 (obstack_sgrow): this. Be ready to work with non literals.
22101 (obstack_fgrow4): New.
22103 2000-12-20 Akim Demaille <akim@epita.fr>
22105 * src/files.c (open_files): Fix the computation of short_base_name
22106 in the case of `-o foo.tab.c'.
22108 2000-12-20 Akim Demaille <akim@epita.fr>
22110 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22111 (copy_dollar): Now that everything uses obstacks, get rid of the
22114 2000-12-20 Akim Demaille <akim@epita.fr>
22116 * src/files.c (open_files): Actually the `.output' file is based
22117 on the short_base_name, not base_name.
22118 * tests/suite.at (Checking output file names): Adjust.
22120 2000-12-20 Akim Demaille <akim@epita.fr>
22122 * src/bison.s1: Remove, we now use directly...
22123 * src/bison.simple: this.
22124 * src/Makefile.am: Use pkgdata instead of data.
22126 2000-12-20 Akim Demaille <akim@epita.fr>
22128 * src/files.c (guard_obstack): New.
22129 (open_files): Initialize it.
22130 (output_files): Dump it...
22131 * src/files.h: Export it.
22132 * src/reader.c (copy_guard): Use it.
22134 2000-12-19 Akim Demaille <akim@epita.fr>
22136 * src/files.c (outfile, defsfile, actfile): Removed as global
22138 (open_files): Don't compute them.
22139 (output_files): Adjust.
22140 (base_name, short_base_name): Be global.
22141 Adjust dependencies.
22143 2000-12-19 Akim Demaille <akim@epita.fr>
22145 * src/files.c (strsuffix): New.
22146 (stringappend): Be just like strcat but allocate.
22147 (base_names): Eve out from open_files.
22148 Try to simplify the rather hairy computation of base_name and
22150 (open_files): Use it.
22151 * tests/suite.at (Checking output file names): New test.
22153 2000-12-19 Akim Demaille <akim@epita.fr>
22155 * src/system.h (obstack_grow_literal_string): Rename as...
22156 (obstack_grow_string): this.
22157 * src/output.c (output_parser): Recognize `%% actions' instead of
22159 * src/bison.s1: s/$/%% actions/.
22160 * src/bison.hairy: Likewise.
22162 2000-12-19 Akim Demaille <akim@epita.fr>
22164 * src/output.c (output_parser): Compute the `#line' lines when
22166 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22167 Suggested by Hans Aberg.
22169 2000-12-19 Akim Demaille <akim@epita.fr>
22171 Let the handling of the skeleton files be local to the procedures
22174 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22176 (fparser, open_extra_files): Remove.
22177 (open_files, output_files): Don't take care of fparser.
22178 * src/files.h: Adjust.
22179 * src/output.c (output_parser): Open and close the file to the
22181 * src/reader.c (read_declarations): When %semantic_parser, open
22184 2000-12-19 Akim Demaille <akim@epita.fr>
22186 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22187 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22189 2000-12-19 Akim Demaille <akim@epita.fr>
22191 * src/files.c (open_files): Yipee! We no longer need all the code
22192 looking for `/tmp' since we have no tmp file.
22194 2000-12-19 Akim Demaille <akim@epita.fr>
22196 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22198 * src/files.c (open_files): Less dependency on MSDOS etc.
22200 2000-12-14 Akim Demaille <akim@epita.fr>
22202 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22203 Provide a default definition.
22204 Use it when executing the default @ action.
22205 * src/reader.c (reader_output_yylsp): No longer include
22206 `timestamp' and `text' in the default YYLTYPE.
22208 2000-12-12 Akim Demaille <akim@epita.fr>
22210 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22211 (copy_guard): Quote the file names.
22212 Reported by Laurent Mascherpa.
22214 2000-12-12 Akim Demaille <akim@epita.fr>
22216 * src/output.c (output_headers, output_program, output): Be sure
22217 to escape special characters when outputting filenames.
22218 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22219 (output_headers): Don't depend on them, Use ACTSTR.
22221 2000-11-17 Akim Demaille <akim@epita.fr>
22223 * lib/obstack.h: Formatting changes.
22224 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22225 prevents type checking.
22226 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22227 cast the value to (void *): assigning a `foo *' to a `void *'
22229 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22230 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22233 2000-11-17 Akim Demaille <akim@epita.fr>
22235 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22237 (suite.m4, regression.m4, calc.m4): these.
22238 * tests/atgeneral.m4: Update from CVS Autoconf.
22240 2000-11-17 Akim Demaille <akim@epita.fr>
22242 * tests/regression.m4 (%union and --defines): New test,
22243 demonstrating a current bug in the obstack implementation.
22245 2000-11-17 Akim Demaille <akim@epita.fr>
22247 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22249 Use them to declare the variables which are global or local to
22252 2000-11-17 Akim Demaille <akim@epita.fr>
22254 * acconfig.h: Remove, no longer used.
22256 2000-11-07 Akim Demaille <akim@epita.fr>
22258 * src: s/Copyright (C)/Copyright/g.
22260 2000-11-07 Akim Demaille <akim@epita.fr>
22262 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22264 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22266 2000-11-07 Akim Demaille <akim@epita.fr>
22268 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22269 Merge in a single CPP if/else.
22271 2000-11-07 Akim Demaille <akim@epita.fr>
22273 * src/output.c (output): Remove useless variables.
22274 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22275 argument `data' for consistency with the prototypes.
22276 Qualify it `const'.
22277 (obstack_copy, obstack_copy0): Rename the second argument as
22278 `address' for consistency. Qualify it `const'.
22279 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22280 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22281 `const' their input argument (`data' or `address').
22282 Adjust the corresponding macros to include `const' in casts.
22284 2000-11-03 Akim Demaille <akim@epita.fr>
22286 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22287 s/PFILE1/BISON_HAIRY/.
22288 Adjust dependencies.
22290 2000-11-03 Akim Demaille <akim@epita.fr>
22292 For some reason, this was not applied.
22294 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22295 `unlink': it's no longer used.
22297 2000-11-03 Akim Demaille <akim@epita.fr>
22299 * src/files.c (skeleton_find): New function, eved out of...
22300 (open_files, open_extra_files): here.
22302 2000-11-03 Akim Demaille <akim@epita.fr>
22304 Don't use `atexit'.
22306 * src/files.c (obstack_save): New function.
22307 (done): Rename as...
22308 (output_files): this.
22309 Use `obstack_save'.
22310 * src/main.c (main): Don't use `atexit' to register `done', since
22311 it no longer has to remove tmp files, just call `output_files'
22312 when there are no errors.
22314 2000-11-02 Akim Demaille <akim@epita.fr>
22316 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22317 `unlink': it's no longer used.
22318 * src/files.h: Formatting changes.
22320 2000-11-02 Akim Demaille <akim@epita.fr>
22322 Remove the last uses of mktemp and unlink/delete.
22324 * src/files.c (fdefines, ftable): Removed.
22325 (defines_ostack, table_obstack): New.
22326 Adjust dependencies of the former into uses of the latter.
22327 * src/output.c (output_short_or_char_table, output_short_table):
22328 Convert to using obstacks.
22329 * src/reader.c (copy_comment2): Accept one FILE * and two
22331 (output_token_defines, reader_output_yylsp): Use obstacks.
22332 * src/system.h (obstack_fgrow3): New.
22333 * po/POTFILES.in: Adjust.
22335 2000-11-01 Akim Demaille <akim@epita.fr>
22337 Change each use of `fattrs' into a use of `attrs_obstack'.
22339 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22340 * src/files.c (fattrs): Remove.
22341 (attrs_obstack): New.
22342 Adjust all dependencies.
22343 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22345 2000-11-01 Akim Demaille <akim@epita.fr>
22347 Introduce obstacks.
22348 Change each use of `faction' into a use of `action_obstack'.
22350 * lib/obstack.h, lib/obstack.c: New files.
22351 * src/files.c (faction): Remove.
22352 (action_obstack): New.
22353 Adjust all dependencies.
22355 2000-10-20 Akim Demaille <akim@epita.fr>
22357 * lib/quote.h (PARAMS): New macro. Use it.
22359 2000-10-16 Akim Demaille <akim@epita.fr>
22361 * src/output.c (output_short_or_char_table): New function.
22362 (output_short_table, output_token_translations): Use it.
22363 (goto_actions): Use output_short_table.
22365 2000-10-16 Akim Demaille <akim@epita.fr>
22367 * src/symtab.c (bucket_new): New function.
22370 * src/output.c (output_short_table): New argument to display the
22371 comment associated with the table.
22372 Adjust dependencies.
22373 (output_gram): Use it.
22374 (output_rule_data): Nicer output layout for YYTNAME.
22376 2000-10-16 Akim Demaille <akim@epita.fr>
22378 * src/lex.c (read_typename): New function.
22380 * src/reader.c (copy_dollar): Likewise.
22382 2000-10-16 Akim Demaille <akim@epita.fr>
22384 * src/reader.c (copy_comment2): Expect the input stream to be on
22385 the `/' which is suspected to open a comment, instead of being
22386 called after `//' or `/*' was read.
22387 (copy_comment, copy_definition, parse_union_decl, copy_action)
22388 (copy_guard): Adjust.
22390 2000-10-16 Akim Demaille <akim@epita.fr>
22392 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22393 `read_signed_integer'.
22395 2000-10-16 Akim Demaille <akim@epita.fr>
22397 * src/reader.c (copy_dollar): New function.
22398 (copy_guard, copy_action): Use it.
22400 2000-10-16 Akim Demaille <akim@epita.fr>
22402 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22403 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22404 New files, from Fileutils 4.0.27.
22405 * src/main.c (printable_version): Remove.
22406 * src/lex.c, src/reader.c: Use `quote'.
22408 2000-10-04 Akim Demaille <akim@epita.fr>
22410 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22412 2000-10-04 Akim Demaille <akim@epita.fr>
22414 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22416 2000-10-04 Akim Demaille <akim@epita.fr>
22418 When a literal string is used to define two different tokens,
22419 `bison -v' segfaults.
22420 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22422 * tests/regression.m4: New file.
22423 Include the core of the sample provided by Piotr Gackiewicz.
22424 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22427 2000-10-04 Akim Demaille <akim@epita.fr>
22429 * src/reader.c (parse_expect_decl): Keep `count' within the size
22433 2000-10-02 Paul Eggert <eggert@twinsun.com>
22435 * bison.s1 (yyparse): Assign the default value
22436 unconditionally, to avoid a GCC warning and make the parser a
22439 2000-10-02 Akim Demaille <akim@epita.fr>
22441 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22444 2000-10-02 Akim Demaille <akim@epita.fr>
22446 * src/derives.c, src/print.c, src/reduce.c: To ease the
22447 translation, move some `\n' out of the translated strings.
22449 2000-10-02 Akim Demaille <akim@epita.fr>
22451 The location tracking mechanism is precious for parse error
22452 messages. Nevertheless, it is enabled only when `@n' is used in
22453 the grammar, which is a different issue (you can use it in error
22454 message, but not in the grammar per se). Therefore, there should
22455 be another means to enable it.
22457 * src/getargs.c (getargs): Support `--locations'.
22458 (usage): Report it.
22459 * src/getargs.h (locationsflag): Export it.
22460 * src/lex.c (percent_table): Support `%locations'.
22461 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22462 with `locationsflag'.
22463 * doc/bison.texinfo: Document `--locations' and `%locations'.
22465 * tests/calc.m4: Test it.
22467 For regularity of the names, replace each
22468 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22469 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22470 In addition replace each `flag' with `_flag'.
22472 2000-10-02 Akim Demaille <akim@epita.fr>
22474 Also test parse error messages, including with YYERROR_VERBOSE.
22476 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22478 Use it to check the computations.
22479 Use it to check `nonassoc' is honored.
22480 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22481 `--yyerror-verbose'.
22482 (_AT_CHECK_CALC): Adjust to this option.
22483 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22485 2000-10-02 Akim Demaille <akim@epita.fr>
22487 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22488 the latter demonstrates a flaw in the handling of non debugging
22489 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22490 was used in order to simplify:
22506 unfortunately this leads to a CPP conflict when
22507 `--name-prefix=foo' is used since it produces `#define yydebug
22510 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22511 (YYDPRINTF): New macro.
22513 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22515 Also test `--verbose', `--defines' and `--name-prefix'.
22517 2000-10-02 Akim Demaille <akim@epita.fr>
22519 Improve the readability of the produced parsers.
22521 * src/bison.s1: Formatting changes.
22522 Improve the comment related to the `$' mark.
22523 (yydefault): Don't fall through to `yyresume': `goto' there.
22524 * src/output.c (output_parser): When the `$' is met, skip the end
22526 New variable, `number_of_dollar_signs', to check there's exactly
22527 one `$' in the parser skeleton.
22529 2000-10-02 Akim Demaille <akim@epita.fr>
22531 * lib/xstrdup.c: New file, from the fileutils.
22532 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22533 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22534 instead of strlen + xmalloc + strcpy.
22535 * src/symtab.c (copys): Remove, use xstrdup instead.
22537 2000-10-02 Akim Demaille <akim@epita.fr>
22539 * src/gram.h (associativity): New enum type which replaces the
22540 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22541 `right_assoc', `left_assoc' and `non_assoc'.
22542 Adjust all dependencies.
22543 * src/reader.c: Formatting changes.
22544 (LTYPESTR): Don't define it, use it as a literal in
22545 `reader_output_yylsp'.
22546 * src/symtab.h (symbol_class): New enum type which replaces the
22547 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22548 `sunknown', `stoken and `snterm'.
22550 2000-10-02 Akim Demaille <akim@epita.fr>
22552 * src/getargs.c (fixed_outfiles): Rename as...
22553 (yaccflag): for consistency and accuracy.
22554 Adjust dependencies.
22556 2000-10-02 Akim Demaille <akim@epita.fr>
22558 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22559 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22560 difficult and introduced a lot of core dump. It turns out that
22561 Bison used an implementation of `xmalloc' based on `calloc', and
22562 at various places it does depend upon the initialization to 0. I
22563 have not tried to isolate the pertinent places, and all the former
22564 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22565 someone should address this issue.
22567 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22568 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22570 Adjust dependencies.
22571 * src/warshall.h: New file.
22574 2000-10-02 Akim Demaille <akim@epita.fr>
22576 Various anti-`extern in *.c' changes.
22578 * src/system.h: Include `assert.h'.
22580 2000-10-02 Akim Demaille <akim@epita.fr>
22582 * src/state.h (nstates, final_state, first_state, first_shift)
22583 (first_reduction): Move their exportation from here...
22584 * src/LR0.h: to here.
22585 Adjust dependencies.
22586 * src/getargs.c (statisticsflag): New variable.
22587 Add support for `--statistics'.
22588 Adjust dependencies.
22590 Remove a lot of now useless `extern' statements in most files.
22592 2000-10-02 Akim Demaille <akim@epita.fr>
22594 * src/LR0.h: New file.
22597 2000-10-02 Akim Demaille <akim@epita.fr>
22599 * src/print.h: New file.
22601 * src/print.c: Formatting and ordering changes.
22602 (verbose, terse): Replace with...
22603 (print_results): this new function.
22604 Adjust dependencies.
22606 2000-10-02 Akim Demaille <akim@epita.fr>
22608 * src/conflicts.c (conflict_report): New function.
22609 (conflict_log, verbose_conflict_log): Replace with...
22610 (print_conflicts): this function.
22611 Adjust dependencies.
22612 * src/conflicts.h: New file.
22613 Propagate its inclusion.
22615 2000-10-02 Akim Demaille <akim@epita.fr>
22617 * src/nullable.h: New file.
22618 Propagate its inclusion.
22619 * src/nullable.c: Formatting changes.
22621 2000-10-02 Akim Demaille <akim@epita.fr>
22623 * src/reduce.h: New file.
22624 Propagate its inclusion.
22625 * src/reduce.c: Topological sort and other formatting changes.
22626 (bool, TRUE, FALSE): Move their definition to...
22627 * src/system.h: here.
22629 2000-10-02 Akim Demaille <akim@epita.fr>
22631 * src/files.c: Formatting changes.
22632 (tryopen, tryclose, openfiles): Rename as...
22633 (xfopen, xfclose, open_files): this.
22634 (stringappend): static.
22635 * src/files.h: Complete the list of exported symbols.
22638 2000-10-02 Akim Demaille <akim@epita.fr>
22640 * src/reader.h: New file.
22641 Propagate its use instead of tedious list of `extern' and
22643 * src/reader.c: Formatting changes, topological sort,
22646 2000-10-02 Akim Demaille <akim@epita.fr>
22648 * src/lex.h: Prototype `lex.c' exported functions.
22649 * src/reader.c: Adjust.
22650 * src/lex.c: Formatting changes.
22651 (safegetc): Rename as...
22654 2000-10-02 Akim Demaille <akim@epita.fr>
22656 * src/lalr.h: New file.
22657 Propagate its inclusion instead of prototypes and `extern'.
22658 * src/lalr.c: Formatting changes, topological sorting etc.
22660 2000-10-02 Akim Demaille <akim@epita.fr>
22662 * src/output.c (token_actions): Introduce a temporary array,
22663 YYDEFACT, that makes it possible for this function to use
22664 output_short_table.
22666 2000-10-02 Akim Demaille <akim@epita.fr>
22668 `user_toknums' is output as a `short[]' in `output.c', while it is
22669 defined as a `int[]' in `reader.c'. For consistency with the
22670 other output tables, `user_toknums' is now defined as a table of
22673 * src/reader.c (user_toknums): Be a short table instead of an int
22675 Adjust dependencies.
22677 Factor the short table outputs.
22679 * src/output.c (output_short_table): New function.
22680 * src/output.c (output_gram, output_stos, output_rule_data)
22681 (output_base, output_table, output_check): Use it.
22683 2000-10-02 Akim Demaille <akim@epita.fr>
22685 * src/output.c (output): Topological sort of the functions, in
22686 order to get rid of the `static' prototypes.
22687 No longer use `register'.
22688 * src/output.h: New file.
22689 Propagate its inclusion in files explicitly prototyping functions
22692 2000-09-21 Akim Demaille <akim@epita.fr>
22694 * src/atgeneral.m4: Update from Autoconf.
22696 2000-09-21 Akim Demaille <akim@epita.fr>
22698 * src/closure.h: New file.
22699 * src/closure.c: Formatting changes, topological sort over the
22700 functions, use of closure.h.
22701 (initialize_closure, finalize_closure): Rename as...
22702 (new_closure, free_closure): these. Adjust dependencies.
22703 * src/LR0.c: Formatting changes, topological sort, use of
22705 (initialize_states): Rename as...
22706 (new_states): this.
22707 * src/Makefile.am (noinst_HEADERS): Adjust.
22709 2000-09-20 Akim Demaille <akim@epita.fr>
22711 * src/acconfig.h: Don't protect config.h against multiple
22713 Don't define PARAMS.
22714 * src/system.h: Define PARAMS.
22715 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22716 purpose of config.h. system.h must not try to fix wrong
22717 definitions in config.h.
22719 2000-09-20 Akim Demaille <akim@epita.fr>
22721 * src/derives.h: New file.
22722 * src/main.c, src/derives.h: Use it.
22723 Formatting changes.
22724 * src/Makefile.am (noinst_HEADERS): Adjust.
22726 2000-09-20 Akim Demaille <akim@epita.fr>
22728 * tests/atgeneral.m4: Update from Autoconf.
22729 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22730 (AT_CHECK_CALC): New macros.
22731 Use these macros to test bison with options `', `--raw',
22732 `--debug', `--yacc', `--yacc --debug'.
22734 2000-09-19 Akim Demaille <akim@epita.fr>
22736 * src/output.c: Formatting changes.
22737 * src/machine.h: Remove, leaving its contents in...
22738 * src/system.h: here.
22740 Adjust all dependencies on stdio.h and machine.h.
22741 * src/getargs.h: New file.
22742 Let all `extern' declarations about getargs.c be replaced with
22743 inclusion of `getargs.h'.
22744 * src/Makefile.am (noinst_HEADERS): Adjust.
22746 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22748 (yyerror): Returns void, not int.
22749 * doc/bison.texinfo: Formatting changes.
22751 2000-09-19 Akim Demaille <akim@epita.fr>
22753 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22756 2000-09-18 Akim Demaille <akim@epita.fr>
22758 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22759 * src/Makefile.am (INCLUDES): Don't.
22760 Be ready to fetch headers in lib/.
22762 2000-09-18 Akim Demaille <akim@epita.fr>
22764 * doc/bison.texinfo: Update the copyright.
22765 ANSIfy and GNUify the examples.
22766 Remove the old menu.
22768 2000-09-18 Akim Demaille <akim@epita.fr>
22770 First set of tests: use the `calc' example from the documentation.
22772 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22773 is defined only when YYDEBUG is.
22774 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22775 * src/files.c (tryopen, tryclose): Formatting changes.
22776 Move to the top and be static.
22777 * src/reader.c (read_signed_integer): Likewise.
22778 * tests/calc.m4: New file.
22779 * Makefile.am, suite.m4: Adjust.
22780 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22782 2000-09-18 Akim Demaille <akim@epita.fr>
22784 Add support for an Autotest test suite for Bison.
22786 * m4/m4.m4, m4/atconfig.m4: New files.
22787 * m4/Makefile.am (EXTRA_DIST): Adjust.
22788 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22790 * src/getargs.c: Display a more standard --version message.
22791 * src/reader.c (reader): Formatting changes.
22792 No longer depend upon VERSION_STRING.
22793 * configure.in: No longer use `dnl'.
22794 Set up the test suite and the new directory `tests/.
22795 (VERSION_STRING): Remove.
22797 2000-04-14 Akim Demaille <akim@epita.fr>
22799 * src/reader.c (copy_comment2): New function, same as former
22800 `copy_comment', but outputs into two FILE *.
22801 (copy_comment): Use it.
22802 (parse_union_decl): Use it.
22803 (get_type, parse_start_decl): Use the same `invalid' message.
22804 (parse_start_decl, parse_union_decl): Use the same `multiple'
22806 (parse_union_decl, copy_guard, copy_action): Use the same
22807 `unmatched' message.
22808 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22810 2000-03-31 Akim Demaille <akim@epita.fr>
22812 * src/files.c (tryopen, tryclose): Move to the top.
22815 2000-03-31 Akim Demaille <akim@epita.fr>
22817 * src/main.c (main): Don't call `done', exit does it.
22819 2000-03-31 Akim Demaille <akim@epita.fr>
22821 * allocate.c: s/return (foo)/return foo/.
22822 * lalr.c: Likewise.
22824 * output.c: Likewise.
22825 * reader.c: Likewise.
22826 * symtab.c: Likewise.
22827 * vmsgetargs.c: Likewise.
22829 2000-03-31 Akim Demaille <akim@epita.fr>
22831 Clean up the error reporting functions.
22833 * src/report.c: New file.
22834 * src/report.h: Likewise.
22835 * src/Makefile.am: Adjust.
22836 * m4/error.m4: New file.
22837 * m4/Makefile.am: Adjust.
22838 * configure.in (jm_PREREQ_ERROR): Call it.
22839 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22841 (fatal, fatals): Remove. All callers use complain.c::fatal.
22842 (warn, warni, warns, warnss, warnss): Remove. All callers use
22843 complain.c::complain.
22844 (toomany): Remove, use fatal instead.
22845 * src/files.c (done): No argument, use complain_message_count.
22846 * src/main.c (main): Register `done' to `atexit'.
22848 * src/getargs.c (usage): More `fputs', less `fprintf'.
22850 2000-03-28 Akim Demaille <akim@epita.fr>
22852 * lib/: New directory.
22853 * Makefile.am (SUBDIRS): Adjust.
22854 * configure.in: Adjust.
22855 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22857 * src/alloca.c: Moved to lib/.
22858 * src/getopt.c: Likewise.
22859 * src/getopt1.c: Likewise.
22860 * src/getopt.h: Likewise.
22861 * src/ansi2knr.c: Likewise.
22862 * src/ansi2knr.1: Likewise.
22863 * src/Makefile.am: Adjust.
22864 * lib/Makefile.am: New file.
22866 2000-03-28 Akim Demaille <akim@epita.fr>
22868 * src/getargs.c (usage): Refresh the help message.
22870 2000-03-17 Akim Demaille <akim@epita.fr>
22872 * src/getopt1.c: Updated from textutils 2.0e
22873 * src/getopt.c: Likewise.
22874 * src/getopt.h: Likewise.
22876 2000-03-17 Akim Demaille <akim@epita.fr>
22878 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22879 the file name, not the whole `#line LINE FILE'.
22881 2000-03-17 Akim Demaille <akim@epita.fr>
22883 On syntax errors, report the token on which we choked.
22885 * src/bison.s1 (yyparse): In the label yyerrlab, when
22886 YYERROR_VERBOSE, add yychar in msg.
22888 2000-03-17 Akim Demaille <akim@epita.fr>
22890 * src/reader.c (copy_at): New function.
22891 (copy_guard): Use it.
22892 (copy_action): Use it.
22894 2000-03-17 Akim Demaille <akim@epita.fr>
22896 Be kind to translators, save some useless translations.
22898 * src/main.c (banner): New function.
22899 (fatal_banner): Use it.
22900 (warn_banner): Use it.
22902 2000-03-17 Akim Demaille <akim@epita.fr>
22904 * src/reader.c (copy_definition): Use copy_string and
22905 copy_comment. Removed now unused `match', `ended',
22907 (copy_comment, copy_string): Moved, to be visible from
22910 2000-03-17 Akim Demaille <akim@epita.fr>
22912 * src/reader.c (copy_string): Declare `static inline'. No
22913 problems with inline, since it is checked by configure.
22914 (copy_comment): Likewise.
22916 2000-03-17 Akim Demaille <akim@epita.fr>
22918 * src/reader.c (packsymbols): Formatting changes.
22920 2000-03-17 Akim Demaille <akim@epita.fr>
22922 * src/reader.c (copy_comment): New function, factored out from:
22923 (copy_action): Use it. Removed now unused `match', `ended',
22925 (copy_guard): Likewise.
22927 2000-03-17 Akim Demaille <akim@epita.fr>
22929 * src/reader.c (copy_string): New function, factored out from:
22930 (copy_action): Use it.
22931 (copy_guard): Likewise.
22933 2000-03-17 Akim Demaille <akim@epita.fr>
22935 Change the handling of @s so that they behave exactly like $s.
22936 There is now a pseudo variable @$ (readble and writable), location
22937 of the lhs of the rule (by default ranging from the location of
22938 the first symbol of the rhs, to the location of the last symbol,
22939 or, if the rhs is empty, YYLLOC).
22941 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22943 (yyparse): When providing a default semantic action, provide a
22944 default location action.
22945 (after the $): No longer change `*YYLSP', just stack YYLOC the
22946 same way you stack YYVAL.
22947 * src/reader.c (read_declarations): Use warns.
22948 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22949 (copy_action, case '@'): Likewise.
22950 Use a standard error message, to save useless work from
22953 2000-03-17 Akim Demaille <akim@epita.fr>
22955 * src/bison.s1: Formatting and cosmetics changes.
22956 * src/reader.c: Likewise.
22957 Update the Copyright notice.
22959 2000-03-17 Akim Demaille <akim@epita.fr>
22961 * src/bison.s1 (#line): All set to `#line' only, since the
22962 Makefile now handles them.
22964 2000-03-16 Akim Demaille <akim@epita.fr>
22966 * src/output.c (output_rule_data): Output the documentation of
22967 some of the tables.
22968 (Copyright notice): Update.
22969 Formatting changes.
22971 2000-03-16 Akim Demaille <akim@epita.fr>
22973 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22974 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22975 One `#if YYDEBUG' remains, since it uses variables which are
22976 defined only if `YYDEBUG != 0'.
22978 2000-03-16 Akim Demaille <akim@epita.fr>
22980 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22981 and related variables so that the similarities are highlighted.
22983 2000-03-16 Akim Demaille <akim@epita.fr>
22985 * src/bison.s1: Properly indent CPP directives.
22987 2000-03-16 Akim Demaille <akim@epita.fr>
22989 * src/bison.s1: Properly indent the `alloca' CPP section.
22991 2000-03-16 Akim Demaille <akim@epita.fr>
22993 Do not hard code values of directories in `configure.in'.
22994 Update the `configure' tool chain.
22996 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22998 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22999 (AC_OUTPUT): Add m4/Makefile.
23000 Bump to bison 1.28a, 1.29 has never been released.
23001 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
23002 handled via src/Makefile.am.
23003 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
23004 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
23006 * Makefile.am (SUBDIRS): Add m4.
23007 (ACLOCAL_AM_FLAGS): New variable.
23008 (AUTOMAKE_OPTIONS): Add check-news.
23009 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
23010 the proper line number and file name.
23011 (DEFS): Propagate the location of bison library files and of the
23013 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
23015 * acinclude.m4: Remove, replaced by the directory m4.
23016 * m4/Makefile.am (EXTRA_DIST): New variable.
23017 * m4/gettext.m4: New file, from the fileutils.
23018 * m4/lcmessage.m4: Likewise
23019 * m4/progtest.m4: Likewise.
23020 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23022 2000-03-10 Akim Demaille <akim@epita.fr>
23025 Formatting changes of various comments.
23026 Respect the GNU coding standards at various places.
23027 Don't use `_()' when no translation is needed.
23029 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23032 OS/2 honors TMPDIR environment variable.
23034 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23036 * doc/bison.texinfo: Tweaked spelling and grammar.
23038 Removed reference to price of printed copy.
23039 Mention BISON_SIMPLE and BISON_HAIRY.
23041 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23043 * configure.in, NEWS:
23044 Bison 1.29 released.
23046 1999-10-27 Jesse Thilo <jthilo@gnu.org>
23048 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23049 Added reference card.
23051 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23053 * po/ru.po: Added Russian translation.
23055 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23057 * configure.in: Added Russian translation.
23059 1999-07-06 Jesse Thilo <jthilo@gnu.org>
23061 * configure.in, NEWS, README:
23062 Released version 1.28.
23064 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23067 Squashed redefinition warning on some systems.
23069 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23070 Have configure build version string instead of relying on ANSI string
23073 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23075 * po/POTFILES.in: Got rid of version.c.
23077 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23079 * acconfig.h, configure.in:
23080 Have configure build version string instead of relying on ANSI string
23083 1999-06-08 Jesse Thilo <jthilo@gnu.org>
23086 Dropped mention of `+' for long-named options.
23088 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23090 * src/files.c: Added <unistd.h> for unlink().
23092 * src/Makefile.am, src/system.h:
23095 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23097 * README: Added a FAQ list.
23099 * configure.in, acconfig.h:
23102 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23104 * doc/FAQ, doc/Makefile.am:
23107 1999-05-19 Jesse Thilo <jthilo@gnu.org>
23109 * src/alloc.h, src/symtab.h, src/version.c:
23110 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23112 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23114 * src/.cvsignore, src/Makefile.am:
23115 Reorganized: sources in `src', documentation in `doc'.
23117 * src/lex.c (literalchar):
23118 fixed the code for escaping double quotes (thanks
23121 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23123 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23124 Adjusted paths to reflect directory reorganization.
23126 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23128 * doc/.cvsignore, doc/Makefile.am:
23129 Reorganized: sources in `src', documentation in `doc'.
23131 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23134 Updated AC_INIT file to reflect directory reorganization.
23136 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23137 Reorganized: sources in `src', documentation in `doc'.
23139 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23142 Don't declare calloc() and realloc() if not necessary.
23144 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23146 * configure.in, acconfig.h, acinclude.m4:
23147 Don't declare calloc() and realloc() if not necessary.
23149 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23151 * po/.cvsignore: Added i18n support.
23153 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23155 * acconfig.h, configure.in, Makefile.am:
23156 Added i18n support.
23158 1999-03-22 Jesse Thilo <jthilo@gnu.org>
23160 * src/bison.s1: Fixed #line numbers.
23162 1999-03-15 Jesse Thilo <jthilo@gnu.org>
23164 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23165 Added PO files from Translation Project.
23167 1999-03-03 Jesse Thilo <jthilo@gnu.org>
23170 Added support for non-ANSI compilers (ansi2knr).
23172 1999-02-16 Jesse Thilo <jthilo@gnu.org>
23174 * configure.in: Bumped version number to 1.27.
23177 Added `bison.simple' to list of files removed by `make distclean'.
23179 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23181 * src/files.c, src/files.h:
23182 Defined locations of parser files in config.h instead of Makefile.
23184 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23186 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23187 Defined locations of parser files in config.h instead of Makefile.
23189 1999-02-09 Jesse Thilo <jthilo@gnu.org>
23192 Removed inappropriate use of $< macro.
23194 1999-02-05 Jesse Thilo <jthilo@gnu.org>
23196 * po/Makefile.in.in, po/POTFILES.in:
23197 Add `po' directory skeleton.
23199 1999-01-27 Jesse Thilo <jthilo@gnu.org>
23201 * README: Document help-bison list.
23203 * configure.in: Add check for mkstemp().
23205 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23207 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23208 Hush a few compiler warnings.
23211 Add tryclose(), which verifies that fclose was successful.
23212 Hush a couple of compiler warnings.
23214 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23216 * Makefile.am, OChangeLog:
23217 ChangeLog is now automatically generated. Include the old version as
23220 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23222 * src/gram.h, src/lalr.c, src/lex.c, src/lex.h, src/machine.h, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/state.h, src/symtab.c, src/symtab.h, src/types.h, src/vmsgetargs.c, src/warshall.c, src/allocate.c, src/alloc.h, src/bison.s1, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/files.h, src/getargs.c, src/gram.c, src/LR0.c:
23223 Update FSF address.
23225 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23227 * doc/bison.texinfo: Fix formatting glitch.
23229 * doc/bison.texinfo: Update FSF address.
23231 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23233 * acconfig.h: Update FSF address.
23235 1999-01-08 Jesse Thilo <jthilo@gnu.org>
23238 Don't define PACKAGE here, since config.h defines it.
23240 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23242 * src/reader.c: Update copyright date.
23245 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23246 favor of output directly to stderr (avoids buffer overruns).
23248 * src/reader.c: Some checks for premature EOF.
23250 * src/allocate.c, src/alloc.h, src/closure.c, src/conflicts.c, src/derives.c, src/getargs.c, src/gram.c, src/lalr.c, src/lex.c, src/LR0.c, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reduce.c, src/symtab.c, src/symtab.h, src/warshall.c:
23251 Use prototypes if the compiler understands them.
23253 * src/files.c: Honor TMPDIR on Unix hosts.
23254 Use prototypes if the compiler understands them.
23257 Fix a couple of buffer overrun bugs.
23258 Use prototypes if the compiler understands them.
23260 * src/system.h: Include unistd.h and ctype.h.
23261 Use #ifdef instead of #if for NLS symbols.
23263 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23265 * doc/bison.texinfo:
23266 Delete comment "consider using @set for edition number, etc..." since
23267 we now are doing so.
23269 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23272 Use prototypes if the compiler understands them.
23274 * NEWS: Document 1.26 highlights.
23276 * Makefile.am: Require Automake 1.3 or later.
23279 Use prototypes if the compiler understands them.
23281 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23284 Use VERSION symbol from automake for version number.
23286 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23288 * acconfig.h, configure.in, version.cin:
23289 Use VERSION symbol from automake for version number.
23291 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23294 Distribute original version of simple parser (bison.s1), not built
23295 version (bison.simple).
23297 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23299 * doc/bison.texinfo: Add info dir entry.
23301 * doc/bison.texinfo:
23302 Let automake put version number into documentation.
23304 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23306 * src/bison.cld, src/build.com, src/vmshlp.mar:
23307 Add non-RCS files from /gd/gnu/bison.
23309 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23312 Document the BISON_HAIRY and BISON_SIMPLE variables.
23314 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23316 * src/version.c: Build version.c automatically.
23319 Fix token numbering (used to start at 258, not 257).
23321 * src/system.h: Include config.h.
23323 * src/getargs.c: Update bug report address.
23325 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23326 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23328 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23331 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23333 * configure.in, version.cin:
23334 Build version.c automatically.
23336 * AUTHORS: Add AUTHORS file.
23338 * README: Update bug report address.
23341 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23343 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23344 Add automake stuff.
23346 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23348 * doc/bison.texinfo: Clean up some formatting.
23350 1998-05-05 Richard Stallman <rms@gnu.org>
23352 * doc/bison.texinfo:
23353 Explain better why to make a pure parser.
23355 1998-01-05 Richard Stallman <rms@gnu.org>
23357 * src/files.c (openfiles):
23358 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23359 find a temporary directory, if possible. Do not unlink files while
23362 1997-08-25 Richard Stallman <rms@gnu.org>
23364 * src/reader.c (stack_offset;):
23365 Change some warni to warns.
23367 * src/lex.c (literalchar): Use warns, not warni.
23369 1997-06-28 Richard Stallman <rms@gnu.org>
23371 * src/bison.s1: Add a Bison version comment.
23373 * src/main.c (fatal, warn, berror):
23376 1997-06-28 Richard Stallman <rms@gnu.org>
23378 * Makefile.in (bison_version): New variable.
23379 (dist): Use that variable.
23380 (bison.s1): Substitute the Bison version into bison.simple.
23382 * bison.simple: Add a Bison version comment.
23384 1997-06-18 Richard Stallman <rms@gnu.org>
23386 * src/main.c (fatal, warn, berror):
23387 Make error messages standard.
23388 (toomany): Improve error message text.
23390 * src/LR0.c, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/lalr.c, src/lex.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/symtab.c:
23391 new.h renamed to alloc.h.
23393 1997-06-18 Richard Stallman <rms@gnu.org>
23395 * Makefile.in: new.h renamed to alloc.h.
23397 1997-05-24 Richard Stallman <rms@gnu.org>
23399 * src/lex.c (literalchar):
23400 Fix the code for escaping \, " and '.
23402 (lex): Avoid trouble when there are many chars
23403 to discard in a char literal with just several chars in it.
23405 1997-05-17 Richard Stallman <rms@gnu.org>
23408 Use malloc, if using alloca is troublesome.
23409 (YYSTACK_USE_ALLOCA): New flag macro.
23410 Define it for some systems and compilers.
23411 (YYSTACK_ALLOC): New macro.
23412 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23413 If it was malloc'd, free it.
23415 1997-05-17 Richard Stallman <rms@gnu.org>
23418 Use malloc, if using alloca is troublesome.
23419 (YYSTACK_USE_ALLOCA): New flag macro.
23420 Define it for some systems and compilers.
23421 (YYSTACK_ALLOC): New macro.
23422 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23423 If it was malloc'd, free it.
23425 1997-04-23 Richard Stallman <rms@gnu.org>
23428 (alloca) [__hpux]: Always define as __builtin_alloca.
23430 1997-04-23 Richard Stallman <rms@gnu.org>
23433 (alloca) [__hpux]: Always define as __builtin_alloca.
23435 1997-04-22 Richard Stallman <rms@gnu.org>
23438 [__hpux]: Include alloca.h (right for HPUX 10)
23439 instead of declaring alloca (right for HPUX 9).
23441 * src/bison.s1 (__yy_memcpy):
23442 Declare arg `count' as unsigned int.
23443 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23445 1997-04-22 Richard Stallman <rms@gnu.org>
23448 [__hpux]: Include alloca.h (right for HPUX 10)
23449 instead of declaring alloca (right for HPUX 9).
23451 * bison.simple (__yy_memcpy):
23452 Declare arg `count' as unsigned int.
23453 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23455 1997-01-03 Richard Stallman <rms@gnu.org>
23457 * src/allocate.c: [__STDC__ or _MSC_VER]:
23458 Declare calloc and realloc to return void *.
23460 1997-01-02 Richard Stallman <rms@gnu.org>
23463 [_MSC_VER]: Include stdlib.h and process.h.
23464 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23466 * src/main.c (main): Return FAILURE as a value.
23467 (printable_version): Declare arg as int, not char.
23469 1997-01-02 Richard Stallman <rms@gnu.org>
23471 * Makefile.in (dist):
23472 Explicitly check for symlinks, and copy them.
23474 1996-12-19 Richard Stallman <rms@gnu.org>
23477 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23479 1996-12-18 Paul Eggert <eggert@gnu.org>
23481 * src/bison.s1 (yyparse):
23482 If __GNUC__ and YYPARSE_PARAM are both defined,
23483 declare yyparse to have a void * argument.
23485 1996-12-18 Paul Eggert <eggert@gnu.org>
23487 * bison.simple (yyparse):
23488 If __GNUC__ and YYPARSE_PARAM are both defined,
23489 declare yyparse to have a void * argument.
23491 1996-12-17 Richard Stallman <rms@gnu.org>
23493 * src/reduce.c (nbits): Add some casts.
23495 1996-08-12 Richard Stallman <rms@gnu.org>
23497 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23499 1996-08-12 Richard Stallman <rms@gnu.org>
23501 * bison.simple: Test _MSDOS as well as _MSDOS_.
23503 1996-07-31 Richard Stallman <rms@gnu.org>
23506 [__sun && __i386]: Include alloca.h.
23508 1996-07-31 Richard Stallman <rms@gnu.org>
23511 [__sun && __i386]: Include alloca.h.
23513 1996-07-30 Richard Stallman <rms@gnu.org>
23515 * src/bison.s1: Comment change.
23517 * src/bison.s1: Test _MSDOS_, not MSDOS.
23519 1996-07-30 Richard Stallman <rms@gnu.org>
23521 * bison.simple: Comment change.
23523 * bison.simple: Test _MSDOS_, not MSDOS.
23525 1996-06-01 Richard Stallman <rms@gnu.org>
23527 * src/reduce.c, src/reader.c, src/print.c, src/output.c, src/nullable.c, src/lex.c, src/lalr.c, src/getargs.c, src/derives.c, src/conflicts.c, src/closure.c, src/allocate.c:
23528 Insert `_' macro around many string constants.
23531 Insert `_' macro around many string constants.
23533 (main): Call setlocale, bindtextdomain and textdomain.
23535 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23536 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23537 [ENABLE_NLS]: Include libintl.h.
23538 [ENABLE_NLS] (gettext): Define.
23539 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23540 (N_, PACKAGE, LOCALEDIR): New macros.
23542 1996-06-01 Richard Stallman <rms@gnu.org>
23544 * POTFILES.in: New file.
23546 * Makefile.in (allocate.o):
23547 Define target explicitly.
23549 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23550 (LDFLAGS): Set to @LDFLAGS@.
23551 (configure): Run autoconf only if preceding `cd' succeeds.
23552 (bison.s1): Redirect output to temporary file then move the
23553 temporary to the target, rather than redirecting directly to bison.s1.
23554 (clean): Remove config.status and config.log.
23555 (distclean): Don't remove config.status here.
23557 1996-05-12 Richard Stallman <rms@gnu.org>
23560 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23562 1996-05-12 Richard Stallman <rms@gnu.org>
23565 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23567 1996-05-11 Richard Stallman <rms@gnu.org>
23569 * src/bison.s1 (__yy_memcpy):
23570 Really reorder the args, as was supposedly done on Feb 14 1995.
23571 (yyparse): Calls changed accordingly.
23573 1996-05-11 Richard Stallman <rms@gnu.org>
23575 * Makefile.in (dist): Don't use $(srcdir).
23577 * bison.simple (__yy_memcpy):
23578 Really reorder the args, as was supposedly done on Feb 14 1995.
23579 (yyparse): Calls changed accordingly.
23581 1996-01-27 Richard Stallman <rms@gnu.org>
23583 * src/output.c (output_rule_data):
23584 Test YYERROR_VERBOSE in the conditional
23585 around the definition of ttyname.
23587 1995-12-29 Richard Stallman <rms@gnu.org>
23590 Fix line numbers in #line commands.
23592 1995-12-29 Richard Stallman <rms@gnu.org>
23595 Fix line numbers in #line commands.
23597 1995-12-27 Richard Stallman <rms@gnu.org>
23599 * src/bison.s1 (YYPARSE_PARAM_DECL):
23600 In C++, make it always null.
23601 (YYPARSE_PARAM_ARG): New macro.
23602 (yyparse): Use YYPARSE_PARAM_ARG.
23604 1995-12-27 Richard Stallman <rms@gnu.org>
23606 * bison.simple (YYPARSE_PARAM_DECL):
23607 In C++, make it always null.
23608 (YYPARSE_PARAM_ARG): New macro.
23609 (yyparse): Use YYPARSE_PARAM_ARG.
23611 1995-11-29 Richard Stallman <rms@gnu.org>
23613 * doc/bison.texinfo:
23614 Describe literal string tokens, %raw, %no_lines, %token_table.
23616 1995-11-29 Daniel Hagerty <hag@gnu.org>
23618 * doc/bison.texinfo: Fixed update date
23620 1995-10-16 Richard Stallman <rms@gnu.org>
23622 * src/version.c: Version 1.25.
23624 1995-10-16 Richard Stallman <rms@gnu.org>
23626 * NEWS: *** empty log message ***
23628 1995-10-16 Richard Stallman <rms@gnu.org>
23630 * doc/bison.1, doc/bison.rnh:
23633 1995-10-15 Richard Stallman <rms@gnu.org>
23635 * src/vmsgetargs.c, src/getargs.c:
23636 Added -n, -k, and -raw switches.
23637 (noparserflag, toknumflag, rawtoknumflag): New variables.
23639 * src/symtab.h (SALIAS):
23640 New #define for adding aliases to %token.
23641 (struct bucket): Added `alias' field.
23643 * src/reduce.c (reduce_grammar):
23644 Revise error message.
23645 (print_notices): Remove final `.' from error message.
23647 * src/reader.c (reader_output_yylsp):
23649 (readgram): Use `#if 0' around code that accepted %command
23650 inside grammar rules: The documentation doesn't allow it,
23651 and it will fail since the %command processors scan for the next %.
23652 (parse_token_decl): Extended the %token
23653 declaration to allow a multi-character symbol as an alias.
23654 (parse_thong_decl): New function.
23655 (read_declarations): Added %thong declarations.
23656 (read_declarations): Handle NOOP to deal with allowing
23657 % declarations as another means to specify the flags.
23658 (readgram): Allow %prec prior to semantics embedded in a rule.
23659 (skip_to_char, read_declarations, copy_definition)
23660 (parse_token_decl, parse_start_decl, parse_type_decl)
23661 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23662 (get_type_name, copy_guard, copy_action, readgram)
23663 (get_type, packsymbols): Revised most error messages.
23664 Changed `fatal' to `warnxxx' to avoid aborting for error.
23665 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23666 (read_declarations): Improve the error message for
23667 an invalid character. Do not abort.
23668 (read_declarations, copy_guard, copy_action): Use
23669 printable_version to avoid unprintable characters in printed output.
23670 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23671 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23672 Allow the type of a non-terminal can be given
23673 more than once, as long as all specifications give the same type.
23676 (output_headers, output_trailers, output, output_gram)
23677 (output_rule_data): Implement noparserflag variable.
23678 Implement toknumflag variable.
23679 (output): Call reader_output_yylsp to output LTYPESTR.
23681 * src/main.c (main):
23682 If reader sees an error, don't process the grammar.
23683 (fatals): Updated to not use VARARGS1.
23684 (printable_version, int_to_string, warn, warni, warns, warnss)
23685 (warnsss): New error reporting functions. Avoid abort for error.
23688 Added THONG and NOOP for alias processing.
23689 Added SETOPT for the new code that allows setting options with %flags.
23692 Include getopt.h. Add some extern decls.
23693 (safegetc): New function to deal with EOF gracefully.
23694 (literalchar); new function to deal with reading \ escapes.
23695 (lex): Use literalchar.
23696 (lex): Implemented "..." tokens.
23697 (literalchar, lex, parse_percent_token): Made tokenbuffer
23698 always contain the token. This includes growing the token
23699 buffer while reading an integer.
23700 (parse_percent_token): Replaced if-else statement with percent_table.
23701 (parse_percent_token): Added % declarations as another
23702 way to specify the flags -n, -l, and -r. Also added hooks for
23703 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23704 major changes to files.c.
23705 (lex) Retain in the incoming stream a character following
23707 (skip_white_space, lex): Revised most error messages
23708 and changed fatal to warn to avoid aborting.
23709 (percent_table): Added %thong declarations.
23711 * src/gram.h: Comment changes.
23713 * src/files.c (openfiles, open_extra_files, done):
23715 and actfile file. Handle noparserflag. Both for -n switch.
23717 * src/conflicts.c (resolve_sr_conflict):
23718 Remove use of alloca.
23720 1995-06-01 Jim Meyering <meyering@gnu.org>
23722 * doc/bison.texinfo: *** empty log message ***
23724 1995-05-06 Richard Stallman <rms@gnu.org>
23726 * src/bison.s1: Comment change.
23728 1995-05-06 Richard Stallman <rms@gnu.org>
23730 * bison.simple: Comment change.
23732 1995-05-03 Richard Stallman <rms@gnu.org>
23734 * src/version.c: Version now 1.24.
23736 * src/bison.s1: Change distribution terms.
23738 * src/version.c: Version now 1.23.
23740 1995-05-03 Richard Stallman <rms@gnu.org>
23742 * doc/bison.texinfo:
23743 Rewrite "Conditions for Using Bison".
23744 Update version to 1.24.
23746 1995-05-03 Richard Stallman <rms@gnu.org>
23748 * bison.simple: Change distribution terms.
23750 1995-02-23 Richard Stallman <rms@gnu.org>
23752 * src/files.c: Test __VMS_POSIX as well as VMS.
23754 1995-02-14 Jim Meyering <meyering@gnu.org>
23756 * src/bison.s1 (__yy_memcpy):
23757 Renamed from __yy_bcopy to avoid
23758 confusion. Reverse FROM and TO arguments to be consistent with
23761 1995-02-14 Jim Meyering <meyering@gnu.org>
23763 * bison.simple (__yy_memcpy):
23764 Renamed from __yy_bcopy to avoid
23765 confusion. Reverse FROM and TO arguments to be consistent with
23768 1994-11-10 David J. MacKenzie <djm@gnu.org>
23774 * Makefile.in (DISTFILES): Include NEWS.
23776 * Makefile.in (DISTFILES):
23777 Include install-sh, not install.sh.
23779 * configure.in: Update to Autoconf v2 macro names.
23781 1994-10-05 David J. MacKenzie <djm@gnu.org>
23783 * Makefile.in: fix typo
23785 * Makefile.in (prefix, exec_prefix):
23786 Let configure set them.
23788 1994-09-28 David J. MacKenzie <djm@gnu.org>
23790 * Makefile.in: Set datadir to $(prefix)/share.
23792 1994-09-15 Richard Stallman <rms@gnu.org>
23795 Update copyright notice and GPL version.
23797 1994-09-15 Richard Stallman <rms@gnu.org>
23800 Update copyright notice and GPL version.
23802 1994-07-12 Richard Stallman <rms@gnu.org>
23804 * src/reduce.c, src/reader.c:
23807 1994-05-05 David J. MacKenzie <djm@gnu.org>
23809 * Makefile.in: entered into RCS
23811 1994-03-26 Richard Stallman <rms@gnu.org>
23813 * src/bison.s1: entered into RCS
23815 1994-03-26 Richard Stallman <rms@gnu.org>
23817 * bison.simple: entered into RCS
23819 1994-03-25 Richard Stallman <rms@gnu.org>
23821 * src/main.c: entered into RCS
23823 1994-03-24 Richard Stallman <rms@gnu.org>
23825 * src/conflicts.c: entered into RCS
23827 1994-01-02 Richard Stallman <rms@gnu.org>
23829 * Makefile.in: *** empty log message ***
23831 1993-11-21 Richard Stallman <rms@gnu.org>
23833 * src/bison.s1: *** empty log message ***
23835 1993-11-21 Richard Stallman <rms@gnu.org>
23837 * doc/bison.texinfo: entered into RCS
23839 * doc/bison.texinfo: *** empty log message ***
23841 1993-11-21 Richard Stallman <rms@gnu.org>
23843 * bison.simple: *** empty log message ***
23845 1993-10-25 David J. MacKenzie <djm@gnu.org>
23847 * doc/bison.texinfo: *** empty log message ***
23849 1993-10-19 Richard Stallman <rms@gnu.org>
23851 * src/bison.s1: *** empty log message ***
23853 1993-10-19 Richard Stallman <rms@gnu.org>
23855 * bison.simple: *** empty log message ***
23857 1993-10-14 Richard Stallman <rms@gnu.org>
23859 * src/bison.s1: *** empty log message ***
23861 1993-10-14 Richard Stallman <rms@gnu.org>
23863 * bison.simple: *** empty log message ***
23865 1993-09-14 David J. MacKenzie <djm@gnu.org>
23867 * doc/bison.texinfo: *** empty log message ***
23869 1993-09-13 Noah Friedman <friedman@gnu.org>
23871 * Makefile.in: *** empty log message ***
23873 1993-09-10 Richard Stallman <rms@gnu.org>
23875 * src/conflicts.c: *** empty log message ***
23877 * src/system.h: entered into RCS
23879 1993-09-10 Richard Stallman <rms@gnu.org>
23881 * doc/bison.1: entered into RCS
23883 1993-09-06 Noah Friedman <friedman@gnu.org>
23885 * src/version.c: entered into RCS
23887 1993-09-06 Noah Friedman <friedman@gnu.org>
23889 * Makefile.in: *** empty log message ***
23891 1993-07-30 David J. MacKenzie <djm@gnu.org>
23893 * Makefile.in: *** empty log message ***
23895 1993-07-24 Richard Stallman <rms@gnu.org>
23897 * src/bison.s1: *** empty log message ***
23899 1993-07-24 Richard Stallman <rms@gnu.org>
23901 * bison.simple: *** empty log message ***
23903 1993-07-08 David J. MacKenzie <djm@gnu.org>
23905 * Makefile.in: *** empty log message ***
23907 1993-07-04 Richard Stallman <rms@gnu.org>
23909 * src/bison.s1: *** empty log message ***
23911 1993-07-04 Richard Stallman <rms@gnu.org>
23913 * bison.simple: *** empty log message ***
23915 1993-06-26 David J. MacKenzie <djm@gnu.org>
23917 * src/getargs.c: entered into RCS
23919 1993-06-26 David J. MacKenzie <djm@gnu.org>
23921 * doc/bison.texinfo: *** empty log message ***
23923 * doc/bison.1: New file.
23925 1993-06-25 Richard Stallman <rms@gnu.org>
23927 * src/getargs.c: New file.
23929 1993-06-16 Richard Stallman <rms@gnu.org>
23931 * src/bison.s1: *** empty log message ***
23933 1993-06-16 Richard Stallman <rms@gnu.org>
23935 * bison.simple: *** empty log message ***
23937 1993-06-03 Richard Stallman <rms@gnu.org>
23939 * src/bison.s1: New file.
23941 1993-06-03 Richard Stallman <rms@gnu.org>
23943 * doc/bison.texinfo: *** empty log message ***
23945 1993-06-03 Richard Stallman <rms@gnu.org>
23947 * bison.simple: New file.
23949 1993-05-19 Richard Stallman <rms@gnu.org>
23951 * doc/bison.texinfo: New file.
23953 1993-05-07 Noah Friedman <friedman@gnu.org>
23955 * Makefile.in: *** empty log message ***
23957 1993-04-28 Noah Friedman <friedman@gnu.org>
23959 * src/reader.c: *** empty log message ***
23961 1993-04-23 Noah Friedman <friedman@gnu.org>
23963 * src/alloc.h: entered into RCS
23965 1993-04-20 David J. MacKenzie <djm@gnu.org>
23967 * src/version.c: *** empty log message ***
23969 * src/files.c, src/allocate.c:
23972 * src/reader.c: *** empty log message ***
23974 * src/lex.c: entered into RCS
23976 * src/conflicts.c: New file.
23978 * src/symtab.c: entered into RCS
23980 * src/alloc.h: New file.
23982 * src/LR0.c: entered into RCS
23984 1993-04-18 Noah Friedman <friedman@gnu.org>
23986 * src/reader.c: New file.
23988 * src/version.c: *** empty log message ***
23990 1993-04-18 Noah Friedman <friedman@gnu.org>
23992 * Makefile.in: *** empty log message ***
23994 1993-04-17 Noah Friedman <friedman@gnu.org>
23996 * Makefile.in: *** empty log message ***
23998 1993-04-15 Richard Stallman <rms@gnu.org>
24000 * src/main.c, src/files.c:
24003 1993-04-15 Noah Friedman <friedman@gnu.org>
24005 * configure.in: entered into RCS
24007 * configure.in: *** empty log message ***
24009 * configure.in: New file.
24011 1993-04-14 Richard Stallman <rms@gnu.org>
24013 * Makefile.in: New file.
24015 1993-04-13 Richard Stallman <rms@gnu.org>
24017 * src/version.c: New file.
24019 1993-03-25 Richard Stallman <rms@gnu.org>
24021 * src/output.c: entered into RCS
24023 1992-09-25 Richard Stallman <rms@gnu.org>
24025 * configure.bat: entered into RCS
24027 1992-06-22 Richard Stallman <rms@gnu.org>
24029 * src/vmsgetargs.c: entered into RCS
24031 1992-06-22 Richard Stallman <rms@gnu.org>
24033 * doc/bison.rnh: entered into RCS
24035 1992-04-20 David J. MacKenzie <djm@gnu.org>
24037 * README: entered into RCS
24039 1992-01-22 Richard Stallman <rms@gnu.org>
24041 * src/machine.h: entered into RCS
24043 1991-12-21 Richard Stallman <rms@gnu.org>
24045 * src/lalr.c, src/closure.c:
24048 1991-12-20 Richard Stallman <rms@gnu.org>
24050 * src/state.h: entered into RCS
24052 1991-12-18 Richard Stallman <rms@gnu.org>
24054 * src/print.c, src/nullable.c, src/derives.c:
24057 1991-11-03 David J. MacKenzie <djm@gnu.org>
24059 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24062 1988-09-09 Richard Stallman <rms@gnu.org>
24064 * src/bison.hairy: entered into RCS
24066 1987-12-16 Richard Stallman <rms@gnu.org>
24068 * REFERENCES: entered into RCS
24073 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
24076 Copying and distribution of this file, with or without
24077 modification, are permitted provided the copyright notice and this
24078 notice are preserved.