]> git.saurik.com Git - bison.git/blob - ChangeLog
fa6198ca8fc0990395220c6f7c3f07ed67ecf463
[bison.git] / ChangeLog
1 2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
2
3 glr.c: omit yyresolveLocations when locations are disabled.
4 This prevents gcc 4.6.0's -Wunused-but-set-variable from warning
5 about yyresolveLocations's local yyrhsloc. When locations are
6 enabled, there's no such warning because YYLLOC_DEFAULT then uses
7 yyrhsloc. Reported by Jim Meyering at
8 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
9 * data/glr.c (yyresolveLocations): Omit definition when locations
10 are disabled.
11 (yyresolveValue): Omit yyresolveLocations invocation when
12 locations are disabled.
13
14 2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
15
16 gnulib, autoconf: update.
17 * README-hacking (Updating a submodule): Give advice on how to
18 determine the versions of gnulib and autoconf to which we should
19 update.
20 (Release Procedure): Note that submodules should be updated.
21 * bootstrap.conf (gnulib_modules): Rename pipe to spawn-pipe as
22 suggested in updated gnulib NEWS.
23 * gnulib: Choose a stable snapshot according to advice in Bison's
24 README-hacking.
25 * po/POTFILES.in (lib/pipe.c): Rename to...
26 (lib/spawn-pipe.c): ... this.
27 * src/output.c: Update to include spawn-pipe.h.
28 * submodules/autoconf: Update to latest for improvement in m4.m4
29 that excludes M4 with buggy strstr. The only other changes to
30 files that we use are copyright updates.
31
32 2011-04-09 Joel E. Denny <joeldenny@joeldenny.org>
33
34 Fix missing updates to GPLv3.
35 Reported by Tys Lefering at
36 <http://lists.gnu.org/archive/html/bison-patches/2011-04/msg00000.html>.
37 * src/print-xml.c, src/print-xml.h: In these files.
38
39 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
40
41 Add -Wconflicts-sr and -Wconflicts-rr.
42 Thus, conflict reports are now affected by -Werror and -Wnone
43 (unless %expect or %expect-rr is specified). Reported by George
44 Neuner at
45 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
46 * NEWS (2.5): Document.
47 * doc/bison.texinfo (Bison Options): Document.
48 * src/complain.c, src/complain.h (set_warning_issued): Export
49 function.
50 * src/conflicts.c (conflicts_print): Suppress conflict report
51 based on -Wno-conflicts-sr and -Wno-conflicts-rr, and treat
52 conflicts as errors if -Werror.
53 * src/getargs.c (warnings_flag): Initialize with
54 warnings_conflicts_sr and warnings_conflicts_rr as well.
55 (warnings_args, warnings_types): Add entries for
56 warnings_conflicts_sr and warnings_conflicts_rr.
57 (usage): Update.
58 * src/getargs.h (enum warnings): Add entries for
59 warnings_conflicts_sr and warnings_conflicts_rr.
60 * tests/conflicts.at (-W versus %expect and %expect-rr): New test
61 group.
62 * tests/local.at (AT_BISON_CHECK_NO_XML): Update now that the
63 conflict report can produce a "warnings being treated as errors"
64 message. Also, check that stderr is now fully scrubbed by -Wnone
65 when the exit status is 0.
66
67 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
68
69 Pacify maintainer-check-posix.
70 Adding command-line options after the grammar file name is not
71 permitted, so disable checks that do that when
72 maintainer-check-posix is running.
73 * tests/local.at (AT_BISON_CHECK_NO_XML): Don't run the
74 problematic checks when POSIXLY_CORRECT=1. Also, for readability,
75 remove an unnecessary m4_if.
76
77 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
78
79 Add -Wother so -Wnone suppresses all warnings.
80 Reported by George Neuner at
81 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
82 * NEWS (2.5): Document.
83 * THANKS (George Neuner): Add.
84 * doc/bison.texinfo (Bison Options): Document.
85 * src/complain.c, src/complain.h
86 (warn_at, warn_at_indent, warn): Suppress warning if -Wno-other.
87 (midrule_value_at): New warning function, similar to yacc_at in
88 that it's controlled by its own warning category.
89 * src/getargs.c (warnings_flag): Initialize to warnings_other.
90 (warnings_args, warnings_types): Add entry for warnings_other.
91 (usage): Update.
92 * src/getargs.h (enum warnings): Add entry for warnings_other.
93 * src/gram.c (grammar_rules_useless_report): If -Wno-other, then
94 don't print useless rules.
95 * src/reader.c (symbol_should_be_used): Rather than adjusting the
96 return value based on whether midrule value warnings are enabled,
97 accept a new parameter for telling the caller whether true is
98 being returned for a potential midrule warning.
99 (grammar_rule_check): Use midrule_value_at for midrule value
100 warnings, and continue to use warn_at for all other warnings. Let
101 them check whether the warnings are enabled.
102 * tests/local.at (AT_BISON_CHECK): Update documentation.
103 (AT_BISON_CHECK_NO_XML): Check that -Wnone and --warnings=none
104 disable all warnings exercised in the test suite.
105
106 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
107
108 Don't let -Wnone disable -Werror.
109 Discussed at
110 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00009.html>.
111 * NEWS (2.5): Document.
112 * src/getargs.c (flags_argmatch): Accept a new argument that
113 specifies what flags "all" and thus "none" affect.
114 (FLAGS_ARGMATCH): Update flags_argmatch invocation.
115 * tests/input.at (-Werror is not affected by -Wnone and -Wall):
116 New test group.
117
118 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
119
120 * NEWS (2.5): Document fix for -Wno-CATEGORY.
121
122 2011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
123
124 doc: fix confusing citation of LAC publication.
125 Suggested by Akim Demaille.
126 * doc/bison.texinfo (LAC): Here.
127
128 2011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
129
130 lr.default-reductions: rename "full" value to "most".
131 Unlike "consistent" and "accepting", "full" doesn't answer the
132 question of "which states".
133 * doc/bison.texinfo (%define Summary): Update.
134 (Default Reductions): Update.
135 * src/print.c (print_reductions): Update.
136 * src/reader.c (prepare_percent_define_front_end_variables):
137 Update.
138 * src/tables.c (action_row): Update.
139 * tests/input.at (%define enum variables): Update.
140 * tests/reduce.at (%define lr.default-reductions): Update.
141
142 2011-03-13 Joel E. Denny <joeldenny@joeldenny.org>
143
144 * src/parse-gram.c, src/parse-gram.h: Regenerate.
145
146 2011-03-09 Akim Demaille <akim@lrde.epita.fr>
147
148 named references: fix double free.
149 In `rhs[name]: "a" | "b"', do not free "name" twice.
150 Reported by Tys Lefering.
151 <http://lists.gnu.org/archive/html/bug-bison/2010-06/msg00002.html>
152 * src/named-ref.h, src/named-ref.c (named_ref_copy): New.
153 * src/parse-gram.y (current_lhs): Rename as...
154 (current_lhs_symbol): this.
155 (current_lhs): New function. Use it to free the current lhs
156 named reference.
157 * src/reader.c: Bind lhs to a copy of the current named reference.
158 * src/symlist.c: Rely on free (0) being valid.
159 * tests/named-refs.at: Test this.
160
161 2011-03-09 Akim Demaille <akim@lrde.epita.fr>
162
163 tests: style changes.
164 * tests/named-refs.at (Redundant words in LHS brackets)
165 (Unresolved references): here.
166
167 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
168
169 java: fix parser tracing bug.
170 * NEWS (2.5): Document.
171 * data/lalr1.java (YYParser::YYStack::print): Don't skip top
172 element.
173
174 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
175
176 java: finish fixing parser stack popping bug.
177 * NEWS (2.5): Document.
178 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
179 in clearing the location stack. Also fix pop function that
180 accepts no arguments.
181
182 2011-03-06 Angelo Borsotti <angelo.borsotti@gmail.com> (tiny change)
183
184 java: fix parser stack popping bug.
185 Reported at
186 <http://lists.gnu.org/archive/html/bug-bison/2011-02/msg00005.html>.
187 * THANKS (Angelo Borsotti): Add.
188 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
189 in clearing the value stack. Previously, the top element of the
190 stack wasn't cleared and so the value was not garbage collected.
191
192 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
193
194 doc: cite publication for LAC.
195 * doc/bison.texinfo (LAC): Here.
196
197 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
198
199 doc: clean up terminology for mysterious conflicts.
200 * doc/bison.texinfo (Mystery Conflicts): Rename node to...
201 (Mysterious Conflicts): ... this, which is already the section
202 title and the name used in the index. Update all cross-references
203 to this node. Also, don't imply that R/R conflicts are the only
204 kind of mysterious conflict.
205
206 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
207
208 lr.default-reductions: rename "all" value to "full".
209 States that shift the error token do not have default reductions,
210 and GLR disables some default reductions, so "all" was a misnomer.
211 * doc/bison.texinfo (%define Summary): Update.
212 (Default Reductions): Update.
213 * src/print.c (print_reductions): Update.
214 * src/reader.c (prepare_percent_define_front_end_variables):
215 Update.
216 * src/tables.c (action_row): Update.
217 * tests/input.at (%define enum variables): Update.
218 * tests/reduce.at (%define lr.default-reductions): Update.
219
220 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
221
222 doc: create a new Tuning LR section in the manual.
223 And clean up all other documentation of the features described
224 there.
225 * NEWS (2.5): Tweak wording of lr.type and parse.lac entries a
226 bit, update the cross-references to the manual, and point out that
227 LAC has caveats. Don't be so adamant that IELR+LAC=canonical LR.
228 That is, as the referenced section in the manual documents, LAC
229 does not fix infinite parsing loops on syntax errors.
230 * doc/bison.texinfo: Consistently drop the "(1)" suffix from LALR,
231 IELR, and LR in @cindex.
232 (%define Summary): Condense the entries for lr.default-reductions,
233 lr.keep-unreachable-states, lr.type, and parse.lac into brief
234 summaries, and cross-reference the appropriate subsections of
235 Tuning LR. For parse.lac, mention that it's only implemented for
236 deterministic parsers in C. In parse.error entry, mention LAC,
237 and add cross-reference to the LAC section.
238 (Error Reporting): When mentioning parse.error, mention LAC, and
239 add cross-reference to the LAC section.
240 (Tuning LR): New section with an extended version of the
241 documentation removed from %define Summary. Change all
242 cross-references in the manual to point here instead of there.
243 (Calc++ Parser): When mentioning parse.error, mention LAC, and add
244 cross-reference to the LAC section.
245 (Table of Symbols): In %error-verbose entry, add cross-reference
246 to Error Reporting.
247 (Glossary): Capitalize entry titles consistently. Add definitions
248 for "defaulted state" and "unreachable state". Expand IELR
249 acronym in IELR's entry.
250
251 2011-02-20 Joel E. Denny <joeldenny@joeldenny.org>
252
253 doc: add bibliography to manual.
254 * doc/bison.texinfo (Mystery Conflicts): Cross-reference
255 bibliography instead of citing publications directly.
256 (Generalized LR Parsing): Likewise.
257 (Bibliography): New section. Not all entries are cross-referenced
258 yet, but that will come in future patches.
259
260 2011-02-19 Joel E. Denny <joeldenny@joeldenny.org>
261
262 java: test and document previous bug fix.
263 * NEWS (2.5): Document it.
264 * tests/java.at (_AT_DATA_JAVA_CALC_Y): To one of the yyerror
265 invocations, pass a location that spans multiple tokens. Change
266 yyerror to report all of a location rather than just the begin
267 position. Extend yylex and Position to count tokens on a line.
268 Remove getHashCode as it's unused. Update all expected output.
269
270 2011-02-19 Bernd Kiefer <kiefer@dfki.de> (tiny change)
271
272 java: fix location handling bug.
273 Reported at
274 <http://lists.gnu.org/archive/html/bison-patches/2011-02/msg00005.html>.
275 * data/lalr1.java (YYParser::yylloc): For non-empty RHS, fix
276 reversed access to location stack.
277 * THANKS (Bernd Kiefer): Add.
278
279 2011-02-13 Joel E. Denny <joeldenny@joeldenny.org>
280
281 doc: fix some minor inconsistencies.
282 * doc/bison.texinfo (%define Summary): Fix mislabeled entry for
283 lex_symbol.
284 (%code Summary): For consistency with the variable list in the
285 %define Summary, enclose the list of %code qualifiers in a table
286 instead of an itemize.
287
288 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
289
290 doc: clean up new subsections in manual.
291 * doc/bison.texinfo (%define Summary): Reword so it reads well as
292 a separate section. For example, add an intro, and move most of
293 the text outside of the @deffn so it is not indented so far.
294 (%code Summary): Likewise.
295 (Table of Symbols): Reword %code entry to match the %code entry in
296 Decl Summary.
297
298 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
299
300 doc: finish splitting apart the manual's Decl Summary section.
301 Suggested by Akim Demaille at
302 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
303 * doc/bison.texinfo (Decl Summary): Extract most of the %define
304 entry into...
305 (%define Summary): ... this new subsection, and update all
306 cross-references. For readability of the patches, rewriting of
307 the text so it makes sense as a separate subsection will come in a
308 later patch. Moreover, the majority of the text describing the
309 various new LR features should likely move to another new section
310 somewhere.
311
312 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
313
314 doc: begin to split apart the manual's Decl Summary section.
315 Discussed in thread starting at
316 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
317 * doc/bison.texinfo (Decl Summary): Extract most of the %code
318 entry into...
319 (%code Summary): ... this new subsection, and update all
320 cross-references. For readability of the patches, rewriting of
321 the text so it makes sense as a separate subsection will come in a
322 later patch.
323
324 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
325
326 doc: clean up naming of various Bison files.
327 The Bison manual's names for various files associated with a Bison
328 parser has devolved into inconsistency. This patch makes the
329 naming consistent for the most important files. First, it chooses
330 "grammar file" over "input file". The former appears to be more
331 traditional in the Bison manual, and Bison has other input
332 files (skeletons). Second, it chooses "parser implementation
333 file" over names like "parser file", "parser source file", "parser
334 source code file", and "parser output file". The new name makes
335 it clearer where Bison generates the main parser implementation,
336 and it is easily distinguishable from "parser header file".
337 * doc/bison.texinfo: Implement throughout.
338
339 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
340
341 doc: give credit to more of Bison's developers.
342 * doc/bison.texinfo (Introduction): Don't imply that only Robert
343 Corbett, Richard Stallman, and Wilfred Hansen have contributed to
344 Bison. However, I don't have time to write a full history, so
345 just point readers to THANKS and ChangeLog.
346
347 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
348
349 doc: document experimental features better.
350 * doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
351 LR(1) are experimental. Mention Java. Normally experimental
352 features probably shouldn't be mentioned in the introduction.
353 However, if Bison's limitations to LALR(1), C, and C++ are so
354 important that they should be mentioned here, then it's important
355 to point out that Bison is beginning to escape those limitations.
356 Moreover, these particular experimental features have very little
357 chance of being removed.
358 * src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
359 experimental.
360
361 2011-01-29 Joel E. Denny <joeldenny@joeldenny.org>
362
363 Do not allow identifiers that start with a dash.
364 This cleans up our previous fixes for a bug whereby Bison
365 discarded `.field' in `$-1.field'. The previous fixes were less
366 restrictive about where a dash could appear in an identifier, but
367 the restrictions were hard to explain. That bug was reported and
368 this final fix was originally suggested by Paul Hilfinger. This
369 also fixes a remaining bug reported by Paul Eggert whereby Bison
370 parses `%token ID -123' as `%token ID - 123' and handles `-' as an
371 identifier. Now, `-' cannot be an identifier. Discussed in
372 threads beginning at
373 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
374 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
375 * NEWS (2.5): Update entry describing the dash extension to
376 grammar symbol names. Also, move that entry before the named
377 references entry because the latter mentions the former.
378 * doc/bison.texinfo (Symbol): Update documentation for symbol
379 names. As suggested by Paul Eggert, mention the effect of periods
380 and dashes on named references.
381 (Decl Summary): Update documentation for unquoted %define values,
382 which, as a side effect, can no longer start with dashes either.
383 * src/scan-code.l (id): Implement.
384 * src/scan-gram.l (id): Implement.
385 * tests/actions.at (Exotic Dollars): Extend test group to exercise
386 bug reported by Paul Hilfinger.
387 * tests/input.at (Symbols): Update test group, and extend to
388 exercise bug reported by Paul Eggert.
389 * tests/named-refs.at (Stray symbols in brackets): Update test
390 group.
391 ($ or @ followed by . or -): Likewise.
392 * tests/regression.at (Invalid inputs): Likewise.
393
394 2011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
395
396 * data/yacc.c: Fix last apostrophe warning from xgettext.
397
398 2011-01-09 Paul Eggert <eggert@cs.ucla.edu>
399
400 Fix minor problems encountered by a fresh bootstrap.
401 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
402 as they confuse xgettext, which tries to parse them as C character
403 constants in a preprocessor directive.
404 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
405 that expression might not promote to int on some platforms.
406 * src/parse-gram.c, src/parse-gram.h: Regenerate.
407
408 2011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
409
410 Improve error messages for `$' or `@' followed by `.' or `-'.
411 Previously, for this special case of an invalid reference, the
412 usual "symbol not found in production:" was printed. However,
413 because the symbol name was parsed as the empty string, that
414 message was followed immediately by a newline instead of a symbol
415 name. In reality, this is a syntax error, so the reference is
416 invalid regardless of the symbols actually appearing in the
417 production. Discussed at
418 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
419 * src/scan-code.l (parse_ref): Report the above case as a syntax
420 error. Other than that, continue to handle this case like any
421 other invalid reference that Bison manages to parse because
422 "possibly meant" messages can still be helpful to the user.
423 * tests/named-refs.at ($ or @ followed by . or -): New test group.
424
425 2011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
426
427 doc: don't use @acronym.
428 Lately, many GNU packages are dropping it. See
429 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
430 * doc/bison.texinfo: Remove all uses.
431
432 2011-01-05 Alex Rozenman <rozenman@gmail.com>
433
434 Do not allow identifiers that start with a negative number.
435 Reported by Paul Hilfinger as a side effect of named references
436 support at
437 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
438 Suggested by Paul Eggert.
439 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
440 * src/scan-gram.l ({letter}, {id}): Likewise.
441
442 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
443
444 * ChangeLog (2011-01-02): improve description.
445
446 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
447
448 maint: don't update copyright years in bootstrap.
449 * .x-update-copyright: Add entry for bootstrap.
450 * bootstrap: Remove 2011 from copyright years. The bootstrap
451 version we're currently using comes from an older version of
452 gnulib.
453 * bootstrap.conf (bootstrap_sync): Add comments explaining this
454 issue.
455
456 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
457
458 maint: run "make update-copyright".
459
460 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
461
462 maint: prepare to use year ranges in copyright notices.
463 * README (Copyright statements): New section explaining the range
464 notation. The GNU maintainers document requires this explanation:
465 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
466 I copied our explanation from coreutils.
467 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
468 disabled Bison's automated use of ranges.
469 * cfg.mk (update-copyright-env): Likewise.
470
471 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
472
473 Correct my email address.
474 * ChangeLog: In all recent entries.
475 * THANKS (Joel E. Denny): Here.
476
477 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
478
479 doc: cleanup.
480 * NEWS (2.5): Try to sort entries according to how interesting
481 users might find them.
482
483 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
484
485 doc: cleanup.
486 * NEWS (2.5): Make some minor improvements to wording, and format
487 entries more consistently.
488 * doc/bison.texinfo (Language and Grammar): Point out that IELR
489 and canonical LR are experimental features.
490 (Decl Summary): In list of %define variables, make wording more
491 consistent. Improve discussion of using LALR for GLR.
492
493 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
494
495 parse.lac: document.
496 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
497 other corrections to verbose syntax error messages.
498 * doc/bison.texinfo (Decl Summary): Rewrite entries for
499 lr.default-reductions and lr.type to be clearer, to mention
500 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
501 for parse.lac.
502 (Glossary): Add entry for LAC.
503
504 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
505
506 parse.lac: implement exploratory stack reallocations.
507 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
508 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
509 with values of "failures" (default) or "full".
510 (b4_declare_parser_state_variables): Add yyesa, yyes, and
511 yyes_capacity variables.
512 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
513 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
514 LAC requested.
515 (YYCOPY_NEEDED): New cpp macro.
516 (YYCOPY): Define if LAC requested.
517 (yy_lac_stack_realloc): New function implementing stack
518 reallocations. Use YYMAXDEPTH for maximum stack size given that
519 the stack should never need to grow larger than the main state
520 stack needs to grow without LAC.
521 (YY_LAC_ESTABLISH): Update yy_lac invocation.
522 (yy_lac): Add arguments for exploratory stack memory data
523 recorded in the main parser. Invoke yy_lac_stack_realloc when
524 reallocation is necessary.
525 (yysyntax_error): Add the same new arguments and pass them to
526 yy_lac.
527 (yypstate_delete): Free yyes if necessary.
528 (yyesa, yyes, yyes_capacity): #define these to yypstate members
529 in the case of push parsing.
530 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
531 Update yysyntax_error invocations. At yyreturn, free yyes if
532 necessary.
533 * src/parse-gram.y: %define parse.lac full.
534 * tests/input.at (LAC: errors for %define): Extend for
535 parse.lac-memory-trace.
536 * tests/regression.at (LAC: Exploratory stack): Extend to check
537 that stack reallocs happen when expected.
538 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
539 parse.lac.es-capacity-initial.
540
541 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
542
543 parse.lac: implement as %define variable.
544 LAC = lookahead correction. See discussion at
545 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
546 However, one point there must be corrected: because of %nonassoc,
547 LAC is *not* always redundant for lr.type=canonical-lr.
548 * data/yacc.c: Accept values of "none" (default) or "full" for
549 parse.lac. Accept %define parse.lac.es-capacity to specify
550 capacity of LAC's temporary exploratory stack. It defaults to 20
551 and, for now, will not grow dynamically.
552 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
553 parse.lac!=none.
554 (YYBACKUP): Invoke YY_LAC_DISCARD.
555 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
556 yy_lac and track when it needs to be invoked
557 (yy_lac): New function that, given the current stack, determines
558 whether a token can eventually be shifted. Return status mimics
559 yyparse return status.
560 (yysyntax_error): Change yystate argument to yyssp so stack top
561 can be passed to yy_lac. If LAC is requested, build expected
562 token list by invoking yy_lac for every token instead of just
563 checking the current state for lookaheads. Return 2 if yy_lac
564 exhausts memory.
565 (yyparse, yypush_parse): Use local variable yy_lac_established and
566 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
567 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
568 is requested.
569 * tests/conflicts.at (%nonassoc and eof): Extend to check the
570 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
571 (parse.error=verbose and consistent errors): Likewise.
572 (LAC: %nonassoc requires splitting canonical LR states): New test
573 group demonstrating how LAC can fix canonical LR.
574 * tests/input.at (LAC: Errors for %define): New test group.
575 * tests/regression.at (LAC: Exploratory stack): New test group.
576 (LAC: Memory exhaustion): New test group.
577
578 2010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
579
580 build: use gnulib's new bootstrap_sync option.
581 Now, whenever we update bison's copy of gnulib, bootstrap will
582 update itself the next time it's run.
583 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
584 * bootstrap.conf (bootstrap_sync): Set to true.
585 * gnulib: Update to latest so bootstrap is in sync now.
586
587 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
588
589 yysyntax_error: fix for consistent error with lookahead.
590 * NEWS (2.5): Document.
591 * data/yacc.c (yysyntax_error): In a verbose syntax error
592 message while in a consistent state with a default action (which
593 must be an error action given that yysyntax_error is being
594 invoked), continue to drop the expected token list, but don't
595 drop the unexpected token unless there actually is no lookahead.
596 Moreover, handle that internally instead of returning 1 to tell
597 the caller to do it. With that meaning of 1 gone, renumber
598 return codes more usefully.
599 (yyparse, yypush_parse): Update yysyntax_error usage. Most
600 importantly, set yytoken to YYEMPTY when there's no lookahead.
601 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
602 unexpected token unless there actually is no lookahead.
603 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
604 pass yyempty_ not yyla.type to yysyntax_error_.
605 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
606 token unless there actually is no lookahead.
607 * data/lalr1.java (YYParser::parse): If there's no lookahead,
608 set yytoken to yyempty_ before invoking yysyntax_error.
609 (YYParser::yysyntax_error): Again, don't drop the unexpected
610 token unless there actually is no lookahead.
611 * tests/conflicts.at (parse.error=verbose and consistent
612 errors): Extend test group to further reveal how the previous
613 use of the simple "syntax error" message was too general. Test
614 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
615 failure.
616 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
617 to...
618 * tests/local.at: ... here.
619 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
620 (AT_BISON_OPTION_POPDEFS): Pop it.
621 (AT_FULL_COMPILE): Extend to handle Java.
622
623 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
624
625 yysyntax_error: more preparation for readability of next patch.
626 There are no behavioral changes here.
627 * data/glr.c (yyreportSyntaxError): Reorganize.
628 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
629 * tests/conflicts.at (parse.error=verbose and consistent errors):
630 Reorganize.
631
632 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
633
634 yysyntax_error: prepare for readability of next patches.
635 These are purely whitespace changes that result in ugly code
636 but that make the next couple of patches much easier to read.
637 * data/glr.c (yyreportSyntaxError): Reindent.
638 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
639 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
640 * data/yacc.c (yysyntax_error): Reindent.
641
642 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
643
644 Fix memory leak.
645 * src/output.c (prepare_rules): Free temporary array.
646
647 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
648
649 yysyntax_error: improve invocation readability.
650 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
651 invocation, get rid of the while loop, which is misleading
652 because there are really at most two iterations.
653
654 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
655
656 * ChangeLog: Correct some errors in previous entries.
657
658 2010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
659
660 maint: re-anchor all .gitignore entries.
661 * bootstrap: Copy from gnulib's latest for the fix to
662 automatically anchor entries it constructs.
663 * gnulib: Update to latest just so it has the same bootstrap.
664 * .gitignore, build-aux/.gitignore, doc/.gitignore:
665 * lib/.gitignore, m4/.gitignore, po/.gitignore:
666 * runtime-po/.gitignore: Re-anchor all entries.
667
668 2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
669
670 Fix portability problem on OpenBSD 4.7.
671
672 Jim Meyering reported this in
673 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
674 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
675 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
676 for quite some time.
677 * src/parse-gram.c, src/parse-gram.h: Regenerate.
678 * tests/regression.at: Tamper with the renamed witness.
679
680 Adjust to recent changes to gnulib bootstrap.
681
682 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
683 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
684 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
685 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
686 anymore and don't know of anybody else who does. If someone needs
687 these files, they can resurrect them.
688 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
689 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
690 Omit leading '/', since bootstrap omits it.
691 Adjust file names to match current contents better.
692 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
693 installed just for us.
694 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
695 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
696 needed somehow. Don't have time to look into why.
697 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
698 the GNU malloc behavior, where malloc (0) != NULL unless we're
699 out of storage? If not, we can omit malloc-gnu; but for now I left
700 it in to be safe.
701 (vc_ignore): Remove.
702 (gnulib_mk_hook): New function.
703 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
704 uses that convention.
705
706 2010-09-09 Paul Hilfinger <hilfinger@cs.berkeley.edu>
707
708 * data/glr.c (yySymbol): Define as int to avoid compiler warnings about
709 possible change of value.
710
711 2010-09-08 Paul Hilfinger <hilfinger@cs.berkeley.edu>
712
713 * data/glr.c (yy_reduce_print): Change yyrhsVals to yyvsp to remove
714 compiler errors when using %debug.
715 Add declaration of yylow when locations in use to avoid compilation
716 error.
717 (yyglrReduce): Conditionalize message "Parse ... rejected by rule..."
718 on whether we are in split mode, for consistency with behavior of
719 non-GLR parsing.
720
721 2010-09-01 Akim Demaille <demaille@gostai.com>
722
723 Address GCC warnings about shadowed local variables (yyflag).
724 * data/glr.c (YYCHK): Rename yyflag as yychk_flag.
725 (yyprocessOneStack): Reduce the scope of yyaction, yyconflicts,
726 yyrule, and yyflag.
727
728 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
729
730 Version 2.4.3.
731 * NEWS (2.4.3): Set date.
732
733 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
734
735 maint: add gettext version to release announcements.
736 Suggested by Paul Hilfinger at
737 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
738 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
739 * cfg.mk (bootstrap-tools): Add gettext.
740
741 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
742
743 doc: fix -W and %expect documentation some.
744 * NEWS (2.4.3): Mention that there are documentation fixes.
745 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
746 turns conflicts into errors not warnings.
747 (Shift/Reduce): Likewise.
748 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
749
750 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
751
752 -Werror: fix for rules useless in parser after conflicts.
753 * NEWS (2.4.3): Document fix.
754 * src/complain.c (error_message): Extend to handle incomplete
755 error messages so warn and warn_at can be used in more cases.
756 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
757 -Werror is always obeyed.
758 * src/reduce.c (reduce_print): Use warn so that the "warnings
759 being treated as errors" message is printed consistently before
760 the first warning message. This makes testing easier.
761 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
762 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
763 --warnings=error when warnings appear in bison's stderr.
764
765 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
766
767 maint: enable gnits only at stable releases.
768 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
769 version string should disable gnits. Explain in comments.
770
771 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
772
773 i18n: update.
774 * po/POTFILES.in: Add src/graphviz.c.
775
776 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
777
778 i18n: fix for gnulib.
779 * po/POTFILES.in: Add remaining gnulib files that have
780 translatable strings.
781
782 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
783
784 build: fix our adjustments for gnulib files in lib.
785 * configure.ac: For prepending lib/ to the values of config
786 variables, fix detection of empty values. Also, due to recent
787 gnulib changes, add LIBUNISTRING_UNITYPES_H and
788 LIBUNISTRING_UNIWIDTH_H to the list of those variables.
789
790 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
791
792 maint: use announce-gen's new --mail-headers.
793 * HACKING (Announce): Update instructions.
794 * cfg.mk (announcement_Cc_): Define.
795 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
796 required by latest gnulib.
797 * gnulib: Update to latest.
798
799 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
800
801 tests: handle Valgrind that complains about >&-.
802 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
803 (Output files: -dv >&-): Skip test group if running
804 maintainer-check-valgrind.
805
806 2010-07-23 Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
807
808 * NEWS: Describe new semantic-predicate feature.
809 * data/c.m4 (b4_predicate_case): New definition.
810 * data/java.m4 (b4_predicate_case): New definition.
811 * data/glr.c (yyimmediate): Add definition.
812 (yydoAction): Remove comment, now obsolete.
813 Do YY_REDUCE_PRINT here.
814 (yyglrReduce): Alter comment to indicate that semantic values
815 need not be deferred.
816 Remove YY_REDUCE_PRINT from here; done in yydoAction.
817 (yyprocessOneStack): Pass immediate flag.
818 Delete stacks rejected by predicates in newly split-off parsers.
819 Change handling of yyerr so that only current stack gets deleted
820 when semantic predicate fails.
821 (yyfillin): Don't crash if a semantic value is unresolved (as may
822 happen in predicate rules).
823 Copy lr state as well in debugging mode.
824 Update comment on setting of yysval to include yyloc as well.
825 (yy_reduce_print): Add yynormal argument. Perform fillin properly.
826 Report unresolved RHS values.
827 (yyimmediate): New table.
828 * src/gram.h (struct rule): Add is_predicate field.
829 * src/output.c (user_actions_output): Use b4_predicate_case for
830 predicates.
831 (prepare_symbols): Output yyimmediate.
832 * src/scan-gram.l: Add %? token, SC_PREDICATE state.
833 * src/scan-code.l (code_props_rule_action_init): Add is_predicate
834 argument.
835 * src/scan-code.h (struct code_props): Add is_predicate field.
836 (code_props_rule_action_init): New interface.
837 * src/parse-gram.y (%?{...}): New token.
838 (rhs): Add %?{...} rule.
839 * src/parse-gram.c: Regenerate.
840 * src/parse-gram.h: Regenerate.
841 * src/reader.c (grammar_current_rule_action_append): Add
842 immediate argument.
843 (grammar_midrule_action): Use new interface for
844 code_props_rule_action_init.
845 (grammar_current_rule_action_append): Ditto.
846 (packgram): Transfer is_predicate value.
847 * src/reader.h (grammar_current_rule_action_append): New interface.
848 * doc/bison.texinfo: Document semantic predicates (%?).
849
850 * data/glr.c (yylhsNonterm, yyisDefaultedState,yyDefaultAction)
851 (yygetLRActions,yynewGLRStackItem,yyaddDeferredAction,yyinitStateSet)
852 (yyinitGLRStack,yyexpandGLRStack,yyupdateSplit,yymarkStackDeleted)
853 (yyundeleteLastStack,yyglrShift,yyglrShiftDefer,yydoAction,yyglrReduce)
854 (yyidenticalOptions,yymergeOptionSets,yyresolveStates,yyresolveAction)
855 (yyresolveLocations,yyresolveValue,yyreducePrint): Update parameter
856 names in comments and mention all parameters.
857 (struct yyGLRState): Fix description of yyposn field.
858 (yyresolveLocations): Correct comment so as not to imply action when
859 yyn1==0.
860
861 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
862
863 Update from GFDL GFDL 1.2 to 1.3.
864 * doc/bison.texinfo: Update GFDL version number.
865 * doc/fdl.texi: Update to version 1.3, taken from:
866 http://www.gnu.org/licenses/fdl.texi
867
868 Do not use date ranges in copyright notices.
869 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
870
871 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
872 * TODO, bootstrap, bootstrap.conf:
873 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
874 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
875 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
876 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
877 * data/lalr1.java, data/local.mk, data/location.cc:
878 * data/stack.hh, data/variant.hh, data/xslt/bison.xsl:
879 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
880 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
881 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
882 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
883 * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h:
884 * djgpp/testsuite.sed, doc/bison.texinfo, doc/local.mk:
885 * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk:
886 * examples/calc++/Makefile.am, examples/extexi:
887 * examples/local.mk, lib/abitset.c, lib/abitset.h:
888 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
889 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
890 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
891 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
892 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
893 * lib/libiberty.h, lib/local.mk, lib/main.c, lib/timevar.c:
894 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
895 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
896 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
897 * src/AnnotationList.c, src/AnnotationList.h:
898 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
899 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
900 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
901 * src/complain.h, src/conflicts.c, src/conflicts.h:
902 * src/derives.c, src/derives.h, src/files.c, src/files.h:
903 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
904 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
905 * src/ielr.h, src/lalr.c, src/lalr.h, src/local.mk:
906 * src/location.c, src/location.h, src/main.c:
907 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
908 * src/named-ref.h, src/nullable.c, src/nullable.h:
909 * src/output.c, src/output.h, src/parse-gram.y:
910 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
911 * src/print_graph.c, src/print_graph.h, src/reader.c:
912 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
913 * src/relation.h, src/scan-code.h, src/scan-code.l:
914 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
915 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
916 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
917 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
918 * tests/actions.at, tests/atlocal.in, tests/c++.at:
919 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
920 * tests/existing.at, tests/glr-regression.at:
921 * tests/headers.at, tests/input.at, tests/java.at:
922 * tests/local.at, tests/local.mk, tests/named-refs.at:
923 * tests/output.at, tests/push.at, tests/reduce.at:
924 * tests/regression.at, tests/sets.at, tests/skeletons.at:
925 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
926 Don't use date ranges in copyright notices.
927
928 2010-05-11 Akim Demaille <demaille@gostai.com>
929
930 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
931 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
932 header file to the implementation file, after the user %code
933 sections.
934 * NEWS (2.5): Document this.
935
936 2010-05-11 Akim Demaille <demaille@gostai.com>
937
938 doc: please Emacs.
939 * doc/bison.texinfo (Local Variables): Move this after the
940 LocalWords, since the latter are looked for in the whole document,
941 while the former are looked for only at its end.
942 Require american spell checking.
943
944 2010-05-10 Akim Demaille <demaille@gostai.com>
945
946 doc: fix lalr1.cc documentation.
947 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
948 (C++ Bison Interface): Fix lalr1.cc skeleton name.
949 (C++ Parser Interface): Fix semantic_type and location_type names.
950 Document yy::parser::token.
951 Reported by Jerry Quinn.
952
953 2010-05-10 Akim Demaille <demaille@gostai.com>
954
955 c++: use YYRHSLOC.
956 * data/lalr1.cc (YYRHSLOC): New.
957 (YYLLOC_DEFAULT): Use it.
958 * data/glr.cc: If location_type was user defined, do not include
959 location.hh, and do not produce location.hh and position.hh.
960 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
961 Check that glr.cc supports user defined location_type.
962 * NEWS: Document this.
963
964 2010-05-07 Akim Demaille <demaille@gostai.com>
965
966 doc: fix typo.
967 * tests/synclines.at: here.
968
969 2010-05-04 Akim Demaille <demaille@gostai.com>
970
971 tests: enhance AT_SYNCLINES_COMPILE.
972 * tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
973 (AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
974 taken care of in AT_SYNCLINES_COMPILE.
975
976 2010-05-04 Akim Demaille <demaille@gostai.com>
977
978 lalr1.cc: don't generate location.hh when location_type is defined
979 * data/bison.m4 (b4_percent_define_get): Accept a default value.
980 * data/c++.m4: Do not provide a default value for the %define
981 variable location_type, rather, use b4_percent_define_get with a
982 default argument where its value is needed.
983 * data/lalr1.cc: Do not load location.cc (which outputs both
984 location.hh and position.hh) if the user defined location_type.
985 Do not include location.hh either.
986
987 2010-05-04 Akim Demaille <demaille@gostai.com>
988
989 lalr1.cc: minor refactoring.
990 * data/lalr1.cc: Don't issue empty namespaces.
991
992 2010-05-04 Akim Demaille <demaille@gostai.com>
993
994 tests: fix %printer.
995 Currently, there is no check that %printer ... <foo> (nor
996 %destructor) is about an existing <foo> type. This C++ test had
997 it wrong (<::std::string> vs. <std::string>).
998
999 * tests/c++.at (AT_CHECK_VARIANTS): In list.yy, redefine the
1000 pretty-printing of lists into something better for parser traces.
1001 Update the expected output.
1002 Fix correspondance between %type/%token and %printer.
1003
1004 2010-05-04 Akim Demaille <demaille@gostai.com>
1005
1006 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
1007 * tests/calc.at (Span): Instead of begin/end, as in the built-in
1008 location class, use first and last.
1009 Define YYLLOC_DEFAULT to adjust to these changes.
1010 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
1011 location_type changes.
1012
1013 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
1014
1015 tests: fix maintainer-xml-check.
1016 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
1017 Update output to include comments now produced by --graph.
1018 (xsl:template match="automaton"): As for --graph, name the
1019 digraph after the grammar file.
1020 * src/print-xml.c (escape_bufs): Enlarge array.
1021 (print_xml): Add bug-report and url attributes to
1022 bison-xml-report element.
1023
1024 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
1025
1026 In DOT output, convert from "/*" comments to "//" comments.
1027 This handles the possibility that a "*/" might appear in
1028 variable portions of those comments at some point in the future.
1029 * src/graphviz.c (start_graph): Implement.
1030
1031 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
1032
1033 Document that undefined %prec identifier warnings will remain.
1034 * NEWS (2.4.3): Here.
1035 (2.4.2): Here.
1036
1037 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
1038
1039 Revert 2009-12-30 change for undefined %prec token complaints.
1040 That is, keep them as warnings because that should be sufficient
1041 to satisfy POSIX without creating backward compatibility issues.
1042 Suggested by Richard Stallman at
1043 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
1044 * NEWS (2.5): Remove mention of complaint.
1045 * src/reader.c (grammar_rule_check): Convert complaint back to
1046 warning.
1047 * tests/input.at (%prec's token must be defined): Update.
1048
1049 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
1050
1051 build: don't require src/bison during bootstrap.
1052 Suggested by Eric Blake at
1053 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
1054 * bootstrap.conf (bootstrap_epilogue): New function to make sure
1055 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
1056
1057 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
1058
1059 i18n: fix untranslatable string.
1060 Reported by Goran Uddeborg at
1061 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
1062 * src/muscle-tab.c (muscle_percent_define_insert): Here.
1063
1064 2010-04-13 Akim Demaille <demaille@gostai.com>
1065
1066 tests: calc: minor refactoring.
1067 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
1068
1069 2010-04-13 Akim Demaille <demaille@gostai.com>
1070
1071 tests: calc: simplify location management.
1072 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
1073 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
1074 define the appropriate AT_LOC accessors.
1075 * tests/calc.at: Use AT_LOC accessors.
1076
1077 2010-04-13 Akim Demaille <demaille@gostai.com>
1078
1079 test location_type.
1080 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
1081 Define AT_LOCATION_TYPE_IF.
1082 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
1083 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
1084 used, provide a user location type and use it.
1085 (Simple LALR1 C++ Calculator): Add a test case for location_type.
1086
1087 2010-04-13 Akim Demaille <demaille@gostai.com>
1088
1089 tests: check fclose's return value.
1090 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
1091
1092 2010-04-13 Akim Demaille <demaille@gostai.com>
1093
1094 tests: don't depend on the actual location type.
1095 * tests/calc.at: Use yy::parser::location_type rather than
1096 yy::location, since the former is always right, and might point to
1097 another type than the latter.
1098
1099 2010-04-13 Akim Demaille <demaille@gostai.com>
1100
1101 formatting changes.
1102 * tests/calc.at: Formatting changes.
1103
1104 2010-04-13 Akim Demaille <demaille@gostai.com>
1105
1106 lalr1.cc: remove useless forward declaration.
1107 * data/lalr1.cc: Include location.hh before stack.hh.
1108 Remove the useless forward declarations of position and location.
1109 Reported by Chris Morley.
1110 * data/glr.cc: Likewise.
1111
1112 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
1113
1114 * NEWS (2.4.3): Mention fix for Sun Studio C++.
1115
1116 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
1117
1118 tests: fix for newer Sun Studio C++.
1119 Reported by Dagobert Michelsen at
1120 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
1121 * THANKS (Dagobert Michelsen): Add.
1122 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
1123 Autoconf macro for handling the restrict keyword.
1124 * gnulib: Update to latest, which no longer overrides that macro
1125 from Autoconf.
1126
1127 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1128
1129 portability: fix pointer arithmetic to conform to C standard.
1130 Reported by Tys Lefering at
1131 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
1132 This fix is already implemented in glr.c and does not apply to
1133 lalr1.java.
1134 * data/lalr1.cc (yy::parser::parse): Increase size of
1135 yyerror_range and adjust subscripting so you don't have to
1136 subtract one from the beginning of the array.
1137 * data/yacc.c (b4_declare_parser_state_variables,
1138 yyparse, yypush_parse): Likewise.
1139
1140 2010-04-05 Akim Demaille <demaille@gostai.com>
1141
1142 remove useless include.
1143 * src/graphviz.h: Don't include stdbool.h.
1144
1145 2010-04-05 Akim Demaille <demaille@gostai.com>
1146
1147 graph: sign the output file.
1148 * src/graphviz.c (start_graph): Issue comments about Bison.
1149 Suggested by Tys Lefering.
1150
1151 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
1152
1153 portability: fix test suite for GCC 4.5's new #error message.
1154 Reported by Tys Lefering at
1155 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
1156 * NEWS (2.4.3): Mention.
1157 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
1158
1159 2010-03-30 Akim Demaille <demaille@gostai.com>
1160
1161 fix comments.
1162 * src/graphviz.h: Add missing license notice.
1163 Document.
1164
1165 2010-03-25 Akim Demaille <demaille@gostai.com>
1166
1167 tests: fix 250: parse.error=verbose overflow.
1168 * tests/regression.at (parse.error=verbose overflow): Avoid the
1169 double inclusion of stdlib.h as it triggers hard errors.
1170
1171 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1172
1173 portability: fix for BSD make.
1174 Reported by Johan van Selst at
1175 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
1176 * tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
1177 this dependency list as in package.m4's target rule.
1178
1179 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1180
1181 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
1182 Reported by Johan van Selst at
1183 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
1184 * NEWS (2.4.3): New.
1185 * THANKS (Johan van Selst): Add.
1186 * etc/prefix-gnulib-mk (prefix): Adjust regex for makefile
1187 targets so that gnulib's new c++defs.h is matched.
1188 * gnulib: Update to latest.
1189
1190 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1191
1192 maint: update for changes to gnulib's announce-gen.
1193 * HACKING (Announce): RELEASE_TYPE=major must now be written
1194 RELEASE_TYPE=stable.
1195
1196 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1197
1198 Version 2.4.2.
1199 * NEWS (2.4.2): Set version and date. For the recent test suite
1200 portability fixes, don't be so optimistic about their success
1201 given the lack of feedback on the affected platforms.
1202
1203 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1204
1205 tests: fix maintainer-xml-check for recent changes.
1206 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
1207 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
1208 output file whose name conflicts with a previous output file
1209 is now never generated.
1210
1211 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1212
1213 portability: fix several issues with M4 subprocess.
1214
1215 M4's output pipe was not being drained upon fatal errors during
1216 scan_skel. As a result, broken-pipe messages from M4 were seen
1217 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
1218 failure in the test suite. The problem was that, on platforms
1219 where the default disposition for SIGPIPE is ignore instead of
1220 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
1221 then reported it. However, there's some sort of race condition,
1222 because the new test group occasionally succeeded.
1223 Reported by Albert Chin at
1224 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
1225
1226 There were also problems with the test suite livelocking on
1227 Tru64 5.1b. Reported by Didier Godefroy at
1228 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
1229 Switching to create_pipe_bidi suggested by Akim Demaille.
1230
1231 To attempt to solve both of these problems, switch to gnulib's
1232 create_pipe_bidi and register M4 process as a slave. Along the
1233 way, clean up file name conflict handling, which was affected by
1234 the broken-pipe problem before the switch.
1235 * NEWS (2.4.2): Document.
1236 * THANKS (Didier Godefroy): Add.
1237 * bootstrap.conf (gnulib_modules): Add pipe.
1238 * gnulib: Update to latest to make sure we have all the latest
1239 fixes.
1240 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
1241 subpipe.c.
1242 * po/POTFILES.in (lib/subpipe.c): Remove.
1243 * src/files.c (compute_output_file_names): Update invocations
1244 of output_file_name_check.
1245 (output_file_name_check): In the case that the grammar file
1246 would be overwritten, use complain instead of fatal, but replace
1247 the output file name with /dev/null. Use the /dev/null solution
1248 for the case of two conflicting output files as well because it
1249 seems safer in case Bison one day tries to open both files at
1250 the same time.
1251 * src/files.h (output_file_name_check): Update prototype.
1252 * src/output.c (output_skeleton): Use create_pipe_bidi and
1253 wait_subprocess. Assert that scan_skel completely drains the
1254 pipe.
1255 * src/scan-skel.l (at_directive_perform): Update
1256 output_file_name_check invocation.
1257 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
1258 grammar file actually isn't overwritten.
1259 (Conflicting output files: -o foo.y): Update expected output.
1260 * tests/skeletons.at (Fatal errors but M4 continues producing
1261 output): New test group.
1262
1263 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
1264
1265 Update POTFILES.
1266 * HACKING (Release Procedure): Add reminder about keeping
1267 POTFILES files up-to-date.
1268 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
1269
1270 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
1271
1272 Code cleanup.
1273 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
1274 which is already defined in atconfig.
1275
1276 2010-01-22 Joel E. Denny <jdenny@clemson.edu>
1277
1278 tests: fix missing include caught by g++ 4.4.1.
1279 Reported by Tys Lefering.
1280 * HACKING (Release checks): Add note about trying a recent GCC.
1281 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
1282 cstdlib for abort.
1283 (_AT_DATA_EXPECT2_Y): Likewise.
1284
1285 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
1286
1287 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
1288
1289 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
1290
1291 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
1292 * HACKING (Release Procedure): Update notes on copyright years.
1293 * Makefile.am (update-package-copyright-year): New target rule.
1294 * build-aux/update-package-copyright-year: New file.
1295 * cfg.mk (update-copyright): Add update-package-copyright-year
1296 as a dependency.
1297
1298 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1299
1300 * bootstrap: Import improvements from latest gnulib.
1301
1302 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1303
1304 build: require Automake 1.11.1 to avoid a security flaw.
1305 * HACKING (Release Procedure): Don't document Automake security
1306 flaw here.
1307 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
1308 why here.
1309
1310 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1311
1312 gnulib: update to latest.
1313
1314 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1315
1316 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
1317
1318 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
1319
1320 Thank the developer of the initial push parser implementation.
1321 This unfortunate oversight is several years old.
1322 * THANKS (Odd Arild Olsen): Add.
1323
1324 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
1325
1326 Fix some comments concerning LR(0) versus LALR(1).
1327
1328 Stop equating LR(0) with nondeterminism and LALR(1) with
1329 determinism. That is, if all states are consistent, then LR(0)
1330 tables are deterministic. On the other hand, LALR(1) tables
1331 might be nondeterministic before conflict resolution, and GLR
1332 permits LALR(1) tables to remain nondeterministic.
1333 * src/LR0.c, src/LR0.h: Here.
1334 * src/lalr.c, src/lalr.h: Here.
1335 * src/main.c (main): Here.
1336 * src/state.c, src/state.h: Here.
1337
1338 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
1339 parser tables.
1340
1341 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
1342
1343 maint: run "make update-copyright"
1344
1345 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
1346
1347 POSIX: complain if %prec's token was not defined.
1348 * NEWS (2.5): Document.
1349 * src/reader.c (grammar_rule_check): Convert warning to
1350 complaint.
1351 * tests/input.at (%prec's token must be defined): Update.
1352
1353 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
1354
1355 POSIX: warn if %prec's token was not defined.
1356 Reported by Florian Krohm at
1357 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
1358 * NEWS (2.4.2): Document.
1359 * src/reader.c (grammar_rule_check): Implement.
1360 (grammar_current_rule_prec_set): Add comments explaining that we
1361 here assume a %prec identifier is a token, but we still manage
1362 to support POSIX.
1363 * tests/input.at (%prec's token must be defined): New test
1364 group.
1365
1366 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
1367
1368 * HACKING (Release Procedure): Recommend a secure automake.
1369
1370 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
1371
1372 portability: `<' and `>' are not always defined on addresses.
1373 Specifically, don't sort objects by their memory addresses when
1374 they're not allocated in the same array or other object. Though
1375 I haven't found a test case where that fails on my platform, C
1376 says the behavior is undefined.
1377 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1378 FIXME. Use new id field of InadequacyList nodes rather than
1379 their memory addresses when sorting.
1380 (AnnotationList__compute_from_inadequacies): Add
1381 inadequacy_list_node_count argument to pass to
1382 InadequacyList__new_conflict.
1383 * src/AnnotationList.h
1384 (AnnotationList__compute_from_inadequacies): Update prototype
1385 and documentation for new argument.
1386 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1387 node_count argument and use it to assign a unique ID.
1388 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1389 (InadequacyList): Add id field.
1390 (InadequacyList__new_conflict): Update prototype and
1391 documentation for new argument.
1392 * src/ielr.c (ielr_compute_annotation_lists): Update
1393 AnnotationList__compute_from_inadequacies invocation.
1394
1395 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
1396
1397 Fix handling of yychar manipulation in user semantic actions.
1398 The problem was that yacc.c didn't always update the yychar
1399 translation afterwards. However, other skeletons appear to be
1400 fine. glr.c appears to already translate yychar before every
1401 use. lalr1.cc does not define yychar and does not document its
1402 replacement, yyla, for users. It does provide yyclearin, but
1403 that does not manipulate yyla and thus requires no translation
1404 update. In lalr1.java, yychar is out of scope during semantic
1405 actions.
1406 * NEWS (2.5): Document.
1407 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1408 yytoken here.
1409 (yyparse, yypush_parse): Instead, translate before every use of
1410 yytoken, and add comments explaining this approach.
1411 * tests/actions.at (Destroying lookahead assigned by semantic
1412 action): New test group checking that translation happens before
1413 lookahead destructor calls at parser return. Previously,
1414 incorrect destructors were called.
1415 * tests/conflicts.at (parse.error=verbose and consistent
1416 errors): New test group checking that translation happens at
1417 syntax error detection before the associated verbose error
1418 message and the associated lookahead destructor calls. While
1419 the destructor call is fixed by this patch, the verbose error
1420 message is currently incorrect due to another bug (see
1421 comments in test group), so this is an expected failure for now.
1422
1423 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1424
1425 YYFAIL: warn about uses and remove from lalr1.java.
1426 * NEWS (2.5): Document.
1427 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
1428 and make it private. Update all uses.
1429 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1430
1431 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1432
1433 YYFAIL: deprecate.
1434 * NEWS (2.4.2): Document deprecation and the phase-out plan.
1435 * data/lalr1.java (YYParser::YYFAIL): Add comment about
1436 deprecation.
1437 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1438 YYFAIL from GCC cpp's -Wunused-macros.
1439 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1440 documentation.
1441 (LocalWords): Remove YYFAIL.
1442
1443 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
1444
1445 tests: cleanup.
1446 * tests/c++.at (Syntax error discarding no lookahead): Don't
1447 ignore stderr. Instead, eliminate remaining warnings.
1448
1449 2009-12-18 Joel E. Denny <jdenny@clemson.edu>
1450
1451 lalr1.cc: don't discard non-existent lookahead on syntax error.
1452 * data/lalr1.cc (yy::parser::parse): Check yyempty first.
1453 * tests/c++.at (Syntax error discarding no lookahead): New test
1454 group.
1455
1456 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
1457
1458 Code cleanup.
1459 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1460 function, which is no longer used.
1461
1462 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1463
1464 Add gcc's -Wundef to test suite and fix another warning from it.
1465 * NEWS (2.4.2): Update description of -Wundef fix.
1466 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1467 (WARN_CFLAGS_TEST): New substitution.
1468 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1469 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1470 WARN_CFLAGS.
1471 (NO_WERROR_CFLAGS): Likewise.
1472 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1473
1474 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1475
1476 * data/yacc.c: Reformat m4 a little.
1477
1478 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1479
1480 Document gcc -Wundef fix.
1481 * NEWS (2.4.2): Here.
1482 * THANKS (Jonathan Nieder): Add.
1483
1484 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1485
1486 Simplify y.tab.c when location tracking is disabled.
1487 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1488 tracking is not enabled. Instead, unconditionally define
1489 YY_LOCATION_PRINT as a no-op for backward compatibility.
1490
1491 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1492
1493 Avoid warnings from gcc -Wundef y.tab.c.
1494 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1495 defined before using them.
1496 * data/lalr1.cc: Likewise.
1497 * data/yacc.c: Likewise.
1498
1499 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1500
1501 autoconf: update to latest for fix of M4 detection.
1502 Reported by Eric Blake.
1503 * submodules/autoconf: Update.
1504
1505 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1506
1507 portability: use -DGNULIB_POSIXCHECK.
1508 Reported by Eric Blake. See discussions at
1509 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1510 and
1511 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1512 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1513 * bootstrap.conf (gnulib_modules): Add all the printf modules
1514 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1515 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1516 (excluded_files): Remove m4/printf-posix.m4.
1517 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1518 lib/libbison.a so gnulib libraries can be linked.
1519
1520 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1521
1522 gnulib: update for fix of fprintf-posix, which we'll use soon.
1523 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
1524 targets so that gnulib's new arg-nonnull.h and link-warning.h
1525 are matched.
1526 * gnulib: Update.
1527
1528 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1529
1530 Enable assertion output and --disable-assert for configure.
1531 * bootstrap.conf (gnulib_modules): Add assert module.
1532 * src/system.h (aver): Define as assert, and summarize the
1533 discussion on this issue.
1534
1535 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1536
1537 Expand GLR acronym in summary of Bison.
1538 Based on discussion with Akim Demaille starting at
1539 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1540 * doc/bison.texinfo (Introduction): Here.
1541 * src/getargs.c (usage): Here.
1542
1543 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1544
1545 Document named references.
1546 * doc/bison.texinfo (Actions): Add new example and xref to
1547 Using Named References node.
1548 (Using Named References): New node.
1549
1550 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1551
1552 cleanup.
1553 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1554 of char*.
1555 (Sbitset__isEmpty): Use Sbitset instead of char*.
1556 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1557 instead of char. This helps to avoid casting errors.
1558 (Sbitset__or): Use Sbitset instead of char*.
1559
1560 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1561
1562 portability: don't assume 8-bit bytes.
1563 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1564 * src/Sbitset.h (Sbitset__nbytes): Here.
1565 (Sbitset__byteAddress): Here.
1566 (Sbitset__bit_mask): Here.
1567 (Sbitset__last_byte_mask): Here.
1568 (Sbitset__ones): Here.
1569 (SBITSET__FOR_EACH): Here.
1570
1571 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
1572
1573 portability: use va_start and va_end in the same function.
1574 * src/complain.c (error_message): Move va_end from here...
1575 (ERROR_MESSAGE): ... to here.
1576
1577 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1578
1579 * data/bison.m4: Update comments for rename to muscle-tab.h.
1580
1581 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
1582
1583 Minor code cleanup.
1584 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1585 replace all uses with UNIQSTR_CONCAT.
1586 * src/uniqstr.c (uniqstr_vsprintf): New function.
1587 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1588 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1589 macros.
1590
1591 2009-10-06 Joel E. Denny <jdenny@clemson.edu>
1592
1593 * TODO (Complaint submessage indentation): New.
1594
1595 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1596
1597 Minor code cleanup.
1598 * src/parse-gram.y: Clean up sorting of declarations.
1599 Use types to simplify %printer declarations where possible.
1600 Provide %printer for BRACKETED_ID and symbol.prec.
1601 * src/symtab.c: Whitespace change.
1602
1603 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1604
1605 tests: skip tests of file names that platform does not support.
1606 Reported by Michael Raskin at
1607 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1608 * THANKS (Michael Raskin): Add.
1609 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1610 to fail at least for file names containing ":" or "\".
1611
1612 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1613
1614 yysyntax_error: avoid duplicate lookahead collection.
1615 Except when memory reallocation is required, this change
1616 eliminates the need to invoke yysyntax_error twice and thus to
1617 repeat the collection of lookaheads. It also prepares for
1618 future extensions that will make those repetitions more
1619 expensive and that will require additional memory management in
1620 yysyntax_error. Finally, it fixes an obscure bug already
1621 exercised in the test suite.
1622 * data/yacc.c (yysyntax_error): Add arguments for message
1623 buffer variables stored in the parser. Instead of size, return
1624 status similar to yyparse status but indicating success of
1625 message creation. Other than the actual reallocation of the
1626 message buffer, import and clean up memory management code
1627 from...
1628 (yyparse, yypush_parse): ... here.
1629 * tests/regression.at (parse.error=verbose overflow): No longer
1630 an expected failure.
1631
1632 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1633
1634 yysyntax_error: test memory management more.
1635 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1636 * tests/regression.at (parse.error=verbose and
1637 YYSTACK_USE_ALLOCA): New test group.
1638 (parse.error=verbose overflow): New test group that reveals an
1639 obscure bug. Expected fail for now.
1640
1641 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1642
1643 benchmarks: use %debug consistently among grammars.
1644 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
1645 %debug by default. It can affect the timings even if yydebug=0.
1646 (generate_grammar_calc): For consistency with other grammars,
1647 use YYDEBUG environment variable to set yydebug.
1648
1649 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
1650
1651 Remove dead code.
1652 * src/symtab.c (symbol_pack): Here because every symbol's number
1653 is always defined by this time.
1654
1655 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1656
1657 Add additional space after periods in NEWS.
1658 * NEWS (2.5): here.
1659
1660 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
1661
1662 Use the correct conversion specifier for size_t.
1663 Reported by Jim Meyering.
1664 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1665 because Sbitset__Index is size_t.
1666 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1667
1668 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
1669
1670 tests: don't abuse AT_BISON_CHECK.
1671 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1672 additional shell commands outside of AT_BISON_CHECK.
1673
1674 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
1675
1676 tests: check that parse-gram.y's IELR and LALR are identical.
1677 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1678 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1679 group.
1680
1681 2009-09-19 Alex Rozenman <rozenman@gmail.com>
1682
1683 Keep sub-messages aligned. Fix strings for translation.
1684 * src/location.h (location_print): Add return value.
1685 * src/location.c (location_print): Return number of printed
1686 characters.
1687 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1688 new functions.
1689 * src/complain.cpp (indent_ptr): New static variable.
1690 (error_message, complain_at_indent, warn_at_indent): Implement
1691 the alignment mechanism.
1692 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1693 for translations. Use new alignment mechanism.
1694 * tests/named-ref.at: Adjust test-cases.
1695 * NEWS (2.5): Add an announcement about named references.
1696
1697 2009-09-17 Akim Demaille <demaille@gostai.com>
1698
1699 doc: fixes.
1700 * doc/bison.texinfo: here.
1701 Reported by Alex Rozenman.
1702
1703 2009-09-16 Akim Demaille <demaille@gostai.com>
1704
1705 doc: lalr1.cc and variants.
1706 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
1707 "variant" %define variables.
1708 (C++ Semantic Values): Split into...
1709 (C++ Unions, C++ Variants): these.
1710 The latter is new.
1711 (C++ Parser Interface): Fix type names.
1712 Document parser::syntax_error.
1713 Document the fact that locations are not mandatory.
1714 (C++ Scanner Interface): Split into...
1715 (Split Symbols, Complete Symbols): these.
1716 The later is new.
1717 (Calc++ Parsing Driver): Use variants.
1718 Add more comments.
1719 Adjust style.
1720 (Calc++ Parser): Declare all the tokens, no
1721 longer accept raw characters.
1722 Remove %union.
1723 Adjust types and printers.
1724 Remove destructors.
1725 (Calc++ Scanner): Use make_<SYMBOL> functions.
1726 Use strerror in error message.
1727
1728 2009-09-16 Akim Demaille <demaille@gostai.com>
1729
1730 doc: spell checking.
1731 * doc/bison.texinfo: here.
1732
1733 2009-09-16 Akim Demaille <demaille@gostai.com>
1734
1735 doc: comment changes.
1736 * doc/bison.texinfo: Comment changes.
1737
1738 2009-09-16 Akim Demaille <demaille@gostai.com>
1739
1740 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
1741 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
1742 constructor to take a token_type instead of the (internal) symbol
1743 number.
1744 Call yytranslate_.
1745 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
1746 don't call yytranslate_ here.
1747
1748 2009-09-16 Akim Demaille <demaille@gostai.com>
1749
1750 TODO: statistics.
1751 * TODO (Figures): New.
1752
1753 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
1754
1755 tests: clean up push.at test group titles.
1756 * tests/push.at: Remove "Push Parsing: " from test group titles
1757 because these are already under the banner "Push Parsing Tests".
1758
1759 2009-09-12 Alex Rozenman <rozenman@gmail.com>
1760
1761 Provide an additional sub-message for clarity.
1762 Add "symbol not found in production" error message when
1763 an "invalid reference" is detected in named references
1764 resolution.
1765 * src/scan-code.l: Update "invalid reference" case.
1766 * tests/named-ref.at: Adjust test-cases.
1767
1768 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1769
1770 Clean up yacc.c a little.
1771 * data/yacc.c: Clean up M4 for readability, and make output
1772 whitespace more consistent. For the main parse function
1773 comment, instead of saying "yyparse or yypush_parse", say either
1774 "yyparse" or "yypush_parse" depending on which it actually is.
1775
1776 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1777
1778 Fix --enable-gcc-warnings.
1779 * src/parse-gram.y (%printer <param>): Handle param_none.
1780
1781 2009-09-09 Akim Demaille <demaille@gostai.com>
1782
1783 lalr1.cc: syntax_error as exceptions.
1784 It is common to use sort of factories in the user actions. These
1785 factories may check some "syntactic" constraints that are not
1786 enforced by the grammar itself. This is possible using YYERROR
1787 within the action itself. Provide the user with a means to throw
1788 a syntax_error exception.
1789
1790 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
1791 Declare and define yy::parser::syntax_error.
1792 * data/lalr1.cc: Include stdexcept.
1793 (yy::parser::parse): Wrap the user action within a try/catch.
1794 * data/glr.cc: Include stdexcept.
1795
1796 2009-09-09 Akim Demaille <demaille@gostai.com>
1797
1798 lalr1.cc: add missing "inline".
1799 * data/c++.m4 (b4_public_types_define): Add missing inline to
1800 implementations provided in headers.
1801
1802 2009-09-09 Akim Demaille <demaille@gostai.com>
1803
1804 %param: documentation.
1805 * NEWS (2.6): Document %param, %lex-param, and %parse-param
1806 changes.
1807 * doc/bison.texinfo: Document that %lex-param and %parse-param
1808 are n-ary.
1809 Changes some examples to demonstrate it.
1810 (Calc++ Parser): Use %param.
1811
1812 2009-09-09 Akim Demaille <demaille@gostai.com>
1813
1814 Regen.
1815
1816 2009-09-09 Akim Demaille <demaille@gostai.com>
1817
1818 style changes.
1819 * src/parse-gram.y (add_param): Scope changes.
1820
1821 2009-09-09 Akim Demaille <demaille@gostai.com>
1822
1823 %parse: support several arguments.
1824 * src/parse-gram.y (current_param): New.
1825 (param_type): Add param_none.
1826 (params): New nonterminal.
1827 Use it.
1828
1829 2009-09-09 Akim Demaille <demaille@gostai.com>
1830
1831 Regen.
1832
1833 2009-09-09 Akim Demaille <demaille@gostai.com>
1834
1835 %param.
1836 Provide a means to factor lex-param and parse-param common
1837 declarations.
1838
1839 * src/parse-gram.y (param_type): New.
1840 Define a %printer for it.
1841 (add_param): Use it.
1842 (%parse-param, %lex-param): Merge into...
1843 (%parse): this new token.
1844 Adjust the grammar to use it.
1845 * src/scan-gram.l (RETURN_VALUE): New.
1846 (RETURN_PERCENT_FLAG): Use it.
1847 (RETURN_PERCENT_PARAM): New.
1848 Use it to support %parse-param, %lex-param and %param.
1849
1850 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1851
1852 Use aver not assert.
1853 * src/output.c: Don't include assert.h.
1854 (output_skeleton): Use aver not assert.
1855 * src/system.h (aver): In documentation of why, add links to
1856 Paul Eggert's explanations in the mailing lists.
1857
1858 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1859
1860 Use "Unresolved reference" error message when no symbols were found
1861 in a symbolic reference resolution. Remove .expr and -expr from
1862 the shown reference when the reference is unresolved.
1863 * src/scan-code.l: Change the error message, adjust location columns,
1864 rename variable "exact_mode" to "explicit_bracketing".
1865 * tests/named-ref.at: Adjust existing tests and add a new one.
1866
1867 2009-09-04 Akim Demaille <demaille@gostai.com>
1868
1869 Adjust synclines in src/parse-gram.[ch].
1870 * tests/bison.in: Do some magic (including working around issues
1871 with ylwrap) when this wrapper is used to compile
1872 src/parse-gram.y.
1873
1874 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1875
1876 Complain about unused %define variables and %code qualifiers.
1877 * NEWS (2.5): Document.
1878 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1879 * doc/bison.texinfo (Decl Summary): Document complaint, and
1880 improve %define documentation a little otherwise.
1881 * tests/input.at (Reject unused %code qualifiers): Update.
1882 (%define errors): Update.
1883 (%define, --define, --force-define): Update.
1884 (%define backward compatibility): Update.
1885 (Unused %define api.pure): Update.
1886 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1887
1888 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1889
1890 Don't suppress warnings about unused parse.error.
1891 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
1892 %define variable parse.error unless b4_error_verbose_flag is
1893 actually expanded in a skeleton.
1894
1895 2009-09-03 Akim Demaille <demaille@gostai.com>
1896
1897 * NEWS (2.4.2): Add "Internationalization" item.
1898
1899 2009-09-03 Akim Demaille <demaille@gostai.com>
1900
1901 bootstrap: fix/improve find_tool.
1902 * bootstrap (find_tool): Improve error messages.
1903 Fix typo about find_tool_names.
1904
1905 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1906
1907 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1908 See
1909 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1910 * src/scan-code.h (code_props_rule_action_init): Rename
1911 named_ref arg to name so it doesn't shadow named_ref type. This
1912 makes it consistent with the function definition in scan-code.l
1913 anyway.
1914
1915 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1916
1917 %define: accept unquoted values.
1918 * NEWS (2.5): Group all %define changes together, and document
1919 this one. Remove quotes in IELR and canonical LR entry.
1920 * doc/bison.texinfo: Remove quotes in most examples throughout.
1921 (Decl Summary): Update %define documentation.
1922 (Table of Symbols): Likewise.
1923 * src/ielr.c (LrType): Update documentation.
1924 * src/parse-gram.y (content.opt): Add production for ID.
1925 * tests/actions.at: Remove quotes in most tests.
1926 * tests/calc.at: Likewise.
1927 * tests/existing.at: Likewise.
1928 * tests/input.at: Likewise.
1929 * tests/local.at: Likewise.
1930 * tests/push.at: Likewise.
1931 * tests/reduce.at: Likewise.
1932 * tests/torture.at: Likewise.
1933
1934 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1935
1936 %define lr.type: make values lowercase IDs.
1937 That is, "LALR" => "lalr", "IELR" => "ielr", and
1938 "canonical LR" => "canonical-lr".
1939 * NEWS (2.5): Update documentation.
1940 * doc/bison.texinfo (Decl Summary): Likewise.
1941 * src/ielr.c (ielr): Use new values.
1942 * src/ielr.h (ielr): Update documentation.
1943 * src/reader.c (prepare_percent_define_front_end_variables): Use
1944 and validate new values.
1945 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1946 grammars.
1947 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1948
1949 2009-08-27 Eric Blake <ebb9@byu.net>
1950
1951 scan-gram: avoid portability trap with ctype usage.
1952 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1953 Avoid compiler warning.
1954
1955 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1956
1957 tests: use perl for printing special sequences to files.
1958 And skip tests if perl is not available. This is better than
1959 playing tricks with shell portability. Suggested by Akim
1960 Demaille.
1961 * tests/input.at (Bad character literals): Use it here for
1962 omitting final newlines.
1963 (Bad escapes in literals): Use it here for special characters.
1964
1965 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1966
1967 tests: show a use of %define lr.default-reductions "consistent"
1968 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1969 prevents the omission of expected tokens for %error-verbose.
1970
1971 2009-08-26 Akim Demaille <demaille@gostai.com>
1972
1973 tests: portability fix.
1974 * tests/input.at (Bad escapes in literals): Don't expect "echo
1975 '\0'" to output \ then 0.
1976
1977 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1978
1979 Actually handle the yytable zero value correctly this time.
1980 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
1981 zero values in the YYTABLE comments.
1982 * data/glr.c (yytable_value_is_error): Don't check for zero
1983 value.
1984 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1985 * data/yacc.c (yytable_value_is_error): Likewise.
1986 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1987 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1988 * src/tables.h: In header comments, explain why it's useless to
1989 check for a zero value in yytable.
1990
1991 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1992
1993 More fixes related to last two patches.
1994 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
1995 comments: zero indicates syntax error not default action.
1996 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1997 defined.
1998 * data/glr.c (yyis_pact_ninf): Rename to...
1999 (yypact_value_is_default): ... this.
2000 (yyisDefaultedState): Update for rename.
2001 (yyis_table_ninf): Rename to...
2002 (yytable_value_is_error): ... this, and check for value zero
2003 besides just YYTABLE_NINF.
2004 (yygetLRActions): Check for default value from yypact. It
2005 appears that this check is always performed before this function
2006 is invoked, and so adding the check here is probably redundant.
2007 However, the code may evolve after this subtlety is forgotten.
2008 Also, update for rename to yytable_value_is_error. Because that
2009 macro now checks for zero, a different but equivalent branch of
2010 the if-then-else here is evaluated.
2011 (yyreportSyntaxError): Update for rename to
2012 yytable_value_is_error. The zero condition was mishandled
2013 before.
2014 (yyrecoverSyntaxError): Update for renames. No behavioral
2015 changes.
2016 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
2017 New function.
2018 (yy_table_value_is_error_): New function.
2019 (parse): Use new functions where possible. No behavioral
2020 changes.
2021 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
2022 The zero condition was mishandled before.
2023 * data/yacc.c (yyis_pact_ninf): Rename to...
2024 (yypact_value_is_default): ... this.
2025 (yyis_table_ninf): Rename to...
2026 (yytable_value_is_error): ... this, and check for value zero
2027 besides just YYTABLE_NINF.
2028 (yysyntax_error): Update for rename to yytable_value_is_error.
2029 The zero condition was mishandled before.
2030 (yyparse): Update for renames. No behavioral changes.
2031 * src/tables.h: Improve comments about yypact, yytable, etc.
2032 more. Most importantly, say yytable value of zero means syntax
2033 error not default action.
2034
2035 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
2036
2037 Fix %error-verbose for conflicts resolved by %nonassoc.
2038 * NEWS (2.5): Document.
2039 * data/glr.c (yyreportSyntaxError): Fix this by checking
2040 yyis_table_ninf.
2041 * data/yacc.c (yysyntax_error): Likewise.
2042 * data/lalr1.cc (yysyntax_error_): Fix this by checking
2043 yytable_ninf_.
2044 * data/lalr1.java (yysyntax_error): Likewise.
2045 * tests/conflicts.at (%nonassoc and eof): Update expected output
2046 and remove FIXME.
2047
2048 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
2049
2050 Some code and documentation improvements.
2051 * data/c.m4 (b4_table_value_equals): New macro to capture
2052 some repeated code.
2053 * data/glr.c (yyis_pact_ninf): Use it here.
2054 (yyis_table_ninf): Likewise.
2055 (yyreportSyntaxError): Improve internal comments.
2056 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
2057 Use it everywhere possible.
2058 (yyis_table_ninf): Likewise.
2059 (yysyntax_error): Improve internal comments.
2060 * data/lalr1.cc (yysyntax_error_): Likewise.
2061 * data/lalr1.java (yysyntax_error): Likewise.
2062 * src/tables.h: Improve comments about yypact, yytable, etc.
2063
2064 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
2065
2066 Use locale when quoting.
2067 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
2068 quote rather than implementing quoting here.
2069
2070 2009-08-20 Eric Blake <ebb9@byu.net>
2071
2072 Make previous patch more robust.
2073 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
2074 argmatch.h.
2075 (output_skeleton): Use it.
2076 Suggested by Akim Demaille.
2077
2078 Import latest m4/m4.m4.
2079 * submodules/autoconf: Update to autoconf 2.64.
2080 * configure.ac (M4_GNU_OPTION): New define.
2081 * src/output.c (output_skeleton): Use it to resolve FIXME.
2082 * NEWS: Mention this.
2083
2084 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
2085
2086 Fix complaints about escape sequences.
2087 Discussed starting at
2088 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
2089 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
2090 For a \0 and similar escape sequences meaning the null
2091 character, report an invalid escape sequence instead of an
2092 invalid null character because the latter does not actually
2093 appear in the user's input.
2094 In all escape sequence complaints, don't escape the initial
2095 backslash, and don't quote when the sequence appears at the end
2096 of the complaint line unless there's whitespace that quotearg
2097 won't escape.
2098 Consistently say "invalid" not "unrecognized".
2099 Consistently prefer "empty character literal" over "extra
2100 characters in character literal" warning for invalid escape
2101 sequences; that is, consistently discard those sequences.
2102 * tests/input.at (Bad escapes in literals): New.
2103
2104 2009-08-19 Akim Demaille <demaille@gostai.com>
2105
2106 doc: fixes.
2107 * doc/bison.texinfo: Fix minor Texinfo errors.
2108
2109 2009-08-19 Akim Demaille <demaille@gostai.com>
2110
2111 tests: distcc compliance.
2112 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
2113 error messages from the output.
2114
2115 2009-08-19 Akim Demaille <demaille@gostai.com>
2116
2117 variables: simplify the upgrade of namespace into api.namespace.
2118
2119 This patch simplifies "variables: rename namespace as
2120 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
2121 Suggested by Joel E. Denny in
2122 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
2123
2124 * src/muscle-tab.c (muscle_percent_variable_update): New.
2125 (muscle_percent_define_insert): Use it in replacement of the
2126 previous tr invocation.
2127 Remove variable_tr, no longer needed.
2128 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
2129 Remove.
2130 * data/c++.m4: No longer handle namespace -> api.namespace.
2131 * tests/input.at (%define backward compatibility): Check that
2132 namespace is treated as api.namespace.
2133
2134 2009-08-19 Akim Demaille <demaille@gostai.com>
2135
2136 doc: %initial-action to initialize yylloc.
2137 Reported by Bill Allombert.
2138 * doc/bison.texinfo: Set fill-column to 76.
2139 (Location Type): Document the use of %initial-action to initialize
2140 yylloc.
2141
2142 2009-08-19 Akim Demaille <demaille@gostai.com>
2143
2144 lalr1.cc: use state_type.
2145 * data/lalr1.cc (yysyntax_error_): Use state_type.
2146 Move argument names into yy*.
2147
2148 2009-08-19 Akim Demaille <demaille@gostai.com>
2149
2150 lalr1.cc: get rid of yyparse's yystate.
2151 yystate and yystack_[0].state are equal, keep only the latter.
2152 The former was also used as a temporary variable to compute the
2153 post-reduction state. Move this computation into an auxiliary
2154 function.
2155
2156 * data/glr.c (yyLRgotoState): Fuse variable definition and first
2157 assignment.
2158 * data/lalr1.cc (yy_lr_goto_state_): New.
2159 (yyparse): Use it.
2160 Replace remaining uses of yystate by yystate_[0].state.
2161 Remove the former.
2162
2163 2009-08-19 Akim Demaille <demaille@gostai.com>
2164
2165 lalr1.cc: destroy $$ when YYERROR is called.
2166 * data/lalr1.cc (yyreduce): Compute the resulting state before
2167 running the user action so that yylhs is a valid symbol.
2168 (yyerrorlab): Since yylhs is complete (it knows its type), we can
2169 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
2170 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
2171
2172 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
2173
2174 maint: update for gnulib's recent update-copyright changes
2175 * gnulib: Update.
2176 * .x-update-copyright (COPYING): Add as it's no longer implied
2177 when .x-update-copyright is present.
2178 * cfg.mk (update-copyright-local): Remove, now ignored.
2179 (update-copyright): Declare update-b4-copyright as a dependency.
2180
2181 2009-08-17 Akim Demaille <demaille@gostai.com>
2182
2183 build: require gettext 0.17.
2184
2185 Suggested by Bruno Haible.
2186 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
2187 * configure.ac: require gettext 0.17 to ensure compatibility with
2188 gnulib.
2189
2190 2009-08-17 Akim Demaille <demaille@gostai.com>
2191
2192 build: lower gettext requirements.
2193
2194 Bison was uselessly requiring the formatstring macros from
2195 gettext, which resulted in mo files not being installed on systems
2196 that perfectly supported Bison mo files. Lower the requirement.
2197 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
2198
2199 * configure.ac: Require need-ngettext instead of
2200 need-formatstring-macros.
2201 Reported by Martin Jabocs.
2202 Suggested by Bruno Haible.
2203 * INSTALL: Restructure.
2204 (Internationalization): New.
2205
2206 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
2207
2208 maint: fix use of copyright year intervals.
2209 * gnulib: Update.
2210 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
2211 as now recommended in gnulib/NEWS.
2212 * build-aux/update-b4-copyright: Fix.
2213 * cfg.mk (update-copyright-env): Configure update-copyright.
2214
2215 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
2216
2217 Make it easier to write deterministic tests.
2218 Continues Akim's work from his 2009-06-10 commits.
2219 * src/reader.c (check_and_convert_grammar): Don't add any
2220 symbols after the first symbols_do invocation.
2221 * src/symtab.c (symbols_sorted): New static global.
2222 (user_token_number_redeclaration): Update comments.
2223 (symbol_from_uniqstr): If a new symbol is being created, assert
2224 that symbols_sorted hasn't been allocated yet.
2225 (symbols_free): Free symbols_sorted.
2226 (symbols_cmp, symbols_cmp_qsort): New functions.
2227 (symbols_do): Sort symbol_table into symbols_sorted on first
2228 invocation.
2229 * tests/input.at (Numbered tokens): Recombine tests now that the
2230 output should be deterministic across multiple numbers.
2231
2232 2009-08-12 Akim Demaille <demaille@gostai.com>
2233
2234 tests: GCC 4.5 compliance.
2235 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
2236 messages about #error.
2237
2238 2009-08-12 Akim Demaille <demaille@gostai.com>
2239
2240 build: fix the generation of the documentation.
2241 Some of our targets use "bison --help", but they can't depend on
2242 "bison" itself (to avoid additional requirements on the user), so
2243 they used to call "make src/bison" in the commands. Then
2244 concurrent builds may fail: one make might be aiming one of its
2245 jobs at compiling src/bison, and another job at generating the man
2246 page. If the latter is faster than the former, then we have two
2247 makes that concurrently try to compile src/bison.
2248
2249 This might also be a more convincing explanation for the failure
2250 described in the patch "build: fix paths".
2251
2252 * Makefile.am (SUFFIXES): Initialize.
2253 * build-aux/move-if-change: New, symlink to gnulib's.
2254 * build-aux/local.mk: Ship it.
2255 * doc/common.x: Remove, merged into...
2256 * doc/bison.x: here.
2257 * doc/local.mk (doc/bison.help): New.
2258 ($(CROSS_OPTIONS_TEXI)): Depend on it.
2259 Use src/bison.
2260 (.x.1): Replace with...
2261 (doc/bison.1): this explicit, simpler, target.
2262 (common_dep): Remove, inlined where appropriate.
2263 (SUFFIXES, PREPATH): Remove, unused.
2264
2265 2009-08-12 Akim Demaille <demaille@gostai.com>
2266
2267 gnulib: improve prefixing.
2268 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
2269 change the value of...
2270 (gl_LIBOBJS): this.
2271 Adjust more variables.
2272 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
2273 gl_LIBOBJS.
2274 (prefix): Also transform rules whose targets have slashes.
2275 Use $prefix liberally.
2276 Map @MKDIR_P@ to $(MKDIR_P).
2277 Prefix directories that are mkdir'd.
2278
2279 2009-08-12 Akim Demaille <demaille@gostai.com>
2280
2281 build: fix paths.
2282 When using $(top_builddir) inconsistently, Make (including GNU
2283 Make) is sometimes confused. As a result it may want to build
2284 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
2285 file, different names) concurrently, which, amusingly enough,
2286 might end with:
2287
2288 ranlib lib/libbison.a
2289 ranlib lib/libbison.a
2290 make[2]: *** [lib/libbison.a] Segmentation fault
2291
2292 on OS X.
2293
2294 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
2295 needed.
2296
2297 2009-08-12 Akim Demaille <demaille@gostai.com>
2298
2299 distcheck: fix.
2300
2301 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
2302
2303 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
2304
2305 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
2306
2307 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
2308
2309 Miscellaneous code readability improvements.
2310
2311 * src/reader.c (reader): Move %define front-end variable
2312 defaults and checking into...
2313 (prepare_percent_define_front_end_variables): ... this new
2314 function.
2315
2316 * src/scan-gram.l (INITIAL): For consistency with string
2317 literals, don't store open quote on character literal. It's
2318 discarded before returning anyway.
2319 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
2320 Make length test more readable, and make the character stored
2321 for an empty literal more obvious while consistent with the
2322 previous behavior.
2323
2324 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
2325 USER_NUMBER_HAS_STRING_ALIAS throughout.
2326 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
2327 that is repeated in symtab.h. Improve argument names to make it
2328 clear which side of the symbol-string alias pair is which.
2329 (symbol_check_alias_consistency): Improve local variable names
2330 for the same purpose.
2331 * src/symtab.h (struct symbol): Make comments about aliases
2332 clearer.
2333 (symbol_make_alias): Improve comments and argument name.
2334 * src/output.c (token_definitions_output): Update for rename to
2335 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
2336
2337 2009-08-08 Alex Rozenman <rozenman@gmail.com>
2338
2339 Convert "misleading reference" messages to warnings.
2340 * src/scan-code.l: New function 'show_sub_messages', more
2341 factoring.
2342 * tests/named-ref.at: Adjust tests.
2343
2344 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
2345
2346 maint: run "make update-copyright"
2347
2348 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
2349
2350 maint: make update-b4-copyright easier to use
2351 * build-aux/update-b4-copyright: In warnings, report line
2352 numbers rather than character positions.
2353 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
2354 that update-copyright runs it.
2355 * gnulib: Update.
2356
2357 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
2358
2359 maint: clean up update-b4-copyright code
2360 * build-aux/update-b4-copyright: Do not accept 2-digit
2361 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
2362 Don't accept a `[' in a b4_copyright argument.
2363 Format code more consistently.
2364 Don't assume b4*copyright never occurs.
2365
2366 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2367
2368 maint: automate b4_copyright updates.
2369 * Makefile.am (update-b4-copyright): New target rule.
2370 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
2371 * build-aux/update-b4-copyright: New.
2372 * data/yacc.c: Remove stray characters around b4_copyright
2373 invocations.
2374
2375 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2376
2377 maint: automate annual package-wide copyright-year update.
2378 * .x-update-copyright: New.
2379 * Makefile.am (EXTRA_DIST): Remove maint.mk.
2380 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
2381 update-copyright. Remove gnumakefile, which is implied by
2382 maintainer-makefile.
2383 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
2384 * gnulib: Update.
2385 * maint.mk: Remove, now copied from gnulib.
2386 * examples/extexi: Add missing "(C)" in copyright statement so
2387 update-copyright can recognize it.
2388 * src/LR0.h: Likewise.
2389 * src/print.h: Likewise.
2390 * src/print_graph.h: Likewise.
2391 * src/gram.c: Add missing comma in copyright statement.
2392 * src/gram.h: Likewise.
2393
2394 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2395
2396 Fix "make distcheck".
2397 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
2398 of just calc.stamp.
2399
2400 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
2401
2402 Pacify "gcc -Wunused" for the input function from Flex.
2403 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
2404 and later.
2405 * src/scan-code.l: Add "%option noinput", which I cannot find in
2406 the Flex manual, but which Flex has supported since at least as
2407 far back as 2.5.4. However, if any of our developers still use
2408 Flex 2.5.4, they'll need to stop configuring with
2409 --enable-gcc-warnings because "%option noinput" didn't work
2410 correctly until Flex 2.5.6.
2411 * src/scan-gram.l: Likewise.
2412 * src/scan-skel.l: Likewise.
2413
2414 2009-07-31 Alex Rozenman <rozenman@gmail.com>
2415
2416 Fix --enable-gcc-warnings problems.
2417 * src/reader.c: Adjust variable names.
2418 * src/scan-code.l: Fix prototypes and adjust names.
2419 * src/named-ref.c: Remove redundant "if".
2420
2421 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2422
2423 Fix a --enable-gcc-warnings problem.
2424 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
2425 variable.
2426
2427 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2428
2429 Warn about character literals not of length one.
2430 * NEWS (2.5): Document.
2431 * src/scan-gram.l (INITIAL): Remove comment that we don't check
2432 the length.
2433 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
2434 * tests/input.at (Bad character literals): New test group.
2435
2436 2009-07-24 Alex Rozenman <rozenman@gmail.com>
2437
2438 Fix some memory leaks.
2439 * src/named-ref.c: Add a pointer check (named_ref_free).
2440 * src/scan-code.l: New function (variant_table_free). Called in
2441 code_scanner_free.
2442 * src/symlist.c: Call to named_ref_free (symbol_list_free).
2443
2444 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2445
2446 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
2447
2448 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
2449
2450 Some M4 cleanup in the testsuite.
2451 Suggested by Eric Blake at
2452 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
2453 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
2454 complicate the code by distinguishing between a missing value
2455 and an empty string value for an optional argument. This fix is
2456 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
2457 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
2458 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
2459 arguments are not needed because of the following changes.
2460 Fix stale comments.
2461 Bison developers should use GNU M4 and should not use
2462 POSIXLY_CORRECT when building the test suite, so do not
2463 complicate the code by avoiding $10 and above.
2464 Do not quote an empty string value for an optional argument, and
2465 do not distinguish between a missing value and an empty string
2466 value.
2467
2468 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2469
2470 Revert unnecessary column realignment in --help output.
2471 Reported by Akim Demaille at
2472 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
2473 * src/getargs.c (usage): Here.
2474
2475 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2476
2477 Alphabetical order in src/local.mk.
2478 * src/local.mk: Adjust.
2479
2480 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2481
2482 Style changes and factoring.
2483 * src/named-ref.h: Add comments.
2484 * src/parse-gram.y: Readability and style changes.
2485 * src/reader.c: Factoring: assign_named_ref function.
2486 * src/scan-code.l: Factoring and style changes. Rename
2487 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2488 Use "unsigned" type for variant index. Improve readablity.
2489 * src/scan-gram.l: Change error messages and add comments.
2490 * src/symlist.h: symbol_list_null: New function decl.
2491 * src/symlist.c: symbol_list_null: Implement here.
2492 * tests/named-refs.at: Adjust for new error messages.
2493
2494 2009-06-29 Eric Blake <ebb9@byu.net>
2495
2496 scan-code: avoid compiler warnings
2497 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2498
2499 2009-06-29 Akim Demaille <demaille@gostai.com>
2500
2501 build: avoid concurrent extraction of calc++.
2502 * examples/calc++/Makefile.am (calc.stamp): New.
2503 Depend on it to create the sources of calc++ so that concurrent
2504 builds don't launch several "extexi" in parallel.
2505 Not only this is inefficient, this also builds incorrect sources
2506 with several extractions mixed together.
2507
2508 2009-06-29 Akim Demaille <demaille@gostai.com>
2509
2510 parse.error: fix.
2511 * data/bison.m4: Move code related to specific variables after the
2512 definition of the variable-maintaining macros so that we don't
2513 "invoke" b4_percent_define_check_values before it is defined.
2514
2515 2009-06-29 Akim Demaille <demaille@gostai.com>
2516
2517 variables: parse.error
2518
2519 Implement, document, and test the replacement of %error-verbose
2520 by %define parse.error "verbose".
2521 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
2522 values of the parse.error variable.
2523 Make "simple" its default value.
2524 Check the valid values.
2525 * src/parse-gram.y: Use %define parse.error.
2526 (PERCENT_ERROR_VERBOSE): New token.
2527 Support it.
2528 * src/scan-gram.l: Support %error-verbose.
2529
2530 * doc/bison.texinfo (Decl Summary): Replace the documentation of
2531 %define error-verbose by that of %define parse.error.
2532 * NEWS: Document it.
2533
2534 * tests/actions.at, tests/calc.at: Use parse.error instead of
2535 %error-verbose.
2536
2537 2009-06-27 Alex Rozenman <rozenman@gmail.com>
2538
2539 Implement support for named symbol references.
2540 * src/parse-gram.y: Add new syntax (named_ref.opt).
2541 * src/reader.c: Store named refs in symbol lists.
2542 * src/reader.h: New argument for symbol_append and
2543 action_append functions.
2544 * src/scan-code.h: Add new field (named_ref) into
2545 code_props data structure. Keeps named ref of midrule
2546 actions.
2547 * src/scan-code.l: Support for named refs in semantic
2548 action code. New function 'parse_named_ref'.
2549 * src/scan-gram.l: Support bracketed id.
2550 * src/symlist.c: Store named refs in symbol lists.
2551 * src/symlist.h: New field in symbol list: named_ref.
2552 * src/named-ref.h: New file, a struct for named_ref.
2553 * src/named-ref.cp: New file, named_ref_new function.
2554 * src/local.mk: Add two new files.
2555 * tests/testsuite.at: Include new test group:
2556 * tests/named-refs.at: this new file.
2557
2558 2009-06-25 Akim Demaille <demaille@gostai.com>
2559
2560 hash: check insertion for memory exhaustion.
2561 * src/uniqstr.c (uniqstr_new): New.
2562
2563 2009-06-24 Akim Demaille <demaille@gostai.com>
2564
2565 variables: rename namespace as api.namespace.
2566 Discussed in
2567 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
2568
2569 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
2570 New.
2571 (b4_percent_define_use): New.
2572 Use it where applicable.
2573 * data/c++.m4: Replace uses of the variable "namespace" by
2574 "api.namespace".
2575 Default the latter to the former.
2576 * doc/bison.texinfo (Decl Summary): Document "namespace" as
2577 obsolete.
2578 Document api.namespace.
2579 Use @samp to document %define uses, keep @code for identifiers.
2580 * NEWS: Likewise.
2581 * tests/c++.at, tests/input.at: Test api.namespace instead of
2582 namespace. (The tests passed with namespace.)
2583
2584 2009-06-11 Akim Demaille <demaille@gostai.com>
2585
2586 style changes.
2587 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2588 * src/print-xml.c: Style changes.
2589 * tests/conflicts.at: Comment changes.
2590
2591 2009-06-11 Akim Demaille <demaille@gostai.com>
2592
2593 xml: beware of user strings used to give a %prec to rules.
2594 * tests/conflicts.at (%prec with user strings): New.
2595 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2596 XML output.
2597
2598 2009-06-11 Akim Demaille <demaille@gostai.com>
2599
2600 hash: check insertion for memory exhaustion.
2601 * src/muscle-tab.c (muscle_insert, muscle_grow)
2602 * src/state.c (state_hash_insert): Check the return value of
2603 hash_insert.
2604
2605 2009-06-11 Akim Demaille <demaille@gostai.com>
2606
2607 tests: honor TESTSUITEFLAGS in every check target.
2608 * tests/local.mk (RUN_TESTSUITE): New.
2609 (check-local, installcheck-local, maintainer-check-g++)
2610 (maintainer-check-posix, maintainer-check-valgrind): Use it.
2611
2612 2009-06-10 Akim Demaille <demaille@gostai.com>
2613
2614 deterministic test suite.
2615 Some consistency checks on symbols are performed after all the
2616 symbols were read, by an iteration over the symbol table. This
2617 traversal is nondeterministic, which can be a problem for test
2618 cases.
2619 Avoid this.
2620 Addresses another form of nondeterminism reported by Joel E. Denny.
2621 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2622
2623 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2624 test in two.
2625 Use different file names for the three tests to make the
2626 maintenance easier.
2627
2628 2009-06-10 Akim Demaille <demaille@gostai.com>
2629
2630 gnulib: update.
2631 * gnulib: Update to latest.
2632 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2633 * m4/.gitignore: Regen.
2634 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2635 Call xalloc_die on hash_insert failures.
2636 Requested by the new __warn_unused_result__ attribute of
2637 hash_insert.
2638
2639 2009-06-10 Akim Demaille <demaille@gostai.com>
2640
2641 deterministic user-token-number redeclaration errors.
2642 Address nondeterminism reported by Joel E. Denny.
2643 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2644
2645 * src/uniqstr.h: Comment changes.
2646 * src/location.h (boundary_cmp, location_cmp): New.
2647 * src/symtab.c (user_token_number_redeclaration): New.
2648 (symbol_translation): Use it.
2649 * tests/input.at (Numbered tokens): Adjust the expected output.
2650
2651 2009-05-25 Akim Demaille <demaille@gostai.com>
2652
2653 build: avoid ignored errors.
2654 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
2655 errors, they pollute the output.
2656
2657 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2658
2659 Convert multiple variable definition warnings to complaints.
2660 * NEWS (2.5): Add a new entry for that change.
2661 * doc/bison.texinfo (Decl Summary): Update %define entry.
2662 (Bison Options): Update -D/--define/-F/--force-define entry.
2663 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
2664 * src/muscle-tab.h (muscle_percent_define_insert): Update
2665 comments.
2666 * tests/input.at (`%define errors'): Update.
2667 (`%define, --define, --force-define'): Update.
2668
2669 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2670
2671 -F/--force-define and relative %define/-D/--define priorities.
2672 * NEWS (2.5): Add documentation to -D/--define entry.
2673 * build-aux/cross-options.pl: Hard-code association of
2674 --force-define with %define.
2675 * doc/bison.texinfo (Decl Summary): In %define entry,
2676 cross-reference command-line options.
2677 (Bison Options): Add documentation to -D/--define entry.
2678 (Option Cross Key): Widen column for --force-define row.
2679 * src/getargs.c (usage): Document -F/--force-define. Realign
2680 options in output.
2681 (short_options, long_options, getargs): Parse -F/--force-define,
2682 and update muscle_percent_define_insert invocations.
2683 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
2684 (muscle_percent_define_insert): Add argument with that type.
2685 * src/muscle-tab.c (muscle_percent_define_insert): Implement
2686 -F/--force-define behavior and priorities.
2687 (muscle_percent_define_ensure): Update
2688 muscle_percent_define_insert invocation.
2689 * src/parse-gram.y (prologue_declaration): Update
2690 muscle_percent_define_insert invocations.
2691 * tests/input.at (`%define, --define'): Rename to...
2692 (`%define, --define, --force-define'): ... this and extend.
2693
2694 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2695
2696 Update some comments to make sense for -D.
2697 * data/bison.m4 (b4_check_user_names): In header comments, say
2698 "user occurrence" instead of "grammar occurrence".
2699 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
2700 (muscle_percent_code_grow): Likewise just for consistency.
2701
2702 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2703
2704 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2705
2706 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2707
2708 Handle a trailing `:' in a user-supplied C++ namespace better.
2709 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2710 among the closing braces here. This fix might make the
2711 generated code easier to debug, but otherwise it should be
2712 insignificant because a trailing `:' is a C++ error already.
2713
2714 2009-05-19 Akim Demaille <demaille@gostai.com>
2715
2716 remove useless variable.
2717 * src/getargs.c (skeleton_arg): Remove now useless variable.
2718 Should help the compiler see that this printf-like call is sane.
2719
2720 2009-05-15 Akim Demaille <demaille@gostai.com>
2721
2722 Rename token.prefix as api.tokens.prefix.
2723 Discussed here.
2724 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
2725
2726 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
2727 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
2728 (token.prefix): Rename as...
2729 (api.tokens.prefix): this.
2730
2731 2009-05-11 Akim Demaille <demaille@gostai.com>
2732
2733 doc: use C++ headers.
2734 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2735 headers.
2736
2737 2009-05-11 Akim Demaille <demaille@gostai.com>
2738
2739 doc: token.prefix
2740 * doc/bison.simple (Decl Summary): Document token.prefix.
2741 (Calc++ Parser): Various fixes.
2742 Formatting changes.
2743 Use token.prefix.
2744 Introduce a macro TOKEN to shorten the code and make it more
2745 readable.
2746 (Calc++ Scanner): Adjust.
2747 * NEWS (Variable token.prefix): New.
2748
2749 2009-05-04 Akim Demaille <demaille@gostai.com>
2750
2751 bison: catch bad symbol names.
2752 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2753 * tests/input.at: Adjust.
2754
2755 2009-05-04 Akim Demaille <demaille@gostai.com>
2756
2757 identifiers: dashes are letters.
2758 Dashes can now start identifiers (symbols and directives).
2759
2760 * src/scan-gram.l ({letter}): Add dash.
2761 ({id}): Remove it.
2762 * tests/input.at (Symbols): Adjust.
2763 Remove stray comment.
2764 * tests/regression.at (Invalid inputs): Adjust error message.
2765 * doc/bison.texinfo (Symbols): Update.
2766
2767 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2768
2769 Declare %code to be a permanent feature.
2770 * NEWS (2.4.2): Here.
2771 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2772 experimental.
2773 (Decl Summary): Likewise.
2774
2775 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2776
2777 Convert underscores to dashes in some %define variable names.
2778 For now, just api.push-pull and lr.keep-unreachable-states.
2779 Maintain old names for backward compatibility.
2780 * NEWS (2.5): Document.
2781 * data/c.m4 (b4_identification): Update comment.
2782 * data/yacc.c: Update access.
2783 * doc/bison.texinfo: Update.
2784 * etc/bench.pl.in (bench_push_parser): Update use.
2785 * src/files.c (tr): Move to...
2786 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2787 think of a better place to expose it. My logic is that, for all
2788 uses of tr so far, command-line arguments can be involved, and
2789 getargs.h is already included.
2790 * src/main.c (main): Update access.
2791 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2792 variable names to new variable names before assigning value.
2793 * src/reader.c (reader): Update setting default.
2794 * tests/calc.at: Update uses.
2795 * tests/conflicts.at (Unreachable States After Conflict
2796 Resolution): Update use.
2797 * tests/input.at (%define enum variables): Update use.
2798 (%define backward compatibility): New test group.
2799 * tests/push.at: Update uses.
2800 * tests/reduce.at: Update uses.
2801 * tests/torture.at: Update uses.
2802
2803 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2804
2805 Set all front-end %define defaults in one place.
2806 * src/main.c (main): Move lr.keep_unreachable_states default...
2807 * src/reader.c (reader): ... to here.
2808
2809 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2810
2811 Rename lr.default_reductions to lr.default-reductions.
2812 * NEWS (2.5): Here.
2813 * doc/bison.texinfo: Here.
2814 * src/lalr.c (initialize_LA): Here.
2815 * src/print.c (print_reductions): Here.
2816 * src/reader.c (reader): Here.
2817 * src/tables.c (action_row): Here.
2818 * tests/input.at (%define enum variables): Here.
2819 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2820
2821 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2822
2823 Pacify ./configure --enable-gcc-warnings.
2824 * tests/input.at (Symbols): Prototype yyerror and yylex.
2825
2826 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2827
2828 Document how `%define "var" "value"' is not M4-friendly.
2829 * src/parse-gram.y (variable): In comments here.
2830
2831 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2832
2833 Clean up recent patches a little.
2834 Reported by Akim Demaille.
2835 * doc/bison.texinfo (Understanding): Fix typos.
2836 * src/print.c (print_reductions): Don't use negated variable.
2837
2838 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2839
2840 List accepted values for a %define enum variable with an invalid value.
2841 Suggested by Akim Demaille at
2842 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2843 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2844 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
2845 * tests/input.at (%define lr.default_reductions invalid values): Merge
2846 into...
2847 (%define enum variables): ... here, and update output.
2848
2849 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2850
2851 Rename "default rule" to "default reduction".
2852 This includes changing variable names in code, changing
2853 comments, and renaming %define lr.default_rules to %define
2854 lr.default_reductions.
2855 * NEWS (2.5): Update IELR documentation.
2856 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
2857 documentation.
2858 * data/glr.c, data/lalr1.java: Sync copyright dates.
2859 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2860 and lr.type documentation. Make some other wording
2861 improvements.
2862 (Glossary): Adjust cross-references and Default Reduction
2863 definition.
2864 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2865 Remove a confusing comment pointed out by Akim Demaille.
2866 (initialize_LA): Adjust code.
2867 * src/print-xml.c (print_reductions): Adjust code.
2868 * src/print.c (print_reductions): Adjust code.
2869 * src/reader.c (reader): Adjust code.
2870 * src/tables.c (action_row): Adjust code.
2871 (token_actions): Adjust code.
2872 * src/tables.h: Adjust YYDEFACT documentation.
2873 * tests/input.at (%define lr.default_rules invalid values):
2874 Rename test group to...
2875 (%define lr.default_reductions invalid values): ... this, and
2876 update grammar file and expected output.
2877 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2878 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2879
2880 2009-04-21 Akim Demaille <demaille@gostai.com>
2881
2882 tests: check the use of dashes and periods in symbols.
2883 * tests/input.at (Symbol): New test group.
2884
2885 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2886
2887 Document %define lr.type and lr.default_rules.
2888 * NEWS (2.5): Add an entry.
2889 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2890 besides just LALR(1) and GLR(1).
2891 * doc/bison.texinfo (Introduction): Likewise.
2892 (Language and Grammar): Bison is no longer limited to LALR(1)
2893 restrictions.
2894 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2895 when trying to distinguish from GLR. Talk about LR(1) grammars
2896 rather than LALR(1) grammars.
2897 (Decl Summary): In %define api.push_pull entry, say it applies
2898 to deterministic parsers in C rather than LALR(1) parsers in C.
2899 Add lr.default_rules entry.
2900 Add lr.type entry.
2901 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2902 restrictions.
2903 (Generalized LR Parsing): Same changes as for the previous GLR
2904 section.
2905 (Memory Management): Say deterministic rather than LALR(1).
2906 (Understanding): Correct some bison output.
2907 Index discussion of "accepting state".
2908 Say deterministic rather than LALR(1).
2909 (Bison Options): In --yacc entry, say deterministic rather than
2910 LALR(1).
2911 In --report, --graph, and --xml entries, just don't mention
2912 LALR(1).
2913 (C++ Parsers): Say deterministic rather than LALR(1).
2914 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2915 (Glossary): Add Accepting State, Consistent State, Default Rule,
2916 and IELR(1) definitions.
2917 In Generalized LR (GLR) definition, make same changes as in
2918 previous GLR sections.
2919 In LALR(1) definition, say Bison uses LALR(1) by default rather
2920 than implying Bison is limited to LALR(1).
2921 (LocalWords): Add IELR.
2922
2923 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2924
2925 Finish implementing %define lr.type.
2926 Its value can be "LALR", "IELR", or "canonical LR".
2927 * lib/timevar.def (TV_IELR_PHASE1): New var.
2928 (TV_IELR_PHASE2): New var.
2929 (TV_IELR_PHASE3): New var.
2930 (TV_IELR_PHASE4): New var.
2931 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2932 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2933 Sbitset.h, ielr.h, and ielr.c.
2934 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2935 trace_types): Add trace_ielr.
2936 * src/lalr.h, src/lalr.c (ngotos): Export it.
2937 (F): Rename to...
2938 (goto_follows): ... this, update all uses, and export it.
2939 (set_goto_map): Export it.
2940 (map_goto): Export it.
2941 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2942 handled in ielr.
2943 (initialize_LA): Export it. Move lookback allocation to...
2944 (lalr): ... here because, for canonical LR, initialize_LA must
2945 be invoked but lookback and much of the rest of LALR isn't
2946 needed.
2947 * main.c (main): Instead of lalr, invoke ielr, which invokes
2948 lalr.
2949 * src/reader.c (reader): Default lr.type to "LALR".
2950 Default lr.default_rules to "accepting" if lr.type is "canonical
2951 LR". Leave the default as "all" otherwise.
2952 Check for a valid lr.type value.
2953 * src/state.h, src/state.c (struct state_list): Add state_list
2954 member.
2955 (state_new): Initialize state_list member to NULL.
2956 (state_new_isocore): New function, exported.
2957 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2958 exercises all values of lr.type.
2959 (GNU AWK Grammar): Rename test group to...
2960 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2961 AT_TEST_EXISTING_GRAMMAR.
2962 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2963 (GNU pic Grammar): Rename test group to...
2964 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2965 AT_TEST_EXISTING_GRAMMAR.
2966 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2967 all values of lr.type.
2968 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2969 (Lane Split): Likewise.
2970 (Complex Lane Split): Likewise.
2971 (Split During Added Lookahead Propagation): Likewise.
2972
2973 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2974
2975 Add new files for IELR and canonical LR implementation.
2976 * src/AnnotationList.c: New.
2977 * src/AnnotationList.h: New.
2978 * src/InadequacyList.c: New.
2979 * src/InadequacyList.h: New.
2980 * src/Sbitset.c: New.
2981 * src/Sbitset.h: New.
2982 * src/ielr.c: New.
2983 * src/ielr.h: New.
2984
2985 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2986
2987 Implement %define lr.default_rules.
2988 Its value describes the states that are permitted to contain
2989 default rules: "all", "consistent", or "accepting".
2990 * src/reader.c (reader): Default lr.default_rules to "all".
2991 Check for a valid lr.default_rules value.
2992 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2993 is "accepting", then only mark the accepting state as
2994 consistent.
2995 (initialize_LA): Tell state_lookahead_tokens_count whether
2996 lr.default_rules is "accepting".
2997 * src/tables.c (action_row): If lr.default_rules is not "all",
2998 then disable default rules in inconsistent states.
2999 * src/print.c (print_reductions): Use this opportunity to
3000 perform some assertions about whether lr.default_rules was
3001 obeyed correctly.
3002 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
3003 helps with checking the parser tables for a grammar.
3004 * tests/input.at (%define lr.default_rules invalid values): New
3005 test group.
3006 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
3007 AT_TEST_TABLES_AND_PARSE.
3008 (`no %define lr.default_rules'): New test group generated by
3009 AT_TEST_LR_DEFAULT_RULES.
3010 (`%define lr.default_rules "all"'): Likewise.
3011 (`%define lr.default_rules "consistent"'): Likewise.
3012 (`%define lr.default_rules "accepting"'): Likewise.
3013
3014 2009-04-20 Akim Demaille <demaille@gostai.com>
3015
3016 Formatting change.
3017
3018 2009-04-20 Akim Demaille <demaille@gostai.com>
3019
3020 bison: factoring.
3021 * src/output.c (token_definitions_output): Use symbol_id_get
3022 instead of duplicating its logic.
3023 * TODO (YYERRCODE): Extend.
3024
3025 2009-04-20 Akim Demaille <demaille@gostai.com>
3026
3027 variables: prefer error-verbose to error_verbose.
3028 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
3029 instead of error_verbose.
3030 * src/scan-gram.l (%error-verbose): Map to the error-verbose
3031 variable.
3032 * doc/bison.texinfo: Promote %define error-verbose instead of
3033 %error-verbose.
3034 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
3035
3036 2009-04-15 Akim Demaille <demaille@gostai.com>
3037
3038 variables: accept dashes.
3039 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
3040 underscores.
3041 * src/scan-gram.l ({id}): Also accept dashes after the initial
3042 letter.
3043 ({directive}): Use {id}.
3044 * src/parse-gram.y: Comment and formatting changes.
3045 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
3046 symbols.
3047 * src/complain.h, src/complain.c (yacc_at): New.
3048 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
3049 symbol names.
3050 * src/output.c (token_definitions_output): Do not #define token
3051 names with dashes.
3052
3053 2009-04-20 Akim Demaille <demaille@gostai.com>
3054
3055 Consistently refer to Yacc, not YACC.
3056 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
3057
3058 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
3059
3060 Pacify make maintainer-check-posix.
3061 * tests/input.at (%define, --define): Move bison command-line
3062 options before grammar file name.
3063
3064 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
3065
3066 Document semicolon warnings.
3067 * NEWS (2.5): Here.
3068
3069 2009-04-14 Akim Demaille <demaille@gostai.com>
3070
3071 variables: use `parse.assert' instead of `assert'.
3072 * TODO (assert): Remove.
3073 * data/bison.m4 (b4_assert_if): Replace with...
3074 (b4_parse_assert_if): this.
3075 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
3076 * doc/bison.texinfo (Decl Summary): Document parse.assert.
3077
3078 2009-04-14 Akim Demaille <demaille@gostai.com>
3079
3080 variables: use `parse.trace' instead of `debug'.
3081 * src/getargs.c (getargs): Map -t to %define trace.parse.
3082 * src/scan-gram.l (%debug): Map to %define trace.parse.
3083 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
3084 names to `_' in macro names.
3085 (b4_debug_if): Replace with...
3086 (b4_parse_trace_if): this.
3087 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
3088 * data/yacc.c: Adjust.
3089 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
3090 Use @code to label the variable list.
3091 Document the variable parse.trace.
3092 (Tracing): Promote the parse.trace variable.
3093 * TODO: %printer is not documented.
3094
3095 2009-04-14 Akim Demaille <demaille@gostai.com>
3096
3097 doc: minor fixes.
3098 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
3099 (Table of Symbols): Remove duplicate entry for %debug.
3100
3101 2009-04-10 Eric Blake <ebb9@byu.net>
3102
3103 submodules: update to latest
3104 * submodules/autoconf: Use latest upstream Autoconf.
3105
3106 2009-04-06 Eric Blake <ebb9@byu.net>
3107
3108 Work around autoconf 2.63b bug in testsuite.
3109 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
3110 autoconf bug related to # in test.
3111
3112 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
3113
3114 * NEWS (2.5): New section. Describe new -D/--define feature.
3115
3116 2009-04-06 Akim Demaille <demaille@gostai.com>
3117
3118 Regen.
3119 * src/parse-gram.h, src/parse-gram.c: Regen.
3120
3121 2009-04-06 Akim Demaille <demaille@gostai.com>
3122
3123 rename muscle_tab.* as muscle-tab.* for consistency.
3124 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
3125 * src/muscle-tab.h, src/muscle-tab.c: these.
3126 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
3127 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
3128
3129 2009-04-06 Akim Demaille <demaille@gostai.com>
3130
3131 Makefile: introduce $(BISON).
3132 * src/local.mk (BISON): New.
3133 (YACC): Use it.
3134
3135 2009-04-06 Akim Demaille <demaille@gostai.com>
3136
3137 parser: handle %locations as %define locations.
3138 * src/getargs.h, src/getargs.c (locations_flag): Remove.
3139 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
3140 to set "locations" to true.
3141 * src/output.c (prepare): Don't output "locations".
3142 * src/scan-gram.l (%locations): Handle it as a %<flag>.
3143 * src/parse-gram.y: It's no longer a token.
3144 Don't handle it.
3145 * data/bison.m4 (b4_locations_if): Define it with
3146 b4_percent_define_if_define.
3147 * data/c.m4, data/glr.cc: Adjust.
3148
3149 2009-04-06 Akim Demaille <demaille@gostai.com>
3150
3151 Regen.
3152 * src/parse-gram.c: Regen.
3153
3154 2009-04-06 Akim Demaille <demaille@gostai.com>
3155
3156 muscle: factor the handling of obsolete of obsolete directives.
3157 Suggested by Joel E. Denny.
3158
3159 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
3160 New, extracted from...
3161 * src/parse-gram.y (prologue_declaration: pure-parser): here.
3162 Remove it.
3163 (prologue_declaration: "%<flag>"): Use
3164 muscle_percent_define_ensure.
3165 (%error-verbose, %pure-parser): No longer tokens.
3166 * src/scan-gram.l (pure-parser): Return as a %<flag>.
3167
3168 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
3169
3170 Fix options documentation.
3171 * build-aux/cross-options.pl: As in --help output, write optional
3172 arguments as [=ARG] not =[ARG].
3173 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
3174
3175 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
3176
3177 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
3178 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
3179 requirements for a correct m4 are stricter.
3180 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
3181 * configure.ac: Update to use AC_PROG_GNU_M4.
3182 Reported by Eric Blake.
3183
3184 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3185
3186 Help with updating web manual.
3187 * HACKING: Incorporate instructions from gnulib/doc/README.
3188 * bootstrap.conf (gnulib_modules): Add gendocs.
3189
3190 2009-04-03 Akim Demaille <demaille@gostai.com>
3191
3192 Regen.
3193 * src/parse-gram.h, src/parse-gram.c: Regen.
3194
3195 2009-04-03 Akim Demaille <demaille@gostai.com>
3196
3197 Factor %FLAG at scan level.
3198 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
3199 definitions and associated rules, replaced by....
3200 (PERCENT_FLAG): this new token type, and rule.
3201 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
3202 Use it for %debug and %error-verbose.
3203
3204 2009-04-03 Akim Demaille <demaille@gostai.com>
3205
3206 Regen.
3207 * src/parse-gram.h, src/parse-gram.c: Regen.
3208
3209 2009-04-03 Akim Demaille <demaille@gostai.com>
3210
3211 Treat %debug as %define debug.
3212 * data/bison.m4 (b4_debug_if): New.
3213 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
3214 * data/lalr1.java: Use it instead of b4_debug_flag.
3215 * src/getargs.h, src/getargs.c (debug_flag): Remove.
3216 * src/output.c (prepare): Don't output it.
3217 * src/parse-gram.y: Treat %debug as %define debug.
3218
3219 2009-04-03 Akim Demaille <demaille@gostai.com>
3220
3221 Treat %error-verbose as %define error_verbose.
3222 This allows to pass -Derror_verbose on the command line. Better
3223 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
3224 ERROR_VERBOSE being defined as false or true.
3225 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
3226 on b4_percent_define_ifdef, for does not check the defined value,
3227 but only whether the symbol is defined, rely on
3228 b4_percent_define_flag_if, so that a value of "false" is processed
3229 as a false.
3230 If not defined, define the flag to "false".
3231 (b4_error_verbose_if): New.
3232 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
3233 b4_error_verbose_flag.
3234 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
3235 * src/output.c (prepare): Don't output it.
3236 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
3237
3238 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3239
3240 Fix strange %define locations for default values.
3241 Reported by Akim Demaille at
3242 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
3243 and discussed again starting at
3244 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
3245 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
3246 because location information is bogus.
3247 Use angle brackets to delimit fake file name because square brackets
3248 look like underexpanded m4. Choose a better fake file name.
3249 Use negative line numbers.
3250 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
3251 * src/location.c (location_print): If line for a boundary is negative,
3252 only print that boundary's file name.
3253 * src/location.h: Document that.
3254 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3255 defaults): Update output.
3256
3257 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3258
3259 Pacify ./configure --enable-gcc-warnings.
3260 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
3261 in lib won't compile with it.
3262 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
3263
3264 2009-03-31 Akim Demaille <demaille@gostai.com>
3265
3266 bootstrap: --help to stdout.
3267 * bootstrap (usage): Don't send --help to stderr.
3268 Use a here doc instead of a long string.
3269
3270 2009-03-31 Akim Demaille <demaille@gostai.com>
3271
3272 bootstrap: README-hacking no longer exists
3273 * bootstrap (checkout_only_file): Set to HACKING.
3274
3275 2009-03-26 Akim Demaille <demaille@gostai.com>
3276
3277 doc: merge HACKING and README-hacking.
3278 Two files is confusing.
3279 Reported by Alexandre Duret-Lutz.
3280
3281 * README-hacking: Merge into...
3282 * HACKING (Working from the repository): here.
3283
3284 2009-03-26 Akim Demaille <demaille@gostai.com>
3285
3286 doc: update README-hacking.
3287 * README-hacking: We now use git and git submodules.
3288 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
3289
3290 2009-03-26 Akim Demaille <demaille@gostai.com>
3291
3292 lalr1.cc: avoid GCC 4.3 warnings.
3293 GCC 4.3 now warns about "a || b && c" and asks for explicit
3294 parentheses.
3295 Reported by Alexandre Duret-Lutz.
3296 * data/location.cc: Update copyright years.
3297 (Position::operator==): Use parens to make precedence explicit.
3298 Compare lines and columns first, as they are more likely to be
3299 different, and they are faster to compare.
3300
3301 2009-03-26 Akim Demaille <demaille@gostai.com>
3302
3303 gnulib: update.
3304 * gnulib: Update to latest.
3305 * src/local.mk (AM_CFLAGS): Move to...
3306 * Makefile.am: here.
3307 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
3308 AM_CFLAGS.
3309
3310 2009-03-02 Akim Demaille <demaille@gostai.com>
3311
3312 Comment changes.
3313
3314 2009-03-02 Akim Demaille <demaille@gostai.com>
3315
3316 Share b4_yytranslate_define.
3317 * data/lalr1.cc (b4_yytranslate_define): Move to...
3318 * data/c++.m4: here.
3319
3320 2009-03-02 Akim Demaille <demaille@gostai.com>
3321
3322 Use locations in the variant example.
3323 Yes, this obfuscates the point of this example, variants only.
3324 But glr.cc cannot work (yet?) without locations. This change
3325 makes it easier to use this example with glr.cc.
3326
3327 * examples/variant.yy (assert): %define it.
3328 (locations): Request them.
3329 (yylex): Bind the location to the stage.
3330
3331 2009-03-02 Akim Demaille <demaille@gostai.com>
3332
3333 Dub make_TOKEN as a public type interface.
3334 * data/c++.m4 (b4_symbol_constructor_declare)
3335 (b4_symbol_constructor_define): New empty stubs.
3336 (b4_public_types_declare, b4_public_types_define): Use them.
3337 * data/lalr1.cc (b4_symbol_constructor_declare)
3338 (b4_symbol_constructor_declare_)
3339 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
3340 Move to...
3341 * data/variant.hh: here.
3342 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
3343 needed.
3344 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
3345 b4_symbol_constructor_declare, as it is now done by
3346 b4_public_types_define and b4_public_types_declare.
3347
3348 2009-03-02 Akim Demaille <demaille@gostai.com>
3349
3350 Coding style changes.
3351 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3352 (b4_symbol_constructor_declarations)
3353 (b4_symbol_constructor_definition_)
3354 (b4_symbol_constructor_definitions)
3355 (b4_yytranslate_definition): Rename as...
3356 (b4_symbol_constructor_declare_)
3357 (b4_symbol_constructor_declare)
3358 (b4_symbol_constructor_define_)
3359 (b4_symbol_constructor_define)
3360 (b4_yytranslate_define): these.
3361 * data/variant.hh (b4_variant_definition): Rename as...
3362 (b4_variant_define): this.
3363
3364 2009-03-02 Akim Demaille <demaille@gostai.com>
3365
3366 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
3367 * data/bison.m4 (b4_percent_define_if_define): New.
3368 * data/c++.m4 (b4_variant_if): Move to...
3369 * data/bison.m4: Here, using b4_percent_define_if_define.
3370 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
3371 * data/bison.m4: Here, using b4_percent_define_if_define.
3372
3373 2009-03-02 Akim Demaille <demaille@gostai.com>
3374
3375 Dub symbol_type_base as a public type.
3376 * data/c++.m4 (b4_public_types_declare): Now define
3377 symbol_type_base and symbol_type.
3378 (b4_public_types_define): New.
3379 In both cases, the definitions are taken verbatim from lalr1.cc.
3380 * data/lalr1.cc: Adjust.
3381
3382 2009-03-02 Akim Demaille <demaille@gostai.com>
3383
3384 b4_public_types_declare.
3385 * data/c++.m4 (b4_public_types_declare): New.
3386 * data/glr.cc, data/lalr1.cc: Use it.
3387
3388 2009-03-02 Akim Demaille <demaille@gostai.com>
3389
3390 b4_semantic_type_declare.
3391 * data/c++.m4 (b4_semantic_type_declare): New.
3392 Factors and generalizes what was in glr.cc and lalr1.cc.
3393 * data/variant.hh (b4_semantic_type_declare): Redefine it for
3394 variants.
3395 * data/lalr1.cc, data/glr.cc: Use it.
3396
3397 2009-02-26 Akim Demaille <demaille@gostai.com>
3398
3399 Upgrade gnulib.
3400 * gnulib: Upgrade from master.
3401 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
3402 Regen.
3403
3404 2009-02-25 Akim Demaille <demaille@gostai.com>
3405
3406 Remove useless arguments.
3407 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
3408 relevant.
3409
3410 2009-02-25 Akim Demaille <demaille@gostai.com>
3411
3412 Comment changes.
3413 * data/lalr1.cc: here.
3414
3415 2009-02-25 Akim Demaille <demaille@gostai.com>
3416
3417 Fix glr.cc's debug level handling.
3418 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
3419 glr.c which is used.
3420 (debug_level, set_debug_level): Adjust.
3421
3422 2009-02-25 Akim Demaille <demaille@gostai.com>
3423
3424 Copyright years.
3425 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
3426
3427 2009-02-25 Akim Demaille <demaille@gostai.com>
3428
3429 Style changes.
3430 * etc/bench.pl.in (generate_grammar_list): Consitently use
3431 location_type, not yy::location.
3432
3433 2009-02-25 Akim Demaille <demaille@gostai.com>
3434
3435 Comment change.
3436 * data/lalr1.cc: here.
3437
3438 2009-02-19 Akim Demaille <demaille@gostai.com>
3439
3440 Make yyparser::error public.
3441 * data/lalr1.cc: here.
3442 There is no good reason to keep it private (and it is convenient
3443 to use it from the scanner for instance). It is already public in
3444 glr.cc.
3445
3446 2009-02-19 Akim Demaille <demaille@gostai.com>
3447
3448 Comment changes.
3449 * data/glr.cc: here.
3450
3451 2009-02-19 Akim Demaille <demaille@gostai.com>
3452
3453 Remove trailing blanks.
3454 The epilogue has its own ending \n, no need to add another.
3455
3456 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
3457 epilogue.
3458 * data/glr.cc: dnl when extending the epilogue.
3459 Remove stray "private:".
3460
3461 2009-02-19 Akim Demaille <demaille@gostai.com>
3462
3463 Use b4_c_modern.
3464 * data/c.m4 (b4_c_function_decl): Here.
3465
3466 2009-02-19 Akim Demaille <demaille@gostai.com>
3467
3468 Comment changes.
3469 * data/lalr1.cc: here.
3470
3471 2009-02-19 Akim Demaille <demaille@gostai.com>
3472
3473 Extract variant.hh
3474 * data/variant.hh: New, extracted from...
3475 * data/lalr1.cc: here.
3476 Adjust.
3477 * data/local.mk: Adjust.
3478
3479 2009-02-19 Akim Demaille <demaille@gostai.com>
3480
3481 Extract stack.hh from lalr1.cc.
3482 * data/stack.hh: New.
3483 * data/lalr1.cc: Extract from here.
3484 * data/local.mk: Adjust.
3485
3486 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
3487
3488 Add reminder about uploading public key to keys.gnupg.net.
3489 * HACKING (Release Procedure): Here.
3490
3491 2009-01-28 Akim Demaille <demaille@gostai.com>
3492
3493 * NEWS: Update information about 2.4.1 and 2.4.2.
3494
3495 2008-11-04 Akim Demaille <demaille@gostai.com>
3496
3497 Reformat NEWS.
3498 * NEWS: Use more outline-mode markup.
3499 Suggested by Jim Meyering.
3500
3501 2009-01-08 Akim Demaille <demaille@gostai.com>
3502
3503 Fix grep portability issues.
3504 Grep on Solaris does not support -q.
3505 Reported by Summum Bonum.
3506
3507 * NEWS: Add a stub for 2.4.2.
3508 * THANKS: Add Summum Bonum.
3509 * tests/atlocal.in (EGREP): New.
3510 (CC, CXX, XSLTPROC): Make it possible to override them via
3511 envvars.
3512 * tests/java.at: Use $EGREP instead of egrep.
3513 Use AT_CHECK's ignore instead of grep's -q.
3514
3515 2008-12-11 Akim Demaille <demaille@gostai.com>
3516
3517 Pass the token type to yysyntax_error.
3518 * data/yacc.c (yysyntax_error): Take the transated token instead
3519 of the raw number.
3520 Adjust callers.
3521 * TODO: Update.
3522
3523 2008-12-11 Akim Demaille <demaille@gostai.com>
3524
3525 Formatting changes.
3526 * data/glr.c: Formatting changes.
3527
3528 2008-12-11 Akim Demaille <demaille@gostai.com>
3529
3530 Propagate i18n changes into glr.c.
3531 * TODO: Update.
3532 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
3533 building the error message format dynamically.
3534 * data/lalr1.java: Formatting changes.
3535
3536 2008-12-11 Akim Demaille <demaille@gostai.com>
3537
3538 Use testsuite -C.
3539 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
3540 Solves problems when top_srcdir is an absolute path.
3541 Suggested by Eric Blake.
3542 * configure.ac: Require Autoconf 2.62.
3543
3544 2008-12-11 Akim Demaille <demaille@gostai.com>
3545
3546 Simplify the i18n of the error messages.
3547 * data/lalr1.cc: Comment changes.
3548 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
3549 lalr1.cc instead of building dynamically the format string.
3550
3551 2008-12-08 Akim Demaille <demaille@gostai.com>
3552
3553 Fix portability issue in the test suite.
3554 * tests/local.at (AT_MATCHES_CHECK): New.
3555 Based on Perl instead of Sed. Sed has too many portability
3556 pitfalls, not ever Sed is GNU Sed.
3557 * tests/actions.at (Fix user actions without a trailing semicolon):
3558 Use it.
3559
3560 2008-12-08 Akim Demaille <demaille@gostai.com>
3561
3562 Update data/README.
3563 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
3564
3565 2008-12-08 Akim Demaille <demaille@gostai.com>
3566
3567 Install autoconf as a submodule to get m4sugar.
3568 * .gitmodules: Add submodules/autoconf.
3569 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
3570 submodules/autoconf.
3571
3572 2008-12-08 Akim Demaille <demaille@gostai.com>
3573
3574 Test token.prefix in all the skeletons.
3575 * data/java.m4 (b4_token_enum): Use the token.prefix.
3576 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
3577 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
3578 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
3579 * tests/java.at: Comment changes.
3580 (AT_CHECK_JAVA_MINIMAL): Define the END token.
3581 (Java parser class and package names): Add token.prefix check.
3582
3583 2008-12-08 Akim Demaille <demaille@gostai.com>
3584
3585 Fix regeneration of atconfig.
3586 * tests/local.mk (tests/atconfig): The rule was incorrect, but
3587 remove it: now that there is no tests/Makefile.am, the top-level
3588 Makefile properly updates atconfig when needed.
3589
3590 2008-12-07 Di-an Jan <dianj@freeshell.org>
3591
3592 Implement the FIXME that ends an user action with a semicolon
3593 if it seems necessary.
3594 * src/scan-code.l (flex rules section): Flag cpp directive from
3595 any `#' to the first unescaped end-of-line. Semicolon is not
3596 needed after `;', `{', '}', or cpp directives and is needed after
3597 any other token (whitespaces and comments have no effect).
3598 * tests/actions.at (Fix user actions without a trailing semicolon):
3599 New test.
3600 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
3601 to make user actions complete statements.
3602 Adjust column numbers in error messages.
3603 * tests/regression.at (Fix user actions without a trailing semicolon):
3604 Remove. Covered by new test.
3605
3606 2008-12-07 Akim Demaille <demaille@gostai.com>
3607
3608 Update gnulib.
3609 * gnulib: Update from master.
3610
3611 2008-12-05 Eric Blake <ebb9@byu.net>
3612
3613 Avoid compiler warning.
3614 * src/output.c (muscle_insert_item_number_table): Delete unused
3615 function.
3616
3617 2008-12-02 Eric Blake <ebb9@byu.net>
3618
3619 Build testsuite with newer autoconf.
3620 * tests/output.at (m4_expand): Don't override in newer autoconf,
3621 where the underlying implementation changed.
3622 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
3623 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
3624 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
3625 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
3626 since some of them contain unbalanced ')'.
3627
3628 2008-12-01 Akim Demaille <demaille@gostai.com>
3629
3630 Use b4_symbol for printers and destructors everywhere.
3631 * data/bison.m4 (b4_symbol_action_location): New.
3632 * data/c.m4 (b4_symbol_actions): Remove.
3633 Adjust all callers to use by b4_symbol_foreach and the corresponding
3634 b4_symbol_printer/destructor macro.
3635 * data/glr.cc: Adjust.
3636 * data/lalr1.java: Adjust the %destructor sanity check.
3637 * src/output.c (symbol_code_props_output): Remove, we no longer
3638 need the b4_symbol_printers/destructors tables.
3639
3640 2008-12-01 Akim Demaille <demaille@gostai.com>
3641
3642 Use b4_symbol_case_.
3643 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
3644 b4_symbol_case_.
3645
3646 2008-12-01 Akim Demaille <demaille@gostai.com>
3647
3648 Move b4_symbol based macro to bison.m4.
3649 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
3650 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
3651 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
3652 (b4_type_foreach): Move to...
3653 * data/bison.m4: Here.
3654 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
3655 b4_symbol_value_template instead of b4_symbol_value.
3656
3657 2008-12-01 Akim Demaille <demaille@gostai.com>
3658
3659 b4_symbol/type_foreach.
3660 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
3661 Use them.
3662
3663 2008-12-01 Akim Demaille <demaille@gostai.com>
3664
3665 Use the symbol properties to output the printer/destructor for lalr1.cc.
3666 Instead of defining complex list of tuples to define various
3667 properties of the symbols, we now prefer to define symbols as
3668 "structs" in m4: using the symbol key (its number), and the
3669 property name, b4_symbol gives it value. Use this to handle
3670 destructors and printers.
3671
3672 * src/output.c (CODE_PROP): New.
3673 (prepare_symbol_definitions): Use it to define the printer and
3674 destructor related attributes of the symbols.
3675 * data/lalr1.cc (b4_symbol_actions): Rename as...
3676 (b4_symbol_action): this.
3677 Use b4_symbol instead of 6 arguments.
3678 (b4_symbol_printer, b4_symbol_destructor): New.
3679 Use them instead of b4_symbol_actions.
3680
3681 2008-12-01 Akim Demaille <demaille@gostai.com>
3682
3683 Avoid capturing variables too easily.
3684 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
3685 v__ and p__ instead of v and p.
3686
3687 2008-12-01 Akim Demaille <demaille@gostai.com>
3688
3689 Remove spurious empty line before syncline.
3690 * data/bison.m4 (b4_syncline): Don't output an empty line before
3691 the output.
3692
3693 2008-11-26 Akim Demaille <demaille@gostai.com>
3694
3695 Convert lib/Makefile.am into lib/local.mk.
3696 The real problem is rather gnulib.mk, which itself is extracted
3697 from a Makefile.am that gnulib expects to the "recursive". The
3698 tool prefix-gnulib-mk converts such a gnulib.mk to be
3699 non-recursive. Also, some AC_SUBST variables need to be adjusted.
3700
3701 * etc/prefix-gnulib-mk: New.
3702 * bootstrap (slurp): Use it to convert further gnulib.mk.
3703 No longer try to avoid re-creation of lib/gnulib.mk as the changes
3704 are deeper.
3705 * lib/Makefile.am: Rename as...
3706 * lib/local.mk: this.
3707 Adjust to be prefixed.
3708 * Makefile.am, configure.ac: Adjust.
3709 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
3710
3711 2008-11-26 Akim Demaille <demaille@gostai.com>
3712
3713 s/_FLAGS/FLAGS/.
3714 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
3715 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
3716 Reported by Eric Blake.
3717
3718 2008-11-26 Akim Demaille <demaille@gostai.com>
3719
3720 Use b4_parser_tables_define in glr.cc.
3721 * data/glr.c: Use b4_parser_tables_define instead of defining the
3722 (deterministic integral) tables by hand.
3723
3724 2008-11-26 Akim Demaille <demaille@gostai.com>
3725
3726 Use b4_parser_tables_define in Java.
3727 * data/java.m4 (b4_typed_parser_table): Rename as...
3728 (b4_typed_parser_table_define): this, for consistency.
3729 Accept a comment as $4.
3730 Move $2 into yy*_.
3731 (b4_integral_parser_table): Rename as...
3732 (b4_integral_parser_table_define): this.
3733 * data/lalr1.java: Adjust all uses.
3734 Use b4_parser_tables_define instead of generation by hand.
3735
3736 2008-11-26 Akim Demaille <demaille@gostai.com>
3737
3738 Prepare the convergence bw C style and Java table generation.
3739 * data/bison.m4 (b4_tables_map, b4_tables_declare)
3740 (b4_tables_define): Rename as...
3741 (b4_integral_parser_tables_map, b4_parser_tables_declare)
3742 (b4_parser_tables_define): these.
3743 * data/c.m4 (b4_table_define): Rename as...
3744 (b4_integral_parser_table_define): this.
3745 * data/lalr1.cc: Adjust.
3746 (b4_table_define, b4_table_declare): Rename as...
3747 (b4_integral_parser_table_define)
3748 (b4_integral_parser_table_declare): these.
3749 (yyrline_): Move the comment where it is actually used.
3750 * data/yacc.c: Adjust.
3751 (yyrline): Use b4_integral_parser_table_define.
3752
3753 2008-11-26 Akim Demaille <demaille@gostai.com>
3754
3755 Regen.
3756 * src/parse-gram.h, src/parse-gram.c: Regen.
3757
3758 2008-11-26 Akim Demaille <demaille@gostai.com>
3759
3760 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
3761 * data/lalr1.cc (b4_tables_map): Move to...
3762 * data/bison.m4: here.
3763 Update the comment for yytable during the flight.
3764 (b4_tables_declare, b4_tables_define): New.
3765 * data/lalr1.cc: Use them.
3766 * data/c.m4 (b4_table_define): New.
3767 * data/yacc.c: Use b4_tables_define instead of output the tables
3768 by hand.
3769 * tests/regression.at (Web2c Actions): Adjust the expected output,
3770 the order of the tables changed.
3771
3772 2008-11-26 Akim Demaille <demaille@gostai.com>
3773
3774 Get rid of (yy)rhs and (yy)prhs.
3775 These tables are no longer needed in the parsers, and they don't seem to
3776 be useful. They are not documented either.
3777
3778 * src/output.c (prepare_rules): Get rid of rhs and prhs.
3779 Adjust the computation of (yy)r2.
3780
3781 2008-11-26 Akim Demaille <demaille@gostai.com>
3782
3783 Rule length is unsigned.
3784 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
3785
3786 2008-11-26 Akim Demaille <demaille@gostai.com>
3787
3788 Get rid of lalr1-split.cc.
3789 It was no longer maintainer.
3790
3791 * data/lalr1-split.cc: Remove.
3792 * etc/bench.pl.in (bench_fusion_parser): Remove.
3793 Adjust.
3794
3795 2008-11-26 Akim Demaille <demaille@gostai.com>
3796
3797 Use yy* consistently.
3798 * data/glr.c: Now that yyrhs no longer exists as a global
3799 variable, rename local "rhs" variables into "yyrhs" for
3800 consistency.
3801
3802 2008-11-25 Akim Demaille <demaille@gostai.com>
3803
3804 Get rid of yyrhs and yyprhs in glr.c.
3805 * data/glr.c (yyrhs, yyprhs): Remove.
3806 Instead, use the state stack and yystos.
3807
3808 2008-11-25 Akim Demaille <demaille@gostai.com>
3809
3810 Flag glr tests.
3811 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
3812 as an Autotest keyword.
3813
3814 2008-11-25 Akim Demaille <demaille@gostai.com>
3815
3816 Prefer TESTSUITE_FLAGS.
3817 TESTSUITEFLAGS is barely readable.
3818
3819 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
3820 for backward compatibility.
3821 Use the former instead of the latter.
3822
3823 2008-11-25 Akim Demaille <demaille@gostai.com>
3824
3825 Get rid of yyrhs and yyprhs in larl1.java.
3826 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
3827 (yy_reduce_print): Rather, use yystos_ and the state stack.
3828
3829 2008-11-25 Akim Demaille <demaille@gostai.com>
3830
3831 Formatting changes.
3832
3833 2008-11-25 Akim Demaille <demaille@gostai.com>
3834
3835 Get rid of yyrhs and yyprhs in yacc.c.
3836 They were used to get the symbol types, given a rule number, when
3837 displaying the top of the stack before a reduction. But the
3838 symbol type is available from the state stack. This has two be
3839 benefits: two tables less in the parser (making it smaller), and a
3840 more consistent use of the three stacks which will help to fuse
3841 them.
3842
3843 * data/yacc.c (yyprhs, yyrhs): Remove.
3844 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
3845 (yy_reduce_print): Take yyssp as argument.
3846 Use it, together with yystos, to get the symbol type.
3847 * tests/regression.at (Web2c Report): Remove these tables from the
3848 expected output.
3849
3850 2008-11-25 Akim Demaille <demaille@gostai.com>
3851
3852 b4_tables_map.
3853 The point is to factor the generation of the tables across skeletons.
3854 This is language dependant.
3855
3856 * data/c.m4 (b4_comment_): New.
3857 Should be usable to define how to generate tables independently of
3858 the language.
3859 (b4_c_comment): New.
3860 (b4_comment): Bounce to b4_c_comment.
3861 Now support $2 = [PREFIX] for indentation.
3862 * data/lalr1.cc (b4_table_declare): Don't output a comment if
3863 there is no comment.
3864 Indent it properly when there is one.
3865 Output the ending semicolon.
3866 (b4_table_define): Space changes.
3867 Output the ending semicolon.
3868 (b4_tables_map): New.
3869 Use it twice instead of declaring and defining the (integral)
3870 tables by hand.
3871
3872 2008-11-25 Akim Demaille <demaille@gostai.com>
3873
3874 b4_table_declare.
3875 * data/lalr1.cc (b4_table_declare): New.
3876 Use it to declare the tables defined with b4_table_define.
3877 (b4_table_define): Declare a third arg to match b4_table_declare
3878 signature.
3879 Move all the comments around invocations of b4_table_define into
3880 the invocations itselves.
3881 Move things around to have the order for declarations and
3882 definitions.
3883
3884 2008-11-25 Akim Demaille <demaille@gostai.com>
3885
3886 Formatting changes.
3887 * data/lalr1.java: here.
3888
3889 2008-11-25 Akim Demaille <demaille@gostai.com>
3890
3891 b4_args is more general than only C++.
3892 * data/lalr1.cc (b4_args, _b4_args): Move to...
3893 * data/bison.m4: here.
3894
3895 2008-11-21 Di-an Jan <dianj@freeshell.org>
3896
3897 Implement no-XXX arguments for --warnings, --report, --trace.
3898 * src/getargs.c (flags_argmatch): Handles no-XXX.
3899 Fix typo in doxygen comment.
3900
3901 2008-11-21 Akim Demaille <demaille@gostai.com>
3902
3903 Display the changes in cross-options.texi.
3904 * build-aux/cross-options.pl ($sep): New, to separate items.
3905 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
3906 changes.
3907
3908 2008-11-20 Di-an Jan <dianj@freeshell.org>
3909
3910 Improves options in the manual.
3911 * doc/bison.texinfo (-g, -x): Add space before argument.
3912 (Option Cross Key): Implement FIXME: listing directives also.
3913 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
3914 (Short Option): Special case -d. Put arguments inside @option.
3915 (Bison Directive): Add column, automatically extracted from
3916 src/scan-gram.l (actual name passed as the first argument)
3917 with special case for %define.
3918 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
3919 to build-aux/cross-options.pl.
3920 * src/getargs.c (usage): Document limitations of cross-options.pl.
3921 * src/scan-gram.l: Likewise.
3922
3923 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3924
3925 Fix unexpanded macros in GLR defines file.
3926 Reported by Csaba Raduly at
3927 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3928 * THANKS (Csaba Raduly): Add.
3929 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3930 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3931 lexer in a separate module that includes the defines file.
3932 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
3933 source.
3934 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3935 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3936 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3937 (AT_DATA_SOURCE_PROLOGUE): New.
3938 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3939 (AT_DATA_SOURCE): New.
3940 (AT_FULL_COMPILE): Extend to support an additional source file.
3941
3942 2008-11-18 Akim Demaille <demaille@gostai.com>
3943
3944 More TODO.
3945 * TODO: More short term issues.
3946
3947 2008-11-18 Akim Demaille <demaille@gostai.com>
3948
3949 Regen.
3950 * src/parse-gram.h, src/parse-gram.c: Regen.
3951
3952 2008-11-18 Akim Demaille <demaille@gostai.com>
3953
3954 Use b4_subtract where possible.
3955 * data/lalr1.cc (b4_subtract): Move to...
3956 * data/bison.m4: here.
3957 * data/glr.c (b4_rhs_data): Use it.
3958 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
3959
3960 2008-11-18 Akim Demaille <demaille@gostai.com>
3961
3962 Remove incorrect mode specification.
3963 * data/glr.cc: Don't pretend it's C code.
3964
3965 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3966
3967 Simplify last patch slightly.
3968 * src/getargs.c (getargs): Here.
3969
3970 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3971
3972 Fix last warning from --enable-gcc-warnings.
3973 * src/getargs.c (getargs): Don't assign const address to non-const
3974 pointer.
3975
3976 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3977
3978 Don't let maintainer-*-check targets force a version update.
3979 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3980 handled.
3981
3982 2008-11-17 Di-an Jan <dianj@freeshell.org>
3983
3984 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3985 Align menus. Adjust word wrapping. Use node names for menu names.
3986 (Examples): Don't abbreviate node names.
3987 (LocalWords): Remove abbreviations.
3988 (Copying): Make description a sentence.
3989 (Java Action Features): Remove period to match the rest of menu.
3990
3991 2008-11-17 Di-an Jan <dianj@freeshell.org>
3992
3993 Handles several --enable-gcc-warnings.
3994 * src/getargs.c (command_line_location): Set parameters to void.
3995 * src/output.c (symbol_type_name_cmp): Make static.
3996 (symbols_by_type_name): Set parameters to void.
3997 (symbol_definitions_output): Remove unused parameter. Rename as...
3998 (prepare_symbol_definitions): this.
3999 (muscles_output): Move symbol_definitions_output to...
4000 (output): here as prepare_symbol_definitions.
4001 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
4002 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
4003
4004 2008-11-17 Di-an Jan <dianj@freeshell.org>
4005
4006 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
4007 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
4008
4009 2008-11-16 Akim Demaille <demaille@gostai.com>
4010
4011 Add missing $(EXEEXT).
4012 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
4013 "src/bison$(EXEEXT)".
4014 Reported by Di-an Jan.
4015
4016 2008-11-15 Akim Demaille <demaille@gostai.com>
4017
4018 * TODO: Update.
4019
4020 2008-11-15 Akim Demaille <demaille@gostai.com>
4021
4022 Formatting changes.
4023 * tests/input.at: here.
4024
4025 2008-11-15 Akim Demaille <demaille@gostai.com>
4026
4027 Remove duplicate header inclusion.
4028 * src/LR0.c: here.
4029
4030 2008-11-15 Akim Demaille <demaille@gostai.com>
4031
4032 * src/parse-gram.h, src/parse-gram.c: Regen.
4033
4034 2008-11-15 Akim Demaille <demaille@gostai.com>
4035
4036 Support parametric types.
4037
4038 There are two issues to handle: first scanning nested angle
4039 bracket pairs to support types such as std::pair< std::string,
4040 std::list<std::string> > >.
4041
4042 Another issue is to address idiosyncracies of C++: do not glue two
4043 closing angle brackets together (otherwise it's operator>>), and
4044 avoid sticking blindly a TYPE to the opening <, as it can result
4045 in '<:' which is a digraph for '['.
4046
4047 * src/scan-gram.l (brace_level): Rename as...
4048 (nesting): this.
4049 (SC_TAG): New.
4050 Implement support for complex tags.
4051 (tag): Accept
4052 , but not <.
4053 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
4054 (b4_symbol_variant): Leave space around types as parameters.
4055 * examples/variant.yy: Use nested template types and leading ::.
4056 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
4057 Rename as...
4058 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
4059 * tests/c++.at: Test parametric types.
4060
4061 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4062
4063 Test token.prefix.
4064 This is not sufficient, but we test at least that the make_SYMBOL
4065 interface is not affected by token.prefix. A more general test
4066 will be implemented when the support of token.prefix is generalized
4067 to more skeletons.
4068
4069 * tests/c++.at: One more variant test, using token.prefix.
4070
4071 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4072
4073 Test the make_TOKEN interface.
4074 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
4075 Factor the common code in yylex.
4076 Use it to test "%define lex_symbol".
4077
4078 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4079
4080 Formatting change.
4081
4082 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4083
4084 Simplify code for variants bench marks.
4085 * etc/bench.pl.in (&generate_grammar_list): Define and use
4086 location_type.
4087 Factor the common code in yylex.
4088
4089 2008-11-15 Akim Demaille <demaille@gostai.com>
4090
4091 Better error message.
4092 * bootstrap (find_tool): Fix the error message.
4093
4094 2008-11-15 Akim Demaille <demaille@gostai.com>
4095
4096 Update variant.yy to newest interface.
4097 * examples/variant.yy: Define lex_symbol.
4098 Adjust.
4099
4100 2008-11-15 Akim Demaille <demaille@gostai.com>
4101
4102 Don't use locations in variant.yy.
4103 * examples/variant.yy: Adjust to not using locations.
4104
4105 2008-11-15 Akim Demaille <demaille@gostai.com>
4106
4107 Comment changes.
4108 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
4109 comments for the license.
4110
4111 2008-11-15 Akim Demaille <demaille@gostai.com>
4112
4113 Remove tests/Makefile.am.
4114 * tests/Makefile.am: Rename as...
4115 * tests/local.mk: this.
4116 * Makefile.am, configure.ac: Adjust.
4117 * Makefile.am (DISTCLEANFILES): Define.
4118 (maintainer-check, maintainer-xml-check, maintainer-push-check):
4119 Remove, we no longer need to bounce to the real targets.
4120
4121 2008-11-15 Akim Demaille <demaille@gostai.com>
4122
4123 Comment changes.
4124
4125 2008-11-15 Akim Demaille <demaille@gostai.com>
4126
4127 djgpp/local.mk.
4128 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
4129 * djgpp/local.mk: this new file.
4130
4131 2008-11-15 Akim Demaille <demaille@gostai.com>
4132
4133 Remove doc/Makefile.am.
4134 * doc/Makefile.am: Rename as...
4135 * doc/local.mk: this.
4136 Adjust paths
4137 * Makefile.am, configure.ac: Adjust.
4138 * Makefile.am (MOSTLYCLEANFILES): New.
4139 * src/local.mk: Adjust.
4140
4141 2008-11-15 Akim Demaille <demaille@gostai.com>
4142
4143 Move sc_tight_scope into maint.mk.
4144 It does not work, and I don't know how it was supposed to work: it
4145 seems to be looking for sources in the build tree. I just moved
4146 it at a better place, fixing it is still required.
4147
4148 * src/local.mk (echo): Remove.
4149 (sc_tight_scope): Move to...
4150 * maint.mk: here.
4151
4152 2008-11-15 Akim Demaille <demaille@gostai.com>
4153
4154 Regen.
4155 * src/parse-gram.h, src/parse-gram.h: Regen.
4156
4157 2008-11-15 Akim Demaille <demaille@gostai.com>
4158
4159 Remove src/Makefile.am.
4160 * src/Makefile.am: Rename as...
4161 * src/local.mk: this.
4162 Prefix all the paths with src/.
4163 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
4164 (AM_CPPFLAGS): Find find in builddir/src.
4165 (YACC): Move the flags into...
4166 (AM_YFLAGS): here.
4167 * maint.mk (sc_tight_scope): Disable.
4168 It used to bounce to the version in src/Makefile.am which is now
4169 part of this very Makefile.
4170 * Makefile.am, configure.ac: Adjust.
4171 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
4172 include "..." to find files "here": we are no longer in src/, so
4173 qualify the includes with src/.
4174 * doc/Makefile.am (PREPATH): No longer include the top_builddir
4175 prefix.
4176 (.x.1): Adjust to be able to create src/foo from the top level
4177 Makefile, instead of going bounce to src/Makefile the creation of
4178 foo.
4179
4180 2008-11-15 Akim Demaille <demaille@gostai.com>
4181
4182 Remove useless variable.
4183 * doc/Makefile.am (srcsrcdir): Remove.
4184
4185 2008-11-15 Akim Demaille <demaille@gostai.com>
4186
4187 Remove data/Makefile.am.
4188 * data/Makefile.am: Rename as...
4189 * data/local.mk: this.
4190 Adjust paths.
4191 * Makefile.am, configure.ac: Adjust.
4192
4193 2008-11-15 Akim Demaille <demaille@gostai.com>
4194
4195 Remove etc/Makefile.am.
4196 * etc/Makefile.am: Rename as...
4197 * etc/local.mk: this.
4198 Adjust.
4199 * Makefile.am, configure.ac: Adjust.
4200
4201 2008-11-15 Akim Demaille <demaille@gostai.com>
4202
4203 Remove examples/local.mk.
4204 examples/calc++/Makefile.am might be interesting to keep as is, since
4205 it is an example in itself.
4206
4207 * examples/Makefile.am: Rename as...
4208 * examples/local.mk: this.
4209 Adjust.
4210 * Makefile.am, configure.ac: Adjust.
4211
4212 2008-11-15 Akim Demaille <demaille@gostai.com>
4213
4214 Remove build-aux/Makefile.am.
4215 Recursive Makefiles are really way too slow, let's get rid of some of
4216 them.
4217
4218 * build-aux/Makefile.am: Rename as...
4219 * build-aux/local.mk: this.
4220 Adjust paths.
4221 * Makefile.am, configure.ac: Adjust.
4222
4223 2008-11-15 Akim Demaille <demaille@gostai.com>
4224
4225 Provide convenience constructors for locations and positions.
4226 * data/location.cc (position::position): Accept file, line and
4227 column as arguments with default values.
4228 Always qualify initial line and column literals as unsigned.
4229 (location::location): Provide convenience constructors.
4230
4231 2008-11-15 Akim Demaille <demaille@gostai.com>
4232
4233 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
4234 token type.
4235 Using template buys us nothing, and makes it uselessly complex to
4236 construct a symbol. Besides, it could not be generalized to other
4237 languages, while make_FOO would work in C/Java etc.
4238
4239 * data/lalr1.cc (b4_symbol_): New.
4240 (b4_symbol): Use it.
4241 (b4_symbol_constructor_declaration_)
4242 (b4_symbol_constructor_definition_): Instead of generating
4243 specializations of an overloaded template function, just generate
4244 several functions whose names are forged from the token names
4245 without the token.prefix.
4246 (b4_symbol_constructor_declarations): Generate them for all the
4247 symbols, not just by class of symbol type, now that instead of
4248 specializing a function template by the token, we generate a
4249 function named after the token.
4250 (b4_symbol_constructor_specialization_)
4251 (b4_symbol_constructor_specializations): Remove.
4252 * etc/bench.pl.in: Adjust to this new API.
4253
4254 2008-11-13 Akim Demaille <demaille@gostai.com>
4255
4256 %define token.prefix.
4257 Provide a means to add a prefix to the name of the tokens as
4258 output in the generated files. Because of name clashes, it is
4259 good to have such a prefix such as TOK_ that protects from names
4260 such as EOF, FILE etc. But it clutters the grammar itself.
4261
4262 * data/bison.m4 (token.prefix): Empty by default.
4263 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
4264 * data/lalr1.cc (b4_symbol): Ditto.
4265
4266 2008-11-13 Akim Demaille <demaille@gostai.com>
4267
4268 Compute at M4 time some of the subtractions.
4269 * data/lalr1.cc (b4_subtract): New.
4270 (b4_rhs_data): Use it.
4271
4272 2008-11-13 Akim Demaille <demaille@gostai.com>
4273
4274 symbol::token.
4275 This allows the user to get the type of a token returned by yylex.
4276
4277 * data/lalr1.cc (symbol::token): New.
4278 (yytoknum_): Define when %define lex_symbol, independently of
4279 %debug.
4280 (yytoken_number_): Move into...
4281 (symbol::token): here, since that's the only use.
4282 The other one is YYPRINT which was not officially supported
4283 by lalr1.cc, and anyway it did not work since YYPRINT uses this
4284 array under a different name (yytoknum).
4285
4286 2008-11-13 Akim Demaille <demaille@gostai.com>
4287
4288 YYERRCODE.
4289 * TODO (YYERRCODE): Mention the case of $undef.
4290
4291 2008-11-13 Akim Demaille <demaille@gostai.com>
4292
4293 TODO: YYPRINT.
4294 * TODO (YYPRINT): New.
4295
4296 2008-11-13 Akim Demaille <demaille@gostai.com>
4297
4298 Comment changes.
4299 * data/lalr1.cc, data/yacc.c: Fix the description of the
4300 yytranslate and yytoknum tables.
4301
4302 2008-11-13 Akim Demaille <demaille@gostai.com>
4303
4304 Define make_symbol in the header.
4305 To reach good performances these functions should be inlined (yet
4306 this is to measure precisely). To this end they must be available
4307 to the caller.
4308
4309 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
4310 location_type with the class name.
4311 Since will now be output in the header, declare "inline".
4312 No longer use b4_symbol_constructor_specializations, but
4313 b4_symbol_constructor_definitions in the header.
4314 Don't call it in the *.cc file.
4315
4316 2008-11-13 Akim Demaille <demaille@gostai.com>
4317
4318 Define yytranslate in the header for lex_symbol.
4319 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
4320 into the header file when using %define lex_symbol.
4321 (yytranslate_): Declare inline.
4322
4323 2008-11-13 Akim Demaille <demaille@gostai.com>
4324
4325 Define the constructors of symbol_type in
4326 b4_symbol_constructor_definitions.
4327 The constructors are called by the make_symbol functions, which a
4328 forthcoming patch will move elsewhere. Hence the interest of
4329 putting them together.
4330
4331 The stack_symbol_type does not need to be moved, it is used only
4332 by the parser.
4333
4334 * data/lalr1.cc: Move symbol_type and symbol_base_type
4335 constructors into...
4336 (b4_symbol_constructor_definitions): here.
4337 Adjust.
4338
4339 2008-11-13 Akim Demaille <demaille@gostai.com>
4340
4341 Make it easier to move the definition of yytranslate_.
4342 Forthcoming changes will make it possible to use yytranslate_
4343 from outside the parser implementation file.
4344
4345 * data/lalr1.cc (b4_yytranslate_definition): New.
4346 Use it.
4347
4348 2008-11-13 Akim Demaille <demaille@gostai.com>
4349
4350 Remove useless class specification.
4351 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
4352 to refer to the class name to use a type defined by the class for
4353 arguments of member functions.
4354
4355 2008-11-13 Akim Demaille <demaille@gostai.com>
4356
4357 Finer input type for yytranslate.
4358 This patch is debatable: the tradition expects yylex to return an int
4359 which happens to correspond to token_number (which is an enum). This
4360 allows for instance to return characters (such as '*' etc.). But this
4361 goes against the stronger typing I am trying to have with the new
4362 lex interface which return a symbol_type. So in this case, feed
4363 yytranslate_ with a token_type.
4364
4365 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
4366 expect a token_type.
4367
4368 2008-11-13 Akim Demaille <demaille@gostai.com>
4369
4370 Honor lex-params in %define lex_symbol mode.
4371 * data/lalr1.cc: Use b4_lex_param.
4372
4373 2008-11-13 Akim Demaille <demaille@gostai.com>
4374
4375 Simplify names.
4376 * src/output.c (symbol_definitions_output): Rename symbol
4377 attributes type_name and has_type_name as type and has_type.
4378 * data/lalr1.cc: Adjust uses.
4379
4380 2008-11-13 Akim Demaille <demaille@gostai.com>
4381
4382 Use b4_type_names for the union type.
4383 The union used to compute the size of the variant used to iterate
4384 over the type of all the symbols, with a lot of redundancy. Now
4385 iterate over the lists of symbols having the same type-name.
4386
4387 * data/lalr1.cc (b4_char_sizeof_): New.
4388 (b4_char_sizeof): Use it.
4389 Adjust to be called with a list of numbers instead of a single
4390 number.
4391 Adjust its caller for new-line issues.
4392
4393 2008-11-13 Akim Demaille <demaille@gostai.com>
4394
4395 Define the "identifier" of a symbol.
4396 Symbols may have several string representations, for instance if
4397 they have an alias. What I call its "id" is a string that can be
4398 used as an identifier. May not exist.
4399
4400 Currently the symbols which have the "tag_is_id" flag set are
4401 those that don't have an alias. Look harder for the id.
4402
4403 * src/output.c (is_identifier): Move to...
4404 * src/symtab.c (is_identifier): here.
4405 * src/symtab.h, src/symtab.c (symbol_id_get): New.
4406 * src/output.c (symbol_definitions_output): Use it to define "id"
4407 and "has_id".
4408 Remove the definition of "tag_is_id".
4409 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
4410 "tag_is_id" were used to produce code.
4411 We still use "tag" for documentation.
4412
4413 2008-11-11 Akim Demaille <demaille@gostai.com>
4414
4415 Locations are no longer required by lalr1.cc.
4416 * data/lalr1.cc (_b4_args, b4_args): New.
4417 Adjust all uses of locations to make them optional.
4418 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
4419 (AT_CHECK_NAMESPACE): Check the use of locations.
4420 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
4421 without locations with lalr1.cc.
4422 Test these cases.
4423 * tests/output.at: Check lalr1.cc with and without location
4424 support.
4425 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
4426 Don't use locations.
4427
4428 2008-11-11 Akim Demaille <demaille@gostai.com>
4429
4430 AT_FULL_COMPILE.
4431 * tests/local.at (AT_FULL_COMPILE): New.
4432 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
4433
4434 2008-11-11 Akim Demaille <demaille@gostai.com>
4435
4436 Support parens in calc++.
4437 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
4438 * examples/calc++/test (run): Check the expected output.
4439 Adjust callers.
4440 Check parens too.
4441
4442 2008-11-11 Akim Demaille <demaille@gostai.com>
4443
4444 Simplify lalr1.cc since %defines is mandatory.
4445 * data/lalr1.cc: Remove useless calls to b4_defines_if.
4446
4447 2008-11-11 Akim Demaille <demaille@gostai.com>
4448
4449 TODO: yyfmt.
4450 * TODO (yysyntax_error): New item.
4451
4452 2008-11-11 Akim Demaille <demaille@gostai.com>
4453
4454 Prefer M4 to CPP.
4455 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
4456 YYERROR_VERBOSE.
4457
4458 2008-11-11 Akim Demaille <demaille@gostai.com>
4459
4460 Support i18n of the parse error messages.
4461 * TODO (lalr1.cc/I18n): Remove.
4462 * data/lalr1.cc (yysyntax_error_): Support the translation of the
4463 error messages, as done in yacc.c.
4464 Stay within the yy* pseudo namespace.
4465
4466 2008-11-11 Akim Demaille <demaille@gostai.com>
4467
4468 More TODO.
4469 * TODO (single stack, yysyntax_error): New.
4470
4471 2008-11-11 Akim Demaille <demaille@gostai.com>
4472
4473 Make it possible to return a symbol_type from yylex.
4474 * data/lalr1.cc (b4_lex_symbol_if): New.
4475 (parse): When lex_symbol is defined, expected yylex to return the
4476 complete lookahead.
4477 * etc/bench.pl.in (generate_grammar_list): Extend to support this
4478 yylex interface.
4479 (bench_variant_parser): Exercise it.
4480
4481 2008-11-11 Akim Demaille <demaille@gostai.com>
4482
4483 Remove useless bench case.
4484 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
4485 no longer used.
4486
4487 2008-11-11 Akim Demaille <demaille@gostai.com>
4488
4489 Improve display of directives.
4490 * etc/bench.pl.in (parse_term): Don't add useless eol.
4491
4492 2008-11-11 Akim Demaille <demaille@gostai.com>
4493
4494 Use string_cast in the bench.
4495 * etc/bench.pl.in (generate_grammar_list): Define and use
4496 string_cast.
4497
4498 2008-11-11 Akim Demaille <demaille@gostai.com>
4499
4500 Replace yychar with a Boolean.
4501 * data/lalr1.cc (parse::yychar): Replace by...
4502 (parse::yyempty): this.
4503
4504 2008-11-11 Akim Demaille <demaille@gostai.com>
4505
4506 Factor the tables.
4507 * TODO: New item.
4508
4509 2008-11-11 Akim Demaille <demaille@gostai.com>
4510
4511 Let yytranslate handle the eof case.
4512 * data/lalr1.cc (yytranslate_): Handle the EOF case.
4513 Adjust callers.
4514 No longer expect yychar to be equal to yyeof_, rather, test the
4515 lookahead's (translated) kind.
4516
4517 2008-11-11 Akim Demaille <demaille@gostai.com>
4518
4519 yychar cannot be empty in yyerrlab.
4520 * TODO (yychar == yyempty_): New.
4521 * data/lalr1.cc: Remove the handling of this case.
4522 This eases forthcoming changes related to yychar and yytranslate.
4523
4524 2008-11-11 Akim Demaille <demaille@gostai.com>
4525
4526 Bench: syntactic sugar for %define/#define.
4527 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
4528 (&bench_push_parser, bench_variant_parser): Use this feature.
4529 (&eat): New.
4530 Use it.
4531
4532 2008-11-11 Akim Demaille <demaille@gostai.com>
4533
4534 Less memory pressure on the "list" bench.
4535 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
4536 the values, to limit memory pressure.
4537
4538 2008-11-11 Akim Demaille <demaille@gostai.com>
4539
4540 Introduce make_symbol.
4541 make_symbol provides a means to construct a full symbol (kind,
4542 value, location) in a single shot. It is meant to be a Symbol
4543 constructor, parameterized by the symbol kind so that overloading
4544 would prevent incorrect kind/value pairs. Unfortunately
4545 parameterized constructors do not work well in C++ (unless the
4546 parameter also appears as an argument, which is not acceptable),
4547 hence the use of a function instead of a constructor.
4548
4549 * data/lalr1.cc (b4_symbol_constructor_declaration_)
4550 (b4_symbol_constructor_declarations)
4551 (b4_symbol_constructor_specialization_)
4552 (b4_symbol_constructor_specializations)
4553 (b4_symbol_constructor_definition_)
4554 (b4_symbol_constructor_definitions): New.
4555 Use them where appropriate to generate declaration, declaration of
4556 the specializations, and implementations of the templated
4557 overloaded function "make_symbol".
4558 (variant::variant): Always define a default ctor.
4559 Also provide a copy ctor.
4560 (symbol_base_type, symbol_type): New ctor overloads for value-less
4561 symbols.
4562 (symbol_type): Now public, so that functions such as yylex can use
4563 it.
4564
4565 2008-11-11 Akim Demaille <demaille@gostai.com>
4566
4567 Inform m4 whether a tag is a valid id.
4568 * src/output.c (is_identifier): New.
4569 (symbol_definitions_output): Use it to define tag_is_id.
4570 But maybe this should be done at m4 level?
4571
4572 2008-11-11 Akim Demaille <demaille@gostai.com>
4573
4574 Test 214 was failing: it greps with a pattern containing [ ]*
4575 which obviously meant to catch spaces and tabs, but contained only
4576 spaces. Tabulations in sources are a nuisance, so to simplify the
4577 matter, get rid of all the tabulations in the Java sources. The
4578 other skeletons will be treated equally later.
4579
4580 * data/java.m4, data/lalr1.java: Untabify.
4581 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
4582 tabulations are no longer generated.
4583
4584 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
4585
4586 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
4587 * configure.ac: Adjust usage.
4588 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4589 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4590 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
4591
4592 2008-11-10 Di-an Jan <dianj@freeshell.org>
4593
4594 Workaround Java's ``code too large'' problem for parser tables
4595 in most cases, by using one function per initialization.
4596 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
4597 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
4598 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
4599 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
4600 (yytname_): Use b4_typed_parser_table.
4601 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
4602 ``code too large'' error.
4603
4604 2008-11-10 Di-an Jan <dianj@freeshell.org>
4605
4606 * NEWS: Document them.
4607
4608 General Java skeleton improvements.
4609 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
4610 using gcj < 4.3 in the testsuite, according to comments in
4611 gnulib/m4/javacomp.m4.
4612 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
4613 location_type, position_type): Remove extraneous brackets from
4614 b4_percent_define_default.
4615 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
4616 m4_define and m4_define_default.
4617 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
4618 which marks the end of user code with appropriate syncline, like all
4619 the other skeletons.
4620 (b4_user_post_prologue): Add. Don't silently drop.
4621 (yylex): Remove.
4622 (parse): Inline yylex.
4623 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
4624 (%{...%}): Fix typo of %code imports.
4625 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
4626
4627 Support annotations on parser class with %define annotations.
4628 * data/lalr1.java (annotations): Add to parser class modifier.
4629 * doc/bison.texinfo (Java Parser Interface): Document
4630 %define annotations.
4631 (Java Declarations Summary): Document %define annotations.
4632 * tests/java.at (Java parser class modifiers): Test annotations.
4633
4634 Do not generate code for %error-verbose unless requested.
4635 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
4636 Make private. Make conditional on %error-verbose.
4637 (getErrorVerbose, setErrorVerbose): New.
4638 (yytnamerr_): Make conditional on %error-verbose.
4639 (yysyntax_error): Make some code conditional on %error-verbose.
4640 * doc/bison.texinfo (Java Bison Interface): Remove the parts
4641 about %error-verbose having no effect.
4642 (getErrorVerbose, setErrorVerbose): Document.
4643
4644 Move constants for token names to Lexer interface.
4645 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
4646 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
4647 (parse): Qualify EOF to Lexer.EOF.
4648 * doc/bison.texinfo (Java Parser Interface): Move documentation of
4649 EOF and token names to Java Lexer Interface.
4650 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
4651
4652 Make yyerror public.
4653 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
4654 (yyerror): Change to public. Add Javadoc comments. Use longer
4655 parameter names. Make the body rather than the declarator
4656 conditional on %locations.
4657 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
4658
4659 Allow user to add code to the constructor with %code init.
4660 * data/java.m4 (b4_init_throws): New, for %define init_throws.
4661 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
4662 Add %code init to the front of the constructor body.
4663 * doc/bison.texinfo (YYParser.YYParser): Document %code init
4664 and %define init_throws.
4665 (Java Declarations Summary): Document %code init and
4666 %define init_throws.
4667 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
4668 (Java constructor init and init_throws): Add tests.
4669
4670 2008-11-10 Akim Demaille <demaille@gostai.com>
4671
4672 Update TODO.
4673 * TODO (-D): is implemented.
4674 (associativity): Same precedence must have the same associativity.
4675 For instance, how can a * b / c be parsed if * is %left and / is
4676 %right?
4677 (YYERRORCODE, YYFAIL, YYBACKUP): New.
4678
4679 2008-11-10 Akim Demaille <demaille@gostai.com>
4680
4681 Formatting changes.
4682
4683 2008-11-10 Akim Demaille <demaille@gostai.com>
4684
4685 More information about the symbols.
4686 * src/output.c (type_names_output): Document all the symbols,
4687 including those that don't have a type-name.
4688 (symbol_definitions_output): Define "is_token" and
4689 "has_type_name".
4690 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
4691 type-name, now that they are defined too in b4_type_names.
4692
4693 2008-11-10 Akim Demaille <demaille@gostai.com>
4694
4695 Regen.
4696
4697 2008-11-10 Akim Demaille <demaille@gostai.com>
4698
4699 Make parser::yytranslate static.
4700 Small speedup (1%) on the list grammar. And makes yytranslate_
4701 available in non member functions.
4702
4703 * data/lalr1.cc (yytranslate_): Does not need to be a instance
4704 function.
4705
4706 2008-11-10 Akim Demaille <demaille@gostai.com>
4707
4708 Avoid trailing spaces.
4709 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
4710 * data/lalr1.cc: Don't indent before rule and symbol actions, as
4711 they can be empty, and anyway this incorrectly indents the first
4712 action.
4713
4714 2008-11-10 Akim Demaille <demaille@gostai.com>
4715
4716 Comment changes.
4717
4718 2008-11-10 Akim Demaille <demaille@gostai.com>
4719
4720 Use "enum" for integral constants.
4721 This is just nicer to read, I observed no speedup.
4722
4723 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
4724 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
4725 (yyuser_token_number_max_, yyundef_token_): Move into...
4726 (yytranslate_): here.
4727
4728 2008-11-10 Akim Demaille <demaille@gostai.com>
4729
4730 Shortcuts in bench directives.
4731 * etc/bench.pl.in (parse_dirs): New.
4732 Use it.
4733 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
4734 Create the benches in "benches/".
4735
4736 2008-11-10 Akim Demaille <demaille@gostai.com>
4737
4738 Formatting changes.
4739 * data/lalr1.cc: here.
4740
4741 2008-11-10 Akim Demaille <demaille@gostai.com>
4742
4743 Adjust verbose message to using emacs.
4744 * etc/bench.pl.in: Inform compilation-mode when we change the
4745 directory.
4746 (generate_grammar_list): Recognize %define "variant" in addition
4747 to %define variant.
4748
4749 2008-11-10 Akim Demaille <demaille@gostai.com>
4750
4751 Classify symbols by type-name.
4752 * src/uniqstr.h (UNIQSTR_CMP): New.
4753 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
4754 (type_names_output): New.
4755 (muscles_output): Use it.
4756 * data/lalr1.cc (b4_symbol_action_): Remove.
4757 (b4_symbol_case_, b4_type_action_): New.
4758 Adjust uses of b4_symbol_action_ to use b4_type_action_.
4759
4760 2008-11-10 Akim Demaille <demaille@gostai.com>
4761
4762 Change the handling of the symbols in the skeletons.
4763 Before we were using tables which lines were the symbols and which
4764 columns were things like number, tag, type-name etc. It is was
4765 difficult to extend: each time a column was added, all the numbers had
4766 to be updated (you asked for colon $2, not for "tag"). Also, it was
4767 hard to filter these tables when only a subset of the symbols (say the
4768 tokens, or the nterms, or the tokens that have and external number
4769 *and* a type-name) was of interest.
4770
4771 Now instead of monolithic tables, we define one macro per cell. For
4772 instance "b4_symbol(0, tag)" is a macro name which contents is
4773 self-decriptive. The macro "b4_symbol" provides easier access to
4774 these cells.
4775
4776 * src/output.c (type_names_output): Remove.
4777 (symbol_numbers_output, symbol_definitions_output): New.
4778 (muscles_output): Call them.
4779 (prepare_symbols): Define b4_symbols_number.
4780
4781 2008-11-10 Akim Demaille <demaille@gostai.com>
4782
4783 --trace=muscles
4784 * src/getargs.h, src/getargs.c (trace_muscle): New.
4785 (trace_types, trace_args): Support it.
4786 * src/output.c (output_skeleton): Use it.
4787
4788 2008-11-10 Akim Demaille <demaille@gostai.com>
4789
4790 muscles_output.
4791 * src/output.c (muscles_output): New, extracted from...
4792 (output_skeleton): here.
4793 Adjust.
4794
4795 2008-11-10 Akim Demaille <demaille@gostai.com>
4796
4797 Formatting changes.
4798
4799 2008-11-10 Akim Demaille <demaille@gostai.com>
4800
4801 Update the variant example.
4802 * examples/variant.yy: Formatting changes.
4803 One stage build.
4804
4805 2008-11-10 Akim Demaille <demaille@gostai.com>
4806
4807 Support constructor with an argument.
4808 This improves the "list" bench by 2%.
4809
4810 * data/lalr1.cc (variant::build): Add an overloaded version with
4811 an argument.
4812 * tests/c++.at (AT_CHECK_VARIANT): Check it.
4813
4814 2008-11-10 Akim Demaille <demaille@gostai.com>
4815
4816 Test variants.
4817 * tests/c++.at (AT_CHECK_VARIANTS): New.
4818 Use it with and without %define assert.
4819
4820 2008-11-10 Akim Demaille <demaille@gostai.com>
4821
4822 Add %precedence support.
4823 Unfortunately it is not possible to reuse the %prec directive. This
4824 is because to please POSIX, we do not require to end the rules with a
4825 semicolon. As a result,
4826
4827 foo: bar %prec baz
4828
4829 is ambiguous: either a rule which precedence is that of baz, or a rule,
4830 and then a declaration of the precedence of the token baz.
4831
4832 * doc/bison.texinfo: Document %precedence.
4833 (Precedence Only): New.
4834 * src/assoc.h, src/assoc.c (precedence_assoc): New.
4835 * src/conflicts.c (resolve_sr_conflict): Support it.
4836 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
4837 Parse it.
4838 * tests/calc.at: Use %precedence for NEG.
4839 * tests/conflicts.at (%precedence does not suffice)
4840 (%precedence suffices): New tests.
4841
4842 2008-11-09 Akim Demaille <demaille@gostai.com>
4843
4844 Make benches in a sub dirs.
4845 * etc/bench.pl.in ($dir): New.
4846 Use it.
4847 Check the use of constructors with an argument.
4848 (bench_variant_parser): Fix.
4849
4850 2008-11-09 Akim Demaille <demaille@gostai.com>
4851
4852 fix eof condition
4853
4854 2008-11-09 Akim Demaille <demaille@gostai.com>
4855
4856 Fix --help.
4857
4858 2008-11-09 Akim Demaille <demaille@gostai.com>
4859
4860 Require the generation of parse-gram.output.
4861 * src/Makefile.am (YACC): Pass --report=all.
4862
4863 2008-11-09 Akim Demaille <demaille@gostai.com>
4864
4865 Formatting changes.
4866
4867 2008-11-09 Akim Demaille <demaille@gostai.com>
4868
4869 Update TODO.
4870 * TODO: Remove obsolete items.
4871 Update others.
4872
4873 2008-11-09 Akim Demaille <demaille@gostai.com>
4874
4875 Enhance bench.pl.
4876 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
4877 (@token, $grammar, $bench): New.
4878 (generate_grammar_variant): Rename as...
4879 (generate_grammar_list): this.
4880 (generate_grammar): Adjust.
4881 (bench_grammar): Rename as...
4882 (bench): this.
4883 Use it in the various bench-marking routines.
4884 (-b, -g): New options.
4885
4886 2008-11-09 Akim Demaille <demaille@gostai.com>
4887
4888 Use a static hierarchy for symbols in the C++ parser.
4889 * data/lalr1.cc (symbol_base_type, symbol_type)
4890 (stack_symbol_type): Make it a static hierarchy.
4891 Adjust dependencies.
4892
4893 2008-11-09 Akim Demaille <demaille@gostai.com>
4894
4895 bench.pl -d, --directive.
4896 * etc/bench.pl.in (@directive): New.
4897 (&bench_grammar): Use it.
4898 (&bench_list_grammar): New, to provide access to the "variant"
4899 grammar.
4900 Use it.
4901 (getopts): Support -d, --directive.
4902
4903 2008-11-09 Akim Demaille <demaille@gostai.com>
4904
4905 Use inline for small operations.
4906 * data/lalr1.cc (symbol_base_type, symbol_type)
4907 (stack_symbol_type): Declare constructor and other operations as
4908 inline.
4909 (yy_destroy_): Inline.
4910
4911 2008-11-09 Akim Demaille <demaille@gostai.com>
4912
4913 Introduce a hierarchy for symbols.
4914 * data/lalr1.cc (symbol_base_type, symbol_type): New.
4915 (data_type): Rename as...
4916 (stack_symbol_type): this.
4917 Derive from symbol_base_type.
4918 (yy_symbol_value_print_): Merge into...
4919 (yy_symbol_print_): this.
4920 Rename as...
4921 (yy_print_): this.
4922 (yydestruct_): Rename as...
4923 (yy_destroy_): this.
4924 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
4925 (parser::parse): yyla is now of symbol_type.
4926 Use its type member instead of yytoken.
4927
4928 2008-11-09 Akim Demaille <demaille@gostai.com>
4929
4930 Rename data_type and stack_symbol_type.
4931 * data/lalr1.cc (data_type): Rename as...
4932 (stack_symbol_type): this.
4933
4934 2008-11-09 Akim Demaille <demaille@gostai.com>
4935
4936 Handle semantic value and location together.
4937 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
4938 yydata.value and yydata.location.
4939 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
4940 (YY_SYMBOL_PRINT): Now take semantic value and location as a
4941 single arg.
4942 Adjust all callers.
4943 (yydestruct_): New overload for a stack symbol.
4944
4945 2008-11-09 Akim Demaille <demaille@gostai.com>
4946
4947 Push a complete symbol, not connected parts.
4948 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
4949 state, value and location.
4950 Adjust callers.
4951
4952 2008-11-09 Akim Demaille <demaille@gostai.com>
4953
4954 Agregate yylval and yylloc.
4955 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
4956 (parser::yyla): this.
4957
4958 2008-11-09 Akim Demaille <demaille@gostai.com>
4959
4960 Rely on the state stack to display reduction traces.
4961 To display rhs symbols before a reduction, we used information
4962 about the rule reduced, which required the tables yyrhs and
4963 yyprhs. Now use rely only on the state stack to get the same
4964 information.
4965
4966 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
4967 Use them.
4968 (parser::yyrhs_, parser::yyprhs_): Remove.
4969 (parser::yy_reduce_print_): Use the state stack.
4970
4971 2008-11-09 Akim Demaille <demaille@gostai.com>
4972
4973 Fuse yyval and yyloc into yylhs.
4974 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
4975 yylhs.
4976 (parse): Replace yyval and yyloc with yylhs.value and
4977 yylhs.location.
4978 After a user action, compute yylhs.state earlier.
4979 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
4980 fresh error_token.
4981
4982 2008-11-09 Di-an Jan <dianj@freeshell.org>
4983
4984 Remove unused variable.
4985 * src/output.c (type_names_output): Remove unused variable sep.
4986
4987 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
4988
4989 Change tests/output.at quoting.
4990 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
4991 expanding arguments.
4992
4993 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4994
4995 Don't add a semicolon to actions for %skeleton or %language.
4996 It breaks Java test cases as reported by Akim Demaille.
4997 * src/scan-code.l: Implement.
4998
4999 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
5000
5001 Clean up %skeleton and %language priority implementation.
5002 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
5003 remove static qualifier because others will soon need to see it.
5004 (language_prio): Likewise.
5005 (getargs): Use command_line_prio rather than 0.
5006 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
5007 enum fields.
5008 (skeleton_prio): Extern it.
5009 (language_prio): Extern it.
5010 * src/parse-gram.y: Use grammar_prio rather than 1.
5011
5012 2008-11-07 Akim Demaille <demaille@gostai.com>
5013
5014 Moving push traces into yypush_.
5015 * data/lalr1.cc (yypush_): Now takes a optional trace message.
5016 Adjust all uses.
5017
5018 2008-11-07 Akim Demaille <demaille@gostai.com>
5019
5020 The single-stack C++ parser is now the standard one.
5021 * data/lalr1.cc: Rename as...
5022 * data/lalr1-split.cc: this.
5023 * data/lalr1-fusion.cc: Rename as...
5024 * data/lalr1.cc: this.
5025 * etc/bench.pl.in: Adjust.
5026
5027 2008-11-07 Akim Demaille <demaille@gostai.com>
5028
5029 Avoid empty-if warnings.
5030 Reported by Quentin Hocquet.
5031
5032 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
5033 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
5034
5035 2008-11-07 Akim Demaille <demaille@gostai.com>
5036
5037 Pass command line location to skeleton_arg and language_argmatch.
5038 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
5039 The location argument is now mandatory.
5040 Adjust all dependencies.
5041 (getargs): Use command_line_location.
5042
5043 2008-11-07 Akim Demaille <demaille@gostai.com>
5044
5045 -D, --define.
5046 * src/getargs.c (usage): Document -D.
5047 Fix help string for --locations.
5048 (command_line_location): New.
5049 (short_options, long_options, getargs): Support -D, --define.
5050 (getargs): Move -d support at the right place.
5051 * doc/bison.texinfo (Bison Options): Update.
5052 * tests/input.at (%define, --define): New.
5053
5054 2008-11-07 Akim Demaille <demaille@gostai.com>
5055
5056 Initialize the muscle table before parsing the command line.
5057 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
5058 (getargs): Define file_name.
5059 * src/main.c (main): Initialize muscle_tab before calling
5060 getargs.
5061 * src/muscle_tab.c (muscle_init): No longer define file_name, as
5062 its value is not available yet.
5063
5064 2008-11-07 Akim Demaille <demaille@gostai.com>
5065
5066 Locations without columns for command line arguments.
5067 * src/location.c (location_print): Don't display negative columns.
5068 * src/location.h: Document this.
5069
5070 2008-11-07 Akim Demaille <demaille@gostai.com>
5071
5072 Fix --help.
5073 * src/getargs.c (usage): Fix help string for -W.
5074
5075 2008-11-07 Akim Demaille <demaille@gostai.com>
5076
5077 Handle more general types of option arguments.
5078 * build-aux/cross-options.pl: The argument ends at the first
5079 space, not the first non-symbol character.
5080 Use @var for each word appearing the argument description.
5081
5082 2008-11-07 Akim Demaille <demaille@gostai.com>
5083
5084 Destroy the variants that remain on the stack in case of error.
5085 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
5086 destructor.
5087 Display the value only if yymsg is nonnull.
5088 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
5089
5090 2008-11-07 Akim Demaille <demaille@gostai.com>
5091
5092 Add "%define assert" to variants.
5093 This is used to help the user catch cases where some value gets
5094 ovewritten by a new one. This should not happen, as this will
5095 probably leak.
5096
5097 Unfortunately this uncovered a bug in the C++ parser itself: the
5098 lookahead value was not destroyed between two calls to yylex. For
5099 instance if the previous lookahead was a std::string, and then an int,
5100 then the value of the std::string was correctly taken (i.e., the
5101 lookahead was now an empty string), but std::string structure itself
5102 was not reclaimed.
5103
5104 This is now done in variant::build(other&) (which is used to take the
5105 value of the lookahead): other is not only stolen from its value, it
5106 is also destroyed. This incurs a new performance penalty of a few
5107 percent, and union becomes faster again.
5108
5109 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
5110 (b4_variant_if): New.
5111 (variant::built): New.
5112 Use it whereever the status of the variant changes.
5113 * etc/bench.pl.in: Check the penalty of %define assert.
5114
5115 2008-11-07 Akim Demaille <demaille@gostai.com>
5116
5117 Use "%define variant" in bench.pl.
5118 * etc/bench.pl.in: No longer use the pseudo directive %variants,
5119 just use %define variants.
5120
5121 2008-11-07 Akim Demaille <demaille@gostai.com>
5122
5123 Regen.
5124 * src/parse-gram.h, src/parse-gram.c: Regen.
5125
5126 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
5127
5128 Fix user actions without a trailing semicolon.
5129 Reported by Sergei Steshenko at
5130 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
5131 * THANKS (Sergei Steshenko): Add.
5132 * src/scan-code.l (SC_RULE_ACTION): Fix it.
5133 * tests/regression.at (Fix user actions without a trailing semicolon):
5134 New test case.
5135
5136 2008-11-04 Akim Demaille <demaille@gostai.com>
5137
5138 Use b4_copyright_years.
5139 * data/yacc.c (b4_copyright_years): New.
5140 Fix its value according to the comments in the file.
5141 Use it and undefine it.
5142
5143 2008-11-04 Akim Demaille <demaille@gostai.com>
5144
5145 Formatting changes.
5146 * data/lalr1-fusion.cc, src/parse-gram.y: here.
5147
5148 2008-11-04 Akim Demaille <demaille@gostai.com>
5149
5150 Formatting changes.
5151 * data/lalr1-fusion.cc: here.
5152
5153 2008-11-04 Akim Demaille <demaille@gostai.com>
5154
5155 Use strict on bench.pl.
5156 * etc/bench.pl.in (&run, &generate_grammar): New.
5157 Rename the grammar generating functions for consistency.
5158 Change the interface so that the list of benches to run is passed
5159 as (optionless) arguments.
5160 (&compile): Use &run.
5161
5162 2008-11-04 Akim Demaille <demaille@gostai.com>
5163
5164 Remove spurious initial empty lines.
5165 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
5166 * data/yacc.c: End the @output lines with an @.
5167
5168 2008-11-04 Akim Demaille <demaille@gostai.com>
5169
5170 Improve the display of sizes.
5171 * etc/bench.p.in: Higher precision.
5172 Sort by decreasing size.
5173
5174 2008-11-04 Akim Demaille <demaille@gostai.com>
5175
5176 Don't memcpy C++ structures.
5177 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
5178 arguments.
5179 (variant::build): New overload for
5180 copy-construction-that-destroys.
5181 (variant::swap): New.
5182 (parser::yypush_): Use it in variant mode.
5183
5184 2008-11-04 Akim Demaille <demaille@gostai.com>
5185
5186 Better defaults for bench.pl.
5187 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
5188 default values.
5189 Adjust &verbose uses.
5190 (-q, --quiet): New.
5191
5192 2008-11-04 Akim Demaille <demaille@gostai.com>
5193
5194 Make variant.yy more complex.
5195 std::list cannot be copied via memcpy, they are more demanding than
5196 std::string. Use one std::list to strengthen the test.
5197
5198 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
5199 Adjust.
5200 Create a list of strings, instead of a single large string.
5201
5202 2008-11-04 Akim Demaille <demaille@gostai.com>
5203
5204 bench.pl --bench.
5205 * etc/bench.pl.in (--bench, $bench): New.
5206
5207 2008-11-04 Akim Demaille <demaille@gostai.com>
5208
5209 Sort methods.
5210 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
5211 Define it after as().
5212
5213 2008-11-04 Akim Demaille <demaille@gostai.com>
5214
5215 Useless parens.
5216 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
5217
5218 2008-11-04 Akim Demaille <demaille@gostai.com>
5219
5220 Issue missing synclines after user actions.
5221 * data/c.m4 (b4_case): Issue synclines on the output file.
5222
5223 2008-11-04 Akim Demaille <demaille@gostai.com>
5224
5225 Remove trailing empty line.
5226 * data/lalr1-fusion.cc: Don't add an empty line after the user's
5227 epilogue.
5228
5229 2008-11-04 Akim Demaille <demaille@gostai.com>
5230
5231 Fix output of copyright years.
5232 * data/bison.m4 (b4_copyright): Fix the indentation of the
5233 copyright year paragraph.
5234 Use b4_copyright_years when no years are given.
5235 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
5236 (b4_copyright_years): New.
5237 Use it.
5238
5239 2008-11-04 Akim Demaille <demaille@gostai.com>
5240
5241 Avoid the spurious initial empty line.
5242 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
5243 the end of @output request to suppress the empty line that
5244 results.
5245
5246 2008-11-04 Akim Demaille <demaille@gostai.com>
5247
5248 Remove parser::rhs_number_type.
5249 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
5250 (yyrhs_): Use b4_table_define.
5251
5252 2008-11-04 Akim Demaille <demaille@gostai.com>
5253
5254 Fix iteration type.
5255 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
5256
5257 2008-11-04 Akim Demaille <demaille@gostai.com>
5258
5259 Factor the declaration of the integer tables.
5260 * data/lalr1-fusion.cc (b4_table_define): New.
5261 Use it.
5262
5263 2008-11-03 Akim Demaille <demaille@gostai.com>
5264
5265 Fix indentation of tables in lalr1.cc
5266 * data/lalr1-fusion.cc: Fix the indentation.
5267
5268 2008-11-03 Akim Demaille <demaille@gostai.com>
5269
5270 Destroy the lhs symbols after reduction.
5271 * data/lalr1-fusion.cc (parse): After the user action, when in
5272 variant mode, destroy the lhs symbols.
5273
5274 2008-11-03 Akim Demaille <demaille@gostai.com>
5275
5276 Simplify yysyntax_error_ use.
5277 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
5278 type, but make it unnamed in the declaration when it is not used.
5279
5280 2008-11-03 Akim Demaille <demaille@gostai.com>
5281
5282 Let yy::variant::build return an lvalue.
5283 * data/lalr1-fusion.cc (variant::build): Return a reference to the
5284 object.
5285
5286 2008-11-03 Akim Demaille <demaille@gostai.com>
5287
5288 Define yy::variant only when needed.
5289 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
5290 used.
5291
5292 2008-11-03 Akim Demaille <demaille@gostai.com>
5293
5294 Bench the three-stack lalr1.cc.
5295 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
5296 one-stack one.
5297
5298 2008-11-03 Akim Demaille <demaille@gostai.com>
5299
5300 Fail on parse error in calc++.
5301 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
5302 status.
5303 * examples/calc++/test ($me, $number, $exit, run): New.
5304 Use them to propagate errors to the exit status.
5305
5306 2008-11-03 Akim Demaille <demaille@gostai.com>
5307
5308 Don't specify the skeleton twice in the example.
5309 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
5310 file does what is needed.
5311
5312 2008-11-03 Akim Demaille <demaille@gostai.com>
5313
5314 bench: Improve output.
5315 * etc/bench.pl.in (bench_grammar): Tune the printf format.
5316
5317 2008-11-03 Akim Demaille <demaille@gostai.com>
5318
5319 bench: check impact of %debug on variants.
5320 * etc/bench.pl.in (variant_grammar): Fix the computation of
5321 $variant.
5322 Generate a grammar file that can work with or without %debug.
5323 Do use the @directive.
5324 (bench_variant_parser): Check impact of %debug.
5325 (@directives): Rename all the occurrences to...
5326 (@directive): this, for consistency.
5327
5328 2008-11-03 Akim Demaille <demaille@gostai.com>
5329
5330 bench: report the size too.
5331 * etc/bench.pl.in ($iterations): Defaults to -3.
5332 (&bench_grammar): Require hireswallclock.
5333 Compute and display the size of the result.
5334 More comments.
5335
5336 2008-11-03 Akim Demaille <demaille@gostai.com>
5337
5338 bench: More use of the verbosity level.
5339 * etc/bench.pl.in ($verbose, &verbose): New.
5340 Use them.
5341 More POD documentation.
5342
5343 2008-11-03 Akim Demaille <demaille@gostai.com>
5344
5345 bench.pl: a command line interface
5346 * etc/bench.pl.in: More doc.
5347 Some fixes in the documentation.
5348 ($cflags, $iterations, &help, &getopt): New.
5349 Use them.
5350 (&variant_grammar): Let the number of stages be 10 times what is
5351 specified.
5352
5353 2008-11-03 Akim Demaille <demaille@gostai.com>
5354
5355 Bench the use of Boost.Variants.
5356 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
5357 New.
5358 (&compile): Be ready to compile C++ parsers.
5359 (&bench_push_parser): Move debug information to the outermost
5360 level.
5361 * THANKS: Add Michiel De Wilde.
5362
5363 2008-11-03 Akim Demaille <demaille@gostai.com>
5364
5365 bench.pl: Pass directives as a list instead of as a string.
5366 * etc/bench.pl.in (&directives): New.
5367 (&triangular_grammar, &calc_grammar): Use it to format the Bison
5368 directives.
5369 (&triangular_grammar): Do use the directives (were ignored).
5370 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
5371 directives.
5372
5373 2008-11-03 Akim Demaille <demaille@gostai.com>
5374
5375 Improve genericity of bench.pl.
5376 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
5377 argument.
5378 (&bench_push_parser): New.
5379 Call it.
5380
5381 2008-11-03 Akim Demaille <demaille@gostai.com>
5382
5383 Add documentation to bench.pl.
5384 * etc/bench.pl.in: Comment changes.
5385
5386 2008-11-03 Akim Demaille <demaille@gostai.com>
5387
5388 Fuse the three stacks into a single one.
5389
5390 In order to make it easy to perform benchmarks to ensure that
5391 there are no performance loss, lalr1.cc is forked into
5392 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
5393 lalr1.cc.
5394
5395 Meanwhile, to make sure that lalr1-fusion.cc is correctly
5396 exercized by the test suite, the user must install a symbolic link
5397 from lalr1.cc to it.
5398
5399 Instead of having three stacks (state, value, location), use a
5400 stack of triples. This considerably simplifies the code (and it
5401 will be easier not to require locations as currently does the C++
5402 parser), and also gives a 10% speedup according to
5403 etc/bench (probably mainly since memory allocation is done once
5404 instead of three times).
5405
5406 Another motivation is to make it easier to destruct properly
5407 semantic values: now that they are bound to their state (hence
5408 symbol type) it will be easier to call the appropriate destructor.
5409
5410 These changes should probably benefit the C parser too.
5411
5412 * data/lalr1.cc: Copy as...
5413 * data/lalr1-fusion.cc: this new file.
5414 (b4_rhs_value, b4_rhs_location): New definitions overriding those
5415 from c++.m4.
5416 (state_stack_type, semantic_stack_type, location_stack_type)
5417 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
5418 (data_type, stack_type, yystack_): New.
5419 (YYLLOC_DEFAULT, yypush_): Adjust.
5420 (yyerror_range): Now based on data_type, not location_type.
5421
5422 2008-11-03 Akim Demaille <demaille@gostai.com>
5423
5424 Push the state, value, and location at the same time.
5425 This is needed to prepare a forthcoming patch that fuses the three
5426 stacks into one.
5427
5428 * data/lalr1.cc (parser::yypush_): New.
5429 (parser::yynewstate): Change the semantics: instead of arriving to
5430 this label when value and location have been pushed, but yystate
5431 is to be pushed on the state stack, now the three of them must
5432 have been pushed before. yystate still must be the new state.
5433 This allows to use yypush_ everywhere instead of individual
5434 handling of the stacks.
5435
5436 2008-11-03 Akim Demaille <demaille@gostai.com>
5437
5438 Prefer references to pointers.
5439 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
5440 definition to use references instead of pointers.
5441 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
5442 Take the value and location as references.
5443 Adjust callers.
5444
5445 2008-11-03 Akim Demaille <demaille@gostai.com>
5446
5447 stack::size instead of stack::height.
5448 * data/lalr1.cc (stack::height): Rename as...
5449 (stack::size): this.
5450 Fix the output type.
5451 Comment changes.
5452
5453 2008-11-03 Akim Demaille <demaille@gostai.com>
5454
5455 Use variants to support objects as semantic values.
5456 This patch was inspired by work by Michiel De Wilde. But he used
5457 Boost variants which (i) requires Boost on the user side, (ii) is
5458 slow, and (iii) has useless overhead (the parser knows the type of
5459 the semantic value there is no reason to duplicate this
5460 information as Boost.Variants do).
5461
5462 This implementation reserves a buffer large enough to store the
5463 largest objects. yy::variant implements this buffer. It was
5464 implemented with Quentin Hocquet.
5465
5466 * src/output.c (type_names_output): New.
5467 (output_skeleton): Invoke it.
5468 * data/c++.m4 (b4_variant_if): New.
5469 (b4_symbol_value): If needed, provide a definition for variants.
5470 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
5471 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
5472 (b4_char_sizeof, yy::variant): New.
5473 (parser::parse): If variants are requested, define
5474 parser::union_type, parser::variant, change the definition of
5475 semantic_type, construct $$ before running the user action instead
5476 of performing a default $$ = $1.
5477 * examples/variant.yy: New.
5478 Based on an example by Michiel De Wilde.
5479
5480 2008-11-03 Akim Demaille <demaille@gostai.com>
5481
5482 Parameterize the extraction of semantic values.
5483 To make future changes easier, no longer rely on ".TYPE" being the
5484 way to get a semantic value.
5485
5486 * data/c.m4 (b4_symbol_value): New.
5487 Use it.
5488 * data/c++.m4, data/yacc.c: Use it.
5489 * data/glr.c: Use b4_symbol_value.
5490 (b4_rhs_data): New.
5491 Use it.
5492
5493 2008-11-03 Akim Demaille <demaille@gostai.com>
5494
5495 Prepare easier M4 changes.
5496 * data/lalr1.cc: Use escaped [] instead of literals to prepare
5497 future changes.
5498
5499 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5500
5501 Initiate further development.
5502 * NEWS: Create an empty section for new entries.
5503 * gnulib: Update submodule to HEAD.
5504
5505 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5506
5507 * NEWS: Version 2.4.
5508
5509 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5510
5511 Prepare for next release.
5512 * NEWS: Briefly mention changes since 2.3b.
5513 * README: Say GNU m4 1.4.6, which we've been requiring in release
5514 announcements already, not 1.4.3, which breaks the build.
5515
5516 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5517
5518 Say %language is experimental.
5519 We're thinking of extending it's effect on output file naming. See the
5520 thread at
5521 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
5522 * NEWS: Say it's experimental.
5523 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
5524 recommend it over %skeleton for now.
5525 (Bison Options): Likewise.
5526 (C++ Bison Interface): Use %skeleton not %language.
5527 (Calc++ Parser): Use %skeleton not %language.
5528 * src/getargs.c (usage): Say it's experimental.
5529
5530 2008-11-01 Di-an Jan <dianj@freeshell.org>
5531 Paolo Bonzini <bonzini@gnu.org>
5532
5533 Support all Java parser class modifiers.
5534 * data/java.m4 (b4_percent_define_get3): New.
5535 (b4_final_if, b4_strictfp_if): New.
5536 * data/lalr1.java (final, strictfp, extends, implements): Support.
5537 * doc/bison.texinfo (final, strictfp, extends, implements): Add
5538 documentation.
5539 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
5540 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
5541 (AT_CHECK_JAVA_GREP): New.
5542 (Java parser class modifiers): New test.
5543 (Java parser class extends and implements): New test.
5544
5545 Model exception propagation better with throws and lex_throws.
5546 * data/java.m4 (b4_list2): New.
5547 (throws): Change default.
5548 * data/lalr1.java (yyaction): Add throws.
5549 (parse): Add lex_throws in addition to throws.
5550 * doc/bison.texinfo (throws, lex_throws): Add documentation.
5551 * tests/java.at (Java throws specifications): New test.
5552
5553 Improve documentation for Java parsers.
5554 * doc/bison.texinfo (Java Parsers): Add subsections.
5555 Don't quote first argument of %define.
5556 (Java Bison Interface): Document output files. Move documentation
5557 of parser class and merge into Java Parser Interface. Document
5558 features that error out. Document directives with no effect.
5559 Move note about Javadoc higher.
5560 (Java Semantic Values): Explicitly mention stype.
5561 Document that generic types cannot be used.
5562 (Java Location Values): Use @deftypeivar. Document constructors.
5563 Correct return value for toString.
5564 (Java Parser Interface): List undocumented constants/fields.
5565 Move documentation of fields added by %parse-param closer to list
5566 of members. Document that token names are added as fields.
5567 Document constructors accurately. Remove error method.
5568 (Java Scanner Interface): Move note on %pure-parser to Java Bison
5569 Interface. Describe %code lexer and yylex accutately.
5570 Remove documentation that does not match the code.
5571 (Java Action Features): New.
5572 (Java Differences): Add reference. Add item on semantic values.
5573 Add note about @{ ... @}. Clarify %% epilogue placement.
5574 (Java Declarations Summary): New.
5575
5576 Fix Java skeleton.
5577 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
5578 (b4_remove_comma): Quote test argument.
5579 (b4_identification): Remove "bison" field.
5580 * tests/java.at (Java parser class and package names): New test.
5581 (Java %parse-param and %lex-param): New test.
5582 (Java stype, position_class and location_class): New test.
5583
5584 2008-10-31 Di-an Jan <dianj@freeshell.org>
5585
5586 * data/lalr1.jave: Update copyright years.
5587 (YYParser): Correct name of "generated from" file in Javadoc:
5588 use b4_file_name instead of @ofile@.
5589 (Location constructor): Correct Javadoc parameter name.
5590 (yylloc): Add missing opening m4 quote after b4_location_if.
5591 This removes a stray [ in the Javadoc of Lexer.getStartPos.
5592 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
5593 (YYParser constructor): Correct Javadoc parameter name.
5594
5595 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
5596
5597 Always put auxiliary code files in the same dir as other output files.
5598 * src/files.c (compute_file_name_parts): When the user specifies
5599 --output but not --file-prefix, extract the directory prefix from the
5600 file prefix not from the grammar file name. This affects the location
5601 of files like location.hh generated by the C++ skeleton. The includes
5602 in the other output files require this fix.
5603 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
5604 for expected output files.
5605 (Output files): Add a test for the above.
5606
5607 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
5608
5609 * gnulib: Update submodule to HEAD.
5610
5611 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5612
5613 Update copyright year.
5614 * src/files.c: Here.
5615
5616 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
5617
5618 Don't overwrite the input file.
5619 * src/files.c (output_file_name_check): Fatal error if using input file
5620 for output.
5621 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
5622 argument.
5623 (Conflicting output files): Add test.
5624
5625 2008-10-28 Akim Demaille <demaille@gostai.com>
5626
5627 Space changes.
5628 * data/lalr1.cc: Formatting changes.
5629
5630 2008-10-28 Akim Demaille <demaille@gostai.com>
5631
5632 Don't define debugging functions when !YYDEBUG.
5633 * data/lalr1.cc (debug_stream, set_debug_stream)
5634 (debug_level_type, debug_level, set_debug_level): Don't
5635 declare them when YYDEBUG is not defined.
5636 The implementation are already YYDEBUG-aware.
5637
5638 2008-10-28 Akim Demaille <demaille@gostai.com>
5639
5640 Prefer "continue" for empty loop bodies.
5641 * etc/bench.pl.in: Use "continue" instead of {}.
5642
5643 2008-10-28 Akim Demaille <demaille@gostai.com>
5644
5645 Space and comments changes.
5646 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
5647 * data/c.m4, data/lalr1.cc: Space changes.
5648
5649 2008-10-28 Akim Demaille <demaille@gostai.com>
5650
5651 Make gnulib a submodule.
5652 * gnulib: New.
5653 * .gitmodules (gnulib): New.
5654
5655 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5656
5657 Fix yyerror_range for user-defined location type in C++. Reported by
5658 Georg Sauthoff at
5659 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
5660 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
5661 * THANKS (Georg Sauthoff): Add.
5662
5663 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5664
5665 Update several administrative files mainly to facilitate releasing.
5666 * HACKING (Administrivia): Make the git-merge-changelog notes more
5667 helpful.
5668 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
5669 (Release Procedure): Update for git and add numerous details that were
5670 previously missing.
5671 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
5672 * maint.mk (announcement): Don't list bison as a bootstrap tool so
5673 that announcements don't claim we bootstrapped with whatever bison
5674 happened to be in PATH. Add flex as a bootstrap tool.
5675 * Makefile.maint: Remove, previously replaced by maint.mk.
5676 * Makefile.cfg: Remove, and migrate settings to...
5677 * cfg.mk: ... here for the sake of `make announcement'.
5678 * bootstrap.conf (gnulib_modules): Add announce-gen.
5679 * README: Say GNU Bison instead of just Bison. Suggested by Karl
5680 Berry.
5681
5682 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
5683
5684 Small but important bugfixes for the Java skeleton.
5685 * data/lalr1.java (yyerror): Change Location to b4_location_type.
5686 (yy_symbol_print): Call toString on yyvaluep.
5687
5688 2008-08-29 Akim Demaille <demaille@gostai.com>
5689
5690 Clarify UPDATED use.
5691 * doc/bison.texinfo: It refers to the last edition of this file,
5692 not to the release date of Bison.
5693 Reported by Joel E. Denny.
5694
5695 2008-08-29 Akim Demaille <demaille@gostai.com>
5696
5697 * README: Update FAQ pointer.
5698 Reported by Joel E. Denny.
5699
5700 2008-08-27 Eric Blake <ebb9@byu.net>
5701
5702 Resync m4sugar from autoconf.
5703 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
5704 (m4_init): Adjust to latest m4.git changes.
5705 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
5706 effects.
5707 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
5708 (_m4_list_cmp): Reduce side effects.
5709
5710 2008-08-27 Akim Demaille <demaille@gostai.com>
5711
5712 Check yyerrok in calc.at.
5713 * tests/calc.at (calc.y): Use yyerrok on "( error )".
5714 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
5715 expected.
5716
5717 2008-08-27 Akim Demaille <demaille@gostai.com>
5718
5719 Support yyerrok in lalr1.cc.
5720 YYBACKUP is still to import back into lalr1.cc.
5721 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
5722
5723 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5724
5725 For maintainer-check*, don't recompile for a $(VERSION) update.
5726 * cfg.mk: New file.
5727 (_is-dist-target): Override the one in GNUmakefile.
5728 * Makefile.am (EXTRA_DIST): Add cfg.mk.
5729
5730 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5731
5732 Update for recent change to gnulib.
5733 * src/parse-gram.y: Don't include strverscmp.h. It comes from
5734 string.h now.
5735
5736 2008-08-15 Eric Blake <ebb9@byu.net>
5737
5738 Remaining m4sugar merge from autoconf.
5739 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
5740 * data/m4sugar/foreach.m4: New file, copied from autoconf.
5741 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
5742 * src/output.c (output_skeleton): Tell m4 how to find it.
5743
5744 Partial m4sugar merge from autoconf: m4_map.
5745 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
5746 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
5747 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
5748 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
5749 for empty list.
5750 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
5751 Likewise.
5752 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
5753 declares it.
5754
5755 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
5756
5757 Keep .version and PACKAGE_VERSION in sync.
5758 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
5759 dependency, and add comments justifying this in more detail. Discussed
5760 starting at
5761 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
5762
5763 2008-08-06 Eric Blake <ebb9@byu.net>
5764
5765 Partial m4sugar merge from autoconf: m4_shiftn.
5766 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
5767 (m4_shift2, m4_shift3): New macros.
5768 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
5769 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
5770 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
5771 * data/java.m4 (b4_remove_comma): Likewise.
5772
5773 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
5774 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
5775 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
5776 (m4_init): Consolidate wrapped text into single m4_wrap.
5777 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
5778 in wrapped text.
5779
5780 2008-08-05 Eric Blake <ebb9@byu.net>
5781
5782 Partial m4sugar merge from autoconf: builtins, version.m4.
5783 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
5784 (m4_prepend): Remove, as it is unused and inherently quadratic,
5785 whereas m4_append is linear in newer m4.
5786 (m4_mkstemp): New builtin.
5787 (m4_symbols): Make rename conditional.
5788 (m4_version_prereq): Ensure fatal error if used in bison, which
5789 intentionally lacks version.m4.
5790
5791 Fix comments in m4sugar.
5792 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
5793
5794 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5795
5796 Update for recent .gitignore fix in Gnulib.
5797 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
5798 anchored .gitignore entries.
5799
5800 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5801
5802 Set gnu or gnits strictness.
5803 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
5804 development and gnits strictness for releases. Based on Eric Blake's
5805 suggestion at
5806 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
5807
5808 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5809
5810 * NEWS: Clarify documentation of %language.
5811
5812 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5813
5814 Support usage of git-merge-changelog.
5815 * .gitattributes: New.
5816 * HACKING: Document usage of git-merge-changelog.
5817 * bootstrap: Install git-merge-changelog entries in .git/config
5818 if appropriate.
5819
5820 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5821
5822 Remove remaining dependence on CVS Id keyword.
5823 * ChangeLog: For the sake of people still using CVS, don't use dollars
5824 when mentioning Id.
5825 * data/xslt/bison.xsl: Remove Id from header comments, where it was
5826 unusual anyway.
5827 * data/xslt/xml2dot.xsl: Likewise.
5828 * data/xslt/xml2text.xsl: Likewise.
5829 * data/xslt/xml2xhtml.xsl: Likewise.
5830 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
5831 * doc/Makefile.am (neutralize): Remove, no longer needed.
5832 (.x.1): Don't use neutralize.
5833 (edit): Don't substitute for ID.
5834 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
5835
5836 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5837
5838 Fix dependence on computed configure variables.
5839 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
5840 $(top_srcdir)/configure.ac so that changes to computed variables, such
5841 as PACKAGE_VERSION, are seen.
5842 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
5843
5844 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
5845
5846 Update copyright dates for recent changes.
5847 * Makefile.am: Here.
5848 * src/Makefile.am: Here.
5849 * src/reduce.c: Here.
5850 * tests/reduce.at: Here.
5851
5852 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
5853
5854 Use git-version-gen for version names between releases.
5855 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
5856 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
5857 * .prev-version: New.
5858 * .version.in: Remove.
5859 * ChangeLog: Remove the Id previously used for capturing the CVS
5860 revision.
5861 * GNUmakefile: Remove, now copied from Gnulib.
5862 * Makefile.am: Add code suggested by comments in
5863 build-aux/git-version-gen.
5864 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
5865 .prev-version, and .version.
5866 * NEWS (2.3b+): Rename to...
5867 (?.?): ... this because we're dropping the "+" version naming scheme,
5868 but, in general, we still can't be sure of our next release name.
5869 * bootstrap: Add a quick hack to remove from .gitignore the
5870 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
5871 entry. This should really be fixed in gnulib instead.
5872 * bootstrap.conf (gnulib_modules): Add gnumakefile.
5873 * configure.ac (AC_INIT): Set version name by invoking
5874 build-aux/git-version-gen.
5875 (AC_CONFIG_FILES): Remove .version, now generated by
5876 build-aux/git-version-gen.
5877 * maint.mk: New, copied from coreutils.
5878 * doc/.cvsignore (bison.1): Add.
5879 * doc/.gitignore (/bison.1): Add.
5880 * doc/bison.1: Remove, generated.
5881 * src/.cvsignore (revision.c): Remove.
5882 * src/.gitignore (/revision.c): Remove.
5883 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
5884 (BUILT_SOURCES): Remove revision.c.
5885 (revision.c): Remove.
5886 * src/getargs.c (version): Don't print revision after the VERSION.
5887 * src/revision.h: Remove.
5888
5889 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5890
5891 Fix untranslatable composition of sentences. Reported by Goran
5892 Uddeborg at
5893 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
5894 * THANKS (Goran Uddeborg): Add.
5895 * src/reduce.c (reduce_print): Report the number of nonterminals and
5896 rules useless in the grammar in separate sentences.
5897 * tests/reduce.at (Useless Rules): Update output.
5898 (Reduced Automaton): Likewise.
5899 (Underivable Rules): Likewise.
5900 (Empty Language): Likewise.
5901
5902 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5903
5904 Fix some .gitignore and .cvsignore problems.
5905 * bootstrap (insert_sorted_if_absent): Replace all uses with...
5906 (insert_vc_ignore): ... this new function, which prepends `/' to all
5907 .gitignore entries before passing them to insert_sorted_if_absent.
5908 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
5909 .cvsignore files are maintained even though Bison developers run
5910 bootstrap while using Git.
5911 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
5912 unneeded by Bison.
5913 (gnulib): Add.
5914 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
5915 unneeded. Reported by Eric Blake.
5916 * lib/.gitignore (/*~): Add.
5917 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
5918 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
5919 Blake.
5920 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
5921
5922 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5923
5924 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
5925 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
5926 * bootstrap.conf (gnulib_modules): Add unsetenv.
5927 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
5928 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
5929 (/setenv.m4): Add.
5930 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
5931 the first argument because it may become position-dependent, and unset
5932 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
5933 Add comments explaining these issues in more detail.
5934
5935 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
5936
5937 Add .gitignore everywhere based on .cvsignore.
5938 * .gitignore: New.
5939 * build-aux/.gitignore: New.
5940 * data/.gitignore: New.
5941 * doc/.gitignore: New.
5942 * etc/.gitignore: New.
5943 * examples/.gitignore: New.
5944 * examples/calc++/.gitignore: New.
5945 * lib/.gitignore: New.
5946 * m4/.gitignore: New.
5947 * po/.gitignore: New.
5948 * runtime-po/.gitignore: New.
5949 * src/.gitignore: New.
5950 * tests/.gitignore: New.
5951
5952 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5953
5954 * NEWS (2.3b+): New section, empty for now.
5955 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
5956
5957 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5958
5959 * NEWS (2.3b): Update release date since there has been a delay in
5960 getting the announcements and tarballs out.
5961
5962 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5963
5964 * NEWS: Version 2.3b.
5965 * configure.ac (AC_INIT): Likewise.
5966 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
5967
5968 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5969
5970 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
5971 been doing it for years.
5972 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
5973 (Release Procedure): Add FIXME about make alpha being unmaintained.
5974
5975 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
5976
5977 * data/yacc.c: Reformat m4 a little for readability.
5978 * src/lalr.c (build_relations): Correct comment.
5979
5980 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5981
5982 DJGPP specific issue.
5983 * djgpp/config.sed: Fixes required to run configure scripts generated
5984 by autoconf 2.62.
5985
5986 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5987
5988 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
5989 coordinator@translationproject.org.
5990
5991 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5992
5993 * THANKS: Add Eric Blake.
5994
5995 2008-04-23 Eric Blake <ebb9@byu.net>
5996
5997 Revert prior patch, by working around autoconf regression.
5998 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
5999 ("Output file name: ("): Uncomment test.
6000 ("Output file name: )"): Likewise.
6001 Based on an idea from Noah Misch.
6002
6003 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
6004
6005 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
6006 2.61. Reported by Juan Manuel Guerrero at
6007 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
6008 * tests/output.at ("Output file name: ("): Comment out test case for
6009 now.
6010 ("Output file name: )"): Likewise.
6011
6012 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
6013
6014 * GNUmakefile: Update git-version-gen invocation so make dist
6015 succeeds.
6016
6017 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
6018
6019 Update to the current gnulib CVS repository, and fix trigraph handling
6020 in Bison.
6021 * bootstrap: Update gnulib CVS repository URL.
6022 (symlink_to_dir): Encapsulate the code that guarantees the destination
6023 directory exists into...
6024 (check_dst_dir): ... this new function, and...
6025 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
6026 fail when copying files into lib/uniwidth/.
6027 * src/output.c (prepare_symbols): When writing yytname muscles, where
6028 symbol names will be encoded in C-string literals, tell quotearg to
6029 escape trigraphs. This used to be the default in gnulib.
6030 * tests/regression.at (Token definitions): Because of the change in
6031 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
6032 escapes trigraphs in symbol names. Thus, yytname no longer has
6033 trigraphs unnecessarily doubly escaped. Update test case output.
6034 Extend test case to be sure Bison's own error messages will no longer
6035 have trigraphs in symbol names unnecessarily escaped once.
6036
6037 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
6038
6039 Fix make dist infinite loop reported by Juan Manuel Guerrero at
6040 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
6041 * .cvsignore: Add .version.
6042 * .version.in: New.
6043 * bootstrap.conf (gnulib_modules): Add git-version-gen.
6044 * configure.ac (AC_CONFIG_FILES): Add .version.
6045 * build-aux/.cvsignore: Add git-version-gen.
6046
6047 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
6048
6049 * NEWS (2.3a+): Mention that -g now takes an argument.
6050 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
6051 consistency. Update the -g and -x entries now that they take
6052 arguments. Use brackets to indicate optional arguments.
6053 * src/getargs.c (usage): Explain the relationship between arguments of
6054 long and short options more completely. Document --defines and -d
6055 separately since the former takes an argument but, for POSIX Yacc, the
6056 latter does not.
6057 (short_options): Let -W take an optional argument like --warnings.
6058 (getargs): Sort cases.
6059
6060 2008-02-28 Akim Demaille <demaille@gostai.com>
6061
6062 * doc/bison.texinfo: Fix a few typos.
6063
6064 2008-02-28 Akim Demaille <akim@epita.fr>
6065
6066 * doc/bison.texinfo (Bison Options): Document -W.
6067 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
6068
6069 2008-02-28 Akim Demaille <akim@epita.fr>
6070
6071 * src/getargs.c (short_options): Split and sort for readability.
6072 -g and -x take optional arguments, just like their long options.
6073 * build-aux/cross-options.pl: Use /x to make the regexp easier to
6074 understand.
6075 Fix the handling of $opt which resulted in all the argument to be
6076 considered as optional.
6077
6078 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
6079
6080 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
6081 say its interface is experimental.
6082 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6083 Java.
6084 (Bison Options): In the -L and --language entry, mention Java.
6085 (Java Bison Interface): Say the interface is experimental.
6086 * src/getargs.c (usage): Mention -L and --language.
6087
6088 * NEWS (2.3a+): Say the push parsing interface is experimental.
6089 * doc/bison.texinfo (Push Decl): Likewise.
6090 (Decl Summary): Likewise in the "%define api.push_pull" entry.
6091 (Push Parser Function): Likewise.
6092 (Pull Parser Function): Likewise.
6093 (Parser Create Function): Likewise.
6094 (Parser Delete Function): Likewise.
6095 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
6096 yypull_parse, and yypush_parse entries.
6097
6098 * NEWS (2.3a+): Mention XML support, and say the schema is
6099 experimental.
6100 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
6101 * src/getargs.c (usage): Say the XML schema is experimental.
6102
6103 * NEWS (2.3a+): Say option instead of flag.
6104
6105 2008-02-21 Wojciech Polak <polak@gnu.org>
6106
6107 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
6108 text.
6109
6110 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
6111
6112 Fix impure push parser compile error reported by Bob Rossi at
6113 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
6114 * data/yacc.c: Clean up whitespace in the output a little.
6115 (yypstate_allocated): Define for impure push parsers regardless of
6116 whether the pull interface is also requested.
6117 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
6118 check impure push parsers without the pull interface.
6119
6120 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
6121 yyerror takes arguments specified by %parse-param while yypstate_new
6122 does not.
6123 * doc/bison.texinfo (Parser Create Function): Document that
6124 yypstate_new returns 0 for multiple impure parser instances.
6125 * tests/push.at (Push Parsing: Multiple impure instances): Update
6126 expected stderr output.
6127
6128 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
6129
6130 * runtime-po/POTFILES.in (push.c): Remove.
6131
6132 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
6133
6134 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
6135 * data/push.c: Rename to...
6136 * data/yacc.c: ... this, overwriting it.
6137 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
6138 `%push-pull-parser' -> `%define api.push_pull "both"'.
6139 Remove old yacc.c tests, and update push.c tests to yacc.c.
6140
6141 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
6142
6143 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
6144 `"%code top" blocks' instead of `%code "top" blocks'.
6145 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
6146 Clean up whitespace in the output a little.
6147
6148 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
6149
6150 Fix documentation problems reported by Tim Josling at
6151 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
6152 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
6153 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
6154 integers. Explain the effect of literal string aliases on error
6155 messages. Copy token 0 documentation from the C++ skeleton
6156 documentation.
6157
6158 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
6159
6160 Accept a token number in a %left, %right, or %nonassoc for POSIX
6161 conformance. Reported by Tim Josling at
6162 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
6163 * NEWS (2.3a+): Mention.
6164 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
6165 and code numbers are treated by precedence declarations.
6166 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
6167 of symbols.1.
6168 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
6169 of symbol.
6170 (symbol.prec): New, just like symbol but allows INT.
6171 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
6172 longer holds.
6173 * tests/regression.at (Token number in precedence declaration): New
6174 test case.
6175
6176 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6177
6178 DJGPP specific issues.
6179 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
6180 be changed. Copyright timestamp adjusted.
6181 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
6182 be changed. Copyright timestamp adjusted.
6183 * djgpp/config.site: Copyright timestamp adjusted.
6184 * djgpp/config_h.sed: Copyright timestamp adjusted.
6185 * djgpp/djunpack.bat: Copyright timestamp adjusted.
6186 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
6187 filename translation list.
6188 * djgpp/subpipe.c (init_subpipe): Check the environment variables
6189 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
6190 files shall be created. Before trying to use the temp dir where the
6191 environment variable points to check that the dir really exists. If
6192 not default to the cwd as temp dir. Copyright timestamp adjusted.
6193 * djgpp/subpipe.h: Copyright timestamp adjusted.
6194 * djgpp/testsuite.sed: Copyright timestamp adjusted.
6195
6196 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
6197
6198 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
6199
6200 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
6201
6202 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
6203 Problem reported by Claudio Saavedra in
6204 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
6205
6206 2008-01-05 Wojciech Polak <polak@gnu.org>
6207
6208 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
6209 document's title with the input grammar file name.
6210
6211 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
6212
6213 Automate regression testing of the XML/XSLT implementation. Discussed
6214 starting at
6215 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
6216 * configure.ac (XSLTPROC): New substitution.
6217 * Makefile.am (maintainer-xml-check): New phony target invoking...
6218 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
6219 invoking make maintainer-check with BISON_TEST_XML=1.
6220 * tests/atlocal.in (XSLTPROC): New.
6221 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
6222 not to report reachable memory when Bison is expected to have a
6223 non-zero exit status and (2) to compare XML/XSLT output with --graph
6224 and --report=all output for every working grammar when
6225 BISON_TEST_XML=1.
6226 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
6227 (AT_BISON_CHECK_XML): New.
6228 (AT_QUELL_VALGRIND): New.
6229 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
6230 (AT_CHECK): ... don't redefine this since this was the old way to
6231 quell Valgrind.
6232 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
6233 AT_BISON_CHECK invocations.
6234 * tests/c++.at: Likewise.
6235 * tests/calc.at: Likewise.
6236 * tests/conflicts.at: Likewise.
6237 * tests/cxx-type.at: Likewise.
6238 * tests/existing.at: Likewise.
6239 * tests/glr-regression.at: Likewise.
6240 * tests/headers.at: Likewise.
6241 * tests/input.at: Likewise.
6242 * tests/java.at: Likewise.
6243 * tests/output.at: Likewise.
6244 * tests/push.at: Likewise.
6245 * tests/reduce.at: Likewise.
6246 * tests/regression.at: Likewise.
6247 * tests/sets.at: Likewise.
6248 * tests/skeletons.at: Likewise.
6249 * tests/synclines.at: Likewise.
6250 * tests/torture.at: Likewise.
6251 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
6252 tends to hang xsltproc.
6253 (Big horizontal): Likewise.
6254
6255 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
6256
6257 In XML output, remove redundant class attribute on symbol element.
6258 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
6259 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
6260 look up a symbol to determine whether it's a nonterminal or terminal.
6261 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
6262 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
6263
6264 Add prec/assoc information to XML output.
6265 * src/gram.c (grammar_rules_print_xml): For each rule that has a
6266 %prec, add a percent_prec attribute.
6267 * src/print-xml.c (print_grammar): For each terminal that has a
6268 precedence or associativity, add a prec or assoc attribute.
6269 (xml_indent): New.
6270 (xml_puts): Use xml_indent.
6271 (xml_printf): Use xml_indent.
6272 * src/print-xml.h (xml_indent): Prototype.
6273
6274 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
6275 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
6276
6277 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
6278
6279 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
6280 (bison:ruleByNumber): ... this for clarity.
6281 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
6282 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
6283 (xsl:template match="reduction"): Update.
6284 (xsl:template match="item"): Update.
6285 (xsl:template match="reduction"): Update.
6286
6287 In the XML output, don't print the list of rules where symbols appear.
6288 Compute it in XSLT instead. Discussed at
6289 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
6290 * data/xslt/bison.xsl (bison:ruleByLhs): New.
6291 (bison:ruleByRhs): New.
6292 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
6293 bison:ruleByRhs.
6294 (xsl:template match="terminal/rule"): Remove.
6295 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
6296 bison:ruleByRhs.
6297 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
6298 Remove.
6299 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
6300 bison:ruleByRhs and mode="number-link" for rule template.
6301 (xsl:template match="terminal/rule"): Remove.
6302 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
6303 bison:ruleByRhs and mode="number-link" for rule template.
6304 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
6305 Rewrite as...
6306 (xsl:template match="rule" mode="number-link"): ... this.
6307 * src/print-xml.c (print_grammar): Don't print the list of rules.
6308
6309 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6310
6311 Don't let --report affect XML output; always print all information.
6312 Discussed at
6313 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
6314 * src/conflicts.c (log_resolution): Implement.
6315 * src/print-xml.c (print_core): Implement.
6316 (print_state): Implement.
6317 (print_xml): Implement.
6318
6319 * NEWS (2.3a+): Fix quotes.
6320 * src/parse-gram.y (prologue_declaration): For consistency with -v,
6321 don't let %verbose clear the list specified by --report.
6322
6323 2007-11-26 Akim Demaille <akim@epita.fr>
6324
6325 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
6326
6327 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
6328
6329 In the XML output, list useless and unused symbols and rules with the
6330 useful ones and add a "usefulness" attribute. Discussed starting at
6331 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
6332 * src/gram.c (grammar_rules_partial_print_xml): Remove.
6333 (grammar_rules_print_xml): Print all rules instead of just those
6334 useful in the grammar, and add a "usefulness" attribute.
6335 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
6336 * src/print-xml.c (print_rules_useless_in_parser): Remove.
6337 (print_grammar): Print all nonterminals instead of just useful ones,
6338 and add a "usefulness" attribute to nonterminals and terminals.
6339 (print_xml): Don't print a separate "reductions" or
6340 "rules-useless-in-parser" element.
6341 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
6342 (reduce_xml): Remove.
6343 (reduce_token_unused_in_grammar): New.
6344 (reduce_nonterminal_useless_in_grammar): New.
6345 * src/reduce.h (reduce_xml): Remove prototype.
6346 (reduce_token_unused_in_grammar): Add prototype.
6347 (reduce_nonterminal_useless_in_grammar): Add prototype.
6348 * data/xslt/xml2text.xsl: Update for XML changes.
6349 * data/xslt/xml2xhtml.xsl: Update for XML changes.
6350 * tests/reduce.at (Useless Terminals): Update output.
6351 (Useless Rules): Update output.
6352 (Reduced Automaton): Update output.
6353
6354 Say "Terminals unused in grammar" instead of "Unused terminals".
6355 * NEWS (2.3a+): Update.
6356 * doc/bison.texinfo (Understanding): Update example output.
6357 * src/reduce.c (reduce_output): Implement.
6358 * data/xslt/xml2text.xsl: Implement.
6359 * data/xslt/xml2xhtml.xsl: Implement.
6360
6361 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
6362
6363 Accept --report-file=FILE to override the default `.output' filename.
6364 * NEWS (2.3a+): Mention.
6365 * doc/bison.texinfo (Bison Options): Add an entry.
6366 * src/files.c (compute_output_file_names): Don't override
6367 spec_verbose_file if already set.
6368 * src/getargs.c (usage): Document --report-file.
6369 (REPORT_FILE_OPTION): New anonymous enum member.
6370 (long_options): Add entry for it.
6371 (getargs): Add case for it setting spec_verbose_file.
6372
6373 * build-aux/cross-options.pl: Don't record a short option just because
6374 there's an arg.
6375 * doc/.cvsignore: Add yacc.1.
6376
6377 2007-11-14 Akim Demaille <akim@epita.fr>
6378
6379 * doc/yacc.1.in: New.
6380 * configure.ac, doc/Makefile.am: Adjust.
6381 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
6382 config.h symbol.
6383 Use AC_SUBST for assignments too.
6384 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
6385
6386 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6387
6388 * src/gram.c: Remove comments that duplicate comments in gram.h.
6389
6390 When reporting useless rules and nonterminals, say "useless in grammar"
6391 instead of "useless", and say "useless in parser" instead of "never
6392 reduced". Discussed starting at
6393 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
6394 * NEWS (2.3a+): Mention this change.
6395 * data/xslt/xml2text.xsl: Update output text and expected input XML
6396 element names to match changes below.
6397 * data/xslt/xml2xhtml.xsl: Likewise.
6398 (xsl:template match="bison-xml-report"): Add missing entry in Table of
6399 Contents: "Rules useless in parser due to conflicts".
6400 * doc/bison.texinfo (Decl Summary): Reword a little.
6401 (Understanding): Update example output for changes below.
6402 * src/gram.c: (rule_useful_p): Rename to...
6403 (rule_useful_in_grammar_p): ... this.
6404 (rule_useless_p): Rename to...
6405 (rule_useless_in_grammar_p): ... this.
6406 (rule_never_reduced_p): Rename to...
6407 (rule_useless_in_parser_p): ... this.
6408 (grammar_rules_print): Update for renames.
6409 (grammar_rules_print_xml): Update for renames.
6410 (grammar_rules_never_reduced_report): Rename to...
6411 (grammar_rules_useless_report): ... this since it is used for either
6412 kind of useless rule.
6413 * src/gram.h: Reword comments and update function names in prototypes.
6414 * src/main.c (main): Say "rule useless in parser due to conflicts".
6415 * src/print-xml.c (print_rules_never_reduced): Rename to...
6416 (print_rules_useless_in_parser): ... this, and rename output XML
6417 element "rules-never-reduced" to "rules-useless-in-parser".
6418 (print_xml): Update for rename.
6419 * src/print.c (print_results): Say "Rules useless in parser due to
6420 conflicts".
6421 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
6422 (nonterminals_reduce): Say "nonterminal useless in grammar".
6423 (reduce_output): Say "Nonterminals useless in grammar".
6424 Say "Rules useless in grammar".
6425 (reduce_xml): Rename output XML element "useless" to
6426 "useless-in-grammar".
6427 (reduce_print): Don't report the count of grammatically useless rules
6428 as "rules never reduced" just because %yacc is specified.
6429 In the correct report of this count, say nonterminal(s) and rule(s)
6430 "useless in grammar".
6431 * tests/conflicts.at (S/R in initial): Update expected output.
6432 (Defaulted Conflicted Reduction): Likewise.
6433 (Unreachable States After Conflict Resolution): Likewise.
6434 * tests/existing.at (GNU pic Grammar): Likewise.
6435 * tests/reduce.at (Useless Nonterminals): Likewise.
6436 (Useless Rules): Likewise.
6437 (Reduced Automaton): Likewise.
6438 (Underivable Rules): Likewise.
6439 (Empty Language): Likewise.
6440
6441 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6442
6443 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
6444 here document and before the EOF so that BSD's implementation of Bourne
6445 shell doesn't parse the delimiter as part of the here document.
6446 * doc/.cvsignore: Add cross-options.texi.
6447 * src/getargs.c (usage): Add a blank line after the warning categories.
6448
6449 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
6450
6451 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
6452
6453 2007-11-05 Akim Demaille <akim@epita.fr>
6454
6455 Remove Id: from bison.1.
6456 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
6457 (perl -0777 -pi -e 's/\.PP\nId): New.
6458 (.x.1): Use it to ignore the version control revision.
6459
6460 2007-11-05 Akim Demaille <demaille@gostai.com>
6461
6462 * build-aux/Makefile.am: Ship cross-options.pl.
6463 * doc/Makefile.am: Always refer to cross-options.texi with
6464 $(srcdir).
6465 (MAINTAINERCLEANFILES): Add it.
6466
6467 2007-11-04 Akim Demaille <demaille@gostai.com>
6468
6469 Generate the long/short option cross-table.
6470 * build-aux/cross-options.pl: New.
6471 * doc/Makefile.am (cross-options.texi): New.
6472 * doc/bison.texinfo: Use it.
6473
6474 2007-11-04 Akim Demaille <demaille@gostai.com>
6475
6476 Generate bison.1 using help2man.
6477 * doc/common.x, doc/bison.x: New.
6478 * doc/Makefile.am (bison.1, .x.1): New.
6479 The code is taken from autoconf-2.61/man/Makefile.am.
6480 * configure.ac: Look for help2man.
6481
6482 2007-11-04 Akim Demaille <demaille@gostai.com>
6483
6484 Complete --help.
6485 * src/getargs.c (usage): Document -W, make it clear that -d,
6486 -g and -x have optional arguments.
6487
6488 2007-11-04 Akim Demaille <demaille@gostai.com>
6489
6490 Find sha1sum when named gsha1sum.
6491 * bootstrap (find_tool): New.
6492 ($SHA1SUM): New.
6493
6494 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6495
6496 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
6497 at
6498 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
6499 * NEWS (2.3a+): Mention.
6500 * data/bison.m4 (b4_pure_if): Don't define it here.
6501 * data/c.m4 (b4_identification): Depend on individual skeletons to
6502 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
6503 values of the %define variables api.pure or api.push_pull. Define
6504 YYPURE, YYPUSH, and YYPULL accordingly.
6505 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
6506 glr.cc has already defined b4_pure_flag.
6507 * data/push.c: Define b4_pure_if based on `%define api.pure'.
6508 Remove YYPUSH and YYPULL since they're back in b4_identification again.
6509 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
6510 * doc/bison.texinfo (Pure Decl): Update.
6511 (Push Decl): Update.
6512 (Decl Summary): Add api.pure to %define entry.
6513 In %pure-parser entry, say it's deprecated and reference %define.
6514 (Pure Calling): Update.
6515 (Error Reporting): Update.
6516 (C++ Scanner Interface): Update.
6517 (How Can I Reset the Parser): Update.
6518 (Table of Symbols): In %pure-parser entry, say it's deprecated and
6519 reference %define.
6520 * src/getargs.c (pure_parser): Remove global variable.
6521 * src/getargs.h (pure_parser): Remove extern.
6522 * src/output.c (prepare): Don't define pure_flag muscle.
6523 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
6524 wrapper around `%define api.pure'.
6525 * tests/calc.at (Simple LALR Calculator): Update.
6526 (Simple GLR Calculator): Update.
6527 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
6528 Update.
6529 (GLR: Resolve ambiguity, pure, locations): Update.
6530 (GLR: Merge conflicting parses, pure, no locations): Update.
6531 (GLR: Merge conflicting parses, pure, locations): Update.
6532 * tests/glr-regression.at (Uninitialized location when reporting
6533 ambiguity): Update
6534 * tests/input.at (Unused %define api.pure): New test case.
6535 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
6536 AT_PURE_IF and AT_PURE_AND_LOC_IF.
6537 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6538
6539 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6540
6541 %define push_pull -> %define api.push_pull. Discussed starting at
6542 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
6543 * data/push.c: Expect the new name.
6544 * data/yacc.c: Likewise.
6545 * doc/bison.texinfo (Push Decl): Update.
6546 (Decl Summary): Update %define entry.
6547 (Push Parser Function): Update.
6548 (Pull Parser Function): Update.
6549 (Parser Create Function): Update.
6550 (Parser Delete Function): Update.
6551 * tests/calc.at (Simple LALR Calculator): Update.
6552 * tests/input.at (%define enum variables): Update.
6553 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6554 (Push Parsing: Multiple impure instances): Update.
6555 (Push Parsing: Unsupported Skeletons): Update.
6556 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
6557 (Exploding the Stack Size with Malloc): Update.
6558
6559 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
6560 other entries some.
6561
6562 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
6563
6564 For the XML output's terminal element, rename @number to @token-number,
6565 and add @symbol-number. In the nonterminal element, rename @number to
6566 @symbol-number. Discussed starting at
6567 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
6568 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
6569 renames.
6570 (xsl:template match="nonterminal"): Likewise.
6571 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
6572 (xsl:template match="nonterminal"): Likewise.
6573 * src/print-xml.c (print_grammar): Implement.
6574
6575 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6576
6577 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
6578 2007-10-11 change, the child elements here are items not rules.
6579 (xsl:template match="item"): New.
6580 (xsl:template match="rule"): Update for new reduced itemset.
6581 (xsl:template match="point"): Remove.
6582 (xsl:template match="empty"): For consistency with --graph, don't
6583 output "/* empty */".
6584 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
6585 line-wrap, don't pass a negative value as first-line-length since this
6586 won't work with the following changes.
6587 (xsl:template name="line-wrap"): Simplify slightly.
6588 (xsl:template name="ws-search"): Eliminate recursion.
6589 * src/print_graph.c (print_core): Don't print a reduction's lookahead
6590 set next to an item whose dot is not at the end of the RHS even if it
6591 happens to be associated with the same rule.
6592
6593 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6594
6595 Add %define lr.keep_unreachable_states.
6596 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
6597 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
6598 * src/main.c (main): Implement it.
6599 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6600 Extend to test it, and fix a typo.
6601
6602 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6603
6604 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
6605 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
6606 the example .output text.
6607 * tests/regression.at (Extra lookahead sets in report): Improve wording
6608 of comments.
6609
6610 2007-10-17 Wojciech Polak <polak@gnu.org>
6611
6612 * src/print-xml.c (print_grammar): Renamed
6613 <terminal> and <nonterminal> attributes:
6614 "type" to "number" and "symbol" to "name".
6615 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
6616 Use new attribute names.
6617 (xsl:template match="nonterminal"): Likewise.
6618 * data/xslt/xml2xhtml.xsl: Likewise.
6619
6620 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
6621
6622 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
6623 (Option Cross Key): Likewise.
6624
6625 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
6626 next to an item whose dot is not at the end of the RHS even if it
6627 happens to be associated with the same rule.
6628 * src/print.c (print_core): Likewise.
6629 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
6630 (Resolved SR Conflicts): Update output.
6631 * tests/regression.at (Extra lookahead sets in report): New test case.
6632
6633 2007-10-11 Wojciech Polak <polak@gnu.org>
6634
6635 * src/print-xml.c (print_core): Remove item set
6636 redundancy.
6637 * data/xslt/bison.xsl (bison:ruleNumber): New key.
6638 Improve processing time. Suggested by Joel E. Denny.
6639 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
6640 Write xsl:param "required" attribute as comment.
6641 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
6642 (xsl:template match="rule"): Support new reduced itemset.
6643 (xsl:template match="point"): Remove.
6644 * data/xslt/xml2xhtml.xsl: Likewise.
6645
6646 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6647
6648 * src/getargs.c (version): Update copyright year.
6649
6650 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6651
6652 Make xml2dot.xsl and --graph produce the same output.
6653 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
6654 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
6655 escaped later.
6656 (xsl:template name="output-node"): Use the new escape template instead
6657 of the string-replace template directly.
6658 (xsl:template name="output-edge"): Likewise.
6659 (xsl:template name="escape"): New, escapes backslashes and newlines in
6660 addition to quotation marks.
6661 * src/graphviz.c (start_graph, output_node, output_edge): Add
6662 whitespace to output for legibility.
6663
6664 Make xml2text.xsl and --report produce the same output, and remove the
6665 XML "conflicts" element since a conflict summary is easily extracted
6666 from the automaton.
6667 * data/xslt/bison.xsl: New.
6668 (xsl:template match="state" mode="bison:count-conflicts): New.
6669 * data/xslt/xml2text.xsl: Import bison.xsl.
6670 (xsl:template match="bison-xml-report"): Instead of styling the
6671 "conflicts" element, style the "automaton" element with mode
6672 "conflicts". Unlike the former, the latter lists S/R and R/R
6673 conflicts for a state on the same line.
6674 (xsl:template match="conflicts"): Remove.
6675 (xsl:template match="conflict"): Remove.
6676 (xsl:template match="terminal"): Line-wrap the list of rules in which
6677 the terminal is used.
6678 (xsl:template match="nonterminal"): Likewise for nonterminals.
6679 (xsl:template match="automaton" mode="conflicts"): New.
6680 (xsl:template match="state" mode="conflicts"): New.
6681 (xsl:template name="line-wrap"): New.
6682 (xsl:template name="ws-search"): New.
6683 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
6684 (xsl:template match="bison-xml-report"): Instead of styling the
6685 "conflicts" element, style the "automaton" element with mode
6686 "conflicts."
6687 (xsl:template match="conflicts"): Remove.
6688 (xsl:template match="conflict"): Remove.
6689 (xsl:template match="automaton" mode="conflicts"): New.
6690 (xsl:template match="state" mode="conflicts): New.
6691 * src/conflicts.c (conflicts_output_xml): Remove.
6692 * src/conflicts.h (conflicts_output_xml): Remove prototype.
6693 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
6694 * src/print.c (print_grammar): Consistently wrap at the 66th column so
6695 the corresponding XSLT is easier. Also, never wrap between a word and
6696 the comma that follows it.
6697
6698 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6699
6700 Improve C++ namespace support. Discussed starting at
6701 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
6702 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
6703 b4_namespace_close): New macros that interpret the %define variable
6704 "namespace" so its value can contain "::" to indicate nested
6705 namespaces.
6706 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
6707 the above macros.
6708 * data/lalr1.cc (b4_namespace): Likewise.
6709 * data/location.cc (b4_namespace): Likewise.
6710 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
6711 inside a new table in the general %define entry. Document `%define
6712 namespace' there as well. Point the %name-prefix entry to it since it
6713 explains it more completely in the case of C++.
6714 (C++ Bison Interface): Mention `%define namespace' instead of
6715 %name-prefix.
6716 (Table of Symbols): Remove the `%define push_pull' entry. The %define
6717 entry suffices.
6718 * tests/c++.at (Relative namespace references): New test case.
6719 (Absolute namespace references): New test case.
6720 (Syntactically invalid namespace references): New test case.
6721 * tests/input.at (C++ namespace reference errors): New test case.
6722
6723 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6724
6725 Add syncline support and location accessor to internal %define
6726 interfaces.
6727 * data/bison.m4 (b4_percent_define_get_loc): New.
6728 (b4_percent_define_get_syncline): New.
6729 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
6730 (b4_percent_define_default): Record defining location as line 1 rather
6731 than 0 for the sake of synchronizing #line's, and define
6732 b4_percent_define_syncline(VARIABLE).
6733 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
6734 * src/muscle_tab.c (muscle_syncline_grow): New.
6735 (muscle_code_grow): Use muscle_syncline_grow.
6736 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
6737 define b4_percent_define_syncline(VARIABLE).
6738 (muscle_percent_define_get_loc): New.
6739 (muscle_percent_define_get_syncline): New.
6740 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
6741 remove some unused variables.
6742 (muscle_percent_define_default): Record defining location as line 1
6743 rather than 0 for the sake of synchronizing #line's, and define
6744 b4_percent_define_syncline(VARIABLE).
6745 (muscle_percent_define_check_values): Use
6746 muscle_percent_define_get_loc.
6747 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
6748 (muscle_percent_define_get_syncline): Prototype.
6749 * tests/skeletons.at (%define Boolean variables: invalid skeleton
6750 defaults): Update output for location change.
6751 (Complaining during macro argument expansion): Extend to test
6752 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
6753
6754 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
6755
6756 Fix some error-reporting macro bugs.
6757 * data/bison.m4 (b4_cat): New.
6758 (b4_error, b4_error_at): Use b4_cat to send error directives directly
6759 to stdout so they don't become arguments to other macros. Update
6760 comments and add examples.
6761 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
6762 add examples.
6763 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
6764 after printing the error directive so that M4 doesn't report subsequent
6765 problems that are induced by this problem.
6766 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
6767 instead of just in them. Recognize @\n in both places. Both expand to
6768 the empty string. Needed by b4_cat.
6769 * tests/skeletons.at (Complaining during macro argument expansion):
6770 New test case.
6771 (Fatal errors make M4 exit immediately): New test case.
6772
6773 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
6774
6775 Implement --print-datadir.
6776 * src/getargs.c (usage): Mention.
6777 (PRINT_DATADIR_OPTION): New anonymous enum member.
6778 (long_options): Add entry for it.
6779 (getargs): Add case for it calling compute_pkgdatadir.
6780 * src/output.c (output_skeleton): Encapsulate data directory
6781 computation from here...
6782 (prepare): ... and from here...
6783 (compute_pkgdatadir): ... into this new function.
6784 * src/output.h (compute_pkgdatadir): Prototype.
6785
6786 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
6787
6788 * src/print-xml.c (escape_bufs): New static global variable
6789 replacing...
6790 (xml_escape_n): ... the static local variable buf here.
6791 (print_xml): Free memory for escape_bufs.
6792 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
6793
6794 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
6795
6796 Replace `%push-parser' and `%push-pull-parser' with
6797 `%define push_pull "push"' and `%define push_pull "both"'.
6798 `%define push_pull "pull"' is the default.
6799 * doc/bison.texinfo (Push Decl, Push Parser Function,
6800 Pull Parser Function, Parser Create Function, Parser Delete Function):
6801 Update declarations.
6802 (Decl Summary, Table of Symbols): Replace %push-parser and
6803 %push-pull-parser entries with a %define push_pull entry.
6804 * data/bison.m4 (b4_percent_define_check_values): New macro.
6805 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
6806 definitions...
6807 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
6808 definitions...
6809 * data/push.c: ... to here and compute them from the value of the
6810 %define variable push_pull.
6811 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
6812 parsing requests here...
6813 * data/yacc.c: ... hack this to switch to push.c any time
6814 b4_use_push_pull_flag or the %define variable push_pull is set. This
6815 will go away when we mv push.c yacc.c.
6816 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
6817 push parsing is not supported since unused %define variables are
6818 reported anyway.
6819 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
6820 * src/muscle_tab.h (muscle_percent_define_check_values): Update
6821 comments for consistency with b4_percent_define_check_values.
6822 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
6823 muscles.
6824 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
6825 Remove.
6826 (prologue_declaration): Remove %push-parser and %push-pull-parser
6827 rules.
6828 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
6829 * tests/calc.at: Update declarations.
6830 * tests/input.at (%define enum variables): New test case.
6831 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
6832 declaration.
6833 (Push Parsing: Multiple impure instances): Update declaration.
6834 (Push Parsing: Unsupported Skeletons): New test case.
6835 * tests/torture.at (Exploding the Stack Size with Alloca): Update
6836 declaration.
6837 (Exploding the Stack Size with Malloc): Update declaration.
6838
6839 2007-09-24 Wojciech Polak <polak@gnu.org>
6840
6841 Add XSLT transformations.
6842
6843 * data/xslt/xml2dot.xsl: Transform XML into DOT.
6844 * data/xslt/xml2text.xsl: Transform XML into plain text.
6845 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
6846 * data/Makefile.am (xsltdir): New variable.
6847 (dist_xslt_DATA): Add xslt/*.xsl files.
6848
6849 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
6850
6851 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
6852 Problem reported by Wojciech Polak.
6853 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
6854 (xml_printf): Undo change I made on 21 September; that is,
6855 indent 2 spaces, not 1.
6856
6857 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
6858
6859 Pacify ./configure --enable-gcc-warnings.
6860 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
6861 `char const *' instead of `char *'.
6862 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
6863 local variable `sep'.
6864
6865 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6866
6867 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
6868 elsewhere.
6869 * src/print-xml.c: Prefer "const" after types; that's more consistent.
6870 (xml_printf): Indent just 1 space for level.
6871 (e_char, xlate_char): Remove.
6872 (xml_escape_string): Rewrite to avoid undefined behavior (used
6873 storage that was freed from the stack).
6874 (xml_escape_n): Don't bother checking for subscript error.
6875
6876 2007-09-21 Wojciech Polak <polak@gnu.org>
6877
6878 Add Bison XML Automaton Report.
6879
6880 Add support for an -x option to generate an XML report.
6881 It is not documented yet.
6882 * src/print-xml.c: New file.
6883 * src/print-xml.h: Likewise.
6884 * lib/timevar.def (TV_XML): New var.
6885 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
6886 * src/conflicts.c: Include print-xml.h.
6887 (solved_conflicts_xml_obstack): New var.
6888 (log_resolution, conflicts_solve, conflicts_free):
6889 Add support for XML report.
6890 (conflicts_output_val): New function.
6891 * src/conflicts.h (conflicts_output_val): New decl.
6892 * src/files.c (spec_xml_file): New var.
6893 (compute_output_file_names, output_file_names_free): Add XML support.
6894 * src/files.h (spec_xml_file): New decl.
6895 * src/getargs.c (xml_flag): New var.
6896 (usage, short_options, long_options, getargs): Add XML support.
6897 * src/getargs.h (xml_flag): New decl.
6898 * src/gram.c: Include print-xml.h.
6899 (rule_lhs_print_xml, rule_rhs_print_xml):
6900 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
6901 New functions.
6902 * src/gram.h: Declare external ones.
6903 * src/main.c: Include print-xml.h.
6904 (main): Add XML support.
6905 * src/reduce.c: Include print-xml.h.
6906 (reduce_xml): New function.
6907 * src/reduce.h: Declare it.
6908 * src/state.c: Include print-xml.h.
6909 (state_new): Add XML support.
6910 (state_rule_lookahead_tokens_print_xml): New function.
6911 * src/state.h: Declare it.
6912 (struct state): New member solved_conflicts_xml.
6913 * src/symtab.c (symbol_class_get_string): New function.
6914 * src/symtab.h: Declare it.
6915
6916 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6917
6918 * GNUmakefile: Switch to coreutils's version.
6919 * bootstrap: Likewise.
6920 * Makefile.cfg: Adjust to new GNUmakefile.
6921 * README-hacking: Likewise.
6922
6923 Import from gnulib:
6924
6925 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
6926 Bruno Haible <bruno@clisp.org>
6927
6928 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6929 and is a script that invokes bison. Tighten the code. Add comments.
6930
6931 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
6932
6933 Spell "boolean" as "Boolean". Reported by Akim Demaille.
6934 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
6935 * doc/bison.texinfo (Decl Summary): Fix.
6936 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
6937 * tests/input.at (Boolean %define variables): Update output.
6938 * tests/skeletons.at (%define boolean variables: invalid skeleton
6939 defaults): Rename to...
6940 (%define Boolean variables: invalid skeleton defaults): ... this and
6941 update output.
6942
6943 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
6944
6945 In impure push mode, don't allow more than one yypstate to be allocated
6946 since multiple impure parsers would corrupt yynerrs.
6947 * data/push.c (yypstate_allocated): New static global variable
6948 initialized to 0.
6949 (yypull_parse): If yypstate_new returns 0, don't report it as memory
6950 exhaustion if yypstate_allocated is 1, but still return 2.
6951 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
6952 already 1. Otherwise, set it to 1.
6953 (yypstate_delete): Set it to 0.
6954 * tests/push.at (Push Parsing: Multiple impure instances): New test
6955 case.
6956
6957 2007-08-17 Bob Rossi <bob@brasko.net>
6958
6959 * doc/bison.texinfo (Push Decl): Document the push parser.
6960 (Table of Symbols): Ditto.
6961 (Pure Decl): Ditto.
6962 (Decl Summary): Ditto.
6963 (Multiple Parsers, Push Parser Function, Pull Parser Function,
6964 Parser Create Function, Parser Delete Function):
6965 Add new push parser symbols.
6966 (Table of Symbols): Document push-parser, push-pull-parser,
6967 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
6968
6969 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
6970
6971 Update to GPLv3.
6972 * doc/gpl-3.0.texi: New file.
6973 * doc/gpl.texi: Remove.
6974 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
6975 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
6976 * README-hacking, TODO, bootstrap, bootstrap.conf:
6977 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
6978 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
6979 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
6980 * data/lalr1.cc, data/lalr1.java, data/location.cc:
6981 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
6982 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
6983 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
6984 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
6985 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
6986 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
6987 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
6988 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
6989 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
6990 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
6991 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
6992 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
6993 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
6994 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
6995 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
6996 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
6997 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
6998 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
6999 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
7000 * src/complain.c, src/complain.h, src/conflicts.c:
7001 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
7002 * src/files.h, src/flex-scanner.h, src/getargs.c:
7003 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
7004 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
7005 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
7006 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
7007 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
7008 * src/print.c, src/print.h, src/print_graph.c:
7009 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
7010 * src/reduce.h, src/relation.c, src/relation.h:
7011 * src/revision.h, src/scan-code.h, src/scan-code.l:
7012 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
7013 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
7014 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
7015 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
7016 * tests/Makefile.am, tests/actions.at, tests/c++.at:
7017 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
7018 * tests/existing.at, tests/glr-regression.at:
7019 * tests/headers.at, tests/input.at, tests/java.at:
7020 * tests/local.at, tests/output.at, tests/push.at:
7021 * tests/reduce.at, tests/regression.at, tests/sets.at:
7022 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
7023 * tests/torture.at:
7024 Update to GPLv3.
7025
7026 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
7027
7028 Get rid of broken %no-parser, -n, and --no-parser implementation and
7029 documentation.
7030 * TODO: Don't mention them.
7031 * doc/bison.1: Likewise.
7032 * doc/bison.texinfo (Decl Summary): Likewise.
7033 (Bison Options): Likewise.
7034 (Option Cross Key): Likewise.
7035 * src/getargs.c (no_parser_flag): Remove global variable.
7036 (usage): Don't print description of -n and --no-parser.
7037 (long_options): Remove --no-parser entry here.
7038 (getargs): Remove -n case in the switch here.
7039 * src/getargs.h (no_parser_flag): Remove extern.
7040 * tests/regression.at (Web2c Actions): Remove comment that mentions
7041 --no-parser.
7042
7043 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
7044
7045 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
7046 name user variables starting with `yy'. Just pass NULL instead of a
7047 dummy local &yylval to yypush_parse.
7048 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
7049 starting with `yy'.
7050
7051 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
7052
7053 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
7054 true since it's then always used regardless of whether yyoverflow is
7055 defined. Reported by Christian Burger at
7056 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
7057 * THANKS: Add Christian Burger.
7058
7059 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
7060 node names: say "Decl Summary" not "Bison Declaration Summary".
7061
7062 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
7063
7064 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
7065 determine whether this function has already complained about an invalid
7066 value for a %define boolean variable, don't check whether Bison has
7067 ever examined the value. As written, the check was a tautology.
7068 Instead, record and check for this complaint using a separate muscle.
7069
7070 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
7071
7072 Fix push parsing memory leak reported by Brandon Lucia at
7073 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
7074 * THANKS: Add Brandon Lucia.
7075 * data/push.c (yypstate_delete): Free the stack if it was reallocated
7076 but the parse never completed and thus freed it.
7077 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
7078 * tests/testsuite.at: Include push.at.
7079 * test/push.at: New.
7080 (Push Parsing: Memory Leak for Early Deletion): New test case.
7081
7082 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
7083
7084 Improve handling of multiple S/R conflicts in the same state and of S/R
7085 conflicts involving multiple reductions.
7086 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
7087 set for a state here or Bison will abort if it is reassigned on a
7088 later conflicted reduction in the same state.
7089 Similarly, don't finalize and assign the solved conflicts report here
7090 or it will be lost if it is reassigned on a later conflicted reduction
7091 in the same state.
7092 (set_conflicts): Instead, assign them both here after all S/R conflicts
7093 in the state have been fully examined.
7094 * src/print.c (shift_set): Rename to...
7095 (no_reduce_set): ... this.
7096 (print_reductions): Update for rename, and add %nonassoc error action
7097 tokens to no_reduce_set so that, when printing the first remaining
7098 reduction on an error action token, the reduction is enclosed in
7099 brackets.
7100 (print_results): Update for rename.
7101 * tests/conflicts.at (Solved conflicts report for multiple reductions
7102 in a state): New test case.
7103 (%nonassoc error actions for multiple reductions in a state): New test
7104 case.
7105
7106 * src/main.c (main): Don't depend on C99 features.
7107
7108 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
7109
7110 * build-aux/.cvsignore: Add compile.
7111 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
7112 uniwidth.
7113
7114 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
7115
7116 * bootstrap (slurp): Create target directories that don't exist.
7117 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
7118
7119 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7120
7121 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
7122 than item number.
7123 * closure.c (closure): Likewise.
7124 * state.h (reductions): Comment sorting of rules.
7125 (state): Comment sorting of items.
7126
7127 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
7128
7129 Fix C++ test cases after recent Gnulib changes. Discussed starting at
7130 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
7131 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
7132 definition in order to avoid Gnulib headers since we don't use config.h
7133 here.
7134 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
7135 rather than AT_DATA so that config.h is included.
7136
7137 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
7138
7139 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
7140 instead of fprintf. Guard these functions with #if YYDEBUG instead of
7141 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
7142 and so that YYFPRINTF is guaranteed to be defined here.
7143
7144 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7145
7146 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
7147 with...
7148 (muscle_percent_define_check_values): ... this more helpful function.
7149 Again, it's not used yet, but it will be.
7150 * src/muscle_tab.h: Likewise.
7151
7152 Improve some comments in parser table construction.
7153 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
7154 (generate_states): Don't mention ruleset, which is internal to closure.
7155 * src/closure.c (closure): Explain sorting of core and itemset, which
7156 is required for this function to behave correctly.
7157 * src/closure.h (closure): Mention sorting.
7158
7159 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
7160
7161 * src/lalr.c (state_lookahead_tokens_count): For code readability,
7162 move the check for disabled transitions to an aver since conflict
7163 resolution hasn't happened yet.
7164
7165 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
7166 labels a state as inconsistent just because it has error transitions.
7167 The original form of this check appeared in revision 1.1 of lalr.c,
7168 which was committed on 1991-12-21. Now (at least), changing the
7169 consistency label on such a state appears to have no useful effect in
7170 any of the places it is examined, which I enumerate below. The key
7171 point to understanding each item in this enumeration is that a state
7172 with an error transition is labelled consistent in the first place only
7173 if it has no rules, so the check cannot matter for states that have
7174 rules. (1) Labelling a state as inconsistent will cause set_conflicts
7175 to try to identify its conflicts, and a state must have *rules* to have
7176 conflicts. (2) Labelling a state as inconsistent will affect how
7177 action_row sets the default *rule* for the state. (3) Labelling a
7178 state as inconsistent will cause build_relations to add lookback edges
7179 to *rules* in that state.
7180 * src/state.h (struct state): Word the comment for member consistent
7181 more carefully.
7182
7183 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
7184
7185 Don't depend on C99 features.
7186 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
7187 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
7188 * src/reader.c (check_and_convert_grammar): Fix for-loop.
7189 * src/state.c (state_mark_reachable_states): Fix for-loop.
7190 (state_remove_unreachable_states): Fix for-loop.
7191
7192 Don't widen struct state with member reachable just to temporarily
7193 record reachability. Instead, use a local bitset.
7194 * src/state.h (struct state): Remove member.
7195 * src/state.c (state_new): Don't initialize it.
7196 (state_mark_reachable_states): Rename to...
7197 (state_record_reachable_states): ... this, and use bitset.
7198 (state_remove_unreachable_states): Use bitset.
7199
7200 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
7201
7202 * src/Makefile.am (yacc): Quote target action commands properly so
7203 that the yacc script isn't corrupt. Reported by Hans Aberg at
7204 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
7205
7206 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
7207 the case of pure parsers. Reported by Frans Englich at
7208 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
7209 * THANKS: Add Frans Englich.
7210
7211 * NEWS (2.3a+): In the %code entry, reference section `Bison
7212 Declaration Summary' from the manual now since the %code summary has
7213 moved there.
7214 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
7215 in the rules section must be terminated by semicolons.
7216
7217 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
7218
7219 Extend the front-end API for %define variables to more completely
7220 mirror the back-end. This will be useful in the future.
7221 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
7222 Update comments to mention the new front-end counterparts of these
7223 macros.
7224 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
7225 for muscle_string_decode and muscle_location_decode.
7226 (muscle_string_decode): New static function.
7227 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
7228 (muscle_percent_define_get, muscle_percent_define_ifdef): New
7229 functions.
7230 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
7231 muscle_percent_define_get to mimic the b4_percent_define_flag_if
7232 implementation more closely.
7233 (muscle_percent_define_invalid_value): New function.
7234 * src/muscle_tab.h (muscle_percent_define_get,
7235 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
7236 Prototype.
7237
7238 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
7239
7240 * NEWS (2.3a+): Mention yesterday's state-removal change.
7241 (2.3a): Remove the %language entry, which was added after 2.3a.
7242 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
7243 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
7244 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
7245 tests/existing.at: Update copyright date.
7246
7247 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
7248
7249 If conflict resolution makes states unreachable, remove those states,
7250 report rules that are then unused, and don't report conflicts in those
7251 states.
7252 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
7253 New global function.
7254 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
7255 function.
7256 * src/main.c (main): After conflict resolution, remove the unreachable
7257 states and update all data structures that reference states by number.
7258 * src/state.c (state_new): Initialize each state's reachable member to
7259 false.
7260 (state_mark_reachable_states): New static function.
7261 (state_remove_unreachable_states): New global function.
7262 * src/state.h (struct state): Add member bool reachable.
7263 (state_remove_unreachable_states): Prototype.
7264 * tests/conflicts.at (Unreachable States After Conflict Resolution):
7265 New test case.
7266 * tests/existing.at (GNU pic Grammar): Update test case output now that
7267 an unused rule is discovered.
7268
7269 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
7270
7271 Minor code cleanup in parser table construction.
7272 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
7273 (new_itemsets, save_reductions): Update for rename to nitemset.
7274 * src/closure.c (nritemset): Rename to...
7275 (nitemset): ... this since the "r" appears to meaningless and isn't
7276 used in the comments.
7277 (closure): Update for rename.
7278 * src/closure.h (nritemset): Update extern to...
7279 (nitemset): ... this.
7280 * src/lalr.c (LA): Fix a typo in comments.
7281 * src/print.c (print_core): Update for rename to nitemset.
7282 * src/print_graph.c (print_graph): Likewise.
7283 * src/state.h: Fix some typos in header comments.
7284
7285 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
7286
7287 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
7288 still sticks to ASCII. Sorry!
7289
7290 * README-hacking: New file, taken mostly from coreutils, with changes
7291 for Bison. Contains much of the contents of:
7292 * README-cvs: Remove.
7293 * bootstrap: Sync from gnulib.
7294 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
7295 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
7296
7297 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
7298
7299 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
7300 Setzer.
7301 (Java Differences): Fix some typos.
7302 * THANKS: Add Sebastian Setzer.
7303
7304 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
7305
7306 * data/java.m4 (b4_single_class_if): Remove.
7307 (b4_abstract_if): Look at "%define abstract".
7308 (b4_lexer_if): New.
7309 (b4_union_name): Rename...
7310 (b4_yystype): ... to this. Map to "%define stype".
7311 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
7312 b4_maybe_throws): Fix quoting.
7313 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
7314 * data/lalr1.java (Lexer interface): Always define.
7315 (Lexer interface within parser class): Remove.
7316 (YYLexer class): New, used when "%code lexer" is present.
7317 (constructor): When "%code lexer" is used, pass %lex-param
7318 to the lexer constructor.
7319 (yylex, yyparse): Remove %lex-param from method invocations
7320 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
7321
7322 * doc/bison.texinfo (Java Bison Interface): Mention "%define
7323 abstract". Rename "%define union_name" to "%define stype".
7324 Rename method names according to previous patch.
7325 (Java Scanner Interface): Describe "%code lexer" instead of
7326 "%pure-parser" and "%define single_class".
7327 (Java Differences): Mention "%code lexer".
7328
7329 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
7330 Include scanner here, using macros from tests/local.at.
7331 (AT_DATA_CALC_Y): Remove final argument.
7332 (_AT_CHECK_JAVA_CALC): Likewise.
7333 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
7334 of %locations and %error-verbose.
7335 (main): Test with and without %lex-param.
7336 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
7337 (AT_BISON_OPTION_POPDEFS): Pop it.
7338
7339 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7340
7341 DJGPP spefic issue. Inhibit the use of disallowed characters for
7342 file name genertion on Win98, WinXP, etc. These are |<>":?*\
7343 and concern testsuite case 46.
7344 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
7345 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
7346 * djgpp/config.bat: Inhibit the use of disallowed characters.
7347
7348 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7349
7350 Miscellaneous %define and %code cleanup.
7351 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
7352 values are interpreted.
7353 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
7354 documentation a little more.
7355 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
7356 muscle_percent_define_insert, muscle_percent_code_grow): New
7357 functions/macros.
7358 * src/muscle_tab.h (muscle_percent_define_insert,
7359 muscle_percent_code_grow): Prototype.
7360 * src/parse-gram.y (prologue_declaration): Use
7361 muscle_percent_define_insert and muscle_percent_code_grow when parsing
7362 %define and %code directives.
7363
7364 Make it easy to share %define boolean variables between the front-end
7365 and back-end. Though not used yet, this will be useful in the future.
7366 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
7367 Bison uses of names rather than just skeleton uses of names.
7368 (b4_percent_define_get, b4_percent_define_ifdef): Rename
7369 b4_percent_define_skeleton_variables(VARIABLE) to
7370 b4_percent_define_bison_variables(VARIABLE).
7371 (b4_percent_code_get, b4_percent_code_ifdef): Rename
7372 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
7373 b4_percent_code_bison_qualifiers(QUALIFIER).
7374 (b4_check_user_names_wrap): Update for renames.
7375 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
7376 muscle_percent_define_default): New functions mimicking
7377 b4_percent_define_flag_if and b4_percent_define_default.
7378
7379 For %define variables, report locations for invalid values and
7380 redefinitions.
7381 * data/bison.m4 (b4_percent_define_flag_if): Read
7382 b4_percent_define_loc(VARIABLE) to report the location of an invalid
7383 value for VARIABLE.
7384 (b4_percent_define_default): Save a special location in
7385 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
7386 must later be reported as invalid.
7387 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
7388 functions.
7389 (muscle_percent_define_insert): Record the location of VARIABLE in
7390 muscle percent_define_loc(VARIABLE), and use it to report the previous
7391 location for a redefinition.
7392 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
7393 (muscle_percent_define_default): Update like b4_percent_define_default.
7394 (muscle_grow_user_name_list): Rename to...
7395 (muscle_user_name_list_grow): ... this for consistency and use
7396 muscle_location_grow.
7397 * src/muscle_tab.h (muscle_location_grow): Prototype.
7398 * tests/input.at (%define errors): Update expected output.
7399 * tests/skeletons.at (%define boolean variables: invalid skeleton
7400 defaults): New test case.
7401
7402 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
7403
7404 * src/print.c (lookahead_set, state_default_rule): Remove.
7405 (print_reductions): Replace state_default_rule invocation with
7406 equivalent use of yydefact, which was computed in token_actions in
7407 tables.c.
7408 (print_results): Don't allocate lookahead_set.
7409
7410 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
7411
7412 * data/lalr1.java: Prefix all private members with yy.
7413
7414 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
7415
7416 Use YYFPRINTF instead of fprintf where appropriate. Reported by
7417 Sebastien Fricker at
7418 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
7419 * THANKS: Add Sebastien Fricker.
7420 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
7421 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
7422 accept a variable number of arguments.
7423
7424 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
7425
7426 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
7427
7428 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7429
7430 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
7431 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
7432 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
7433
7434 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
7435
7436 Undo my 2007-02-07 change, switching back to the c-strcase module
7437 introduced in the 2007-02-03 change. Bruno Haible reported that
7438 the 2007-02-07 change would be dangerous in Turkish if we add a
7439 language whose name contains "i", since "i" is not lowercase "I"
7440 in Turkish.
7441 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
7442 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
7443 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
7444 * m4/.cvsignore: Remove strcase.m4.
7445 * src/getargs.c: Revert 2007-02-07 change, as follows.
7446 Include c-strcase.h.
7447 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
7448
7449 2007-02-11 Bruno Haible <bruno@clisp.org>
7450
7451 Enable the Java related testsuite tests when the only Java compiler
7452 found is a gcj < 4.3. Discussed at
7453 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
7454 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
7455
7456 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
7457
7458 * data/Makefile.am: Update copyright date.
7459 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
7460 yypstate_new returns NULL.
7461 (yypstate_new): Return NULL if malloc does.
7462 * src/reader.c (packgram): Move translation of rule actions from the
7463 beginning of packgram to...
7464 (check_and_convert_grammar): ... here right before packgram is invoked
7465 so it's easier to write more complete comments, and remove redundant
7466 code.
7467
7468 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
7469
7470 As in semantic actions, make @$ in %initial-action, %destructor, and
7471 %printer imply %locations.
7472 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
7473 scanning @$.
7474 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
7475 (@$ in %initial-action implies %locations,
7476 @$ in %destructor implies %locations,
7477 @$ in %printer implies %locations): ... these new test cases.
7478
7479 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
7480
7481 Undo most of the 2007-02-03 change, switching to the strcase module
7482 now that gnulib strcase has been fixed.
7483 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
7484 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
7485 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
7486 * m4/.cvsignore: Add strcase.m4.
7487 * src/getargs.c: Revert 2007-02-03 change, as follows.
7488 Don't include c-strcase.h.
7489 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
7490 strcasecmp has "unspecified behavior" outside the POSIX locale,
7491 but it works fine in practice if at least one argument is ASCII,
7492 as is the case in Bison.
7493
7494 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
7495
7496 * tests/java.at: Skip tests if only one of javac/java is present.
7497 Reported by Joel E. Denny.
7498 * tests/atlocal.in: Adjust copyright years.
7499
7500 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
7501
7502 * data/lalr1.java (Stack): Work around old verifiers that disallow
7503 access to the private fields of an inner class, from the outer class.
7504 We can make Stack's fields public because user code doesn't have access
7505 to the instance of Stack used by parse(). Reported by Paul Eggert.
7506
7507 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
7508
7509 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
7510 the right spot for these files?
7511 * bootstrap.conf (gnulib_modules): Add c-strcase.
7512 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
7513 c-strncasecmp.c.
7514 * src/getargs.c: Include c-strcase.h.
7515 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
7516 to avoid unspecified behavior.
7517
7518 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
7519
7520 * doc/bison.texinfo (Decl Summary): Correct typo.
7521
7522 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
7523
7524 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
7525 Complain if the value does not match empty, "true" or "false".
7526 * data/c++.m4: Adjust default definitions of %define variables.
7527 * data/java.m4: Adjust default definitions of %define variables.
7528 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
7529 to above behavior.
7530 * tests/input.at (Boolean %define variables): Test new behavior.
7531
7532 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
7533
7534 * NEWS: Mention java.
7535 * TODO: Remove things that are done.
7536 * bootstrap.conf: Add javacomp-script and javaexec-script.
7537 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
7538
7539 * data/Makefile.am: Add new files.
7540 * data/java-skel.m4: New.
7541 * data/java.m4: New.
7542 * data/lalr1.java: New.
7543
7544 * doc/bison.texinfo: Put "A Complete C++ Example" under
7545 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
7546 under Other Languages.
7547
7548 * src/getargs.c (valid_languages): Add Java.
7549 * src/getargs.h (struct bison_language): Update size of string fields.
7550
7551 * tests/Makefile.am: Add java.at.
7552 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
7553 * tests/java.at: New.
7554 * tests/testsuite.at: Include it.
7555
7556 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
7557
7558 Clean up.
7559 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
7560 at_directive_argv arguments so these no longer have to be global
7561 variables. Also, update the implementation for the following changes.
7562 (fail_for_at_directive_too_many_args,
7563 fail_for_at_directive_too_few_args): Add at_directive_name argument.
7564 (at_directive_name): Remove as at_directive_argv[0] will be used for
7565 this now.
7566 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
7567 for the directive name.
7568 (at_directive_argc, at_directive_argv): Make these local within
7569 skel_lex instead of global.
7570 (INITIAL): Update directive start action for above changes.
7571 (SC_AT_DIRECTIVE_ARG): Rename to...
7572 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
7573 (SC_AT_DIRECTIVE_SKIP_WS): Update.
7574 (scan_skel): Move yylex_destroy to...
7575 (skel_scanner_free): ... here.
7576 * tests/skeletons.at (installed skeleton file name): Rename to...
7577 (installed skeleton file names): ... this.
7578
7579 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
7580
7581 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
7582 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
7583 Summary" not "Directives".
7584 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
7585 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
7586 since the former is now the more complete one.
7587 (Prologue Alternatives): Likewise and do the same for %defines.
7588 (Table of Symbols): Add summary of %code, add summary of %define, and
7589 move full %code documentation to...
7590 (Decl Summary): ... here for consistency with other entries in these
7591 sections.
7592 Move %define entry in order to keep this list alphabetized.
7593 Reword %define entry a little to put less emphasis on the skeleton
7594 concept, which most users shouldn't have to think about.
7595
7596 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
7597
7598 Adjust to recent gnulib changes.
7599 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
7600 Add string.h, string_.h, unistd_.h, wchar_.h.
7601 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
7602 * src/system.h: Don't include <stpcpy.h>; this is now done by
7603 <string.h>.
7604
7605 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
7606
7607 Simplify implementation of unqualified %code, implement macros for
7608 uniform treatment of boolean %define flags. Document %define.
7609 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
7610 b4_percent_code_ifdef): New.
7611 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
7612 * data/c++.m4: Define default value for global_tokens_and_yystype.
7613 * data/glr.cc: Likewise.
7614 * data/location.cc: Use b4_percent_define_flag_if.
7615
7616 * doc/bison.texinfo (Decl Summary): Document %define.
7617
7618 * src/parse-gram.y (Unqualified %code): Change muscle name to
7619 b4_percent_code().
7620 (content.opt): Default to empty.
7621
7622 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7623
7624 Implement support for relative and absolute skeleton file names.
7625 Discussed starting at
7626 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
7627 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
7628 (Bison Options): Document in --skeleton entry.
7629 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
7630 full_skeleton can't necessarily hold all of pkgdatadir.
7631 If the specified skeleton file name contains a `/', don't prepend
7632 pkgdatadir.
7633 * src/parse-gram.y (prologue_declaration): If the specified skeleton
7634 file name contains a `/', prepend the grammar file directory.
7635 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
7636 * skeletons.at: New file.
7637 (relative skeleton file names): New test case.
7638 (installed skeleton file names): New test case.
7639 * tests/testsuite.at: Include skeletons.at.
7640
7641 * bootstrap: Update copyright to 2007.
7642
7643 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
7644
7645 * bootstrap: Remove occurrences of .#bootmp from the files.
7646
7647 2007-01-17 Akim Demaille <akim@epita.fr>
7648
7649 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
7650 nonterminals.
7651 Use per-type %printer.
7652
7653 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7654
7655 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
7656 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7657 djgpp/config.site, src/files.c, src/files.h, src/main.c,
7658 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
7659 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
7660 tests/glr-regression.at, tests/input.at, tests/local.at,
7661 tests/output.at, tests/torture.at: Update copyright to 2007.
7662
7663 2007-01-16 Akim Demaille <akim@epita.fr>
7664
7665 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
7666 error code.
7667 (Calc++ Scanner): Exit with failure if we can't open the input
7668 file.
7669 Accept "-" standing for stdin.
7670 (Calc++ Top Level): Print the result only if the parsing was
7671 successful.
7672
7673 2007-01-16 Akim Demaille <akim@epita.fr>
7674
7675 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
7676
7677 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
7678 and Joel E. Denny <jdenny@ces.clemson.edu>
7679
7680 Clean up %define and %code implementation in M4 some. Most
7681 importantly, rename all related macros to be in the b4_percent_define
7682 and b4_percent_code namespaces. Also, complete support for `.' in
7683 %define variable names and %code qualifiers.
7684 * data/bison.m4 (b4_check_user_names): Check for special
7685 "SKELETON-NAMESPACE(name)" macros instead of using two nested
7686 m4_foreach loops.
7687 (b4_get_percent_define, b4_get_percent_code): Rename to...
7688 (b4_percent_define_get, b4_percent_code_get): ... these.
7689 Extend documentation with examples.
7690 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
7691 b4_percent_define_skeleton_variables and
7692 b4_percent_code_skeleton_qualifiers.
7693 Expect any value for the %define variable `foo' to be stored in the
7694 macro named `b4_percent_define(foo)'; expect any %code blocks for the
7695 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
7696 expect any unqualified %code blocks to be stored in a macro named
7697 `b4_percent_code_unqualified'.
7698 Use m4_indir so that %define variable names and %code qualifiers can
7699 contain `.', which is allowed by the grammar parser.
7700 (b4_percent_define_default): New macro to set a default value for a
7701 %define variable.
7702 (m4_wrap): Update wrapped code, and fix some underquoting.
7703 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
7704 Expect grammar uses of %define variables and %code qualifiers to be
7705 defined in b4_percent_define_user_variables and
7706 b4_percent_code_user_qualifiers.
7707 * data/c++.m4: Use b4_percent_define_default rather than
7708 m4_define_default. Fix some underquoting. Skeleton usage of %define
7709 variable define_location_comparison now implies skeleton usage of
7710 %define variable filename_type.
7711 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7712 data/push.c, data/yacc.c: Update macro names.
7713 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
7714 muscle names.
7715
7716 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7717
7718 DJGPP specific issues.
7719
7720 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
7721 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
7722
7723 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7724
7725 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
7726 run parsers in all tests so that Valgrind is invoked during
7727 maintainer-check-valgrind.
7728 (Duplicate representation of merged trees): Free all semantic values.
7729 (Duplicated user destructor for lookahead): Likewise.
7730
7731 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7732
7733 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
7734 command-line prefix.
7735 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
7736 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
7737 miss Valgrind messages.
7738 (Exploding the Stack Size with Malloc): Likewise.
7739
7740 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7741
7742 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
7743 locals. Reported by Juan Manuel Guerrero at
7744 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
7745 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
7746 Fix some indentation also.
7747 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
7748 explaining this issue.
7749
7750 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
7751 and Joel E. Denny <jdenny@ces.clemson.edu>
7752
7753 Simplify union and prologue handling, and escape union and lex/parse
7754 params with digraphs.
7755 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
7756 values to the empty string since these are no longer guaranteed
7757 initialized by the front-end.
7758 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
7759 braces around b4_user_stype since this is no longer done by the
7760 front-end.
7761 * src/files.c, src/files.h (pre_prologue_obstack,
7762 post_prologue_obstack): Remove.
7763 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
7764 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
7765 with digraphs. This fixes lex params and parse params.
7766 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
7767 * src/output.c (prepare): Remove muscle insertion of the prologues.
7768 (output): Remove freeing of pre_prologue_obstack and
7769 post_prologue_obstack.
7770 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
7771 than prologue_augment for prologue parsing so you don't need prologue
7772 obstacks.
7773 (grammar_declaration): For %union RHS, use `braceless' instead of
7774 "{...}" so that braces are already stripped and code is escaped with
7775 digraphs.
7776 * src/reader.c (prologue_augment): Remove.
7777 (reader): Remove initialization of pre_prologue_obstack and
7778 post_prologue_obstack.
7779 * src/reader.h (prologue_augment): Remove.
7780
7781 * data/c.m4: Remove stray parenthesis.
7782
7783 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7784
7785 Remove quotes from variables names in %define directives and from
7786 qualifiers in %code directives, and restrict the characters that are
7787 allowed in them to M4-friendly ones. For %define, continue to support
7788 the quoted form as a deprecated feature. Discussed starting at
7789 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
7790 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
7791 %code.
7792 * doc/bison.texinfo (Prologue Alternatives): Update.
7793 (Decl Summary): In %defines entry, update mention of `%code requires'
7794 and `%code provides'.
7795 (C++ Location Values): Update %define uses.
7796 (Calc++ Parser Interface): Likewise.
7797 (Calc++ Parser): Likewise, and update `%code requires' uses.
7798 (Table of Symbols): Update %code documentation.
7799 * src/parse-gram.y (prologue_declaration): For %define variables, use
7800 `variable' instead of `STRING'.
7801 (grammar_declaration): For %code qualifiers, use `ID' instead of
7802 `STRING'.
7803 (variable): New nonterminal that takes an `ID' or a `STRING'.
7804 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
7805 and %define uses.
7806 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
7807 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
7808 (%define errors): Update %define uses.
7809
7810 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7811
7812 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
7813 instead of muscle_insert for %define values so that M4-special
7814 characters are replaced with digraphs.
7815 * tests/input.at (%define errors): Extend to check weird values.
7816
7817 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7818
7819 Instead of having skeletons declare all valid %define variables and
7820 %code qualifiers, provide macros that retrieve the associated values
7821 and build these lists automatically. Thus Bison will now warn when a
7822 variable or qualifier is not used by the skeleton in the current
7823 invocation regardless of whether it might sometimes be used by that
7824 skeleton in other invocations. Also, move all %define value macros to
7825 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
7826 form, which is replaced by %code.
7827 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
7828 (b4_check_user_names): ... this, and change the series of valid name
7829 arguments to a single list argument for names used in the skeleton
7830 similar to the existing list argument for names used in the grammar.
7831 Warn instead of complaining.
7832 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
7833 values and %code code, to format %code code properly, and to build
7834 lists of all %define variables and %code qualifiers used in the
7835 skeleton: b4_skeleton_percent_define_variables and
7836 b4_skeleton_percent_code_qualifiers.
7837 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
7838 Remove, and...
7839 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
7840 the skeleton names lists can finish building first. In place of
7841 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
7842 expect the lists b4_user_percent_define_variables and
7843 b4_user_percent_code_qualifiers.
7844 * data/c++.m4: Where setting default values for b4_parser_class_name,
7845 b4_location_type, b4_filename_type, b4_namespace, and
7846 b4_define_location_comparison, update their names to the
7847 b4_percent_define_ namespace.
7848 * data/glr.c: Don't use b4_check_percent_define_variables and
7849 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7850 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
7851 (b4_parser_class_name, b4_namespace): Define these using
7852 b4_get_percent_define for parser_class_name and namespace.
7853 * data/location.cc: Use b4_get_percent_define.
7854 * data/push.c: Don't use b4_check_percent_define_variables and
7855 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7856 * data/yacc.c: Likewise, and don't call m4_exit in
7857 b4_use_push_for_pull_if or m4_wrap code will never execute.
7858 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
7859 Rename to...
7860 (muscle_grow_user_name_list): ... this for consistency with the
7861 terminology used in bison.m4.
7862 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
7863 %define variable names, and rename muscle used_percent_define_variables
7864 to user_percent_define_variables.
7865 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
7866 user_percent_code_qualifiers.
7867 (content): Remove.
7868 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
7869 {CODE} form is no longer accepted.
7870 * tests/input.at (Reject bad %code qualifiers): Rename to...
7871 (Reject unused %code qualifiers): ... this, and update test output.
7872 (%define error): Update test output.
7873
7874 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
7875
7876 Check for unrecognized %define variables similar to checking for
7877 unrecognized %code qualifiers. Check for redefined %define variables.
7878 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
7879 generalizes...
7880 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
7881 (b4_check_percent_define_variables): New, also wraps it.
7882 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
7883 variables using b4_check_percent_define_variables.
7884 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
7885 all those exercised in the test suite and all those listed in the
7886 `Default values' section of c++.m4. Are there others?
7887 * data/push.c, data/yacc.c: Declare no valid %define variables.
7888 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
7889 similar to muscle_find, but it works even when the muscle stores a
7890 const value.
7891 (muscle_grow_used_name_list): New function for constructing the used
7892 name list muscles that b4_check_for_unrecognized_names requires.
7893 * src/parse-gram.y (prologue_declaration): Warn if a variable is
7894 %define'd more than once. Define the b4_used_percent_define_variables
7895 muscle with muscle_grow_used_name_list.
7896 (grammar_declaration): Abbreviate %code code with
7897 muscle_grow_used_name_list.
7898 * tests/input.at (%define errors): New.
7899
7900 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7901
7902 Provide warn_at, complain_at, and fatal_at function callbacks to the
7903 skeletons, and use this for %code qualifier complaints.
7904 * data/bison.m4 (b4_error_at): New, invoked by...
7905 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
7906 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
7907 @fatal_at(...@) directives.
7908 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
7909 qualifiers in b4_used_percent_code_qualifiers and to use
7910 b4_complain_at.
7911 * src/location.c, src/location.h (boundary_set_from_string): New global
7912 function.
7913 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
7914 function.
7915 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
7916 to b4_used_percent_code_qualifiers.
7917 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
7918 function.
7919 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
7920 (lineno): Rename to...
7921 (out_lineno): ... this so I don't misunderstand it again.
7922 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
7923 here; these newlines are in the input but not the output file.
7924 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
7925 (at_directive_perform): ... this new static function, and add handling
7926 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
7927 directives.
7928 * tests/input.at (Reject bad %code qualifiers): Update test output with
7929 locations and extend.
7930
7931 * tests/output.at (Output file name: [, Output file name: ]): Remove
7932 bogus comment about these tests failing.
7933
7934 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7935
7936 Clean up b4_check_percent_code_qualifiers a little.
7937 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
7938 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
7939 documentation and add examples.
7940 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
7941 qualifiers here.
7942
7943 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7944
7945 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
7946 unreliable -- especially when they're hidden inside another macro.
7947 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
7948 data/c.m4: Remove m4_divert(-1).
7949 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7950 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
7951 m4_divert_push(0) and m4_divert_pop(0).
7952 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
7953 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
7954 pushed and popped by m4sugar, should be first on the stack.
7955
7956 Provide warn, complain, and fatal function callbacks to the skeletons.
7957 This provides more flexibility than m4_fatal, improves the error
7958 message format, and captures messages for translation. Discussed
7959 starting at
7960 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
7961 * data/bison.m4 (b4_error): New, invoked by...
7962 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
7963 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
7964 directives. Because these M4 macros might be called when the current
7965 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
7966 the previous removal of uses of m4_divert, which caused trouble.
7967 (b4_check_percent_code_qualifiers): Use b4_complain instead of
7968 m4_fatal to report unrecognized %code qualifiers.
7969 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
7970 push parser requests.
7971 * data/glr.c: Use b4_complain instead of m4_fatal to report
7972 non-deterministic push parser requests.
7973 Update @output usage to @output(...@) form.
7974 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
7975 report missing %defines. Update @output usage to @output(...@) form.
7976 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
7977 @output(...@) form.
7978 * src/main.c (main): Invoke skel_scanner_free.
7979 * src/scan-skel.h (skel_scanner_free): Prototype new function.
7980 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
7981 obstack_for_string from flex-scanner.h.
7982 (YY_DECL): Use to declare skel_lex static.
7983 (decode_at_digraphs): Remove; now handled in the new
7984 SC_AT_DIRECTIVE_ARG start condition.
7985 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
7986 functions.
7987 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
7988 at_directive_argv): New static globals.
7989 (INITIAL): Use fail_for_invalid_at.
7990 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
7991 recognize the start of a generalized `@directive(...@)' form and
7992 start...
7993 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
7994 directive args (using the new obstack_for_string), to decode the
7995 contained @ diagraphs, and to perform the directive. It recognizes
7996 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
7997 @output(...@).
7998 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
7999 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
8000 `@,'.
8001 (scan_skel): Initialize obstack_for_string on the first call.
8002 (skel_scanner_free): New function to free obstack_for_string.
8003 * tests/input.at (Reject bad %code qualifiers): Update test output.
8004
8005 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
8006
8007 Consolidate the 4 prologue alternative directives (%code, %requires,
8008 %provides, and %code-top) into a single %code directive with an
8009 optional qualifier field. Discussed at
8010 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
8011 * NEWS (2.3a+): Rewrite the existing entry for the prologue
8012 alternatives.
8013 * doc/bison.texinfo (Prologue Alternatives): Update.
8014 (Decl Summary): Update to %code "requires" and %code "provides".
8015 (Calc++ Parser): Update to %code "requires".
8016 (Table of Symbols): Remove entries for %requires, %provides, and
8017 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
8018 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
8019 are replaced by b4_percent_code_provides and b4_percent_code_requires,
8020 which are skeleton-specific.
8021 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
8022 declare what %code qualifiers it supports and to complain if any other
8023 qualifiers were used in the grammar.
8024 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
8025 and b4_user_code([b4_percent_code_provides]) in place of
8026 b4_user_requires and b4_user_provides.
8027 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
8028 Add b4_user_code([b4_percent_code_top]) and
8029 b4_user_code([b4_percent_code]).
8030 Invoke b4_check_percent_code_qualifiers.
8031 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
8032 PERCENT_REQUIRES): Remove.
8033 (grammar_declaration): Remove RHS's for %code-top, %provides, and
8034 %requires. Rewrite the %code RHS as the unqualified form defining the
8035 muscle b4_percent_code. Add another RHS for the qualified %code form,
8036 which defines muscles of the form b4_percent_code_QUALIFIER and the
8037 b4_used_percent_code_qualifiers muscle.
8038 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
8039 PERCENT_REQUIRES): Remove.
8040 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
8041 %code "requires" and %code "provides".
8042 * tests/input.at (Reject bad %code qualifiers): New.
8043
8044 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
8045
8046 Use the new code_props interface for destructors and printers.
8047 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
8048 printer_location members, and change the type of the destructor and
8049 printer members to code_props.
8050 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
8051 symbol_printer_get, semantic_type_destructor_set,
8052 semantic_type_printer_set, default_tagged_destructor_set,
8053 default_tagless_destructor_set, default_tagged_printer_set,
8054 default_tagless_printer_set): Use code_props in arguments and return
8055 types in place of char const * and location.
8056 (symbol_destructor_location_get, symbol_printer_location_get): Remove
8057 since the locations are now contained in the return of
8058 symbol_destructor_get and symbol_printer_get.
8059 * src/output.c (symbol_destructors_output, symbol_printers_output):
8060 Replace with...
8061 (symbol_code_props_output): ... this to eliminate duplicate code.
8062 (output_skeleton): Update to use symbol_code_props_output.
8063 * src/reader.c (symbol_should_be_used): Update use of
8064 symbol_destructor_get.
8065 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
8066 Update uses of the various _destructor_set and _printer_set functions.
8067 * src/symtab.c: (default_tagged_destructor_location,
8068 default_tagless_destructor_location, default_tagged_printer_location,
8069 default_tagless_printer_location): Remove since we...
8070 (default_tagged_destructor, default_tagless_destructor,
8071 default_tagged_printer, default_tagless_printer): ... change the type
8072 of these to code_props.
8073 (symbol_new, semantic_type_new, symbol_destructor_set,
8074 semantic_type_destructor_set, symbol_destructor_get,
8075 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
8076 symbol_check_alias_consistency, default_tagged_destructor_set,
8077 default_tagless_destructor_set, default_tagged_printer_set,
8078 default_tagless_printer_set): Update.
8079 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
8080 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
8081 code_props members.
8082 (symbol_print): Use SYMBOL_CODE_PRINT.
8083
8084 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
8085
8086 Use the new code_props interface for rule actions.
8087 * src/symlist.h (symbol_list): Replace action, action_location, and
8088 used members with a code_props action_props member.
8089 * src/reader.c (symbol_should_be_used, grammar_rule_check,
8090 grammar_midrule_action, grammar_current_rule_merge_set,
8091 grammar_current_rule_symbol_append, packgram): Update.
8092 * src/scan-code.h (translate_rule_action): Remove, no longer used.
8093 * src/scan-code.l (handle_action_dollar): Update.
8094 (translate_rule_action): Remove, no longer used.
8095 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
8096
8097 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8098
8099 Use the new code_props interface in parse-gram.y.
8100 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
8101 Update all uses of translate_* functions to use the new code_props
8102 interface and to use gram_scanner_last_string_free and
8103 code_scanner_last_string_free where possible.
8104 (grammar_declaration): symbol_list_destructor_set and
8105 symbol_list_printer_set now perform the translation, so don't do it
8106 here. Use gram_scanner_last_string_free where possible.
8107 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
8108 translate_code): Remove, no longer used.
8109 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
8110 symbol_list_printer_set): Perform code translation here rather than
8111 depending on the caller to do so.
8112
8113 * src/symlist.h (struct symbol_list): Correct some documentation typos.
8114 * src/scan-gram.h (gram_last_string): Remove declaration.
8115 * src/scan-gram.l (last_string): Declare it static.
8116
8117 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8118
8119 Encapsulate code properties and related functionality for the various
8120 destructors, printers, and actions into a code_props structure and
8121 interface. This patch merely implements code_props in scan-code.h and
8122 scan-code.l. Future patches will rewrite other modules to use it.
8123 Discussed starting at
8124 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
8125 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
8126 consistently initialize const structs that have an empty location
8127 field.
8128 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
8129 to ensure consistency.
8130 * src/scan-code.h (code_props): New structure.
8131 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
8132 function, macro, and const global variable for initializing a
8133 code_props with no code.
8134 (code_props_plain_init, code_props_symbol_action_init,
8135 code_props_rule_action_init, code_props_translate_code): The rest of
8136 the new code_props functional interface. Among other things, the init
8137 functions set the code_props kind field so that
8138 code_props_translate_code will know whether to behave like
8139 translate_symbol_action, translate_rule_action, or translate_code.
8140 These old translate functions must remain until all other modules are
8141 updated to use the new code_props interface.
8142 (code_scanner_last_string_free): New function similar to
8143 gram_scanner_last_string_free.
8144 (code_scanner_free): Add documentation.
8145 * src/scan-code.l: Implement the new interface.
8146 (code_lex): Make it static, add a code_props* argument, and remove the
8147 rule argument.
8148 (last_string): New static global similar to the one in scan-gram.l.
8149 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
8150 instead of rule.
8151 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
8152 code_props since Bison may one day use this information for destructors
8153 and printers.
8154 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
8155 (handle_action_dollar): Use symbol_list_n_get and set used flag
8156 directly since symbol_list_n_used_set is removed.
8157 (translate_action): Add a code_props* argument and remove the rule,
8158 action, and location arguments. Pass the code_props* on to code_lex.
8159 (translate_rule_action, translate_symbol_action, translate_code):
8160 Rewrite as wrappers around the new code_props interface.
8161 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
8162 it would eventually need to break the encapsulation of code_props.
8163
8164 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
8165
8166 * etc/.cvsignore: New.
8167
8168 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
8169
8170 Add maintainer-push-check to run maintainer-check using push parsing in
8171 place of pull parsing where available.
8172 * Makefile.am (maintainer-push-check): New.
8173 * data/bison.m4 (b4_use_push_for_pull_if): New.
8174 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
8175 appropriately based on their existing values.
8176 (yypush_parse): Don't print push-parser-specific diagnostics if push
8177 parsing is being used in place of pull parsing.
8178 * data/yacc.c: If push parsing should replace pull parsing, redirect to
8179 push.c.
8180 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
8181 variable, and insert b4_use_push_for_pull_flag into muscles.
8182 * tests/Makefile.am (maintainer-push-check): New.
8183
8184 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
8185
8186 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
8187 (whether successful or failed) so that yypush_parse can be invoked
8188 again to start a new parse using the same yypstate.
8189 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
8190 check multiple yypull_parse invocations on the same yypstate. For pull
8191 mode, extend to check multiple yyparse invocations.
8192 (Exploding the Stack Size with Alloca): Extend to try with
8193 %push-pull-parser.
8194 (Exploding the Stack Size with Malloc): Likewise.
8195
8196 * tests/calc.at (Simple LALR Calculator): Don't specify
8197 %skeleton "push.c" since %push-pull-parser implies that now.
8198 * tests/headers.at (export YYLTYPE): Don't check for the push
8199 declarations. Otherwise, this test case can't be used to see if push
8200 mode can truly emulate pull mode.
8201 * tests/input.at (Torturing the Scanner): Likewise.
8202 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
8203 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
8204 AT_YACC_IF, which now includes the case of push mode since %skeleton
8205 need not be used for push mode. This will be more intuitive once
8206 push.c is renamed to yacc.c.
8207
8208 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
8209
8210 For push mode, convert yyparse from a macro to a function, invoke yylex
8211 instead of passing a yylexp argument to yypull_parse, and don't
8212 generate yypull_parse or yyparse unless %push-pull-parser is declared.
8213 Discussed starting at
8214 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
8215 * data/bison.m4 (b4_pull_if): New.
8216 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
8217 * data/push.c: Improve M4 quoting a little.
8218 (b4_generate_macro_args, b4_parenthesize): Remove.
8219 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
8220 any time a pull parser is requested.
8221 Don't #define this as a wrapper around yypull_parse. Instead, when
8222 both push and pull are requested, make it a function that does that
8223 same thing.
8224 (yypull_parse): If there's a b4_prefix, #define this to
8225 b4_prefix[pull_parse] when both push and pull are requested.
8226 Don't define this as a function unless both push and pull are
8227 requested.
8228 Remove the yylexp argument and hard-code yylex invocation instead.
8229 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
8230 %push-parser.
8231 * src/getargs.c (pull_parser): New global initialized to true.
8232 * getargs.h (pull_parser): extern it.
8233 * src/output.c (prepare): Insert pull_flag muscle.
8234 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
8235 (prologue_declaration): Set both push_parser and pull_parser = true for
8236 %push-pull-parser. Set push_parser = true and pull_parser = false for
8237 %push-parser.
8238 * src/scan-gram.l: Don't accept %push_parser as an alternative to
8239 %push-parser since there's no backward-compatibility concern here.
8240 Scan %push-pull-parser.
8241 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
8242 instead of %push-parser.
8243 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
8244 prototype it in the module that calls yyparse.
8245 * tests/input.at (Torturing the Scanner): Likewise.
8246 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
8247
8248 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
8249
8250 Update etc/bench.pl. Optimize push mode a little (the yyn change
8251 deserves most of the credit).
8252 * Makefile.am (SUBDIRS): Add etc subdirectory.
8253 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
8254 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
8255 yytoken, yyval, and yyloc declarations to...
8256 (yyparse or yypush_parse): ... here to improve performance. For
8257 yypush_parse invocations after the first, be sure to assign yyn its old
8258 value again.
8259 (yypstate_new): Don't bother initializing the yyresult field since the
8260 initial value isn't used.
8261 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
8262 remove the #define that, in push mode, set it to yyps->NAME.
8263 * etc/Makefile.am: New.
8264 * etc/bench.pl: Remove and build it instead from...
8265 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
8266 "tests/bison" from the build directory by default rather than just
8267 invoking "bison" from $PATH.
8268 (calc_grammar): Update push parser code: don't declare yylval globally,
8269 don't define yyparse_wrapper, and don't #define yyparse.
8270 (bench_grammar): Update to check all working combinations of yacc.c,
8271 push.c, impure, pure, pull, and push.
8272
8273 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
8274
8275 For push mode, add pull wrappers around yypush_parse.
8276 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
8277 (yypull_parse): New function wrapping yypush_parse.
8278 (yyparse): New #define wrapping yypull_parse.
8279 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
8280 is declared.
8281 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
8282 prototype yylex in the module that calls yyparse, and don't prototype
8283 yyparse there. Otherwise, the yyparse expansion won't compile.
8284 * tests/input.at (Torturing the Scanner): Likewise.
8285
8286 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
8287
8288 Enable push parsers to operate in impure mode. Thus, %push-parser no
8289 longer implies %pure-parser. The point of this change is to move
8290 towards being able to test the push parser code by running the entire
8291 test suite as if %push-parser had been declared.
8292 * data/push.c (yypush_parse): For impure mode, remove the
8293 yypushed_char, yypushed_val, and yypushed_loc arguments.
8294 Instead, declare these as local variables initialized to the global
8295 yychar, yylval, and yylloc.
8296 For the first yypush_parse invocation only, restore the initial values
8297 of these global variables when it's time to read a token since they
8298 have been overwritten.
8299 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
8300 %push-parser.
8301 * tests/calc.at (Simple LALR(1) Calculator): Always declare
8302 %pure-parser along with %push-parser since this test case was designed
8303 for pure push parsers.
8304 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
8305 (AT_YACC_OR_PUSH_IF): New.
8306 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
8307 add a note that it's still wrong for some cases (as it has been for a
8308 while).
8309 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
8310 %push-parser no longer implies %pure-parser.
8311
8312 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8313
8314 Remove some unnecessary differences between the pull parser code and
8315 the push parser code. This patch enables yynerrs in push mode.
8316 * data/push.c: Reformat M4 a little.
8317 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
8318 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
8319 because push mode is on. Instead, if pure mode is on, move yynerrs
8320 to...
8321 (b4_declare_parser_state_variables): ... here.
8322 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
8323 to yyps->NAME so it can be used in yypush_parse.
8324 (yypush_parse): Don't omit uses of yynerrs in push mode.
8325
8326 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8327
8328 Fix bug such that the first pushed token's value and location are
8329 sometimes overwritten (sometimes by %initial-action) before being used.
8330 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
8331 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
8332 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
8333 more closely mimic the pull parser logic.
8334 Don't copy the pushed token to yychar, yylval, and yylloc until it's
8335 time to read a token, which is after any initialization of yylval and
8336 yylloc.
8337 (gottoken): Rename label to...
8338 (yyread_pushed_token): ... for clarity and to avoid infringing on the
8339 user namespace.
8340
8341 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8342
8343 Rearrange initialization of the parser state variables so that the
8344 skeleton doesn't have to have a copy for pull mode and another for push
8345 mode. This patch also fixes at least a bug such that yylloc was not
8346 initialized (with b4_location_initial_line and
8347 b4_location_initial_column) upon calling yypush_parse. However, that
8348 initialization now overwrites the first token's location;
8349 %initial-action assigning @$ already did the same thing, and both bugs
8350 will be fixed in a later patch.
8351 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
8352 (b4_declare_parser_state_variables): Remove initialization of yytoken,
8353 yyss, yyvs, yyls, and yystacksize.
8354 (yypstate_new): Remove initialization of some yypstate fields: yystate,
8355 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
8356 yylsp.
8357 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
8358 yyps->NAME so it can be used in yypush_parse.
8359 (yyparse or yypush_parse): For yypush_parse, don't print the
8360 "Starting parse" diagnostic for invocations after the first.
8361 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
8362 yypush_parse, only do it for the first invocation.
8363 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
8364 initialization to occur in yypush_parse but only on the first
8365 invocation.
8366
8367 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8368
8369 * data/push.c: Add CPP guards around push parser declarations in both
8370 the header and the code file.
8371 In the code file, move the push parser declarations to the same place
8372 they appear in the header file.
8373 Clean up the M4 some, especially the inconsistent underquoting in
8374 some b4_c_function_def and b4_c_function_decl uses.
8375
8376 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8377
8378 Encapsulate the push parser state variables into an M4 macro so the
8379 push skeleton doesn't have to list them again for pull mode's yyparse.
8380 For push mode, remove yypush_parse's local equivalents of these
8381 variables to eliminate unnecessary copying between the two sets at
8382 run-time. This patch also fixes at least a bug related to multiple
8383 %initial-action invocations in push mode.
8384 * data/push.c (b4_declare_parser_variables): Rename to...
8385 (b4_declare_scanner_communication_variables): ... this for clarity and
8386 update both uses.
8387 (b4_declare_yyparse_variables): Remove and move its contents to the one
8388 spot where it was invoked.
8389 (b4_declare_parser_state_variables): New macro containing the parser
8390 state variables required by push mode.
8391 (struct yypstate): Replace all fields but yynew with
8392 b4_declare_parser_state_variables.
8393 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
8394 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
8395 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
8396 (yyparse or yypush_parse): For yyparse in pull mode, replace local
8397 parser state variable declarations with
8398 b4_declare_parser_state_variables.
8399 Don't initialize parser state variables when calling yypush_parse since
8400 yypstate_new already does that.
8401 Invoke the user's initial action only upon the first yypush_parse
8402 invocation.
8403 Remove all code that copies between the local parser state variables
8404 and the yypstate.
8405
8406 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8407
8408 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
8409 prevent a name collision in a future patch where these names will
8410 sometimes be #define'd.
8411 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
8412 since it no longer has the same name as the existing argument.
8413 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
8414
8415 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
8416 and Joel E. Denny <jdenny@ces.clemson.edu>
8417
8418 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
8419 that the argument is case-insensitive, and there's no `=' here.
8420 For the %skeleton entry, mention that %language is better.
8421 (Bison Options): Likewise for --language and --skeleton. Move the
8422 --skeleton entry so that the `Tuning the parser' section is sorted
8423 alphabetically on long options.
8424 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
8425 %language directive in detail here; cross-reference the %language
8426 documentation instead.
8427 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
8428 `%require "2.3b"' so that the example is always up-to-date.
8429 (Table of Symbols): Add entries for %language and %skeleton.
8430 * examples/extexi (normalize): Instead of replacing every %require
8431 argument with the current Bison version, just substitute for
8432 `@value{VERSION}'. This guarantees that we're testing what actually
8433 appears in the documentation.
8434 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
8435 rather than `@VERSION@'.
8436
8437 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8438
8439 * NEWS: Reword the %language news a bit, and put it earlier.
8440
8441 * src/getargs.c (skeleton_arg): Last arg is now location const *.
8442 Rewrite to simplify the logic.
8443 (language_argmatch): Likewise.
8444 (program_name): We now own this var.
8445 * src/getargs.h (struct bison_language): Use char[] rather than
8446 const char *.
8447
8448 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
8449 Java is supported.
8450 * src/complain.c (program_name): Remove decl; no longer needed.
8451 * src/main.c (program_name): Remove; now belongs to getargs.
8452
8453 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
8454
8455 * NEWS: Document %language.
8456
8457 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
8458
8459 * data/c-skel.m4, data/c++-skel.m4: New files.
8460 * data/glr.c: Complain on push parsers.
8461
8462 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
8463 over %skeleton.
8464 (Decl Summary): Document %language and %skeleton.
8465 (Command line): Document -L.
8466
8467 * examples/extexi: Rewrite %require directive.
8468 * examples/calc++/Makefile.am: Pass VERSION to extexi.
8469
8470 * src/files.c (compute_exts_from_gc): Look in language structure
8471 for .y extension.
8472 (compute_file_name_parts): Check whether .tab should be added.
8473 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
8474 (language, skeleton_arg, language_argmatch): New.
8475 (long_options): Add --language.
8476 (getargs): Use skeleton_arg, add -L/--language.
8477 * src/getargs.h: Include location.h.
8478 (struct bison_language, language, skeleton_arg, language_argmatch): New.
8479 * src/output.c (prepare): Pick default skeleton from struct language.
8480 Don't dispatch C skeletons here.
8481 * src/parse-gram.y (PERCENT_LANGUAGE): New.
8482 (prologue_declaration): Add "%language" rule, use skeleton_arg.
8483 * src/scan-gram.l ("%language"): New rule.
8484
8485 * tests/calc.at: Test %skeleton and %language.
8486 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
8487 (AT_GLR_IF): Look for %skeleton "glr.cc".
8488 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
8489 (AT_YACC_IF): Reject %language.
8490
8491 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8492
8493 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
8494 since it wasn't used; only the typedef name 'semantic_type' is needed.
8495 Also, omit trailing white space.
8496
8497 * bootstrap: Sync from coreutils.
8498 (gnulib_extra_files): Add build-aux/announce.gen.
8499 (slurp): Adjust .gitignore files like .cvsignore files.
8500 * build-aux/announce-gen: Remove from CVS, since bootstrap
8501 now creates this.
8502
8503 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
8504
8505 Make %push-parser imply %pure-parser. This fixes several bugs; see
8506 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
8507 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
8508 pure_parser = true.
8509 * data/push.c: Don't bother testing b4_push_if when deciding whether
8510 to expand b4_declare_parser_variables globally.
8511 (yypush_parse): Likewise in here.
8512
8513 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
8514 (yy_reduce_print): Reformat M4 for readability.
8515
8516 2006-12-15 Bob Rossi <bob@brasko.net>
8517 and Joel Denny <jdenny@ces.clemson.edu>
8518
8519 * data/push.c (yypstate): Add typedef, and update all uses of
8520 struct yypstate to just yypstate.
8521 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
8522
8523 2006-12-14 Bob Rossi <bob@brasko.net>
8524
8525 * data/push.c (yypush_parse): Declare prototype regardless of
8526 %locations option.
8527
8528 2006-12-14 Bob Rossi <bob@brasko.net>
8529
8530 * data/push.c (yyparse): Remove the prototype and the #define when in
8531 push-parser mode.
8532
8533 2006-12-13 Bob Rossi <bob@brasko.net>
8534
8535 * data/push.c (yypstate_init): Rename to...
8536 (yypstate_new): ... this and use b4_c_function_def.
8537 (yypstate_delete): New.
8538 (yypush_parse): Change parameters yynval and yynlloc to be const.
8539 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
8540 yypstate_delete functions.
8541
8542 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
8543
8544 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
8545 strange test case titles. Reported by Bob Rossi.
8546
8547 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
8548
8549 * TODO: Add pointer to Sylvain Schmitz's work on static detection
8550 of potential ambiguities in GLR grammers.
8551
8552 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
8553
8554 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
8555 `bison ', use m4_index instead of m4_substr since chopping up a string
8556 containing M4-special characters causes problems here.
8557
8558 Fix a couple of bugs related to special characters in user-specified
8559 file names, and make it easier for skeletons to compute output file
8560 names with the same file name prefix as Bison-computed output file
8561 names.
8562 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
8563 b4_parser_file_name and b4_spec_defines_file instead of
8564 @output_parser_name@ and @output_header_name@, which are now redundant.
8565 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
8566 b4_parser_file_name, b4_spec_defines_file, and the new
8567 @basename(FILENAME@) instead of @output_parser_name@ and
8568 @output_header_name@, which inappropriately escaped the file names as
8569 C string literals.
8570 * src/files.c (all_but_ext): Remove static qualifier.
8571 (compute_output_file_names): Move `free (all_but_ext)' to...
8572 (output_file_names_free): ... here since all_but_ext is needed later.
8573 * src/files.h (all_but_ext): Extern.
8574 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
8575 exactly what MUSCLE_INSERT_STRING used to do.
8576 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
8577 characters are escaped properly.
8578 * src/output.c (prepare): Define muscle file_name_all_but_ext as
8579 all_but_ext.
8580 For pkgdatadir muscle, maintain previous functionality by using
8581 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
8582 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
8583 digraphs would never be expanded. Hopefully no one has M4-special
8584 characters in his Bison installation path.
8585 * src/scan-skel.l: Don't parse @output_header_name@ and
8586 @output_parser_name@ anymore since they're now redundant.
8587 In @output, use decode_at_digraphs.
8588 Parse a new @basename command that invokes last_component.
8589 (decode_at_digraphs): New.
8590 (BASE_QPUTS): Remove unused.
8591 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
8592 (Output file name): New tests.
8593
8594 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
8595
8596 Warn about output files that are generated by the skeletons and that
8597 conflict with other output files.
8598 * data/glr.c: Don't generate the header file here when glr.cc does.
8599 * src/files.c (file_names, file_names_count): New static globals.
8600 (compute_output_file_names): Invoke output_file_name_check for files
8601 not generated by the skeletons and remove existing checks.
8602 (output_file_name_check): New function that warns about conflicting
8603 output file names.
8604 (output_file_names_free): Free file_names.
8605 * src/files.h (output_file_name_check): Declare.
8606 * src/scan-skel.l: Invoke output_file_name_check for files generated by
8607 the skeletons.
8608 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
8609 (Conflicting output files): New tests.
8610
8611 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8612
8613 * doc/bison.texinfo: Fix a couple of typos.
8614
8615 2006-12-08 Bob Rossi <bob@brasko.net>
8616
8617 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
8618 Rename to...
8619 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
8620 update all uses.
8621 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
8622 (yypush_parse): Rename yypvars argument to yyps and remove redundant
8623 local pv.
8624 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
8625 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
8626
8627 2006-12-07 Bob Rossi <bob@brasko.net>
8628 and Joel Denny <jdenny@ces.clemson.edu>
8629
8630 * data/push.c (yypvarsinit): Change return type from void* to struct
8631 yypvars*. No longer cast to void* on return.
8632 (struct yypvars): Remove yylen since it need not be remembered between
8633 yypushparse invocations.
8634 (yypushparse): Don't copy between yylen and pv->yylen.
8635
8636 2006-12-05 Bob Rossi <bob@brasko.net>
8637
8638 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
8639 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
8640 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
8641 (struct yypvars): Remove b4_declare_parser_variables.
8642 (yypvarsinit): Remove init code for removed variables.
8643 (global scope): Do not declare b4_declare_parser_variables if
8644 push or pure mode.
8645 (yypushparse): Add b4_declare_parser_variables.
8646 Init new local variables, and remove init code for removed
8647 yypvars variables.
8648 (yyparse): Delete.
8649 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
8650 and yyparse for other modes.
8651 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
8652 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
8653 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
8654 (AT_PURE_LEX_IF): True if pure or push parser.
8655
8656 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
8657
8658 Document Yacc prologue alternatives and default %destructor's and
8659 %printer's as experimental. Don't mention Java yet. Discussed at
8660 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
8661 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
8662 (2.3a): Annotate this entry to say the old forms of these features were
8663 also experimental.
8664 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
8665 Table of Symbols): Say they're experimental. Comment out any mention
8666 of Java (we'll want this back eventually).
8667
8668 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
8669
8670 Support a file name argument to %defines. Deprecate `=' in
8671 %file-prefix, %name-prefix, and %output. Discussed at
8672 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
8673 * NEWS (2.3a+): Mention.
8674 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
8675 form of %defines, and remove `=' from entries for %file-prefix,
8676 %name-prefix, and %output.
8677 * src/parse-gram.y (prologue_declaration): Implement.
8678 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
8679 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
8680 all but one occurrence of %name-prefix.
8681 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
8682 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
8683 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
8684 occurrence of each of %file-prefix and %output. Add check for %defines
8685 with argument.
8686 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
8687 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
8688 Remove the `=' from %output.
8689
8690 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
8691
8692 Don't escape $ in test case titles since Autoconf 2.61 now does that
8693 correctly.
8694 * tests/actions.at (Default %printer and %destructor are not for error
8695 or $undefined): Here.
8696 (Default %printer and %destructor are not for $accept): Here.
8697 * tests/input.at (Invalid $n and @n): Here.
8698
8699 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
8700
8701 Rename <!> to <>. Discussed starting at
8702 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
8703 * NEWS (2.3a+): Update.
8704 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
8705 Update.
8706 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
8707 * src/scan-gram.l (INITIAL): Implement.
8708 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
8709 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
8710 comment.
8711 * tests/actions.at (Default tagless %printer and %destructor,
8712 Default tagged and per-type %printer and %destructor,
8713 Default %printer and %destructor are not for error or $undefined,
8714 Default %printer and %destructor are not for $accept,
8715 Default %printer and %destructor for mid-rule values): Update.
8716 * tests/input.at (Default %printer and %destructor redeclared,
8717 Unused values with default %destructor): Update.
8718
8719 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
8720
8721 Don't let %prec take a nonterminal.
8722 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
8723 token.
8724 * tests/input.at (%prec takes a token): New test checking that %prec
8725 won't take a nonterminal.
8726
8727 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8728
8729 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
8730 it was double-quoted.
8731 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
8732 grammar is maintained with Bison's highest standards.
8733 * src/getargs.c: Fix some typos in Doxygen comments.
8734
8735 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8736
8737 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
8738 later. Reported by Paul Eggert in
8739 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
8740 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
8741 * src/scan-code.l (translate_action): Don't bother invoking
8742 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
8743 (code_scanner_free): Instead of invoking
8744 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
8745 which frees more.
8746 * src/scan-gram.l (gram_scanner_free): Likewise.
8747 * src/scan-skel.l (scan_skel): Likewise.
8748
8749 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
8750
8751 * src/files.c (tr): Change return type to void.
8752 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
8753 has been called previously for the same key.
8754 (muscle_find): Return storage instead of value so that
8755 --enable-gcc-warnings doesn't produce warnings that the return discards
8756 const. aver that the value and storage are the same since storage
8757 could potentially be NULL when value is not.
8758 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
8759 same as 0.
8760
8761 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8762
8763 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
8764 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
8765 us a slightly cleaner distribution, and also works.
8766 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
8767 gnulib changes.
8768
8769 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
8770 and Paul Eggert <eggert@cs.ucla.edu>
8771
8772 Don't let Bison leak memory except when it complains.
8773 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
8774 (spec_defines_file, dir_prefix): Now char *, not const char *,
8775 since they are freed.
8776 * src/files.c: Likewise.
8777 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
8778 Likewise.
8779 (tr): Now operates in-place. All uses changed.
8780 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
8781 values.
8782 (compute_file_name_parts, compute_output_file_names): Don't store
8783 read-only data in variables that will be freed.
8784 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
8785 src_extension, and header_extension.
8786 (output_file_names_free): New public function to free
8787 spec_verbose_file, spec_graph_file, spec_defines_file,
8788 parser_file_name, and dir_prefix.
8789 * src/getargs.c (getargs): Don't store read-only data in variables that
8790 will be freed.
8791 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
8792 (which previously existed but was unused), and quotearg_free.
8793 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
8794 * src/muscle_tab.c: Likewise.
8795 (muscle_entry): Make the value char const *,
8796 and add a new storage member that is char * and can be freed.
8797 (muscle_entry_free): New private function.
8798 (muscle_init): Use it instead of free.
8799 (muscle_insert, muscle_grow): Update and use new storage member.
8800 (muscle_code_grow): Free the string passed to muscle_grow
8801 since it's not needed anymore.
8802 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
8803 add a new `char *code' member.
8804 ("{...}"): Declare semantic type as code.
8805 * src/scan-code.h (translate_rule_action):
8806 (translate_symbol_action, translate_code, translate_action): Return
8807 `char const *' rather than `char *' since external code should not free
8808 these strings.
8809 * src/scan-code.l: Likewise.
8810 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
8811 which is "{...}" in the parser.
8812 * tests/Makefile.am (maintainer-check-valgrind): Set
8813 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
8814 Valgrind.
8815 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
8816 complain.
8817 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
8818 expecting a non-zero exit status sets --leak-check=summary and
8819 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
8820 this case, and we don't want to hear about it.
8821
8822 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8823
8824 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
8825 instead of from the template, to simplify configuration a bit.
8826 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
8827 and m4/wint_t.m4, as they are needed with the latest gnulib.
8828
8829 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8830
8831 Disable unset/unused mid-rule value warnings by default, and recognize
8832 --warnings=midrule-values to enable them. Discussed starting at
8833 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
8834 * NEWS (2.3a+): Mention.
8835 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
8836 warnings): Add entry for midrule-values subargument.
8837 * src/reader.c (symbol_should_be_used): Don't return true just because
8838 the value is a set/used mid-rule value unless
8839 --warnings=midrule-values was specified.
8840 * tests/input.at (Unused values, Unused values before symbol
8841 declarations): Run tests with and without --warnings=midrule-values.
8842
8843 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
8844 than LIST_FREE directly.
8845
8846 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8847
8848 Finish implementing --warnings=error, which should not be implied by
8849 --warnings=all (or by its synonyms -W and --warnings without
8850 subarguments).
8851 * src/complain.c (set_warning_issued): New function to report that
8852 warnings are being treated as errors and to record an error if so.
8853 Invoke...
8854 (warn_at, warn): ... here.
8855 * src/getargs.c (warnings_args, warnings_types): Reorder so that
8856 "error - warnings are errors" does not appear above "all - all of the
8857 above".
8858 (getargs): For -W and --warnings without subarguments, don't let
8859 FLAGS_ARGMATCH set warnings_error in warnings_flag.
8860 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
8861
8862 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8863
8864 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
8865 empty subargument list. For example: `bison --warnings= parser.y'.
8866
8867 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8868
8869 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
8870 the parser header file so that gcc doesn't warn.
8871
8872 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8873
8874 Split the default %destructor/%printer into two kinds: <*> and <!>.
8875 Discussed starting at
8876 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
8877 * NEWS (2.3a+): Mention.
8878 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
8879 previous change today related to mid-rules.
8880 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
8881 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
8882 (TYPE_TAG_ANY): Add as <*>.
8883 (TYPE_TAG_NONE): Add as <!>.
8884 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
8885 for <*> and <!>.
8886 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
8887 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
8888 * src/symlist.c (symbol_list_default_new): Split into tagged and
8889 tagless versions.
8890 (symbol_list_destructor_set, symbol_list_printer_set): Split
8891 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
8892 SYMLIST_DEFAULT_TAGLESS.
8893 * src/symlist.h: Update symbol_list_default*_new prototypes.
8894 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
8895 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
8896 * src/symtab.c (default_destructor, default_destructor_location,
8897 default_printer, default_printer_location): Split each into tagged and
8898 tagless versions.
8899 (symbol_destructor_get, symbol_destructor_location_get,
8900 symbol_printer_get, symbol_printer_location_get): Implement tagged
8901 default and tagless default cases.
8902 (default_destructor_set, default_printer_set): Split each into tagged
8903 and tagless versions.
8904 * src/symtab.h: Update prototypes.
8905 * tests/actions.at (Default %printer and %destructor): Rename to...
8906 (Default tagless %printer and %destructor): ... this, and extend.
8907 (Per-type %printer and %destructor): Rename to...
8908 (Default tagged and per-type %printer and %destructor): ... this, and
8909 extend.
8910 (Default %printer and %destructor for user-defined end token): Extend.
8911 (Default %printer and %destructor are not for error or $undefined):
8912 Update.
8913 (Default %printer and %destructor are not for $accept): Update.
8914 (Default %printer and %destructor for mid-rule values): Extend.
8915 * tests/input.at (Default %printer and %destructor redeclared): Extend.
8916 (Unused values with default %destructor): Extend.
8917
8918 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8919
8920 Don't apply the default %destructor/%printer to an unreferenced midrule
8921 value. Mentioned at
8922 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
8923 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
8924 like $@n instead of just @n so that the default %destructor/%printer
8925 logic doesn't see them as user-defined symbols.
8926 (symbol_is_dummy): Check for both forms of the name.
8927 * src/reader.c (packgram): Remove the `$' from each midrule symbol
8928 name for which the midrule value is referenced in any action.
8929 * tests/actions.at (Default %printer and %destructor for mid-rule
8930 values): New test.
8931 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
8932 for change to dummy symbol names.
8933
8934 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8935
8936 Warn about unset midrule $$ if the corresponding $n is used.
8937 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
8938 $n usage.
8939 (packgram): Before invoking grammar_rule_check on any rule, make sure
8940 all actions have already been scanned in order to set `used' flags.
8941 Otherwise, checking that a midrule's $$ is set will not always work
8942 properly because the midrule check must forward-reference the midrule's
8943 parent rule.
8944 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
8945 warning.
8946
8947 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8948
8949 More improvements to the documentation of the prologue alternatives:
8950 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
8951 Bison manual.
8952 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
8953 some text to clarify the relative importance of the new directives and
8954 to show how these directives may be viewed as code labels.
8955
8956 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
8957
8958 Similar to the recently removed %before-header, add %code-top as the
8959 alternative to the pre-prologue. Mentioned at
8960 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
8961 Also, let the prologue alternatives appear in the grammar section.
8962 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
8963 (prologue_declaration): Move the existing prologue alternatives to...
8964 (grammar_declaration): ... here and add %code-top.
8965 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
8966
8967 Clean up and extend documentation for the prologue alternatives.
8968 * NEWS (2.3a+): Describe prologue alternatives.
8969 * doc/bison.texinfo (Prologue): Move discussion of prologue
8970 alternatives to...
8971 (Prologue Alternatives): ... this new section, and extend it to discuss
8972 all 4 directives in detail.
8973 (Table of Symbols): Clean up discussion of prologue alternatives and
8974 add %code-top.
8975
8976 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8977
8978 DJGPP specific issues.
8979
8980 * djgpp/config.bat: config.hin has been moved to lib. Adjust
8981 config.bat accordingly.
8982 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
8983 * djgpp/config.site: Likewise.
8984
8985 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
8986
8987 Replace %*-header with %provides, %requires, %code. See discussion at
8988 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
8989
8990 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
8991 (b4_user_start_header): Remove.
8992 * data/glr.c: Use new macros instead of b4_*start_header
8993 and b4_*end_header.
8994 * data/glr.cc: Likewise.
8995 * data/lalr1.cc: Likewise.
8996 * data/push.c: Likewise.
8997 * data/yacc.c: Likewise.
8998
8999 * doc/bison.texinfo: Remove %before-header, rename
9000 %{start,end,after}-header to %requires, %provides, %code.
9001
9002 * src/parse-gram.y: Likewise (also rename token names accordingly).
9003 * src/scan-gram.l: Likewise.
9004 * tests/actions.at: Likewise.
9005
9006 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
9007
9008 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
9009 Problem reported by Joel E. Denny.
9010
9011 2006-10-14 Jim Meyering <jim@meyering.net>
9012
9013 (Sync from coreutils.)
9014 Work also when the working directory (with e.g. coreutils sources)
9015 is version controlled with git, rather than CVS.
9016 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
9017 rather than CVS.
9018 In messages and comments, say e.g., "checked-out sources",
9019 rather than "CVS sources".
9020 (version_controlled_file): New function. Work for git as well as
9021 for CVS. Don't use grep's -q option.
9022 (slurp): Call it here, in place of CVS-specific code.
9023
9024 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
9025
9026 Fix testsuite for ./configure --enable-gcc-warnings:
9027 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
9028 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
9029 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
9030 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
9031 * test/regression.at (Diagnostic that expects two alternatives):
9032 Likewise.
9033
9034 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
9035
9036 * bootstrap.conf (gnulib_modules): Add config-h.
9037 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
9038 worry about HAVE_CONFIG_H.
9039 * lib/abitset.c: Likewise.
9040 * lib/bitset.c: Likewise.
9041 * lib/bitset_stats.c: Likewise.
9042 * lib/bitsetv-print.c: Likewise.
9043 * lib/bitsetv.c: Likewise.
9044 * lib/ebitset.c: Likewise.
9045 * lib/get-errno.c: Likewise.
9046 * lib/lbitset.c: Likewise.
9047 * lib/subpipe.c: Likewise.
9048 * lib/timevar.c: Likewise.
9049 * lib/vbitset.c: Likewise.
9050 * lib/bitset.c: Include "bitset.h" first, to test interface.
9051 * lib/bitset_stats.c: Include "bitset_stats.h" first.
9052 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
9053 * lib/bitsetv.c: Include "bitsetv.h" first.
9054 * lib/get-errno.c: Include "get-errno.h" first.
9055 * m4/.cvsignore: Add config-h.m4.
9056 * tests/actions.at (Default %printer and %destructor for ...):
9057 Adjust expected line numbers in output to reflect removal of #if
9058 HAVE_CONFIG_H lines.
9059 * tests/glr-regression.at (Missed %merge type warnings when ...):
9060 Likewise.
9061 * tests/regression.at (Braced code in declaration in rules section):
9062 Likewise.
9063 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
9064 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
9065 Include <config.h> unconditionally.
9066
9067 * bootstrap: Sync from coreutils, as follows:
9068
9069 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
9070
9071 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
9072 variable was sometimes used without being initialized. This
9073 messed up the installation of the INSTALL file in some cases.
9074
9075 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
9076
9077 * bootstrap (usage, main program, symlink_to_gnulib): Add option
9078 --copy. Inspired by a suggestion from Bruno Haible.
9079
9080 2006-10-03 Jim Meyering <jim@meyering.net>
9081
9082 * bootstrap: Undo last change to this file, since now gnulib-tool
9083 sticks with the automake default in generating dependencies.
9084
9085 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
9086
9087 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
9088 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
9089
9090 * doc/bison.1: Add copyright notice.
9091
9092 * data/glr.c: Don't include <stdarg.h>; not used.
9093
9094 * NEWS: The -g and --graph options now output graphs in Graphviz
9095 DOT format, not VCG format.
9096 * doc/bison.1: Likewise.
9097 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
9098 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
9099 of this change in
9100 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
9101 * TODO: Remove Graphviz entry.
9102 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
9103 remove vcg.c, vcg.h, vcg_defaults.h.
9104 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
9105 * src/graphviz.c, src/graphviz.h: New files.
9106 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
9107 * src/files.h: Make comment more generic.
9108 * src/main.c (main): Likewise.
9109 * src/print_graph.h: Likewise.
9110 * src/getargs.c (usage): Make usage description more generic.
9111 * src/print_graph.c: Include graphviz.h rather than vcg.h.
9112 (static_graph, fgraph): Remove. All uses changed to pass
9113 arguments instead of sharing a static var.
9114 (print_core, print_actions, print_state, print_graph):
9115 Output graphviz format rather than VCG format.
9116 * tests/.cvsignore: Remove *.vcg; add *.dot.
9117 * tests/output.at: Expect *.dot files, not *.vcg files.
9118
9119 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
9120 accommodates the 2006-10-08 change.
9121
9122 2006-10-11 Bob Rossi <bob@brasko.net>
9123
9124 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
9125 (b4_yyssa, b4_yyerror_range): New macros.
9126 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
9127 (yypvarsinit): Remove init of removed fields.
9128 (yypushparse): Remove use of removed fields; use new macros instead.
9129
9130 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
9131
9132 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
9133 in a push parser. Reindent slightly to match yacc.c better.
9134
9135 2006-10-11 Bob Rossi <bob@brasko.net>
9136
9137 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
9138 yymsg_alloc fields.
9139 (yypvarsinit, yypushparse): Remove init of removed fields.
9140 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
9141
9142 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
9143
9144 * THANKS: Add Paolo Bonzini and Bob Rossi.
9145
9146 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
9147
9148 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
9149 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
9150 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
9151 b4_define_user_cde and uses): Remove.
9152 (b4_comment, b4_prefix, b4_sync_start): New.
9153 * data/bison.m4: New file, with most of the content removed from c.m4.
9154 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
9155 * src/output.c (output_skeleton): Pass bison.m4.
9156 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
9157 only if specified.
9158
9159 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
9160
9161 Fix test failure reported by Tom Lane in
9162 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
9163 and try to make such failures easier to catch in the future.
9164 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
9165 that's now the caller's responsibility.
9166 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
9167 Set yychar = YYEOF if it's negative.
9168 * tests/actions.at (yylex): Abort if asked to read past EOF.
9169 * tests/conflicts.at (yylex): Likewise.
9170 * tests/cxx-type.at (yylex): Likewise.
9171 * tests/glr-regression.at (yylex): Likewise.
9172 * tests/input.at (yylex): Likewise.
9173 * tests/regression.at (yylex): Likewise.
9174 * tests/torture.at (yylex): Likewise.
9175
9176 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
9177
9178 Fix problems with translating English-language diagnostics.
9179 * bootstrap: Fix bug introduced in recent bootstrap changes, with
9180 respect to bison-runtime pot generation. The YY_ stuff
9181 wasn't being captured.
9182 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
9183 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
9184 * runtime-po/POTFILES.in: Add data/push.c.
9185
9186 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
9187
9188 Merge bootstrap changes from coreutils.
9189
9190 2006-09-28 Jim Meyering <jim@meyering.net>
9191
9192 Automatically generated dependencies are important even
9193 when all of the sources in a directory come from gnulib.
9194 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
9195 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
9196
9197 2006-09-23 Jim Meyering <jim@meyering.net>
9198
9199 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
9200
9201 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9202
9203 * bootstrap: Add support for --force.
9204 (usage): New function. Describe usage less tersely.
9205 (CVS_only_file): New var.
9206
9207 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
9208
9209 * data/push.c (YYPUSH_MORE): Make it an enum instead.
9210 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
9211 Adjust white space and comments to match GNU style better.
9212
9213 2006-09-20 Bob Rossi <bob@brasko.net>
9214
9215 * data/push.c (yyresult_get): Remove function.
9216 (YYPUSH_MORE): Add #define.
9217 (yypushparse): Modify return value.
9218
9219 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9220
9221 * stamp-h.in: Remove; no longer needed.
9222 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
9223 Remove config.h, config.hin, intl (no longer created).
9224 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
9225 stamp-h1.
9226
9227 Sync bootstrap from coreutils, as follows:
9228
9229 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
9230
9231 * bootstrap (symlink_to_gnulib): New function.
9232 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
9233 to copies-of-gnulib.
9234 (cp_mark_as_generated, slurp, gnulib_files):
9235 Avoid making a copy if it's the same as the old version.
9236 (gnulib_files): Add support for this variable (used by Bison).
9237
9238 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9239
9240 * src/getargs.c (usage): Rework to use conventions similar to
9241 coreutils, to make translation a bit easier and the code a bit
9242 smaller. Problem reported by Tim Van Holder.
9243
9244 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
9245
9246 Use some of gnulib's new modules, taken from coreutils.
9247
9248 * bootstrap: Sync from coreutils, except add support for gnulib_files.
9249 * bootstrap.conf: New file.
9250 (gnulib_modules): Add configmake, inttypes, unistd.
9251 (XGETTEXT_OPTIONS): Add complain, complain_at,
9252 fatal, fatal_at, warn, warn_at, unexpected_end.
9253 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
9254 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
9255 (gl_EARLY): Add.
9256 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
9257 (gl_INIT): Add
9258 (GNULIB_AUTOCONF_SNIPPET): Remove.
9259 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
9260 the pickiest.
9261 * lib/.cvsignore: Add inttypes_.h.
9262 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
9263 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
9264 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
9265 no-longer-necessary initializations.
9266 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
9267 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
9268 use the unistd module.
9269 * src/system.h: Likewise.
9270 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
9271 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
9272 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
9273 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
9274 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
9275 * src/system.h: Include inttypes.h unconditionally, now that we
9276 use the inttypes module. Don't bother to include stdint.h, since
9277 inttypes.h now does that for us.
9278 (LOCALEDIR): Remove, now that we use the configmake module.
9279 * src/getargs.c: Include configmake.h.
9280 * src/main.c: Likewise.
9281 * src/output.c: Likewise.
9282 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
9283 not from $abs_top_builddir, since config.h moved.
9284
9285
9286 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
9287 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
9288
9289 * src/parse-gram.y (symbol_declaration): Don't put statements
9290 before declarations; it's not portable to C89.
9291 * src/scan-code.l (handle_action_at): Likewise.
9292
9293 * src/scan-code.l: Always initialize braces_level; the old code
9294 left it uninitialized and therefore had undefined behavior.
9295
9296 Don't attempt to redefine 'assert', since it runs afoul of
9297 systems where standard headers (mistakenly) include <assert.h>.
9298 Instead, define and use our own alternative, called 'aver'.
9299 * src/reader.c: Don't include assert.h, since we no longer
9300 use assert.
9301 * src/scan-code.l: Likewise.
9302 * src/system.h (assert): Remove, replacing with....
9303 (aver): New function, taking a bool arg. All uses changed.
9304 * src/tables.c (pack_vector): Ensure that aver arg is bool,
9305 not merely an integer.
9306
9307 2006-09-15 Bob Rossi <bob@brasko.net>
9308
9309 Add support for push parsing. Based on the original work of
9310 Odd Arild Olsen <oao@fibula.no>.
9311 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
9312 * data/c.m4 (YYPUSH): New.
9313 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
9314 * data/push.c: New file.
9315 * src/getargs.c (push_parser): New var.
9316 * src/getargs.h (push_parser): New declaration.
9317 * src/output.c (prepare): Add macro insertion of `push_flag'.
9318 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
9319 (prologue_declaration): Parse %push-parser.
9320 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
9321 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
9322 list of removed lines from the traces observed.
9323 (AT_CHECK_CALC_LALR): Added push parser tests.
9324
9325 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
9326
9327 * NEWS: Version 2.3a.
9328 * configure.ac (AC_INIT): Likewise.
9329
9330 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
9331 "#define YYSTYPE int" that caused "make maintainer-check" to fail
9332 due to header ordering dependencies. I don't know why the #define
9333 was there.
9334
9335 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
9336 runtime cost when YYDEBUG is not defined, and so that some tests
9337 that used to fail now work. Problem and initial suggestion by
9338 Paolo Bonzini.
9339 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
9340 * data/glr.cc (b4_parser_class_name):
9341 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
9342 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
9343 (yydebug_) [YYDEBUG]: New member.
9344 (yycdebug_): Now defined only if YYDEBUG.
9345 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
9346 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
9347 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
9348 if YYYDEBUG.
9349 (debug_stream, set_debug_stream, debug_level, set_debug_level):
9350 Define only if YYDEBUG.
9351 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
9352 set_debug_level.
9353 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
9354 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
9355 AT_CHECK_CALC_GLR_CC that are working now.
9356
9357 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
9358
9359 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
9360 We don't need them in glr.cc, and glr.c defines them.
9361 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
9362 assumes that defining it to anything is the same as defining
9363 it to 1. Problem reported by Paolo Bonzini.
9364
9365 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
9366
9367 * data/c.m4 (b4_null, b4_case): Define.
9368 * src/output.c (prepare_symbols): Use b4_null.
9369 (user_actions_output): Use b4_case.
9370
9371 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
9372
9373 * data/glr.c (b4_shared_declarations): Put start-header first,
9374 before any #includes that we generate, so that feature-test
9375 macros work. Problem reported by Michael Deutschmann in
9376 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
9377 * data/lalr1.cc: Likewise.
9378 * doc/bison.texinfo (Prologue): Document that feature-test macros
9379 should be defined before any Bison declarations.
9380 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
9381 that depend on location.hh after, not before, Bison decls, since
9382 we now include location.hh after the first user prologue.
9383
9384 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
9385 Sander Brandenburg in
9386 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
9387 Also, fix minor white space and comment issues.
9388 (Prologue): Mention that it's better to define feature-test macros
9389 before Bison declarations. Problem reported by Michael Deutschmann.
9390
9391 * README-cvs: Fix typo: "&" should be "&&". Problem reported
9392 by Jim Meyering.
9393 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
9394 This adjusts to recent gnulib changes.
9395
9396 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9397
9398 Finish implementation of per-type %destructor/%printer. Discussed
9399 starting at
9400 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
9401 and
9402 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
9403 * NEWS (2.3+): Add a description of this feature to the default
9404 %destructor/%printer description.
9405 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
9406 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
9407 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
9408 list node contains a semantic type.
9409 * src/symtab.c, src/symtab.h: Extend with a table that associates
9410 semantic types with their %destructor's and %printer's.
9411 (semantic_type_from_uniqstr, semantic_type_get,
9412 semantic_type_destructor_set, semantic_type_printer_set): New functions
9413 composing the public interface of that table.
9414 (symbol_destructor_get, symbol_destructor_location_get,
9415 symbol_printer_get, symbol_printer_location_get): If there's no
9416 per-symbol %destructor/%printer, look up the per-type before trying
9417 the default.
9418 * tests/actions.at (Per-type %printer and %destructor): New test case.
9419 * tests/input.at (Default %printer and %destructor redeclared):
9420 Extend to check that multiple occurrences of %symbol-default in a
9421 single %destructor/%printer declaration is an error.
9422 (Per-type %printer and %destructor redeclared, Unused values with
9423 per-type %destructor): New test cases.
9424
9425 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9426
9427 Require default %destructor/%printer to be declared using
9428 %symbol-default instead of an empty symbol list, and start working on
9429 new per-type %destructor/%printer. Discussed at
9430 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
9431 * NEWS (2.3+): Add %symbol-default to example.
9432 * bison.texinfo (Freeing Discarded Symbols): Likewise.
9433 (Table of Symbols): Add entry for %symbol-default.
9434 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
9435 (generic_symlist, generic_symlist_item): New nonterminals for creating
9436 a list in which each item is a symbol, semantic type, or
9437 %symbol-default.
9438 (grammar_declaration): Use generic_symlist in %destructor and %printer
9439 declarations instead of symbols.1 or an empty list.
9440 (symbol_declaration, precedence_declaration, symbols.1): Update actions
9441 for changes to symbol_list.
9442 * src/reader.c: Update for changes to symbol_list.
9443 * src/scan-code.l: Likewise.
9444 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
9445 * src/symlist.c, src/symlist.h: Extend such that a list node may
9446 represent a semantic type or a %symbol-default in addition to just an
9447 ordinary symbol. Add switched functions for setting %destructor's and
9448 %printer's.
9449 * tests/actions.at, tests/input.at: Add %symbol-default to all default
9450 %destructor/%printer declarations.
9451
9452 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
9453
9454 Whether the default %destructor/%printer applies to a particular symbol
9455 isn't a question of whether the user *declares* that symbol (in %token,
9456 for example). It's a question of whether the user by any means
9457 *defines* the symbol at all (by simply using a char token, for
9458 example). $end is defined by Bison whereas any other token with token
9459 number 0 is defined by the user. The error token is always defined by
9460 Bison regardless of whether the user declares it with %token, but we
9461 may one day let the user define error as a nonterminal instead.
9462 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
9463 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
9464 the meaning of "user-defined".
9465 * tests/actions.at (Default %printer and %destructor for user-declared
9466 end token): Rename to...
9467 (Default %printer and %destructor for user-defined end token): ...
9468 this.
9469
9470 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
9471 computation of whether to apply the default, don't maintain a list of
9472 every Bison-defined symbol. Instead, just check for a first character
9473 of '$', which a user symbol cannot have, and check for the error token.
9474
9475 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
9476
9477 Don't apply the default %destructor or %printer to the error token,
9478 $undefined, or $accept. This change fits the general rule that the
9479 default %destructor and %printer are only for user-declared symbols,
9480 and it solves several difficulties that are described in the new test
9481 cases listed below.
9482 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
9483 * tests/actions.at (Default %printer and %destructor are not for error
9484 or $undefined, Default %printer and %destructor are not for $accept):
9485 New test cases.
9486
9487 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
9488
9489 Allow %start after the first rule.
9490 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
9491 when parsing the first rule.
9492 (check_and_convert_grammar): Search for it here after all grammar
9493 declarations have been parsed. Skip midrules, which have dummy LHS
9494 nonterminals.
9495 * src/symtab.c (symbol_is_dummy): New function.
9496 * src/symtab.h (symbol_is_dummy): Declare it.
9497 * tests/input.at (%start after first rule): New test.
9498
9499 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9500
9501 Redo some of the previous commit: add back the ability to use
9502 non-aliased/undeclared string literals since it might be useful to
9503 those declaring %token-table.
9504 * src/reader.c (check_and_convert_grammar): Undo changes in previous
9505 commit: don't worry about complaints from symbols_pack.
9506 * src/symtab.c (symbol_new, symbol_class_set,
9507 symbol_check_alias_consistency): Undo changes in previous commit: count
9508 each string literal as a new symbol and token, assign it a symbol
9509 number, and don't complain about non-aliased string literals.
9510 (symbols_pack): Since symbol_make_alias still does not decrement symbol
9511 and token counts but does still set aliased tokens to the same number,
9512 symbol_pack_processor now leaves empty slots in the symbols array.
9513 Remove those slots.
9514 * tests/regression.at (Undeclared string literal): Remove test case
9515 added in previous commit since non-aliased string literals are allowed
9516 again.
9517 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
9518 remove unnecessary string literal declarations.
9519 * tests/sets.at (Firsts): Likewise.
9520
9521 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9522
9523 Don't allow an undeclared string literal, but allow a string literal to
9524 be used before its declaration.
9525 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
9526 symbols_pack complained.
9527 * src/symtab.c (symbol_new): Don't count a string literal as a new
9528 symbol.
9529 (symbol_class_set): Don't count a string literal as a new token, and
9530 don't assign it a symbol number since symbol_make_alias does that.
9531 (symbol_make_alias): It's not necessary to decrement the symbol and
9532 token counts anymore. Don't assume that an alias declaration occurs
9533 before any uses of the identifier or string, and thus don't assert that
9534 one of them has the highest symbol number so far.
9535 (symbol_check_alias_consistency): Complain if there's a string literal
9536 that wasn't declared as an alias.
9537 (symbols_pack): Bail if symbol_check_alias_consistency failed since
9538 symbol_pack asserts that every token has been assigned a symbol number
9539 although undeclared string literals have not.
9540 * tests/regression.at (String alias declared after use, Undeclared
9541 string literal): New test cases.
9542 (Characters Escapes, Web2c Actions): Declare string literals as
9543 aliases.
9544 * tests/sets.at (Firsts): Likewise.
9545
9546 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
9547
9548 In the grammar scanner, STRING_FINISH unclosed constructs and return
9549 them to the parser in order to improve error messages.
9550 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
9551 SC_BRACED_CODE, SC_PROLOGUE): Implement.
9552 * tests/input.at (Unclosed constructs): New test case.
9553 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
9554 seen.
9555
9556 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
9557 unused global.
9558
9559 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
9560
9561 Handle string aliases for character tokens correctly.
9562 * src/symtab.c (symbol_user_token_number_set): If the token has an
9563 alias, check and set its alias's user token number instead of its own,
9564 which is set to indicate the alias. Previously, every occurrence of
9565 the character token in the grammar overwrote that alias indicator with
9566 the character code.
9567 * tests/input.at (String aliases for character tokens): New test.
9568
9569 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
9570
9571 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
9572
9573 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
9574
9575 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
9576 to prevent failures when building on older platforms.
9577 Check for autopoint failure.
9578 Set XGETTEXT_OPTIONS to values that check for C format strings,
9579 so that translators are warned about them (this also helps
9580 prevent core dumps).
9581
9582 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
9583 function, since it simplifies our code a bit.
9584
9585 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
9586 rather than -W, so we don't get bogus warnings about sign comparisons.
9587 Add -Wpointer-arith, since that warning is useful (it reports code
9588 that does not conform to C89 and that some compilers reject).
9589 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
9590 since it's no longer needed.
9591
9592 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
9593
9594 Clean up scanners a bit.
9595 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
9596 definitions so gcc won't warn when obstack_for_string is unused.
9597 * src/scan-code.l: config.h and system.h are already #include'd by
9598 scan-code-c.c, so get rid of them here.
9599 * src/scan-gram.l: Likewise.
9600 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
9601 definitions rather than duplicating the rest of it.
9602 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
9603
9604 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
9605
9606 Suppress signed/unsigned comparison warnings for yycheck.
9607 * data/c.m4 (b4_safest_int_type): New macro.
9608 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
9609 a signed int type, cast it to b4_safest_int_type first.
9610 * data/yacc.c: Likewise.
9611 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
9612 also overwritten.
9613
9614 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
9615
9616 * doc/bison.texinfo: Fix some typos.
9617
9618 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
9619
9620 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
9621 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
9622
9623 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
9624 the latest gnulib does this a different way.
9625 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
9626 translation was patched, so stop omitting it.
9627
9628 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9629
9630 Enable declaration of default %printer/%destructor. Make the parser
9631 use these for all user-declared grammar symbols for which the user does
9632 not declare a specific %printer/%destructor. Thus, the parser uses it
9633 for token 0 if the user declares it but not if Bison generates it as
9634 $end. Discussed starting at
9635 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
9636 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
9637 and
9638 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
9639 * NEWS (2.3+): Mention.
9640 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
9641 declare a %destructor for a mid-rule's semantic value. It's just
9642 impossible to declare one specific to it.
9643 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
9644 code. Describe default %destructor form.
9645 * src/parse-gram.y (grammar_declaration): Parse default
9646 %printer/%destructor declarations.
9647 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
9648 and symbol_destructor_location_get rather than accessing the destructor
9649 and destructor_location members of struct symbol.
9650 (symbol_printers_output): Likewise but for %printer's.
9651 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
9652 again.
9653 * src/symtab.c (default_destructor, default_destructor_location,
9654 default_printer, default_printer_location): New static global
9655 variables to record the default %destructor and %printer.
9656 (symbol_destructor_get, symbol_destructor_location_get,
9657 symbol_printer_get, symbol_printer_location_get): New functions to
9658 compute the appropriate %destructor and %printer for a symbol.
9659 (default_destructor_set, default_printer_set): New functions to set the
9660 default %destructor and %printer.
9661 * src/symtab.h: Prototype all those new functions.
9662 * tests/actions.at (Default %printer and %destructor): New test to
9663 check that the right %printer and %destructor are called, that they're
9664 not called for $end, and that $$ and @$ work correctly.
9665 (Default %printer and %destructor for user-declared end token): New
9666 test to check that the default %printer and %destructor are called for
9667 a user-declared end token.
9668 * tests/input.at (Default %printer and %destructor redeclared, Unused
9669 values with default %destructor): New tests to check related grammar
9670 warnings and errors.
9671
9672 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9673
9674 Clean up handling of %destructor for the end token (token 0).
9675 Discussed starting at
9676 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
9677 and
9678 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
9679
9680 Make the skeletons consistent in how they pop the end token and invoke
9681 its %destructor.
9682 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
9683 state, which has token number 0, since this would invoke the
9684 %destructor for the end token.
9685 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
9686 until after shifting the end token, or else it won't be popped.
9687 * data/yacc.c (yyparse): Likewise.
9688
9689 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
9690 it's the end token. Upon termination, destroy an unshifted lookahead
9691 even when it's the end token.
9692 * data/lalr1.cc (yy::parser::parse): Likewise.
9693 * data/yacc.c (yyparse): Likewise.
9694
9695 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
9696 value warnings for the end token when the user gives the end token a
9697 %destructor.
9698
9699 * tests/actions.at (Printers and Destructors): Test all the above.
9700
9701 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
9702
9703 Update to latest gnulib and gettext versions.
9704 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
9705 Add fopen-safer.
9706 (gnulib_files): Add m4/warning.m4. Don't worry about files
9707 overwritten by autopoint.
9708 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
9709 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
9710 rejects them.
9711 Don't use autoreconf; instead, invoke autopoint etc. by hand,
9712 so that we can remove the intl files at a better time.
9713 (intl_files_to_remove): Remove aclocal.m4, since it gets
9714 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
9715 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
9716 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
9717 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
9718 Remove datarootdir hack; no longer needed.
9719 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
9720 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
9721 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
9722 strdup.h.
9723 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
9724 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
9725
9726 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
9727
9728 * bootstrap: Adjust to today's change to gnulib-tool by invoking
9729 it with --assume-autoconf='latest-stable'.
9730
9731 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
9732
9733 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
9734 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
9735 YYSTYPE' and `{'.
9736 * src/muscle_tab.h (muscle_grow): Replace the header comments with
9737 those from muscle_tab.c since the old ones are misleading.
9738
9739 2006-07-13 Akim Demaille <akim@epita.fr>
9740
9741 Support %define "KEY" {VALUE}.
9742 * src/scan-code.h, src/scan-code.l (translate_action)
9743 (translate_rule_action, translate_symbol_action, translate_code):
9744 Return char *, not const char *.
9745 * src/parse-gram.y (declaration): Rename as...
9746 (prologue_declaration): this.
9747 (string_content): Remove this nonterminal, use STRING.
9748 (braceless, content, content.opt): New nonterminal.
9749 Use them.
9750 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
9751 as value.
9752 * src/scan-gram.l (getargs.h): Don't include it.
9753
9754 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
9755
9756 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
9757 rather than a for-loop that declares a local bool variable. This
9758 should work around a compatibility problem with a Cray x1e C++
9759 compiler reported by Hung Nguyen in
9760 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
9761 The for-loop was introduced in the 2004-11-17 change but I don't
9762 know why it was needed.
9763
9764 2006-07-12 Akim Demaille <akim@epita.fr>
9765
9766 * data/c.m4: Comment changes.
9767
9768 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
9769
9770 * src/complain.c (error_message, ERROR_MESSAGE): New.
9771 To factor...
9772 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
9773 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
9774
9775 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9776
9777 * NEWS: Instead of %union, you can define and use your own union type
9778 YYSTYPE if your grammar contains at least one <type> tag.
9779 Your YYSTYPE need not be a macro; it can be a typedef.
9780 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
9781 (Union Decl, Decl Summary): Document this.
9782 * data/glr.c (YYSTYPE): Implement this.
9783 * data/glr.cc (YYSTYPE): Likewise.
9784 * data/lalr1.cc (YYSTYPE): Likewise.
9785 * data/yacc.c (YYSTYPE): Likewise.
9786 * src/output.c (prepare): Output tag_seen_flag.
9787 * src/parse-gram.y (declaration, grammar_declaration):
9788 Use 'union_seen' rather than 'typed' to determine whether
9789 %union has been seen, since grammars can now be typed without
9790 %union.
9791 (symbol_declaration, type.opt, symbol_def):
9792 Keep track of whether a tag has been seen.
9793 * src/reader.c (union_seen, tag_seen): New vars.
9794 (typed): remove.
9795 * src/reader.h (union_seen, tag_seen, typed): Likewise.
9796 * src/scan-code.l (untyped_var_seen): New variable.
9797 (handle_action_dollar): Adjust to above changes.
9798 (handle_action_dollar, handle_action_at):
9799 Improve overflow checking for outlandish numbers.
9800 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
9801 avoid new diagnostics generated by above changes.
9802 * tests/regression.at (YYSTYPE typedef): Add test to check
9803 for type tags without %union.
9804
9805 * src/symlist.c (symbol_list_length): Return int, not unsigned
9806 int, since callers expect int. This may need to get revisited
9807 once we have proper integer overflow checking.
9808
9809 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
9810 object is now static.
9811
9812 * src/getargs.c (flags_argmatch): Return void, not int,
9813 to pacify ./configure --enable-gcc-warnings.
9814
9815 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
9816 since last_string is already defined to FLEX_PREFIX (last_string).
9817
9818 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9819
9820 Implement --warnings/-W.
9821 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
9822 replaced by...
9823 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
9824 Adjust callers.
9825 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
9826 (warnings_args, warnings_types): New.
9827 (getargs, short_options, long_options): Accept -W/--warnings.
9828 Sort the options by alphabetical order, upper case letter right
9829 before its lower case.
9830
9831 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
9832
9833 Change %merge result type clash warnings to errors. Discussed at
9834 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
9835 * src/reader.c (record_merge_function_type): Use complain_at.
9836 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9837 declared later): Update test case results.
9838
9839 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9840
9841 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
9842 to be in alphabetical order.
9843 (trace_args): Spelling fixes.
9844
9845 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9846
9847 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
9848 so they don't collide with user-defined macros.
9849 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
9850 this was never guaranteed, and now that we're using gnulib stdint,
9851 which defines int_fast16_t to long int, the problem is exposed.
9852
9853 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
9854
9855 * data/c.m4 (b4_basename): Simplify a bit, since we don't
9856 need the full POSIX semantics (and weren't implementing them
9857 anyway).
9858
9859 Adjust to Autoconf 2.60 and today's gnulib.
9860 * bootstrap (gnulib_modules): Add stdint.
9861 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
9862 no longer copies it.
9863 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
9864 since stdint needs the former and wcwidth (which is now required
9865 by mbswidth) needs the latter.
9866 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
9867 work around a compatibility glitch between gettext 0.14.6 and
9868 Autoconf 2.60.
9869 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
9870 Do not check for uintptr_t, since new stdint module does the right
9871 thing.
9872 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
9873 Add stdint.h, stdint_.h, wcwidth.h.
9874 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
9875 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
9876 stdint.m4, wchar_t.m4, wcwidth.m4.
9877 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
9878 usual order for ../lib/*.h files.
9879 (file_name_split): Use last_component, not base_name, to adjust
9880 to gnulib changes.
9881 * src/parse-gram.h: Include <strverscmp.h> in the usual order
9882 for ../lib/*.h files.
9883 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
9884 Define unconditionally, since we now assume the stdint module.
9885 * src/scan-skel.l: Include <dirname.h>.
9886 (BASE_QPUTS): Use last_component, not base_name.
9887 * src/system.h: Include <unlocked-io.h> in the usual order
9888 for ../lib/*.h files. Include <stdint.h> unconditionally,
9889 since we now use the stdint module.
9890 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
9891 HAVE_UINTPTR_T, since we now use the stdint module.
9892 (base_name): Remove decl, since files now include <dirname.h>
9893 to get the decl.
9894
9895 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9896
9897 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
9898 New, default to 1.
9899 * data/yacc.c, data/glr.c, data/location.cc: Use them.
9900 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
9901 default.
9902 * tests/calc.at: Adjust.
9903
9904 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9905
9906 * data/c.m4 (b4_basename): New.
9907 (b4_syncline): Also output the location of its invocation (from
9908 the skeleton).
9909 (b4_user_action, b4_define_user_action, b4_user_actions)
9910 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
9911 (b4_user_stype): New.
9912 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
9913
9914 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9915
9916 In the grammar file, the first column is 1 not 0 on the first line as
9917 on every other line.
9918 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
9919 * tests/input.at (Torturing the Scanner): Update output.
9920
9921 * src/scan-gram.l (scanner_cursor): Declare it static.
9922
9923 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9924
9925 In warnings, say "previous declaration" rather than "first
9926 declaration".
9927 * src/symtab.c (redeclaration): Do that here.
9928 * src/reader.c (record_merge_function_type): In the case of a result
9929 type clash, report the previous declaration rather than the very first
9930 one in the grammar file.
9931 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9932 declared later): Add a third declaration to check this behavior.
9933 * tests/input.at (Incompatible Aliases): Update output.
9934
9935 2006-06-27 Akim Demaille <akim@epita.fr>
9936
9937 * doc/Doxyfile.in: New.
9938 * doc/Makefile.am: Use it.
9939 * src/lalr.h, src/symtab.h: Initial doxygenation.
9940
9941 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9942
9943 Don't miss %merge result type warnings just because the LHS types are
9944 declared after the %merge. This continues the effort of the previous
9945 patch.
9946 * src/reader.c (get_merge_function): Don't set the merger type yet.
9947 (record_merge_function_type): New function for setting the merger type
9948 and checking for clashes.
9949 (grammar_current_rule_merge_set): Set the location of the %merge for
9950 the current rule.
9951 (packgram): Invoke record_merge_function_type for each rule now that
9952 all symbol type declarations have been parsed.
9953 * src/reader.h (merger_list.type_declaration_location): New member
9954 storing the location of the first %merge from which the type for this
9955 merging function was derived.
9956 * src/symlist.h (symbol_list.merger_declaration_location): New member
9957 storing the location of a rule's %merge, if any.
9958 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9959 declared later): New test to catch the error fixed by the above patch.
9960
9961 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9962
9963 Get action warnings (grammar_rule_check) right even when symbol
9964 declarations appear after the rules. Discussed at
9965 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
9966 and
9967 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
9968 Don't mistake the type of $$ in a midrule to be that of its parent
9969 rule's $$.
9970 * src/reader.c (grammar_current_rule_end): Don't invoke
9971 grammar_rule_check yet since not all symbol declarations may have been
9972 parsed yet.
9973 (grammar_midrule_action): Likewise.
9974 Don't record whether the midrule's $$ has been used yet since actions
9975 haven't been translated yet.
9976 Record the midrule's parent rule and its RHS index within the parent
9977 rule.
9978 (grammar_current_rule_action_append): Don't translate the action yet
9979 since not all symbol declarations may have been parsed yet and, thus,
9980 warnings about types for $$, $n, @$, and @n can't be reported yet.
9981 (packgram): Translate the action and invoke grammar_rule_check now that
9982 all symbol declarations have been parsed.
9983 * src/scan-code.l (handle_action_dollar): Now that this is invoked
9984 after parsing the entire grammar file, the symbol list here in the case
9985 of a midrule is actually the midrule's empty RHS, so reference its
9986 parent rule's RHS where necessary.
9987 On the other hand, now that you can already know it's a midrule, you
9988 aren't forced to think $$ has the same type as its parent rule's $$.
9989 (handle_action_at): In the case of a midrule, reference the parent rule
9990 where necessary.
9991 * src/symlist.c (symbol_list_new): Initialize new midrule-related
9992 members.
9993 (symbol_list_length): Now that this is invoked after all rules have
9994 been parsed, a NULL symbol (rather than a NULL symbol list node)
9995 terminates a rule. symbol_list_print already does this correctly.
9996 * src/symlist.h (symbol_list.midrule_parent_rule,
9997 symbol_list.midrule_parent_rhs_index): New members so that midrules can
9998 remember their relationships with their parents.
9999 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
10000 fixed by the above patch.
10001 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
10002 implementing...
10003 (Unused values): ... this old test case and...
10004 (Unused values before symbol declarations): ... this new test case.
10005 This one is the same as `Unused values' except that all symbol
10006 declarations appear after the rules in order to catch the rest of the
10007 errors fixed by the above patch.
10008
10009 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
10010
10011 More cleanup.
10012 * src/reader.c (current_rule): Declare it static since it's no longer
10013 used outside this file.
10014 (grammar_current_rule_action_append): Remove redundant arguments from
10015 translate_rule_action invocation.
10016 * src/reader.h (current_rule): Remove this unused extern.
10017 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
10018 * src/scan-code.l (translate_rule_action): Likewise.
10019
10020 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
10021
10022 Clean up yesterday's patch.
10023 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
10024 to...
10025 * src/reader.c (grammar_current_rule_action_append): ... here for
10026 consistency with grammar_current_rule_symbol_append.
10027 * tests/regression.at (Braced code in declaration in rules section):
10028 Make yyerror and yylex static as usual.
10029
10030 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
10031
10032 Fix bug that mistakes braced code in a declaration in the rules section
10033 to be a rule action. Mentioned at
10034 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
10035 * src/scan-gram.l: Move midrule action detection from the start of the
10036 scanning of any braced code to...
10037 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
10038 action. For readability, use $2 and @2 rather than the equivalent
10039 global variables.
10040 * tests/regression.at (Braced code in declaration in rules section):
10041 New test to catch the error fixed by the above patch.
10042
10043 Work on code readability some.
10044 * src/scan-code.l (current_rule): Get rid of this misleading and
10045 redundant declaration: it's actually extern'ed in reader.h.
10046 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
10047 translate_action): Add a rule argument and use it instead of the global
10048 current_rule.
10049 (translate_rule_action): This already receives current_rule through an
10050 argument, so pass it on to translate_action instead of assigning
10051 current_rule to current_rule.
10052 (translate_symbol_action, translate_code): Pass rule = NULL to
10053 translate_action.
10054
10055 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
10056
10057 Rename %before-definitions to %start-header and %after-definitions to
10058 %end-header. Don't use these declarations to separate pre-prologue
10059 blocks from post-prologue blocks. Add new order-independent
10060 declarations %before-header and %after-header as alternatives to the
10061 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
10062 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
10063 * NEWS (2.3+): Update for these changes.
10064 * data/glr.c (b4_before_definitions): Update to...
10065 (b4_start_header): ... this.
10066 (b4_after_definitions): Update to...
10067 (b4_end_header): ... this.
10068 * data/glr.cc: Likewise.
10069 * data/lalr1.cc: Likewise.
10070 * data/yacc.c: Likewise.
10071 * doc/bison.texinfo (The prologue): Update names, and replace remaining
10072 prologue blocks with %*-header declarations.
10073 (Calc++ Parser): Likewise.
10074 (Decl Summary): Update names.
10075 (Table of Symbols): Update description.
10076 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
10077 (PERCENT_END_HEADER): ... this.
10078 (PERCENT_BEFORE_DEFINITIONS): Update to...
10079 (PERCENT_START_HEADER): ... this.
10080 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
10081 (declaration): Update token names and m4 macro names.
10082 When parsing %end-header and %start-header, invoke translate_code
10083 before muscle_code_grow, and no longer set global booleans to remember
10084 whether these declarations have been seen.
10085 Parse new %after-header and %before-header.
10086 * src/reader.c (before_definitions, after_definitions): Remove.
10087 (prologue_augment): Accept a new bool argument to specify whether to
10088 augment the pre-prologue or post-prologue.
10089 * src/reader.h (before_definitions, after_definitions): Remove these
10090 extern's.
10091 (prologue_augment): Add new bool argument.
10092 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
10093 (PERCENT_END_HEADER): ... this.
10094 (PERCENT_BEFORE_DEFINITIONS): Update to...
10095 (PERCENT_START_HEADER): ... this.
10096 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
10097 * tests/actions.at (Printers and Destructors): Update names.
10098
10099 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
10100
10101 Add comparison operators for C++ location classes. Discussed at
10102 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
10103 * data/c++.m4 (b4_define_location_comparison): New boolean %define
10104 declaration indicating whether filename_type has an operator==. If
10105 filename_type is `std::string', it defaults to `1', `0' otherwise.
10106 * data/location.cc: Iff b4_define_location_comparison is `1', add
10107 operator== and operator!= for class position and for class location.
10108
10109 Some minor fixes.
10110 * src/scan-action.l: Remove unused file.
10111 * src/symtab.c (symbol_printer_set): Use printer_location not
10112 destructor_location.
10113 * src/symtab.h (struct symbol): Replace incorrect source comment for
10114 printer members.
10115 * tests/input.at (Incompatible Aliases): Update output with correct
10116 printer location.
10117
10118 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
10119
10120 Don't put the pre-prologue in the header file. For the yacc.c code
10121 file and the glr.c header and code files, move the pre-prologue before
10122 the token definitions. Add new %before-definitions and
10123 %after-definitions to declare code that will go in both the header file
10124 and code file. Discussed at
10125 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
10126 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
10127 and
10128 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
10129 * NEWS (2.3+): Describe these changes.
10130 * data/glr.c (b4_pre_prologue): Move from within to before...
10131 (b4_shared_declarations): ... this.
10132 Add new b4_before_definitions before b4_token_enums.
10133 Add new b4_after_definitions at the end.
10134 * data/glr.cc (b4_pre_prologue): Replace with...
10135 (b4_before_definitions): ... this in the header file.
10136 (b4_after_definitions): New near the end of the header file.
10137 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
10138 code file right before including the header file.
10139 (b4_before_definitions): New in the previous position of
10140 b4_pre_prologue in the header file.
10141 (b4_after_definitions): New near the end of the header file.
10142 * data/yacc.c: Clean up some m4 quoting especially in the header file.
10143 (b4_token_enums_defines): In the code file, move to right before
10144 YYSTYPE for consistency with the header file.
10145 (b4_before_definitions): New right before b4_token_enums_defines in
10146 both the header and code file.
10147 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
10148 header and code file.
10149 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
10150 of prologues for %union dependencies.
10151 (Decl Summary): In %defines description, mention the effect of
10152 %before-definitions and %after-definitions on the header file.
10153 (Calc++ Parser): Forward declare driver in a %before-definitions rather
10154 than in the pre-prologue so that make check succeeds.
10155 (Table of Symbols): Add entries for %before-definitions and
10156 %after-definitions.
10157 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
10158 %before-definitions.
10159 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
10160 (declaration): Parse those declarations and append to
10161 b4_before_definitions and b4_after_definitions, respectively.
10162 * src/reader.c (before_definitions, after_definitions): New bools to
10163 track whether those declarations have been seen.
10164 (prologue_augment): Add to the post-prologue if %union,
10165 %before-definitions, or %after-definitions has been seen.
10166 * src/reader.h (before_definitions, after_definitions): New extern's.
10167 * src/scan-gram.l: Scan the new declarations.
10168 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
10169 prologue block in a %before-definitions or a %after-definitions based
10170 on whether the %union is declared.
10171 * tests/regression.at (Early token definitions with --yacc, Early token
10172 definitions without --yacc): Move tests for token definitions into the
10173 post-prologue since token names are no longer defined in the
10174 pre-prologue.
10175
10176 2006-06-20 Akim Demaille <akim@epita.fr>
10177
10178 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
10179 (symbol_get): Use it.
10180 * src/parse-gram.y: Use it.
10181
10182 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
10183
10184 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
10185 build succeeds when configured with --enable-gcc-warnings.
10186
10187 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
10188
10189 * src/parse-gram.y (char_name): New function.
10190 (CHAR, STRING, string_content): For %printer, properly escape.
10191 (ID): Prefer fputs to fprintf.
10192 (id): Reindent to be consistent with other rules.
10193 Properly quote char.
10194
10195 The Translation Project changed its way of publishing translations
10196 to maintainers. I haven't received any responses to my request
10197 for supporting the old way, or for documenting the new way. I
10198 have modified 'bootstrap' to use screen scraping
10199 (in this case, HTML scraping). This is unreliable and inelegant,
10200 but I don't see any better way. Yuck.
10201 * bootstrap (TP_URL, WGET_COMMAND): New vars.
10202 (get_translations): New function, which uses HTML scraping to
10203 deduce locations of latest translations.
10204 Use this function to grab both bison and bison-runtime .po files.
10205 Don't bother priming the pump for the runtime-po domain any more,
10206 as it's now translated better than bison is.
10207
10208 2006-06-19 Akim Demaille <akim@epita.fr>
10209
10210 * src/scan-gram.l: No longer "parse" things after `%union' until
10211 `{'. Rather, return a single "%union" token.
10212 No longer make symbols: return strings, and leave the conversion
10213 to symbols to the parser.
10214 (SC_PRE_CODE, token_type): Remove.
10215 * src/parse-gram.y (%union): New field `character'.
10216 Sort tokens.
10217 (CHAR): New token.
10218 (ID, ID_COLON): Now that the scanner no longer makes them
10219 identifiers, adjust all uses to invoke symbol_get.
10220 (id_colon): New, wraps the conversion from string to symbol.
10221 (%union): Accept a possible union_name.
10222 (symbol): Now can be a char.
10223 * data/c.m4 (b4_union_name): Leave a default value.
10224 * data/glr.c, data/yacc.c: Use it.
10225
10226 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
10227
10228 For associating token numbers with token names for "yacc.c", don't use
10229 #define statements unless `--yacc' is specified; always use enum
10230 yytokentype. Most important discussions start at:
10231 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
10232 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
10233 and
10234 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
10235 * NEWS (2.3+): Mention.
10236 * data/c.m4 (b4_yacc_if): New.
10237 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
10238 token #define's.
10239 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
10240 on token name definitions.
10241 * src/getargs.c (usage): Capitalize `Yacc' in English.
10242 * src/output.c (prepare): Define b4_yacc_flag.
10243 * tests/regression.at (Early token definitions): Test that tokens names
10244 are defined before the pre-prologue not just before the post-prologue.
10245 Remove this test case and copy to...
10246 (Early token definitions with --yacc): ... this to test #define's.
10247 (Early token definitions without --yacc): ... and this to test enums.
10248
10249 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
10250
10251 * NEWS: Reword the post-2.3 change to not be so optimistic about
10252 removing the old "look-ahead" spelling.
10253 Update previous look-ahead/lookahead change reports.
10254 * REFERENCES: look-ahead -> lookahead (since that's
10255 what he actually wrote).
10256 * doc/refcard.tex: look ahead -> lookahead,
10257 look-ahead -> lookahead
10258
10259 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
10260
10261 For consistency, use `lookahead' instead of `look-ahead' or
10262 `look_ahead'. Discussed starting at
10263 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
10264 and then at
10265 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
10266 * NEWS: For the next release, note the change to `--report'.
10267 * TODO, doc/bison.1: Update English.
10268 * doc/bison.texinfo: Update English.
10269 (Understanding Your Parser, Bison Options): Document as
10270 `--report=lookahead' rather than `--report=look-ahead'.
10271 * src/conflicts.c: Update English in comments.
10272 (lookahead_set): Rename from look_ahead_set.
10273 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
10274 (resolve_sr_conflict): Rename local look_ahead_tokens to
10275 lookahead_tokens, and update other uses.
10276 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
10277 count_rr_conflicts, conflicts_free): Update uses.
10278 * src/getargs.c (report_args): Move "lookahead" before alternate
10279 spellings.
10280 (report_types): Update uses.
10281 (usage): For `--report' usage description, state `lookahead' spelling
10282 rather than `look-ahead'.
10283 * src/getargs.h (report.report_lookahead_tokens): Rename from
10284 report_look_ahead_tokens.
10285 * src/lalr.c: Update English in comments.
10286 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
10287 (state_lookahead_tokens_count): Rename from
10288 state_look_ahead_tokens_count.
10289 Rename local n_look_ahead_tokens to n_lookahead_tokens.
10290 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
10291 Rename local n_look_ahead_tokens to n_lookahead_tokens.
10292 Update other uses.
10293 Update English in output.
10294 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
10295 * src/print.c: Update English in comments.
10296 (lookahead_set): Rename from look_ahead_set.
10297 (print_reduction): Rename argument lookahead_token from
10298 look_ahead_token.
10299 (print_core, state_default_rule, print_reductions, print_results):
10300 Update uses.
10301 * src/print_graph.c: Update English in comments.
10302 (print_core): Update uses.
10303 * src/state.c: Update English in comments.
10304 (reductions_new): Update uses.
10305 (state_rule_lookahead_tokens_print): Rename from
10306 state_rule_look_ahead_tokens_print, and update other uses.
10307 * src/state.h: Update English in comments.
10308 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
10309 (state_rule_lookahead_tokens_print): Rename from
10310 state_rule_look_ahead_tokens_print.
10311 * src/tables.c: Update English in comments.
10312 (conflict_row, action_row): Update uses.
10313 * tests/glr-regression.at
10314 (Incorrect lookahead during deterministic GLR,
10315 Incorrect lookahead during nondeterministic GLR): Rename
10316 print_look_ahead to print_lookahead.
10317 * tests/torture.at: Update English in comments.
10318 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
10319 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
10320 (Many lookahead tokens): Update uses.
10321 * data/glr.c: Update English in comments.
10322 * lalr1.cc: Likewise.
10323 * yacc.c: Likewise.
10324 * src/conflicts.h: Likewise.
10325 * src/lalr.h: Likewise.
10326 * src/main.c: Likewise.
10327 * src/output.c: Likewise.
10328 * src/parse-gram.c: Likewise.
10329 * src/tables.h: Likewise.
10330 * tests/calc.at: Likewise.
10331
10332 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
10333
10334 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
10335
10336 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
10337
10338 * TODO: Add request from Nelson H. F. Beebe to be able to install
10339 Bison without installing the yacc script.
10340
10341 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
10342
10343 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
10344 and yytext if they're already #define'd.
10345 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
10346 * src/scan-code-c.c: ... here.
10347 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
10348 <config.h>.
10349
10350 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
10351
10352 Get Bison to build again when configured with --enable-gcc-warnings.
10353 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
10354 missing #include's.
10355 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
10356 loc argument as it shadows a global.
10357 * src/scan-gram.l: Remove stray comma that prevents boundary_set
10358 invocation.
10359
10360 * src/.cvsignore: Add scan-code.c.
10361
10362 2006-06-07 Akim Demaille <akim@epita.fr>
10363
10364 * src/scan-gram.l: Move the "add a trailing ; to actions" code
10365 to...
10366 * src/scan-code.l: here.
10367 * tests/input.at (Torturing the Scanner): Fix another location
10368 error.
10369
10370 2006-06-07 Akim Demaille <akim@epita.fr>
10371
10372 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
10373
10374 2006-06-06 Akim Demaille <akim@epita.fr>
10375
10376 Extract the parsing of user actions from the grammar scanner.
10377 As a consequence, the relation between the grammar scanner and
10378 parser is much simpler. We can also split "composite tokens" back
10379 into simple tokens.
10380 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
10381 * src/scan-gram.l (add_column_width, adjust_location): Move to and
10382 rename as...
10383 * src/location.h, src/location.c (add_column_width)
10384 (location_compute): these.
10385 Fix the column count: the initial column is 0.
10386 (location_print): Be robust to ending column being 0.
10387 * src/location.h (boundary_set): New.
10388 * src/main.c: Adjust to scanner_free being renamed as
10389 gram_scanner_free.
10390 * src/output.c: Include scan-code.h.
10391 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
10392 Use boundary_set.
10393 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
10394 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
10395 which is now, again, a separate token.
10396 Adjust all dependencies.
10397 Whereever actions with $ and @ are used, use translate_code.
10398 (action): Remove this nonterminal which is now useless.
10399 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
10400 (grammar_current_rule_action_append): Use translate_code.
10401 (packgram): Bound check ruleno, itemno, and rule_length.
10402 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
10403 (last_string, last_braced_code_loc, max_left_semantic_context)
10404 (scanner_initialize, scanner_free, scanner_last_string_free)
10405 (gram_out, gram_lineno, YY_DECL_): Move to...
10406 * src/scan-gram.h: this new file.
10407 (YY_DECL): Rename as...
10408 (GRAM_DECL): this.
10409 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
10410 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10411 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10412 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10413 Move these declarations, and...
10414 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
10415 these to...
10416 * src/flex-scanner.h: this new file.
10417 * src/scan-gram.l (rule_length, rule_length_overflow)
10418 (increment_rule_length): Remove.
10419 (last_braced_code_loc): Rename as...
10420 (gram_last_braced_code_loc): this.
10421 Adjust to the changes of the parser.
10422 Move all the handling of $ and @ into...
10423 * src/scan-code.l: here.
10424 * src/scan-gram.l (handle_dollar, handle_at): Remove.
10425 (handle_action_dollar, handle_action_at): Move to...
10426 * src/scan-code.l: here.
10427 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
10428 scan-code.h, scan-code-c.c, scan-gram.h.
10429 (EXTRA_bison_SOURCES): Add scan-code.l.
10430 (BUILT_SOURCES): Add scan-code.c.
10431 (yacc): Be robust to white spaces.
10432
10433 * tests/conflicts.at, tests/input.at, tests/reduce.at,
10434 * tests/regression.at: Adjust the column numbers.
10435 * tests/regression.at: Adjust the error message.
10436
10437 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10438
10439 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10440 Use Akim's wording from
10441 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
10442
10443 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10444
10445 Between Bison releases, manually append `+' to the previous Bison
10446 release number, and use that as a signal to automatically print the
10447 ChangeLog's CVS Id keyword from --version. Discussed starting at
10448 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
10449 * ChangeLog: Add Id header.
10450 * configure.ac (AC_INIT): Append `+' to `2.3'.
10451 * src/.cvsignore: Add revision.c.
10452 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
10453 (BUILT_SOURCES): Add revision.c.
10454 (revision.c): New target rule. This file defines a new global variable
10455 named revision. It initializes it with either the Id from ChangeLog
10456 or, if VERSION doesn't contain `+', with the empty string.
10457 * src/getargs.c (version): Print the value of revision.
10458 * src/revision.h: Extern revision.
10459
10460 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
10461
10462 * NEWS: Version 2.3.
10463 * configure.ac (AC_INIT): Likewise.
10464
10465 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
10466
10467 * data/glr.c (YYRECOVERING): Define to be a function-like macro
10468 with no arguments, not as an object-like macro. This is for
10469 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
10470 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
10471 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
10472 Document this.
10473
10474 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
10475
10476 * src/getargs.c (usage): Back out yesterday's modification of the
10477 --help output so that we don't have to wait for translation before
10478 releasing 2.3.
10479
10480 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
10481
10482 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
10483 Problem reported by Akim Demaille.
10484
10485 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
10486
10487 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10488
10489 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
10490
10491 * data/yacc.c (yy_reduce_print): Omit trailing white space in
10492 generated source code. Problem reported by Frans Englich in
10493 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
10494
10495 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
10496
10497 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
10498 shell, not within 'make', so that 'make' by an ordinary builder
10499 (using GNU make) does not worry about configuring gzip. This also
10500 works around a bug reported independently by Keith Thompson and by
10501 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
10502 stderr rather than stdout, messing up the build logs.
10503
10504 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10505
10506 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
10507 to make sure that YYID will never be unused. This fixes a 'make
10508 maintainer-check' failure caused by the recent changes to the 'Trivial
10509 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
10510 not used.
10511 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
10512
10513 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10514
10515 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
10516 state before an empty RHS is always resolved here. Only the location
10517 of that state is guaranteed to be resolved, and that's enough. This
10518 fixes the remaining bug reported by Derek M. Jones in
10519 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10520 * tests/glr-regression.at (Uninitialized location when reporting
10521 ambiguity): Test the above case.
10522 Also, the embedded comments in this test case claim it checks the case
10523 of an empty RHS that has inherited the initial location. However, the
10524 corresponding LHS was already resolved, so yyresolveLocations didn't
10525 actually have reason to modify it. Fix this by forcing
10526 nondeterministic operation at the beginning of the parse.
10527
10528 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
10529
10530 * data/c.m4 (b4_yy_symbol_print_generate):
10531 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
10532 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
10533 of the bugs reported today by Derek M Jones in
10534 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10535 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
10536 defined to be a type name without parens or brackets.
10537 (Location Type): Similarly for YYLTYPE.
10538 * tests/regression.at (Trivial grammars): Put in a test for this
10539 bug that will be caught by 'make maintainer-check' (though not,
10540 alas, by 'make check' unless your compiler is picky).
10541
10542 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
10543
10544 * NEWS: Version 2.2.
10545 * configure.ac (AC_INIT): Likewise.
10546
10547 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
10548
10549 * data/glr.c (yyreportTree): Make room in yystates for the state
10550 preceding the RHS. This fixes the segmentation fault reported by Derek
10551 M. Jones in
10552 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
10553 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
10554 to the user. Reported for yyreportTree by Derek M. Jones later in the
10555 same thread.
10556 * THANKS: Add Derek M. Jones.
10557 Update my email address.
10558 Fix typo in Steve Murphy's name.
10559
10560 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
10561
10562 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
10563 checking against YYLAST that caused the parser to miss a potential
10564 alternative in its diagnostic.
10565 Problem reported by Maria Jose Moron Fernandez in
10566 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
10567 * data/lalr1.cc (yysyntax_error_): Likewise.
10568 * data/yacc.c (yysyntax_error): Likewise.
10569 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
10570 tokens, in case we run into an older C compiler.
10571 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
10572 Use them to check for the off-by-one error fixed above.
10573
10574 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
10575 YYSIZE_T, not size_t.
10576 * tests/regression.at (Trivial grammars): New test, to catch
10577 the error fixed by the above patch.
10578
10579 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10580
10581 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
10582 scheme.
10583 Reported by Steve Murphy.
10584
10585 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10586
10587 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
10588 * data/glr.cc: b4_location_flag is now b4_locations_flag.
10589
10590 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10591
10592 Implement --trace=m4.
10593 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
10594 * src/output.c (output_skeleton): When set, pass -dV to m4.
10595
10596 Factor the handling of flags in m4.
10597 * src/output.c (prepare): Rename the muscle names debug, defines,
10598 error_verbose to debug_flag, defines_flag, error_verbose_flag.
10599 * data/c.m4: Adjust.
10600 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
10601 Use b4_define_flag_if to define other b4_FLAG_if macros.
10602 (b4_location_if): As a consequence, rename as...
10603 (b4_locations_if): this, for consistency.
10604 Adjust all the skeletons.
10605
10606 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10607
10608 * etc/bench.pm: Shorten bench names.
10609
10610 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10611
10612 * src/output.h, src/output.c (error_verbose): Move to...
10613 * src/getargs.h, src/getargs.c: here.
10614 Sort the flags.
10615 Adjust dependencies.
10616
10617 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
10618
10619 * data/c.m4 (b4_copyright): Put the special exception for Bison
10620 skeletons here, so we don't have to put it in each skeleton. All
10621 uses changed. Suggested by Akim Demaille. Also, wrap the
10622 copyright notice, in case it is longer than 80 columns. Replace
10623 comma by newline after title.
10624
10625 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
10626
10627 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
10628 incompatibility, not a bug. Mention that it wasn't fixed as of
10629 flex 2.5.33.
10630
10631 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
10632
10633 * examples/extexi: Enforce the precedence of concatenation over
10634 >>.
10635 Reported by Tommy Nordgren.
10636
10637 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
10638
10639 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
10640 with the member "token".
10641 Reported by Martin Nylin.
10642
10643 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
10644
10645 * data/glr.c: Switch to Bison 2.2 special-exception language in
10646 the copyright notice. Use more-regular format for titles and
10647 copyright notices.
10648 * data/glr.cc: Likewise.
10649 * data/location.cc: Likewise.
10650 * data/yacc.cc: Likewise.
10651 * doc/bison.texinfo (Conditions): Document this.
10652 * NEWS: likewise. Upgrade version to 2.2.
10653
10654 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
10655
10656 * data/glr.cc: Remove dead code.
10657
10658 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
10659
10660 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
10661 that variable and the line breaks the bootstrap. Problem reported
10662 by Juan M. Guerrero.
10663
10664 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
10665
10666 * doc/bison.texinfo (Multiple start-symbols): New.
10667
10668 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
10669
10670 * etc/README, etc/bench.pl: New.
10671
10672 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
10673
10674 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
10675 rule.
10676 Reported by Mickael Labau.
10677 * tests/input.at (Torturing the Scanner): Test it.
10678
10679 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
10680
10681 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
10682 Problem reported by Bob Rossi.
10683
10684 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
10685
10686 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
10687 and didn't really work.
10688 For the index, use @ifnotinfo, not @iftex.
10689 Minor cleanups of spacing and terminology.
10690
10691 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
10692
10693 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
10694 of AT_NAME_PREFIX when %name-prefix is not used.
10695
10696 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
10697
10698 Apply --prefix to C++ skeletons too: they change the namespace.
10699 The test suite already exercize these cases.
10700 * data/c++.m4 (b4_namespace): New.
10701 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
10702 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
10703 * data/yacc.c, data/glr.c: Remove a useless `[]'.
10704 * doc/bison.texinfo: Document it.
10705 (Option Cross Key): Use @multitable in all formats. It looks
10706 nicer, even in TeX outputs.
10707 (Rules): Use the same code whatever the output type is.
10708 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
10709 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
10710 * tests/calc.at: Use it, instead of hard coding `yy'.
10711
10712 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10713
10714 * TODO: Remove dead items.
10715
10716 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10717
10718 * doc/FAQ: Remove, merged into...
10719 * doc/bison.texinfo (FAQ): this.
10720 * doc/Makefile.am (EXTRA_DIST): Adjust.
10721
10722 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10723
10724 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
10725 even if empty.
10726 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
10727 * doc/bison.texinfo (Calc++ Scanner): Use it.
10728
10729 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
10730
10731 Fix two nits reported by twlevo, plus one more that I discovered.
10732
10733 * src/assoc.h (assoc_to_string): Give a name to the arg, as
10734 this is the usual Bison style.
10735 * src/location.h (location_print): Likewise.
10736
10737 * src/reader.h (token_name): Likewise.
10738
10739 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
10740
10741 Fix some nits reported by twlevo.
10742 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
10743 and "POSIX". Use more-modern syntax for URLs. Mention C++
10744 and ask for Java. Don't hardwire OS version numbers. Add
10745 copyright notice.
10746 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
10747 * src/conflicts.c (solved_conflicts_obstack): Now static.
10748
10749 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
10750
10751 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
10752 page. Say "you can use it" not "you may use it" as on the web page;
10753 we're describing capabilities not granting permission.
10754
10755 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
10756
10757 * data/glr.c (yyresolveLocations): Rename local variables to avoid
10758 shadowing warnings. Use usual patter for iterating through RHS.
10759 * tests/glr-regression.at
10760 (Uninitialized location when reporting ambiguity):
10761 Modify yylex so that it uses its argument, rather than trying
10762 to rely on ARGSUSED (which doesn't work for gcc with warnings).
10763 const char -> char const.
10764
10765 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
10766 Don't use tabs inside commands; it messes up 'ps'.
10767 Problem reported by twlevo.
10768
10769 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
10770
10771 * tests/glr-regression.at (Uninitialized location when reporting
10772 ambiguity): New test case.
10773 * data/glr.c (yyresolveLocations): New function, which uses
10774 YYLLOC_DEFAULT.
10775 (yyresolveValue): Invoke yyresolveLocations before reporting an
10776 ambiguity.
10777 * doc/bison.texinfo (Default Action for Locations): Note
10778 YYLLOC_DEFAULT's usage for ambiguity locations.
10779 (GLR Semantic Actions): Cross-reference those notes.
10780
10781 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
10782
10783 * tests/glr-regression.at (Leaked semantic values when reporting
10784 ambiguity): Remove unnecessary union and type declarations.
10785 (Leaked lookahead after nondeterministic parse syntax error): New test
10786 case.
10787 * data/glr.c (yyparse): Check for zero stacks remaining before
10788 attempting to shift the lookahead so that you don't lose it.
10789
10790 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10791
10792 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
10793 * tests/glr-regression.at (Leaked semantic values when reporting
10794 ambiguity): New test case.
10795 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
10796 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
10797 now unnecessary yystackp parameter.
10798 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
10799 destructors can be called.
10800
10801 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
10802 in existing testcases.
10803
10804 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10805
10806 Don't leak semantic values for parent RHS when a user action cuts the
10807 parser, and clean up related code a bit.
10808 * tests/glr-regression.at (Leaked merged semantic value if user action
10809 cuts parse): Rename to...
10810 (Leaked semantic values if user action cuts parse): ... this. Add check
10811 for leaked parent RHS values.
10812 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
10813 between an unresolved state (non-empty chain of semantic options) and
10814 an incomplete one (signaled by an empty chain).
10815 (yyresolveStates): Document the interface. Move all manipulation of a
10816 successfully or unsuccessfully resolved yyGLRState to...
10817 (yyresolveValue): ... here so that yyresolveValue always leaves a
10818 yyGLRState with consistent data and thus is easier to understand.
10819 Remove the yyvalp and yylocp parameters since they are always just
10820 taken from the yys parameter. When reporting a discarded merged value
10821 in debugging output, note that it is incompletely merged. Document the
10822 interface.
10823 (yyresolveAction): If resolving any of the RHS states fails, destroy
10824 them all rather than leaking them. Thus, as long as user actions are
10825 written to clean up the RHS correctly, yyresolveAction always cleans up
10826 the RHS of a semantic option. Document the interface.
10827
10828 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
10829
10830 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
10831 led to a segmentation fault in GNU Pascal. Problem reported
10832 by Waldek Hebisch.
10833
10834 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
10835
10836 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
10837 mid-rule action inside a nonterminal symbol in order to declare a
10838 destructor for its semantic value.
10839
10840 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
10841
10842 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
10843 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
10844 __cplusplus && ! defined _STDLIB_H && !
10845 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
10846 defined free))]: Include <stdlib.h> rather than rolling our own
10847 declarations of malloc and free, to avoid problems with
10848 incompatible declarations (using 'throw') C++'s stdlib.h. This
10849 should fix Debian bug 340012
10850 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
10851 reported by Guillaume Melquiond.
10852
10853 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10854
10855 * NEWS: Clarify symbols versus types in unused-value warnings.
10856
10857 * configure.ac (AC_INIT): Bump version number.
10858
10859 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10860
10861 * NEWS: Version 2.1a.
10862 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
10863 since C99 requires this.
10864
10865 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
10866
10867 * m4/c-working.m4: New file.
10868 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
10869
10870 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
10871
10872 * Makefile.maint: Merge from coreutils.
10873
10874 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
10875
10876 More portability fixes for problems summarized by Nelson H. F. Beebe.
10877
10878 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
10879 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
10880 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
10881 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
10882 messes up because C++ code is compiled in 32-bit mode but linked
10883 in 64-bit mode.
10884
10885 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
10886
10887 More portability fixes for problems summarized by Nelson H. F. Beebe.
10888
10889 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
10890 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
10891
10892 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
10893 nodist_PROGRAMS, since we don't need to actually compile the
10894 example if we're just doing a plain 'make'. This avoids bothering
10895 the installer unnecessarily about problems due to weird C++
10896 compilers.
10897
10898 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
10899
10900 More portability fixes for problems summarized by Nelson H. F. Beebe.
10901
10902 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
10903 than #include "...", and compile with -I'.'. The old method was
10904 not portable, according to Posix and the C standard, and it does
10905 not work with Sun C 5.7, where previous #line directives affect
10906 the working directory used in later #include "..." directives.
10907
10908 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10909
10910 Various DJGGP specific issues in /djgpp
10911
10912 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
10913
10914 More portability fixes for problems summarized by Nelson H. F. Beebe.
10915
10916 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
10917 '#include <map>' works and that you can apply ++ to iterators.
10918
10919 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
10920
10921 Work around portability problems summarized by Nelson H. F. Beebe in
10922 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
10923
10924 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10925 that '#include <string>' works.
10926
10927 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
10928 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
10929 "warning: sorry: semantics of inline function static data `const
10930 unsigned char translate_table[262]' are wrong (you'll wind up with
10931 multiple copies)".
10932
10933 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
10934 or, xor to not_, and_, or_, and xor_, respectively. This works
10935 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
10936 random system header somewhere that includes the equivalent of
10937 <iso646.h>.
10938
10939 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
10940 -E" works; it apparently doesn't work with PathScale EKO Compiler
10941 Suite Version 2.0.
10942
10943 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
10944
10945 During deterministic GLR operation, user actions should be able to
10946 influence the parse by changing yychar. To make this easier to fix and
10947 to make glr.c easier to evolve in general, don't maintain yytoken in
10948 parallel with yychar; just compute yytoken when needed.
10949 * tests/glr-regression.at (Incorrect lookahead during deterministic
10950 GLR): Check that setting yychar in a user action has the intended
10951 effect.
10952 * data/glr.c (yyGLRStack): Remove yytokenp member.
10953 (yyclearin): Don't set *yytokenp.
10954 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
10955 yychar rather than *yytokenp to determine the current lookahead.
10956 Compute yytoken locally when needed.
10957 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
10958 point to.
10959
10960 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
10961 after `--report' documentation.
10962
10963 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
10964
10965 * src/parse-gram.y (grammar_declaration): Location of printer
10966 symbol is @1, not list->location. Bug reported by twlevo.
10967 * tests/input.at (Incompatible Aliases): Adjust to above change.
10968
10969 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
10970
10971 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
10972 all the test at once. This makes the output easier to read in the
10973 normal case.
10974
10975 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
10976 got from <http://bro-ids.org/download.html>. The bug is that
10977 when two actions appeared in succession, the second one was
10978 scanned before the first one was added to the grammar rule
10979 as a midrule action. Bison then output the incorrect warning
10980 "parse.y:905.17-906.36: warning: unused value: $3".
10981 * src/parse-gram.y (BRACED_CODE, action): These are no longer
10982 associated with a value.
10983 (rhs): Don't invoke grammar_current_rule_action_append.
10984 (action): Invoke it here instead.
10985 * src/reader.c (grammar_midrule_action): Now extern.
10986 (grammar_current_rule_action_append): Don't invoke
10987 grammar_midrule_action; that is now the scanner's job.
10988 * src/reader.h (last_string, last_braced_code_loc):
10989 (grammar_midrule_action): New decls.
10990 * src/scan-gram.l (last_string): Now extern, sigh.
10991 (last_braced_code_loc): New extern variable.
10992 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
10993 rule already has an action.
10994 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
10995 * tests/input.at (AT_CHECK_UNUSED_VALUES):
10996 Add some tests to check that the above changes fixed the bug.
10997
10998 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
10999
11000 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
11001 All used changed. Check whether the symbol has a destructor,
11002 not whether it is typed.
11003 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
11004 that the values are still reported as unused. All line numbers
11005 adjusted.
11006
11007 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
11008
11009 Work around a bug in bro 0.8, which underparenthesizes its
11010 definition of YYLLOC_DEFAULT.
11011 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
11012 their arguments.
11013 * data/lalr1.cc: Likewise.
11014 * data/yacc.cc: Likewise.
11015
11016 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
11017
11018 Work around a bug in Pike 7.0, and give the Pike folks a
11019 better way to override the usual int widths.
11020 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
11021 user can override the types.
11022 (short): #undef, to work around a bug in Pike 7.0.
11023 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
11024 (union yyalloc.yyss): Use yytype_int16 rather than short.
11025 All uses changed.
11026 (yysigned_char): Remove.
11027 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
11028 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
11029 * tests/regression.at (Web2c Actions): Adjust to above changes.
11030
11031 * src/reader.c (check_and_convert_grammar): New function.
11032 (reader): Close the input file even if something went wrong during
11033 parsing. Minor file descriptor leak reported by twlevo.
11034
11035 * src/assoc.c (assoc_to_string): Use a default: abort (); case
11036 to pacify gcc -Wswitch-default.
11037 * src/scan-gram.l (adjust_location): Use a default: break; case
11038 to pacify gcc -Wswitch-default.
11039 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
11040 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
11041 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
11042 Move these decls to scan-skel.l, since they don't need to be
11043 visible elsewhere.
11044 * src/scan-skel.l: Accept the above decls.
11045 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
11046 is used.
11047
11048 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
11049
11050 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
11051 since we don't want to insist on a version number at the start
11052 of the changelog every time.
11053 * Makefile.maint: Sync from coreutils a bit better.
11054 (sc_trailing_blank): Renamed from sc_trailing_space.
11055 All uses changed.
11056 (sc_no_if_have_config_h, sc_require_config_h):
11057 (sc_prohibit_assert_without_use): New rules.
11058 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
11059 (sc_dd_max_sym_length): Fix leading spaces in rule.
11060 (sc_system_h_headers): Prefix with @.
11061 (sc_useless_cpp_parens, m4-check): Output line numbers.
11062 (changelog-check): Allow version only in head.
11063 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
11064 satisfy new Makefile.maint rule.
11065 * data/glr.c: Likewise.
11066 * data/glr.cc: Likewise.
11067 * data/lalr1.cc: Likewise.
11068 * data/yacc.c: Likewise.
11069 * lib/ebitsetv.c: Likewise.
11070 * lib/lbitset.c: Likewise.
11071 * lib/subpipe.c: Likewise.
11072 * lib/timevar.c: Likewise.
11073 * src/system.h: Likewise.
11074 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
11075 * djgpp/Makefile.maint: Add copyright notice.
11076 * djgpp/README.in: Likewise.
11077 * djgpp/config.bat: Likewise.
11078 * djgpp/config.site: Likewise.
11079 * djgpp/config_h.sed: Likewise.
11080 * djgpp/djunpack.bat: Likewise.
11081 * djgpp/config.sed: Fix copyright notice to match standard format.
11082 * djgpp/subpipe.h: Likewise.
11083 * lib/bitsetv-print.c: Likewise.
11084 * lib/bitsetv.c: Likewise.
11085 * lib/subpipe.h: Likewise.
11086 * lib/timevar.c: Likewise.
11087 * lib/timevar.h: Likewise.
11088 * djgpp/subpipe.c: Use standard recipe for config.h.
11089 * lib/abitset.c: Likewise.
11090 * lib/bitset.c: Likewise.
11091 * lib/bitset_stats.c: Likewise.
11092 * lib/bitsetv-print.c: Likewise.
11093 * lib/bitsetv.c: Likewise.
11094 * lib/ebitsetv.c: Likewise.
11095 * lib/get-errno.c: Likewise.
11096 * lib/lbitset.c: Likewise.
11097 * lib/subpipe.c: Likewise.
11098 * lib/timevar.c: Likewise.
11099 * lib/vbitset.c: Likewise.
11100 * tests/local.at: Likewise.
11101 * src/scan-gram.l: Don't include verify.h, since system.h does
11102 that for us.
11103 * .x-sc_require_config_h: New file.
11104 * .x-sc_unmarked_diagnostics: New file.
11105
11106 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
11107
11108 Be a bit more systematic about using 'abort'.
11109 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
11110 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
11111 Put 'default: abort ();' before some other case, to satisfy older
11112 pedantic compilers.
11113 * lib/bitset_stats.c (bitset_stats_init): Likewise.
11114 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
11115 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
11116 * src/conflicts.c (resolve_sr_conflict): Likewise.
11117 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
11118 (get_decision_str, get_orientation_str, get_node_alignment_str):
11119 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
11120 (get_linestyle_str, get_arrowstyle_str): Likewise.
11121 * src/conflicts.c (resolve_sr_conflict):
11122 Use a default case rather than one for the one remaining enum
11123 value, to catch invalid enum values as well.
11124 * src/lalr.c (set_goto_map, map_goto):
11125 Prefer "assert (FOO);" to "if (!FOO) abort ();".
11126 * src/nullable.c (nullable_compute, token_definitions_output):
11127 Likewise.
11128 * src/reader.c (packgram, reader): Likewise.
11129 * src/state.c (transitions_to, state_new, state_reduction_find):
11130 Likewise.
11131 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
11132 (symbol_pack): Likewise.
11133 * src/tables.c (conflict_row, pack_vector): Likewise.
11134 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
11135 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
11136 * src/system.h: Don't include <assert.h>.
11137 (assert): New macro.
11138
11139 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
11140 (Destructor Decl, Parser Function, Pure Calling):
11141 Describe rules for braces inside C code more carefully.
11142
11143 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
11144
11145 Fix some porting glitches found by Nelson H. F. Beebe.
11146 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
11147 compilers that don't understand that abort () does not return.
11148 * src/state.c (transitions_to): Likewise.
11149 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
11150 that '#include <cstdlib>' works.
11151 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
11152 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
11153 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
11154 for the benefit of some pre-C99 compilers.
11155
11156 * bootstrap: Undo changes to gnulib files that autoreconf made.
11157
11158 Minor fixups to get 'make maintainer-check' to work.
11159 * configure.ac: Don't use -Wnested-externs, as it's incompatible
11160 with the new verify.h implementation.
11161 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
11162 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
11163 * data/yacc.c (YYUSE): Likewise.
11164 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
11165 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
11166 * src/parse-gram.y (declaration): Don't pass a string constant
11167 to a function that expects char *, since GCC might complain
11168 about the constant value.
11169 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
11170 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
11171 before #defining them.
11172 * tests/glr-regression.at
11173 (Incorrectly initialized location for empty right-hand side in GLR):
11174 In yyerror, use the msg arg.
11175 (Corrupted semantic options if user action cuts parse):
11176 (Incorrect lookahead during deterministic GLR):
11177 (Incorrect lookahead during nondeterministic GLR):
11178 Don't name a local var 'index'; it shadows string.h's 'index'.
11179
11180 2006-01-19 Akim Demaille <akim@epita.fr>
11181
11182 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
11183 location, not just parts of it.
11184
11185 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
11186
11187 * NEWS: Document the fact that multiple %unions are now allowed.
11188 * doc/bison.texinfo (Union Decl): Likewise.
11189 * TODO: This feature is now implemented, so remove it from
11190 the wishlist.
11191
11192 * Makefile.maint: Merge with coreutils Makefile.maint.
11193 (CVS_LIST): Use build-aux version if available.
11194 (VERSION_REGEXP): New macro.
11195 (syntax-check-rules): Add sc_no_if_have_config_h,
11196 sc_prohibit_assert_without_use, sc_require_config_h,
11197 sc_useless_cpp_parens.
11198 (sc_obsolete_symbols): Check for O_NDELAY.
11199 (sc_dd_max_sym_length): Track coreutils.
11200 (sc_unmarked_diagnostics): Look in all files, not just *.c.
11201 (sc_useless_cpp_parens): New rule.
11202 (news-date-check): Look for version or today's date.
11203 (changelog-check): Don't require version number near head.
11204 (copyright-check): Use current year instead of hardwiring 2005.
11205 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
11206 (announcement): Add --gpg-key-ID.
11207
11208 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
11209 with "file system".
11210
11211 Avoid undefined behavior that addressed just before the start of an
11212 array. Problem reported by twlevo.
11213 * src/reader.c (packgram): Prepend a new sentinel before ritem.
11214 * src/lalr.c (build_relations): Rely on new sentinel.
11215 * src/gram.c (gram_free): Adjust to new sentinel.
11216
11217 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
11218
11219 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
11220 yylookaheadNeeds. All uses updated.
11221 (yysplitStack): Rename local yynewLookaheadStatuses to
11222 yynewLookaheadNeeds.
11223 * data/glr-regression.at (Incorrect lookahead during nondeterministic
11224 GLR): In comments, change `lookahead status' to `lookahead need'.
11225
11226 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11227
11228 * data/glr.c (yysplitStack): A little stylistic rewrite.
11229
11230 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11231
11232 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
11233
11234 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
11235
11236 * doc/bison.texinfo: Fix some typos.
11237 (GLR Semantic Actions): New subsection discussing special
11238 considerations because GLR semantic actions might be deferred.
11239 (Actions): Mention look-ahead usage of yylval.
11240 (Actions and Locations): Mention look-ahead usage of yylloc.
11241 (Special Features for Use in Actions): Add YYEOF entry and mention it
11242 in the yychar entry.
11243 In the yychar entry, remove mention of the local yychar case (pure
11244 parser) since this is irrelevant information when writing semantic
11245 actions and since it's already discussed in `Table of Symbols' where
11246 yychar is otherwise described as an external variable.
11247 In the yychar entry, don't call it the `current' look-ahead since it
11248 isn't when semantic actions are deferred.
11249 In the yychar and yyclearin entries, add note about deferred semantic
11250 actions.
11251 Add yylloc and yylval entries discussing look-ahead usage.
11252 (Look-Ahead Tokens): When discussing yychar, don't call it the
11253 `current' look-ahead, and do mention yylval and yylloc.
11254 (Error Recovery): Cross-reference `Action Features' when mentioning
11255 yyclearin.
11256 (Table of Symbols): In the yychar entry, don't call it the `current'
11257 look-ahead.
11258 In the yylloc and yylval entries, mention look-ahead usage.
11259
11260 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
11261
11262 * tests/glr-regression.at: Update copyright year to 2006.
11263
11264 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
11265
11266 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
11267 use during nondeterministic operation to track which stacks have
11268 actually needed the current lookahead.
11269 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
11270 Allocate, deallocate, resize, and otherwise shuffle space for
11271 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
11272 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
11273 appropriately during nondeterministic operation.
11274 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
11275 members to store the current lookahead to be used by the deferred
11276 user action.
11277 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
11278 from which the RHS is taken. Set the lookahead members of the new
11279 yySemanticOption according to the lookahead status for stack yyk.
11280 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
11281 yyaddDeferredAction.
11282 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
11283 members of yySemanticOption before invoking yyuserAction, and then set
11284 them back to their current values afterward.
11285 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
11286 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
11287 * tests/glr-regression.at: Remove `.' from the ends of recent test case
11288 titles for consistency.
11289 (Leaked merged semantic value if user action cuts parse): In order to
11290 suppress lint warnings, use arguments in merge function, and assign
11291 char value < 128 in main.
11292 (Incorrect lookahead during deterministic GLR): New test case.
11293 (Incorrect lookahead during nondeterministic GLR): New test case.
11294
11295 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
11296
11297 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
11298 !yyvaluep as signal that no semantic value is available to print.
11299 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
11300 to print a semantic value.
11301
11302 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
11303
11304 * tests/glr-regression.at: For consistency with my newer test cases,
11305 don't thank myself.
11306
11307 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
11308
11309 * data/glr.c (yyresolveValue): When merging semantic options, if at
11310 least one user action succeeds but a later one cuts the parse, then
11311 destroy the semantic value before returning rather than leaking it.
11312 (yyresolveStates): If a user action cuts the parse and thus
11313 yyresolveValue fails, ignore the (unset) semantic value rather than
11314 corrupting the yyGLRState, and empty the semantic options list since
11315 the user actions should have called all necessary destructors.
11316 Simplify code with YYCHK.
11317 * tests/glr-regression.at (Corrupted semantic options if user action
11318 cuts parse): New test case.
11319 (Undesirable destructors if user action cuts parse): New test case.
11320 Before applying any of this patch, this test case never actually failed
11321 for me... but only because the corrupted semantic options usually
11322 masked this bug.
11323 (Leaked merged semantic value if user action cuts parse): New test
11324 case.
11325
11326 2006-01-05 Akim Demaille <akim@epita.fr>
11327
11328 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
11329
11330 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
11331
11332 * data/c.m4 (b4_c_modern): New macro, with a new provision for
11333 _MSC_VER. Problem reported by Cenzato Marco.
11334 (b4_c_function_def): Use it.
11335 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
11336 b4_c_modern.
11337 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
11338 than rolling our own.
11339
11340 2006-01-04 Akim Demaille <akim@epita.fr>
11341
11342 Also warn about non-used mid-rule values.
11343 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
11344 member.
11345 (symbol_list_new): Adjust.
11346 * src/reader.c (symbol_typed_p): New.
11347 (grammar_rule_check): Use it.
11348 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
11349 Check its rule.
11350 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
11351 Use it.
11352 * tests/actions.at (Exotic Dollars): Adjust.
11353
11354 2006-01-04 Akim Demaille <akim@epita.fr>
11355
11356 * src/reader.c (grammar_midrule_action): If $$ is set in a
11357 mid-rule, move the `used' bit to its lhs.
11358 * tests/input.at (Unused values): New.
11359 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
11360
11361 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
11362
11363 * doc/bison.texinfo (Bison Options): Say more accurately what
11364 --yacc does.
11365 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
11366 about declarations in the grammar when in Yacc mode, as POSIX does
11367 not require a diagnostic when the grammar uses extensions.
11368
11369 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
11370
11371 Warn about dubious constructions like "%token T T".
11372 Reported by twlevo.
11373 * src/symtab.h (struct symbol.declared): New member.
11374 * src/symtab.c (symbol_new): Initialize it to false.
11375 (symbol_class_set): New arg DECLARING, specifying whether
11376 this is a declaration that we want to warn about, if there
11377 is more than one of them. All uses changed.
11378
11379 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
11380 Allow multiple %union directives, whose contents concatenate.
11381 * src/parse-gram.y (grammar_declaration): Likewise.
11382 Use muscle_code_grow, so that we don't need stype_line any more.
11383 All uses changed.
11384
11385 * src/muscle_tab.c (muscle_grow): Fix comment.
11386
11387 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
11388 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
11389 Update copyright year to 2006.
11390
11391 2006-01-03 Akim Demaille <akim@epita.fr>
11392
11393 Have glr.cc pass (some of) the calc.at tests.
11394 * data/glr.cc (b4_parse_param_orig): New.
11395 (b4_parse_param): Improve its definition, and bound it more
11396 clearly in the skeleton.
11397 (b4_epilogue): Append, instead of prepending, in order to keep
11398 #line consistency.
11399 Simplify the generation of auxiliary functions: locations and
11400 purity are mandated.
11401 (b4_global_tokens_and_yystype): Honor it.
11402 * data/location.cc (c++.m4): Don't include it.
11403 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
11404 and AT_SKEL_CC_IF.
11405 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
11406 AT_LALR1_CC_IF.
11407 Be sure to initialize the first position's filename.
11408 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
11409 mandated anyway.
11410 (AT_CHECK_CALC_GLR_CC): New.
11411 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
11412
11413 2006-01-02 Akim Demaille <akim@epita.fr>
11414
11415 * src/output.c (output_skeleton): Don't hard wire the inclusion of
11416 c.m4.
11417 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
11418 * data/glr.cc: Do not include stack.hh.
11419
11420 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
11421
11422 * data/glr.c: Reformat whitespace with tabs.
11423 (b4_lpure_formals): Remove this unused m4 macro.
11424 * tests/cxx-type.at: Reformat whitespace with tabs.
11425 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
11426 since it's a member. Rename type to isNterm for clarity.
11427
11428 2005-12-29 Akim <akim@sulaco.local>
11429
11430 Let glr.cc catch up with symbol_value_print.
11431 * data/glr.cc (b4_yysymprint_generate): Replace by...
11432 (b4_yy_symbol_print_generate): this.
11433 (yy_symbol_print, yy_symbol_value_print): Declare them.
11434
11435 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
11436
11437 * src/location.h (boundary): Note that a line or column equal
11438 to INT_MAX indicates an overflow.
11439 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
11440 (rule_length_overflow, increment_rule_length, add_column_width):
11441 New functions.
11442 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
11443 (<SC_BRACED_CODE>"}"):
11444 Use increment_rule_length rather than incrementing it by hand.
11445 (adjust_location, handle_syncline): Diagnose overflow.
11446 (handle_action_dollar, handle_action_at):
11447 Fix bug with monstrosities like $-2147483648.
11448 Remove now-unnecessary checks.
11449 (scan_integer): Verify assumptions and remove now-unnecessary checks.
11450 (convert_ucn_to_byte): Verify assumptions.
11451 (handle_syncline): New arg LOC. All callers changed.
11452 Don't store through a value derived from char const * pointer.
11453
11454 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
11455 GCC warnings.
11456
11457 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
11458
11459 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
11460 Remove unnecessary forward static decls.
11461
11462 2005-12-27 Akim Demaille <akim@epita.fr>
11463
11464 * src/reader.c (grammar_current_rule_check): Also check that $$
11465 is used.
11466 Take the rule to check as argument, hence rename as...
11467 (grammar_rule_check): this.
11468 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
11469 Rename as...
11470 (grammar_rule_begin, grammar_rule_end): these, for consistency.
11471 (grammar_midrule_action, grammar_symbol_append): Now static.
11472 * tests/torture.at (input): Don't rely on the default action
11473 being always performed.
11474 * tests/calc.at: "Set" $$ even when the action is "cut" with
11475 YYERROR or other.
11476 * tests/actions.at (Exotic Dollars): Instead of using unused
11477 values, check that the warning is issued.
11478
11479 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
11480
11481 * NEWS: Improve wording for unused-value warnings.
11482
11483 2005-12-22 Akim Demaille <akim@epita.fr>
11484
11485 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
11486 (b4_yysymprint_generate): Rename as...
11487 (b4_yy_symbol_print_generate): this.
11488 Generate yy_symbol_print instead of yysymprint.
11489 Generate also yy_symbol_value_print, and use it.
11490
11491 2005-12-22 Akim Demaille <akim@epita.fr>
11492
11493 * NEWS: Warn about unused values.
11494 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
11495 a `used' member.
11496 (symbol_list_n_get, symbol_list_n_used_set): New.
11497 (symbol_list_n_type_name_get): Use symbol_list_n_get.
11498 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
11499 * src/reader.c (grammar_current_rule_check): Check that values are
11500 used.
11501 * src/symtab.c (symbol_print): Accept 0.
11502 * tests/existing.at: Remove the type information.
11503 Empty the actions.
11504 Remove useless actions (beware of mid-rule actions: perl -000
11505 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
11506 * tests/actions.at (Exotic Dollars): Use unused values.
11507 * tests/calc.at: Likewise.
11508 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11509 Likewise.
11510
11511 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
11512 rule_useful_p.
11513
11514 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
11515
11516 Undo 2005-12-01 tentative license wording change. The wording is
11517 still being reviewed by the lawyers, and we don't want to wait for
11518 them before publishing a test release. For now, revert to the
11519 previous wording.
11520 * NEWS: Undo 2005-12-01 change.
11521 * data/glr.c: Revert to previous license wording.
11522 * data/glr.cc: Likewise.
11523 * data/lalr1.cc: Likewise.
11524 * data/location.cc: Likewise.
11525 * data/yacc.c: Likewise.
11526
11527 * NEWS: Reword %destructor vs YYABORT etc.
11528 * data/glr.c: Use American spacing, for consistency.
11529 * data/glr.cc: Likewise.
11530 * data/lalr1.cc: Likewise.
11531 * data/yacc.c: Likewise.
11532 * data/yacc.c: Reformat comments slightly.
11533 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
11534 for consistency. Fix some spelling errors and reword recently-included
11535 text slightly.
11536 * tests/cxx-type.at: Cast results of malloc, for C++.
11537
11538 2005-12-21 Joel E. Denny <address@hidden>
11539
11540 * tests/cxx-type.at: Construct a tree, count the parents of shared
11541 nodes, and free each node once and only once. Previously, the memory
11542 for semantic values was leaked instead.
11543
11544 2005-12-21 Joel E. Denny <address@hidden>
11545
11546 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
11547 (yylval, yylloc): If pure, #define to yystackp->yyval and
11548 yystackp->yyloc similar to yychar and yynerrs.
11549 (yyparse): If pure, remove local yylval and yylloc. Add local
11550 yystackp to accommodate pure definitions of yylval and yylloc.
11551 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
11552 yylvalp and yyllocp to &yylval and &yylloc.
11553 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
11554 namespace. Previously, nerrs and char were missing, but lval and lloc
11555 weren't necessary.
11556 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
11557 yylvalp and yyllocp parameters since, if pure, these are now always
11558 accessible through yystackp. If not pure, they are still accessible
11559 globally.
11560 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
11561 `if (YYID (N))' to pacify lint.
11562
11563 2005-12-21 Akim Demaille <akim@epita.fr>
11564
11565 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
11566 destroy the RHS symbols of a rule.
11567 * data/yacc.c (yylen): Initialize to 0.
11568 Keep its value to the number of items to possibly shift.
11569 In particular, a regular successful parse that ends on YYFINAL by
11570 a (internal) YYACCEPT must not have yylen != 0.
11571 (yyerrorlab, yyreturn): Pop the RHS.
11572 Reorder a bit to emphasize the `shifting' bits of code.
11573 (YYPOPSTACK): Now accept a number of items to pop.
11574 * data/lalr1.cc: Likewise.
11575 * data/glr.c: Formatting changes.
11576 Use goto instead of fall through.
11577 * doc/bison.texinfo (Destructor Decl): Complete.
11578
11579 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11580
11581 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11582 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
11583 * djgpp/config.bat: Replace every occurence of the file name
11584 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11585 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11586 * djgpp/config.sed: Replace every occurence of the file name
11587 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11588 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11589 * djgpp/djunpack.bat: DJGPP specific file.
11590 * djgpp/fnchange.lst: DJGPP specific file.
11591 * djgpp/README.in: Add new information about how to unpack the bison
11592 source on MSDOS and other systems which have 8.3 file name restrictions
11593 using djunpack.bat and fnchange.lst.
11594
11595 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
11596
11597 * bootstrap (build_cvs_prefix): Remove; unused.
11598 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
11599 when getting gnulib.
11600
11601 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
11602
11603 * data/glr.c: Reorder typedef declarations for structs to match order
11604 of struct declarations.
11605 Rename yystack everywhere to yystackp except in yyparse where it's not
11606 a pointer.
11607 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
11608 consistency.
11609 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
11610 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
11611 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
11612 lint.
11613
11614 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
11615
11616 * tests/sets.at (Accept): Fix typos in regular expression used to
11617 sed out the final state number.
11618
11619 Work around portability problem on Solaris 10: flex-generated
11620 files include <stdio.h> before <config.h>, which messes up
11621 because the latter defines __EXTENSIONS__. Address the problem
11622 by creating two new little files that include <config.h> first,
11623 then include the flex-generated files. Rewrite everyone else
11624 to include <config.h> first, as well.
11625 * lib/timevar.c: Always include "config.h".
11626 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
11627 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
11628 (EXTRA_bison_SOURCES): New macro.
11629 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
11630 * src/system.h: Don't include config.h.
11631 * src/LR0.c: Include <config.h> first.
11632 * src/assoc.c: Likewise.
11633 * src/closure.c: Likewise.
11634 * src/complain.c: Likewise.
11635 * src/conflicts.c: Likewise.
11636 * src/derives.c: Likewise.
11637 * src/files.c: Likewise.
11638 * src/getargs.c: Likewise.
11639 * src/gram.c: Likewise.
11640 * src/lalr.c: Likewise.
11641 * src/location.c: Likewise.
11642 * src/main.c: Likewise.
11643 * src/muscle_tab.c: Likewise.
11644 * src/nullable.c: Likewise.
11645 * src/output.c: Likewise.
11646 * src/parse-gram.y: Likewise.
11647 * src/print.c: Likewise.
11648 * src/print_graph.c: Likewise.
11649 * src/reader.c: Likewise.
11650 * src/reduce.c: Likewise.
11651 * src/relation.c: Likewise.
11652 * src/state.c: Likewise.
11653 * src/symlist.c: Likewise.
11654 * src/symtab.c: Likewise.
11655 * src/tables.c: Likewise.
11656 * src/uniqstr.c: Likewise.
11657 * src/vcg.c: Likewise.
11658
11659 * src/parse-gram.y: Fix minor problems uncovered by lint.
11660 (current_lhs, current_lhs_location): Now static.
11661 (current_assoc): Remove unused variable.
11662
11663 Cleanups so that Bison-generated parsers have less lint.
11664 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
11665 Prepend /*ARGSUSED*/, for lint's sake.
11666 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
11667 definition if 'lint' is defined.
11668 (YYID): New macro (or function, if lint).
11669 All uses of /*CONSTCOND*/0 replaced by YYID(0).
11670 * data/yacc.c: Likewise.
11671 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
11672 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
11673 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
11674 is C++ only.
11675 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
11676 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
11677 Use YYID(0) rather than 0, for lint.
11678 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
11679 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
11680
11681 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
11682
11683 * tests/glr-regression.at
11684 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11685 Close memory leak reported by twlevo.
11686
11687 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
11688
11689 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
11690 all stacks.
11691 (yyparse): Iterate another stack in order to call user destructors.
11692 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11693 New test case.
11694 (Duplicated user destructor for lookahead): This test now is expected
11695 to succeed.
11696
11697 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
11698
11699 * NEWS: Document the following change.
11700 * data/yacc.c: Say "parser skeleton" rather than "file", since
11701 it's no longer just a file.
11702 * data/glr.c: Grant a special exception for C GLR parsers, that
11703 reads like the already-existing exception for C LALR(1) parsers.
11704 * data/glr.cc: Likewise.
11705 * data/lalr1.cc: Likewise.
11706 * data/location.cc: Likewise.
11707 * data/yacc.c: Reword the "written by" statement to clarify that
11708 it was the parser skeleton, not the entire output file.
11709 * data/glr.c: Written by Paul Hilfinger.
11710 * data/glr.cc: Written by Akim Demaille.
11711 * data/lalr1.cc: Likewise.
11712
11713 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
11714
11715 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
11716 Fix typos in previous change that broke 'make check'.
11717 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
11718 supported in C.
11719 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
11720 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
11721 We can revert this once things settle down.
11722
11723 * src/conflicts.c (conflicts_print): Don't print file name twice
11724 when %expect fails because there were no conflicts.
11725 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
11726 change.
11727 * tests/conflicts.at (%expect not enough, %expect too much):
11728 (%expect with reduce conflicts): Adjust to new behavior.
11729
11730 2005-11-18 Akim Demaille <akim@epita.fr>
11731
11732 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
11733 errors.
11734 * NEWS: Document this.
11735 * doc/bison.texinfo (Expect Decl): Likewise.
11736
11737 2005-11-16 Akim Demaille <akim@epita.fr>
11738
11739 Generalize the display of semantic values and locations in traces.
11740 * data/glr.c (yy_reduce_print): Fix indices (again).
11741 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
11742 literal integers.
11743 * data/lalr1.cc (yyreduce_print): Rename as...
11744 (yy_reduce_print): this.
11745 Display values and locations.
11746 * data/yacc.c (yy_reduce_print): Likewise.
11747 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
11748 (yysymprint): Move higher to be visible from yy_reduce_print).
11749 (yyparse): Adjust.
11750 * tests/calc.at: Adjust the expected length of the traces.
11751
11752 2005-11-14 Akim Demaille <akim@epita.fr>
11753
11754 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
11755 from 1 to N, while values and location start at 0.
11756 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
11757
11758 2005-11-14 Akim Demaille <akim@epita.fr>
11759
11760 * data/glr.c (yy_reduce_print): Fix the $ number.
11761
11762 2005-11-14 Akim Demaille <akim@epita.fr>
11763
11764 "Use" parse parameters.
11765 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
11766 * data/glr.c, data/glr.cc: Use them.
11767 * data/glr.c (YYUSE): Have a C++ definition that supports
11768 non-pointer types.
11769
11770 2005-11-14 Akim Demaille <akim@epita.fr>
11771
11772 * data/glr.c (yyexpandGLRStack): Declare only if defined.
11773
11774 2005-11-14 Akim Demaille <akim@epita.fr>
11775
11776 * data/glr.cc: New.
11777 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
11778
11779 2005-11-12 Akim Demaille <akim@epita.fr>
11780
11781 Let position and location be PODs.
11782 * data/location.cc (position::initialize, location::initialize): New.
11783 (position::position, location::location): Define only if
11784 b4_location_constructors is defined.
11785 * data/lalr1.cc (b4_location_constructors): Define it for backward
11786 compatibility.
11787 * doc/bison.texinfo (Initial Action Decl): Use initialize.
11788
11789 2005-11-12 Akim Demaille <akim@epita.fr>
11790
11791 * data/lalr1.cc: Move the body of the ctor and dtor into the
11792 parser file (instead of the header).
11793 Wrap the implementations in a "namespace yy".
11794
11795 2005-11-12 Akim Demaille <akim@epita.fr>
11796
11797 Have glr.c include its header file when created.
11798 * data/glr.c (b4_shared_declarations): New.
11799 Output them verbatim in the parser if !%defines, otherwise
11800 output then in the header file, and include it instead.
11801
11802 2005-11-11 Akim Demaille <akim@epita.fr>
11803
11804 * data/glr.c: Comment changes.
11805
11806 2005-11-11 Akim Demaille <akim@epita.fr>
11807
11808 When yydebug, report semantic and location values for reductions.
11809 * data/glr.c (yy_reduce_print): Report the semantic values and the
11810 locations.
11811 (YY_REDUCE_PRINT): Adjust.
11812 (yyglrReduce): Use them.
11813 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
11814 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
11815 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
11816 traces.
11817
11818 2005-11-10 Akim Demaille <akim@epita.fr>
11819
11820 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
11821 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
11822 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
11823
11824 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
11825
11826 * m4/cxx.m4, examples/Makefile.am: Don't build
11827 examples/calc++ if no C++ compiler is available. (trivial change)
11828
11829 2005-11-09 Akim Demaille <akim@epita.fr>
11830
11831 * src/scan-skel.l: Use a couple of asserts.
11832
11833 2005-11-03 Akim Demaille <akim@epita.fr>
11834
11835 In some (weird) cases, the final state number is incorrect.
11836 Reported by Alexandre Duret-Lutz.
11837 * src/LR0.c (state_list_append): Remove the computation of
11838 final_state.
11839 (save_reductions): Do it here.
11840 (get_state): Alpha conversion.
11841 (generate_states): Use a for loop.
11842 * src/gram.h (item_number_is_rule_number)
11843 (item_number_is_symbol_number): New.
11844 * src/state.c: Use assert.
11845 * src/system.h: Include assert.h.
11846 * tests/sets.at (Accept): New.
11847
11848 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11849
11850 * data/glr.c (yyfill): Adjust comment.
11851 (yyresolveAction): Initialize default location properly
11852 for empty right-hand sides.
11853 (yydoAction): Ditto.
11854 Add comment explaining apparently dead code.
11855 * tests/glr-regression.at
11856 (Incorrectly initialized location for empty right-hand side in GLR):
11857 New test.
11858
11859 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
11860
11861 * bootstrap (cleanup_gnulib): New function. Use it to clean up
11862 gnulib when interrupted. This fixes some race conditions and
11863 works around some portability problems (one noted by Paul
11864 Hilfinger).
11865
11866 2005-10-22 Akim <akim@epita.fr>
11867
11868 * Makefile.cfg: Adjust to config -> build-aux.
11869 Reported by twledo.
11870
11871 2005-10-21 Akim Demaille <akim@epita.fr>
11872
11873 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
11874 the %parse-params.
11875 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
11876 * data/yacc.c (b4_Pure_if): Rename as...
11877 (b4_yacc_pure_if): this.
11878 (YY_SYMBOL_PRINT, yyparse): Adjust.
11879 * doc/bison.texinfo: Formatting changes.
11880
11881 2005-10-21 Akim Demaille <akim@epita.fr>
11882
11883 Finish the transition config -> build-aux.
11884 * configure.ac, Makefile.am: Use build-aux.
11885 * config/prev-version, config/announce-gen, config/Makefile.am:
11886 Move to...
11887 * build-aux/prev-version, build-aux/announce-gen,
11888 * build-aux/Makefile.am: here.
11889
11890 2005-10-14 Akim Demaille <akim@epita.fr>
11891
11892 * examples/calc++/test: Use set -x only when VERBOSE.
11893
11894 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
11895
11896 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
11897 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
11898
11899 2005-10-13 Akim Demaille <akim@epita.fr>
11900
11901 * src/scan-skel.l: Output the base name parts of the parser and
11902 header file names.
11903 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
11904 additional checks.
11905 Use this to exercise C++ outputs in subdirs.
11906 Reported by Oleg Smolsky.
11907
11908 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
11909
11910 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
11911 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
11912 Problem reported by John P. Hartmann.
11913 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
11914 already defined it.
11915
11916 2005-10-12 Akim Demaille <akim@epita.fr>
11917
11918 * src/parse-gram.y (version_check): Exit 63 to please missing
11919 (stands for "version mismatch).
11920 * tests/input.at, doc/bison.texinfo: Adjust.
11921
11922 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
11923
11924 Work around portability problems with Visual Age C compiler
11925 (xlc and xlC_r) reported by John P. Hartmann.
11926 * data/location.cc (initial_column, initial_line): Remove.
11927 All uses replaced by 0 and 1.
11928 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
11929 that xlc complains about.
11930 * src/scan-skel.l (skel_wrap): Likewise.
11931 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
11932 as __STDC__.
11933 * data/yacc.c (YYMODERN_C): New macro, which also looks at
11934 __STDC_VERSION__. Use it everywhere instead of looking at
11935 __STDC__ and __cplusplus.
11936
11937 2005-10-10 Akim Demaille <akim@epita.fr>
11938
11939 * examples/calc++/test: Be quiet unless VERBOSE.
11940
11941 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
11942
11943 * data/c.m4 (yydestruct, yysymprint):
11944 Use YYUSE instead of casting to void.
11945 * data/glr.c (YYUSE): New macro.
11946 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11947 Use it instead of rolling our own.
11948 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11949 (YYCHK1):
11950 Use /*CONSTCOND*/ to suppress lint warnings.
11951 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11952 (YY_STACK_PRINT): Use 'false' not '0'.
11953 (YYUSE): New macro.
11954 (yysymprint_, yydestruct_): Use it instead of rolling our own.
11955 * data/yacc.c (YYUSE): New macro.
11956 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
11957 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
11958 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
11959
11960
11961 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
11962 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
11963
11964 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
11965
11966 Undo the parts of the unlocked-I/O change that substituted
11967 putc or puts for printf. This might hurt performance a bit,
11968 but some people prefer the printf style.
11969 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
11970 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
11971 All uses replaced by YYFPRINTF and YYDPRINTF.
11972 * data/yacc.c: Likewise.
11973 * lib/bitset.c (bitset_print): Likewise.
11974 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
11975 putc and puts.
11976 * lib/lbitset.c (debug_lbitset): Likewise.
11977 * src/closure.c (print_firsts, print_fderives): Likewise.
11978 * src/gram.c (grammar_dump): Likewise.
11979 * src/lalr.c (look_ahead_tokens_print): Likewise.
11980 * src/output.c (escaped_output): Likewise.
11981 (user_actions_output): Break apart two printfs.
11982 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
11983 * src/reduce.c (reduce_print): Likewise.
11984 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11985 * src/system.h: Include unlocked-io.h rathe than stdio.h.
11986
11987 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11988 Use assignments rather than casts-to-void to suppress
11989 unused-variable warnings. This pacifies 'lint'.
11990 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
11991 unused-variable warnings.
11992
11993 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11994
11995 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11996
11997 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
11998
11999 Use unlocked I/O for a minor performance improvement on hosts like
12000 GNU/Linux and Solaris that support unlocked I/O. The basic idea
12001 is to use the gnlib unlocked-io module, and to prefer putc and
12002 puts to printf when either will work (since the latter doesn't
12003 come in an unlocked flavor).
12004 * bootstrap (gnulib_modules): Add unlocked-io.
12005 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
12006 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
12007 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
12008 and similarly for puts and putc and printf.
12009 * data/yacc.c: Likewise.
12010 * lib/bitset.c (bitset_print): Likewise.
12011 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
12012 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
12013 to printf.
12014 * lib/lbitset.c (debug_lbitset): Likewise.
12015 * src/closure.c (print_firsts, print_fderives): Likewise.
12016 * src/gram.c (grammar_dump): Likewise.
12017 * src/lalr.c (look_ahead_tokens_print): Likewise.
12018 * src/output.c (escaped_output): Likewise.
12019 (user_actions_output): Coalesce two printfs.
12020 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
12021 * src/reduce.c (reduce_print): Likewise.
12022 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
12023 * src/system.h: Include unlocked-io.h rather than stdio.h.
12024
12025 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
12026 this confuses xgettext.
12027
12028 2005-10-02 Akim Demaille <akim@epita.fr>
12029
12030 * bootstrap (gnulib_modules): Add strverscmp.
12031 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
12032 * m4/.cvsignore: Add strverscmp.m4.
12033 * src/parse-gram.y (%require): New token, new rule.
12034 (version_check): New.
12035 * src/scan-gram.l (%require): Adjust.
12036 * tests/input.at (AT_REQUIRE): New.
12037 Use it.
12038 * doc/bison.texinfo (Require Decl): New.
12039 (Calc++ Parser): Use %require.
12040
12041 2005-10-02 Akim Demaille <akim@epita.fr>
12042
12043 * data/location.cc: New.
12044
12045 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
12046 Akim Demaille <akim@epita.fr>
12047
12048 Make sure -odir/foo.cc creates dir/location.hh etc.
12049 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
12050 (spec_file_prefix, spec_verbose_file, spec_graph_file)
12051 (spec_defines_file): Now const.
12052 (dir_prefix): New.
12053 (short_base_name): Remove.
12054 * src/files.c: Adjust.
12055 (dirname.h): Include.
12056 (base_name): Don't prototype it.
12057 (finput): Remove, duplicates gram_in.
12058 (full_base_name, short_base_name): Replace by...
12059 (all_but_ext, all_but_tab_ext): these.
12060 (compute_base_names): Rename as...
12061 (compute_file_name_parts): this.
12062 Update to compute the new variables, including dir_prefix.
12063 Adjust dependencies.
12064 * src/output.c (prepare): Output them.
12065 * src/reader.c: Adjust to use gram_in, not finput.
12066 * src/scan-skel.l (@dir_prefix@): New.
12067
12068 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
12069
12070 * lib/subpipe.c: New function end_of_output_subpipe() added
12071 to allow support for non-posix systems. This is a no-op function
12072 for posix systems.
12073
12074 * lib/subpipe.h: New function end_of_output_subpipe() added
12075 to allow support for non-posix systems. This is a no-op function
12076 for posix systems.
12077
12078 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
12079 handle the lack of pipe/fork functionality on non-posix systems.
12080
12081 * djgpp/Makefile.maint: DJGPP specific file.
12082
12083 * djgpp/README.in: DJGPP specific file.
12084
12085 * djgpp/config.bat: DJGPP specific configuration file.
12086
12087 * djgpp/config.sed: DJGPP specific configuration file.
12088
12089 * djgpp/config.site: DJGPP specific configuration file.
12090
12091 * djgpp/config_h.sed: DJGPP specific configuration file.
12092
12093 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
12094
12095 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
12096
12097 2005-10-02 Akim Demaille <akim@epita.fr>
12098
12099 * data/location.cc: New, extract from...
12100 * data/lalr1.cc: here.
12101 (location.hh): Include it after the user prologue, in case the
12102 filename type is defined by the user.
12103 Forward declation location and position before the pre-prologue.
12104 (yyresult_): Rename as...
12105 (yyresult): this, it's a local variable, not an attribute.
12106 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
12107
12108 2005-10-01 Akim Demaille <akim@epita.fr>
12109
12110 * examples/extexi: Restore the #line generation.
12111
12112 2005-09-30 Akim Demaille <akim@epita.fr>,
12113 Alexandre Duret-Lutz <adl@gnu.org>
12114
12115 Move the token type and YYSTYPE in the parser class.
12116 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
12117 (parser::token): New, from the moved free definition of tokens.
12118 (parser::semantic_value): Now a full definition instead of an
12119 indirection to YYSTYPE.
12120 (b4_post_prologue): No longer included in the header file, but
12121 in the implementation file.
12122 * doc/bison.texi (C+ Language Interface): Update.
12123 * src/parse-gram.y: Support unary %define.
12124 * tests/actions.at: Define global_tokens_and_yystype for backward
12125 compatibility until we update the tests.
12126 * tests/calc.at: Idem.
12127 (first_line, first_column, last_line, last_column): Define for lalr1.cc
12128 to simplify the code.
12129
12130 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
12131
12132 Port to SunOS 4.1.4, which lacks strtoul and strerror.
12133 Ah, the good old days! Problem reported by Peter Klein.
12134 * bootstrap (gnulib_modules): Add strerror, strtoul.
12135 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
12136 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
12137
12138 2005-09-29 Akim Demaille <akim@epita.fr>
12139
12140 * data/c.m4 (b4_error_verbose_if): New.
12141 * data/lalr1.cc: Use it.
12142 (YYERROR_VERBOSE_IF): Remove.
12143 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
12144 parser members, replaced by...
12145 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
12146 local variables.
12147 (yysyntax_error_): Takes the state number as argument.
12148 (yyreduce_print_): Use the argument yyrule, not the former
12149 attribute yyn_.
12150
12151 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
12152
12153 * bootstrap (gnulib_modules): Add verify.
12154 * lib/.cvsignore: Add verify.h.
12155 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
12156 * src/system.h (verify): Remove.
12157 Include verify.h instead.
12158 * src/tables.c (tables_generate): Use new API for 'verify'.
12159
12160 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
12161
12162 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
12163 local variables whose names begin with 'yy'.
12164 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
12165 Trivial changes from Joel E. Denny.
12166
12167 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
12168 it itself.
12169 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
12170 don't use alloca any more.
12171
12172 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
12173 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
12174 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
12175 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
12176 to match yacc.c, to test more hosts.
12177
12178 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
12179
12180 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
12181 doesn't affect behavior.
12182 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
12183 Solaris, AIX, MSC.
12184 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
12185 This works a bit better with glibc, if user code has already included
12186 stdlib.h.
12187 * doc/bison.texinfo (Bison Parser): Document that users can't
12188 arbitrarily use malloc and free for other purposes. Document
12189 that <alloca.h> and <malloc.h> might be included.
12190 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
12191 user must declare alloca.
12192
12193 * HACKING (release): Forwarn the Translation Project about
12194 stable releses.
12195
12196 2005-09-20 Akim Demaille <akim@epita.fr>
12197
12198 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
12199
12200 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
12201
12202 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
12203 (YYSTACK_ALLOC_MAXIMUM): Use it.
12204 (yysyntax_error): New function.
12205 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
12206 multiple syntax errors are reported, and alloca is being used.
12207 Instead, reallocate buffers twice as big each time, so that
12208 we waste at most half the allocated memory. Start with a small
12209 (128-byte) buffer that will suffice in most cases anyway.
12210 Use yysyntax_error to do most of the work.
12211
12212 * doc/bison.texinfo (Error Reporting, Table of Symbols):
12213 yynerrs is the number of errors reported, not the number of
12214 errors encountered.
12215
12216 * tests/glr-regression.at (Duplicated user destructor for lookahead):
12217 Mark it as expected to fail.
12218 Cast result of malloc; problem reported by twlevo@xs4all.nl.
12219 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
12220 Don't start user-code symbols with "yy", to avoid name space problems.
12221
12222 2005-09-19 Akim Demaille <akim@epita.fr>
12223
12224 Remove the traits, failed experiment.
12225 It never proved useful, and anyway because of the current
12226 definition, it was not possible to have several specialization of
12227 this traits, making it useless.
12228 * data/lalr1.cc (yy:traits): Remove.
12229 Inline its definitions in the parser class.
12230
12231 2005-09-19 Akim Demaille <akim@epita.fr>
12232
12233 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
12234 least Mac OSX with a /usr/local install of gettext.
12235
12236 2005-09-19 Akim Demaille <akim@epita.fr>
12237
12238 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
12239 and yytoken for similarity with the other skeletons.
12240
12241 2005-09-19 Akim Demaille <akim@epita.fr>
12242
12243 * NEWS, configure.ac: update version number to 2.1a.
12244
12245 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
12246
12247 * NEWS: Version 2.1.
12248
12249 * NEWS: Remove notice of yytname change, since it was never in an
12250 official release.
12251 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
12252 diagnostic.
12253 * src/output.c (prepare): Likewise.
12254 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
12255 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
12256 is not defined. This is an awful hack, but it's enough for now.
12257 All callers changed.
12258 * tests/glr-regression-at (make_value): Args are const pointers now,
12259 to avoid GCC warning.
12260 (Duplicated user destructor for lookahead): New test. Currently
12261 skipped. It fails on my host but I'm not sure it'll always fail.
12262
12263 2005-09-16 Akim Demaille <akim@epita.fr>
12264
12265 * src/symtab.h (struct symbol): Declare the printer and destructor
12266 as const, to avoid accidental calls to free.
12267 (symbol_destructor_set, symbol_printer_set): Adjust.
12268 * src/symtab.c: Adjust.
12269
12270 2005-09-16 Akim Demaille <akim@epita.fr>
12271
12272 * data/c.m4 (b4_token_enums): New.
12273 (b4_token_defines): Rename as...
12274 (b4_token_enums_defines): this.
12275 (b4_token_defines): New, output only the #defines.
12276 * data/yacc.c, data/glr.c: Adjust.
12277 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
12278 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
12279 as default values.
12280
12281 2005-09-16 Akim Demaille <akim@epita.fr>
12282
12283 * data/lalr1.cc (yylex_): Remove, inline its code.
12284 (yyreport_syntax_error_): Remove, replaced by...
12285 (yysyntax_error_): this which returns a string and leaves to the
12286 caller the call to the users' error function.
12287 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
12288 Move from members of the parser object...
12289 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
12290 to local variables of the parse function.
12291
12292 2005-09-16 Akim Demaille <akim@epita.fr>
12293
12294 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
12295 since it's in Bison's name space.
12296
12297 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
12298
12299 * data/glr.c (yyresolveValue): Add default case to pacify
12300 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
12301
12302 * NEWS: Document when yyparse started to return 2.
12303 * doc/bison.texinfo (Parser Function): Document when yyparse
12304 returns 2.
12305
12306 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
12307 (b4_filename_type): Renamed back from b4_file_name_type. All uses
12308 changed.
12309 (class position): file_name -> filename (reverting). All uses changed.
12310
12311 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
12312
12313 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
12314 do anything if $@ exists. This reverts part of the 2005-07-07
12315 patch.
12316
12317 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
12318
12319 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
12320 contains obsolete information and isn't worth distributing as a
12321 separate file anyway.
12322 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
12323 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
12324 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
12325 (yyparse): Abort if user code uses longjmp to throw an unexpected
12326 value.
12327
12328 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
12329
12330 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
12331 Suggested by twlevo@xs4all.nl.
12332
12333 * data/glr.c (YYCHK1): Do not assume YYE is in range.
12334 This avoids a diagnostic from gcc -Wswitch-enum.
12335 Problem reported by twlevo@xs4all.nl.
12336
12337 * doc/bison.texinfo: Don't use "filename", as per GNU coding
12338 standards. Use "file name" or "file" or "name", depending on
12339 the context.
12340 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
12341 not to hack/foo.tab.c.
12342 (Calc++ Top Level): 2nd arg of main is not const.
12343 * data/glr.c: b4_filename -> b4_file_name.
12344 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
12345 All uses changed.
12346 (class position): filename -> file_name. All uses changed.
12347 * data/yacc.c: b4_filename -> b4_file_name.
12348 * lib/bitset.h: filename -> file_name in local vars.
12349 * lib/bitset_stats.c: Likewise.
12350 * src/files.c: Likewise.
12351 * src/scan-skel.l ("@output ".*\n): Likewise.
12352 * src/files.c (file_name_split): Renamed from filename_split.
12353 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
12354
12355 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
12356
12357 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
12358 to accommodate latest gnulib.
12359
12360 * tests/glr-regression.at (Duplicate representation of merged trees):
12361 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
12362
12363 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
12364 needed.
12365
12366 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
12367
12368 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
12369 All uses changed. Invoke user destructor after an error during a
12370 split parse (trivial change from Joel E. Denny).
12371
12372 * tests/glr-regression.at
12373 (User destructor after an error during a split parse): New test case.
12374 Problem reported by Joel E. Denny in:
12375 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
12376
12377 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
12378
12379 * README-cvs: Give URLs for recommended tools.
12380 Mention Gzip version problem, and bootstrapping issues.
12381 Remove troubleshooting section, as it's somewhat obsolete.
12382
12383 * bootstrap (no_cache): New var, to accommodate different wget
12384 variants. Use it instead of '-C off'. Problem reported by
12385 twlevo@xs4all.nl.
12386
12387 * data/glr.c (yydestroyStackItem): New function.
12388 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
12389 debugging information. Problem reported by Joel E. Denny.
12390
12391 2005-08-25 Akim Demaille <akim@epita.fr>
12392
12393 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
12394
12395 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
12396
12397 * data/glr.c (yyrecoverSyntaxError, yyreturn):
12398 Don't invoke destructor on unresolved entries.
12399 * tests/glr-regression.at
12400 (User destructor for unresolved GLR semantic value): New test case.
12401 Problem reported by Joel E. Denny in:
12402 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
12403
12404 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
12405
12406 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
12407 Add strnlen.c.
12408 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
12409 lib-prefix.m4, po.m4.
12410
12411 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
12412 in yydestruct diagnostic, since it might not be an error.
12413 Problem reported by Joel Denny near end of
12414 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
12415 * data/lalr1.cc (yyerturn): Likewise.
12416 * data/yacc.c (yyreturn): Likewise.
12417 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
12418
12419 * src/files.c: Remove obsolete FIXME comment.
12420
12421 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
12422 with the other templates, and to fix bogus run-on messages such
12423 as the one reported at the end of
12424 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
12425 All callers changed to avoid the newline.
12426 (yyprocessOneStack): Output two lines rather than one, to accommodate
12427 the above change. This changes the debug output format slightly.
12428
12429 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
12430 reported by Joel E. Denny in
12431 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
12432 (trivial change).
12433 * tests/glr-regression.at (Duplicate representation of merged trees):
12434 New test, from Joel E. Denny in:
12435 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
12436 * THANKS: Add Joel E. Denny.
12437
12438 * configure.ac (AC_INIT): Bump to 2.0c.
12439
12440 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
12441
12442 * NEWS: Version 2.0b.
12443
12444 * Makefile.am (SUBDIRS): Put examples before tests, so that
12445 "make check" doesn't finish with "All 1 tests passed".
12446
12447 * tests/regression.at (Token definitions): Don't rely on
12448 AT_PARSER_CHECK for data that contains backslashes. It currently
12449 uses 'echo', and 'echo' isn't portable if its argument contains
12450 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
12451 that the byte '\0xff' is not printable in the C locale; it is,
12452 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
12453 not printable, so use '\0x81' to test.
12454
12455 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
12456 version of GCC, since the macro is used with non-GCC compilers.
12457
12458 Fix core dump reported by Pablo De Napoli in
12459 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
12460 * tests/regression.at (Invalid inputs with {}): New test.
12461 * src/parse-gram.y (token_name): Translate type before using
12462 it as an index.
12463
12464 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
12465 the user's name space. All uses changed to __attribute__
12466 ((__unused__)).
12467 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
12468 Add __attribute__ ((__noreturn__)).
12469
12470 * etc/clcommit: Remove. We weren't using it, and it failed
12471 "make maintainer-distcheck".
12472 * Makefile.maint: Merge from coreutils.
12473 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
12474 (syntax-check-rules): Change list of rules as described below.
12475 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
12476 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
12477 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
12478 (sc_trailing_space): New rules.
12479 (sc_xalloc_h_in_src): Remove.
12480 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
12481 (sc_space_tab, sc_error_exit_success, sc_changelog):
12482 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
12483 (makefile-check, po-check, author_mark_check):
12484 (makefile_path_separator_check, copyright-check):
12485 Use grep -n, to make it easier to find violations.
12486 Use CVS_LIST and CVS_LIST_EXCEPT.
12487 (header_regexp, h_re): Remove.
12488 (dd_c): New macro.
12489 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
12490 (my-distcheck): Use more-modern GCC flags.
12491 (signatures, %.asc): Remove.
12492 (rel-files, announcement): Remove signatures.
12493 Restore old updating code, even though we don't use it, so
12494 that we're the same as coreutils.
12495 (alpha, beta, major): Depend on news-date-check.
12496 Make the upload commands.
12497
12498 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
12499 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
12500 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
12501 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
12502 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
12503 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
12504 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
12505 * tests/sets.at: Likewise.
12506
12507 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
12508 we comment out the Autoconf version number.
12509 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
12510 it's error-prone and "make maintainer-distcheck" rejects it.
12511
12512 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
12513 Indent calls to "error" to pacify "make maintainer-distcheck",
12514 when the calls are not intended to be translated.
12515 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
12516
12517 * src/Makefile.am (DEFS): Use +=, to pacify
12518 "make maintainer-distcheck".
12519 (bison_SOURCES): Add scan-skel.h.
12520 (sc_tight_scope): New rule, from coreutils.
12521
12522 * src/files.c (src_extension, header_extension):
12523 Now static, not extern.
12524 * src/getargs.c (short_options): Likewise.
12525 * src/muscle_tab.c (muscle_table): Likewise.
12526 * src/parse-gram.y (current_class, current_type, current_prec):
12527 Likewise.
12528 * src/reader.c (grammar_end, previous_rule_end): Likewise.
12529 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
12530 * src/main.c (main): Cast bindtextdomain and textdomain calls to
12531 void, to avoid warning when NLS is disabled.
12532 * src/output.c: Include scan-skel.h.
12533 (scan_skel): Remove decl, since scan-skel.h does this.
12534 (output_skeleton):
12535 Indent calls to "error" to pacify "make maintainer-distcheck".
12536 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
12537 * src/reader.h (gram_end, gram_lineno): New decls to pacify
12538 "make maintainer-distcheck".
12539 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
12540 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
12541 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
12542 (skel_lex_destroy, scan_skel): Move these decls to...
12543 * src/scan-skel.h: New file.
12544 * src/uniqstr.c (uniqstr_assert):
12545 Indent calls to "error" to pacify "make maintainer-distcheck".
12546
12547 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
12548 not @VAR@.
12549
12550 * tests/torture.at: Revamp to avoid misuse of atoi that
12551 "make maintainer-distcheck" complained about.
12552
12553 * examples/extexi (message): Don't print a message more than once,
12554 and omit line-number decoration that makes Emacs compile think
12555 that informative messages are worth worrying about.
12556
12557 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
12558
12559 * configure.ac: Update version number.
12560
12561 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
12562 accidentally.
12563 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
12564 autogenerated by the maintainer.
12565 * examples/calc++/.cvsignore: Add *.yy.
12566
12567 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
12568 * lib/bitset_stats.c (bitset_stats_init): Likewise.
12569 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12570
12571 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
12572
12573 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
12574 from maintainer-distcheck about casting the argument of 'free'.
12575
12576 * NEWS: Mention recent yytname changes.
12577 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
12578
12579 * bootstrap: For translations that have not yet been upgraded to
12580 the new runtime-po domain, prime the pump by extracting the
12581 relevant strings from the obsolete translations. This code can be
12582 removed once the bison-runtime domain has been translated by each
12583 team.
12584
12585 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
12586 now that token names are already quoted.
12587
12588 Fix problem reported by Anthony Heading.
12589 * data/glr.c (YYTOKEN_TABLE): New macro.
12590 (yytname): Define if YYTOKEN_TABLE.
12591 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
12592 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
12593 (YYERROR_VERBOSE): Define the same way the other skeletons do.
12594 * src/output.c (prepare_symbols): Output token_table_flag.
12595
12596 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
12597
12598 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
12599 again if the first call fails.
12600
12601 * data/glr.c (yytnamerr): New function.
12602 (yyreportSyntaxError): Use it to dequote most string literals.
12603 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
12604 with other skeletons. All uses changed.
12605 (yytnameerr_): New function.
12606 (yyreport_syntax_error): Use it to dequote most string literals.
12607 * data/yacc.c (yytnamerr): New function.
12608 (yyerrlab): Use it to decode most string literals.
12609 * doc/bison.texinfo (Decl Summary, Calling Convention):
12610 Clarify quoting convention of yytname.
12611 * src/output.c (prepare_symbols): Quote all names. This undoes
12612 the 2005-04-17 change, which is now accomplished (mostly) via
12613 changes in the parsers as described above.
12614 * tests/regression.at (Token definitions, Web2c Actions):
12615 Undo most 2005-04-17 change here, too.
12616
12617 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
12618
12619 Fix more problems reported by twlevo@xs4all.nl.
12620 * tests/cxx-type.at: Don't pipe output of ./types through sed to
12621 remove trailing spaces. This loses the exit status of ./types,
12622 and isn't needed since ./types shouldn't be emitting trailing
12623 spaces.
12624 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
12625 as the stack isn't valid in that case.
12626
12627 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
12628 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
12629 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
12630 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
12631 is used.
12632 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
12633 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
12634 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
12635 Likewise.
12636
12637 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
12638 overly-picky compilers that reject 'char *foo = "bar";'.
12639
12640 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
12641 to FILE * parameter, not to stderr. This fixes a typo introduced
12642 in the 2005-07-12 change.
12643
12644 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
12645 warnings from GCC 4.
12646
12647 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
12648 (yyglrShiftDefer, yysplitStack):
12649 Remove unused parameters b4_pure_formals. All uses changed.
12650 (yyglrShift): Remove unused parameters b4_user_formals.
12651 All uses changed.
12652 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
12653
12654 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
12655
12656 Destructor cleanups and regularization among the three skeletons.
12657 * NEWS: Document the behavior changes.
12658 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
12659 stack before failing, as the cleanup code will do it for us now.
12660 * data/lalr1.cc (yyerrlab): Likewise.
12661 * data/glr.c (yyparse): Pop everything off the stack before
12662 freeing it, so that destructors get called properly.
12663 * data/lalr1.cc (yyreturn): Likewise.
12664 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
12665 This is more consistent.
12666 * doc/bison.texinfo (Destructor Decl): Mention more reasons
12667 why destructors might be called. 1.875 -> 2.1.
12668 (Destructor Decl, Decl Summary, Table of Symbols):
12669 Some English-language cleanups for %destructor.
12670 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12671 Add output line for destructor of start symbol.
12672 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
12673 because of that same extra output line.
12674
12675 * NEWS: Document minor wording changes in diagnostics of
12676 Bison-generated parsers.
12677 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
12678 Remove unused formals. All uses changed.
12679 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
12680 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
12681 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
12682 Rename yyoverflowab to yyexhaustedlab.
12683 When memory exhaustion occurs during syntax-error reporting,
12684 report it separately rather than in a single diagnostic; this
12685 eases translation.
12686 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
12687 (Memory Exhausted): Renamed from Parser Stack Overflow.
12688 Revamp wording slightly to prefer "memory exhaustion".
12689 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
12690
12691 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
12692
12693 Add i18n support to the GLR skeleton. Partially fix the C++
12694 skeleton; a C++ expert needs to finish this. Remove debugging
12695 msgids; there's little point to having them translated, since they
12696 can be understood only by someone who can read the
12697 (English-language) source code.
12698
12699 Generate runtime-po/bison-runtime.pot automatically, so that we
12700 don't have to worry about garbage getting in that file. We'll
12701 make sure after the next official release that old msgids don't
12702 get lost. See
12703 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
12704
12705 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
12706 Now auto-generated.
12707 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
12708 Fix typos in explanations of the runtime file.
12709 * bootstrap: Change gettext keyword from YYI18N to YY_.
12710 Use standard Makefile.in.in in runtime-po, since we'll arrange
12711 for backward-compatible bison-runtime.po files in a different way.
12712 * data/glr.c (YY_): New macro, from yacc.c.
12713 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
12714 Translate messages intended for users.
12715 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
12716 the wording in the other skeletons. We don't know that the memory
12717 is virtual.
12718 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
12719 Use same method that yacc.c uses.
12720 Don't translate debugging messages.
12721 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
12722 it doesn't work (yet), and requires C++ expertise to fix.
12723 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
12724 Move defn to a more logical place, to be consistent with other
12725 skeletons.
12726 Don't translate debugging messages.
12727 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
12728 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
12729 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
12730 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
12731
12732 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
12733 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
12734 void, not int.
12735 * tests/glr-regression.at (Badly Collapsed GLR States):
12736 Likewise.
12737 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12738 yylex should return 0 at EOF rather than aborting.
12739
12740 Improve tests for stack overflow in GLR parser.
12741 Problem reported by twlevo@xs4all.nl.
12742 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
12743 All uses removed.
12744 (yyStackOverflow): Just longjmp, but with value 2 so that caller
12745 can handle the problem.
12746 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
12747 (yyparse): New local variable yyresult to record the result.
12748 Use result of setjmp to set it, rather than storing itinto
12749 struct.
12750 (yyDone): Remove label.
12751 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
12752 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
12753 if YYABORT is used).
12754 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
12755 yyparse status; put status > 1 into diagnostic.
12756 Check that status==2 works.
12757 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
12758 Use exit status 3 for failure to open (which shouldn't happen).
12759
12760 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
12761
12762 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
12763 1 on syntax error; just let yyparse do its thing.
12764 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
12765 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
12766 (Exploding the Stack Size with Alloca):
12767 (Exploding the Stack Size with Malloc):
12768 Expect exit status 2, not 1, since the parser is supposed to blow
12769 its stack. Problem reported by twlevo@xs4all.nl.
12770
12771 * data/glr.c (yyparse): Don't assume that the initial calls
12772 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
12773 Print a stack-overflow message and fail instead.
12774 Initialize the line-number information before creating the stack,
12775 so that the stack-overflow message can report line zero safely.
12776
12777 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
12778
12779 Fix problems reported by twlevo@xs4all.nl.
12780 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
12781 (yyuserMerge): Provide a default case if b4_mergers is empty.
12782 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
12783 * tests/glr-regression.at
12784 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12785 Add casts to pacify C++ compilers.
12786 * tests/glr-regression.at (Improper merging of GLR delayed action
12787 sets): Declare yylex before using it.
12788 * tests/Makefile.am (maintainer-check-g++): Fix a stray
12789 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
12790 test for valgrind; valgrind is independent of g++.
12791 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
12792 for compatibility with POSIX 1003.1-2001 (if running coreutils).
12793 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
12794 Use a destructor, so that we can expand the stack. Change
12795 YYSTYPE to char * so that we can free it. Cast result of malloc.
12796
12797 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12798
12799 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
12800 a valgrind failure. Problem reported by twlevo@xs4all.nl.
12801
12802 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
12803
12804 * PACKAGING: New file, suggested by Bruno Haible and taken from
12805 similar wording in gettext's PACKAGING file.
12806 * NEWS: Mention PACKAGING.
12807 * Makefile.am (EXTRA_DIST): Add PACKAGING.
12808
12809 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
12810
12811 * NEWS: Document recent i18n improvements.
12812 * bootstrap: Get runtime translations into runtime-po.
12813 Create runtime-po files automatically, if possible.
12814 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
12815 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
12816 does not infringe on the user's name space.
12817 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
12818 * doc/bison.texinfo (Internationalization): Revamp the English
12819 and Texinfo syntax a bit, to try to make it clearer.
12820 (Bison Options, Option Cross Key): Mention --print-localedir.
12821 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
12822 YYENABLE_NLS. Quote a bit more.
12823 * runtime-po/.cvsignore: New file.
12824 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
12825 * runtime-po/Rules-quot: Remove; now created by bootstrap.
12826 * runtime-po/quot.sed: Likewise.
12827 * runtime-po/boldquot.sed: Likewise.
12828 * runtime-po/en@quot.header: Likewise.
12829 * runtime-po/en@boldquot.header: Likewise.
12830 * runtime-po/insert-header.sin: Likewise.
12831 * runtime-po/remove-potcdate.sin: Likewise.
12832 * runtime-po/Makevars: Likewise.
12833 * runtime-po/LINGUAS: Likewise.
12834 * runtime-po/de.po: Likewise; we will rely on the translation project
12835 to maintain this, so "bootstrap" should get it.
12836 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
12837 its value.
12838 * src/main.c (main): Bind the bison-runtime domain, too.
12839
12840 2005-07-12 Bruno Haible <bruno@clisp.org>
12841
12842 * data/yacc.c: Include <libintl.h> when NLS is enabled.
12843 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
12844 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
12845 * runtime-po: New directory.
12846 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
12847 $(DOMAIN).pot-update rule, so that old messages are never dropped.
12848 * runtime-po/Rules-quot: New file, copied from po/.
12849 * runtime-po/quot.sed: Likewise.
12850 * runtime-po/boldquot.sed: Likewise.
12851 * runtime-po/en@quot.header: Likewise.
12852 * runtime-po/en@boldquot.header: Likewise.
12853 * runtime-po/insert-header.sin: Likewise.
12854 * runtime-po/remove-potcdate.sin: Likewise.
12855 * runtime-po/Makevars: New file.
12856 * runtime-po/POTFILES.in: New file.
12857 * runtime-po/LINGUAS: New file.
12858 * runtime-po/bison-runtime.pot: New file.
12859 * runtime-po/de.po: New file.
12860 * m4/bison.m4: New file.
12861 * Makefile.am (SUBDIRS): Add runtime-po.
12862 (aclocaldir, aclocal_DATA): New variables.
12863 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
12864 Define aclocaldir.
12865 * src/getargs.c (usage): Document --print-localedir option.
12866 (PRINT_LOCALEDIR_OPTION): New enum item.
12867 (long_options): Add --print-localedir option.
12868 (getargs): Handle --print-localedir option.
12869 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
12870 (Internationalization): New section.
12871
12872 2005-07-12 Akim Demaille <akim@epita.fr>
12873
12874 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
12875 for consistency with the rest of the code.
12876 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
12877 Add separators.
12878
12879 2005-07-12 Akim Demaille <akim@epita.fr>
12880
12881 * src/parse-gram.y: Use %printer instead of YYPRINT.
12882
12883 2005-07-12 Akim Demaille <akim@epita.fr>
12884
12885 * src/symtab.h, src/symtab.c (symbol_print): New.
12886 * src/symlist.h, src/symlist.c (symbol_list_print): New.
12887 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
12888
12889 2005-07-12 Akim Demaille <akim@epita.fr>
12890
12891 * data/glr.c (b4_syncline): Fix (swap) the definitions of
12892 b4_at_dollar and b4_dollar_dollar.
12893
12894 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
12895
12896 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
12897 and Pennello's paper.
12898
12899 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
12900
12901 * data/yacc.c (yyparse): Undo previous patch. Instead,
12902 set yylsp[0] and yyvsp[0] only if the initial action
12903 sets yylloc and yylval, respectively.
12904
12905 * data/yacc.c (yyparse): In the initial action, set
12906 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
12907 This avoids the use of undefined variables if the initial
12908 action does not set yylloc and/or yylval.
12909
12910 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
12911
12912 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
12913 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
12914 Remove from CVS. These files are automatically generated.
12915 * examples/extexi: Clarify that this file is now part of Bison,
12916 not GNU M4, and that it works with any POSIX-compatible Awk.
12917 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
12918 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
12919 so that we also get calc++-parser.yy. Geneate it.
12920 Use $(AWK), not gawk, since any conforming Awk will do.
12921 Put comment before action, since older 'make' can't handle comment
12922 in action.
12923 $(BUILT_SOURCES): List all built sources, not just some of them.
12924 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
12925 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
12926 $($(calc_sources_generated)): Remove unnecessary test for existence
12927 of target. (This had a shell syntax error anyway; a stray "x".)
12928 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
12929 calc++-parser.yy.
12930 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
12931
12932 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
12933 implied by the other modules.
12934
12935 2005-07-06 Akim Demaille <akim@epita.fr>
12936
12937 Bind examples/calc++ to the package.
12938 * examples/calc++/Makefile: Remove, replaced by...
12939 * examples/calc++/Makefile.am: ... this new file.
12940 * examples/calc++/test: Remove input.
12941 * examples/calc++/compile: Remove.
12942 * examples/Makefile.am: New.
12943 * configure.ac, Makefile.am: Adjust.
12944 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
12945
12946 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
12947
12948 * data/glr.c (yyFail): Drastically simplify; since the format argument
12949 never had any % directives, we can simply pass it to yyerror.
12950 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
12951 be modified later, as that is the usual style in glr.c.
12952 Problems reported by Paul Hilfinger.
12953
12954 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
12955 and size overflow errors.
12956 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
12957 in case the user prolog sets feature-test macros like _GNU_SOURCE.
12958 (YYSIZEMAX): New macro.
12959 (yystpcpy): New function, taken from yacc.c.
12960 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
12961 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
12962 so that we don't have to maintain their signatures.
12963 (yyFail): Check for buffer overflow, by using vsnprintf rather
12964 than vsprintf. Allocate a bigger buffer if possible.
12965 Report an error if buffer allocation fails.
12966 (yyStackOverflow): New function.
12967 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
12968 the initialization was successful. It might fail if storage was
12969 exhausted.
12970 (yyexpandGLRStack): Add more checks for storage allocation failure.
12971 Use yyStackOverflow to report failures.
12972 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
12973 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
12974 Don't assume stack number fits in int.
12975 (yysplitStack): Check for storage allocation failure.
12976 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
12977 can print diagnostics on storage allocation failure. All callers
12978 changed.
12979 (yyresolveValue): Use yybool for boolean.
12980 (yyreportSyntaxError): Check for size-calculation overflow.
12981 This code is taken from yacc.c.
12982 (yyparse): Check for storage allocation errors when allocating
12983 the initial stack.
12984
12985 2005-07-05 Akim Demaille <akim@epita.fr>
12986
12987 Extract calc++ from the documentation.
12988 * doc/bison.texinfo (Calc++): Add the extraction marks.
12989 * examples/extexi: New, from the aborted GNU Programming 2E.
12990 Separate the different paragraph of a file with empty lines.
12991 * examples/Makefile: Use it to extract the whole calc++ example.
12992
12993 2005-06-24 Akim Demaille <akim@epita.fr>
12994
12995 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
12996 class typedefs.
12997
12998 2005-06-22 Akim Demaille <akim@epita.fr>
12999
13000 * doc/bison.texinfo (C++ Language Interface): First stab.
13001 (C++ Parsers): Remove.
13002
13003 2005-06-22 Akim Demaille <akim@epita.fr>
13004
13005 * data/lalr1.cc (yylex_): Honor %lex-param.
13006
13007 2005-06-22 Akim Demaille <akim@epita.fr>
13008
13009 Start a set of simple examples.
13010 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
13011 * examples/calc++/calc++-driver.hh,
13012 * examples/calc++/calc++-parser.yy,
13013 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
13014 * examples/calc++/compile, examples/calc++/test: New.
13015
13016 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
13017
13018 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
13019 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
13020 which stems from the 2005-05-27 patch.
13021
13022 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
13023
13024 * data/glr.c: Modify treatment of unused parameters to permit use
13025 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
13026
13027 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
13028
13029 Fix infringement on user name space reported by Janos Zoltan Szabo.
13030 * data/yacc.c (yyparse): strlen -> yystrlen.
13031
13032 2005-05-30 Akim Demaille <akim@epita.fr>
13033
13034 * data/lalr1.cc (_): New.
13035 Translate the various messages.
13036
13037 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
13038
13039 Fix infringement on user name space reported by Bruno Haible.
13040 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
13041 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
13042 the user's name space.
13043 (alloca): Include <stdlib.h> to get it, if it's not built in.
13044 (YYMALLOC, YYFREE): Define only if needed.
13045 (malloc, free): Declare, but only if needed, as this infringes on
13046 the user name space.
13047
13048 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
13049
13050 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
13051 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
13052 with %d format.
13053 * lib/ebitset.c (min, max): Undef before defining.
13054 * lib/vbitset.c (min, max): Likewise.
13055 * lib/subpipe.c (create_subpipe): Save local variables in case
13056 vfork clobbers them.
13057
13058 2005-05-24 Bruno Haible <bruno@clisp.org>
13059
13060 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
13061 error message syntax used by gcc-4.0.
13062
13063 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
13064
13065 * README: Mention m4 1.4.3. Remove obsolete advice about
13066 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
13067
13068 * bootstrap: Remove workaround for problem I encountered with
13069 gettext 0.14.1; it seems to be fixed now.
13070
13071 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
13072
13073 * NEWS: Version 2.0a.
13074
13075 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
13076 the previous change.
13077
13078 Various maintainer cleanups.
13079 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
13080 conftest*, for benefit of CVS commands run at the same time as
13081 "configure". Add build-aux, since "bootstrap" now creates it and
13082 its subfiles.
13083 * Makefile.cfg (move_if_change): Remove.
13084 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
13085 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
13086 (po_repo, do-po-update, po-update, wget_files, get-targets):
13087 (config.guess-url_prefix, config.sub-url_prefix):
13088 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
13089 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
13090 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
13091 Remove.
13092 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
13093 this is now the recommended name.
13094 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
13095 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
13096 ylwrap. These files now go into build-aux.
13097 * config/move-if-change: Remove.
13098 * config/prev-version.txt: Bump from 1.75 to 2.0.
13099
13100 * bootstrap: Add stdio-safer, unistd-safer modules.
13101 Remove m4/glibc2.m4 (introduced by latest gnulib, but
13102 we don't need it).
13103 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
13104 fopen-safer.c, stdio-safer.h, unistd-safer.h.
13105 * lib/subpipe.c: Include "unistd-safer.h".
13106 (create_subpipe): Make sure all the newly-created
13107 file descriptors are > 2, so that diagnostics don't
13108 get sent down them (which might cause Bison to hang, in theory).
13109 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
13110 * src/files.c (xfopen): Use fopen_safer, not fopen.
13111
13112 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
13113 yesterday's yacc.c fix.
13114
13115 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
13116
13117 * data/glr.c, data/lalr1.cc: Update copyright date.
13118
13119 Fix a destructor bug reported by Wolfgang Spraul in
13120 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
13121 * data/yacc.c (yyabortlab): Don't call destructor, and
13122 don't set yychar to EMPTY.
13123 (yyoverflowlab): Don't call destructor.
13124 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
13125 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
13126 since we no longer output the message "discarding lookahead token
13127 end of input ()".
13128
13129 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13130
13131 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
13132 fix a small glitch in debugging output.
13133 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
13134 after YY_SYMBOL_PRINT where needed.
13135
13136 (struct yyGLRState): Add some comments.
13137 (struct yySemanticOption): Add some comments.
13138 (union yyGLRStackItem): Add comment.
13139
13140 (yymergeOptionSets): Correct this to properly perform the union,
13141 avoiding infinite reported by Michael Rosien.
13142 Update comment.
13143
13144 * tests/glr-regression.at: Add test for GLR merging error reported
13145 by M. Rosien.
13146
13147 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
13148
13149 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
13150 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
13151 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
13152 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
13153 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
13154 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
13155 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
13156 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
13157 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
13158 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
13159 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
13160 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
13161 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
13162 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
13163 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
13164 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
13165 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
13166 src/derives.h, src/files.c, src/files.h, src/getargs.c,
13167 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
13168 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
13169 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
13170 src/output.h, src/parse-gram.c, src/parse-gram.h,
13171 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
13172 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
13173 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
13174 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
13175 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
13176 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
13177 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
13178 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
13179 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
13180 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
13181 tests/reduce.at, tests/regression.at, tests/sets.at,
13182 tests/synclines.at, tests/testsuite.at, tests/torture.at:
13183 Update FSF postal mail address.
13184
13185 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
13186
13187 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
13188 Problem reported by Ralf Menzel.
13189
13190 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
13191
13192 * tests/actions.at: Test that stack overflow invokes destructors.
13193 From Marcus Holland-Moritz.
13194 * data/yacc.c (yyerrlab): Move the code that destroys the stack
13195 from here....
13196 (yyreturn): to here. That way, destructors are called properly
13197 even if the stack overflows, or the user calls YYACCEPT or
13198 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
13199 (yyoverflowlab): Destroy the lookahead.
13200
13201 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
13202
13203 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
13204
13205 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
13206
13207 * NEWS: Bison-generated C parsers no longer quote literal strings
13208 associated with tokens.
13209 * src/output.c (prepare_symbols): Don't escape strings,
13210 since users don't want to see C escapes.
13211 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
13212 in diagnostics.
13213 * tests/input.at (Torturing the Scanner): Likewise.
13214 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
13215
13216 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
13217
13218 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
13219 the data size is known to be too small and we can't increase it.
13220 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
13221
13222 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
13223
13224 * src/parse-gram.y: Include quotearg.h.
13225 (string_as_id): Quote $1 before using it as a key, since the
13226 lexer no longer quotes it for us.
13227 (string_content): Don't strip quotes, since lexer no longer
13228 quotes it for us.
13229 * src/scan-gram.l: Include quotearg.h.
13230 ("\""): Omit quote.
13231 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
13232 a key, since the rest of the lexer doesn't quote it.
13233 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
13234 * tests/regression.at (Token definitions): Check for backslashes
13235 in token strings.
13236
13237 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
13238 (YYSIZE_T): Define to unsigned long int when using an older compiler.
13239 (yyparse): Revamp code to generate long syntax error message, to
13240 make it easier to translate, and to avoid problems with arithmetic
13241 overflow. Change "virtual memory" to "memory" in diagnostic, since
13242 we don't know whether the memory is virtual.
13243
13244 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
13245
13246 * NEWS: Bison-generated C parsers now use the _ macro to
13247 translate strings.
13248 * data/yacc.c (_) [!defined _]: New macro.
13249 All English strings wrapped inside this macro.
13250 * doc/bison.texinfo (Bison Parser): Document _.
13251 * po/POTFILES.in: Include src/parse-gram.c, since it now
13252 includes translateable strings that parse-gram.y doesn't.
13253
13254 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
13255
13256 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
13257 reverting the 2004-10-11 change to this function.
13258 (symbol_check_alias_consistency): Don't call symbol_type_set
13259 if the type name is already correct.
13260 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
13261
13262 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
13263
13264 * tests/regression.at (Token definitions): Don't use a token named
13265 c, as that generates a "#define c ..." that runs afoul of buggy
13266 stdlib.h that uses the identifier c as a member of struct
13267 drand48_data. Problem reported by Horst Wente.
13268
13269 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
13270
13271 * bootstrap: Change translation URL from
13272 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
13273 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
13274 redirection glitches. Problem reported by twlevo@xs4all.nl.
13275
13276 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
13277
13278 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
13279 after operands; POSIX says this isn't portable for the c99 command.
13280
13281 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
13282
13283 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
13284 immediately if a data overrun has occurred; this may help us track
13285 down what may be a spurious failure on MacOS.
13286
13287 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
13288
13289 Respond to problems reported by twlevo@xs4all.nl.
13290
13291 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
13292
13293 * src/vcg.h: Comment fix.
13294 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
13295 (G_CMAX): Change to -1 instead of INT_MAX.
13296
13297 * data/yacc.c (yyparse): Omit spaces before #line.
13298
13299 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
13300
13301 * src/tables.c (state_number_to_vector_number): Put it inside an
13302 "#if 0", since it's not currently used. Problem reported by
13303 Roland McGrath.
13304
13305 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
13306
13307 * src/output.c (escaped_output): Renamed from
13308 escaped_file_name_output, since we now use it for symbol tags as
13309 well. All uses changed.
13310 (symbol_destructors_output, symbol_printers_output):
13311 Escape symbol tags too.
13312 Problem reported by Matyas Forstner in
13313 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
13314
13315 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
13316 not needed.
13317 * src/output.c (user_actions_output, token_definitions_output,
13318 symbol_destructors_output, symbol_printers_output): Likewise.
13319 * src/reader.c (prologue_augment): Likewise.
13320 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
13321
13322 * src/vcg.c (output_edge): Don't quote linestyle arg.
13323 Problem reported by twlevo@xs4all.nl.
13324
13325 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
13326
13327 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
13328 example, reported by Derek M Jones. Also, make the example even
13329 more outrageous, to better illustrate how bad the problem is.
13330
13331 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
13332
13333 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
13334 putsym. Typo reported by Sebastian Piping.
13335
13336 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
13337
13338 * doc/bison.texinfo (Language and Grammar): some -> same
13339 (Epilogue): int he -> in the
13340 Typos reported by Sebastian Piping via Justin Pence.
13341
13342 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
13343
13344 * tests/glr-regression.at (Improper handling of embedded actions
13345 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
13346 embedded actions and $-N in GLR parsers", work around an Autoconf bug
13347 with dollar signs in test names.
13348 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
13349 for a similar reason.
13350
13351 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
13352
13353 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
13354 wants to redefine G_VIEW.
13355
13356 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
13357
13358 * src/vcg.c (get_view_str): Remove case for normal_view.
13359 Problem reported by twlevo@xs4all.nl.
13360
13361 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
13362
13363 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
13364 Problem reported by twlevo@xs4all.nl.
13365
13366 * doc/bison.texinfo: Change @dircategory from "GNU programming
13367 tools" to "Software development". Requested by Richard Stallman
13368 via Karl Berry.
13369
13370 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
13371
13372 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
13373 Problem reported by twlevo@xs4all.nl.
13374
13375 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
13376
13377 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
13378 keyword; it's not needed with modern compilers, and it doesn't
13379 affect correctness with older compilers. Suggested by
13380 twlevo@xs4all.nl.
13381
13382 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
13383
13384 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
13385 gcc -Wswitch-default.
13386 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13387 * data/yacc.c (yyparse): Likewise.
13388
13389 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
13390
13391 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
13392 already. Let config.h define any nonstandard values.
13393
13394 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
13395
13396 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
13397 for the benefit of slower hosts. Problem reported by
13398 Nelson H. F. Beebe.
13399
13400 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
13401
13402 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
13403 being defined and not used.
13404 * data/lalr1.cc (yyparse): Likewise.
13405 Use "if (false)" rather than "if (0)".
13406
13407 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
13408
13409 * TODO: Mention that we should allow NUL bytes in tokens.
13410
13411 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
13412
13413 * src/scan-skel.l (<<EOF>>): Don't close standard output.
13414 Problem reported by Hans Aberg.
13415
13416 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
13417
13418 * src/getargs.c (version): Happy new year; update overall
13419 program copyright date from 2004 to 2005.
13420
13421 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
13422 Problem reported by Hans Aberg.
13423 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
13424 (Output file names.): Add a test for the case when standard output
13425 is closed.
13426
13427 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
13428
13429 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
13430 to fix an oversight in the Bison 2.0 manual.
13431
13432 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
13433
13434 * NEWS: Version 2.0. Reformat the existing news items since
13435 1.875, so that related items are grouped together.
13436 * configure.ac (AC_INIT): Bump version to 2.0.
13437 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
13438
13439 * tests/torture.at (Exploding the Stack Size with Alloca): Set
13440 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
13441 otherwise, we're not testing alloca. Unfortunately there's no
13442 simple way to consult HAVE_ALLOCA here.
13443
13444 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
13445 for yymsg, too.
13446
13447 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
13448 hand. This avoids a warning about comparing int to size_t when
13449 GCC warnings are enabled.
13450
13451 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
13452
13453 * NEWS: Bison-generated parsers no longer default to using the
13454 alloca function (when available) to extend the parser stack, due
13455 to widespread problems in unchecked stack-overflow detection.
13456 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
13457 responsibility to set it to a positive value. This lets the user
13458 specify a value that is not a preprocessor constant.
13459 * data/yacc.c (YYMAXDEPTH): Likewise.
13460 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
13461 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
13462 to be a compile-time constant. However, explain the constraints on it.
13463 Also, explain the constraints on YYINITDEPTH.
13464 (Table of Symbols): Explain that alloca is no longer the default.
13465 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
13466 to 1.
13467
13468 * doc/bison.texinfo (Location Default Action): Mention that n must
13469 be zero when k is zero. Suggested by Frank Heckenbach.
13470
13471 2004-12-22 Akim Demaille <akim@epita.fr>
13472
13473 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
13474 (parser::state_type, parser::semantic_type, parser::location_type):
13475 Private, not public.
13476 (parser::parse): Return ints, not bool.
13477 Returning a bool introduces a problem: 0 corresponds to false, and
13478 it seems weird to return false on success. Returning true changes
13479 the conventions for yyparse.
13480 Alternatively we could return void and send an exception.
13481 There is no clear consensus (yet?).
13482 (state_stack, semantic_stack, location_stack): Rename as...
13483 (state_stack_type, semantic_stack_type, location_stack_type): these.
13484 Private, not public.
13485 * tests/c++.at: New.
13486 * tests/testsuite.at, tests/Makefile.am: Adjust.
13487
13488 2004-12-21 Akim Demaille <akim@epita.fr>
13489
13490 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
13491
13492 2004-12-21 Akim Demaille <akim@epita.fr>
13493
13494 Don't impose std::string for filenames.
13495
13496 * data/lalr1.cc (b4_filename_type): New.
13497 (position::filename): Use it.
13498 (parser.hh): Move the inclusion of stack.hh and location.hh below
13499 the user code, so that needed headers for the filename type can be
13500 included first.
13501 Forward declare them before the user code.
13502 * tests/Makefile.am (check-local, installcheck-local): Pass
13503 TESTSUITEFLAGS to the TESTSUITE.
13504
13505 2004-12-20 Akim Demaille <akim@epita.fr>
13506
13507 Use more STL like names: my_class instead of MyClass.
13508
13509 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
13510 (SemanticStack, SemanticType, StateStack, StateType)
13511 (TokenNumberType, Stack, Slice, Traits, Parser::location)
13512 (Parser::value): Rename as...
13513 (location_stack, location_type, rhs_number_type, semantic_stack)
13514 (semantic_type, state_stack, state_type, token_number_type, stack)
13515 (slice, traits, parser::yylloc, parser::yylval): these.
13516
13517 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
13518
13519 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
13520
13521 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
13522 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13523
13524 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
13525
13526 Remove uses of 'short int' and 'unsigned short int'. This raises
13527 some arbitrary limits. It uses more memory but nowadays that's
13528 not much of an issue.
13529
13530 This change does not affect the generated parsers; that's a different
13531 task, as some users will want to conserve memory there.
13532
13533 Ideally we should use size_t to represent all object counts, and
13534 something like ptrdiff_t to represent signed differences of object
13535 counts; but that will require more code-cleanup than I have the
13536 time to do right now.
13537
13538 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
13539 Use size_t, not int or short int, to count objects.
13540 * src/closure.c (nritemset, closure): Likewise.
13541 * src/closure.h (nritemset, closure): Likewise.
13542 * src/nullable.c (nullable_compute): Likewise.
13543 * src/print.c (print_core): Likewise.
13544 * src/print_graph.c (print_core): Likewise.
13545 * src/state.c (state_compare, state_hash): Likewise.
13546 * src/state.h (struct state): Likewise.
13547 * src/tables.c (default_goto, goto_actions): Likewise.
13548
13549 * src/gram.h (rule_number, rule): Use int, not short int.
13550 * src/output.c (prepare_rules): Likewise.
13551 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
13552 errs, reductions): Likewise.
13553 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
13554 Likewise.
13555 * src/tables.c (vector_number, tally, action_number,
13556 ACTION_NUMBER_MINIMUM): Likewise.
13557 * src/output.c (muscle_insert_short_int_table): Remove.
13558
13559 2004-12-17 Akim Demaille <akim@epita.fr>
13560
13561 * data/lalr1.cc: Extensive Doxygenation.
13562 (error_): Rename as...
13563 (error): this, since it is visible to the user.
13564 Adjust callers.
13565 (Parser::message): Now an automatic variable from...
13566 (Parser::yyreport_syntax_error_): here.
13567 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
13568 Parser::error.
13569 * tests/input.at: Escape $.
13570
13571 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
13572
13573 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
13574 Parenthesize rhs to avoid obscure problems with mistakes like
13575 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
13576 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13577 b4_rhs_location): Likewise.
13578 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13579 b4_rhs_location): Likewise.
13580
13581 2004-12-16 Akim Demaille <akim@epita.fr>
13582
13583 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
13584 yacc.c: be sure to stay within yycheck_.
13585 * tests/actions.at: Re-enable C++ tests.
13586
13587 2004-12-16 Akim Demaille <akim@epita.fr>
13588
13589 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
13590 real.
13591
13592 2004-12-16 Akim Demaille <akim@epita.fr>
13593
13594 Use #define to handle the %name-prefix.
13595
13596 * data/glr.c, data/yacc.c: Comment changes.
13597 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
13598 so that one can refer to yylex in the parser file, and have it
13599 renamed, as is the case with other skeletons.
13600
13601 2004-12-16 Akim Demaille <akim@epita.fr>
13602
13603 Move lalr1.cc internals into yy*.
13604
13605 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
13606 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
13607 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
13608 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
13609 (empty_, final_, terror_, errcode_, ntokens_)
13610 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
13611 (looka_, ilooka_, error_range_, nerrs_):
13612 Rename as...
13613 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
13614 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
13615 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
13616 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
13617 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
13618 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
13619 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
13620 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
13621 these.
13622
13623 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
13624
13625 Fix some problems reported by twlevo at xs4all.
13626 * src/symtab.c (symbol_new): Report an error if the input grammar
13627 contains too many symbols. This is better than calling abort() later.
13628 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
13629 (struct node, struct graph):
13630 Rename member expand to stretch. All uses changed.
13631 (struct graph): Remove member layoutalgorithm. All uses removed.
13632 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
13633 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
13634 All uses changed.
13635 (N_STRETCH): Rename from N_EXPAND. All uses changed.
13636
13637 2004-12-15 Akim Demaille <akim@epita.fr>
13638
13639 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
13640 Add more Doxygen comments.
13641 (symprint_, stack_print_, reduce_print_, destruct_, pop)
13642 (report_syntax_error_, translate_): Rename as...
13643 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
13644 (yypop_, yyreport_syntax_error_, yytranslate_): this.
13645
13646 2004-12-15 Akim Demaille <akim@epita.fr>
13647
13648 * data/lalr1.cc (lex_): Rename as...
13649 (yylex_): this.
13650 Move the trace here.
13651 Take the %name-prefix into account.
13652 Reported by Alexandre Duret-Lutz.
13653
13654 2004-12-15 Akim Demaille <akim@epita.fr>
13655
13656 Simplify the C++ parser constructor.
13657
13658 * data/lalr1.cc (debug_): Rename as...
13659 (yydebug_): so that the parser's internals are always in the yy*
13660 pseudo namespace.
13661 Adjust uses.
13662 (b4_parse_param_decl): Remove the leading comma as it is now only
13663 called as unique argument list.
13664 (Parser::Parser): Remove the constructor accepting a location and
13665 an initial debugging level.
13666 Remove from the other ctor the argument for the debugging level.
13667 (debug_level_type, debug_level, set_debug_level): New.
13668
13669 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
13670 constructor calls.
13671
13672 2004-12-15 Akim Demaille <akim@epita.fr>
13673
13674 Remove b4_root related material: failure experiment
13675 (which goal was to allow to derive from a class).
13676
13677 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
13678 definitions and uses.
13679
13680 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
13681
13682 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
13683 not 2, since it's not portable to subtract 1 from the start of an
13684 array. The new item 0 is never set or used. All uses changed.
13685
13686 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
13687 the default definition of YYLLOC_DEFAULT. Problem reported
13688 by Frank Heckenbach.
13689
13690 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
13691
13692 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
13693 the normal case and one for the error case. Just use the
13694 first one uniformly. Problem reported by Frank Heckenbach.
13695 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
13696 use exactly the same macro in both places.
13697 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
13698 so that the normal-case YYRHSLOC works for the error case too.
13699 All uses changed.
13700 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
13701 (YYLLOC_DEFAULT): Use the same macro as glr.c.
13702 * doc/bison.texinfo (Location Default Action): Don't claim that
13703 we have an array of locations. Use the same macro for both glr
13704 and lalr parsers. Mention YYRHSLOC. Mention what happens when
13705 the index is 0.
13706
13707 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13708
13709 * HACKING: Update email addresses to send announcements to.
13710
13711 * configure.ac (AC_INIT): Bump version to 1.875f.
13712
13713 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13714
13715 * NEWS: Version 1.875e.
13716 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
13717
13718 * src/scan-skel.l: Include "complain.h", for "fatal".
13719
13720 * src/relation.h (relation_print, relation_digraph):
13721 Relation sizes are of type relation_node, not size_t (this is
13722 merely a doc fix, since the two types are equivalent).
13723 (relation_transpose): Relation sizes are of type relation_node,
13724 not int.
13725 * src/relation.c: Likewise.
13726 (top, infinity): Now of type relation_node, not int.
13727 (traverse, relation_transpose): Use relation_node, not int.
13728
13729 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
13730 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
13731 (yyparse): Remove unused local introduced in 2004-10-25 patch.
13732
13733 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
13734 specifying whether the test should be skipped. Use it tp
13735 specify that the [%defines %skeleton "lalr1.cc"] tests currently
13736 fail on some hosts, and should be skipped.
13737
13738 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
13739
13740 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
13741 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
13742 unless otherwise specified below.
13743
13744 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
13745 to allocate kernel_base, kernel_items, kernel_size, since
13746 they needn't be initialized to 0.
13747 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
13748 * src/closure.c (new_closure): Likewise, for itemset.
13749 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
13750 * src/lalr.c (set_goto_map): Likewise, for temp_map.
13751 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
13752 (build_relations): Likewise for edge, states1, includes.
13753 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
13754 * src/reader.c (packgram): Likewise, for ritem, rules.
13755 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
13756 * src/relation.c (relation_digraph): Likewise for VERTICES.
13757 (relation_transpose): Likewise for new_R, end_R.
13758 * src/symtab.c (symbols_token_translations_init): Likewise for
13759 token_translations.
13760 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
13761 (token_actions): Likewise for yydefact, actrow, conflrow,
13762 conflict_list.
13763 (save_column): Likewise for froms[symno], tos[symno].
13764 (goto_actions): Likewise for state_count.
13765 (pack_table): Likewise for base, pos, check.
13766 (tables_generate): Likewise for width.
13767
13768 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
13769 for initial core. Just have a separate core, so we needn't worry
13770 about whether kernel_size and kernel_base are initialized.
13771
13772 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
13773 kernel_size, kernel_items): Remove unnecessary initialization.
13774 * src/conflicts.c (conflicts): Likewise.
13775 * src/derives.c (derives): Likewise.
13776 * src/muscle_tablc (muscle_insert): Likewise.
13777 * src/relation.c (relation_digraph): Likewise.
13778 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
13779 conflrow, conflict_table, conflict_list, table, check):
13780 Likewise.
13781
13782 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
13783 This is because all callers pass unsigned int.
13784 * src/closure.h (new_closure): Likewise.
13785
13786 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
13787 (build_relations): Initialize includes[i] in all cases.
13788 * src/reader.c (packgram): Always initialize rules[ruleno].prec
13789 and rules[ruleno].precsym. Initialize members in order.
13790 * src/relation.c (relation_transpose): Always initialize new_R[i]
13791 and end_R[i].
13792 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
13793
13794 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
13795 conflict_list[0] was always 0, but now it isn't initialized.
13796
13797 * src/table.c (table_grow): When conflict_table grew, the grown
13798 area wasn't cleared. Fix this.
13799
13800 * lib/.cvsignore: Add strdup.c, strdup.h.
13801 * m4/.cvsignore: Add strdup.m4.
13802
13803 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
13804
13805 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
13806 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
13807 GOTO_NUMBER_MAXIMUM, since we occasionally compute
13808 ngotos + 1 without checking for overflow.
13809 (build_relations): Use END_NODE, not -1, to denote end of edges.
13810 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
13811 build_relations): Use goto_number, not int, for goto numbers.
13812 * src/tables.c (save_column, default_goto): Likewise.
13813
13814 2004-11-23 Akim Demaille <akim@epita.fr>
13815
13816 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
13817 of #defining from yystype.
13818 Don't typedef yystype, C++ does not need it.
13819 This lets it possible to forward declare it as union.
13820
13821 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
13822
13823 * bootstrap (gnulib_modules): Add extensions.
13824 Problem reported by Jim Meyering.
13825
13826 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
13827
13828 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
13829 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
13830 src/system.h, src/tables.c: XFREE -> free, to accommodate
13831 recent change to gnulib xalloc.h.
13832 Problem reported by Jim Meyering.
13833
13834 2004-11-17 Akim Demaille <akim@epita.fr>
13835
13836 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
13837
13838 2004-11-17 Akim Demaille <akim@epita.fr>,
13839 Alexandre Duret-Lutz <adl@gnu.org>
13840
13841 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
13842 changes.
13843 (YYCDEBUG): Adjust.
13844 Use it instead of cdebug_.
13845 (Parser::debug_stream, Parser::set_debug_stream): New.
13846 (Parser::symprint_): Define cdebug_ for temporary backward
13847 compatibility.
13848 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
13849 debug_stream ().
13850
13851 2004-11-17 Akim Demaille <akim@epita.fr>
13852
13853 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
13854 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
13855 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
13856 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13857
13858 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
13859
13860 * data/glr.c (yyloc_default): Remove; not used.
13861 Problem reported by Frank Heckenbach.
13862
13863 2004-10-25 Akim Demaille <akim@epita.fr>
13864
13865 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
13866 Introduce another definition to address simple location arrays.
13867 (yyGLRStack): New member: yyerror_range.
13868 (yyrecoverSyntaxError, yyparse): Update it.
13869 (yyrecoverSyntaxError): Use it when shifting the error token to
13870 have an accurate range, equivalent to the one computed by both
13871 yacc.c and lalr1.cc.
13872 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
13873 that column numbers start at column 0, as per GNU Coding
13874 Standards, the others tests, and the doc.
13875 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
13876 Adjust to the above change (first column is 0).
13877 And adjust the location of the "<error>", now covering the whole
13878 line.
13879
13880 2004-10-22 Akim Demaille <akim@epita.fr>
13881 and Paul Eggert <eggert@cs.ucla.edu>
13882
13883 Remove some arbitrary limits on goto numbers and relations.
13884 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
13885 initial values, since they're never used.
13886 (set_goto_map): ngotos is now unsigned, so test for overflow
13887 by seeing whether it wraps around to zero.
13888 * src/lalr.h (goto_number): Now size_t, not short int.
13889 (GOTO_NUMBER_MAXIMUM): Remove.
13890 * src/relation.c (relation_print, traverse, relation_transpose):
13891 Check for END_NODE rather than looking at sign.
13892 * src/relation.h (END_NODE): New macro.
13893 (relation_node): Now size_t, not short int.
13894
13895 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
13896
13897 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
13898 keyword, not an identifier. Problem reported by Baron Schwartz in
13899 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
13900
13901 2004-10-11 Akim Demaille <akim@epita.fr>
13902
13903 * src/symtab.c (symbol_check_alias_consistency): Also check
13904 type names, destructors, and printers.
13905 Reported by Alexandre Duret-Lutz.
13906 Recode the handling of associativity and precedence in terms
13907 of symbol_precedence_set.
13908 Accept no redeclaration at all, not even equal to the previous
13909 value.
13910 (redeclaration): New.
13911 Use it to factor redeclaration complaints.
13912 (symbol_make_alias): Don't set the type of the alias, let
13913 symbol_check_alias_consistency do it as for other features.
13914 * src/symtab.h (symbol): Add new member prec_location, and
13915 type_location.
13916 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
13917 * tests/input.at (Incompatible Aliases): New.
13918
13919 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
13920
13921 .cvsignore fixes to accommodate gnulib changes,
13922 and the practice of naming build directories "_build".
13923 * .cvsignore: Add "_*". Sort.
13924 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
13925 * m4/.cvsignore: Add "*_gl.m4".
13926
13927 2004-10-06 Akim Demaille <akim@epita.fr>
13928
13929 * src/parse-gram.y (add_param): Fix the truncation of trailing
13930 spaces.
13931
13932 2004-10-05 Akim Demaille <akim@epita.fr>
13933
13934 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
13935 whether the reducion was empty or not. This leaves room to
13936 improve the use of YYLLOC_DEFAULT in such a case.
13937 lalr1.cc is still experimental, so changing this is acceptable.
13938 And finally, there are probably not many users who changed the
13939 handling of locations in GLR, so changing is admissible too.
13940
13941 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
13942 empty reduction, set @$ to an empty location ending the previously
13943 stacked symbol.
13944 Adjust uses to make sure the code is triggered on empty
13945 reductions.
13946 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
13947 expected output: empty reductions have empty locations.
13948
13949 2004-09-29 Akim Demaille <akim@epita.fr>
13950
13951 * data/lalr1.cc: Move towards a more standard C++ coding style
13952 for templates: Class < T > -> Class<T>.
13953
13954 2004-09-29 Akim Demaille <akim@epita.fr>
13955
13956 * data/lalr1.cc: Reinstall the former ctor, for sake of
13957 compatibility, but warn it will be removed.
13958 Move towards a more standard C++ coding style (i.e., type *var ->
13959 type* var).
13960
13961 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
13962
13963 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
13964 since it's less likely to work if NULs are involved in the future.
13965
13966 2004-09-27 Akim Demaille <akim@epita.fr>
13967
13968 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
13969
13970 2004-09-27 Akim Demaille <akim@epita.fr>
13971
13972 * data/lalr1.cc (b4_parse_param_decl_1): New.
13973 (b4_parse_param_decl): Use it to have different names between attribute
13974 and argument names.
13975 (b4_cc_constructor_call): Likewise.
13976
13977 2004-09-24 Akim Demaille <akim@epita.fr>
13978
13979 * src/parse-gram.y (add_param): Strip the leading and trailing
13980 blanks from a formal argument declaration.
13981 (YY_LOCATION_PRINT): New.
13982
13983 2004-09-24 Akim Demaille <akim@epita.fr>
13984
13985 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
13986 after the location.
13987
13988 2004-09-24 Akim Demaille <akim@epita.fr>
13989
13990 * doc/bison.texinfo (Table of Symbols): Sort.
13991
13992 2004-09-21 Akim Demaille <akim@epita.fr>
13993
13994 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
13995 the useless parentheses.
13996 Suggested by Paul Eggert.
13997
13998 2004-09-20 Akim Demaille <akim@epita.fr>
13999
14000 Let the initial-action act on the look-ahead, and use it for the
14001 "initial push" (corresponding to an hypothetical beginning-of-file).
14002 And let lalr1.cc honor %initial-action.
14003
14004 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
14005 example.
14006 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
14007 (Parser::Parser): Remove the ctor that used to initialize it.
14008 (Parser::parse): Like in the other skeletons, issue the "starting
14009 parse" message before any action.
14010 Honor %initial-action.
14011 Initialize the stacks with the lookahead.
14012 * data/yacc.c: Let $$ and @$ in %initial-action designate the
14013 look-ahead.
14014 Push them in the stacks.
14015 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
14016
14017 2004-09-20 Akim Demaille <akim@epita.fr>
14018
14019 * doc/bison.texinfo (Initial Action Decl): New.
14020
14021 2004-09-20 Akim Demaille <akim@epita.fr>
14022
14023 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
14024 clearer criterion to define it.
14025 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
14026 When reducing on an empty RHS, use the latest stacked location as
14027 location.
14028 yylloc is not always available.
14029 * data/glr.c: Likewise.
14030 Also, honor initial-actions.
14031
14032 2004-09-20 Akim Demaille <akim@epita.fr>
14033
14034 * data/yacc.c (YY_LOCATION_PRINT): New.
14035 Define when we know YYLTYPE's structure, i.e., when the default
14036 YYLLOC_DEFAULT is used.
14037 * data/c.m4 (b4_yysymprint_generate): Use it.
14038 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
14039 value of the result.
14040 (error_start_): Replace with...
14041 (error_range_): this location array.
14042 This allows to replace code relying on the implementation of
14043 locations by portable code.
14044 * data/yacc.c (yylerrsp): Replace with...
14045 (yyerror_range): this.
14046 Every time a token is popped, update yyerror_range[0], to have an
14047 accurate location for the error token.
14048 * data/glr.c (YY_LOCATION_PRINT): New.
14049 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
14050 deference a pointer.
14051 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
14052 report the location in %printers.
14053
14054 * src/scan-skel.l: Instead of abort, report error messages to ease
14055 understanding skeleton scanning failures.
14056
14057 2004-09-16 Akim Demaille <akim@epita.fr>
14058
14059 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
14060 (iterator, const_iterator): these, to be more in the C++ spirit.
14061 Also, return reverse iterators so that when displaying the stack
14062 we display its bottom first.
14063 (Parser::stack_print_, Parser::reduce_print_): Match the messages
14064 from yacc.c.
14065 We should probably use vector here though.
14066
14067 2004-09-16 Akim Demaille <akim@epita.fr>
14068
14069 Have more complete shift traces.
14070
14071 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
14072 to report Shifts instead of ad hoc YYDPRINTF invocations,
14073 including for the error token.
14074 * data/lalr1.cc (symprint_): Output the location.
14075 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
14076 output the location within the %printer.
14077 Activate GLR tests, at least to make sure they compile properly.
14078 They still don't pass though.
14079 * tests/calc.at: Adjust expect verbose output, since now "Entering
14080 state..." is on a different line than the "Shifting" message.
14081
14082 2004-09-08 Akim Demaille <akim@epita.fr>
14083
14084 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
14085 Bison directive from the Bison file to the invocation of this
14086 macro, so that these directives are passed to
14087 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
14088 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
14089 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
14090 the extra Bison directives instead of the whole series.
14091 Change the grammar so that there are recoverable errors, and
14092 unrecoverable errors. Now we can have the parser give up before
14093 consuming the whole input. As a result we now can observe that
14094 the lookahead is freed when needed.
14095 Change the parser source to parse argv[1] instead of a hard coded
14096 string.
14097 Simplify yylex, and give a value and location to EOF.
14098 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
14099 passed directives already coded in the file.
14100 Add some tests to check the location of "error".
14101 For some tests, the C++ parser is correct, and not yacc.c.
14102 For other tests, they provide different, but unsatisfying, values,
14103 so keep the C++ value so that at least one parser is "correct"
14104 according to the test suite.
14105 (Actions after errors): Remove, this is subsumed by the
14106 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
14107
14108 2004-09-06 Akim Demaille <akim@epita.fr>
14109
14110 * data/lalr1.cc: Adjust the indentation of the labels.
14111 (Parser::pop): New.
14112 Use it.
14113
14114 2004-09-06 Akim Demaille <akim@epita.fr>
14115
14116 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
14117 argument, an informative message.
14118 Call YY_SYMBOL_PRINT.
14119 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
14120 * data/lalr1.cc (destruct_): Likewise.
14121 In addition, no longer depend on b4_yysymprint_generate and
14122 b4_yydestruct_generate to generate these functions, do it "by
14123 hand".
14124
14125 2004-09-03 Akim Demaille <akim@epita.fr>
14126
14127 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
14128 invoked, yydestruct the lookahead.
14129 * tests/calc.at (Calculator $1): Update the expected lengths of
14130 traces: there is an added line for the discarded lookahead.
14131 * doc/bison.texinfo (Destructor Decl): Some rewording.
14132 Define "discarded" symbols.
14133
14134 2004-09-02 Akim Demaille <akim@epita.fr>
14135
14136 * data/lalr1.cc (translate_, destruct_): No reason to be static.
14137
14138 2004-09-02 Akim Demaille <akim@epita.fr>
14139
14140 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
14141 (YYDSYMPRINTF): Rename as...
14142 (YY_SYMBOL_PRINT): this.
14143 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
14144 two.
14145 Use it instead of direct symprint_ calls.
14146 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
14147 one.
14148
14149 2004-09-02 Akim Demaille <akim@epita.fr>
14150
14151 * data/lalr1.cc (b4_yysymprint_generate): New.
14152 (symprint_): New member function, defined when YYDEBUG.
14153 Use it consistently instead of token/nterm debugging output by
14154 hand.
14155 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
14156 %printer calls to use cdebug_ when using lalr1.cc.
14157
14158 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
14159
14160 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
14161 with #ifdef YYDEBUG.
14162
14163 2004-08-26 Akim Demaille <akim@epita.fr>
14164
14165 * doc/bison.texinfo (Implementing Loops): Rename as...
14166 (Implementing Gotos/Loops): this.
14167
14168 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
14169
14170 Adjust to latest gnulib.
14171 * bootstrap (gnulib_modules): Add xalloc-die.
14172 Set LC_ALL=C so that file names sort consistently.
14173 Prefer the gnulib copies of gettext.m4, glibc21.m4,
14174 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
14175 uintmax_t.m4, ulonglong.m4.
14176 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
14177 po.m4 since we are now using _gl.m4 instead.
14178
14179 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
14180
14181 * src/scan-action.l: Remove. Scanning of semantic actions is
14182 handled in scan-gram.l.
14183
14184 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
14185
14186 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
14187
14188 * src/location.h (struct): The file member is a uniqstr.
14189 (equal_boundaries): Use UNIQSTR_EQ for comparison.
14190
14191 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
14192
14193 Fix bug with non-%union parsers that have printers or destructors,
14194 which led to a Bison core dump. Reported by Peter Fales in
14195 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
14196
14197 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
14198 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
14199 not to our own type.
14200 * src/output.c (symbol_destructors_output, symbol_printers_output):
14201 Don't assume %union.
14202 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
14203 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
14204 UNION-FLAG. All callers changed.
14205 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
14206 Use type char, not unsigned int, when declaring an array of char;
14207 this lets us remove a cast.
14208 (Printers and Destructors): Add non-%union test cases.
14209
14210 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
14211
14212 * doc/bison.texinfo: Minor editorial changes, mostly to the new
14213 GLR writeups. E.g., avoid frenchspacing and the future tense,
14214 change "lookahead" to "look-ahead", and change "wrt" to "with
14215 respect to".
14216
14217 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
14218
14219 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
14220 New sections, split off from the GLR Parsers section. Put the new
14221 Simple GLR Parser near the start of the GLR section, for clarity.
14222 Rewrite connective text.
14223
14224 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
14225
14226 * doc/bison.texinfo (Simple GLR Parsers): New section.
14227
14228 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
14229
14230 * NEWS, TODO, doc/bison.texinfo:
14231 Use "look-ahead" instead of "lookahead", to be consistent.
14232 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
14233 while we're fixing "look-ahead".
14234 * src/conflicts.c (shift_set): Renamed from shiftset.
14235 (look_ahead_set): Renamed from lookaheadset.
14236 * src/print.c: Likewise.
14237 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
14238 name for "lookahead".
14239 (report_types, usage): Likewise.
14240 * src/getargs.h (report_look_ahead_tokens): Renamed from
14241 report_lookaheads.
14242 * src/lalr.c (compute_look_ahead_tokens): Renamed from
14243 compute_lookaheads.
14244 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
14245 (look_ahead_tokens_print): Renamed from lookaheads_print.
14246 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
14247 state_rule_lookaheads_print.
14248 * src/state.h: Likewise.
14249 (reductions.look_ahead_tokens): Renamed from lookaheads.
14250 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
14251 AT_DATA_LOOKAHEADS_GRAMMAR.
14252
14253 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
14254
14255 * README: Update location of patched M4 distribution.
14256
14257 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
14258
14259 Don't assume the C++ compiler takes the same arguments as the C compiler
14260 (trivial change).
14261 * configure.ac (O0CXXFLAGS): New var.
14262 * tests/atlocal.in (CXXFLAGS): Use it.
14263
14264 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
14265
14266 Fix some "make check" problems with C++ reported by
14267 Albert Chin-A-Young for Tru64 C++ in this thread:
14268 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
14269
14270 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
14271 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
14272 Output to a .cc file for C++, not to a .c file.
14273 * tests/calc.at (AT_CHECK_CALC): Likewise.
14274 * tests/regression.at (AT_CHECK_DANCER): Likewise.
14275 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
14276
14277 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
14278
14279 * tests/calc.at, tests/actions.at: Workaround for SGI
14280 C++ compiler. (trivial change)
14281
14282 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
14283
14284 Spent a few hours checking out which prerequisite versions the
14285 current sources actually require. I went all the way back to
14286 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
14287 a seemingly endless set of combinations of versions more recent
14288 than that. The bottom line is that the current sources require
14289 fairly recent versions of the build tools, and it'll be some work
14290 to change this.
14291 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
14292 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
14293 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
14294 Add comments explaining why those particular versions are
14295 currently needed.
14296
14297 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
14298 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
14299 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
14300
14301 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
14302 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
14303
14304 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
14305
14306 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
14307 0.11.5. Suggested by Bruno Haible.
14308 * bootstrap: Remove gettext version checking.
14309
14310 * doc/bison.texinfo (Decl Summary): Also mention that %union
14311 can depend on prerequisite types. Problem reported by Tim
14312 Van Holder.
14313
14314 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
14315
14316 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
14317 * README-alpha: Don't tell people not to package this.
14318
14319 * bootstrap: Don't assume $(...) works; use `...` instead.
14320 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
14321 gettext better.
14322
14323 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
14324 put into the -d output file, and mention what to do if YYSTYPE is
14325 defined as a macro.
14326
14327 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
14328
14329 Undo change made earlier today: it caused autopoint to not bring
14330 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
14331 autopoint's.
14332
14333 * bootstrap: Check that gettext version matches what's in
14334 configure.ac. Warn users to ignore robots.txt ERROR 404.
14335 * bootstrap: Undo today's earlier change (logged below).
14336 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
14337
14338 The gettext version checking is causing more trouble than it's
14339 curing; remove it. Problem reported by Paul Hilfinger.
14340
14341 * bootstrap: Issue a warning that one can expect a message
14342 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
14343 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
14344
14345 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
14346
14347 Ensure that the C++ compiler used for testing actually works on a
14348 simple test program; if not, skip the C++-related tests. Problem
14349 reported by Vin Shelton in:
14350 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
14351
14352 * m4/cxx.m4: New file.
14353 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
14354 * tests/atlocal.in (BISON_CXX_WORKS): Add.
14355 * tests/local.at (AT_COMPILE_CXX): Use it.
14356
14357 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
14358
14359 * data/glr.c (yylloc): Output this macro even if locations are not
14360 being generated, as the GLR parser needs it even in that case.
14361 Problem reported by Troy A. Johnson
14362 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
14363
14364 * configure.ac (AC_INIT): Update to 1.875e.
14365
14366 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
14367
14368 * NEWS: Version 1.875d.
14369 * configure.ac (AC_INIT): Likewise.
14370 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
14371
14372 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
14373 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
14374 lalr1.cc runs afoul of the first, and the last two are no longer
14375 supported by GCC 3.4.0.
14376 * README: Mention GNU m4 1.4 or later; mention m4 patches.
14377 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
14378
14379 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
14380
14381 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
14382 unsigned int, for compatibility with latest gnulib hash module.
14383 * src/state.c (state_hash, state_hasher): Likewise.
14384 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
14385 * src/uniqstr.c (hash_uniqstr): Likewise.
14386
14387 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
14388
14389 * NEWS: Unescaped newlines are no longer allowed in char & strings.
14390
14391 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
14392 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
14393 character and string literals.
14394 (unexpected_end): New function.
14395 (unexpected_eof): Use it.
14396 (unexpected_newline): New function.
14397 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
14398 actions.
14399
14400 * NEWS: Document %expect-rr.
14401
14402 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
14403 Fix typo by replacing $1 with $option.
14404 Remove more 'intl'-related files.
14405 Don't DEFUN AM_INTL_SUBDIR twice.
14406
14407 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
14408 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
14409 strtoul.c.
14410 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
14411 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
14412 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
14413 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
14414 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
14415 * src/.cvsignore: Add *.output.
14416
14417 * src/parse-gram.y: Put copyright notice inside %{ %} so it
14418 gets copied to the output file.
14419
14420 2004-04-28 Paul Eggert <eggert@twinsun.com>
14421
14422 Get files from the gnulib and po repositories, instead of relying
14423 on them being in our CVS. Upgrade to latest versions of gnulib
14424 and Automake.
14425
14426 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
14427 * bootstrap: Bootstrap from gnulib and po repositories.
14428 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
14429 * README-cvs: Document these changes. Remove version numbers from
14430 mentions of build tools, since they change so often. Mention Flex.
14431
14432 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
14433 (gl_USE_SYSTEM_EXTENSIONS): Add.
14434 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
14435 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
14436 does this for us.
14437 (AC_ISC_POSIX): Remove; we no longer support this
14438 ancient OS, as it gets in the way of latest Autoconf & gnulib.
14439 (AC_HEADER_STDC): Remove: we now assume C89 or better.
14440 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
14441 Do not check for C89 headers, except for locale.h which is used
14442 by the Yacc library and must port to K&R hosts.
14443 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
14444 Do not check for C89 functions, except for setlocale which is
14445 used by the Yacc library.
14446 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
14447 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
14448 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
14449 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
14450 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
14451 AM_GNU_GETTEXT): Remove; now done by:
14452 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
14453 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
14454 for us.
14455
14456 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
14457 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
14458 Define to empty, as gnulib.mk will do the rest for us.
14459 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
14460 for us.
14461 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
14462 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
14463
14464 * src/files.c: Include gnulib's xstrndup.h.
14465
14466 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
14467 (REALLOC): Use xnrealloc, for likewise.
14468 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
14469 (strnlen, memrchr): Remove decls; functions no longer used.
14470 Include <stpcpy.h>.
14471
14472 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
14473 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14474 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
14475 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
14476 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
14477 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
14478 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
14479 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
14480 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
14481 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
14482 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
14483 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14484 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
14485 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
14486 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
14487 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
14488 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
14489 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
14490 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
14491 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
14492 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
14493 Remove, as these files are now generated automatically
14494 by bootstrap or automake.
14495
14496 * po/ChangeLog: Remove: all but one entry was a duplicate
14497 of this file, and I moved that 2000-11-02 entry here.
14498
14499 * config/.cvsignore: Add Makefile, depcomp, install-sh.
14500 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
14501 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
14502 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
14503 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
14504 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
14505 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
14506 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
14507 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
14508 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
14509 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
14510 xstrndup.h.
14511 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
14512 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
14513 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
14514 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
14515 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
14516 * src/.cvsignore: Remove *_.c.
14517
14518
14519 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
14520 support it. (The latest stable gzip doesn't.)
14521
14522 2004-04-27 Paul Eggert <eggert@twinsun.com>
14523
14524 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
14525 case, as stos_ is now used by destructors due to the 2004-02-09
14526 change.
14527
14528 Remove more K&R C support.
14529 * lib/libiberty.y (PARAMS): Remove. All uses removed.
14530 * lib/subpipe.c (errno): Remove decl.
14531 Include <stdlib.h> unconditionally.
14532 (EXIT_FAILURE): Remove macro.
14533 * src/complain.c (vfprintf, strerror): Remove.
14534 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
14535 unconditionally.
14536 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
14537 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
14538 (strchr, strspn, memchr): Remove decls.
14539 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
14540 unconditionally. Do not declare perror.
14541 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
14542 unconditionally.
14543
14544 * src/complain.c (_): Remove useless defn, as system.h defines this.
14545
14546 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
14547 with latest obstack.h.
14548 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
14549 to procedure types, as obstack.h now does that for us.
14550 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
14551
14552 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
14553 so that this include file can stand alone.
14554 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
14555 does this now. Include subpipe.h first after config.h, to
14556 test whether it can stand alone.
14557
14558 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
14559 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
14560 unused declaration.
14561
14562 * tests/synclines.at (%union synch line): Put a dummy member in
14563 the union, because empty unions aren't allowed in C. Caught
14564 by GCC 3.4.0.
14565
14566 2004-04-13 Jim Meyering <jim@meyering.net>
14567
14568 * src/conflicts.c (conflicts_print): Correct format string typo:
14569 use `%%' to produce literal `%'. (trivial change)
14570
14571 2004-03-30 Paul Eggert <eggert@twinsun.com>
14572
14573 * src/getargs.c (version): Update copyright year to 2004.
14574
14575 * data/c.m4 (b4_int_type): Use 'short int' rather than
14576 'short', and similarly for 'long', 'unsigned', etc.
14577 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
14578 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
14579 yy_yypstack, yydumpstack): Likewise.
14580 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
14581 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
14582 Likewise.
14583 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
14584 yy_stack_print, yyparse): Likewise.
14585 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
14586 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
14587 * lib/bitset.c (bitset_print): Likewise.
14588 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
14589 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14590 * lib/bitsetv.c (bitsetv_dump): Likewise.
14591 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
14592 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
14593 Likewise.
14594 * src/LR0.c (allocate_itemsets): Likewise.
14595 * src/gram.h (rule_number, rule): Likewise.
14596 * src/lalr.h (goto_number): Likewise.
14597 * src/nullable.c (nullable_compute): Likewise.
14598 * src/output.c (prepare_rules): Likewise.
14599 * src/relation.c (relation_print, relation_digraph): Likewise.
14600 * src/relation.h (relation_node): Likewise.
14601 * src/state.h (state_number, transitions, errs, reductions,
14602 struct state): Likewise.
14603 * src/symtab.h (symbol_number, struct symbol): Likewise.
14604 * src/tables.c (vector_number, tally, action_number,
14605 default_goto, goto_actions): Likewise.
14606 * tests/existing.at (GNU Cim Grammar): Likewise.
14607 * tests/regression.at (Web2c Actions): Likewise.
14608
14609 * src/output.c (muscle_insert_short_int_table): Renamed from
14610 muscle_insert_short_table. All uses changed.
14611
14612 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
14613
14614 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
14615 (declaration): Replace expected_conflicts with expected_sr_conflicts.
14616 Add %expect-rr rule.
14617
14618 * src/scan-gram.l: Recognize %expect-rr.
14619
14620 * src/conflicts.h (expected_sr_conflicts): Rename from
14621 expected_conflicts.
14622 (expected_rr_conflicts): Declare.
14623
14624 * src/conflicts.c (expected_sr_conflicts): Rename from
14625 expected_conflicts.
14626 (expected_rr_conflicts): Define.
14627 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
14628 for GLR parsers.
14629 Use expected_sr_conflicts in place of expected_conflicts.
14630 Warn if expected_rr_conflicts used in non-GLR parser.
14631
14632 * doc/bison.texinfo: Add documentation for %expect-rr.
14633
14634 2004-03-08 Paul Eggert <eggert@gnu.org>
14635
14636 Add support for hex token numbers. Suggested by Odd Arild Olsen in
14637 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
14638
14639 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
14640 in lalr1.cc.
14641 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
14642 * src/scan-gram.l (scan_integer): New function.
14643 ({int}): Use it.
14644 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
14645 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
14646 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
14647 Say "long int", not "long", for uniformity with GNU style.
14648
14649 2004-02-25 Paul Eggert <eggert@twinsun.com>
14650
14651 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
14652 compilers. This fixes a problem with Intel's C++ compiler being
14653 chatty, reported by Guido Trentalancia in
14654 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
14655
14656 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
14657
14658 Support %destructor and merge error locations in lalr1.cc.
14659
14660 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
14661 (Parser::stos_): Define unconditionally.
14662 (Parser::destruct_): New method. Generate its body with
14663 b4_yydestruct_generate.
14664 (Parser::error_start_): New attribute.
14665 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
14666 token which are discarded.
14667 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
14668 error_start_ when erroneous token are discarded.
14669 (Parser::parse) <yyerrlab1>: Compute the location of the error
14670 token so that it covers all the discarded tokens.
14671 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
14672 it can be called with `%skeleton "lalr1.cc"', and do that.
14673
14674 2004-02-02 Paul Eggert <eggert@twinsun.com>
14675
14676 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
14677 $(top_srcdir)/lib and ../lib. This fixes a bug reported
14678 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
14679 There's no need to mention top_builddir since Automake does that
14680 for us.
14681 (INCLUDES): Remove, as Automake says it's obsolescent.
14682 Contents migrated into AM_CPPFLAGS as described above.
14683 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
14684
14685 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
14686
14687 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
14688 (yyreportSyntaxError): Handle case where lookahead token is
14689 YYEMPTY.
14690
14691 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14692
14693 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
14694 resulting parsers are compilable with C++.
14695
14696 2003-12-23 Paul Eggert <eggert@twinsun.com>
14697
14698 * config/depcomp, config/install-sh: Sync with Automake 1.8.
14699 * src/output.c (output_skeleton): Rename local var.
14700 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
14701 Bison tokens, as this runs afoul of the 2003-10-07 change that
14702 disallowed NUL bytes in character constants or string literals.
14703
14704 * tests/local.at: Require Autoconf 2.59's Autotest.
14705 * tests/testsuite.at: Don't include local.at, since we now assume
14706 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
14707 including it.
14708 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
14709 multiple inclusion warnings.
14710
14711 2003-12-02 Akim Demaille <akim@epita.fr>
14712
14713 * doc/bison.texinfo (How Can I Reset the Parser): More about start
14714 conditions.
14715 From Bruno Haible.
14716
14717 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
14718
14719 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
14720
14721 2003-10-07 Paul Eggert <eggert@twinsun.com>
14722
14723 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
14724 if testsuite doesn't exist.
14725
14726 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
14727 literals, unfortunately.
14728 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
14729 Complain about NUL bytes in character constants or string literals.
14730
14731 2003-10-05 Paul Eggert <eggert@twinsun.com>
14732
14733 * NEWS: Don't document %no-default-prec, as it's still
14734 too experimental.
14735 * doc/bison.texinfo: Document %no-default-prec only if
14736 the defaultprec flag is set. Normally it's not.
14737
14738 2003-10-04 Paul Eggert <eggert@twinsun.com>
14739
14740 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
14741 non-modifiable lvalue, instead of a modifiable one.
14742 * doc/bison.texinfo (Actions): Document that $$ can
14743 be assigned to. Do not claim that $$ and $N are
14744 array element references: user code should not rely on this.
14745
14746 2003-10-01 Paul Eggert <eggert@twinsun.com>
14747
14748 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
14749 (grammar_declaration): Use it.
14750 * src/scan-gram.l: New token %no-default-prec.
14751 * tests/conflicts.at: Revamp tests to use %no-default-prec.
14752 * NEWS, doc/bison.texinfo: Document the above.
14753
14754 2003-10-01 Akim Demaille <akim@epita.fr>
14755
14756 VCG no longer supports long_straight_phase.
14757
14758 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
14759 * src/print_graph.c (print_graph): Adjust.
14760
14761 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
14762 and Paul Eggert <eggert@twinsun.com>
14763
14764 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
14765 Table of Symbols): Document %default-prec.
14766 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
14767 (grammar_declaration): Set default_prec on %default-prec.
14768 * src/scan-gram.l (%default-prec): New token.
14769 * src/reader.h (default_prec): New flag.
14770 * src/reader.c: Likewise.
14771 (packgram): Handle it.
14772 * tests/conflicts.at (%default-prec without %prec,
14773 %default-prec with %prec, %default-prec 1): New tests.
14774
14775 2003-09-30 Paul Eggert <eggert@twinsun.com>
14776
14777 * tests/testsuite.at: Include local.at, not input.at, fixing
14778 a typo in the 2003-08-25 patch.
14779
14780 2003-08-27 Akim Demaille <akim@epita.fr>
14781
14782 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
14783 GCC warnings.
14784
14785 2003-08-26 Akim Demaille <akim@epita.fr>
14786
14787 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
14788 "<\#" to avoid magic from Gnus when posting parts of this script.
14789
14790 2003-08-26 Akim Demaille <akim@epita.fr>
14791
14792 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
14793 (Parser::parse): here.
14794 Adjust: nerrs and errstatus is now replaced by...
14795 (Parser::nerrs_, Parser::errstatus_): New.
14796
14797 2003-08-25 Akim Demaille <akim@epita.fr>
14798
14799 * config/announce-gen, Makefile.cfg: New.
14800 * Makefile.am: Adjust.
14801 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
14802 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
14803
14804 2003-08-25 Akim Demaille <akim@epita.fr>
14805
14806 When reducing initial empty rules, Bison parser read an initial
14807 location that is not defined. This results in garbage, and that
14808 affects Bison's own parser. Therefore we need (i) to extend Bison
14809 to support a means to initialize this location, and (ii) to use
14810 this CVS Bison to fix CVS Bison's parser.
14811
14812 * src/reader.h, reader.c (epilogue_augment): Remove, replace
14813 with...
14814 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
14815 * src/parse-gram.y: Adjust.
14816 (%initial-action): New.
14817 (%error-verbose): Since we require CVS Bison, there is no reason
14818 not to use it.
14819 * src/scan-gram.l: Adjust.
14820 * src/Makefile.am (YACC): New, to make sure we use our own parser.
14821 * data/yacc.c (yyparse): Use b4_initial_action.
14822
14823 2003-08-25 Akim Demaille <akim@epita.fr>
14824
14825 * doc/bison.texinfo: Don't promote stdout for error messages.
14826
14827 2003-08-25 Akim Demaille <akim@epita.fr>
14828
14829 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
14830 From Alexandre Duret-Lutz.
14831
14832 2003-08-25 Akim Demaille <akim@epita.fr>
14833
14834 Version 1.875c.
14835
14836 2003-08-25 Akim Demaille <akim@epita.fr>
14837
14838 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
14839 Use them.
14840
14841 2003-08-25 Akim Demaille <akim@epita.fr>
14842
14843 * data/lalr1.cc (Parser::reduce_print_): New.
14844 Use it.
14845
14846 2003-08-25 Akim Demaille <akim@epita.fr>
14847
14848 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
14849 error recovery loops. This patch is based on
14850 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
14851 Also, augment the similarity between lalr1.cc and yacc.c.
14852 Note: the locations of error recovery rules are not correct yet.
14853
14854 * data/lalr1.cc: Comment changes to augment the similarity between
14855 lalr1.cc and yacc.c.
14856 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
14857 (yyerrlab1): Remove, but where it used to be (now the bottom part of
14858 yyerrlab), when hitting EOF, pop the whole stack here instead of
14859 merely falling thru the default error handling mechanism.
14860 (yyerrorlab): New label, with the old contents of YYERROR,
14861 plus the following change: pop the stack of rhs corresponding
14862 to the production that invoked YYERROR. That is how Yacc
14863 behaves (required by POSIX).
14864 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
14865 fail.
14866
14867 2003-08-25 Akim Demaille <akim@epita.fr>
14868
14869 Tune local.at so that people can "autom4te -l autotest calc.at -o
14870 calc" for instance, to extract a sub test suite.
14871
14872 * tests/testsuite.at: Move the initialization, Autotest version
14873 requirement, and AT_TESTED invocation into...
14874 * tests/local.at: here.
14875 * tests/testsuite.at: Include it for compatibility with Autoconf
14876 2.57.
14877 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
14878 be ignore.
14879
14880 2003-08-04 Paul Eggert <eggert@twinsun.com>
14881
14882 Rework code slightly to avoid gcc -Wtraditional warnings.
14883 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
14884 The returned value is now stored in *YY0. All callers changed.
14885 * src/output.c (merge_output): Adjust to the above change.
14886
14887 2003-07-26 Paul Eggert <eggert@twinsun.com>
14888
14889 * data/glr.c (YYASSERT): New macro.
14890 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
14891 yyresolveStates, yyprocessOneStack):
14892 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
14893 Derived from a suggestion by Frank Heckenbach.
14894
14895 2003-07-25 Paul Eggert <eggert@twinsun.com>
14896
14897 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
14898 for portability to K&R C (after ansi2knr, presumably). See
14899 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
14900 by Frank Heckenbach, though I have omitted the structure-initialization
14901 part of his glr-knr.diff patch since I recall that the Portable
14902 C Compiler didn't require that change.
14903
14904 Let the user specify how to allocate and free memory.
14905 Derived from a suggestion by Frank Heckenbach in
14906 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
14907 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
14908 All uses of free, malloc, realloc changed to use these macros,
14909 and unnecessary casts removed.
14910 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
14911
14912 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
14913
14914 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
14915 use s.empty() rather than s == "" to test for empty string; see
14916 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
14917 (trivial change)
14918
14919 2003-06-25 Akim Demaille <akim@epita.fr>
14920
14921 * config/depcomp, config/install-sh: Update from masters.
14922
14923 2003-06-20 Paul Eggert <eggert@twinsun.com>
14924
14925 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
14926 and return properly parenthesized result.
14927 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
14928 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
14929 Remove unnecessary parentheses from uses.
14930 * doc/bison.texinfo (Location Default Action): Describe the
14931 conventions for parentheses.
14932
14933 2003-06-19 Paul Eggert <eggert@twinsun.com>
14934
14935 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
14936 yyreportTree): Do not assume that size_t is the same width as int,
14937 when printing sizes. Print sizes using an unsigned format.
14938 Problem reported by Frank Heckenbach in
14939 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
14940
14941 Port to Forte Developer 7 C compiler.
14942 * data/glr.c (struct YYLTYPE): If locations are not being used,
14943 declare a single dummy member, as empty structs do not conform
14944 to the C standard.
14945 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
14946 the Forte Developer 7 C compiler complains that end-of-loop
14947 code is not reached.
14948
14949 2003-06-17 Paul Eggert <eggert@twinsun.com>
14950
14951 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
14952 avoid warnings from picky compilers about redefinition of PARAMS.
14953
14954 2003-06-17 Paul Eggert <eggert@twinsun.com>
14955
14956 Version 1.875b.
14957
14958 * NEWS: Document 1.875b.
14959
14960 * lib/bbitset.h: Do not include config.h; that's the includer's job.
14961 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
14962 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
14963 Don't use 'index' in comments, as it's a builtin fn on some hosts.
14964 * lib/bitset_stats.c: Include gettext.h unconditionally, as
14965 per recent gettext manual's suggestion.
14966 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
14967 Use prototypes, not old-style definitions.
14968 * lib/lbitset.c (lbitset_unused_clear): Likewise.
14969 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
14970 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
14971 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
14972 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
14973 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
14974 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
14975 vbitset_or_and_cmp, vbitset_copy): Likewise.
14976
14977 * lib/libiberty.h: Do not include config.h; that's the includer's job.
14978 Do not include <stdlib.h>.
14979 (PARAMS): Define unconditionally for C89.
14980 (ATTRIBUTE_NORETURN): Remove.
14981 (ATTRIBUTE_UNUSED): Define unconditionally.
14982
14983 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
14984 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
14985 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
14986 * lib/vbitset.c, lib/vbitset.h: New files.
14987 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14988 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
14989 from libbitset.
14990
14991 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
14992 `How Can I Reset @code{yyparse}', since texinfo does not allow
14993 arbitrary @ in node names.
14994
14995 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
14996 shouldn't be needed according to the gettext 0.12.1 documentation
14997 but which seem to be needed anyway: codeset.m4 glibc21.m4
14998 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
14999 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
15000 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
15001
15002 * lib/.cvsignore: Add stdbool.h.
15003 * m4/.cvsignore: Add nls.m4, po.m4.
15004
15005 Upgrade to CVS gnulib.
15006 * stdbool_.h: File renamed from stdbool.h.in.
15007 * configure.ac (AM_STDBOOL_H): Invoke this instead of
15008 AC_HEADER_STDBOOL.
15009 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
15010 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
15011 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
15012 (MOSTLYCLEANFILES): New var.
15013 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
15014 (stdbool.h): New rule.
15015 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
15016 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
15017 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
15018 m4/quote.m4: Upgrade to today's gnulib.
15019
15020 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
15021 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
15022 the tests right now.
15023 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
15024 yyerror are declared before use; C99 requires this.
15025
15026 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15027
15028 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
15029 first.
15030 (yyrecoverSyntaxError): Correct the logic for setting and testing
15031 yyerrState.
15032 Correct comment on handling EOF.
15033 Allow states with only a default reduction, rather than failing
15034 (I can't quite reconstruct why these were not allowed before).
15035
15036 Fixes to avoid problem that $-N rules in GLR parsers can cause
15037 buffer overruns, corrupting state.
15038
15039 * src/output.c (prepare_rules): Output max_left_semantic_context
15040 definition.
15041 * src/reader.h (max_left_semantic_context): New variable declaration.
15042 * src/scan-gram.l (max_left_semantic_context): Define.
15043 (handle_action_dollar): Update max_left_semantic_context.
15044 * data/glr.c (YYMAXLEFT): New definition.
15045 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
15046 (yyresolveAction): Ditto.
15047
15048 Fixes to problems with location handling in GLR parsers reported by
15049 Frank Heckenbach (2003/06/05).
15050
15051 * data/glr.c (YYLTYPE): Make trivial if locations not used.
15052 (YYRHSLOC): Add parentheses, and define only if locations used.
15053 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
15054 locations not used.
15055 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
15056 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
15057
15058 * tests/cxx-type.at: Exercise location information; update tests
15059 to differentiate output with and without locations.
15060 Remove forward declarations of yylex and yyerror---caused errors
15061 because default YYLTYPE not yet defined.
15062 Change semantic actions to compute strings, rather than printing
15063 them directly (to test proper passing of semantics values). Change
15064 output to prefix notation and update test data and expected results.
15065 (yylex): Track locations.
15066 (stmtMerge): Return value rather than printing, and include arguments
15067 in value.
15068
15069 2003-06-03 Paul Eggert <eggert@twinsun.com>
15070
15071 Avoid warnings generated by GCC 2.95.4 when Bison is
15072 configured with --enable-gcc-warnings.
15073 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
15074 yy::]b4_parser_class_name[::translate_,
15075 yy::Stack::operator[] (unsigned),
15076 yy::Stack::operator[] (unsigned) const,
15077 yy::Slice::operator[] (unsigned),
15078 yy::Slice::operator[] (unsigned) const):
15079 Rename local vars to avoid warnings.
15080 * tests/glr-regression.at (Improper handling of embedded actions
15081 and $-N in GLR parsers): Remove unused local variable from yylex.
15082 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
15083 (void) as arg when not pure, since we now assume C89 when building
15084 Bison. Pacify GCC by using parameter.
15085
15086 2003-06-02 Paul Eggert <eggert@twinsun.com>
15087
15088 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
15089 yy::Location::lines, yy::Location::columns): Rename arguments
15090 to avoid shadowing; this removes a warning generated by GCC 3.3.
15091
15092 2003-06-01 Paul Eggert <eggert@twinsun.com>
15093
15094 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
15095 to g++, as GCC 3.3 complains if you do it.
15096 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
15097 everything that WARNING_CFLAGS has, except omit warnings
15098 not suitable for C++.
15099 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
15100 * tests/atlocal.in (CXXFLAGS): New var.
15101 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
15102
15103 Fix a GLR parser bug I reported in February; see
15104 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
15105 The problem was that GLR parsers did not conform to the C standard,
15106 because actions like { $1 = $2 + $3; } expanded to expressions
15107 that invoked YYFILL in separate subexpressions, and YYFILL assigned
15108 to a local variable. The C standard says that expressions
15109 like (var = f ()) + (var = f ()) have undefined behavior.
15110 Another problem was that GCC sometimes issues warnings that
15111 yyfill and its parameters are unused.
15112
15113 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
15114 as possibly unused.
15115 (yyfill): New function.
15116 (YYFILL): Use it.
15117 (yyuserAction): Change type of yynormal to bool, so that it matches
15118 the new yyfill signature. Mark it as possibly unused.
15119
15120
15121 Follow up on a bug I reported in February, where a Bison-generated
15122 parser can loop. Provide a test case and a fix for yacc.c. I
15123 don't have a fix for lalr1.cc or for glr.c, unfortunately.
15124 The original bug report is in:
15125 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
15126
15127 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
15128 macro's size was becoming unwieldy.
15129 (yyerrlab): Do not discard an empty lookahead symbol, as this
15130 might destroy garbage.
15131 (yyerrorlab): New label, with the old contents of YYERROR,
15132 plus the following change: pop the stack of rhs corresponding
15133 to the production that invoked YYERROR. That is how Yacc
15134 behaves, and POSIX requires this behavior.
15135 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
15136 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
15137 Define 'alarm' to do nothing if unistd.h is not available.
15138 Add a new rule "exp: '-' error;" to test the above change to
15139 data/yacc.c. Use 'alarm' to abort any test taking longer than
15140 10 seconds, as it's probably looping.
15141 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
15142 Also, the new yacc.c generates two fewer diagnostics for an
15143 existing test.
15144
15145 2003-05-24 Paul Eggert <eggert@twinsun.com>
15146
15147 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
15148 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
15149 This fixes a problem reported by John Bowman when the Compaq/HP
15150 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
15151 -ansi -Wall -gall).
15152 * data/yacc.c (union yyalloc): Likewise.
15153 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
15154
15155 Switch from 'int' to 'bool' where that makes sense.
15156
15157 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
15158 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
15159 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
15160 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
15161 Return or accept bool, not int. All callers changed.
15162 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
15163 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
15164 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
15165 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
15166 bitset_or_and_cmp_): Likewise.
15167 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
15168 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
15169 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
15170 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
15171 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
15172 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
15173 bitset_stats_or_and_cmp): Likewise.
15174 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
15175 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
15176 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
15177 ebitset_xor_cmp): Likewise.
15178 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
15179 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
15180 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
15181 lbitset_xor_cmp): Likewise.
15182 * lib/bbitset.h: Include <stdbool.h>.
15183 (struct bitset_vtable): The following members now return bool, not
15184 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
15185 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
15186 or_and_cmp).
15187 * src/conflicts.c (count_rr_conflicts): Likewise.
15188 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
15189 All uses changed.
15190 * lib/ebitset.c (ebitset_obstack_init): Likewise.
15191 * lib/lbitset.c (lbitset_obstack_init): Likewise.
15192 * src/getargs.c (debug_flag, defines_flag, locations_flag,
15193 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
15194 graph_flag): Likewise.
15195 * src/getargs.h (debug_flag, defines_flag, locations_flag,
15196 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
15197 graph_flag): Likewise.
15198 * src/output.c (error_verbose): Likewise.
15199 * src/output.h (error_verbose): Likewise.
15200 * src/reader.c (start_flag, typed): Likewise.
15201 * src/reader.h (typed): Likewise.
15202 * src/getargs.c (LOCATIONS_OPTION): New constant.
15203 (long_options, getargs): Use it.
15204 * src/lalr.c (build_relations): Use bool, not int.
15205 * src/nullable.c (nullable_compute): Likewise.
15206 * src/print.c (print_reductions): Likewise.
15207 * src/tables.c (action_row, pack_vector): Likewise.
15208 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
15209 * src/output.c (prepare): Use it.
15210 * src/output.c (token_definitions_output,
15211 symbol_destructors_output, symbol_destructors_output): Use string,
15212 not boolean integer, to keep track of whether to output separator.
15213 * src/print_graph.c (print_core): Likewise.
15214 * src/state.c (state_rule_lookaheads_print): Likewise.
15215
15216 * config/install-sh: Sync from automake 1.7.5.
15217
15218 2003-05-14 Paul Eggert <eggert@twinsun.com>
15219
15220 * src/parse-gram.y (rules_or_grammar_declaration): Require a
15221 semicolon after a grammar declaration, in the interest of possible
15222 future changes to the Bison input language.
15223 Do not allow a stray semicolon at the start of the grammar.
15224 (rhses.1): Allow one or more semicolons after any rule, including
15225 just before "|" as required by POSIX.
15226 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
15227 grammar.
15228
15229 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
15230
15231 %parse-param support for lalr1.cc.
15232
15233 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
15234 b4_cc_constructor_calls, b4_cc_constructor_call,
15235 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
15236 definitions.
15237 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
15238 parse-param arguments.
15239 (yy::b4_parser_class_name): Declare instance variables to
15240 hold parse-param arguments.
15241 * tests/calc.at: s/value/semantic_value/ because value clashes
15242 with a member of yy::b4_parser_class_name. Adjust C++ code
15243 to handle %parse-param. Enable %parse-param test in C++.
15244
15245 2003-05-12 Paul Eggert <eggert@twinsun.com>
15246
15247 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
15248 English a bit. Fix fclose typo. Change "const char" to "char
15249 const", and use ANSI C rather than K&R for "main". Suggest
15250 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
15251 and suggest yy_switch_to_buffer.
15252
15253 2003-05-05 Paul Eggert <eggert@twinsun.com>
15254
15255 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
15256 C89. This avoids a diagnostic on compilers that define __STDC__
15257 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
15258 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
15259
15260 2003-05-03 Paul Eggert <eggert@twinsun.com>
15261
15262 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
15263 Do not overrun array bounds.
15264 This should fix a bug reported today by Olatunji Oluwabukunmi in
15265 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
15266
15267 2003-04-29 Akim Demaille <akim@epita.fr>
15268
15269 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
15270 * src/getargs.c, src/getargs.h: here, as bool, not int.
15271 (nondeterministic_parser): New.
15272 * src/parse-gram.y, src/scan-gram.l: Support
15273 %nondeterministic-parser.
15274 * src/output.c (prepare): Use nondeterministic_parser instead
15275 of glr_parser where appropriate.
15276 * src/tables.c (conflict_row, action_row, save_row)
15277 (token_actions, token_actions, pack_vector): Ditto.
15278
15279 2003-04-29 Akim Demaille <akim@epita.fr>
15280
15281 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
15282
15283 2003-04-29 Akim Demaille <akim@epita.fr>
15284
15285 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
15286 with %pure-parser and %locations to exercise the patch from Yakov
15287 Markovitch below.
15288
15289 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
15290
15291 * data/yacc.c: (b4_lex_param): Corrected for the case where
15292 %lex-param is provided and %pure-parser isn't.
15293
15294 2003-04-27 Paul Eggert <eggert@twinsun.com>
15295
15296 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
15297 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
15298 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
15299 if it is not defined.
15300 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
15301
15302 2003-04-26 Paul Eggert <eggert@twinsun.com>
15303
15304 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
15305 Declare to be of type suitable for the ninf value itself, not of
15306 type suitable for the corresponding table, since the latter might
15307 be unsigned but the ninf value might be negative. This fixes a
15308 bug reported by Alexandre Duret-Lutz in
15309 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
15310
15311 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
15312 invokes it. We shouldn't invoke it twice because it will attempt
15313 to put error.o in the archive twice. This fixes a glitch reported
15314 by Martin Mokrejs in
15315 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
15316
15317 2003-04-21 Paul Eggert <eggert@twinsun.com>
15318
15319 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
15320 to gnulib.
15321
15322 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
15323
15324 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
15325 Fix obvious typo that results in uncompilable GLR parsers
15326 when both %pure-parser and %locations are used. (trivial change)
15327
15328 2003-04-17 Paul Eggert <eggert@twinsun.com>
15329
15330 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
15331 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
15332 Do not insert the expected token via unput, as this runs afoul
15333 of a POSIX-compatibility bug in flex 2.5.31.
15334 All uses changed to BEGIN the parent state,
15335 since we no longer insert the expected token via unput.
15336 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
15337 that is no longer emitted after the above change.
15338
15339 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
15340 the first one. This change is from Paul Hilfinger, and it fixes
15341 regression reported by Werner Lemberg in
15342 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
15343
15344 (resolve_sr_conflict): Don't invoke state_errs_set
15345 unless one or more tokens have been explicitly made errors.
15346 Otherwise, the above change causes Bison to abort.
15347
15348 * tests/existing.at (GNU pic Grammar): New test case, taken from
15349 Lemberg's email.
15350
15351 2003-03-31 Akim Demaille <akim@epita.fr>
15352
15353 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
15354
15355 2003-03-31 Akim Demaille <akim@epita.fr>
15356
15357 * src/output.c (prepare_symbols): Avoid trailing spaces in the
15358 output.
15359
15360 2003-03-31 Akim Demaille <akim@epita.fr>
15361
15362 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
15363 From Paul Hilfinger.
15364
15365 2003-03-29 Akim Demaille <akim@epita.fr>
15366
15367 * m4/error.m4: Do not put under dynamic conditions some code which
15368 expansion is under static control.
15369
15370 2003-03-29 Akim Demaille <akim@epita.fr>
15371
15372 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
15373
15374 2003-03-29 Akim Demaille <akim@epita.fr>
15375
15376 * doc/bison.texinfo (Strings are Destroyed): New.
15377
15378 2003-03-13 Paul Eggert <eggert@twinsun.com>
15379
15380 * .cvsignore: Add configure.lineno.
15381 * src/.cvsignore: Add yacc.
15382 * tests/.cvsignore: Add testsuite.log.
15383 * doc/fdl.texi: Sync with latest FSF version.
15384
15385 2003-03-12 Paul Eggert <eggert@twinsun.com>
15386
15387 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
15388 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
15389 cursor, instead of leaving it undefined. This fixes a bug
15390 reported by Tim Van Holder in
15391 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
15392 * tests/input.at (Torturing the Scanner): Test the scanner on
15393 an empty input file, which was Tim Van Holder's test case.
15394
15395 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
15396 <sys/resource.h> can be included, include sys/time.h and
15397 sys/times.h first, if available. This works around the SunOS
15398 4.1.4 porting bug reported by Bruce Becker in
15399 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
15400
15401 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
15402 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
15403 AC_HEADER_SYS_WAIT.
15404
15405 Merge changes from gnulib. This was prompted because the CVS
15406 snapshot didn't build on Solaris 7 due to strnlen problems.
15407
15408 These changes need to be merged back into gnulib:
15409 * lib/hash.c: Include <stdbool.h> unconditionally.
15410 * m4/onceonly.m4 (m4_quote): New macro.
15411 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
15412 Quote AC_FOREACH variable-expansions properly.
15413 The 2003-01-03 obstack.h change also needs merging.
15414 {end of changes requiring merging}
15415
15416 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
15417 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
15418 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
15419 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
15420 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
15421 New files, imported from gnulib.
15422 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
15423 above.
15424
15425 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
15426 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
15427 gnulib sources.
15428
15429 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
15430 Add.
15431 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
15432 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
15433 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
15434 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
15435 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
15436 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
15437 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
15438 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
15439 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
15440 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
15441 (jm_PREREQ_ARGMATCH): Remove.
15442 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
15443 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
15444
15445 * src/system.h: Include <stdbool.h> unconditionally.
15446
15447 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
15448 assuming at least C89 in the bitset code for some time now.
15449
15450 2003-03-03 Akim Demaille <akim@epita.fr>
15451
15452 * ro.po: New.
15453
15454 2003-03-02 Akim Demaille <akim@epita.fr>
15455
15456 * doc/bison.texinfo (Table of Symbols): Reactivate the
15457 documentation for %lex-param, and %parse-param.
15458
15459 2003-03-02 Akim Demaille <akim@epita.fr>
15460
15461 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
15462 generate verbose error messages.
15463 Use the number of tokens as an upper bound in yytname, as it
15464 cannot be a non terminal.
15465
15466 2003-03-02 Akim Demaille <akim@epita.fr>
15467
15468 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
15469 message.
15470
15471 2003-03-02 Akim Demaille <akim@epita.fr>
15472
15473 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
15474 Use them to exercise yycheck overrun.
15475 Based on Andrew Suffield's grammar.
15476
15477 2003-03-02 Akim Demaille <akim@epita.fr>
15478
15479 Create tests/local.at for Bison generic testing macros.
15480
15481 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
15482 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
15483 This new file.
15484 * tests/calc.at (AT_CHECK_CALC): Adjust.
15485 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
15486 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
15487 * tests/local.at: here.
15488 (AT_COMPILE_CXX): Tags the tests using it as c++.
15489 Ignore the test if CXX is not functional.
15490
15491 2003-03-01 Paul Eggert <eggert@twinsun.com>
15492
15493 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
15494 not loc->end, since loc->end might contain garbage and this leads
15495 to undefined behavior on some platforms.
15496 (id_loc, token_start): Use (IF_LINTed) initial values that do not
15497 depend on *loc, so that the reader doesn't give the the false
15498 impression that *loc is initialized.
15499 (<INITIAL>"%%"): Do not bother setting code_start, since its value
15500 does not survive the return.
15501
15502 2003-03-01 Akim Demaille <akim@epita.fr>
15503
15504 * src/scan-gram.l (code_start): Always initialize it when entering
15505 into yylex, as SC_EPILOGUE is activated *before* the corresponding
15506 yylex invocation. An alternative would be making it static, but
15507 then it starts with the second %%'s beginning, instead of its end.
15508
15509 2003-02-28 Paul Eggert <eggert@twinsun.com>
15510
15511 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
15512 around a UnixWare 7.1.1 porting bug reported by John Hughes in
15513 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
15514
15515 2003-02-26 Paul Eggert <eggert@twinsun.com>
15516
15517 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
15518 Remove Sequent/Pyramid discussion (nobody uses them any more).
15519 Merge VMS and MS-DOS discussion; these ports may well be dead
15520 but let's keep mentioning them for now. Put <> around email
15521 addresses. Add copyright notice.
15522
15523 2003-02-24 Paul Eggert <eggert@twinsun.com>
15524
15525 * data/glr.c (yy_reduce_print): yylineno -> yylno,
15526 to avoid collision with flex use of yylineno.
15527 Problem reported by Bruce Lilly in
15528 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
15529 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
15530 * data/yacc.c (yy_reduce_print): Likewise.
15531
15532 * config/depcomp: Sync with Automake 1.7.3.
15533
15534 2003-02-21 Akim Demaille <akim@epita.fr>
15535
15536 * data/lalr1.cc: Use temporary variables instead of casts to
15537 change integer types.
15538 Suggested by Paul Eggert.
15539
15540 2003-02-21 Akim Demaille <akim@epita.fr>
15541
15542 * doc/bison.texinfo: Use "location" consistently to refer to @n,
15543 to avoid confusions with lalr1.cc's notion of Position.
15544 Suggested by Paul Eggert.
15545
15546 2003-02-20 Akim Demaille <akim@epita.fr>
15547
15548 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
15549 before initial_columns.
15550 (location.hh): Use consistent variable names when defining the
15551 operator<<.
15552 Use "last" so that we subtract from Positions, not from unsigned.
15553
15554 2003-02-20 Akim Demaille <akim@epita.fr>
15555
15556 * data/lalr1.cc (position.hh): New subfile, including the extended
15557 and Doxygen'ed documentation of class Position.
15558 (location.hh): Use it.
15559 Document a` la Doxygen.
15560 With the help of Benoit Perrot.
15561
15562 2003-02-20 Akim Demaille <akim@epita.fr>
15563
15564 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
15565 AT_YACC_IF.
15566 Redefine AT_YYERROR_SEES_LOC_IF using it.
15567 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
15568 not defined.
15569 Don't use the location in yy::Parser::error_ and
15570 yy::Parser::print_ when not %locations.
15571 Activate more lalr1.cc tests.
15572
15573 2003-02-19 Akim Demaille <akim@epita.fr>
15574
15575 * data/lalr1.cc: When displaying a line number, be sure to make it
15576 an int.
15577
15578 2003-02-19 Akim Demaille <akim@epita.fr>
15579
15580 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
15581 Remove, useless.
15582 (YYABORT, YYACCEPT, YYERROR): New.
15583 * tests/calc.at: Renable the lalr1.cc test.
15584
15585 2003-02-19 Akim Demaille <akim@epita.fr>
15586
15587 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
15588 error recovery, mixing with/without pops and discarding of the
15589 lookahead.
15590 Exercise YYERROR.
15591 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
15592
15593 2003-02-17 Paul Eggert <eggert@twinsun.com>
15594
15595 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
15596 * tests/testsuite.at (AT_COMPILE): Use them.
15597 This fixes the testsuite problem reported by Robert Lentz in
15598 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
15599
15600 2003-02-12 Paul Eggert <eggert@twinsun.com>
15601
15602 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
15603 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
15604 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
15605 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
15606 Check for malloc failure, for consistency with yacc.c.
15607 (yytname_size): Remove, for consistency with yacc.c.
15608
15609 The bug still remains in data/lalr1.cc, as I didn't have time
15610 to fix it there.
15611
15612 2003-02-06 Akim Demaille <akim@epita.fr>
15613
15614 * configure.ac (GXX): Rename as...
15615 (CXX): this, to keep the original Autoconf semantics.
15616 Require 2.57.
15617 * data/lalr1.cc: Fix b4_copyright invocations.
15618 If YYDEBUG is not defined, don't depend upon name_ being defined.
15619 (location.hh): Include string and iostream.
15620 (Position::filename): New member.
15621 (Position::Position ()): New.
15622 (operator<< (Position)): New.
15623 (operator- (Position, int)): New.
15624 (Location::first, Location::last): Rename as...
15625 (Location::begin, Location::end): these, to mock the conventional
15626 iterator names.
15627 (operator<< (Location)): New.
15628 * tests/atlocal.in (CXX): New.
15629 * tests/testsuite.at (AT_COMPILE_CXX): New.
15630 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
15631 locations in a more synthetic way.
15632 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
15633 lalr1.cc is used.
15634 Adjust the C locations to match those from Emacs: first column is
15635 column 0.
15636 Change all the expected results.
15637 Conform to the GCS: simplify the locations when applicable.
15638 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
15639 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
15640 these CPP macros with the m4 macros new defined by...
15641 (AT_CHECK_PUSHDEFS): this, i.e.:
15642 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
15643 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
15644 New macros.
15645 (AT_CHECK_POPDEFS): Undefine them.
15646 (AT_CHECK_CALC_LALR1_CC): New.
15647 Use it for the first lalr1.cc test.
15648
15649 2003-02-04 Akim Demaille <akim@epita.fr>
15650
15651 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
15652 Location as is defined.
15653
15654 2003-02-04 Akim Demaille <akim@epita.fr>
15655
15656 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
15657 name_ being defined.
15658
15659 2003-02-03 Paul Eggert <eggert@twinsun.com>
15660
15661 * src/gram.h (start_symbol): Remove unused decl.
15662
15663 Use more-consistent naming conventions for local vars.
15664
15665 * src/derives.c (derives_compute): Change type of local var from
15666 int to rule_number.
15667 * src/gram.c (grammar_rules_partial_print): Likewise.
15668 * src/print.c (print_core): Likewise.
15669 * src/reduce.c (reduce_grammar_tables): Likewise.
15670
15671 * src/gram.c (grammar_dump): Change name of item_number *
15672 local var from r to rp.
15673 * src/nullable.c (nullable_compute): Likewise.
15674
15675 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
15676
15677 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
15678 for symbol or symbol_number var.
15679 * src/reader.c (grammar_start_symbol_set): Likewise.
15680 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
15681 Likewise.
15682 * src/state.c (transitions_to): Likewise.
15683 * src/state.h: Likewise.
15684 * src/tables.c (symbol_number_to_vector_number): Likewise.
15685
15686 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
15687 char * var.
15688
15689 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
15690 var.
15691
15692 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
15693 var.
15694
15695 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
15696 Use str, not s, for char * var. Use ch, not c, for character var.
15697 Use size for size var.
15698
15699 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
15700 char * var.
15701 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
15702 uniqstr var.
15703 * src/uniqstr.h: Likewise.
15704
15705 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15706 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15707 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
15708 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
15709 param to have same name as that of enum, so that we don't use
15710 "s" to stand for a non-state.
15711
15712 2003-02-02 Akim Demaille <akim@epita.fr>
15713
15714 * src/scan-skel.l: Scan more than one inert character per yylex
15715 invocation.
15716
15717 2003-02-01 Paul Eggert <eggert@twinsun.com>
15718
15719 Version 1.875a.
15720
15721 * po/LINGUAS: Add ms.
15722
15723 2003-01-30 Akim Demaille <akim@epita.fr>
15724
15725 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
15726
15727 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15728
15729 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
15730 of $1.
15731
15732 Changes in response to error report by S. Eken: GLR mode does not
15733 handle negative $ indices or $ indices in embedded rules correctly.
15734 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
15735
15736 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
15737 (b4_rhs_location): Ditto.
15738 (yyfill): New function to copy from stack tree into array
15739 incrementally.
15740 (yyuserAction): Modify to allow incremental move of semantic values
15741 to rhs array when in GLR mode.
15742 Define YYFILL to use in user-defined actions to fill semantic array
15743 as needed.
15744 Remove dummy use of yystack, as there is now a guaranteed use.
15745 (yydoAction): Modify to allow incremental move of semantic values
15746 to rhs array when in GLR mode.
15747 (yyresolveAction): Ditto.
15748 (yyglrShiftDefer): Update comment.
15749 (yyresolveStates): Use X == NULL for pointers, not !X.
15750 (yyglrReduce): Ditto.
15751 (yydoAction): Ditto
15752
15753 * tests/glr-regr1.at: Rename to ...
15754 * tests/glr-regression.at: Add new regression test for the problems
15755 described above (adapted from S. Eken).
15756 Update copyright notice.
15757 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
15758 * tests/Makefile.am: Ditto.
15759
15760 2003-01-28 Paul Eggert <eggert@twinsun.com>
15761
15762 * data/lalr1.cc: Do not use @output_header_name@ unless
15763 b4_defines_flag is set. This fixes two bugs reported by
15764 Tim Van Holder in
15765 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
15766 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
15767
15768 2003-01-21 Paul Eggert <eggert@twinsun.com>
15769
15770 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
15771 we don't need to worry about yyerrlab1 being reported as an
15772 "unused label" by non-GCC C compilers. The downside is that if
15773 locations are used then a couple of statements are duplicated each
15774 time YYERROR is invoked, but the upside is that the warnings
15775 should vanish.
15776 (yyerrlab1): Move code to YERROR.
15777 (yyerrlab2): Remove. Change uses back to yyerrlab1.
15778 This reverts some of the 2002-12-27 change.
15779
15780 2003-01-17 Paul Eggert <eggert@twinsun.com>
15781
15782 * src/output.c (symbol_printers_output): Fix typo that led
15783 to core dump. Problem reported by Antonio Rus in
15784 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
15785
15786 2003-01-13 Akim Demaille <akim@epita.fr>,
15787 Quoc Peyrot <chojin@lrde.epita.fr>,
15788 Robert Anisko <anisko_r@lrde.epita.fr>
15789
15790 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
15791 when the stacks contain one element, as the loop would otherwise
15792 free the last state, and then use the top state (the one we just
15793 popped). This means that the initial elements will not be freed
15794 explicitly, as is the case in yacc.c; it is not a problem, as
15795 these elements have fake values.
15796
15797 2003-01-11 Paul Eggert <eggert@twinsun.com>
15798
15799 * NEWS: %expect-violations are now just warnings, reverting
15800 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
15801 bootstrapping problem reported by Matthias Klose; see
15802 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
15803 * src/conflicts.c (conflicts_print): Likewise.
15804 * tests/conflicts.at (%expect not enough, %expect too much,
15805 %expect with reduce conflicts): Likewise.
15806 * doc/bison.texinfo (Expect Decl): Document this. Also mention
15807 that the warning is enabled if the number of conflicts changes
15808 (not necessarily increases).
15809
15810 * src/getargs.c (version): Update copyright year.
15811
15812 2003-01-09 Akim Demaille <akim@epita.fr>
15813
15814 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
15815
15816 2003-01-08 Paul Eggert <eggert@twinsun.com>
15817
15818 * Makefile.maint (WGETFLAGS):
15819 New macro, containing "-C off" to disable proxy caches.
15820 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
15821 (rel-check): Use $(WGET) instead of wget.
15822
15823 2003-01-06 Paul Eggert <eggert@twinsun.com>
15824
15825 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
15826 the GLR paper of Scott, Johnstone and Hussain.
15827
15828 2003-01-04 Paul Eggert <eggert@twinsun.com>
15829
15830 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
15831 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
15832 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
15833 (EXTRA_LIBRARIES): New var, for liby.a.
15834 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
15835 (EXTRA_SCRIPTS): New var, for yacc.
15836
15837 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
15838 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
15839 Problem reported by Nelson H. F. Beebe.
15840
15841 2003-01-03 Paul Eggert <eggert@twinsun.com>
15842
15843 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
15844 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
15845 when compiling Bison 1.875's `bitset bset = obstack_alloc
15846 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
15847
15848 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
15849 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
15850 grow to a huge size with typical invocation.
15851
15852 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
15853 Use the pattern recommended by Autoconf 2.57, except also protect
15854 against double-definition.
15855 * src/system.h: Likewise.
15856 Portability issues reported by Nelson H. F. Beebe.
15857
15858 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
15859 All uses changed. Provide a definition in both C and C++.
15860 (yytrue, yyfalse): Define even if defined (__cplusplus).
15861
15862 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
15863 Reported by Nelson H. F. Beebe.
15864
15865 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
15866
15867 2003-01-02 Paul Eggert <eggert@twinsun.com>
15868
15869 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
15870 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
15871 Bug reported by Nelson H. F. Beebe.
15872
15873 2003-01-01 Paul Eggert <eggert@twinsun.com>
15874
15875 * Version 1.875.
15876
15877 2002-12-30 Paul Eggert <eggert@twinsun.com>
15878
15879 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
15880 Moved here from...
15881 (<INITIAL>","): Here. This causes stray "," to be treated
15882 more uniformly.
15883
15884 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
15885 last brace in braced code when not in Yacc mode, for compatibility
15886 with Bison 1.35. This resurrects the 2001-12-15 patch to
15887 src/reader.c.
15888
15889 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
15890 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
15891
15892 2002-12-28 Paul Eggert <eggert@twinsun.com>
15893
15894 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
15895 that of SYM's type. This fixes Debian bug 168069, reported by
15896 Thomas Olsson.
15897
15898 2002-12-28 Paul Eggert <eggert@twinsun.com>
15899
15900 Version 1.75f.
15901
15902 Switch back to the Yacc style of conflict reports, undoing some
15903 of the 2002-07-30 change.
15904 * doc/bison.texinfo (Understanding): Use Yacc style for
15905 conflict reports. Also, use new way of locating rules.
15906 * src/conflicts.c (conflict_report):
15907 Renamed from conflict_report_yacc, removing the old
15908 'conflict_report'. Translate the entire conflict report at once,
15909 so that we don't assume that "," has the same interpretation in
15910 all languages.
15911 (conflicts_output): Use Yacc-style conflict report for each state,
15912 instead of our more-complicated style.
15913 (conflicts_print): Use Yacc-style conflict report, except print
15914 the input file name when not emulating Yacc.
15915 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
15916 Conflicted Reduction, %expect not enough, %expect too much,
15917 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
15918 * tests/existing.at (GNU Cim Grammar): Likewise.
15919 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
15920
15921 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
15922 fatal): Don't invoke fflush; it's not needed and it might even be
15923 harmful for stdout, as stdout might not be open.
15924 * src/reduce.c (reduce_print): Likewise.
15925
15926 2002-12-27 Paul Eggert <eggert@twinsun.com>
15927
15928 Fix a bug where error locations were not being recorded correctly.
15929 This problem was originally reported by Paul Hilfinger in
15930 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
15931
15932 * data/yacc.c (yyparse): New local var yylerrsp, to record the
15933 top of the location stack's error locations.
15934 (yyerrlab): Set it. When discarding a token, push its location
15935 onto yylerrsp so that we don't lose track of the error's end.
15936 (yyerrlab1): Now is only the target of YYERROR, so that we can
15937 properly record the location of the action that failed. For GCC
15938 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
15939 GCC warning about yyerrlab1 being unused if YYERROR is unused.
15940 (yyerrlab2): New label, which yyerrlab now falls through to.
15941 Compute the error's location by applying YYLLOC_DEFAULT to
15942 the locations of all the symbols that went into the error.
15943 * doc/bison.texinfo (Location Default Action): Mention that
15944 YYLLOC_DEFAULT is also invoked for syntax errors.
15945 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
15946 Error locations include the locations of all the tokens that were
15947 discarded, not just the last token.
15948
15949 2002-12-26 Paul Eggert <eggert@twinsun.com>
15950
15951 * src/files.c: Include quote.h.
15952 (compute_output_file_names): Warn if we detect conflicting
15953 outputs to the same file. This should catch the misunderstanding
15954 exemplified by Debian Bug 165349, reported by Bruce Stephens..
15955
15956 * src/conflicts.c (conflicts_print): If the user specifies
15957 "%expect N", report an error if there are any reduce/reduce
15958 conflicts. This is what the manual says should happen.
15959 This fixes Debian bug 130890, reported by Anthony DeRobertis.
15960 * tests/conflicts.at (%expect with reduce conflicts): New test.
15961
15962 Don't use m4_include on relative file names, as it doesn't work as
15963 desired if there happens to be a file with that name under ".".
15964
15965 * m4sugar/version.m4: Remove; it was included but it wasn't used.
15966 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
15967 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
15968 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
15969 * src/output.c (output_skeleton): Use full path names when
15970 specifying a file to include; don't rely on include path, as
15971 it's unreliable when the working file contains a file with
15972 that name.
15973
15974 2002-12-25 Paul Eggert <eggert@twinsun.com>
15975
15976 Remove obsolete references to bison.simple and bison.hairy.
15977 Problem mentioned by Aubin Mahe in
15978 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
15979 * data/glr.c: Comment fix.
15980 * doc/bison.1: Remove references. Also, mention "yacc".
15981
15982 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
15983 with -g option.
15984
15985 * src/parse-gram.y (declaration): Use enum "report_states" rather
15986 than its numeric value 1.
15987
15988 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
15989 opening a new one. This fixes Debian bug 165349, reported by
15990 Bruce Stephens.
15991
15992 2002-12-24 Paul Eggert <eggert@twinsun.com>
15993
15994 Version 1.75e.
15995
15996 * Makefile.maint (cvs-update): Don't assume that the shell
15997 supports $(...), as Solaris sh doesn't.
15998
15999 * src/parse-gram.y (lloc_default): Remove test for empty
16000 nonterminals at the end, since it didn't change the result.
16001
16002 2002-12-24 Paul Eggert <eggert@twinsun.com>
16003
16004 If the user does not define YYSTYPE as a macro, Bison now declares it
16005 using typedef instead of defining it as a macro. POSIX requires this.
16006 For consistency, YYLTYPE is also declared instead of defined.
16007
16008 %union directives can now have a tag before the `{', e.g., the
16009 directive `%union foo {...}' now generates the C code
16010 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
16011 The default union tag is `YYSTYPE', for compatibility with Solaris 9
16012 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
16013 instead of `yyltype'.
16014
16015 `yystype' and `yyltype' are now obsolescent macros instead of being
16016 typedefs or tags; they are no longer documented and will be
16017 withdrawn in a future release.
16018
16019 * data/glr.c (b4_location_type): Remove.
16020 (YYSTYPE): Renamed from yystype.
16021 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
16022 (struct YYLTYPE): Renamed from struct yyltype.
16023 (YYLTYPE): Renamed from yyltype.
16024 (yyltype, yystype): New (and obsolescent) macros,
16025 for backward compatibility.
16026 * data/yacc.c: Likewise.
16027
16028 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
16029 does not specify a union tag. This is for compatibility with
16030 Solaris 9 yacc.
16031
16032 * src/parse-gram.y (add_param): 2nd arg is now char * not char
16033 const *, since it is now modified by stripping surrounding { }.
16034 (current_braced_code): Remove.
16035 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
16036 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
16037 trailing " {...}". Now of type <chars>.
16038 (grammar_declaration): Adjust to bundled tokens.
16039 (code_content): Remove; stripping is now done by add_param.
16040 (print_token_value): Print contents of bundled tokens.
16041 (token_name): New function.
16042
16043 * src/reader.h (braced_code, current_braced_code): Remove.
16044 (token_name): New decl.
16045
16046 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
16047 token_type, not braced_code code_kind. All uses changed.
16048 (SC_PRE_CODE): New state, for scanning after a keyword that
16049 has (or usually has) an immediately-following braced code.
16050 (token_type): New local var, to keep track of which token type
16051 to return when scanning braced code.
16052 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
16053 <INITIAL>"%parse-param", <INITIAL>"%printer",
16054 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
16055 instead of returning a token type immediately.
16056 (<INITIAL>"{"): Set token type.
16057 (<SC_BRACED_CODE>"}"): Use it.
16058 (handle_action_dollar, handle_action_at): Now returns bool
16059 indicating success. Fail if ! current_rule; this prevents a core dump.
16060 (handle_symbol_code_dollar, handle_symbol_code_at):
16061 Remove; merge body into caller.
16062 (handle_dollar, handle_at): Complain in invalid contexts.
16063
16064 * NEWS, doc/bison.texinfo: Document the above.
16065 * NEWS: Fix years and program names in copyright notice.
16066
16067 2002-12-17 Paul Eggert <eggert@twinsun.com>
16068
16069 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
16070 Reporting, Table of Symbols): Omit mentions of %lex-param and
16071 %parse-param from the documentation for now.
16072
16073 2002-12-15 Paul Eggert <eggert@twinsun.com>
16074
16075 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
16076 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
16077 lookahead symbol, and which sets yychar in parser actions) and it
16078 disagreed with the Bison documentation. Bug
16079 reported by Andrew Walrond.
16080
16081 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
16082 as the caller now does that.
16083 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
16084 (YYEMPTY): Parenthesize right hand side, since others use it.
16085 (yyparse): Don't assume that our generated code is the only code
16086 that sets yychar.
16087
16088 2002-12-13 Paul Eggert <eggert@twinsun.com>
16089
16090 Version 1.75d.
16091
16092 POSIX requires a "yacc" command.
16093 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
16094 (MOSTLYCLEANFILES): Add yacc.
16095 (yacc): New rule.
16096 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
16097 as an alias for bison y.
16098
16099 * po/LINGUAS: Add da.
16100
16101 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
16102 problem with latest <getopt.h>.
16103 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
16104
16105 * doc/fdl.texi: Upgrade to 1.2.
16106 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
16107 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
16108 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
16109 gnulib.
16110 * config/install-sh: Sync with autotools.
16111
16112 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
16113 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
16114 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
16115 locations are requested.
16116 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
16117 locations are requested.
16118
16119 2002-12-12 Paul Eggert <eggert@twinsun.com>
16120
16121 Remove unportable casts and storage allocation tricks.
16122 While we're at it, remove almost all casts, since they
16123 usually aren't needed and are a sign of trouble.
16124
16125 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
16126
16127 * src/derives.c (derives_compute): Do not subtract NTOKENS from
16128 the pointer DSET returned by malloc; this isn't portable.
16129 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
16130 Similarly for DERIVES.
16131 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
16132 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
16133 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
16134
16135 * src/derives.c (derives_compute): Do not bother invoking
16136 int_of_rule_number, since rule numbers are integers.
16137
16138 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
16139 rather than XMALLOC (char, N).
16140
16141 * src/files.c (filename_split): Rewrite to avoid cast.
16142
16143 * src/gram.h (symbol_number_as_item_number,
16144 item_number_as_symbol_number, rule_number_as_item_number,
16145 item_number_as_rule_number):
16146 Now inline functions rather than macros, to avoid casts.
16147 * src/state.h (state_number_as_int): Likewise.
16148 * src/tables.c (state_number_to_vector_number,
16149 symbol_number_to_vector_number): Likewise.
16150
16151 * src/gram.h (int_of_rule_number): Remove; no longer used.
16152
16153 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
16154 since the resulting storage is always stored into.
16155
16156 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
16157 where it's needed.
16158
16159 * src/muscle_tab.c (muscle_m4_output):
16160 Now inline. Return bool, not int.
16161 * src/state.c (state_compare): Likewise.
16162 * src/symtab.c (symbol_check_defined,
16163 symbol_check_alias_consistency, symbol_pack, symbol_translation,
16164 hash_compare_symbol, hash_symbol):
16165 Likewise.
16166 * src/uniqstr.c (uniqstr_print): Likewise.
16167 * src/muscle_tab.c (muscle_m4_output_processor):
16168 New function, to avoid casts.
16169 * src/state.c (state_comparator, stage_hasher): Likewise.
16170 * src/symtab.c (symbol_check_defined_processor,
16171 symbol_check_alias_consistency_processor, symbol_pack_processor,
16172 symbol_translation_processor, hash_symbol_comparator,
16173 hash_symbol_hasher): Likewise.
16174 * src/uniqstr.c (uniqstr_print_processor): Likewise.
16175 * src/muscle_tab.c (muscles_m4_output):
16176 Use new functions instead of casting old functions unportably.
16177 * src/state.c (state_hash_new): Likewise.
16178 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
16179 symbols_token_translations_init):
16180 Likewise.
16181 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
16182
16183 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
16184 var instead of casting to long, to avoid casts.
16185 (prepare_states): Use MALLOC rather than alloca, so that we don't
16186 have to worry about alloca.
16187 * src/state.c (state_hash_lookup): Likewise.
16188
16189 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
16190 local var instead of casting to unsigned char, to avoid casts.
16191
16192 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
16193 STATE_ALLOC): Remove.
16194 (transitions_new, errs_new, reductions_new, state_new): Use malloc
16195 rather than calloc, and use offsetof to avoid allocating slightly
16196 too much storage.
16197 (state_new): Initialize all members.
16198
16199 * src/state.c (state_hash): Use unsigned accumulator, not signed.
16200
16201 * src/symtab.c (symbol_free): Remove; unused.
16202 (symbol_get): Remove cast in lhs of assignment.
16203 (symbols_do): Now static. Accept generic arguments, not
16204 hashing-related ones.
16205
16206 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
16207 (symbol_processor): Remove.
16208 (symbols_do): Remove decl; now static.
16209
16210 * src/system.h (alloca): Remove; decl no longer needed.
16211 (<stddef.h>): Include, for offsetof.
16212 (<inttypes.>, <stdint.h>): Include if available.
16213 (uintptr_t): New type, if system lacks it.
16214 (CALLOC, MALLOC, REALLOC): New macros.
16215 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
16216 new macros.
16217
16218 * src/tables.c (table_size): Now int, to pacify GCC.
16219 (table_grow, table_ninf_remap): Use signed table size.
16220 (save_row): Don't bother initializing locals when not needed.
16221 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
16222 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
16223
16224 * src/vcg.h: Correct misspellings.
16225
16226 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
16227
16228
16229 * src/getargs.c (getargs): Don't assume EOF == -1.
16230
16231 2002-12-09 Paul Eggert <eggert@twinsun.com>
16232
16233 Change identifier spellings to avoid collisions with names
16234 that are reserved by POSIX.
16235
16236 Don't use names ending in _t, since POSIX reserves them.
16237 For consistency, remove _e and _s endings -- they're weren't
16238 needed to remove ambiguity. All uses changed.
16239 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
16240 turn was just renamed from struniq_t.
16241 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
16242 which in turn was just renamed from struniq_processor_t.
16243 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
16244 in turn was renamed from hash_compare_struniq_t.
16245 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
16246 (state_list): Renamed from state_list_t.
16247 * src/assoc.h (assoc): Renamed from assoc_t.
16248 * src/conflicts.c (enum conflict_resolution): Renamed from
16249 enum conflict_resolution_e.
16250 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
16251 (rule_list): Renamed from rule_list_t.
16252 * src/getargs.h (enum trace): Renamed from enum trace_e.
16253 (enum report): Renamed from enum report_e.
16254 * src/gram.h (item_number): Renamed from item_number_t.
16255 (rule_number): Renamed from rule_number_t.
16256 (struct rule_s): Remove the "rule_s" part; not used.
16257 (rule): Renamed from rule_t.
16258 (rule_filter): Renamed from rule_filter_t.
16259 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
16260 (goto_list): Renamed from goto_list_t.
16261 * src/lalr.h (goto_number): Renamed from goto_number_t.
16262 * src/location.h (location): Renamed from location_t.
16263 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
16264 and moved here from:
16265 * src/muscle_tab.h (muscle_entry_t): here.
16266 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
16267 (rule_list): Renamed from rule_list_t.
16268 * src/print_graph.c (static_graph): Renamed from graph.
16269 * src/reader.h (braced_code): Renamed from braced_code_t.
16270 Remove brace_code_e tag.
16271 * src/relation.h (relation_node): Renamed from relation_node_t.
16272 (relation_nodes): Renamed from relation_nodes_t.
16273 (relation): Renamed from relation_t.
16274 * src/state.h (state_number): Renamed from state_number_t.
16275 (struct state): Renamed from struct state_s.
16276 (state): Renamed from state_t.
16277 (transitions): Renamed from transitions_t. Unused (and
16278 misspelled) transtion_s tag removed.
16279 (errs): Renamed from errs_t. Unused errs_s tag removed.
16280 (reductions): Renamed from reductions_t. Unused tag
16281 reductions_s removed.
16282 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
16283 (struct symbol_list): Renamed from struct symbol_list_s.
16284 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
16285 (struct symbol): Renamed from struct symbol_s.
16286 (symbol): Renamed from symbol_t.
16287 * src/tables.c (vector_number): Renamed from vector_number_t.
16288 (action_number): Renamed from action_t.
16289 * src/tables.h (base_number): Renamed from base_t.
16290 * src/vcg.h (enum color): Renamed from enum color_e.
16291 (enum textmode): Renamed from enum textmode_e.
16292 (enum shape): Renamed from enum shape_e.
16293 (struct colorentry): Renamed from struct colorentry_s.
16294 (struct classname): Renamed from struct classname_s.
16295 (struct infoname): Renamed from struct infoname_s.
16296 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
16297 (enum decision): Renamed from enum decision_e.
16298 (enum orientation): Renamed from enum orientation_e.
16299 (enum alignment): Renamed from enum alignment_e.
16300 (enum arrow_mode): Renamed from enum arrow_mode_e.
16301 (enum crossing_type): Renamed from enum crossing_type_e.
16302 (enum view): Renamed from enum view_e.
16303 (struct node): Renamed from struct node_s.
16304 (node): Renamed from node_t.
16305 (enum linestyle): Renamed from enum linestyle_e.
16306 (enum arrowstyle): Renamed from enum arrowstyle_e.
16307 (struct edge): Renamed from struct edge.
16308 (edge): Renamed from edge_t.
16309 (struct graph): Renamed from struct graph_s.
16310 (graph): Renamed from graph_t.
16311 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
16312 Rename value_t -> value.
16313 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
16314 value_t_as_yystype -> value_as_yystype.
16315
16316 Don't include <errno.h> in the mainstream code, since it
16317 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
16318 * lib/get-errno.c, lib/get-errno.h: New files.
16319 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
16320 get-errno.c.
16321 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
16322 * src/output.c (output_skeleton): Likewise.
16323 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
16324 instead of errno.
16325 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
16326 Likewise.
16327 (handle_action_dollar, handle_action_at): Likewise.
16328 * src/system.h: Do not include <errno.h>.
16329 (TAB_EXT): Renamed from EXT_TAB.
16330 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
16331
16332 Avoid str[a-z]*, since <string.h> reserves that name space.
16333 Change all instances of "struniq" in names to "uniqstr", and
16334 likewise for "STRUNIQ" and "UNIQSTR".
16335 * src/uniqstr.c: Renamed from src/struniq.c.
16336 * src/uniqstr.h: Renamed from src/struniq.h.
16337 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
16338 * src/files.c (strsuffix): Remove; unused.
16339 (concat2): Renamed from stringappend. Now static.
16340 * src/files.h (strsuffix, stringappend): Remove; unused.
16341 * src/parse-gram.y (<chars>): Renamed from <string>.
16342 (<uniqstr>): Renamed from <struniq>.
16343 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
16344 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
16345 (struct graph_s.expand): Renamed from struct graph_s.stretch.
16346 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
16347 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
16348 (N_EXPAND): Renamed from N_STRETCH.
16349
16350 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
16351 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
16352 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
16353 Remove; unused.
16354 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
16355 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
16356 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
16357 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
16358 (BASE_MAXIMUM): Renamed from BASE_MAX.
16359 (BASE_MINIMUM): Renamed from BASE_MIN.
16360 (ACTION_MAX): Remove; unused.
16361 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
16362 Unnecessary casts removed from above defines.
16363
16364
16365 Fix misspelling in names.
16366 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
16367 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
16368 G_NODE_ALIGNEMENT.
16369
16370
16371 * lib/timevar.c (timevar_report): Renamed from time_report,
16372 for consistency with other names.
16373 * lib/timevar.h (timevar_report): New decl.
16374 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
16375
16376
16377 Sort include-file uses.
16378
16379 Reorder all include files under src to be in the order "system.h".
16380 then the ../lib include files in angle brackets (alphabetized),
16381 then the . include files in double-quotes (alphabetized). Fix
16382 dependency breakages encountered in this process, as follows:
16383 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
16384 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
16385 * src/state.h: Include "symtab.h".
16386
16387 2002-12-08 Paul Eggert <eggert@twinsun.com>
16388
16389 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
16390 since this causes problems when __file__ contains character
16391 sequences like "@" that are treated specially by src/scan-skel.l.
16392 Instead, just use the file's basename. This fixes the bug
16393 reported by Martin Mokrejs in
16394 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
16395
16396 2002-12-06 Paul Eggert <eggert@twinsun.com>
16397
16398 Add support for rules that do not have trailing semicolons, as
16399 POSIX requires. Improve the quality of locations in Bison
16400 diagnostics.
16401
16402 * src/location.c: Include <quotearg.h>.
16403 (empty_location): Now const.
16404 (location_print): New function. Follow the recommendation of the
16405 GNU Coding Standards for locations that span file boundaries.
16406 * src/location.h: Do not include <quotearg.h>; no longer needed.
16407 (boundary): New type.
16408 (location_t): Use it. This allows locations to span file boundaries.
16409 All member uses changed: file -> start.file or end.file (as needed),
16410 first_line -> start.line, first_column -> start.column,
16411 last_line -> end.line, last_column -> end.column.
16412 (equal_boundaries): New function.
16413 (LOCATION_RESET, LOCATION_STEP): Remove.
16414 (LOCATION_PRINT): Remove. All callers changed to use location_print.
16415 (empty_location): Now const.
16416 (location_print): New decl.
16417 * src/parse-gram.y (lloc_default): New function, which handles
16418 empty locations more accurately.
16419 (YYLLOC_DEFAULT): Use it.
16420 (%token COLON): Remove.
16421 (%token ID_COLON): New token.
16422 (rules): Use it.
16423 (declarations, rules): Remove trailing semicolon.
16424 (declaration, rules_or_grammar_declaration):
16425 Allow empty (";") declaration.
16426 (symbol_def): Remove empty actions; no longer needed.
16427 (rules_or_grammar_declaration): Remove trailing semicolon.
16428 (semi_colon.opt): Remove.
16429 * src/reader.h: Include location.h.
16430 (scanner_cursor): New decl.
16431 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
16432 rolling our own.
16433 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
16434 of *loc.
16435 (STEP): Remove. No longer needed, now that adjust_location does
16436 the work. All uses removed.
16437 (scanner_cursor): New var.
16438 (adjust_location): Renamed from extend_location. It now sets
16439 *loc and adjusts the scanner cursor. All uses changed.
16440 Don't bother testing for CR.
16441 (handle_syncline): Remove location arg; now updates scanner cursor.
16442 All callers changed.
16443 (unexpected_end_of_file): Now accepts start boundary of token or
16444 comment, not location. All callers changed. Update scanner cursor,
16445 not the location.
16446 (SC_AFTER_IDENTIFIER): New state.
16447 (context_state): Renamed from c_context. All uses changed.
16448 (id_loc, code_start, token_start): New local vars.
16449 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
16450 processing of Yacc white space and equivalents here.
16451 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
16452 instead of returning ID immediately, since we need to search for
16453 a subsequent colon.
16454 (<INITIAL>"'", "\""): Save token_start.
16455 (<INITIAL>"%{", "{", "%%"): Save code_start.
16456 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
16457 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
16458 BEGIN context_state at end, not INITIAL.
16459 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
16460 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
16461 Return correct token start.
16462 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
16463 the start of a character, string or multiline comment is found.
16464 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
16465 Reduction): Adjust reported locations to match the more-precise
16466 results now expected.
16467 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
16468 * tests/reduce.at (Useless Rules, Reduced Automaton,
16469 Underivable Rules): Likewise.
16470 * tests/regression.at (Invalid inputs): No longer `expecting ";"
16471 or "|"' now that so many other tokens are allowed by the new grammar.
16472
16473 * src/complain.h (current_file): Remove duplicate decl;
16474 current_file is now owned by files.h.
16475 * src/complain.c, src/scan-gram.l: Include files.h.
16476
16477 2002-12-06 Paul Eggert <eggert@twinsun.com>
16478
16479 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
16480 promotes to int; it might be unsigned int.
16481 * data/yacc.c (yy_reduce_print): Likewise.
16482
16483 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
16484 be #defined in the prologue, not in the Bison declarations.
16485 This fixes Debian Bug 102878, reported by Shaul Karl.
16486
16487 2002-12-02 Paul Eggert <eggert@twinsun.com>
16488
16489 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
16490 * lib/strtoul.c: New file, from gnulib.
16491 This fixes a porting bug reported by Peter Klein in
16492 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
16493
16494 2002-11-30 Paul Eggert <eggert@twinsun.com>
16495
16496 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
16497 and put only a forward declaration in the prologue. This is for
16498 consistency with the other scanner helper functions.
16499
16500 Type clashes now generate warnings, not errors, since it
16501 appears that POSIX may allow some grammars with type clashes.
16502 * src/reader.c (grammar_current_rule_check): Warn about
16503 type clashes instead of complaining.
16504 * tests/input.at (Type Clashes): Expect warnings, not complaints.
16505
16506 Add Yacc library, since POSIX requires it.
16507 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
16508 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
16509 * lib/main.c, lib/yyerror.c: New files.
16510
16511 gram_error can be static; it need not be extern.
16512 * src/reader.h (gram_error): Remove decl.
16513 * src/parse-gram.y (gram_error): Now static. Add static decl.
16514 (print_token_value): Omit parameter names from forward decl,
16515 for consistency.
16516
16517 2002-11-29 Paul Eggert <eggert@twinsun.com>
16518
16519 * doc/bison.texinfo: Emphasize that yylex and yyerror must
16520 be declared before being used. E.g., one should typically
16521 declare them in the prologue. Use GNU coding style in examples.
16522 Put "const" consistently after the type it modifies. Mention
16523 that C99 supports "inline". Mention that yyerror traditionally
16524 returns "int".
16525
16526 %parse-param and %lex-param now take just one argument, the
16527 declaration; the argument name is deduced from the declaration.
16528
16529 * doc/bison.texinfo (Parser Function, Pure Calling, Error
16530 Reporting, Table of Symbols): Document this.
16531 * src/parse-gram.y (add_param): New function.
16532 (COMMA): Remove.
16533 (declaration): Implement new rule for %parse-param and %lex-param.
16534 * src/scan-gram.l: "," now elicits a warning, rather than being
16535 a token; this is more compatible with byacc.
16536 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
16537
16538 2002-11-27 Paul Eggert <eggert@twinsun.com>
16539
16540 Rename identifiers to avoid real and potential collisions.
16541
16542 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
16543 to avoid collision with lex macro described by Bruce Lilly in
16544 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
16545 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
16546 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
16547 * src/parse-gram.y (print_token_value): Renamed from yyprint.
16548 All uses changed.
16549 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
16550 The name "yycontrol" violates the name space rules, and this stuff
16551 wasn't being used anyway.
16552 (input): Remove action; this stuff wasn't being used.
16553 (gram_error): Rename local variable yylloc -> loc.
16554 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
16555 (YY_DECL): Don't use "yy" at start of local variables.
16556 All uses changed, e.g., yylloc -> loc.
16557 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
16558 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
16559 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
16560 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
16561
16562 * src/parse-gram.y (gram_error): loc is now const *.
16563 * src/reader.h (gram_error): Likewise.
16564
16565 2002-11-24 Paul Eggert <eggert@twinsun.com>
16566
16567 Version 1.75c.
16568
16569 * tests/actions.at (Actions after errors): Use an output format
16570 more similar to that of the Printers and Destructors test.
16571 Test the position of the ';' token too.
16572 (Printers and Destructors): Likewise.
16573 (Printers and Destructors: %glr-parser): Remove for now, to avoid
16574 unnecessarily alarming people when the test fails.
16575
16576 * data/yacc.c (yyerrlab1): Move this label down, so that the
16577 parser does not discard the lookahead token if the user code
16578 invokes YYERROR. This change is required for POSIX conformance.
16579
16580 * lib/error.c: Sync with gnulib.
16581
16582 2002-11-22 Paul Eggert <eggert@twinsun.com>
16583
16584 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
16585 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
16586 * lib/xmalloc.c: Likewise.
16587
16588 2002-11-20 Paul Eggert <eggert@twinsun.com>
16589
16590 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
16591
16592 2002-11-20 Paul Eggert <eggert@twinsun.com>
16593
16594 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
16595 should use `if (! x) abort ();' rather than `assert (x);', and
16596 anyway it's one less thing to worry about configuring.
16597
16598 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
16599 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
16600 and replace all instances of assert with abort.
16601 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
16602 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
16603
16604 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
16605 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
16606 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
16607 hash_find_entry, hash_rehash, hash_insert): Likewise.
16608 * src/conflicts.c (resolve_sr_conflict): Likewise.
16609 * src/lalr.c (set_goto_map, map_goto): Likewise.
16610 * src/nullable.c (nullable_compute): Likewise.
16611 * src/output.c (prepare_rules, token_definitions_output): Likewise.
16612 * src/reader.c (packgram, reader): Likewise.
16613 * src/state.c (state_new, state_free, state_transitions_set,
16614 state_reduction_find): Likewise.
16615 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
16616 symbol_pack): Likewise.
16617 * src/tables.c (conflict_row, pack_vector): Likewise.
16618 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
16619 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
16620 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
16621 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
16622
16623 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
16624 (ARGMATCH_CONSTRAINT): New macro.
16625 (ARGMATCH_ASSERT): Use it.
16626
16627 * src/system.h (verify): New macro.
16628 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
16629 rather than assert.
16630 * src/tables.c (tables_generate): Likewise.
16631
16632 * src/struniq.c (struniq_assert): Now returns void, and aborts
16633 if the assertion is false.
16634 (struniq_assert_p): Remove.
16635 * src/struniq.h: Likewise.
16636
16637 2002-11-18 Paul Eggert <eggert@twinsun.com>
16638
16639 * data/glr.c (yygetLRActions): Replace `yyindex' with
16640 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
16641 This fixes the regression with Sun ONE Studio 7 cc that I reported in
16642 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
16643
16644 2002-11-18 Akim Demaille <akim@epita.fr>
16645
16646 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
16647 space.
16648 From Tim Van Holder.
16649
16650 2002-11-17 Paul Eggert <eggert@twinsun.com>
16651
16652 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
16653 to "SyntaxError" for consistency with my 2002-11-15 change.
16654
16655 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
16656 not define to {}, since this breaks the common use of `YYDPRINTF
16657 ((...));' if a single statement is desired (e.g. before `else').
16658 Work around GCC warnings by surrounding corresponding calls with
16659 {} if needed.
16660 (yyhasResolvedValue): Remove unused function.
16661 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
16662 loop body.
16663 (yyreportSyntaxError): Renamed from yyreportParseError.
16664 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
16665 All uses changed.
16666 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
16667 extern when possible. Remove unused initializations.
16668
16669 2002-11-16 Akim Demaille <akim@epita.fr>
16670
16671 Augment the similarity between GLR and LALR traces.
16672
16673 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
16674 (YY_REDUCE_PRINT): New.
16675 (yyparse): Use them.
16676 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
16677 YYDPRINT here.
16678 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
16679 state reached after the reduction/recovery, since...
16680 (yyparse, yyprocessOneStack): Report the state we are entering in.
16681
16682 2002-11-16 Akim Demaille <akim@epita.fr>
16683
16684 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
16685 Add support for --trace=skeleton.
16686 * src/scan-skel.l: %option debug.
16687 Scan strings of non-@ or \n instead of character by character.
16688 (scan_skel): Handle trace_skeleton.
16689 (QPUTS): New.
16690 (@output_parser_name@, @output_header_name@): ``Restore'' their
16691 support (used to be M4 macros).
16692 * data/yacc.c: Quote larger chunks, a la glr.c.
16693 * data/lalr1.cc: Likewise.
16694 The header guards are no longer available, so use some other
16695 string than `YYLSP_NEEDED'.
16696
16697 2002-11-16 Akim Demaille <akim@epita.fr>
16698
16699 Make the ``Printers and Destructors'' test more verbose, taking
16700 `yacc.c''s behavior as (possibly wrong) reference.
16701
16702 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
16703 instead of fprint on stdout.
16704 Set and report the last_line of the symbols.
16705 Consistently display values and locations.
16706
16707 2002-11-16 Paul Eggert <eggert@twinsun.com>
16708
16709 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
16710
16711 2002-11-15 Paul Eggert <eggert@twinsun.com>
16712
16713 * tests/actions.at (Actions after errors): New test case.
16714
16715 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
16716 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
16717 tests/action.at, tests/calc.at, tests/conflicts.at,
16718 tests/cxx-type.at, tests/regression.at:
16719 "parse error" -> "syntax error" for POSIX compatibility.
16720 "parsing stack overflow..." -> "parser stack overflow" so
16721 that code matches Bison documentation.
16722
16723 2002-11-15 Akim Demaille <akim@epita.fr>
16724
16725 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
16726 take two BRACED_CODE, not two string_content.
16727 Free the scanner's obstack when we are done.
16728 (code_content): New.
16729 * tests/calc.at: Adjust.
16730 * doc/bison.texinfo: Adjust.
16731 Also, make sure to include the `,' for these declarations.
16732
16733 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
16734
16735 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
16736 definition; avoids potential autoreconf problems.
16737
16738 2002-11-15 Akim Demaille <akim@epita.fr>
16739
16740 Always check the value returned by yyparse.
16741
16742 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
16743 returned by yyparse.
16744 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
16745 Adjust calls.
16746 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
16747 returned by yyparse.
16748
16749 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16750
16751 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
16752 on input.at test.
16753
16754 2002-11-14 Paul Eggert <eggert@twinsun.com>
16755
16756 * src/output.c (output_skeleton): Call xfopen instead of
16757 duplicating xfopen's body.
16758
16759 Fix bugs reported by Nelson H. F. Beebe in
16760 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
16761
16762 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
16763 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
16764 Group compiler. Instead, use "$CC -E bar.c". Include the .h
16765 file twice in the grammar, as an extra check.
16766
16767 * tests/input.at (Torturing the Scanner): Surround the
16768 backslash-newline tests with "#if 0", to make it less likely that
16769 we'll run into compiler bugs. Bring back solitary \ inside
16770 comment, but add a closing comment to work around HP C bug. Don't
16771 test backslash-newline in C character constant.
16772
16773 2002-11-14 Akim Demaille <akim@epita.fr>
16774
16775 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
16776 status of the compiler.
16777 Calling `exit 1' is no longer needed.
16778 Reported by Nelson H. F. Beebe.
16779
16780 2002-11-14 Akim Demaille <akim@epita.fr>
16781
16782 * tests/atlocal.in (CPPFLAGS): We have config.h.
16783 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
16784 New.
16785 * tests/actions.at, tests/calc.at, tests/conflicts.at,
16786 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
16787 * tests/regression.at, tests/torture.at: Use them for all the
16788 grammars that are to be compiled.
16789 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
16790 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
16791 * doc/bison.texinfo (GLR Parsers): Document `inline'.
16792
16793 2002-11-14 Akim Demaille <akim@epita.fr>
16794
16795 * doc/bison.texinfo: Various formatting changes (alignments in
16796 samples, additional @group/@end group, GCS in samples.
16797 Use @deffn instead of simple @table to define the directives,
16798 macros, variables etc.
16799
16800 2002-11-13 Paul Eggert <eggert@twinsun.com>
16801
16802 Fix some bugs reported by Albert Chin-A-Young in
16803 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
16804
16805 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
16806 -o c"; the HP C compiler chatters during compilation.
16807 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
16808 * tests/headers.at (export YYLTYPE): Likewise.
16809
16810 * tests/input.at (Torturing the Scanner): Remove lines containing
16811 solitary backslashes, as they tickle a bug in the HP C compiler.
16812
16813 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
16814 comments, since they're not portable. Use GNU coding style.
16815
16816 2002-11-13 Akim Demaille <akim@epita.fr>
16817
16818 * data/yacc.c: Leave bigger chunks of quoted text.
16819 (YYDSYMPRINTF): New.
16820 Use it to report symbol activities.
16821 * data/glr.c (YYDSYMPRINTF): New.
16822 Use it.
16823
16824 2002-11-12 Paul Eggert <eggert@twinsun.com>
16825
16826 Version 1.75b.
16827
16828 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
16829 (yyglrReduce): Return yyok, not 0.
16830 This should avoid the enumerated-type warnings reported
16831 by Nelson H. F. Beebe in
16832 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
16833
16834 * lib/bbitset.h (BITSET_INLINE): Remove.
16835 * lib/bitset.h [! BITSET_INLINE]: Remove.
16836 (bitset_set, bitset_reset, bitset_test): Rename local vars
16837 to avoid shadowing warnings by GCC.
16838
16839 * data/glr.c (inline): Remove #define. It's the user's
16840 responsibility to #define it away, just like 'const'.
16841 This fixes one of the bugs reported by Nelson H. F. Beebe in
16842 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
16843
16844 * Makefile.maint (po-check): Scan .l and .y files instead of the
16845 .c and the .h files that they generate. This fixes the bug
16846 reported by Tim Van Holder in:
16847 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
16848 Look for N_ as well as for _. Try to avoid matching #define for
16849 N_ and _.
16850 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
16851 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
16852 * src/scan-gram.l: Revamp regular expressions so that " and '
16853 do not confuse xgettext.
16854
16855 * src/struniq.h (struniq_new): Do not declare the return type
16856 to be 'const'; this violates the C standard.
16857 * src/struniq.c (struniq_new): Likewise.
16858
16859 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
16860
16861 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
16862 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
16863 linker.
16864
16865 2002-11-12 Akim Demaille <akim@epita.fr>
16866
16867 * Makefile.maint: Sync with Autoconf:
16868 (local_updates): New.
16869
16870 2002-11-12 Akim Demaille <akim@epita.fr>
16871
16872 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
16873
16874 2002-11-12 Akim Demaille <akim@epita.fr>
16875
16876 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
16877 locations.
16878
16879 2002-11-12 Akim Demaille <akim@epita.fr>
16880
16881 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
16882 not yyvalue.
16883
16884 2002-11-12 Akim Demaille <akim@epita.fr>
16885
16886 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
16887 Use it to test the GLR parser.
16888
16889 2002-11-12 Akim Demaille <akim@epita.fr>
16890
16891 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
16892 defines it.
16893 * data/glr.c (yystos): New.
16894 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
16895 (YYDSYMPRINT): New.
16896 (yyval): Don't define it, it is handled via M4.
16897 (yyrecoverParseError): Free verbosely the discarded symbols.
16898 * data/yacc.c (yysymprint): Remove, rather...
16899 (b4_yysymprint_generate): invoke.
16900 * data/c.m4 (b4_yysymprint_generate): New.
16901 Accept pointers as arguments, as opposed to the version from
16902 yacc.c.
16903 (b4_yydestruct_generate): Likewise.
16904 * tests/cations.at (Printers and Destructors): Use Bison directives
16905 instead of CPP macros.
16906 Don't rely on internal details.
16907
16908 2002-11-12 Akim Demaille <akim@epita.fr>
16909
16910 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
16911 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
16912 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
16913 it against YYEMPTY and so forth), work on yytoken (i.e., set
16914 it to YYEMPTY etc.).
16915 (yydestruct): Replace with a b4_yydestruct_generate invocation.
16916 (b4_symbol_actions): Remove.
16917 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
16918 for 0, end-of-input.
16919
16920 2002-11-12 Akim Demaille <akim@epita.fr>
16921
16922 * doc/bison.texinfo (Destructor Decl): New.
16923
16924 2002-11-12 Akim Demaille <akim@epita.fr>
16925
16926 * src/tables.c (tables_generate): Use free for pointers that
16927 cannot be NULL, not XFREE.
16928 (pack_vector): Use assert, not fatal, for bound violations.
16929 * src/state.c (state_new): Likewise.
16930 * src/reader.c (reader): Likewise.
16931 * src/lalr.c (set_goto_map): Likewise.
16932 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
16933 the file name.
16934
16935 2002-11-12 Akim Demaille <akim@epita.fr>
16936
16937 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
16938 Restore.
16939 * src/scan-gram.l (last_string): Is global to the file, not to
16940 yylex.
16941 * src/parse-gram.y (input): Don't append the epilogue here,
16942 (epilogue.opt): do it here, and free the scanner's obstack.
16943 * src/reader.c (epilogue_set): Rename as...
16944 (epilogue_augment): this.
16945 * data/c.m4 (b4_epilogue): Defaults to empty.
16946
16947 2002-11-12 Akim Demaille <akim@epita.fr>
16948
16949 * src/getargs.c (long_options): Remove duplicates.
16950 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
16951 Remove.
16952 * doc/bison.rnh: Remove.
16953 * doc/bison.texinfo (VMS Invocation): Remove.
16954
16955 2002-11-12 Akim Demaille <akim@epita.fr>
16956
16957 * src/struniq.h, src/struniq.c (struniq_t): Is const.
16958 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
16959
16960 Use struniq for symbols.
16961
16962 * src/symtab.h (symbol_t): The tag member is a struniq.
16963 (symbol_type_set): Adjust.
16964 * src/symtab.c (symbol_new): Takes a struniq.
16965 (symbol_free): Don't free the tag member.
16966 (hash_compare_symbol_t, hash_symbol_t): Rename as...
16967 (hash_compare_symbol, hash_symbol): these.
16968 Use the fact that tags as struniqs.
16969 (symbol_get): Use struniq_new.
16970 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
16971 Returns a strniq.
16972 * src/reader.h (merger_list, grammar_currentmerge_set): The name
16973 and type members are struniqs.
16974 * src/reader.c (get_merge_function)
16975 (grammar_current_rule_merge_set): Adjust.
16976 (TYPE, current_type): Are struniq.
16977
16978 Use struniq for file names.
16979
16980 * src/files.h, src/files.c (infile): Split into...
16981 (grammar_file, current_file): these.
16982 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
16983 * src/reduce.c (reduce_print): Likewise.
16984 * src/getargs.c (getargs): Likewise.
16985 * src/complain.h, src/complain.c: Likewise.
16986 * src/main.c (main): Call struniqs_new early enough to use it for
16987 file names.
16988 Don't free the input file name.
16989
16990 2002-11-12 Akim Demaille <akim@epita.fr>
16991
16992 * src/symtab.c (symbol_free): Remove dead deactivated code:
16993 type_name are properly removed.
16994 Don't use XFREE to free items that cannot be NULL.
16995 * src/struniq.h, src/struniq.c: New.
16996 * src/main.c (main): Initialize/free struniqs.
16997 * src/parse-gram.y (%union): Add astruniq member.
16998 (yyprint): Adjust.
16999 * src/scan-gram.l (<{tag}>): Return a struniq.
17000 Free the obstack bit that used to store it.
17001 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
17002
17003 2002-11-11 Paul Eggert <eggert@twinsun.com>
17004
17005 Revamp to fix many (but not all) of the C- and M4-related quoting
17006 problems. Among other things, this fixes the Bison bug reported
17007 by Jan Hubicka when processing the Bash grammar; see:
17008 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
17009
17010 Use new @ escapes consistently. Represent brackets with @{ and @}
17011 rather than @<:@ and @:>@, since this works a bit better with dumb
17012 editors like vi. Represent @ with @@, since @ is now consistently
17013 an escape. Use @oline@ and @ofile@ rather than __oline__ and
17014 __ofile__, to avoid unexpected expansions. Similarly, use @output
17015 rather than #output.
17016
17017 * data/c.m4 (b4_copyright): Omit file name from comment, since
17018 the file name could contain "*/".
17019 (b4_synclines_flag): Don't quote the 2nd argument; it should already
17020 be quoted. All uses changed.
17021
17022 * data/glr.c: Use new @ escapes consistently.
17023 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
17024 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
17025 Remove, since they couldn't handle arbitrary characters in file
17026 names.
17027 * data/lalr1.cc: Likewise.
17028 * data/yacc.c: Likewise.
17029
17030 * src/files.c (output_infix): Remove; all uses removed.
17031 * src/files.h: Likewise.
17032
17033 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
17034 mishandled funny characters in file names, and anyway it isn't
17035 needed any more.
17036 * data/yacc.c: Likewise.
17037 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
17038
17039 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
17040 * data/yacc.c: Likewise.
17041
17042 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
17043 strings now.
17044 (muscle_init): Quote filename as a C string.
17045 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
17046 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
17047 * src/output.c (escaped_file_name_output): New function.
17048 (prepare_symbols): Quote tokens for M4.
17049 (prepare): Don't insert output_infix, output_prefix,
17050 output_parser_name, output_header_name; this is now down by scan-skel.
17051 Insert skeleton as a C string.
17052
17053 * src/output.c (user_actions_output, symbol_destructors_output,
17054 symbol_printers_output): Quote filenames for C and M4.
17055 * src/reader.c (prologue_augment, epilogue_set): Likewise.
17056
17057 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
17058 escapes other than \\ and \'; this simplifies the code.
17059 (<SC_STRING>): Likewise, for \\ and \".
17060 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
17061 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
17062 Use new escapes @{ and @} for [ and ].
17063
17064 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
17065 them with auto vars.
17066 Switch to new escape scheme, where @ is the escape character uniformly.
17067 Abort if a stray escape character is found. Avoid unbounded input
17068 buffer when parsing non-escaped text.
17069
17070 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
17071 __oline__, #output, $@, and @{ do not have unintended meanings.
17072
17073 2002-11-09 Paul Eggert <eggert@twinsun.com>
17074
17075 Fix the test failure due to GCC warnings described in
17076 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
17077 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
17078 evaluate to 0 if it's impossible for NINF to be in the respective
17079 table.
17080 (yygetLRActions, yyrecoverParseError): Use them.
17081
17082 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
17083 counted in the token inserted at end of file. Now takes
17084 location_t *, not location_t, so that the location can be
17085 adjusted. All uses changed.
17086
17087 * tests/regression.at (Invalid inputs): Adjust wording in
17088 diagnostic to match the new behavior.
17089
17090 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
17091 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
17092 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
17093 abort ();'. This reduces the runtime of the "Many lookaheads"
17094 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
17095 GCC 3.2.
17096
17097 2002-11-07 Paul Eggert <eggert@twinsun.com>
17098
17099 * src/parse-gram.y (CHARACTER): Remove unused token.
17100 All uses removed.
17101
17102 * src/scan-gram.l: Remove stack option. We no longer use the
17103 stack, since the stack was never deeper than 1; instead, use the
17104 new auto var c_context to record the stacked value.
17105
17106 Remove nounput option. At an unexpected end of file, we now unput
17107 the minimal input necessary to end cleanly; this simplifies the
17108 code.
17109
17110 Avoid unbounded token sizes where this is easy.
17111
17112 (unexpected_end_of_file): New function.
17113 Use it to systematize the error message on unexpected EOF.
17114 (last-string): Now auto, not static.
17115 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
17116 (scanner_last_string_free): Remove; not used.
17117 (percent_percent_count): Move decl to just before use.
17118 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
17119 not the (never otherwised-used) CHARACTER.
17120
17121 2002-11-07 Akim Demaille <akim@epita.fr>
17122
17123 Let yyerror always receive the msg as last argument, so that
17124 yyerror can be variadic.
17125
17126 * data/yacc.c (b4_yyerror_args): New.
17127 Use it when calling yyerror.
17128 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
17129 Use it when calling yyerror.
17130 * doc/bison.texinfo (Error Reporting): Adjust.
17131 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
17132 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
17133
17134 2002-11-06 Akim Demaille <akim@epita.fr>
17135
17136 #line should have quoted strings.
17137 Ideally, this should be done by m4_quotearg.
17138
17139 * src/scan-skel.l: Include quotearg.h.
17140 Quote __ofile__.
17141 * src/output.c (symbol_printers_output)
17142 (symbol_destructors_output): Quote the file name.
17143
17144 2002-11-06 Akim Demaille <akim@epita.fr>
17145
17146 * tests/regression.at (Invalid inputs): Adjust to the recent
17147 messages.
17148
17149 2002-11-06 Akim Demaille <akim@epita.fr>
17150
17151 Restore --no-lines.
17152 Reported by Jim Kent.
17153
17154 * data/c.m4 (b4_syncline): New.
17155 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
17156 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
17157 * src/output.c (user_actions_output): Likewise.
17158 (prepare): Define 'b4_synclines_flag'.
17159 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
17160
17161 2002-11-06 Akim Demaille <akim@epita.fr>
17162
17163 * src/main.c (main): Free `infile'.
17164 * src/scan-gram.l (handle_syncline): New.
17165 Recognize `#line'.
17166 * src/output.c (user_actions_output, symbol_destructors_output)
17167 (symbol_printers_output): Use the location's file name, not
17168 infile.
17169 * src/reader.c (prologue_augment, epilogue_set): Likewise.
17170
17171 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17172
17173 * src/tables.c (matching_state): Don't allow states to match if
17174 either has GLR conflict entries.
17175
17176 2002-11-05 Paul Eggert <eggert@twinsun.com>
17177
17178 * src/scan-gram.l: Use more accurate diagnostics, e.g.
17179 "integer out of range" rather than "invalid value".
17180 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
17181 accordingly.
17182
17183 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
17184 Also, remove one static variable in the scanner.
17185
17186 * src/scan-gram.l (braces_level): Now auto, not static.
17187 Initialize to zero if the compiler is being picky.
17188 (INITIAL): Clear braces_level instead of incrementing it.
17189 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
17190 as POSIX 1003.1-2001 requires.
17191 * src/system.h (IF_LINT): New macro, taken from coreutils.
17192 * configure.ac: Define "lint" if --enable-gcc-warnings.
17193
17194 2002-11-05 Akim Demaille <akim@epita.fr>
17195
17196 * src/scan-gram.l: When it starts with `%', complain about the
17197 whole directive, not just that `invalid character: %'.
17198
17199 2002-11-04 Akim Demaille <akim@epita.fr>
17200
17201 * Makefile.maint: Update from Autoconf.
17202 (update, cvs-update, po-update, do-po-update): New.
17203
17204 2002-11-04 Akim Demaille <akim@epita.fr>
17205
17206 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
17207 and yyerror.
17208 Have yyerror `use' its arguments.
17209 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
17210 returns true when location & yacc & pure & parse-param.
17211 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
17212
17213 2002-11-04 Akim Demaille <akim@epita.fr>
17214
17215 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
17216 clashes.
17217 * src/scan-gram.l: Use [\'] instead of ['] to pacify
17218 font-lock-mode.
17219 Use complain_at.
17220 Use quote, not quote_n since LOCATION_PRINT no longer uses the
17221 slot 0.
17222
17223 2002-11-03 Paul Eggert <eggert@twinsun.com>
17224
17225 * src/reader.c (get_merge_function, grammar_current_rule_check):
17226 Use consistent diagnostics for reporting type name clashes.
17227 Quote the types with <>, for consistency with Yacc.
17228 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
17229
17230 2002-11-03 Akim Demaille <akim@epita.fr>
17231
17232 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
17233 New.
17234 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
17235 (b4_parse_param): Remove.
17236 Use b4_identification.
17237 Propagate b4_pure_args where needed to pass them to yyerror.
17238 * data/glr.m4 (b4_parse_param): Remove.
17239 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
17240 (b4_lpure_formals): New.
17241 Use b4_identification.
17242 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
17243 b4_user_formals and b4_user_args.
17244 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
17245 (yyreportAmbiguity): When using a pure parser, also need
17246 the location, and the parse-params.
17247 Adjust callers.
17248 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
17249 When using a pure parser, also need the parse-params.
17250 Adjust callers.
17251 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
17252 (%pure-parser + %parse-param) LALR and GLR parsers.
17253 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
17254 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
17255 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
17256 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
17257 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
17258 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
17259 * doc/bison.texinfo: Untabify the whole file.
17260 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
17261 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
17262 (Error Reporting): Adjust to these new directives.
17263 Document %error-verbose, deprecate YYERROR_VERBOSE.
17264
17265 2002-11-03 Akim Demaille <akim@epita.fr>
17266
17267 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
17268 AT_CHECK_CALC_GLR invocations to use % directives, instead of
17269 command line options.
17270 * tests/cxx-type.at: Formatting changes.
17271
17272 2002-11-03 Paul Eggert <eggert@twinsun.com>
17273
17274 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
17275 to count columns correctly, and to check for invalid inputs.
17276
17277 Use mbsnwidth to count columns correctly. Account for tabs, too.
17278 Include mbswidth.h.
17279 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
17280 (extend_location): New function.
17281 (YY_LINES): Remove.
17282
17283 Handle CRLF in C code rather than in Lex code.
17284 (YY_INPUT): New macro.
17285 (no_cr_read): New function.
17286
17287 Scan UCNs, even though we don't fully handle them yet.
17288 (convert_ucn_to_byte): New function.
17289
17290 Handle backslash-newline correctly in C code.
17291 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
17292 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
17293 all uses changed.
17294 (tag, splice): New EREs. Do not allow NUL or newline in tags.
17295 Use {splice} wherever C allows backslash-newline.
17296 YY_STEP after space, newline, vertical-tab.
17297 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
17298
17299 (letter, id): Don't assume ASCII; e.g., spell out a-z.
17300
17301 ({int}, handle_action_dollar, handle_action_at): Check for integer
17302 overflow.
17303
17304 (YY_STEP): Omit trailing semicolon, so that it's more like C.
17305
17306 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
17307 as well as \000. Check for UCHAR_MAX, not 255.
17308 Allow \x with an arbitrary positive number of digits, as in C.
17309 Check for overflow here.
17310 Allow \? and UCNs, for compatibility with C.
17311
17312 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
17313 with quote slot used by complain_at.
17314
17315 * tests/input.at: Add tests for backslash-newline, m4 quotes
17316 in symbols, long literals, and funny escapes in strings.
17317
17318 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
17319 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
17320 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
17321 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
17322 * m4/mbswidth.m4: New file, from GNU coreutils.
17323
17324 * doc/bison.texinfo (Grammar Outline): Document // comments.
17325 (Symbols): Document that trigraphs have no special meaning in Bison,
17326 nor is backslash-newline allowed.
17327 (Actions): Document that trigraphs have no special meaning.
17328
17329 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
17330 no longer used.
17331
17332 2002-11-02 Paul Eggert <eggert@twinsun.com>
17333
17334 * src/reader.c: Don't include quote.h; not needed.
17335 (get_merge_function): Reword warning to be consistent with
17336 type clash diagnostic in grammar_current_rule_check.
17337
17338 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
17339 bug in trigraph handling.
17340
17341 * src/output.c (prepare_symbols): When printing token names,
17342 escape "[" as "@<:@" and likewise for "]".
17343
17344 * src/system.h (errno): Remove declaration, as we are now
17345 assuming C89 or better, and C89 guarantees errno.
17346
17347 2002-10-30 Paul Eggert <eggert@twinsun.com>
17348
17349 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
17350 Check for close failures.
17351 * src/files.h (xfclose): Return void, not int, since it always
17352 returned zero.
17353 * src/files.c (xfclose): Likewise. Report I/O error if ferror
17354 indicates one.
17355 * src/output.c (output_skeleton): Use xfclose rather than fclose
17356 and ferror. xfclose now checks ferror.
17357
17358 * data/glr.c (YYLEFTMOST_STATE): Remove.
17359 (yyreportTree): Use a stack-based leftmost state. This avoids
17360 our continuing battles with bogus warnings about initializers.
17361
17362 2002-10-30 Akim Demaille <akim@epita.fr>
17363
17364 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
17365 #if.
17366
17367 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17368
17369 * tests/glr-regr1.at: New test for reported regressions.
17370 * tests/testsuite.at: Add glr-regr1.at test.
17371 * tests/Makefile.am: Add glr-regr1.at test.
17372
17373 2002-10-24 Paul Eggert <eggert@twinsun.com>
17374
17375 Version 1.75a.
17376
17377 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
17378 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
17379 we use malloc. Don't assume 'A' through 'Z' are contiguous.
17380 Don't assume strdup exists; POSIX says its an XSI extension.
17381 Check for buffer overflow on input.
17382
17383 2002-10-24 Akim Demaille <akim@epita.fr>
17384
17385 * src/output.c (output_skeleton): Don't disable M4sugar comments
17386 too soon: it results in comments being expanded.
17387 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
17388 first output.
17389
17390 2002-10-24 Akim Demaille <akim@epita.fr>
17391
17392 * data/yacc.c (m4_int_type): New.
17393 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
17394 char' as only yacc.c wants K&R portability.
17395 * data/glr.c (yysigned_char): Remove.
17396 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
17397 Reported by Quoc Peyrot.
17398
17399 2002-10-23 Paul Eggert <eggert@twinsun.com>
17400
17401 * src/main.c (main): With --trace=time, report times even if a
17402 non-fatal error occurs. Formerly, the times were reported in some
17403 such cases but not in others.
17404 * src/reader.c (reader): Just return if a complaint has been issued,
17405 instead of exiting, so that 'main' can report times.
17406
17407 2002-10-22 Akim Demaille <akim@epita.fr>
17408
17409 * src/system.h: Include sys/types.
17410 Reported by Bert Deknuydt.
17411
17412 2002-10-23 Paul Eggert <eggert@twinsun.com>
17413
17414 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
17415 Suggested by Art Haas.
17416
17417 2002-10-22 Paul Eggert <eggert@twinsun.com>
17418
17419 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
17420 decl; not needed any more.
17421 * src/main.c (main): Use return to exit, undoing yesterday's change.
17422 The last OS that we could find where this wouldn't work is
17423 SunOS 3.5, and that's too old to worry about now.
17424
17425 * data/glr.c (struct yyltype): Define members even when not
17426 doing locations. This is more consistent with yacc.c, and it
17427 works around the following bug reports:
17428 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
17429 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
17430
17431 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
17432 @acronym consistently. Standardize on "Yacc" instead of "YACC",
17433 "Algol" instead of "ALGOL". Give a bit more history about BNF.
17434
17435 2002-10-22 Akim Demaille <akim@epita.fr>
17436
17437 * data/README: New.
17438
17439 2002-10-21 Paul Eggert <eggert@twinsun.com>
17440
17441 Be consistent about 'bool'; the old code used an enum in one
17442 module and an int in another, and this violates the C standard.
17443 * m4/stdbool.m4: New file, from coreutils 4.5.3.
17444 * configure.ac (AC_HEADER_STDBOOL): Add.
17445 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
17446 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
17447 * src/symtab.c (hash_compare_symbol_t): Likewise.
17448 * src/system.h (bool, false, true): Use a definition consistent
17449 with ../lib/hash.c. All uses changed.
17450
17451 * src/complain.c (warning_issued): Renamed from warn_message_count,
17452 so that we needn't worry about integer overflow (!).
17453 Now of type bool. All uses changed.
17454 (complaint_issued): Renamed from complain_message_count; likewise.
17455
17456 * src/main.c (main): Use exit to exit with failure.
17457
17458 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
17459 rather than 1 and 0.
17460 * src/main.c (main): Likewise.
17461 * src/getargs.c (getargs): Likewise.
17462 * src/reader.c (reader): Likewise.
17463
17464 * src/getarg.c (getargs): Remove duplicate code for
17465 "Try `bison --help'".
17466
17467 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
17468 What was that "2" for?
17469
17470 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
17471 * src/getargs.c (usage): Likewise.
17472
17473 * src/getargs.c (getargs): When there are too few operands, report
17474 the last one. When there are too many, report the first extra
17475 one. This is how diffutils does it.
17476
17477 2002-10-20 Paul Eggert <eggert@twinsun.com>
17478
17479 Remove K&R vestiges.
17480 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
17481 * src/complain.c (VA_START): Remove. Assume prototypes.
17482 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
17483 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
17484 fatal): Assume prototypes.
17485 * src/complain.h: Assume prototypes.
17486 * src/system.h (PARAMS): Remove.
17487 Include <limits.h> unconditionally, since it's guaranteeed even
17488 for a freestanding C89 compiler.
17489 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
17490 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
17491
17492 2002-10-20 Akim Demaille <akim@epita.fr>
17493
17494 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
17495 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
17496 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
17497 (yyresolveStates, yyresolveAction, yyresolveStack)
17498 (yyprocessOneStack): Use them.
17499 (yy_reduce_print): New.
17500 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
17501
17502 2002-10-20 Akim Demaille <akim@epita.fr>
17503
17504 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
17505 arguments and output `void'.
17506 (b4_c_function): Rename as...
17507 (b4_c_function_def): this.
17508 (b4_c_function_decl, b4_c_ansi_function_def)
17509 (b4_c_ansi_function_decl): New.
17510 Change the interpretation of the arguments: before `int, foo', now
17511 `int foo, foo'.
17512 * data/yacc.c (yyparse): Prototype and define thanks to these.
17513 Adjust b4_c_function_def uses.
17514 * data/glr.c (yyparse): Likewise, but ANSI only.
17515
17516 2002-10-20 Akim Demaille <akim@epita.fr>
17517
17518 * src/output.c (prepare): Move the definition of `tokens_number',
17519 `nterms_number', `undef_token_number', `user_token_number_max'
17520 to...
17521 (prepare_tokens): Here.
17522 (prepare_tokens): Rename as...
17523 (prepare_symbols): this.
17524 (prepare): Move the definition of `rules_number' to...
17525 (prepare_rules): here.
17526 (prepare): Move the definition of `last', `final_state_number',
17527 `states_number' to...
17528 (prepare_states): here.
17529 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
17530
17531 2002-10-20 Akim Demaille <akim@epita.fr>
17532
17533 * src/tables.h, src/tables.c, src/output.c: Comment changes.
17534
17535 2002-10-20 Akim Demaille <akim@epita.fr>
17536
17537 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
17538 * data/c.m4: here.
17539
17540 2002-10-20 Akim Demaille <akim@epita.fr>
17541
17542 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
17543 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
17544 `pair'.
17545 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
17546 `name' to...
17547 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
17548 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
17549 These.
17550
17551 2002-10-19 Paul Eggert <eggert@twinsun.com>
17552
17553 Do not create a temporary file, as that involves security and
17554 cleanup headaches. Instead, use a pair of pipes.
17555 Derived from a suggestion by Florian Krohm.
17556 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
17557 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
17558 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
17559 (BISON_PREREQ_SUBPIPE): Add.
17560 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
17561 Add subpipe.h, subpipe.c.
17562 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
17563 * po/POTFILES.in: Add lib/subpipe.c.
17564 * src/output.c: Include "subpipe.h".
17565 (m4_invoke): Remove decl.
17566 (scan_skel): New decl.
17567 (output_skeleton): Use pipe rather than temporary file for m4 input.
17568 Check that m4sugar.m4 is readable, to avoid deadlock.
17569 Check for pipe I/O error.
17570 * src/scan-skel.l (readpipe): Remove decl.
17571 (scan_skel): New function, to be used in place of m4_invoke.
17572 Read from stream rather than file.
17573
17574 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
17575 float, as this generates a warning on Solaris 8 + GCC 3.2 with
17576 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
17577 this generates a more-accurate value anyway.
17578
17579 * lib/timevar.c (timervar_accumulate): Rename locals to
17580 avoid confusion with similarly-named more-global.
17581 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
17582
17583 * src/output.c (prepare): Use xstrdup to convert char const *
17584 to char *, to avoid GCC warning.
17585
17586 2002-10-19 Akim Demaille <akim@epita.fr>
17587
17588 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
17589 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
17590 Use them to have `calc.y' ready for %pure-parser.
17591 * data/yacc.c (YYLEX): Pass a yylex return type to
17592 b4_c_function_call.
17593
17594 2002-10-19 Akim Demaille <akim@epita.fr>
17595
17596 Prototype support of %lex-param and %parse-param.
17597
17598 * src/parse-gram.y: Add the definition of the %lex-param and
17599 %parse-param tokens, plus their rules.
17600 Drop the `_' version of %glr-parser.
17601 Add the "," token.
17602 * src/scan-gram.l (INITIAL): Scan them.
17603 * src/muscle_tab.c: Comment changes.
17604 (muscle_insert, muscle_find): Rename `pair' as `probe'.
17605 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
17606 (muscle_entry_s): The `value' member is no longer const.
17607 Adjust all dependencies.
17608 * src/muscle_tab.c (muscle_init): Adjust: use
17609 MUSCLE_INSERT_STRING.
17610 Initialize the obstack earlier.
17611 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
17612 (muscle_pair_list_grow): New.
17613 * data/c.m4 (b4_c_function_call, b4_c_args): New.
17614 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
17615 * tests/calc.at: Use %locations, not --locations.
17616 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
17617
17618 2002-10-19 Akim Demaille <akim@epita.fr>
17619
17620 * src/getargs.c (usage): Take status as argument and exit
17621 accordingly.
17622 Report the traditional `Try ... --help' message when status != 0.
17623 (usage, version): Don't take a FILE * as arg, it is pointless.
17624 (getargs): When there is an incorrect number of arguments, make it
17625 an error, and report it GNUlically thanks to `usage ()'.
17626
17627 2002-10-18 Paul Eggert <eggert@twinsun.com>
17628
17629 * data/glr.c (yyreportParseError): Don't assume that sprintf
17630 yields the length of the printed string, as this is not true
17631 on SunOS 4.1.4. Reported by Peter Klein.
17632
17633 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
17634 * tests/conflicts.at (%nonassoc and eof): Likewise.
17635 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
17636
17637 2002-10-17 Akim Demaille <akim@epita.fr>
17638
17639 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
17640 * src/getargs.c (trace_types, trace_args): Adjust.
17641 * src/reader.c (grammar_current_rule_prec_set)
17642 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
17643 Standardize error messages.
17644 And s/@prec/%prec/!
17645 (reader): Use trace_flag to enable scanner/parser debugging,
17646 instead of an adhoc scheme.
17647 * src/scan-gram.l: Remove trailing debugging code.
17648
17649 2002-10-16 Paul Eggert <eggert@twinsun.com>
17650
17651 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
17652 MUSCLE_TAB_H.
17653
17654 * NEWS: Officially drop support for building Bison with K&R C,
17655 since it didn't work anyway and it's not worth worrying about.
17656 * Makefile.maint (wget_files): Remove ansi2knr.c.
17657 (ansi2knr.c-url_prefix): Remove.
17658 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
17659 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17660 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17661
17662 2002-10-15 Paul Eggert <eggert@twinsun.com>
17663
17664 Stop using the "enum_" trick for K&R-style function definitions;
17665 it confused me, and I was the author! Instead, assume that people
17666 who want to use K&R C compilers (when using these modules in GCC,
17667 perhaps?) will run ansi2knr.
17668
17669 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
17670 All uses of "enum_" changed to "enum ".
17671 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17672 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17673
17674 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
17675 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
17676 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
17677 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
17678 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
17679 abitset_not, abitset_ones, abitset_or, abitset_or_and,
17680 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
17681 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
17682 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
17683 Use function prototypes; this removes the need for declaring
17684 static functions simply to provide their prototypes.
17685 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
17686 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
17687 bitset_count_, bitset_create, bitset_dump, bitset_first,
17688 bitset_free, bitset_init, bitset_last, bitset_next,
17689 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
17690 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
17691 bitset_print, bitset_release_memory, bitset_toggle_,
17692 bitset_type_choose, bitset_type_get, bitset_type_name_get,
17693 debug_bitset): Likewise.
17694 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
17695 * lib/bitset_stats.c (bitset_log_histogram_print,
17696 bitset_percent_histogram_print, bitset_stats_and,
17697 bitset_stats_and_cmp, bitset_stats_and_or,
17698 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
17699 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
17700 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
17701 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
17702 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
17703 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
17704 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
17705 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
17706 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
17707 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
17708 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
17709 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
17710 bitset_stats_zero): Likewise.
17711 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17712 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17713 bitsetv_dump, debug_bitsetv): Likewise.
17714 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
17715 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
17716 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
17717 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
17718 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
17719 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
17720 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
17721 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
17722 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
17723 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
17724 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
17725 Likewise.
17726 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
17727 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
17728 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
17729 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
17730 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
17731 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
17732 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
17733 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
17734 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
17735 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
17736 lbitset_xor_cmp, lbitset_zero): Likewise.
17737
17738 2002-10-14 Akim Demaille <akim@epita.fr>
17739
17740 Version 1.75.
17741
17742 2002-10-14 Akim Demaille <akim@epita.fr>
17743
17744 * tests/Makefile.am (maintainer-check-posix): New.
17745
17746 2002-10-14 Akim Demaille <akim@epita.fr>
17747
17748 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
17749 member.
17750
17751 2002-10-14 Akim Demaille <akim@epita.fr>
17752
17753 * src/tables.c (table_ninf_remap): base -> tab.
17754 Reported by Matt Rosing.
17755
17756 2002-10-14 Paul Eggert <eggert@twinsun.com>
17757
17758 * tests/action.at, tests/calc.at, tests/conflicts.at,
17759 tests/cxx-type.at, tests/headers.at, tests/input.at,
17760 tests/regression.at, tests/synclines.at, tests/torture.at:
17761 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
17762 so that the tests still work even if POSIXLY_CORRECT is set.
17763 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
17764
17765 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
17766 for portability to K&R hosts. Fix typo: signed char is guaranteed
17767 only to 127, not to 128.
17768 * data/glr.c (yysigned_char): New type.
17769 * data/yacc.c (yysigned_char): Likewise.
17770 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
17771
17772 2002-10-13 Paul Eggert <eggert@twinsun.com>
17773
17774 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
17775 true due to limited range of data type" warning from GCC.
17776
17777 * data/c.m4 (b4_token_defines): Protect against double-inclusion
17778 by wrapping enum yytokentype's definition inside #ifndef
17779 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
17780
17781 2002-10-13 Akim Demaille <akim@epita.fr>
17782
17783 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
17784 Un yy- yyrhs to avoid the name clash with the global YYRHS.
17785
17786 2002-10-13 Akim Demaille <akim@epita.fr>
17787
17788 * Makefile.maint: Update from Autoconf 2.54.
17789 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
17790
17791 2002-10-13 Akim Demaille <akim@epita.fr>
17792
17793 * src/print.c (print_state): Separate the list of solved conflicts
17794 from the other items.
17795 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
17796
17797 2002-10-13 Akim Demaille <akim@epita.fr>
17798
17799 Let nondeterministic skeletons be usable with deterministic
17800 tables.
17801
17802 With the patch, GAWK compiled by GCC without -O2 passes its test
17803 suite using a GLR parser driven by LALR tables. It fails with -O2
17804 because `struct stat' gives two different answers on my machine:
17805 88 (definition of an auto var) and later 96 (memset on this var).
17806 Hence the stack is badly corrumpted. The headers inclusion is to
17807 blame: if I move the awk.h inclusion before GLR's system header
17808 inclusion, the two struct stat have the same size.
17809
17810 * src/tables.c (pack_table): Always create conflict_table.
17811 (token_actions): Always create conflict_list.
17812 * data/glr.c (YYFLAG): Remove, unused.
17813
17814 2002-10-13 Akim Demaille <akim@epita.fr>
17815
17816 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
17817 (O0FLAGS): New.
17818 (VALGRIND, GXX): New.
17819 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
17820 * tests/bison.in: Run $PREBISON a pre-command.
17821 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
17822 (maintainer-check-g++): New.
17823 * Makefile.am (maintainer-check): New.
17824
17825 2002-10-13 Akim Demaille <akim@epita.fr>
17826
17827 * data/glr.c: Formatting changes.
17828 Tweak some trace messages to match yacc.c's.
17829
17830 2002-10-13 Akim Demaille <akim@epita.fr>
17831
17832 GLR parsers sometimes raise parse errors instead of performing the
17833 default reduction.
17834 Reported by Charles-Henry de Boysson.
17835
17836 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
17837 check the length of the traces when %glr.
17838 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
17839 GLR's traces.
17840 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
17841 Test GLR parsers.
17842 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
17843 (yyltype): Remove the yy prefix from the member names.
17844 (yytable): Complete its comment.
17845 (yygetLRActions): Map error action number from YYTABLE from
17846 YYTABLE_NINF to 0.
17847 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
17848 (which was a bug: it should have been YYTABEL_NINF, and yet it was
17849 not satisfying as we could compare an YYACTION computed from
17850 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
17851 only value for error actions.
17852 (yyreportParseError): In verbose parse error messages, don't issue
17853 `error' in the list of expected tokens.
17854 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
17855 next action to perform to match glr.c's decoding.
17856 (yytable): Complete its comment.
17857
17858 2002-10-13 Paul Eggert <eggert@twinsun.com>
17859
17860 Fix problem reported by Henrik Grubbstroem in
17861 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
17862 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
17863 because the Bison parser reads the second action before reducing
17864 the first one.
17865 * src/scan-gram.l (rule_length): New static var.
17866 Use it to keep track of the rule length in the scanner, since
17867 we can't expect the parser to be in lock-step sync with the scanner.
17868 (handle_action_dollar, handle_action_at): Use this var.
17869 * tests/actions.at (Exotic Dollars): Test for the problem.
17870
17871 2002-10-12 Paul Eggert <eggert@twinsun.com>
17872
17873 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
17874 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
17875 Include <sys/time.h> when checking for clock_t and struct tms.
17876 Use same include order as source.
17877 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
17878 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
17879
17880 * lib/timevar.c: Update copyright date and clarify comments.
17881 (get_time) [IN_GCC]: Keep the GCC version for reference.
17882
17883 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
17884 GCC version as of today, then merge Bison's changes.
17885 Change "GCC" to "Bison" in copyright notice. timevar.def's
17886 author is Akim, so change that too.
17887
17888 * src/reader.c (grammar_current_rule_check):
17889 Don't worry about the default action if $$ is untyped.
17890 Prevents bogus warnings reported by Jim Gifford in
17891 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
17892
17893 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
17894 * data/glr.c, data/lalr1.cc, data/yacc.c:
17895 Output token definitions before the first part of user declarations.
17896 Fixes compatibility problem reported by Jim Gifford for kbd in
17897 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
17898
17899 2002-10-11 Paul Eggert <eggert@twinsun.com>
17900
17901 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
17902 (yyparse): here. This undoes some of the 2002-07-25 change.
17903 Compatibility problem reported by Ralf S. Engelschall with
17904 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
17905
17906 2002-10-11 Akim Demaille <akim@epita.fr>
17907
17908 * tests/regression.at Characters Escapes): New.
17909 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
17910 characters.
17911 Reported by Jan Nieuwenhuizen.
17912
17913 2002-10-11 Akim Demaille <akim@epita.fr>
17914
17915 * po/id.po: New.
17916
17917 2002-10-10 Paul Eggert <eggert@twinsun.com>
17918
17919 Portability fixes for bitsets; this also avoids several GCC
17920 warnings.
17921
17922 * lib/abitset.c: Include <stddef.h>, for offsetof.
17923 * lib/lbitset.c: Likewise.
17924
17925 * lib/abitset.c (abitset_bytes): Return a size that is aligned
17926 properly for vectors of objects. Do not assume that adding a
17927 header size to a multiple of a word size yields a value that is
17928 properly aligned for the whole union.
17929 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17930
17931 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
17932 unique names for structures.
17933 * lib/ebitset.c (ebitset_bytes): Likewise.
17934 * lib/lbitset.c (lbitset_bytes): Likewise.
17935
17936 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
17937 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
17938 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
17939 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
17940 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
17941 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
17942 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
17943 to improve the type-checking that GCC can do.
17944 * lib/bitset.c (bitset_op4_cmp): Likewise.
17945 * lib/bitset_stats.c (bitset_stats_count,
17946 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
17947 bitset_stats_copy, bitset_stats_disjoint_p,
17948 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
17949 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
17950 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
17951 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
17952 bitset_stats_and_or_cmp, bitset_stats_andn_or,
17953 bitset_stats_andn_or_cmp, bitset_stats_or_and,
17954 bitset_stats_or_and_cmp): Likewise.
17955 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
17956 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
17957 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
17958 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
17959
17960 * lib/abitset.h: Include bitset.h, not bbitset.h.
17961 * lib/ebitset.h: Likewise.
17962 * lib/lbitset.h: Likewise.
17963
17964 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
17965 All instances of parameters of type enum bitset_opts are now of
17966 type enum_bitset_opts, to conform to the C Standard, and similarly
17967 for enum_bitset_type.
17968 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17969 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17970
17971 Do not use "struct bitset_struct" to mean different things in
17972 different modules. Not only is this confusing, it violates
17973 the C Standard, which requires that structure types in different
17974 modules must be compatible if one is to be passed to the other.
17975 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
17976 All instances of "struct bitset_struct *" replaced with "bitset".
17977 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
17978 (union bitset_union, struct abitset_struct, struct ebitset_struct,
17979 struct lbitset_struct, struct bitset_stats_struct): New types.
17980 All uses of struct bitset_struct changed to union bitset_union,
17981 etc.
17982 * lib/abitset.c (struct abitset_struct, abitset,
17983 struct bitset_struct): Remove.
17984 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
17985 struct bitset_struct): Remove.
17986 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
17987 bitset_struct): Remove.
17988 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
17989 Likewise.
17990
17991 Do not call a function of type T using a call that assumes the
17992 function is of a different type U. Standard C requires that a
17993 function must be called with a type that is compatible with its
17994 definition.
17995 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17996 New decls.
17997 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17998 New functions.
17999 * lib/ebitset.c (PFV): Remove.
18000 * lib/lbitset.c (PFV): Likewise.
18001 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
18002 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
18003 decls.
18004 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
18005 (ebitset_vtable): Use them.
18006 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
18007 lbitset_xor): New functions.
18008 (lbitset_vtable): Use them.
18009
18010 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
18011 Declare.
18012
18013 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
18014 GCC warning.
18015 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
18016 Use offsetof, for simplicity.
18017
18018 2002-10-06 Paul Eggert <eggert@twinsun.com>
18019
18020 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
18021 the same width as int. This reapplies a hunk of the 2002-08-12 patch
18022 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
18023 which was inadvertently undone by the 2002-09-30 patch.
18024 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
18025 the same width as int.
18026
18027 2002-10-04 Paul Eggert <eggert@twinsun.com>
18028
18029 Version 1.50.
18030
18031 * configure.ac (AC_INIT), NEWS: Increment version number.
18032
18033 * doc/bison.texinfo: Minor spelling, grammar, and white space
18034 fixes.
18035 (Symbols): Mention that any negative value returned from yylex
18036 signifies end-of-input. Warn about negative chars. Mention
18037 the portable Standard C character set.
18038
18039 The GNU coding standard says CFLAGS and YFLAGS are reserved
18040 for the installer to set.
18041 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
18042 * src/Makefile.am (AM_CFLAGS): Likewise.
18043 (AM_YFLAGS): Renamed from YFLAGS.
18044
18045 Fix some MAX and MIN problems.
18046 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
18047 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
18048 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
18049 * src/reader.c (reader): Use it.
18050
18051 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
18052 POSIX 1003.1-2001 has removed fgrep.
18053
18054 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
18055
18056 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
18057 interpreted as signed.
18058 * lib/ebitset.c (ebitset_list): Fix bug.
18059
18060 2002-10-01 Paul Eggert <eggert@twinsun.com>
18061
18062 More fixes for 64-bit hosts and large bitsets.
18063
18064 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
18065 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
18066 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
18067 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
18068 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
18069 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
18070 bitset_count_): Likewise.
18071 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
18072 bitset_first, bitset_last): Likewise.
18073 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
18074 bitset_stats_list_reverse, bitset_stats_size,
18075 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
18076 Likewise.
18077 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
18078 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
18079 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
18080 bitsetv_reflexive_transitive_closure): Likewise.
18081 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
18082 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
18083 Likewise.
18084 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
18085 Likewise.
18086
18087 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
18088 Use size_t, not unsigned int, to count bytes.
18089 * lib/abitset.h (abitset_bytes): Likewise.
18090 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
18091 Likewise.
18092 * lib/bitset.h (bitset_bytes): Likewise.
18093 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
18094 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
18095 * lib/bitsetv.c (bitsetv_alloc): Likewise.
18096 * lib/ebitset.c (ebitset_bytes): Likewise.
18097 * lib/ebitset.h (ebitset_bytes): Likewise.
18098 * lib/lbitset.c (lbitset_bytes): Likewise.
18099 * lib/lbitset.h (lbitset_bytes): Likewise.
18100
18101 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
18102 abitset_subset_p, abitset_disjoint_p, abitset_and,
18103 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
18104 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
18105 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
18106 abitset_or_and, abitset_or_and_cmp):
18107 Use bitset_windex instead of unsigned int.
18108 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
18109 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
18110 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
18111 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
18112 Likewise.
18113 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
18114
18115 * lib/bitset.c (bitset_print):
18116 Use proper printf formats for widths of integer types.
18117 * lib/bitset_stats.c (bitset_percent_histogram_print,
18118 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
18119 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
18120 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
18121 * lib/lbitset.c (lbitset_bytes): Likewise.
18122
18123 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
18124 BITSET_SIZE_MAX): New macros.
18125 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
18126 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
18127 to BITSET_WINDEX_MAX.
18128
18129 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
18130 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
18131 since we now return the bitset_bindex type (not int).
18132
18133 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
18134 when computing sizes.
18135 * lib/ebitset.c (ebitset_elts_grow): Likewise.
18136
18137 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
18138 and avoid cast to unsigned.
18139
18140 2002-09-30 Akim Demaille <akim@epita.fr>
18141
18142 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
18143 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
18144 Updates from Michael Hayes.
18145
18146 2002-09-30 Art Haas <ahaas@neosoft.com>
18147
18148 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
18149 invocations.
18150 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
18151 defined.
18152
18153 2002-09-27 Akim Demaille <akim@epita.fr>
18154
18155 Version 1.49c.
18156
18157 2002-09-27 Akim Demaille <akim@epita.fr>
18158
18159 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
18160 (Because of AC_LIBSOURCE).
18161
18162 2002-09-27 Akim Demaille <akim@epita.fr>
18163
18164 Playing with Autoscan.
18165
18166 * configure.ac: Remove the old LIBOBJ tweaks.
18167 (AC_REPLACE_FUNCS): Add strrchr and strtol.
18168 * lib/strrchr.c: New.
18169 * lib/strtol.c: New, from the Coreutils 4.5.1.
18170
18171 2002-09-27 Akim Demaille <akim@epita.fr>
18172
18173 Playing with Autoscan.
18174
18175 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
18176 * lib/Makefile.am (libbison_a_SOURCES): No longer include
18177 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
18178 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
18179 Coreutils 4.5.1.
18180
18181 2002-09-24 Akim Demaille <akim@epita.fr>
18182
18183 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
18184 (Frequently Asked Questions, Parser Stack Overflow): New.
18185
18186 2002-09-13 Akim Demaille <akim@epita.fr>
18187
18188 Playing with autoscan.
18189
18190 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
18191 * src/files.c (skeleton_find): Remove, unused.
18192 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
18193 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
18194
18195 2002-09-13 Akim Demaille <akim@epita.fr>
18196
18197 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
18198 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
18199
18200 2002-09-13 Akim Demaille <akim@epita.fr>
18201
18202 * configure.ac: Require 2.54.
18203 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
18204 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
18205 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
18206 Remove, provided by Autoconf macros.
18207
18208 2002-09-12 Akim Demaille <akim@epita.fr>
18209
18210 * m4/prereq.m4: Update, from Coreutils 4.5.1.
18211
18212 2002-09-12 Akim Demaille <akim@epita.fr>
18213
18214 * m4/prereq.m4: Update, from Fileutils 4.1.5.
18215 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
18216 Reported by Martin Mokrejs.
18217
18218 2002-09-10 Akim Demaille <akim@epita.fr>
18219
18220 * src/parse-gram.y: Associate a human readable string to each
18221 token type.
18222 * tests/regression.at (Invalid inputs): Adjust.
18223
18224 2002-09-10 Gary V. Vaughan <gary@gnu.org>
18225
18226 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
18227 with an Autoconf-2.5x style configure.ac.
18228
18229 2002-09-06 Paul Eggert <eggert@twinsun.com>
18230
18231 * doc/bison.texinfo (Conditions): Make explicit that the GPL
18232 exception applies only to yacc.c. This is a modification of a
18233 patch originally suggested by Akim Demaille.
18234
18235 2002-09-06 Akim Demaille <akim@epita.fr>
18236
18237 * data/c.m4 (b4_copyright): Move the GPL exception comment from
18238 here to...
18239 * data/yacc.c: here.
18240
18241 * data/lalr1.cc (struct yyltype): Don't define it, since we use
18242 LocationType.
18243 (b4_ltype): Default to yy::Location from location.hh.
18244
18245 2002-09-04 Jim Meyering <jim@meyering.net>
18246
18247 * data/yacc.c: Guard the declaration of yytoknum also with
18248 `#ifdef YYPRINT', so it is declared only when used.
18249
18250 2002-09-04 Akim Demaille <akim@epita.fr>
18251
18252 * configure.in: Rename as...
18253 * configure.ac: this.
18254 Bump to 1.49c.
18255
18256 2002-09-04 Akim Demaille <akim@epita.fr>
18257
18258 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
18259 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
18260 translate maintainer only messages.
18261
18262 2002-08-12 Paul Eggert <eggert@twinsun.com>
18263
18264 Version 1.49b.
18265
18266 * Makefile.am (SUBDIRS): Remove intl.
18267 (DISTCLEANFILES): Remove.
18268 * NEWS: Mention that GNU M4 is now required. Clarify what is
18269 meant by "larger grammars". Mention the pt_BR translation.
18270 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
18271 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
18272 Bump version from 0.11.2 to 0.11.5.
18273 (BISON_PREREQ_STAGE): Remove.
18274 (AM_GNU_GETTEXT): Use external gettext.
18275 (AC_OUTPUT): Remove intl/Makefile.
18276
18277 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
18278
18279 * data/glr.c: Include string.h, for strlen.
18280 (yyreportParseError): Use size_t for yysize.
18281 (yy_yypstack): No longer nested inside yypstates, as nested
18282 functions are not portable. Do not assume size_t is the
18283 same width as int.
18284 (yypstates): Do not assume that ptrdiff_t is the same width
18285 as int, and similarly for yyposn and YYINDEX.
18286
18287 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
18288
18289 * lib/Makefile.am (INCLUDES): Do not include from the intl
18290 directory, which has been removed.
18291 * src/Makefile.am (INCLUDES): Likewise.
18292
18293 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
18294 (bitsets_sources, additional_bitsets_sources, timevars_sources):
18295 New vars.
18296
18297 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
18298 * tests/Makefile.am (EXTRA_DIST): Likewise.
18299
18300 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
18301 Do not assume that bitset_windex is the same width as unsigned.
18302
18303 * lib/abitset.c (abitset_unused_clear): Do not assume that
18304 bitset_word is the same width as int.
18305 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
18306 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
18307 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
18308 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
18309 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
18310
18311 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
18312 portability to one's complement hosts!).
18313 * lib/ebitset.c (ebitset_op1): Likewise.
18314 * lib/lbitset.c (lbitset_op1): Likewise.
18315
18316 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
18317 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
18318 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
18319 Sync with fileutils.
18320 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
18321 lib/gettext.h: Sync with diffutils.
18322
18323 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
18324 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
18325
18326 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
18327 PROTOTYPES to check for prototypes, and "defined __STDC__" to
18328 check for void *.
18329
18330 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
18331 size_t; the old version tried to do this but casted improperly.
18332 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
18333 (bitset_test): Now returns int, not unsigned long.
18334
18335 * lib/bitset_stats.c: Include "gettext.h".
18336 (_): New macro.
18337 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
18338 name locals "index", as it generates unnecessary warnings on some
18339 hosts that have an "index" function.
18340
18341 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
18342 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
18343 they need translation.
18344 * src/LR0.c (state_list_append, new_itemsets, get_state,
18345 append_states, generate_states): Likewise.
18346 * src/assoc.c (assoc_to_string): Likewise.
18347 * src/closure.c (print_closure, set_firsts, closure): Likewise.
18348 * src/gram.c (grammar_dump): Likewise.
18349 * src/injections.c (injections_compute): Likewise.
18350 * src/lalr.c (lookaheads_print): Likewise.
18351 * src/relation.c (relation_transpose): Likewise.
18352 * src/scan-gram.l: Likewise.
18353 * src/tables.c (table_grow, pack_vector): Likewise.
18354
18355 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
18356 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
18357 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
18358 * m4/mbstate_t.m4: Sync with fileutils.
18359 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
18360
18361 * po/LINGUAS: Add pt_BR.
18362 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
18363 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
18364 lib/timevar.c.
18365 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
18366 manual recommends.
18367 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
18368
18369 * src/complain.c (strerror_r): Remove decl; not needed.
18370 (strerror): Use same pattern as ../lib/error.c.
18371
18372 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
18373
18374 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
18375
18376 * src/main.c (main): Cast result of bindtextdomain and textdomain
18377 to void, to avoid a GCC warning when --disable-nls is in effect.
18378
18379 * src/scan-gram.l: Use strings rather than escapes when possible,
18380 to minimize the number of warnings from xgettext.
18381 (handle_action_dollar, handle_action_at): Don't use isdigit,
18382 as it mishandles negative chars and it may not work as expected
18383 outside the C locale.
18384
18385 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
18386 this is a GCC extension and is not portable to other compilers.
18387
18388 * src/system.h (alloca): Use same pattern as ../lib/error.c.
18389 Do not include <ctype.h>; no longer needed.
18390 Do not include <malloc.h>; no longer needed (and generates
18391 warnings on OpenBSD 3.0).
18392
18393 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
18394 it's not portable.
18395
18396 * tests/regression.at: Do not use 'cc -c input.c -o input';
18397 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
18398
18399 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
18400 exit status as failure, not just exit status 1. Sun C exits
18401 with status 2 sometimes.
18402
18403 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
18404 Use it for the two large tests.
18405
18406 2002-08-02 Akim Demaille <akim@epita.fr>
18407
18408 * src/conflicts.c (conflicts_output): Don't output rules never
18409 reduced here, since anyway that computation doesn't work.
18410 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
18411 (rule_useless_p, rule_never_reduced_p): New.
18412 (grammar_rules_partial_print): Use a filter instead of a range.
18413 Display the title only if needed.
18414 (grammar_rules_print): Adjust.
18415 (grammar_rules_never_reduced_report): New.
18416 * src/tables.c (action_row): Move the computation of rules never
18417 reduced to...
18418 (token_actions): here.
18419 * src/main.c (main): Make the parser before making the report, so
18420 that rules never reduced are computed.
18421 Call grammar_rules_never_reduced_report.
18422 * src/print.c (print_results): Report rules never reduced.
18423 * tests/conflicts.at, tests/reduce.at: Adjust.
18424
18425 2002-08-01 Akim Demaille <akim@epita.fr>
18426
18427 Instead of attaching lookaheads and duplicating the rules being
18428 reduced by a state, attach the lookaheads to the reductions.
18429
18430 * src/state.h (state_t): Remove the `lookaheads',
18431 `lookaheads_rule' member.
18432 (reductions_t): Add a `lookaheads' member.
18433 Use a regular array for the `rules'.
18434 * src/state.c (reductions_new): Initialize the lookaheads member
18435 to 0.
18436 (state_rule_lookaheads_print): Adjust.
18437 * src/state.h, src/state.c (state_reductions_find): New.
18438 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
18439 (count_rr_conflicts): Adjust.
18440 * src/lalr.c (LArule): Remove.
18441 (add_lookback_edge): Adjust.
18442 (state_lookaheads_count): New.
18443 (states_lookaheads_initialize): Merge into...
18444 (initialize_LA): this.
18445 (lalr_free): Adjust.
18446 * src/main.c (main): Don't free nullable and derives too early: it
18447 is used by --verbose.
18448 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
18449
18450 2002-08-01 Akim Demaille <akim@epita.fr>
18451
18452 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
18453 `rule_number_t**'.
18454 (set_derives, free_derives): Rename as...
18455 (derives_compute, derives_free): this.
18456 Adjust all dependencies.
18457 * src/nullable.c (set_nullable, free_nullable): Rename as...
18458 (nullable_compute, nullable_free): these.
18459 (rule_list_t): Store rule_t *, not rule_number_t.
18460 * src/state.c (state_rule_lookaheads_print): Directly compare rule
18461 pointers, instead of their numbers.
18462 * src/main.c (main): Call nullable_free, and derives_free earlier,
18463 as they were lo longer used.
18464
18465 2002-08-01 Akim Demaille <akim@epita.fr>
18466
18467 * lib/timevar.c (get_time): Include children time.
18468 * src/lalr.h (LA, LArule): Don't export them: used with the
18469 state_t.
18470 * src/lalr.c (LA, LArule): Static.
18471 * src/lalr.h, src/lalr.c (lalr_free): New.
18472 * src/main.c (main): Call it.
18473 * src/tables.c (pack_vector): Check whether loc is >= to the
18474 table_size, not >.
18475 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
18476 (tables_generate): do it, since that's also it which allocates
18477 them.
18478 Don't free LA and LArule, main does.
18479
18480 2002-07-31 Akim Demaille <akim@epita.fr>
18481
18482 Separate parser tables computation and output.
18483
18484 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
18485 (conflict_list, conflict_list_cnt, table, check, table_ninf)
18486 (yydefgoto, yydefact, high): Move to...
18487 * src/tables.h, src/tables.c: here.
18488 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18489 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18490 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
18491 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
18492 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
18493 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
18494 (action_row, save_row, token_actions, save_column, default_goto)
18495 (goto_actions, sort_actions, matching_state, pack_vector)
18496 (table_ninf_remap, pack_table, prepare_actions): Move to...
18497 * src/tables.c: here.
18498 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
18499 * src/output.c (token_actions, output_base, output_conflicts)
18500 (output_check): Merge into...
18501 (prepare_actions): this.
18502 (actions_output): Rename as...
18503 (user_actions_output): this.
18504 * src/main.c (main): Call tables_generate and tables_free.
18505
18506 2002-07-31 Akim Demaille <akim@epita.fr>
18507
18508 Steal GCC's --time-report support.
18509
18510 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
18511 stolen/adjusted from GCC.
18512 * m4/stage.m4: Remove time related checks.
18513 * m4/timevar.m4: New.
18514 * configure.in: Adjust.
18515 * src/system.h: Adjust to using timevar.h.
18516 * src/getargs.h, src/getargs.c: Support trace_time for
18517 --trace=time.
18518 * src/main.c (stage): Remove.
18519 (main): Replace `stage' invocations with timevar calls.
18520 * src/output.c: Insert pertinent timevar calls.
18521
18522 2002-07-31 Akim Demaille <akim@epita.fr>
18523
18524 Let --trace have arguments.
18525
18526 * src/getargs.h (enum trace_e): New.
18527 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
18528 (long_options, short_options): --trace/-T takes an optional
18529 argument.
18530 Change all the uses of trace_flag to reflect the new flags.
18531 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
18532
18533 Strengthen `stage' portability.
18534
18535 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
18536 * configure.in: Use it.
18537 Don't check for malloc.h and sys/times.h.
18538 * src/system.h: Include them when appropriate.
18539 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
18540 times and struct tms are available.
18541
18542 2002-07-30 Akim Demaille <akim@epita.fr>
18543
18544 In verbose parse error message, don't report `error' as an
18545 expected token.
18546 * tests/actions.at (Printers and Destructors): Adjust.
18547 * tests/calc.at (Calculator $1): Adjust.
18548 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
18549 error message, do not report the parser accepts the error token in
18550 that state.
18551
18552 2002-07-30 Akim Demaille <akim@epita.fr>
18553
18554 Normalize conflict related messages.
18555
18556 * src/complain.h, src/complain.c (warn, complain): New.
18557 * src/conflicts.c (conflicts_print): Use them.
18558 (conflict_report_yacc): New, extracted from...
18559 (conflicts_print): here.
18560 * tests/conflicts.at, tests/existing.at: Adjust.
18561
18562 2002-07-30 Akim Demaille <akim@epita.fr>
18563
18564 Report rules which are never reduced by the parser: those hidden
18565 by conflicts.
18566
18567 * src/LR0.c (save_reductions): Don't make the final state too
18568 different: save its reduction (accept) instead of having a state
18569 without any action (no shift or goto, no reduce).
18570 Note: the final state is now a ``regular'' state, i.e., the
18571 parsers now contain `reduce 0' as default reduction.
18572 Nevertheless, since they decide to `accept' when yystate =
18573 final_state, they still will not reduce rule 0.
18574 * src/print.c (print_actions, print_reduction): Adjust.
18575 * src/output.c (action_row): Track reduced rules.
18576 (token_actions): Report rules never reduced.
18577 * tests/conflicts.at, tests/regression.at: Adjust.
18578
18579 2002-07-30 Akim Demaille <akim@epita.fr>
18580
18581 `stage' was accidently included in a previous patch.
18582 Initiate its autoconfiscation.
18583
18584 * configure.in: Look for malloc.h and sys/times.h.
18585 * src/main.c (stage): Adjust.
18586 Report only when trace_flag.
18587
18588 2002-07-29 Akim Demaille <akim@epita.fr>
18589
18590 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
18591 state_number_t.
18592 (errs_t): symbol_t*, not symbol_number_t.
18593 (reductions_t): rule_t*, not rule_number_t.
18594 (FOR_EACH_SHIFT): New.
18595 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
18596 * src/print.c, src/print_graph.c: Adjust.
18597
18598 2002-07-29 Akim Demaille <akim@epita.fr>
18599
18600 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
18601
18602 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
18603 (endtoken, accept): these.
18604 * src/reader.c (reader): Set endtoken's default tag to "$end".
18605 Set undeftoken's tag to "$undefined" instead of "$undefined.".
18606 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
18607 Adjust.
18608
18609 2002-07-29 Akim Demaille <akim@epita.fr>
18610
18611 * src/reduce.c (reduce_grammar): When the language is empty,
18612 complain about the start symbol, not the axiom.
18613 Use its location.
18614 * tests/reduce.at (Empty Language): New.
18615
18616 2002-07-26 Akim Demaille <akim@epita.fr>
18617
18618 * src/reader.h, src/reader.c (gram_error): ... can't get
18619 yycontrol without making too strong assumptions on the parser
18620 itself.
18621 * src/output.c (prepare_tokens): Use the real 0th value of
18622 token_translations instead of `0'.
18623 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
18624 visible here.
18625 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
18626 for the time being: %locations ought to provide it to yyerror.
18627
18628 2002-07-25 Akim Demaille <akim@epita.fr>
18629
18630 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
18631 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
18632 * tests/regression.at (Web2c Actions): Adjust.
18633
18634 2002-07-25 Akim Demaille <akim@epita.fr>
18635
18636 Stop storing rules from 1 to nrules + 1.
18637
18638 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
18639 * src/nullable.c, src/output.c, src/print.c, src/reader.c
18640 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
18641 Iterate from 0 to nrules.
18642 Use rule_number_as_item_number and item_number_as_rule_number.
18643 Adjust to `derive' now containing possibly 0.
18644 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
18645 Handle the `- 1' part in rule numbers from/to item numbers.
18646 * src/conflicts.c (log_resolution): Fix the message which reversed
18647 shift and reduce.
18648 * src/output.c (action_row): Initialize default_rule to -1.
18649 (token_actions): Adjust.
18650 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
18651 expected output.
18652 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
18653
18654 2002-07-25 Akim Demaille <akim@epita.fr>
18655
18656 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
18657 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
18658 (b4_c_knr_arg_decl): New.
18659 * data/yacc.c: Use it to define yysymprint, yydestruct, and
18660 yyreport_parse_error.
18661
18662 2002-07-25 Akim Demaille <akim@epita.fr>
18663
18664 * data/yacc.c (yyreport_parse_error): New, extracted from...
18665 (yyparse): here.
18666 (yydestruct, yysymprint): Move above yyparse.
18667 Be K&R compliant.
18668
18669 2002-07-25 Akim Demaille <akim@epita.fr>
18670
18671 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
18672 replace...
18673 (b4_sint_type, b4_uint_type): these.
18674 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
18675 * tests/regression.at (Web2c Actions): Adjust.
18676
18677 2002-07-25 Akim Demaille <akim@epita.fr>
18678
18679 * src/gram.h (TIEM_NUMBER_MAX): New.
18680 (item_number_of_rule_number, rule_number_of_item_number): Rename
18681 as...
18682 (rule_number_as_item_number, item_number_as_rule_number): these.
18683 Adjust dependencies.
18684 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18685 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18686 (symbol_number_to_vector_number): New.
18687 (order): Of vector_number_t* type.
18688 (base_t, BASE_MAX, BASE_MIN): New.
18689 (froms, tos, width, pos, check): Of base_t type.
18690 (action_number_t, ACTION_MIN, ACTION_MAX): New.
18691 (actrow): Of action_number_t type.
18692 (conflrow): Of unsigned int type.
18693 (table_ninf, base_ninf): New.
18694 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
18695 (muscle_insert_int_table, muscle_insert_base_table)
18696 (muscle_insert_rule_number_table): New.
18697 (prepare_tokens): Output `toknum' as int_table.
18698 (action_row): Returns a rule_number_t.
18699 Use ACTION_MIN, not SHRT_MIN.
18700 (token_actions): yydefact is rule_number_t*.
18701 (table_ninf_remap): New.
18702 (pack_table): Use it for `base' and `table'.
18703 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
18704 replaced with...
18705 (YYPACT_NINF, YYTABLE_NINF): these.
18706 (yypact, yytable): Compute their types instead of hard-coded
18707 `short'.
18708 * tests/regression.at (Web2c Actions): Adjust.
18709
18710 2002-07-19 Akim Demaille <akim@epita.fr>
18711
18712 * src/scan-gram.l (id): Can start with an underscore.
18713
18714 2002-07-16 Akim Demaille <akim@epita.fr>
18715
18716 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
18717 Adjust all former `associativity' dependencies.
18718 * src/symtab.c (symbol_new): Default associativity is `undef', not
18719 `right'.
18720 (symbol_check_alias_consistence): Adjust.
18721
18722 2002-07-09 Akim Demaille <akim@epita.fr>
18723
18724 * doc/bison.texinfo: Properly set the ``header'' part.
18725 Use @dircategory ``GNU programming tools'' as per Texinfo's
18726 documentation.
18727 Use @copying.
18728
18729 2002-07-09 Akim Demaille <akim@epita.fr>
18730
18731 * lib/quotearg.h: Protect against multiple inclusions.
18732 * src/location.h (location_t): Add a `file' member.
18733 (LOCATION_RESET, LOCATION_PRINT): Adjust.
18734 * src/complain.c (warn_at, complain_at, fatal_at): Drop
18735 `error_one_per_line' support.
18736
18737 2002-07-09 Akim Demaille <akim@epita.fr>
18738
18739 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
18740 * src/reader.c (lineno): Remove.
18741 Adjust all dependencies.
18742 (get_merge_function): Take a location and use complain_at.
18743 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
18744 * tests/regression.at (Invalid inputs, Mixing %token styles):
18745 Adjust.
18746
18747 2002-07-09 Akim Demaille <akim@epita.fr>
18748
18749 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
18750 recovery rule, and forbid extensions when --yacc.
18751 (gram_error): Use complain_at.
18752 * src/reader.c (reader): Exit if there were parse errors.
18753
18754 2002-07-09 Akim Demaille <akim@epita.fr>
18755
18756 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
18757 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
18758 Reported by R Blake <blakers@mac.com>.
18759
18760 2002-07-09 Akim Demaille <akim@epita.fr>
18761
18762 * data/yacc.c: Output the copyright notive in the header.
18763
18764 2002-07-03 Akim Demaille <akim@epita.fr>
18765
18766 * src/output.c (froms, tos): Are state_number_t.
18767 (save_column): sp, sp1, and sp2 are state_number_t.
18768 (prepare): Rename `final' as `final_state_number', `nnts' as
18769 `nterms_number', `nrules' as `rules_number', `nstates' as
18770 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
18771 unused.
18772 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
18773 * data/lalr1.cc (nsym_): Remove, unused.
18774
18775 2002-07-03 Akim Demaille <akim@epita.fr>
18776
18777 * src/lalr.h, src/lalr.c (goto_number_t): New.
18778 * src/lalr.c (goto_list_t): New.
18779 Propagate them.
18780 * src/nullable.c (rule_list_t): New.
18781 Propagate.
18782 * src/types.h: Remove.
18783
18784 2002-07-03 Akim Demaille <akim@epita.fr>
18785
18786 * src/closure.c (print_fderives): Use rule_rhs_print.
18787 * src/derives.c (print_derives): Use rule_rhs_print.
18788 (rule_list_t): New, replaces `shorts'.
18789 (set_derives): Add comments.
18790 * tests/sets.at (Nullable, Firsts): Adjust.
18791
18792 2002-07-03 Akim Demaille <akim@epita.fr>
18793
18794 * src/output.c (prepare_actions): Free `tally' and `width'.
18795 (prepare_actions): Allocate and free `order'.
18796 * src/symtab.c (symbols_free): Free `symbols'.
18797 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
18798 * src/output.c (m4_invoke): Move to...
18799 * src/scan-skel.l: here.
18800 (<<EOF>>): Close yyout, and free its name.
18801
18802 2002-07-03 Akim Demaille <akim@epita.fr>
18803
18804 Fix some memory leaks, and fix a bug: state 0 was examined twice.
18805
18806 * src/LR0.c (new_state): Merge into...
18807 (state_list_append): this.
18808 (new_states): Merge into...
18809 (generate_states): here.
18810 (set_states): Don't ensure a proper `errs' state member here, do it...
18811 * src/conflicts.c (conflicts_solve): here.
18812 * src/state.h, src/state.c: Comment changes.
18813 (state_t): Rename member `shifts' as `transitions'.
18814 Adjust all dependencies.
18815 (errs_new): For consistency, also take the values as argument.
18816 (errs_dup): Remove.
18817 (state_errs_set): New.
18818 (state_reductions_set, state_transitions_set): Assert that no
18819 previous value was assigned.
18820 (state_free): New.
18821 (states_free): Use it.
18822 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
18823 temporary storage: use `errs' and `nerrs' as elsewhere.
18824 (set_conflicts): Allocate and free this `errs'.
18825
18826 2002-07-02 Akim Demaille <akim@epita.fr>
18827
18828 * lib/libiberty.h: New.
18829 * lib: Update the bitset implementation from upstream.
18830 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
18831 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
18832 * src/main.c: Adjust bitset stats calls.
18833
18834 2002-07-01 Paul Eggert <eggert@twinsun.com>
18835
18836 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
18837 char, so that negative chars don't collide with $.
18838
18839 2002-06-30 Akim Demaille <akim@epita.fr>
18840
18841 Have the GLR tests be `warning' checked, and fix the warnings.
18842
18843 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
18844 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
18845 (yyremoveDeletes): `yyi' and `yyj' are size_t.
18846 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
18847 (yyaddDeferredAction): static.
18848 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
18849 (yyreportParseError): yyprefix is const.
18850 yytokenp is used only when verbose.
18851 (yy__GNUC__): Replace with __GNUC__.
18852 (yypdumpstack): yyi is size_t.
18853 (yypreference): Un-yy local variables and arguments, to avoid
18854 clashes with `yyr1'. Anyway, we are not in the user name space.
18855 (yytname_size): be an int, as is compared with ints.
18856 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
18857 Use them.
18858 * tests/cxx-gram.at: Use quotation to protect $1.
18859 Use AT_COMPILE to enable warnings hunts.
18860 Prototype yylex and yyerror.
18861 `Use' argc.
18862 Include `string.h', not `strings.h'.
18863 Produce and prototype stmtMerge only when used.
18864 yylex takes a location.
18865
18866 2002-06-30 Akim Demaille <akim@epita.fr>
18867
18868 We spend a lot of time in quotearg, in particular when --verbose.
18869
18870 * src/symtab.c (symbol_get): Store a quoted version of the key.
18871 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
18872 Adjust all callers.
18873
18874 2002-06-30 Akim Demaille <akim@epita.fr>
18875
18876 * src/state.h (reductions_t): Rename member `nreds' as num.
18877 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
18878 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
18879
18880 2002-06-30 Akim Demaille <akim@epita.fr>
18881
18882 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
18883 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
18884 (shifts_to): Rename as...
18885 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
18886 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
18887 (TRANSITION_IS_DISABLED, transitions_to): these.
18888
18889 2002-06-30 Akim Demaille <akim@epita.fr>
18890
18891 * src/print.c (print_shifts, print_gotos): Merge into...
18892 (print_transitions): this.
18893 (print_transitions, print_errs, print_reductions): Align the
18894 lookaheads columns.
18895 (print_core, print_transitions, print_errs, print_state,
18896 print_grammar): Output empty lines separator before, not after.
18897 (state_default_rule_compute): Rename as...
18898 (state_default_rule): this.
18899 * tests/conflicts.at (Defaulted Conflicted Reduction),
18900 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
18901 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
18902
18903 2002-06-30 Akim Demaille <akim@epita.fr>
18904
18905 Display items as we display rules.
18906
18907 * src/gram.h, src/gram.c (rule_lhs_print): New.
18908 * src/gram.c (grammar_rules_partial_print): Use it.
18909 * src/print.c (print_core): Likewise.
18910 * tests/conflicts.at (Defaulted Conflicted Reduction),
18911 (Unresolved SR Conflicts): Adjust.
18912 (Unresolved SR Conflicts): Adjust and rename as...
18913 (Resolved SR Conflicts): this, as was meant.
18914 * tests/regression.at (Web2c Report): Adjust.
18915
18916 2002-06-30 Akim Demaille <akim@epita.fr>
18917
18918 * src/print.c (state_default_rule_compute): New, extracted from...
18919 (print_reductions): here.
18920 Pessimize, but clarify the code.
18921 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
18922
18923 2002-06-30 Akim Demaille <akim@epita.fr>
18924
18925 * src/output.c (action_row): Let default_rule be always a rule
18926 number.
18927
18928 2002-06-30 Akim Demaille <akim@epita.fr>
18929
18930 * src/closure.c (print_firsts, print_fderives, closure):
18931 Use BITSET_EXECUTE.
18932 * src/lalr.c (lookaheads_print): Likewise.
18933 * src/state.c (state_rule_lookaheads_print): Likewise.
18934 * src/print_graph.c (print_core): Likewise.
18935 * src/print.c (print_reductions): Likewise.
18936 * src/output.c (action_row): Likewise.
18937 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
18938
18939 2002-06-30 Akim Demaille <akim@epita.fr>
18940
18941 * src/print_graph.c: Use report_flag.
18942
18943 2002-06-30 Akim Demaille <akim@epita.fr>
18944
18945 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
18946 to...
18947 * src/relation.h, src/relation.c (traverse, relation_digraph)
18948 (relation_print, relation_transpose): New.
18949
18950 2002-06-30 Akim Demaille <akim@epita.fr>
18951
18952 * src/state.h, src/state.c (shifts_to): New.
18953 * src/lalr.c (build_relations): Use it.
18954
18955 2002-06-30 Akim Demaille <akim@epita.fr>
18956
18957 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
18958 (item_number_of_rule_number, rule_number_of_item_number): New.
18959 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
18960 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18961 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
18962 Propagate their use.
18963 Much remains to be done, in particular wrt `shorts' from types.h.
18964
18965 2002-06-30 Akim Demaille <akim@epita.fr>
18966
18967 * src/symtab.c (symbol_new): Initialize the `printer' member.
18968
18969 2002-06-30 Akim Demaille <akim@epita.fr>
18970
18971 * src/LR0.c (save_reductions): Remove, replaced by...
18972 * src/state.h, src/state.c (state_reductions_set): New.
18973 (reductions, errs): Rename as...
18974 (reductions_t, errs_t): these.
18975 Adjust all dependencies.
18976
18977 2002-06-30 Akim Demaille <akim@epita.fr>
18978
18979 * src/LR0.c (state_list_t, state_list_append): New.
18980 (first_state, last_state): Now symbol_list_t.
18981 (this_state): Remove.
18982 (new_itemsets, append_states, save_reductions): Take a state_t as
18983 argument.
18984 (set_states, generate_states): Adjust.
18985 (save_shifts): Remove, replaced by...
18986 * src/state.h, src/state.c (state_shifts_set): New.
18987 (shifts): Rename as...
18988 (shifts_t): this.
18989 Adjust all dependencies.
18990 * src/state.h (state_t): Remove the `next' member.
18991
18992 2002-06-30 Akim Demaille <akim@epita.fr>
18993
18994 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
18995 escaped in slot 0.
18996
18997 2002-06-30 Akim Demaille <akim@epita.fr>
18998
18999 Use hash.h for the state hash table.
19000
19001 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
19002 (allocate_storage): Use state_hash_new.
19003 (free_storage): Use state_hash_free.
19004 (new_state, get_state): Adjust.
19005 * src/lalr.h, src/lalr.c (states): Move to...
19006 * src/states.h (state_t): Remove the `link' member, no longer
19007 used.
19008 * src/states.h, src/states.c: here.
19009 (state_hash_new, state_hash_free, state_hash_lookup)
19010 (state_hash_insert, states_free): New.
19011 * src/states.c (state_table, state_compare, state_hash): New.
19012 * src/output.c (output_actions): Do not free states now, since we
19013 still need to know the final_state number in `prepare', called
19014 afterwards. Do it...
19015 * src/main.c (main): here: call states_free after `output'.
19016
19017 2002-06-30 Akim Demaille <akim@epita.fr>
19018
19019 * src/state.h, src/state.c (state_new): New, extracted from...
19020 * src/LR0.c (new_state): here.
19021 * src/state.h (STATE_ALLOC): Move to...
19022 * src/state.c: here.
19023 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
19024 * src/state.h, src/state.c: here.
19025
19026 2002-06-30 Akim Demaille <akim@epita.fr>
19027
19028 * src/reader.c (gensym): Rename as...
19029 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
19030 (getsym): Rename as...
19031 (symbol_get): this.
19032
19033 2002-06-30 Akim Demaille <akim@epita.fr>
19034
19035 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
19036 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
19037 * src/output.c, src/print.c, src/print_graph.c: Propagate.
19038 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
19039
19040 2002-06-30 Akim Demaille <akim@epita.fr>
19041
19042 Make the test suite pass with warnings checked.
19043
19044 * tests/actions.at (Printers and Destructors): Improve.
19045 Avoid unsigned vs. signed issues.
19046 * tests/calc.at: Don't exercise the scanner here, do it...
19047 * tests/input.at (Torturing the Scanner): here.
19048
19049 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19050
19051 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
19052 reorganize first lines parallel to yacc.c.
19053
19054 2002-06-28 Akim Demaille <akim@epita.fr>
19055
19056 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
19057 (b4_token_enum, b4_token_defines): New, factored from...
19058 * data/lalr1.cc, data/yacc.c, glr.c: here.
19059
19060 2002-06-28 Akim Demaille <akim@epita.fr>
19061
19062 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
19063 unused variables.
19064 * src/output.c (merger_output): static.
19065
19066 2002-06-28 Akim Demaille <akim@epita.fr>
19067
19068 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
19069 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
19070 pacify GCC.
19071 * src/output.c (save_row): Initialize all the variables to pacify GCC.
19072
19073 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19074
19075 Accumulated changelog for new GLR parsing features.
19076
19077 * src/conflicts.c (count_total_conflicts): Change name to
19078 conflicts_total_count.
19079 * src/conflicts.h: Ditto.
19080 * src/output.c (token_actions): Use the new name.
19081 (output_conflicts): Change conflp => conflict_list_heads, and
19082 confl => conflict_list for better readability.
19083 * data/glr.c: Use the new names.
19084 * NEWS: Add self to GLR announcement.
19085
19086 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
19087
19088 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
19089 Akim Demaille.
19090
19091 * data/bison.glr: Change name to glr.c
19092 * data/glr.c: Renamed from bison.glr.
19093 * data/Makefile.am: Add glr.c
19094
19095 * src/getargs.c:
19096
19097 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
19098 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
19099
19100 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19101
19102 * data/bison.glr: Be sure to restore the
19103 current #line when returning to the skeleton contents after having
19104 exposed the input file's #line.
19105
19106 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19107
19108 * data/bison.glr: Bring up to date with changes to bison.simple.
19109
19110 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19111
19112 * data/bison.glr: Correct definitions that use b4_prefix.
19113 Various reformatting.
19114 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
19115 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
19116 yytokenp argument; now part of stack.
19117 (yychar): Define to behave as documented.
19118 (yyclearin): Ditto.
19119
19120 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19121
19122 * src/reader.h: Add declaration for free_merger_functions.
19123
19124 * src/reader.c (merge_functions): New variable.
19125 (get_merge_function): New function.
19126 (free_merger_functions): New function.
19127 (readgram): Check for %prec that is not followed by a symbol.
19128 Handle %dprec and %merge declarations.
19129 (packgram): Initialize dprec and merger fields in rules array.
19130
19131 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
19132 conflict_list_cnt, conflict_list_free): New variables.
19133 (table_grow): Also grow conflict_table.
19134 (prepare_rules): Output dprec and merger tables.
19135 (conflict_row): New function.
19136 (action_row): Output conflict lists for GLR parser. Don't use
19137 default reduction in conflicted states for GLR parser so that there
19138 are spaces for the conflict lists.
19139 (save_row): Also save conflict information.
19140 (token_actions): Allocate conflict list.
19141 (merger_output): New function.
19142 (pack_vector): Pack conflict table, too.
19143 (output_conflicts): New function to output yyconflp and yyconfl.
19144 (output_check): Allocate conflict_tos.
19145 (output_actions): Output conflict tables, also.
19146 (output_skeleton): Output b4_mergers definition.
19147 (prepare): Output b4_max_rhs_length definition.
19148 Use 'bison.glr' as default skeleton for GLR parsers.
19149
19150 * src/gram.c (glr_parser): New flag.
19151 (grammar_free): Call free_merger_functions.
19152
19153 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
19154 all pairs of conflicting reductions, rather than just all tokens
19155 causing conflicts. Needed to size conflict tables.
19156 (conflicts_output): Modify call to count_rr_conflicts for new
19157 interface.
19158 (conflicts_print): Ditto.
19159 (count_total_conflicts): New function.
19160
19161 * src/reader.h (merger_list): New type.
19162 (merge_functions): New variable.
19163
19164 * src/lex.h (tok_dprec, tok_merge): New token types.
19165
19166 * src/gram.h (rule_s): Add dprec and merger fields.
19167 (glr_parser): New flag.
19168
19169 * src/conflicts.h (count_total_conflicts): New function.
19170
19171 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
19172
19173 * doc/bison.texinfo (Generalized LR Parsing): New section.
19174 (GLR Parsers): New section.
19175 (Language and Grammar): Mention GLR parsing.
19176 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
19177 Correct typo ("tge" -> "the").
19178
19179 * data/bison.glr: New skeleton for GLR parsing.
19180
19181 * tests/cxx-gram.at: New tests for GLR parsing.
19182
19183 * tests/testsuite.at: Include cxx-gram.at.
19184
19185 * tests/Makefile.am: Add cxx-gram.at.
19186
19187 * src/parse-gram.y:
19188
19189 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
19190
19191 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
19192
19193 2002-06-27 Akim Demaille <akim@epita.fr>
19194
19195 * src/options.h, src/options.c: Remove.
19196 * src/getargs.c (short_options, long_options): New.
19197
19198 2002-06-27 Akim Demaille <akim@epita.fr>
19199
19200 * data/bison.simple, data/bison.c++: Rename as...
19201 * data/yacc.c, data/lalr1.cc: these.
19202 * doc/bison.texinfo (Environment Variables): Remove.
19203
19204 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
19205
19206 * src/getargs.c (report_argmatch): Initialize strtok().
19207
19208 2002-06-20 Akim Demaille <akim@epita.fr>
19209
19210 * data/bison.simple (b4_symbol_actions): New, replaces...
19211 (b4_symbol_destructor, b4_symbol_printer): these.
19212 (yysymprint): Be sure to call YYPRINT only for tokens, and using
19213 user token numbers.
19214
19215 2002-06-20 Akim Demaille <akim@epita.fr>
19216
19217 * data/bison.simple (yydestructor): Rename as...
19218 (yydestruct): this.
19219
19220 2002-06-20 Akim Demaille <akim@epita.fr>
19221
19222 * src/symtab.h, src/symtab.c (symbol_type_set)
19223 (symbol_destructor_set, symbol_precedence_set): The location is
19224 the last argument.
19225 Adjust all callers.
19226
19227 2002-06-20 Akim Demaille <akim@epita.fr>
19228
19229 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
19230 internals.
19231 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
19232 Takes a location.
19233 * src/symtab.h, src/symtab.c (symbol_class_set)
19234 (symbol_user_token_number_set): Likewise.
19235 Adjust all callers.
19236 Promote complain_at.
19237 * tests/input.at (Type Clashes): Adjust.
19238
19239 2002-06-20 Akim Demaille <akim@epita.fr>
19240
19241 * data/bison.simple (YYLEX): Fix the declaration when
19242 %pure-parser.
19243
19244 2002-06-20 Akim Demaille <akim@epita.fr>
19245
19246 * data/bison.simple (yysymprint): Don't print the token number,
19247 just its name.
19248 * tests/actions.at (Destructors): Rename as...
19249 (Printers and Destructors): this.
19250 Also exercise %printer.
19251
19252 2002-06-20 Akim Demaille <akim@epita.fr>
19253
19254 * data/bison.simple (YYDSYMPRINT): New.
19255 Use it to remove many of the #if YYDEBUG/if (yydebug).
19256
19257 2002-06-20 Akim Demaille <akim@epita.fr>
19258
19259 * src/symtab.h, src/symtab.c (symbol_t): printer and
19260 printer_location are new members.
19261 (symbol_printer_set): New.
19262 * src/parse-gram.y (PERCENT_PRINTER): New token.
19263 Handle its associated rule.
19264 * src/scan-gram.l: Adjust.
19265 (handle_destructor_at, handle_destructor_dollar): Rename as...
19266 (handle_symbol_code_at, handle_symbol_code_dollar): these.
19267 * src/output.c (symbol_printers_output): New.
19268 (output_skeleton): Call it.
19269 * data/bison.simple (yysymprint): New. Cannot be named yyprint
19270 since there are already many grammar files with a user `yyprint'.
19271 Replace the calls to YYPRINT to calls to yysymprint.
19272 * tests/calc.at: Adjust.
19273 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
19274 taking advantage of parser very internal details (stack size!).
19275
19276 2002-06-20 Akim Demaille <akim@epita.fr>
19277
19278 * src/scan-gram.l: Complete the scanner with the missing patterns
19279 to pacify Flex.
19280 Use `quote' and `symbol_tag_get' where appropriate.
19281
19282 2002-06-19 Akim Demaille <akim@epita.fr>
19283
19284 * tests/actions.at (Destructors): Augment to test locations.
19285 * data/bison.simple (yydestructor): Pass it the current location
19286 if locations are enabled.
19287 Prototype only when __STDC__ or C++.
19288 Change the argument names to move into the yy name space: there is
19289 user code here.
19290
19291 2002-06-19 Akim Demaille <akim@epita.fr>
19292
19293 * data/bison.simple (b4_pure_if): New.
19294 Use it instead of #ifdef YYPURE.
19295
19296 2002-06-19 Akim Demaille <akim@epita.fr>
19297
19298 * data/bison.simple (b4_location_if): New.
19299 Use it instead of #ifdef YYLSP_NEEDED.
19300
19301 2002-06-19 Akim Demaille <akim@epita.fr>
19302
19303 Prepare @$ in %destructor, but currently don't bind it in the
19304 skeleton, as %location use is not cleaned up yet.
19305
19306 * src/scan-gram.l (handle_dollar, handle_destructor_at)
19307 (handle_action_at): New.
19308 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
19309 a braced_code_t and a location as additional arguments.
19310 (handle_destructor_dollar): Instead of requiring `b4_eval', just
19311 unquote one when outputting `b4_dollar_dollar'.
19312 Adjust callers.
19313 * data/bison.simple (b4_eval): Remove.
19314 (b4_symbol_destructor): Adjust.
19315 * tests/input.at (Invalid @n): Adjust.
19316
19317 2002-06-19 Zack Weinberg <zack@codesourcery.com>
19318
19319 * doc/bison.texinfo: Document ability to have multiple
19320 prologue sections.
19321
19322 2002-06-18 Akim Demaille <akim@epita.fr>
19323
19324 * src/files.c (compute_base_names): When computing the output file
19325 names from the input file name, strip the directory part.
19326
19327 2002-06-18 Akim Demaille <akim@epita.fr>
19328
19329 * data/bison.simple.new: Comment changes.
19330 Reported by Andreas Schwab.
19331
19332 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
19333
19334 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
19335 there are no `label `yyoverflowlab' defined but not used' warnings
19336 when yyoverflow is defined.
19337
19338 2002-06-18 Akim Demaille <akim@epita.fr>
19339
19340 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
19341 new member.
19342 (symbol_destructor_set): Adjust.
19343 * src/output.c (symbol_destructors_output): Output the destructor
19344 locations.
19345 Output the symbol name.
19346 * data/bison.simple (b4_symbol_destructor): Adjust.
19347
19348 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
19349 and Akim Demaille <akim@epita.fr>
19350
19351 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
19352 what's left on the stack when the error recovery hits EOF.
19353 * tests/actions.at (Destructors): Complete to exercise this case.
19354
19355 2002-06-17 Akim Demaille <akim@epita.fr>
19356
19357 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
19358 arguments is really empty, not only equal to `[]'.
19359 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
19360 member.
19361 (symbol_destructor_set): New.
19362 * src/output.c (symbol_destructors_output): New.
19363 * src/reader.h (brace_code_t, current_braced_code): New.
19364 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
19365 (handle_dollar): Rename as...
19366 (handle_action_dollar): this.
19367 (handle_destructor_dollar): New.
19368 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
19369 (grammar_declaration): Use it.
19370 * data/bison.simple (yystos): Is always defined.
19371 (yydestructor): New.
19372 * tests/actions.at (Destructors): New.
19373 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
19374
19375 2002-06-17 Akim Demaille <akim@epita.fr>
19376
19377 * src/symlist.h, src/symlist.c (symbol_list_length): New.
19378 * src/scan-gram.l (handle_dollar, handle_at): Compute the
19379 rule_length only when needed.
19380 * src/output.c (actions_output, token_definitions_output): Output
19381 the full M4 block.
19382 * src/symtab.c: Don't access directly to the symbol tag, use
19383 symbol_tag_get.
19384 * src/parse-gram.y: Use symbol_list_free.
19385
19386 2002-06-17 Akim Demaille <akim@epita.fr>
19387
19388 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
19389 (symbol_list_prepend, get_type_name): Move to...
19390 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
19391 (symbol_list_prepend, symbol_list_n_type_name_get): here.
19392 Adjust all callers.
19393 (symbol_list_free): New.
19394 * src/scan-gram.l (handle_dollar): Takes a location.
19395 * tests/input.at (Invalid $n): Adjust.
19396
19397 2002-06-17 Akim Demaille <akim@epita.fr>
19398
19399 * src/reader.h, src/reader.c (symbol_list_new): Export it.
19400 (symbol_list_prepend): New.
19401 * src/parse-gram.y (%union): `list' is a new member.
19402 (symbols.1): New, replaces...
19403 (terms_to_prec.1, nterms_to_type.1): these.
19404 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
19405 Take a location as additional argument.
19406 Adjust all callers.
19407
19408 2002-06-15 Akim Demaille <akim@epita.fr>
19409
19410 * src/parse-gram.y: Move %token in the declaration section so that
19411 we don't depend upon CVS Bison.
19412
19413 2002-06-15 Akim Demaille <akim@epita.fr>
19414
19415 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
19416 * src/print.c (print_core): Use it.
19417
19418 2002-06-15 Akim Demaille <akim@epita.fr>
19419
19420 * src/conflicts.c (log_resolution): Accept the rule involved in
19421 the sr conflicts instead of the lookahead number that points to
19422 that rule.
19423 (flush_reduce): Accept the current lookahead vector as argument,
19424 instead of the index in LA.
19425 (resolve_sr_conflict): Accept the current number of lookahead
19426 bitset to consider for the STATE, instead of the index in LA.
19427 (set_conflicts): Adjust.
19428 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
19429
19430 2002-06-15 Akim Demaille <akim@epita.fr>
19431
19432 * src/state.h (state_t): Replace the `lookaheadsp' member, a
19433 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
19434 Adjust all dependencies.
19435 * src/lalr.c (initialize_lookaheads): Split into...
19436 (states_lookaheads_count, states_lookaheads_initialize): these.
19437 (lalr): Adjust.
19438
19439 2002-06-15 Akim Demaille <akim@epita.fr>
19440
19441 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
19442 out of...
19443 (grammar_rules_print): here.
19444 * src/reduce.c (reduce_output): Use it.
19445 * tests/reduce.at (Useless Rules, Reduced Automaton)
19446 (Underivable Rules): Adjust.
19447
19448 2002-06-15 Akim Demaille <akim@epita.fr>
19449
19450 Copy BYacc's nice way to report the grammar.
19451
19452 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
19453 New.
19454 Don't print the rules' location, it is confusing and useless.
19455 (rule_print): Use grammar_rhs_print.
19456 * src/print.c (print_grammar): Use grammar_rules_print.
19457
19458 2002-06-15 Akim Demaille <akim@epita.fr>
19459
19460 Complete and rationalize `useless thing' warnings.
19461
19462 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
19463 (symbol_tag_print): New.
19464 Use them everywhere in place of accessing directly the tag member.
19465 * src/gram.h, src/gram.c (rule_print): New.
19466 Use it where a rule used to be printed `by hand'.
19467 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
19468 (reduce_grammar_tables): Report the useless rules.
19469 (reduce_print): Useless things are a warning, not an error.
19470 Report it as such.
19471 * tests/reduce.at (Useless Nonterminals, Useless Rules):
19472 (Reduced Automaton, Underivable Rules): Adjust.
19473 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
19474 * tests/conflicts.at (Unresolved SR Conflicts)
19475 (Solved SR Conflicts): Adjust.
19476
19477 2002-06-15 Akim Demaille <akim@epita.fr>
19478
19479 Let symbols have a location.
19480
19481 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
19482 (getsym): Adjust.
19483 Adjust all callers.
19484 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
19485 Use location_t, not int.
19486 * src/symtab.c (symbol_check_defined): Take advantage of the
19487 location.
19488 * tests/regression.at (Invalid inputs): Adjust.
19489
19490 2002-06-15 Akim Demaille <akim@epita.fr>
19491
19492 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
19493 (input): Don't try to initialize yylloc here, do it in the
19494 scanner.
19495 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
19496 * src/gram.h (rule_t): Change line and action_line into location
19497 and action_location, of location_t type.
19498 Adjust all dependencies.
19499 * src/location.h, src/location.c (empty_location): New.
19500 * src/reader.h, src/reader.c (grammar_start_symbol_set)
19501 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
19502 (grammar_current_rule_symbol_append)
19503 (grammar_current_rule_action_append): Expect a location as argument.
19504 * src/reader.c (grammar_midrule_action): Adjust to attach an
19505 action's location as dummy symbol location.
19506 * src/symtab.h, src/symtab.c (startsymbol_location): New.
19507 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
19508 the line numbers.
19509
19510 2002-06-14 Akim Demaille <akim@epita.fr>
19511
19512 Grammar declarations may be found in the grammar section.
19513
19514 * src/parse-gram.y (rules_or_grammar_declaration): New.
19515 (declarations): Each declaration may end with a semicolon, not
19516 just...
19517 (grammar_declaration): `"%union"'.
19518 (grammar): Branch to rules_or_grammar_declaration.
19519
19520 2002-06-14 Akim Demaille <akim@epita.fr>
19521
19522 * src/main.c (main): Invoke scanner_free.
19523
19524 2002-06-14 Akim Demaille <akim@epita.fr>
19525
19526 * src/output.c (m4_invoke): Extracted from...
19527 (output_skeleton): here.
19528 Free tempfile.
19529
19530 2002-06-14 Akim Demaille <akim@epita.fr>
19531
19532 * src/parse-gram.y (directives, directive, gram)
19533 (grammar_directives, precedence_directives, precedence_directive):
19534 Rename as...
19535 (declarations, declaration, grammar, grammar_declaration)
19536 (precedence_declaration, precedence_declarator): these.
19537 (symbol_declaration): New.
19538
19539 2002-06-14 Akim Demaille <akim@epita.fr>
19540
19541 * src/files.c (action_obstack): Remove, unused.
19542 (output_obstack): Remove it, and all its dependencies, as it is no
19543 longer needed.
19544 * src/reader.c (epilogue_set): Build the epilogue in the
19545 muscle_obstack.
19546 * src/output.h, src/output.c (muscle_obstack): Move to...
19547 * src/muscle_tab.h, src/muscle_tab.h: here.
19548 (muscle_init): Initialize muscle_obstack.
19549 (muscle_free): New.
19550 * src/main.c (main): Call it.
19551
19552 2002-06-14 Akim Demaille <akim@epita.fr>
19553
19554 * src/location.h: New, extracted from...
19555 * src/reader.h: here.
19556 * src/Makefile.am (noinst_HEADERS): Merge into
19557 (bison_SOURCES): this.
19558 Add location.h.
19559 * src/parse-gram.y: Use location_t instead of Bison's.
19560 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
19561 Use location_t instead of ints.
19562
19563 2002-06-14 Akim Demaille <akim@epita.fr>
19564
19565 * data/bison.simple, data/bison.c++: Be sure to restore the
19566 current #line when returning to the skeleton contents after having
19567 exposed the input file's #line.
19568
19569 2002-06-12 Akim Demaille <akim@epita.fr>
19570
19571 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
19572 eager.
19573 * tests/actions.at (Exotic Dollars): New.
19574
19575 2002-06-12 Akim Demaille <akim@epita.fr>
19576
19577 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
19578 ['"/] too eagerly.
19579 * tests/input.at (Torturing the Scanner): New.
19580
19581 2002-06-11 Akim Demaille <akim@epita.fr>
19582
19583 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
19584 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
19585 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
19586 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
19587 * src/reader.c (reader): Use it.
19588
19589 2002-06-11 Akim Demaille <akim@epita.fr>
19590
19591 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
19592 Adjust all callers.
19593 (scanner_last_string_free): New.
19594
19595 2002-06-11 Akim Demaille <akim@epita.fr>
19596
19597 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
19598 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
19599 (last_string, YY_OBS_FREE): New.
19600 Use them when returning an ID.
19601
19602 2002-06-11 Akim Demaille <akim@epita.fr>
19603
19604 Have Bison grammars parsed by a Bison grammar.
19605
19606 * src/reader.c, src/reader.h (prologue_augment): New.
19607 * src/reader.c (copy_definition): Remove.
19608
19609 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
19610 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
19611 (grammar_current_rule_prec_set, grammar_current_rule_check)
19612 (grammar_current_rule_symbol_append)
19613 (grammar_current_rule_action_append): Export.
19614 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
19615 (symbol_list_action_append): Remove.
19616 Hook the routines from reader.
19617 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
19618 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
19619
19620 * src/reader.c (read_declarations): Remove, unused.
19621
19622 * src/parse-gram.y: Handle the epilogue.
19623 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
19624 (grammar_start_symbol_set): this.
19625 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
19626 * src/reader.c (readgram): Remove, unused.
19627 (reader): Adjust to insert eoftoken and axiom where appropriate.
19628
19629 * src/reader.c (copy_dollar): Replace with...
19630 * src/scan-gram.h (handle_dollar): this.
19631 * src/parse-gram.y: Remove `%thong'.
19632
19633 * src/reader.c (copy_at): Replace with...
19634 * src/scan-gram.h (handle_at): this.
19635
19636 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
19637 New.
19638
19639 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
19640 time being.
19641
19642 * src/reader.h, src/reader.c (grammar_rule_end): New.
19643
19644 * src/parse.y (current_type, current_class): New.
19645 Implement `%nterm', `%token' support.
19646 Merge `%term' into `%token'.
19647 (string_as_id): New.
19648 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
19649 type name.
19650
19651 * src/parse-gram.y: Be sure to handle properly the beginning of
19652 rules.
19653
19654 * src/parse-gram.y: Handle %type.
19655 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
19656
19657 * src/parse-gram.y: More directives support.
19658 * src/options.c: No longer handle source directives.
19659
19660 * src/parse-gram.y: Fix %output.
19661
19662 * src/parse-gram.y: Handle %union.
19663 Use the prologue locations.
19664 * src/reader.c (parse_union_decl): Remove.
19665
19666 * src/reader.h, src/reader.c (epilogue_set): New.
19667 * src/parse-gram.y: Use it.
19668
19669 * data/bison.simple, data/bison.c++: b4_stype is now either not
19670 defined, then default to int, or to the contents of %union,
19671 without `union' itself.
19672 Adjust.
19673 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
19674
19675 * src/output.c (actions_output): Don't output braces, as they are
19676 already handled by the scanner.
19677
19678 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
19679 characters to themselves.
19680
19681 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
19682 that the epilogue has a proper #line.
19683
19684 * src/parse-gram.y: Handle precedence/associativity.
19685
19686 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
19687 a terminal.
19688 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
19689 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
19690 at all to define terminals that cannot be emitted.
19691
19692 * src/scan-gram.l: Escape M4 characters.
19693
19694 * src/scan-gram.l: Working properly with escapes in user
19695 strings/characters.
19696
19697 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
19698 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
19699 grammar.
19700 Use more modest sizes, as for the time being the parser does not
19701 release memory, and therefore the process swallows a huge amount
19702 of memory.
19703
19704 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
19705 stricter %token grammar.
19706
19707 * src/symtab.h (associativity): Add `undef_assoc'.
19708 (symbol_precedence_set): Do nothing when passed an undef_assoc.
19709 * src/symtab.c (symbol_check_alias_consistence): Adjust.
19710
19711 * tests/regression.at (Invalid %directive): Remove, as it is now
19712 meaningless.
19713 (Invalid inputs): Adjust to the new error messages.
19714 (Token definitions): The new grammar doesn't allow too many
19715 eccentricities.
19716
19717 * src/lex.h, src/lex.c: Remove.
19718 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
19719 (copy_character, copy_string2, copy_string, copy_identifier)
19720 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
19721 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
19722 (parse_action): Remove.
19723 * po/POTFILES.in: Adjust.
19724
19725 2002-06-11 Akim Demaille <akim@epita.fr>
19726
19727 * src/reader.c (parse_action): Don't store directly into the
19728 rule's action member: return the action as a string.
19729 Don't require `rule_length' as an argument: compute it.
19730 (grammar_current_rule_symbol_append)
19731 (grammar_current_rule_action_append): New, eved out from
19732 (readgram): here.
19733 Remove `action_flag', `rulelength', unused now.
19734
19735 2002-06-11 Akim Demaille <akim@epita.fr>
19736
19737 * src/reader.c (grammar_current_rule_prec_set).
19738 (grammar_current_rule_check): New, eved out from...
19739 (readgram): here.
19740 Remove `xaction', `first_rhs': useless.
19741 * tests/input.at (Type clashes): New.
19742 * tests/existing.at (GNU Cim Grammar): Adjust.
19743
19744 2002-06-11 Akim Demaille <akim@epita.fr>
19745
19746 * src/reader.c (grammar_midrule_action): New, Eved out from
19747 (readgram): here.
19748
19749 2002-06-11 Akim Demaille <akim@epita.fr>
19750
19751 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
19752 New.
19753 (readgram): Use them as replacement of inlined code, crule and
19754 crule1.
19755
19756 2002-06-11 Akim Demaille <akim@epita.fr>
19757
19758 * src/reader.c (grammar_end, grammar_symbol_append): New.
19759 (readgram): Use them.
19760 Make the use of `p' as local as possible.
19761
19762 2002-06-10 Akim Demaille <akim@epita.fr>
19763
19764 GCJ's parser requires the tokens to be defined before the prologue.
19765
19766 * data/bison.simple: Output the token definition before the user's
19767 prologue.
19768 * tests/regression.at (Braces parsing, Duplicate string)
19769 (Mixing %token styles): Check the output from bison.
19770 (Early token definitions): New.
19771
19772 2002-06-10 Akim Demaille <akim@epita.fr>
19773
19774 * src/symtab.c (symbol_user_token_number_set): Don't complain when
19775 assigning twice the same user number to a token, so that we can
19776 use it in...
19777 * src/lex.c (lex): here.
19778 Also use `symbol_class_set' instead of hand written code.
19779 * src/reader.c (parse_assoc_decl): Likewise.
19780
19781 2002-06-10 Akim Demaille <akim@epita.fr>
19782
19783 * src/symtab.c, src/symtab.c (symbol_class_set)
19784 (symbol_user_token_number_set): New.
19785 * src/reader.c (parse_token_decl): Use them.
19786 Use a switch instead of ifs.
19787 Use a single argument.
19788
19789 2002-06-10 Akim Demaille <akim@epita.fr>
19790
19791 Remove `%thong' support as it is undocumented, unused, duplicates
19792 `%token's job, and creates useless e-mail traffic with people who
19793 want to know what it is, why it is undocumented, unused, and
19794 duplicates `%token's job.
19795
19796 * src/reader.c (parse_thong_decl): Remove.
19797 * src/options.c (option_table): Remove "thong".
19798 * src/lex.h (tok_thong): Remove.
19799
19800 2002-06-10 Akim Demaille <akim@epita.fr>
19801
19802 * src/symtab.c, src/symtab.c (symbol_type_set)
19803 (symbol_precedence_set): New.
19804 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
19805 (value_components_used): Remove, unused.
19806
19807 2002-06-09 Akim Demaille <akim@epita.fr>
19808
19809 Move symbols handling code out of the reader.
19810
19811 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
19812 (axiom): Move to...
19813 * src/symtab.h, src/symtab.c: here.
19814
19815 * src/gram.c (start_symbol): Remove: use startsymbol->number.
19816 * src/reader.c (startval): Rename as...
19817 * src/symtab.h, src/symtab.c (startsymbol): this.
19818 * src/reader.c: Adjust.
19819
19820 * src/reader.c (symbol_check_defined, symbol_make_alias)
19821 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19822 (token_translations_init)
19823 Move to...
19824 * src/symtab.c: here.
19825 * src/reader.c (packsymbols): Move to...
19826 * src/symtab.h, src/symtab.c (symbols_pack): here.
19827 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
19828 argument.
19829
19830 2002-06-03 Akim Demaille <akim@epita.fr>
19831
19832 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
19833 then statements.
19834
19835 2002-06-03 Akim Demaille <akim@epita.fr>
19836
19837 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
19838 structs with non literals.
19839 * src/scan-skel.l: never-interactive.
19840 * src/conflicts.c (enum conflict_resolution_e): No trailing
19841 comma.
19842 * src/getargs.c (usage): Split long literal strings.
19843 Reported by Hans Aberg.
19844
19845 2002-05-28 Akim Demaille <akim@epita.fr>
19846
19847 * data/bison.c++: Use C++ ostreams.
19848 (cdebug_): New member.
19849
19850 2002-05-28 Akim Demaille <akim@epita.fr>
19851
19852 * src/output.c (output_skeleton): Be sure to allocate enough room
19853 for `/' _and_ for `\0' in full_skeleton.
19854
19855 2002-05-28 Akim Demaille <akim@epita.fr>
19856
19857 * data/bison.c++: Catch up with bison.simple:
19858 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19859 and Paul Eggert <eggert@twinsun.com>: `error' handing.
19860 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
19861 and popping traces.
19862
19863 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19864
19865 * src/output.c (output_skeleton): Put an explicit path in front of
19866 the skeleton file name, rather than relying on the -I directory,
19867 to partially alleviate effects of having a skeleton file lying around
19868 in the current directory.
19869
19870 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19871
19872 * src/conflicts.c (log_resolution): Correct typo:
19873 obstack_printf should be obstack_fgrow1.
19874
19875 2002-05-26 Akim Demaille <akim@epita.fr>
19876
19877 * src/state.h (state_t): `solved_conflicts' is a new member.
19878 * src/LR0.c (new_state): Set it to 0.
19879 * src/conflicts.h, src/conflicts.c (print_conflicts)
19880 (free_conflicts, solve_conflicts): Rename as...
19881 (conflicts_print, conflicts_free, conflicts_solve): these.
19882 Adjust callers.
19883 * src/conflicts.c (enum conflict_resolution_e)
19884 (solved_conflicts_obstack): New, used by...
19885 (log_resolution): this.
19886 Adjust to attach the conflict resolution to each state.
19887 Complete the description with the precedence/associativity
19888 information.
19889 (resolve_sr_conflict): Adjust.
19890 * src/print.c (print_state): Output its solved_conflicts.
19891 * tests/conflicts.at (Unresolved SR Conflicts)
19892 (Solved SR Conflicts): Exercise --report=all.
19893
19894 2002-05-26 Akim Demaille <akim@epita.fr>
19895
19896 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19897 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19898 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
19899 (token_number_t, item_number_as_token_number)
19900 (token_number_as_item_number, muscle_insert_token_number_table):
19901 Rename as...
19902 (symbol_number_t, item_number_as_symbol_number)
19903 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
19904 these, since it is more appropriate.
19905
19906 2002-05-26 Akim Demaille <akim@epita.fr>
19907
19908 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
19909 `Error:' lines.
19910 * data/bison.simple (yystos) [YYDEBUG]: New.
19911 (yyparse) [YYDEBUG]: Display the symbols which are popped during
19912 error recovery.
19913 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
19914
19915 2002-05-25 Akim Demaille <akim@epita.fr>
19916
19917 * doc/bison.texinfo (Debugging): Split into...
19918 (Tracing): this new section, its former contents, and...
19919 (Understanding): this new section.
19920 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
19921 by...
19922 (report_flag): this.
19923 Adjust all dependencies.
19924 (report_args, report_types, report_argmatch): New.
19925 (usage, getargs): Report/support -r, --report.
19926 * src/options.h
19927 (struct option_table_struct): Rename as..,
19928 (struct option_table_s): this.
19929 Rename the `set_flag' member to `flag' to match with getopt_long's
19930 struct.
19931 * src/options.c (option_table): Split verbose into an entry for
19932 %verbose, and another for --verbose.
19933 Support --report/-r, so remove -r from the obsolete --raw.
19934 * src/print.c: Attach full item sets and lookaheads reports to
19935 report_flag instead of trace_flag.
19936 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
19937
19938 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19939 and Paul Eggert <eggert@twinsun.com>
19940
19941 * data/bison.simple (yyparse): Correct error handling to conform to
19942 POSIX and yacc. Specifically, after syntax error is discovered,
19943 do not reduce further before shifting the error token.
19944 Clean up the code a bit by removing the labels yyerrdefault,
19945 yyerrhandle, yyerrpop.
19946 * NEWS: Document the above.
19947
19948 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19949
19950 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
19951 type; it isn't always big enough, since it doesn't necessarily
19952 include non-terminals.
19953 (yytranslate): Expand definition of yy_token_number_type, so that
19954 the latter can be removed.
19955 (yy_token_number_type): Remove, only one use.
19956 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
19957 don't use TokenNumberType as element type.
19958
19959 * tests/regression.at: Modify expected output to agree with change
19960 to yyr1 and yytranslate.
19961
19962 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
19963
19964 * src/reader.c (parse_action): Use copy_character instead of
19965 obstack_1grow.
19966
19967 2002-05-13 Akim Demaille <akim@epita.fr>
19968
19969 * tests/regression.at (Token definitions): Prototype yylex and
19970 yyerror.
19971
19972 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19973
19974 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
19975 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
19976 32-bit arithmetic.
19977 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
19978
19979 2002-05-07 Akim Demaille <akim@epita.fr>
19980
19981 * tests/synclines.at: Be sure to prototype yylex and yyerror to
19982 avoid GCC warnings.
19983
19984 2002-05-07 Akim Demaille <akim@epita.fr>
19985
19986 Kill GCC warnings.
19987
19988 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
19989 over the RHS of each rule.
19990 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
19991 * src/state.h (state_t): Member `nitems' is unsigned short.
19992 * src/LR0.c (get_state): Adjust.
19993 * src/reader.c (packgram): Likewise.
19994 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
19995 `Type'.
19996 (muscle_insert_int_table): Remove, unused.
19997 (prepare_rules): Remove `max'.
19998
19999 2002-05-06 Akim Demaille <akim@epita.fr>
20000
20001 * src/closure.c (print_firsts): Display of the symbol tags.
20002 (bitmatrix_print): Move to...
20003 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
20004 here.
20005 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
20006
20007 2002-05-06 Akim Demaille <akim@epita.fr>
20008
20009 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
20010 hash_do_for_each.
20011
20012 2002-05-06 Akim Demaille <akim@epita.fr>
20013
20014 * src/LR0.c (new_state, get_state): Instead of using the global
20015 `kernel_size' and `kernel_base', have two new arguments:
20016 `core_size' and `core'.
20017 Adjust callers.
20018
20019 2002-05-06 Akim Demaille <akim@epita.fr>
20020
20021 * src/reader.c (packgram): No longer end `ritem' with a 0
20022 sentinel: it is not used.
20023
20024 2002-05-05 Akim Demaille <akim@epita.fr>
20025
20026 New experimental feature: display the lookaheads in the report and
20027 graph.
20028
20029 * src/print (print_core): When --trace-flag, display the rules
20030 lookaheads.
20031 * src/print_graph.c (print_core): Likewise.
20032 Swap the arguments.
20033 Adjust caller.
20034
20035 2002-05-05 Akim Demaille <akim@epita.fr>
20036
20037 * tests/torture.at (Many lookaheads): New test.
20038
20039 2002-05-05 Akim Demaille <akim@epita.fr>
20040
20041 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
20042 (GENERATE_MUSCLE_INSERT_TABLE): this.
20043 (output_int_table, output_unsigned_int_table, output_short_table)
20044 (output_token_number_table, output_item_number_table): Replace with...
20045 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
20046 (muscle_insert_short_table, muscle_insert_token_number_table)
20047 (muscle_insert_item_number_table): these.
20048 Adjust all callers.
20049 (prepare_tokens): Don't free `translations', since...
20050 * src/reader.h, src/reader.c (grammar_free): do it.
20051 Move to...
20052 * src/gram.h, src/gram.c (grammar_free): here.
20053 * data/bison.simple, data/bison.c++: b4_token_number_max is now
20054 b4_translate_max.
20055
20056 2002-05-05 Akim Demaille <akim@epita.fr>
20057
20058 * src/output.c (output_unsigned_int_table): New.
20059 (prepare_rules): `i' is unsigned.
20060 `prhs', `rline', `r2' are unsigned int.
20061 Rename muscle `rhs_number_max' as `rhs_max'.
20062 Output muscles `prhs_max', `rline_max', and `r2_max'.
20063 Free rline and r1.
20064 * data/bison.simple, data/bison.c++: Adjust to use these muscles
20065 to compute types instead of constant types.
20066 * tests/regression.at (Web2c Actions): Adjust.
20067
20068 2002-05-04 Akim Demaille <akim@epita.fr>
20069
20070 * src/symtab.h (SALIAS, SUNDEF): Rename as...
20071 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
20072 Adjust dependencies.
20073 * src/output.c (token_definitions_output): Be sure not to output a
20074 `#define 'a'' when fed with `%token 'a' "a"'.
20075 * tests/regression.at (Token definitions): New.
20076
20077 2002-05-03 Paul Eggert <eggert@twinsun.com>
20078
20079 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
20080 for K&R C.
20081
20082 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
20083
20084 * Makefile.am (SUBDIRS): Remove intl.
20085 (EXTRA_DIST): Add config/config.rpath.
20086
20087 2002-05-03 Akim Demaille <akim@epita.fr>
20088
20089 * data/bison.simple (m4_if): Don't output empty enums.
20090 And actually, output valid enum definitions :(.
20091
20092 2002-05-03 Akim Demaille <akim@epita.fr>
20093
20094 * configure.bat: Remove, completely obsolete.
20095 * Makefile.am (EXTRA_DIST): Adjust.
20096 Don't distribute config.rpath...
20097 * config/Makefile.am (EXTRA_DIST): Do it.
20098
20099 2002-05-03 Akim Demaille <akim@epita.fr>
20100
20101 * configure.in (GETTEXT_VERSION): New.
20102 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
20103
20104 2002-05-03 Akim Demaille <akim@epita.fr>
20105
20106 * data/bison.simple (b4_token_enum): New.
20107 (b4_token_defines): Use it to output tokens both as #define and
20108 enums.
20109 Suggested by Paul Eggert.
20110 * src/output.c (token_definitions_output): Don't output spurious
20111 white spaces.
20112
20113 2002-05-03 Akim Demaille <akim@epita.fr>
20114
20115 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
20116
20117 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
20118
20119 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
20120 Update the stack class, give a try to deque as the default container.
20121
20122 2002-05-02 Akim Demaille <akim@epita.fr>
20123
20124 * data/bison.simple (yyparse): Do not implement @$ = @1.
20125 (YYLLOC_DEFAULT): Adjust to do it.
20126 * doc/bison.texinfo (Location Default Action): Fix.
20127
20128 2002-05-02 Akim Demaille <akim@epita.fr>
20129
20130 * src/reader.c (parse_braces): Merge into...
20131 (parse_action): this.
20132
20133 2002-05-02 Akim Demaille <akim@epita.fr>
20134
20135 * configure.in (ALL_LINGUAS): Remove.
20136 * po/LINGUAS, hr.po: New.
20137
20138 2002-05-02 Akim Demaille <akim@epita.fr>
20139
20140 Remove the so called hairy (semantic) parsers.
20141
20142 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
20143 * src/gram.h, src/gram.c (semantic_parser): Remove.
20144 (rule_t): Remove the guard and guard_line members.
20145 * src/lex.h (token_t): remove tok_guard.
20146 * src/options.c (option_table): Remove %guard and %semantic_parser
20147 support.
20148 * src/output.c, src/output.h (guards_output): Remove.
20149 (prepare): Adjust.
20150 (token_definitions_output): Don't output the `T'
20151 tokens (???).
20152 (output_skeleton): Don't output the guards.
20153 * src/files.c, src/files.c (attrsfile): Remove.
20154 * src/reader.c (symbol_list): Remove the guard and guard_line
20155 members.
20156 Adjust dependencies.
20157 (parse_guard): Remove.
20158 * data/bison.hairy: Remove.
20159 * doc/bison.texinfo (Environment Variables): Remove occurrences of
20160 BISON_HAIRY.
20161
20162 2002-05-02 Akim Demaille <akim@epita.fr>
20163
20164 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
20165 (parse_guard): Rename the formal argument `stack_offset' as
20166 `rule_length', which is more readable.
20167 Adjust callers.
20168 (copy_at, copy_dollar): Instead of outputting the hard coded
20169 values of $$, $n and so forth, output invocation to b4_lhs_value,
20170 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
20171 Note: this patch partially drops `semantic-parser' support: it
20172 always does `rule_length - n', where semantic parsers ought to
20173 always use `-n'.
20174 * data/bison.simple, data/bison.c++ (b4_lhs_value)
20175 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
20176
20177 2002-05-02 Akim Demaille <akim@epita.fr>
20178
20179 * configure.in (AC_INIT): Bump to 1.49b.
20180 (AM_INIT_AUTOMAKE): Short invocation.
20181
20182 2002-05-02 Akim Demaille <akim@epita.fr>
20183
20184 Version 1.49a.
20185
20186 2002-05-01 Akim Demaille <akim@epita.fr>
20187
20188 * src/skeleton.h: Remove.
20189
20190 2002-05-01 Akim Demaille <akim@epita.fr>
20191
20192 * src/skeleton.h: Fix the #endif.
20193 Reported by Magnus Fromreide.
20194
20195 2002-04-26 Paul Eggert <eggert@twinsun.com>
20196
20197 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
20198 Define if we define YYSTYPE and YYLTYPE, respectively.
20199 (YYCOPY): Fix [] quoting problem in the non-GCC case.
20200
20201 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
20202
20203 * src/scan-skel.l: Postprocess quadrigraphs.
20204
20205 * src/reader.c (copy_character): New function, used to output
20206 single characters while replacing `[' and `]' with quadrigraphs, to
20207 avoid troubles with M4 quotes.
20208 (copy_comment): Output characters with copy_character.
20209 (read_additionnal_code): Likewise.
20210 (copy_string2): Likewise.
20211 (copy_definition): Likewise.
20212
20213 * tests/calc.at: Exercise M4 quoting.
20214
20215 2002-04-25 Akim Demaille <akim@epita.fr>
20216
20217 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
20218 between `!' and the command.
20219 Reported by Paul Eggert.
20220
20221 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
20222
20223 * tests/calc.at: Exercise prologue splitting.
20224
20225 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
20226 `b4_post_prologue' instead of `b4_prologue'.
20227
20228 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
20229 muscles.
20230 (output): Free pre_prologue_obstack and post_prologue_obstack.
20231 * src/files.h, src/files.c (attrs_obstack): Remove.
20232 (pre_prologue_obstack, post_prologue_obstack): New.
20233 * src/reader.c (copy_definition): Add a parameter to specify the
20234 obstack to fill, instead of using attrs_obstack unconditionally.
20235 (read_declarations): Pass pre_prologue_obstack to copy_definition if
20236 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
20237
20238 2002-04-23 Paul Eggert <eggert@twinsun.com>
20239
20240 * data/bison.simple: Remove unnecessary commentary and white
20241 space differences from 1_29-branch.
20242 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
20243
20244 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
20245 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
20246 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
20247 constructors or destructors.
20248
20249 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
20250
20251 2002-04-23 Akim Demaille <akim@epita.fr>
20252
20253 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
20254 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
20255 location with columns.
20256 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
20257 All reported by Paul Eggert.
20258
20259 2002-04-22 Akim Demaille <akim@epita.fr>
20260
20261 * src/reduce.c (dump_grammar): Move to...
20262 * src/gram.h, src/gram.c (grammar_dump): here.
20263 Be sure to separate long item numbers.
20264 Don't read the members of a rule's prec if its nil.
20265
20266 2002-04-22 Akim Demaille <akim@epita.fr>
20267
20268 * src/output.c (table_size, table_grow): New.
20269 (MAXTABLE): Remove, replace uses with table_size.
20270 (pack_vector): Instead of dying when the table is too big, grow it.
20271
20272 2002-04-22 Akim Demaille <akim@epita.fr>
20273
20274 * data/bison.simple (yyr1): Its type is that of a token number.
20275 * data/bison.c++ (r1_): Likewise.
20276 * tests/regression.at (Web2c Actions): Adjust.
20277
20278 2002-04-22 Akim Demaille <akim@epita.fr>
20279
20280 * src/reader.c (token_translations_init): 256 is now the default
20281 value for the error token, i.e., it will be assigned another
20282 number if the user assigned 256 to one of her tokens.
20283 (reader): Don't force 256 to error.
20284 * doc/bison.texinfo (Symbols): Adjust.
20285 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
20286 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
20287 etc. instead of 10, 20, 30 (which was used to `jump' over error
20288 (256) and undefined (2)).
20289
20290 2002-04-22 Akim Demaille <akim@epita.fr>
20291
20292 Propagate more token_number_t.
20293
20294 * src/gram.h (token_number_as_item_number)
20295 (item_number_as_token_number): New.
20296 * src/output.c (GENERATE_OUTPUT_TABLE): New.
20297 Use it to create output_item_number_table and
20298 output_token_number_table.
20299 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
20300 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
20301 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
20302 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
20303
20304 2002-04-22 Akim Demaille <akim@epita.fr>
20305
20306 * src/output.h, src/output.c (get_lines_number): Remove.
20307
20308 2002-04-19 Akim Demaille <akim@epita.fr>
20309
20310 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
20311 as Lex/Flex'.
20312 (Debugging): More details about enabling the debugging features.
20313 (Table of Symbols): Describe $$, $n, @$, and @n.
20314 Suggested by Tim Josling.
20315
20316 2002-04-19 Akim Demaille <akim@epita.fr>
20317
20318 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
20319
20320 2002-04-10 Akim Demaille <akim@epita.fr>
20321
20322 * src/system.h: Rely on HAVE_LIMITS_H.
20323 Suggested by Paul Eggert.
20324
20325 2002-04-09 Akim Demaille <akim@epita.fr>
20326
20327 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
20328 full stderr, and strip it according to the bison options, instead
20329 of composing the error message from different bits.
20330 This makes it easier to check for several error messages.
20331 Adjust all the invocations.
20332 Add an invocation exercising the error token.
20333 Add an invocation demonstrating a stupid error message.
20334 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
20335 Adjust the tests.
20336 Error message are for stderr, not stdout.
20337
20338 2002-04-09 Akim Demaille <akim@epita.fr>
20339
20340 * src/gram.h, src/gram.c (error_token_number): Remove, use
20341 errtoken->number.
20342 * src/reader.c (reader): Don't specify the user token number (2)
20343 for $undefined, as it uselessly prevents using it.
20344 * src/gram.h (token_number_t): Move to...
20345 * src/symtab.h: here.
20346 (state_t.number): Is a token_number_t.
20347 * src/print.c, src/reader.c: Use undeftoken->number instead of
20348 hard coded 2.
20349 (Even though this 2 is not the same as above: the number of the
20350 undeftoken remains being 2, it is its user token number which
20351 might not be 2).
20352 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
20353 `user_token_number_max'.
20354 Output `undef_token_number'.
20355 * data/bison.simple, data/bison.c++: Use them.
20356 Be sure to map invalid yylex return values to
20357 `undef_token_number'. This saves us from gratuitous SEGV.
20358
20359 * tests/conflicts.at (Solved SR Conflicts)
20360 (Unresolved SR Conflicts): Adjust.
20361 * tests/regression.at (Web2c Actions): Adjust.
20362
20363 2002-04-08 Akim Demaille <akim@epita.fr>
20364
20365 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
20366 Adding #line.
20367 Remove the duplicate `typedefs'.
20368 (RhsNumberType): Fix the declaration and various other typos.
20369 Use __ofile__.
20370 * data/bison.simple: Use __ofile__.
20371 * src/scan-skel.l: Handle __ofile__.
20372
20373 2002-04-08 Akim Demaille <akim@epita.fr>
20374
20375 * src/gram.h (item_number_t): New, the type of item numbers in
20376 RITEM. Note that it must be able to code symbol numbers as
20377 positive number, and the negation of rule numbers as negative
20378 numbers.
20379 Adjust all dependencies (pretty many).
20380 * src/reduce.c (rule): Remove this `short *' pointer: use
20381 item_number_t.
20382 * src/system.h (MINSHORT, MAXSHORT): Remove.
20383 Include `limits.h'.
20384 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
20385 (shortcpy): Remove.
20386 (MAXTABLE): Move to...
20387 * src/output.c (MAXTABLE): here.
20388 (prepare_rules): Use output_int_table to output rhs.
20389 * data/bison.simple, data/bison.c++: Adjust.
20390 * tests/torture.at (Big triangle): Move the limit from 254 to
20391 500.
20392 * tests/regression.at (Web2c Actions): Ajust.
20393
20394 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
20395 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
20396 passes, but produces negative #line number, once fixed, GCC is
20397 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
20398 C), it passes.
20399 * src/state.h (state_h): Code input lines on ints, not shorts.
20400
20401 2002-04-08 Akim Demaille <akim@epita.fr>
20402
20403 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
20404 and then the grammar.
20405
20406 2002-04-08 Akim Demaille <akim@epita.fr>
20407
20408 * src/system.h: No longer using strndup.
20409
20410 2002-04-07 Akim Demaille <akim@epita.fr>
20411
20412 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
20413 * src/output.c (output_table_data): Return the longest number.
20414 (prepare_tokens): Output `token_number_max').
20415 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
20416 New.
20417 Use them to define yy_token_number_type/TokenNumberType.
20418 Use this type for yytranslate.
20419 * tests/torture.at (Big triangle): Push the limit from 124 to
20420 253.
20421 * tests/regression.at (Web2c Actions): Adjust.
20422
20423 2002-04-07 Akim Demaille <akim@epita.fr>
20424
20425 * tests/torture.at (Big triangle): New.
20426 (GNU AWK Grammar, GNU Cim Grammar): Move to...
20427 * tests/existing.at: here.
20428
20429 2002-04-07 Akim Demaille <akim@epita.fr>
20430
20431 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
20432 nritems.
20433 Adjust dependencies.
20434
20435 2002-04-07 Akim Demaille <akim@epita.fr>
20436
20437 * src/reader.c: Normalize increments to prefix form.
20438
20439 2002-04-07 Akim Demaille <akim@epita.fr>
20440
20441 * src/reader.c, symtab.c: Remove debugging code.
20442
20443 2002-04-07 Akim Demaille <akim@epita.fr>
20444
20445 Rename all the `bucket's as `symbol_t'.
20446
20447 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
20448 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
20449 * src/symtab.c, src/symtab.h (bucket): Rename as...
20450 (symbol_t): this.
20451 (symbol_list_new, bucket_check_defined, bucket_make_alias)
20452 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
20453 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20454 (buckets_new, buckets_free, buckets_do): Rename as...
20455 (symbol_list_new, symbol_check_defined, symbol_make_alias)
20456 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
20457 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
20458 (symbols_new, symbols_free, symbols_do): these.
20459
20460 2002-04-07 Akim Demaille <akim@epita.fr>
20461
20462 Use lib/hash for the symbol table.
20463
20464 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
20465 EOF.
20466 * src/lex.c (lex): Set the `number' member of new terminals.
20467 * src/reader.c (bucket_check_defined, bucket_make_alias)
20468 (bucket_check_alias_consistence, bucket_translation): New.
20469 (reader, grammar_free, readgram, token_translations_init)
20470 (packsymbols): Adjust.
20471 (reader): Number the predefined tokens.
20472 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
20473 for predefined tokens.
20474 * src/symtab.h (bucket): Remove all the hash table related
20475 members.
20476 * src/symtab.c (symtab): Replace by...
20477 (bucket_table): this.
20478 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20479 (buckets_new, buckets_do): New.
20480
20481 2002-04-07 Akim Demaille <akim@epita.fr>
20482
20483 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
20484 (start_symbol, max_user_token_number, semantic_parser)
20485 (error_token_number): Initialize.
20486 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
20487 Initialize.
20488 (reader): Don't.
20489 (errtoken, eoftoken, undeftoken, axiom): Extern.
20490
20491 2002-04-07 Akim Demaille <akim@epita.fr>
20492
20493 * src/gram.h (rule_s): prec and precsym are now pointers
20494 to the bucket giving the priority/associativity.
20495 Member `associativity' removed: useless.
20496 * src/reduce.c, src/conflicts.c: Adjust.
20497
20498 2002-04-07 Akim Demaille <akim@epita.fr>
20499
20500 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
20501 Properly escape the symbols' TAG when outputting them.
20502
20503 2002-04-07 Akim Demaille <akim@epita.fr>
20504
20505 * src/lalr.h (LA): Is a bitsetv, not bitset*.
20506
20507 2002-04-07 Akim Demaille <akim@epita.fr>
20508
20509 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
20510 (LArule): this, which is an array to rule_t*.
20511 * src/print.c, src/conflicts.c: Adjust.
20512
20513 2002-04-07 Akim Demaille <akim@epita.fr>
20514
20515 * src/gram.h (rule_t): Rename `number' as `user_number'.
20516 `number' is a new member.
20517 Adjust dependencies.
20518 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
20519
20520 2002-04-07 Akim Demaille <akim@epita.fr>
20521
20522 As a result of the previous patch, it is no longer needed
20523 to reorder ritem itself.
20524
20525 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
20526
20527 2002-04-07 Akim Demaille <akim@epita.fr>
20528
20529 Be sure never to walk through RITEMS, but use only data related to
20530 the rules themselves. RITEMS should be banished.
20531
20532 * src/output.c (output_token_translations): Rename as...
20533 (prepare_tokens): this.
20534 In addition to `translate', prepare the muscles `tname' and
20535 `toknum', which were handled by...
20536 (output_rule_data): this.
20537 Remove, and move the remainder of its outputs into...
20538 (prepare_rules): this new routines, which also merges content from
20539 (output_gram): this.
20540 (prepare_rules): Be sure never to walk through RITEMS.
20541 (output_stos): Rename as...
20542 (prepare_stos): this.
20543 (output): Always invoke prepare_states, after all, just don't use it
20544 in the output if you don't need it.
20545
20546 2002-04-07 Akim Demaille <akim@epita.fr>
20547
20548 * src/LR0.c (new_state): Display `nstates' as the name of the
20549 newly created state.
20550 Adjust to initialize first_state and last_state if needed.
20551 Be sure to distinguish the initial from the final state.
20552 (new_states): Create the itemset of the initial state, and use
20553 new_state.
20554 * src/closure.c (closure): Now that the initial state has its
20555 items properly set, there is no need for a special case when
20556 creating `ruleset'.
20557
20558 As a result, now the rule 0, reducing to $axiom, is visible in the
20559 outputs. Adjust the test suite.
20560
20561 * tests/conflicts.at (Solved SR Conflicts)
20562 (Unresolved SR Conflicts): Adjust.
20563 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
20564 * tests/conflicts.at (S/R in initial): New.
20565
20566 2002-04-07 Akim Demaille <akim@epita.fr>
20567
20568 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
20569 the RHS of the rules.
20570 * src/output.c (output_gram): Likewise.
20571
20572 2002-04-07 Akim Demaille <akim@epita.fr>
20573
20574 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
20575 bucket.
20576 Adjust all dependencies.
20577 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
20578 `number' of the buckets too.
20579 * src/gram.h: Include `symtab.h'.
20580 (associativity): Move to...
20581 * src/symtab.h: here.
20582 No longer include `gram.h'.
20583
20584 2002-04-07 Akim Demaille <akim@epita.fr>
20585
20586 * src/gram.h, src/gram.c (rules_rhs_length): New.
20587 (ritem_longest_rhs): Use it.
20588 * src/gram.h (rule_t): `number' is a new member.
20589 * src/reader.c (packgram): Set it.
20590 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
20591 the end of `rules', and count them out of `nrules'.
20592 (reduce_output, dump_grammar): Adjust.
20593 * src/print.c (print_grammar): It is no longer needed to check for
20594 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
20595 * tests/reduce.at (Reduced Automaton): New test.
20596
20597 2002-04-07 Akim Demaille <akim@epita.fr>
20598
20599 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
20600 lacking `+ 1' to nrules, Bison reported as useless a token if it
20601 was used solely to set the precedence of the last rule...
20602
20603 2002-04-07 Akim Demaille <akim@epita.fr>
20604
20605 * data/bison.c++, data/bison.simple: Don't output the current file
20606 name in #line, to avoid useless diffs between two identical
20607 outputs under different names.
20608
20609 2002-04-07 Akim Demaille <akim@epita.fr>
20610
20611 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
20612 Normalize loops to using `< nrules + 1', not `<= nrules'.
20613
20614 2002-04-07 Akim Demaille <akim@epita.fr>
20615
20616 * TODO: Update.
20617
20618 2002-04-07 Akim Demaille <akim@epita.fr>
20619
20620 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
20621 bucket.value as bucket.number.
20622
20623 2002-04-07 Akim Demaille <akim@epita.fr>
20624
20625 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
20626 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
20627 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
20628 RHS, instead of being an index in RITEMS.
20629
20630 2002-04-04 Paul Eggert <eggert@twinsun.com>
20631
20632 * doc/bison.texinfo: Update copyright date.
20633 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
20634 (Symbols): Warn about running Bison in one character set,
20635 but compiling and/or running in an incompatible one.
20636 Warn about character code 256, too.
20637
20638 2002-04-03 Paul Eggert <eggert@twinsun.com>
20639
20640 * src/bison.data (YYSTACK_ALLOC): Depend on whether
20641 YYERROR_VERBOSE is nonzero, not whether it is defined.
20642
20643 Merge changes from bison-1_29-branch.
20644
20645 2002-03-20 Paul Eggert <eggert@twinsun.com>
20646
20647 Merge fixes from Debian bison_1.34-1.diff.
20648
20649 * configure.in (AC_PREREQ): 2.53.
20650
20651 2002-03-20 Akim Demaille <akim@epita.fr>
20652
20653 * src/conflicts.c (log_resolution): Argument `resolution' is const.
20654
20655 2002-03-19 Paul Eggert <eggert@twinsun.com>
20656
20657 * src/bison.simple (YYCOPY): New macro.
20658 (YYSTACK_RELOCATE): Use it.
20659 Remove Type arg; no longer needed. All callers changed.
20660 (yymemcpy): Remove; no longer needed.
20661
20662 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
20663 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
20664
20665 2002-03-19 Akim Demaille <akim@epita.fr>
20666
20667 Test and fix the #line outputs.
20668
20669 * tests/atlocal.at (GCC): New.
20670 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
20671 (Prologue synch line, %union synch line, Postprologue synch line)
20672 (Action synch line, Epilogue synch line): New tests.
20673 * src/reader.c (parse_union_decl): Define the muscle stype_line.
20674 * data/bison.simple, data/bison.c++: Use it.
20675
20676 2002-03-19 Akim Demaille <akim@epita.fr>
20677
20678 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
20679 (Solved SR Conflicts, %expect not enough, %expect right)
20680 (%expect too much): Move to...
20681 * tests/conflicts.at: this new file.
20682
20683 2002-03-19 Akim Demaille <akim@epita.fr>
20684
20685 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
20686 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
20687 that we can move to enums for instance.
20688 * src/output.c (token_definitions_output): Output a list of
20689 `token-name, token-number' instead of the #define.
20690 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
20691
20692 2002-03-14 Akim Demaille <akim@epita.fr>
20693
20694 Use Gettext 0.11.1.
20695
20696 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
20697
20698 * data/bison.c++: Make the user able to add members to the generated
20699 parser by subclassing.
20700
20701 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
20702
20703 * src/reader.c (read_additionnal_code): `c' should be an integer, not
20704 a character.
20705 Reported by Nicolas Tisserand and Nicolas Burrus.
20706
20707 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20708
20709 * src/reader.c: Warn about lacking semi-colons, do not complain.
20710
20711 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20712
20713 * data/bison.c++: Remove a debug line.
20714
20715 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20716
20717 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
20718 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
20719 provide a default implementation.
20720
20721 2002-03-04 Akim Demaille <akim@epita.fr>
20722
20723 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
20724 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
20725 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
20726 * tests/semantic.at (Parsing Guards): Similarly.
20727 * src/reader.at (readgram): Complain if the last rule is not ended
20728 with a semi-colon.
20729
20730 2002-03-04 Akim Demaille <akim@epita.fr>
20731
20732 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
20733 * src/closure.c: here.
20734 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
20735 RTC.
20736 * src/warshall.h, src/warshall.c: Remove.
20737 * tests/sets.at (Broken Closure): Adjust.
20738
20739 2002-03-04 Akim Demaille <akim@epita.fr>
20740
20741 * src/output.c (output_skeleton): tempdir is const.
20742 bytes_read is unused.
20743
20744 2002-03-04 Akim Demaille <akim@epita.fr>
20745
20746 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20747 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
20748 Update.
20749 From Michael Hayes.
20750
20751 2002-03-04 Akim Demaille <akim@epita.fr>
20752
20753 * src/closure.c (closure): `r' is unused.
20754
20755 2002-03-04 Akim Demaille <akim@epita.fr>
20756
20757 * tests/sets.at (Broken Closure): Add the ending `;'.
20758 * src/reader.at (readgram): Complain if a rule is not ended with a
20759 semi-colon.
20760
20761 2002-03-04 Akim Demaille <akim@epita.fr>
20762
20763 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
20764 (count_sr_conflicts): Use bitset_count.
20765 * src/reduce.c (inaccessable_symbols): Ditto.
20766 (bits_size): Remove.
20767 * src/warshall.h, src/warshall.c: Convert to bitsetv.
20768
20769 2002-03-04 Akim Demaille <akim@epita.fr>
20770
20771 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
20772 * src/reduce.c: Remove the `bitset_zero's following the
20773 `bitset_create's, as now it is performed by the latter.
20774
20775 2002-03-04 Akim Demaille <akim@epita.fr>
20776
20777 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
20778 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
20779 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
20780 latest sources from Michael.
20781
20782 2002-03-04 Akim Demaille <akim@epita.fr>
20783
20784 * src/output.c (output): Don't free the grammar.
20785 * src/reader.c (grammar_free): New.
20786 * src/main.c (main): Call it and don't free symtab here.
20787
20788 2002-03-04 Akim Demaille <akim@epita.fr>
20789
20790 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
20791 before returning.
20792 Reported by Benoit Perrot.
20793
20794 2002-03-04 Akim Demaille <akim@epita.fr>
20795
20796 Use bitset operations when possible, not loops over bits.
20797
20798 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
20799 bitset_or.
20800 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
20801 * src/reduce.c (useless_nonterminals): Formatting changes.
20802 * src/warshall.c (TC): Use bitset_or.
20803
20804 2002-03-04 Akim Demaille <akim@epita.fr>
20805
20806 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
20807 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
20808 Ditto.
20809
20810 2002-03-04 Akim Demaille <akim@epita.fr>
20811
20812 * src/lalr.c (F): Now a bitset*.
20813 Adjust all dependencies.
20814
20815 2002-03-04 Akim Demaille <akim@epita.fr>
20816
20817 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
20818 Adjust all dependencies.
20819
20820 2002-03-04 Akim Demaille <akim@epita.fr>
20821
20822 * src/L0.c, src/LR0.h (nstates): Be size_t.
20823 Adjust comparisons (signed vs unsigned).
20824 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
20825 bitset*.
20826 Adjust all dependencies.
20827
20828 2002-03-04 Akim Demaille <akim@epita.fr>
20829
20830 * src/closure.c (firsts): Now, also a bitset.
20831 Adjust all dependencies.
20832 (varsetsize): Remove, now unused.
20833 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
20834
20835 2002-03-04 Akim Demaille <akim@epita.fr>
20836
20837 * src/print.c: Convert to use bitset.h, not hand coded iterations
20838 over ints.
20839
20840 2002-03-04 Akim Demaille <akim@epita.fr>
20841
20842 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
20843
20844 2002-03-04 Akim Demaille <akim@epita.fr>
20845
20846 * src/closure.c (ruleset): Be a bitset.
20847 (rulesetsize): Remove.
20848
20849 2002-03-04 Akim Demaille <akim@epita.fr>
20850
20851 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20852 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
20853 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
20854 * src/closure.c (fderives): Be an array of bitsets.
20855
20856 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
20857
20858 * data/bison.c++: Merge the two generated headers. Insert a copyright
20859 notice in each output file.
20860
20861 2002-02-28 Akim Demaille <akim@epita.fr>
20862
20863 * data/bison.c++: Copy the prologue of bison.simple to fetch
20864 useful M4 definitions, such as b4_header_guard.
20865
20866 2002-02-25 Akim Demaille <akim@epita.fr>
20867
20868 * src/getargs.c (version): Give the name of the authors, and use a
20869 translator friendly scheme for the bgr
20870 copyright notice.
20871
20872 2002-02-25 Akim Demaille <akim@epita.fr>
20873
20874 * src/output.c (header_output): Remove, now handled completely via
20875 M4.
20876
20877 2002-02-25 Akim Demaille <akim@epita.fr>
20878
20879 * m4/m4.m4: New, from CVS Autoconf.
20880 * configure.in: Invoke it.
20881 * src/output.c (output_skeleton): Use its result instead of the
20882 hard coded name.
20883
20884 2002-02-25 Akim Demaille <akim@epita.fr>
20885
20886 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
20887 Fileutils 4.1.5.
20888 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
20889 * src/output.c (output_skeleton): Use mkstemp to create a real
20890 temporary file.
20891 Move the filling of `skeleton' and its muscle to...
20892 (prepare): here.
20893 (output): Move the definition of the prologue muscle to...
20894 (prepare): here.
20895 * src/system.h (DEFAULT_TMPDIR): New.
20896
20897 2002-02-14 Paul Eggert <eggert@twinsun.com>
20898
20899 Remove the support for C++ namespace cleanliness; it was
20900 causing more problems than it was curing, since it didn't work
20901 properly on some nonstandard C++ compilers. This can wait
20902 for a proper C++ parser.
20903
20904 * NEWS: Document this.
20905 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
20906 of C++, as it's treated like C now.
20907 * src/bison.simple (YYSTD): Remove.
20908 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
20909 Treat C++ just like Standard C instead of trying to support
20910 namespace cleanliness.
20911
20912 2002-02-14 Akim Demaille <akim@epita.fr>
20913
20914 * tests/regression.at (else): Adjust to Andreas' change.
20915
20916 2002-02-14 Akim Demaille <akim@epita.fr>
20917
20918 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
20919
20920 2002-02-13 Andreas Schwab <schwab@suse.de>
20921
20922 * src/output.c (output_rule_data): Don't output NULL, it might
20923 not be defined yet.
20924
20925 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
20926
20927 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
20928 (Copyright notice): Update.
20929
20930 2002-02-11 Akim Demaille <akim@epita.fr>
20931
20932 * tests/regression.at (%nonassoc and eof): Don't include
20933 nonportable headers.
20934
20935 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
20936
20937 * data/bison.c++: Correct error recovery. Make the user able to
20938 initialize the starting location.
20939
20940 2002-02-07 Akim Demaille <akim@epita.fr>
20941
20942 * tests/input.at: New.
20943
20944 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20945
20946 * data/bison.c++: Replace some direct m4 expansions by constants. Be
20947 more consistent when naming methods and variables. Put preprocessor
20948 directives around tables only needed for debugging.
20949
20950 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20951
20952 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
20953 C++ parsers.
20954 (yy::b4_name::parse): Use print_.
20955
20956 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20957
20958 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
20959
20960 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20961
20962 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
20963 C++ parsers.
20964 (yy::b4_name::parse): Build verbose error messages, and use error_.
20965
20966 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20967
20968 * data/bison.c++: Fix m4 quoting in comments.
20969
20970 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20971
20972 * data/bison.c++: Adjust the parser code. Fix some muscles that were
20973 not expanded by m4.
20974
20975 2002-02-05 Akim Demaille <akim@epita.fr>
20976
20977 * data/bison.c++: Adjust to the M4 back end.
20978 More is certainly needed.
20979
20980 2002-02-05 Akim Demaille <akim@epita.fr>
20981
20982 Give a try to M4 as a back end.
20983
20984 * lib/readpipe.c: New, from wdiff.
20985 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
20986 BISON_HAIRY.
20987 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
20988 specific values. Now it is m4 that performs the lookup.
20989 * src/parse-skel.y: Remove.
20990 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
20991 * src/output.c (actions_output, guards_output)
20992 (token_definitions_output): No longer keeps track of the output
20993 line number, hence remove the second argument.
20994 (guards_output): Check against the guard member of a rule, not the
20995 action member.
20996 Adjust callers.
20997 (output_skeleton): Don't look for the skeleton location, let m4 do
20998 that.
20999 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
21000 file will be used.
21001 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
21002 (prepare): Given that for the time being changesyntax is not
21003 usable in M4, rename the muscles using `-' to `_'.
21004 Define `defines_flag', `output_parser_name' and `output_header_name'.
21005 * src/output.h (actions_output, guards_output)
21006 (token_definitions_output): Adjust prototypes.
21007 * src/scan-skel.l: Instead of scanning the skeletons, it now
21008 processes the output of m4: `__oline__' and `#output'.
21009 * data/bison.simple: Adjust to be used by M4(sugar).
21010 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
21011 to date.
21012 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
21013 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
21014 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
21015 shamelessly stolen from CVS Autoconf.
21016
21017 2002-02-05 Akim Demaille <akim@epita.fr>
21018
21019 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
21020 * configure.in: Check for the declarations of free and malloc.
21021 * src/muscle_tab.c: Adjust.
21022
21023 2002-02-05 Akim Demaille <akim@epita.fr>
21024
21025 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
21026 which have no values.
21027
21028 2002-02-05 Akim Demaille <akim@epita.fr>
21029
21030 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
21031 * data/: here.
21032
21033 2002-01-29 Paul Eggert <eggert@twinsun.com>
21034
21035 * src/bison.simple (YYSIZE_T): Do not define merely because
21036 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
21037 On some platforms, <alloca.h> does not declare YYSTD (size_t).
21038
21039 2002-01-27 Akim Demaille <akim@epita.fr>
21040
21041 Fix `%nonassoc and eof'.
21042
21043 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
21044 which were not properly copied! Replace
21045 memcpy (res->errs, src->errs, src->nerrs);
21046 with
21047 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
21048 !!!
21049 * tests/regression.at (%nonassoc and eof): Adjust to newest
21050 Autotest: `.' is not in the PATH.
21051
21052 2002-01-27 Akim Demaille <akim@epita.fr>
21053
21054 * tests/sets.at (AT_EXTRACT_SETS): New.
21055 (Nullable): Use it.
21056 (Firsts): New.
21057
21058 2002-01-26 Akim Demaille <akim@epita.fr>
21059
21060 * tests/actions.at, tests/calc.at, tests/headers.at,
21061 * tests/torture.at: Adjust to the newest Autotest which no longer
21062 forces `.' in the PATH.
21063
21064 2002-01-25 Akim Demaille <akim@epita.fr>
21065
21066 * tests/regression.at (%nonassoc and eof): New.
21067 Suggested by Robert Anisko.
21068
21069 2002-01-24 Akim Demaille <akim@epita.fr>
21070
21071 Bison dumps core when trying to complain about broken input files.
21072 Reported by Cris van Pelt.
21073
21074 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
21075 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
21076 into...
21077 (Invalid inputs): Strengthen: exercise parse_percent_token.
21078
21079 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
21080
21081 * src/Makefile.am: Add bison.c++.
21082 * src/bison.c++: New skeleton.
21083
21084 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
21085
21086 * po/it.po: New.
21087
21088 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
21089
21090 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
21091
21092 2002-01-20 Marc Autret <marc@gnu.org>
21093
21094 * src/files.c (compute_output_file_names): Fix
21095
21096 2002-01-20 Marc Autret <marc@gnu.org>
21097
21098 * tests/output.at: New test.
21099 * src/files.c (compute_base_names): Don't map extensions when
21100 the YACC flag is set, use defaults.
21101 Reported by Evgeny Stambulchik.
21102
21103 2002-01-20 Marc Autret <marc@gnu.org>
21104
21105 * src/system.h: Need to define __attribute__ away for non-GCC
21106 compilers as well (i.e., the vendor C compiler).
21107 Suggested by Albert Chin-A-Young.
21108
21109 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
21110
21111 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
21112 canonical definition.
21113 * src/system.h: Use the canonical definition for PARAMS (avoids
21114 a conflict with the macro from lib/hash.h).
21115
21116 2002-01-11 Akim Demaille <akim@epita.fr>
21117
21118 * configure.in: Use AC_FUNC_STRNLEN.
21119 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
21120
21121 2002-01-09 Akim Demaille <akim@epita.fr>
21122
21123 * src/files.c, src/files.h (output_infix): New.
21124 (tab_extension): Remove.
21125 (compute_base_names): Compute the former, drop the latter.
21126 * src/output.c (prepare): Insert the muscles `output-infix', and
21127 `output-suffix'.
21128 * src/parse-skel.y (string, string.1): New.
21129 (section.header): Use it.
21130 (section.yacc): Remove.
21131 (prefix): Remove too.
21132 * src/scan-skel.l: Adjust.
21133 * src/bison.simple, src/bison.hairy: Adjust.
21134
21135 2002-01-09 Akim Demaille <akim@epita.fr>
21136
21137 * configure.in (WERROR_CFLAGS): Compute it.
21138 * src/Makefile.am (CFLAGS): Pass it.
21139 * tests/atlocal.in (CFLAGS): Idem.
21140 * src/files.c: Fix a few warnings.
21141 (get_extension_index): Remove, unused.
21142
21143 2002-01-08 Akim Demaille <akim@epita.fr>
21144
21145 * src/getargs.c (AS_FILE_NAME): New.
21146 (getargs): Use it to convert DOSish file names.
21147 * src/files.c (base_name): Rename as full_base_name to avoid
21148 clashes with `base_name ()'.
21149 (filename_split): New.
21150 (compute_base_names): N-th rewrite, using filename_split.
21151
21152 2002-01-08 Akim Demaille <akim@epita.fr>
21153
21154 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
21155 New, stolen from the Fileutils 4.1.
21156 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
21157 * configure.in: Check for the presence of memrchr, and of its
21158 prototype.
21159
21160 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
21161
21162 * lib/hash.h (__P): Added definition for this macro.
21163 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
21164 BUILT_SOURCES, to ensure they are generated first.
21165 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
21166 %error-verbose to allow bootstrapping with bison 1.30x.
21167
21168 2002-01-06 Akim Demaille <akim@epita.fr>
21169
21170 * src/reader.c (parse_braces): Don't fetch the next char, the
21171 convention is to fetch on entry.
21172 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
21173 'switch' without a following semicolon.
21174 * tests/regression.at (braces parsing): New.
21175
21176 2002-01-06 Akim Demaille <akim@epita.fr>
21177
21178 Bison is dead wrong in its RR conflict reports.
21179
21180 * tests/torture.at (GNU Cim Grammar): New.
21181 * src/conflicts.c (count_rr_conflicts): Fix.
21182
21183 2002-01-06 Akim Demaille <akim@epita.fr>
21184
21185 Creating package.m4 from configure.ac causes too many problems.
21186
21187 * tests/Makefile.am (package.m4): Create it by hand,
21188 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
21189
21190 2002-01-06 Akim Demaille <akim@epita.fr>
21191
21192 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
21193 skeleton.h.
21194
21195 2002-01-04 Paul Eggert <eggert@twinsun.com>
21196
21197 * doc/bison.texinfo (Debugging):
21198 Remove YYSTDERR; it's no longer defined or used.
21199 Also, s/cstdio.h/cstdio/.
21200
21201 2002-01-03 Akim Demaille <akim@epita.fr>
21202
21203 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
21204
21205 2002-01-03 Akim Demaille <akim@epita.fr>
21206
21207 * src/parse-skel.y (process_skeleton): Don't bind the parser's
21208 tracing code to --trace, wait for a better --trace option, with
21209 args.
21210
21211 2002-01-03 Akim Demaille <akim@epita.fr>
21212
21213 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
21214 The ISO C++ standard is extremely clear about it: stderr is
21215 considered a macro, not a regular symbol (see table 94 `Header
21216 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
21217 Therefore std:: does not apply to it. It still does with fprintf.
21218 Also, s/cstdio.h/cstdio/.
21219
21220 2002-01-03 Akim Demaille <akim@epita.fr>
21221
21222 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
21223 for non system headers.
21224
21225 2002-01-02 Akim Demaille <akim@epita.fr>
21226
21227 Equip the skeleton chain with location tracking, runtime trace,
21228 pure parser and scanner.
21229
21230 * src/parse-skel.y: Request a pure parser, locations, and prefix
21231 renaming.
21232 (%union): Having several members with the same type does not help
21233 type mismatches, simplify.
21234 (YYPRINT, yyprint): New.
21235 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
21236 (skel_error): this.
21237 Handle locations.
21238 * src/scan-skel.l: Adjust to these changes.
21239 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
21240 (LOCATION_PRINT, skel_control_t): New.
21241
21242 2001-12-30 Akim Demaille <akim@epita.fr>
21243
21244 * src/parse-skel.y: Get rid of the shift/reduce conflict:
21245 replace `gb' with BLANKS.
21246 * src/scan-skel.l: Adjust.
21247
21248 2001-12-30 Akim Demaille <akim@epita.fr>
21249
21250 * src/system.h: We don't need nor want bcopy.
21251 Throw away MS-DOS crap: we don't need getpid.
21252 * configure.in: We don't need strndup. It was even causing
21253 problems: because Flex includes the headers *before* us,
21254 _GNU_SOURCE is not defined by config.h, and therefore strndup was
21255 not visible.
21256 * lib/xstrndup.c: New.
21257 * src/scan-skel.l: Use it.
21258 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
21259 * src/parse-skel.y: Use %directives instead of #defines.
21260
21261 2001-12-30 Akim Demaille <akim@epita.fr>
21262
21263 * src/skeleton.h: New.
21264 * src/output.c (output_parser, output_master_parser): Remove, dead
21265 code.
21266 * src/output.h (get_lines_number, actions_output, guards_output)
21267 (token_definitions_output): Prototype them.
21268 * src/parse-skel.y: Add the license notice.
21269 Include output.h and skeleton.h.
21270 (process_skeleton): Returns void, and takes a single parameter.
21271 * src/scan-skel.l: Add the license notice.
21272 Include skeleton.h.
21273 Don't use %option yylineno: it seems that then Flex imagines
21274 REJECT has been used, and therefore it won't reallocate its
21275 buffers (which makes no other sense to me than a bug). It results
21276 in warnings for `unused: yy_flex_realloc'.
21277
21278 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
21279
21280 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
21281 (MUSCLE_INSERT_PREFIX): ...to there.
21282 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
21283 (MUSCLE_INSERT_PREFIX): Move from here...
21284
21285 * src/bison.hairy: Add a section directive. Put braces around muscle
21286 names. This parser skeleton is still broken, but Bison should not
21287 choke on a bad muscle 'syntax'.
21288 * src/bison.simple: Add a section directive. Put braces around muscle
21289 names.
21290
21291 * src/files.h (strsuffix, stringappend): Add declarations.
21292 (tab_extension): Add declaration.
21293 (short_base_name): Add declaration.
21294
21295 * src/files.c (strsuffix, stringappend): No longer static. These
21296 functions are used in the skeleton parser.
21297 (tab_extension): New.
21298 (compute_base_names): Use the computations done in this function
21299 to guess if the generated parsers should have '.tab' in their
21300 names.
21301 (short_base_name): No longer static.
21302
21303 * src/output.c (output_skeleton): New.
21304 (output): Disable call to output_master_parser, and give a try to
21305 a new skeleton handling system.
21306 (guards_output, actions_output): No longer static.
21307 (token_definitions_output, get_lines_number): No longer static.
21308
21309 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
21310
21311 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
21312 parse-skel.y.
21313
21314 * src/parse-skel.y: New file.
21315 * src/scan-skel.l: New file.
21316
21317 2001-12-29 Akim Demaille <akim@epita.fr>
21318
21319 %name-prefix is broken.
21320
21321 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
21322 Adjust all dependencies.
21323 * tests/headers.at (export YYLTYPE): Strengthen this test: use
21324 %name-prefix.
21325
21326 Renaming yylval but not yylloc is not consistent. Now we do.
21327
21328 * src/bison.simple: Prefix yylloc if used.
21329 * doc/bison.texinfo (Decl Summary): Document that.
21330
21331 2001-12-29 Akim Demaille <akim@epita.fr>
21332
21333 * doc/bison.texinfo: Promote `%long-directive' over
21334 `%long_directive'.
21335 Remove all references to fixed-output-files, yacc is enough.
21336
21337 2001-12-29 Akim Demaille <akim@epita.fr>
21338
21339 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
21340 user prologue. These are defaults.
21341 * tests/actions.at (Mid-rule actions): Make sure the user can
21342 define YYDEBUG and YYERROR_VERBOSE.
21343
21344 2001-12-29 Akim Demaille <akim@epita.fr>
21345
21346 * src/output.c (header_output): Don't forget to export YYLTYPE and
21347 yylloc.
21348 * tests/headers.at (export YYLTYPE): New, make sure it does.
21349 * tests/regression.at (%union and --defines, Invalid CPP headers):
21350 Move to...
21351 * tests/headers.at: here.
21352
21353 2001-12-29 Akim Demaille <akim@epita.fr>
21354
21355 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
21356
21357 2001-12-29 Akim Demaille <akim@epita.fr>
21358
21359 * tests/actions.at (Mid-rule actions): Output on a single line
21360 instead of several.
21361
21362 2001-12-29 Akim Demaille <akim@epita.fr>
21363
21364 * doc/bison.texinfo: Formatting changes.
21365
21366 2001-12-29 Akim Demaille <akim@epita.fr>
21367
21368 Don't store the token defs in a muscle, just be ready to output it
21369 on command. Now possible via `symbols'. Fixes a memory leak.
21370
21371 * src/output.c (token_definitions_output): New.
21372 (output_parser, header_output): Use it.
21373 * src/reader.c (symbols_save): Remove.
21374
21375 2001-12-29 Akim Demaille <akim@epita.fr>
21376
21377 * src/bison.simple: Do not provide a default for YYSTYPE and
21378 YYLTYPE before the user's prologue. Otherwise it's hardly... a
21379 default.
21380
21381 2001-12-29 Akim Demaille <akim@epita.fr>
21382
21383 Mid-rule actions are simply... ignored!
21384
21385 * src/reader.c (readgram): Be sure to attach mid-rule actions to
21386 the empty-rule associated to the dummy symbol, not to the host
21387 rule.
21388 * tests/actions.at (Mid-rule actions): New.
21389
21390 2001-12-29 Akim Demaille <akim@epita.fr>
21391
21392 Memory leak.
21393
21394 * src/reader.c (reader): Free grammar.
21395
21396 2001-12-29 Akim Demaille <akim@epita.fr>
21397
21398 Memory leak.
21399
21400 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
21401 since it allocates it for each state, although only one is needed.
21402 (allocate_storage): Do it here.
21403
21404 2001-12-29 Akim Demaille <akim@epita.fr>
21405
21406 * src/options.h, src/options.c (create_long_option_table): Rename
21407 as...
21408 (long_option_table_new): this, with a clearer prototype.
21409 (percent_table): Remove, unused,
21410 * src/getargs.c (getargs): Adjust.
21411
21412 2001-12-29 Akim Demaille <akim@epita.fr>
21413
21414 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
21415 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
21416 as states.
21417
21418 2001-12-29 Akim Demaille <akim@epita.fr>
21419
21420 * src/lalr.c (build_relations): Rename `states' as `states1'.
21421 Sorry, I don't understand exactly what it is, no better name...
21422
21423 2001-12-29 Akim Demaille <akim@epita.fr>
21424
21425 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
21426 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
21427 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
21428 as rules.
21429
21430 2001-12-29 Akim Demaille <akim@epita.fr>
21431
21432 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
21433 ago.
21434
21435 2001-12-29 Akim Demaille <akim@epita.fr>
21436
21437 * src/reader.c, src/reader.h (user_toknums): Remove.
21438 Adjust all users to use symbols[i]->user_token_number.
21439
21440 2001-12-29 Akim Demaille <akim@epita.fr>
21441
21442 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
21443 Adjust all users to use symbols[i]->prec or ->assoc.
21444
21445 2001-12-29 Akim Demaille <akim@epita.fr>
21446
21447 * src/reader.c, src/reader.h (tags): Remove.
21448 Adjust all users to use symbols[i]->tag.
21449
21450 2001-12-29 Akim Demaille <akim@epita.fr>
21451
21452 * src/gram.h, src/gram.c (symbols): New, similar to state_table
21453 and rule_table.
21454 * src/reader.c (packsymbols): Fill this table.
21455 Drop sprec.
21456 * src/conflicts.c (resolve_sr_conflict): Adjust.
21457 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
21458 single table.
21459 Use symbols[i]->tag instead of tags[i].
21460
21461 2001-12-29 Akim Demaille <akim@epita.fr>
21462
21463 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
21464 In addition, put a comment in there, to replace...
21465 * tests/regression.at (%union and C comments): Remove.
21466
21467 2001-12-29 Akim Demaille <akim@epita.fr>
21468
21469 * tests/regression.at (Web2c Actions): Blindly move the actual
21470 output as expected output. The contents *seem* right to me, but I
21471 can't pretend reading perfectly parser tables... Nonetheless, all
21472 the other tests pass correctly, the table look OK, even though the
21473 presence of `$axiom' is to be noted: AFAICS it is useless (but
21474 harmless).
21475
21476 2001-12-29 Akim Demaille <akim@epita.fr>
21477
21478 * src/reader.c (readgram): Don't add the rule 0 if there were no
21479 rules read. In other words, add it _after_ having performed
21480 grammar sanity checks.
21481 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
21482
21483 2001-12-29 Akim Demaille <akim@epita.fr>
21484
21485 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
21486 visible, and some states have now a different number.
21487
21488 2001-12-29 Akim Demaille <akim@epita.fr>
21489
21490 * src/reader.c (readgram): Bind the initial rule's lineno to that
21491 of the first rule.
21492 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
21493 (Solved SR Conflicts): Adjust rule 0's line number.
21494
21495 2001-12-29 Akim Demaille <akim@epita.fr>
21496
21497 Fix the `GAWK Grammar' failure.
21498
21499 * src/LR0.c (final_state): Initialize to -1 so that we do compute
21500 the reductions of the first state which was mistakenly confused
21501 with the final state because precisely final_state was initialized
21502 to 0.
21503 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
21504 now noticed by Bison.
21505 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
21506 have a reduction on $default.
21507
21508 2001-12-29 Akim Demaille <akim@epita.fr>
21509
21510 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
21511 rule line numbers.
21512 * src/closure.c (print_closure): Likewise.
21513 * src/derives.c (print_derives): Likewise.
21514 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
21515 now.
21516
21517 2001-12-29 Akim Demaille <akim@epita.fr>
21518
21519 * src/lalr.c (lookaheads_print): New.
21520 (lalr): Call it when --trace-flag.
21521 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
21522 are dumped.
21523
21524 2001-12-29 Akim Demaille <akim@epita.fr>
21525
21526 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
21527 when walking through ritem, even via rule->rhs.
21528 * src/reduce.c (dump_grammar, useful_production, reduce_output)
21529 (useful_production, useless_nonterminals): Likewise.
21530 (reduce_grammar_tables): Likewise, plus update nritems.
21531 * src/nullable.c (set_nullable): Likewise.
21532 * src/lalr.c (build_relations): Likewise.
21533 * tests/sets.at (Nullable): Adjust.
21534 Fortunately, now, the $axiom is no longer nullable.
21535
21536 2001-12-29 Akim Demaille <akim@epita.fr>
21537
21538 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
21539 the 0-sentinel.
21540 * src/gram.c (ritem_longest_rhs): Likewise.
21541 * src/reduce.c (nonterminals_reduce): Likewise.
21542 * src/print_graph.c (print_graph): Likewise.
21543 * src/output.c (output_rule_data): Likewise.
21544 * src/nullable.c (set_nullable): Likewise.
21545
21546 2001-12-29 Akim Demaille <akim@epita.fr>
21547
21548 * src/output.c: Comment changes.
21549
21550 2001-12-27 Paul Eggert <eggert@twinsun.com>
21551
21552 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
21553 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
21554 Sparc, as they were causing more porting problems than the
21555 (minor) performance improvement was worth.
21556
21557 Also, catch up with 1.31's YYSTD.
21558
21559 2001-12-27 Akim Demaille <akim@epita.fr>
21560
21561 * src/output.c (output_gram): Rely on nritems, not the
21562 0-sentinel. See below.
21563 Use -1 as separator, not 0.
21564 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
21565 Rely on -1 as separator in yyrhs, instead of 0.
21566 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
21567 twice `Now at end of input', therefore there are two lines less to
21568 expect.
21569
21570 2001-12-27 Akim Demaille <akim@epita.fr>
21571
21572 * tests/regression.at (Unresolved SR Conflicts):
21573 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
21574 below.
21575
21576 2001-12-27 Akim Demaille <akim@epita.fr>
21577
21578 * src/LR0.c (new_state): Recognize the final state by the fact it
21579 is reached by eoftoken.
21580 (insert_start_shifting_state, insert_eof_shifting_state)
21581 (insert_accepting_state, augment_automaton): Remove, since now
21582 these states are automatically computed from the initial state.
21583 (generate_states): Adjust.
21584 * src/print.c: When reporting a rule number to the user, substract
21585 1, so that the axiom rule is rule 0, and the first user rule is 1.
21586 * src/reduce.c: Likewise.
21587 * src/print_graph.c (print_core): For the time being, just as for
21588 the report, depend upon --trace-flags to dump the full set of
21589 items.
21590 * src/reader.c (readgram): Once the grammar read, insert the rule
21591 0: `$axiom: START-SYMBOL $'.
21592 * tests/set.at: Adjust: rule 0 is now displayed, and since the
21593 number of the states has changed (the final state is no longer
21594 necessarily the last), catch up.
21595
21596 2001-12-27 Akim Demaille <akim@epita.fr>
21597
21598 Try to make the use of the eoftoken valid. Given that its value
21599 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
21600 is used instead of > 0 where appropriate, (ii), depend upon nritems
21601 instead of the 0-sentinel.
21602
21603 * src/gram.h, src/gram.c (nritems): New.
21604 Expected to be duplication of nitems, but for the time being...
21605 * src/reader.c (packgram): Assert nritems and nitems are equal.
21606 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
21607 * src/closure.c (print_closure, print_fderives): Likewise.
21608 * src/gram.c (ritem_print): Likewise.
21609 * src/print.c (print_core, print_grammar): Likewise.
21610 * src/print_graph.c: Likewise.
21611
21612 2001-12-27 Akim Demaille <akim@epita.fr>
21613
21614 * src/main.c (main): If there are complains after grammar
21615 reductions, then output the report anyway if requested, then die.
21616 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
21617 * src/reader.c (eoftoken): New.
21618 (parse_token_decl): If the token being defined has value `0', it
21619 is the eoftoken.
21620 (packsymbols): No longer hack `tags' to insert `$' by hand.
21621 Be sure to preserve the value of the eoftoken.
21622 (reader): Make sure eoftoken is defined.
21623 Initialize nsyms to 0: now eoftoken is created just like the others.
21624 * src/print.c (print_grammar): Don't special case the eof token.
21625 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
21626 lie anyway, albeit pleasant.
21627 * tests/calc.at: Exercise error messages with eoftoken.
21628 Change the grammar so that empty input is invalid.
21629 Adjust expectations.
21630 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
21631
21632 2001-12-27 Akim Demaille <akim@epita.fr>
21633
21634 * configure.in: Check the protos of strchr ans strspn.
21635 Replace strchr if needed.
21636 * src/system.h: Provide the protos of strchr, strspn and memchr if
21637 missing.
21638 * lib/strchr.c: New.
21639 * src/reader.c (symbols_save): Use strchr.
21640
21641 2001-12-27 Akim Demaille <akim@epita.fr>
21642
21643 * src/print.c, src/print_graph.c (escape): New.
21644 Use it to quote the TAGS outputs.
21645 * src/print_graph.c (print_state): Now errors are in red, and
21646 reductions in green.
21647 Prefer high to wide: output the state number on a line of its own.
21648
21649 2001-12-27 Akim Demaille <akim@epita.fr>
21650
21651 * src/state.h, src/state.c (reductions_new): New.
21652 * src/LR0.c (set_state_table): Let all the states have a
21653 `reductions', even if reduced to 0.
21654 (save_reductions): Adjust.
21655 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
21656 * src/print.c (print_reductions, print_actions): Adjust.
21657 * src/output.c (action_row): Adjust.
21658
21659 2001-12-27 Akim Demaille <akim@epita.fr>
21660
21661 * src/state.h, src/state.c (errs_new, errs_dup): New.
21662 * src/LR0.c (set_state_table): Let all the states have an errs,
21663 even if reduced to 0.
21664 * src/print.c (print_errs, print_reductions): Adjust.
21665 * src/output.c (output_actions, action_row): Adjust.
21666 * src/conflicts.c (resolve_sr_conflict): Adjust.
21667
21668 2001-12-27 Akim Demaille <akim@epita.fr>
21669
21670 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
21671
21672 2001-12-27 Akim Demaille <akim@epita.fr>
21673
21674 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
21675 * src/print.c: here.
21676 (lookaheadset, shiftset): New, used as additional storage by
21677 print_reductions.
21678 (print_results): Adjust.
21679 (print_shifts, print_gotos, print_errs): New, extracted from...
21680 (print_actions): here.
21681 * src/print_graph.c (print_actions): Remove dead code.
21682
21683 2001-12-27 Akim Demaille <akim@epita.fr>
21684
21685 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
21686 `$n' and `@n'.
21687
21688 2001-12-27 Akim Demaille <akim@epita.fr>
21689
21690 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
21691 (build_relations): Adjust.
21692
21693 2001-12-27 Akim Demaille <akim@epita.fr>
21694
21695 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
21696 duplication.
21697
21698 2001-12-27 Akim Demaille <akim@epita.fr>
21699
21700 * src/reader.c (packgram): Catch nitems overflows.
21701
21702 2001-12-27 Akim Demaille <akim@epita.fr>
21703
21704 * src/files.c, src/files.h (guard_obstack): Remove.
21705 * src/output.c (output): Adjust.
21706 * src/reader.c (parse_braces): New, factoring...
21707 (copy_action, copy_guard): these two which are renamed as...
21708 (parse_action, parse_guard): these.
21709 As a voluntary consequence, using braces around guards is now
21710 mandatory.
21711
21712 2001-12-27 Akim Demaille <akim@epita.fr>
21713
21714 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
21715 * src/reader.c (symbol_list): `guard' and `guard_line' are new
21716 members.
21717 (symbol_list_new): Adjust.
21718 (copy_action): action_line is the first line, not the last.
21719 (copy_guard): Just as for actions, store the `action' only, not
21720 the switch/case/break flesh.
21721 Don't parse the user action that might follow the guard, let...
21722 (readgram): do it, i.e., now, there can be an action after a
21723 guard.
21724 In other words the guard is just explicitly optional.
21725 (packgram): Adjust.
21726 * src/output.c (guards_output): New.
21727 (output_parser): Call it when needed.
21728 (output): Also free the guard and attrs obstacks.
21729 * src/files.c, src/files.h (obstack_save): Remove.
21730 (output_files): Remove.
21731 As a result, if one needs the former `.act' file, using an
21732 appropriate skeleton which requires actions and guards is now
21733 required.
21734 * src/main.c (main): Adjust.
21735 * tests/semantic.at: New.
21736 * tests/regression.at: Use `input.y' as input file name.
21737 Avoid 8+3 problems by requiring input.c when the test needs the
21738 parser.
21739
21740 2001-12-27 Akim Demaille <akim@epita.fr>
21741
21742 * src/reader.c (symbol_list_new): Be sure to initialize all the
21743 fields.
21744
21745 2001-12-27 Akim Demaille <akim@epita.fr>
21746
21747 All the hacks using a final pseudo state are now useless.
21748
21749 * src/LR0.c (set_state_table): state_table holds exactly nstates.
21750 * src/lalr.c (nLA): New.
21751 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
21752 instead of lookaheadsp from the pseudo state (nstate + 1).
21753
21754 2001-12-27 Akim Demaille <akim@epita.fr>
21755
21756 * src/output.c (action_row, token_actions): Use a state_t instead
21757 of a integer, and nlookaheads instead of the following state's
21758 lookaheadsp.
21759
21760 2001-12-27 Akim Demaille <akim@epita.fr>
21761
21762 * src/conflicts.c (log_resolution, flush_shift)
21763 (resolve_sr_conflict, set_conflicts, solve_conflicts)
21764 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
21765 (conflicts_print, print_reductions): Use a state_t instead of an
21766 integer when referring to a state.
21767 As much as possible, depend upon nlookaheads, instead of the
21768 `lookaheadsp' member of the following state (since lookaheads of
21769 successive states are successive, the difference between state n + 1
21770 and n served as the number of lookaheads for state n).
21771 * src/lalr.c (add_lookback_edge): Likewise.
21772 * src/print.c (print_core, print_actions, print_state)
21773 (print_results): Likewise.
21774 * src/print_graph.c (print_core, print_actions, print_state)
21775 (print_graph): Likewise.
21776 * src/conflicts.h: Adjust.
21777
21778 2001-12-27 Akim Demaille <akim@epita.fr>
21779
21780 * src/bison.hairy: Formatting/comment changes.
21781 ANSIfy.
21782 Remove `register' indications.
21783 Add plenty of `static'.
21784
21785 2001-12-27 Akim Demaille <akim@epita.fr>
21786
21787 * src/output.c (prepare): Drop the muscle `ntbase' which
21788 duplicates ntokens.
21789 * src/bison.simple: Formatting/comment changes.
21790 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
21791 is an undocumented synonym.
21792
21793 2001-12-22 Akim Demaille <akim@epita.fr>
21794
21795 * src/output.c (output_table_data): Change the prototype to use
21796 `int' for array ranges: some invocations do pass an int, not a
21797 short.
21798 Reported by Wayne Green.
21799
21800 2001-12-22 Akim Demaille <akim@epita.fr>
21801
21802 Some actions of web2c.y are improperly triggered.
21803 Reported by Mike Castle.
21804
21805 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
21806 * tests/regression.at (Web2c): Rename as...
21807 (Web2c Report): this.
21808 (Web2c Actions): New.
21809
21810 2001-12-22 Akim Demaille <akim@epita.fr>
21811
21812 Reductions in web2c.y are improperly reported.
21813 Reported by Mike Castle.
21814
21815 * src/conflicts.c (print_reductions): Fix.
21816 * tests/regression.at (Web2c): New.
21817
21818 2001-12-18 Akim Demaille <akim@epita.fr>
21819
21820 Some host fail on `assert (!"foo")', which expands to
21821 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
21822 Reported by Nelson Beebee.
21823
21824 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
21825 `#define it_succeeded 0' and `assert (it_succeeded)'.
21826
21827 2001-12-17 Marc Autret <autret_m@epita.fr>
21828
21829 * src/bison.simple: Don't hard code the skeleton line and filename.
21830 * src/output.c (output_parser): Rename 'line' as 'output_line'.
21831 New line counter 'skeleton_line' (skeleton-line muscle).
21832
21833 2001-12-17 Paul Eggert <eggert@twinsun.com>
21834
21835 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
21836 YYDEBUG must be defined to a nonzero value.
21837
21838 * src/bison.simple (yytname): Do not assume that the user defines
21839 YYDEBUG to a properly parenthesized expression.
21840
21841 2001-12-17 Akim Demaille <akim@epita.fr>
21842
21843 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
21844 nlookaheads is a new member.
21845 Adjust all users.
21846 * src/lalr.h (nlookaheads): Remove this orphan declaration.
21847 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
21848 state.
21849
21850 2001-12-17 Akim Demaille <akim@epita.fr>
21851
21852 * src/files.h, src/files.c (open_files, close_files): Remove.
21853 * src/main.c (main): Don't open/close files, nor invoke lex_free,
21854 let...
21855 * src/reader.c (reader): Do it.
21856
21857 2001-12-17 Akim Demaille <akim@epita.fr>
21858
21859 * src/conflicts.c (print_reductions): Formatting changes.
21860
21861 2001-12-17 Akim Demaille <akim@epita.fr>
21862
21863 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
21864 (flush_reduce): New.
21865 (resolve_sr_conflict): Adjust.
21866
21867 2001-12-17 Akim Demaille <akim@epita.fr>
21868
21869 * src/output.c (output_obstack): Be static and rename as...
21870 (format_obstack): this, to avoid any confusion with files.c's
21871 output_obstack.
21872 * src/reader.h (muscle_obstack): Move to...
21873 * src/output.h: here, since it's defined in output.c.
21874
21875 2001-12-17 Akim Demaille <akim@epita.fr>
21876
21877 * src/output.c (action_row, save_column, default_goto)
21878 (sort_actions, matching_state, pack_vector): Better variable
21879 locality.
21880
21881 2001-12-17 Akim Demaille <akim@epita.fr>
21882
21883 * src/output.c: Various formatting changes.
21884
21885 2001-12-17 Akim Demaille <akim@epita.fr>
21886
21887 * src/files.c (output_files): Free the output_obstack.
21888 * src/main.c (main): Call print and print_graph conditionally.
21889 * src/print.c (print): Work unconditionally.
21890 * src/print_graph.c (print_graph): Work unconditionally.
21891 * src/conflicts.c (log_resolution): Output only if verbose_flag.
21892
21893 2001-12-16 Marc Autret <autret_m@epita.fr>
21894
21895 * src/output.c (actions_output): Fix. When we use %no-lines,
21896 there is one less line per action.
21897
21898 2001-12-16 Marc Autret <autret_m@epita.fr>
21899
21900 * src/bison.simple: Remove a useless #line directive.
21901 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
21902 * src/output.c (get_lines_number): New.
21903 (output_parser): Adjust, now takes care about the lines of a
21904 output muscles.
21905 Fix line numbering.
21906 (actions_output): Computes the number of lines taken by actions.
21907 (output_master_parser): Insert new skeleton which is the name of
21908 the output parser file name.
21909
21910 2001-12-15 Marc Autret <autret_m@epita.fr>
21911
21912 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
21913
21914 2001-12-15 Marc Autret <autret_m@epita.fr>
21915
21916 * src/output.c (output_gram): Keep track of the hairy one.
21917
21918 2001-12-15 Akim Demaille <akim@epita.fr>
21919
21920 Make `make distcheck' work.
21921
21922 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
21923 system.h which uses libgettext.h.
21924
21925 2001-12-15 Akim Demaille <akim@epita.fr>
21926
21927 * src/nullable.c (set_nullable): Useless rules must be skipped,
21928 otherwise, since we range over their symbols, we might look at a
21929 nonterminal which no longer ``exists'', i.e., it is not counted in
21930 `nvars', hence we overflow our arrays.
21931
21932 2001-12-15 Akim Demaille <akim@epita.fr>
21933
21934 The header can also be produced directly, without any obstack!
21935 Yahoo!
21936
21937 * src/files.c, src/files.h (defines_obstack): Remove.
21938 (compute_header_macro): Global.
21939 (defines_obstack_save): Remove.
21940 * src/reader.c (parse_union_decl): No longer output to
21941 defines_obstack: its content can be found in the `stype' muscle
21942 anyway.
21943 (output_token_translations): Merge into...
21944 (symbols_output): this.
21945 Rename as...
21946 (symbols_save): this.
21947 (reader): Adjust.
21948 * src/output.c (header_output): New.
21949 (output): Call it.
21950
21951 2001-12-15 Akim Demaille <akim@epita.fr>
21952
21953 * src/reader.c (parse_union_decl): Instead of handling two obstack
21954 simultaneously, use one to define the `stype' muscle, and use the
21955 value of the latter to fill defines_obstack.
21956 (copy_comment): Remove.
21957 (copy_comment2): Work for a single obstack.
21958 Rename as...
21959 (copy_comment): this.
21960
21961 2001-12-15 Akim Demaille <akim@epita.fr>
21962
21963 * src/lex.c, src/lex.h (xgetc): No longer static.
21964 * src/reader.c (parse_union_decl): Revamp.
21965
21966 2001-12-15 Akim Demaille <akim@epita.fr>
21967
21968 Still making progress in separating Bison into (i) input, (ii)
21969 process, (iii) output: now we can directly output the parser file
21970 without using table_obstack at all.
21971
21972 * src/files.c, src/files.h (table_obstack): Bye bye.
21973 (parser_file_name): New.
21974 * src/files.c (compute_output_file_names): Compute it.
21975 * src/output.c (actions_output, output_parser)
21976 (output_master_parser): To a file instead of an obstack.
21977
21978 2001-12-15 Akim Demaille <akim@epita.fr>
21979
21980 Attach actions to rules, instead of pre-outputting them to
21981 actions_obstack.
21982
21983 * src/gram.h (rule_t): action and action_line are new members.
21984 * src/reader.c (symbol_list): Likewise.
21985 (copy_action): Save the actions within the rule.
21986 (packgram): Save them in rule_table.
21987 * src/output.c (actions_output): New.
21988 (output_parser): Use it on `%%actions'.
21989 (output_rule_data): Don't free rule_table.
21990 (output): Do it.
21991 (prepare): Don't save the `action' muscle.
21992 * src/bison.simple: s/%%action/%%actions/.
21993
21994 2001-12-15 Akim Demaille <akim@epita.fr>
21995
21996 * src/reader.c (copy_action): When --yacc, don't append a `;'
21997 to the user action: let it fail if lacking.
21998 Suggested by Arnold Robbins and Tom Tromey.
21999
22000 2001-12-14 Akim Demaille <akim@epita.fr>
22001
22002 * src/lex.c (literalchar): Simply return the char you decoded, non
22003 longer mess around with obstacks and int pointers.
22004 Adjust all callers.
22005
22006 2001-12-14 Akim Demaille <akim@epita.fr>
22007
22008 * src/lex.c (literalchar): Don't escape the special characters,
22009 just decode them, and keep them as char (before, eol was output as
22010 the 2 char string `\n' etc.).
22011 * src/output.c (output_rule_data): Use quotearg to output the
22012 token strings.
22013
22014 2001-12-13 Paul Eggert <eggert@twinsun.com>
22015
22016 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
22017 Do not infringe on the global user namespace when using C++.
22018 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
22019 All uses of `fprintf' and `stderr' changed.
22020
22021 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
22022
22023 2001-12-13 Akim Demaille <akim@epita.fr>
22024
22025 The computation of nullable is broken: it doesn't handle empty
22026 RHS's properly.
22027
22028 * tests/torture.at (GNU AWK Grammar): New.
22029 * tests/sets.at (Nullable): New.
22030 * src/nullable.c (set_nullable): Instead of blindly looping over
22031 `ritems', loop over the rules, and then over their rhs's.
22032
22033 Work around Autotest bugs.
22034
22035 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
22036 frame, because Autotest understand lines starting with a `+' as
22037 traces from the shell. Then, they are not processed properly.
22038 Admittedly an Autotest bug, but we don't have time to wait for
22039 Autotest to catch up.
22040 * tests/regression.at (Broken Closure): Adjust to the new table
22041 frames.
22042 Move to...
22043 * tests/sets.at: here.
22044
22045 2001-12-13 Akim Demaille <akim@epita.fr>
22046
22047 * src/closure.c (closure): Use nrules instead of playing tricks
22048 with BITS_PER_WORD.
22049
22050 2001-12-13 Akim Demaille <akim@epita.fr>
22051
22052 * src/print.c (print_actions): Output the handling of `$' as the
22053 traces do: shifting the token EOF. Before EOF was treated as a
22054 nonterminal.
22055 * tests/regression.at: Adjust some tests.
22056 * src/print_graph.c (print_core): Complete the set of items via
22057 closure. The next-to-final and final states are still unsatisfying,
22058 but that's to be addressed elsewhere.
22059 No longer output the rule numbers, but do output the state number.
22060 A single loop for the shifts + gotos is enough, but picked a
22061 distinct color for each.
22062 (print_graph): Initialize and finalize closure.
22063
22064 2001-12-13 Akim Demaille <akim@epita.fr>
22065
22066 * src/reader.c (readgram): Remove dead code, an strip useless
22067 braces.
22068 (get_type): Remove, unused.
22069
22070 2001-12-12 Akim Demaille <akim@epita.fr>
22071
22072 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
22073 on that of lib/error.c.
22074
22075 2001-12-12 Akim Demaille <akim@epita.fr>
22076
22077 Some hosts don't like `/' in includes.
22078
22079 * src/system.h: Include libgettext.h without qualifying the path.
22080 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
22081 $(top_srcdir).
22082
22083 2001-12-11 Marc Autret <autret_m@epita.fr>
22084
22085 * src/output.c (output_parser): Remove useless muscle.
22086
22087 2001-12-11 Marc Autret <autret_m@epita.fr>
22088
22089 * src/bison.simple: Remove #line just before %%epilogue. It
22090 is now handled in ...
22091 * src/reader.c (read_additionnal_code): Add the output of a
22092 #line for the epilogue.
22093
22094 2001-12-10 Marc Autret <autret_m@epita.fr>
22095
22096 * src/reader.c (copy_definition): Re-use CPP-outed code which
22097 replace precedent remove.
22098 * src/bison.simple: Remove #line before %%prologue because
22099 %%input-line is wrong at this time.
22100
22101 2001-12-10 Marc Autret <autret_m@epita.fr>
22102
22103 * src/reader.c (symbols_output): Clean up.
22104 * src/output.c (output_gram, output): Clean up.
22105
22106 2001-12-10 Akim Demaille <akim@epita.fr>
22107
22108 * src/lalr.c (initialize_lookaheads): New. Extracted from...
22109 * src/LR0.c (set_state_table): here.
22110 * src/lalr.c (lalr): Call it.
22111
22112 2001-12-10 Akim Demaille <akim@epita.fr>
22113
22114 * src/state.h (shifts): Remove the `number' member: shifts are
22115 attached to state, hence no longer need to be labelled with a
22116 state number.
22117
22118 2001-12-10 Akim Demaille <akim@epita.fr>
22119
22120 Now that states have a complete set of members, the linked list of
22121 shifts is useless: just fill directly the state's shifts member.
22122
22123 * src/state.h (shifts): Remove the `next' member.
22124 * src/LR0.c (first_state, last_state): Remove.
22125 Adjust the callers.
22126 (augment_automaton): Don't look for the shifts that must be added
22127 a shift on EOF: it is those of the state we looked for! But now,
22128 since shifts are attached, it is no longer needed to looking
22129 merely by its id: its number.
22130
22131 2001-12-10 Akim Demaille <akim@epita.fr>
22132
22133 * src/LR0.c (augment_automaton): Better variable locality.
22134 Remove an impossible branch: if there is a state corresponding to
22135 the start symbol being shifted, then there is shift for the start
22136 symbol from the initial state.
22137
22138 2001-12-10 Akim Demaille <akim@epita.fr>
22139
22140 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
22141 only when appropriate: when insert_start_shifting_state' is not
22142 invoked.
22143 * tests/regression.at (Rule Line Numbers): Adjust.
22144
22145 2001-12-10 Akim Demaille <akim@epita.fr>
22146
22147 * src/LR0.c (augment_automaton): Now that all states have shifts,
22148 merge the two cases addition shifts to the initial state.
22149
22150 2001-12-10 Akim Demaille <akim@epita.fr>
22151
22152 * src/lalr.c (set_state_table): Move to...
22153 * src/LR0.c: here.
22154 * src/lalr.c (lalr): Don't call it...
22155 * src/LR0.c (generate_states): do it.
22156 * src/LR0.h (first_state): Remove, only the table is used.
22157
22158 2001-12-10 Akim Demaille <akim@epita.fr>
22159
22160 * src/LR0.h (first_shift, first_reduction): Remove.
22161 * src/lalr.c: Don't use first_shift: find shifts through the
22162 states.
22163
22164 2001-12-10 Akim Demaille <akim@epita.fr>
22165
22166 * src/LR0.c: Attach shifts to states as soon as they are
22167 computed.
22168 * src/lalr.c (set_state_table): Instead of assigning shifts to
22169 state, just assert that the mapping was properly done.
22170
22171 2001-12-10 Akim Demaille <akim@epita.fr>
22172
22173 * src/LR0.c (insert_start_shift): Rename as...
22174 (insert_start_shifting_state): this.
22175 (insert_eof_shifting_state, insert_accepting_state): New.
22176 (augment_automaton): Adjust.
22177 Better locality of the variables.
22178 When looking if the start_symbol is shifted from the initial
22179 state, using `while (... symbol != start_symbol ...)' sounds
22180 better than `while (... symbol < start_symbol ...)': If fail
22181 to see how the order between symbols could be relevant!
22182
22183 2001-12-10 Akim Demaille <akim@epita.fr>
22184
22185 * src/getargs.h: Don't declare `spec_name_prefix' and
22186 `spec_file_prefix', declared by src/files.h.
22187 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
22188 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
22189 * src/output.c (prepare): Adjust.
22190 * src/reader.c (symbols_output): Likewise.
22191 * src/vmsgetargs.c: Vaguely adjust, but who cares?
22192
22193 2001-12-10 Akim Demaille <akim@epita.fr>
22194
22195 * src/muscle_tab.c (muscle_init): NULL is a better default than
22196 `"0"'.
22197
22198 2001-12-10 Akim Demaille <akim@epita.fr>
22199
22200 * src/reader.c (reader): Calling symbols_output once is enough.
22201
22202 2001-12-10 Akim Demaille <akim@epita.fr>
22203
22204 Now that states have a complete set of members, the linked list of
22205 reductions is useless: just fill directly the state's reductions
22206 member.
22207
22208 * src/state.h (struct reductions): Remove member `number' and
22209 `next'.
22210 * src/LR0.c (first_reduction, last_reduction): Remove.
22211 (save_reductions): Don't link the new reductions, store them in
22212 this_state.
22213 * src/lalr.c (set_state_table): No need to attach reductions to
22214 states, it's already done.
22215 * src/output.c (output_actions): No longer free the shifts, then
22216 the reductions, then the states: free all the states and their
22217 members.
22218
22219 2001-12-10 Akim Demaille <akim@epita.fr>
22220
22221 * src/options.c (OPTN, DRTV, BOTH): New.
22222 (option_table): Use them.
22223
22224 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
22225 the job of system.h.
22226 * src/options.c: Don't include stdio.h and xalloc.h for the same
22227 reasons.
22228
22229 2001-12-10 Akim Demaille <akim@epita.fr>
22230
22231 * src/output.c (output, prepare): Make sure the values of the
22232 muscles `action' and `prologue' are 0-terminated.
22233
22234 2001-12-10 Akim Demaille <akim@epita.fr>
22235
22236 Clean up GCC warnings.
22237
22238 * src/reader.c (copy_action): `buf' is not used.
22239 (parse_skel_decl): Be static.
22240 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
22241 * src/options.h (create_long_option_table): Have a real prototype.
22242 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
22243 (hash_delete_at): Return const void *.
22244 Adjust casts to preserve the const.
22245
22246 2001-12-10 Akim Demaille <akim@epita.fr>
22247
22248 * configure.in: Require 2.52g.
22249 M4 is not needed, but AUTOM4TE is.
22250 * m4/m4.m4: Remove.
22251 * tests/Makefile.am: Adjust.
22252
22253 2001-12-10 Akim Demaille <akim@epita.fr>
22254
22255 One structure for states is enough, even though theoretically
22256 there are LR(0) states and LALR(1) states.
22257
22258 * src/lalr.h (state_t): Remove.
22259 (state_table): Be state_t **, not state_t *.
22260 * src/state.h (core, CORE_ALLOC): Rename as...
22261 (state_t, STATE_ALLOC): this.
22262 Add the LALR(1) members: shifts, reductions, errs.
22263 * src/LR0.c (state_table): Rename as...
22264 (state_hash): this, to avoid name clashes with the global
22265 `state_table'.
22266 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
22267 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
22268
22269 2001-12-10 Akim Demaille <akim@epita.fr>
22270
22271 Bison dumps core on bash.y.
22272 Reported by Pascal Bart.
22273
22274 * src/warshall.c (bitmatrix_print): New.
22275 (TC): Use it.
22276 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
22277 j must be the outer loop.
22278 * tests/regression.at (Broken Closure): New.
22279
22280 2001-12-05 Akim Demaille <akim@epita.fr>
22281
22282 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
22283 its argument.
22284 Reported by Peter Hamorsky.
22285
22286 2001-12-05 Akim Demaille <akim@epita.fr>
22287
22288 * src/conflicts.c (err_table): Remove.
22289 (resolve_sr_conflict): Adjust.
22290 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
22291 Rename as...
22292 (state_t.reductions, state_t.shifts): this.
22293
22294 2001-12-05 Akim Demaille <akim@epita.fr>
22295
22296 * src/reduce.c (reduce_grammar_tables): No longer disable the
22297 removal of useless rules via CPP but via `if (0)', so that the
22298 compiler still check the code is valid.
22299 For instance, it should have noticed `rline' no longer exists: use
22300 the `line' member of rule_t.
22301 * src/gram.c (dummy, rline): Remove, unused.
22302
22303 2001-12-05 Akim Demaille <akim@epita.fr>
22304
22305 * src/output.c (pack_vector): Use assert, not berror.
22306 * src/main.c (berror): Remove, unused.
22307
22308 2001-12-05 Akim Demaille <akim@epita.fr>
22309
22310 New experimental feature: if --verbose --trace output all the
22311 items of a state, not only its kernel.
22312
22313 * src/print.c (print_core): If `trace_flag', then invoke closure
22314 before outputting the items of the state (print_core is no longer
22315 a correct name them).
22316 (print_results): Invoke new_closure/free_closure if needed.
22317
22318 2001-12-05 Akim Demaille <akim@epita.fr>
22319
22320 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
22321 * src/closure.c, src/closure.h (itemsetsize): Rename as...
22322 (nitemset): for consistency with the rest of the project.
22323
22324 2001-12-05 Akim Demaille <akim@epita.fr>
22325
22326 * src/closure.c (print_closure): Improve.
22327 (closure): Use it for printing input and output.
22328
22329 2001-12-05 Akim Demaille <akim@epita.fr>
22330
22331 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
22332 indexed by nonterminals.
22333
22334 2001-12-05 Akim Demaille <akim@epita.fr>
22335
22336 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
22337 what it was!).
22338 * src/warshall.h: Remove accidental duplication of the content.
22339
22340 2001-12-05 Akim Demaille <akim@epita.fr>
22341
22342 * src/closure.c (set_fderives): De-obfuscate.
22343
22344 2001-12-05 Akim Demaille <akim@epita.fr>
22345
22346 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
22347
22348 2001-12-05 Akim Demaille <akim@epita.fr>
22349
22350 * src/closure.c (set_firsts): De-obfuscate.
22351
22352 2001-12-05 Akim Demaille <akim@epita.fr>
22353
22354 * src/output.c (action_row): De-obfuscate
22355 using the good o' techniques: arrays not pointers, variable
22356 locality, BITISSET, RESETBIT etc.
22357
22358 2001-12-05 Akim Demaille <akim@epita.fr>
22359
22360 Pessimize the code to simplify it: from now on, all the states
22361 have a valid SHIFTS, which NSHIFTS is possibly 0.
22362
22363 * src/LR0.c (shifts_new): Be global and move to..
22364 * src/state.c, src/state.h: here.
22365 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
22366 * src/print_graph: Adjust.
22367
22368 2001-12-05 Akim Demaille <akim@epita.fr>
22369
22370 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
22371 * src/conflicts.c: Use it.
22372 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
22373 incorrectly ``simplified''.
22374
22375 2001-12-05 Akim Demaille <akim@epita.fr>
22376
22377 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
22378 using the good o' techniques: arrays not pointers, variable
22379 locality, BITISSET, RESETBIT etc.
22380
22381 2001-12-05 Akim Demaille <akim@epita.fr>
22382
22383 * src/state.h (SHIFT_SYMBOL): New.
22384 * src/conflicts.c: Use it to deobfuscate.
22385
22386 2001-12-05 Akim Demaille <akim@epita.fr>
22387
22388 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
22389 (print_reductions): De-obfuscate using the good o' techniques:
22390 arrays not pointers, variable locality, BITISSET.
22391
22392 2001-12-05 Akim Demaille <akim@epita.fr>
22393
22394 * src/conflicts.c (print_reductions): Arrays, not pointers.
22395 Use BITISSET.
22396
22397 2001-12-05 Akim Demaille <akim@epita.fr>
22398
22399 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22400
22401 2001-12-05 Akim Demaille <akim@epita.fr>
22402
22403 * src/conflicts.c (print_reductions): Improve variable locality.
22404
22405 2001-12-05 Akim Demaille <akim@epita.fr>
22406
22407 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22408
22409 2001-12-05 Akim Demaille <akim@epita.fr>
22410
22411 * src/conflicts.c (print_reductions): Improve variable locality.
22412
22413 2001-12-05 Akim Demaille <akim@epita.fr>
22414
22415 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
22416 * src/lalr.c: Use them.
22417
22418 2001-12-05 Akim Demaille <akim@epita.fr>
22419
22420 * src/LR0.c (augment_automaton): Formatting changes.
22421 Better variable locality.
22422
22423 2001-12-05 Akim Demaille <akim@epita.fr>
22424
22425 * src/lalr.c (matrix_print): New.
22426 (transpose): Use it.
22427 Use arrays instead of pointers.
22428
22429 2001-12-05 Akim Demaille <akim@epita.fr>
22430
22431 * src/lalr.c (maxrhs): Move to...
22432 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
22433 * src/lalr.c (build_relations): Adjust.
22434
22435 2001-12-05 Akim Demaille <akim@epita.fr>
22436
22437 * src/lalr.c (transpose): Free the memory allocated to the
22438 argument, as it is replaced by the results by the unique caller.
22439 (build_relations): Merely invoke transpose: it handles the memory
22440 deallocation.
22441 Improve variable locality.
22442 Avoid variables used as mere abbreviations.
22443 (compute_lookaheads): Use arrays instead of pointers.
22444
22445 2001-12-05 Akim Demaille <akim@epita.fr>
22446
22447 * src/lalr.c (initialize_F): Improve variable locality.
22448 Avoid variables used as mere abbreviations.
22449
22450 2001-12-05 Akim Demaille <akim@epita.fr>
22451
22452 * src/derives.c (print_derives): Display the ruleno.
22453 * src/lalr.c (initialize_F, transpose): Better variable locality
22454 to improve readability.
22455 Avoid variables used as mere abbreviations.
22456
22457 2001-12-05 Akim Demaille <akim@epita.fr>
22458
22459 * src/lalr.c (traverse): Use arrays instead of pointers.
22460
22461 2001-12-05 Akim Demaille <akim@epita.fr>
22462
22463 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
22464 the handling of squeue.
22465 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22466
22467 2001-12-05 Akim Demaille <akim@epita.fr>
22468
22469 Because useless nonterminals are now kept alive (instead of being
22470 `destroyed'), we now sometimes examine them, and store information
22471 related to them. Hence we need to know their number, and adjust
22472 memory allocations.
22473
22474 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
22475 static.
22476 * src/LR0.c (allocate_itemsets): The memory allocated to
22477 `symbol_count' was used for two different purpose: once to count
22478 the number of occurrences of each symbol, and later reassigned to
22479 `shift_symbol', containing the symbol that can be shifted from a
22480 given state.
22481 Deobfuscate, i.e., allocate, use and free `symbol_count' here
22482 only, and...
22483 (new_itemsets): Allocate `shift_symbol' here.
22484 (allocate_itemsets): symbol_count includes useless nonterminals.
22485 Make room for them.
22486 (free_storage): Use `free', not `XFREE', for pointers that cannot
22487 be null.
22488
22489 2001-12-05 Akim Demaille <akim@epita.fr>
22490
22491 * src/nullable.c (set_nullable): Deobfuscate the handling of
22492 ritem.
22493 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22494
22495 2001-12-05 Akim Demaille <akim@epita.fr>
22496
22497 * src/gram.c, src/gram.h (ritem_print): New.
22498 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
22499 (This useless function was defined only to work around VMS linkers
22500 that can't handle compilation units with variables only).
22501 * src/reduce.c (dump_grammar): Use it to trace the construction of
22502 ritem.
22503
22504 2001-12-04 Paul Eggert <eggert@twinsun.com>
22505
22506 * src/bison.simple (union yyalloc): Change member names
22507 to be the same as the stack names.
22508 (yyparse): yyptr is now union yyalloc *, not char *.
22509 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
22510 and may generate better code on some machines.
22511 (yystpcpy): Use prototype if __STDC__ is defined, not just
22512 if __cplusplus is defined.
22513
22514 2001-11-30 Akim Demaille <akim@epita.fr>
22515
22516 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
22517 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
22518 Gettext doesn't compile cleanly, and dies with -Werror.
22519 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
22520 Include WARNING_CFLAGS here.
22521 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
22522 before being defined.
22523
22524 2001-11-27 Paul Eggert <eggert@twinsun.com>
22525
22526 * lib/quotearg.h (quotearg_n, quotearg_n_style):
22527 First arg is int, not unsigned.
22528 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22529 (SIZE_MAX, UINT_MAX): New macros.
22530 (quotearg_n_options): Abort if N is negative.
22531 Avoid overflow check on hosts where size_t is 64 bits and int
22532 is 32 bits, as overflow is impossible there.
22533 Fix off-by-one typo that caused unnecessary reallocation.
22534
22535 2001-11-29 Paul Eggert <eggert@twinsun.com>
22536
22537 Name space cleanup in generated parser.
22538
22539 * doc/bison.texinfo (Bison Parser): Discuss system headers
22540 and their effect on the user name space.
22541
22542 * src/bison.simple:
22543 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
22544 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
22545 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
22546
22547 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
22548 on user names when possible.
22549
22550 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
22551 Simplify test for whather <alloca.h> exists.
22552
22553 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
22554
22555 (<stdio.h>): Include if YYDEBUG.
22556
22557 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
22558 ! defined (yyoverflow) && ! defined (yymemcpy).
22559
22560 (yymemcpy, yyparse): Rename local variables as needed so that
22561 they all begin with 'yy'.
22562
22563 (yystrlen, yystpcpy): New functions.
22564
22565 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
22566 All uses changed.
22567
22568 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
22569 instead of relying on string.h functions. Use YYSTACK_ALLOC
22570 and YYSTACK_FREE instead of malloc and free.
22571
22572 2001-11-30 Akim Demaille <akim@epita.fr>
22573
22574 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
22575 before their first uses.
22576 (YYBISON, YYPURE): Move to the top of the output.
22577
22578 2001-11-30 Akim Demaille <akim@epita.fr>
22579
22580 * tests/reduce.at (Useless Nonterminals): Fix.
22581
22582 2001-11-30 Akim Demaille <akim@epita.fr>
22583
22584 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
22585 if body instead of `;' to pacify GCC's warnings.
22586
22587 2001-11-30 Akim Demaille <akim@epita.fr>
22588
22589 Instead of mapping the LHS of unused rules to -1, keep the LHS
22590 valid, but flag the rules as invalid.
22591
22592 * src/gram.h (rule_t): `useful' is a new member.
22593 * src/print.c (print_grammar): Adjust.
22594 * src/derives.c (set_derives): Likewise.
22595 * src/reader.c (packgram, reduce_output): Likewise.
22596 * src/reduce.c (reduce_grammar_tables): Likewise.
22597 * tests/reduce.at (Underivable Rules, Useless Rules): New.
22598
22599 2001-11-30 Akim Demaille <akim@epita.fr>
22600
22601 * src/reduce.c (reduce_output): Formatting changes.
22602 * src/print.c (print_results, print_grammar): Likewise.
22603 * tests/regression.at (Rule Line Numbers)
22604 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
22605
22606 2001-11-30 Akim Demaille <akim@epita.fr>
22607
22608 * src/reduce.c (nonterminals_reduce): Instead of throwing away
22609 useless nonterminals, move them at the end of the symbol arrays.
22610 (reduce_output): Adjust.
22611 * tests/reduce.at (Useless Nonterminals): Adjust.
22612
22613 2001-11-30 Akim Demaille <akim@epita.fr>
22614
22615 * src/reduce.c: Various comment/formatting changes.
22616 (nonterminals_reduce): New, extracted from...
22617 (reduce_grammar_tables): here.
22618 (reduce_grammar): Call nonterminals_reduce.
22619
22620 2001-11-29 Paul Eggert <eggert@twinsun.com>
22621
22622 * src/bison.simple (YYSTACK_REALLOC): Remove.
22623 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
22624 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
22625 New macros.
22626 (union yyalloc): New type.
22627 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
22628 an arbitrary restriction on hosts where size_t is wider than int.
22629
22630 (yyparse): Don't dump core if alloca or malloc fails; instead, report
22631 a parser stack overflow. Allocate just one block of memory for all
22632 three stacks, instead of allocating three blocks; this typically is
22633 faster and reduces fragmentation.
22634
22635 Do not limit the number of items in the stack to a value that fits
22636 in 'int', as this is an arbitrary limit on hosts with 64-bit
22637 size_t and 32-bit int.
22638
22639 2001-11-29 Marc Autret <autret_m@epita.fr>
22640
22641 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
22642 of defining YYERROR_VERBOSE.
22643 [AT_DATA]: $4 is now out of C declarations in the prologue.
22644
22645 2001-11-28 Marc Autret <autret_m@epita.fr>
22646
22647 * src/reader.c (parse_dquoted_param): New.
22648 (parse_skel_decl): Use it.
22649 * src/lex.h: Add its prototype.
22650 * src/lex.c (literalchar): Become not static.
22651
22652 2001-11-28 Marc Autret <autret_m@epita.fr>
22653
22654 * src/output.h: And put its extern declaration here.
22655 * src/output.c (error_verbose): Define here.
22656 (prepare): Echo name modification.
22657 * src/getargs.h: Clean its extern declaration.
22658 * src/getargs.c (error_verbose_flag): Remove.
22659 (getargs): Remove case 'e'.
22660 * src/options.c (option_table): 'error-verbose' is now seen as simple
22661 percent option.
22662 Include output.h.
22663
22664 * src/reader.c (read_declarations): Remove case tok_include.
22665 (parse_include_decl): Remove.
22666 * src/lex.h (token_t): Remove tok_include.
22667 * src/options.c (option_table): 'include' is now a simple command line
22668 option.
22669
22670 2001-11-28 Marc Autret <autret_m@epita.fr>
22671
22672 * src/bison.simple: Adjust muscle names.
22673 * src/muscle_tab.c (muscle_init): Also rename the muscles.
22674 * src/output.c (prepare): s/_/-/ for the muscles names.
22675 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
22676
22677 2001-11-28 Marc Autret <autret_m@epita.fr>
22678
22679 * src/bison.simple: Fix debug.
22680 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
22681
22682 2001-11-28 Akim Demaille <akim@epita.fr>
22683
22684 * src/LR0.c (shifts_new): New.
22685 (save_shifts, insert_start_shift, augment_automaton): Use it.
22686
22687 2001-11-28 Akim Demaille <akim@epita.fr>
22688
22689 * src/closure.c (closure): `b' and `ruleno' denote the same value:
22690 keep ruleno only.
22691
22692 2001-11-28 Akim Demaille <akim@epita.fr>
22693
22694 * src/closure.c (closure): Instead of looping over word in array
22695 then bits in words, loop over bits in array.
22696
22697 2001-11-28 Akim Demaille <akim@epita.fr>
22698
22699 * src/closure.c (closure): No longer optimize the special case
22700 where all the bits of `ruleset[r]' are set to 0, to make the code
22701 clearer.
22702
22703 2001-11-28 Akim Demaille <akim@epita.fr>
22704
22705 * src/closure.c (closure): `r' and `c' are new variables, used to
22706 de-obfuscate accesses to RULESET and CORE.
22707
22708 2001-11-28 Akim Demaille <akim@epita.fr>
22709
22710 * src/reduce.c (reduce_print): Use ngettext.
22711 (dump_grammar): Improve the trace accuracy.
22712
22713 2001-11-28 Akim Demaille <akim@epita.fr>
22714
22715 * src/reduce.c (dump_grammar): Don't translate trace messages.
22716
22717 2001-11-28 Akim Demaille <akim@epita.fr>
22718
22719 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
22720 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
22721 as all tags are free'ed afterwards.
22722 From Enrico Scholz.
22723
22724 2001-11-27 Paul Eggert <eggert@twinsun.com>
22725
22726 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
22727 use alloca when we didn't want to, and vice versa.
22728
22729 2001-11-27 Marc Autret <autret_m@epita.fr>
22730
22731 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
22732 initialization.
22733 * src/output.c (prepare): Remove its update.
22734
22735 2001-11-27 Marc Autret <autret_m@epita.fr>
22736
22737 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
22738 Use %error-verbose.
22739
22740 2001-11-27 Marc Autret <autret_m@epita.fr>
22741
22742 * src/bison.simple: Remove YYERROR_VERBOSE using.
22743 Use %%error_verbose.
22744 (yyparse): Likewise.
22745 * src/output.c (prepare): Give its final value.
22746 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
22747 * src/getargs.h: Add its extern declaration.
22748 * src/getargs.c (error_verbose_flag): New int.
22749 (getargs): Update to catch new case.
22750 * src/options.c (option_table): 'error-verbose' is a new option.
22751 (shortopts): Update.
22752
22753 2001-11-27 Akim Demaille <akim@epita.fr>
22754
22755 * src/system.h: Use intl/libgettext.h.
22756 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
22757
22758 2001-11-27 Akim Demaille <akim@epita.fr>
22759
22760 * tests/torture.at (Exploding the Stack Size with Malloc):
22761 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
22762
22763 2001-11-27 Akim Demaille <akim@epita.fr>
22764
22765 * src/files.c: Include error.h.
22766 Reported by Hans Aberg.
22767
22768 2001-11-26 Marc Autret <autret_m@epita.fr>
22769
22770 * src/reader.c (parse_include_decl): New, not yet implemented.
22771 (read_declarations): Add case tok_include.
22772 * src/getargs.h (include): Add its extern definition.
22773 * src/getargs.c (include): New const char *.
22774 (getargs): Add case '-I'.
22775 * src/options.c (option_table): Add include as command line and
22776 percent option.
22777 * src/lex.h (token_t): Add tok_include.
22778
22779 2001-11-26 Akim Demaille <akim@epita.fr>
22780
22781 * src/reader.c (readgram): Make sure rules for mid-rule actions
22782 have a lineno equal to that of their host rule.
22783 Reported by Hans Aberg.
22784 * tests/regression.at (Rule Line Numbers): New.
22785
22786 2001-11-26 Akim Demaille <akim@epita.fr>
22787
22788 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
22789 size_ts.
22790
22791 2001-11-26 Akim Demaille <akim@epita.fr>
22792
22793 * src/complain.c, src/complain.h (error): Remove, provided by
22794 lib/error.[ch].
22795
22796 2001-11-26 Akim Demaille <akim@epita.fr>
22797
22798 * src/reader.c (read_declarations): Don't abort on tok_illegal,
22799 issue an error message.
22800 * tests/regression.at (Invalid %directive): New.
22801 Reported by Hans Aberg.
22802
22803 2001-11-26 Akim Demaille <akim@epita.fr>
22804
22805 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
22806 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
22807
22808 2001-11-26 Akim Demaille <akim@epita.fr>
22809
22810 * src/conflicts.c (conflicts_print): Don't complain at all when
22811 there are no reduce/reduce conflicts, and as many shift/reduce
22812 conflicts as expected.
22813 * tests/regression.at (%expect right): Adjust.
22814
22815 2001-11-23 Akim Demaille <akim@epita.fr>
22816
22817 * lib/alloca.c: Update, from fileutils.
22818
22819 2001-11-23 Akim Demaille <akim@epita.fr>
22820
22821 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
22822
22823 2001-11-23 Akim Demaille <akim@epita.fr>
22824
22825 * src/system.h: Include alloca.h.
22826 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
22827
22828 2001-11-23 Akim Demaille <akim@epita.fr>
22829
22830 * src/print_graph.c (print_actions): Remove `rule', unused.
22831 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
22832 pacify GCC's signed < unsigned warnings.
22833 * src/closure.c (itemsetsize): Likewise.
22834 * src/reader.c (symbol_list_new): Static.
22835
22836 2001-11-23 Akim Demaille <akim@epita.fr>
22837
22838 Attaching lineno to buckets is stupid, since only one copy of each
22839 symbol is kept, only the line of the first occurrence is kept too.
22840
22841 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
22842 * src/reader.c (rline_allocated): Remove, unused.
22843 (symbol_list): Have a `line' member.
22844 (symbol_list_new): New.
22845 (readgram): Use it.
22846 * src/print.c (print_grammar): Output the rule line numbers.
22847 * tests/regression.at (Solved SR Conflicts)
22848 (Unresolved SR Conflicts): Adjust.
22849 Reported by Hans Aberg.
22850
22851 2001-11-22 Marc Autret <autret_m@epita.fr>
22852
22853 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
22854
22855 2001-11-22 Marc Autret <autret_m@epita.fr>
22856
22857 * src/muscle_tab.c (muscle_init): Remove initialization of
22858 skeleton muscle.
22859 * src/output.c (output_master_parser): Do it here.
22860
22861 2001-11-20 Akim Demaille <akim@epita.fr>
22862
22863 * po/sv.po: New.
22864 * configure.in (ALL_LINGUAS): Adjust.
22865 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
22866 longer contains strings to translate.
22867
22868 2001-11-19 Akim Demaille <akim@epita.fr>
22869
22870 * src/conflicts.c (conflicts_print): Add a missing \n.
22871
22872 2001-11-19 Akim Demaille <akim@epita.fr>
22873
22874 * src/nullable.c (nullable_print): New.
22875 (set_nullable): Call it when tracing.
22876 Better locality of variables.
22877
22878 2001-11-19 Akim Demaille <akim@epita.fr>
22879
22880 * src/print.c (print_actions): Better locality of variables.
22881
22882 2001-11-19 Akim Demaille <akim@epita.fr>
22883
22884 * src/derives.c (print_derives): Fix and enrich.
22885 * src/closure.c (print_fderives): Likewise.
22886
22887 2001-11-19 Akim Demaille <akim@epita.fr>
22888
22889 * src/closure.c (itemsetend): Remove, replaced with...
22890 (itemsetsize): new.
22891
22892 2001-11-19 Akim Demaille <akim@epita.fr>
22893
22894 * src/LR0.c (kernel_end): Remove, replaced with...
22895 (kernel_size): new.
22896
22897 2001-11-19 Akim Demaille <akim@epita.fr>
22898
22899 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
22900 to clarify.
22901
22902 2001-11-19 Akim Demaille <akim@epita.fr>
22903
22904 * src/closure.c (closure): Use arrays instead of pointers to clarify.
22905
22906 2001-11-19 Akim Demaille <akim@epita.fr>
22907
22908 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
22909 trace messages.
22910 * src/LR0.c: Likewise.
22911 (allocate_itemsets): Use arrays instead of pointers to clarify.
22912
22913 2001-11-19 Akim Demaille <akim@epita.fr>
22914
22915 * src/getargs.c (statistics_flag): Replace with...
22916 (trace_flag): New.
22917 (longopts): Accept --trace instead of --statistics.
22918 * src/getargs.h, src/options.c: Adjust.
22919 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
22920 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
22921
22922 2001-11-19 Akim Demaille <akim@epita.fr>
22923
22924 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
22925 pointers to clarify the code.
22926 (save_reductions, save_shifts): Factor common parts of alternatives.
22927
22928 2001-11-19 Akim Demaille <akim@epita.fr>
22929
22930 * src/LR0.c (new_state, get_state): Complete TRACE code.
22931 * src/closure.c: Include `reader.h' to get `tags', needed by the
22932 trace code.
22933 Rename the conditional DEBUG as TRACE.
22934 Output consistently TRACEs to stderr, not stdout.
22935 * src/derives.c: Likewise.
22936 * src/reduce.c: (inaccessable_symbols): Using if is better style
22937 than goto.
22938 Use `#if TRACE' instead of `#if 0' for tracing code.
22939
22940 2001-11-19 Akim Demaille <akim@epita.fr>
22941
22942 * src/system.h (LIST_FREE, shortcpy): New.
22943 * src/LR0.c: Use them.
22944 * src/output.c (free_itemsets, free_reductions, free_shifts):
22945 Remove, replaced by LIST_FREE.
22946
22947 2001-11-19 Akim Demaille <akim@epita.fr>
22948
22949 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
22950 (REDUCTIONS_ALLOC): New.
22951 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
22952 allocation.
22953
22954 2001-11-19 Akim Demaille <akim@epita.fr>
22955
22956 * src/LR0.c (new_state): Complete trace code.
22957 * src/nullable.c (set_nullable): Don't translate traces.
22958
22959 2001-11-19 Akim Demaille <akim@epita.fr>
22960
22961 * src/print_graph.c (print_core): Better locality of variables.
22962 * src/print.c (print_core): Likewise.
22963
22964 2001-11-19 Akim Demaille <akim@epita.fr>
22965
22966 * src/vcg.c: You do the output, so you are responsible of the
22967 handling of VCG syntax, in particular: use quotearg.
22968 * src/print_graph.c: Don't.
22969 (print_actions): Don't output the actions as part of the nodes,
22970 since that's the job of the edges.
22971 (print_state): Don't output by hand: fill the node description,
22972 and ask for its output.
22973
22974 2001-11-19 Akim Demaille <akim@epita.fr>
22975
22976 * src/bison.simple (yyparse): When verbosely reporting an error,
22977 no longer put additional quotes around token names.
22978 * tests/calc.at: Adjust.
22979
22980 2001-11-19 Akim Demaille <akim@epita.fr>
22981
22982 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
22983 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
22984 * src/output.c: Adjust.
22985
22986 2001-11-19 Akim Demaille <akim@epita.fr>
22987
22988 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
22989 (rule_t): this.
22990 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
22991
22992 2001-11-19 Akim Demaille <akim@epita.fr>
22993
22994 * src/gram.h (rule_t): New.
22995 (rule_table): New.
22996 (rrhs, rlhs): Remove, part of state_t.
22997 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
22998 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
22999 * src/reader.c, src/reduce.c: Adjust.
23000
23001 2001-11-19 Akim Demaille <akim@epita.fr>
23002
23003 * src/reader.c (symbols_output): New, extracted from...
23004 (packsymbols): Here.
23005 (reader): Call it.
23006
23007 2001-11-19 Akim Demaille <akim@epita.fr>
23008
23009 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
23010 (maxrhs): this new function.
23011
23012 2001-11-19 Akim Demaille <akim@epita.fr>
23013
23014 * src/lalr.c (F): New macro to access the variable F.
23015 Adjust.
23016
23017 2001-11-19 Akim Demaille <akim@epita.fr>
23018
23019 * src/lalr.h (LA): New macro to access the variable LA.
23020 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23021 * src/lalr.c: Adjust.
23022
23023 2001-11-19 Akim Demaille <akim@epita.fr>
23024
23025 * src/lalr.c (initialize_LA): Only initialize LA. Let...
23026 (set_state_table): handle the `lookaheads' members.
23027
23028 2001-11-19 Akim Demaille <akim@epita.fr>
23029
23030 * src/lalr.h (lookaheads): Removed array, whose contents is now
23031 a member of...
23032 (state_t): this structure.
23033 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23034 Adjust.
23035
23036 2001-11-19 Akim Demaille <akim@epita.fr>
23037
23038 * src/lalr.h (consistent): Removed array, whose contents is now
23039 a member of...
23040 (state_t): this structure.
23041 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23042 Adjust.
23043
23044 2001-11-19 Akim Demaille <akim@epita.fr>
23045
23046 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
23047 contents are now members of...
23048 (state_t): this structure.
23049 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23050 Adjust.
23051
23052 2001-11-19 Akim Demaille <akim@epita.fr>
23053
23054 * src/lalr.h (state_t): New.
23055 (state_table): Be a state_t * instead of a core **.
23056 (accessing_symbol): Remove, part of state_t.
23057 * src/lalr.c: Adjust.
23058 (set_accessing_symbol): Merge into...
23059 (set_state_table): this.
23060 * src/print_graph.c, src/conflicts.c: Adjust.
23061
23062 2001-11-14 Akim Demaille <akim@epita.fr>
23063
23064 * tests/calc.at, tests/output.at, tests/regression.at,
23065 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
23066 now the tests are run in private dirs, therefore AC_CLEANUP and
23067 family can be simplified to 0-ary.
23068 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
23069 use abs. path to find config.h.
23070 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
23071 stderr, there can be way too much random noise.
23072 Instead pass -Werror to GCC and rely on the exit status.
23073 Reported by Wolfram Wagner.
23074
23075 2001-11-14 Akim Demaille <akim@epita.fr>
23076
23077 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
23078 defined only if yyoverflow is defined, to avoid `warning: unused
23079 variable `yyvs1''.
23080 Reported by The Test Suite.
23081
23082 2001-11-14 Akim Demaille <akim@epita.fr>
23083
23084 * src/print.c: Include reduce.h.
23085 Reported by Hans Aberg.
23086
23087 2001-11-14 Akim Demaille <akim@epita.fr>
23088
23089 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
23090 Revert a previous patch: these are really const.
23091 * src/conflicts.c (conflict_report): Additional useless pair of
23092 braces to pacify GCC's warnings for `if () if () {} else {}'.
23093 * src/lex.c (parse_percent_token): Replace equal_offset with
23094 arg_offset.
23095 arg is const.
23096 Be sure to strdup `arg' when used, since there is no reason for
23097 token_buffer not to change.
23098
23099 2001-11-14 Akim Demaille <akim@epita.fr>
23100
23101 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
23102 definition.
23103 * src/main.c (main): Use them.
23104 Suggested by Hans Aberg.
23105
23106 2001-11-12 Akim Demaille <akim@epita.fr>
23107
23108 * src/system.h (ngettext): Now that we use ngettext, be sure to
23109 provide a default definition when NLS are not used.
23110
23111 2001-11-12 Akim Demaille <akim@epita.fr>
23112
23113 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
23114 Use @kbd to denote user input.
23115 (Language and Grammar): ANSIfy the example.
23116 Adjust its layout for info/notinfo.
23117 (Location Tracking Calc): Output error messages to stderr.
23118 Output locations in a more GNUtically correct way.
23119 Fix a couple of Englishos.
23120 Adjust @group/@end group pairs.
23121
23122 2001-11-12 Akim Demaille <akim@epita.fr>
23123
23124 %expect was not functioning at all.
23125
23126 * src/conflicts.c (expected_conflicts): Set to -1.
23127 (conflict_report): Use ngettext.
23128 (conflicts_print): Check %expect and make its violation an error.
23129 * doc/bison.texinfo (Expect Decl): Adjust.
23130 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
23131 * tests/regression.at (%expect not enough, %expect right)
23132 (%expect too much): New.
23133
23134 2001-11-12 Akim Demaille <akim@epita.fr>
23135
23136 * tests/regression.at (Conflicts): Rename as...
23137 (Unresolved SR Conflicts): this.
23138 (Solved SR Conflicts): New.
23139
23140 2001-11-12 Akim Demaille <akim@epita.fr>
23141
23142 * src/reduce.c (print_results): Rename as...
23143 (reduce_output): This.
23144 Output to OUT, passed as argument, instead of output_obstack.
23145 (dump_grammar): Likewise.
23146 (reduce_free): New.
23147 Also free V1.
23148 (reduce_grammar): No longer call reduce_output, since...
23149 * src/print.c (print_results): do it.
23150 * src/main.c (main): Call reduce_free;
23151
23152 2001-11-12 Akim Demaille <akim@epita.fr>
23153
23154 * src/conflicts.c (print_reductions): Accept OUT as argument.
23155 Output to it, not to output_obstack.
23156 * src/print.c (print_actions): Adjust.
23157
23158 2001-11-12 Akim Demaille <akim@epita.fr>
23159
23160 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
23161 the result instead of using...
23162 (src_total, rrc_total, src_count, rrc_count): Remove.
23163 (any_conflicts): Remove.
23164 (print_conflicts): Split into...
23165 (conflicts_print, conflicts_output): New.
23166 * src/conflicts.h: Adjust.
23167 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
23168 * src/print.c (print_grammar): Issue `\n' between two rules.
23169 * tests/regression.at (Conflicts): New.
23170 Reported by Tom Lane.
23171
23172 2001-11-12 Akim Demaille <akim@epita.fr>
23173
23174 * tests/regression.at (Invalid input): Remove, duplicate with
23175 ``Invalid input: 1''.
23176
23177 2001-11-12 Akim Demaille <akim@epita.fr>
23178
23179 * tests/torture.at (AT_DATA_STACK_TORTURE)
23180 (Exploding the Stack Size with Alloca)
23181 (Exploding the Stack Size with Malloc): New.
23182
23183 2001-11-12 Akim Demaille <akim@epita.fr>
23184
23185 * src/bison.simple (YYSTACK_REALLOC): New.
23186 (yyparse) [!yyoverflow]: Use it and free the old stack.
23187 Reported by Per Allansson.
23188
23189 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
23190
23191 * src/bison.simple: Define type yystype instead of YYSTYPE, and
23192 define CPP macro, which substitute YYSTYPE by yystype.
23193 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
23194 with yyltype/YYLTYPE. This allows inclusion of the generated
23195 header within the parser if the compiler, such as GGC, accepts
23196 multiple equivalent #defines.
23197 From Akim.
23198
23199 2001-11-05 Akim Demaille <akim@epita.fr>
23200
23201 * src/reader.c (symbols_output): New, extracted from...
23202 (packsymbols): here.
23203 (reader): Adjust.
23204
23205 2001-11-05 Akim Demaille <akim@epita.fr>
23206
23207 * src/lex.c (parse_percent_token): s/quotearg/quote/.
23208
23209 2001-11-05 Akim Demaille <akim@epita.fr>
23210
23211 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
23212 pattern.
23213
23214 2001-11-05 Akim Demaille <akim@epita.fr>
23215
23216 * src/options.h (struct option_table_struct): set_flags is void*.
23217 * src/options.c (longopts): Support `--output' and `%output'.
23218 (usage): Adjust.
23219 * src/lex.h (tok_setopt): Remove, replaced with...
23220 (tok_intopt, tok_stropt): these new guys.
23221 * src/lex.c (getopt.h): Not needed.
23222 (token_buffer, unlexed_token_buffer): Not const.
23223 (percent_table): Promote `-' over `_' in directive names.
23224 Active `%name-prefix', `file-prefix', and `output'.
23225 (parse_percent_token): Accept possible arguments to directives.
23226 Promote `-' over `_' in directive names.
23227
23228 2001-11-04 Akim Demaille <akim@epita.fr>
23229
23230 * doc/bison.texinfo (Decl Summary): Split the list into
23231 `directives for grammars' and `directives for bison'.
23232 Sort'em.
23233 Add description of `%name-prefix', `file-prefix', and `output'.
23234 Promote `-' over `_' in directive names.
23235 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
23236 Simplify the description of `--name-prefix'.
23237 Promote `-' over `_' in directive names.
23238 Promote `--output' over `--output-file'.
23239 Fix the description of `--defines'.
23240 * tests/output.at: Exercise %file-prefix and %output.
23241
23242 2001-11-02 Akim Demaille <akim@epita.fr>
23243
23244 * doc/refcard.tex: Update.
23245
23246 2001-11-02 Akim Demaille <akim@epita.fr>
23247
23248 * src/symtab.h (SUNDEF): New.
23249 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
23250 stand for `uninitialized', instead of 0.
23251 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
23252 * src/lex.c (lex): Adjust.
23253
23254 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
23255 Number it 0.
23256 Let yylex return it instead of a plain 0.
23257 Reported by Dick Streefland.
23258
23259 2001-11-02 Akim Demaille <akim@epita.fr>
23260
23261 * tests/regression.at (Mixing %token styles): New test.
23262
23263 2001-11-02 Akim Demaille <akim@epita.fr>
23264
23265 * src/reader.c (parse_thong_decl): Formatting changes.
23266 (token_translations_init): New, extracted from...
23267 (packsymbols): Here.
23268 Adjust.
23269
23270 2001-11-01 Akim Demaille <akim@epita.fr>
23271
23272 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
23273 Check that `9foo.y' produces correct cpp guards.
23274 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
23275 guards.
23276 Reported by Wwp.
23277
23278 2001-11-01 Akim Demaille <akim@epita.fr>
23279
23280 * tests/regression.at (Invalid input: 2): New.
23281 * src/lex.c (unlexed_token_buffer): New.
23282 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
23283 too.
23284 Reported by Wwp.
23285
23286 2001-11-01 Akim Demaille <akim@epita.fr>
23287
23288 * tests/calc.at: Catch up with 1.30.
23289 * configure.in: Bump to 1.49a.
23290 Adjust to newer Autotest.
23291
23292 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
23293
23294 * src/conflicts.c: Move global variables rrc_total and src_total ...
23295 (print_conflicts): here.
23296 * src/output.c (output): Free global variable user_toknums.
23297 * src/lex.c (token_obstack): Become static.
23298
23299 2001-10-18 Akim Demaille <akim@epita.fr>
23300
23301 * tests/atlocal.in (GCC): Add.
23302 * tests/calc.at: s/m4_match/m4_bmatch/.
23303 s/m4_patsubst/m4_bpatsubst/.
23304 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
23305 * configure.in: AC_SUBST(GCC).
23306
23307 2001-10-14 Marc Autret <autret_m@epita.fr>
23308
23309 * src/options.c (create_long_option_table): Fix.
23310
23311 2001-10-10 Akim Demaille <akim@epita.fr>
23312
23313 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
23314
23315 2001-10-04 Akim Demaille <akim@epita.fr>
23316
23317 * src/reader.c (parse_union_decl): Push the caracters in
23318 union_obstack, not attrs_obstack.
23319
23320 2001-10-04 Akim Demaille <akim@epita.fr>
23321
23322 Merge in the branch 1.29.
23323
23324 * src/reader.c (packsymbols): Use a temporary obstack for
23325 `%%tokendef', since output_stack is already used elsewhere.
23326
23327 2001-10-02 Akim Demaille <akim@epita.fr>
23328
23329 Bump 1.29d.
23330
23331 2001-10-02 Akim Demaille <akim@epita.fr>
23332
23333 Version 1.29c.
23334
23335 2001-10-02 Akim Demaille <akim@epita.fr>
23336
23337 * tests/regression.at (Invalid CPP headers): New.
23338 From Alexander Belopolsky.
23339 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
23340
23341 2001-10-02 Akim Demaille <akim@epita.fr>
23342
23343 * tests/regression.at (Invalid input): New.
23344 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
23345 Reported by Shura.
23346
23347 2001-10-02 Akim Demaille <akim@epita.fr>
23348
23349 * tests/calc.at: Now that --debug works, the tests must be adjusted.
23350
23351 2001-10-02 Akim Demaille <akim@epita.fr>
23352
23353 * src/output.c (output_parser): Assert `skeleton'.
23354 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
23355 systems.
23356 From Shura.
23357
23358 2001-10-01 Marc Autret <autret_m@epita.fr>
23359
23360 * src/lex.h: Echo modifications.
23361 * src/lex.c (unlex): Parameter is now token_t.
23362 From Hans Aberg.
23363
23364 2001-10-01 Marc Autret <autret_m@epita.fr>
23365
23366 * src/main.c: Include lex.h.
23367 From Hans Aberg.
23368
23369 2001-09-29 Akim Demaille <akim@epita.fr>
23370
23371 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
23372
23373 2001-09-28 Akim Demaille <akim@epita.fr>
23374
23375 * tests/testsuite.at: Update to newer Autotest.
23376 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
23377
23378 2001-09-27 Akim Demaille <akim@epita.fr>
23379
23380 Position independent wrapper.
23381
23382 * tests/bison: Remove.
23383 * tests/bison.in: New.
23384 * configure.in: Adjust.
23385
23386 2001-09-27 Paul Eggert <eggert@twinsun.com>
23387
23388 Port quotearg fixes from tar 1.13.24.
23389
23390 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23391 tm to be declared.
23392 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
23393 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
23394
23395 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
23396 * m4/mbrtowc.m4: New file.
23397 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
23398 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
23399
23400 2001-09-27 Akim Demaille <akim@epita.fr>
23401
23402 Bump to 1.29c.
23403
23404 2001-09-27 Akim Demaille <akim@epita.fr>
23405
23406 Version 1.29b.
23407
23408 2001-09-25 Akim Demaille <akim@epita.fr>
23409
23410 * src/system.h: Include `xalloc.h'.
23411 Remove it from the C files.
23412 * src/files.c (output_files): Free the obstacks.
23413 * src/lex.c (init_lex): Rename as...
23414 (lex_init): this.
23415 (lex_free): New.
23416 * src/main.c (main): Use it.
23417
23418 2001-09-24 Marc Autret <autret_m@epita.fr>
23419
23420 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
23421 to output informations in fout (FILE*).
23422 (open_graph, close_graph): Likewise.
23423 (output_graph, output_edge, output_node): Likewise.
23424 * src/vcg.h: Update function prototypes.
23425 * src/print_graph.c (print_graph): Open output graph file.
23426 (print_actions): Adjust.
23427 * src/files.h: Remove extern declaration.
23428 * src/files.c: Remove graph_obstack declaration.
23429 (open_files): Remove graph_obstack initialization.
23430 (output_files): Remove graph_obstack saving.
23431
23432 2001-09-24 Marc Autret <autret_m@epita.fr>
23433
23434 * src/files.c (compute_output_file_names): Fix.
23435
23436 2001-09-24 Marc Autret <autret_m@epita.fr>,
23437 Akim Demaille <akim@epita.fr>
23438
23439 * src/reader.c (reader): Remove call to free_symtab ().
23440 * src/main.c (main): Call it here.
23441 Include symtab.h.
23442 * src/conflicts.c (initialize_conflicts): Rename as...
23443 (solve_conflicts): this.
23444 * src/print.c (print_core, print_actions, print_state)
23445 (print_grammar): Dump to a file instead a `output_obstack'.
23446 (print_results): Dump `output_obstack', and then proceed with the
23447 FILE *.
23448 * src/files.c (compute_output_file_names, close_files): New.
23449 (output_files): Adjust.
23450 * src/main.c (main): Adjust.
23451
23452 2001-09-23 Marc Autret <autret_m@epita.fr>
23453
23454 * src/files.c (compute_header_macro): Computes header macro name
23455 from spec_defines_file when given.
23456
23457 2001-09-23 Marc Autret <autret_m@epita.fr>
23458
23459 * src/files.c (output_files): Add default extensions.
23460
23461 2001-09-22 Akim Demaille <akim@epita.fr>
23462
23463 * src/conflicts.c (finalize_conflicts): Rename as...
23464 (free_conflicts): this.
23465
23466 2001-09-22 Akim Demaille <akim@epita.fr>
23467
23468 * src/gram.c (gram_free): Rename back as...
23469 (dummy): this.
23470 (output_token_translations): Free `token_translations'.
23471 * src/symtab.c (free_symtab): Free the tag field.
23472
23473 2001-09-22 Akim Demaille <akim@epita.fr>
23474
23475 Remove `translations' as it is always set to true.
23476
23477 * src/gram.h: Adjust.
23478 * src/reader.c (packsymbols, parse_token_decl): Adjust
23479 * src/print.c (print_grammar): Adjust.
23480 * src/output.c (output_token_translations): Adjust.
23481 * src/lex.c (lex): Adjust.
23482 * src/gram.c: Be sure the set pointers to NULL.
23483 (dummy): Rename as...
23484 (gram_free): this.
23485
23486 2001-09-22 Akim Demaille <akim@epita.fr>
23487
23488 * configure.in: Invoke AM_LIB_DMALLOC.
23489 * src/system.h: Use dmalloc.
23490 * src/LR0.c: Be sure to have pointers initialized to NULL.
23491 (allocate_itemsets): Allocate kernel_items only if needed.
23492
23493 2001-09-22 Akim Demaille <akim@epita.fr>
23494
23495 * configure.in: Bump to 1.29b.
23496 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
23497 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
23498 need xmalloc.c in calc.y.
23499 From Pascal Bart.
23500
23501 2001-09-21 Akim Demaille <akim@epita.fr>
23502
23503 Version 1.29a.
23504 * Makefile.maint, config/config.guess, config/config.sub,
23505 * config/missing: Update from masters.
23506 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
23507 upon package.m4.
23508 * configure.in (ALL_LINGUAS): Add `tr'.
23509
23510 2001-09-21 Akim Demaille <akim@epita.fr>
23511
23512 * tests/Makefile.am (package.m4): Move to...
23513 ($(srcdir)/$(TESTSUITE)): here.
23514
23515 2001-09-20 Akim Demaille <akim@epita.fr>
23516
23517 * src/complain.c: No longer try to be standalone: use system.h.
23518 Don't assume __STDC__ is defined to 1. Just test if it is defined.
23519 * src/complain.h: Likewise.
23520 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
23521 Remove the unused variable `n'.
23522 From Albert Chin-A-Young.
23523
23524 2001-09-18 Marc Autret <autret_m@epita.fr>
23525
23526 * doc/bison.1: Update.
23527 * doc/bison.texinfo (Bison Options): Update --defines and --graph
23528 descriptions.
23529 (Option Cross Key): Update.
23530 Add --graph.
23531
23532 2001-09-18 Marc Autret <autret_m@epita.fr>
23533
23534 * tests/regression.at: New test (comment in %union).
23535
23536 2001-09-18 Marc Autret <autret_m@epita.fr>
23537
23538 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
23539 do that.
23540 Reported by Keith Browne.
23541
23542 2001-09-18 Marc Autret <autret_m@epita.fr>
23543
23544 * tests/output.at: Add tests for --defines and --graph.
23545
23546 2001-09-18 Marc Autret <autret_m@epita.fr>
23547
23548 * tests/output.at: Removes tests of %{header,src}_extension features.
23549
23550 2001-09-18 Akim Demaille <akim@epita.fr>
23551
23552 * tests/Makefile.am (package.m4): New.
23553 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
23554 (_AT_CHECK_CALC_ERROR): Likewise.
23555 Factor the `, ' part of verbose error messages.
23556
23557 2001-09-18 Marc Autret <autret_m@epita.fr>
23558
23559 * src/getargs.c (longopts): Declare --defines and --graph as options
23560 with optional arguments.
23561 * src/files.h: Add extern declarations.
23562 * src/files.c (spec_graph_file, spec_defines_file): New.
23563 (output_files): Update.
23564 Remove CPP-outed code.
23565
23566 2001-09-18 Marc Autret <autret_m@epita.fr>
23567
23568 Turn off %{source,header}_extension feature.
23569
23570 * src/files.c (compute_exts_from_gf): Update.
23571 (compute_exts_from_src): Update.
23572 (output_files): CPP-out useless code.
23573 * src/files.h: Remove {header,source}_extension extern declarations.
23574 * src/reader.c (parse_dquoted_param): CPP-out.
23575 (parse_header_extension_decl): Remove.
23576 (parse_source_extension_decl): Remove.
23577 (read_declarations): Remove cases tok_{hdrext,srcext}.
23578 * src/lex.c (percent_table): Remove {header,source}_extension entries.
23579 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
23580
23581 2001-09-10 Akim Demaille <akim@epita.fr>
23582
23583 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
23584 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
23585 (AT_CHECK_OUTPUT): this.
23586 Merely check ls' exit status, its output is useless.
23587
23588 2001-09-10 Akim Demaille <akim@epita.fr>
23589
23590 * tests/calc.at: Use m4_match.
23591 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
23592
23593 2001-09-10 Marc Autret <autret_m@epita.fr>,
23594 Akim Demaille <akim@epita.fr>
23595
23596 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
23597 enum color_e.
23598 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
23599 to `normal'.
23600 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
23601 * src/lex.h: Adjust prototype.
23602 (token_t): Add `tok_undef'.
23603 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
23604 (parse_percent_token): Now returns token_t.
23605 Add default statement in switch.
23606 (lex): Separate `c' as an input variable, from the token_t result
23607 part.
23608 (unlexed): Is a token_t.
23609
23610 2001-09-10 Akim Demaille <akim@epita.fr>
23611
23612 * configure.in: Bump to 1.29a.
23613
23614 2001-09-07 Akim Demaille <akim@epita.fr>
23615
23616 Version 1.29.
23617
23618 2001-08-30 Akim Demaille <akim@epita.fr>
23619
23620 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
23621 * m4/atconfig.m4: Remove.
23622 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
23623 * tests/bison: New.
23624 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
23625 m4_if, m4_patsubst, and m4_regexp.
23626 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
23627 `input' file instead of echo.
23628
23629 2001-08-29 Akim Demaille <akim@epita.fr>
23630
23631 Bump to 1.28e.
23632
23633 2001-08-29 Akim Demaille <akim@epita.fr>
23634
23635 Version 1.28d.
23636
23637 2001-08-29 Paul Eggert <eggert@twinsun.com>
23638
23639 * src/bison.simple (yyparse): Don't take the address of an
23640 item before the start of an array, as that doesn't conform to
23641 the C Standard.
23642
23643 2001-08-29 Robert Anisko <anisko_r@epita.fr>
23644
23645 * doc/bison.texinfo (Location Tracking Calc): New node.
23646
23647 2001-08-29 Paul Eggert <eggert@twinsun.com>
23648
23649 * src/output.c (output): Do not define const, as this now
23650 causes more problems than it cures.
23651
23652 2001-08-29 Akim Demaille <akim@epita.fr>
23653
23654 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
23655 the nodes.
23656 Be sure to tag the `detailmenu'.
23657
23658 2001-08-29 Akim Demaille <akim@epita.fr>
23659
23660 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
23661 download in a tmp dir.
23662
23663 2001-08-28 Marc Autret <autret_m@epita.fr>
23664
23665 * config/depcomp: New file.
23666
23667 2001-08-28 Marc Autret <autret_m@epita.fr>
23668
23669 * doc/bison.1 (mandoc): Adjust.
23670 From Juan Manuel Guerrero.
23671
23672 2001-08-28 Marc Autret <autret_m@epita.fr>
23673
23674 * src/print_graph.c (print_state): Fix.
23675
23676 2001-08-27 Marc Autret <autret_m@epita.fr>
23677
23678 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
23679 char * members.
23680 Echo modifications to the functions prototypes.
23681 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
23682
23683 2001-08-27 Marc Autret <autret_m@epita.fr>
23684
23685 * src/vcg.c: Include `xalloc.h'.
23686 (add_colorentry): New.
23687 (add_classname): New.
23688 (add_infoname): New.
23689 * src/vcg.h: Add new prototypes.
23690
23691 2001-08-27 Akim Demaille <akim@epita.fr>
23692
23693 * Makefile.maint: Sync. again with CVS Autoconf.
23694
23695 2001-08-27 Akim Demaille <akim@epita.fr>
23696
23697 * Makefile.maint: Formatting changes.
23698 (po-update, cvs-update, update): New targets.
23699 (AMTAR): Remove.
23700
23701 2001-08-27 Akim Demaille <akim@epita.fr>
23702
23703 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23704 * Makefile.maint: Sync. with CVS Autoconf.
23705
23706 2001-08-27 Marc Autret <autret_m@epita.fr>
23707
23708 * src/vcg.h (struct infoname_s): New.
23709 (struct colorentry_s): New.
23710 (graph_s): New fields {vertical,horizontal}_order in structure.
23711 Add `infoname' field.
23712 Add `colorentry' field;
23713 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
23714 (G_HORIZONTAL_ORDER): New.
23715 (G_INFONAME): New.
23716 (G_COLORENTRY): New.
23717 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
23718 Add output of `infoname'.
23719 Add output of `colorentry'.
23720
23721 2001-08-27 Marc Autret <autret_m@epita.fr>
23722
23723 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
23724 This one shadowed a global parameter.
23725
23726 2001-08-24 Marc Autret <autret_m@epita.fr>
23727
23728 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
23729 instead of `unsigned'.
23730 (print_state): Do not call obstack_object_size () in obstack_grow ()
23731 to avoid macro variables shadowing.
23732
23733 2001-08-23 Marc Autret <autret_m@epita.fr>
23734
23735 * src/lex.c (percent_table): Typo: s/naem/name/.
23736 Add graph option.
23737 Normalize new options declarations.
23738
23739 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
23740
23741 * tests/suite.at: Exercise %header_extension and %source_extension.
23742
23743 2001-08-16 Marc Autret <autret_m@epita.fr>
23744
23745 * src/reader.c (parse_dquoted_param): New.
23746 (parse_header_extension_decl): Use it.
23747 (parse_source_extension_decl): Likewise.
23748
23749 2001-08-16 Marc Autret <autret_m@epita.fr>
23750
23751 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
23752 (get_xxxx_str): Use assert () instead of complain ().
23753 Remove return invokations in default cases.
23754 (get_decision_str): Modify default behaviour. Remove second argument.
23755 Echo modifications on calls.
23756 (output_graph): Fix.
23757
23758 2001-08-16 Marc Autret <autret_m@epita.fr>
23759
23760 * src/getargs.c (usage): Update with ``-g, --graph''.
23761
23762 2001-08-16 Marc Autret <autret_m@epita.fr>
23763
23764 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
23765 (Option Cross Key): Likewise.
23766 * doc/bison.1: Update.
23767
23768 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
23769
23770 * src/output.c (output_master_parser): Don't finish action_obstack.
23771 (output_parser): Don't care about the muscle action, here.
23772 (prepare): Copy the action_obstack in the action muscle.
23773 (output): Free action_obstack.
23774
23775 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23776
23777 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
23778 will contain `%union' declaration.
23779 (parse_union_decl): Delete #line directive output.
23780 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
23781 informations about %union.
23782 (parse_union_decl): Copy the union_obstack in the muscle stype.
23783 * src/bison.simple: Add new #line directive.
23784 Add typdef %%stype YYSTYPE.
23785
23786 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23787
23788 * src/bison.simple: Add new `#line' directive.
23789
23790 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
23791
23792 * src/bison.simple: New `#line' directive.
23793 * src/output.c (output_parser): Support new dynamic muscle input_line.
23794
23795 2001-09-22 Marc Autret <autret_m@epita.fr>
23796
23797 * src/output.c (output_master_parser): New.
23798 (output_parser): Be more re-entrant.
23799
23800 2001-09-21 Marc Autret <autret_m@epita.fr>
23801
23802 * src/reader.c (copy_definition, parse_union_decl): Update and use
23803 `linef' muscle.
23804 (copy_action): Likewise.
23805 Use obstack_1grow ().
23806 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
23807
23808 2001-09-21 Marc Autret <autret_m@epita.fr>
23809
23810 * src/options.c (option_table): Adjust.
23811 * src/lex.c (parse_percent_token): Fix.
23812
23813 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23814
23815 * src/options.c (symtab.h): Include it, need by lex.h.
23816
23817 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23818
23819 * src/lex.c (parse_percent_token): Change type of variable `tx', which
23820 is now an option_table_struct*.
23821 (option_strcmp): New function option_strcmp.
23822 (parse_percent_token): Call option_strcmp.
23823 * src/getargs.c (xalloc.h, options.h): Include it.
23824 (getargs): Call create_long_option_table.
23825 (getargs): Free longopts at the end of the function.
23826 (shortopts): Move in options.c.
23827 * src/options.c (create_long_option_table): New function. Convert
23828 information from option_table to option structure.
23829 * src/reader.c (options.h): Include it.
23830
23831 * src/Makefile.am: Adjust.
23832 * src/options.c (option_table): Create from longopts and percent_table.
23833 * src/getargs.c (longopts): Delete.
23834 * src/lex.c (struct percent_table_struct): Delete.
23835 (percent_table): Delete.
23836 (options.h): Include it.
23837 * src/options.c: Create.
23838 * src/options.h: Create.
23839 Declare enum opt_access_e.
23840 Define struct option_table_struct.
23841
23842 2001-09-20 Marc Autret <autret_m@epita.fr>
23843
23844 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
23845 sections of Bison.
23846
23847 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
23848
23849 * src/bison.simple: s/%%filename/%%skeleton.
23850 * src/muscle_tab.c (getargs.h): Include it.
23851 (muscle_init): Insert new muscle skeleton.
23852
23853 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
23854
23855 * src/output.c (output_parser): Delete unused variable actions_dumped.
23856
23857 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
23858
23859 * src/output.c (output): Delete call to reader_output_yylsp.
23860 * src/reader.c (reader): Likewise.
23861 * src/reader.h: Delete declaration of reader_output_yylsp.
23862
23863 2001-09-02 Marc Autret <autret_m@epita.fr>
23864
23865 * src/reader.c: Include muscle_tab.h.
23866 (parse_union_decl): Update.
23867 (parse_macro_decl): Rename parse_muscle_decl.
23868 Update to use renamed functions and variable.
23869 (read_declarations, copy_action, read_additionnal_code, : Updated
23870 with correct variables and functions names.
23871 (packsymbols, reader): Likewise.
23872
23873 * src/reader.h (muscle_obstack): Extern declaration update.
23874
23875 * src/output.c: Include muscle_tab.h
23876 In all functions using macro_insert, change by using muscle_insert ().
23877 (macro_obstack): Rename muscle_obstack.
23878 Echo modifications in the whole file.
23879 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
23880 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
23881 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
23882
23883 * src/muscle_tab.h: Update double inclusion macros.
23884 (macro_entry_s): Rename muscle_entry_s.
23885 Update prototypes.
23886
23887 * src/muscle_tab.c: Include muscle_tab.h.
23888 Rename macro_tabble to muscle_table.
23889 (mhash1, mhash2, mcmp): Use muscle_entry.
23890 (macro_init): Rename muscle_init. Update.
23891 (macro_insert): Rename muscle_insert. Update.
23892 (macro_find): Rename muscle_find. Update.
23893
23894 * src/main.c: Include muscle_tab.h.
23895 (main): Call muscle_init ().
23896 * src/Makefile.am (bison_SOURCES): Echo modifications.
23897
23898 2001-09-02 Marc Autret <autret_m@epita.fr>
23899
23900 Now the files macro_tab.[ch] are named muscle_tab.[ch].
23901
23902 * src/muscle_tab.c, src/muscle_tab.h: Add files.
23903
23904 2001-09-02 Marc Autret <autret_m@epita.fr>
23905
23906 * src/macrotab.c, src/macrotab.h: Remove.
23907
23908 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
23909
23910 * src/reader.c (copy_guard): Use muscle to specify the `#line'
23911 filename.
23912
23913 2001-09-01 Marc Autret <autret_m@epita.fr>
23914
23915 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
23916 to an explicit value to activate the feature. We do it here.
23917
23918 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23919
23920 * src/output.c (prepare): Delete the `filename' muscule insertion.
23921 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
23922 (parse_union_decl): Likewise.
23923 * src/macrotab.c (macro_init): Initialize filename by infile.
23924
23925 2001-08-31 Marc Autret <autret_m@epita.fr>
23926
23927 * src/bison.simple (YYLSP_NEEDED): New definition.
23928 * src/output.c (prepare): Add macro insertion of `locations_flag'
23929
23930 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23931
23932 * src/output.c (prepare): Delete insertion of previous muscles,
23933 and insert the `prefix' muscles.
23934 * src/macrotab.c (macro_init): Likewise.
23935 (macro_init): Initialization prefix directive by `yy'.
23936 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
23937 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
23938 yylval, yydebug, yyerror, yynerrs and yyparse.
23939 New directive `#define' to substitute yydebug, ... with option
23940 name_prefix.
23941
23942 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23943
23944 * src/main.c (main): Standardize.
23945 * src/output.c (output_table_data, output_parser): Likewise.
23946 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
23947
23948 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
23949
23950 * src/reader.c (read_additionnal_code): Rename %%user_code to
23951 %%epilogue.
23952 * src/output.c (output): Rename %%declarations to %%prologue.
23953 * src/bison.simple: Echo modifications.
23954
23955 2001-08-31 Marc Autret <autret_m@epita.fr>
23956
23957 * src/reader.c (readgram): CleanUp.
23958 (output_token_defines): Likewise.
23959 (packsymbols): Likewise.
23960 (reader): Likewise.
23961 * src/output.c (output): CPP-out useless code.
23962
23963 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23964
23965 * src/reader.c (reader): Delete obsolete call to function
23966 output_trailers and output_headers.
23967 * src/output.h: Remove obsolete functions prototypes of output_headers
23968 and output_trailers.
23969
23970 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
23971
23972 * src/main.c: Include macrotab.h.
23973 * src/macrotab.h (macro_entry_s): Constify fields.
23974 Adjust functions prototypes.
23975 * src/macrotab.c (macro_insert): Constify key and value.
23976 (macro_find): Constify key.
23977 (macro_insert): Include 'xalloc.h'
23978 (macro_insert): Use XMALLOC.
23979 (macro_find): Constify return value.
23980 * src/output.c (output_table_data): Rename table to table_data.
23981 (output_parser): Constify macro_key, macro_value.
23982
23983 2001-08-30 Marc Autret <autret_m@epita.fr>
23984
23985 * src/reader.c (parse_skel_decl): New.
23986 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
23987 * src/lex.h (token_t): New token `tok_skel'.
23988 * src/lex.c (percent_table): Add skeleton option entry.
23989 Standardize.
23990
23991 2001-08-29 Marc Autret <autret_m@epita.fr>
23992
23993 * src/bison.simple: Add %%user_code directive at the end.
23994 * src/reader.c (read_additionnal_code): New.
23995 (reader): Use it.
23996 * src/output.c (output_program): Remove.
23997 (output): Update.
23998
23999 2001-08-28 Marc Autret <autret_m@epita.fr>
24000
24001 * src/output.c (output_actions): Clean up.
24002 (output_gram): CPP-out useless code.
24003 * src/reader.c (reader): Clean up, CPP-out useless code.
24004
24005 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
24006
24007 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
24008 directive.
24009 * src/bison.simple: Add `%%definitions'.
24010
24011 2001-08-28 Marc Autret <autret_m@epita.fr>
24012
24013 * config/depcomp: New file.
24014
24015 2001-08-27 Paul Eggert <eggert@twinsun.com>
24016
24017 * src/bison.simple (yyparse): Don't take the address of an
24018 item before the start of an array, as that doesn't conform to
24019 the C Standard.
24020
24021 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
24022
24023 * src/output.c (output): Remove the initialization of the macro
24024 obstack. It was done too late here.
24025
24026 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
24027 completely wrong.
24028 (reader): Initialize the macro obstack here, since we need it to grow
24029 '%define' directives.
24030
24031 * src/reader.h: Declare the macro obstack as extern.
24032
24033 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
24034
24035 * src/output.c (output_parser): Fix. Store single '%' characters in
24036 the output obstack instead of throwing them away.
24037
24038 2001-08-27 Akim Demaille <akim@epita.fr>
24039
24040 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
24041
24042 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
24043
24044 * lib/Makefile.am: Adjust.
24045
24046 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
24047
24048 * src/bison.simple: Update and add '%%' directives.
24049
24050 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
24051
24052 * src/reader.c (reader): Remove calls to 'output_headers' and
24053 'output_trailers'. Remove some C output.
24054 (readgram): Disable a piece of code that was writing a default
24055 definition for 'YYSTYPE'.
24056 (reader_output_yylsp): Remove.
24057 (packsymbols): Output token defintions to a macro.
24058 (copy_definition): Disable C output.
24059
24060 * src/reader.c (parse_macro_decl): New function used to parse macro
24061 declarations.
24062 (copy_string2): Put the body of copy_string into this new function.
24063 Add a parameter to let the caller choose whether he wants to copy the
24064 string delimiters or not.
24065 (copy_string): Be a simple call to copy_string2 with the last argument
24066 bound to true.
24067 (read_declarations): Add case for macro definition.
24068 (copy_identifier): New.
24069 (parse_macro_decl): Read macro identifiers using copy_identifier
24070 rather than lex.
24071
24072 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
24073
24074 * src/output.c (prepare): Add prefixed names.
24075 (output_parser): Output semantic actions.
24076 (output_parser): Fix bug on '%%line' directives.
24077
24078 * src/output.c (output_headers): Remove. The C code printed by this
24079 function should now be in the skeletons.
24080 (output_trailers): Remove.
24081 (output): Disable call to 'reader_output_yylsp'.
24082 (output_rule_data): Do not output tables to the table obstack.
24083
24084 * src/output.c: Remove some C dedicated output.
24085 Improve the use of macro and output obstacks.
24086 (output_defines): Remove.
24087
24088 * src/output.c (output_token_translations): Associate 'translate'
24089 table with a macro. No output to the table obstack.
24090 (output_gram): Same for 'rhs' and 'prhs'.
24091 (output_stos): Same for 'stos'.
24092 (output_rule_data): Same for 'r1' and 'r2'.
24093 (token_actions): Same for 'defact'.
24094 (goto_actions): Same for 'defgoto'.
24095 (output_base): Same for 'pact' and 'pgoto'.
24096 (output_table): Same for 'table'.
24097 (output_check): Same for 'check'.
24098
24099 * src/output.c (output_table_data): New function.
24100 (output_short_table): Remove.
24101 (output_short_or_char_table): Remove.
24102
24103 * src/output.c (output_parser): Replace most of the skeleton copy code
24104 with something new. Skeletons are now processed character by character
24105 rather than line by line, and Bison looks for '%%' macros. This is the
24106 first step in making Bison's output process (a lot) more flexible.
24107 (output_parser): Use the macro table.
24108
24109 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
24110
24111 * src/main.c (main): Initialize the macro table.
24112
24113 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
24114
24115 * src/lex.c (percent_table): Add tok_define.
24116 * src/lex.h: Add tok_define.
24117
24118 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
24119
24120 * src/macrotab.c: New file.
24121 * src/macrotab.h: New file.
24122 * src/Makefile.am: Update.
24123
24124 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
24125
24126 * lib/hash.c: New file.
24127 * lib/hash.h: New file.
24128 * lib/Makefile.am: Update.
24129
24130 2001-08-15 Akim Demaille <akim@epita.fr>
24131
24132 Version 1.28c.
24133
24134 2001-08-15 Marc Autret <autret_m@epita.fr>
24135
24136 * src/reader.c (readgram): Indent output macro YYSTYPE.
24137 (packsymbols): Likewise.
24138 (output_token_defines): Likewise.
24139 * src/files.c: Standardize.
24140 (compute_header_macro): New.
24141 (defines_obstack_save): New. Use compute_header_macro.
24142 (output_files): Update. Use defines_obstack_save.
24143
24144 2001-08-15 Akim Demaille <akim@epita.fr>
24145
24146 * doc/bison.texinfo (Table of Symbols): Document
24147 YYSTACK_USE_ALLOCA.
24148
24149 2001-08-15 Akim Demaille <akim@epita.fr>
24150
24151 * missing: Update from CVS Automake.
24152 * config/config.guess, config/config.sub, config/texinfo.tex:
24153 Update from gnu.org.
24154
24155 2001-08-15 Akim Demaille <akim@epita.fr>
24156
24157 * Makefile.maint: Sync with CVS Autoconf.
24158
24159 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
24160
24161 * doc/bison.texinfo: Include GNU Free Documentation License from
24162 `fdl.texi'.
24163 * doc/fdl.texi: Add to package.
24164
24165 2001-08-14 Marc Autret <autret_m@epita.fr>
24166
24167 Turn on %{source,header}_extension features.
24168
24169 * src/lex.c (percent_table): Un-CPP out header_extension and
24170 source_extension.
24171 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
24172 (compute_exts_from_src): Remove conditions. It restores priorities
24173 between options.
24174
24175 2001-08-14 Marc Autret <autret_m@epita.fr>
24176
24177 * src/files.c (compute_base_names): Add extensions computing when
24178 `--file-prefix' used.
24179 Standardize function calls.
24180
24181 2001-08-13 Marc Autret <autret_m@epita.fr>
24182
24183 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
24184 defining it (defined but null disables alloca).
24185
24186 2001-08-13 Marc Autret <autret_m@epita.fr>
24187
24188 * src/bison.simple (_yy_memcpy): CPP reformat.
24189
24190 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
24191
24192 * tests/atconfig.in (CPPFLAGS): Fix.
24193
24194 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
24195
24196 * doc/bison.texinfo: Include GNU General Public License from
24197 `gpl.texi'.
24198 * doc/gpl.texi: Add to package.
24199
24200 2001-08-10 Marc Autret <autret_m@epita.fr>
24201
24202 * src/print_graph.h: Fix.
24203 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
24204
24205 2001-08-10 Akim Demaille <akim@epita.fr>
24206
24207 * src/system.h: Provide default declarations for stpcpy, strndup,
24208 and strnlen.
24209
24210 2001-08-10 Robert Anisko <anisko_r@epita.fr>
24211
24212 * doc/bison.texinfo (Locations): Update @$ stuff.
24213
24214 2001-08-09 Robert Anisko <anisko_r@epita.fr>
24215
24216 * src/bison.simple (YYLLOC_DEFAULT): Update.
24217 (yyparse): Adjust.
24218
24219 2001-08-08 Marc Autret <autret_m@epita.fr>
24220
24221 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
24222 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
24223 Reported by Fabrice Bauzac.
24224
24225 2001-08-08 Marc Autret <autret_m@epita.fr>
24226
24227 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
24228 * src/vcg.c (output_node): Fix.
24229 * src/vcg.h: Cleanup.
24230 * src/print_graph.c: Add comments.
24231 (node_output_size): New global variable. Simplify the formatting of
24232 the VCG graph output.
24233 (print_actions): Unused code is now used. It notifies the final state
24234 and no action states in the VCG graph. It also give the reduce actions.
24235 The `shift and goto' edges are red and the `go to state' edges are
24236 blue.
24237 Get the current node name and node_obstack by argument.
24238 (node_obstack): New variable.
24239 (print_state): Manage node_obstack.
24240 (print_core): Use node_obstack given by argument.
24241 A node is not only computed here but in print_actions also.
24242 (print_graph): CPP out useless code instead of commenting it.
24243
24244 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
24245
24246 * tests/atconfig.in (CPPFLAGS): Fix.
24247
24248 2001-08-07 Akim Demaille <akim@epita.fr>
24249
24250 * src/print_graph.c (quote): New.
24251 (print_core): Use it.
24252
24253 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
24254
24255 * src/vcg.c (complain.h): Include it.
24256 Unepitaize `return' invocations.
24257 [NDEBUG] (main): Remove.
24258 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
24259 * src/files.c (open_files): Initialize graph_obstack.
24260 * src/print_graph.c (print_actions): CPP out useless code.
24261 (print_core): Don't output the last `\n' in labels.
24262 Use `quote'.
24263 * src/files.c (output_files): Output the VCG file.
24264 * src/main.c (main): Invoke print_graph ();
24265
24266 2001-08-06 Marc Autret <autret_m@epita.fr>
24267
24268 Automaton VCG graph output.
24269 Using option ``-g'' or long option ``--graph'', you can generate
24270 a gram_filename.vcg file containing a VCG description of the LALR (1)
24271 automaton of your grammar.
24272
24273 * src/main.c: Call to print_graph() function.
24274 * src/getargs.h: Update.
24275 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
24276 (graph_flag): New flag.
24277 (longopts): Update.
24278 (getargs): Add case `g'.
24279 * src/files.c (graph_obstack): New obstack struct.
24280 (open_files): Initialize new obstack.
24281 (output_files): Saves graph_obstack if required.
24282 * src/files.h (graph_obstack): New extern declaration.
24283 * src/Makefile.am: Add new source files.
24284
24285 2001-08-06 Marc Autret <autret_m@epita.fr>
24286
24287 * src/print_graph.c, src/print_graph.h (graph): New.
24288 * src/vcg.h: New file.
24289 * src/vcg.c: New file, VCG graph handling.
24290
24291 2001-08-06 Marc Autret <autret_m@epita.fr>
24292
24293 Add of %source_extension and %header_extension which specify
24294 the source or/and the header output file extension.
24295
24296 * src/files.c (compute_base_names): Remove initialisation of
24297 src_extension and header_extension.
24298 (compute_exts_from_gf): Update.
24299 (compute_exts_from_src): Update.
24300 (output_files): Update.
24301 * src/reader.c (parse_header_extension_decl): New.
24302 (parse_source_extension_decl): New.
24303 (read_declarations): New case statements for the new tokens.
24304 * src/lex.c (percent_table): Add entries for %source_extension
24305 and %header_extension.
24306 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
24307
24308 2001-08-06 Marc Autret <autret_m@epita.fr>
24309
24310 * configure.in: Bump to 1.28c.
24311 * doc/bison.texinfo: Texinfo thingies.
24312
24313 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
24314
24315 * tests/atconfig.in (CPPFLAGS): Add.
24316 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
24317
24318 2001-08-03 Akim Demaille <akim@epita.fr>
24319
24320 Version 1.28b.
24321
24322 2001-08-03 Akim Demaille <akim@epita.fr>
24323
24324 * tests/Makefile.am (check-local): Ship testsuite.
24325 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
24326 Include `string.h'.
24327
24328 2001-08-03 Akim Demaille <akim@epita.fr>
24329
24330 * configure.in: Try using -Wformat when compiling.
24331
24332 2001-08-03 Akim Demaille <akim@epita.fr>
24333
24334 * configure.in: Bump to 1.28b.
24335
24336 2001-08-03 Akim Demaille <akim@epita.fr>
24337
24338 * src/complain.c: Adjust strerror_r portability issues.
24339
24340 2001-08-03 Akim Demaille <akim@epita.fr>
24341
24342 Version 1.28a.
24343
24344 2001-08-03 Akim Demaille <akim@epita.fr>
24345
24346 * src/getargs.c, src/getarg.h (skeleton)): Constify.
24347 * src/lex.c (literalchar): Avoid name clashes on `buf'.
24348 * src/getargs.c: Include complain.h.
24349 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
24350 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
24351
24352 2001-08-03 Akim Demaille <akim@epita.fr>
24353
24354 * src/reader.c (readgram): Display hidden chars in error messages.
24355
24356 2001-08-03 Akim Demaille <akim@epita.fr>
24357
24358 Update to gettext 0.10.39.
24359
24360 2001-08-03 Akim Demaille <akim@epita.fr>
24361
24362 * lib/strspn.c: New.
24363
24364 2001-08-01 Marc Autret <autret_m@epita.fr>
24365
24366 * doc/bison.texinfo: Update.
24367 * doc/bison.1 (mandoc): Update.
24368 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
24369 * src/files.c: Support output files extensions computing.
24370 (src_extension): New static variable.
24371 (header_extension): New static variable.
24372 (tr): New function.
24373 (get_extension_index): New function, gets the index of an extension
24374 filename in a string.
24375 (compute_exts_from_gf): New function, computes extensions from the
24376 grammar file extension.
24377 (compute_exts_from_src): New functions, computes extensions from the
24378 C source file extension, file given by ``-o'' option.
24379 (compute_base_names): Update.
24380 (output_files): Update.
24381
24382 2001-08-01 Robert Anisko <anisko_r@epita.fr>
24383
24384 * doc/bison.texi: Document @$.
24385 (Locations): New section.
24386
24387 2001-07-18 Akim Demaille <akim@epita.fr>
24388
24389 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
24390 * config/prev-version.txt, config/move-if-change: New.
24391 * Makefile.am: Adjust.
24392
24393 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
24394
24395 * src/bison.simple (yyparse): Suppress warning `comparaison
24396 between signed and unsigned'.
24397
24398 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
24399
24400 * src/getargs.h (raw_flag): Remove.
24401 * src/getargs.c: Die on `-r'/`--raw'.
24402 * src/lex.c (parse_percent_token): Die on `%raw'.
24403 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
24404 * tests/calc.at: Suppress test with option `--raw'.
24405
24406 2001-07-14 Akim Demaille <akim@epita.fr>
24407
24408 * config/: New.
24409 * configure.in: Require Autoconf 2.50.
24410 Update to gettext 0.10.38.
24411
24412 2001-03-16 Akim Demaille <akim@epita.fr>
24413
24414 * doc/bison.texinfo: ANSIfy the examples.
24415
24416 2001-03-16 Akim Demaille <akim@epita.fr>
24417
24418 * getargs.c (skeleton): New variable.
24419 (longopts): --skeleton is a new option.
24420 (shortopts, getargs): -S is a new option.
24421 * getargs.h: Declare skeleton.
24422 * output.c (output_parser): Use it.
24423
24424 2001-03-16 Akim Demaille <akim@epita.fr>
24425
24426 * m4/strerror_r.m4: New.
24427 * m4/error.m4: Run AC_FUNC_STRERROR_R.
24428 * lib/error.h, lib/error.c: Update.
24429
24430 2001-03-16 Akim Demaille <akim@epita.fr>
24431
24432 * src/getargs.c (longopts): Clean up.
24433
24434 2001-02-21 Akim Demaille <akim@epita.fr>
24435
24436 * src/reader.c (gensym): `gensym_count' is your own.
24437 Use a static buf to create the symbol name, as token_buffer is no
24438 longer a buffer.
24439
24440 2001-02-08 Akim Demaille <akim@epita.fr>
24441
24442 * src/conflicts.c (conflict_report): Be sure not to append to res
24443 between two calls, which could happen if both first sprintf were
24444 skipped, but not the first cp += strlen.
24445
24446 2001-02-08 Akim Demaille <akim@epita.fr>
24447
24448 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
24449 New, from fileutils 4.0.37.
24450 * configure.in: Require Autoconf 2.49c. I took some time before
24451 making this decision. This is the only way out for portability
24452 issues in Bison, it would mean way too much duplicate effort to
24453 import in Bison features implemented in 2.49c since 2.13.
24454 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
24455
24456 2001-02-02 Akim Demaille <akim@epita.fr>
24457
24458 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
24459 * lib/xalloc.h, lib/xmalloc.c: Update.
24460
24461 2001-01-19 Akim Demaille <akim@epita.fr>
24462
24463 Get rid of the ad hoc handling of token_buffer in the scanner: use
24464 the obstacks.
24465
24466 * src/lex.c (token_obstack): New.
24467 (init_lex): Initialize it. No longer call...
24468 (grow_token_buffer): this. Remove it.
24469 Adjust all the places which used it to use the obstack.
24470
24471 2001-01-19 Akim Demaille <akim@epita.fr>
24472
24473 * src/lex.h: Rename all the tokens:
24474 s/\bENDFILE\b/tok_eof/g;
24475 s/\bIDENTIFIER\b/tok_identifier/g;
24476 etc.
24477 Let them be enums, not #define, to ease debugging.
24478 Adjust all the code.
24479
24480 2001-01-18 Akim Demaille <akim@epita.fr>
24481
24482 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
24483 * src/lex.c (maxtoken, grow_token_buffer): Static.
24484
24485 2001-01-18 Akim Demaille <akim@epita.fr>
24486
24487 Since we now use obstacks, more % directives can be enabled.
24488
24489 * src/lex.c (percent_table): Also accept `%yacc',
24490 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
24491 `%debug'.
24492 Handle the actions for `%semantic_parser' and `%pure_parser' here,
24493 instead of returning a token.
24494 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
24495 * src/reader.c (read_declarations): Adjust.
24496 * src/files.c (open_files): Don't call `compute_base_names', don't
24497 compute `attrsfile' since they depend upon data which might be
24498 *in* the input file now.
24499 (output_files): Do it here.
24500 * src/output.c (output_headers): Document the fact that this patch
24501 introduces a guaranteed SEGV for semantic parsers.
24502 * doc/bison.texinfo: Document them.
24503 * tests/suite.at: Exercise these %options.
24504
24505 2000-12-20 Akim Demaille <akim@epita.fr>
24506
24507 Also handle the output file (--verbose) with obstacks.
24508
24509 * files.c (foutput): Remove.
24510 (output_obstack): New.
24511 Adjust all dependencies.
24512 * src/conflicts.c: Return a string.
24513 * src/system.h (obstack_grow_string): Rename as...
24514 (obstack_sgrow): this. Be ready to work with non literals.
24515 (obstack_fgrow4): New.
24516
24517 2000-12-20 Akim Demaille <akim@epita.fr>
24518
24519 * src/files.c (open_files): Fix the computation of short_base_name
24520 in the case of `-o foo.tab.c'.
24521
24522 2000-12-20 Akim Demaille <akim@epita.fr>
24523
24524 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
24525 (copy_dollar): Now that everything uses obstacks, get rid of the
24526 FILE * parameters.
24527
24528 2000-12-20 Akim Demaille <akim@epita.fr>
24529
24530 * src/files.c (open_files): Actually the `.output' file is based
24531 on the short_base_name, not base_name.
24532 * tests/suite.at (Checking output file names): Adjust.
24533
24534 2000-12-20 Akim Demaille <akim@epita.fr>
24535
24536 * src/bison.s1: Remove, we now use directly...
24537 * src/bison.simple: this.
24538 * src/Makefile.am: Use pkgdata instead of data.
24539
24540 2000-12-20 Akim Demaille <akim@epita.fr>
24541
24542 * src/files.c (guard_obstack): New.
24543 (open_files): Initialize it.
24544 (output_files): Dump it...
24545 * src/files.h: Export it.
24546 * src/reader.c (copy_guard): Use it.
24547
24548 2000-12-19 Akim Demaille <akim@epita.fr>
24549
24550 * src/files.c (outfile, defsfile, actfile): Removed as global
24551 vars.
24552 (open_files): Don't compute them.
24553 (output_files): Adjust.
24554 (base_name, short_base_name): Be global.
24555 Adjust dependencies.
24556
24557 2000-12-19 Akim Demaille <akim@epita.fr>
24558
24559 * src/files.c (strsuffix): New.
24560 (stringappend): Be just like strcat but allocate.
24561 (base_names): Eve out from open_files.
24562 Try to simplify the rather hairy computation of base_name and
24563 short_base_name.
24564 (open_files): Use it.
24565 * tests/suite.at (Checking output file names): New test.
24566
24567 2000-12-19 Akim Demaille <akim@epita.fr>
24568
24569 * src/system.h (obstack_grow_literal_string): Rename as...
24570 (obstack_grow_string): this.
24571 * src/output.c (output_parser): Recognize `%% actions' instead of
24572 `$'.
24573 * src/bison.s1: s/$/%% actions/.
24574 * src/bison.hairy: Likewise.
24575
24576 2000-12-19 Akim Demaille <akim@epita.fr>
24577
24578 * src/output.c (output_parser): Compute the `#line' lines when
24579 there are.
24580 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
24581 Suggested by Hans Aberg.
24582
24583 2000-12-19 Akim Demaille <akim@epita.fr>
24584
24585 Let the handling of the skeleton files be local to the procedures
24586 that use it.
24587
24588 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
24589 longer static.
24590 (fparser, open_extra_files): Remove.
24591 (open_files, output_files): Don't take care of fparser.
24592 * src/files.h: Adjust.
24593 * src/output.c (output_parser): Open and close the file to the
24594 skeleton.
24595 * src/reader.c (read_declarations): When %semantic_parser, open
24596 fguard.
24597
24598 2000-12-19 Akim Demaille <akim@epita.fr>
24599
24600 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
24601 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
24602
24603 2000-12-19 Akim Demaille <akim@epita.fr>
24604
24605 * src/files.c (open_files): Yipee! We no longer need all the code
24606 looking for `/tmp' since we have no tmp file.
24607
24608 2000-12-19 Akim Demaille <akim@epita.fr>
24609
24610 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
24611 New macros.
24612 * src/files.c (open_files): Less dependency on MSDOS etc.
24613
24614 2000-12-14 Akim Demaille <akim@epita.fr>
24615
24616 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
24617 Provide a default definition.
24618 Use it when executing the default @ action.
24619 * src/reader.c (reader_output_yylsp): No longer include
24620 `timestamp' and `text' in the default YYLTYPE.
24621
24622 2000-12-12 Akim Demaille <akim@epita.fr>
24623
24624 * src/reader.c (copy_definition, parse_union_decl, copy_action)
24625 (copy_guard): Quote the file names.
24626 Reported by Laurent Mascherpa.
24627
24628 2000-12-12 Akim Demaille <akim@epita.fr>
24629
24630 * src/output.c (output_headers, output_program, output): Be sure
24631 to escape special characters when outputting filenames.
24632 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
24633 (output_headers): Don't depend on them, Use ACTSTR.
24634
24635 2000-11-17 Akim Demaille <akim@epita.fr>
24636
24637 * lib/obstack.h: Formatting changes.
24638 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
24639 prevents type checking.
24640 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24641 cast the value to (void *): assigning a `foo *' to a `void *'
24642 variable is valid.
24643 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24644 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
24645 append characters.
24646
24647 2000-11-17 Akim Demaille <akim@epita.fr>
24648
24649 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
24650 as...
24651 (suite.m4, regression.m4, calc.m4): these.
24652 * tests/atgeneral.m4: Update from CVS Autoconf.
24653
24654 2000-11-17 Akim Demaille <akim@epita.fr>
24655
24656 * tests/regression.m4 (%union and --defines): New test,
24657 demonstrating a current bug in the obstack implementation.
24658
24659 2000-11-17 Akim Demaille <akim@epita.fr>
24660
24661 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
24662 macros.
24663 Use them to declare the variables which are global or local to
24664 `yyparse'.
24665
24666 2000-11-17 Akim Demaille <akim@epita.fr>
24667
24668 * acconfig.h: Remove, no longer used.
24669
24670 2000-11-07 Akim Demaille <akim@epita.fr>
24671
24672 * src: s/Copyright (C)/Copyright/g.
24673
24674 2000-11-07 Akim Demaille <akim@epita.fr>
24675
24676 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
24677 defining.
24678 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
24679
24680 2000-11-07 Akim Demaille <akim@epita.fr>
24681
24682 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
24683 Merge in a single CPP if/else.
24684
24685 2000-11-07 Akim Demaille <akim@epita.fr>
24686
24687 * src/output.c (output): Remove useless variables.
24688 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
24689 argument `data' for consistency with the prototypes.
24690 Qualify it `const'.
24691 (obstack_copy, obstack_copy0): Rename the second argument as
24692 `address' for consistency. Qualify it `const'.
24693 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
24694 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
24695 `const' their input argument (`data' or `address').
24696 Adjust the corresponding macros to include `const' in casts.
24697
24698 2000-11-03 Akim Demaille <akim@epita.fr>
24699
24700 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
24701 s/PFILE1/BISON_HAIRY/.
24702 Adjust dependencies.
24703
24704 2000-11-03 Akim Demaille <akim@epita.fr>
24705
24706 For some reason, this was not applied.
24707
24708 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24709 `unlink': it's no longer used.
24710
24711 2000-11-03 Akim Demaille <akim@epita.fr>
24712
24713 * src/files.c (skeleton_find): New function, eved out of...
24714 (open_files, open_extra_files): here.
24715
24716 2000-11-03 Akim Demaille <akim@epita.fr>
24717
24718 Don't use `atexit'.
24719
24720 * src/files.c (obstack_save): New function.
24721 (done): Rename as...
24722 (output_files): this.
24723 Use `obstack_save'.
24724 * src/main.c (main): Don't use `atexit' to register `done', since
24725 it no longer has to remove tmp files, just call `output_files'
24726 when there are no errors.
24727
24728 2000-11-02 Akim Demaille <akim@epita.fr>
24729
24730 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24731 `unlink': it's no longer used.
24732 * src/files.h: Formatting changes.
24733
24734 2000-11-02 Akim Demaille <akim@epita.fr>
24735
24736 Remove the last uses of mktemp and unlink/delete.
24737
24738 * src/files.c (fdefines, ftable): Removed.
24739 (defines_ostack, table_obstack): New.
24740 Adjust dependencies of the former into uses of the latter.
24741 * src/output.c (output_short_or_char_table, output_short_table):
24742 Convert to using obstacks.
24743 * src/reader.c (copy_comment2): Accept one FILE * and two
24744 obstacks.
24745 (output_token_defines, reader_output_yylsp): Use obstacks.
24746 * src/system.h (obstack_fgrow3): New.
24747 * po/POTFILES.in: Adjust.
24748
24749 2000-11-01 Akim Demaille <akim@epita.fr>
24750
24751 Change each use of `fattrs' into a use of `attrs_obstack'.
24752
24753 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
24754 * src/files.c (fattrs): Remove.
24755 (attrs_obstack): New.
24756 Adjust all dependencies.
24757 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
24758
24759 2000-11-01 Akim Demaille <akim@epita.fr>
24760
24761 Introduce obstacks.
24762 Change each use of `faction' into a use of `action_obstack'.
24763
24764 * lib/obstack.h, lib/obstack.c: New files.
24765 * src/files.c (faction): Remove.
24766 (action_obstack): New.
24767 Adjust all dependencies.
24768
24769 2000-10-20 Akim Demaille <akim@epita.fr>
24770
24771 * lib/quote.h (PARAMS): New macro. Use it.
24772
24773 2000-10-16 Akim Demaille <akim@epita.fr>
24774
24775 * src/output.c (output_short_or_char_table): New function.
24776 (output_short_table, output_token_translations): Use it.
24777 (goto_actions): Use output_short_table.
24778
24779 2000-10-16 Akim Demaille <akim@epita.fr>
24780
24781 * src/symtab.c (bucket_new): New function.
24782 (getsym): Use it.
24783
24784 * src/output.c (output_short_table): New argument to display the
24785 comment associated with the table.
24786 Adjust dependencies.
24787 (output_gram): Use it.
24788 (output_rule_data): Nicer output layout for YYTNAME.
24789
24790 2000-10-16 Akim Demaille <akim@epita.fr>
24791
24792 * src/lex.c (read_typename): New function.
24793 (lex): Use it.
24794 * src/reader.c (copy_dollar): Likewise.
24795
24796 2000-10-16 Akim Demaille <akim@epita.fr>
24797
24798 * src/reader.c (copy_comment2): Expect the input stream to be on
24799 the `/' which is suspected to open a comment, instead of being
24800 called after `//' or `/*' was read.
24801 (copy_comment, copy_definition, parse_union_decl, copy_action)
24802 (copy_guard): Adjust.
24803
24804 2000-10-16 Akim Demaille <akim@epita.fr>
24805
24806 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
24807 `read_signed_integer'.
24808
24809 2000-10-16 Akim Demaille <akim@epita.fr>
24810
24811 * src/reader.c (copy_dollar): New function.
24812 (copy_guard, copy_action): Use it.
24813
24814 2000-10-16 Akim Demaille <akim@epita.fr>
24815
24816 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
24817 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
24818 New files, from Fileutils 4.0.27.
24819 * src/main.c (printable_version): Remove.
24820 * src/lex.c, src/reader.c: Use `quote'.
24821
24822 2000-10-04 Akim Demaille <akim@epita.fr>
24823
24824 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
24825
24826 2000-10-04 Akim Demaille <akim@epita.fr>
24827
24828 * doc/bison.texinfo: Various typos spotted by Neil Booth.
24829
24830 2000-10-04 Akim Demaille <akim@epita.fr>
24831
24832 When a literal string is used to define two different tokens,
24833 `bison -v' segfaults.
24834 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
24835
24836 * tests/regression.m4: New file.
24837 Include the core of the sample provided by Piotr Gackiewicz.
24838 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
24839 properly.
24840
24841 2000-10-04 Akim Demaille <akim@epita.fr>
24842
24843 * src/reader.c (parse_expect_decl): Keep `count' within the size
24844 of `buffer'.
24845 From Neil Booth.
24846
24847 2000-10-02 Paul Eggert <eggert@twinsun.com>
24848
24849 * bison.s1 (yyparse): Assign the default value
24850 unconditionally, to avoid a GCC warning and make the parser a
24851 tad smaller.
24852
24853 2000-10-02 Akim Demaille <akim@epita.fr>
24854
24855 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
24856 options.
24857
24858 2000-10-02 Akim Demaille <akim@epita.fr>
24859
24860 * src/derives.c, src/print.c, src/reduce.c: To ease the
24861 translation, move some `\n' out of the translated strings.
24862
24863 2000-10-02 Akim Demaille <akim@epita.fr>
24864
24865 The location tracking mechanism is precious for parse error
24866 messages. Nevertheless, it is enabled only when `@n' is used in
24867 the grammar, which is a different issue (you can use it in error
24868 message, but not in the grammar per se). Therefore, there should
24869 be another means to enable it.
24870
24871 * src/getargs.c (getargs): Support `--locations'.
24872 (usage): Report it.
24873 * src/getargs.h (locationsflag): Export it.
24874 * src/lex.c (percent_table): Support `%locations'.
24875 * src/reader.c (yylsp_needed): Remove this variable, now replaced
24876 with `locationsflag'.
24877 * doc/bison.texinfo: Document `--locations' and `%locations'.
24878 Sort the options.
24879 * tests/calc.m4: Test it.
24880
24881 For regularity of the names, replace each
24882 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
24883 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
24884 In addition replace each `flag' with `_flag'.
24885
24886 2000-10-02 Akim Demaille <akim@epita.fr>
24887
24888 Also test parse error messages, including with YYERROR_VERBOSE.
24889
24890 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
24891 associative).
24892 Use it to check the computations.
24893 Use it to check `nonassoc' is honored.
24894 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
24895 `--yyerror-verbose'.
24896 (_AT_CHECK_CALC): Adjust to this option.
24897 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
24898
24899 2000-10-02 Akim Demaille <akim@epita.fr>
24900
24901 Test also `--verbose', `--defines' and `--name-prefix'. Testing
24902 the latter demonstrates a flaw in the handling of non debugging
24903 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
24904 was used in order to simplify:
24905
24906 #if YYDEBUG
24907 if (yydebug)
24908 {
24909 ...
24910 }
24911 #endif
24912
24913 into
24914
24915 if (yydebug)
24916 {
24917 ...
24918 }
24919
24920 unfortunately this leads to a CPP conflict when
24921 `--name-prefix=foo' is used since it produces `#define yydebug
24922 foodebug'.
24923
24924 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
24925 (YYDPRINTF): New macro.
24926 Spread its use.
24927 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
24928 the bison options.
24929 Also test `--verbose', `--defines' and `--name-prefix'.
24930
24931 2000-10-02 Akim Demaille <akim@epita.fr>
24932
24933 Improve the readability of the produced parsers.
24934
24935 * src/bison.s1: Formatting changes.
24936 Improve the comment related to the `$' mark.
24937 (yydefault): Don't fall through to `yyresume': `goto' there.
24938 * src/output.c (output_parser): When the `$' is met, skip the end
24939 of its line.
24940 New variable, `number_of_dollar_signs', to check there's exactly
24941 one `$' in the parser skeleton.
24942
24943 2000-10-02 Akim Demaille <akim@epita.fr>
24944
24945 * lib/xstrdup.c: New file, from the fileutils.
24946 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
24947 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
24948 instead of strlen + xmalloc + strcpy.
24949 * src/symtab.c (copys): Remove, use xstrdup instead.
24950
24951 2000-10-02 Akim Demaille <akim@epita.fr>
24952
24953 * src/gram.h (associativity): New enum type which replaces the
24954 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
24955 `right_assoc', `left_assoc' and `non_assoc'.
24956 Adjust all dependencies.
24957 * src/reader.c: Formatting changes.
24958 (LTYPESTR): Don't define it, use it as a literal in
24959 `reader_output_yylsp'.
24960 * src/symtab.h (symbol_class): New enum type which replaces the
24961 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
24962 `sunknown', `stoken and `snterm'.
24963
24964 2000-10-02 Akim Demaille <akim@epita.fr>
24965
24966 * src/getargs.c (fixed_outfiles): Rename as...
24967 (yaccflag): for consistency and accuracy.
24968 Adjust dependencies.
24969
24970 2000-10-02 Akim Demaille <akim@epita.fr>
24971
24972 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
24973 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
24974 difficult and introduced a lot of core dump. It turns out that
24975 Bison used an implementation of `xmalloc' based on `calloc', and
24976 at various places it does depend upon the initialization to 0. I
24977 have not tried to isolate the pertinent places, and all the former
24978 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
24979 someone should address this issue.
24980
24981 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
24982 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
24983 files.
24984 Adjust dependencies.
24985 * src/warshall.h: New file.
24986 Propagate.
24987
24988 2000-10-02 Akim Demaille <akim@epita.fr>
24989
24990 Various anti-`extern in *.c' changes.
24991
24992 * src/system.h: Include `assert.h'.
24993
24994 2000-10-02 Akim Demaille <akim@epita.fr>
24995
24996 * src/state.h (nstates, final_state, first_state, first_shift)
24997 (first_reduction): Move their exportation from here...
24998 * src/LR0.h: to here.
24999 Adjust dependencies.
25000 * src/getargs.c (statisticsflag): New variable.
25001 Add support for `--statistics'.
25002 Adjust dependencies.
25003
25004 Remove a lot of now useless `extern' statements in most files.
25005
25006 2000-10-02 Akim Demaille <akim@epita.fr>
25007
25008 * src/LR0.h: New file.
25009 Propagate its use.
25010
25011 2000-10-02 Akim Demaille <akim@epita.fr>
25012
25013 * src/print.h: New file.
25014 Propagate its use.
25015 * src/print.c: Formatting and ordering changes.
25016 (verbose, terse): Replace with...
25017 (print_results): this new function.
25018 Adjust dependencies.
25019
25020 2000-10-02 Akim Demaille <akim@epita.fr>
25021
25022 * src/conflicts.c (conflict_report): New function.
25023 (conflict_log, verbose_conflict_log): Replace with...
25024 (print_conflicts): this function.
25025 Adjust dependencies.
25026 * src/conflicts.h: New file.
25027 Propagate its inclusion.
25028
25029 2000-10-02 Akim Demaille <akim@epita.fr>
25030
25031 * src/nullable.h: New file.
25032 Propagate its inclusion.
25033 * src/nullable.c: Formatting changes.
25034
25035 2000-10-02 Akim Demaille <akim@epita.fr>
25036
25037 * src/reduce.h: New file.
25038 Propagate its inclusion.
25039 * src/reduce.c: Topological sort and other formatting changes.
25040 (bool, TRUE, FALSE): Move their definition to...
25041 * src/system.h: here.
25042
25043 2000-10-02 Akim Demaille <akim@epita.fr>
25044
25045 * src/files.c: Formatting changes.
25046 (tryopen, tryclose, openfiles): Rename as...
25047 (xfopen, xfclose, open_files): this.
25048 (stringappend): static.
25049 * src/files.h: Complete the list of exported symbols.
25050 Propagate its use.
25051
25052 2000-10-02 Akim Demaille <akim@epita.fr>
25053
25054 * src/reader.h: New file.
25055 Propagate its use instead of tedious list of `extern' and
25056 prototypes.
25057 * src/reader.c: Formatting changes, topological sort,
25058 s/register//.
25059
25060 2000-10-02 Akim Demaille <akim@epita.fr>
25061
25062 * src/lex.h: Prototype `lex.c' exported functions.
25063 * src/reader.c: Adjust.
25064 * src/lex.c: Formatting changes.
25065 (safegetc): Rename as...
25066 (xgetc): this.
25067
25068 2000-10-02 Akim Demaille <akim@epita.fr>
25069
25070 * src/lalr.h: New file.
25071 Propagate its inclusion instead of prototypes and `extern'.
25072 * src/lalr.c: Formatting changes, topological sorting etc.
25073
25074 2000-10-02 Akim Demaille <akim@epita.fr>
25075
25076 * src/output.c (token_actions): Introduce a temporary array,
25077 YYDEFACT, that makes it possible for this function to use
25078 output_short_table.
25079
25080 2000-10-02 Akim Demaille <akim@epita.fr>
25081
25082 `user_toknums' is output as a `short[]' in `output.c', while it is
25083 defined as a `int[]' in `reader.c'. For consistency with the
25084 other output tables, `user_toknums' is now defined as a table of
25085 shorts.
25086
25087 * src/reader.c (user_toknums): Be a short table instead of an int
25088 table.
25089 Adjust dependencies.
25090
25091 Factor the short table outputs.
25092
25093 * src/output.c (output_short_table): New function.
25094 * src/output.c (output_gram, output_stos, output_rule_data)
25095 (output_base, output_table, output_check): Use it.
25096
25097 2000-10-02 Akim Demaille <akim@epita.fr>
25098
25099 * src/output.c (output): Topological sort of the functions, in
25100 order to get rid of the `static' prototypes.
25101 No longer use `register'.
25102 * src/output.h: New file.
25103 Propagate its inclusion in files explicitly prototyping functions
25104 from output.c.
25105
25106 2000-09-21 Akim Demaille <akim@epita.fr>
25107
25108 * src/atgeneral.m4: Update from Autoconf.
25109
25110 2000-09-21 Akim Demaille <akim@epita.fr>
25111
25112 * src/closure.h: New file.
25113 * src/closure.c: Formatting changes, topological sort over the
25114 functions, use of closure.h.
25115 (initialize_closure, finalize_closure): Rename as...
25116 (new_closure, free_closure): these. Adjust dependencies.
25117 * src/LR0.c: Formatting changes, topological sort, use of
25118 cloture.h.
25119 (initialize_states): Rename as...
25120 (new_states): this.
25121 * src/Makefile.am (noinst_HEADERS): Adjust.
25122
25123 2000-09-20 Akim Demaille <akim@epita.fr>
25124
25125 * src/acconfig.h: Don't protect config.h against multiple
25126 inclusion.
25127 Don't define PARAMS.
25128 * src/system.h: Define PARAMS.
25129 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
25130 purpose of config.h. system.h must not try to fix wrong
25131 definitions in config.h.
25132
25133 2000-09-20 Akim Demaille <akim@epita.fr>
25134
25135 * src/derives.h: New file.
25136 * src/main.c, src/derives.h: Use it.
25137 Formatting changes.
25138 * src/Makefile.am (noinst_HEADERS): Adjust.
25139
25140 2000-09-20 Akim Demaille <akim@epita.fr>
25141
25142 * tests/atgeneral.m4: Update from Autoconf.
25143 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
25144 (AT_CHECK_CALC): New macros.
25145 Use these macros to test bison with options `', `--raw',
25146 `--debug', `--yacc', `--yacc --debug'.
25147
25148 2000-09-19 Akim Demaille <akim@epita.fr>
25149
25150 * src/output.c: Formatting changes.
25151 * src/machine.h: Remove, leaving its contents in...
25152 * src/system.h: here.
25153 Include stdio.h.
25154 Adjust all dependencies on stdio.h and machine.h.
25155 * src/getargs.h: New file.
25156 Let all `extern' declarations about getargs.c be replaced with
25157 inclusion of `getargs.h'.
25158 * src/Makefile.am (noinst_HEADERS): Adjust.
25159
25160 * tests/calc.m4 (yyin): Be initialized in main, not on the global
25161 scope.
25162 (yyerror): Returns void, not int.
25163 * doc/bison.texinfo: Formatting changes.
25164
25165 2000-09-19 Akim Demaille <akim@epita.fr>
25166
25167 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
25168 portable.
25169
25170 2000-09-18 Akim Demaille <akim@epita.fr>
25171
25172 * configure.in: Append WARNING_CFLAGS to CFLAGS.
25173 * src/Makefile.am (INCLUDES): Don't.
25174 Be ready to fetch headers in lib/.
25175
25176 2000-09-18 Akim Demaille <akim@epita.fr>
25177
25178 * doc/bison.texinfo: Update the copyright.
25179 ANSIfy and GNUify the examples.
25180 Remove the old menu.
25181
25182 2000-09-18 Akim Demaille <akim@epita.fr>
25183
25184 First set of tests: use the `calc' example from the documentation.
25185
25186 * src/bison.s1 (yyparse): Condition the code using `yytname' which
25187 is defined only when YYDEBUG is.
25188 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
25189 * src/files.c (tryopen, tryclose): Formatting changes.
25190 Move to the top and be static.
25191 * src/reader.c (read_signed_integer): Likewise.
25192 * tests/calc.m4: New file.
25193 * Makefile.am, suite.m4: Adjust.
25194 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
25195
25196 2000-09-18 Akim Demaille <akim@epita.fr>
25197
25198 Add support for an Autotest test suite for Bison.
25199
25200 * m4/m4.m4, m4/atconfig.m4: New files.
25201 * m4/Makefile.am (EXTRA_DIST): Adjust.
25202 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
25203 files.
25204 * src/getargs.c: Display a more standard --version message.
25205 * src/reader.c (reader): Formatting changes.
25206 No longer depend upon VERSION_STRING.
25207 * configure.in: No longer use `dnl'.
25208 Set up the test suite and the new directory `tests/.
25209 (VERSION_STRING): Remove.
25210
25211 2000-04-14 Akim Demaille <akim@epita.fr>
25212
25213 * src/reader.c (copy_comment2): New function, same as former
25214 `copy_comment', but outputs into two FILE *.
25215 (copy_comment): Use it.
25216 (parse_union_decl): Use it.
25217 (get_type, parse_start_decl): Use the same `invalid' message.
25218 (parse_start_decl, parse_union_decl): Use the same `multiple'
25219 message.
25220 (parse_union_decl, copy_guard, copy_action): Use the same
25221 `unmatched' message.
25222 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
25223
25224 2000-03-31 Akim Demaille <akim@epita.fr>
25225
25226 * src/files.c (tryopen, tryclose): Move to the top.
25227 Be static.
25228
25229 2000-03-31 Akim Demaille <akim@epita.fr>
25230
25231 * src/main.c (main): Don't call `done', exit does it.
25232
25233 2000-03-31 Akim Demaille <akim@epita.fr>
25234
25235 * allocate.c: s/return (foo)/return foo/.
25236 * lalr.c: Likewise.
25237 * LR0.c: Likewise.
25238 * output.c: Likewise.
25239 * reader.c: Likewise.
25240 * symtab.c: Likewise.
25241 * vmsgetargs.c: Likewise.
25242
25243 2000-03-31 Akim Demaille <akim@epita.fr>
25244
25245 Clean up the error reporting functions.
25246
25247 * src/report.c: New file.
25248 * src/report.h: Likewise.
25249 * src/Makefile.am: Adjust.
25250 * m4/error.m4: New file.
25251 * m4/Makefile.am: Adjust.
25252 * configure.in (jm_PREREQ_ERROR): Call it.
25253 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
25254 Remove.
25255 (fatal, fatals): Remove. All callers use complain.c::fatal.
25256 (warn, warni, warns, warnss, warnss): Remove. All callers use
25257 complain.c::complain.
25258 (toomany): Remove, use fatal instead.
25259 * src/files.c (done): No argument, use complain_message_count.
25260 * src/main.c (main): Register `done' to `atexit'.
25261
25262 * src/getargs.c (usage): More `fputs', less `fprintf'.
25263
25264 2000-03-28 Akim Demaille <akim@epita.fr>
25265
25266 * lib/: New directory.
25267 * Makefile.am (SUBDIRS): Adjust.
25268 * configure.in: Adjust.
25269 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
25270 useless.
25271 * src/alloca.c: Moved to lib/.
25272 * src/getopt.c: Likewise.
25273 * src/getopt1.c: Likewise.
25274 * src/getopt.h: Likewise.
25275 * src/ansi2knr.c: Likewise.
25276 * src/ansi2knr.1: Likewise.
25277 * src/Makefile.am: Adjust.
25278 * lib/Makefile.am: New file.
25279
25280 2000-03-28 Akim Demaille <akim@epita.fr>
25281
25282 * src/getargs.c (usage): Refresh the help message.
25283
25284 2000-03-17 Akim Demaille <akim@epita.fr>
25285
25286 * src/getopt1.c: Updated from textutils 2.0e
25287 * src/getopt.c: Likewise.
25288 * src/getopt.h: Likewise.
25289
25290 2000-03-17 Akim Demaille <akim@epita.fr>
25291
25292 * src/Makefile.am (bison.simple): Fix the awk program: quote only
25293 the file name, not the whole `#line LINE FILE'.
25294
25295 2000-03-17 Akim Demaille <akim@epita.fr>
25296
25297 On syntax errors, report the token on which we choked.
25298
25299 * src/bison.s1 (yyparse): In the label yyerrlab, when
25300 YYERROR_VERBOSE, add yychar in msg.
25301
25302 2000-03-17 Akim Demaille <akim@epita.fr>
25303
25304 * src/reader.c (copy_at): New function.
25305 (copy_guard): Use it.
25306 (copy_action): Use it.
25307
25308 2000-03-17 Akim Demaille <akim@epita.fr>
25309
25310 Be kind to translators, save some useless translations.
25311
25312 * src/main.c (banner): New function.
25313 (fatal_banner): Use it.
25314 (warn_banner): Use it.
25315
25316 2000-03-17 Akim Demaille <akim@epita.fr>
25317
25318 * src/reader.c (copy_definition): Use copy_string and
25319 copy_comment. Removed now unused `match', `ended',
25320 `cplus_comment'.
25321 (copy_comment, copy_string): Moved, to be visible from
25322 copy_definition.
25323
25324 2000-03-17 Akim Demaille <akim@epita.fr>
25325
25326 * src/reader.c (copy_string): Declare `static inline'. No
25327 problems with inline, since it is checked by configure.
25328 (copy_comment): Likewise.
25329
25330 2000-03-17 Akim Demaille <akim@epita.fr>
25331
25332 * src/reader.c (packsymbols): Formatting changes.
25333
25334 2000-03-17 Akim Demaille <akim@epita.fr>
25335
25336 * src/reader.c (copy_comment): New function, factored out from:
25337 (copy_action): Use it. Removed now unused `match', `ended',
25338 `cplus_comment'.
25339 (copy_guard): Likewise.
25340
25341 2000-03-17 Akim Demaille <akim@epita.fr>
25342
25343 * src/reader.c (copy_string): New function, factored out from:
25344 (copy_action): Use it.
25345 (copy_guard): Likewise.
25346
25347 2000-03-17 Akim Demaille <akim@epita.fr>
25348
25349 Change the handling of @s so that they behave exactly like $s.
25350 There is now a pseudo variable @$ (readble and writable), location
25351 of the lhs of the rule (by default ranging from the location of
25352 the first symbol of the rhs, to the location of the last symbol,
25353 or, if the rhs is empty, YYLLOC).
25354
25355 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
25356 yyval.
25357 (yyparse): When providing a default semantic action, provide a
25358 default location action.
25359 (after the $): No longer change `*YYLSP', just stack YYLOC the
25360 same way you stack YYVAL.
25361 * src/reader.c (read_declarations): Use warns.
25362 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
25363 (copy_action, case '@'): Likewise.
25364 Use a standard error message, to save useless work from
25365 translators.
25366
25367 2000-03-17 Akim Demaille <akim@epita.fr>
25368
25369 * src/bison.s1: Formatting and cosmetics changes.
25370 * src/reader.c: Likewise.
25371 Update the Copyright notice.
25372
25373 2000-03-17 Akim Demaille <akim@epita.fr>
25374
25375 * src/bison.s1 (#line): All set to `#line' only, since the
25376 Makefile now handles them.
25377
25378 2000-03-16 Akim Demaille <akim@epita.fr>
25379
25380 * src/output.c (output_rule_data): Output the documentation of
25381 some of the tables.
25382 (Copyright notice): Update.
25383 Formatting changes.
25384
25385 2000-03-16 Akim Demaille <akim@epita.fr>
25386
25387 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
25388 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
25389 One `#if YYDEBUG' remains, since it uses variables which are
25390 defined only if `YYDEBUG != 0'.
25391
25392 2000-03-16 Akim Demaille <akim@epita.fr>
25393
25394 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
25395 and related variables so that the similarities are highlighted.
25396
25397 2000-03-16 Akim Demaille <akim@epita.fr>
25398
25399 * src/bison.s1: Properly indent CPP directives.
25400
25401 2000-03-16 Akim Demaille <akim@epita.fr>
25402
25403 * src/bison.s1: Properly indent the `alloca' CPP section.
25404
25405 2000-03-16 Akim Demaille <akim@epita.fr>
25406
25407 Do not hard code values of directories in `configure.in'.
25408 Update the `configure' tool chain.
25409
25410 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
25411 src/makefile.am.
25412 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
25413 (AC_OUTPUT): Add m4/Makefile.
25414 Bump to bison 1.28a, 1.29 has never been released.
25415 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
25416 handled via src/Makefile.am.
25417 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
25418 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
25419 autoheader.
25420 * Makefile.am (SUBDIRS): Add m4.
25421 (ACLOCAL_AM_FLAGS): New variable.
25422 (AUTOMAKE_OPTIONS): Add check-news.
25423 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
25424 the proper line number and file name.
25425 (DEFS): Propagate the location of bison library files and of the
25426 locale files.
25427 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
25428 builddir.
25429 * acinclude.m4: Remove, replaced by the directory m4.
25430 * m4/Makefile.am (EXTRA_DIST): New variable.
25431 * m4/gettext.m4: New file, from the fileutils.
25432 * m4/lcmessage.m4: Likewise
25433 * m4/progtest.m4: Likewise.
25434 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
25435
25436 2000-03-10 Akim Demaille <akim@epita.fr>
25437
25438 * src/closure.c:
25439 Formatting changes of various comments.
25440 Respect the GNU coding standards at various places.
25441 Don't use `_()' when no translation is needed.
25442
25443 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25444
25445 * src/files.c:
25446 OS/2 honors TMPDIR environment variable.
25447
25448 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25449
25450 * doc/bison.texinfo: Tweaked spelling and grammar.
25451 Updated ISBN.
25452 Removed reference to price of printed copy.
25453 Mention BISON_SIMPLE and BISON_HAIRY.
25454
25455 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25456
25457 * configure.in, NEWS:
25458 Bison 1.29 released.
25459
25460 1999-10-27 Jesse Thilo <jthilo@gnu.org>
25461
25462 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
25463 Added reference card.
25464
25465 1999-07-26 Jesse Thilo <jthilo@gnu.org>
25466
25467 * po/ru.po: Added Russian translation.
25468
25469 1999-07-26 Jesse Thilo <jthilo@gnu.org>
25470
25471 * configure.in: Added Russian translation.
25472
25473 1999-07-06 Jesse Thilo <jthilo@gnu.org>
25474
25475 * configure.in, NEWS, README:
25476 Released version 1.28.
25477
25478 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25479
25480 * src/system.h:
25481 Squashed redefinition warning on some systems.
25482
25483 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
25484 Have configure build version string instead of relying on ANSI string
25485 concatentation.
25486
25487 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25488
25489 * po/POTFILES.in: Got rid of version.c.
25490
25491 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25492
25493 * acconfig.h, configure.in:
25494 Have configure build version string instead of relying on ANSI string
25495 concatentation.
25496
25497 1999-06-08 Jesse Thilo <jthilo@gnu.org>
25498
25499 * doc/bison.1:
25500 Dropped mention of `+' for long-named options.
25501
25502 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25503
25504 * src/files.c: Added <unistd.h> for unlink().
25505
25506 * src/Makefile.am, src/system.h:
25507 I18n fixes.
25508
25509 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25510
25511 * README: Added a FAQ list.
25512
25513 * configure.in, acconfig.h:
25514 I18n fixes.
25515
25516 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25517
25518 * doc/FAQ, doc/Makefile.am:
25519 Added a FAQ list.
25520
25521 1999-05-19 Jesse Thilo <jthilo@gnu.org>
25522
25523 * src/alloc.h, src/symtab.h, src/version.c:
25524 Protected inclusion of "config.h" with HAVE_CONFIG_H.
25525
25526 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25527
25528 * src/.cvsignore, src/Makefile.am:
25529 Reorganized: sources in `src', documentation in `doc'.
25530
25531 * src/lex.c (literalchar):
25532 fixed the code for escaping double quotes (thanks
25533 Jonathan Czisny.)
25534
25535 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25536
25537 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
25538 Adjusted paths to reflect directory reorganization.
25539
25540 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25541
25542 * doc/.cvsignore, doc/Makefile.am:
25543 Reorganized: sources in `src', documentation in `doc'.
25544
25545 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25546
25547 * configure.in:
25548 Updated AC_INIT file to reflect directory reorganization.
25549
25550 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
25551 Reorganized: sources in `src', documentation in `doc'.
25552
25553 1999-04-13 Jesse Thilo <jthilo@gnu.org>
25554
25555 * src/allocate.c:
25556 Don't declare calloc() and realloc() if not necessary.
25557
25558 1999-04-13 Jesse Thilo <jthilo@gnu.org>
25559
25560 * configure.in, acconfig.h, acinclude.m4:
25561 Don't declare calloc() and realloc() if not necessary.
25562
25563 1999-03-23 Jesse Thilo <jthilo@gnu.org>
25564
25565 * po/.cvsignore: Added i18n support.
25566
25567 1999-03-23 Jesse Thilo <jthilo@gnu.org>
25568
25569 * acconfig.h, configure.in, Makefile.am:
25570 Added i18n support.
25571
25572 1999-03-22 Jesse Thilo <jthilo@gnu.org>
25573
25574 * src/bison.s1: Fixed #line numbers.
25575
25576 1999-03-15 Jesse Thilo <jthilo@gnu.org>
25577
25578 * po/es.po, po/fr.po, po/nl.po, po/de.po:
25579 Added PO files from Translation Project.
25580
25581 1999-03-03 Jesse Thilo <jthilo@gnu.org>
25582
25583 * Makefile.am:
25584 Added support for non-ANSI compilers (ansi2knr).
25585
25586 1999-02-16 Jesse Thilo <jthilo@gnu.org>
25587
25588 * configure.in: Bumped version number to 1.27.
25589
25590 * Makefile.am:
25591 Added `bison.simple' to list of files removed by `make distclean'.
25592
25593 1999-02-12 Jesse Thilo <jthilo@gnu.org>
25594
25595 * src/files.c, src/files.h:
25596 Defined locations of parser files in config.h instead of Makefile.
25597
25598 1999-02-12 Jesse Thilo <jthilo@gnu.org>
25599
25600 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
25601 Defined locations of parser files in config.h instead of Makefile.
25602
25603 1999-02-09 Jesse Thilo <jthilo@gnu.org>
25604
25605 * Makefile.am:
25606 Removed inappropriate use of $< macro.
25607
25608 1999-02-05 Jesse Thilo <jthilo@gnu.org>
25609
25610 * po/Makefile.in.in, po/POTFILES.in:
25611 Add `po' directory skeleton.
25612
25613 1999-01-27 Jesse Thilo <jthilo@gnu.org>
25614
25615 * README: Document help-bison list.
25616
25617 * configure.in: Add check for mkstemp().
25618
25619 1999-01-20 Jesse Thilo <jthilo@gnu.org>
25620
25621 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
25622 Hush a few compiler warnings.
25623
25624 * src/files.c:
25625 Add tryclose(), which verifies that fclose was successful.
25626 Hush a couple of compiler warnings.
25627
25628 1999-01-20 Jesse Thilo <jthilo@gnu.org>
25629
25630 * Makefile.am, OChangeLog:
25631 ChangeLog is now automatically generated. Include the old version as
25632 OChangeLog.
25633
25634 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25635
25636 * 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:
25637 Update FSF address.
25638
25639 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25640
25641 * doc/bison.texinfo: Fix formatting glitch.
25642
25643 * doc/bison.texinfo: Update FSF address.
25644
25645 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25646
25647 * acconfig.h: Update FSF address.
25648
25649 1999-01-08 Jesse Thilo <jthilo@gnu.org>
25650
25651 * src/system.h:
25652 Don't define PACKAGE here, since config.h defines it.
25653
25654 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25655
25656 * src/reader.c: Update copyright date.
25657
25658 * src/main.c:
25659 Ditch sprintf to statically-sized buffers in fatal/warn functions in
25660 favor of output directly to stderr (avoids buffer overruns).
25661
25662 * src/reader.c: Some checks for premature EOF.
25663
25664 * 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:
25665 Use prototypes if the compiler understands them.
25666
25667 * src/files.c: Honor TMPDIR on Unix hosts.
25668 Use prototypes if the compiler understands them.
25669
25670 * src/reader.c:
25671 Fix a couple of buffer overrun bugs.
25672 Use prototypes if the compiler understands them.
25673
25674 * src/system.h: Include unistd.h and ctype.h.
25675 Use #ifdef instead of #if for NLS symbols.
25676
25677 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25678
25679 * doc/bison.texinfo:
25680 Delete comment "consider using @set for edition number, etc..." since
25681 we now are doing so.
25682
25683 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25684
25685 * configure.in:
25686 Use prototypes if the compiler understands them.
25687
25688 * NEWS: Document 1.26 highlights.
25689
25690 * Makefile.am: Require Automake 1.3 or later.
25691
25692 * acconfig.h:
25693 Use prototypes if the compiler understands them.
25694
25695 1998-12-29 Jesse Thilo <jthilo@gnu.org>
25696
25697 * src/version.c:
25698 Use VERSION symbol from automake for version number.
25699
25700 1998-12-29 Jesse Thilo <jthilo@gnu.org>
25701
25702 * acconfig.h, configure.in, version.cin:
25703 Use VERSION symbol from automake for version number.
25704
25705 1998-11-28 Jesse Thilo <jthilo@gnu.org>
25706
25707 * Makefile.am:
25708 Distribute original version of simple parser (bison.s1), not built
25709 version (bison.simple).
25710
25711 1998-11-28 Jesse Thilo <jthilo@gnu.org>
25712
25713 * doc/bison.texinfo: Add info dir entry.
25714
25715 * doc/bison.texinfo:
25716 Let automake put version number into documentation.
25717
25718 1998-11-26 Jesse Thilo <jthilo@gnu.org>
25719
25720 * src/bison.cld, src/build.com, src/vmshlp.mar:
25721 Add non-RCS files from /gd/gnu/bison.
25722
25723 1998-11-26 Jesse Thilo <jthilo@gnu.org>
25724
25725 * doc/bison.1:
25726 Document the BISON_HAIRY and BISON_SIMPLE variables.
25727
25728 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25729
25730 * src/version.c: Build version.c automatically.
25731
25732 * src/reader.c:
25733 Fix token numbering (used to start at 258, not 257).
25734
25735 * src/system.h: Include config.h.
25736
25737 * src/getargs.c: Update bug report address.
25738
25739 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
25740 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
25741
25742 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25743
25744 * Makefile.am:
25745 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25746
25747 * configure.in, version.cin:
25748 Build version.c automatically.
25749
25750 * AUTHORS: Add AUTHORS file.
25751
25752 * README: Update bug report address.
25753
25754 * bison.simple:
25755 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25756
25757 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
25758 Add automake stuff.
25759
25760 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25761
25762 * doc/bison.texinfo: Clean up some formatting.
25763
25764 1998-05-05 Richard Stallman <rms@gnu.org>
25765
25766 * doc/bison.texinfo:
25767 Explain better why to make a pure parser.
25768
25769 1998-01-05 Richard Stallman <rms@gnu.org>
25770
25771 * src/files.c (openfiles):
25772 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
25773 find a temporary directory, if possible. Do not unlink files while
25774 they are open.
25775
25776 1997-08-25 Richard Stallman <rms@gnu.org>
25777
25778 * src/reader.c (stack_offset;):
25779 Change some warni to warns.
25780
25781 * src/lex.c (literalchar): Use warns, not warni.
25782
25783 1997-06-28 Richard Stallman <rms@gnu.org>
25784
25785 * src/bison.s1: Add a Bison version comment.
25786
25787 * src/main.c (fatal, warn, berror):
25788 Use program_name.
25789
25790 1997-06-28 Richard Stallman <rms@gnu.org>
25791
25792 * Makefile.in (bison_version): New variable.
25793 (dist): Use that variable.
25794 (bison.s1): Substitute the Bison version into bison.simple.
25795
25796 * bison.simple: Add a Bison version comment.
25797
25798 1997-06-18 Richard Stallman <rms@gnu.org>
25799
25800 * src/main.c (fatal, warn, berror):
25801 Make error messages standard.
25802 (toomany): Improve error message text.
25803
25804 * 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:
25805 new.h renamed to alloc.h.
25806
25807 1997-06-18 Richard Stallman <rms@gnu.org>
25808
25809 * Makefile.in: new.h renamed to alloc.h.
25810
25811 1997-05-24 Richard Stallman <rms@gnu.org>
25812
25813 * src/lex.c (literalchar):
25814 Fix the code for escaping \, " and '.
25815
25816 (lex): Avoid trouble when there are many chars
25817 to discard in a char literal with just several chars in it.
25818
25819 1997-05-17 Richard Stallman <rms@gnu.org>
25820
25821 * src/bison.s1:
25822 Use malloc, if using alloca is troublesome.
25823 (YYSTACK_USE_ALLOCA): New flag macro.
25824 Define it for some systems and compilers.
25825 (YYSTACK_ALLOC): New macro.
25826 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25827 If it was malloc'd, free it.
25828
25829 1997-05-17 Richard Stallman <rms@gnu.org>
25830
25831 * bison.simple:
25832 Use malloc, if using alloca is troublesome.
25833 (YYSTACK_USE_ALLOCA): New flag macro.
25834 Define it for some systems and compilers.
25835 (YYSTACK_ALLOC): New macro.
25836 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25837 If it was malloc'd, free it.
25838
25839 1997-04-23 Richard Stallman <rms@gnu.org>
25840
25841 * src/bison.s1:
25842 (alloca) [__hpux]: Always define as __builtin_alloca.
25843
25844 1997-04-23 Richard Stallman <rms@gnu.org>
25845
25846 * bison.simple:
25847 (alloca) [__hpux]: Always define as __builtin_alloca.
25848
25849 1997-04-22 Richard Stallman <rms@gnu.org>
25850
25851 * src/bison.s1:
25852 [__hpux]: Include alloca.h (right for HPUX 10)
25853 instead of declaring alloca (right for HPUX 9).
25854
25855 * src/bison.s1 (__yy_memcpy):
25856 Declare arg `count' as unsigned int.
25857 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25858
25859 1997-04-22 Richard Stallman <rms@gnu.org>
25860
25861 * bison.simple:
25862 [__hpux]: Include alloca.h (right for HPUX 10)
25863 instead of declaring alloca (right for HPUX 9).
25864
25865 * bison.simple (__yy_memcpy):
25866 Declare arg `count' as unsigned int.
25867 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25868
25869 1997-01-03 Richard Stallman <rms@gnu.org>
25870
25871 * src/allocate.c: [__STDC__ or _MSC_VER]:
25872 Declare calloc and realloc to return void *.
25873
25874 1997-01-02 Richard Stallman <rms@gnu.org>
25875
25876 * src/system.h:
25877 [_MSC_VER]: Include stdlib.h and process.h.
25878 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
25879
25880 * src/main.c (main): Return FAILURE as a value.
25881 (printable_version): Declare arg as int, not char.
25882
25883 1997-01-02 Richard Stallman <rms@gnu.org>
25884
25885 * Makefile.in (dist):
25886 Explicitly check for symlinks, and copy them.
25887
25888 1996-12-19 Richard Stallman <rms@gnu.org>
25889
25890 * src/files.c:
25891 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
25892
25893 1996-12-18 Paul Eggert <eggert@gnu.org>
25894
25895 * src/bison.s1 (yyparse):
25896 If __GNUC__ and YYPARSE_PARAM are both defined,
25897 declare yyparse to have a void * argument.
25898
25899 1996-12-18 Paul Eggert <eggert@gnu.org>
25900
25901 * bison.simple (yyparse):
25902 If __GNUC__ and YYPARSE_PARAM are both defined,
25903 declare yyparse to have a void * argument.
25904
25905 1996-12-17 Richard Stallman <rms@gnu.org>
25906
25907 * src/reduce.c (nbits): Add some casts.
25908
25909 1996-08-12 Richard Stallman <rms@gnu.org>
25910
25911 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
25912
25913 1996-08-12 Richard Stallman <rms@gnu.org>
25914
25915 * bison.simple: Test _MSDOS as well as _MSDOS_.
25916
25917 1996-07-31 Richard Stallman <rms@gnu.org>
25918
25919 * src/bison.s1:
25920 [__sun && __i386]: Include alloca.h.
25921
25922 1996-07-31 Richard Stallman <rms@gnu.org>
25923
25924 * bison.simple:
25925 [__sun && __i386]: Include alloca.h.
25926
25927 1996-07-30 Richard Stallman <rms@gnu.org>
25928
25929 * src/bison.s1: Comment change.
25930
25931 * src/bison.s1: Test _MSDOS_, not MSDOS.
25932
25933 1996-07-30 Richard Stallman <rms@gnu.org>
25934
25935 * bison.simple: Comment change.
25936
25937 * bison.simple: Test _MSDOS_, not MSDOS.
25938
25939 1996-06-01 Richard Stallman <rms@gnu.org>
25940
25941 * 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:
25942 Insert `_' macro around many string constants.
25943
25944 * src/main.c:
25945 Insert `_' macro around many string constants.
25946
25947 (main): Call setlocale, bindtextdomain and textdomain.
25948
25949 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
25950 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
25951 [ENABLE_NLS]: Include libintl.h.
25952 [ENABLE_NLS] (gettext): Define.
25953 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
25954 (N_, PACKAGE, LOCALEDIR): New macros.
25955
25956 1996-06-01 Richard Stallman <rms@gnu.org>
25957
25958 * POTFILES.in: New file.
25959
25960 * Makefile.in (allocate.o):
25961 Define target explicitly.
25962
25963 * Makefile.in (CFLAGS): Set to @CFLAGS@.
25964 (LDFLAGS): Set to @LDFLAGS@.
25965 (configure): Run autoconf only if preceding `cd' succeeds.
25966 (bison.s1): Redirect output to temporary file then move the
25967 temporary to the target, rather than redirecting directly to bison.s1.
25968 (clean): Remove config.status and config.log.
25969 (distclean): Don't remove config.status here.
25970
25971 1996-05-12 Richard Stallman <rms@gnu.org>
25972
25973 * src/bison.s1:
25974 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25975
25976 1996-05-12 Richard Stallman <rms@gnu.org>
25977
25978 * bison.simple:
25979 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25980
25981 1996-05-11 Richard Stallman <rms@gnu.org>
25982
25983 * src/bison.s1 (__yy_memcpy):
25984 Really reorder the args, as was supposedly done on Feb 14 1995.
25985 (yyparse): Calls changed accordingly.
25986
25987 1996-05-11 Richard Stallman <rms@gnu.org>
25988
25989 * Makefile.in (dist): Don't use $(srcdir).
25990
25991 * bison.simple (__yy_memcpy):
25992 Really reorder the args, as was supposedly done on Feb 14 1995.
25993 (yyparse): Calls changed accordingly.
25994
25995 1996-01-27 Richard Stallman <rms@gnu.org>
25996
25997 * src/output.c (output_rule_data):
25998 Test YYERROR_VERBOSE in the conditional
25999 around the definition of ttyname.
26000
26001 1995-12-29 Richard Stallman <rms@gnu.org>
26002
26003 * src/bison.s1:
26004 Fix line numbers in #line commands.
26005
26006 1995-12-29 Richard Stallman <rms@gnu.org>
26007
26008 * bison.simple:
26009 Fix line numbers in #line commands.
26010
26011 1995-12-27 Richard Stallman <rms@gnu.org>
26012
26013 * src/bison.s1 (YYPARSE_PARAM_DECL):
26014 In C++, make it always null.
26015 (YYPARSE_PARAM_ARG): New macro.
26016 (yyparse): Use YYPARSE_PARAM_ARG.
26017
26018 1995-12-27 Richard Stallman <rms@gnu.org>
26019
26020 * bison.simple (YYPARSE_PARAM_DECL):
26021 In C++, make it always null.
26022 (YYPARSE_PARAM_ARG): New macro.
26023 (yyparse): Use YYPARSE_PARAM_ARG.
26024
26025 1995-11-29 Richard Stallman <rms@gnu.org>
26026
26027 * doc/bison.texinfo:
26028 Describe literal string tokens, %raw, %no_lines, %token_table.
26029
26030 1995-11-29 Daniel Hagerty <hag@gnu.org>
26031
26032 * doc/bison.texinfo: Fixed update date
26033
26034 1995-10-16 Richard Stallman <rms@gnu.org>
26035
26036 * src/version.c: Version 1.25.
26037
26038 1995-10-16 Richard Stallman <rms@gnu.org>
26039
26040 * NEWS: *** empty log message ***
26041
26042 1995-10-16 Richard Stallman <rms@gnu.org>
26043
26044 * doc/bison.1, doc/bison.rnh:
26045 Add new options.
26046
26047 1995-10-15 Richard Stallman <rms@gnu.org>
26048
26049 * src/vmsgetargs.c, src/getargs.c:
26050 Added -n, -k, and -raw switches.
26051 (noparserflag, toknumflag, rawtoknumflag): New variables.
26052
26053 * src/symtab.h (SALIAS):
26054 New #define for adding aliases to %token.
26055 (struct bucket): Added `alias' field.
26056
26057 * src/reduce.c (reduce_grammar):
26058 Revise error message.
26059 (print_notices): Remove final `.' from error message.
26060
26061 * src/reader.c (reader_output_yylsp):
26062 New function.
26063 (readgram): Use `#if 0' around code that accepted %command
26064 inside grammar rules: The documentation doesn't allow it,
26065 and it will fail since the %command processors scan for the next %.
26066 (parse_token_decl): Extended the %token
26067 declaration to allow a multi-character symbol as an alias.
26068 (parse_thong_decl): New function.
26069 (read_declarations): Added %thong declarations.
26070 (read_declarations): Handle NOOP to deal with allowing
26071 % declarations as another means to specify the flags.
26072 (readgram): Allow %prec prior to semantics embedded in a rule.
26073 (skip_to_char, read_declarations, copy_definition)
26074 (parse_token_decl, parse_start_decl, parse_type_decl)
26075 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
26076 (get_type_name, copy_guard, copy_action, readgram)
26077 (get_type, packsymbols): Revised most error messages.
26078 Changed `fatal' to `warnxxx' to avoid aborting for error.
26079 Revised and use multiple warnxxx functions to avoid using VARARGS1.
26080 (read_declarations): Improve the error message for
26081 an invalid character. Do not abort.
26082 (read_declarations, copy_guard, copy_action): Use
26083 printable_version to avoid unprintable characters in printed output.
26084 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
26085 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
26086 Allow the type of a non-terminal can be given
26087 more than once, as long as all specifications give the same type.
26088
26089 * src/output.c:
26090 (output_headers, output_trailers, output, output_gram)
26091 (output_rule_data): Implement noparserflag variable.
26092 Implement toknumflag variable.
26093 (output): Call reader_output_yylsp to output LTYPESTR.
26094
26095 * src/main.c (main):
26096 If reader sees an error, don't process the grammar.
26097 (fatals): Updated to not use VARARGS1.
26098 (printable_version, int_to_string, warn, warni, warns, warnss)
26099 (warnsss): New error reporting functions. Avoid abort for error.
26100
26101 * src/lex.h:
26102 Added THONG and NOOP for alias processing.
26103 Added SETOPT for the new code that allows setting options with %flags.
26104
26105 * src/lex.c:
26106 Include getopt.h. Add some extern decls.
26107 (safegetc): New function to deal with EOF gracefully.
26108 (literalchar); new function to deal with reading \ escapes.
26109 (lex): Use literalchar.
26110 (lex): Implemented "..." tokens.
26111 (literalchar, lex, parse_percent_token): Made tokenbuffer
26112 always contain the token. This includes growing the token
26113 buffer while reading an integer.
26114 (parse_percent_token): Replaced if-else statement with percent_table.
26115 (parse_percent_token): Added % declarations as another
26116 way to specify the flags -n, -l, and -r. Also added hooks for
26117 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
26118 major changes to files.c.
26119 (lex) Retain in the incoming stream a character following
26120 an incorrect '/'.
26121 (skip_white_space, lex): Revised most error messages
26122 and changed fatal to warn to avoid aborting.
26123 (percent_table): Added %thong declarations.
26124
26125 * src/gram.h: Comment changes.
26126
26127 * src/files.c (openfiles, open_extra_files, done):
26128 Add faction flag
26129 and actfile file. Handle noparserflag. Both for -n switch.
26130
26131 * src/conflicts.c (resolve_sr_conflict):
26132 Remove use of alloca.
26133
26134 1995-06-01 Jim Meyering <meyering@gnu.org>
26135
26136 * doc/bison.texinfo: *** empty log message ***
26137
26138 1995-05-06 Richard Stallman <rms@gnu.org>
26139
26140 * src/bison.s1: Comment change.
26141
26142 1995-05-06 Richard Stallman <rms@gnu.org>
26143
26144 * bison.simple: Comment change.
26145
26146 1995-05-03 Richard Stallman <rms@gnu.org>
26147
26148 * src/version.c: Version now 1.24.
26149
26150 * src/bison.s1: Change distribution terms.
26151
26152 * src/version.c: Version now 1.23.
26153
26154 1995-05-03 Richard Stallman <rms@gnu.org>
26155
26156 * doc/bison.texinfo:
26157 Rewrite "Conditions for Using Bison".
26158 Update version to 1.24.
26159
26160 1995-05-03 Richard Stallman <rms@gnu.org>
26161
26162 * bison.simple: Change distribution terms.
26163
26164 1995-02-23 Richard Stallman <rms@gnu.org>
26165
26166 * src/files.c: Test __VMS_POSIX as well as VMS.
26167
26168 1995-02-14 Jim Meyering <meyering@gnu.org>
26169
26170 * src/bison.s1 (__yy_memcpy):
26171 Renamed from __yy_bcopy to avoid
26172 confusion. Reverse FROM and TO arguments to be consistent with
26173 those of memcpy.
26174
26175 1995-02-14 Jim Meyering <meyering@gnu.org>
26176
26177 * bison.simple (__yy_memcpy):
26178 Renamed from __yy_bcopy to avoid
26179 confusion. Reverse FROM and TO arguments to be consistent with
26180 those of memcpy.
26181
26182 1994-11-10 David J. MacKenzie <djm@gnu.org>
26183
26184 * NEWS: reformat
26185
26186 * NEWS: New file.
26187
26188 * Makefile.in (DISTFILES): Include NEWS.
26189
26190 * Makefile.in (DISTFILES):
26191 Include install-sh, not install.sh.
26192
26193 * configure.in: Update to Autoconf v2 macro names.
26194
26195 1994-10-05 David J. MacKenzie <djm@gnu.org>
26196
26197 * Makefile.in: fix typo
26198
26199 * Makefile.in (prefix, exec_prefix):
26200 Let configure set them.
26201
26202 1994-09-28 David J. MacKenzie <djm@gnu.org>
26203
26204 * Makefile.in: Set datadir to $(prefix)/share.
26205
26206 1994-09-15 Richard Stallman <rms@gnu.org>
26207
26208 * src/bison.s1:
26209 Update copyright notice and GPL version.
26210
26211 1994-09-15 Richard Stallman <rms@gnu.org>
26212
26213 * bison.simple:
26214 Update copyright notice and GPL version.
26215
26216 1994-07-12 Richard Stallman <rms@gnu.org>
26217
26218 * src/reduce.c, src/reader.c:
26219 entered into RCS
26220
26221 1994-05-05 David J. MacKenzie <djm@gnu.org>
26222
26223 * Makefile.in: entered into RCS
26224
26225 1994-03-26 Richard Stallman <rms@gnu.org>
26226
26227 * src/bison.s1: entered into RCS
26228
26229 1994-03-26 Richard Stallman <rms@gnu.org>
26230
26231 * bison.simple: entered into RCS
26232
26233 1994-03-25 Richard Stallman <rms@gnu.org>
26234
26235 * src/main.c: entered into RCS
26236
26237 1994-03-24 Richard Stallman <rms@gnu.org>
26238
26239 * src/conflicts.c: entered into RCS
26240
26241 1994-01-02 Richard Stallman <rms@gnu.org>
26242
26243 * Makefile.in: *** empty log message ***
26244
26245 1993-11-21 Richard Stallman <rms@gnu.org>
26246
26247 * src/bison.s1: *** empty log message ***
26248
26249 1993-11-21 Richard Stallman <rms@gnu.org>
26250
26251 * doc/bison.texinfo: entered into RCS
26252
26253 * doc/bison.texinfo: *** empty log message ***
26254
26255 1993-11-21 Richard Stallman <rms@gnu.org>
26256
26257 * bison.simple: *** empty log message ***
26258
26259 1993-10-25 David J. MacKenzie <djm@gnu.org>
26260
26261 * doc/bison.texinfo: *** empty log message ***
26262
26263 1993-10-19 Richard Stallman <rms@gnu.org>
26264
26265 * src/bison.s1: *** empty log message ***
26266
26267 1993-10-19 Richard Stallman <rms@gnu.org>
26268
26269 * bison.simple: *** empty log message ***
26270
26271 1993-10-14 Richard Stallman <rms@gnu.org>
26272
26273 * src/bison.s1: *** empty log message ***
26274
26275 1993-10-14 Richard Stallman <rms@gnu.org>
26276
26277 * bison.simple: *** empty log message ***
26278
26279 1993-09-14 David J. MacKenzie <djm@gnu.org>
26280
26281 * doc/bison.texinfo: *** empty log message ***
26282
26283 1993-09-13 Noah Friedman <friedman@gnu.org>
26284
26285 * Makefile.in: *** empty log message ***
26286
26287 1993-09-10 Richard Stallman <rms@gnu.org>
26288
26289 * src/conflicts.c: *** empty log message ***
26290
26291 * src/system.h: entered into RCS
26292
26293 1993-09-10 Richard Stallman <rms@gnu.org>
26294
26295 * doc/bison.1: entered into RCS
26296
26297 1993-09-06 Noah Friedman <friedman@gnu.org>
26298
26299 * src/version.c: entered into RCS
26300
26301 1993-09-06 Noah Friedman <friedman@gnu.org>
26302
26303 * Makefile.in: *** empty log message ***
26304
26305 1993-07-30 David J. MacKenzie <djm@gnu.org>
26306
26307 * Makefile.in: *** empty log message ***
26308
26309 1993-07-24 Richard Stallman <rms@gnu.org>
26310
26311 * src/bison.s1: *** empty log message ***
26312
26313 1993-07-24 Richard Stallman <rms@gnu.org>
26314
26315 * bison.simple: *** empty log message ***
26316
26317 1993-07-08 David J. MacKenzie <djm@gnu.org>
26318
26319 * Makefile.in: *** empty log message ***
26320
26321 1993-07-04 Richard Stallman <rms@gnu.org>
26322
26323 * src/bison.s1: *** empty log message ***
26324
26325 1993-07-04 Richard Stallman <rms@gnu.org>
26326
26327 * bison.simple: *** empty log message ***
26328
26329 1993-06-26 David J. MacKenzie <djm@gnu.org>
26330
26331 * src/getargs.c: entered into RCS
26332
26333 1993-06-26 David J. MacKenzie <djm@gnu.org>
26334
26335 * doc/bison.texinfo: *** empty log message ***
26336
26337 * doc/bison.1: New file.
26338
26339 1993-06-25 Richard Stallman <rms@gnu.org>
26340
26341 * src/getargs.c: New file.
26342
26343 1993-06-16 Richard Stallman <rms@gnu.org>
26344
26345 * src/bison.s1: *** empty log message ***
26346
26347 1993-06-16 Richard Stallman <rms@gnu.org>
26348
26349 * bison.simple: *** empty log message ***
26350
26351 1993-06-03 Richard Stallman <rms@gnu.org>
26352
26353 * src/bison.s1: New file.
26354
26355 1993-06-03 Richard Stallman <rms@gnu.org>
26356
26357 * doc/bison.texinfo: *** empty log message ***
26358
26359 1993-06-03 Richard Stallman <rms@gnu.org>
26360
26361 * bison.simple: New file.
26362
26363 1993-05-19 Richard Stallman <rms@gnu.org>
26364
26365 * doc/bison.texinfo: New file.
26366
26367 1993-05-07 Noah Friedman <friedman@gnu.org>
26368
26369 * Makefile.in: *** empty log message ***
26370
26371 1993-04-28 Noah Friedman <friedman@gnu.org>
26372
26373 * src/reader.c: *** empty log message ***
26374
26375 1993-04-23 Noah Friedman <friedman@gnu.org>
26376
26377 * src/alloc.h: entered into RCS
26378
26379 1993-04-20 David J. MacKenzie <djm@gnu.org>
26380
26381 * src/version.c: *** empty log message ***
26382
26383 * src/files.c, src/allocate.c:
26384 entered into RCS
26385
26386 * src/reader.c: *** empty log message ***
26387
26388 * src/lex.c: entered into RCS
26389
26390 * src/conflicts.c: New file.
26391
26392 * src/symtab.c: entered into RCS
26393
26394 * src/alloc.h: New file.
26395
26396 * src/LR0.c: entered into RCS
26397
26398 1993-04-18 Noah Friedman <friedman@gnu.org>
26399
26400 * src/reader.c: New file.
26401
26402 * src/version.c: *** empty log message ***
26403
26404 1993-04-18 Noah Friedman <friedman@gnu.org>
26405
26406 * Makefile.in: *** empty log message ***
26407
26408 1993-04-17 Noah Friedman <friedman@gnu.org>
26409
26410 * Makefile.in: *** empty log message ***
26411
26412 1993-04-15 Richard Stallman <rms@gnu.org>
26413
26414 * src/main.c, src/files.c:
26415 New file.
26416
26417 1993-04-15 Noah Friedman <friedman@gnu.org>
26418
26419 * configure.in: entered into RCS
26420
26421 * configure.in: *** empty log message ***
26422
26423 * configure.in: New file.
26424
26425 1993-04-14 Richard Stallman <rms@gnu.org>
26426
26427 * Makefile.in: New file.
26428
26429 1993-04-13 Richard Stallman <rms@gnu.org>
26430
26431 * src/version.c: New file.
26432
26433 1993-03-25 Richard Stallman <rms@gnu.org>
26434
26435 * src/output.c: entered into RCS
26436
26437 1992-09-25 Richard Stallman <rms@gnu.org>
26438
26439 * configure.bat: entered into RCS
26440
26441 1992-06-22 Richard Stallman <rms@gnu.org>
26442
26443 * src/vmsgetargs.c: entered into RCS
26444
26445 1992-06-22 Richard Stallman <rms@gnu.org>
26446
26447 * doc/bison.rnh: entered into RCS
26448
26449 1992-04-20 David J. MacKenzie <djm@gnu.org>
26450
26451 * README: entered into RCS
26452
26453 1992-01-22 Richard Stallman <rms@gnu.org>
26454
26455 * src/machine.h: entered into RCS
26456
26457 1991-12-21 Richard Stallman <rms@gnu.org>
26458
26459 * src/lalr.c, src/closure.c:
26460 entered into RCS
26461
26462 1991-12-20 Richard Stallman <rms@gnu.org>
26463
26464 * src/state.h: entered into RCS
26465
26466 1991-12-18 Richard Stallman <rms@gnu.org>
26467
26468 * src/print.c, src/nullable.c, src/derives.c:
26469 entered into RCS
26470
26471 1991-11-03 David J. MacKenzie <djm@gnu.org>
26472
26473 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
26474 entered into RCS
26475
26476 1988-09-09 Richard Stallman <rms@gnu.org>
26477
26478 * src/bison.hairy: entered into RCS
26479
26480 1987-12-16 Richard Stallman <rms@gnu.org>
26481
26482 * REFERENCES: entered into RCS
26483
26484
26485 -----
26486
26487 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
26488 Inc.
26489
26490 Copying and distribution of this file, with or without
26491 modification, are permitted provided the copyright notice and this
26492 notice are preserved.