]> git.saurik.com Git - bison.git/blob - ChangeLog
66ea5aeb178f25d95c30309616cb96369c05956f
[bison.git] / ChangeLog
1 2011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
2
3 Prepare for the possibility of a 2.5.1 release.
4 * NEWS (2.5.1): New heading.
5
6 2011-05-14 Joel E. Denny <joeldenny@joeldenny.org>
7
8 Version 2.5.
9 * NEWS (2.5): Set date.
10
11 2011-05-14 Joel E. Denny <joeldenny@joeldenny.org>
12
13 Don't use IF_LINT in Bison sources.
14 It creates unnecessary differences between the sources that Bison
15 maintainers build and test (given that maintainers normally
16 configure with --enable-gcc-warnings) and the sources that Bison
17 users build. Instead, use PACIFY_CC, which doesn't. This change
18 fixes compiler warnings reported by Tys Lefering at
19 <http://lists.gnu.org/archive/html/bison-patches/2011-05/msg00004.html>.
20 * configure.ac: Don't AC_DEFINE lint regardless of the configure
21 options. This change affects imported gnulib sources, where
22 IF_LINT still appears and depends on lint.
23 * src/scan-gram.l, src/scan-skel.l: Replace uses of IF_LINT with
24 PACIFY_CC.
25 * src/system.h (IF_LINT): Remove cpp macro.
26 (PACIFY_CC): New cpp macro.
27
28 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
29
30 Fix precedence for end token.
31 Since Bison 2.3b, which restored the ability of precedence
32 directives to assign user token numbers, doing so for user token
33 number 0 has produced an assertion failure.
34 * NEWS (2.5): Document fix.
35 * src/symtab.c (symbol_user_token_number_set): In the case of the
36 end token, don't decrement ntokens if it was never incremented.
37 * tests/regression.at (Token number in precedence declaration):
38 Extend.
39
40 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
41
42 Prepare for 2.5 release.
43 * NEWS (2.5_rc1): Rename back to...
44 (2.5): ... this, and unset date.
45
46 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
47
48 Version 2.5_rc1.
49 * NEWS (2.5): Rename to...
50 (2.5_rc1): ... this, and set date.
51
52 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
53
54 Pacify -DGNULIB_POSIXCHECK.
55 * bootstrap.conf (gnulib_modules): Add all modules suggested by
56 -DGNULIB_POSIXCHECK.
57 * src/files.c (file_name_split)
58 * src/getargs.c (getargs)
59 * src/location.c (boundary_set_from_string)
60 * src/output.c (token_definitions_output, output_skeleton)
61 * src/parse-gram.y (prologue_declaration)
62 * src/scan-gram.l (handle_syncline)
63 * src/symtab.c (symbol_new): Use mbschr and mbsrchr instead of
64 strchr and strrchr. In the cases of command-line options, file
65 names, and thus locations, functionality may be improved. In the
66 case of symbol names, there should be no functional difference as
67 all characters are ASCII, so the intended benefit is just warning
68 suppression.
69
70 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
71
72 * NEWS (2.5): Fix minor typos.
73
74 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
75
76 doc: clean up quotation style in NEWS.
77 * NEWS (2.5): For multi-character tokens in example grammar rules,
78 use "token" not 'token'. In English, use a consistent quotation
79 style; we might as well follow the precedent seen in info pages:
80 `quote' not "quote".
81
82 2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
83
84 tests: pacify gcc 4.6.0's -Wunused-but-set-variable.
85 Reported by Jim Meyering at
86 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
87 * tests/actions.at
88 (Default %printer and %destructor for mid-rule values): Define
89 YYLLOC_DEFAULT so that it uses its Rhs argument.
90
91 2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
92
93 glr.c: omit yyresolveLocations when locations are disabled.
94 This prevents gcc 4.6.0's -Wunused-but-set-variable from warning
95 about yyresolveLocations's local yyrhsloc. When locations are
96 enabled, there's no such warning because YYLLOC_DEFAULT then uses
97 yyrhsloc. Reported by Jim Meyering at
98 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
99 * data/glr.c (yyresolveLocations): Omit definition when locations
100 are disabled.
101 (yyresolveValue): Omit yyresolveLocations invocation when
102 locations are disabled.
103
104 2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
105
106 gnulib, autoconf: update.
107 * README-hacking (Updating a submodule): Give advice on how to
108 determine the versions of gnulib and autoconf to which we should
109 update.
110 (Release Procedure): Note that submodules should be updated.
111 * bootstrap.conf (gnulib_modules): Rename pipe to spawn-pipe as
112 suggested in updated gnulib NEWS.
113 * gnulib: Choose a stable snapshot according to advice in Bison's
114 README-hacking.
115 * po/POTFILES.in (lib/pipe.c): Rename to...
116 (lib/spawn-pipe.c): ... this.
117 * src/output.c: Update to include spawn-pipe.h.
118 * submodules/autoconf: Update to latest for improvement in m4.m4
119 that excludes M4 with buggy strstr. The only other changes to
120 files that we use are copyright updates.
121
122 2011-04-09 Joel E. Denny <joeldenny@joeldenny.org>
123
124 Fix missing updates to GPLv3.
125 Reported by Tys Lefering at
126 <http://lists.gnu.org/archive/html/bison-patches/2011-04/msg00000.html>.
127 * src/print-xml.c, src/print-xml.h: In these files.
128
129 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
130
131 Add -Wconflicts-sr and -Wconflicts-rr.
132 Thus, conflict reports are now affected by -Werror and -Wnone
133 (unless %expect or %expect-rr is specified). Reported by George
134 Neuner at
135 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
136 * NEWS (2.5): Document.
137 * doc/bison.texinfo (Bison Options): Document.
138 * src/complain.c, src/complain.h (set_warning_issued): Export
139 function.
140 * src/conflicts.c (conflicts_print): Suppress conflict report
141 based on -Wno-conflicts-sr and -Wno-conflicts-rr, and treat
142 conflicts as errors if -Werror.
143 * src/getargs.c (warnings_flag): Initialize with
144 warnings_conflicts_sr and warnings_conflicts_rr as well.
145 (warnings_args, warnings_types): Add entries for
146 warnings_conflicts_sr and warnings_conflicts_rr.
147 (usage): Update.
148 * src/getargs.h (enum warnings): Add entries for
149 warnings_conflicts_sr and warnings_conflicts_rr.
150 * tests/conflicts.at (-W versus %expect and %expect-rr): New test
151 group.
152 * tests/local.at (AT_BISON_CHECK_NO_XML): Update now that the
153 conflict report can produce a "warnings being treated as errors"
154 message. Also, check that stderr is now fully scrubbed by -Wnone
155 when the exit status is 0.
156
157 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
158
159 Pacify maintainer-check-posix.
160 Adding command-line options after the grammar file name is not
161 permitted, so disable checks that do that when
162 maintainer-check-posix is running.
163 * tests/local.at (AT_BISON_CHECK_NO_XML): Don't run the
164 problematic checks when POSIXLY_CORRECT=1. Also, for readability,
165 remove an unnecessary m4_if.
166
167 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
168
169 Add -Wother so -Wnone suppresses all warnings.
170 Reported by George Neuner at
171 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
172 * NEWS (2.5): Document.
173 * THANKS (George Neuner): Add.
174 * doc/bison.texinfo (Bison Options): Document.
175 * src/complain.c, src/complain.h
176 (warn_at, warn_at_indent, warn): Suppress warning if -Wno-other.
177 (midrule_value_at): New warning function, similar to yacc_at in
178 that it's controlled by its own warning category.
179 * src/getargs.c (warnings_flag): Initialize to warnings_other.
180 (warnings_args, warnings_types): Add entry for warnings_other.
181 (usage): Update.
182 * src/getargs.h (enum warnings): Add entry for warnings_other.
183 * src/gram.c (grammar_rules_useless_report): If -Wno-other, then
184 don't print useless rules.
185 * src/reader.c (symbol_should_be_used): Rather than adjusting the
186 return value based on whether midrule value warnings are enabled,
187 accept a new parameter for telling the caller whether true is
188 being returned for a potential midrule warning.
189 (grammar_rule_check): Use midrule_value_at for midrule value
190 warnings, and continue to use warn_at for all other warnings. Let
191 them check whether the warnings are enabled.
192 * tests/local.at (AT_BISON_CHECK): Update documentation.
193 (AT_BISON_CHECK_NO_XML): Check that -Wnone and --warnings=none
194 disable all warnings exercised in the test suite.
195
196 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
197
198 Don't let -Wnone disable -Werror.
199 Discussed at
200 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00009.html>.
201 * NEWS (2.5): Document.
202 * src/getargs.c (flags_argmatch): Accept a new argument that
203 specifies what flags "all" and thus "none" affect.
204 (FLAGS_ARGMATCH): Update flags_argmatch invocation.
205 * tests/input.at (-Werror is not affected by -Wnone and -Wall):
206 New test group.
207
208 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
209
210 * NEWS (2.5): Document fix for -Wno-CATEGORY.
211
212 2008-11-21 Di-an Jan <dianj@freeshell.org>
213
214 Implement no-XXX arguments for --warnings, --report, --trace.
215 * src/getargs.c (flags_argmatch): Handles no-XXX.
216 Fix typo in doxygen comment.
217
218 2011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
219
220 doc: fix confusing citation of LAC publication.
221 Suggested by Akim Demaille.
222 * doc/bison.texinfo (LAC): Here.
223
224 2011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
225
226 lr.default-reductions: rename "full" value to "most".
227 Unlike "consistent" and "accepting", "full" doesn't answer the
228 question of "which states".
229 * doc/bison.texinfo (%define Summary): Update.
230 (Default Reductions): Update.
231 * src/print.c (print_reductions): Update.
232 * src/reader.c (prepare_percent_define_front_end_variables):
233 Update.
234 * src/tables.c (action_row): Update.
235 * tests/input.at (%define enum variables): Update.
236 * tests/reduce.at (%define lr.default-reductions): Update.
237
238 2011-03-13 Joel E. Denny <joeldenny@joeldenny.org>
239
240 * src/parse-gram.c, src/parse-gram.h: Regenerate.
241
242 2011-03-09 Akim Demaille <akim@lrde.epita.fr>
243
244 named references: fix double free.
245 In `rhs[name]: "a" | "b"', do not free "name" twice.
246 Reported by Tys Lefering.
247 <http://lists.gnu.org/archive/html/bug-bison/2010-06/msg00002.html>
248 * src/named-ref.h, src/named-ref.c (named_ref_copy): New.
249 * src/parse-gram.y (current_lhs): Rename as...
250 (current_lhs_symbol): this.
251 (current_lhs): New function. Use it to free the current lhs
252 named reference.
253 * src/reader.c: Bind lhs to a copy of the current named reference.
254 * src/symlist.c: Rely on free (0) being valid.
255 * tests/named-refs.at: Test this.
256
257 2011-03-09 Akim Demaille <akim@lrde.epita.fr>
258
259 tests: style changes.
260 * tests/named-refs.at (Redundant words in LHS brackets)
261 (Unresolved references): here.
262
263 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
264
265 java: fix parser tracing bug.
266 * NEWS (2.5): Document.
267 * data/lalr1.java (YYParser::YYStack::print): Don't skip top
268 element.
269
270 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
271
272 java: finish fixing parser stack popping bug.
273 * NEWS (2.5): Document.
274 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
275 in clearing the location stack. Also fix pop function that
276 accepts no arguments.
277
278 2011-03-06 Angelo Borsotti <angelo.borsotti@gmail.com> (tiny change)
279
280 java: fix parser stack popping bug.
281 Reported at
282 <http://lists.gnu.org/archive/html/bug-bison/2011-02/msg00005.html>.
283 * THANKS (Angelo Borsotti): Add.
284 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
285 in clearing the value stack. Previously, the top element of the
286 stack wasn't cleared and so the value was not garbage collected.
287
288 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
289
290 doc: cite publication for LAC.
291 * doc/bison.texinfo (LAC): Here.
292
293 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
294
295 doc: clean up terminology for mysterious conflicts.
296 * doc/bison.texinfo (Mystery Conflicts): Rename node to...
297 (Mysterious Conflicts): ... this, which is already the section
298 title and the name used in the index. Update all cross-references
299 to this node. Also, don't imply that R/R conflicts are the only
300 kind of mysterious conflict.
301
302 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
303
304 lr.default-reductions: rename "all" value to "full".
305 States that shift the error token do not have default reductions,
306 and GLR disables some default reductions, so "all" was a misnomer.
307 * doc/bison.texinfo (%define Summary): Update.
308 (Default Reductions): Update.
309 * src/print.c (print_reductions): Update.
310 * src/reader.c (prepare_percent_define_front_end_variables):
311 Update.
312 * src/tables.c (action_row): Update.
313 * tests/input.at (%define enum variables): Update.
314 * tests/reduce.at (%define lr.default-reductions): Update.
315
316 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
317
318 doc: create a new Tuning LR section in the manual.
319 And clean up all other documentation of the features described
320 there.
321 * NEWS (2.5): Tweak wording of lr.type and parse.lac entries a
322 bit, update the cross-references to the manual, and point out that
323 LAC has caveats. Don't be so adamant that IELR+LAC=canonical LR.
324 That is, as the referenced section in the manual documents, LAC
325 does not fix infinite parsing loops on syntax errors.
326 * doc/bison.texinfo: Consistently drop the "(1)" suffix from LALR,
327 IELR, and LR in @cindex.
328 (%define Summary): Condense the entries for lr.default-reductions,
329 lr.keep-unreachable-states, lr.type, and parse.lac into brief
330 summaries, and cross-reference the appropriate subsections of
331 Tuning LR. For parse.lac, mention that it's only implemented for
332 deterministic parsers in C.
333 (Error Reporting): When mentioning %error-verbose, mention LAC,
334 and add cross-reference to the LAC section.
335 (Tuning LR): New section with an extended version of the
336 documentation removed from %define Summary. Change all
337 cross-references in the manual to point here instead of there.
338 (Calc++ Parser): When mentioning %error-verbose, mention LAC, and
339 add cross-reference to the LAC section.
340 (Table of Symbols): In %error-verbose and YYERROR_VERBOSE entries,
341 add cross-references to Error Reporting.
342 (Glossary): Capitalize entry titles consistently. Add definitions
343 for "defaulted state" and "unreachable state". Expand IELR
344 acronym in IELR's entry.
345
346 2011-02-20 Joel E. Denny <joeldenny@joeldenny.org>
347
348 doc: add bibliography to manual.
349 * doc/bison.texinfo (Mystery Conflicts): Cross-reference
350 bibliography instead of citing publications directly.
351 (Generalized LR Parsing): Likewise.
352 (Bibliography): New section. Not all entries are cross-referenced
353 yet, but that will come in future patches.
354
355 2011-02-19 Joel E. Denny <joeldenny@joeldenny.org>
356
357 java: test and document previous bug fix.
358 * NEWS (2.5): Document it.
359 * tests/java.at (_AT_DATA_JAVA_CALC_Y): To one of the yyerror
360 invocations, pass a location that spans multiple tokens. Change
361 yyerror to report all of a location rather than just the begin
362 position. Extend yylex and Position to count tokens on a line.
363 Remove getHashCode as it's unused. Update all expected output.
364
365 2011-02-19 Bernd Kiefer <kiefer@dfki.de> (tiny change)
366
367 java: fix location handling bug.
368 Reported at
369 <http://lists.gnu.org/archive/html/bison-patches/2011-02/msg00005.html>.
370 * data/lalr1.java (YYParser::yylloc): For non-empty RHS, fix
371 reversed access to location stack.
372 * THANKS (Bernd Kiefer): Add.
373
374 2010-05-11 Akim Demaille <demaille@gostai.com>
375
376 doc: please Emacs.
377 * doc/bison.texinfo (Local Variables): Move this after the
378 LocalWords, since the latter are looked for in the whole document,
379 while the former are looked for only at its end.
380 Require american spell checking.
381
382 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
383
384 doc: clean up new subsections in manual.
385 * doc/bison.texinfo (%define Summary): Reword so it reads well as
386 a separate section. For example, add an intro, and move most of
387 the text outside of the @deffn so it is not indented so far.
388 (%code Summary): Likewise.
389 (Table of Symbols): Reword %code entry to match the %code entry in
390 Decl Summary.
391
392 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
393
394 doc: finish splitting apart the manual's Decl Summary section.
395 Suggested by Akim Demaille at
396 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
397 * doc/bison.texinfo (Decl Summary): Extract most of the %define
398 entry into...
399 (%define Summary): ... this new subsection, and update all
400 cross-references. For readability of the patches, rewriting of
401 the text so it makes sense as a separate subsection will come in a
402 later patch. Moreover, the majority of the text describing the
403 various new LR features should likely move to another new section
404 somewhere.
405
406 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
407
408 doc: begin to split apart the manual's Decl Summary section.
409 Discussed in thread starting at
410 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
411 * doc/bison.texinfo (Decl Summary): Extract most of the %code
412 entry into...
413 (%code Summary): ... this new subsection, and update all
414 cross-references. For readability of the patches, rewriting of
415 the text so it makes sense as a separate subsection will come in a
416 later patch.
417
418 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
419
420 doc: clean up naming of various Bison files.
421 The Bison manual's names for various files associated with a Bison
422 parser has devolved into inconsistency. This patch makes the
423 naming consistent for the most important files. First, it chooses
424 "grammar file" over "input file". The former appears to be more
425 traditional in the Bison manual, and Bison has other input
426 files (skeletons). Second, it chooses "parser implementation
427 file" over names like "parser file", "parser source file", "parser
428 source code file", and "parser output file". The new name makes
429 it clearer where Bison generates the main parser implementation,
430 and it is easily distinguishable from "parser header file".
431 * doc/bison.texinfo: Implement throughout.
432
433 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
434
435 doc: give credit to more of Bison's developers.
436 * doc/bison.texinfo (Introduction): Don't imply that only Robert
437 Corbett, Richard Stallman, and Wilfred Hansen have contributed to
438 Bison. However, I don't have time to write a full history, so
439 just point readers to THANKS and ChangeLog.
440
441 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
442
443 doc: document experimental features better.
444 * doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
445 LR(1) are experimental. Mention Java. Normally experimental
446 features probably shouldn't be mentioned in the introduction.
447 However, if Bison's limitations to LALR(1), C, and C++ are so
448 important that they should be mentioned here, then it's important
449 to point out that Bison is beginning to escape those limitations.
450 Moreover, these particular experimental features have very little
451 chance of being removed.
452 * src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
453 experimental.
454
455 2011-01-29 Joel E. Denny <joeldenny@joeldenny.org>
456
457 Do not allow identifiers that start with a dash.
458 This cleans up our previous fixes for a bug whereby Bison
459 discarded `.field' in `$-1.field'. The previous fixes were less
460 restrictive about where a dash could appear in an identifier, but
461 the restrictions were hard to explain. That bug was reported and
462 this final fix was originally suggested by Paul Hilfinger. This
463 also fixes a remaining bug reported by Paul Eggert whereby Bison
464 parses `%token ID -123' as `%token ID - 123' and handles `-' as an
465 identifier. Now, `-' cannot be an identifier. Discussed in
466 threads beginning at
467 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
468 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
469 * NEWS (2.5): Update entry describing the dash extension to
470 grammar symbol names. Also, move that entry before the named
471 references entry because the latter mentions the former.
472 * doc/bison.texinfo (Symbol): Update documentation for symbol
473 names. As suggested by Paul Eggert, mention the effect of periods
474 and dashes on named references.
475 (Decl Summary): Update documentation for unquoted %define values,
476 which, as a side effect, can no longer start with dashes either.
477 * src/scan-code.l (id): Implement.
478 * src/scan-gram.l (id): Implement.
479 * tests/actions.at (Exotic Dollars): Extend test group to exercise
480 bug reported by Paul Hilfinger.
481 * tests/input.at (Symbols): Update test group, and extend to
482 exercise bug reported by Paul Eggert.
483 * tests/named-refs.at (Stray symbols in brackets): Update test
484 group.
485 ($ or @ followed by . or -): Likewise.
486 * tests/regression.at (Invalid inputs): Likewise.
487
488 2011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
489
490 * data/yacc.c: Fix last apostrophe warning from xgettext.
491
492 2011-01-09 Paul Eggert <eggert@cs.ucla.edu>
493
494 Fix minor problems encountered by a fresh bootstrap.
495 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
496 as they confuse xgettext, which tries to parse them as C character
497 constants in a preprocessor directive.
498 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
499 that expression might not promote to int on some platforms.
500 * src/parse-gram.c, src/parse-gram.h: Regenerate.
501
502 2011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
503
504 Improve error messages for `$' or `@' followed by `.' or `-'.
505 Previously, for this special case of an invalid reference, the
506 usual "symbol not found in production:" was printed. However,
507 because the symbol name was parsed as the empty string, that
508 message was followed immediately by a newline instead of a symbol
509 name. In reality, this is a syntax error, so the reference is
510 invalid regardless of the symbols actually appearing in the
511 production. Discussed at
512 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
513 * src/scan-code.l (parse_ref): Report the above case as a syntax
514 error. Other than that, continue to handle this case like any
515 other invalid reference that Bison manages to parse because
516 "possibly meant" messages can still be helpful to the user.
517 * tests/named-refs.at ($ or @ followed by . or -): New test group.
518
519 2011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
520
521 doc: don't use @acronym.
522 Lately, many GNU packages are dropping it. See
523 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
524 * doc/bison.texinfo: Remove all uses.
525
526 2011-01-05 Alex Rozenman <rozenman@gmail.com>
527
528 Do not allow identifiers that start with a negative number.
529 Reported by Paul Hilfinger as a side effect of named references
530 support at
531 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
532 Suggested by Paul Eggert.
533 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
534 * src/scan-gram.l ({letter}, {id}): Likewise.
535
536 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
537
538 * ChangeLog (2011-01-02): improve description.
539
540 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
541
542 maint: don't update copyright years in bootstrap.
543 * .x-update-copyright: Add entry for bootstrap.
544 * bootstrap: Remove 2011 from copyright years. The bootstrap
545 version we're currently using comes from an older version of
546 gnulib.
547 * bootstrap.conf (bootstrap_sync): Add comments explaining this
548 issue.
549
550 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
551
552 maint: run "make update-copyright".
553
554 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
555
556 maint: prepare to use year ranges in copyright notices.
557 * README (Copyright statements): New section explaining the range
558 notation. The GNU maintainers document requires this explanation:
559 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
560 I copied our explanation from coreutils.
561 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
562 disabled Bison's automated use of ranges.
563 * cfg.mk (update-copyright-env): Likewise.
564
565 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
566
567 Correct my email address.
568 * ChangeLog: In all recent entries.
569 * THANKS (Joel E. Denny): Here.
570
571 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
572
573 doc: cleanup.
574 * NEWS (2.5): Try to sort entries according to how interesting
575 users might find them.
576
577 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
578
579 doc: cleanup.
580 * NEWS (2.5): Make some minor improvements to wording, and format
581 entries more consistently.
582 * doc/bison.texinfo (Language and Grammar): Point out that IELR
583 and canonical LR are experimental features.
584 (Decl Summary): In list of %define variables, make wording more
585 consistent. Improve discussion of using LALR for GLR.
586
587 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
588
589 parse.lac: document.
590 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
591 other corrections to verbose syntax error messages.
592 * doc/bison.texinfo (Decl Summary): Rewrite entries for
593 lr.default-reductions and lr.type to be clearer, to mention
594 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
595 for parse.lac.
596 (Glossary): Add entry for LAC.
597
598 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
599
600 parse.lac: implement exploratory stack reallocations.
601 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
602 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
603 with values of "failures" (default) or "full".
604 (b4_declare_parser_state_variables): Add yyesa, yyes, and
605 yyes_capacity variables.
606 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
607 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
608 LAC requested.
609 (YYCOPY_NEEDED): New cpp macro.
610 (YYCOPY): Define if LAC requested.
611 (yy_lac_stack_realloc): New function implementing stack
612 reallocations. Use YYMAXDEPTH for maximum stack size given that
613 the stack should never need to grow larger than the main state
614 stack needs to grow without LAC.
615 (YY_LAC_ESTABLISH): Update yy_lac invocation.
616 (yy_lac): Add arguments for exploratory stack memory data
617 recorded in the main parser. Invoke yy_lac_stack_realloc when
618 reallocation is necessary.
619 (yysyntax_error): Add the same new arguments and pass them to
620 yy_lac.
621 (yypstate_delete): Free yyes if necessary.
622 (yyesa, yyes, yyes_capacity): #define these to yypstate members
623 in the case of push parsing.
624 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
625 Update yysyntax_error invocations. At yyreturn, free yyes if
626 necessary.
627 * src/parse-gram.y: %define parse.lac full.
628 * tests/input.at (LAC: errors for %define): Extend for
629 parse.lac-memory-trace.
630 * tests/regression.at (LAC: Exploratory stack): Extend to check
631 that stack reallocs happen when expected.
632 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
633 parse.lac.es-capacity-initial.
634
635 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
636
637 parse.lac: implement as %define variable.
638 LAC = lookahead correction. See discussion at
639 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
640 However, one point there must be corrected: because of %nonassoc,
641 LAC is *not* always redundant for lr.type=canonical-lr.
642 * data/yacc.c: Accept values of "none" (default) or "full" for
643 parse.lac. Accept %define parse.lac.es-capacity to specify
644 capacity of LAC's temporary exploratory stack. It defaults to 20
645 and, for now, will not grow dynamically.
646 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
647 parse.lac!=none.
648 (YYBACKUP): Invoke YY_LAC_DISCARD.
649 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
650 yy_lac and track when it needs to be invoked
651 (yy_lac): New function that, given the current stack, determines
652 whether a token can eventually be shifted. Return status mimics
653 yyparse return status.
654 (yysyntax_error): Change yystate argument to yyssp so stack top
655 can be passed to yy_lac. If LAC is requested, build expected
656 token list by invoking yy_lac for every token instead of just
657 checking the current state for lookaheads. Return 2 if yy_lac
658 exhausts memory.
659 (yyparse, yypush_parse): Use local variable yy_lac_established and
660 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
661 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
662 is requested.
663 * tests/conflicts.at (%nonassoc and eof): Extend to check the
664 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
665 (%error-verbose and consistent errors): Likewise.
666 (LAC: %nonassoc requires splitting canonical LR states): New test
667 group demonstrating how LAC can fix canonical LR.
668 * tests/input.at (LAC: Errors for %define): New test group.
669 * tests/regression.at (LAC: Exploratory stack): New test group.
670 (LAC: Memory exhaustion): New test group.
671
672 2010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
673
674 build: use gnulib's new bootstrap_sync option.
675 Now, whenever we update bison's copy of gnulib, bootstrap will
676 update itself the next time it's run.
677 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
678 * bootstrap.conf (bootstrap_sync): Set to true.
679 * gnulib: Update to latest so bootstrap is in sync now.
680
681 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
682
683 yysyntax_error: adjust prior fixes for branch-2.5's lalr1.cc.
684 On master, there is no yychar in lalr1.cc, but there is on
685 branch-2.5, and the prior cherry-pick of "Fix handling of yychar
686 manipulation in user semantic actions" wasn't adjusted for that
687 difference.
688 * data/lalr1.cc (yy::parser::parse): Translate yychar before
689 every use of yytoken, and add comments explaining this approach.
690 * tests/conflicts.at (%error-verbose and consistent errors):
691 Extend to test yychar manipulation with lalr1.cc.
692
693 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
694
695 yysyntax_error: fix for consistent error with lookahead.
696 * NEWS (2.5): Document.
697 * data/yacc.c (yysyntax_error): In a verbose syntax error
698 message while in a consistent state with a default action (which
699 must be an error action given that yysyntax_error is being
700 invoked), continue to drop the expected token list, but don't
701 drop the unexpected token unless there actually is no lookahead.
702 Moreover, handle that internally instead of returning 1 to tell
703 the caller to do it. With that meaning of 1 gone, renumber
704 return codes more usefully.
705 (yyparse, yypush_parse): Update yysyntax_error usage. Most
706 importantly, set yytoken to YYEMPTY when there's no lookahead.
707 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
708 unexpected token unless there actually is no lookahead.
709 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
710 set yytoken to yyempty_ before invoking yysyntax_error_.
711 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
712 token unless there actually is no lookahead.
713 * data/lalr1.java (YYParser::parse): If there's no lookahead,
714 set yytoken to yyempty_ before invoking yysyntax_error.
715 (YYParser::yysyntax_error): Again, don't drop the unexpected
716 token unless there actually is no lookahead.
717 * tests/conflicts.at (%error-verbose and consistent
718 errors): Extend test group to further reveal how the previous
719 use of the simple "syntax error" message was too general. Test
720 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
721 failure.
722 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
723 to...
724 * tests/local.at: ... here.
725 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
726 (AT_BISON_OPTION_POPDEFS): Pop it.
727 (AT_FULL_COMPILE): Extend to handle Java.
728
729 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
730
731 yysyntax_error: more preparation for readability of next patch.
732 There are no behavioral changes here.
733 * data/glr.c (yyreportSyntaxError): Reorganize.
734 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
735 * tests/conflicts.at (%error-verbose and consistent errors):
736 Reorganize.
737
738 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
739
740 yysyntax_error: prepare for readability of next patches.
741 These are purely whitespace changes that result in ugly code
742 but that make the next couple of patches much easier to read.
743 * data/glr.c (yyreportSyntaxError): Reindent.
744 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
745 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
746 * data/yacc.c (yysyntax_error): Reindent.
747
748 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
749
750 yysyntax_error: improve invocation readability.
751 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
752 invocation, get rid of the while loop, which is misleading
753 because there are really at most two iterations.
754
755 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
756
757 * ChangeLog: Correct some errors in previous entries.
758
759 2010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
760
761 maint: re-anchor all .gitignore entries.
762 * bootstrap: Copy from gnulib's latest for the fix to
763 automatically anchor entries it constructs.
764 * gnulib: Update to latest just so it has the same bootstrap.
765 * .gitignore, build-aux/.gitignore, doc/.gitignore:
766 * lib/.gitignore, m4/.gitignore, po/.gitignore:
767 * runtime-po/.gitignore: Re-anchor all entries.
768
769 2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
770
771 Fix portability problem on OpenBSD 4.7.
772
773 Jim Meyering reported this in
774 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
775 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
776 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
777 for quite some time.
778 * src/parse-gram.c, src/parse-gram.h: Regenerate.
779 * tests/regression.at: Tamper with the renamed witness.
780
781 Adjust to recent changes to gnulib bootstrap.
782
783 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
784 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
785 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
786 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
787 anymore and don't know of anybody else who does. If someone needs
788 these files, they can resurrect them.
789 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
790 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
791 Omit leading '/', since bootstrap omits it.
792 Adjust file names to match current contents better.
793 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
794 installed just for us.
795 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
796 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
797 needed somehow. Don't have time to look into why.
798 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
799 the GNU malloc behavior, where malloc (0) != NULL unless we're
800 out of storage? If not, we can omit malloc-gnu; but for now I left
801 it in to be safe.
802 (vc_ignore): Remove.
803 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
804 uses that convention.
805
806 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
807
808 Version 2.4.3.
809 * NEWS (2.4.3): Set date.
810
811 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
812
813 maint: add gettext version to release announcements.
814 Suggested by Paul Hilfinger at
815 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
816 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
817 * cfg.mk (bootstrap-tools): Add gettext.
818
819 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
820
821 doc: fix -W and %expect documentation some.
822 * NEWS (2.4.3): Mention that there are documentation fixes.
823 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
824 turns conflicts into errors not warnings.
825 (Shift/Reduce): Likewise.
826 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
827
828 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
829
830 -Werror: fix for rules useless in parser after conflicts.
831 * NEWS (2.4.3): Document fix.
832 * src/complain.c (error_message): Extend to handle incomplete
833 error messages so warn and warn_at can be used in more cases.
834 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
835 -Werror is always obeyed.
836 * src/reduce.c (reduce_print): Use warn so that the "warnings
837 being treated as errors" message is printed consistently before
838 the first warning message. This makes testing easier.
839 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
840 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
841 --warnings=error when warnings appear in bison's stderr.
842
843 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
844
845 maint: enable gnits only at stable releases.
846 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
847 version string should disable gnits. Explain in comments.
848
849 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
850
851 i18n: update.
852 * po/POTFILES.in: Add src/graphviz.c.
853
854 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
855
856 i18n: fix for gnulib.
857 * po/POTFILES.in: Add remaining gnulib files that have
858 translatable strings.
859
860 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
861
862 maint: use announce-gen's new --mail-headers.
863 * HACKING (Announce): Update instructions.
864 * cfg.mk (announcement_Cc_): Define.
865 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
866 required by latest gnulib.
867 * gnulib: Update to latest.
868
869 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
870
871 tests: handle Valgrind that complains about >&-.
872 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
873 (Output files: -dv >&-): Skip test group if running
874 maintainer-check-valgrind.
875
876 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
877
878 Update from GFDL GFDL 1.2 to 1.3.
879 * doc/bison.texinfo: Update GFDL version number.
880 * doc/fdl.texi: Update to version 1.3, taken from:
881 http://www.gnu.org/licenses/fdl.texi
882
883 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
884
885 Do not use date ranges in copyright notices.
886 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
887
888 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
889 * TODO, bootstrap, bootstrap.conf:
890 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
891 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
892 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
893 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
894 * data/lalr1.java, data/location.cc:
895 * data/xslt/bison.xsl:
896 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
897 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
898 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
899 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
900 * djgpp/subpipe.c, djgpp/subpipe.h:
901 * djgpp/testsuite.sed, doc/bison.texinfo:
902 * doc/refcard.tex, etc/README, etc/bench.pl.in:
903 * examples/calc++/Makefile.am, examples/extexi:
904 * lib/abitset.c, lib/abitset.h:
905 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
906 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
907 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
908 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
909 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
910 * lib/libiberty.h, lib/main.c, lib/timevar.c:
911 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
912 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
913 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
914 * src/AnnotationList.c, src/AnnotationList.h:
915 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
916 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
917 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
918 * src/complain.h, src/conflicts.c, src/conflicts.h:
919 * src/derives.c, src/derives.h, src/files.c, src/files.h:
920 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
921 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
922 * src/ielr.h, src/lalr.c, src/lalr.h:
923 * src/location.c, src/location.h, src/main.c:
924 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
925 * src/named-ref.h, src/nullable.c, src/nullable.h:
926 * src/output.c, src/output.h, src/parse-gram.y:
927 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
928 * src/print_graph.c, src/print_graph.h, src/reader.c:
929 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
930 * src/relation.h, src/scan-code.h, src/scan-code.l:
931 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
932 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
933 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
934 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
935 * tests/actions.at, tests/atlocal.in, tests/c++.at:
936 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
937 * tests/existing.at, tests/glr-regression.at:
938 * tests/headers.at, tests/input.at, tests/java.at:
939 * tests/local.at, tests/named-refs.at:
940 * tests/output.at, tests/push.at, tests/reduce.at:
941 * tests/regression.at, tests/sets.at, tests/skeletons.at:
942 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
943 * data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
944 * tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
945 * etc/Makefile.am:
946 Don't use date ranges in copyright notices.
947
948 2010-05-11 Akim Demaille <demaille@gostai.com>
949
950 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
951 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
952 header file to the implementation file, after the user %code
953 sections.
954 * NEWS (2.5): Document this.
955
956 2010-05-07 Akim Demaille <demaille@gostai.com>
957
958 c++: use YYRHSLOC.
959 * data/lalr1.cc (YYRHSLOC): New.
960 (YYLLOC_DEFAULT): Use it.
961 * data/glr.cc: If location_type was user defined, do not include
962 location.hh, and do not produce location.hh and position.hh.
963 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
964 Check that glr.cc supports user defined location_type.
965 * NEWS: Document this.
966
967 2010-05-10 Akim Demaille <demaille@gostai.com>
968
969 doc: fix lalr1.cc documentation.
970 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
971 (C++ Bison Interface): Fix lalr1.cc skeleton name.
972 (C++ Parser Interface): Fix semantic_type and location_type names.
973 Document yy::parser::token.
974 Reported by Jerry Quinn.
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_use): New.
980 (b4_percent_define_get): Use it.
981 Accept a default value.
982 * data/c++.m4: Do not provide a default value for the %define
983 variable location_type, rather, use b4_percent_define_get with a
984 default argument where its value is needed.
985 * data/lalr1.cc: Do not load location.cc (which outputs both
986 location.hh and position.hh) if the user defined location_type.
987 Do not include location.hh either.
988 * data/glr.cc: Likewise.
989
990 2010-05-04 Akim Demaille <demaille@gostai.com>
991
992 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
993 * tests/calc.at (Span): Instead of begin/end, as in the built-in
994 location class, use first and last.
995 Define YYLLOC_DEFAULT to adjust to these changes.
996 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
997 location_type changes.
998
999 2010-05-04 Akim Demaille <demaille@gostai.com>
1000
1001 tests: enhance AT_SYNCLINES_COMPILE.
1002 * tests/synclines.at (AT_TEST_SYNCLINE): Move GCC 4.5 protection
1003 into...
1004 (AT_SYNCLINES_COMPILE): here.
1005 Add more distcc patterns.
1006
1007 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
1008
1009 tests: fix maintainer-xml-check.
1010 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
1011 Update output to include comments now produced by --graph.
1012 (xsl:template match="automaton"): As for --graph, name the
1013 digraph after the grammar file.
1014 * src/print-xml.c (escape_bufs): Enlarge array.
1015 (print_xml): Add bug-report and url attributes to
1016 bison-xml-report element.
1017
1018 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
1019
1020 In DOT output, convert from "/*" comments to "//" comments.
1021 This handles the possibility that a "*/" might appear in
1022 variable portions of those comments at some point in the future.
1023 * src/graphviz.c (start_graph): Implement.
1024
1025 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
1026
1027 Document that undefined %prec identifier warnings will remain.
1028 * NEWS (2.4.3): Here.
1029 (2.4.2): Here.
1030
1031 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
1032
1033 Revert 2009-12-30 change for undefined %prec token complaints.
1034 That is, keep them as warnings because that should be sufficient
1035 to satisfy POSIX without creating backward compatibility issues.
1036 Suggested by Richard Stallman at
1037 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
1038 * NEWS (2.5): Remove mention of complaint.
1039 * src/reader.c (grammar_rule_check): Convert complaint back to
1040 warning.
1041 * tests/input.at (%prec's token must be defined): Update.
1042
1043 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
1044
1045 build: don't require src/bison during bootstrap.
1046 Suggested by Eric Blake at
1047 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
1048 * bootstrap.conf (bootstrap_epilogue): New function to make sure
1049 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
1050
1051 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
1052
1053 i18n: fix untranslatable string.
1054 Reported by Goran Uddeborg at
1055 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
1056 * src/muscle-tab.c (muscle_percent_define_insert): Here.
1057
1058 2010-04-13 Akim Demaille <demaille@gostai.com>
1059
1060 tests: calc: minor refactoring.
1061 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
1062
1063 2010-04-13 Akim Demaille <demaille@gostai.com>
1064
1065 tests: calc: simplify location management.
1066 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
1067 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
1068 define the appropriate AT_LOC accessors.
1069 * tests/calc.at: Use AT_LOC accessors.
1070
1071 2010-04-13 Akim Demaille <demaille@gostai.com>
1072
1073 test location_type.
1074 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
1075 Define AT_LOCATION_TYPE_IF.
1076 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
1077 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
1078 used, provide a user location type and use it.
1079 (Simple LALR1 C++ Calculator): Add a test case for location_type.
1080
1081 2010-04-13 Akim Demaille <demaille@gostai.com>
1082
1083 tests: check fclose's return value.
1084 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
1085
1086 2010-04-13 Akim Demaille <demaille@gostai.com>
1087
1088 tests: don't depend on the actual location type.
1089 * tests/calc.at: Use yy::parser::location_type rather than
1090 yy::location, since the former is always right, and might point to
1091 another type than the latter.
1092
1093 2010-04-13 Akim Demaille <demaille@gostai.com>
1094
1095 formatting changes.
1096 * tests/calc.at: Formatting changes.
1097
1098 2010-04-13 Akim Demaille <demaille@gostai.com>
1099
1100 lalr1.cc: remove useless forward declaration.
1101 * data/lalr1.cc: Include location.hh before stack.hh.
1102 Remove the useless forward declarations of position and location.
1103 Reported by Chris Morley.
1104 * data/glr.cc: Likewise.
1105
1106 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
1107
1108 * NEWS (2.4.3): Mention fix for Sun Studio C++.
1109
1110 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
1111
1112 tests: fix for newer Sun Studio C++.
1113 Reported by Dagobert Michelsen at
1114 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
1115 * THANKS (Dagobert Michelsen): Add.
1116 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
1117 Autoconf macro for handling the restrict keyword.
1118 * gnulib: Update to latest, which no longer overrides that macro
1119 from Autoconf.
1120
1121 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1122
1123 portability: fix pointer arithmetic to conform to C standard.
1124 Reported by Tys Lefering at
1125 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
1126 This fix is already implemented in glr.c and does not apply to
1127 lalr1.java.
1128 * data/lalr1.cc (yy::parser::parse): Increase size of
1129 yyerror_range and adjust subscripting so you don't have to
1130 subtract one from the beginning of the array.
1131 * data/yacc.c (b4_declare_parser_state_variables,
1132 yyparse, yypush_parse): Likewise.
1133
1134 2010-04-05 Akim Demaille <demaille@gostai.com>
1135
1136 remove useless include.
1137 * src/graphviz.h: Don't include stdbool.h.
1138
1139 2010-04-05 Akim Demaille <demaille@gostai.com>
1140
1141 graph: sign the output file.
1142 * src/graphviz.c (start_graph): Issue comments about Bison.
1143 Suggested by Tys Lefering.
1144
1145 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
1146
1147 portability: fix test suite for GCC 4.5's new #error message.
1148 Reported by Tys Lefering at
1149 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
1150 * NEWS (2.4.3): Mention.
1151 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
1152
1153 2010-03-30 Akim Demaille <demaille@gostai.com>
1154
1155 fix comments.
1156 * src/graphviz.h: Add missing license notice.
1157 Document.
1158
1159 2010-03-25 Akim Demaille <demaille@gostai.com>
1160
1161 tests: fix 250: parse.error=verbose overflow.
1162 * tests/regression.at (parse.error=verbose overflow): Avoid the
1163 double inclusion of stdlib.h as it triggers hard errors.
1164
1165 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1166
1167 portability: fix for BSD make.
1168 Reported by Johan van Selst at
1169 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
1170 * tests/Makefile.am ($(TESTSUITE)): Qualify package.m4 in
1171 this dependency list as in package.m4's target rule.
1172
1173 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1174
1175 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
1176 Reported by Johan van Selst at
1177 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
1178 * NEWS (2.4.3): New.
1179 * THANKS (Johan van Selst): Add.
1180 * gnulib: Update to latest.
1181
1182 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1183
1184 maint: update for changes to gnulib's announce-gen.
1185 * HACKING (Announce): RELEASE_TYPE=major must now be written
1186 RELEASE_TYPE=stable.
1187
1188 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1189
1190 Version 2.4.2.
1191 * NEWS (2.4.2): Set version and date. For the recent test suite
1192 portability fixes, don't be so optimistic about their success
1193 given the lack of feedback on the affected platforms.
1194
1195 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1196
1197 tests: fix maintainer-xml-check for recent changes.
1198 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
1199 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
1200 output file whose name conflicts with a previous output file
1201 is now never generated.
1202
1203 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1204
1205 portability: fix several issues with M4 subprocess.
1206
1207 M4's output pipe was not being drained upon fatal errors during
1208 scan_skel. As a result, broken-pipe messages from M4 were seen
1209 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
1210 failure in the test suite. The problem was that, on platforms
1211 where the default disposition for SIGPIPE is ignore instead of
1212 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
1213 then reported it. However, there's some sort of race condition,
1214 because the new test group occasionally succeeded.
1215 Reported by Albert Chin at
1216 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
1217
1218 There were also problems with the test suite livelocking on
1219 Tru64 5.1b. Reported by Didier Godefroy at
1220 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
1221 Switching to create_pipe_bidi suggested by Akim Demaille.
1222
1223 To attempt to solve both of these problems, switch to gnulib's
1224 create_pipe_bidi and register M4 process as a slave. Along the
1225 way, clean up file name conflict handling, which was affected by
1226 the broken-pipe problem before the switch.
1227 * NEWS (2.4.2): Document.
1228 * THANKS (Didier Godefroy): Add.
1229 * bootstrap.conf (gnulib_modules): Add pipe.
1230 * gnulib: Update to latest to make sure we have all the latest
1231 fixes.
1232 * lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
1233 subpipe.c.
1234 * po/POTFILES.in (lib/subpipe.c): Remove.
1235 * src/files.c (compute_output_file_names): Update invocations
1236 of output_file_name_check.
1237 (output_file_name_check): In the case that the grammar file
1238 would be overwritten, use complain instead of fatal, but replace
1239 the output file name with /dev/null. Use the /dev/null solution
1240 for the case of two conflicting output files as well because it
1241 seems safer in case Bison one day tries to open both files at
1242 the same time.
1243 * src/files.h (output_file_name_check): Update prototype.
1244 * src/output.c (output_skeleton): Use create_pipe_bidi and
1245 wait_subprocess. Assert that scan_skel completely drains the
1246 pipe.
1247 * src/scan-skel.l (at_directive_perform): Update
1248 output_file_name_check invocation.
1249 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
1250 grammar file actually isn't overwritten.
1251 (Conflicting output files: -o foo.y): Update expected output.
1252 * tests/skeletons.at (Fatal errors but M4 continues producing
1253 output): New test group.
1254
1255 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
1256
1257 Update POTFILES.
1258 * HACKING (Release Procedure): Add reminder about keeping
1259 POTFILES files up-to-date.
1260 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
1261
1262 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
1263
1264 Code cleanup.
1265 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
1266 which is already defined in atconfig.
1267
1268 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
1269
1270 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
1271
1272 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
1273
1274 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
1275 * HACKING (Release Procedure): Update notes on copyright years.
1276 * Makefile.am (update-package-copyright-year): New target rule.
1277 * build-aux/update-package-copyright-year: New file.
1278 * cfg.mk (update-copyright): Add update-package-copyright-year
1279 as a dependency.
1280
1281 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1282
1283 * bootstrap: Import improvements from latest gnulib.
1284
1285 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1286
1287 build: require Automake 1.11.1 to avoid a security flaw.
1288 * HACKING (Release Procedure): Don't document Automake security
1289 flaw here.
1290 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
1291 why here.
1292
1293 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1294
1295 gnulib: update to latest.
1296
1297 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1298
1299 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
1300
1301 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
1302
1303 Thank the developer of the initial push parser implementation.
1304 This unfortunate oversight is several years old.
1305 * THANKS (Odd Arild Olsen): Add.
1306
1307 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
1308
1309 Fix some comments concerning LR(0) versus LALR(1).
1310
1311 Stop equating LR(0) with nondeterminism and LALR(1) with
1312 determinism. That is, if all states are consistent, then LR(0)
1313 tables are deterministic. On the other hand, LALR(1) tables
1314 might be nondeterministic before conflict resolution, and GLR
1315 permits LALR(1) tables to remain nondeterministic.
1316 * src/LR0.c, src/LR0.h: Here.
1317 * src/lalr.c, src/lalr.h: Here.
1318 * src/main.c (main): Here.
1319 * src/state.c, src/state.h: Here.
1320
1321 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
1322 parser tables.
1323
1324 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
1325
1326 maint: run "make update-copyright"
1327
1328 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
1329
1330 POSIX: complain if %prec's token was not defined.
1331 * NEWS (2.5): Document.
1332 * src/reader.c (grammar_rule_check): Convert warning to
1333 complaint.
1334 * tests/input.at (%prec's token must be defined): Update.
1335
1336 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
1337
1338 POSIX: warn if %prec's token was not defined.
1339 Reported by Florian Krohm at
1340 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
1341 * NEWS (2.4.2): Document.
1342 * src/reader.c (grammar_rule_check): Implement.
1343 (grammar_current_rule_prec_set): Add comments explaining that we
1344 here assume a %prec identifier is a token, but we still manage
1345 to support POSIX.
1346 * tests/input.at (%prec's token must be defined): New test
1347 group.
1348
1349 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
1350
1351 * HACKING (Release Procedure): Recommend a secure automake.
1352
1353 2008-12-11 Akim Demaille <demaille@gostai.com>
1354
1355 Propagate i18n changes into glr.c.
1356 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1357 building the error message format dynamically.
1358 * data/lalr1.java: Formatting changes.
1359
1360 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
1361
1362 Port small part of master's 11707b2b so future ports are easier.
1363 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
1364
1365 2008-12-11 Akim Demaille <demaille@gostai.com>
1366
1367 Simplify the i18n of the error messages.
1368 * data/lalr1.cc: Comment changes.
1369
1370 2008-11-11 Akim Demaille <demaille@gostai.com>
1371
1372 Prefer M4 to CPP.
1373 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1374 YYERROR_VERBOSE.
1375
1376 2008-11-11 Akim Demaille <demaille@gostai.com>
1377
1378 Support i18n of the parse error messages.
1379 * TODO (lalr1.cc/I18n): Remove.
1380 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1381 error messages, as done in yacc.c.
1382 Stay within the yy* pseudo namespace.
1383
1384 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
1385
1386 Port small part of master's 8901f32e so future ports are easier.
1387 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
1388 argument, but name it in the function definition only when
1389 verbose error messages are enabled and it'll thus be used.
1390 (yy::parser::parse): Update use of yysyntax_error_.
1391
1392 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
1393
1394 portability: `<' and `>' are not always defined on addresses.
1395 Specifically, don't sort objects by their memory addresses when
1396 they're not allocated in the same array or other object. Though
1397 I haven't found a test case where that fails on my platform, C
1398 says the behavior is undefined.
1399 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1400 FIXME. Use new id field of InadequacyList nodes rather than
1401 their memory addresses when sorting.
1402 (AnnotationList__compute_from_inadequacies): Add
1403 inadequacy_list_node_count argument to pass to
1404 InadequacyList__new_conflict.
1405 * src/AnnotationList.h
1406 (AnnotationList__compute_from_inadequacies): Update prototype
1407 and documentation for new argument.
1408 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1409 node_count argument and use it to assign a unique ID.
1410 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1411 (InadequacyList): Add id field.
1412 (InadequacyList__new_conflict): Update prototype and
1413 documentation for new argument.
1414 * src/ielr.c (ielr_compute_annotation_lists): Update
1415 AnnotationList__compute_from_inadequacies invocation.
1416
1417 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
1418
1419 Fix handling of yychar manipulation in user semantic actions.
1420 The problem was that yacc.c didn't always update the yychar
1421 translation afterwards. However, other skeletons appear to be
1422 fine. glr.c appears to already translate yychar before every
1423 use. lalr1.cc does not define yychar and does not document its
1424 replacement, yyla, for users. It does provide yyclearin, but
1425 that does not manipulate yyla and thus requires no translation
1426 update. In lalr1.java, yychar is out of scope during semantic
1427 actions.
1428 * NEWS (2.5): Document.
1429 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1430 yytoken here.
1431 (yyparse, yypush_parse): Instead, translate before every use of
1432 yytoken, and add comments explaining this approach.
1433 * tests/actions.at (Destroying lookahead assigned by semantic
1434 action): New test group checking that translation happens before
1435 lookahead destructor calls at parser return. Previously,
1436 incorrect destructors were called.
1437 * tests/conflicts.at (%error-verbose and consistent
1438 errors): New test group checking that translation happens at
1439 syntax error detection before the associated verbose error
1440 message and the associated lookahead destructor calls. While
1441 the destructor call is fixed by this patch, the verbose error
1442 message is currently incorrect due to another bug (see
1443 comments in test group), so this is an expected failure for now.
1444
1445 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1446
1447 YYFAIL: warn about uses and remove from lalr1.java.
1448 * NEWS (2.5): Document.
1449 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
1450 and make it private. Update all uses.
1451 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1452
1453 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1454
1455 YYFAIL: deprecate.
1456 * NEWS (2.4.2): Document deprecation and the phase-out plan.
1457 * data/lalr1.java (YYParser::YYFAIL): Add comment about
1458 deprecation.
1459 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1460 YYFAIL from GCC cpp's -Wunused-macros.
1461 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1462 documentation.
1463 (LocalWords): Remove YYFAIL.
1464
1465 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
1466
1467 Code cleanup.
1468 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1469 function, which is no longer used.
1470
1471 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1472
1473 Add gcc's -Wundef to test suite and fix another warning from it.
1474 * NEWS (2.4.2): Update description of -Wundef fix.
1475 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1476 (WARN_CFLAGS_TEST): New substitution.
1477 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1478 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1479 WARN_CFLAGS.
1480 (NO_WERROR_CFLAGS): Likewise.
1481 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1482
1483 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1484
1485 * data/yacc.c: Reformat m4 a little.
1486
1487 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1488
1489 Document gcc -Wundef fix.
1490 * NEWS (2.4.2): Here.
1491 * THANKS (Jonathan Nieder): Add.
1492
1493 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1494
1495 Simplify y.tab.c when location tracking is disabled.
1496 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1497 tracking is not enabled. Instead, unconditionally define
1498 YY_LOCATION_PRINT as a no-op for backward compatibility.
1499
1500 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1501
1502 Avoid warnings from gcc -Wundef y.tab.c.
1503 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1504 defined before using them.
1505 * data/lalr1.cc: Likewise.
1506 * data/yacc.c: Likewise.
1507
1508 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1509
1510 autoconf: update to latest for fix of M4 detection.
1511 Reported by Eric Blake.
1512 * submodules/autoconf: Update.
1513
1514 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1515
1516 portability: use -DGNULIB_POSIXCHECK.
1517 Reported by Eric Blake. See discussions at
1518 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1519 and
1520 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1521 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1522 * bootstrap.conf (gnulib_modules): Add all the printf modules
1523 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1524 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1525 (excluded_files): Remove m4/printf-posix.m4.
1526 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1527 lib/libbison.a so gnulib libraries can be linked.
1528
1529 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1530
1531 Enable assertion output and --disable-assert for configure.
1532 * bootstrap.conf (gnulib_modules): Add assert module.
1533 * src/system.h (aver): Define as assert, and summarize the
1534 discussion on this issue.
1535
1536 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1537
1538 Expand GLR acronym in summary of Bison.
1539 Based on discussion with Akim Demaille starting at
1540 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1541 * doc/bison.texinfo (Introduction): Here.
1542 * src/getargs.c (usage): Here.
1543
1544 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1545
1546 Document named references.
1547 * doc/bison.texinfo (Actions): Add new example and xref to
1548 Using Named References node.
1549 (Using Named References): New node.
1550
1551 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1552
1553 cleanup.
1554 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1555 of char*.
1556 (Sbitset__isEmpty): Use Sbitset instead of char*.
1557 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1558 instead of char. This helps to avoid casting errors.
1559 (Sbitset__or): Use Sbitset instead of char*.
1560
1561 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1562
1563 portability: don't assume 8-bit bytes.
1564 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1565 * src/Sbitset.h (Sbitset__nbytes): Here.
1566 (Sbitset__byteAddress): Here.
1567 (Sbitset__bit_mask): Here.
1568 (Sbitset__last_byte_mask): Here.
1569 (Sbitset__ones): Here.
1570 (SBITSET__FOR_EACH): Here.
1571
1572 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
1573
1574 portability: use va_start and va_end in the same function.
1575 * src/complain.c (error_message): Move va_end from here...
1576 (ERROR_MESSAGE): ... to here.
1577
1578 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1579
1580 * data/bison.m4: Update comments for rename to muscle-tab.h.
1581
1582 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1583
1584 Rename muscle_tab.* to muscle-tab.* for consistency with master.
1585 * src/Makefile.am (bison_SOURCES): Update.
1586 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
1587 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
1588 src/tables.c: Update include.
1589 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
1590 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
1591 include.
1592
1593 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
1594
1595 Minor code cleanup.
1596 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1597 replace all uses with UNIQSTR_CONCAT.
1598 * src/uniqstr.c (uniqstr_vsprintf): New function.
1599 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1600 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1601 macros.
1602
1603 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1604
1605 Minor code cleanup.
1606 * src/parse-gram.y: Clean up sorting of declarations.
1607 Use types to simplify %printer declarations where possible.
1608 Provide %printer for BRACKETED_ID and symbol.prec.
1609 * src/symtab.c: Whitespace change.
1610
1611 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1612
1613 tests: skip tests of file names that platform does not support.
1614 Reported by Michael Raskin at
1615 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1616 * THANKS (Michael Raskin): Add.
1617 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1618 to fail at least for file names containing ":" or "\".
1619
1620 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1621
1622 yysyntax_error: avoid duplicate lookahead collection.
1623 Except when memory reallocation is required, this change
1624 eliminates the need to invoke yysyntax_error twice and thus to
1625 repeat the collection of lookaheads. It also prepares for
1626 future extensions that will make those repetitions more
1627 expensive and that will require additional memory management in
1628 yysyntax_error. Finally, it fixes an obscure bug already
1629 exercised in the test suite.
1630 * data/yacc.c (yysyntax_error): Add arguments for message
1631 buffer variables stored in the parser. Instead of size, return
1632 status similar to yyparse status but indicating success of
1633 message creation. Other than the actual reallocation of the
1634 message buffer, import and clean up memory management code
1635 from...
1636 (yyparse, yypush_parse): ... here.
1637 * tests/regression.at (%error-verbose overflow): No longer an
1638 expected failure.
1639
1640 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1641
1642 yysyntax_error: test memory management more.
1643 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1644 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
1645 New test group.
1646 (%error-verbose overflow): New test group that reveals an
1647 obscure bug. Expected fail for now.
1648
1649 2008-12-11 Akim Demaille <demaille@gostai.com>
1650
1651 Pass the token type to yysyntax_error.
1652 * data/yacc.c (yysyntax_error): Take the transated token instead
1653 of the raw number.
1654 Adjust callers.
1655
1656 2008-12-11 Akim Demaille <demaille@gostai.com>
1657
1658 Simplify the i18n of the error messages.
1659 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
1660 of building dynamically the format string.
1661
1662 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
1663
1664 Remove dead code.
1665 * src/symtab.c (symbol_pack): Here because every symbol's number
1666 is always defined by this time.
1667
1668 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1669
1670 Add additional space after periods in NEWS.
1671 * NEWS (2.5): here.
1672
1673 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
1674
1675 Use the correct conversion specifier for size_t.
1676 Reported by Jim Meyering.
1677 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1678 because Sbitset__Index is size_t.
1679 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1680
1681 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
1682
1683 tests: don't abuse AT_BISON_CHECK.
1684 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1685 additional shell commands outside of AT_BISON_CHECK.
1686
1687 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
1688
1689 tests: check that parse-gram.y's IELR and LALR are identical.
1690 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1691 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1692 group.
1693
1694 2009-09-16 Akim Demaille <demaille@gostai.com>
1695
1696 doc: comment changes.
1697 * doc/bison.texinfo: Comment changes.
1698
1699 2009-09-16 Akim Demaille <demaille@gostai.com>
1700
1701 doc: spell checking.
1702 * doc/bison.texinfo: here.
1703
1704 2009-09-19 Alex Rozenman <rozenman@gmail.com>
1705
1706 Keep sub-messages aligned. Fix strings for translation.
1707 * src/location.h (location_print): Add return value.
1708 * src/location.c (location_print): Return number of printed
1709 characters.
1710 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1711 new functions.
1712 * src/complain.cpp (indent_ptr): New static variable.
1713 (error_message, complain_at_indent, warn_at_indent): Implement
1714 the alignment mechanism.
1715 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1716 for translations. Use new alignment mechanism.
1717 * tests/named-ref.at: Adjust test-cases.
1718 * NEWS (2.5): Add an announcement about named references.
1719
1720 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
1721
1722 tests: clean up push.at test group titles.
1723 * tests/push.at: Remove "Push Parsing: " from test group titles
1724 because these are already under the banner "Push Parsing Tests".
1725
1726 2009-09-12 Alex Rozenman <rozenman@gmail.com>
1727
1728 Provide an additional sub-message for clarity.
1729 Add "symbol not found in production" error message when
1730 an "invalid reference" is detected in named references
1731 resolution.
1732 * src/scan-code.l: Update "invalid reference" case.
1733 * tests/named-ref.at: Adjust test-cases.
1734
1735 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1736
1737 Clean up yacc.c a little.
1738 * data/yacc.c: Clean up M4 for readability, and make output
1739 whitespace more consistent. For the main parse function
1740 comment, instead of saying "yyparse or yypush_parse", say either
1741 "yyparse" or "yypush_parse" depending on which it actually is.
1742
1743 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1744
1745 Complain about unused %define variables and %code qualifiers.
1746 * NEWS (2.5): Document.
1747 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1748 * doc/bison.texinfo (Decl Summary): Document complaint, and
1749 improve %define documentation a little otherwise.
1750 * tests/input.at (Reject unused %code qualifiers): Update.
1751 (%define errors): Update.
1752 (%define, --define, --force-define): Update.
1753 (%define backward compatibility): Update.
1754 (Unused %define api.pure): Update.
1755 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1756
1757 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1758
1759 Use aver not assert.
1760 * src/output.c: Don't include assert.h.
1761 (output_skeleton): Use aver not assert.
1762 * src/system.h (aver): In documentation of why, add links to
1763 Paul Eggert's explanations in the mailing lists.
1764
1765 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1766
1767 Use "Unresolved reference" error message when no symbols were found
1768 in a symbolic reference resolution. Remove .expr and -expr from
1769 the shown reference when the reference is unresolved.
1770 * src/scan-code.l: Change the error message, adjust location columns,
1771 rename variable "exact_mode" to "explicit_bracketing".
1772 * tests/named-ref.at: Adjust existing tests and add a new one.
1773
1774 2009-09-03 Akim Demaille <demaille@gostai.com>
1775
1776 * NEWS (2.4.2): Add "Internationalization" item.
1777
1778 2009-09-03 Akim Demaille <demaille@gostai.com>
1779
1780 bootstrap: fix/improve find_tool.
1781 * bootstrap (find_tool): Improve error messages.
1782 Fix typo about find_tool_names.
1783
1784 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1785
1786 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1787 See
1788 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1789 * src/scan-code.h (code_props_rule_action_init): Rename
1790 named_ref arg to name so it doesn't shadow named_ref type. This
1791 makes it consistent with the function definition in scan-code.l
1792 anyway.
1793
1794 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1795
1796 %define: accept unquoted values.
1797 * NEWS (2.5): Group all %define changes together, and document
1798 this one. Remove quotes in IELR and canonical LR entry.
1799 * doc/bison.texinfo: Remove quotes in most examples throughout.
1800 (Decl Summary): Update %define documentation.
1801 (Table of Symbols): Likewise.
1802 * src/ielr.c (LrType): Update documentation.
1803 * src/parse-gram.y (content.opt): Add production for ID.
1804 * tests/calc.at: Remove quotes in most tests.
1805 * tests/existing.at: Likewise.
1806 * tests/input.at: Likewise.
1807 * tests/local.at: Likewise.
1808 * tests/push.at: Likewise.
1809 * tests/reduce.at: Likewise.
1810 * tests/torture.at: Likewise.
1811
1812 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1813
1814 %define lr.type: make values lowercase IDs.
1815 That is, "LALR" => "lalr", "IELR" => "ielr", and
1816 "canonical LR" => "canonical-lr".
1817 * NEWS (2.5): Update documentation.
1818 * doc/bison.texinfo (Decl Summary): Likewise.
1819 * src/ielr.c (ielr): Use new values.
1820 * src/ielr.h (ielr): Update documentation.
1821 * src/reader.c (prepare_percent_define_front_end_variables): Use
1822 and validate new values.
1823 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1824 grammars.
1825 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1826
1827 2009-08-27 Eric Blake <ebb9@byu.net>
1828
1829 scan-gram: avoid portability trap with ctype usage.
1830 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1831 Avoid compiler warning.
1832
1833 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1834
1835 tests: use perl for printing special sequences to files.
1836 And skip tests if perl is not available. This is better than
1837 playing tricks with shell portability. Suggested by Akim
1838 Demaille.
1839 * tests/input.at (Bad character literals): Use it here for
1840 omitting final newlines.
1841 (Bad escapes in literals): Use it here for special characters.
1842
1843 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1844
1845 tests: show a use of %define lr.default-reductions "consistent"
1846 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1847 prevents the omission of expected tokens for %error-verbose.
1848
1849 2009-08-26 Akim Demaille <demaille@gostai.com>
1850
1851 tests: portability fix.
1852 * tests/input.at (Bad escapes in literals): Don't expect "echo
1853 '\0'" to output \ then 0.
1854
1855 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1856
1857 Actually handle the yytable zero value correctly this time.
1858 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
1859 mention zero values in the YYTABLE comments.
1860 * data/glr.c (yytable_value_is_error): Don't check for zero
1861 value.
1862 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1863 * data/yacc.c (yytable_value_is_error): Likewise.
1864 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1865 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1866 * src/tables.h: In header comments, explain why it's useless to
1867 check for a zero value in yytable.
1868
1869 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1870
1871 More fixes related to last two patches.
1872 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1873 defined.
1874 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
1875 yytable comments: zero indicates syntax error not default
1876 action.
1877 * data/glr.c (yyis_pact_ninf): Rename to...
1878 (yypact_value_is_default): ... this.
1879 (yyisDefaultedState): Update for rename.
1880 (yyis_table_ninf): Rename to...
1881 (yytable_value_is_error): ... this, and check for value zero
1882 besides just YYTABLE_NINF.
1883 (yygetLRActions): Check for default value from yypact. It
1884 appears that this check is always performed before this function
1885 is invoked, and so adding the check here is probably redundant.
1886 However, the code may evolve after this subtlety is forgotten.
1887 Also, update for rename to yytable_value_is_error. Because that
1888 macro now checks for zero, a different but equivalent branch of
1889 the if-then-else here is evaluated.
1890 (yyreportSyntaxError): Update for rename to
1891 yytable_value_is_error. The zero condition was mishandled
1892 before.
1893 (yyrecoverSyntaxError): Update for renames. No behavioral
1894 changes.
1895 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1896 New function.
1897 (yy_table_value_is_error_): New function.
1898 (parse): Use new functions where possible. No behavioral
1899 changes.
1900 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1901 The zero condition was mishandled before.
1902 * data/yacc.c (yyis_pact_ninf): Rename to...
1903 (yypact_value_is_default): ... this.
1904 (yyis_table_ninf): Rename to...
1905 (yytable_value_is_error): ... this, and check for value zero
1906 besides just YYTABLE_NINF.
1907 (yysyntax_error): Update for rename to yytable_value_is_error.
1908 The zero condition was mishandled before.
1909 (yyparse): Update for renames. No behavioral changes.
1910 * src/tables.h: Improve comments about yypact, yytable, etc.
1911 more. Most importantly, say yytable value of zero means syntax
1912 error not default action.
1913
1914 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1915
1916 Fix %error-verbose for conflicts resolved by %nonassoc.
1917 * NEWS (2.5): Document.
1918 * data/glr.c (yyreportSyntaxError): Fix this by checking
1919 yyis_table_ninf.
1920 * data/yacc.c (yysyntax_error): Likewise.
1921 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1922 yytable_ninf_.
1923 * data/lalr1.java (yysyntax_error): Likewise.
1924 * tests/conflicts.at (%nonassoc and eof): Update expected output
1925 and remove FIXME.
1926
1927 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1928
1929 Some code and documentation improvements.
1930 * data/c.m4 (b4_table_value_equals): New macro to capture
1931 some repeated code.
1932 * data/glr.c (yyis_pact_ninf): Use it here.
1933 (yyis_table_ninf): Likewise.
1934 (yyreportSyntaxError): Improve internal comments.
1935 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1936 Use it everywhere possible.
1937 (yyis_table_ninf): Likewise.
1938 (yysyntax_error): Improve internal comments.
1939 * data/lalr1.cc (yysyntax_error_): Likewise.
1940 * data/lalr1.java (yysyntax_error): Likewise.
1941 * src/tables.h: Improve comments about yypact, yytable, etc.
1942
1943 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
1944
1945 Use locale when quoting.
1946 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1947 quote rather than implementing quoting here.
1948
1949 2009-08-20 Eric Blake <ebb9@byu.net>
1950
1951 Make previous patch more robust.
1952 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1953 argmatch.h.
1954 (output_skeleton): Use it.
1955 Suggested by Akim Demaille.
1956
1957 Import latest m4/m4.m4.
1958 * submodules/autoconf: Update to autoconf 2.64.
1959 * configure.ac (M4_GNU_OPTION): New define.
1960 * src/output.c (output_skeleton): Use it to resolve FIXME.
1961 * NEWS: Mention this.
1962
1963 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
1964
1965 Fix complaints about escape sequences.
1966 Discussed starting at
1967 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1968 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1969 For a \0 and similar escape sequences meaning the null
1970 character, report an invalid escape sequence instead of an
1971 invalid null character because the latter does not actually
1972 appear in the user's input.
1973 In all escape sequence complaints, don't escape the initial
1974 backslash, and don't quote when the sequence appears at the end
1975 of the complaint line unless there's whitespace that quotearg
1976 won't escape.
1977 Consistently say "invalid" not "unrecognized".
1978 Consistently prefer "empty character literal" over "extra
1979 characters in character literal" warning for invalid escape
1980 sequences; that is, consistently discard those sequences.
1981 * tests/input.at (Bad escapes in literals): New.
1982
1983 2009-08-19 Akim Demaille <demaille@gostai.com>
1984
1985 doc: fixes.
1986 * doc/bison.texinfo: Fix minor Texinfo errors.
1987
1988 2009-08-19 Akim Demaille <demaille@gostai.com>
1989
1990 doc: %initial-action to initialize yylloc.
1991 Reported by Bill Allombert.
1992 * doc/bison.texinfo: Set fill-column to 76.
1993 (Location Type): Document the use of %initial-action to initialize
1994 yylloc.
1995
1996 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
1997
1998 maint: update for gnulib's recent update-copyright changes
1999 * gnulib: Update.
2000 * .x-update-copyright (COPYING): Add as it's no longer implied
2001 when .x-update-copyright is present.
2002 * cfg.mk (update-copyright-local): Remove, now ignored.
2003 (update-copyright): Declare update-b4-copyright as a dependency.
2004
2005 2009-08-17 Akim Demaille <demaille@gostai.com>
2006
2007 build: require gettext 0.17.
2008
2009 Suggested by Bruno Haible.
2010 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
2011 * configure.ac: require gettext 0.17 to ensure compatibility with
2012 gnulib.
2013
2014 2009-08-17 Akim Demaille <demaille@gostai.com>
2015
2016 build: lower gettext requirements.
2017
2018 Bison was uselessly requiring the formatstring macros from
2019 gettext, which resulted in mo files not being installed on systems
2020 that perfectly supported Bison mo files. Lower the requirement.
2021 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
2022
2023 * configure.ac: Require need-ngettext instead of
2024 need-formatstring-macros.
2025 Reported by Martin Jabocs.
2026 Suggested by Bruno Haible.
2027 * INSTALL: Restructure.
2028 (Internationalization): New.
2029
2030 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
2031
2032 maint: fix use of copyright year intervals.
2033 * gnulib: Update.
2034 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
2035 as now recommended in gnulib/NEWS.
2036 * build-aux/update-b4-copyright: Fix.
2037 * cfg.mk (update-copyright-env): Configure update-copyright.
2038
2039 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
2040
2041 Make it easier to write deterministic tests.
2042 Continues Akim's work from his 2009-06-10 commits.
2043 * src/reader.c (check_and_convert_grammar): Don't add any
2044 symbols after the first symbols_do invocation.
2045 * src/symtab.c (symbols_sorted): New static global.
2046 (user_token_number_redeclaration): Update comments.
2047 (symbol_from_uniqstr): If a new symbol is being created, assert
2048 that symbols_sorted hasn't been allocated yet.
2049 (symbols_free): Free symbols_sorted.
2050 (symbols_cmp, symbols_cmp_qsort): New functions.
2051 (symbols_do): Sort symbol_table into symbols_sorted on first
2052 invocation.
2053 * tests/input.at (Numbered tokens): Recombine tests now that the
2054 output should be deterministic across multiple numbers.
2055
2056 2009-08-12 Akim Demaille <demaille@gostai.com>
2057
2058 distcheck: fix.
2059
2060 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
2061
2062 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
2063
2064 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
2065
2066 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
2067
2068 Miscellaneous code readability improvements.
2069
2070 * src/reader.c (reader): Move %define front-end variable
2071 defaults and checking into...
2072 (prepare_percent_define_front_end_variables): ... this new
2073 function.
2074
2075 * src/scan-gram.l (INITIAL): For consistency with string
2076 literals, don't store open quote on character literal. It's
2077 discarded before returning anyway.
2078 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
2079 Make length test more readable, and make the character stored
2080 for an empty literal more obvious while consistent with the
2081 previous behavior.
2082
2083 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
2084 USER_NUMBER_HAS_STRING_ALIAS throughout.
2085 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
2086 that is repeated in symtab.h. Improve argument names to make it
2087 clear which side of the symbol-string alias pair is which.
2088 (symbol_check_alias_consistency): Improve local variable names
2089 for the same purpose.
2090 * src/symtab.h (struct symbol): Make comments about aliases
2091 clearer.
2092 (symbol_make_alias): Improve comments and argument name.
2093 * src/output.c (token_definitions_output): Update for rename to
2094 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
2095
2096 2009-08-08 Alex Rozenman <rozenman@gmail.com>
2097
2098 Convert "misleading reference" messages to warnings.
2099 * src/scan-code.l: New function 'show_sub_messages', more
2100 factoring.
2101 * tests/named-ref.at: Adjust tests.
2102
2103 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
2104
2105 maint: run "make update-copyright"
2106
2107 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
2108
2109 maint: make update-b4-copyright easier to use
2110 * build-aux/update-b4-copyright: In warnings, report line
2111 numbers rather than character positions.
2112 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
2113 that update-copyright runs it.
2114 * gnulib: Update.
2115
2116 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
2117
2118 maint: clean up update-b4-copyright code
2119 * build-aux/update-b4-copyright: Do not accept 2-digit
2120 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
2121 Don't accept a `[' in a b4_copyright argument.
2122 Format code more consistently.
2123 Don't assume b4*copyright never occurs.
2124
2125 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2126
2127 maint: automate b4_copyright updates.
2128 * Makefile.am (update-b4-copyright): New target rule.
2129 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
2130 * build-aux/update-b4-copyright: New.
2131 * data/yacc.c: Remove stray characters around b4_copyright
2132 invocations.
2133
2134 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2135
2136 maint: automate annual package-wide copyright-year update.
2137 * .x-update-copyright: New.
2138 * Makefile.am (EXTRA_DIST): Remove maint.mk.
2139 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
2140 update-copyright. Remove gnumakefile, which is implied by
2141 maintainer-makefile.
2142 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
2143 * gnulib: Update.
2144 * maint.mk: Remove, now copied from gnulib.
2145 * examples/extexi: Add missing "(C)" in copyright statement so
2146 update-copyright can recognize it.
2147 * src/LR0.h: Likewise.
2148 * src/print.h: Likewise.
2149 * src/print_graph.h: Likewise.
2150 * src/gram.c: Add missing comma in copyright statement.
2151 * src/gram.h: Likewise.
2152
2153 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2154
2155 Fix "make distcheck".
2156 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
2157 of just calc.stamp.
2158
2159 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
2160
2161 Pacify "gcc -Wunused" for the input function from Flex.
2162 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
2163 and later.
2164 * src/scan-code.l: Add "%option noinput", which I cannot find in
2165 the Flex manual, but which Flex has supported since at least as
2166 far back as 2.5.4. However, if any of our developers still use
2167 Flex 2.5.4, they'll need to stop configuring with
2168 --enable-gcc-warnings because "%option noinput" didn't work
2169 correctly until Flex 2.5.6.
2170 * src/scan-gram.l: Likewise.
2171 * src/scan-skel.l: Likewise.
2172
2173 2009-07-31 Alex Rozenman <rozenman@gmail.com>
2174
2175 Fix --enable-gcc-warnings problems.
2176 * src/reader.c: Adjust variable names.
2177 * src/scan-code.l: Fix prototypes and adjust names.
2178 * src/named-ref.c: Remove redundant "if".
2179
2180 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2181
2182 Fix a --enable-gcc-warnings problem.
2183 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
2184 variable.
2185
2186 2009-07-24 Alex Rozenman <rozenman@gmail.com>
2187
2188 Fix some memory leaks.
2189 * src/named-ref.c: Add a pointer check (named_ref_free).
2190 * src/scan-code.l: New function (variant_table_free). Called in
2191 code_scanner_free.
2192 * src/symlist.c: Call to named_ref_free (symbol_list_free).
2193
2194 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2195
2196 Warn about character literals not of length one.
2197 * NEWS (2.5): Document.
2198 * src/scan-gram.l (INITIAL): Remove comment that we don't check
2199 the length.
2200 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
2201 * tests/input.at (Bad character literals): New test group.
2202
2203 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2204
2205 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
2206
2207 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
2208
2209 Some M4 cleanup in the testsuite.
2210 Suggested by Eric Blake at
2211 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
2212 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
2213 complicate the code by distinguishing between a missing value
2214 and an empty string value for an optional argument. This fix is
2215 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
2216 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
2217 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
2218 arguments are not needed because of the following changes.
2219 Fix stale comments.
2220 Bison developers should use GNU M4 and should not use
2221 POSIXLY_CORRECT when building the test suite, so do not
2222 complicate the code by avoiding $10 and above.
2223 Do not quote an empty string value for an optional argument, and
2224 do not distinguish between a missing value and an empty string
2225 value.
2226
2227 2009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
2228
2229 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
2230
2231 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2232
2233 Revert unnecessary column realignment in --help output.
2234 Reported by Akim Demaille at
2235 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
2236 * src/getargs.c (usage): Here.
2237
2238 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2239
2240 Alphabetical order in src/Makefile.am.
2241 * src/Makefile.am: Adjust.
2242
2243 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2244
2245 Style changes and factoring.
2246 * src/named-ref.h: Add comments.
2247 * src/parse-gram.y: Readability and style changes.
2248 * src/reader.c: Factoring: assign_named_ref function.
2249 * src/scan-code.l: Factoring and style changes. Rename
2250 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2251 Use "unsigned" type for variant index. Improve readablity.
2252 * src/scan-gram.l: Change error messages and add comments.
2253 * src/symlist.h: symbol_list_null: New function decl.
2254 * src/symlist.c: symbol_list_null: Implement here.
2255 * tests/named-refs.at: Adjust for new error messages.
2256
2257 2009-06-29 Eric Blake <ebb9@byu.net>
2258
2259 scan-code: avoid compiler warnings
2260 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2261
2262 2009-06-29 Akim Demaille <demaille@gostai.com>
2263
2264 build: avoid concurrent extraction of calc++.
2265 * examples/calc++/Makefile.am (calc.stamp): New.
2266 Depend on it to create the sources of calc++ so that concurrent
2267 builds don't launch several "extexi" in parallel.
2268 Not only this is inefficient, this also builds incorrect sources
2269 with several extractions mixed together.
2270
2271 2009-06-27 Alex Rozenman <rozenman@gmail.com>
2272
2273 Implement support for named symbol references.
2274 * src/parse-gram.y: Add new syntax (named_ref.opt).
2275 * src/reader.c: Store named refs in symbol lists.
2276 * src/reader.h: New argument for symbol_append and
2277 action_append functions.
2278 * src/scan-code.h: Add new field (named_ref) into
2279 code_props data structure. Keeps named ref of midrule
2280 actions.
2281 * src/scan-code.l: Support for named refs in semantic
2282 action code. New function 'parse_named_ref'.
2283 * src/scan-gram.l: Support bracketed id.
2284 * src/symlist.c: Store named refs in symbol lists.
2285 * src/symlist.h: New field in symbol list: named_ref.
2286 * src/named-ref.h: New file, a struct for named_ref.
2287 * src/named-ref.cp: New file, named_ref_new function.
2288 * src/local.mk: Add two new files.
2289 * tests/testsuite.at: Include new test group:
2290 * tests/named-refs.at: this new file.
2291
2292 2009-06-25 Akim Demaille <demaille@gostai.com>
2293
2294 hash: check insertion for memory exhaustion.
2295 * src/uniqstr.c (uniqstr_new): New.
2296
2297 2009-06-11 Akim Demaille <demaille@gostai.com>
2298
2299 style changes.
2300 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2301 * src/print-xml.c: Style changes.
2302 * tests/conflicts.at: Comment changes.
2303
2304 2009-06-11 Akim Demaille <demaille@gostai.com>
2305
2306 xml: beware of user strings used to give a %prec to rules.
2307 * tests/conflicts.at (%prec with user strings): New.
2308 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2309 XML output.
2310
2311 2009-06-11 Akim Demaille <demaille@gostai.com>
2312
2313 hash: check insertion for memory exhaustion.
2314 * src/muscle-tab.c (muscle_insert, muscle_grow)
2315 * src/state.c (state_hash_insert): Check the return value of
2316 hash_insert.
2317
2318 2009-06-10 Akim Demaille <demaille@gostai.com>
2319
2320 deterministic test suite.
2321 Some consistency checks on symbols are performed after all the
2322 symbols were read, by an iteration over the symbol table. This
2323 traversal is nondeterministic, which can be a problem for test
2324 cases.
2325 Avoid this.
2326 Addresses another form of nondeterminism reported by Joel E. Denny.
2327 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2328
2329 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2330 test in two.
2331 Use different file names for the three tests to make the
2332 maintenance easier.
2333
2334 2009-06-10 Akim Demaille <demaille@gostai.com>
2335
2336 deterministic user-token-number redeclaration errors.
2337 Address nondeterminism reported by Joel E. Denny.
2338 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2339
2340 * src/uniqstr.h: Comment changes.
2341 * src/location.h (boundary_cmp, location_cmp): New.
2342 * src/symtab.c (user_token_number_redeclaration): New.
2343 (symbol_translation): Use it.
2344 * tests/input.at (Numbered tokens): Adjust the expected output.
2345
2346 2009-05-25 Akim Demaille <demaille@gostai.com>
2347
2348 gnulib: update.
2349 * gnulib: Update to latest.
2350 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2351 * m4/.gitignore: Regen.
2352 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2353 Call xalloc_die on hash_insert failures.
2354 Requested by the new __warn_unused_result__ attribute of
2355 hash_insert.
2356
2357 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2358
2359 Convert multiple variable definition warnings to complaints.
2360 * NEWS (2.5): Add a new entry for that change.
2361 * doc/bison.texinfo (Decl Summary): Update %define entry.
2362 (Bison Options): Update -D/--define/-F/--force-define entry.
2363 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
2364 * src/muscle_tab.h (muscle_percent_define_insert): Update
2365 comments.
2366 * tests/input.at (`%define errors'): Update.
2367 (`%define, --define, --force-define'): Update.
2368
2369 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2370
2371 -F/--force-define and relative %define/-D/--define priorities.
2372 * NEWS (2.5): Add documentation to -D/--define entry.
2373 * build-aux/cross-options.pl: Hard-code association of
2374 --force-define with %define.
2375 * doc/bison.texinfo (Decl Summary): In %define entry,
2376 cross-reference command-line options.
2377 (Bison Options): Add documentation to -D/--define entry.
2378 (Option Cross Key): Widen column for --force-define row.
2379 * src/getargs.c (usage): Document -F/--force-define. Realign
2380 options in output.
2381 (short_options, long_options, getargs): Parse -F/--force-define,
2382 and update muscle_percent_define_insert invocation.
2383 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
2384 (muscle_percent_define_insert): Add argument with that type.
2385 * src/muscle_tab.c (muscle_percent_define_insert): Implement
2386 -F/--force-define behavior and priorities.
2387 * src/parse-gram.y (prologue_declaration): Update
2388 muscle_percent_define_insert invocations.
2389 * tests/input.at (`%define, --define'): Rename to...
2390 (`%define, --define, --force-define'): ... this and extend.
2391
2392 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2393
2394 Update some comments to make sense for -D.
2395 * data/bison.m4 (b4_check_user_names): In header comments, say
2396 "user occurrence" instead of "grammar occurrence".
2397 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
2398 (muscle_percent_code_grow): Likewise just for consistency.
2399
2400 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2401
2402 * data/c++.m4: Update copyright year.
2403
2404 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2405
2406 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2407
2408 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2409
2410 Handle a trailing `:' in a user-supplied C++ namespace better.
2411 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2412 among the closing braces here. This fix might make the
2413 generated code easier to debug, but otherwise it should be
2414 insignificant because a trailing `:' is a C++ error already.
2415
2416 2009-05-19 Akim Demaille <demaille@gostai.com>
2417
2418 remove useless variable.
2419 * src/getargs.c (skeleton_arg): Remove now useless variable.
2420 Should help the compiler see that this printf-like call is sane.
2421
2422 2009-05-11 Akim Demaille <demaille@gostai.com>
2423
2424 doc: use C++ headers.
2425 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2426 headers.
2427
2428 2009-05-05 Akim Demaille <demaille@gostai.com>
2429
2430 fix hexadecimal token number support.
2431 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
2432
2433 2009-05-05 Akim Demaille <demaille@gostai.com>
2434
2435 tests: check token numbers.
2436 * tests/input.at (Numbered tokens): New.
2437
2438 2009-05-04 Akim Demaille <demaille@gostai.com>
2439
2440 bison: catch bad symbol names.
2441 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2442 * tests/input.at: Adjust.
2443
2444 2009-05-04 Akim Demaille <demaille@gostai.com>
2445
2446 space changes.
2447 * src/scan-gram.l: Untabify to be robust to zealous editors.
2448
2449 2009-05-04 Akim Demaille <demaille@gostai.com>
2450
2451 identifiers: dashes are letters.
2452 Dashes can now start identifiers (symbols and directives).
2453
2454 * src/scan-gram.l ({letter}): Add dash.
2455 ({id}): Remove it.
2456 * tests/input.at (Symbols): Adjust.
2457 Remove stray comment.
2458 * tests/regression.at (Invalid inputs): Adjust error message.
2459 * doc/bison.texinfo (Symbols): Update.
2460
2461 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2462
2463 Declare %code to be a permanent feature.
2464 * NEWS (2.4.2): Here.
2465 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2466 experimental.
2467 (Decl Summary): Likewise.
2468
2469 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2470
2471 Convert underscores to dashes in some %define variable names.
2472 For now, just api.push-pull and lr.keep-unreachable-states.
2473 Maintain old names for backward compatibility.
2474 * NEWS (2.5): Document.
2475 * data/c.m4 (b4_identification): Update comment.
2476 * data/yacc.c: Update access.
2477 * doc/bison.texinfo: Update.
2478 * etc/bench.pl.in (bench_grammar): Update use.
2479 * src/files.c (tr): Move to...
2480 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2481 think of a better place to expose it. My logic is that, for all
2482 uses of tr so far, command-line arguments can be involved, and
2483 getargs.h is already included.
2484 * src/main.c (main): Update access.
2485 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2486 variable names to new variable names before assigning value.
2487 * src/reader.c (reader): Update setting default.
2488 * tests/calc.at: Update uses.
2489 * tests/conflicts.at (Unreachable States After Conflict
2490 Resolution): Update use.
2491 * tests/input.at (%define enum variables): Update use.
2492 (%define backward compatibility): New test group.
2493 * tests/push.at: Update uses.
2494 * tests/reduce.at: Update uses.
2495 * tests/torture.at: Update uses.
2496
2497 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2498
2499 Set all front-end %define defaults in one place.
2500 * src/main.c (main): Move lr.keep_unreachable_states default...
2501 * src/reader.c (reader): ... to here.
2502
2503 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2504
2505 Rename lr.default_reductions to lr.default-reductions.
2506 * NEWS (2.5): Here.
2507 * doc/bison.texinfo: Here.
2508 * src/lalr.c (initialize_LA): Here.
2509 * src/print.c (print_reductions): Here.
2510 * src/reader.c (reader): Here.
2511 * src/tables.c (action_row): Here.
2512 * tests/input.at (%define enum variables): Here.
2513 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2514
2515 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2516
2517 Pacify ./configure --enable-gcc-warnings.
2518 * tests/input.at (Symbols): Prototype yyerror and yylex.
2519
2520 2009-04-21 Akim Demaille <demaille@gostai.com>
2521
2522 tests: check the use of dashes and periods in symbols.
2523 * tests/input.at (Symbol): New test group.
2524
2525 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2526
2527 Document how `%define "var" "value"' is not M4-friendly.
2528 * src/parse-gram.y (variable): In comments here.
2529
2530 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2531
2532 Add copyright updates missed during previous cherry pick.
2533 * src/output.c: Here.
2534 * src/parse-gram.y: Here.
2535 * src/scan-gram.l: Here.
2536
2537 2009-04-20 Akim Demaille <demaille@gostai.com>
2538
2539 variables: accept dashes.
2540 * src/scan-gram.l ({id}): Also accept dashes after the initial
2541 letter.
2542 ({directive}): Use {id}.
2543 * src/parse-gram.y: Comment and formatting changes.
2544 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2545 symbols.
2546 * src/complain.h, src/complain.c (yacc_at): New.
2547 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2548 symbol names.
2549 * src/output.c (token_definitions_output): Do not #define token
2550 names with dashes.
2551
2552 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2553
2554 Clean up recent patches a little.
2555 Reported by Akim Demaille.
2556 * doc/bison.texinfo (Understanding): Fix typos.
2557 * src/print.c (print_reductions): Don't use negated variable.
2558
2559 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2560
2561 List accepted values for a %define enum variable with an invalid value.
2562 Suggested by Akim Demaille at
2563 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2564 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2565 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
2566 * tests/input.at (%define lr.default_reductions invalid values): Merge
2567 into...
2568 (%define enum variables): ... here, and update output.
2569
2570 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2571
2572 Rename "default rule" to "default reduction".
2573 This includes changing variable names in code, changing
2574 comments, and renaming %define lr.default_rules to %define
2575 lr.default_reductions.
2576 * NEWS (2.5): Update IELR documentation.
2577 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
2578 Adjust YYDEFACT and yydefact_ documentation.
2579 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2580 and lr.type documentation. Make some other wording
2581 improvements.
2582 (Glossary): Adjust cross-references and Default Reduction
2583 definition.
2584 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2585 Remove a confusing comment pointed out by Akim Demaille.
2586 (initialize_LA): Adjust code.
2587 * src/print-xml.c (print_reductions): Adjust code.
2588 * src/print.c (print_reductions): Adjust code.
2589 * src/reader.c (reader): Adjust code.
2590 * src/tables.c (action_row): Adjust code.
2591 (token_actions): Adjust code.
2592 * src/tables.h: Adjust YYDEFACT documentation.
2593 * tests/input.at (%define lr.default_rules invalid values):
2594 Rename test group to...
2595 (%define lr.default_reductions invalid values): ... this, and
2596 update grammar file and expected output.
2597 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2598 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2599
2600 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2601
2602 Document %define lr.type and lr.default_rules.
2603 * NEWS (2.5): Add an entry.
2604 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2605 besides just LALR(1) and GLR(1).
2606 * doc/bison.texinfo (Introduction): Likewise.
2607 (Language and Grammar): Bison is no longer limited to LALR(1)
2608 restrictions.
2609 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2610 when trying to distinguish from GLR. Talk about LR(1) grammars
2611 rather than LALR(1) grammars.
2612 (Decl Summary): In %define api.push_pull entry, say it applies
2613 to deterministic parsers in C rather than LALR(1) parsers in C.
2614 Add lr.default_rules entry.
2615 Add lr.type entry.
2616 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2617 restrictions.
2618 (Generalized LR Parsing): Same changes as for the previous GLR
2619 section.
2620 (Memory Management): Say deterministic rather than LALR(1).
2621 (Understanding): Correct some bison output.
2622 Index discussion of "accepting state".
2623 Say deterministic rather than LALR(1).
2624 (Bison Options): In --yacc entry, say deterministic rather than
2625 LALR(1).
2626 In --report, --graph, and --xml entries, just don't mention
2627 LALR(1).
2628 (C++ Parsers): Say deterministic rather than LALR(1).
2629 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2630 (Glossary): Add Accepting State, Consistent State, Default Rule,
2631 and IELR(1) definitions.
2632 In Generalized LR (GLR) definition, make same changes as in
2633 previous GLR sections.
2634 In LALR(1) definition, say Bison uses LALR(1) by default rather
2635 than implying Bison is limited to LALR(1).
2636 (LocalWords): Add IELR.
2637
2638 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2639
2640 Finish implementing %define lr.type.
2641 Its value can be "LALR", "IELR", or "canonical LR".
2642 * lib/timevar.def (TV_IELR_PHASE1): New var.
2643 (TV_IELR_PHASE2): New var.
2644 (TV_IELR_PHASE3): New var.
2645 (TV_IELR_PHASE4): New var.
2646 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2647 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2648 Sbitset.h, ielr.h, and ielr.c.
2649 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2650 trace_types): Add trace_ielr.
2651 * src/lalr.h, src/lalr.c (ngotos): Export it.
2652 (F): Rename to...
2653 (goto_follows): ... this, update all uses, and export it.
2654 (set_goto_map): Export it.
2655 (map_goto): Export it.
2656 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2657 handled in ielr.
2658 (initialize_LA): Export it. Move lookback allocation to...
2659 (lalr): ... here because, for canonical LR, initialize_LA must
2660 be invoked but lookback and much of the rest of LALR isn't
2661 needed.
2662 * main.c (main): Instead of lalr, invoke ielr, which invokes
2663 lalr.
2664 * src/reader.c (reader): Default lr.type to "LALR".
2665 Default lr.default_rules to "accepting" if lr.type is "canonical
2666 LR". Leave the default as "all" otherwise.
2667 Check for a valid lr.type value.
2668 * src/state.h, src/state.c (struct state_list): Add state_list
2669 member.
2670 (state_new): Initialize state_list member to NULL.
2671 (state_new_isocore): New function, exported.
2672 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2673 exercises all values of lr.type.
2674 (GNU AWK Grammar): Rename test group to...
2675 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2676 AT_TEST_EXISTING_GRAMMAR.
2677 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2678 (GNU pic Grammar): Rename test group to...
2679 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2680 AT_TEST_EXISTING_GRAMMAR.
2681 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2682 all values of lr.type.
2683 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2684 (Lane Split): Likewise.
2685 (Complex Lane Split): Likewise.
2686 (Split During Added Lookahead Propagation): Likewise.
2687
2688 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2689
2690 Add new files for IELR and canonical LR implementation.
2691 * src/AnnotationList.c: New.
2692 * src/AnnotationList.h: New.
2693 * src/InadequacyList.c: New.
2694 * src/InadequacyList.h: New.
2695 * src/Sbitset.c: New.
2696 * src/Sbitset.h: New.
2697 * src/ielr.c: New.
2698 * src/ielr.h: New.
2699
2700 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2701
2702 Implement %define lr.default_rules.
2703 Its value describes the states that are permitted to contain
2704 default rules: "all", "consistent", or "accepting".
2705 * src/reader.c (reader): Default lr.default_rules to "all".
2706 Check for a valid lr.default_rules value.
2707 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2708 is "accepting", then only mark the accepting state as
2709 consistent.
2710 (initialize_LA): Tell state_lookahead_tokens_count whether
2711 lr.default_rules is "accepting".
2712 * src/tables.c (action_row): If lr.default_rules is not "all",
2713 then disable default rules in inconsistent states.
2714 * src/print.c (print_reductions): Use this opportunity to
2715 perform some assertions about whether lr.default_rules was
2716 obeyed correctly.
2717 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2718 helps with checking the parser tables for a grammar.
2719 * tests/input.at (%define lr.default_rules invalid values): New
2720 test group.
2721 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2722 AT_TEST_TABLES_AND_PARSE.
2723 (`no %define lr.default_rules'): New test group generated by
2724 AT_TEST_LR_DEFAULT_RULES.
2725 (`%define lr.default_rules "all"'): Likewise.
2726 (`%define lr.default_rules "consistent"'): Likewise.
2727 (`%define lr.default_rules "accepting"'): Likewise.
2728
2729 2009-04-20 Akim Demaille <demaille@gostai.com>
2730
2731 Consistently refer to Yacc, not YACC.
2732 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2733
2734 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2735
2736 Pacify make maintainer-check-posix.
2737 * tests/input.at (%define, --define): Move bison command-line
2738 options before grammar file name.
2739
2740 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2741
2742 Document semicolon warnings.
2743 * NEWS (2.5): Here.
2744
2745 2008-12-08 Akim Demaille <demaille@gostai.com>
2746
2747 Fix portability issue in the test suite.
2748 * tests/local.at (AT_MATCHES_CHECK): New.
2749 Based on Perl instead of Sed. Sed has too many portability
2750 pitfalls, not ever Sed is GNU Sed.
2751 * tests/actions.at (Fix user actions without a trailing semicolon):
2752 Use it.
2753
2754 2008-12-07 Di-an Jan <dianj@freeshell.org>
2755
2756 Implement the FIXME that ends an user action with a semicolon
2757 if it seems necessary.
2758 * src/scan-code.l (flex rules section): Flag cpp directive from
2759 any `#' to the first unescaped end-of-line. Semicolon is not
2760 needed after `;', `{', '}', or cpp directives and is needed after
2761 any other token (whitespaces and comments have no effect).
2762 * tests/actions.at (Fix user actions without a trailing semicolon):
2763 New test.
2764 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2765 to make user actions complete statements.
2766 Adjust column numbers in error messages.
2767 * tests/regression.at (Fix user actions without a trailing semicolon):
2768 Remove. Covered by new test.
2769
2770 2009-04-14 Akim Demaille <demaille@gostai.com>
2771
2772 doc: minor fixes.
2773 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2774 (Table of Symbols): Remove duplicate entry for %debug.
2775
2776 2009-04-10 Eric Blake <ebb9@byu.net>
2777
2778 submodules: update to latest
2779 * submodules/autoconf: Use latest upstream Autoconf.
2780
2781 2009-04-06 Eric Blake <ebb9@byu.net>
2782
2783 Work around autoconf 2.63b bug in testsuite.
2784 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2785 autoconf bug related to # in test.
2786
2787 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2788
2789 * NEWS (2.5): Describe new -D/--define feature.
2790
2791 2008-11-10 Akim Demaille <demaille@gostai.com>
2792
2793 --trace=muscles
2794 * src/getargs.h, src/getargs.c (trace_muscle): New.
2795 (trace_types, trace_args): Support it.
2796 * src/output.c (output_skeleton): Use it.
2797
2798 2008-11-10 Akim Demaille <demaille@gostai.com>
2799
2800 muscles_output.
2801 * src/output.c (muscles_output): New, extracted from...
2802 (output_skeleton): here.
2803 Adjust.
2804
2805 2008-11-21 Akim Demaille <demaille@gostai.com>
2806
2807 Display the changes in cross-options.texi.
2808 * build-aux/cross-options.pl ($sep): New, to separate items.
2809 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
2810 the changes.
2811
2812 2008-11-20 Di-an Jan <dianj@freeshell.org>
2813
2814 Improves options in the manual.
2815 * doc/bison.texinfo (-g, -x): Add space before argument.
2816 (Option Cross Key): Implement FIXME: listing directives also.
2817 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2818 (Short Option): Special case -d. Put arguments inside @option.
2819 (Bison Directive): Add column, automatically extracted from
2820 src/scan-gram.l (actual name passed as the first argument)
2821 with special case for %define.
2822 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
2823 to build-aux/cross-options.pl.
2824 * src/getargs.c (usage): Document limitations of cross-options.pl.
2825 * src/scan-gram.l: Likewise.
2826
2827 2009-02-25 Akim Demaille <demaille@gostai.com>
2828
2829 Copyright years.
2830 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2831
2832 2008-12-08 Akim Demaille <demaille@gostai.com>
2833
2834 Install autoconf as a submodule to get m4sugar.
2835 * .gitmodules: Add submodules/autoconf.
2836 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2837 submodules/autoconf.
2838
2839 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2840
2841 Simplify last patch slightly.
2842 * src/getargs.c (getargs): Here.
2843
2844 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2845
2846 Fix last warning from --enable-gcc-warnings.
2847 * src/getargs.c (getargs): Don't assign const address to non-const
2848 pointer.
2849
2850 2008-11-17 Di-an Jan <dianj@freeshell.org>
2851
2852 Handle --enable-gcc-warnings.
2853 * src/getargs.c (command_line_location): Set parameters to void.
2854
2855 2008-11-11 Akim Demaille <demaille@gostai.com>
2856
2857 AT_FULL_COMPILE.
2858 * tests/actions.at, tests/regression.at: Use it.
2859
2860 2008-11-07 Akim Demaille <demaille@gostai.com>
2861
2862 Pass command line location to skeleton_arg and language_argmatch.
2863 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2864 The location argument is now mandatory.
2865 Adjust all dependencies.
2866 (getargs): Use command_line_location.
2867
2868 2008-11-07 Akim Demaille <demaille@gostai.com>
2869
2870 -D, --define.
2871 * src/getargs.c (usage): Document -D.
2872 Fix help string for --locations.
2873 (command_line_location): New.
2874 (short_options, long_options, getargs): Support -D, --define.
2875 (getargs): Move -d support at the right place.
2876 * doc/bison.texinfo (Bison Options): Update.
2877 * tests/input.at (%define, --define): New.
2878
2879 2008-11-07 Akim Demaille <demaille@gostai.com>
2880
2881 Initialize the muscle table before parsing the command line.
2882 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2883 (getargs): Define file_name.
2884 * src/main.c (main): Initialize muscle_tab before calling
2885 getargs.
2886 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2887 its value is not available yet.
2888
2889 2008-11-09 Akim Demaille <demaille@gostai.com>
2890
2891 Require the generation of parse-gram.output.
2892 * src/Makefile.am (YACC): Pass --report=all.
2893
2894 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2895
2896 * NEWS (2.5): New stub.
2897
2898 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2899
2900 Fix options documentation.
2901 * build-aux/cross-options.pl: As in --help output, write optional
2902 arguments as [=ARG] not =[ARG].
2903 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2904
2905 2008-11-07 Akim Demaille <demaille@gostai.com>
2906
2907 Fix --help.
2908 * src/getargs.c (usage): Fix help string for -W.
2909
2910 2008-11-07 Akim Demaille <demaille@gostai.com>
2911
2912 Handle more general types of option arguments.
2913 * build-aux/cross-options.pl: The argument ends at the first
2914 space, not the first non-symbol character.
2915 Use @var for each word appearing the argument description.
2916
2917 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2918
2919 Remove spurious initial empty lines.
2920 * data/location.cc: End the @output lines with an @.
2921
2922 2008-11-04 Akim Demaille <demaille@gostai.com>
2923
2924 Remove spurious initial empty lines.
2925 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2926 * data/yacc.c: End the @output lines with an @.
2927
2928 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2929
2930 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2931 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2932 requirements for a correct m4 are stricter.
2933 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
2934 * configure.ac: Update to use AC_PROG_GNU_M4.
2935 Reported by Eric Blake.
2936
2937 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2938
2939 Help with updating web manual.
2940 * HACKING: Incorporate instructions from gnulib/doc/README.
2941 * bootstrap.conf (gnulib_modules): Add gendocs.
2942
2943 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2944
2945 Fix strange %define locations for default values.
2946 Reported by Akim Demaille at
2947 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2948 and discussed again starting at
2949 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2950 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2951 because location information is bogus.
2952 Use angle brackets to delimit fake file name because square brackets
2953 look like underexpanded m4. Choose a better fake file name.
2954 Use negative line numbers.
2955 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2956 * src/location.c (location_print): If line for a boundary is negative,
2957 only print that boundary's file name.
2958 * src/location.h: Document that.
2959 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2960 defaults): Update output.
2961
2962 2008-11-07 Akim Demaille <demaille@gostai.com>
2963
2964 Locations without columns for command line arguments.
2965 * src/location.c (location_print): Don't display negative columns.
2966 * src/location.h: Document this.
2967
2968 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2969
2970 Add reminder about uploading public key to keys.gnupg.net.
2971 * HACKING (Release Procedure): Here.
2972
2973 2009-03-31 Akim Demaille <demaille@gostai.com>
2974
2975 bootstrap: --help to stdout.
2976 * bootstrap (usage): Don't send --help to stderr.
2977 Use a here doc instead of a long string.
2978
2979 2009-03-31 Akim Demaille <demaille@gostai.com>
2980
2981 bootstrap: README-hacking no longer exists
2982 * bootstrap (checkout_only_file): Set to HACKING.
2983
2984 2009-03-26 Akim Demaille <demaille@gostai.com>
2985
2986 doc: merge HACKING and README-hacking.
2987 Two files is confusing.
2988 Reported by Alexandre Duret-Lutz.
2989
2990 * README-hacking: Merge into...
2991 * HACKING (Working from the repository): here.
2992
2993 2009-03-26 Akim Demaille <demaille@gostai.com>
2994
2995 doc: update README-hacking.
2996 * README-hacking: We now use git and git submodules.
2997 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2998
2999 2009-03-26 Akim Demaille <demaille@gostai.com>
3000
3001 lalr1.cc: avoid GCC 4.3 warnings.
3002 GCC 4.3 now warns about "a || b && c" and asks for explicit
3003 parentheses.
3004 Reported by Alexandre Duret-Lutz.
3005 * data/location.cc: Update copyright years.
3006 (Position::operator==): Use parens to make precedence explicit.
3007 Compare lines and columns first, as they are more likely to be
3008 different, and they are faster to compare.
3009
3010 2009-03-26 Akim Demaille <demaille@gostai.com>
3011
3012 gnulib: update.
3013 * gnulib: Update to latest.
3014 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
3015 use +=.
3016
3017 2009-01-08 Akim Demaille <demaille@gostai.com>
3018
3019 Fix grep portability issues.
3020 Grep on Solaris does not support -q.
3021 Reported by Summum Bonum.
3022
3023 * NEWS: Add a stub for 2.4.2.
3024 * THANKS: Add Summum Bonum.
3025 * tests/atlocal.in (EGREP): New.
3026 (CC, CXX, XSLTPROC): Make it possible to override them via
3027 envvars.
3028 * tests/java.at: Use $EGREP instead of egrep.
3029 Use AT_CHECK's ignore instead of grep's -q.
3030
3031 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
3032
3033 Version 2.4.1.
3034 * NEWS: Set version and date.
3035 * lib/Makefile.am: Update copyright year.
3036 * tests/atlocal.in: Update copyright year.
3037
3038 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
3039
3040 Semicolon feature removal is not about future language support.
3041 * NEWS: The semicolon feature is no longer active for newer languages,
3042 so don't claim that it causes trouble for them.
3043
3044 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
3045
3046 * gnulib: Update submodule to HEAD.
3047
3048 2008-12-09 Akim Demaille <demaille@gostai.com>
3049
3050 Update data/README.
3051 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
3052
3053 2008-12-05 Eric Blake <ebb9@byu.net>
3054
3055 Build testsuite with newer autoconf.
3056 * tests/output.at (m4_expand): Don't override in newer autoconf,
3057 where the underlying implementation changed.
3058 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
3059 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
3060 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
3061 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
3062 since some of them contain unbalanced ')'.
3063
3064 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
3065
3066 * NEWS: Clarify a little.
3067
3068 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
3069
3070 * NEWS: Update for recent changes.
3071
3072 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3073
3074 Fix unexpanded macros in GLR defines file.
3075 Reported by Csaba Raduly at
3076 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3077 * THANKS (Csaba Raduly): Add.
3078 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3079 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3080 lexer in a separate module that includes the defines file.
3081 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
3082 source.
3083 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3084 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3085 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3086 (AT_DATA_SOURCE_PROLOGUE): New.
3087 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3088 (AT_DATA_SOURCE): New.
3089 (AT_FULL_COMPILE): New, copied from master branch and extended to
3090 support an additional source file.
3091
3092 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3093
3094 Don't let maintainer-*-check targets force a version update.
3095 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3096 handled.
3097
3098 2008-11-17 Di-an Jan <dianj@freeshell.org>
3099
3100 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3101 Align menus. Adjust word wrapping. Use node names for menu names.
3102 (Examples): Don't abbreviate node names.
3103 (LocalWords): Remove abbreviations.
3104 (Copying): Make description a sentence.
3105 (Java Action Features): Remove period to match the rest of menu.
3106
3107 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
3108
3109 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
3110 * configure.ac: Adjust usage.
3111 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3112 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3113 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
3114
3115 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3116
3117 Don't add a semicolon to actions for %skeleton or %language.
3118 It breaks Java test cases as reported by Akim Demaille.
3119 * src/scan-code.l: Implement.
3120
3121 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3122
3123 Clean up %skeleton and %language priority implementation.
3124 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
3125 remove static qualifier because others will soon need to see it.
3126 (language_prio): Likewise.
3127 (getargs): Use command_line_prio rather than 0.
3128 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
3129 enum fields.
3130 (skeleton_prio): Extern it.
3131 (language_prio): Extern it.
3132 * src/parse-gram.y: Use grammar_prio rather than 1.
3133
3134 2008-11-04 Akim Demaille <demaille@gostai.com>
3135
3136 * NEWS: Mention the trailing semicolon in action.
3137
3138 2008-11-04 Akim Demaille <demaille@gostai.com>
3139
3140 Reformat NEWS.
3141 * NEWS: Use more outline-mode markup.
3142 Suggested by Jim Meyering.
3143
3144 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
3145
3146 Fix user actions without a trailing semicolon.
3147 Reported by Sergei Steshenko at
3148 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
3149 * THANKS (Sergei Steshenko): Add.
3150 * src/scan-code.l (SC_RULE_ACTION): Fix it.
3151 * tests/regression.at (Fix user actions without a trailing semicolon):
3152 New test case.
3153
3154 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3155
3156 Initiate further development.
3157 * NEWS: Create an empty section for new entries.
3158 * gnulib: Update submodule to HEAD.
3159
3160 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3161
3162 * NEWS: Version 2.4.
3163
3164 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3165
3166 Prepare for next release.
3167 * NEWS: Briefly mention changes since 2.3b.
3168 * README: Say GNU m4 1.4.6, which we've been requiring in release
3169 announcements already, not 1.4.3, which breaks the build.
3170
3171 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3172
3173 Say %language is experimental.
3174 We're thinking of extending it's effect on output file naming. See the
3175 thread at
3176 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3177 * NEWS: Say it's experimental.
3178 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3179 recommend it over %skeleton for now.
3180 (Bison Options): Likewise.
3181 (C++ Bison Interface): Use %skeleton not %language.
3182 (Calc++ Parser): Use %skeleton not %language.
3183 * src/getargs.c (usage): Say it's experimental.
3184
3185 2008-11-01 Di-an Jan <dianj@freeshell.org>
3186 Paolo Bonzini <bonzini@gnu.org>
3187
3188 Support all Java parser class modifiers.
3189 * data/java.m4 (b4_percent_define_get3): New.
3190 (b4_final_if, b4_strictfp_if): New.
3191 * data/lalr1.java (final, strictfp, extends, implements): Support.
3192 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3193 documentation.
3194 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3195 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3196 (AT_CHECK_JAVA_GREP): New.
3197 (Java parser class modifiers): New test.
3198 (Java parser class extends and implements): New test.
3199
3200 Model exception propagation better with throws and lex_throws.
3201 * data/java.m4 (b4_list2): New.
3202 (throws): Change default.
3203 * data/lalr1.java (yyaction): Add throws.
3204 (parse): Add lex_throws in addition to throws.
3205 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3206 * tests/java.at (Java throws specifications): New test.
3207
3208 Improve documentation for Java parsers.
3209 * doc/bison.texinfo (Java Parsers): Add subsections.
3210 Don't quote first argument of %define.
3211 (Java Bison Interface): Document output files. Move documentation
3212 of parser class and merge into Java Parser Interface. Document
3213 features that error out. Document directives with no effect.
3214 Move note about Javadoc higher.
3215 (Java Semantic Values): Explicitly mention stype.
3216 Document that generic types cannot be used.
3217 (Java Location Values): Use @deftypeivar. Document constructors.
3218 Correct return value for toString.
3219 (Java Parser Interface): List undocumented constants/fields.
3220 Move documentation of fields added by %parse-param closer to list
3221 of members. Document that token names are added as fields.
3222 Document constructors accurately. Remove error method.
3223 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3224 Interface. Describe %code lexer and yylex accutately.
3225 Remove documentation that does not match the code.
3226 (Java Action Features): New.
3227 (Java Differences): Add reference. Add item on semantic values.
3228 Add note about @{ ... @}. Clarify %% epilogue placement.
3229 (Java Declarations Summary): New.
3230
3231 Fix Java skeleton.
3232 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3233 (b4_remove_comma): Quote test argument.
3234 (b4_identification): Remove "bison" field.
3235 * tests/java.at (Java parser class and package names): New test.
3236 (Java %parse-param and %lex-param): New test.
3237 (Java stype, position_class and location_class): New test.
3238
3239 2008-10-31 Di-an Jan <dianj@freeshell.org>
3240
3241 * data/lalr1.jave: Update copyright years.
3242 (YYParser): Correct name of "generated from" file in Javadoc:
3243 use b4_file_name instead of @ofile@.
3244 (Location constructor): Correct Javadoc parameter name.
3245 (yylloc): Add missing opening m4 quote after b4_location_if.
3246 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3247 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3248 (YYParser constructor): Correct Javadoc parameter name.
3249
3250 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3251
3252 Always put auxiliary code files in the same dir as other output files.
3253 * src/files.c (compute_file_name_parts): When the user specifies
3254 --output but not --file-prefix, extract the directory prefix from the
3255 file prefix not from the grammar file name. This affects the location
3256 of files like location.hh generated by the C++ skeleton. The includes
3257 in the other output files require this fix.
3258 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3259 for expected output files.
3260 (Output files): Add a test for the above.
3261
3262 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3263
3264 * gnulib: Update submodule to HEAD.
3265
3266 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3267
3268 Update copyright year.
3269 * src/files.c: Here.
3270
3271 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3272
3273 Don't overwrite the input file.
3274 * src/files.c (output_file_name_check): Fatal error if using input file
3275 for output.
3276 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3277 argument.
3278 (Conflicting output files): Add test.
3279
3280 2008-10-28 Akim Demaille <demaille@gostai.com>
3281
3282 Space changes.
3283 * data/lalr1.cc: Formatting changes.
3284
3285 2008-10-28 Akim Demaille <demaille@gostai.com>
3286
3287 Don't define debugging functions when !YYDEBUG.
3288 * data/lalr1.cc (debug_stream, set_debug_stream)
3289 (debug_level_type, debug_level, set_debug_level): Don't
3290 declare them when YYDEBUG is not defined.
3291 The implementation are already YYDEBUG-aware.
3292
3293 2008-10-28 Akim Demaille <demaille@gostai.com>
3294
3295 Prefer "continue" for empty loop bodies.
3296 * etc/bench.pl.in: Use "continue" instead of {}.
3297
3298 2008-10-28 Akim Demaille <demaille@gostai.com>
3299
3300 Space and comments changes.
3301 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3302 * data/c.m4, data/lalr1.cc: Space changes.
3303
3304 2008-10-28 Akim Demaille <demaille@gostai.com>
3305
3306 Make gnulib a submodule.
3307 * gnulib: New.
3308 * .gitmodules (gnulib): New.
3309
3310 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3311
3312 Fix yyerror_range for user-defined location type in C++. Reported by
3313 Georg Sauthoff at
3314 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3315 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3316 * THANKS (Georg Sauthoff): Add.
3317
3318 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3319
3320 Update several administrative files mainly to facilitate releasing.
3321 * HACKING (Administrivia): Make the git-merge-changelog notes more
3322 helpful.
3323 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3324 (Release Procedure): Update for git and add numerous details that were
3325 previously missing.
3326 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3327 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3328 that announcements don't claim we bootstrapped with whatever bison
3329 happened to be in PATH. Add flex as a bootstrap tool.
3330 * Makefile.maint: Remove, previously replaced by maint.mk.
3331 * Makefile.cfg: Remove, and migrate settings to...
3332 * cfg.mk: ... here for the sake of `make announcement'.
3333 * bootstrap.conf (gnulib_modules): Add announce-gen.
3334 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3335 Berry.
3336
3337 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3338
3339 Small but important bugfixes for the Java skeleton.
3340 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3341 (yy_symbol_print): Call toString on yyvaluep.
3342
3343 2008-08-29 Akim Demaille <demaille@gostai.com>
3344
3345 Clarify UPDATED use.
3346 * doc/bison.texinfo: It refers to the last edition of this file,
3347 not to the release date of Bison.
3348 Reported by Joel E. Denny.
3349
3350 2008-08-29 Akim Demaille <demaille@gostai.com>
3351
3352 * README: Update FAQ pointer.
3353 Reported by Joel E. Denny.
3354
3355 2008-08-27 Eric Blake <ebb9@byu.net>
3356
3357 Resync m4sugar from autoconf.
3358 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3359 (m4_init): Adjust to latest m4.git changes.
3360 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3361 effects.
3362 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3363 (_m4_list_cmp): Reduce side effects.
3364
3365 2008-08-27 Akim Demaille <demaille@gostai.com>
3366
3367 Check yyerrok in calc.at.
3368 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3369 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3370 expected.
3371
3372 2008-08-27 Akim Demaille <demaille@gostai.com>
3373
3374 Support yyerrok in lalr1.cc.
3375 YYBACKUP is still to import back into lalr1.cc.
3376 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3377
3378 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3379
3380 For maintainer-check*, don't recompile for a $(VERSION) update.
3381 * cfg.mk: New file.
3382 (_is-dist-target): Override the one in GNUmakefile.
3383 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3384
3385 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3386
3387 Update for recent change to gnulib.
3388 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3389 string.h now.
3390
3391 2008-08-15 Eric Blake <ebb9@byu.net>
3392
3393 Remaining m4sugar merge from autoconf.
3394 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3395 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3396 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3397 * src/output.c (output_skeleton): Tell m4 how to find it.
3398
3399 Partial m4sugar merge from autoconf: m4_map.
3400 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3401 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3402 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3403 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3404 for empty list.
3405 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3406 Likewise.
3407 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3408 declares it.
3409
3410 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3411
3412 Keep .version and PACKAGE_VERSION in sync.
3413 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3414 dependency, and add comments justifying this in more detail. Discussed
3415 starting at
3416 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3417
3418 2008-08-06 Eric Blake <ebb9@byu.net>
3419
3420 Partial m4sugar merge from autoconf: m4_shiftn.
3421 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3422 (m4_shift2, m4_shift3): New macros.
3423 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3424 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3425 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3426 * data/java.m4 (b4_remove_comma): Likewise.
3427
3428 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3429 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3430 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3431 (m4_init): Consolidate wrapped text into single m4_wrap.
3432 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3433 in wrapped text.
3434
3435 2008-08-05 Eric Blake <ebb9@byu.net>
3436
3437 Partial m4sugar merge from autoconf: builtins, version.m4.
3438 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3439 (m4_prepend): Remove, as it is unused and inherently quadratic,
3440 whereas m4_append is linear in newer m4.
3441 (m4_mkstemp): New builtin.
3442 (m4_symbols): Make rename conditional.
3443 (m4_version_prereq): Ensure fatal error if used in bison, which
3444 intentionally lacks version.m4.
3445
3446 Fix comments in m4sugar.
3447 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3448
3449 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3450
3451 Update for recent .gitignore fix in Gnulib.
3452 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3453 anchored .gitignore entries.
3454
3455 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3456
3457 Set gnu or gnits strictness.
3458 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3459 development and gnits strictness for releases. Based on Eric Blake's
3460 suggestion at
3461 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3462
3463 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3464
3465 * NEWS: Clarify documentation of %language.
3466
3467 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3468
3469 Support usage of git-merge-changelog.
3470 * .gitattributes: New.
3471 * HACKING: Document usage of git-merge-changelog.
3472 * bootstrap: Install git-merge-changelog entries in .git/config
3473 if appropriate.
3474
3475 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3476
3477 Remove remaining dependence on CVS Id keyword.
3478 * ChangeLog: For the sake of people still using CVS, don't use dollars
3479 when mentioning Id.
3480 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3481 unusual anyway.
3482 * data/xslt/xml2dot.xsl: Likewise.
3483 * data/xslt/xml2text.xsl: Likewise.
3484 * data/xslt/xml2xhtml.xsl: Likewise.
3485 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3486 * doc/Makefile.am (neutralize): Remove, no longer needed.
3487 (.x.1): Don't use neutralize.
3488 (edit): Don't substitute for ID.
3489 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3490
3491 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3492
3493 Fix dependence on computed configure variables.
3494 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3495 $(top_srcdir)/configure.ac so that changes to computed variables, such
3496 as PACKAGE_VERSION, are seen.
3497 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3498
3499 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3500
3501 Update copyright dates for recent changes.
3502 * Makefile.am: Here.
3503 * src/Makefile.am: Here.
3504 * src/reduce.c: Here.
3505 * tests/reduce.at: Here.
3506
3507 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3508
3509 Use git-version-gen for version names between releases.
3510 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3511 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3512 * .prev-version: New.
3513 * .version.in: Remove.
3514 * ChangeLog: Remove the Id previously used for capturing the CVS
3515 revision.
3516 * GNUmakefile: Remove, now copied from Gnulib.
3517 * Makefile.am: Add code suggested by comments in
3518 build-aux/git-version-gen.
3519 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3520 .prev-version, and .version.
3521 * NEWS (2.3b+): Rename to...
3522 (?.?): ... this because we're dropping the "+" version naming scheme,
3523 but, in general, we still can't be sure of our next release name.
3524 * bootstrap: Add a quick hack to remove from .gitignore the
3525 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3526 entry. This should really be fixed in gnulib instead.
3527 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3528 * configure.ac (AC_INIT): Set version name by invoking
3529 build-aux/git-version-gen.
3530 (AC_CONFIG_FILES): Remove .version, now generated by
3531 build-aux/git-version-gen.
3532 * maint.mk: New, copied from coreutils.
3533 * doc/.cvsignore (bison.1): Add.
3534 * doc/.gitignore (/bison.1): Add.
3535 * doc/bison.1: Remove, generated.
3536 * src/.cvsignore (revision.c): Remove.
3537 * src/.gitignore (/revision.c): Remove.
3538 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3539 (BUILT_SOURCES): Remove revision.c.
3540 (revision.c): Remove.
3541 * src/getargs.c (version): Don't print revision after the VERSION.
3542 * src/revision.h: Remove.
3543
3544 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3545
3546 Fix untranslatable composition of sentences. Reported by Goran
3547 Uddeborg at
3548 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3549 * THANKS (Goran Uddeborg): Add.
3550 * src/reduce.c (reduce_print): Report the number of nonterminals and
3551 rules useless in the grammar in separate sentences.
3552 * tests/reduce.at (Useless Rules): Update output.
3553 (Reduced Automaton): Likewise.
3554 (Underivable Rules): Likewise.
3555 (Empty Language): Likewise.
3556
3557 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3558
3559 Fix some .gitignore and .cvsignore problems.
3560 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3561 (insert_vc_ignore): ... this new function, which prepends `/' to all
3562 .gitignore entries before passing them to insert_sorted_if_absent.
3563 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3564 .cvsignore files are maintained even though Bison developers run
3565 bootstrap while using Git.
3566 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3567 unneeded by Bison.
3568 (gnulib): Add.
3569 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3570 unneeded. Reported by Eric Blake.
3571 * lib/.gitignore (/*~): Add.
3572 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3573 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3574 Blake.
3575 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3576
3577 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3578
3579 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3580 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3581 * bootstrap.conf (gnulib_modules): Add unsetenv.
3582 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3583 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3584 (/setenv.m4): Add.
3585 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3586 the first argument because it may become position-dependent, and unset
3587 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3588 Add comments explaining these issues in more detail.
3589
3590 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3591
3592 Add .gitignore everywhere based on .cvsignore.
3593 * .gitignore: New.
3594 * build-aux/.gitignore: New.
3595 * data/.gitignore: New.
3596 * doc/.gitignore: New.
3597 * etc/.gitignore: New.
3598 * examples/.gitignore: New.
3599 * examples/calc++/.gitignore: New.
3600 * lib/.gitignore: New.
3601 * m4/.gitignore: New.
3602 * po/.gitignore: New.
3603 * runtime-po/.gitignore: New.
3604 * src/.gitignore: New.
3605 * tests/.gitignore: New.
3606
3607 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3608
3609 * NEWS (2.3b+): New section, empty for now.
3610 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3611
3612 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3613
3614 * NEWS (2.3b): Update release date since there has been a delay in
3615 getting the announcements and tarballs out.
3616
3617 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3618
3619 * NEWS: Version 2.3b.
3620 * configure.ac (AC_INIT): Likewise.
3621 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3622
3623 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3624
3625 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3626 been doing it for years.
3627 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3628 (Release Procedure): Add FIXME about make alpha being unmaintained.
3629
3630 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3631
3632 * data/yacc.c: Reformat m4 a little for readability.
3633 * src/lalr.c (build_relations): Correct comment.
3634
3635 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3636
3637 DJGPP specific issue.
3638 * djgpp/config.sed: Fixes required to run configure scripts generated
3639 by autoconf 2.62.
3640
3641 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3642
3643 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3644 coordinator@translationproject.org.
3645
3646 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3647
3648 * THANKS: Add Eric Blake.
3649
3650 2008-04-23 Eric Blake <ebb9@byu.net>
3651
3652 Revert prior patch, by working around autoconf regression.
3653 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3654 ("Output file name: ("): Uncomment test.
3655 ("Output file name: )"): Likewise.
3656 Based on an idea from Noah Misch.
3657
3658 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3659
3660 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3661 2.61. Reported by Juan Manuel Guerrero at
3662 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3663 * tests/output.at ("Output file name: ("): Comment out test case for
3664 now.
3665 ("Output file name: )"): Likewise.
3666
3667 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3668
3669 * GNUmakefile: Update git-version-gen invocation so make dist
3670 succeeds.
3671
3672 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3673
3674 Update to the current gnulib CVS repository, and fix trigraph handling
3675 in Bison.
3676 * bootstrap: Update gnulib CVS repository URL.
3677 (symlink_to_dir): Encapsulate the code that guarantees the destination
3678 directory exists into...
3679 (check_dst_dir): ... this new function, and...
3680 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3681 fail when copying files into lib/uniwidth/.
3682 * src/output.c (prepare_symbols): When writing yytname muscles, where
3683 symbol names will be encoded in C-string literals, tell quotearg to
3684 escape trigraphs. This used to be the default in gnulib.
3685 * tests/regression.at (Token definitions): Because of the change in
3686 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3687 escapes trigraphs in symbol names. Thus, yytname no longer has
3688 trigraphs unnecessarily doubly escaped. Update test case output.
3689 Extend test case to be sure Bison's own error messages will no longer
3690 have trigraphs in symbol names unnecessarily escaped once.
3691
3692 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3693
3694 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3695 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3696 * .cvsignore: Add .version.
3697 * .version.in: New.
3698 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3699 * configure.ac (AC_CONFIG_FILES): Add .version.
3700 * build-aux/.cvsignore: Add git-version-gen.
3701
3702 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3703
3704 * NEWS (2.3a+): Mention that -g now takes an argument.
3705 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3706 consistency. Update the -g and -x entries now that they take
3707 arguments. Use brackets to indicate optional arguments.
3708 * src/getargs.c (usage): Explain the relationship between arguments of
3709 long and short options more completely. Document --defines and -d
3710 separately since the former takes an argument but, for POSIX Yacc, the
3711 latter does not.
3712 (short_options): Let -W take an optional argument like --warnings.
3713 (getargs): Sort cases.
3714
3715 2008-02-28 Akim Demaille <demaille@gostai.com>
3716
3717 * doc/bison.texinfo: Fix a few typos.
3718
3719 2008-02-28 Akim Demaille <akim@epita.fr>
3720
3721 * doc/bison.texinfo (Bison Options): Document -W.
3722 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3723
3724 2008-02-28 Akim Demaille <akim@epita.fr>
3725
3726 * src/getargs.c (short_options): Split and sort for readability.
3727 -g and -x take optional arguments, just like their long options.
3728 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3729 understand.
3730 Fix the handling of $opt which resulted in all the argument to be
3731 considered as optional.
3732
3733 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3734
3735 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3736 say its interface is experimental.
3737 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3738 Java.
3739 (Bison Options): In the -L and --language entry, mention Java.
3740 (Java Bison Interface): Say the interface is experimental.
3741 * src/getargs.c (usage): Mention -L and --language.
3742
3743 * NEWS (2.3a+): Say the push parsing interface is experimental.
3744 * doc/bison.texinfo (Push Decl): Likewise.
3745 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3746 (Push Parser Function): Likewise.
3747 (Pull Parser Function): Likewise.
3748 (Parser Create Function): Likewise.
3749 (Parser Delete Function): Likewise.
3750 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3751 yypull_parse, and yypush_parse entries.
3752
3753 * NEWS (2.3a+): Mention XML support, and say the schema is
3754 experimental.
3755 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3756 * src/getargs.c (usage): Say the XML schema is experimental.
3757
3758 * NEWS (2.3a+): Say option instead of flag.
3759
3760 2008-02-21 Wojciech Polak <polak@gnu.org>
3761
3762 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3763 text.
3764
3765 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3766
3767 Fix impure push parser compile error reported by Bob Rossi at
3768 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3769 * data/yacc.c: Clean up whitespace in the output a little.
3770 (yypstate_allocated): Define for impure push parsers regardless of
3771 whether the pull interface is also requested.
3772 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3773 check impure push parsers without the pull interface.
3774
3775 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3776 yyerror takes arguments specified by %parse-param while yypstate_new
3777 does not.
3778 * doc/bison.texinfo (Parser Create Function): Document that
3779 yypstate_new returns 0 for multiple impure parser instances.
3780 * tests/push.at (Push Parsing: Multiple impure instances): Update
3781 expected stderr output.
3782
3783 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3784
3785 * runtime-po/POTFILES.in (push.c): Remove.
3786
3787 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3788
3789 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3790 * data/push.c: Rename to...
3791 * data/yacc.c: ... this, overwriting it.
3792 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3793 `%push-pull-parser' -> `%define api.push_pull "both"'.
3794 Remove old yacc.c tests, and update push.c tests to yacc.c.
3795
3796 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3797
3798 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3799 `"%code top" blocks' instead of `%code "top" blocks'.
3800 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3801 Clean up whitespace in the output a little.
3802
3803 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3804
3805 Fix documentation problems reported by Tim Josling at
3806 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3807 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3808 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3809 integers. Explain the effect of literal string aliases on error
3810 messages. Copy token 0 documentation from the C++ skeleton
3811 documentation.
3812
3813 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3814
3815 Accept a token number in a %left, %right, or %nonassoc for POSIX
3816 conformance. Reported by Tim Josling at
3817 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3818 * NEWS (2.3a+): Mention.
3819 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3820 and code numbers are treated by precedence declarations.
3821 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3822 of symbols.1.
3823 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3824 of symbol.
3825 (symbol.prec): New, just like symbol but allows INT.
3826 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3827 longer holds.
3828 * tests/regression.at (Token number in precedence declaration): New
3829 test case.
3830
3831 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3832
3833 DJGPP specific issues.
3834 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3835 be changed. Copyright timestamp adjusted.
3836 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3837 be changed. Copyright timestamp adjusted.
3838 * djgpp/config.site: Copyright timestamp adjusted.
3839 * djgpp/config_h.sed: Copyright timestamp adjusted.
3840 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3841 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3842 filename translation list.
3843 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3844 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3845 files shall be created. Before trying to use the temp dir where the
3846 environment variable points to check that the dir really exists. If
3847 not default to the cwd as temp dir. Copyright timestamp adjusted.
3848 * djgpp/subpipe.h: Copyright timestamp adjusted.
3849 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3850
3851 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3852
3853 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3854
3855 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3856
3857 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3858 Problem reported by Claudio Saavedra in
3859 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3860
3861 2008-01-05 Wojciech Polak <polak@gnu.org>
3862
3863 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3864 document's title with the input grammar file name.
3865
3866 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3867
3868 Automate regression testing of the XML/XSLT implementation. Discussed
3869 starting at
3870 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3871 * configure.ac (XSLTPROC): New substitution.
3872 * Makefile.am (maintainer-xml-check): New phony target invoking...
3873 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3874 invoking make maintainer-check with BISON_TEST_XML=1.
3875 * tests/atlocal.in (XSLTPROC): New.
3876 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3877 not to report reachable memory when Bison is expected to have a
3878 non-zero exit status and (2) to compare XML/XSLT output with --graph
3879 and --report=all output for every working grammar when
3880 BISON_TEST_XML=1.
3881 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3882 (AT_BISON_CHECK_XML): New.
3883 (AT_QUELL_VALGRIND): New.
3884 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3885 (AT_CHECK): ... don't redefine this since this was the old way to
3886 quell Valgrind.
3887 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3888 AT_BISON_CHECK invocations.
3889 * tests/c++.at: Likewise.
3890 * tests/calc.at: Likewise.
3891 * tests/conflicts.at: Likewise.
3892 * tests/cxx-type.at: Likewise.
3893 * tests/existing.at: Likewise.
3894 * tests/glr-regression.at: Likewise.
3895 * tests/headers.at: Likewise.
3896 * tests/input.at: Likewise.
3897 * tests/java.at: Likewise.
3898 * tests/output.at: Likewise.
3899 * tests/push.at: Likewise.
3900 * tests/reduce.at: Likewise.
3901 * tests/regression.at: Likewise.
3902 * tests/sets.at: Likewise.
3903 * tests/skeletons.at: Likewise.
3904 * tests/synclines.at: Likewise.
3905 * tests/torture.at: Likewise.
3906 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3907 tends to hang xsltproc.
3908 (Big horizontal): Likewise.
3909
3910 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3911
3912 In XML output, remove redundant class attribute on symbol element.
3913 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3914 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3915 look up a symbol to determine whether it's a nonterminal or terminal.
3916 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3917 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3918
3919 Add prec/assoc information to XML output.
3920 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3921 %prec, add a percent_prec attribute.
3922 * src/print-xml.c (print_grammar): For each terminal that has a
3923 precedence or associativity, add a prec or assoc attribute.
3924 (xml_indent): New.
3925 (xml_puts): Use xml_indent.
3926 (xml_printf): Use xml_indent.
3927 * src/print-xml.h (xml_indent): Prototype.
3928
3929 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3930 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3931
3932 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3933
3934 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3935 (bison:ruleByNumber): ... this for clarity.
3936 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3937 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3938 (xsl:template match="reduction"): Update.
3939 (xsl:template match="item"): Update.
3940 (xsl:template match="reduction"): Update.
3941
3942 In the XML output, don't print the list of rules where symbols appear.
3943 Compute it in XSLT instead. Discussed at
3944 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3945 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3946 (bison:ruleByRhs): New.
3947 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3948 bison:ruleByRhs.
3949 (xsl:template match="terminal/rule"): Remove.
3950 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3951 bison:ruleByRhs.
3952 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3953 Remove.
3954 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3955 bison:ruleByRhs and mode="number-link" for rule template.
3956 (xsl:template match="terminal/rule"): Remove.
3957 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3958 bison:ruleByRhs and mode="number-link" for rule template.
3959 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3960 Rewrite as...
3961 (xsl:template match="rule" mode="number-link"): ... this.
3962 * src/print-xml.c (print_grammar): Don't print the list of rules.
3963
3964 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3965
3966 Don't let --report affect XML output; always print all information.
3967 Discussed at
3968 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3969 * src/conflicts.c (log_resolution): Implement.
3970 * src/print-xml.c (print_core): Implement.
3971 (print_state): Implement.
3972 (print_xml): Implement.
3973
3974 * NEWS (2.3a+): Fix quotes.
3975 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3976 don't let %verbose clear the list specified by --report.
3977
3978 2007-11-26 Akim Demaille <akim@epita.fr>
3979
3980 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3981
3982 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3983
3984 In the XML output, list useless and unused symbols and rules with the
3985 useful ones and add a "usefulness" attribute. Discussed starting at
3986 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3987 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3988 (grammar_rules_print_xml): Print all rules instead of just those
3989 useful in the grammar, and add a "usefulness" attribute.
3990 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3991 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3992 (print_grammar): Print all nonterminals instead of just useful ones,
3993 and add a "usefulness" attribute to nonterminals and terminals.
3994 (print_xml): Don't print a separate "reductions" or
3995 "rules-useless-in-parser" element.
3996 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3997 (reduce_xml): Remove.
3998 (reduce_token_unused_in_grammar): New.
3999 (reduce_nonterminal_useless_in_grammar): New.
4000 * src/reduce.h (reduce_xml): Remove prototype.
4001 (reduce_token_unused_in_grammar): Add prototype.
4002 (reduce_nonterminal_useless_in_grammar): Add prototype.
4003 * data/xslt/xml2text.xsl: Update for XML changes.
4004 * data/xslt/xml2xhtml.xsl: Update for XML changes.
4005 * tests/reduce.at (Useless Terminals): Update output.
4006 (Useless Rules): Update output.
4007 (Reduced Automaton): Update output.
4008
4009 Say "Terminals unused in grammar" instead of "Unused terminals".
4010 * NEWS (2.3a+): Update.
4011 * doc/bison.texinfo (Understanding): Update example output.
4012 * src/reduce.c (reduce_output): Implement.
4013 * data/xslt/xml2text.xsl: Implement.
4014 * data/xslt/xml2xhtml.xsl: Implement.
4015
4016 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
4017
4018 Accept --report-file=FILE to override the default `.output' filename.
4019 * NEWS (2.3a+): Mention.
4020 * doc/bison.texinfo (Bison Options): Add an entry.
4021 * src/files.c (compute_output_file_names): Don't override
4022 spec_verbose_file if already set.
4023 * src/getargs.c (usage): Document --report-file.
4024 (REPORT_FILE_OPTION): New anonymous enum member.
4025 (long_options): Add entry for it.
4026 (getargs): Add case for it setting spec_verbose_file.
4027
4028 * build-aux/cross-options.pl: Don't record a short option just because
4029 there's an arg.
4030 * doc/.cvsignore: Add yacc.1.
4031
4032 2007-11-14 Akim Demaille <akim@epita.fr>
4033
4034 * doc/yacc.1.in: New.
4035 * configure.ac, doc/Makefile.am: Adjust.
4036 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
4037 config.h symbol.
4038 Use AC_SUBST for assignments too.
4039 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
4040
4041 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4042
4043 * src/gram.c: Remove comments that duplicate comments in gram.h.
4044
4045 When reporting useless rules and nonterminals, say "useless in grammar"
4046 instead of "useless", and say "useless in parser" instead of "never
4047 reduced". Discussed starting at
4048 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
4049 * NEWS (2.3a+): Mention this change.
4050 * data/xslt/xml2text.xsl: Update output text and expected input XML
4051 element names to match changes below.
4052 * data/xslt/xml2xhtml.xsl: Likewise.
4053 (xsl:template match="bison-xml-report"): Add missing entry in Table of
4054 Contents: "Rules useless in parser due to conflicts".
4055 * doc/bison.texinfo (Decl Summary): Reword a little.
4056 (Understanding): Update example output for changes below.
4057 * src/gram.c: (rule_useful_p): Rename to...
4058 (rule_useful_in_grammar_p): ... this.
4059 (rule_useless_p): Rename to...
4060 (rule_useless_in_grammar_p): ... this.
4061 (rule_never_reduced_p): Rename to...
4062 (rule_useless_in_parser_p): ... this.
4063 (grammar_rules_print): Update for renames.
4064 (grammar_rules_print_xml): Update for renames.
4065 (grammar_rules_never_reduced_report): Rename to...
4066 (grammar_rules_useless_report): ... this since it is used for either
4067 kind of useless rule.
4068 * src/gram.h: Reword comments and update function names in prototypes.
4069 * src/main.c (main): Say "rule useless in parser due to conflicts".
4070 * src/print-xml.c (print_rules_never_reduced): Rename to...
4071 (print_rules_useless_in_parser): ... this, and rename output XML
4072 element "rules-never-reduced" to "rules-useless-in-parser".
4073 (print_xml): Update for rename.
4074 * src/print.c (print_results): Say "Rules useless in parser due to
4075 conflicts".
4076 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
4077 (nonterminals_reduce): Say "nonterminal useless in grammar".
4078 (reduce_output): Say "Nonterminals useless in grammar".
4079 Say "Rules useless in grammar".
4080 (reduce_xml): Rename output XML element "useless" to
4081 "useless-in-grammar".
4082 (reduce_print): Don't report the count of grammatically useless rules
4083 as "rules never reduced" just because %yacc is specified.
4084 In the correct report of this count, say nonterminal(s) and rule(s)
4085 "useless in grammar".
4086 * tests/conflicts.at (S/R in initial): Update expected output.
4087 (Defaulted Conflicted Reduction): Likewise.
4088 (Unreachable States After Conflict Resolution): Likewise.
4089 * tests/existing.at (GNU pic Grammar): Likewise.
4090 * tests/reduce.at (Useless Nonterminals): Likewise.
4091 (Useless Rules): Likewise.
4092 (Reduced Automaton): Likewise.
4093 (Underivable Rules): Likewise.
4094 (Empty Language): Likewise.
4095
4096 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4097
4098 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4099 here document and before the EOF so that BSD's implementation of Bourne
4100 shell doesn't parse the delimiter as part of the here document.
4101 * doc/.cvsignore: Add cross-options.texi.
4102 * src/getargs.c (usage): Add a blank line after the warning categories.
4103
4104 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
4105
4106 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4107
4108 2007-11-05 Akim Demaille <akim@epita.fr>
4109
4110 Remove Id: from bison.1.
4111 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4112 (perl -0777 -pi -e 's/\.PP\nId): New.
4113 (.x.1): Use it to ignore the version control revision.
4114
4115 2007-11-05 Akim Demaille <demaille@gostai.com>
4116
4117 * build-aux/Makefile.am: Ship cross-options.pl.
4118 * doc/Makefile.am: Always refer to cross-options.texi with
4119 $(srcdir).
4120 (MAINTAINERCLEANFILES): Add it.
4121
4122 2007-11-04 Akim Demaille <demaille@gostai.com>
4123
4124 Generate the long/short option cross-table.
4125 * build-aux/cross-options.pl: New.
4126 * doc/Makefile.am (cross-options.texi): New.
4127 * doc/bison.texinfo: Use it.
4128
4129 2007-11-04 Akim Demaille <demaille@gostai.com>
4130
4131 Generate bison.1 using help2man.
4132 * doc/common.x, doc/bison.x: New.
4133 * doc/Makefile.am (bison.1, .x.1): New.
4134 The code is taken from autoconf-2.61/man/Makefile.am.
4135 * configure.ac: Look for help2man.
4136
4137 2007-11-04 Akim Demaille <demaille@gostai.com>
4138
4139 Complete --help.
4140 * src/getargs.c (usage): Document -W, make it clear that -d,
4141 -g and -x have optional arguments.
4142
4143 2007-11-04 Akim Demaille <demaille@gostai.com>
4144
4145 Find sha1sum when named gsha1sum.
4146 * bootstrap (find_tool): New.
4147 ($SHA1SUM): New.
4148
4149 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4150
4151 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4152 at
4153 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4154 * NEWS (2.3a+): Mention.
4155 * data/bison.m4 (b4_pure_if): Don't define it here.
4156 * data/c.m4 (b4_identification): Depend on individual skeletons to
4157 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4158 values of the %define variables api.pure or api.push_pull. Define
4159 YYPURE, YYPUSH, and YYPULL accordingly.
4160 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4161 glr.cc has already defined b4_pure_flag.
4162 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4163 Remove YYPUSH and YYPULL since they're back in b4_identification again.
4164 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
4165 * doc/bison.texinfo (Pure Decl): Update.
4166 (Push Decl): Update.
4167 (Decl Summary): Add api.pure to %define entry.
4168 In %pure-parser entry, say it's deprecated and reference %define.
4169 (Pure Calling): Update.
4170 (Error Reporting): Update.
4171 (C++ Scanner Interface): Update.
4172 (How Can I Reset the Parser): Update.
4173 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4174 reference %define.
4175 * src/getargs.c (pure_parser): Remove global variable.
4176 * src/getargs.h (pure_parser): Remove extern.
4177 * src/output.c (prepare): Don't define pure_flag muscle.
4178 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4179 wrapper around `%define api.pure'.
4180 * tests/calc.at (Simple LALR Calculator): Update.
4181 (Simple GLR Calculator): Update.
4182 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4183 Update.
4184 (GLR: Resolve ambiguity, pure, locations): Update.
4185 (GLR: Merge conflicting parses, pure, no locations): Update.
4186 (GLR: Merge conflicting parses, pure, locations): Update.
4187 * tests/glr-regression.at (Uninitialized location when reporting
4188 ambiguity): Update
4189 * tests/input.at (Unused %define api.pure): New test case.
4190 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4191 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4192 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4193
4194 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4195
4196 %define push_pull -> %define api.push_pull. Discussed starting at
4197 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4198 * data/push.c: Expect the new name.
4199 * data/yacc.c: Likewise.
4200 * doc/bison.texinfo (Push Decl): Update.
4201 (Decl Summary): Update %define entry.
4202 (Push Parser Function): Update.
4203 (Pull Parser Function): Update.
4204 (Parser Create Function): Update.
4205 (Parser Delete Function): Update.
4206 * tests/calc.at (Simple LALR Calculator): Update.
4207 * tests/input.at (%define enum variables): Update.
4208 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4209 (Push Parsing: Multiple impure instances): Update.
4210 (Push Parsing: Unsupported Skeletons): Update.
4211 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4212 (Exploding the Stack Size with Malloc): Update.
4213
4214 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4215 other entries some.
4216
4217 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4218
4219 For the XML output's terminal element, rename @number to @token-number,
4220 and add @symbol-number. In the nonterminal element, rename @number to
4221 @symbol-number. Discussed starting at
4222 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4223 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4224 renames.
4225 (xsl:template match="nonterminal"): Likewise.
4226 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4227 (xsl:template match="nonterminal"): Likewise.
4228 * src/print-xml.c (print_grammar): Implement.
4229
4230 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4231
4232 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4233 2007-10-11 change, the child elements here are items not rules.
4234 (xsl:template match="item"): New.
4235 (xsl:template match="rule"): Update for new reduced itemset.
4236 (xsl:template match="point"): Remove.
4237 (xsl:template match="empty"): For consistency with --graph, don't
4238 output "/* empty */".
4239 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4240 line-wrap, don't pass a negative value as first-line-length since this
4241 won't work with the following changes.
4242 (xsl:template name="line-wrap"): Simplify slightly.
4243 (xsl:template name="ws-search"): Eliminate recursion.
4244 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4245 set next to an item whose dot is not at the end of the RHS even if it
4246 happens to be associated with the same rule.
4247
4248 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4249
4250 Add %define lr.keep_unreachable_states.
4251 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4252 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4253 * src/main.c (main): Implement it.
4254 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4255 Extend to test it, and fix a typo.
4256
4257 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4258
4259 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
4260 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4261 the example .output text.
4262 * tests/regression.at (Extra lookahead sets in report): Improve wording
4263 of comments.
4264
4265 2007-10-17 Wojciech Polak <polak@gnu.org>
4266
4267 * src/print-xml.c (print_grammar): Renamed
4268 <terminal> and <nonterminal> attributes:
4269 "type" to "number" and "symbol" to "name".
4270 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4271 Use new attribute names.
4272 (xsl:template match="nonterminal"): Likewise.
4273 * data/xslt/xml2xhtml.xsl: Likewise.
4274
4275 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4276
4277 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4278 (Option Cross Key): Likewise.
4279
4280 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4281 next to an item whose dot is not at the end of the RHS even if it
4282 happens to be associated with the same rule.
4283 * src/print.c (print_core): Likewise.
4284 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4285 (Resolved SR Conflicts): Update output.
4286 * tests/regression.at (Extra lookahead sets in report): New test case.
4287
4288 2007-10-11 Wojciech Polak <polak@gnu.org>
4289
4290 * src/print-xml.c (print_core): Remove item set
4291 redundancy.
4292 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4293 Improve processing time. Suggested by Joel E. Denny.
4294 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4295 Write xsl:param "required" attribute as comment.
4296 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4297 (xsl:template match="rule"): Support new reduced itemset.
4298 (xsl:template match="point"): Remove.
4299 * data/xslt/xml2xhtml.xsl: Likewise.
4300
4301 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4302
4303 * src/getargs.c (version): Update copyright year.
4304
4305 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4306
4307 Make xml2dot.xsl and --graph produce the same output.
4308 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4309 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4310 escaped later.
4311 (xsl:template name="output-node"): Use the new escape template instead
4312 of the string-replace template directly.
4313 (xsl:template name="output-edge"): Likewise.
4314 (xsl:template name="escape"): New, escapes backslashes and newlines in
4315 addition to quotation marks.
4316 * src/graphviz.c (start_graph, output_node, output_edge): Add
4317 whitespace to output for legibility.
4318
4319 Make xml2text.xsl and --report produce the same output, and remove the
4320 XML "conflicts" element since a conflict summary is easily extracted
4321 from the automaton.
4322 * data/xslt/bison.xsl: New.
4323 (xsl:template match="state" mode="bison:count-conflicts): New.
4324 * data/xslt/xml2text.xsl: Import bison.xsl.
4325 (xsl:template match="bison-xml-report"): Instead of styling the
4326 "conflicts" element, style the "automaton" element with mode
4327 "conflicts". Unlike the former, the latter lists S/R and R/R
4328 conflicts for a state on the same line.
4329 (xsl:template match="conflicts"): Remove.
4330 (xsl:template match="conflict"): Remove.
4331 (xsl:template match="terminal"): Line-wrap the list of rules in which
4332 the terminal is used.
4333 (xsl:template match="nonterminal"): Likewise for nonterminals.
4334 (xsl:template match="automaton" mode="conflicts"): New.
4335 (xsl:template match="state" mode="conflicts"): New.
4336 (xsl:template name="line-wrap"): New.
4337 (xsl:template name="ws-search"): New.
4338 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4339 (xsl:template match="bison-xml-report"): Instead of styling the
4340 "conflicts" element, style the "automaton" element with mode
4341 "conflicts."
4342 (xsl:template match="conflicts"): Remove.
4343 (xsl:template match="conflict"): Remove.
4344 (xsl:template match="automaton" mode="conflicts"): New.
4345 (xsl:template match="state" mode="conflicts): New.
4346 * src/conflicts.c (conflicts_output_xml): Remove.
4347 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4348 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4349 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4350 the corresponding XSLT is easier. Also, never wrap between a word and
4351 the comma that follows it.
4352
4353 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4354
4355 Improve C++ namespace support. Discussed starting at
4356 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4357 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4358 b4_namespace_close): New macros that interpret the %define variable
4359 "namespace" so its value can contain "::" to indicate nested
4360 namespaces.
4361 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4362 the above macros.
4363 * data/lalr1.cc (b4_namespace): Likewise.
4364 * data/location.cc (b4_namespace): Likewise.
4365 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4366 inside a new table in the general %define entry. Document `%define
4367 namespace' there as well. Point the %name-prefix entry to it since it
4368 explains it more completely in the case of C++.
4369 (C++ Bison Interface): Mention `%define namespace' instead of
4370 %name-prefix.
4371 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4372 entry suffices.
4373 * tests/c++.at (Relative namespace references): New test case.
4374 (Absolute namespace references): New test case.
4375 (Syntactically invalid namespace references): New test case.
4376 * tests/input.at (C++ namespace reference errors): New test case.
4377
4378 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4379
4380 Add syncline support and location accessor to internal %define
4381 interfaces.
4382 * data/bison.m4 (b4_percent_define_get_loc): New.
4383 (b4_percent_define_get_syncline): New.
4384 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4385 (b4_percent_define_default): Record defining location as line 1 rather
4386 than 0 for the sake of synchronizing #line's, and define
4387 b4_percent_define_syncline(VARIABLE).
4388 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4389 * src/muscle_tab.c (muscle_syncline_grow): New.
4390 (muscle_code_grow): Use muscle_syncline_grow.
4391 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4392 define b4_percent_define_syncline(VARIABLE).
4393 (muscle_percent_define_get_loc): New.
4394 (muscle_percent_define_get_syncline): New.
4395 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4396 remove some unused variables.
4397 (muscle_percent_define_default): Record defining location as line 1
4398 rather than 0 for the sake of synchronizing #line's, and define
4399 b4_percent_define_syncline(VARIABLE).
4400 (muscle_percent_define_check_values): Use
4401 muscle_percent_define_get_loc.
4402 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4403 (muscle_percent_define_get_syncline): Prototype.
4404 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4405 defaults): Update output for location change.
4406 (Complaining during macro argument expansion): Extend to test
4407 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4408
4409 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4410
4411 Fix some error-reporting macro bugs.
4412 * data/bison.m4 (b4_cat): New.
4413 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4414 to stdout so they don't become arguments to other macros. Update
4415 comments and add examples.
4416 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4417 add examples.
4418 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4419 after printing the error directive so that M4 doesn't report subsequent
4420 problems that are induced by this problem.
4421 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4422 instead of just in them. Recognize @\n in both places. Both expand to
4423 the empty string. Needed by b4_cat.
4424 * tests/skeletons.at (Complaining during macro argument expansion):
4425 New test case.
4426 (Fatal errors make M4 exit immediately): New test case.
4427
4428 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4429
4430 Implement --print-datadir.
4431 * src/getargs.c (usage): Mention.
4432 (PRINT_DATADIR_OPTION): New anonymous enum member.
4433 (long_options): Add entry for it.
4434 (getargs): Add case for it calling compute_pkgdatadir.
4435 * src/output.c (output_skeleton): Encapsulate data directory
4436 computation from here...
4437 (prepare): ... and from here...
4438 (compute_pkgdatadir): ... into this new function.
4439 * src/output.h (compute_pkgdatadir): Prototype.
4440
4441 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4442
4443 * src/print-xml.c (escape_bufs): New static global variable
4444 replacing...
4445 (xml_escape_n): ... the static local variable buf here.
4446 (print_xml): Free memory for escape_bufs.
4447 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4448
4449 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4450
4451 Replace `%push-parser' and `%push-pull-parser' with
4452 `%define push_pull "push"' and `%define push_pull "both"'.
4453 `%define push_pull "pull"' is the default.
4454 * doc/bison.texinfo (Push Decl, Push Parser Function,
4455 Pull Parser Function, Parser Create Function, Parser Delete Function):
4456 Update declarations.
4457 (Decl Summary, Table of Symbols): Replace %push-parser and
4458 %push-pull-parser entries with a %define push_pull entry.
4459 * data/bison.m4 (b4_percent_define_check_values): New macro.
4460 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4461 definitions...
4462 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4463 definitions...
4464 * data/push.c: ... to here and compute them from the value of the
4465 %define variable push_pull.
4466 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4467 parsing requests here...
4468 * data/yacc.c: ... hack this to switch to push.c any time
4469 b4_use_push_pull_flag or the %define variable push_pull is set. This
4470 will go away when we mv push.c yacc.c.
4471 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4472 push parsing is not supported since unused %define variables are
4473 reported anyway.
4474 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4475 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4476 comments for consistency with b4_percent_define_check_values.
4477 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4478 muscles.
4479 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4480 Remove.
4481 (prologue_declaration): Remove %push-parser and %push-pull-parser
4482 rules.
4483 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4484 * tests/calc.at: Update declarations.
4485 * tests/input.at (%define enum variables): New test case.
4486 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4487 declaration.
4488 (Push Parsing: Multiple impure instances): Update declaration.
4489 (Push Parsing: Unsupported Skeletons): New test case.
4490 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4491 declaration.
4492 (Exploding the Stack Size with Malloc): Update declaration.
4493
4494 2007-09-24 Wojciech Polak <polak@gnu.org>
4495
4496 Add XSLT transformations.
4497
4498 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4499 * data/xslt/xml2text.xsl: Transform XML into plain text.
4500 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4501 * data/Makefile.am (xsltdir): New variable.
4502 (dist_xslt_DATA): Add xslt/*.xsl files.
4503
4504 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4505
4506 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4507 Problem reported by Wojciech Polak.
4508 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4509 (xml_printf): Undo change I made on 21 September; that is,
4510 indent 2 spaces, not 1.
4511
4512 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4513
4514 Pacify ./configure --enable-gcc-warnings.
4515 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4516 `char const *' instead of `char *'.
4517 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4518 local variable `sep'.
4519
4520 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4521
4522 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4523 elsewhere.
4524 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4525 (xml_printf): Indent just 1 space for level.
4526 (e_char, xlate_char): Remove.
4527 (xml_escape_string): Rewrite to avoid undefined behavior (used
4528 storage that was freed from the stack).
4529 (xml_escape_n): Don't bother checking for subscript error.
4530
4531 2007-09-21 Wojciech Polak <polak@gnu.org>
4532
4533 Add Bison XML Automaton Report.
4534
4535 Add support for an -x option to generate an XML report.
4536 It is not documented yet.
4537 * src/print-xml.c: New file.
4538 * src/print-xml.h: Likewise.
4539 * lib/timevar.def (TV_XML): New var.
4540 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4541 * src/conflicts.c: Include print-xml.h.
4542 (solved_conflicts_xml_obstack): New var.
4543 (log_resolution, conflicts_solve, conflicts_free):
4544 Add support for XML report.
4545 (conflicts_output_val): New function.
4546 * src/conflicts.h (conflicts_output_val): New decl.
4547 * src/files.c (spec_xml_file): New var.
4548 (compute_output_file_names, output_file_names_free): Add XML support.
4549 * src/files.h (spec_xml_file): New decl.
4550 * src/getargs.c (xml_flag): New var.
4551 (usage, short_options, long_options, getargs): Add XML support.
4552 * src/getargs.h (xml_flag): New decl.
4553 * src/gram.c: Include print-xml.h.
4554 (rule_lhs_print_xml, rule_rhs_print_xml):
4555 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4556 New functions.
4557 * src/gram.h: Declare external ones.
4558 * src/main.c: Include print-xml.h.
4559 (main): Add XML support.
4560 * src/reduce.c: Include print-xml.h.
4561 (reduce_xml): New function.
4562 * src/reduce.h: Declare it.
4563 * src/state.c: Include print-xml.h.
4564 (state_new): Add XML support.
4565 (state_rule_lookahead_tokens_print_xml): New function.
4566 * src/state.h: Declare it.
4567 (struct state): New member solved_conflicts_xml.
4568 * src/symtab.c (symbol_class_get_string): New function.
4569 * src/symtab.h: Declare it.
4570
4571 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4572
4573 * GNUmakefile: Switch to coreutils's version.
4574 * bootstrap: Likewise.
4575 * Makefile.cfg: Adjust to new GNUmakefile.
4576 * README-hacking: Likewise.
4577
4578 Import from gnulib:
4579
4580 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4581 Bruno Haible <bruno@clisp.org>
4582
4583 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4584 and is a script that invokes bison. Tighten the code. Add comments.
4585
4586 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4587
4588 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4589 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4590 * doc/bison.texinfo (Decl Summary): Fix.
4591 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4592 * tests/input.at (Boolean %define variables): Update output.
4593 * tests/skeletons.at (%define boolean variables: invalid skeleton
4594 defaults): Rename to...
4595 (%define Boolean variables: invalid skeleton defaults): ... this and
4596 update output.
4597
4598 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4599
4600 In impure push mode, don't allow more than one yypstate to be allocated
4601 since multiple impure parsers would corrupt yynerrs.
4602 * data/push.c (yypstate_allocated): New static global variable
4603 initialized to 0.
4604 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4605 exhaustion if yypstate_allocated is 1, but still return 2.
4606 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4607 already 1. Otherwise, set it to 1.
4608 (yypstate_delete): Set it to 0.
4609 * tests/push.at (Push Parsing: Multiple impure instances): New test
4610 case.
4611
4612 2007-08-17 Bob Rossi <bob@brasko.net>
4613
4614 * doc/bison.texinfo (Push Decl): Document the push parser.
4615 (Table of Symbols): Ditto.
4616 (Pure Decl): Ditto.
4617 (Decl Summary): Ditto.
4618 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4619 Parser Create Function, Parser Delete Function):
4620 Add new push parser symbols.
4621 (Table of Symbols): Document push-parser, push-pull-parser,
4622 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4623
4624 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4625
4626 Update to GPLv3.
4627 * doc/gpl-3.0.texi: New file.
4628 * doc/gpl.texi: Remove.
4629 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4630 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4631 * README-hacking, TODO, bootstrap, bootstrap.conf:
4632 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4633 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4634 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4635 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4636 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4637 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4638 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4639 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4640 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4641 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4642 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4643 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4644 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4645 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4646 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4647 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4648 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4649 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4650 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4651 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4652 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4653 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4654 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4655 * src/complain.c, src/complain.h, src/conflicts.c:
4656 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4657 * src/files.h, src/flex-scanner.h, src/getargs.c:
4658 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4659 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4660 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4661 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4662 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4663 * src/print.c, src/print.h, src/print_graph.c:
4664 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4665 * src/reduce.h, src/relation.c, src/relation.h:
4666 * src/revision.h, src/scan-code.h, src/scan-code.l:
4667 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4668 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4669 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4670 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4671 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4672 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4673 * tests/existing.at, tests/glr-regression.at:
4674 * tests/headers.at, tests/input.at, tests/java.at:
4675 * tests/local.at, tests/output.at, tests/push.at:
4676 * tests/reduce.at, tests/regression.at, tests/sets.at:
4677 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4678 * tests/torture.at:
4679 Update to GPLv3.
4680
4681 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4682
4683 Get rid of broken %no-parser, -n, and --no-parser implementation and
4684 documentation.
4685 * TODO: Don't mention them.
4686 * doc/bison.1: Likewise.
4687 * doc/bison.texinfo (Decl Summary): Likewise.
4688 (Bison Options): Likewise.
4689 (Option Cross Key): Likewise.
4690 * src/getargs.c (no_parser_flag): Remove global variable.
4691 (usage): Don't print description of -n and --no-parser.
4692 (long_options): Remove --no-parser entry here.
4693 (getargs): Remove -n case in the switch here.
4694 * src/getargs.h (no_parser_flag): Remove extern.
4695 * tests/regression.at (Web2c Actions): Remove comment that mentions
4696 --no-parser.
4697
4698 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4699
4700 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4701 name user variables starting with `yy'. Just pass NULL instead of a
4702 dummy local &yylval to yypush_parse.
4703 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4704 starting with `yy'.
4705
4706 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4707
4708 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4709 true since it's then always used regardless of whether yyoverflow is
4710 defined. Reported by Christian Burger at
4711 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4712 * THANKS: Add Christian Burger.
4713
4714 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4715 node names: say "Decl Summary" not "Bison Declaration Summary".
4716
4717 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4718
4719 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4720 determine whether this function has already complained about an invalid
4721 value for a %define boolean variable, don't check whether Bison has
4722 ever examined the value. As written, the check was a tautology.
4723 Instead, record and check for this complaint using a separate muscle.
4724
4725 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4726
4727 Fix push parsing memory leak reported by Brandon Lucia at
4728 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4729 * THANKS: Add Brandon Lucia.
4730 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4731 but the parse never completed and thus freed it.
4732 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4733 * tests/testsuite.at: Include push.at.
4734 * test/push.at: New.
4735 (Push Parsing: Memory Leak for Early Deletion): New test case.
4736
4737 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4738
4739 Improve handling of multiple S/R conflicts in the same state and of S/R
4740 conflicts involving multiple reductions.
4741 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4742 set for a state here or Bison will abort if it is reassigned on a
4743 later conflicted reduction in the same state.
4744 Similarly, don't finalize and assign the solved conflicts report here
4745 or it will be lost if it is reassigned on a later conflicted reduction
4746 in the same state.
4747 (set_conflicts): Instead, assign them both here after all S/R conflicts
4748 in the state have been fully examined.
4749 * src/print.c (shift_set): Rename to...
4750 (no_reduce_set): ... this.
4751 (print_reductions): Update for rename, and add %nonassoc error action
4752 tokens to no_reduce_set so that, when printing the first remaining
4753 reduction on an error action token, the reduction is enclosed in
4754 brackets.
4755 (print_results): Update for rename.
4756 * tests/conflicts.at (Solved conflicts report for multiple reductions
4757 in a state): New test case.
4758 (%nonassoc error actions for multiple reductions in a state): New test
4759 case.
4760
4761 * src/main.c (main): Don't depend on C99 features.
4762
4763 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4764
4765 * build-aux/.cvsignore: Add compile.
4766 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4767 uniwidth.
4768
4769 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4770
4771 * bootstrap (slurp): Create target directories that don't exist.
4772 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4773
4774 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4775
4776 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4777 than item number.
4778 * closure.c (closure): Likewise.
4779 * state.h (reductions): Comment sorting of rules.
4780 (state): Comment sorting of items.
4781
4782 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4783
4784 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4785 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4786 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4787 definition in order to avoid Gnulib headers since we don't use config.h
4788 here.
4789 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4790 rather than AT_DATA so that config.h is included.
4791
4792 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4793
4794 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4795 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4796 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4797 and so that YYFPRINTF is guaranteed to be defined here.
4798
4799 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4800
4801 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4802 with...
4803 (muscle_percent_define_check_values): ... this more helpful function.
4804 Again, it's not used yet, but it will be.
4805 * src/muscle_tab.h: Likewise.
4806
4807 Improve some comments in parser table construction.
4808 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4809 (generate_states): Don't mention ruleset, which is internal to closure.
4810 * src/closure.c (closure): Explain sorting of core and itemset, which
4811 is required for this function to behave correctly.
4812 * src/closure.h (closure): Mention sorting.
4813
4814 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4815
4816 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4817 move the check for disabled transitions to an aver since conflict
4818 resolution hasn't happened yet.
4819
4820 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4821 labels a state as inconsistent just because it has error transitions.
4822 The original form of this check appeared in revision 1.1 of lalr.c,
4823 which was committed on 1991-12-21. Now (at least), changing the
4824 consistency label on such a state appears to have no useful effect in
4825 any of the places it is examined, which I enumerate below. The key
4826 point to understanding each item in this enumeration is that a state
4827 with an error transition is labelled consistent in the first place only
4828 if it has no rules, so the check cannot matter for states that have
4829 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4830 to try to identify its conflicts, and a state must have *rules* to have
4831 conflicts. (2) Labelling a state as inconsistent will affect how
4832 action_row sets the default *rule* for the state. (3) Labelling a
4833 state as inconsistent will cause build_relations to add lookback edges
4834 to *rules* in that state.
4835 * src/state.h (struct state): Word the comment for member consistent
4836 more carefully.
4837
4838 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4839
4840 Don't depend on C99 features.
4841 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4842 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4843 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4844 * src/state.c (state_mark_reachable_states): Fix for-loop.
4845 (state_remove_unreachable_states): Fix for-loop.
4846
4847 Don't widen struct state with member reachable just to temporarily
4848 record reachability. Instead, use a local bitset.
4849 * src/state.h (struct state): Remove member.
4850 * src/state.c (state_new): Don't initialize it.
4851 (state_mark_reachable_states): Rename to...
4852 (state_record_reachable_states): ... this, and use bitset.
4853 (state_remove_unreachable_states): Use bitset.
4854
4855 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4856
4857 * src/Makefile.am (yacc): Quote target action commands properly so
4858 that the yacc script isn't corrupt. Reported by Hans Aberg at
4859 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4860
4861 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4862 the case of pure parsers. Reported by Frans Englich at
4863 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4864 * THANKS: Add Frans Englich.
4865
4866 * NEWS (2.3a+): In the %code entry, reference section `Bison
4867 Declaration Summary' from the manual now since the %code summary has
4868 moved there.
4869 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4870 in the rules section must be terminated by semicolons.
4871
4872 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4873
4874 Extend the front-end API for %define variables to more completely
4875 mirror the back-end. This will be useful in the future.
4876 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4877 Update comments to mention the new front-end counterparts of these
4878 macros.
4879 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4880 for muscle_string_decode and muscle_location_decode.
4881 (muscle_string_decode): New static function.
4882 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4883 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4884 functions.
4885 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4886 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4887 implementation more closely.
4888 (muscle_percent_define_invalid_value): New function.
4889 * src/muscle_tab.h (muscle_percent_define_get,
4890 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4891 Prototype.
4892
4893 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4894
4895 * NEWS (2.3a+): Mention yesterday's state-removal change.
4896 (2.3a): Remove the %language entry, which was added after 2.3a.
4897 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4898 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4899 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4900 tests/existing.at: Update copyright date.
4901
4902 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4903
4904 If conflict resolution makes states unreachable, remove those states,
4905 report rules that are then unused, and don't report conflicts in those
4906 states.
4907 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4908 New global function.
4909 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4910 function.
4911 * src/main.c (main): After conflict resolution, remove the unreachable
4912 states and update all data structures that reference states by number.
4913 * src/state.c (state_new): Initialize each state's reachable member to
4914 false.
4915 (state_mark_reachable_states): New static function.
4916 (state_remove_unreachable_states): New global function.
4917 * src/state.h (struct state): Add member bool reachable.
4918 (state_remove_unreachable_states): Prototype.
4919 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4920 New test case.
4921 * tests/existing.at (GNU pic Grammar): Update test case output now that
4922 an unused rule is discovered.
4923
4924 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4925
4926 Minor code cleanup in parser table construction.
4927 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4928 (new_itemsets, save_reductions): Update for rename to nitemset.
4929 * src/closure.c (nritemset): Rename to...
4930 (nitemset): ... this since the "r" appears to meaningless and isn't
4931 used in the comments.
4932 (closure): Update for rename.
4933 * src/closure.h (nritemset): Update extern to...
4934 (nitemset): ... this.
4935 * src/lalr.c (LA): Fix a typo in comments.
4936 * src/print.c (print_core): Update for rename to nitemset.
4937 * src/print_graph.c (print_graph): Likewise.
4938 * src/state.h: Fix some typos in header comments.
4939
4940 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4941
4942 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4943 still sticks to ASCII. Sorry!
4944
4945 * README-hacking: New file, taken mostly from coreutils, with changes
4946 for Bison. Contains much of the contents of:
4947 * README-cvs: Remove.
4948 * bootstrap: Sync from gnulib.
4949 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4950 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4951
4952 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4953
4954 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4955 Setzer.
4956 (Java Differences): Fix some typos.
4957 * THANKS: Add Sebastian Setzer.
4958
4959 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4960
4961 * data/java.m4 (b4_single_class_if): Remove.
4962 (b4_abstract_if): Look at "%define abstract".
4963 (b4_lexer_if): New.
4964 (b4_union_name): Rename...
4965 (b4_yystype): ... to this. Map to "%define stype".
4966 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4967 b4_maybe_throws): Fix quoting.
4968 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4969 * data/lalr1.java (Lexer interface): Always define.
4970 (Lexer interface within parser class): Remove.
4971 (YYLexer class): New, used when "%code lexer" is present.
4972 (constructor): When "%code lexer" is used, pass %lex-param
4973 to the lexer constructor.
4974 (yylex, yyparse): Remove %lex-param from method invocations
4975 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4976
4977 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4978 abstract". Rename "%define union_name" to "%define stype".
4979 Rename method names according to previous patch.
4980 (Java Scanner Interface): Describe "%code lexer" instead of
4981 "%pure-parser" and "%define single_class".
4982 (Java Differences): Mention "%code lexer".
4983
4984 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4985 Include scanner here, using macros from tests/local.at.
4986 (AT_DATA_CALC_Y): Remove final argument.
4987 (_AT_CHECK_JAVA_CALC): Likewise.
4988 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4989 of %locations and %error-verbose.
4990 (main): Test with and without %lex-param.
4991 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4992 (AT_BISON_OPTION_POPDEFS): Pop it.
4993
4994 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4995
4996 DJGPP spefic issue. Inhibit the use of disallowed characters for
4997 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4998 and concern testsuite case 46.
4999 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
5000 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
5001 * djgpp/config.bat: Inhibit the use of disallowed characters.
5002
5003 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5004
5005 Miscellaneous %define and %code cleanup.
5006 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
5007 values are interpreted.
5008 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
5009 documentation a little more.
5010 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
5011 muscle_percent_define_insert, muscle_percent_code_grow): New
5012 functions/macros.
5013 * src/muscle_tab.h (muscle_percent_define_insert,
5014 muscle_percent_code_grow): Prototype.
5015 * src/parse-gram.y (prologue_declaration): Use
5016 muscle_percent_define_insert and muscle_percent_code_grow when parsing
5017 %define and %code directives.
5018
5019 Make it easy to share %define boolean variables between the front-end
5020 and back-end. Though not used yet, this will be useful in the future.
5021 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
5022 Bison uses of names rather than just skeleton uses of names.
5023 (b4_percent_define_get, b4_percent_define_ifdef): Rename
5024 b4_percent_define_skeleton_variables(VARIABLE) to
5025 b4_percent_define_bison_variables(VARIABLE).
5026 (b4_percent_code_get, b4_percent_code_ifdef): Rename
5027 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
5028 b4_percent_code_bison_qualifiers(QUALIFIER).
5029 (b4_check_user_names_wrap): Update for renames.
5030 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
5031 muscle_percent_define_default): New functions mimicking
5032 b4_percent_define_flag_if and b4_percent_define_default.
5033
5034 For %define variables, report locations for invalid values and
5035 redefinitions.
5036 * data/bison.m4 (b4_percent_define_flag_if): Read
5037 b4_percent_define_loc(VARIABLE) to report the location of an invalid
5038 value for VARIABLE.
5039 (b4_percent_define_default): Save a special location in
5040 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
5041 must later be reported as invalid.
5042 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
5043 functions.
5044 (muscle_percent_define_insert): Record the location of VARIABLE in
5045 muscle percent_define_loc(VARIABLE), and use it to report the previous
5046 location for a redefinition.
5047 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
5048 (muscle_percent_define_default): Update like b4_percent_define_default.
5049 (muscle_grow_user_name_list): Rename to...
5050 (muscle_user_name_list_grow): ... this for consistency and use
5051 muscle_location_grow.
5052 * src/muscle_tab.h (muscle_location_grow): Prototype.
5053 * tests/input.at (%define errors): Update expected output.
5054 * tests/skeletons.at (%define boolean variables: invalid skeleton
5055 defaults): New test case.
5056
5057 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
5058
5059 * src/print.c (lookahead_set, state_default_rule): Remove.
5060 (print_reductions): Replace state_default_rule invocation with
5061 equivalent use of yydefact, which was computed in token_actions in
5062 tables.c.
5063 (print_results): Don't allocate lookahead_set.
5064
5065 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
5066
5067 * data/lalr1.java: Prefix all private members with yy.
5068
5069 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
5070
5071 Use YYFPRINTF instead of fprintf where appropriate. Reported by
5072 Sebastien Fricker at
5073 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
5074 * THANKS: Add Sebastien Fricker.
5075 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
5076 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
5077 accept a variable number of arguments.
5078
5079 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5080
5081 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5082
5083 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5084
5085 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5086 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5087 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5088
5089 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5090
5091 Undo my 2007-02-07 change, switching back to the c-strcase module
5092 introduced in the 2007-02-03 change. Bruno Haible reported that
5093 the 2007-02-07 change would be dangerous in Turkish if we add a
5094 language whose name contains "i", since "i" is not lowercase "I"
5095 in Turkish.
5096 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5097 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5098 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5099 * m4/.cvsignore: Remove strcase.m4.
5100 * src/getargs.c: Revert 2007-02-07 change, as follows.
5101 Include c-strcase.h.
5102 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5103
5104 2007-02-11 Bruno Haible <bruno@clisp.org>
5105
5106 Enable the Java related testsuite tests when the only Java compiler
5107 found is a gcj < 4.3. Discussed at
5108 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5109 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5110
5111 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5112
5113 * data/Makefile.am: Update copyright date.
5114 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5115 yypstate_new returns NULL.
5116 (yypstate_new): Return NULL if malloc does.
5117 * src/reader.c (packgram): Move translation of rule actions from the
5118 beginning of packgram to...
5119 (check_and_convert_grammar): ... here right before packgram is invoked
5120 so it's easier to write more complete comments, and remove redundant
5121 code.
5122
5123 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5124
5125 As in semantic actions, make @$ in %initial-action, %destructor, and
5126 %printer imply %locations.
5127 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5128 scanning @$.
5129 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5130 (@$ in %initial-action implies %locations,
5131 @$ in %destructor implies %locations,
5132 @$ in %printer implies %locations): ... these new test cases.
5133
5134 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5135
5136 Undo most of the 2007-02-03 change, switching to the strcase module
5137 now that gnulib strcase has been fixed.
5138 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5139 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5140 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5141 * m4/.cvsignore: Add strcase.m4.
5142 * src/getargs.c: Revert 2007-02-03 change, as follows.
5143 Don't include c-strcase.h.
5144 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5145 strcasecmp has "unspecified behavior" outside the POSIX locale,
5146 but it works fine in practice if at least one argument is ASCII,
5147 as is the case in Bison.
5148
5149 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
5150
5151 * tests/java.at: Skip tests if only one of javac/java is present.
5152 Reported by Joel E. Denny.
5153 * tests/atlocal.in: Adjust copyright years.
5154
5155 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5156
5157 * data/lalr1.java (Stack): Work around old verifiers that disallow
5158 access to the private fields of an inner class, from the outer class.
5159 We can make Stack's fields public because user code doesn't have access
5160 to the instance of Stack used by parse(). Reported by Paul Eggert.
5161
5162 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5163
5164 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5165 the right spot for these files?
5166 * bootstrap.conf (gnulib_modules): Add c-strcase.
5167 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5168 c-strncasecmp.c.
5169 * src/getargs.c: Include c-strcase.h.
5170 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5171 to avoid unspecified behavior.
5172
5173 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5174
5175 * doc/bison.texinfo (Decl Summary): Correct typo.
5176
5177 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
5178
5179 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5180 Complain if the value does not match empty, "true" or "false".
5181 * data/c++.m4: Adjust default definitions of %define variables.
5182 * data/java.m4: Adjust default definitions of %define variables.
5183 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5184 to above behavior.
5185 * tests/input.at (Boolean %define variables): Test new behavior.
5186
5187 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
5188
5189 * NEWS: Mention java.
5190 * TODO: Remove things that are done.
5191 * bootstrap.conf: Add javacomp-script and javaexec-script.
5192 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5193
5194 * data/Makefile.am: Add new files.
5195 * data/java-skel.m4: New.
5196 * data/java.m4: New.
5197 * data/lalr1.java: New.
5198
5199 * doc/bison.texinfo: Put "A Complete C++ Example" under
5200 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5201 under Other Languages.
5202
5203 * src/getargs.c (valid_languages): Add Java.
5204 * src/getargs.h (struct bison_language): Update size of string fields.
5205
5206 * tests/Makefile.am: Add java.at.
5207 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5208 * tests/java.at: New.
5209 * tests/testsuite.at: Include it.
5210
5211 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5212
5213 Clean up.
5214 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5215 at_directive_argv arguments so these no longer have to be global
5216 variables. Also, update the implementation for the following changes.
5217 (fail_for_at_directive_too_many_args,
5218 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5219 (at_directive_name): Remove as at_directive_argv[0] will be used for
5220 this now.
5221 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5222 for the directive name.
5223 (at_directive_argc, at_directive_argv): Make these local within
5224 skel_lex instead of global.
5225 (INITIAL): Update directive start action for above changes.
5226 (SC_AT_DIRECTIVE_ARG): Rename to...
5227 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5228 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5229 (scan_skel): Move yylex_destroy to...
5230 (skel_scanner_free): ... here.
5231 * tests/skeletons.at (installed skeleton file name): Rename to...
5232 (installed skeleton file names): ... this.
5233
5234 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5235
5236 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5237 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5238 Summary" not "Directives".
5239 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5240 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5241 since the former is now the more complete one.
5242 (Prologue Alternatives): Likewise and do the same for %defines.
5243 (Table of Symbols): Add summary of %code, add summary of %define, and
5244 move full %code documentation to...
5245 (Decl Summary): ... here for consistency with other entries in these
5246 sections.
5247 Move %define entry in order to keep this list alphabetized.
5248 Reword %define entry a little to put less emphasis on the skeleton
5249 concept, which most users shouldn't have to think about.
5250
5251 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5252
5253 Adjust to recent gnulib changes.
5254 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5255 Add string.h, string_.h, unistd_.h, wchar_.h.
5256 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5257 * src/system.h: Don't include <stpcpy.h>; this is now done by
5258 <string.h>.
5259
5260 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
5261
5262 Simplify implementation of unqualified %code, implement macros for
5263 uniform treatment of boolean %define flags. Document %define.
5264 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5265 b4_percent_code_ifdef): New.
5266 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5267 * data/c++.m4: Define default value for global_tokens_and_yystype.
5268 * data/glr.cc: Likewise.
5269 * data/location.cc: Use b4_percent_define_flag_if.
5270
5271 * doc/bison.texinfo (Decl Summary): Document %define.
5272
5273 * src/parse-gram.y (Unqualified %code): Change muscle name to
5274 b4_percent_code().
5275 (content.opt): Default to empty.
5276
5277 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5278
5279 Implement support for relative and absolute skeleton file names.
5280 Discussed starting at
5281 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5282 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5283 (Bison Options): Document in --skeleton entry.
5284 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5285 full_skeleton can't necessarily hold all of pkgdatadir.
5286 If the specified skeleton file name contains a `/', don't prepend
5287 pkgdatadir.
5288 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5289 file name contains a `/', prepend the grammar file directory.
5290 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5291 * skeletons.at: New file.
5292 (relative skeleton file names): New test case.
5293 (installed skeleton file names): New test case.
5294 * tests/testsuite.at: Include skeletons.at.
5295
5296 * bootstrap: Update copyright to 2007.
5297
5298 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
5299
5300 * bootstrap: Remove occurrences of .#bootmp from the files.
5301
5302 2007-01-17 Akim Demaille <akim@epita.fr>
5303
5304 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5305 nonterminals.
5306 Use per-type %printer.
5307
5308 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5309
5310 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5311 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5312 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5313 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5314 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5315 tests/glr-regression.at, tests/input.at, tests/local.at,
5316 tests/output.at, tests/torture.at: Update copyright to 2007.
5317
5318 2007-01-16 Akim Demaille <akim@epita.fr>
5319
5320 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5321 error code.
5322 (Calc++ Scanner): Exit with failure if we can't open the input
5323 file.
5324 Accept "-" standing for stdin.
5325 (Calc++ Top Level): Print the result only if the parsing was
5326 successful.
5327
5328 2007-01-16 Akim Demaille <akim@epita.fr>
5329
5330 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5331
5332 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
5333 and Joel E. Denny <jdenny@ces.clemson.edu>
5334
5335 Clean up %define and %code implementation in M4 some. Most
5336 importantly, rename all related macros to be in the b4_percent_define
5337 and b4_percent_code namespaces. Also, complete support for `.' in
5338 %define variable names and %code qualifiers.
5339 * data/bison.m4 (b4_check_user_names): Check for special
5340 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5341 m4_foreach loops.
5342 (b4_get_percent_define, b4_get_percent_code): Rename to...
5343 (b4_percent_define_get, b4_percent_code_get): ... these.
5344 Extend documentation with examples.
5345 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5346 b4_percent_define_skeleton_variables and
5347 b4_percent_code_skeleton_qualifiers.
5348 Expect any value for the %define variable `foo' to be stored in the
5349 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5350 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5351 expect any unqualified %code blocks to be stored in a macro named
5352 `b4_percent_code_unqualified'.
5353 Use m4_indir so that %define variable names and %code qualifiers can
5354 contain `.', which is allowed by the grammar parser.
5355 (b4_percent_define_default): New macro to set a default value for a
5356 %define variable.
5357 (m4_wrap): Update wrapped code, and fix some underquoting.
5358 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5359 Expect grammar uses of %define variables and %code qualifiers to be
5360 defined in b4_percent_define_user_variables and
5361 b4_percent_code_user_qualifiers.
5362 * data/c++.m4: Use b4_percent_define_default rather than
5363 m4_define_default. Fix some underquoting. Skeleton usage of %define
5364 variable define_location_comparison now implies skeleton usage of
5365 %define variable filename_type.
5366 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5367 data/push.c, data/yacc.c: Update macro names.
5368 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5369 muscle names.
5370
5371 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5372
5373 DJGPP specific issues.
5374
5375 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5376 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5377
5378 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5379
5380 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5381 run parsers in all tests so that Valgrind is invoked during
5382 maintainer-check-valgrind.
5383 (Duplicate representation of merged trees): Free all semantic values.
5384 (Duplicated user destructor for lookahead): Likewise.
5385
5386 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5387
5388 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5389 command-line prefix.
5390 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5391 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5392 miss Valgrind messages.
5393 (Exploding the Stack Size with Malloc): Likewise.
5394
5395 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5396
5397 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5398 locals. Reported by Juan Manuel Guerrero at
5399 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5400 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5401 Fix some indentation also.
5402 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5403 explaining this issue.
5404
5405 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
5406 and Joel E. Denny <jdenny@ces.clemson.edu>
5407
5408 Simplify union and prologue handling, and escape union and lex/parse
5409 params with digraphs.
5410 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5411 values to the empty string since these are no longer guaranteed
5412 initialized by the front-end.
5413 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5414 braces around b4_user_stype since this is no longer done by the
5415 front-end.
5416 * src/files.c, src/files.h (pre_prologue_obstack,
5417 post_prologue_obstack): Remove.
5418 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5419 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5420 with digraphs. This fixes lex params and parse params.
5421 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5422 * src/output.c (prepare): Remove muscle insertion of the prologues.
5423 (output): Remove freeing of pre_prologue_obstack and
5424 post_prologue_obstack.
5425 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5426 than prologue_augment for prologue parsing so you don't need prologue
5427 obstacks.
5428 (grammar_declaration): For %union RHS, use `braceless' instead of
5429 "{...}" so that braces are already stripped and code is escaped with
5430 digraphs.
5431 * src/reader.c (prologue_augment): Remove.
5432 (reader): Remove initialization of pre_prologue_obstack and
5433 post_prologue_obstack.
5434 * src/reader.h (prologue_augment): Remove.
5435
5436 * data/c.m4: Remove stray parenthesis.
5437
5438 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5439
5440 Remove quotes from variables names in %define directives and from
5441 qualifiers in %code directives, and restrict the characters that are
5442 allowed in them to M4-friendly ones. For %define, continue to support
5443 the quoted form as a deprecated feature. Discussed starting at
5444 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5445 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5446 %code.
5447 * doc/bison.texinfo (Prologue Alternatives): Update.
5448 (Decl Summary): In %defines entry, update mention of `%code requires'
5449 and `%code provides'.
5450 (C++ Location Values): Update %define uses.
5451 (Calc++ Parser Interface): Likewise.
5452 (Calc++ Parser): Likewise, and update `%code requires' uses.
5453 (Table of Symbols): Update %code documentation.
5454 * src/parse-gram.y (prologue_declaration): For %define variables, use
5455 `variable' instead of `STRING'.
5456 (grammar_declaration): For %code qualifiers, use `ID' instead of
5457 `STRING'.
5458 (variable): New nonterminal that takes an `ID' or a `STRING'.
5459 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5460 and %define uses.
5461 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5462 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5463 (%define errors): Update %define uses.
5464
5465 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5466
5467 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5468 instead of muscle_insert for %define values so that M4-special
5469 characters are replaced with digraphs.
5470 * tests/input.at (%define errors): Extend to check weird values.
5471
5472 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5473
5474 Instead of having skeletons declare all valid %define variables and
5475 %code qualifiers, provide macros that retrieve the associated values
5476 and build these lists automatically. Thus Bison will now warn when a
5477 variable or qualifier is not used by the skeleton in the current
5478 invocation regardless of whether it might sometimes be used by that
5479 skeleton in other invocations. Also, move all %define value macros to
5480 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5481 form, which is replaced by %code.
5482 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5483 (b4_check_user_names): ... this, and change the series of valid name
5484 arguments to a single list argument for names used in the skeleton
5485 similar to the existing list argument for names used in the grammar.
5486 Warn instead of complaining.
5487 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5488 values and %code code, to format %code code properly, and to build
5489 lists of all %define variables and %code qualifiers used in the
5490 skeleton: b4_skeleton_percent_define_variables and
5491 b4_skeleton_percent_code_qualifiers.
5492 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5493 Remove, and...
5494 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5495 the skeleton names lists can finish building first. In place of
5496 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5497 expect the lists b4_user_percent_define_variables and
5498 b4_user_percent_code_qualifiers.
5499 * data/c++.m4: Where setting default values for b4_parser_class_name,
5500 b4_location_type, b4_filename_type, b4_namespace, and
5501 b4_define_location_comparison, update their names to the
5502 b4_percent_define_ namespace.
5503 * data/glr.c: Don't use b4_check_percent_define_variables and
5504 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5505 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5506 (b4_parser_class_name, b4_namespace): Define these using
5507 b4_get_percent_define for parser_class_name and namespace.
5508 * data/location.cc: Use b4_get_percent_define.
5509 * data/push.c: Don't use b4_check_percent_define_variables and
5510 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5511 * data/yacc.c: Likewise, and don't call m4_exit in
5512 b4_use_push_for_pull_if or m4_wrap code will never execute.
5513 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5514 Rename to...
5515 (muscle_grow_user_name_list): ... this for consistency with the
5516 terminology used in bison.m4.
5517 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5518 %define variable names, and rename muscle used_percent_define_variables
5519 to user_percent_define_variables.
5520 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5521 user_percent_code_qualifiers.
5522 (content): Remove.
5523 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5524 {CODE} form is no longer accepted.
5525 * tests/input.at (Reject bad %code qualifiers): Rename to...
5526 (Reject unused %code qualifiers): ... this, and update test output.
5527 (%define error): Update test output.
5528
5529 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5530
5531 Check for unrecognized %define variables similar to checking for
5532 unrecognized %code qualifiers. Check for redefined %define variables.
5533 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5534 generalizes...
5535 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5536 (b4_check_percent_define_variables): New, also wraps it.
5537 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5538 variables using b4_check_percent_define_variables.
5539 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5540 all those exercised in the test suite and all those listed in the
5541 `Default values' section of c++.m4. Are there others?
5542 * data/push.c, data/yacc.c: Declare no valid %define variables.
5543 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5544 similar to muscle_find, but it works even when the muscle stores a
5545 const value.
5546 (muscle_grow_used_name_list): New function for constructing the used
5547 name list muscles that b4_check_for_unrecognized_names requires.
5548 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5549 %define'd more than once. Define the b4_used_percent_define_variables
5550 muscle with muscle_grow_used_name_list.
5551 (grammar_declaration): Abbreviate %code code with
5552 muscle_grow_used_name_list.
5553 * tests/input.at (%define errors): New.
5554
5555 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5556
5557 Provide warn_at, complain_at, and fatal_at function callbacks to the
5558 skeletons, and use this for %code qualifier complaints.
5559 * data/bison.m4 (b4_error_at): New, invoked by...
5560 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5561 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5562 @fatal_at(...@) directives.
5563 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5564 qualifiers in b4_used_percent_code_qualifiers and to use
5565 b4_complain_at.
5566 * src/location.c, src/location.h (boundary_set_from_string): New global
5567 function.
5568 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5569 function.
5570 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5571 to b4_used_percent_code_qualifiers.
5572 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5573 function.
5574 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5575 (lineno): Rename to...
5576 (out_lineno): ... this so I don't misunderstand it again.
5577 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5578 here; these newlines are in the input but not the output file.
5579 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5580 (at_directive_perform): ... this new static function, and add handling
5581 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5582 directives.
5583 * tests/input.at (Reject bad %code qualifiers): Update test output with
5584 locations and extend.
5585
5586 * tests/output.at (Output file name: [, Output file name: ]): Remove
5587 bogus comment about these tests failing.
5588
5589 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5590
5591 Clean up b4_check_percent_code_qualifiers a little.
5592 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5593 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5594 documentation and add examples.
5595 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5596 qualifiers here.
5597
5598 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5599
5600 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5601 unreliable -- especially when they're hidden inside another macro.
5602 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5603 data/c.m4: Remove m4_divert(-1).
5604 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5605 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5606 m4_divert_push(0) and m4_divert_pop(0).
5607 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5608 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5609 pushed and popped by m4sugar, should be first on the stack.
5610
5611 Provide warn, complain, and fatal function callbacks to the skeletons.
5612 This provides more flexibility than m4_fatal, improves the error
5613 message format, and captures messages for translation. Discussed
5614 starting at
5615 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5616 * data/bison.m4 (b4_error): New, invoked by...
5617 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5618 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5619 directives. Because these M4 macros might be called when the current
5620 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5621 the previous removal of uses of m4_divert, which caused trouble.
5622 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5623 m4_fatal to report unrecognized %code qualifiers.
5624 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5625 push parser requests.
5626 * data/glr.c: Use b4_complain instead of m4_fatal to report
5627 non-deterministic push parser requests.
5628 Update @output usage to @output(...@) form.
5629 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5630 report missing %defines. Update @output usage to @output(...@) form.
5631 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5632 @output(...@) form.
5633 * src/main.c (main): Invoke skel_scanner_free.
5634 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5635 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5636 obstack_for_string from flex-scanner.h.
5637 (YY_DECL): Use to declare skel_lex static.
5638 (decode_at_digraphs): Remove; now handled in the new
5639 SC_AT_DIRECTIVE_ARG start condition.
5640 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5641 functions.
5642 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5643 at_directive_argv): New static globals.
5644 (INITIAL): Use fail_for_invalid_at.
5645 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5646 recognize the start of a generalized `@directive(...@)' form and
5647 start...
5648 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5649 directive args (using the new obstack_for_string), to decode the
5650 contained @ diagraphs, and to perform the directive. It recognizes
5651 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5652 @output(...@).
5653 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5654 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5655 `@,'.
5656 (scan_skel): Initialize obstack_for_string on the first call.
5657 (skel_scanner_free): New function to free obstack_for_string.
5658 * tests/input.at (Reject bad %code qualifiers): Update test output.
5659
5660 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5661
5662 Consolidate the 4 prologue alternative directives (%code, %requires,
5663 %provides, and %code-top) into a single %code directive with an
5664 optional qualifier field. Discussed at
5665 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5666 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5667 alternatives.
5668 * doc/bison.texinfo (Prologue Alternatives): Update.
5669 (Decl Summary): Update to %code "requires" and %code "provides".
5670 (Calc++ Parser): Update to %code "requires".
5671 (Table of Symbols): Remove entries for %requires, %provides, and
5672 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5673 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5674 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5675 which are skeleton-specific.
5676 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5677 declare what %code qualifiers it supports and to complain if any other
5678 qualifiers were used in the grammar.
5679 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5680 and b4_user_code([b4_percent_code_provides]) in place of
5681 b4_user_requires and b4_user_provides.
5682 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5683 Add b4_user_code([b4_percent_code_top]) and
5684 b4_user_code([b4_percent_code]).
5685 Invoke b4_check_percent_code_qualifiers.
5686 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5687 PERCENT_REQUIRES): Remove.
5688 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5689 %requires. Rewrite the %code RHS as the unqualified form defining the
5690 muscle b4_percent_code. Add another RHS for the qualified %code form,
5691 which defines muscles of the form b4_percent_code_QUALIFIER and the
5692 b4_used_percent_code_qualifiers muscle.
5693 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5694 PERCENT_REQUIRES): Remove.
5695 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5696 %code "requires" and %code "provides".
5697 * tests/input.at (Reject bad %code qualifiers): New.
5698
5699 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5700
5701 Use the new code_props interface for destructors and printers.
5702 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5703 printer_location members, and change the type of the destructor and
5704 printer members to code_props.
5705 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5706 symbol_printer_get, semantic_type_destructor_set,
5707 semantic_type_printer_set, default_tagged_destructor_set,
5708 default_tagless_destructor_set, default_tagged_printer_set,
5709 default_tagless_printer_set): Use code_props in arguments and return
5710 types in place of char const * and location.
5711 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5712 since the locations are now contained in the return of
5713 symbol_destructor_get and symbol_printer_get.
5714 * src/output.c (symbol_destructors_output, symbol_printers_output):
5715 Replace with...
5716 (symbol_code_props_output): ... this to eliminate duplicate code.
5717 (output_skeleton): Update to use symbol_code_props_output.
5718 * src/reader.c (symbol_should_be_used): Update use of
5719 symbol_destructor_get.
5720 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5721 Update uses of the various _destructor_set and _printer_set functions.
5722 * src/symtab.c: (default_tagged_destructor_location,
5723 default_tagless_destructor_location, default_tagged_printer_location,
5724 default_tagless_printer_location): Remove since we...
5725 (default_tagged_destructor, default_tagless_destructor,
5726 default_tagged_printer, default_tagless_printer): ... change the type
5727 of these to code_props.
5728 (symbol_new, semantic_type_new, symbol_destructor_set,
5729 semantic_type_destructor_set, symbol_destructor_get,
5730 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5731 symbol_check_alias_consistency, default_tagged_destructor_set,
5732 default_tagless_destructor_set, default_tagged_printer_set,
5733 default_tagless_printer_set): Update.
5734 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5735 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5736 code_props members.
5737 (symbol_print): Use SYMBOL_CODE_PRINT.
5738
5739 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5740
5741 Use the new code_props interface for rule actions.
5742 * src/symlist.h (symbol_list): Replace action, action_location, and
5743 used members with a code_props action_props member.
5744 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5745 grammar_midrule_action, grammar_current_rule_merge_set,
5746 grammar_current_rule_symbol_append, packgram): Update.
5747 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5748 * src/scan-code.l (handle_action_dollar): Update.
5749 (translate_rule_action): Remove, no longer used.
5750 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5751
5752 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5753
5754 Use the new code_props interface in parse-gram.y.
5755 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5756 Update all uses of translate_* functions to use the new code_props
5757 interface and to use gram_scanner_last_string_free and
5758 code_scanner_last_string_free where possible.
5759 (grammar_declaration): symbol_list_destructor_set and
5760 symbol_list_printer_set now perform the translation, so don't do it
5761 here. Use gram_scanner_last_string_free where possible.
5762 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5763 translate_code): Remove, no longer used.
5764 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5765 symbol_list_printer_set): Perform code translation here rather than
5766 depending on the caller to do so.
5767
5768 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5769 * src/scan-gram.h (gram_last_string): Remove declaration.
5770 * src/scan-gram.l (last_string): Declare it static.
5771
5772 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5773
5774 Encapsulate code properties and related functionality for the various
5775 destructors, printers, and actions into a code_props structure and
5776 interface. This patch merely implements code_props in scan-code.h and
5777 scan-code.l. Future patches will rewrite other modules to use it.
5778 Discussed starting at
5779 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5780 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5781 consistently initialize const structs that have an empty location
5782 field.
5783 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5784 to ensure consistency.
5785 * src/scan-code.h (code_props): New structure.
5786 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5787 function, macro, and const global variable for initializing a
5788 code_props with no code.
5789 (code_props_plain_init, code_props_symbol_action_init,
5790 code_props_rule_action_init, code_props_translate_code): The rest of
5791 the new code_props functional interface. Among other things, the init
5792 functions set the code_props kind field so that
5793 code_props_translate_code will know whether to behave like
5794 translate_symbol_action, translate_rule_action, or translate_code.
5795 These old translate functions must remain until all other modules are
5796 updated to use the new code_props interface.
5797 (code_scanner_last_string_free): New function similar to
5798 gram_scanner_last_string_free.
5799 (code_scanner_free): Add documentation.
5800 * src/scan-code.l: Implement the new interface.
5801 (code_lex): Make it static, add a code_props* argument, and remove the
5802 rule argument.
5803 (last_string): New static global similar to the one in scan-gram.l.
5804 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5805 instead of rule.
5806 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5807 code_props since Bison may one day use this information for destructors
5808 and printers.
5809 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5810 (handle_action_dollar): Use symbol_list_n_get and set used flag
5811 directly since symbol_list_n_used_set is removed.
5812 (translate_action): Add a code_props* argument and remove the rule,
5813 action, and location arguments. Pass the code_props* on to code_lex.
5814 (translate_rule_action, translate_symbol_action, translate_code):
5815 Rewrite as wrappers around the new code_props interface.
5816 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5817 it would eventually need to break the encapsulation of code_props.
5818
5819 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5820
5821 * etc/.cvsignore: New.
5822
5823 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5824
5825 Add maintainer-push-check to run maintainer-check using push parsing in
5826 place of pull parsing where available.
5827 * Makefile.am (maintainer-push-check): New.
5828 * data/bison.m4 (b4_use_push_for_pull_if): New.
5829 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5830 appropriately based on their existing values.
5831 (yypush_parse): Don't print push-parser-specific diagnostics if push
5832 parsing is being used in place of pull parsing.
5833 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5834 push.c.
5835 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5836 variable, and insert b4_use_push_for_pull_flag into muscles.
5837 * tests/Makefile.am (maintainer-push-check): New.
5838
5839 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5840
5841 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5842 (whether successful or failed) so that yypush_parse can be invoked
5843 again to start a new parse using the same yypstate.
5844 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5845 check multiple yypull_parse invocations on the same yypstate. For pull
5846 mode, extend to check multiple yyparse invocations.
5847 (Exploding the Stack Size with Alloca): Extend to try with
5848 %push-pull-parser.
5849 (Exploding the Stack Size with Malloc): Likewise.
5850
5851 * tests/calc.at (Simple LALR Calculator): Don't specify
5852 %skeleton "push.c" since %push-pull-parser implies that now.
5853 * tests/headers.at (export YYLTYPE): Don't check for the push
5854 declarations. Otherwise, this test case can't be used to see if push
5855 mode can truly emulate pull mode.
5856 * tests/input.at (Torturing the Scanner): Likewise.
5857 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5858 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5859 AT_YACC_IF, which now includes the case of push mode since %skeleton
5860 need not be used for push mode. This will be more intuitive once
5861 push.c is renamed to yacc.c.
5862
5863 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5864
5865 For push mode, convert yyparse from a macro to a function, invoke yylex
5866 instead of passing a yylexp argument to yypull_parse, and don't
5867 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5868 Discussed starting at
5869 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5870 * data/bison.m4 (b4_pull_if): New.
5871 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5872 * data/push.c: Improve M4 quoting a little.
5873 (b4_generate_macro_args, b4_parenthesize): Remove.
5874 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5875 any time a pull parser is requested.
5876 Don't #define this as a wrapper around yypull_parse. Instead, when
5877 both push and pull are requested, make it a function that does that
5878 same thing.
5879 (yypull_parse): If there's a b4_prefix, #define this to
5880 b4_prefix[pull_parse] when both push and pull are requested.
5881 Don't define this as a function unless both push and pull are
5882 requested.
5883 Remove the yylexp argument and hard-code yylex invocation instead.
5884 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5885 %push-parser.
5886 * src/getargs.c (pull_parser): New global initialized to true.
5887 * getargs.h (pull_parser): extern it.
5888 * src/output.c (prepare): Insert pull_flag muscle.
5889 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5890 (prologue_declaration): Set both push_parser and pull_parser = true for
5891 %push-pull-parser. Set push_parser = true and pull_parser = false for
5892 %push-parser.
5893 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5894 %push-parser since there's no backward-compatibility concern here.
5895 Scan %push-pull-parser.
5896 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5897 instead of %push-parser.
5898 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5899 prototype it in the module that calls yyparse.
5900 * tests/input.at (Torturing the Scanner): Likewise.
5901 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5902
5903 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5904
5905 Update etc/bench.pl. Optimize push mode a little (the yyn change
5906 deserves most of the credit).
5907 * Makefile.am (SUBDIRS): Add etc subdirectory.
5908 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5909 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5910 yytoken, yyval, and yyloc declarations to...
5911 (yyparse or yypush_parse): ... here to improve performance. For
5912 yypush_parse invocations after the first, be sure to assign yyn its old
5913 value again.
5914 (yypstate_new): Don't bother initializing the yyresult field since the
5915 initial value isn't used.
5916 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5917 remove the #define that, in push mode, set it to yyps->NAME.
5918 * etc/Makefile.am: New.
5919 * etc/bench.pl: Remove and build it instead from...
5920 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5921 "tests/bison" from the build directory by default rather than just
5922 invoking "bison" from $PATH.
5923 (calc_grammar): Update push parser code: don't declare yylval globally,
5924 don't define yyparse_wrapper, and don't #define yyparse.
5925 (bench_grammar): Update to check all working combinations of yacc.c,
5926 push.c, impure, pure, pull, and push.
5927
5928 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5929
5930 For push mode, add pull wrappers around yypush_parse.
5931 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5932 (yypull_parse): New function wrapping yypush_parse.
5933 (yyparse): New #define wrapping yypull_parse.
5934 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5935 is declared.
5936 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5937 prototype yylex in the module that calls yyparse, and don't prototype
5938 yyparse there. Otherwise, the yyparse expansion won't compile.
5939 * tests/input.at (Torturing the Scanner): Likewise.
5940
5941 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5942
5943 Enable push parsers to operate in impure mode. Thus, %push-parser no
5944 longer implies %pure-parser. The point of this change is to move
5945 towards being able to test the push parser code by running the entire
5946 test suite as if %push-parser had been declared.
5947 * data/push.c (yypush_parse): For impure mode, remove the
5948 yypushed_char, yypushed_val, and yypushed_loc arguments.
5949 Instead, declare these as local variables initialized to the global
5950 yychar, yylval, and yylloc.
5951 For the first yypush_parse invocation only, restore the initial values
5952 of these global variables when it's time to read a token since they
5953 have been overwritten.
5954 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5955 %push-parser.
5956 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5957 %pure-parser along with %push-parser since this test case was designed
5958 for pure push parsers.
5959 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5960 (AT_YACC_OR_PUSH_IF): New.
5961 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5962 add a note that it's still wrong for some cases (as it has been for a
5963 while).
5964 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5965 %push-parser no longer implies %pure-parser.
5966
5967 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5968
5969 Remove some unnecessary differences between the pull parser code and
5970 the push parser code. This patch enables yynerrs in push mode.
5971 * data/push.c: Reformat M4 a little.
5972 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5973 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5974 because push mode is on. Instead, if pure mode is on, move yynerrs
5975 to...
5976 (b4_declare_parser_state_variables): ... here.
5977 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5978 to yyps->NAME so it can be used in yypush_parse.
5979 (yypush_parse): Don't omit uses of yynerrs in push mode.
5980
5981 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5982
5983 Fix bug such that the first pushed token's value and location are
5984 sometimes overwritten (sometimes by %initial-action) before being used.
5985 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5986 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5987 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5988 more closely mimic the pull parser logic.
5989 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5990 time to read a token, which is after any initialization of yylval and
5991 yylloc.
5992 (gottoken): Rename label to...
5993 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5994 user namespace.
5995
5996 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5997
5998 Rearrange initialization of the parser state variables so that the
5999 skeleton doesn't have to have a copy for pull mode and another for push
6000 mode. This patch also fixes at least a bug such that yylloc was not
6001 initialized (with b4_location_initial_line and
6002 b4_location_initial_column) upon calling yypush_parse. However, that
6003 initialization now overwrites the first token's location;
6004 %initial-action assigning @$ already did the same thing, and both bugs
6005 will be fixed in a later patch.
6006 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
6007 (b4_declare_parser_state_variables): Remove initialization of yytoken,
6008 yyss, yyvs, yyls, and yystacksize.
6009 (yypstate_new): Remove initialization of some yypstate fields: yystate,
6010 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
6011 yylsp.
6012 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
6013 yyps->NAME so it can be used in yypush_parse.
6014 (yyparse or yypush_parse): For yypush_parse, don't print the
6015 "Starting parse" diagnostic for invocations after the first.
6016 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
6017 yypush_parse, only do it for the first invocation.
6018 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
6019 initialization to occur in yypush_parse but only on the first
6020 invocation.
6021
6022 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6023
6024 * data/push.c: Add CPP guards around push parser declarations in both
6025 the header and the code file.
6026 In the code file, move the push parser declarations to the same place
6027 they appear in the header file.
6028 Clean up the M4 some, especially the inconsistent underquoting in
6029 some b4_c_function_def and b4_c_function_decl uses.
6030
6031 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6032
6033 Encapsulate the push parser state variables into an M4 macro so the
6034 push skeleton doesn't have to list them again for pull mode's yyparse.
6035 For push mode, remove yypush_parse's local equivalents of these
6036 variables to eliminate unnecessary copying between the two sets at
6037 run-time. This patch also fixes at least a bug related to multiple
6038 %initial-action invocations in push mode.
6039 * data/push.c (b4_declare_parser_variables): Rename to...
6040 (b4_declare_scanner_communication_variables): ... this for clarity and
6041 update both uses.
6042 (b4_declare_yyparse_variables): Remove and move its contents to the one
6043 spot where it was invoked.
6044 (b4_declare_parser_state_variables): New macro containing the parser
6045 state variables required by push mode.
6046 (struct yypstate): Replace all fields but yynew with
6047 b4_declare_parser_state_variables.
6048 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
6049 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
6050 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
6051 (yyparse or yypush_parse): For yyparse in pull mode, replace local
6052 parser state variable declarations with
6053 b4_declare_parser_state_variables.
6054 Don't initialize parser state variables when calling yypush_parse since
6055 yypstate_new already does that.
6056 Invoke the user's initial action only upon the first yypush_parse
6057 invocation.
6058 Remove all code that copies between the local parser state variables
6059 and the yypstate.
6060
6061 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6062
6063 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
6064 prevent a name collision in a future patch where these names will
6065 sometimes be #define'd.
6066 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
6067 since it no longer has the same name as the existing argument.
6068 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
6069
6070 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
6071 and Joel E. Denny <jdenny@ces.clemson.edu>
6072
6073 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6074 that the argument is case-insensitive, and there's no `=' here.
6075 For the %skeleton entry, mention that %language is better.
6076 (Bison Options): Likewise for --language and --skeleton. Move the
6077 --skeleton entry so that the `Tuning the parser' section is sorted
6078 alphabetically on long options.
6079 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
6080 %language directive in detail here; cross-reference the %language
6081 documentation instead.
6082 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6083 `%require "2.3b"' so that the example is always up-to-date.
6084 (Table of Symbols): Add entries for %language and %skeleton.
6085 * examples/extexi (normalize): Instead of replacing every %require
6086 argument with the current Bison version, just substitute for
6087 `@value{VERSION}'. This guarantees that we're testing what actually
6088 appears in the documentation.
6089 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6090 rather than `@VERSION@'.
6091
6092 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6093
6094 * NEWS: Reword the %language news a bit, and put it earlier.
6095
6096 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6097 Rewrite to simplify the logic.
6098 (language_argmatch): Likewise.
6099 (program_name): We now own this var.
6100 * src/getargs.h (struct bison_language): Use char[] rather than
6101 const char *.
6102
6103 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6104 Java is supported.
6105 * src/complain.c (program_name): Remove decl; no longer needed.
6106 * src/main.c (program_name): Remove; now belongs to getargs.
6107
6108 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
6109
6110 * NEWS: Document %language.
6111
6112 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6113
6114 * data/c-skel.m4, data/c++-skel.m4: New files.
6115 * data/glr.c: Complain on push parsers.
6116
6117 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6118 over %skeleton.
6119 (Decl Summary): Document %language and %skeleton.
6120 (Command line): Document -L.
6121
6122 * examples/extexi: Rewrite %require directive.
6123 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6124
6125 * src/files.c (compute_exts_from_gc): Look in language structure
6126 for .y extension.
6127 (compute_file_name_parts): Check whether .tab should be added.
6128 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6129 (language, skeleton_arg, language_argmatch): New.
6130 (long_options): Add --language.
6131 (getargs): Use skeleton_arg, add -L/--language.
6132 * src/getargs.h: Include location.h.
6133 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6134 * src/output.c (prepare): Pick default skeleton from struct language.
6135 Don't dispatch C skeletons here.
6136 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6137 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6138 * src/scan-gram.l ("%language"): New rule.
6139
6140 * tests/calc.at: Test %skeleton and %language.
6141 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6142 (AT_GLR_IF): Look for %skeleton "glr.cc".
6143 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6144 (AT_YACC_IF): Reject %language.
6145
6146 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6147
6148 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6149 since it wasn't used; only the typedef name 'semantic_type' is needed.
6150 Also, omit trailing white space.
6151
6152 * bootstrap: Sync from coreutils.
6153 (gnulib_extra_files): Add build-aux/announce.gen.
6154 (slurp): Adjust .gitignore files like .cvsignore files.
6155 * build-aux/announce-gen: Remove from CVS, since bootstrap
6156 now creates this.
6157
6158 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6159
6160 Make %push-parser imply %pure-parser. This fixes several bugs; see
6161 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6162 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6163 pure_parser = true.
6164 * data/push.c: Don't bother testing b4_push_if when deciding whether
6165 to expand b4_declare_parser_variables globally.
6166 (yypush_parse): Likewise in here.
6167
6168 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6169 (yy_reduce_print): Reformat M4 for readability.
6170
6171 2006-12-15 Bob Rossi <bob@brasko.net>
6172 and Joel Denny <jdenny@ces.clemson.edu>
6173
6174 * data/push.c (yypstate): Add typedef, and update all uses of
6175 struct yypstate to just yypstate.
6176 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6177
6178 2006-12-14 Bob Rossi <bob@brasko.net>
6179
6180 * data/push.c (yypush_parse): Declare prototype regardless of
6181 %locations option.
6182
6183 2006-12-14 Bob Rossi <bob@brasko.net>
6184
6185 * data/push.c (yyparse): Remove the prototype and the #define when in
6186 push-parser mode.
6187
6188 2006-12-13 Bob Rossi <bob@brasko.net>
6189
6190 * data/push.c (yypstate_init): Rename to...
6191 (yypstate_new): ... this and use b4_c_function_def.
6192 (yypstate_delete): New.
6193 (yypush_parse): Change parameters yynval and yynlloc to be const.
6194 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6195 yypstate_delete functions.
6196
6197 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6198
6199 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6200 strange test case titles. Reported by Bob Rossi.
6201
6202 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6203
6204 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6205 of potential ambiguities in GLR grammers.
6206
6207 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6208
6209 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6210 `bison ', use m4_index instead of m4_substr since chopping up a string
6211 containing M4-special characters causes problems here.
6212
6213 Fix a couple of bugs related to special characters in user-specified
6214 file names, and make it easier for skeletons to compute output file
6215 names with the same file name prefix as Bison-computed output file
6216 names.
6217 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6218 b4_parser_file_name and b4_spec_defines_file instead of
6219 @output_parser_name@ and @output_header_name@, which are now redundant.
6220 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6221 b4_parser_file_name, b4_spec_defines_file, and the new
6222 @basename(FILENAME@) instead of @output_parser_name@ and
6223 @output_header_name@, which inappropriately escaped the file names as
6224 C string literals.
6225 * src/files.c (all_but_ext): Remove static qualifier.
6226 (compute_output_file_names): Move `free (all_but_ext)' to...
6227 (output_file_names_free): ... here since all_but_ext is needed later.
6228 * src/files.h (all_but_ext): Extern.
6229 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6230 exactly what MUSCLE_INSERT_STRING used to do.
6231 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6232 characters are escaped properly.
6233 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6234 all_but_ext.
6235 For pkgdatadir muscle, maintain previous functionality by using
6236 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6237 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6238 digraphs would never be expanded. Hopefully no one has M4-special
6239 characters in his Bison installation path.
6240 * src/scan-skel.l: Don't parse @output_header_name@ and
6241 @output_parser_name@ anymore since they're now redundant.
6242 In @output, use decode_at_digraphs.
6243 Parse a new @basename command that invokes last_component.
6244 (decode_at_digraphs): New.
6245 (BASE_QPUTS): Remove unused.
6246 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6247 (Output file name): New tests.
6248
6249 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6250
6251 Warn about output files that are generated by the skeletons and that
6252 conflict with other output files.
6253 * data/glr.c: Don't generate the header file here when glr.cc does.
6254 * src/files.c (file_names, file_names_count): New static globals.
6255 (compute_output_file_names): Invoke output_file_name_check for files
6256 not generated by the skeletons and remove existing checks.
6257 (output_file_name_check): New function that warns about conflicting
6258 output file names.
6259 (output_file_names_free): Free file_names.
6260 * src/files.h (output_file_name_check): Declare.
6261 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6262 the skeletons.
6263 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6264 (Conflicting output files): New tests.
6265
6266 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6267
6268 * doc/bison.texinfo: Fix a couple of typos.
6269
6270 2006-12-08 Bob Rossi <bob@brasko.net>
6271
6272 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6273 Rename to...
6274 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6275 update all uses.
6276 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6277 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6278 local pv.
6279 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6280 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6281
6282 2006-12-07 Bob Rossi <bob@brasko.net>
6283 and Joel Denny <jdenny@ces.clemson.edu>
6284
6285 * data/push.c (yypvarsinit): Change return type from void* to struct
6286 yypvars*. No longer cast to void* on return.
6287 (struct yypvars): Remove yylen since it need not be remembered between
6288 yypushparse invocations.
6289 (yypushparse): Don't copy between yylen and pv->yylen.
6290
6291 2006-12-05 Bob Rossi <bob@brasko.net>
6292
6293 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6294 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6295 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6296 (struct yypvars): Remove b4_declare_parser_variables.
6297 (yypvarsinit): Remove init code for removed variables.
6298 (global scope): Do not declare b4_declare_parser_variables if
6299 push or pure mode.
6300 (yypushparse): Add b4_declare_parser_variables.
6301 Init new local variables, and remove init code for removed
6302 yypvars variables.
6303 (yyparse): Delete.
6304 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6305 and yyparse for other modes.
6306 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6307 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6308 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6309 (AT_PURE_LEX_IF): True if pure or push parser.
6310
6311 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6312
6313 Document Yacc prologue alternatives and default %destructor's and
6314 %printer's as experimental. Don't mention Java yet. Discussed at
6315 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6316 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6317 (2.3a): Annotate this entry to say the old forms of these features were
6318 also experimental.
6319 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
6320 Table of Symbols): Say they're experimental. Comment out any mention
6321 of Java (we'll want this back eventually).
6322
6323 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6324
6325 Support a file name argument to %defines. Deprecate `=' in
6326 %file-prefix, %name-prefix, and %output. Discussed at
6327 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6328 * NEWS (2.3a+): Mention.
6329 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
6330 form of %defines, and remove `=' from entries for %file-prefix,
6331 %name-prefix, and %output.
6332 * src/parse-gram.y (prologue_declaration): Implement.
6333 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6334 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6335 all but one occurrence of %name-prefix.
6336 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6337 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6338 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6339 occurrence of each of %file-prefix and %output. Add check for %defines
6340 with argument.
6341 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6342 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6343 Remove the `=' from %output.
6344
6345 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6346
6347 Don't escape $ in test case titles since Autoconf 2.61 now does that
6348 correctly.
6349 * tests/actions.at (Default %printer and %destructor are not for error
6350 or $undefined): Here.
6351 (Default %printer and %destructor are not for $accept): Here.
6352 * tests/input.at (Invalid $n and @n): Here.
6353
6354 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6355
6356 Rename <!> to <>. Discussed starting at
6357 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6358 * NEWS (2.3a+): Update.
6359 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
6360 Update.
6361 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6362 * src/scan-gram.l (INITIAL): Implement.
6363 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6364 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6365 comment.
6366 * tests/actions.at (Default tagless %printer and %destructor,
6367 Default tagged and per-type %printer and %destructor,
6368 Default %printer and %destructor are not for error or $undefined,
6369 Default %printer and %destructor are not for $accept,
6370 Default %printer and %destructor for mid-rule values): Update.
6371 * tests/input.at (Default %printer and %destructor redeclared,
6372 Unused values with default %destructor): Update.
6373
6374 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6375
6376 Don't let %prec take a nonterminal.
6377 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6378 token.
6379 * tests/input.at (%prec takes a token): New test checking that %prec
6380 won't take a nonterminal.
6381
6382 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6383
6384 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6385 it was double-quoted.
6386 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6387 grammar is maintained with Bison's highest standards.
6388 * src/getargs.c: Fix some typos in Doxygen comments.
6389
6390 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6391
6392 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6393 later. Reported by Paul Eggert in
6394 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6395 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6396 * src/scan-code.l (translate_action): Don't bother invoking
6397 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6398 (code_scanner_free): Instead of invoking
6399 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6400 which frees more.
6401 * src/scan-gram.l (gram_scanner_free): Likewise.
6402 * src/scan-skel.l (scan_skel): Likewise.
6403
6404 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6405
6406 * src/files.c (tr): Change return type to void.
6407 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6408 has been called previously for the same key.
6409 (muscle_find): Return storage instead of value so that
6410 --enable-gcc-warnings doesn't produce warnings that the return discards
6411 const. aver that the value and storage are the same since storage
6412 could potentially be NULL when value is not.
6413 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6414 same as 0.
6415
6416 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6417
6418 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6419 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6420 us a slightly cleaner distribution, and also works.
6421 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6422 gnulib changes.
6423
6424 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6425 and Paul Eggert <eggert@cs.ucla.edu>
6426
6427 Don't let Bison leak memory except when it complains.
6428 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6429 (spec_defines_file, dir_prefix): Now char *, not const char *,
6430 since they are freed.
6431 * src/files.c: Likewise.
6432 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6433 Likewise.
6434 (tr): Now operates in-place. All uses changed.
6435 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6436 values.
6437 (compute_file_name_parts, compute_output_file_names): Don't store
6438 read-only data in variables that will be freed.
6439 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6440 src_extension, and header_extension.
6441 (output_file_names_free): New public function to free
6442 spec_verbose_file, spec_graph_file, spec_defines_file,
6443 parser_file_name, and dir_prefix.
6444 * src/getargs.c (getargs): Don't store read-only data in variables that
6445 will be freed.
6446 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6447 (which previously existed but was unused), and quotearg_free.
6448 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6449 * src/muscle_tab.c: Likewise.
6450 (muscle_entry): Make the value char const *,
6451 and add a new storage member that is char * and can be freed.
6452 (muscle_entry_free): New private function.
6453 (muscle_init): Use it instead of free.
6454 (muscle_insert, muscle_grow): Update and use new storage member.
6455 (muscle_code_grow): Free the string passed to muscle_grow
6456 since it's not needed anymore.
6457 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6458 add a new `char *code' member.
6459 ("{...}"): Declare semantic type as code.
6460 * src/scan-code.h (translate_rule_action):
6461 (translate_symbol_action, translate_code, translate_action): Return
6462 `char const *' rather than `char *' since external code should not free
6463 these strings.
6464 * src/scan-code.l: Likewise.
6465 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6466 which is "{...}" in the parser.
6467 * tests/Makefile.am (maintainer-check-valgrind): Set
6468 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6469 Valgrind.
6470 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6471 complain.
6472 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6473 expecting a non-zero exit status sets --leak-check=summary and
6474 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6475 this case, and we don't want to hear about it.
6476
6477 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6478
6479 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6480 instead of from the template, to simplify configuration a bit.
6481 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6482 and m4/wint_t.m4, as they are needed with the latest gnulib.
6483
6484 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6485
6486 Disable unset/unused mid-rule value warnings by default, and recognize
6487 --warnings=midrule-values to enable them. Discussed starting at
6488 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6489 * NEWS (2.3a+): Mention.
6490 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6491 warnings): Add entry for midrule-values subargument.
6492 * src/reader.c (symbol_should_be_used): Don't return true just because
6493 the value is a set/used mid-rule value unless
6494 --warnings=midrule-values was specified.
6495 * tests/input.at (Unused values, Unused values before symbol
6496 declarations): Run tests with and without --warnings=midrule-values.
6497
6498 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6499 than LIST_FREE directly.
6500
6501 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6502
6503 Finish implementing --warnings=error, which should not be implied by
6504 --warnings=all (or by its synonyms -W and --warnings without
6505 subarguments).
6506 * src/complain.c (set_warning_issued): New function to report that
6507 warnings are being treated as errors and to record an error if so.
6508 Invoke...
6509 (warn_at, warn): ... here.
6510 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6511 "error - warnings are errors" does not appear above "all - all of the
6512 above".
6513 (getargs): For -W and --warnings without subarguments, don't let
6514 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6515 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6516
6517 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6518
6519 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6520 empty subargument list. For example: `bison --warnings= parser.y'.
6521
6522 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6523
6524 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6525 the parser header file so that gcc doesn't warn.
6526
6527 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6528
6529 Split the default %destructor/%printer into two kinds: <*> and <!>.
6530 Discussed starting at
6531 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6532 * NEWS (2.3a+): Mention.
6533 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6534 previous change today related to mid-rules.
6535 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6536 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6537 (TYPE_TAG_ANY): Add as <*>.
6538 (TYPE_TAG_NONE): Add as <!>.
6539 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6540 for <*> and <!>.
6541 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6542 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6543 * src/symlist.c (symbol_list_default_new): Split into tagged and
6544 tagless versions.
6545 (symbol_list_destructor_set, symbol_list_printer_set): Split
6546 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6547 SYMLIST_DEFAULT_TAGLESS.
6548 * src/symlist.h: Update symbol_list_default*_new prototypes.
6549 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6550 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6551 * src/symtab.c (default_destructor, default_destructor_location,
6552 default_printer, default_printer_location): Split each into tagged and
6553 tagless versions.
6554 (symbol_destructor_get, symbol_destructor_location_get,
6555 symbol_printer_get, symbol_printer_location_get): Implement tagged
6556 default and tagless default cases.
6557 (default_destructor_set, default_printer_set): Split each into tagged
6558 and tagless versions.
6559 * src/symtab.h: Update prototypes.
6560 * tests/actions.at (Default %printer and %destructor): Rename to...
6561 (Default tagless %printer and %destructor): ... this, and extend.
6562 (Per-type %printer and %destructor): Rename to...
6563 (Default tagged and per-type %printer and %destructor): ... this, and
6564 extend.
6565 (Default %printer and %destructor for user-defined end token): Extend.
6566 (Default %printer and %destructor are not for error or $undefined):
6567 Update.
6568 (Default %printer and %destructor are not for $accept): Update.
6569 (Default %printer and %destructor for mid-rule values): Extend.
6570 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6571 (Unused values with default %destructor): Extend.
6572
6573 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6574
6575 Don't apply the default %destructor/%printer to an unreferenced midrule
6576 value. Mentioned at
6577 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6578 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6579 like $@n instead of just @n so that the default %destructor/%printer
6580 logic doesn't see them as user-defined symbols.
6581 (symbol_is_dummy): Check for both forms of the name.
6582 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6583 name for which the midrule value is referenced in any action.
6584 * tests/actions.at (Default %printer and %destructor for mid-rule
6585 values): New test.
6586 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6587 for change to dummy symbol names.
6588
6589 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6590
6591 Warn about unset midrule $$ if the corresponding $n is used.
6592 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6593 $n usage.
6594 (packgram): Before invoking grammar_rule_check on any rule, make sure
6595 all actions have already been scanned in order to set `used' flags.
6596 Otherwise, checking that a midrule's $$ is set will not always work
6597 properly because the midrule check must forward-reference the midrule's
6598 parent rule.
6599 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6600 warning.
6601
6602 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6603
6604 More improvements to the documentation of the prologue alternatives:
6605 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6606 Bison manual.
6607 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6608 some text to clarify the relative importance of the new directives and
6609 to show how these directives may be viewed as code labels.
6610
6611 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6612
6613 Similar to the recently removed %before-header, add %code-top as the
6614 alternative to the pre-prologue. Mentioned at
6615 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6616 Also, let the prologue alternatives appear in the grammar section.
6617 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6618 (prologue_declaration): Move the existing prologue alternatives to...
6619 (grammar_declaration): ... here and add %code-top.
6620 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6621
6622 Clean up and extend documentation for the prologue alternatives.
6623 * NEWS (2.3a+): Describe prologue alternatives.
6624 * doc/bison.texinfo (Prologue): Move discussion of prologue
6625 alternatives to...
6626 (Prologue Alternatives): ... this new section, and extend it to discuss
6627 all 4 directives in detail.
6628 (Table of Symbols): Clean up discussion of prologue alternatives and
6629 add %code-top.
6630
6631 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6632
6633 DJGPP specific issues.
6634
6635 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6636 config.bat accordingly.
6637 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6638 * djgpp/config.site: Likewise.
6639
6640 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
6641
6642 Replace %*-header with %provides, %requires, %code. See discussion at
6643 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6644
6645 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6646 (b4_user_start_header): Remove.
6647 * data/glr.c: Use new macros instead of b4_*start_header
6648 and b4_*end_header.
6649 * data/glr.cc: Likewise.
6650 * data/lalr1.cc: Likewise.
6651 * data/push.c: Likewise.
6652 * data/yacc.c: Likewise.
6653
6654 * doc/bison.texinfo: Remove %before-header, rename
6655 %{start,end,after}-header to %requires, %provides, %code.
6656
6657 * src/parse-gram.y: Likewise (also rename token names accordingly).
6658 * src/scan-gram.l: Likewise.
6659 * tests/actions.at: Likewise.
6660
6661 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6662
6663 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6664 Problem reported by Joel E. Denny.
6665
6666 2006-10-14 Jim Meyering <jim@meyering.net>
6667
6668 (Sync from coreutils.)
6669 Work also when the working directory (with e.g. coreutils sources)
6670 is version controlled with git, rather than CVS.
6671 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6672 rather than CVS.
6673 In messages and comments, say e.g., "checked-out sources",
6674 rather than "CVS sources".
6675 (version_controlled_file): New function. Work for git as well as
6676 for CVS. Don't use grep's -q option.
6677 (slurp): Call it here, in place of CVS-specific code.
6678
6679 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6680
6681 Fix testsuite for ./configure --enable-gcc-warnings:
6682 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6683 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6684 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6685 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6686 * test/regression.at (Diagnostic that expects two alternatives):
6687 Likewise.
6688
6689 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6690
6691 * bootstrap.conf (gnulib_modules): Add config-h.
6692 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6693 worry about HAVE_CONFIG_H.
6694 * lib/abitset.c: Likewise.
6695 * lib/bitset.c: Likewise.
6696 * lib/bitset_stats.c: Likewise.
6697 * lib/bitsetv-print.c: Likewise.
6698 * lib/bitsetv.c: Likewise.
6699 * lib/ebitset.c: Likewise.
6700 * lib/get-errno.c: Likewise.
6701 * lib/lbitset.c: Likewise.
6702 * lib/subpipe.c: Likewise.
6703 * lib/timevar.c: Likewise.
6704 * lib/vbitset.c: Likewise.
6705 * lib/bitset.c: Include "bitset.h" first, to test interface.
6706 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6707 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6708 * lib/bitsetv.c: Include "bitsetv.h" first.
6709 * lib/get-errno.c: Include "get-errno.h" first.
6710 * m4/.cvsignore: Add config-h.m4.
6711 * tests/actions.at (Default %printer and %destructor for ...):
6712 Adjust expected line numbers in output to reflect removal of #if
6713 HAVE_CONFIG_H lines.
6714 * tests/glr-regression.at (Missed %merge type warnings when ...):
6715 Likewise.
6716 * tests/regression.at (Braced code in declaration in rules section):
6717 Likewise.
6718 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6719 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6720 Include <config.h> unconditionally.
6721
6722 * bootstrap: Sync from coreutils, as follows:
6723
6724 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6725
6726 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6727 variable was sometimes used without being initialized. This
6728 messed up the installation of the INSTALL file in some cases.
6729
6730 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6731
6732 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6733 --copy. Inspired by a suggestion from Bruno Haible.
6734
6735 2006-10-03 Jim Meyering <jim@meyering.net>
6736
6737 * bootstrap: Undo last change to this file, since now gnulib-tool
6738 sticks with the automake default in generating dependencies.
6739
6740 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6741
6742 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6743 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6744
6745 * doc/bison.1: Add copyright notice.
6746
6747 * data/glr.c: Don't include <stdarg.h>; not used.
6748
6749 * NEWS: The -g and --graph options now output graphs in Graphviz
6750 DOT format, not VCG format.
6751 * doc/bison.1: Likewise.
6752 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6753 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6754 of this change in
6755 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6756 * TODO: Remove Graphviz entry.
6757 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6758 remove vcg.c, vcg.h, vcg_defaults.h.
6759 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6760 * src/graphviz.c, src/graphviz.h: New files.
6761 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6762 * src/files.h: Make comment more generic.
6763 * src/main.c (main): Likewise.
6764 * src/print_graph.h: Likewise.
6765 * src/getargs.c (usage): Make usage description more generic.
6766 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6767 (static_graph, fgraph): Remove. All uses changed to pass
6768 arguments instead of sharing a static var.
6769 (print_core, print_actions, print_state, print_graph):
6770 Output graphviz format rather than VCG format.
6771 * tests/.cvsignore: Remove *.vcg; add *.dot.
6772 * tests/output.at: Expect *.dot files, not *.vcg files.
6773
6774 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6775 accommodates the 2006-10-08 change.
6776
6777 2006-10-11 Bob Rossi <bob@brasko.net>
6778
6779 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6780 (b4_yyssa, b4_yyerror_range): New macros.
6781 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6782 (yypvarsinit): Remove init of removed fields.
6783 (yypushparse): Remove use of removed fields; use new macros instead.
6784
6785 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6786
6787 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6788 in a push parser. Reindent slightly to match yacc.c better.
6789
6790 2006-10-11 Bob Rossi <bob@brasko.net>
6791
6792 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6793 yymsg_alloc fields.
6794 (yypvarsinit, yypushparse): Remove init of removed fields.
6795 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6796
6797 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6798
6799 * THANKS: Add Paolo Bonzini and Bob Rossi.
6800
6801 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6802
6803 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6804 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6805 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6806 b4_define_user_cde and uses): Remove.
6807 (b4_comment, b4_prefix, b4_sync_start): New.
6808 * data/bison.m4: New file, with most of the content removed from c.m4.
6809 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6810 * src/output.c (output_skeleton): Pass bison.m4.
6811 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6812 only if specified.
6813
6814 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6815
6816 Fix test failure reported by Tom Lane in
6817 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6818 and try to make such failures easier to catch in the future.
6819 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6820 that's now the caller's responsibility.
6821 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6822 Set yychar = YYEOF if it's negative.
6823 * tests/actions.at (yylex): Abort if asked to read past EOF.
6824 * tests/conflicts.at (yylex): Likewise.
6825 * tests/cxx-type.at (yylex): Likewise.
6826 * tests/glr-regression.at (yylex): Likewise.
6827 * tests/input.at (yylex): Likewise.
6828 * tests/regression.at (yylex): Likewise.
6829 * tests/torture.at (yylex): Likewise.
6830
6831 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6832
6833 Fix problems with translating English-language diagnostics.
6834 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6835 respect to bison-runtime pot generation. The YY_ stuff
6836 wasn't being captured.
6837 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6838 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6839 * runtime-po/POTFILES.in: Add data/push.c.
6840
6841 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6842
6843 Merge bootstrap changes from coreutils.
6844
6845 2006-09-28 Jim Meyering <jim@meyering.net>
6846
6847 Automatically generated dependencies are important even
6848 when all of the sources in a directory come from gnulib.
6849 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6850 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6851
6852 2006-09-23 Jim Meyering <jim@meyering.net>
6853
6854 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6855
6856 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6857
6858 * bootstrap: Add support for --force.
6859 (usage): New function. Describe usage less tersely.
6860 (CVS_only_file): New var.
6861
6862 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6863
6864 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6865 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6866 Adjust white space and comments to match GNU style better.
6867
6868 2006-09-20 Bob Rossi <bob@brasko.net>
6869
6870 * data/push.c (yyresult_get): Remove function.
6871 (YYPUSH_MORE): Add #define.
6872 (yypushparse): Modify return value.
6873
6874 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6875
6876 * stamp-h.in: Remove; no longer needed.
6877 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6878 Remove config.h, config.hin, intl (no longer created).
6879 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6880 stamp-h1.
6881
6882 Sync bootstrap from coreutils, as follows:
6883
6884 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6885
6886 * bootstrap (symlink_to_gnulib): New function.
6887 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6888 to copies-of-gnulib.
6889 (cp_mark_as_generated, slurp, gnulib_files):
6890 Avoid making a copy if it's the same as the old version.
6891 (gnulib_files): Add support for this variable (used by Bison).
6892
6893 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6894
6895 * src/getargs.c (usage): Rework to use conventions similar to
6896 coreutils, to make translation a bit easier and the code a bit
6897 smaller. Problem reported by Tim Van Holder.
6898
6899 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6900
6901 Use some of gnulib's new modules, taken from coreutils.
6902
6903 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6904 * bootstrap.conf: New file.
6905 (gnulib_modules): Add configmake, inttypes, unistd.
6906 (XGETTEXT_OPTIONS): Add complain, complain_at,
6907 fatal, fatal_at, warn, warn_at, unexpected_end.
6908 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6909 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6910 (gl_EARLY): Add.
6911 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6912 (gl_INIT): Add
6913 (GNULIB_AUTOCONF_SNIPPET): Remove.
6914 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6915 the pickiest.
6916 * lib/.cvsignore: Add inttypes_.h.
6917 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6918 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6919 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6920 no-longer-necessary initializations.
6921 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6922 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6923 use the unistd module.
6924 * src/system.h: Likewise.
6925 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6926 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6927 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6928 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6929 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6930 * src/system.h: Include inttypes.h unconditionally, now that we
6931 use the inttypes module. Don't bother to include stdint.h, since
6932 inttypes.h now does that for us.
6933 (LOCALEDIR): Remove, now that we use the configmake module.
6934 * src/getargs.c: Include configmake.h.
6935 * src/main.c: Likewise.
6936 * src/output.c: Likewise.
6937 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6938 not from $abs_top_builddir, since config.h moved.
6939
6940
6941 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6942 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6943
6944 * src/parse-gram.y (symbol_declaration): Don't put statements
6945 before declarations; it's not portable to C89.
6946 * src/scan-code.l (handle_action_at): Likewise.
6947
6948 * src/scan-code.l: Always initialize braces_level; the old code
6949 left it uninitialized and therefore had undefined behavior.
6950
6951 Don't attempt to redefine 'assert', since it runs afoul of
6952 systems where standard headers (mistakenly) include <assert.h>.
6953 Instead, define and use our own alternative, called 'aver'.
6954 * src/reader.c: Don't include assert.h, since we no longer
6955 use assert.
6956 * src/scan-code.l: Likewise.
6957 * src/system.h (assert): Remove, replacing with....
6958 (aver): New function, taking a bool arg. All uses changed.
6959 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6960 not merely an integer.
6961
6962 2006-09-15 Bob Rossi <bob@brasko.net>
6963
6964 Add support for push parsing. Based on the original work of
6965 Odd Arild Olsen <oao@fibula.no>.
6966 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6967 * data/c.m4 (YYPUSH): New.
6968 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6969 * data/push.c: New file.
6970 * src/getargs.c (push_parser): New var.
6971 * src/getargs.h (push_parser): New declaration.
6972 * src/output.c (prepare): Add macro insertion of `push_flag'.
6973 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6974 (prologue_declaration): Parse %push-parser.
6975 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6976 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6977 list of removed lines from the traces observed.
6978 (AT_CHECK_CALC_LALR): Added push parser tests.
6979
6980 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6981
6982 * NEWS: Version 2.3a.
6983 * configure.ac (AC_INIT): Likewise.
6984
6985 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6986 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6987 due to header ordering dependencies. I don't know why the #define
6988 was there.
6989
6990 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6991 runtime cost when YYDEBUG is not defined, and so that some tests
6992 that used to fail now work. Problem and initial suggestion by
6993 Paolo Bonzini.
6994 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6995 * data/glr.cc (b4_parser_class_name):
6996 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6997 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6998 (yydebug_) [YYDEBUG]: New member.
6999 (yycdebug_): Now defined only if YYDEBUG.
7000 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
7001 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
7002 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
7003 if YYYDEBUG.
7004 (debug_stream, set_debug_stream, debug_level, set_debug_level):
7005 Define only if YYDEBUG.
7006 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
7007 set_debug_level.
7008 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
7009 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
7010 AT_CHECK_CALC_GLR_CC that are working now.
7011
7012 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
7013
7014 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
7015 We don't need them in glr.cc, and glr.c defines them.
7016 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
7017 assumes that defining it to anything is the same as defining
7018 it to 1. Problem reported by Paolo Bonzini.
7019
7020 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
7021
7022 * data/c.m4 (b4_null, b4_case): Define.
7023 * src/output.c (prepare_symbols): Use b4_null.
7024 (user_actions_output): Use b4_case.
7025
7026 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
7027
7028 * data/glr.c (b4_shared_declarations): Put start-header first,
7029 before any #includes that we generate, so that feature-test
7030 macros work. Problem reported by Michael Deutschmann in
7031 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
7032 * data/lalr1.cc: Likewise.
7033 * doc/bison.texinfo (Prologue): Document that feature-test macros
7034 should be defined before any Bison declarations.
7035 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
7036 that depend on location.hh after, not before, Bison decls, since
7037 we now include location.hh after the first user prologue.
7038
7039 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
7040 Sander Brandenburg in
7041 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
7042 Also, fix minor white space and comment issues.
7043 (Prologue): Mention that it's better to define feature-test macros
7044 before Bison declarations. Problem reported by Michael Deutschmann.
7045
7046 * README-cvs: Fix typo: "&" should be "&&". Problem reported
7047 by Jim Meyering.
7048 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
7049 This adjusts to recent gnulib changes.
7050
7051 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7052
7053 Finish implementation of per-type %destructor/%printer. Discussed
7054 starting at
7055 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
7056 and
7057 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
7058 * NEWS (2.3+): Add a description of this feature to the default
7059 %destructor/%printer description.
7060 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
7061 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7062 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
7063 list node contains a semantic type.
7064 * src/symtab.c, src/symtab.h: Extend with a table that associates
7065 semantic types with their %destructor's and %printer's.
7066 (semantic_type_from_uniqstr, semantic_type_get,
7067 semantic_type_destructor_set, semantic_type_printer_set): New functions
7068 composing the public interface of that table.
7069 (symbol_destructor_get, symbol_destructor_location_get,
7070 symbol_printer_get, symbol_printer_location_get): If there's no
7071 per-symbol %destructor/%printer, look up the per-type before trying
7072 the default.
7073 * tests/actions.at (Per-type %printer and %destructor): New test case.
7074 * tests/input.at (Default %printer and %destructor redeclared):
7075 Extend to check that multiple occurrences of %symbol-default in a
7076 single %destructor/%printer declaration is an error.
7077 (Per-type %printer and %destructor redeclared, Unused values with
7078 per-type %destructor): New test cases.
7079
7080 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7081
7082 Require default %destructor/%printer to be declared using
7083 %symbol-default instead of an empty symbol list, and start working on
7084 new per-type %destructor/%printer. Discussed at
7085 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7086 * NEWS (2.3+): Add %symbol-default to example.
7087 * bison.texinfo (Freeing Discarded Symbols): Likewise.
7088 (Table of Symbols): Add entry for %symbol-default.
7089 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7090 (generic_symlist, generic_symlist_item): New nonterminals for creating
7091 a list in which each item is a symbol, semantic type, or
7092 %symbol-default.
7093 (grammar_declaration): Use generic_symlist in %destructor and %printer
7094 declarations instead of symbols.1 or an empty list.
7095 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7096 for changes to symbol_list.
7097 * src/reader.c: Update for changes to symbol_list.
7098 * src/scan-code.l: Likewise.
7099 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7100 * src/symlist.c, src/symlist.h: Extend such that a list node may
7101 represent a semantic type or a %symbol-default in addition to just an
7102 ordinary symbol. Add switched functions for setting %destructor's and
7103 %printer's.
7104 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7105 %destructor/%printer declarations.
7106
7107 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7108
7109 Whether the default %destructor/%printer applies to a particular symbol
7110 isn't a question of whether the user *declares* that symbol (in %token,
7111 for example). It's a question of whether the user by any means
7112 *defines* the symbol at all (by simply using a char token, for
7113 example). $end is defined by Bison whereas any other token with token
7114 number 0 is defined by the user. The error token is always defined by
7115 Bison regardless of whether the user declares it with %token, but we
7116 may one day let the user define error as a nonterminal instead.
7117 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7118 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7119 the meaning of "user-defined".
7120 * tests/actions.at (Default %printer and %destructor for user-declared
7121 end token): Rename to...
7122 (Default %printer and %destructor for user-defined end token): ...
7123 this.
7124
7125 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7126 computation of whether to apply the default, don't maintain a list of
7127 every Bison-defined symbol. Instead, just check for a first character
7128 of '$', which a user symbol cannot have, and check for the error token.
7129
7130 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7131
7132 Don't apply the default %destructor or %printer to the error token,
7133 $undefined, or $accept. This change fits the general rule that the
7134 default %destructor and %printer are only for user-declared symbols,
7135 and it solves several difficulties that are described in the new test
7136 cases listed below.
7137 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7138 * tests/actions.at (Default %printer and %destructor are not for error
7139 or $undefined, Default %printer and %destructor are not for $accept):
7140 New test cases.
7141
7142 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7143
7144 Allow %start after the first rule.
7145 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7146 when parsing the first rule.
7147 (check_and_convert_grammar): Search for it here after all grammar
7148 declarations have been parsed. Skip midrules, which have dummy LHS
7149 nonterminals.
7150 * src/symtab.c (symbol_is_dummy): New function.
7151 * src/symtab.h (symbol_is_dummy): Declare it.
7152 * tests/input.at (%start after first rule): New test.
7153
7154 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7155
7156 Redo some of the previous commit: add back the ability to use
7157 non-aliased/undeclared string literals since it might be useful to
7158 those declaring %token-table.
7159 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7160 commit: don't worry about complaints from symbols_pack.
7161 * src/symtab.c (symbol_new, symbol_class_set,
7162 symbol_check_alias_consistency): Undo changes in previous commit: count
7163 each string literal as a new symbol and token, assign it a symbol
7164 number, and don't complain about non-aliased string literals.
7165 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7166 and token counts but does still set aliased tokens to the same number,
7167 symbol_pack_processor now leaves empty slots in the symbols array.
7168 Remove those slots.
7169 * tests/regression.at (Undeclared string literal): Remove test case
7170 added in previous commit since non-aliased string literals are allowed
7171 again.
7172 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7173 remove unnecessary string literal declarations.
7174 * tests/sets.at (Firsts): Likewise.
7175
7176 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7177
7178 Don't allow an undeclared string literal, but allow a string literal to
7179 be used before its declaration.
7180 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7181 symbols_pack complained.
7182 * src/symtab.c (symbol_new): Don't count a string literal as a new
7183 symbol.
7184 (symbol_class_set): Don't count a string literal as a new token, and
7185 don't assign it a symbol number since symbol_make_alias does that.
7186 (symbol_make_alias): It's not necessary to decrement the symbol and
7187 token counts anymore. Don't assume that an alias declaration occurs
7188 before any uses of the identifier or string, and thus don't assert that
7189 one of them has the highest symbol number so far.
7190 (symbol_check_alias_consistency): Complain if there's a string literal
7191 that wasn't declared as an alias.
7192 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7193 symbol_pack asserts that every token has been assigned a symbol number
7194 although undeclared string literals have not.
7195 * tests/regression.at (String alias declared after use, Undeclared
7196 string literal): New test cases.
7197 (Characters Escapes, Web2c Actions): Declare string literals as
7198 aliases.
7199 * tests/sets.at (Firsts): Likewise.
7200
7201 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7202
7203 In the grammar scanner, STRING_FINISH unclosed constructs and return
7204 them to the parser in order to improve error messages.
7205 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7206 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7207 * tests/input.at (Unclosed constructs): New test case.
7208 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7209 seen.
7210
7211 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7212 unused global.
7213
7214 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7215
7216 Handle string aliases for character tokens correctly.
7217 * src/symtab.c (symbol_user_token_number_set): If the token has an
7218 alias, check and set its alias's user token number instead of its own,
7219 which is set to indicate the alias. Previously, every occurrence of
7220 the character token in the grammar overwrote that alias indicator with
7221 the character code.
7222 * tests/input.at (String aliases for character tokens): New test.
7223
7224 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7225
7226 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7227
7228 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7229
7230 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7231 to prevent failures when building on older platforms.
7232 Check for autopoint failure.
7233 Set XGETTEXT_OPTIONS to values that check for C format strings,
7234 so that translators are warned about them (this also helps
7235 prevent core dumps).
7236
7237 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7238 function, since it simplifies our code a bit.
7239
7240 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7241 rather than -W, so we don't get bogus warnings about sign comparisons.
7242 Add -Wpointer-arith, since that warning is useful (it reports code
7243 that does not conform to C89 and that some compilers reject).
7244 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7245 since it's no longer needed.
7246
7247 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7248
7249 Clean up scanners a bit.
7250 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7251 definitions so gcc won't warn when obstack_for_string is unused.
7252 * src/scan-code.l: config.h and system.h are already #include'd by
7253 scan-code-c.c, so get rid of them here.
7254 * src/scan-gram.l: Likewise.
7255 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7256 definitions rather than duplicating the rest of it.
7257 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7258
7259 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7260
7261 Suppress signed/unsigned comparison warnings for yycheck.
7262 * data/c.m4 (b4_safest_int_type): New macro.
7263 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7264 a signed int type, cast it to b4_safest_int_type first.
7265 * data/yacc.c: Likewise.
7266 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7267 also overwritten.
7268
7269 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7270
7271 * doc/bison.texinfo: Fix some typos.
7272
7273 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7274
7275 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7276 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7277
7278 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7279 the latest gnulib does this a different way.
7280 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7281 translation was patched, so stop omitting it.
7282
7283 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7284
7285 Enable declaration of default %printer/%destructor. Make the parser
7286 use these for all user-declared grammar symbols for which the user does
7287 not declare a specific %printer/%destructor. Thus, the parser uses it
7288 for token 0 if the user declares it but not if Bison generates it as
7289 $end. Discussed starting at
7290 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7291 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7292 and
7293 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7294 * NEWS (2.3+): Mention.
7295 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7296 declare a %destructor for a mid-rule's semantic value. It's just
7297 impossible to declare one specific to it.
7298 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7299 code. Describe default %destructor form.
7300 * src/parse-gram.y (grammar_declaration): Parse default
7301 %printer/%destructor declarations.
7302 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7303 and symbol_destructor_location_get rather than accessing the destructor
7304 and destructor_location members of struct symbol.
7305 (symbol_printers_output): Likewise but for %printer's.
7306 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7307 again.
7308 * src/symtab.c (default_destructor, default_destructor_location,
7309 default_printer, default_printer_location): New static global
7310 variables to record the default %destructor and %printer.
7311 (symbol_destructor_get, symbol_destructor_location_get,
7312 symbol_printer_get, symbol_printer_location_get): New functions to
7313 compute the appropriate %destructor and %printer for a symbol.
7314 (default_destructor_set, default_printer_set): New functions to set the
7315 default %destructor and %printer.
7316 * src/symtab.h: Prototype all those new functions.
7317 * tests/actions.at (Default %printer and %destructor): New test to
7318 check that the right %printer and %destructor are called, that they're
7319 not called for $end, and that $$ and @$ work correctly.
7320 (Default %printer and %destructor for user-declared end token): New
7321 test to check that the default %printer and %destructor are called for
7322 a user-declared end token.
7323 * tests/input.at (Default %printer and %destructor redeclared, Unused
7324 values with default %destructor): New tests to check related grammar
7325 warnings and errors.
7326
7327 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7328
7329 Clean up handling of %destructor for the end token (token 0).
7330 Discussed starting at
7331 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7332 and
7333 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7334
7335 Make the skeletons consistent in how they pop the end token and invoke
7336 its %destructor.
7337 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7338 state, which has token number 0, since this would invoke the
7339 %destructor for the end token.
7340 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7341 until after shifting the end token, or else it won't be popped.
7342 * data/yacc.c (yyparse): Likewise.
7343
7344 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7345 it's the end token. Upon termination, destroy an unshifted lookahead
7346 even when it's the end token.
7347 * data/lalr1.cc (yy::parser::parse): Likewise.
7348 * data/yacc.c (yyparse): Likewise.
7349
7350 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7351 value warnings for the end token when the user gives the end token a
7352 %destructor.
7353
7354 * tests/actions.at (Printers and Destructors): Test all the above.
7355
7356 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7357
7358 Update to latest gnulib and gettext versions.
7359 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7360 Add fopen-safer.
7361 (gnulib_files): Add m4/warning.m4. Don't worry about files
7362 overwritten by autopoint.
7363 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7364 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7365 rejects them.
7366 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7367 so that we can remove the intl files at a better time.
7368 (intl_files_to_remove): Remove aclocal.m4, since it gets
7369 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7370 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7371 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7372 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7373 Remove datarootdir hack; no longer needed.
7374 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7375 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7376 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7377 strdup.h.
7378 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7379 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7380
7381 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7382
7383 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7384 it with --assume-autoconf='latest-stable'.
7385
7386 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7387
7388 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7389 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7390 YYSTYPE' and `{'.
7391 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7392 those from muscle_tab.c since the old ones are misleading.
7393
7394 2006-07-13 Akim Demaille <akim@epita.fr>
7395
7396 Support %define "KEY" {VALUE}.
7397 * src/scan-code.h, src/scan-code.l (translate_action)
7398 (translate_rule_action, translate_symbol_action, translate_code):
7399 Return char *, not const char *.
7400 * src/parse-gram.y (declaration): Rename as...
7401 (prologue_declaration): this.
7402 (string_content): Remove this nonterminal, use STRING.
7403 (braceless, content, content.opt): New nonterminal.
7404 Use them.
7405 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7406 as value.
7407 * src/scan-gram.l (getargs.h): Don't include it.
7408
7409 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7410
7411 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7412 rather than a for-loop that declares a local bool variable. This
7413 should work around a compatibility problem with a Cray x1e C++
7414 compiler reported by Hung Nguyen in
7415 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7416 The for-loop was introduced in the 2004-11-17 change but I don't
7417 know why it was needed.
7418
7419 2006-07-12 Akim Demaille <akim@epita.fr>
7420
7421 * data/c.m4: Comment changes.
7422
7423 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
7424
7425 * src/complain.c (error_message, ERROR_MESSAGE): New.
7426 To factor...
7427 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7428 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7429
7430 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7431
7432 * NEWS: Instead of %union, you can define and use your own union type
7433 YYSTYPE if your grammar contains at least one <type> tag.
7434 Your YYSTYPE need not be a macro; it can be a typedef.
7435 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7436 (Union Decl, Decl Summary): Document this.
7437 * data/glr.c (YYSTYPE): Implement this.
7438 * data/glr.cc (YYSTYPE): Likewise.
7439 * data/lalr1.cc (YYSTYPE): Likewise.
7440 * data/yacc.c (YYSTYPE): Likewise.
7441 * src/output.c (prepare): Output tag_seen_flag.
7442 * src/parse-gram.y (declaration, grammar_declaration):
7443 Use 'union_seen' rather than 'typed' to determine whether
7444 %union has been seen, since grammars can now be typed without
7445 %union.
7446 (symbol_declaration, type.opt, symbol_def):
7447 Keep track of whether a tag has been seen.
7448 * src/reader.c (union_seen, tag_seen): New vars.
7449 (typed): remove.
7450 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7451 * src/scan-code.l (untyped_var_seen): New variable.
7452 (handle_action_dollar): Adjust to above changes.
7453 (handle_action_dollar, handle_action_at):
7454 Improve overflow checking for outlandish numbers.
7455 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7456 avoid new diagnostics generated by above changes.
7457 * tests/regression.at (YYSTYPE typedef): Add test to check
7458 for type tags without %union.
7459
7460 * src/symlist.c (symbol_list_length): Return int, not unsigned
7461 int, since callers expect int. This may need to get revisited
7462 once we have proper integer overflow checking.
7463
7464 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7465 object is now static.
7466
7467 * src/getargs.c (flags_argmatch): Return void, not int,
7468 to pacify ./configure --enable-gcc-warnings.
7469
7470 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7471 since last_string is already defined to FLEX_PREFIX (last_string).
7472
7473 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7474
7475 Implement --warnings/-W.
7476 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7477 replaced by...
7478 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7479 Adjust callers.
7480 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7481 (warnings_args, warnings_types): New.
7482 (getargs, short_options, long_options): Accept -W/--warnings.
7483 Sort the options by alphabetical order, upper case letter right
7484 before its lower case.
7485
7486 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7487
7488 Change %merge result type clash warnings to errors. Discussed at
7489 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7490 * src/reader.c (record_merge_function_type): Use complain_at.
7491 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7492 declared later): Update test case results.
7493
7494 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7495
7496 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7497 to be in alphabetical order.
7498 (trace_args): Spelling fixes.
7499
7500 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7501
7502 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7503 so they don't collide with user-defined macros.
7504 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7505 this was never guaranteed, and now that we're using gnulib stdint,
7506 which defines int_fast16_t to long int, the problem is exposed.
7507
7508 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7509
7510 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7511 need the full POSIX semantics (and weren't implementing them
7512 anyway).
7513
7514 Adjust to Autoconf 2.60 and today's gnulib.
7515 * bootstrap (gnulib_modules): Add stdint.
7516 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7517 no longer copies it.
7518 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7519 since stdint needs the former and wcwidth (which is now required
7520 by mbswidth) needs the latter.
7521 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7522 work around a compatibility glitch between gettext 0.14.6 and
7523 Autoconf 2.60.
7524 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7525 Do not check for uintptr_t, since new stdint module does the right
7526 thing.
7527 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7528 Add stdint.h, stdint_.h, wcwidth.h.
7529 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7530 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7531 stdint.m4, wchar_t.m4, wcwidth.m4.
7532 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7533 usual order for ../lib/*.h files.
7534 (file_name_split): Use last_component, not base_name, to adjust
7535 to gnulib changes.
7536 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7537 for ../lib/*.h files.
7538 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7539 Define unconditionally, since we now assume the stdint module.
7540 * src/scan-skel.l: Include <dirname.h>.
7541 (BASE_QPUTS): Use last_component, not base_name.
7542 * src/system.h: Include <unlocked-io.h> in the usual order
7543 for ../lib/*.h files. Include <stdint.h> unconditionally,
7544 since we now use the stdint module.
7545 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7546 HAVE_UINTPTR_T, since we now use the stdint module.
7547 (base_name): Remove decl, since files now include <dirname.h>
7548 to get the decl.
7549
7550 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7551
7552 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7553 New, default to 1.
7554 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7555 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7556 default.
7557 * tests/calc.at: Adjust.
7558
7559 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7560
7561 * data/c.m4 (b4_basename): New.
7562 (b4_syncline): Also output the location of its invocation (from
7563 the skeleton).
7564 (b4_user_action, b4_define_user_action, b4_user_actions)
7565 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7566 (b4_user_stype): New.
7567 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7568
7569 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7570
7571 In the grammar file, the first column is 1 not 0 on the first line as
7572 on every other line.
7573 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7574 * tests/input.at (Torturing the Scanner): Update output.
7575
7576 * src/scan-gram.l (scanner_cursor): Declare it static.
7577
7578 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7579
7580 In warnings, say "previous declaration" rather than "first
7581 declaration".
7582 * src/symtab.c (redeclaration): Do that here.
7583 * src/reader.c (record_merge_function_type): In the case of a result
7584 type clash, report the previous declaration rather than the very first
7585 one in the grammar file.
7586 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7587 declared later): Add a third declaration to check this behavior.
7588 * tests/input.at (Incompatible Aliases): Update output.
7589
7590 2006-06-27 Akim Demaille <akim@epita.fr>
7591
7592 * doc/Doxyfile.in: New.
7593 * doc/Makefile.am: Use it.
7594 * src/lalr.h, src/symtab.h: Initial doxygenation.
7595
7596 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7597
7598 Don't miss %merge result type warnings just because the LHS types are
7599 declared after the %merge. This continues the effort of the previous
7600 patch.
7601 * src/reader.c (get_merge_function): Don't set the merger type yet.
7602 (record_merge_function_type): New function for setting the merger type
7603 and checking for clashes.
7604 (grammar_current_rule_merge_set): Set the location of the %merge for
7605 the current rule.
7606 (packgram): Invoke record_merge_function_type for each rule now that
7607 all symbol type declarations have been parsed.
7608 * src/reader.h (merger_list.type_declaration_location): New member
7609 storing the location of the first %merge from which the type for this
7610 merging function was derived.
7611 * src/symlist.h (symbol_list.merger_declaration_location): New member
7612 storing the location of a rule's %merge, if any.
7613 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7614 declared later): New test to catch the error fixed by the above patch.
7615
7616 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7617
7618 Get action warnings (grammar_rule_check) right even when symbol
7619 declarations appear after the rules. Discussed at
7620 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7621 and
7622 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7623 Don't mistake the type of $$ in a midrule to be that of its parent
7624 rule's $$.
7625 * src/reader.c (grammar_current_rule_end): Don't invoke
7626 grammar_rule_check yet since not all symbol declarations may have been
7627 parsed yet.
7628 (grammar_midrule_action): Likewise.
7629 Don't record whether the midrule's $$ has been used yet since actions
7630 haven't been translated yet.
7631 Record the midrule's parent rule and its RHS index within the parent
7632 rule.
7633 (grammar_current_rule_action_append): Don't translate the action yet
7634 since not all symbol declarations may have been parsed yet and, thus,
7635 warnings about types for $$, $n, @$, and @n can't be reported yet.
7636 (packgram): Translate the action and invoke grammar_rule_check now that
7637 all symbol declarations have been parsed.
7638 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7639 after parsing the entire grammar file, the symbol list here in the case
7640 of a midrule is actually the midrule's empty RHS, so reference its
7641 parent rule's RHS where necessary.
7642 On the other hand, now that you can already know it's a midrule, you
7643 aren't forced to think $$ has the same type as its parent rule's $$.
7644 (handle_action_at): In the case of a midrule, reference the parent rule
7645 where necessary.
7646 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7647 members.
7648 (symbol_list_length): Now that this is invoked after all rules have
7649 been parsed, a NULL symbol (rather than a NULL symbol list node)
7650 terminates a rule. symbol_list_print already does this correctly.
7651 * src/symlist.h (symbol_list.midrule_parent_rule,
7652 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7653 remember their relationships with their parents.
7654 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7655 fixed by the above patch.
7656 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7657 implementing...
7658 (Unused values): ... this old test case and...
7659 (Unused values before symbol declarations): ... this new test case.
7660 This one is the same as `Unused values' except that all symbol
7661 declarations appear after the rules in order to catch the rest of the
7662 errors fixed by the above patch.
7663
7664 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7665
7666 More cleanup.
7667 * src/reader.c (current_rule): Declare it static since it's no longer
7668 used outside this file.
7669 (grammar_current_rule_action_append): Remove redundant arguments from
7670 translate_rule_action invocation.
7671 * src/reader.h (current_rule): Remove this unused extern.
7672 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7673 * src/scan-code.l (translate_rule_action): Likewise.
7674
7675 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7676
7677 Clean up yesterday's patch.
7678 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7679 to...
7680 * src/reader.c (grammar_current_rule_action_append): ... here for
7681 consistency with grammar_current_rule_symbol_append.
7682 * tests/regression.at (Braced code in declaration in rules section):
7683 Make yyerror and yylex static as usual.
7684
7685 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7686
7687 Fix bug that mistakes braced code in a declaration in the rules section
7688 to be a rule action. Mentioned at
7689 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7690 * src/scan-gram.l: Move midrule action detection from the start of the
7691 scanning of any braced code to...
7692 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7693 action. For readability, use $2 and @2 rather than the equivalent
7694 global variables.
7695 * tests/regression.at (Braced code in declaration in rules section):
7696 New test to catch the error fixed by the above patch.
7697
7698 Work on code readability some.
7699 * src/scan-code.l (current_rule): Get rid of this misleading and
7700 redundant declaration: it's actually extern'ed in reader.h.
7701 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7702 translate_action): Add a rule argument and use it instead of the global
7703 current_rule.
7704 (translate_rule_action): This already receives current_rule through an
7705 argument, so pass it on to translate_action instead of assigning
7706 current_rule to current_rule.
7707 (translate_symbol_action, translate_code): Pass rule = NULL to
7708 translate_action.
7709
7710 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7711
7712 Rename %before-definitions to %start-header and %after-definitions to
7713 %end-header. Don't use these declarations to separate pre-prologue
7714 blocks from post-prologue blocks. Add new order-independent
7715 declarations %before-header and %after-header as alternatives to the
7716 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7717 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7718 * NEWS (2.3+): Update for these changes.
7719 * data/glr.c (b4_before_definitions): Update to...
7720 (b4_start_header): ... this.
7721 (b4_after_definitions): Update to...
7722 (b4_end_header): ... this.
7723 * data/glr.cc: Likewise.
7724 * data/lalr1.cc: Likewise.
7725 * data/yacc.c: Likewise.
7726 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7727 prologue blocks with %*-header declarations.
7728 (Calc++ Parser): Likewise.
7729 (Decl Summary): Update names.
7730 (Table of Symbols): Update description.
7731 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7732 (PERCENT_END_HEADER): ... this.
7733 (PERCENT_BEFORE_DEFINITIONS): Update to...
7734 (PERCENT_START_HEADER): ... this.
7735 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7736 (declaration): Update token names and m4 macro names.
7737 When parsing %end-header and %start-header, invoke translate_code
7738 before muscle_code_grow, and no longer set global booleans to remember
7739 whether these declarations have been seen.
7740 Parse new %after-header and %before-header.
7741 * src/reader.c (before_definitions, after_definitions): Remove.
7742 (prologue_augment): Accept a new bool argument to specify whether to
7743 augment the pre-prologue or post-prologue.
7744 * src/reader.h (before_definitions, after_definitions): Remove these
7745 extern's.
7746 (prologue_augment): Add new bool argument.
7747 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7748 (PERCENT_END_HEADER): ... this.
7749 (PERCENT_BEFORE_DEFINITIONS): Update to...
7750 (PERCENT_START_HEADER): ... this.
7751 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7752 * tests/actions.at (Printers and Destructors): Update names.
7753
7754 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7755
7756 Add comparison operators for C++ location classes. Discussed at
7757 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7758 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7759 declaration indicating whether filename_type has an operator==. If
7760 filename_type is `std::string', it defaults to `1', `0' otherwise.
7761 * data/location.cc: Iff b4_define_location_comparison is `1', add
7762 operator== and operator!= for class position and for class location.
7763
7764 Some minor fixes.
7765 * src/scan-action.l: Remove unused file.
7766 * src/symtab.c (symbol_printer_set): Use printer_location not
7767 destructor_location.
7768 * src/symtab.h (struct symbol): Replace incorrect source comment for
7769 printer members.
7770 * tests/input.at (Incompatible Aliases): Update output with correct
7771 printer location.
7772
7773 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7774
7775 Don't put the pre-prologue in the header file. For the yacc.c code
7776 file and the glr.c header and code files, move the pre-prologue before
7777 the token definitions. Add new %before-definitions and
7778 %after-definitions to declare code that will go in both the header file
7779 and code file. Discussed at
7780 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7781 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7782 and
7783 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7784 * NEWS (2.3+): Describe these changes.
7785 * data/glr.c (b4_pre_prologue): Move from within to before...
7786 (b4_shared_declarations): ... this.
7787 Add new b4_before_definitions before b4_token_enums.
7788 Add new b4_after_definitions at the end.
7789 * data/glr.cc (b4_pre_prologue): Replace with...
7790 (b4_before_definitions): ... this in the header file.
7791 (b4_after_definitions): New near the end of the header file.
7792 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7793 code file right before including the header file.
7794 (b4_before_definitions): New in the previous position of
7795 b4_pre_prologue in the header file.
7796 (b4_after_definitions): New near the end of the header file.
7797 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7798 (b4_token_enums_defines): In the code file, move to right before
7799 YYSTYPE for consistency with the header file.
7800 (b4_before_definitions): New right before b4_token_enums_defines in
7801 both the header and code file.
7802 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7803 header and code file.
7804 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7805 of prologues for %union dependencies.
7806 (Decl Summary): In %defines description, mention the effect of
7807 %before-definitions and %after-definitions on the header file.
7808 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7809 than in the pre-prologue so that make check succeeds.
7810 (Table of Symbols): Add entries for %before-definitions and
7811 %after-definitions.
7812 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7813 %before-definitions.
7814 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7815 (declaration): Parse those declarations and append to
7816 b4_before_definitions and b4_after_definitions, respectively.
7817 * src/reader.c (before_definitions, after_definitions): New bools to
7818 track whether those declarations have been seen.
7819 (prologue_augment): Add to the post-prologue if %union,
7820 %before-definitions, or %after-definitions has been seen.
7821 * src/reader.h (before_definitions, after_definitions): New extern's.
7822 * src/scan-gram.l: Scan the new declarations.
7823 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7824 prologue block in a %before-definitions or a %after-definitions based
7825 on whether the %union is declared.
7826 * tests/regression.at (Early token definitions with --yacc, Early token
7827 definitions without --yacc): Move tests for token definitions into the
7828 post-prologue since token names are no longer defined in the
7829 pre-prologue.
7830
7831 2006-06-20 Akim Demaille <akim@epita.fr>
7832
7833 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7834 (symbol_get): Use it.
7835 * src/parse-gram.y: Use it.
7836
7837 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7838
7839 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7840 build succeeds when configured with --enable-gcc-warnings.
7841
7842 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7843
7844 * src/parse-gram.y (char_name): New function.
7845 (CHAR, STRING, string_content): For %printer, properly escape.
7846 (ID): Prefer fputs to fprintf.
7847 (id): Reindent to be consistent with other rules.
7848 Properly quote char.
7849
7850 The Translation Project changed its way of publishing translations
7851 to maintainers. I haven't received any responses to my request
7852 for supporting the old way, or for documenting the new way. I
7853 have modified 'bootstrap' to use screen scraping
7854 (in this case, HTML scraping). This is unreliable and inelegant,
7855 but I don't see any better way. Yuck.
7856 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7857 (get_translations): New function, which uses HTML scraping to
7858 deduce locations of latest translations.
7859 Use this function to grab both bison and bison-runtime .po files.
7860 Don't bother priming the pump for the runtime-po domain any more,
7861 as it's now translated better than bison is.
7862
7863 2006-06-19 Akim Demaille <akim@epita.fr>
7864
7865 * src/scan-gram.l: No longer "parse" things after `%union' until
7866 `{'. Rather, return a single "%union" token.
7867 No longer make symbols: return strings, and leave the conversion
7868 to symbols to the parser.
7869 (SC_PRE_CODE, token_type): Remove.
7870 * src/parse-gram.y (%union): New field `character'.
7871 Sort tokens.
7872 (CHAR): New token.
7873 (ID, ID_COLON): Now that the scanner no longer makes them
7874 identifiers, adjust all uses to invoke symbol_get.
7875 (id_colon): New, wraps the conversion from string to symbol.
7876 (%union): Accept a possible union_name.
7877 (symbol): Now can be a char.
7878 * data/c.m4 (b4_union_name): Leave a default value.
7879 * data/glr.c, data/yacc.c: Use it.
7880
7881 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7882
7883 For associating token numbers with token names for "yacc.c", don't use
7884 #define statements unless `--yacc' is specified; always use enum
7885 yytokentype. Most important discussions start at:
7886 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7887 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7888 and
7889 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7890 * NEWS (2.3+): Mention.
7891 * data/c.m4 (b4_yacc_if): New.
7892 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7893 token #define's.
7894 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7895 on token name definitions.
7896 * src/getargs.c (usage): Capitalize `Yacc' in English.
7897 * src/output.c (prepare): Define b4_yacc_flag.
7898 * tests/regression.at (Early token definitions): Test that tokens names
7899 are defined before the pre-prologue not just before the post-prologue.
7900 Remove this test case and copy to...
7901 (Early token definitions with --yacc): ... this to test #define's.
7902 (Early token definitions without --yacc): ... and this to test enums.
7903
7904 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7905
7906 * NEWS: Reword the post-2.3 change to not be so optimistic about
7907 removing the old "look-ahead" spelling.
7908 Update previous look-ahead/lookahead change reports.
7909 * REFERENCES: look-ahead -> lookahead (since that's
7910 what he actually wrote).
7911 * doc/refcard.tex: look ahead -> lookahead,
7912 look-ahead -> lookahead
7913
7914 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7915
7916 For consistency, use `lookahead' instead of `look-ahead' or
7917 `look_ahead'. Discussed starting at
7918 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7919 and then at
7920 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7921 * NEWS: For the next release, note the change to `--report'.
7922 * TODO, doc/bison.1: Update English.
7923 * doc/bison.texinfo: Update English.
7924 (Understanding Your Parser, Bison Options): Document as
7925 `--report=lookahead' rather than `--report=look-ahead'.
7926 * src/conflicts.c: Update English in comments.
7927 (lookahead_set): Rename from look_ahead_set.
7928 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7929 (resolve_sr_conflict): Rename local look_ahead_tokens to
7930 lookahead_tokens, and update other uses.
7931 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7932 count_rr_conflicts, conflicts_free): Update uses.
7933 * src/getargs.c (report_args): Move "lookahead" before alternate
7934 spellings.
7935 (report_types): Update uses.
7936 (usage): For `--report' usage description, state `lookahead' spelling
7937 rather than `look-ahead'.
7938 * src/getargs.h (report.report_lookahead_tokens): Rename from
7939 report_look_ahead_tokens.
7940 * src/lalr.c: Update English in comments.
7941 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7942 (state_lookahead_tokens_count): Rename from
7943 state_look_ahead_tokens_count.
7944 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7945 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7946 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7947 Update other uses.
7948 Update English in output.
7949 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7950 * src/print.c: Update English in comments.
7951 (lookahead_set): Rename from look_ahead_set.
7952 (print_reduction): Rename argument lookahead_token from
7953 look_ahead_token.
7954 (print_core, state_default_rule, print_reductions, print_results):
7955 Update uses.
7956 * src/print_graph.c: Update English in comments.
7957 (print_core): Update uses.
7958 * src/state.c: Update English in comments.
7959 (reductions_new): Update uses.
7960 (state_rule_lookahead_tokens_print): Rename from
7961 state_rule_look_ahead_tokens_print, and update other uses.
7962 * src/state.h: Update English in comments.
7963 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7964 (state_rule_lookahead_tokens_print): Rename from
7965 state_rule_look_ahead_tokens_print.
7966 * src/tables.c: Update English in comments.
7967 (conflict_row, action_row): Update uses.
7968 * tests/glr-regression.at
7969 (Incorrect lookahead during deterministic GLR,
7970 Incorrect lookahead during nondeterministic GLR): Rename
7971 print_look_ahead to print_lookahead.
7972 * tests/torture.at: Update English in comments.
7973 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7974 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7975 (Many lookahead tokens): Update uses.
7976 * data/glr.c: Update English in comments.
7977 * lalr1.cc: Likewise.
7978 * yacc.c: Likewise.
7979 * src/conflicts.h: Likewise.
7980 * src/lalr.h: Likewise.
7981 * src/main.c: Likewise.
7982 * src/output.c: Likewise.
7983 * src/parse-gram.c: Likewise.
7984 * src/tables.h: Likewise.
7985 * tests/calc.at: Likewise.
7986
7987 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7988
7989 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7990
7991 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7992
7993 * TODO: Add request from Nelson H. F. Beebe to be able to install
7994 Bison without installing the yacc script.
7995
7996 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7997
7998 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7999 and yytext if they're already #define'd.
8000 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
8001 * src/scan-code-c.c: ... here.
8002 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
8003 <config.h>.
8004
8005 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8006
8007 Get Bison to build again when configured with --enable-gcc-warnings.
8008 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
8009 missing #include's.
8010 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
8011 loc argument as it shadows a global.
8012 * src/scan-gram.l: Remove stray comma that prevents boundary_set
8013 invocation.
8014
8015 * src/.cvsignore: Add scan-code.c.
8016
8017 2006-06-07 Akim Demaille <akim@epita.fr>
8018
8019 * src/scan-gram.l: Move the "add a trailing ; to actions" code
8020 to...
8021 * src/scan-code.l: here.
8022 * tests/input.at (Torturing the Scanner): Fix another location
8023 error.
8024
8025 2006-06-07 Akim Demaille <akim@epita.fr>
8026
8027 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
8028
8029 2006-06-06 Akim Demaille <akim@epita.fr>
8030
8031 Extract the parsing of user actions from the grammar scanner.
8032 As a consequence, the relation between the grammar scanner and
8033 parser is much simpler. We can also split "composite tokens" back
8034 into simple tokens.
8035 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
8036 * src/scan-gram.l (add_column_width, adjust_location): Move to and
8037 rename as...
8038 * src/location.h, src/location.c (add_column_width)
8039 (location_compute): these.
8040 Fix the column count: the initial column is 0.
8041 (location_print): Be robust to ending column being 0.
8042 * src/location.h (boundary_set): New.
8043 * src/main.c: Adjust to scanner_free being renamed as
8044 gram_scanner_free.
8045 * src/output.c: Include scan-code.h.
8046 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
8047 Use boundary_set.
8048 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
8049 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
8050 which is now, again, a separate token.
8051 Adjust all dependencies.
8052 Whereever actions with $ and @ are used, use translate_code.
8053 (action): Remove this nonterminal which is now useless.
8054 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
8055 (grammar_current_rule_action_append): Use translate_code.
8056 (packgram): Bound check ruleno, itemno, and rule_length.
8057 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
8058 (last_string, last_braced_code_loc, max_left_semantic_context)
8059 (scanner_initialize, scanner_free, scanner_last_string_free)
8060 (gram_out, gram_lineno, YY_DECL_): Move to...
8061 * src/scan-gram.h: this new file.
8062 (YY_DECL): Rename as...
8063 (GRAM_DECL): this.
8064 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
8065 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8066 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8067 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8068 Move these declarations, and...
8069 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
8070 these to...
8071 * src/flex-scanner.h: this new file.
8072 * src/scan-gram.l (rule_length, rule_length_overflow)
8073 (increment_rule_length): Remove.
8074 (last_braced_code_loc): Rename as...
8075 (gram_last_braced_code_loc): this.
8076 Adjust to the changes of the parser.
8077 Move all the handling of $ and @ into...
8078 * src/scan-code.l: here.
8079 * src/scan-gram.l (handle_dollar, handle_at): Remove.
8080 (handle_action_dollar, handle_action_at): Move to...
8081 * src/scan-code.l: here.
8082 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
8083 scan-code.h, scan-code-c.c, scan-gram.h.
8084 (EXTRA_bison_SOURCES): Add scan-code.l.
8085 (BUILT_SOURCES): Add scan-code.c.
8086 (yacc): Be robust to white spaces.
8087
8088 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8089 * tests/regression.at: Adjust the column numbers.
8090 * tests/regression.at: Adjust the error message.
8091
8092 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8093
8094 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8095 Use Akim's wording from
8096 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8097
8098 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8099
8100 Between Bison releases, manually append `+' to the previous Bison
8101 release number, and use that as a signal to automatically print the
8102 ChangeLog's CVS Id keyword from --version. Discussed starting at
8103 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8104 * ChangeLog: Add Id header.
8105 * configure.ac (AC_INIT): Append `+' to `2.3'.
8106 * src/.cvsignore: Add revision.c.
8107 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8108 (BUILT_SOURCES): Add revision.c.
8109 (revision.c): New target rule. This file defines a new global variable
8110 named revision. It initializes it with either the Id from ChangeLog
8111 or, if VERSION doesn't contain `+', with the empty string.
8112 * src/getargs.c (version): Print the value of revision.
8113 * src/revision.h: Extern revision.
8114
8115 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8116
8117 * NEWS: Version 2.3.
8118 * configure.ac (AC_INIT): Likewise.
8119
8120 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8121
8122 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8123 with no arguments, not as an object-like macro. This is for
8124 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8125 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8126 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8127 Document this.
8128
8129 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8130
8131 * src/getargs.c (usage): Back out yesterday's modification of the
8132 --help output so that we don't have to wait for translation before
8133 releasing 2.3.
8134
8135 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8136
8137 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8138 Problem reported by Akim Demaille.
8139
8140 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8141
8142 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8143
8144 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8145
8146 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8147 generated source code. Problem reported by Frans Englich in
8148 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8149
8150 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8151
8152 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8153 shell, not within 'make', so that 'make' by an ordinary builder
8154 (using GNU make) does not worry about configuring gzip. This also
8155 works around a bug reported independently by Keith Thompson and by
8156 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8157 stderr rather than stdout, messing up the build logs.
8158
8159 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8160
8161 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8162 to make sure that YYID will never be unused. This fixes a 'make
8163 maintainer-check' failure caused by the recent changes to the 'Trivial
8164 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8165 not used.
8166 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8167
8168 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8169
8170 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8171 state before an empty RHS is always resolved here. Only the location
8172 of that state is guaranteed to be resolved, and that's enough. This
8173 fixes the remaining bug reported by Derek M. Jones in
8174 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8175 * tests/glr-regression.at (Uninitialized location when reporting
8176 ambiguity): Test the above case.
8177 Also, the embedded comments in this test case claim it checks the case
8178 of an empty RHS that has inherited the initial location. However, the
8179 corresponding LHS was already resolved, so yyresolveLocations didn't
8180 actually have reason to modify it. Fix this by forcing
8181 nondeterministic operation at the beginning of the parse.
8182
8183 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8184
8185 * data/c.m4 (b4_yy_symbol_print_generate):
8186 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8187 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8188 of the bugs reported today by Derek M Jones in
8189 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8190 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8191 defined to be a type name without parens or brackets.
8192 (Location Type): Similarly for YYLTYPE.
8193 * tests/regression.at (Trivial grammars): Put in a test for this
8194 bug that will be caught by 'make maintainer-check' (though not,
8195 alas, by 'make check' unless your compiler is picky).
8196
8197 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8198
8199 * NEWS: Version 2.2.
8200 * configure.ac (AC_INIT): Likewise.
8201
8202 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8203
8204 * data/glr.c (yyreportTree): Make room in yystates for the state
8205 preceding the RHS. This fixes the segmentation fault reported by Derek
8206 M. Jones in
8207 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8208 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8209 to the user. Reported for yyreportTree by Derek M. Jones later in the
8210 same thread.
8211 * THANKS: Add Derek M. Jones.
8212 Update my email address.
8213 Fix typo in Steve Murphy's name.
8214
8215 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8216
8217 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8218 checking against YYLAST that caused the parser to miss a potential
8219 alternative in its diagnostic.
8220 Problem reported by Maria Jose Moron Fernandez in
8221 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8222 * data/lalr1.cc (yysyntax_error_): Likewise.
8223 * data/yacc.c (yysyntax_error): Likewise.
8224 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8225 tokens, in case we run into an older C compiler.
8226 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8227 Use them to check for the off-by-one error fixed above.
8228
8229 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8230 YYSIZE_T, not size_t.
8231 * tests/regression.at (Trivial grammars): New test, to catch
8232 the error fixed by the above patch.
8233
8234 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8235
8236 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8237 scheme.
8238 Reported by Steve Murphy.
8239
8240 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8241
8242 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8243 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8244
8245 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8246
8247 Implement --trace=m4.
8248 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8249 * src/output.c (output_skeleton): When set, pass -dV to m4.
8250
8251 Factor the handling of flags in m4.
8252 * src/output.c (prepare): Rename the muscle names debug, defines,
8253 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8254 * data/c.m4: Adjust.
8255 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8256 Use b4_define_flag_if to define other b4_FLAG_if macros.
8257 (b4_location_if): As a consequence, rename as...
8258 (b4_locations_if): this, for consistency.
8259 Adjust all the skeletons.
8260
8261 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8262
8263 * etc/bench.pm: Shorten bench names.
8264
8265 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8266
8267 * src/output.h, src/output.c (error_verbose): Move to...
8268 * src/getargs.h, src/getargs.c: here.
8269 Sort the flags.
8270 Adjust dependencies.
8271
8272 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8273
8274 * data/c.m4 (b4_copyright): Put the special exception for Bison
8275 skeletons here, so we don't have to put it in each skeleton. All
8276 uses changed. Suggested by Akim Demaille. Also, wrap the
8277 copyright notice, in case it is longer than 80 columns. Replace
8278 comma by newline after title.
8279
8280 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8281
8282 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8283 incompatibility, not a bug. Mention that it wasn't fixed as of
8284 flex 2.5.33.
8285
8286 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8287
8288 * examples/extexi: Enforce the precedence of concatenation over
8289 >>.
8290 Reported by Tommy Nordgren.
8291
8292 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8293
8294 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8295 with the member "token".
8296 Reported by Martin Nylin.
8297
8298 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8299
8300 * data/glr.c: Switch to Bison 2.2 special-exception language in
8301 the copyright notice. Use more-regular format for titles and
8302 copyright notices.
8303 * data/glr.cc: Likewise.
8304 * data/location.cc: Likewise.
8305 * data/yacc.cc: Likewise.
8306 * doc/bison.texinfo (Conditions): Document this.
8307 * NEWS: likewise. Upgrade version to 2.2.
8308
8309 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
8310
8311 * data/glr.cc: Remove dead code.
8312
8313 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8314
8315 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8316 that variable and the line breaks the bootstrap. Problem reported
8317 by Juan M. Guerrero.
8318
8319 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8320
8321 * doc/bison.texinfo (Multiple start-symbols): New.
8322
8323 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8324
8325 * etc/README, etc/bench.pl: New.
8326
8327 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
8328
8329 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8330 rule.
8331 Reported by Mickael Labau.
8332 * tests/input.at (Torturing the Scanner): Test it.
8333
8334 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8335
8336 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8337 Problem reported by Bob Rossi.
8338
8339 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8340
8341 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8342 and didn't really work.
8343 For the index, use @ifnotinfo, not @iftex.
8344 Minor cleanups of spacing and terminology.
8345
8346 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8347
8348 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8349 of AT_NAME_PREFIX when %name-prefix is not used.
8350
8351 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8352
8353 Apply --prefix to C++ skeletons too: they change the namespace.
8354 The test suite already exercize these cases.
8355 * data/c++.m4 (b4_namespace): New.
8356 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8357 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8358 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8359 * doc/bison.texinfo: Document it.
8360 (Option Cross Key): Use @multitable in all formats. It looks
8361 nicer, even in TeX outputs.
8362 (Rules): Use the same code whatever the output type is.
8363 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8364 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8365 * tests/calc.at: Use it, instead of hard coding `yy'.
8366
8367 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8368
8369 * TODO: Remove dead items.
8370
8371 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8372
8373 * doc/FAQ: Remove, merged into...
8374 * doc/bison.texinfo (FAQ): this.
8375 * doc/Makefile.am (EXTRA_DIST): Adjust.
8376
8377 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8378
8379 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8380 even if empty.
8381 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8382 * doc/bison.texinfo (Calc++ Scanner): Use it.
8383
8384 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8385
8386 Fix two nits reported by twlevo, plus one more that I discovered.
8387
8388 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8389 this is the usual Bison style.
8390 * src/location.h (location_print): Likewise.
8391
8392 * src/reader.h (token_name): Likewise.
8393
8394 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8395
8396 Fix some nits reported by twlevo.
8397 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8398 and "POSIX". Use more-modern syntax for URLs. Mention C++
8399 and ask for Java. Don't hardwire OS version numbers. Add
8400 copyright notice.
8401 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8402 * src/conflicts.c (solved_conflicts_obstack): Now static.
8403
8404 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8405
8406 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8407 page. Say "you can use it" not "you may use it" as on the web page;
8408 we're describing capabilities not granting permission.
8409
8410 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8411
8412 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8413 shadowing warnings. Use usual patter for iterating through RHS.
8414 * tests/glr-regression.at
8415 (Uninitialized location when reporting ambiguity):
8416 Modify yylex so that it uses its argument, rather than trying
8417 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8418 const char -> char const.
8419
8420 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8421 Don't use tabs inside commands; it messes up 'ps'.
8422 Problem reported by twlevo.
8423
8424 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8425
8426 * tests/glr-regression.at (Uninitialized location when reporting
8427 ambiguity): New test case.
8428 * data/glr.c (yyresolveLocations): New function, which uses
8429 YYLLOC_DEFAULT.
8430 (yyresolveValue): Invoke yyresolveLocations before reporting an
8431 ambiguity.
8432 * doc/bison.texinfo (Default Action for Locations): Note
8433 YYLLOC_DEFAULT's usage for ambiguity locations.
8434 (GLR Semantic Actions): Cross-reference those notes.
8435
8436 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8437
8438 * tests/glr-regression.at (Leaked semantic values when reporting
8439 ambiguity): Remove unnecessary union and type declarations.
8440 (Leaked lookahead after nondeterministic parse syntax error): New test
8441 case.
8442 * data/glr.c (yyparse): Check for zero stacks remaining before
8443 attempting to shift the lookahead so that you don't lose it.
8444
8445 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8446
8447 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8448 * tests/glr-regression.at (Leaked semantic values when reporting
8449 ambiguity): New test case.
8450 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8451 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8452 now unnecessary yystackp parameter.
8453 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8454 destructors can be called.
8455
8456 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8457 in existing testcases.
8458
8459 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8460
8461 Don't leak semantic values for parent RHS when a user action cuts the
8462 parser, and clean up related code a bit.
8463 * tests/glr-regression.at (Leaked merged semantic value if user action
8464 cuts parse): Rename to...
8465 (Leaked semantic values if user action cuts parse): ... this. Add check
8466 for leaked parent RHS values.
8467 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8468 between an unresolved state (non-empty chain of semantic options) and
8469 an incomplete one (signaled by an empty chain).
8470 (yyresolveStates): Document the interface. Move all manipulation of a
8471 successfully or unsuccessfully resolved yyGLRState to...
8472 (yyresolveValue): ... here so that yyresolveValue always leaves a
8473 yyGLRState with consistent data and thus is easier to understand.
8474 Remove the yyvalp and yylocp parameters since they are always just
8475 taken from the yys parameter. When reporting a discarded merged value
8476 in debugging output, note that it is incompletely merged. Document the
8477 interface.
8478 (yyresolveAction): If resolving any of the RHS states fails, destroy
8479 them all rather than leaking them. Thus, as long as user actions are
8480 written to clean up the RHS correctly, yyresolveAction always cleans up
8481 the RHS of a semantic option. Document the interface.
8482
8483 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8484
8485 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8486 led to a segmentation fault in GNU Pascal. Problem reported
8487 by Waldek Hebisch.
8488
8489 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8490
8491 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8492 mid-rule action inside a nonterminal symbol in order to declare a
8493 destructor for its semantic value.
8494
8495 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8496
8497 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8498 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8499 __cplusplus && ! defined _STDLIB_H && !
8500 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8501 defined free))]: Include <stdlib.h> rather than rolling our own
8502 declarations of malloc and free, to avoid problems with
8503 incompatible declarations (using 'throw') C++'s stdlib.h. This
8504 should fix Debian bug 340012
8505 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8506 reported by Guillaume Melquiond.
8507
8508 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8509
8510 * NEWS: Clarify symbols versus types in unused-value warnings.
8511
8512 * configure.ac (AC_INIT): Bump version number.
8513
8514 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8515
8516 * NEWS: Version 2.1a.
8517 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8518 since C99 requires this.
8519
8520 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8521
8522 * m4/c-working.m4: New file.
8523 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8524
8525 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8526
8527 * Makefile.maint: Merge from coreutils.
8528
8529 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8530
8531 More portability fixes for problems summarized by Nelson H. F. Beebe.
8532
8533 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8534 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8535 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8536 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8537 messes up because C++ code is compiled in 32-bit mode but linked
8538 in 64-bit mode.
8539
8540 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8541
8542 More portability fixes for problems summarized by Nelson H. F. Beebe.
8543
8544 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8545 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8546
8547 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8548 nodist_PROGRAMS, since we don't need to actually compile the
8549 example if we're just doing a plain 'make'. This avoids bothering
8550 the installer unnecessarily about problems due to weird C++
8551 compilers.
8552
8553 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8554
8555 More portability fixes for problems summarized by Nelson H. F. Beebe.
8556
8557 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8558 than #include "...", and compile with -I'.'. The old method was
8559 not portable, according to Posix and the C standard, and it does
8560 not work with Sun C 5.7, where previous #line directives affect
8561 the working directory used in later #include "..." directives.
8562
8563 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8564
8565 Various DJGGP specific issues in /djgpp
8566
8567 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8568
8569 More portability fixes for problems summarized by Nelson H. F. Beebe.
8570
8571 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8572 '#include <map>' works and that you can apply ++ to iterators.
8573
8574 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8575
8576 Work around portability problems summarized by Nelson H. F. Beebe in
8577 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8578
8579 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8580 that '#include <string>' works.
8581
8582 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8583 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8584 "warning: sorry: semantics of inline function static data `const
8585 unsigned char translate_table[262]' are wrong (you'll wind up with
8586 multiple copies)".
8587
8588 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8589 or, xor to not_, and_, or_, and xor_, respectively. This works
8590 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8591 random system header somewhere that includes the equivalent of
8592 <iso646.h>.
8593
8594 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8595 -E" works; it apparently doesn't work with PathScale EKO Compiler
8596 Suite Version 2.0.
8597
8598 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8599
8600 During deterministic GLR operation, user actions should be able to
8601 influence the parse by changing yychar. To make this easier to fix and
8602 to make glr.c easier to evolve in general, don't maintain yytoken in
8603 parallel with yychar; just compute yytoken when needed.
8604 * tests/glr-regression.at (Incorrect lookahead during deterministic
8605 GLR): Check that setting yychar in a user action has the intended
8606 effect.
8607 * data/glr.c (yyGLRStack): Remove yytokenp member.
8608 (yyclearin): Don't set *yytokenp.
8609 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8610 yychar rather than *yytokenp to determine the current lookahead.
8611 Compute yytoken locally when needed.
8612 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8613 point to.
8614
8615 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8616 after `--report' documentation.
8617
8618 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8619
8620 * src/parse-gram.y (grammar_declaration): Location of printer
8621 symbol is @1, not list->location. Bug reported by twlevo.
8622 * tests/input.at (Incompatible Aliases): Adjust to above change.
8623
8624 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8625
8626 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8627 all the test at once. This makes the output easier to read in the
8628 normal case.
8629
8630 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8631 got from <http://bro-ids.org/download.html>. The bug is that
8632 when two actions appeared in succession, the second one was
8633 scanned before the first one was added to the grammar rule
8634 as a midrule action. Bison then output the incorrect warning
8635 "parse.y:905.17-906.36: warning: unused value: $3".
8636 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8637 associated with a value.
8638 (rhs): Don't invoke grammar_current_rule_action_append.
8639 (action): Invoke it here instead.
8640 * src/reader.c (grammar_midrule_action): Now extern.
8641 (grammar_current_rule_action_append): Don't invoke
8642 grammar_midrule_action; that is now the scanner's job.
8643 * src/reader.h (last_string, last_braced_code_loc):
8644 (grammar_midrule_action): New decls.
8645 * src/scan-gram.l (last_string): Now extern, sigh.
8646 (last_braced_code_loc): New extern variable.
8647 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8648 rule already has an action.
8649 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8650 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8651 Add some tests to check that the above changes fixed the bug.
8652
8653 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8654
8655 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8656 All used changed. Check whether the symbol has a destructor,
8657 not whether it is typed.
8658 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8659 that the values are still reported as unused. All line numbers
8660 adjusted.
8661
8662 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8663
8664 Work around a bug in bro 0.8, which underparenthesizes its
8665 definition of YYLLOC_DEFAULT.
8666 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8667 their arguments.
8668 * data/lalr1.cc: Likewise.
8669 * data/yacc.cc: Likewise.
8670
8671 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8672
8673 Work around a bug in Pike 7.0, and give the Pike folks a
8674 better way to override the usual int widths.
8675 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8676 user can override the types.
8677 (short): #undef, to work around a bug in Pike 7.0.
8678 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8679 (union yyalloc.yyss): Use yytype_int16 rather than short.
8680 All uses changed.
8681 (yysigned_char): Remove.
8682 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8683 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8684 * tests/regression.at (Web2c Actions): Adjust to above changes.
8685
8686 * src/reader.c (check_and_convert_grammar): New function.
8687 (reader): Close the input file even if something went wrong during
8688 parsing. Minor file descriptor leak reported by twlevo.
8689
8690 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8691 to pacify gcc -Wswitch-default.
8692 * src/scan-gram.l (adjust_location): Use a default: break; case
8693 to pacify gcc -Wswitch-default.
8694 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8695 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8696 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8697 Move these decls to scan-skel.l, since they don't need to be
8698 visible elsewhere.
8699 * src/scan-skel.l: Accept the above decls.
8700 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8701 is used.
8702
8703 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8704
8705 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8706 since we don't want to insist on a version number at the start
8707 of the changelog every time.
8708 * Makefile.maint: Sync from coreutils a bit better.
8709 (sc_trailing_blank): Renamed from sc_trailing_space.
8710 All uses changed.
8711 (sc_no_if_have_config_h, sc_require_config_h):
8712 (sc_prohibit_assert_without_use): New rules.
8713 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8714 (sc_dd_max_sym_length): Fix leading spaces in rule.
8715 (sc_system_h_headers): Prefix with @.
8716 (sc_useless_cpp_parens, m4-check): Output line numbers.
8717 (changelog-check): Allow version only in head.
8718 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8719 satisfy new Makefile.maint rule.
8720 * data/glr.c: Likewise.
8721 * data/glr.cc: Likewise.
8722 * data/lalr1.cc: Likewise.
8723 * data/yacc.c: Likewise.
8724 * lib/ebitsetv.c: Likewise.
8725 * lib/lbitset.c: Likewise.
8726 * lib/subpipe.c: Likewise.
8727 * lib/timevar.c: Likewise.
8728 * src/system.h: Likewise.
8729 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8730 * djgpp/Makefile.maint: Add copyright notice.
8731 * djgpp/README.in: Likewise.
8732 * djgpp/config.bat: Likewise.
8733 * djgpp/config.site: Likewise.
8734 * djgpp/config_h.sed: Likewise.
8735 * djgpp/djunpack.bat: Likewise.
8736 * djgpp/config.sed: Fix copyright notice to match standard format.
8737 * djgpp/subpipe.h: Likewise.
8738 * lib/bitsetv-print.c: Likewise.
8739 * lib/bitsetv.c: Likewise.
8740 * lib/subpipe.h: Likewise.
8741 * lib/timevar.c: Likewise.
8742 * lib/timevar.h: Likewise.
8743 * djgpp/subpipe.c: Use standard recipe for config.h.
8744 * lib/abitset.c: Likewise.
8745 * lib/bitset.c: Likewise.
8746 * lib/bitset_stats.c: Likewise.
8747 * lib/bitsetv-print.c: Likewise.
8748 * lib/bitsetv.c: Likewise.
8749 * lib/ebitsetv.c: Likewise.
8750 * lib/get-errno.c: Likewise.
8751 * lib/lbitset.c: Likewise.
8752 * lib/subpipe.c: Likewise.
8753 * lib/timevar.c: Likewise.
8754 * lib/vbitset.c: Likewise.
8755 * tests/local.at: Likewise.
8756 * src/scan-gram.l: Don't include verify.h, since system.h does
8757 that for us.
8758 * .x-sc_require_config_h: New file.
8759 * .x-sc_unmarked_diagnostics: New file.
8760
8761 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8762
8763 Be a bit more systematic about using 'abort'.
8764 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8765 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8766 Put 'default: abort ();' before some other case, to satisfy older
8767 pedantic compilers.
8768 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8769 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8770 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8771 * src/conflicts.c (resolve_sr_conflict): Likewise.
8772 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8773 (get_decision_str, get_orientation_str, get_node_alignment_str):
8774 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8775 (get_linestyle_str, get_arrowstyle_str): Likewise.
8776 * src/conflicts.c (resolve_sr_conflict):
8777 Use a default case rather than one for the one remaining enum
8778 value, to catch invalid enum values as well.
8779 * src/lalr.c (set_goto_map, map_goto):
8780 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8781 * src/nullable.c (nullable_compute, token_definitions_output):
8782 Likewise.
8783 * src/reader.c (packgram, reader): Likewise.
8784 * src/state.c (transitions_to, state_new, state_reduction_find):
8785 Likewise.
8786 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8787 (symbol_pack): Likewise.
8788 * src/tables.c (conflict_row, pack_vector): Likewise.
8789 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8790 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8791 * src/system.h: Don't include <assert.h>.
8792 (assert): New macro.
8793
8794 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8795 (Destructor Decl, Parser Function, Pure Calling):
8796 Describe rules for braces inside C code more carefully.
8797
8798 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8799
8800 Fix some porting glitches found by Nelson H. F. Beebe.
8801 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8802 compilers that don't understand that abort () does not return.
8803 * src/state.c (transitions_to): Likewise.
8804 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8805 that '#include <cstdlib>' works.
8806 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8807 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8808 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8809 for the benefit of some pre-C99 compilers.
8810
8811 * bootstrap: Undo changes to gnulib files that autoreconf made.
8812
8813 Minor fixups to get 'make maintainer-check' to work.
8814 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8815 with the new verify.h implementation.
8816 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8817 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8818 * data/yacc.c (YYUSE): Likewise.
8819 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8820 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8821 * src/parse-gram.y (declaration): Don't pass a string constant
8822 to a function that expects char *, since GCC might complain
8823 about the constant value.
8824 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8825 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8826 before #defining them.
8827 * tests/glr-regression.at
8828 (Incorrectly initialized location for empty right-hand side in GLR):
8829 In yyerror, use the msg arg.
8830 (Corrupted semantic options if user action cuts parse):
8831 (Incorrect lookahead during deterministic GLR):
8832 (Incorrect lookahead during nondeterministic GLR):
8833 Don't name a local var 'index'; it shadows string.h's 'index'.
8834
8835 2006-01-19 Akim Demaille <akim@epita.fr>
8836
8837 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8838 location, not just parts of it.
8839
8840 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8841
8842 * NEWS: Document the fact that multiple %unions are now allowed.
8843 * doc/bison.texinfo (Union Decl): Likewise.
8844 * TODO: This feature is now implemented, so remove it from
8845 the wishlist.
8846
8847 * Makefile.maint: Merge with coreutils Makefile.maint.
8848 (CVS_LIST): Use build-aux version if available.
8849 (VERSION_REGEXP): New macro.
8850 (syntax-check-rules): Add sc_no_if_have_config_h,
8851 sc_prohibit_assert_without_use, sc_require_config_h,
8852 sc_useless_cpp_parens.
8853 (sc_obsolete_symbols): Check for O_NDELAY.
8854 (sc_dd_max_sym_length): Track coreutils.
8855 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8856 (sc_useless_cpp_parens): New rule.
8857 (news-date-check): Look for version or today's date.
8858 (changelog-check): Don't require version number near head.
8859 (copyright-check): Use current year instead of hardwiring 2005.
8860 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8861 (announcement): Add --gpg-key-ID.
8862
8863 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8864 with "file system".
8865
8866 Avoid undefined behavior that addressed just before the start of an
8867 array. Problem reported by twlevo.
8868 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8869 * src/lalr.c (build_relations): Rely on new sentinel.
8870 * src/gram.c (gram_free): Adjust to new sentinel.
8871
8872 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8873
8874 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8875 yylookaheadNeeds. All uses updated.
8876 (yysplitStack): Rename local yynewLookaheadStatuses to
8877 yynewLookaheadNeeds.
8878 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8879 GLR): In comments, change `lookahead status' to `lookahead need'.
8880
8881 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8882
8883 * data/glr.c (yysplitStack): A little stylistic rewrite.
8884
8885 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8886
8887 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8888
8889 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8890
8891 * doc/bison.texinfo: Fix some typos.
8892 (GLR Semantic Actions): New subsection discussing special
8893 considerations because GLR semantic actions might be deferred.
8894 (Actions): Mention look-ahead usage of yylval.
8895 (Actions and Locations): Mention look-ahead usage of yylloc.
8896 (Special Features for Use in Actions): Add YYEOF entry and mention it
8897 in the yychar entry.
8898 In the yychar entry, remove mention of the local yychar case (pure
8899 parser) since this is irrelevant information when writing semantic
8900 actions and since it's already discussed in `Table of Symbols' where
8901 yychar is otherwise described as an external variable.
8902 In the yychar entry, don't call it the `current' look-ahead since it
8903 isn't when semantic actions are deferred.
8904 In the yychar and yyclearin entries, add note about deferred semantic
8905 actions.
8906 Add yylloc and yylval entries discussing look-ahead usage.
8907 (Look-Ahead Tokens): When discussing yychar, don't call it the
8908 `current' look-ahead, and do mention yylval and yylloc.
8909 (Error Recovery): Cross-reference `Action Features' when mentioning
8910 yyclearin.
8911 (Table of Symbols): In the yychar entry, don't call it the `current'
8912 look-ahead.
8913 In the yylloc and yylval entries, mention look-ahead usage.
8914
8915 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8916
8917 * tests/glr-regression.at: Update copyright year to 2006.
8918
8919 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8920
8921 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8922 use during nondeterministic operation to track which stacks have
8923 actually needed the current lookahead.
8924 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8925 Allocate, deallocate, resize, and otherwise shuffle space for
8926 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8927 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8928 appropriately during nondeterministic operation.
8929 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8930 members to store the current lookahead to be used by the deferred
8931 user action.
8932 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8933 from which the RHS is taken. Set the lookahead members of the new
8934 yySemanticOption according to the lookahead status for stack yyk.
8935 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8936 yyaddDeferredAction.
8937 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8938 members of yySemanticOption before invoking yyuserAction, and then set
8939 them back to their current values afterward.
8940 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8941 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8942 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8943 titles for consistency.
8944 (Leaked merged semantic value if user action cuts parse): In order to
8945 suppress lint warnings, use arguments in merge function, and assign
8946 char value < 128 in main.
8947 (Incorrect lookahead during deterministic GLR): New test case.
8948 (Incorrect lookahead during nondeterministic GLR): New test case.
8949
8950 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8951
8952 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8953 !yyvaluep as signal that no semantic value is available to print.
8954 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8955 to print a semantic value.
8956
8957 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8958
8959 * tests/glr-regression.at: For consistency with my newer test cases,
8960 don't thank myself.
8961
8962 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8963
8964 * data/glr.c (yyresolveValue): When merging semantic options, if at
8965 least one user action succeeds but a later one cuts the parse, then
8966 destroy the semantic value before returning rather than leaking it.
8967 (yyresolveStates): If a user action cuts the parse and thus
8968 yyresolveValue fails, ignore the (unset) semantic value rather than
8969 corrupting the yyGLRState, and empty the semantic options list since
8970 the user actions should have called all necessary destructors.
8971 Simplify code with YYCHK.
8972 * tests/glr-regression.at (Corrupted semantic options if user action
8973 cuts parse): New test case.
8974 (Undesirable destructors if user action cuts parse): New test case.
8975 Before applying any of this patch, this test case never actually failed
8976 for me... but only because the corrupted semantic options usually
8977 masked this bug.
8978 (Leaked merged semantic value if user action cuts parse): New test
8979 case.
8980
8981 2006-01-05 Akim Demaille <akim@epita.fr>
8982
8983 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8984
8985 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8986
8987 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8988 _MSC_VER. Problem reported by Cenzato Marco.
8989 (b4_c_function_def): Use it.
8990 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8991 b4_c_modern.
8992 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8993 than rolling our own.
8994
8995 2006-01-04 Akim Demaille <akim@epita.fr>
8996
8997 Also warn about non-used mid-rule values.
8998 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8999 member.
9000 (symbol_list_new): Adjust.
9001 * src/reader.c (symbol_typed_p): New.
9002 (grammar_rule_check): Use it.
9003 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
9004 Check its rule.
9005 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
9006 Use it.
9007 * tests/actions.at (Exotic Dollars): Adjust.
9008
9009 2006-01-04 Akim Demaille <akim@epita.fr>
9010
9011 * src/reader.c (grammar_midrule_action): If $$ is set in a
9012 mid-rule, move the `used' bit to its lhs.
9013 * tests/input.at (Unused values): New.
9014 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
9015
9016 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
9017
9018 * doc/bison.texinfo (Bison Options): Say more accurately what
9019 --yacc does.
9020 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
9021 about declarations in the grammar when in Yacc mode, as POSIX does
9022 not require a diagnostic when the grammar uses extensions.
9023
9024 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
9025
9026 Warn about dubious constructions like "%token T T".
9027 Reported by twlevo.
9028 * src/symtab.h (struct symbol.declared): New member.
9029 * src/symtab.c (symbol_new): Initialize it to false.
9030 (symbol_class_set): New arg DECLARING, specifying whether
9031 this is a declaration that we want to warn about, if there
9032 is more than one of them. All uses changed.
9033
9034 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
9035 Allow multiple %union directives, whose contents concatenate.
9036 * src/parse-gram.y (grammar_declaration): Likewise.
9037 Use muscle_code_grow, so that we don't need stype_line any more.
9038 All uses changed.
9039
9040 * src/muscle_tab.c (muscle_grow): Fix comment.
9041
9042 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
9043 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
9044 Update copyright year to 2006.
9045
9046 2006-01-03 Akim Demaille <akim@epita.fr>
9047
9048 Have glr.cc pass (some of) the calc.at tests.
9049 * data/glr.cc (b4_parse_param_orig): New.
9050 (b4_parse_param): Improve its definition, and bound it more
9051 clearly in the skeleton.
9052 (b4_epilogue): Append, instead of prepending, in order to keep
9053 #line consistency.
9054 Simplify the generation of auxiliary functions: locations and
9055 purity are mandated.
9056 (b4_global_tokens_and_yystype): Honor it.
9057 * data/location.cc (c++.m4): Don't include it.
9058 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
9059 and AT_SKEL_CC_IF.
9060 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
9061 AT_LALR1_CC_IF.
9062 Be sure to initialize the first position's filename.
9063 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
9064 mandated anyway.
9065 (AT_CHECK_CALC_GLR_CC): New.
9066 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
9067
9068 2006-01-02 Akim Demaille <akim@epita.fr>
9069
9070 * src/output.c (output_skeleton): Don't hard wire the inclusion of
9071 c.m4.
9072 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
9073 * data/glr.cc: Do not include stack.hh.
9074
9075 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
9076
9077 * data/glr.c: Reformat whitespace with tabs.
9078 (b4_lpure_formals): Remove this unused m4 macro.
9079 * tests/cxx-type.at: Reformat whitespace with tabs.
9080 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
9081 since it's a member. Rename type to isNterm for clarity.
9082
9083 2005-12-29 Akim <akim@sulaco.local>
9084
9085 Let glr.cc catch up with symbol_value_print.
9086 * data/glr.cc (b4_yysymprint_generate): Replace by...
9087 (b4_yy_symbol_print_generate): this.
9088 (yy_symbol_print, yy_symbol_value_print): Declare them.
9089
9090 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9091
9092 * src/location.h (boundary): Note that a line or column equal
9093 to INT_MAX indicates an overflow.
9094 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9095 (rule_length_overflow, increment_rule_length, add_column_width):
9096 New functions.
9097 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9098 (<SC_BRACED_CODE>"}"):
9099 Use increment_rule_length rather than incrementing it by hand.
9100 (adjust_location, handle_syncline): Diagnose overflow.
9101 (handle_action_dollar, handle_action_at):
9102 Fix bug with monstrosities like $-2147483648.
9103 Remove now-unnecessary checks.
9104 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9105 (convert_ucn_to_byte): Verify assumptions.
9106 (handle_syncline): New arg LOC. All callers changed.
9107 Don't store through a value derived from char const * pointer.
9108
9109 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9110 GCC warnings.
9111
9112 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9113
9114 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9115 Remove unnecessary forward static decls.
9116
9117 2005-12-27 Akim Demaille <akim@epita.fr>
9118
9119 * src/reader.c (grammar_current_rule_check): Also check that $$
9120 is used.
9121 Take the rule to check as argument, hence rename as...
9122 (grammar_rule_check): this.
9123 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9124 Rename as...
9125 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9126 (grammar_midrule_action, grammar_symbol_append): Now static.
9127 * tests/torture.at (input): Don't rely on the default action
9128 being always performed.
9129 * tests/calc.at: "Set" $$ even when the action is "cut" with
9130 YYERROR or other.
9131 * tests/actions.at (Exotic Dollars): Instead of using unused
9132 values, check that the warning is issued.
9133
9134 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9135
9136 * NEWS: Improve wording for unused-value warnings.
9137
9138 2005-12-22 Akim Demaille <akim@epita.fr>
9139
9140 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9141 (b4_yysymprint_generate): Rename as...
9142 (b4_yy_symbol_print_generate): this.
9143 Generate yy_symbol_print instead of yysymprint.
9144 Generate also yy_symbol_value_print, and use it.
9145
9146 2005-12-22 Akim Demaille <akim@epita.fr>
9147
9148 * NEWS: Warn about unused values.
9149 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9150 a `used' member.
9151 (symbol_list_n_get, symbol_list_n_used_set): New.
9152 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9153 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9154 * src/reader.c (grammar_current_rule_check): Check that values are
9155 used.
9156 * src/symtab.c (symbol_print): Accept 0.
9157 * tests/existing.at: Remove the type information.
9158 Empty the actions.
9159 Remove useless actions (beware of mid-rule actions: perl -000
9160 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9161 * tests/actions.at (Exotic Dollars): Use unused values.
9162 * tests/calc.at: Likewise.
9163 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9164 Likewise.
9165
9166 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9167 rule_useful_p.
9168
9169 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9170
9171 Undo 2005-12-01 tentative license wording change. The wording is
9172 still being reviewed by the lawyers, and we don't want to wait for
9173 them before publishing a test release. For now, revert to the
9174 previous wording.
9175 * NEWS: Undo 2005-12-01 change.
9176 * data/glr.c: Revert to previous license wording.
9177 * data/glr.cc: Likewise.
9178 * data/lalr1.cc: Likewise.
9179 * data/location.cc: Likewise.
9180 * data/yacc.c: Likewise.
9181
9182 * NEWS: Reword %destructor vs YYABORT etc.
9183 * data/glr.c: Use American spacing, for consistency.
9184 * data/glr.cc: Likewise.
9185 * data/lalr1.cc: Likewise.
9186 * data/yacc.c: Likewise.
9187 * data/yacc.c: Reformat comments slightly.
9188 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9189 for consistency. Fix some spelling errors and reword recently-included
9190 text slightly.
9191 * tests/cxx-type.at: Cast results of malloc, for C++.
9192
9193 2005-12-21 Joel E. Denny <address@hidden>
9194
9195 * tests/cxx-type.at: Construct a tree, count the parents of shared
9196 nodes, and free each node once and only once. Previously, the memory
9197 for semantic values was leaked instead.
9198
9199 2005-12-21 Joel E. Denny <address@hidden>
9200
9201 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9202 (yylval, yylloc): If pure, #define to yystackp->yyval and
9203 yystackp->yyloc similar to yychar and yynerrs.
9204 (yyparse): If pure, remove local yylval and yylloc. Add local
9205 yystackp to accommodate pure definitions of yylval and yylloc.
9206 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9207 yylvalp and yyllocp to &yylval and &yylloc.
9208 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9209 namespace. Previously, nerrs and char were missing, but lval and lloc
9210 weren't necessary.
9211 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9212 yylvalp and yyllocp parameters since, if pure, these are now always
9213 accessible through yystackp. If not pure, they are still accessible
9214 globally.
9215 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9216 `if (YYID (N))' to pacify lint.
9217
9218 2005-12-21 Akim Demaille <akim@epita.fr>
9219
9220 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9221 destroy the RHS symbols of a rule.
9222 * data/yacc.c (yylen): Initialize to 0.
9223 Keep its value to the number of items to possibly shift.
9224 In particular, a regular successful parse that ends on YYFINAL by
9225 a (internal) YYACCEPT must not have yylen != 0.
9226 (yyerrorlab, yyreturn): Pop the RHS.
9227 Reorder a bit to emphasize the `shifting' bits of code.
9228 (YYPOPSTACK): Now accept a number of items to pop.
9229 * data/lalr1.cc: Likewise.
9230 * data/glr.c: Formatting changes.
9231 Use goto instead of fall through.
9232 * doc/bison.texinfo (Destructor Decl): Complete.
9233
9234 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9235
9236 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9237 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9238 * djgpp/config.bat: Replace every occurence of the file name
9239 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9240 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9241 * djgpp/config.sed: Replace every occurence of the file name
9242 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9243 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9244 * djgpp/djunpack.bat: DJGPP specific file.
9245 * djgpp/fnchange.lst: DJGPP specific file.
9246 * djgpp/README.in: Add new information about how to unpack the bison
9247 source on MSDOS and other systems which have 8.3 file name restrictions
9248 using djunpack.bat and fnchange.lst.
9249
9250 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9251
9252 * bootstrap (build_cvs_prefix): Remove; unused.
9253 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9254 when getting gnulib.
9255
9256 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9257
9258 * data/glr.c: Reorder typedef declarations for structs to match order
9259 of struct declarations.
9260 Rename yystack everywhere to yystackp except in yyparse where it's not
9261 a pointer.
9262 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9263 consistency.
9264 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9265 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9266 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9267 lint.
9268
9269 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9270
9271 * tests/sets.at (Accept): Fix typos in regular expression used to
9272 sed out the final state number.
9273
9274 Work around portability problem on Solaris 10: flex-generated
9275 files include <stdio.h> before <config.h>, which messes up
9276 because the latter defines __EXTENSIONS__. Address the problem
9277 by creating two new little files that include <config.h> first,
9278 then include the flex-generated files. Rewrite everyone else
9279 to include <config.h> first, as well.
9280 * lib/timevar.c: Always include "config.h".
9281 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9282 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9283 (EXTRA_bison_SOURCES): New macro.
9284 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9285 * src/system.h: Don't include config.h.
9286 * src/LR0.c: Include <config.h> first.
9287 * src/assoc.c: Likewise.
9288 * src/closure.c: Likewise.
9289 * src/complain.c: Likewise.
9290 * src/conflicts.c: Likewise.
9291 * src/derives.c: Likewise.
9292 * src/files.c: Likewise.
9293 * src/getargs.c: Likewise.
9294 * src/gram.c: Likewise.
9295 * src/lalr.c: Likewise.
9296 * src/location.c: Likewise.
9297 * src/main.c: Likewise.
9298 * src/muscle_tab.c: Likewise.
9299 * src/nullable.c: Likewise.
9300 * src/output.c: Likewise.
9301 * src/parse-gram.y: Likewise.
9302 * src/print.c: Likewise.
9303 * src/print_graph.c: Likewise.
9304 * src/reader.c: Likewise.
9305 * src/reduce.c: Likewise.
9306 * src/relation.c: Likewise.
9307 * src/state.c: Likewise.
9308 * src/symlist.c: Likewise.
9309 * src/symtab.c: Likewise.
9310 * src/tables.c: Likewise.
9311 * src/uniqstr.c: Likewise.
9312 * src/vcg.c: Likewise.
9313
9314 * src/parse-gram.y: Fix minor problems uncovered by lint.
9315 (current_lhs, current_lhs_location): Now static.
9316 (current_assoc): Remove unused variable.
9317
9318 Cleanups so that Bison-generated parsers have less lint.
9319 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9320 Prepend /*ARGSUSED*/, for lint's sake.
9321 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9322 definition if 'lint' is defined.
9323 (YYID): New macro (or function, if lint).
9324 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9325 * data/yacc.c: Likewise.
9326 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9327 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9328 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9329 is C++ only.
9330 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9331 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9332 Use YYID(0) rather than 0, for lint.
9333 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9334 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9335
9336 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9337
9338 * tests/glr-regression.at
9339 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9340 Close memory leak reported by twlevo.
9341
9342 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9343
9344 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9345 all stacks.
9346 (yyparse): Iterate another stack in order to call user destructors.
9347 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9348 New test case.
9349 (Duplicated user destructor for lookahead): This test now is expected
9350 to succeed.
9351
9352 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9353
9354 * NEWS: Document the following change.
9355 * data/yacc.c: Say "parser skeleton" rather than "file", since
9356 it's no longer just a file.
9357 * data/glr.c: Grant a special exception for C GLR parsers, that
9358 reads like the already-existing exception for C LALR(1) parsers.
9359 * data/glr.cc: Likewise.
9360 * data/lalr1.cc: Likewise.
9361 * data/location.cc: Likewise.
9362 * data/yacc.c: Reword the "written by" statement to clarify that
9363 it was the parser skeleton, not the entire output file.
9364 * data/glr.c: Written by Paul Hilfinger.
9365 * data/glr.cc: Written by Akim Demaille.
9366 * data/lalr1.cc: Likewise.
9367
9368 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9369
9370 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9371 Fix typos in previous change that broke 'make check'.
9372 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9373 supported in C.
9374 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9375 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9376 We can revert this once things settle down.
9377
9378 * src/conflicts.c (conflicts_print): Don't print file name twice
9379 when %expect fails because there were no conflicts.
9380 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9381 change.
9382 * tests/conflicts.at (%expect not enough, %expect too much):
9383 (%expect with reduce conflicts): Adjust to new behavior.
9384
9385 2005-11-18 Akim Demaille <akim@epita.fr>
9386
9387 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9388 errors.
9389 * NEWS: Document this.
9390 * doc/bison.texinfo (Expect Decl): Likewise.
9391
9392 2005-11-16 Akim Demaille <akim@epita.fr>
9393
9394 Generalize the display of semantic values and locations in traces.
9395 * data/glr.c (yy_reduce_print): Fix indices (again).
9396 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9397 literal integers.
9398 * data/lalr1.cc (yyreduce_print): Rename as...
9399 (yy_reduce_print): this.
9400 Display values and locations.
9401 * data/yacc.c (yy_reduce_print): Likewise.
9402 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9403 (yysymprint): Move higher to be visible from yy_reduce_print).
9404 (yyparse): Adjust.
9405 * tests/calc.at: Adjust the expected length of the traces.
9406
9407 2005-11-14 Akim Demaille <akim@epita.fr>
9408
9409 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9410 from 1 to N, while values and location start at 0.
9411 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9412
9413 2005-11-14 Akim Demaille <akim@epita.fr>
9414
9415 * data/glr.c (yy_reduce_print): Fix the $ number.
9416
9417 2005-11-14 Akim Demaille <akim@epita.fr>
9418
9419 "Use" parse parameters.
9420 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9421 * data/glr.c, data/glr.cc: Use them.
9422 * data/glr.c (YYUSE): Have a C++ definition that supports
9423 non-pointer types.
9424
9425 2005-11-14 Akim Demaille <akim@epita.fr>
9426
9427 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9428
9429 2005-11-14 Akim Demaille <akim@epita.fr>
9430
9431 * data/glr.cc: New.
9432 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9433
9434 2005-11-12 Akim Demaille <akim@epita.fr>
9435
9436 Let position and location be PODs.
9437 * data/location.cc (position::initialize, location::initialize): New.
9438 (position::position, location::location): Define only if
9439 b4_location_constructors is defined.
9440 * data/lalr1.cc (b4_location_constructors): Define it for backward
9441 compatibility.
9442 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9443
9444 2005-11-12 Akim Demaille <akim@epita.fr>
9445
9446 * data/lalr1.cc: Move the body of the ctor and dtor into the
9447 parser file (instead of the header).
9448 Wrap the implementations in a "namespace yy".
9449
9450 2005-11-12 Akim Demaille <akim@epita.fr>
9451
9452 Have glr.c include its header file when created.
9453 * data/glr.c (b4_shared_declarations): New.
9454 Output them verbatim in the parser if !%defines, otherwise
9455 output then in the header file, and include it instead.
9456
9457 2005-11-11 Akim Demaille <akim@epita.fr>
9458
9459 * data/glr.c: Comment changes.
9460
9461 2005-11-11 Akim Demaille <akim@epita.fr>
9462
9463 When yydebug, report semantic and location values for reductions.
9464 * data/glr.c (yy_reduce_print): Report the semantic values and the
9465 locations.
9466 (YY_REDUCE_PRINT): Adjust.
9467 (yyglrReduce): Use them.
9468 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9469 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9470 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9471 traces.
9472
9473 2005-11-10 Akim Demaille <akim@epita.fr>
9474
9475 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9476 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9477 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9478
9479 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9480
9481 * m4/cxx.m4, examples/Makefile.am: Don't build
9482 examples/calc++ if no C++ compiler is available. (trivial change)
9483
9484 2005-11-09 Akim Demaille <akim@epita.fr>
9485
9486 * src/scan-skel.l: Use a couple of asserts.
9487
9488 2005-11-03 Akim Demaille <akim@epita.fr>
9489
9490 In some (weird) cases, the final state number is incorrect.
9491 Reported by Alexandre Duret-Lutz.
9492 * src/LR0.c (state_list_append): Remove the computation of
9493 final_state.
9494 (save_reductions): Do it here.
9495 (get_state): Alpha conversion.
9496 (generate_states): Use a for loop.
9497 * src/gram.h (item_number_is_rule_number)
9498 (item_number_is_symbol_number): New.
9499 * src/state.c: Use assert.
9500 * src/system.h: Include assert.h.
9501 * tests/sets.at (Accept): New.
9502
9503 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9504
9505 * data/glr.c (yyfill): Adjust comment.
9506 (yyresolveAction): Initialize default location properly
9507 for empty right-hand sides.
9508 (yydoAction): Ditto.
9509 Add comment explaining apparently dead code.
9510 * tests/glr-regression.at
9511 (Incorrectly initialized location for empty right-hand side in GLR):
9512 New test.
9513
9514 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9515
9516 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9517 gnulib when interrupted. This fixes some race conditions and
9518 works around some portability problems (one noted by Paul
9519 Hilfinger).
9520
9521 2005-10-22 Akim <akim@epita.fr>
9522
9523 * Makefile.cfg: Adjust to config -> build-aux.
9524 Reported by twledo.
9525
9526 2005-10-21 Akim Demaille <akim@epita.fr>
9527
9528 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9529 the %parse-params.
9530 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9531 * data/yacc.c (b4_Pure_if): Rename as...
9532 (b4_yacc_pure_if): this.
9533 (YY_SYMBOL_PRINT, yyparse): Adjust.
9534 * doc/bison.texinfo: Formatting changes.
9535
9536 2005-10-21 Akim Demaille <akim@epita.fr>
9537
9538 Finish the transition config -> build-aux.
9539 * configure.ac, Makefile.am: Use build-aux.
9540 * config/prev-version, config/announce-gen, config/Makefile.am:
9541 Move to...
9542 * build-aux/prev-version, build-aux/announce-gen,
9543 * build-aux/Makefile.am: here.
9544
9545 2005-10-14 Akim Demaille <akim@epita.fr>
9546
9547 * examples/calc++/test: Use set -x only when VERBOSE.
9548
9549 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9550
9551 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9552 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9553
9554 2005-10-13 Akim Demaille <akim@epita.fr>
9555
9556 * src/scan-skel.l: Output the base name parts of the parser and
9557 header file names.
9558 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9559 additional checks.
9560 Use this to exercise C++ outputs in subdirs.
9561 Reported by Oleg Smolsky.
9562
9563 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9564
9565 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9566 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9567 Problem reported by John P. Hartmann.
9568 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9569 already defined it.
9570
9571 2005-10-12 Akim Demaille <akim@epita.fr>
9572
9573 * src/parse-gram.y (version_check): Exit 63 to please missing
9574 (stands for "version mismatch).
9575 * tests/input.at, doc/bison.texinfo: Adjust.
9576
9577 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9578
9579 Work around portability problems with Visual Age C compiler
9580 (xlc and xlC_r) reported by John P. Hartmann.
9581 * data/location.cc (initial_column, initial_line): Remove.
9582 All uses replaced by 0 and 1.
9583 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9584 that xlc complains about.
9585 * src/scan-skel.l (skel_wrap): Likewise.
9586 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9587 as __STDC__.
9588 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9589 __STDC_VERSION__. Use it everywhere instead of looking at
9590 __STDC__ and __cplusplus.
9591
9592 2005-10-10 Akim Demaille <akim@epita.fr>
9593
9594 * examples/calc++/test: Be quiet unless VERBOSE.
9595
9596 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9597
9598 * data/c.m4 (yydestruct, yysymprint):
9599 Use YYUSE instead of casting to void.
9600 * data/glr.c (YYUSE): New macro.
9601 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9602 Use it instead of rolling our own.
9603 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9604 (YYCHK1):
9605 Use /*CONSTCOND*/ to suppress lint warnings.
9606 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9607 (YY_STACK_PRINT): Use 'false' not '0'.
9608 (YYUSE): New macro.
9609 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9610 * data/yacc.c (YYUSE): New macro.
9611 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9612 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9613 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9614
9615
9616 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9617 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9618
9619 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9620
9621 Undo the parts of the unlocked-I/O change that substituted
9622 putc or puts for printf. This might hurt performance a bit,
9623 but some people prefer the printf style.
9624 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9625 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9626 All uses replaced by YYFPRINTF and YYDPRINTF.
9627 * data/yacc.c: Likewise.
9628 * lib/bitset.c (bitset_print): Likewise.
9629 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9630 putc and puts.
9631 * lib/lbitset.c (debug_lbitset): Likewise.
9632 * src/closure.c (print_firsts, print_fderives): Likewise.
9633 * src/gram.c (grammar_dump): Likewise.
9634 * src/lalr.c (look_ahead_tokens_print): Likewise.
9635 * src/output.c (escaped_output): Likewise.
9636 (user_actions_output): Break apart two printfs.
9637 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9638 * src/reduce.c (reduce_print): Likewise.
9639 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9640 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9641
9642 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9643 Use assignments rather than casts-to-void to suppress
9644 unused-variable warnings. This pacifies 'lint'.
9645 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9646 unused-variable warnings.
9647
9648 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9649
9650 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9651
9652 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9653
9654 Use unlocked I/O for a minor performance improvement on hosts like
9655 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9656 is to use the gnlib unlocked-io module, and to prefer putc and
9657 puts to printf when either will work (since the latter doesn't
9658 come in an unlocked flavor).
9659 * bootstrap (gnulib_modules): Add unlocked-io.
9660 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9661 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9662 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9663 and similarly for puts and putc and printf.
9664 * data/yacc.c: Likewise.
9665 * lib/bitset.c (bitset_print): Likewise.
9666 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9667 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9668 to printf.
9669 * lib/lbitset.c (debug_lbitset): Likewise.
9670 * src/closure.c (print_firsts, print_fderives): Likewise.
9671 * src/gram.c (grammar_dump): Likewise.
9672 * src/lalr.c (look_ahead_tokens_print): Likewise.
9673 * src/output.c (escaped_output): Likewise.
9674 (user_actions_output): Coalesce two printfs.
9675 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9676 * src/reduce.c (reduce_print): Likewise.
9677 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9678 * src/system.h: Include unlocked-io.h rather than stdio.h.
9679
9680 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9681 this confuses xgettext.
9682
9683 2005-10-02 Akim Demaille <akim@epita.fr>
9684
9685 * bootstrap (gnulib_modules): Add strverscmp.
9686 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9687 * m4/.cvsignore: Add strverscmp.m4.
9688 * src/parse-gram.y (%require): New token, new rule.
9689 (version_check): New.
9690 * src/scan-gram.l (%require): Adjust.
9691 * tests/input.at (AT_REQUIRE): New.
9692 Use it.
9693 * doc/bison.texinfo (Require Decl): New.
9694 (Calc++ Parser): Use %require.
9695
9696 2005-10-02 Akim Demaille <akim@epita.fr>
9697
9698 * data/location.cc: New.
9699
9700 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9701 Akim Demaille <akim@epita.fr>
9702
9703 Make sure -odir/foo.cc creates dir/location.hh etc.
9704 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9705 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9706 (spec_defines_file): Now const.
9707 (dir_prefix): New.
9708 (short_base_name): Remove.
9709 * src/files.c: Adjust.
9710 (dirname.h): Include.
9711 (base_name): Don't prototype it.
9712 (finput): Remove, duplicates gram_in.
9713 (full_base_name, short_base_name): Replace by...
9714 (all_but_ext, all_but_tab_ext): these.
9715 (compute_base_names): Rename as...
9716 (compute_file_name_parts): this.
9717 Update to compute the new variables, including dir_prefix.
9718 Adjust dependencies.
9719 * src/output.c (prepare): Output them.
9720 * src/reader.c: Adjust to use gram_in, not finput.
9721 * src/scan-skel.l (@dir_prefix@): New.
9722
9723 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9724
9725 * lib/subpipe.c: New function end_of_output_subpipe() added
9726 to allow support for non-posix systems. This is a no-op function
9727 for posix systems.
9728
9729 * lib/subpipe.h: New function end_of_output_subpipe() added
9730 to allow support for non-posix systems. This is a no-op function
9731 for posix systems.
9732
9733 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9734 handle the lack of pipe/fork functionality on non-posix systems.
9735
9736 * djgpp/Makefile.maint: DJGPP specific file.
9737
9738 * djgpp/README.in: DJGPP specific file.
9739
9740 * djgpp/config.bat: DJGPP specific configuration file.
9741
9742 * djgpp/config.sed: DJGPP specific configuration file.
9743
9744 * djgpp/config.site: DJGPP specific configuration file.
9745
9746 * djgpp/config_h.sed: DJGPP specific configuration file.
9747
9748 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9749
9750 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9751
9752 2005-10-02 Akim Demaille <akim@epita.fr>
9753
9754 * data/location.cc: New, extract from...
9755 * data/lalr1.cc: here.
9756 (location.hh): Include it after the user prologue, in case the
9757 filename type is defined by the user.
9758 Forward declation location and position before the pre-prologue.
9759 (yyresult_): Rename as...
9760 (yyresult): this, it's a local variable, not an attribute.
9761 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9762
9763 2005-10-01 Akim Demaille <akim@epita.fr>
9764
9765 * examples/extexi: Restore the #line generation.
9766
9767 2005-09-30 Akim Demaille <akim@epita.fr>,
9768 Alexandre Duret-Lutz <adl@gnu.org>
9769
9770 Move the token type and YYSTYPE in the parser class.
9771 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9772 (parser::token): New, from the moved free definition of tokens.
9773 (parser::semantic_value): Now a full definition instead of an
9774 indirection to YYSTYPE.
9775 (b4_post_prologue): No longer included in the header file, but
9776 in the implementation file.
9777 * doc/bison.texi (C+ Language Interface): Update.
9778 * src/parse-gram.y: Support unary %define.
9779 * tests/actions.at: Define global_tokens_and_yystype for backward
9780 compatibility until we update the tests.
9781 * tests/calc.at: Idem.
9782 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9783 to simplify the code.
9784
9785 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9786
9787 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9788 Ah, the good old days! Problem reported by Peter Klein.
9789 * bootstrap (gnulib_modules): Add strerror, strtoul.
9790 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9791 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9792
9793 2005-09-29 Akim Demaille <akim@epita.fr>
9794
9795 * data/c.m4 (b4_error_verbose_if): New.
9796 * data/lalr1.cc: Use it.
9797 (YYERROR_VERBOSE_IF): Remove.
9798 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9799 parser members, replaced by...
9800 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9801 local variables.
9802 (yysyntax_error_): Takes the state number as argument.
9803 (yyreduce_print_): Use the argument yyrule, not the former
9804 attribute yyn_.
9805
9806 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9807
9808 * bootstrap (gnulib_modules): Add verify.
9809 * lib/.cvsignore: Add verify.h.
9810 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9811 * src/system.h (verify): Remove.
9812 Include verify.h instead.
9813 * src/tables.c (tables_generate): Use new API for 'verify'.
9814
9815 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9816
9817 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9818 local variables whose names begin with 'yy'.
9819 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9820 Trivial changes from Joel E. Denny.
9821
9822 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9823 it itself.
9824 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9825 don't use alloca any more.
9826
9827 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9828 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9829 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9830 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9831 to match yacc.c, to test more hosts.
9832
9833 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9834
9835 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9836 doesn't affect behavior.
9837 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9838 Solaris, AIX, MSC.
9839 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9840 This works a bit better with glibc, if user code has already included
9841 stdlib.h.
9842 * doc/bison.texinfo (Bison Parser): Document that users can't
9843 arbitrarily use malloc and free for other purposes. Document
9844 that <alloca.h> and <malloc.h> might be included.
9845 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9846 user must declare alloca.
9847
9848 * HACKING (release): Forwarn the Translation Project about
9849 stable releses.
9850
9851 2005-09-20 Akim Demaille <akim@epita.fr>
9852
9853 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9854
9855 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9856
9857 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9858 (YYSTACK_ALLOC_MAXIMUM): Use it.
9859 (yysyntax_error): New function.
9860 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9861 multiple syntax errors are reported, and alloca is being used.
9862 Instead, reallocate buffers twice as big each time, so that
9863 we waste at most half the allocated memory. Start with a small
9864 (128-byte) buffer that will suffice in most cases anyway.
9865 Use yysyntax_error to do most of the work.
9866
9867 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9868 yynerrs is the number of errors reported, not the number of
9869 errors encountered.
9870
9871 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9872 Mark it as expected to fail.
9873 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9874 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9875 Don't start user-code symbols with "yy", to avoid name space problems.
9876
9877 2005-09-19 Akim Demaille <akim@epita.fr>
9878
9879 Remove the traits, failed experiment.
9880 It never proved useful, and anyway because of the current
9881 definition, it was not possible to have several specialization of
9882 this traits, making it useless.
9883 * data/lalr1.cc (yy:traits): Remove.
9884 Inline its definitions in the parser class.
9885
9886 2005-09-19 Akim Demaille <akim@epita.fr>
9887
9888 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9889 least Mac OSX with a /usr/local install of gettext.
9890
9891 2005-09-19 Akim Demaille <akim@epita.fr>
9892
9893 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9894 and yytoken for similarity with the other skeletons.
9895
9896 2005-09-19 Akim Demaille <akim@epita.fr>
9897
9898 * NEWS, configure.ac: update version number to 2.1a.
9899
9900 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9901
9902 * NEWS: Version 2.1.
9903
9904 * NEWS: Remove notice of yytname change, since it was never in an
9905 official release.
9906 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9907 diagnostic.
9908 * src/output.c (prepare): Likewise.
9909 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9910 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9911 is not defined. This is an awful hack, but it's enough for now.
9912 All callers changed.
9913 * tests/glr-regression-at (make_value): Args are const pointers now,
9914 to avoid GCC warning.
9915 (Duplicated user destructor for lookahead): New test. Currently
9916 skipped. It fails on my host but I'm not sure it'll always fail.
9917
9918 2005-09-16 Akim Demaille <akim@epita.fr>
9919
9920 * src/symtab.h (struct symbol): Declare the printer and destructor
9921 as const, to avoid accidental calls to free.
9922 (symbol_destructor_set, symbol_printer_set): Adjust.
9923 * src/symtab.c: Adjust.
9924
9925 2005-09-16 Akim Demaille <akim@epita.fr>
9926
9927 * data/c.m4 (b4_token_enums): New.
9928 (b4_token_defines): Rename as...
9929 (b4_token_enums_defines): this.
9930 (b4_token_defines): New, output only the #defines.
9931 * data/yacc.c, data/glr.c: Adjust.
9932 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9933 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9934 as default values.
9935
9936 2005-09-16 Akim Demaille <akim@epita.fr>
9937
9938 * data/lalr1.cc (yylex_): Remove, inline its code.
9939 (yyreport_syntax_error_): Remove, replaced by...
9940 (yysyntax_error_): this which returns a string and leaves to the
9941 caller the call to the users' error function.
9942 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9943 Move from members of the parser object...
9944 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9945 to local variables of the parse function.
9946
9947 2005-09-16 Akim Demaille <akim@epita.fr>
9948
9949 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9950 since it's in Bison's name space.
9951
9952 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9953
9954 * data/glr.c (yyresolveValue): Add default case to pacify
9955 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9956
9957 * NEWS: Document when yyparse started to return 2.
9958 * doc/bison.texinfo (Parser Function): Document when yyparse
9959 returns 2.
9960
9961 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9962 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9963 changed.
9964 (class position): file_name -> filename (reverting). All uses changed.
9965
9966 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9967
9968 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9969 do anything if $@ exists. This reverts part of the 2005-07-07
9970 patch.
9971
9972 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9973
9974 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9975 contains obsolete information and isn't worth distributing as a
9976 separate file anyway.
9977 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9978 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9979 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9980 (yyparse): Abort if user code uses longjmp to throw an unexpected
9981 value.
9982
9983 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9984
9985 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9986 Suggested by twlevo@xs4all.nl.
9987
9988 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9989 This avoids a diagnostic from gcc -Wswitch-enum.
9990 Problem reported by twlevo@xs4all.nl.
9991
9992 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9993 standards. Use "file name" or "file" or "name", depending on
9994 the context.
9995 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9996 not to hack/foo.tab.c.
9997 (Calc++ Top Level): 2nd arg of main is not const.
9998 * data/glr.c: b4_filename -> b4_file_name.
9999 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
10000 All uses changed.
10001 (class position): filename -> file_name. All uses changed.
10002 * data/yacc.c: b4_filename -> b4_file_name.
10003 * lib/bitset.h: filename -> file_name in local vars.
10004 * lib/bitset_stats.c: Likewise.
10005 * src/files.c: Likewise.
10006 * src/scan-skel.l ("@output ".*\n): Likewise.
10007 * src/files.c (file_name_split): Renamed from filename_split.
10008 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
10009
10010 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
10011
10012 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
10013 to accommodate latest gnulib.
10014
10015 * tests/glr-regression.at (Duplicate representation of merged trees):
10016 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
10017
10018 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
10019 needed.
10020
10021 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
10022
10023 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
10024 All uses changed. Invoke user destructor after an error during a
10025 split parse (trivial change from Joel E. Denny).
10026
10027 * tests/glr-regression.at
10028 (User destructor after an error during a split parse): New test case.
10029 Problem reported by Joel E. Denny in:
10030 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
10031
10032 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
10033
10034 * README-cvs: Give URLs for recommended tools.
10035 Mention Gzip version problem, and bootstrapping issues.
10036 Remove troubleshooting section, as it's somewhat obsolete.
10037
10038 * bootstrap (no_cache): New var, to accommodate different wget
10039 variants. Use it instead of '-C off'. Problem reported by
10040 twlevo@xs4all.nl.
10041
10042 * data/glr.c (yydestroyStackItem): New function.
10043 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
10044 debugging information. Problem reported by Joel E. Denny.
10045
10046 2005-08-25 Akim Demaille <akim@epita.fr>
10047
10048 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
10049
10050 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
10051
10052 * data/glr.c (yyrecoverSyntaxError, yyreturn):
10053 Don't invoke destructor on unresolved entries.
10054 * tests/glr-regression.at
10055 (User destructor for unresolved GLR semantic value): New test case.
10056 Problem reported by Joel E. Denny in:
10057 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
10058
10059 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
10060
10061 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
10062 Add strnlen.c.
10063 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
10064 lib-prefix.m4, po.m4.
10065
10066 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
10067 in yydestruct diagnostic, since it might not be an error.
10068 Problem reported by Joel Denny near end of
10069 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10070 * data/lalr1.cc (yyerturn): Likewise.
10071 * data/yacc.c (yyreturn): Likewise.
10072 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
10073
10074 * src/files.c: Remove obsolete FIXME comment.
10075
10076 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
10077 with the other templates, and to fix bogus run-on messages such
10078 as the one reported at the end of
10079 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10080 All callers changed to avoid the newline.
10081 (yyprocessOneStack): Output two lines rather than one, to accommodate
10082 the above change. This changes the debug output format slightly.
10083
10084 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10085 reported by Joel E. Denny in
10086 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10087 (trivial change).
10088 * tests/glr-regression.at (Duplicate representation of merged trees):
10089 New test, from Joel E. Denny in:
10090 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10091 * THANKS: Add Joel E. Denny.
10092
10093 * configure.ac (AC_INIT): Bump to 2.0c.
10094
10095 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10096
10097 * NEWS: Version 2.0b.
10098
10099 * Makefile.am (SUBDIRS): Put examples before tests, so that
10100 "make check" doesn't finish with "All 1 tests passed".
10101
10102 * tests/regression.at (Token definitions): Don't rely on
10103 AT_PARSER_CHECK for data that contains backslashes. It currently
10104 uses 'echo', and 'echo' isn't portable if its argument contains
10105 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10106 that the byte '\0xff' is not printable in the C locale; it is,
10107 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10108 not printable, so use '\0x81' to test.
10109
10110 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10111 version of GCC, since the macro is used with non-GCC compilers.
10112
10113 Fix core dump reported by Pablo De Napoli in
10114 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10115 * tests/regression.at (Invalid inputs with {}): New test.
10116 * src/parse-gram.y (token_name): Translate type before using
10117 it as an index.
10118
10119 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10120 the user's name space. All uses changed to __attribute__
10121 ((__unused__)).
10122 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10123 Add __attribute__ ((__noreturn__)).
10124
10125 * etc/clcommit: Remove. We weren't using it, and it failed
10126 "make maintainer-distcheck".
10127 * Makefile.maint: Merge from coreutils.
10128 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10129 (syntax-check-rules): Change list of rules as described below.
10130 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10131 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10132 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10133 (sc_trailing_space): New rules.
10134 (sc_xalloc_h_in_src): Remove.
10135 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10136 (sc_space_tab, sc_error_exit_success, sc_changelog):
10137 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10138 (makefile-check, po-check, author_mark_check):
10139 (makefile_path_separator_check, copyright-check):
10140 Use grep -n, to make it easier to find violations.
10141 Use CVS_LIST and CVS_LIST_EXCEPT.
10142 (header_regexp, h_re): Remove.
10143 (dd_c): New macro.
10144 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10145 (my-distcheck): Use more-modern GCC flags.
10146 (signatures, %.asc): Remove.
10147 (rel-files, announcement): Remove signatures.
10148 Restore old updating code, even though we don't use it, so
10149 that we're the same as coreutils.
10150 (alpha, beta, major): Depend on news-date-check.
10151 Make the upload commands.
10152
10153 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10154 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10155 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10156 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10157 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10158 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10159 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10160 * tests/sets.at: Likewise.
10161
10162 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10163 we comment out the Autoconf version number.
10164 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10165 it's error-prone and "make maintainer-distcheck" rejects it.
10166
10167 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10168 Indent calls to "error" to pacify "make maintainer-distcheck",
10169 when the calls are not intended to be translated.
10170 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10171
10172 * src/Makefile.am (DEFS): Use +=, to pacify
10173 "make maintainer-distcheck".
10174 (bison_SOURCES): Add scan-skel.h.
10175 (sc_tight_scope): New rule, from coreutils.
10176
10177 * src/files.c (src_extension, header_extension):
10178 Now static, not extern.
10179 * src/getargs.c (short_options): Likewise.
10180 * src/muscle_tab.c (muscle_table): Likewise.
10181 * src/parse-gram.y (current_class, current_type, current_prec):
10182 Likewise.
10183 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10184 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10185 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10186 void, to avoid warning when NLS is disabled.
10187 * src/output.c: Include scan-skel.h.
10188 (scan_skel): Remove decl, since scan-skel.h does this.
10189 (output_skeleton):
10190 Indent calls to "error" to pacify "make maintainer-distcheck".
10191 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10192 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10193 "make maintainer-distcheck".
10194 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10195 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10196 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10197 (skel_lex_destroy, scan_skel): Move these decls to...
10198 * src/scan-skel.h: New file.
10199 * src/uniqstr.c (uniqstr_assert):
10200 Indent calls to "error" to pacify "make maintainer-distcheck".
10201
10202 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10203 not @VAR@.
10204
10205 * tests/torture.at: Revamp to avoid misuse of atoi that
10206 "make maintainer-distcheck" complained about.
10207
10208 * examples/extexi (message): Don't print a message more than once,
10209 and omit line-number decoration that makes Emacs compile think
10210 that informative messages are worth worrying about.
10211
10212 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10213
10214 * configure.ac: Update version number.
10215
10216 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10217 accidentally.
10218 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10219 autogenerated by the maintainer.
10220 * examples/calc++/.cvsignore: Add *.yy.
10221
10222 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10223 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10224 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10225
10226 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10227
10228 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10229 from maintainer-distcheck about casting the argument of 'free'.
10230
10231 * NEWS: Mention recent yytname changes.
10232 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10233
10234 * bootstrap: For translations that have not yet been upgraded to
10235 the new runtime-po domain, prime the pump by extracting the
10236 relevant strings from the obsolete translations. This code can be
10237 removed once the bison-runtime domain has been translated by each
10238 team.
10239
10240 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10241 now that token names are already quoted.
10242
10243 Fix problem reported by Anthony Heading.
10244 * data/glr.c (YYTOKEN_TABLE): New macro.
10245 (yytname): Define if YYTOKEN_TABLE.
10246 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10247 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10248 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10249 * src/output.c (prepare_symbols): Output token_table_flag.
10250
10251 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10252
10253 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10254 again if the first call fails.
10255
10256 * data/glr.c (yytnamerr): New function.
10257 (yyreportSyntaxError): Use it to dequote most string literals.
10258 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10259 with other skeletons. All uses changed.
10260 (yytnameerr_): New function.
10261 (yyreport_syntax_error): Use it to dequote most string literals.
10262 * data/yacc.c (yytnamerr): New function.
10263 (yyerrlab): Use it to decode most string literals.
10264 * doc/bison.texinfo (Decl Summary, Calling Convention):
10265 Clarify quoting convention of yytname.
10266 * src/output.c (prepare_symbols): Quote all names. This undoes
10267 the 2005-04-17 change, which is now accomplished (mostly) via
10268 changes in the parsers as described above.
10269 * tests/regression.at (Token definitions, Web2c Actions):
10270 Undo most 2005-04-17 change here, too.
10271
10272 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10273
10274 Fix more problems reported by twlevo@xs4all.nl.
10275 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10276 remove trailing spaces. This loses the exit status of ./types,
10277 and isn't needed since ./types shouldn't be emitting trailing
10278 spaces.
10279 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10280 as the stack isn't valid in that case.
10281
10282 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10283 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10284 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10285 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10286 is used.
10287 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10288 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10289 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10290 Likewise.
10291
10292 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10293 overly-picky compilers that reject 'char *foo = "bar";'.
10294
10295 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10296 to FILE * parameter, not to stderr. This fixes a typo introduced
10297 in the 2005-07-12 change.
10298
10299 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10300 warnings from GCC 4.
10301
10302 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10303 (yyglrShiftDefer, yysplitStack):
10304 Remove unused parameters b4_pure_formals. All uses changed.
10305 (yyglrShift): Remove unused parameters b4_user_formals.
10306 All uses changed.
10307 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10308
10309 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10310
10311 Destructor cleanups and regularization among the three skeletons.
10312 * NEWS: Document the behavior changes.
10313 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10314 stack before failing, as the cleanup code will do it for us now.
10315 * data/lalr1.cc (yyerrlab): Likewise.
10316 * data/glr.c (yyparse): Pop everything off the stack before
10317 freeing it, so that destructors get called properly.
10318 * data/lalr1.cc (yyreturn): Likewise.
10319 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10320 This is more consistent.
10321 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10322 why destructors might be called. 1.875 -> 2.1.
10323 (Destructor Decl, Decl Summary, Table of Symbols):
10324 Some English-language cleanups for %destructor.
10325 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10326 Add output line for destructor of start symbol.
10327 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10328 because of that same extra output line.
10329
10330 * NEWS: Document minor wording changes in diagnostics of
10331 Bison-generated parsers.
10332 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10333 Remove unused formals. All uses changed.
10334 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10335 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10336 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10337 Rename yyoverflowab to yyexhaustedlab.
10338 When memory exhaustion occurs during syntax-error reporting,
10339 report it separately rather than in a single diagnostic; this
10340 eases translation.
10341 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10342 (Memory Exhausted): Renamed from Parser Stack Overflow.
10343 Revamp wording slightly to prefer "memory exhaustion".
10344 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10345
10346 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10347
10348 Add i18n support to the GLR skeleton. Partially fix the C++
10349 skeleton; a C++ expert needs to finish this. Remove debugging
10350 msgids; there's little point to having them translated, since they
10351 can be understood only by someone who can read the
10352 (English-language) source code.
10353
10354 Generate runtime-po/bison-runtime.pot automatically, so that we
10355 don't have to worry about garbage getting in that file. We'll
10356 make sure after the next official release that old msgids don't
10357 get lost. See
10358 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10359
10360 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10361 Now auto-generated.
10362 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10363 Fix typos in explanations of the runtime file.
10364 * bootstrap: Change gettext keyword from YYI18N to YY_.
10365 Use standard Makefile.in.in in runtime-po, since we'll arrange
10366 for backward-compatible bison-runtime.po files in a different way.
10367 * data/glr.c (YY_): New macro, from yacc.c.
10368 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10369 Translate messages intended for users.
10370 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10371 the wording in the other skeletons. We don't know that the memory
10372 is virtual.
10373 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10374 Use same method that yacc.c uses.
10375 Don't translate debugging messages.
10376 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10377 it doesn't work (yet), and requires C++ expertise to fix.
10378 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10379 Move defn to a more logical place, to be consistent with other
10380 skeletons.
10381 Don't translate debugging messages.
10382 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10383 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10384 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10385 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10386
10387 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10388 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10389 void, not int.
10390 * tests/glr-regression.at (Badly Collapsed GLR States):
10391 Likewise.
10392 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10393 yylex should return 0 at EOF rather than aborting.
10394
10395 Improve tests for stack overflow in GLR parser.
10396 Problem reported by twlevo@xs4all.nl.
10397 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10398 All uses removed.
10399 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10400 can handle the problem.
10401 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10402 (yyparse): New local variable yyresult to record the result.
10403 Use result of setjmp to set it, rather than storing itinto
10404 struct.
10405 (yyDone): Remove label.
10406 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10407 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10408 if YYABORT is used).
10409 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10410 yyparse status; put status > 1 into diagnostic.
10411 Check that status==2 works.
10412 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10413 Use exit status 3 for failure to open (which shouldn't happen).
10414
10415 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10416
10417 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10418 1 on syntax error; just let yyparse do its thing.
10419 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10420 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10421 (Exploding the Stack Size with Alloca):
10422 (Exploding the Stack Size with Malloc):
10423 Expect exit status 2, not 1, since the parser is supposed to blow
10424 its stack. Problem reported by twlevo@xs4all.nl.
10425
10426 * data/glr.c (yyparse): Don't assume that the initial calls
10427 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10428 Print a stack-overflow message and fail instead.
10429 Initialize the line-number information before creating the stack,
10430 so that the stack-overflow message can report line zero safely.
10431
10432 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10433
10434 Fix problems reported by twlevo@xs4all.nl.
10435 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10436 (yyuserMerge): Provide a default case if b4_mergers is empty.
10437 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10438 * tests/glr-regression.at
10439 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10440 Add casts to pacify C++ compilers.
10441 * tests/glr-regression.at (Improper merging of GLR delayed action
10442 sets): Declare yylex before using it.
10443 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10444 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10445 test for valgrind; valgrind is independent of g++.
10446 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10447 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10448 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10449 Use a destructor, so that we can expand the stack. Change
10450 YYSTYPE to char * so that we can free it. Cast result of malloc.
10451
10452 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10453
10454 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10455 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10456
10457 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10458
10459 * PACKAGING: New file, suggested by Bruno Haible and taken from
10460 similar wording in gettext's PACKAGING file.
10461 * NEWS: Mention PACKAGING.
10462 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10463
10464 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10465
10466 * NEWS: Document recent i18n improvements.
10467 * bootstrap: Get runtime translations into runtime-po.
10468 Create runtime-po files automatically, if possible.
10469 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10470 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10471 does not infringe on the user's name space.
10472 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10473 * doc/bison.texinfo (Internationalization): Revamp the English
10474 and Texinfo syntax a bit, to try to make it clearer.
10475 (Bison Options, Option Cross Key): Mention --print-localedir.
10476 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10477 YYENABLE_NLS. Quote a bit more.
10478 * runtime-po/.cvsignore: New file.
10479 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10480 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10481 * runtime-po/quot.sed: Likewise.
10482 * runtime-po/boldquot.sed: Likewise.
10483 * runtime-po/en@quot.header: Likewise.
10484 * runtime-po/en@boldquot.header: Likewise.
10485 * runtime-po/insert-header.sin: Likewise.
10486 * runtime-po/remove-potcdate.sin: Likewise.
10487 * runtime-po/Makevars: Likewise.
10488 * runtime-po/LINGUAS: Likewise.
10489 * runtime-po/de.po: Likewise; we will rely on the translation project
10490 to maintain this, so "bootstrap" should get it.
10491 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10492 its value.
10493 * src/main.c (main): Bind the bison-runtime domain, too.
10494
10495 2005-07-12 Bruno Haible <bruno@clisp.org>
10496
10497 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10498 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10499 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10500 * runtime-po: New directory.
10501 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10502 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10503 * runtime-po/Rules-quot: New file, copied from po/.
10504 * runtime-po/quot.sed: Likewise.
10505 * runtime-po/boldquot.sed: Likewise.
10506 * runtime-po/en@quot.header: Likewise.
10507 * runtime-po/en@boldquot.header: Likewise.
10508 * runtime-po/insert-header.sin: Likewise.
10509 * runtime-po/remove-potcdate.sin: Likewise.
10510 * runtime-po/Makevars: New file.
10511 * runtime-po/POTFILES.in: New file.
10512 * runtime-po/LINGUAS: New file.
10513 * runtime-po/bison-runtime.pot: New file.
10514 * runtime-po/de.po: New file.
10515 * m4/bison.m4: New file.
10516 * Makefile.am (SUBDIRS): Add runtime-po.
10517 (aclocaldir, aclocal_DATA): New variables.
10518 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10519 Define aclocaldir.
10520 * src/getargs.c (usage): Document --print-localedir option.
10521 (PRINT_LOCALEDIR_OPTION): New enum item.
10522 (long_options): Add --print-localedir option.
10523 (getargs): Handle --print-localedir option.
10524 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10525 (Internationalization): New section.
10526
10527 2005-07-12 Akim Demaille <akim@epita.fr>
10528
10529 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10530 for consistency with the rest of the code.
10531 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10532 Add separators.
10533
10534 2005-07-12 Akim Demaille <akim@epita.fr>
10535
10536 * src/parse-gram.y: Use %printer instead of YYPRINT.
10537
10538 2005-07-12 Akim Demaille <akim@epita.fr>
10539
10540 * src/symtab.h, src/symtab.c (symbol_print): New.
10541 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10542 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10543
10544 2005-07-12 Akim Demaille <akim@epita.fr>
10545
10546 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10547 b4_at_dollar and b4_dollar_dollar.
10548
10549 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10550
10551 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10552 and Pennello's paper.
10553
10554 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10555
10556 * data/yacc.c (yyparse): Undo previous patch. Instead,
10557 set yylsp[0] and yyvsp[0] only if the initial action
10558 sets yylloc and yylval, respectively.
10559
10560 * data/yacc.c (yyparse): In the initial action, set
10561 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10562 This avoids the use of undefined variables if the initial
10563 action does not set yylloc and/or yylval.
10564
10565 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10566
10567 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10568 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10569 Remove from CVS. These files are automatically generated.
10570 * examples/extexi: Clarify that this file is now part of Bison,
10571 not GNU M4, and that it works with any POSIX-compatible Awk.
10572 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10573 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10574 so that we also get calc++-parser.yy. Geneate it.
10575 Use $(AWK), not gawk, since any conforming Awk will do.
10576 Put comment before action, since older 'make' can't handle comment
10577 in action.
10578 $(BUILT_SOURCES): List all built sources, not just some of them.
10579 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10580 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10581 $($(calc_sources_generated)): Remove unnecessary test for existence
10582 of target. (This had a shell syntax error anyway; a stray "x".)
10583 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10584 calc++-parser.yy.
10585 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10586
10587 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10588 implied by the other modules.
10589
10590 2005-07-06 Akim Demaille <akim@epita.fr>
10591
10592 Bind examples/calc++ to the package.
10593 * examples/calc++/Makefile: Remove, replaced by...
10594 * examples/calc++/Makefile.am: ... this new file.
10595 * examples/calc++/test: Remove input.
10596 * examples/calc++/compile: Remove.
10597 * examples/Makefile.am: New.
10598 * configure.ac, Makefile.am: Adjust.
10599 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10600
10601 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10602
10603 * data/glr.c (yyFail): Drastically simplify; since the format argument
10604 never had any % directives, we can simply pass it to yyerror.
10605 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10606 be modified later, as that is the usual style in glr.c.
10607 Problems reported by Paul Hilfinger.
10608
10609 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10610 and size overflow errors.
10611 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10612 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10613 (YYSIZEMAX): New macro.
10614 (yystpcpy): New function, taken from yacc.c.
10615 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10616 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10617 so that we don't have to maintain their signatures.
10618 (yyFail): Check for buffer overflow, by using vsnprintf rather
10619 than vsprintf. Allocate a bigger buffer if possible.
10620 Report an error if buffer allocation fails.
10621 (yyStackOverflow): New function.
10622 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10623 the initialization was successful. It might fail if storage was
10624 exhausted.
10625 (yyexpandGLRStack): Add more checks for storage allocation failure.
10626 Use yyStackOverflow to report failures.
10627 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10628 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10629 Don't assume stack number fits in int.
10630 (yysplitStack): Check for storage allocation failure.
10631 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10632 can print diagnostics on storage allocation failure. All callers
10633 changed.
10634 (yyresolveValue): Use yybool for boolean.
10635 (yyreportSyntaxError): Check for size-calculation overflow.
10636 This code is taken from yacc.c.
10637 (yyparse): Check for storage allocation errors when allocating
10638 the initial stack.
10639
10640 2005-07-05 Akim Demaille <akim@epita.fr>
10641
10642 Extract calc++ from the documentation.
10643 * doc/bison.texinfo (Calc++): Add the extraction marks.
10644 * examples/extexi: New, from the aborted GNU Programming 2E.
10645 Separate the different paragraph of a file with empty lines.
10646 * examples/Makefile: Use it to extract the whole calc++ example.
10647
10648 2005-06-24 Akim Demaille <akim@epita.fr>
10649
10650 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10651 class typedefs.
10652
10653 2005-06-22 Akim Demaille <akim@epita.fr>
10654
10655 * doc/bison.texinfo (C++ Language Interface): First stab.
10656 (C++ Parsers): Remove.
10657
10658 2005-06-22 Akim Demaille <akim@epita.fr>
10659
10660 * data/lalr1.cc (yylex_): Honor %lex-param.
10661
10662 2005-06-22 Akim Demaille <akim@epita.fr>
10663
10664 Start a set of simple examples.
10665 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10666 * examples/calc++/calc++-driver.hh,
10667 * examples/calc++/calc++-parser.yy,
10668 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10669 * examples/calc++/compile, examples/calc++/test: New.
10670
10671 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10672
10673 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10674 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10675 which stems from the 2005-05-27 patch.
10676
10677 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10678
10679 * data/glr.c: Modify treatment of unused parameters to permit use
10680 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10681
10682 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10683
10684 Fix infringement on user name space reported by Janos Zoltan Szabo.
10685 * data/yacc.c (yyparse): strlen -> yystrlen.
10686
10687 2005-05-30 Akim Demaille <akim@epita.fr>
10688
10689 * data/lalr1.cc (_): New.
10690 Translate the various messages.
10691
10692 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10693
10694 Fix infringement on user name space reported by Bruno Haible.
10695 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10696 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10697 the user's name space.
10698 (alloca): Include <stdlib.h> to get it, if it's not built in.
10699 (YYMALLOC, YYFREE): Define only if needed.
10700 (malloc, free): Declare, but only if needed, as this infringes on
10701 the user name space.
10702
10703 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10704
10705 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10706 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10707 with %d format.
10708 * lib/ebitset.c (min, max): Undef before defining.
10709 * lib/vbitset.c (min, max): Likewise.
10710 * lib/subpipe.c (create_subpipe): Save local variables in case
10711 vfork clobbers them.
10712
10713 2005-05-24 Bruno Haible <bruno@clisp.org>
10714
10715 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10716 error message syntax used by gcc-4.0.
10717
10718 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10719
10720 * README: Mention m4 1.4.3. Remove obsolete advice about
10721 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10722
10723 * bootstrap: Remove workaround for problem I encountered with
10724 gettext 0.14.1; it seems to be fixed now.
10725
10726 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10727
10728 * NEWS: Version 2.0a.
10729
10730 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10731 the previous change.
10732
10733 Various maintainer cleanups.
10734 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10735 conftest*, for benefit of CVS commands run at the same time as
10736 "configure". Add build-aux, since "bootstrap" now creates it and
10737 its subfiles.
10738 * Makefile.cfg (move_if_change): Remove.
10739 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10740 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10741 (po_repo, do-po-update, po-update, wget_files, get-targets):
10742 (config.guess-url_prefix, config.sub-url_prefix):
10743 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10744 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10745 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10746 Remove.
10747 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10748 this is now the recommended name.
10749 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10750 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10751 ylwrap. These files now go into build-aux.
10752 * config/move-if-change: Remove.
10753 * config/prev-version.txt: Bump from 1.75 to 2.0.
10754
10755 * bootstrap: Add stdio-safer, unistd-safer modules.
10756 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10757 we don't need it).
10758 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10759 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10760 * lib/subpipe.c: Include "unistd-safer.h".
10761 (create_subpipe): Make sure all the newly-created
10762 file descriptors are > 2, so that diagnostics don't
10763 get sent down them (which might cause Bison to hang, in theory).
10764 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10765 * src/files.c (xfopen): Use fopen_safer, not fopen.
10766
10767 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10768 yesterday's yacc.c fix.
10769
10770 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10771
10772 * data/glr.c, data/lalr1.cc: Update copyright date.
10773
10774 Fix a destructor bug reported by Wolfgang Spraul in
10775 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10776 * data/yacc.c (yyabortlab): Don't call destructor, and
10777 don't set yychar to EMPTY.
10778 (yyoverflowlab): Don't call destructor.
10779 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10780 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10781 since we no longer output the message "discarding lookahead token
10782 end of input ()".
10783
10784 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10785
10786 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10787 fix a small glitch in debugging output.
10788 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10789 after YY_SYMBOL_PRINT where needed.
10790
10791 (struct yyGLRState): Add some comments.
10792 (struct yySemanticOption): Add some comments.
10793 (union yyGLRStackItem): Add comment.
10794
10795 (yymergeOptionSets): Correct this to properly perform the union,
10796 avoiding infinite reported by Michael Rosien.
10797 Update comment.
10798
10799 * tests/glr-regression.at: Add test for GLR merging error reported
10800 by M. Rosien.
10801
10802 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10803
10804 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10805 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10806 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10807 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10808 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10809 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10810 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10811 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10812 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10813 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10814 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10815 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10816 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10817 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10818 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10819 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10820 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10821 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10822 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10823 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10824 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10825 src/output.h, src/parse-gram.c, src/parse-gram.h,
10826 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10827 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10828 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10829 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10830 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10831 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10832 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10833 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10834 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10835 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10836 tests/reduce.at, tests/regression.at, tests/sets.at,
10837 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10838 Update FSF postal mail address.
10839
10840 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10841
10842 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10843 Problem reported by Ralf Menzel.
10844
10845 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10846
10847 * tests/actions.at: Test that stack overflow invokes destructors.
10848 From Marcus Holland-Moritz.
10849 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10850 from here....
10851 (yyreturn): to here. That way, destructors are called properly
10852 even if the stack overflows, or the user calls YYACCEPT or
10853 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10854 (yyoverflowlab): Destroy the lookahead.
10855
10856 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10857
10858 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10859
10860 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10861
10862 * NEWS: Bison-generated C parsers no longer quote literal strings
10863 associated with tokens.
10864 * src/output.c (prepare_symbols): Don't escape strings,
10865 since users don't want to see C escapes.
10866 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10867 in diagnostics.
10868 * tests/input.at (Torturing the Scanner): Likewise.
10869 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10870
10871 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10872
10873 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10874 the data size is known to be too small and we can't increase it.
10875 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10876
10877 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10878
10879 * src/parse-gram.y: Include quotearg.h.
10880 (string_as_id): Quote $1 before using it as a key, since the
10881 lexer no longer quotes it for us.
10882 (string_content): Don't strip quotes, since lexer no longer
10883 quotes it for us.
10884 * src/scan-gram.l: Include quotearg.h.
10885 ("\""): Omit quote.
10886 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10887 a key, since the rest of the lexer doesn't quote it.
10888 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10889 * tests/regression.at (Token definitions): Check for backslashes
10890 in token strings.
10891
10892 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10893 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10894 (yyparse): Revamp code to generate long syntax error message, to
10895 make it easier to translate, and to avoid problems with arithmetic
10896 overflow. Change "virtual memory" to "memory" in diagnostic, since
10897 we don't know whether the memory is virtual.
10898
10899 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10900
10901 * NEWS: Bison-generated C parsers now use the _ macro to
10902 translate strings.
10903 * data/yacc.c (_) [!defined _]: New macro.
10904 All English strings wrapped inside this macro.
10905 * doc/bison.texinfo (Bison Parser): Document _.
10906 * po/POTFILES.in: Include src/parse-gram.c, since it now
10907 includes translateable strings that parse-gram.y doesn't.
10908
10909 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10910
10911 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10912 reverting the 2004-10-11 change to this function.
10913 (symbol_check_alias_consistency): Don't call symbol_type_set
10914 if the type name is already correct.
10915 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10916
10917 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10918
10919 * tests/regression.at (Token definitions): Don't use a token named
10920 c, as that generates a "#define c ..." that runs afoul of buggy
10921 stdlib.h that uses the identifier c as a member of struct
10922 drand48_data. Problem reported by Horst Wente.
10923
10924 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10925
10926 * bootstrap: Change translation URL from
10927 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10928 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10929 redirection glitches. Problem reported by twlevo@xs4all.nl.
10930
10931 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10932
10933 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10934 after operands; POSIX says this isn't portable for the c99 command.
10935
10936 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10937
10938 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10939 immediately if a data overrun has occurred; this may help us track
10940 down what may be a spurious failure on MacOS.
10941
10942 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10943
10944 Respond to problems reported by twlevo@xs4all.nl.
10945
10946 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10947
10948 * src/vcg.h: Comment fix.
10949 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10950 (G_CMAX): Change to -1 instead of INT_MAX.
10951
10952 * data/yacc.c (yyparse): Omit spaces before #line.
10953
10954 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10955
10956 * src/tables.c (state_number_to_vector_number): Put it inside an
10957 "#if 0", since it's not currently used. Problem reported by
10958 Roland McGrath.
10959
10960 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10961
10962 * src/output.c (escaped_output): Renamed from
10963 escaped_file_name_output, since we now use it for symbol tags as
10964 well. All uses changed.
10965 (symbol_destructors_output, symbol_printers_output):
10966 Escape symbol tags too.
10967 Problem reported by Matyas Forstner in
10968 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10969
10970 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10971 not needed.
10972 * src/output.c (user_actions_output, token_definitions_output,
10973 symbol_destructors_output, symbol_printers_output): Likewise.
10974 * src/reader.c (prologue_augment): Likewise.
10975 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10976
10977 * src/vcg.c (output_edge): Don't quote linestyle arg.
10978 Problem reported by twlevo@xs4all.nl.
10979
10980 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10981
10982 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10983 example, reported by Derek M Jones. Also, make the example even
10984 more outrageous, to better illustrate how bad the problem is.
10985
10986 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10987
10988 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10989 putsym. Typo reported by Sebastian Piping.
10990
10991 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10992
10993 * doc/bison.texinfo (Language and Grammar): some -> same
10994 (Epilogue): int he -> in the
10995 Typos reported by Sebastian Piping via Justin Pence.
10996
10997 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10998
10999 * tests/glr-regression.at (Improper handling of embedded actions
11000 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
11001 embedded actions and $-N in GLR parsers", work around an Autoconf bug
11002 with dollar signs in test names.
11003 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
11004 for a similar reason.
11005
11006 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
11007
11008 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
11009 wants to redefine G_VIEW.
11010
11011 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
11012
11013 * src/vcg.c (get_view_str): Remove case for normal_view.
11014 Problem reported by twlevo@xs4all.nl.
11015
11016 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
11017
11018 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
11019 Problem reported by twlevo@xs4all.nl.
11020
11021 * doc/bison.texinfo: Change @dircategory from "GNU programming
11022 tools" to "Software development". Requested by Richard Stallman
11023 via Karl Berry.
11024
11025 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
11026
11027 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
11028 Problem reported by twlevo@xs4all.nl.
11029
11030 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
11031
11032 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
11033 keyword; it's not needed with modern compilers, and it doesn't
11034 affect correctness with older compilers. Suggested by
11035 twlevo@xs4all.nl.
11036
11037 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
11038
11039 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
11040 gcc -Wswitch-default.
11041 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11042 * data/yacc.c (yyparse): Likewise.
11043
11044 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
11045
11046 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
11047 already. Let config.h define any nonstandard values.
11048
11049 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
11050
11051 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
11052 for the benefit of slower hosts. Problem reported by
11053 Nelson H. F. Beebe.
11054
11055 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
11056
11057 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
11058 being defined and not used.
11059 * data/lalr1.cc (yyparse): Likewise.
11060 Use "if (false)" rather than "if (0)".
11061
11062 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
11063
11064 * TODO: Mention that we should allow NUL bytes in tokens.
11065
11066 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
11067
11068 * src/scan-skel.l (<<EOF>>): Don't close standard output.
11069 Problem reported by Hans Aberg.
11070
11071 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
11072
11073 * src/getargs.c (version): Happy new year; update overall
11074 program copyright date from 2004 to 2005.
11075
11076 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
11077 Problem reported by Hans Aberg.
11078 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
11079 (Output file names.): Add a test for the case when standard output
11080 is closed.
11081
11082 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
11083
11084 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11085 to fix an oversight in the Bison 2.0 manual.
11086
11087 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11088
11089 * NEWS: Version 2.0. Reformat the existing news items since
11090 1.875, so that related items are grouped together.
11091 * configure.ac (AC_INIT): Bump version to 2.0.
11092 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11093
11094 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11095 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11096 otherwise, we're not testing alloca. Unfortunately there's no
11097 simple way to consult HAVE_ALLOCA here.
11098
11099 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11100 for yymsg, too.
11101
11102 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11103 hand. This avoids a warning about comparing int to size_t when
11104 GCC warnings are enabled.
11105
11106 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11107
11108 * NEWS: Bison-generated parsers no longer default to using the
11109 alloca function (when available) to extend the parser stack, due
11110 to widespread problems in unchecked stack-overflow detection.
11111 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11112 responsibility to set it to a positive value. This lets the user
11113 specify a value that is not a preprocessor constant.
11114 * data/yacc.c (YYMAXDEPTH): Likewise.
11115 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11116 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11117 to be a compile-time constant. However, explain the constraints on it.
11118 Also, explain the constraints on YYINITDEPTH.
11119 (Table of Symbols): Explain that alloca is no longer the default.
11120 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11121 to 1.
11122
11123 * doc/bison.texinfo (Location Default Action): Mention that n must
11124 be zero when k is zero. Suggested by Frank Heckenbach.
11125
11126 2004-12-22 Akim Demaille <akim@epita.fr>
11127
11128 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11129 (parser::state_type, parser::semantic_type, parser::location_type):
11130 Private, not public.
11131 (parser::parse): Return ints, not bool.
11132 Returning a bool introduces a problem: 0 corresponds to false, and
11133 it seems weird to return false on success. Returning true changes
11134 the conventions for yyparse.
11135 Alternatively we could return void and send an exception.
11136 There is no clear consensus (yet?).
11137 (state_stack, semantic_stack, location_stack): Rename as...
11138 (state_stack_type, semantic_stack_type, location_stack_type): these.
11139 Private, not public.
11140 * tests/c++.at: New.
11141 * tests/testsuite.at, tests/Makefile.am: Adjust.
11142
11143 2004-12-21 Akim Demaille <akim@epita.fr>
11144
11145 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11146
11147 2004-12-21 Akim Demaille <akim@epita.fr>
11148
11149 Don't impose std::string for filenames.
11150
11151 * data/lalr1.cc (b4_filename_type): New.
11152 (position::filename): Use it.
11153 (parser.hh): Move the inclusion of stack.hh and location.hh below
11154 the user code, so that needed headers for the filename type can be
11155 included first.
11156 Forward declare them before the user code.
11157 * tests/Makefile.am (check-local, installcheck-local): Pass
11158 TESTSUITEFLAGS to the TESTSUITE.
11159
11160 2004-12-20 Akim Demaille <akim@epita.fr>
11161
11162 Use more STL like names: my_class instead of MyClass.
11163
11164 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11165 (SemanticStack, SemanticType, StateStack, StateType)
11166 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11167 (Parser::value): Rename as...
11168 (location_stack, location_type, rhs_number_type, semantic_stack)
11169 (semantic_type, state_stack, state_type, token_number_type, stack)
11170 (slice, traits, parser::yylloc, parser::yylval): these.
11171
11172 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11173
11174 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11175
11176 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11177 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11178
11179 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11180
11181 Remove uses of 'short int' and 'unsigned short int'. This raises
11182 some arbitrary limits. It uses more memory but nowadays that's
11183 not much of an issue.
11184
11185 This change does not affect the generated parsers; that's a different
11186 task, as some users will want to conserve memory there.
11187
11188 Ideally we should use size_t to represent all object counts, and
11189 something like ptrdiff_t to represent signed differences of object
11190 counts; but that will require more code-cleanup than I have the
11191 time to do right now.
11192
11193 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11194 Use size_t, not int or short int, to count objects.
11195 * src/closure.c (nritemset, closure): Likewise.
11196 * src/closure.h (nritemset, closure): Likewise.
11197 * src/nullable.c (nullable_compute): Likewise.
11198 * src/print.c (print_core): Likewise.
11199 * src/print_graph.c (print_core): Likewise.
11200 * src/state.c (state_compare, state_hash): Likewise.
11201 * src/state.h (struct state): Likewise.
11202 * src/tables.c (default_goto, goto_actions): Likewise.
11203
11204 * src/gram.h (rule_number, rule): Use int, not short int.
11205 * src/output.c (prepare_rules): Likewise.
11206 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11207 errs, reductions): Likewise.
11208 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11209 Likewise.
11210 * src/tables.c (vector_number, tally, action_number,
11211 ACTION_NUMBER_MINIMUM): Likewise.
11212 * src/output.c (muscle_insert_short_int_table): Remove.
11213
11214 2004-12-17 Akim Demaille <akim@epita.fr>
11215
11216 * data/lalr1.cc: Extensive Doxygenation.
11217 (error_): Rename as...
11218 (error): this, since it is visible to the user.
11219 Adjust callers.
11220 (Parser::message): Now an automatic variable from...
11221 (Parser::yyreport_syntax_error_): here.
11222 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11223 Parser::error.
11224 * tests/input.at: Escape $.
11225
11226 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11227
11228 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11229 Parenthesize rhs to avoid obscure problems with mistakes like
11230 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11231 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11232 b4_rhs_location): Likewise.
11233 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11234 b4_rhs_location): Likewise.
11235
11236 2004-12-16 Akim Demaille <akim@epita.fr>
11237
11238 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11239 yacc.c: be sure to stay within yycheck_.
11240 * tests/actions.at: Re-enable C++ tests.
11241
11242 2004-12-16 Akim Demaille <akim@epita.fr>
11243
11244 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11245 real.
11246
11247 2004-12-16 Akim Demaille <akim@epita.fr>
11248
11249 Use #define to handle the %name-prefix.
11250
11251 * data/glr.c, data/yacc.c: Comment changes.
11252 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11253 so that one can refer to yylex in the parser file, and have it
11254 renamed, as is the case with other skeletons.
11255
11256 2004-12-16 Akim Demaille <akim@epita.fr>
11257
11258 Move lalr1.cc internals into yy*.
11259
11260 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11261 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11262 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11263 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11264 (empty_, final_, terror_, errcode_, ntokens_)
11265 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11266 (looka_, ilooka_, error_range_, nerrs_):
11267 Rename as...
11268 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11269 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11270 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11271 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11272 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11273 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11274 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11275 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11276 these.
11277
11278 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11279
11280 Fix some problems reported by twlevo at xs4all.
11281 * src/symtab.c (symbol_new): Report an error if the input grammar
11282 contains too many symbols. This is better than calling abort() later.
11283 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11284 (struct node, struct graph):
11285 Rename member expand to stretch. All uses changed.
11286 (struct graph): Remove member layoutalgorithm. All uses removed.
11287 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11288 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11289 All uses changed.
11290 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11291
11292 2004-12-15 Akim Demaille <akim@epita.fr>
11293
11294 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11295 Add more Doxygen comments.
11296 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11297 (report_syntax_error_, translate_): Rename as...
11298 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11299 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11300
11301 2004-12-15 Akim Demaille <akim@epita.fr>
11302
11303 * data/lalr1.cc (lex_): Rename as...
11304 (yylex_): this.
11305 Move the trace here.
11306 Take the %name-prefix into account.
11307 Reported by Alexandre Duret-Lutz.
11308
11309 2004-12-15 Akim Demaille <akim@epita.fr>
11310
11311 Simplify the C++ parser constructor.
11312
11313 * data/lalr1.cc (debug_): Rename as...
11314 (yydebug_): so that the parser's internals are always in the yy*
11315 pseudo namespace.
11316 Adjust uses.
11317 (b4_parse_param_decl): Remove the leading comma as it is now only
11318 called as unique argument list.
11319 (Parser::Parser): Remove the constructor accepting a location and
11320 an initial debugging level.
11321 Remove from the other ctor the argument for the debugging level.
11322 (debug_level_type, debug_level, set_debug_level): New.
11323
11324 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11325 constructor calls.
11326
11327 2004-12-15 Akim Demaille <akim@epita.fr>
11328
11329 Remove b4_root related material: failure experiment
11330 (which goal was to allow to derive from a class).
11331
11332 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11333 definitions and uses.
11334
11335 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11336
11337 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11338 not 2, since it's not portable to subtract 1 from the start of an
11339 array. The new item 0 is never set or used. All uses changed.
11340
11341 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11342 the default definition of YYLLOC_DEFAULT. Problem reported
11343 by Frank Heckenbach.
11344
11345 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11346
11347 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11348 the normal case and one for the error case. Just use the
11349 first one uniformly. Problem reported by Frank Heckenbach.
11350 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11351 use exactly the same macro in both places.
11352 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11353 so that the normal-case YYRHSLOC works for the error case too.
11354 All uses changed.
11355 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11356 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11357 * doc/bison.texinfo (Location Default Action): Don't claim that
11358 we have an array of locations. Use the same macro for both glr
11359 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11360 the index is 0.
11361
11362 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11363
11364 * HACKING: Update email addresses to send announcements to.
11365
11366 * configure.ac (AC_INIT): Bump version to 1.875f.
11367
11368 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11369
11370 * NEWS: Version 1.875e.
11371 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11372
11373 * src/scan-skel.l: Include "complain.h", for "fatal".
11374
11375 * src/relation.h (relation_print, relation_digraph):
11376 Relation sizes are of type relation_node, not size_t (this is
11377 merely a doc fix, since the two types are equivalent).
11378 (relation_transpose): Relation sizes are of type relation_node,
11379 not int.
11380 * src/relation.c: Likewise.
11381 (top, infinity): Now of type relation_node, not int.
11382 (traverse, relation_transpose): Use relation_node, not int.
11383
11384 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11385 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11386 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11387
11388 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11389 specifying whether the test should be skipped. Use it tp
11390 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11391 fail on some hosts, and should be skipped.
11392
11393 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11394
11395 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11396 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11397 unless otherwise specified below.
11398
11399 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11400 to allocate kernel_base, kernel_items, kernel_size, since
11401 they needn't be initialized to 0.
11402 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11403 * src/closure.c (new_closure): Likewise, for itemset.
11404 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11405 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11406 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11407 (build_relations): Likewise for edge, states1, includes.
11408 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11409 * src/reader.c (packgram): Likewise, for ritem, rules.
11410 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11411 * src/relation.c (relation_digraph): Likewise for VERTICES.
11412 (relation_transpose): Likewise for new_R, end_R.
11413 * src/symtab.c (symbols_token_translations_init): Likewise for
11414 token_translations.
11415 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11416 (token_actions): Likewise for yydefact, actrow, conflrow,
11417 conflict_list.
11418 (save_column): Likewise for froms[symno], tos[symno].
11419 (goto_actions): Likewise for state_count.
11420 (pack_table): Likewise for base, pos, check.
11421 (tables_generate): Likewise for width.
11422
11423 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11424 for initial core. Just have a separate core, so we needn't worry
11425 about whether kernel_size and kernel_base are initialized.
11426
11427 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11428 kernel_size, kernel_items): Remove unnecessary initialization.
11429 * src/conflicts.c (conflicts): Likewise.
11430 * src/derives.c (derives): Likewise.
11431 * src/muscle_tablc (muscle_insert): Likewise.
11432 * src/relation.c (relation_digraph): Likewise.
11433 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11434 conflrow, conflict_table, conflict_list, table, check):
11435 Likewise.
11436
11437 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11438 This is because all callers pass unsigned int.
11439 * src/closure.h (new_closure): Likewise.
11440
11441 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11442 (build_relations): Initialize includes[i] in all cases.
11443 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11444 and rules[ruleno].precsym. Initialize members in order.
11445 * src/relation.c (relation_transpose): Always initialize new_R[i]
11446 and end_R[i].
11447 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11448
11449 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11450 conflict_list[0] was always 0, but now it isn't initialized.
11451
11452 * src/table.c (table_grow): When conflict_table grew, the grown
11453 area wasn't cleared. Fix this.
11454
11455 * lib/.cvsignore: Add strdup.c, strdup.h.
11456 * m4/.cvsignore: Add strdup.m4.
11457
11458 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11459
11460 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11461 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11462 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11463 ngotos + 1 without checking for overflow.
11464 (build_relations): Use END_NODE, not -1, to denote end of edges.
11465 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11466 build_relations): Use goto_number, not int, for goto numbers.
11467 * src/tables.c (save_column, default_goto): Likewise.
11468
11469 2004-11-23 Akim Demaille <akim@epita.fr>
11470
11471 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11472 of #defining from yystype.
11473 Don't typedef yystype, C++ does not need it.
11474 This lets it possible to forward declare it as union.
11475
11476 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11477
11478 * bootstrap (gnulib_modules): Add extensions.
11479 Problem reported by Jim Meyering.
11480
11481 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11482
11483 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11484 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11485 src/system.h, src/tables.c: XFREE -> free, to accommodate
11486 recent change to gnulib xalloc.h.
11487 Problem reported by Jim Meyering.
11488
11489 2004-11-17 Akim Demaille <akim@epita.fr>
11490
11491 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11492
11493 2004-11-17 Akim Demaille <akim@epita.fr>,
11494 Alexandre Duret-Lutz <adl@gnu.org>
11495
11496 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11497 changes.
11498 (YYCDEBUG): Adjust.
11499 Use it instead of cdebug_.
11500 (Parser::debug_stream, Parser::set_debug_stream): New.
11501 (Parser::symprint_): Define cdebug_ for temporary backward
11502 compatibility.
11503 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11504 debug_stream ().
11505
11506 2004-11-17 Akim Demaille <akim@epita.fr>
11507
11508 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11509 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11510 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11511 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11512
11513 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11514
11515 * data/glr.c (yyloc_default): Remove; not used.
11516 Problem reported by Frank Heckenbach.
11517
11518 2004-10-25 Akim Demaille <akim@epita.fr>
11519
11520 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11521 Introduce another definition to address simple location arrays.
11522 (yyGLRStack): New member: yyerror_range.
11523 (yyrecoverSyntaxError, yyparse): Update it.
11524 (yyrecoverSyntaxError): Use it when shifting the error token to
11525 have an accurate range, equivalent to the one computed by both
11526 yacc.c and lalr1.cc.
11527 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11528 that column numbers start at column 0, as per GNU Coding
11529 Standards, the others tests, and the doc.
11530 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11531 Adjust to the above change (first column is 0).
11532 And adjust the location of the "<error>", now covering the whole
11533 line.
11534
11535 2004-10-22 Akim Demaille <akim@epita.fr>
11536 and Paul Eggert <eggert@cs.ucla.edu>
11537
11538 Remove some arbitrary limits on goto numbers and relations.
11539 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11540 initial values, since they're never used.
11541 (set_goto_map): ngotos is now unsigned, so test for overflow
11542 by seeing whether it wraps around to zero.
11543 * src/lalr.h (goto_number): Now size_t, not short int.
11544 (GOTO_NUMBER_MAXIMUM): Remove.
11545 * src/relation.c (relation_print, traverse, relation_transpose):
11546 Check for END_NODE rather than looking at sign.
11547 * src/relation.h (END_NODE): New macro.
11548 (relation_node): Now size_t, not short int.
11549
11550 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11551
11552 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11553 keyword, not an identifier. Problem reported by Baron Schwartz in
11554 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11555
11556 2004-10-11 Akim Demaille <akim@epita.fr>
11557
11558 * src/symtab.c (symbol_check_alias_consistency): Also check
11559 type names, destructors, and printers.
11560 Reported by Alexandre Duret-Lutz.
11561 Recode the handling of associativity and precedence in terms
11562 of symbol_precedence_set.
11563 Accept no redeclaration at all, not even equal to the previous
11564 value.
11565 (redeclaration): New.
11566 Use it to factor redeclaration complaints.
11567 (symbol_make_alias): Don't set the type of the alias, let
11568 symbol_check_alias_consistency do it as for other features.
11569 * src/symtab.h (symbol): Add new member prec_location, and
11570 type_location.
11571 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11572 * tests/input.at (Incompatible Aliases): New.
11573
11574 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11575
11576 .cvsignore fixes to accommodate gnulib changes,
11577 and the practice of naming build directories "_build".
11578 * .cvsignore: Add "_*". Sort.
11579 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11580 * m4/.cvsignore: Add "*_gl.m4".
11581
11582 2004-10-06 Akim Demaille <akim@epita.fr>
11583
11584 * src/parse-gram.y (add_param): Fix the truncation of trailing
11585 spaces.
11586
11587 2004-10-05 Akim Demaille <akim@epita.fr>
11588
11589 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11590 whether the reducion was empty or not. This leaves room to
11591 improve the use of YYLLOC_DEFAULT in such a case.
11592 lalr1.cc is still experimental, so changing this is acceptable.
11593 And finally, there are probably not many users who changed the
11594 handling of locations in GLR, so changing is admissible too.
11595
11596 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11597 empty reduction, set @$ to an empty location ending the previously
11598 stacked symbol.
11599 Adjust uses to make sure the code is triggered on empty
11600 reductions.
11601 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11602 expected output: empty reductions have empty locations.
11603
11604 2004-09-29 Akim Demaille <akim@epita.fr>
11605
11606 * data/lalr1.cc: Move towards a more standard C++ coding style
11607 for templates: Class < T > -> Class<T>.
11608
11609 2004-09-29 Akim Demaille <akim@epita.fr>
11610
11611 * data/lalr1.cc: Reinstall the former ctor, for sake of
11612 compatibility, but warn it will be removed.
11613 Move towards a more standard C++ coding style (i.e., type *var ->
11614 type* var).
11615
11616 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11617
11618 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11619 since it's less likely to work if NULs are involved in the future.
11620
11621 2004-09-27 Akim Demaille <akim@epita.fr>
11622
11623 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11624
11625 2004-09-27 Akim Demaille <akim@epita.fr>
11626
11627 * data/lalr1.cc (b4_parse_param_decl_1): New.
11628 (b4_parse_param_decl): Use it to have different names between attribute
11629 and argument names.
11630 (b4_cc_constructor_call): Likewise.
11631
11632 2004-09-24 Akim Demaille <akim@epita.fr>
11633
11634 * src/parse-gram.y (add_param): Strip the leading and trailing
11635 blanks from a formal argument declaration.
11636 (YY_LOCATION_PRINT): New.
11637
11638 2004-09-24 Akim Demaille <akim@epita.fr>
11639
11640 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11641 after the location.
11642
11643 2004-09-24 Akim Demaille <akim@epita.fr>
11644
11645 * doc/bison.texinfo (Table of Symbols): Sort.
11646
11647 2004-09-21 Akim Demaille <akim@epita.fr>
11648
11649 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11650 the useless parentheses.
11651 Suggested by Paul Eggert.
11652
11653 2004-09-20 Akim Demaille <akim@epita.fr>
11654
11655 Let the initial-action act on the look-ahead, and use it for the
11656 "initial push" (corresponding to an hypothetical beginning-of-file).
11657 And let lalr1.cc honor %initial-action.
11658
11659 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11660 example.
11661 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11662 (Parser::Parser): Remove the ctor that used to initialize it.
11663 (Parser::parse): Like in the other skeletons, issue the "starting
11664 parse" message before any action.
11665 Honor %initial-action.
11666 Initialize the stacks with the lookahead.
11667 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11668 look-ahead.
11669 Push them in the stacks.
11670 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11671
11672 2004-09-20 Akim Demaille <akim@epita.fr>
11673
11674 * doc/bison.texinfo (Initial Action Decl): New.
11675
11676 2004-09-20 Akim Demaille <akim@epita.fr>
11677
11678 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11679 clearer criterion to define it.
11680 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11681 When reducing on an empty RHS, use the latest stacked location as
11682 location.
11683 yylloc is not always available.
11684 * data/glr.c: Likewise.
11685 Also, honor initial-actions.
11686
11687 2004-09-20 Akim Demaille <akim@epita.fr>
11688
11689 * data/yacc.c (YY_LOCATION_PRINT): New.
11690 Define when we know YYLTYPE's structure, i.e., when the default
11691 YYLLOC_DEFAULT is used.
11692 * data/c.m4 (b4_yysymprint_generate): Use it.
11693 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11694 value of the result.
11695 (error_start_): Replace with...
11696 (error_range_): this location array.
11697 This allows to replace code relying on the implementation of
11698 locations by portable code.
11699 * data/yacc.c (yylerrsp): Replace with...
11700 (yyerror_range): this.
11701 Every time a token is popped, update yyerror_range[0], to have an
11702 accurate location for the error token.
11703 * data/glr.c (YY_LOCATION_PRINT): New.
11704 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11705 deference a pointer.
11706 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11707 report the location in %printers.
11708
11709 * src/scan-skel.l: Instead of abort, report error messages to ease
11710 understanding skeleton scanning failures.
11711
11712 2004-09-16 Akim Demaille <akim@epita.fr>
11713
11714 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11715 (iterator, const_iterator): these, to be more in the C++ spirit.
11716 Also, return reverse iterators so that when displaying the stack
11717 we display its bottom first.
11718 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11719 from yacc.c.
11720 We should probably use vector here though.
11721
11722 2004-09-16 Akim Demaille <akim@epita.fr>
11723
11724 Have more complete shift traces.
11725
11726 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11727 to report Shifts instead of ad hoc YYDPRINTF invocations,
11728 including for the error token.
11729 * data/lalr1.cc (symprint_): Output the location.
11730 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11731 output the location within the %printer.
11732 Activate GLR tests, at least to make sure they compile properly.
11733 They still don't pass though.
11734 * tests/calc.at: Adjust expect verbose output, since now "Entering
11735 state..." is on a different line than the "Shifting" message.
11736
11737 2004-09-08 Akim Demaille <akim@epita.fr>
11738
11739 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11740 Bison directive from the Bison file to the invocation of this
11741 macro, so that these directives are passed to
11742 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11743 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11744 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11745 the extra Bison directives instead of the whole series.
11746 Change the grammar so that there are recoverable errors, and
11747 unrecoverable errors. Now we can have the parser give up before
11748 consuming the whole input. As a result we now can observe that
11749 the lookahead is freed when needed.
11750 Change the parser source to parse argv[1] instead of a hard coded
11751 string.
11752 Simplify yylex, and give a value and location to EOF.
11753 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11754 passed directives already coded in the file.
11755 Add some tests to check the location of "error".
11756 For some tests, the C++ parser is correct, and not yacc.c.
11757 For other tests, they provide different, but unsatisfying, values,
11758 so keep the C++ value so that at least one parser is "correct"
11759 according to the test suite.
11760 (Actions after errors): Remove, this is subsumed by the
11761 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11762
11763 2004-09-06 Akim Demaille <akim@epita.fr>
11764
11765 * data/lalr1.cc: Adjust the indentation of the labels.
11766 (Parser::pop): New.
11767 Use it.
11768
11769 2004-09-06 Akim Demaille <akim@epita.fr>
11770
11771 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11772 argument, an informative message.
11773 Call YY_SYMBOL_PRINT.
11774 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11775 * data/lalr1.cc (destruct_): Likewise.
11776 In addition, no longer depend on b4_yysymprint_generate and
11777 b4_yydestruct_generate to generate these functions, do it "by
11778 hand".
11779
11780 2004-09-03 Akim Demaille <akim@epita.fr>
11781
11782 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11783 invoked, yydestruct the lookahead.
11784 * tests/calc.at (Calculator $1): Update the expected lengths of
11785 traces: there is an added line for the discarded lookahead.
11786 * doc/bison.texinfo (Destructor Decl): Some rewording.
11787 Define "discarded" symbols.
11788
11789 2004-09-02 Akim Demaille <akim@epita.fr>
11790
11791 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11792
11793 2004-09-02 Akim Demaille <akim@epita.fr>
11794
11795 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11796 (YYDSYMPRINTF): Rename as...
11797 (YY_SYMBOL_PRINT): this.
11798 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11799 two.
11800 Use it instead of direct symprint_ calls.
11801 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11802 one.
11803
11804 2004-09-02 Akim Demaille <akim@epita.fr>
11805
11806 * data/lalr1.cc (b4_yysymprint_generate): New.
11807 (symprint_): New member function, defined when YYDEBUG.
11808 Use it consistently instead of token/nterm debugging output by
11809 hand.
11810 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11811 %printer calls to use cdebug_ when using lalr1.cc.
11812
11813 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11814
11815 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11816 with #ifdef YYDEBUG.
11817
11818 2004-08-26 Akim Demaille <akim@epita.fr>
11819
11820 * doc/bison.texinfo (Implementing Loops): Rename as...
11821 (Implementing Gotos/Loops): this.
11822
11823 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11824
11825 Adjust to latest gnulib.
11826 * bootstrap (gnulib_modules): Add xalloc-die.
11827 Set LC_ALL=C so that file names sort consistently.
11828 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11829 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11830 uintmax_t.m4, ulonglong.m4.
11831 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11832 po.m4 since we are now using _gl.m4 instead.
11833
11834 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11835
11836 * src/scan-action.l: Remove. Scanning of semantic actions is
11837 handled in scan-gram.l.
11838
11839 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11840
11841 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11842
11843 * src/location.h (struct): The file member is a uniqstr.
11844 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11845
11846 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11847
11848 Fix bug with non-%union parsers that have printers or destructors,
11849 which led to a Bison core dump. Reported by Peter Fales in
11850 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11851
11852 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11853 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11854 not to our own type.
11855 * src/output.c (symbol_destructors_output, symbol_printers_output):
11856 Don't assume %union.
11857 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11858 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11859 UNION-FLAG. All callers changed.
11860 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11861 Use type char, not unsigned int, when declaring an array of char;
11862 this lets us remove a cast.
11863 (Printers and Destructors): Add non-%union test cases.
11864
11865 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11866
11867 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11868 GLR writeups. E.g., avoid frenchspacing and the future tense,
11869 change "lookahead" to "look-ahead", and change "wrt" to "with
11870 respect to".
11871
11872 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11873
11874 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11875 New sections, split off from the GLR Parsers section. Put the new
11876 Simple GLR Parser near the start of the GLR section, for clarity.
11877 Rewrite connective text.
11878
11879 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11880
11881 * doc/bison.texinfo (Simple GLR Parsers): New section.
11882
11883 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11884
11885 * NEWS, TODO, doc/bison.texinfo:
11886 Use "look-ahead" instead of "lookahead", to be consistent.
11887 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11888 while we're fixing "look-ahead".
11889 * src/conflicts.c (shift_set): Renamed from shiftset.
11890 (look_ahead_set): Renamed from lookaheadset.
11891 * src/print.c: Likewise.
11892 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11893 name for "lookahead".
11894 (report_types, usage): Likewise.
11895 * src/getargs.h (report_look_ahead_tokens): Renamed from
11896 report_lookaheads.
11897 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11898 compute_lookaheads.
11899 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11900 (look_ahead_tokens_print): Renamed from lookaheads_print.
11901 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11902 state_rule_lookaheads_print.
11903 * src/state.h: Likewise.
11904 (reductions.look_ahead_tokens): Renamed from lookaheads.
11905 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11906 AT_DATA_LOOKAHEADS_GRAMMAR.
11907
11908 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11909
11910 * README: Update location of patched M4 distribution.
11911
11912 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11913
11914 Don't assume the C++ compiler takes the same arguments as the C compiler
11915 (trivial change).
11916 * configure.ac (O0CXXFLAGS): New var.
11917 * tests/atlocal.in (CXXFLAGS): Use it.
11918
11919 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11920
11921 Fix some "make check" problems with C++ reported by
11922 Albert Chin-A-Young for Tru64 C++ in this thread:
11923 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11924
11925 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11926 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11927 Output to a .cc file for C++, not to a .c file.
11928 * tests/calc.at (AT_CHECK_CALC): Likewise.
11929 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11930 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11931
11932 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11933
11934 * tests/calc.at, tests/actions.at: Workaround for SGI
11935 C++ compiler. (trivial change)
11936
11937 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11938
11939 Spent a few hours checking out which prerequisite versions the
11940 current sources actually require. I went all the way back to
11941 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11942 a seemingly endless set of combinations of versions more recent
11943 than that. The bottom line is that the current sources require
11944 fairly recent versions of the build tools, and it'll be some work
11945 to change this.
11946 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11947 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11948 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11949 Add comments explaining why those particular versions are
11950 currently needed.
11951
11952 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11953 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11954 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11955
11956 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11957 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11958
11959 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11960
11961 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11962 0.11.5. Suggested by Bruno Haible.
11963 * bootstrap: Remove gettext version checking.
11964
11965 * doc/bison.texinfo (Decl Summary): Also mention that %union
11966 can depend on prerequisite types. Problem reported by Tim
11967 Van Holder.
11968
11969 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11970
11971 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11972 * README-alpha: Don't tell people not to package this.
11973
11974 * bootstrap: Don't assume $(...) works; use `...` instead.
11975 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11976 gettext better.
11977
11978 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11979 put into the -d output file, and mention what to do if YYSTYPE is
11980 defined as a macro.
11981
11982 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11983
11984 Undo change made earlier today: it caused autopoint to not bring
11985 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11986 autopoint's.
11987
11988 * bootstrap: Check that gettext version matches what's in
11989 configure.ac. Warn users to ignore robots.txt ERROR 404.
11990 * bootstrap: Undo today's earlier change (logged below).
11991 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11992
11993 The gettext version checking is causing more trouble than it's
11994 curing; remove it. Problem reported by Paul Hilfinger.
11995
11996 * bootstrap: Issue a warning that one can expect a message
11997 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11998 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11999
12000 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
12001
12002 Ensure that the C++ compiler used for testing actually works on a
12003 simple test program; if not, skip the C++-related tests. Problem
12004 reported by Vin Shelton in:
12005 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
12006
12007 * m4/cxx.m4: New file.
12008 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
12009 * tests/atlocal.in (BISON_CXX_WORKS): Add.
12010 * tests/local.at (AT_COMPILE_CXX): Use it.
12011
12012 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12013
12014 * data/glr.c (yylloc): Output this macro even if locations are not
12015 being generated, as the GLR parser needs it even in that case.
12016 Problem reported by Troy A. Johnson
12017 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
12018
12019 * configure.ac (AC_INIT): Update to 1.875e.
12020
12021 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12022
12023 * NEWS: Version 1.875d.
12024 * configure.ac (AC_INIT): Likewise.
12025 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
12026
12027 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
12028 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
12029 lalr1.cc runs afoul of the first, and the last two are no longer
12030 supported by GCC 3.4.0.
12031 * README: Mention GNU m4 1.4 or later; mention m4 patches.
12032 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
12033
12034 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
12035
12036 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
12037 unsigned int, for compatibility with latest gnulib hash module.
12038 * src/state.c (state_hash, state_hasher): Likewise.
12039 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
12040 * src/uniqstr.c (hash_uniqstr): Likewise.
12041
12042 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
12043
12044 * NEWS: Unescaped newlines are no longer allowed in char & strings.
12045
12046 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
12047 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
12048 character and string literals.
12049 (unexpected_end): New function.
12050 (unexpected_eof): Use it.
12051 (unexpected_newline): New function.
12052 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
12053 actions.
12054
12055 * NEWS: Document %expect-rr.
12056
12057 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
12058 Fix typo by replacing $1 with $option.
12059 Remove more 'intl'-related files.
12060 Don't DEFUN AM_INTL_SUBDIR twice.
12061
12062 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
12063 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
12064 strtoul.c.
12065 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
12066 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
12067 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
12068 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
12069 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
12070 * src/.cvsignore: Add *.output.
12071
12072 * src/parse-gram.y: Put copyright notice inside %{ %} so it
12073 gets copied to the output file.
12074
12075 2004-04-28 Paul Eggert <eggert@twinsun.com>
12076
12077 Get files from the gnulib and po repositories, instead of relying
12078 on them being in our CVS. Upgrade to latest versions of gnulib
12079 and Automake.
12080
12081 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
12082 * bootstrap: Bootstrap from gnulib and po repositories.
12083 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12084 * README-cvs: Document these changes. Remove version numbers from
12085 mentions of build tools, since they change so often. Mention Flex.
12086
12087 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12088 (gl_USE_SYSTEM_EXTENSIONS): Add.
12089 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12090 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
12091 does this for us.
12092 (AC_ISC_POSIX): Remove; we no longer support this
12093 ancient OS, as it gets in the way of latest Autoconf & gnulib.
12094 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12095 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12096 Do not check for C89 headers, except for locale.h which is used
12097 by the Yacc library and must port to K&R hosts.
12098 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12099 Do not check for C89 functions, except for setlocale which is
12100 used by the Yacc library.
12101 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12102 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12103 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12104 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12105 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12106 AM_GNU_GETTEXT): Remove; now done by:
12107 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12108 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12109 for us.
12110
12111 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12112 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12113 Define to empty, as gnulib.mk will do the rest for us.
12114 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12115 for us.
12116 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12117 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12118
12119 * src/files.c: Include gnulib's xstrndup.h.
12120
12121 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12122 (REALLOC): Use xnrealloc, for likewise.
12123 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12124 (strnlen, memrchr): Remove decls; functions no longer used.
12125 Include <stpcpy.h>.
12126
12127 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12128 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12129 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12130 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12131 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12132 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12133 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12134 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12135 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12136 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12137 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12138 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12139 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12140 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12141 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12142 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12143 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12144 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12145 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12146 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12147 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12148 Remove, as these files are now generated automatically
12149 by bootstrap or automake.
12150
12151 * po/ChangeLog: Remove: all but one entry was a duplicate
12152 of this file, and I moved that 2000-11-02 entry here.
12153
12154 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12155 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12156 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12157 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12158 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12159 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12160 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12161 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12162 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12163 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12164 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12165 xstrndup.h.
12166 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12167 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12168 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12169 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12170 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12171 * src/.cvsignore: Remove *_.c.
12172
12173
12174 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12175 support it. (The latest stable gzip doesn't.)
12176
12177 2004-04-27 Paul Eggert <eggert@twinsun.com>
12178
12179 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12180 case, as stos_ is now used by destructors due to the 2004-02-09
12181 change.
12182
12183 Remove more K&R C support.
12184 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12185 * lib/subpipe.c (errno): Remove decl.
12186 Include <stdlib.h> unconditionally.
12187 (EXIT_FAILURE): Remove macro.
12188 * src/complain.c (vfprintf, strerror): Remove.
12189 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12190 unconditionally.
12191 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12192 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12193 (strchr, strspn, memchr): Remove decls.
12194 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12195 unconditionally. Do not declare perror.
12196 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12197 unconditionally.
12198
12199 * src/complain.c (_): Remove useless defn, as system.h defines this.
12200
12201 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12202 with latest obstack.h.
12203 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12204 to procedure types, as obstack.h now does that for us.
12205 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12206
12207 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12208 so that this include file can stand alone.
12209 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12210 does this now. Include subpipe.h first after config.h, to
12211 test whether it can stand alone.
12212
12213 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12214 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12215 unused declaration.
12216
12217 * tests/synclines.at (%union synch line): Put a dummy member in
12218 the union, because empty unions aren't allowed in C. Caught
12219 by GCC 3.4.0.
12220
12221 2004-04-13 Jim Meyering <jim@meyering.net>
12222
12223 * src/conflicts.c (conflicts_print): Correct format string typo:
12224 use `%%' to produce literal `%'. (trivial change)
12225
12226 2004-03-30 Paul Eggert <eggert@twinsun.com>
12227
12228 * src/getargs.c (version): Update copyright year to 2004.
12229
12230 * data/c.m4 (b4_int_type): Use 'short int' rather than
12231 'short', and similarly for 'long', 'unsigned', etc.
12232 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12233 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12234 yy_yypstack, yydumpstack): Likewise.
12235 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12236 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12237 Likewise.
12238 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12239 yy_stack_print, yyparse): Likewise.
12240 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12241 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12242 * lib/bitset.c (bitset_print): Likewise.
12243 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12244 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12245 * lib/bitsetv.c (bitsetv_dump): Likewise.
12246 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12247 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12248 Likewise.
12249 * src/LR0.c (allocate_itemsets): Likewise.
12250 * src/gram.h (rule_number, rule): Likewise.
12251 * src/lalr.h (goto_number): Likewise.
12252 * src/nullable.c (nullable_compute): Likewise.
12253 * src/output.c (prepare_rules): Likewise.
12254 * src/relation.c (relation_print, relation_digraph): Likewise.
12255 * src/relation.h (relation_node): Likewise.
12256 * src/state.h (state_number, transitions, errs, reductions,
12257 struct state): Likewise.
12258 * src/symtab.h (symbol_number, struct symbol): Likewise.
12259 * src/tables.c (vector_number, tally, action_number,
12260 default_goto, goto_actions): Likewise.
12261 * tests/existing.at (GNU Cim Grammar): Likewise.
12262 * tests/regression.at (Web2c Actions): Likewise.
12263
12264 * src/output.c (muscle_insert_short_int_table): Renamed from
12265 muscle_insert_short_table. All uses changed.
12266
12267 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12268
12269 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12270 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12271 Add %expect-rr rule.
12272
12273 * src/scan-gram.l: Recognize %expect-rr.
12274
12275 * src/conflicts.h (expected_sr_conflicts): Rename from
12276 expected_conflicts.
12277 (expected_rr_conflicts): Declare.
12278
12279 * src/conflicts.c (expected_sr_conflicts): Rename from
12280 expected_conflicts.
12281 (expected_rr_conflicts): Define.
12282 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12283 for GLR parsers.
12284 Use expected_sr_conflicts in place of expected_conflicts.
12285 Warn if expected_rr_conflicts used in non-GLR parser.
12286
12287 * doc/bison.texinfo: Add documentation for %expect-rr.
12288
12289 2004-03-08 Paul Eggert <eggert@gnu.org>
12290
12291 Add support for hex token numbers. Suggested by Odd Arild Olsen in
12292 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
12293
12294 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12295 in lalr1.cc.
12296 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12297 * src/scan-gram.l (scan_integer): New function.
12298 ({int}): Use it.
12299 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12300 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12301 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12302 Say "long int", not "long", for uniformity with GNU style.
12303
12304 2004-02-25 Paul Eggert <eggert@twinsun.com>
12305
12306 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12307 compilers. This fixes a problem with Intel's C++ compiler being
12308 chatty, reported by Guido Trentalancia in
12309 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
12310
12311 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12312
12313 Support %destructor and merge error locations in lalr1.cc.
12314
12315 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12316 (Parser::stos_): Define unconditionally.
12317 (Parser::destruct_): New method. Generate its body with
12318 b4_yydestruct_generate.
12319 (Parser::error_start_): New attribute.
12320 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12321 token which are discarded.
12322 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12323 error_start_ when erroneous token are discarded.
12324 (Parser::parse) <yyerrlab1>: Compute the location of the error
12325 token so that it covers all the discarded tokens.
12326 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12327 it can be called with `%skeleton "lalr1.cc"', and do that.
12328
12329 2004-02-02 Paul Eggert <eggert@twinsun.com>
12330
12331 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12332 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12333 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12334 There's no need to mention top_builddir since Automake does that
12335 for us.
12336 (INCLUDES): Remove, as Automake says it's obsolescent.
12337 Contents migrated into AM_CPPFLAGS as described above.
12338 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12339
12340 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12341
12342 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12343 (yyreportSyntaxError): Handle case where lookahead token is
12344 YYEMPTY.
12345
12346 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12347
12348 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12349 resulting parsers are compilable with C++.
12350
12351 2003-12-23 Paul Eggert <eggert@twinsun.com>
12352
12353 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12354 * src/output.c (output_skeleton): Rename local var.
12355 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12356 Bison tokens, as this runs afoul of the 2003-10-07 change that
12357 disallowed NUL bytes in character constants or string literals.
12358
12359 * tests/local.at: Require Autoconf 2.59's Autotest.
12360 * tests/testsuite.at: Don't include local.at, since we now assume
12361 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12362 including it.
12363 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12364 multiple inclusion warnings.
12365
12366 2003-12-02 Akim Demaille <akim@epita.fr>
12367
12368 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12369 conditions.
12370 From Bruno Haible.
12371
12372 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12373
12374 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12375
12376 2003-10-07 Paul Eggert <eggert@twinsun.com>
12377
12378 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12379 if testsuite doesn't exist.
12380
12381 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12382 literals, unfortunately.
12383 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12384 Complain about NUL bytes in character constants or string literals.
12385
12386 2003-10-05 Paul Eggert <eggert@twinsun.com>
12387
12388 * NEWS: Don't document %no-default-prec, as it's still
12389 too experimental.
12390 * doc/bison.texinfo: Document %no-default-prec only if
12391 the defaultprec flag is set. Normally it's not.
12392
12393 2003-10-04 Paul Eggert <eggert@twinsun.com>
12394
12395 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12396 non-modifiable lvalue, instead of a modifiable one.
12397 * doc/bison.texinfo (Actions): Document that $$ can
12398 be assigned to. Do not claim that $$ and $N are
12399 array element references: user code should not rely on this.
12400
12401 2003-10-01 Paul Eggert <eggert@twinsun.com>
12402
12403 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12404 (grammar_declaration): Use it.
12405 * src/scan-gram.l: New token %no-default-prec.
12406 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12407 * NEWS, doc/bison.texinfo: Document the above.
12408
12409 2003-10-01 Akim Demaille <akim@epita.fr>
12410
12411 VCG no longer supports long_straight_phase.
12412
12413 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12414 * src/print_graph.c (print_graph): Adjust.
12415
12416 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
12417 and Paul Eggert <eggert@twinsun.com>
12418
12419 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12420 Table of Symbols): Document %default-prec.
12421 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12422 (grammar_declaration): Set default_prec on %default-prec.
12423 * src/scan-gram.l (%default-prec): New token.
12424 * src/reader.h (default_prec): New flag.
12425 * src/reader.c: Likewise.
12426 (packgram): Handle it.
12427 * tests/conflicts.at (%default-prec without %prec,
12428 %default-prec with %prec, %default-prec 1): New tests.
12429
12430 2003-09-30 Paul Eggert <eggert@twinsun.com>
12431
12432 * tests/testsuite.at: Include local.at, not input.at, fixing
12433 a typo in the 2003-08-25 patch.
12434
12435 2003-08-27 Akim Demaille <akim@epita.fr>
12436
12437 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12438 GCC warnings.
12439
12440 2003-08-26 Akim Demaille <akim@epita.fr>
12441
12442 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12443 "<\#" to avoid magic from Gnus when posting parts of this script.
12444
12445 2003-08-26 Akim Demaille <akim@epita.fr>
12446
12447 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12448 (Parser::parse): here.
12449 Adjust: nerrs and errstatus is now replaced by...
12450 (Parser::nerrs_, Parser::errstatus_): New.
12451
12452 2003-08-25 Akim Demaille <akim@epita.fr>
12453
12454 * config/announce-gen, Makefile.cfg: New.
12455 * Makefile.am: Adjust.
12456 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12457 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12458
12459 2003-08-25 Akim Demaille <akim@epita.fr>
12460
12461 When reducing initial empty rules, Bison parser read an initial
12462 location that is not defined. This results in garbage, and that
12463 affects Bison's own parser. Therefore we need (i) to extend Bison
12464 to support a means to initialize this location, and (ii) to use
12465 this CVS Bison to fix CVS Bison's parser.
12466
12467 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12468 with...
12469 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12470 * src/parse-gram.y: Adjust.
12471 (%initial-action): New.
12472 (%error-verbose): Since we require CVS Bison, there is no reason
12473 not to use it.
12474 * src/scan-gram.l: Adjust.
12475 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12476 * data/yacc.c (yyparse): Use b4_initial_action.
12477
12478 2003-08-25 Akim Demaille <akim@epita.fr>
12479
12480 * doc/bison.texinfo: Don't promote stdout for error messages.
12481
12482 2003-08-25 Akim Demaille <akim@epita.fr>
12483
12484 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12485 From Alexandre Duret-Lutz.
12486
12487 2003-08-25 Akim Demaille <akim@epita.fr>
12488
12489 Version 1.875c.
12490
12491 2003-08-25 Akim Demaille <akim@epita.fr>
12492
12493 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12494 Use them.
12495
12496 2003-08-25 Akim Demaille <akim@epita.fr>
12497
12498 * data/lalr1.cc (Parser::reduce_print_): New.
12499 Use it.
12500
12501 2003-08-25 Akim Demaille <akim@epita.fr>
12502
12503 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12504 error recovery loops. This patch is based on
12505 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12506 Also, augment the similarity between lalr1.cc and yacc.c.
12507 Note: the locations of error recovery rules are not correct yet.
12508
12509 * data/lalr1.cc: Comment changes to augment the similarity between
12510 lalr1.cc and yacc.c.
12511 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12512 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12513 yyerrlab), when hitting EOF, pop the whole stack here instead of
12514 merely falling thru the default error handling mechanism.
12515 (yyerrorlab): New label, with the old contents of YYERROR,
12516 plus the following change: pop the stack of rhs corresponding
12517 to the production that invoked YYERROR. That is how Yacc
12518 behaves (required by POSIX).
12519 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12520 fail.
12521
12522 2003-08-25 Akim Demaille <akim@epita.fr>
12523
12524 Tune local.at so that people can "autom4te -l autotest calc.at -o
12525 calc" for instance, to extract a sub test suite.
12526
12527 * tests/testsuite.at: Move the initialization, Autotest version
12528 requirement, and AT_TESTED invocation into...
12529 * tests/local.at: here.
12530 * tests/testsuite.at: Include it for compatibility with Autoconf
12531 2.57.
12532 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12533 be ignore.
12534
12535 2003-08-04 Paul Eggert <eggert@twinsun.com>
12536
12537 Rework code slightly to avoid gcc -Wtraditional warnings.
12538 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12539 The returned value is now stored in *YY0. All callers changed.
12540 * src/output.c (merge_output): Adjust to the above change.
12541
12542 2003-07-26 Paul Eggert <eggert@twinsun.com>
12543
12544 * data/glr.c (YYASSERT): New macro.
12545 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12546 yyresolveStates, yyprocessOneStack):
12547 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12548 Derived from a suggestion by Frank Heckenbach.
12549
12550 2003-07-25 Paul Eggert <eggert@twinsun.com>
12551
12552 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12553 for portability to K&R C (after ansi2knr, presumably). See
12554 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12555 by Frank Heckenbach, though I have omitted the structure-initialization
12556 part of his glr-knr.diff patch since I recall that the Portable
12557 C Compiler didn't require that change.
12558
12559 Let the user specify how to allocate and free memory.
12560 Derived from a suggestion by Frank Heckenbach in
12561 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12562 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12563 All uses of free, malloc, realloc changed to use these macros,
12564 and unnecessary casts removed.
12565 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12566
12567 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12568
12569 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12570 use s.empty() rather than s == "" to test for empty string; see
12571 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12572 (trivial change)
12573
12574 2003-06-25 Akim Demaille <akim@epita.fr>
12575
12576 * config/depcomp, config/install-sh: Update from masters.
12577
12578 2003-06-20 Paul Eggert <eggert@twinsun.com>
12579
12580 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12581 and return properly parenthesized result.
12582 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12583 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12584 Remove unnecessary parentheses from uses.
12585 * doc/bison.texinfo (Location Default Action): Describe the
12586 conventions for parentheses.
12587
12588 2003-06-19 Paul Eggert <eggert@twinsun.com>
12589
12590 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12591 yyreportTree): Do not assume that size_t is the same width as int,
12592 when printing sizes. Print sizes using an unsigned format.
12593 Problem reported by Frank Heckenbach in
12594 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12595
12596 Port to Forte Developer 7 C compiler.
12597 * data/glr.c (struct YYLTYPE): If locations are not being used,
12598 declare a single dummy member, as empty structs do not conform
12599 to the C standard.
12600 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12601 the Forte Developer 7 C compiler complains that end-of-loop
12602 code is not reached.
12603
12604 2003-06-17 Paul Eggert <eggert@twinsun.com>
12605
12606 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12607 avoid warnings from picky compilers about redefinition of PARAMS.
12608
12609 2003-06-17 Paul Eggert <eggert@twinsun.com>
12610
12611 Version 1.875b.
12612
12613 * NEWS: Document 1.875b.
12614
12615 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12616 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12617 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12618 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12619 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12620 per recent gettext manual's suggestion.
12621 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12622 Use prototypes, not old-style definitions.
12623 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12624 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12625 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12626 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12627 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12628 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12629 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12630 vbitset_or_and_cmp, vbitset_copy): Likewise.
12631
12632 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12633 Do not include <stdlib.h>.
12634 (PARAMS): Define unconditionally for C89.
12635 (ATTRIBUTE_NORETURN): Remove.
12636 (ATTRIBUTE_UNUSED): Define unconditionally.
12637
12638 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12639 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12640 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12641 * lib/vbitset.c, lib/vbitset.h: New files.
12642 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12643 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12644 from libbitset.
12645
12646 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12647 `How Can I Reset @code{yyparse}', since texinfo does not allow
12648 arbitrary @ in node names.
12649
12650 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12651 shouldn't be needed according to the gettext 0.12.1 documentation
12652 but which seem to be needed anyway: codeset.m4 glibc21.m4
12653 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12654 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12655 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12656
12657 * lib/.cvsignore: Add stdbool.h.
12658 * m4/.cvsignore: Add nls.m4, po.m4.
12659
12660 Upgrade to CVS gnulib.
12661 * stdbool_.h: File renamed from stdbool.h.in.
12662 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12663 AC_HEADER_STDBOOL.
12664 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12665 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12666 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12667 (MOSTLYCLEANFILES): New var.
12668 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12669 (stdbool.h): New rule.
12670 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12671 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12672 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12673 m4/quote.m4: Upgrade to today's gnulib.
12674
12675 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12676 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12677 the tests right now.
12678 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12679 yyerror are declared before use; C99 requires this.
12680
12681 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12682
12683 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12684 first.
12685 (yyrecoverSyntaxError): Correct the logic for setting and testing
12686 yyerrState.
12687 Correct comment on handling EOF.
12688 Allow states with only a default reduction, rather than failing
12689 (I can't quite reconstruct why these were not allowed before).
12690
12691 Fixes to avoid problem that $-N rules in GLR parsers can cause
12692 buffer overruns, corrupting state.
12693
12694 * src/output.c (prepare_rules): Output max_left_semantic_context
12695 definition.
12696 * src/reader.h (max_left_semantic_context): New variable declaration.
12697 * src/scan-gram.l (max_left_semantic_context): Define.
12698 (handle_action_dollar): Update max_left_semantic_context.
12699 * data/glr.c (YYMAXLEFT): New definition.
12700 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12701 (yyresolveAction): Ditto.
12702
12703 Fixes to problems with location handling in GLR parsers reported by
12704 Frank Heckenbach (2003/06/05).
12705
12706 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12707 (YYRHSLOC): Add parentheses, and define only if locations used.
12708 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12709 locations not used.
12710 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12711 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12712
12713 * tests/cxx-type.at: Exercise location information; update tests
12714 to differentiate output with and without locations.
12715 Remove forward declarations of yylex and yyerror---caused errors
12716 because default YYLTYPE not yet defined.
12717 Change semantic actions to compute strings, rather than printing
12718 them directly (to test proper passing of semantics values). Change
12719 output to prefix notation and update test data and expected results.
12720 (yylex): Track locations.
12721 (stmtMerge): Return value rather than printing, and include arguments
12722 in value.
12723
12724 2003-06-03 Paul Eggert <eggert@twinsun.com>
12725
12726 Avoid warnings generated by GCC 2.95.4 when Bison is
12727 configured with --enable-gcc-warnings.
12728 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12729 yy::]b4_parser_class_name[::translate_,
12730 yy::Stack::operator[] (unsigned),
12731 yy::Stack::operator[] (unsigned) const,
12732 yy::Slice::operator[] (unsigned),
12733 yy::Slice::operator[] (unsigned) const):
12734 Rename local vars to avoid warnings.
12735 * tests/glr-regression.at (Improper handling of embedded actions
12736 and $-N in GLR parsers): Remove unused local variable from yylex.
12737 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12738 (void) as arg when not pure, since we now assume C89 when building
12739 Bison. Pacify GCC by using parameter.
12740
12741 2003-06-02 Paul Eggert <eggert@twinsun.com>
12742
12743 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12744 yy::Location::lines, yy::Location::columns): Rename arguments
12745 to avoid shadowing; this removes a warning generated by GCC 3.3.
12746
12747 2003-06-01 Paul Eggert <eggert@twinsun.com>
12748
12749 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12750 to g++, as GCC 3.3 complains if you do it.
12751 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12752 everything that WARNING_CFLAGS has, except omit warnings
12753 not suitable for C++.
12754 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12755 * tests/atlocal.in (CXXFLAGS): New var.
12756 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12757
12758 Fix a GLR parser bug I reported in February; see
12759 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12760 The problem was that GLR parsers did not conform to the C standard,
12761 because actions like { $1 = $2 + $3; } expanded to expressions
12762 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12763 to a local variable. The C standard says that expressions
12764 like (var = f ()) + (var = f ()) have undefined behavior.
12765 Another problem was that GCC sometimes issues warnings that
12766 yyfill and its parameters are unused.
12767
12768 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12769 as possibly unused.
12770 (yyfill): New function.
12771 (YYFILL): Use it.
12772 (yyuserAction): Change type of yynormal to bool, so that it matches
12773 the new yyfill signature. Mark it as possibly unused.
12774
12775
12776 Follow up on a bug I reported in February, where a Bison-generated
12777 parser can loop. Provide a test case and a fix for yacc.c. I
12778 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12779 The original bug report is in:
12780 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12781
12782 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12783 macro's size was becoming unwieldy.
12784 (yyerrlab): Do not discard an empty lookahead symbol, as this
12785 might destroy garbage.
12786 (yyerrorlab): New label, with the old contents of YYERROR,
12787 plus the following change: pop the stack of rhs corresponding
12788 to the production that invoked YYERROR. That is how Yacc
12789 behaves, and POSIX requires this behavior.
12790 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12791 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12792 Define 'alarm' to do nothing if unistd.h is not available.
12793 Add a new rule "exp: '-' error;" to test the above change to
12794 data/yacc.c. Use 'alarm' to abort any test taking longer than
12795 10 seconds, as it's probably looping.
12796 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12797 Also, the new yacc.c generates two fewer diagnostics for an
12798 existing test.
12799
12800 2003-05-24 Paul Eggert <eggert@twinsun.com>
12801
12802 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12803 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12804 This fixes a problem reported by John Bowman when the Compaq/HP
12805 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12806 -ansi -Wall -gall).
12807 * data/yacc.c (union yyalloc): Likewise.
12808 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12809
12810 Switch from 'int' to 'bool' where that makes sense.
12811
12812 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12813 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12814 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12815 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12816 Return or accept bool, not int. All callers changed.
12817 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12818 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12819 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12820 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12821 bitset_or_and_cmp_): Likewise.
12822 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12823 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12824 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12825 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12826 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12827 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12828 bitset_stats_or_and_cmp): Likewise.
12829 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12830 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12831 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12832 ebitset_xor_cmp): Likewise.
12833 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12834 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12835 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12836 lbitset_xor_cmp): Likewise.
12837 * lib/bbitset.h: Include <stdbool.h>.
12838 (struct bitset_vtable): The following members now return bool, not
12839 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12840 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12841 or_and_cmp).
12842 * src/conflicts.c (count_rr_conflicts): Likewise.
12843 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12844 All uses changed.
12845 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12846 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12847 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12848 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12849 graph_flag): Likewise.
12850 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12851 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12852 graph_flag): Likewise.
12853 * src/output.c (error_verbose): Likewise.
12854 * src/output.h (error_verbose): Likewise.
12855 * src/reader.c (start_flag, typed): Likewise.
12856 * src/reader.h (typed): Likewise.
12857 * src/getargs.c (LOCATIONS_OPTION): New constant.
12858 (long_options, getargs): Use it.
12859 * src/lalr.c (build_relations): Use bool, not int.
12860 * src/nullable.c (nullable_compute): Likewise.
12861 * src/print.c (print_reductions): Likewise.
12862 * src/tables.c (action_row, pack_vector): Likewise.
12863 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12864 * src/output.c (prepare): Use it.
12865 * src/output.c (token_definitions_output,
12866 symbol_destructors_output, symbol_destructors_output): Use string,
12867 not boolean integer, to keep track of whether to output separator.
12868 * src/print_graph.c (print_core): Likewise.
12869 * src/state.c (state_rule_lookaheads_print): Likewise.
12870
12871 * config/install-sh: Sync from automake 1.7.5.
12872
12873 2003-05-14 Paul Eggert <eggert@twinsun.com>
12874
12875 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12876 semicolon after a grammar declaration, in the interest of possible
12877 future changes to the Bison input language.
12878 Do not allow a stray semicolon at the start of the grammar.
12879 (rhses.1): Allow one or more semicolons after any rule, including
12880 just before "|" as required by POSIX.
12881 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12882 grammar.
12883
12884 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12885
12886 %parse-param support for lalr1.cc.
12887
12888 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12889 b4_cc_constructor_calls, b4_cc_constructor_call,
12890 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12891 definitions.
12892 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12893 parse-param arguments.
12894 (yy::b4_parser_class_name): Declare instance variables to
12895 hold parse-param arguments.
12896 * tests/calc.at: s/value/semantic_value/ because value clashes
12897 with a member of yy::b4_parser_class_name. Adjust C++ code
12898 to handle %parse-param. Enable %parse-param test in C++.
12899
12900 2003-05-12 Paul Eggert <eggert@twinsun.com>
12901
12902 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12903 English a bit. Fix fclose typo. Change "const char" to "char
12904 const", and use ANSI C rather than K&R for "main". Suggest
12905 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12906 and suggest yy_switch_to_buffer.
12907
12908 2003-05-05 Paul Eggert <eggert@twinsun.com>
12909
12910 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12911 C89. This avoids a diagnostic on compilers that define __STDC__
12912 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12913 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12914
12915 2003-05-03 Paul Eggert <eggert@twinsun.com>
12916
12917 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12918 Do not overrun array bounds.
12919 This should fix a bug reported today by Olatunji Oluwabukunmi in
12920 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12921
12922 2003-04-29 Akim Demaille <akim@epita.fr>
12923
12924 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12925 * src/getargs.c, src/getargs.h: here, as bool, not int.
12926 (nondeterministic_parser): New.
12927 * src/parse-gram.y, src/scan-gram.l: Support
12928 %nondeterministic-parser.
12929 * src/output.c (prepare): Use nondeterministic_parser instead
12930 of glr_parser where appropriate.
12931 * src/tables.c (conflict_row, action_row, save_row)
12932 (token_actions, token_actions, pack_vector): Ditto.
12933
12934 2003-04-29 Akim Demaille <akim@epita.fr>
12935
12936 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12937
12938 2003-04-29 Akim Demaille <akim@epita.fr>
12939
12940 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12941 with %pure-parser and %locations to exercise the patch from Yakov
12942 Markovitch below.
12943
12944 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12945
12946 * data/yacc.c: (b4_lex_param): Corrected for the case where
12947 %lex-param is provided and %pure-parser isn't.
12948
12949 2003-04-27 Paul Eggert <eggert@twinsun.com>
12950
12951 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12952 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12953 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12954 if it is not defined.
12955 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12956
12957 2003-04-26 Paul Eggert <eggert@twinsun.com>
12958
12959 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12960 Declare to be of type suitable for the ninf value itself, not of
12961 type suitable for the corresponding table, since the latter might
12962 be unsigned but the ninf value might be negative. This fixes a
12963 bug reported by Alexandre Duret-Lutz in
12964 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12965
12966 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12967 invokes it. We shouldn't invoke it twice because it will attempt
12968 to put error.o in the archive twice. This fixes a glitch reported
12969 by Martin Mokrejs in
12970 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12971
12972 2003-04-21 Paul Eggert <eggert@twinsun.com>
12973
12974 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12975 to gnulib.
12976
12977 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12978
12979 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12980 Fix obvious typo that results in uncompilable GLR parsers
12981 when both %pure-parser and %locations are used. (trivial change)
12982
12983 2003-04-17 Paul Eggert <eggert@twinsun.com>
12984
12985 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12986 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12987 Do not insert the expected token via unput, as this runs afoul
12988 of a POSIX-compatibility bug in flex 2.5.31.
12989 All uses changed to BEGIN the parent state,
12990 since we no longer insert the expected token via unput.
12991 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12992 that is no longer emitted after the above change.
12993
12994 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12995 the first one. This change is from Paul Hilfinger, and it fixes
12996 regression reported by Werner Lemberg in
12997 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12998
12999 (resolve_sr_conflict): Don't invoke state_errs_set
13000 unless one or more tokens have been explicitly made errors.
13001 Otherwise, the above change causes Bison to abort.
13002
13003 * tests/existing.at (GNU pic Grammar): New test case, taken from
13004 Lemberg's email.
13005
13006 2003-03-31 Akim Demaille <akim@epita.fr>
13007
13008 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
13009
13010 2003-03-31 Akim Demaille <akim@epita.fr>
13011
13012 * src/output.c (prepare_symbols): Avoid trailing spaces in the
13013 output.
13014
13015 2003-03-31 Akim Demaille <akim@epita.fr>
13016
13017 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
13018 From Paul Hilfinger.
13019
13020 2003-03-29 Akim Demaille <akim@epita.fr>
13021
13022 * m4/error.m4: Do not put under dynamic conditions some code which
13023 expansion is under static control.
13024
13025 2003-03-29 Akim Demaille <akim@epita.fr>
13026
13027 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
13028
13029 2003-03-29 Akim Demaille <akim@epita.fr>
13030
13031 * doc/bison.texinfo (Strings are Destroyed): New.
13032
13033 2003-03-13 Paul Eggert <eggert@twinsun.com>
13034
13035 * .cvsignore: Add configure.lineno.
13036 * src/.cvsignore: Add yacc.
13037 * tests/.cvsignore: Add testsuite.log.
13038 * doc/fdl.texi: Sync with latest FSF version.
13039
13040 2003-03-12 Paul Eggert <eggert@twinsun.com>
13041
13042 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
13043 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
13044 cursor, instead of leaving it undefined. This fixes a bug
13045 reported by Tim Van Holder in
13046 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
13047 * tests/input.at (Torturing the Scanner): Test the scanner on
13048 an empty input file, which was Tim Van Holder's test case.
13049
13050 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
13051 <sys/resource.h> can be included, include sys/time.h and
13052 sys/times.h first, if available. This works around the SunOS
13053 4.1.4 porting bug reported by Bruce Becker in
13054 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
13055
13056 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
13057 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
13058 AC_HEADER_SYS_WAIT.
13059
13060 Merge changes from gnulib. This was prompted because the CVS
13061 snapshot didn't build on Solaris 7 due to strnlen problems.
13062
13063 These changes need to be merged back into gnulib:
13064 * lib/hash.c: Include <stdbool.h> unconditionally.
13065 * m4/onceonly.m4 (m4_quote): New macro.
13066 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
13067 Quote AC_FOREACH variable-expansions properly.
13068 The 2003-01-03 obstack.h change also needs merging.
13069 {end of changes requiring merging}
13070
13071 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13072 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
13073 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
13074 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
13075 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
13076 New files, imported from gnulib.
13077 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
13078 above.
13079
13080 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
13081 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
13082 gnulib sources.
13083
13084 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13085 Add.
13086 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13087 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13088 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13089 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13090 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13091 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13092 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13093 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13094 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13095 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13096 (jm_PREREQ_ARGMATCH): Remove.
13097 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13098 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13099
13100 * src/system.h: Include <stdbool.h> unconditionally.
13101
13102 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13103 assuming at least C89 in the bitset code for some time now.
13104
13105 2003-03-03 Akim Demaille <akim@epita.fr>
13106
13107 * ro.po: New.
13108
13109 2003-03-02 Akim Demaille <akim@epita.fr>
13110
13111 * doc/bison.texinfo (Table of Symbols): Reactivate the
13112 documentation for %lex-param, and %parse-param.
13113
13114 2003-03-02 Akim Demaille <akim@epita.fr>
13115
13116 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13117 generate verbose error messages.
13118 Use the number of tokens as an upper bound in yytname, as it
13119 cannot be a non terminal.
13120
13121 2003-03-02 Akim Demaille <akim@epita.fr>
13122
13123 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13124 message.
13125
13126 2003-03-02 Akim Demaille <akim@epita.fr>
13127
13128 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13129 Use them to exercise yycheck overrun.
13130 Based on Andrew Suffield's grammar.
13131
13132 2003-03-02 Akim Demaille <akim@epita.fr>
13133
13134 Create tests/local.at for Bison generic testing macros.
13135
13136 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13137 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13138 This new file.
13139 * tests/calc.at (AT_CHECK_CALC): Adjust.
13140 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13141 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13142 * tests/local.at: here.
13143 (AT_COMPILE_CXX): Tags the tests using it as c++.
13144 Ignore the test if CXX is not functional.
13145
13146 2003-03-01 Paul Eggert <eggert@twinsun.com>
13147
13148 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13149 not loc->end, since loc->end might contain garbage and this leads
13150 to undefined behavior on some platforms.
13151 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13152 depend on *loc, so that the reader doesn't give the the false
13153 impression that *loc is initialized.
13154 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13155 does not survive the return.
13156
13157 2003-03-01 Akim Demaille <akim@epita.fr>
13158
13159 * src/scan-gram.l (code_start): Always initialize it when entering
13160 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13161 yylex invocation. An alternative would be making it static, but
13162 then it starts with the second %%'s beginning, instead of its end.
13163
13164 2003-02-28 Paul Eggert <eggert@twinsun.com>
13165
13166 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13167 around a UnixWare 7.1.1 porting bug reported by John Hughes in
13168 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
13169
13170 2003-02-26 Paul Eggert <eggert@twinsun.com>
13171
13172 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13173 Remove Sequent/Pyramid discussion (nobody uses them any more).
13174 Merge VMS and MS-DOS discussion; these ports may well be dead
13175 but let's keep mentioning them for now. Put <> around email
13176 addresses. Add copyright notice.
13177
13178 2003-02-24 Paul Eggert <eggert@twinsun.com>
13179
13180 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13181 to avoid collision with flex use of yylineno.
13182 Problem reported by Bruce Lilly in
13183 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
13184 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13185 * data/yacc.c (yy_reduce_print): Likewise.
13186
13187 * config/depcomp: Sync with Automake 1.7.3.
13188
13189 2003-02-21 Akim Demaille <akim@epita.fr>
13190
13191 * data/lalr1.cc: Use temporary variables instead of casts to
13192 change integer types.
13193 Suggested by Paul Eggert.
13194
13195 2003-02-21 Akim Demaille <akim@epita.fr>
13196
13197 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13198 to avoid confusions with lalr1.cc's notion of Position.
13199 Suggested by Paul Eggert.
13200
13201 2003-02-20 Akim Demaille <akim@epita.fr>
13202
13203 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13204 before initial_columns.
13205 (location.hh): Use consistent variable names when defining the
13206 operator<<.
13207 Use "last" so that we subtract from Positions, not from unsigned.
13208
13209 2003-02-20 Akim Demaille <akim@epita.fr>
13210
13211 * data/lalr1.cc (position.hh): New subfile, including the extended
13212 and Doxygen'ed documentation of class Position.
13213 (location.hh): Use it.
13214 Document a` la Doxygen.
13215 With the help of Benoit Perrot.
13216
13217 2003-02-20 Akim Demaille <akim@epita.fr>
13218
13219 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13220 AT_YACC_IF.
13221 Redefine AT_YYERROR_SEES_LOC_IF using it.
13222 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13223 not defined.
13224 Don't use the location in yy::Parser::error_ and
13225 yy::Parser::print_ when not %locations.
13226 Activate more lalr1.cc tests.
13227
13228 2003-02-19 Akim Demaille <akim@epita.fr>
13229
13230 * data/lalr1.cc: When displaying a line number, be sure to make it
13231 an int.
13232
13233 2003-02-19 Akim Demaille <akim@epita.fr>
13234
13235 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13236 Remove, useless.
13237 (YYABORT, YYACCEPT, YYERROR): New.
13238 * tests/calc.at: Renable the lalr1.cc test.
13239
13240 2003-02-19 Akim Demaille <akim@epita.fr>
13241
13242 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13243 error recovery, mixing with/without pops and discarding of the
13244 lookahead.
13245 Exercise YYERROR.
13246 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13247
13248 2003-02-17 Paul Eggert <eggert@twinsun.com>
13249
13250 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13251 * tests/testsuite.at (AT_COMPILE): Use them.
13252 This fixes the testsuite problem reported by Robert Lentz in
13253 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
13254
13255 2003-02-12 Paul Eggert <eggert@twinsun.com>
13256
13257 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13258 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
13259 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
13260 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13261 Check for malloc failure, for consistency with yacc.c.
13262 (yytname_size): Remove, for consistency with yacc.c.
13263
13264 The bug still remains in data/lalr1.cc, as I didn't have time
13265 to fix it there.
13266
13267 2003-02-06 Akim Demaille <akim@epita.fr>
13268
13269 * configure.ac (GXX): Rename as...
13270 (CXX): this, to keep the original Autoconf semantics.
13271 Require 2.57.
13272 * data/lalr1.cc: Fix b4_copyright invocations.
13273 If YYDEBUG is not defined, don't depend upon name_ being defined.
13274 (location.hh): Include string and iostream.
13275 (Position::filename): New member.
13276 (Position::Position ()): New.
13277 (operator<< (Position)): New.
13278 (operator- (Position, int)): New.
13279 (Location::first, Location::last): Rename as...
13280 (Location::begin, Location::end): these, to mock the conventional
13281 iterator names.
13282 (operator<< (Location)): New.
13283 * tests/atlocal.in (CXX): New.
13284 * tests/testsuite.at (AT_COMPILE_CXX): New.
13285 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13286 locations in a more synthetic way.
13287 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13288 lalr1.cc is used.
13289 Adjust the C locations to match those from Emacs: first column is
13290 column 0.
13291 Change all the expected results.
13292 Conform to the GCS: simplify the locations when applicable.
13293 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13294 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13295 these CPP macros with the m4 macros new defined by...
13296 (AT_CHECK_PUSHDEFS): this, i.e.:
13297 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
13298 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
13299 New macros.
13300 (AT_CHECK_POPDEFS): Undefine them.
13301 (AT_CHECK_CALC_LALR1_CC): New.
13302 Use it for the first lalr1.cc test.
13303
13304 2003-02-04 Akim Demaille <akim@epita.fr>
13305
13306 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13307 Location as is defined.
13308
13309 2003-02-04 Akim Demaille <akim@epita.fr>
13310
13311 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13312 name_ being defined.
13313
13314 2003-02-03 Paul Eggert <eggert@twinsun.com>
13315
13316 * src/gram.h (start_symbol): Remove unused decl.
13317
13318 Use more-consistent naming conventions for local vars.
13319
13320 * src/derives.c (derives_compute): Change type of local var from
13321 int to rule_number.
13322 * src/gram.c (grammar_rules_partial_print): Likewise.
13323 * src/print.c (print_core): Likewise.
13324 * src/reduce.c (reduce_grammar_tables): Likewise.
13325
13326 * src/gram.c (grammar_dump): Change name of item_number *
13327 local var from r to rp.
13328 * src/nullable.c (nullable_compute): Likewise.
13329
13330 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13331
13332 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13333 for symbol or symbol_number var.
13334 * src/reader.c (grammar_start_symbol_set): Likewise.
13335 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13336 Likewise.
13337 * src/state.c (transitions_to): Likewise.
13338 * src/state.h: Likewise.
13339 * src/tables.c (symbol_number_to_vector_number): Likewise.
13340
13341 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13342 char * var.
13343
13344 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13345 var.
13346
13347 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13348 var.
13349
13350 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13351 Use str, not s, for char * var. Use ch, not c, for character var.
13352 Use size for size var.
13353
13354 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13355 char * var.
13356 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13357 uniqstr var.
13358 * src/uniqstr.h: Likewise.
13359
13360 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13361 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13362 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13363 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13364 param to have same name as that of enum, so that we don't use
13365 "s" to stand for a non-state.
13366
13367 2003-02-02 Akim Demaille <akim@epita.fr>
13368
13369 * src/scan-skel.l: Scan more than one inert character per yylex
13370 invocation.
13371
13372 2003-02-01 Paul Eggert <eggert@twinsun.com>
13373
13374 Version 1.875a.
13375
13376 * po/LINGUAS: Add ms.
13377
13378 2003-01-30 Akim Demaille <akim@epita.fr>
13379
13380 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13381
13382 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13383
13384 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13385 of $1.
13386
13387 Changes in response to error report by S. Eken: GLR mode does not
13388 handle negative $ indices or $ indices in embedded rules correctly.
13389 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13390
13391 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13392 (b4_rhs_location): Ditto.
13393 (yyfill): New function to copy from stack tree into array
13394 incrementally.
13395 (yyuserAction): Modify to allow incremental move of semantic values
13396 to rhs array when in GLR mode.
13397 Define YYFILL to use in user-defined actions to fill semantic array
13398 as needed.
13399 Remove dummy use of yystack, as there is now a guaranteed use.
13400 (yydoAction): Modify to allow incremental move of semantic values
13401 to rhs array when in GLR mode.
13402 (yyresolveAction): Ditto.
13403 (yyglrShiftDefer): Update comment.
13404 (yyresolveStates): Use X == NULL for pointers, not !X.
13405 (yyglrReduce): Ditto.
13406 (yydoAction): Ditto
13407
13408 * tests/glr-regr1.at: Rename to ...
13409 * tests/glr-regression.at: Add new regression test for the problems
13410 described above (adapted from S. Eken).
13411 Update copyright notice.
13412 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13413 * tests/Makefile.am: Ditto.
13414
13415 2003-01-28 Paul Eggert <eggert@twinsun.com>
13416
13417 * data/lalr1.cc: Do not use @output_header_name@ unless
13418 b4_defines_flag is set. This fixes two bugs reported by
13419 Tim Van Holder in
13420 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13421 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13422
13423 2003-01-21 Paul Eggert <eggert@twinsun.com>
13424
13425 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13426 we don't need to worry about yyerrlab1 being reported as an
13427 "unused label" by non-GCC C compilers. The downside is that if
13428 locations are used then a couple of statements are duplicated each
13429 time YYERROR is invoked, but the upside is that the warnings
13430 should vanish.
13431 (yyerrlab1): Move code to YERROR.
13432 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13433 This reverts some of the 2002-12-27 change.
13434
13435 2003-01-17 Paul Eggert <eggert@twinsun.com>
13436
13437 * src/output.c (symbol_printers_output): Fix typo that led
13438 to core dump. Problem reported by Antonio Rus in
13439 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13440
13441 2003-01-13 Akim Demaille <akim@epita.fr>,
13442 Quoc Peyrot <chojin@lrde.epita.fr>,
13443 Robert Anisko <anisko_r@lrde.epita.fr>
13444
13445 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13446 when the stacks contain one element, as the loop would otherwise
13447 free the last state, and then use the top state (the one we just
13448 popped). This means that the initial elements will not be freed
13449 explicitly, as is the case in yacc.c; it is not a problem, as
13450 these elements have fake values.
13451
13452 2003-01-11 Paul Eggert <eggert@twinsun.com>
13453
13454 * NEWS: %expect-violations are now just warnings, reverting
13455 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13456 bootstrapping problem reported by Matthias Klose; see
13457 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13458 * src/conflicts.c (conflicts_print): Likewise.
13459 * tests/conflicts.at (%expect not enough, %expect too much,
13460 %expect with reduce conflicts): Likewise.
13461 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13462 that the warning is enabled if the number of conflicts changes
13463 (not necessarily increases).
13464
13465 * src/getargs.c (version): Update copyright year.
13466
13467 2003-01-09 Akim Demaille <akim@epita.fr>
13468
13469 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13470
13471 2003-01-08 Paul Eggert <eggert@twinsun.com>
13472
13473 * Makefile.maint (WGETFLAGS):
13474 New macro, containing "-C off" to disable proxy caches.
13475 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13476 (rel-check): Use $(WGET) instead of wget.
13477
13478 2003-01-06 Paul Eggert <eggert@twinsun.com>
13479
13480 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13481 the GLR paper of Scott, Johnstone and Hussain.
13482
13483 2003-01-04 Paul Eggert <eggert@twinsun.com>
13484
13485 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13486 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13487 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13488 (EXTRA_LIBRARIES): New var, for liby.a.
13489 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13490 (EXTRA_SCRIPTS): New var, for yacc.
13491
13492 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13493 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13494 Problem reported by Nelson H. F. Beebe.
13495
13496 2003-01-03 Paul Eggert <eggert@twinsun.com>
13497
13498 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13499 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13500 when compiling Bison 1.875's `bitset bset = obstack_alloc
13501 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13502
13503 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13504 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13505 grow to a huge size with typical invocation.
13506
13507 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13508 Use the pattern recommended by Autoconf 2.57, except also protect
13509 against double-definition.
13510 * src/system.h: Likewise.
13511 Portability issues reported by Nelson H. F. Beebe.
13512
13513 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13514 All uses changed. Provide a definition in both C and C++.
13515 (yytrue, yyfalse): Define even if defined (__cplusplus).
13516
13517 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13518 Reported by Nelson H. F. Beebe.
13519
13520 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13521
13522 2003-01-02 Paul Eggert <eggert@twinsun.com>
13523
13524 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13525 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13526 Bug reported by Nelson H. F. Beebe.
13527
13528 2003-01-01 Paul Eggert <eggert@twinsun.com>
13529
13530 * Version 1.875.
13531
13532 2002-12-30 Paul Eggert <eggert@twinsun.com>
13533
13534 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13535 Moved here from...
13536 (<INITIAL>","): Here. This causes stray "," to be treated
13537 more uniformly.
13538
13539 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13540 last brace in braced code when not in Yacc mode, for compatibility
13541 with Bison 1.35. This resurrects the 2001-12-15 patch to
13542 src/reader.c.
13543
13544 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13545 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13546
13547 2002-12-28 Paul Eggert <eggert@twinsun.com>
13548
13549 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13550 that of SYM's type. This fixes Debian bug 168069, reported by
13551 Thomas Olsson.
13552
13553 2002-12-28 Paul Eggert <eggert@twinsun.com>
13554
13555 Version 1.75f.
13556
13557 Switch back to the Yacc style of conflict reports, undoing some
13558 of the 2002-07-30 change.
13559 * doc/bison.texinfo (Understanding): Use Yacc style for
13560 conflict reports. Also, use new way of locating rules.
13561 * src/conflicts.c (conflict_report):
13562 Renamed from conflict_report_yacc, removing the old
13563 'conflict_report'. Translate the entire conflict report at once,
13564 so that we don't assume that "," has the same interpretation in
13565 all languages.
13566 (conflicts_output): Use Yacc-style conflict report for each state,
13567 instead of our more-complicated style.
13568 (conflicts_print): Use Yacc-style conflict report, except print
13569 the input file name when not emulating Yacc.
13570 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13571 Conflicted Reduction, %expect not enough, %expect too much,
13572 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13573 * tests/existing.at (GNU Cim Grammar): Likewise.
13574 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13575
13576 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13577 fatal): Don't invoke fflush; it's not needed and it might even be
13578 harmful for stdout, as stdout might not be open.
13579 * src/reduce.c (reduce_print): Likewise.
13580
13581 2002-12-27 Paul Eggert <eggert@twinsun.com>
13582
13583 Fix a bug where error locations were not being recorded correctly.
13584 This problem was originally reported by Paul Hilfinger in
13585 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13586
13587 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13588 top of the location stack's error locations.
13589 (yyerrlab): Set it. When discarding a token, push its location
13590 onto yylerrsp so that we don't lose track of the error's end.
13591 (yyerrlab1): Now is only the target of YYERROR, so that we can
13592 properly record the location of the action that failed. For GCC
13593 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13594 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13595 (yyerrlab2): New label, which yyerrlab now falls through to.
13596 Compute the error's location by applying YYLLOC_DEFAULT to
13597 the locations of all the symbols that went into the error.
13598 * doc/bison.texinfo (Location Default Action): Mention that
13599 YYLLOC_DEFAULT is also invoked for syntax errors.
13600 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13601 Error locations include the locations of all the tokens that were
13602 discarded, not just the last token.
13603
13604 2002-12-26 Paul Eggert <eggert@twinsun.com>
13605
13606 * src/files.c: Include quote.h.
13607 (compute_output_file_names): Warn if we detect conflicting
13608 outputs to the same file. This should catch the misunderstanding
13609 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13610
13611 * src/conflicts.c (conflicts_print): If the user specifies
13612 "%expect N", report an error if there are any reduce/reduce
13613 conflicts. This is what the manual says should happen.
13614 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13615 * tests/conflicts.at (%expect with reduce conflicts): New test.
13616
13617 Don't use m4_include on relative file names, as it doesn't work as
13618 desired if there happens to be a file with that name under ".".
13619
13620 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13621 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13622 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13623 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13624 * src/output.c (output_skeleton): Use full path names when
13625 specifying a file to include; don't rely on include path, as
13626 it's unreliable when the working file contains a file with
13627 that name.
13628
13629 2002-12-25 Paul Eggert <eggert@twinsun.com>
13630
13631 Remove obsolete references to bison.simple and bison.hairy.
13632 Problem mentioned by Aubin Mahe in
13633 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13634 * data/glr.c: Comment fix.
13635 * doc/bison.1: Remove references. Also, mention "yacc".
13636
13637 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13638 with -g option.
13639
13640 * src/parse-gram.y (declaration): Use enum "report_states" rather
13641 than its numeric value 1.
13642
13643 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13644 opening a new one. This fixes Debian bug 165349, reported by
13645 Bruce Stephens.
13646
13647 2002-12-24 Paul Eggert <eggert@twinsun.com>
13648
13649 Version 1.75e.
13650
13651 * Makefile.maint (cvs-update): Don't assume that the shell
13652 supports $(...), as Solaris sh doesn't.
13653
13654 * src/parse-gram.y (lloc_default): Remove test for empty
13655 nonterminals at the end, since it didn't change the result.
13656
13657 2002-12-24 Paul Eggert <eggert@twinsun.com>
13658
13659 If the user does not define YYSTYPE as a macro, Bison now declares it
13660 using typedef instead of defining it as a macro. POSIX requires this.
13661 For consistency, YYLTYPE is also declared instead of defined.
13662
13663 %union directives can now have a tag before the `{', e.g., the
13664 directive `%union foo {...}' now generates the C code
13665 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13666 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13667 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13668 instead of `yyltype'.
13669
13670 `yystype' and `yyltype' are now obsolescent macros instead of being
13671 typedefs or tags; they are no longer documented and will be
13672 withdrawn in a future release.
13673
13674 * data/glr.c (b4_location_type): Remove.
13675 (YYSTYPE): Renamed from yystype.
13676 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13677 (struct YYLTYPE): Renamed from struct yyltype.
13678 (YYLTYPE): Renamed from yyltype.
13679 (yyltype, yystype): New (and obsolescent) macros,
13680 for backward compatibility.
13681 * data/yacc.c: Likewise.
13682
13683 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13684 does not specify a union tag. This is for compatibility with
13685 Solaris 9 yacc.
13686
13687 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13688 const *, since it is now modified by stripping surrounding { }.
13689 (current_braced_code): Remove.
13690 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13691 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13692 trailing " {...}". Now of type <chars>.
13693 (grammar_declaration): Adjust to bundled tokens.
13694 (code_content): Remove; stripping is now done by add_param.
13695 (print_token_value): Print contents of bundled tokens.
13696 (token_name): New function.
13697
13698 * src/reader.h (braced_code, current_braced_code): Remove.
13699 (token_name): New decl.
13700
13701 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13702 token_type, not braced_code code_kind. All uses changed.
13703 (SC_PRE_CODE): New state, for scanning after a keyword that
13704 has (or usually has) an immediately-following braced code.
13705 (token_type): New local var, to keep track of which token type
13706 to return when scanning braced code.
13707 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13708 <INITIAL>"%parse-param", <INITIAL>"%printer",
13709 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13710 instead of returning a token type immediately.
13711 (<INITIAL>"{"): Set token type.
13712 (<SC_BRACED_CODE>"}"): Use it.
13713 (handle_action_dollar, handle_action_at): Now returns bool
13714 indicating success. Fail if ! current_rule; this prevents a core dump.
13715 (handle_symbol_code_dollar, handle_symbol_code_at):
13716 Remove; merge body into caller.
13717 (handle_dollar, handle_at): Complain in invalid contexts.
13718
13719 * NEWS, doc/bison.texinfo: Document the above.
13720 * NEWS: Fix years and program names in copyright notice.
13721
13722 2002-12-17 Paul Eggert <eggert@twinsun.com>
13723
13724 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13725 Reporting, Table of Symbols): Omit mentions of %lex-param and
13726 %parse-param from the documentation for now.
13727
13728 2002-12-15 Paul Eggert <eggert@twinsun.com>
13729
13730 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13731 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13732 lookahead symbol, and which sets yychar in parser actions) and it
13733 disagreed with the Bison documentation. Bug
13734 reported by Andrew Walrond.
13735
13736 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13737 as the caller now does that.
13738 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13739 (YYEMPTY): Parenthesize right hand side, since others use it.
13740 (yyparse): Don't assume that our generated code is the only code
13741 that sets yychar.
13742
13743 2002-12-13 Paul Eggert <eggert@twinsun.com>
13744
13745 Version 1.75d.
13746
13747 POSIX requires a "yacc" command.
13748 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13749 (MOSTLYCLEANFILES): Add yacc.
13750 (yacc): New rule.
13751 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13752 as an alias for bison y.
13753
13754 * po/LINGUAS: Add da.
13755
13756 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13757 problem with latest <getopt.h>.
13758 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13759
13760 * doc/fdl.texi: Upgrade to 1.2.
13761 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13762 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13763 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13764 gnulib.
13765 * config/install-sh: Sync with autotools.
13766
13767 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13768 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13769 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13770 locations are requested.
13771 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13772 locations are requested.
13773
13774 2002-12-12 Paul Eggert <eggert@twinsun.com>
13775
13776 Remove unportable casts and storage allocation tricks.
13777 While we're at it, remove almost all casts, since they
13778 usually aren't needed and are a sign of trouble.
13779
13780 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13781
13782 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13783 the pointer DSET returned by malloc; this isn't portable.
13784 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13785 Similarly for DERIVES.
13786 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13787 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13788 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13789
13790 * src/derives.c (derives_compute): Do not bother invoking
13791 int_of_rule_number, since rule numbers are integers.
13792
13793 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13794 rather than XMALLOC (char, N).
13795
13796 * src/files.c (filename_split): Rewrite to avoid cast.
13797
13798 * src/gram.h (symbol_number_as_item_number,
13799 item_number_as_symbol_number, rule_number_as_item_number,
13800 item_number_as_rule_number):
13801 Now inline functions rather than macros, to avoid casts.
13802 * src/state.h (state_number_as_int): Likewise.
13803 * src/tables.c (state_number_to_vector_number,
13804 symbol_number_to_vector_number): Likewise.
13805
13806 * src/gram.h (int_of_rule_number): Remove; no longer used.
13807
13808 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13809 since the resulting storage is always stored into.
13810
13811 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13812 where it's needed.
13813
13814 * src/muscle_tab.c (muscle_m4_output):
13815 Now inline. Return bool, not int.
13816 * src/state.c (state_compare): Likewise.
13817 * src/symtab.c (symbol_check_defined,
13818 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13819 hash_compare_symbol, hash_symbol):
13820 Likewise.
13821 * src/uniqstr.c (uniqstr_print): Likewise.
13822 * src/muscle_tab.c (muscle_m4_output_processor):
13823 New function, to avoid casts.
13824 * src/state.c (state_comparator, stage_hasher): Likewise.
13825 * src/symtab.c (symbol_check_defined_processor,
13826 symbol_check_alias_consistency_processor, symbol_pack_processor,
13827 symbol_translation_processor, hash_symbol_comparator,
13828 hash_symbol_hasher): Likewise.
13829 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13830 * src/muscle_tab.c (muscles_m4_output):
13831 Use new functions instead of casting old functions unportably.
13832 * src/state.c (state_hash_new): Likewise.
13833 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13834 symbols_token_translations_init):
13835 Likewise.
13836 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13837
13838 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13839 var instead of casting to long, to avoid casts.
13840 (prepare_states): Use MALLOC rather than alloca, so that we don't
13841 have to worry about alloca.
13842 * src/state.c (state_hash_lookup): Likewise.
13843
13844 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13845 local var instead of casting to unsigned char, to avoid casts.
13846
13847 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13848 STATE_ALLOC): Remove.
13849 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13850 rather than calloc, and use offsetof to avoid allocating slightly
13851 too much storage.
13852 (state_new): Initialize all members.
13853
13854 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13855
13856 * src/symtab.c (symbol_free): Remove; unused.
13857 (symbol_get): Remove cast in lhs of assignment.
13858 (symbols_do): Now static. Accept generic arguments, not
13859 hashing-related ones.
13860
13861 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13862 (symbol_processor): Remove.
13863 (symbols_do): Remove decl; now static.
13864
13865 * src/system.h (alloca): Remove; decl no longer needed.
13866 (<stddef.h>): Include, for offsetof.
13867 (<inttypes.>, <stdint.h>): Include if available.
13868 (uintptr_t): New type, if system lacks it.
13869 (CALLOC, MALLOC, REALLOC): New macros.
13870 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13871 new macros.
13872
13873 * src/tables.c (table_size): Now int, to pacify GCC.
13874 (table_grow, table_ninf_remap): Use signed table size.
13875 (save_row): Don't bother initializing locals when not needed.
13876 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13877 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13878
13879 * src/vcg.h: Correct misspellings.
13880
13881 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13882
13883
13884 * src/getargs.c (getargs): Don't assume EOF == -1.
13885
13886 2002-12-09 Paul Eggert <eggert@twinsun.com>
13887
13888 Change identifier spellings to avoid collisions with names
13889 that are reserved by POSIX.
13890
13891 Don't use names ending in _t, since POSIX reserves them.
13892 For consistency, remove _e and _s endings -- they're weren't
13893 needed to remove ambiguity. All uses changed.
13894 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13895 turn was just renamed from struniq_t.
13896 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13897 which in turn was just renamed from struniq_processor_t.
13898 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13899 in turn was renamed from hash_compare_struniq_t.
13900 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13901 (state_list): Renamed from state_list_t.
13902 * src/assoc.h (assoc): Renamed from assoc_t.
13903 * src/conflicts.c (enum conflict_resolution): Renamed from
13904 enum conflict_resolution_e.
13905 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13906 (rule_list): Renamed from rule_list_t.
13907 * src/getargs.h (enum trace): Renamed from enum trace_e.
13908 (enum report): Renamed from enum report_e.
13909 * src/gram.h (item_number): Renamed from item_number_t.
13910 (rule_number): Renamed from rule_number_t.
13911 (struct rule_s): Remove the "rule_s" part; not used.
13912 (rule): Renamed from rule_t.
13913 (rule_filter): Renamed from rule_filter_t.
13914 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13915 (goto_list): Renamed from goto_list_t.
13916 * src/lalr.h (goto_number): Renamed from goto_number_t.
13917 * src/location.h (location): Renamed from location_t.
13918 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13919 and moved here from:
13920 * src/muscle_tab.h (muscle_entry_t): here.
13921 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13922 (rule_list): Renamed from rule_list_t.
13923 * src/print_graph.c (static_graph): Renamed from graph.
13924 * src/reader.h (braced_code): Renamed from braced_code_t.
13925 Remove brace_code_e tag.
13926 * src/relation.h (relation_node): Renamed from relation_node_t.
13927 (relation_nodes): Renamed from relation_nodes_t.
13928 (relation): Renamed from relation_t.
13929 * src/state.h (state_number): Renamed from state_number_t.
13930 (struct state): Renamed from struct state_s.
13931 (state): Renamed from state_t.
13932 (transitions): Renamed from transitions_t. Unused (and
13933 misspelled) transtion_s tag removed.
13934 (errs): Renamed from errs_t. Unused errs_s tag removed.
13935 (reductions): Renamed from reductions_t. Unused tag
13936 reductions_s removed.
13937 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13938 (struct symbol_list): Renamed from struct symbol_list_s.
13939 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13940 (struct symbol): Renamed from struct symbol_s.
13941 (symbol): Renamed from symbol_t.
13942 * src/tables.c (vector_number): Renamed from vector_number_t.
13943 (action_number): Renamed from action_t.
13944 * src/tables.h (base_number): Renamed from base_t.
13945 * src/vcg.h (enum color): Renamed from enum color_e.
13946 (enum textmode): Renamed from enum textmode_e.
13947 (enum shape): Renamed from enum shape_e.
13948 (struct colorentry): Renamed from struct colorentry_s.
13949 (struct classname): Renamed from struct classname_s.
13950 (struct infoname): Renamed from struct infoname_s.
13951 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13952 (enum decision): Renamed from enum decision_e.
13953 (enum orientation): Renamed from enum orientation_e.
13954 (enum alignment): Renamed from enum alignment_e.
13955 (enum arrow_mode): Renamed from enum arrow_mode_e.
13956 (enum crossing_type): Renamed from enum crossing_type_e.
13957 (enum view): Renamed from enum view_e.
13958 (struct node): Renamed from struct node_s.
13959 (node): Renamed from node_t.
13960 (enum linestyle): Renamed from enum linestyle_e.
13961 (enum arrowstyle): Renamed from enum arrowstyle_e.
13962 (struct edge): Renamed from struct edge.
13963 (edge): Renamed from edge_t.
13964 (struct graph): Renamed from struct graph_s.
13965 (graph): Renamed from graph_t.
13966 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13967 Rename value_t -> value.
13968 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13969 value_t_as_yystype -> value_as_yystype.
13970
13971 Don't include <errno.h> in the mainstream code, since it
13972 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13973 * lib/get-errno.c, lib/get-errno.h: New files.
13974 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13975 get-errno.c.
13976 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13977 * src/output.c (output_skeleton): Likewise.
13978 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13979 instead of errno.
13980 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13981 Likewise.
13982 (handle_action_dollar, handle_action_at): Likewise.
13983 * src/system.h: Do not include <errno.h>.
13984 (TAB_EXT): Renamed from EXT_TAB.
13985 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13986
13987 Avoid str[a-z]*, since <string.h> reserves that name space.
13988 Change all instances of "struniq" in names to "uniqstr", and
13989 likewise for "STRUNIQ" and "UNIQSTR".
13990 * src/uniqstr.c: Renamed from src/struniq.c.
13991 * src/uniqstr.h: Renamed from src/struniq.h.
13992 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13993 * src/files.c (strsuffix): Remove; unused.
13994 (concat2): Renamed from stringappend. Now static.
13995 * src/files.h (strsuffix, stringappend): Remove; unused.
13996 * src/parse-gram.y (<chars>): Renamed from <string>.
13997 (<uniqstr>): Renamed from <struniq>.
13998 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13999 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
14000 (struct graph_s.expand): Renamed from struct graph_s.stretch.
14001 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
14002 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
14003 (N_EXPAND): Renamed from N_STRETCH.
14004
14005 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
14006 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
14007 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
14008 Remove; unused.
14009 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
14010 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
14011 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
14012 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
14013 (BASE_MAXIMUM): Renamed from BASE_MAX.
14014 (BASE_MINIMUM): Renamed from BASE_MIN.
14015 (ACTION_MAX): Remove; unused.
14016 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
14017 Unnecessary casts removed from above defines.
14018
14019
14020 Fix misspelling in names.
14021 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
14022 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
14023 G_NODE_ALIGNEMENT.
14024
14025
14026 * lib/timevar.c (timevar_report): Renamed from time_report,
14027 for consistency with other names.
14028 * lib/timevar.h (timevar_report): New decl.
14029 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
14030
14031
14032 Sort include-file uses.
14033
14034 Reorder all include files under src to be in the order "system.h".
14035 then the ../lib include files in angle brackets (alphabetized),
14036 then the . include files in double-quotes (alphabetized). Fix
14037 dependency breakages encountered in this process, as follows:
14038 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
14039 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
14040 * src/state.h: Include "symtab.h".
14041
14042 2002-12-08 Paul Eggert <eggert@twinsun.com>
14043
14044 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
14045 since this causes problems when __file__ contains character
14046 sequences like "@" that are treated specially by src/scan-skel.l.
14047 Instead, just use the file's basename. This fixes the bug
14048 reported by Martin Mokrejs in
14049 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
14050
14051 2002-12-06 Paul Eggert <eggert@twinsun.com>
14052
14053 Add support for rules that do not have trailing semicolons, as
14054 POSIX requires. Improve the quality of locations in Bison
14055 diagnostics.
14056
14057 * src/location.c: Include <quotearg.h>.
14058 (empty_location): Now const.
14059 (location_print): New function. Follow the recommendation of the
14060 GNU Coding Standards for locations that span file boundaries.
14061 * src/location.h: Do not include <quotearg.h>; no longer needed.
14062 (boundary): New type.
14063 (location_t): Use it. This allows locations to span file boundaries.
14064 All member uses changed: file -> start.file or end.file (as needed),
14065 first_line -> start.line, first_column -> start.column,
14066 last_line -> end.line, last_column -> end.column.
14067 (equal_boundaries): New function.
14068 (LOCATION_RESET, LOCATION_STEP): Remove.
14069 (LOCATION_PRINT): Remove. All callers changed to use location_print.
14070 (empty_location): Now const.
14071 (location_print): New decl.
14072 * src/parse-gram.y (lloc_default): New function, which handles
14073 empty locations more accurately.
14074 (YYLLOC_DEFAULT): Use it.
14075 (%token COLON): Remove.
14076 (%token ID_COLON): New token.
14077 (rules): Use it.
14078 (declarations, rules): Remove trailing semicolon.
14079 (declaration, rules_or_grammar_declaration):
14080 Allow empty (";") declaration.
14081 (symbol_def): Remove empty actions; no longer needed.
14082 (rules_or_grammar_declaration): Remove trailing semicolon.
14083 (semi_colon.opt): Remove.
14084 * src/reader.h: Include location.h.
14085 (scanner_cursor): New decl.
14086 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14087 rolling our own.
14088 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14089 of *loc.
14090 (STEP): Remove. No longer needed, now that adjust_location does
14091 the work. All uses removed.
14092 (scanner_cursor): New var.
14093 (adjust_location): Renamed from extend_location. It now sets
14094 *loc and adjusts the scanner cursor. All uses changed.
14095 Don't bother testing for CR.
14096 (handle_syncline): Remove location arg; now updates scanner cursor.
14097 All callers changed.
14098 (unexpected_end_of_file): Now accepts start boundary of token or
14099 comment, not location. All callers changed. Update scanner cursor,
14100 not the location.
14101 (SC_AFTER_IDENTIFIER): New state.
14102 (context_state): Renamed from c_context. All uses changed.
14103 (id_loc, code_start, token_start): New local vars.
14104 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14105 processing of Yacc white space and equivalents here.
14106 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14107 instead of returning ID immediately, since we need to search for
14108 a subsequent colon.
14109 (<INITIAL>"'", "\""): Save token_start.
14110 (<INITIAL>"%{", "{", "%%"): Save code_start.
14111 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14112 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14113 BEGIN context_state at end, not INITIAL.
14114 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14115 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14116 Return correct token start.
14117 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14118 the start of a character, string or multiline comment is found.
14119 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14120 Reduction): Adjust reported locations to match the more-precise
14121 results now expected.
14122 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14123 * tests/reduce.at (Useless Rules, Reduced Automaton,
14124 Underivable Rules): Likewise.
14125 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14126 or "|"' now that so many other tokens are allowed by the new grammar.
14127
14128 * src/complain.h (current_file): Remove duplicate decl;
14129 current_file is now owned by files.h.
14130 * src/complain.c, src/scan-gram.l: Include files.h.
14131
14132 2002-12-06 Paul Eggert <eggert@twinsun.com>
14133
14134 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14135 promotes to int; it might be unsigned int.
14136 * data/yacc.c (yy_reduce_print): Likewise.
14137
14138 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14139 be #defined in the prologue, not in the Bison declarations.
14140 This fixes Debian Bug 102878, reported by Shaul Karl.
14141
14142 2002-12-02 Paul Eggert <eggert@twinsun.com>
14143
14144 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14145 * lib/strtoul.c: New file, from gnulib.
14146 This fixes a porting bug reported by Peter Klein in
14147 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
14148
14149 2002-11-30 Paul Eggert <eggert@twinsun.com>
14150
14151 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14152 and put only a forward declaration in the prologue. This is for
14153 consistency with the other scanner helper functions.
14154
14155 Type clashes now generate warnings, not errors, since it
14156 appears that POSIX may allow some grammars with type clashes.
14157 * src/reader.c (grammar_current_rule_check): Warn about
14158 type clashes instead of complaining.
14159 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14160
14161 Add Yacc library, since POSIX requires it.
14162 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14163 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14164 * lib/main.c, lib/yyerror.c: New files.
14165
14166 gram_error can be static; it need not be extern.
14167 * src/reader.h (gram_error): Remove decl.
14168 * src/parse-gram.y (gram_error): Now static. Add static decl.
14169 (print_token_value): Omit parameter names from forward decl,
14170 for consistency.
14171
14172 2002-11-29 Paul Eggert <eggert@twinsun.com>
14173
14174 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14175 be declared before being used. E.g., one should typically
14176 declare them in the prologue. Use GNU coding style in examples.
14177 Put "const" consistently after the type it modifies. Mention
14178 that C99 supports "inline". Mention that yyerror traditionally
14179 returns "int".
14180
14181 %parse-param and %lex-param now take just one argument, the
14182 declaration; the argument name is deduced from the declaration.
14183
14184 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14185 Reporting, Table of Symbols): Document this.
14186 * src/parse-gram.y (add_param): New function.
14187 (COMMA): Remove.
14188 (declaration): Implement new rule for %parse-param and %lex-param.
14189 * src/scan-gram.l: "," now elicits a warning, rather than being
14190 a token; this is more compatible with byacc.
14191 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14192
14193 2002-11-27 Paul Eggert <eggert@twinsun.com>
14194
14195 Rename identifiers to avoid real and potential collisions.
14196
14197 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14198 to avoid collision with lex macro described by Bruce Lilly in
14199 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14200 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14201 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14202 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14203 All uses changed.
14204 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14205 The name "yycontrol" violates the name space rules, and this stuff
14206 wasn't being used anyway.
14207 (input): Remove action; this stuff wasn't being used.
14208 (gram_error): Rename local variable yylloc -> loc.
14209 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14210 (YY_DECL): Don't use "yy" at start of local variables.
14211 All uses changed, e.g., yylloc -> loc.
14212 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14213 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14214 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14215 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14216
14217 * src/parse-gram.y (gram_error): loc is now const *.
14218 * src/reader.h (gram_error): Likewise.
14219
14220 2002-11-24 Paul Eggert <eggert@twinsun.com>
14221
14222 Version 1.75c.
14223
14224 * tests/actions.at (Actions after errors): Use an output format
14225 more similar to that of the Printers and Destructors test.
14226 Test the position of the ';' token too.
14227 (Printers and Destructors): Likewise.
14228 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14229 unnecessarily alarming people when the test fails.
14230
14231 * data/yacc.c (yyerrlab1): Move this label down, so that the
14232 parser does not discard the lookahead token if the user code
14233 invokes YYERROR. This change is required for POSIX conformance.
14234
14235 * lib/error.c: Sync with gnulib.
14236
14237 2002-11-22 Paul Eggert <eggert@twinsun.com>
14238
14239 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14240 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14241 * lib/xmalloc.c: Likewise.
14242
14243 2002-11-20 Paul Eggert <eggert@twinsun.com>
14244
14245 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14246
14247 2002-11-20 Paul Eggert <eggert@twinsun.com>
14248
14249 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14250 should use `if (! x) abort ();' rather than `assert (x);', and
14251 anyway it's one less thing to worry about configuring.
14252
14253 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14254 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14255 and replace all instances of assert with abort.
14256 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14257 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14258
14259 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14260 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14261 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14262 hash_find_entry, hash_rehash, hash_insert): Likewise.
14263 * src/conflicts.c (resolve_sr_conflict): Likewise.
14264 * src/lalr.c (set_goto_map, map_goto): Likewise.
14265 * src/nullable.c (nullable_compute): Likewise.
14266 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14267 * src/reader.c (packgram, reader): Likewise.
14268 * src/state.c (state_new, state_free, state_transitions_set,
14269 state_reduction_find): Likewise.
14270 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14271 symbol_pack): Likewise.
14272 * src/tables.c (conflict_row, pack_vector): Likewise.
14273 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14274 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14275 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14276 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14277
14278 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14279 (ARGMATCH_CONSTRAINT): New macro.
14280 (ARGMATCH_ASSERT): Use it.
14281
14282 * src/system.h (verify): New macro.
14283 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14284 rather than assert.
14285 * src/tables.c (tables_generate): Likewise.
14286
14287 * src/struniq.c (struniq_assert): Now returns void, and aborts
14288 if the assertion is false.
14289 (struniq_assert_p): Remove.
14290 * src/struniq.h: Likewise.
14291
14292 2002-11-18 Paul Eggert <eggert@twinsun.com>
14293
14294 * data/glr.c (yygetLRActions): Replace `yyindex' with
14295 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14296 This fixes the regression with Sun ONE Studio 7 cc that I reported in
14297 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
14298
14299 2002-11-18 Akim Demaille <akim@epita.fr>
14300
14301 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14302 space.
14303 From Tim Van Holder.
14304
14305 2002-11-17 Paul Eggert <eggert@twinsun.com>
14306
14307 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14308 to "SyntaxError" for consistency with my 2002-11-15 change.
14309
14310 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14311 not define to {}, since this breaks the common use of `YYDPRINTF
14312 ((...));' if a single statement is desired (e.g. before `else').
14313 Work around GCC warnings by surrounding corresponding calls with
14314 {} if needed.
14315 (yyhasResolvedValue): Remove unused function.
14316 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14317 loop body.
14318 (yyreportSyntaxError): Renamed from yyreportParseError.
14319 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14320 All uses changed.
14321 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14322 extern when possible. Remove unused initializations.
14323
14324 2002-11-16 Akim Demaille <akim@epita.fr>
14325
14326 Augment the similarity between GLR and LALR traces.
14327
14328 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14329 (YY_REDUCE_PRINT): New.
14330 (yyparse): Use them.
14331 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14332 YYDPRINT here.
14333 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14334 state reached after the reduction/recovery, since...
14335 (yyparse, yyprocessOneStack): Report the state we are entering in.
14336
14337 2002-11-16 Akim Demaille <akim@epita.fr>
14338
14339 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14340 Add support for --trace=skeleton.
14341 * src/scan-skel.l: %option debug.
14342 Scan strings of non-@ or \n instead of character by character.
14343 (scan_skel): Handle trace_skeleton.
14344 (QPUTS): New.
14345 (@output_parser_name@, @output_header_name@): ``Restore'' their
14346 support (used to be M4 macros).
14347 * data/yacc.c: Quote larger chunks, a la glr.c.
14348 * data/lalr1.cc: Likewise.
14349 The header guards are no longer available, so use some other
14350 string than `YYLSP_NEEDED'.
14351
14352 2002-11-16 Akim Demaille <akim@epita.fr>
14353
14354 Make the ``Printers and Destructors'' test more verbose, taking
14355 `yacc.c''s behavior as (possibly wrong) reference.
14356
14357 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14358 instead of fprint on stdout.
14359 Set and report the last_line of the symbols.
14360 Consistently display values and locations.
14361
14362 2002-11-16 Paul Eggert <eggert@twinsun.com>
14363
14364 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14365
14366 2002-11-15 Paul Eggert <eggert@twinsun.com>
14367
14368 * tests/actions.at (Actions after errors): New test case.
14369
14370 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14371 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14372 tests/action.at, tests/calc.at, tests/conflicts.at,
14373 tests/cxx-type.at, tests/regression.at:
14374 "parse error" -> "syntax error" for POSIX compatibility.
14375 "parsing stack overflow..." -> "parser stack overflow" so
14376 that code matches Bison documentation.
14377
14378 2002-11-15 Akim Demaille <akim@epita.fr>
14379
14380 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14381 take two BRACED_CODE, not two string_content.
14382 Free the scanner's obstack when we are done.
14383 (code_content): New.
14384 * tests/calc.at: Adjust.
14385 * doc/bison.texinfo: Adjust.
14386 Also, make sure to include the `,' for these declarations.
14387
14388 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14389
14390 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14391 definition; avoids potential autoreconf problems.
14392
14393 2002-11-15 Akim Demaille <akim@epita.fr>
14394
14395 Always check the value returned by yyparse.
14396
14397 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14398 returned by yyparse.
14399 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14400 Adjust calls.
14401 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14402 returned by yyparse.
14403
14404 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14405
14406 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14407 on input.at test.
14408
14409 2002-11-14 Paul Eggert <eggert@twinsun.com>
14410
14411 * src/output.c (output_skeleton): Call xfopen instead of
14412 duplicating xfopen's body.
14413
14414 Fix bugs reported by Nelson H. F. Beebe in
14415 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14416
14417 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14418 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14419 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14420 file twice in the grammar, as an extra check.
14421
14422 * tests/input.at (Torturing the Scanner): Surround the
14423 backslash-newline tests with "#if 0", to make it less likely that
14424 we'll run into compiler bugs. Bring back solitary \ inside
14425 comment, but add a closing comment to work around HP C bug. Don't
14426 test backslash-newline in C character constant.
14427
14428 2002-11-14 Akim Demaille <akim@epita.fr>
14429
14430 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14431 status of the compiler.
14432 Calling `exit 1' is no longer needed.
14433 Reported by Nelson H. F. Beebe.
14434
14435 2002-11-14 Akim Demaille <akim@epita.fr>
14436
14437 * tests/atlocal.in (CPPFLAGS): We have config.h.
14438 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14439 New.
14440 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14441 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14442 * tests/regression.at, tests/torture.at: Use them for all the
14443 grammars that are to be compiled.
14444 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14445 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14446 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14447
14448 2002-11-14 Akim Demaille <akim@epita.fr>
14449
14450 * doc/bison.texinfo: Various formatting changes (alignments in
14451 samples, additional @group/@end group, GCS in samples.
14452 Use @deffn instead of simple @table to define the directives,
14453 macros, variables etc.
14454
14455 2002-11-13 Paul Eggert <eggert@twinsun.com>
14456
14457 Fix some bugs reported by Albert Chin-A-Young in
14458 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14459
14460 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14461 -o c"; the HP C compiler chatters during compilation.
14462 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14463 * tests/headers.at (export YYLTYPE): Likewise.
14464
14465 * tests/input.at (Torturing the Scanner): Remove lines containing
14466 solitary backslashes, as they tickle a bug in the HP C compiler.
14467
14468 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14469 comments, since they're not portable. Use GNU coding style.
14470
14471 2002-11-13 Akim Demaille <akim@epita.fr>
14472
14473 * data/yacc.c: Leave bigger chunks of quoted text.
14474 (YYDSYMPRINTF): New.
14475 Use it to report symbol activities.
14476 * data/glr.c (YYDSYMPRINTF): New.
14477 Use it.
14478
14479 2002-11-12 Paul Eggert <eggert@twinsun.com>
14480
14481 Version 1.75b.
14482
14483 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14484 (yyglrReduce): Return yyok, not 0.
14485 This should avoid the enumerated-type warnings reported
14486 by Nelson H. F. Beebe in
14487 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14488
14489 * lib/bbitset.h (BITSET_INLINE): Remove.
14490 * lib/bitset.h [! BITSET_INLINE]: Remove.
14491 (bitset_set, bitset_reset, bitset_test): Rename local vars
14492 to avoid shadowing warnings by GCC.
14493
14494 * data/glr.c (inline): Remove #define. It's the user's
14495 responsibility to #define it away, just like 'const'.
14496 This fixes one of the bugs reported by Nelson H. F. Beebe in
14497 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14498
14499 * Makefile.maint (po-check): Scan .l and .y files instead of the
14500 .c and the .h files that they generate. This fixes the bug
14501 reported by Tim Van Holder in:
14502 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14503 Look for N_ as well as for _. Try to avoid matching #define for
14504 N_ and _.
14505 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14506 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14507 * src/scan-gram.l: Revamp regular expressions so that " and '
14508 do not confuse xgettext.
14509
14510 * src/struniq.h (struniq_new): Do not declare the return type
14511 to be 'const'; this violates the C standard.
14512 * src/struniq.c (struniq_new): Likewise.
14513
14514 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14515
14516 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14517 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14518 linker.
14519
14520 2002-11-12 Akim Demaille <akim@epita.fr>
14521
14522 * Makefile.maint: Sync with Autoconf:
14523 (local_updates): New.
14524
14525 2002-11-12 Akim Demaille <akim@epita.fr>
14526
14527 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14528
14529 2002-11-12 Akim Demaille <akim@epita.fr>
14530
14531 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14532 locations.
14533
14534 2002-11-12 Akim Demaille <akim@epita.fr>
14535
14536 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14537 not yyvalue.
14538
14539 2002-11-12 Akim Demaille <akim@epita.fr>
14540
14541 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14542 Use it to test the GLR parser.
14543
14544 2002-11-12 Akim Demaille <akim@epita.fr>
14545
14546 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14547 defines it.
14548 * data/glr.c (yystos): New.
14549 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14550 (YYDSYMPRINT): New.
14551 (yyval): Don't define it, it is handled via M4.
14552 (yyrecoverParseError): Free verbosely the discarded symbols.
14553 * data/yacc.c (yysymprint): Remove, rather...
14554 (b4_yysymprint_generate): invoke.
14555 * data/c.m4 (b4_yysymprint_generate): New.
14556 Accept pointers as arguments, as opposed to the version from
14557 yacc.c.
14558 (b4_yydestruct_generate): Likewise.
14559 * tests/cations.at (Printers and Destructors): Use Bison directives
14560 instead of CPP macros.
14561 Don't rely on internal details.
14562
14563 2002-11-12 Akim Demaille <akim@epita.fr>
14564
14565 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14566 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14567 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14568 it against YYEMPTY and so forth), work on yytoken (i.e., set
14569 it to YYEMPTY etc.).
14570 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14571 (b4_symbol_actions): Remove.
14572 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14573 for 0, end-of-input.
14574
14575 2002-11-12 Akim Demaille <akim@epita.fr>
14576
14577 * doc/bison.texinfo (Destructor Decl): New.
14578
14579 2002-11-12 Akim Demaille <akim@epita.fr>
14580
14581 * src/tables.c (tables_generate): Use free for pointers that
14582 cannot be NULL, not XFREE.
14583 (pack_vector): Use assert, not fatal, for bound violations.
14584 * src/state.c (state_new): Likewise.
14585 * src/reader.c (reader): Likewise.
14586 * src/lalr.c (set_goto_map): Likewise.
14587 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14588 the file name.
14589
14590 2002-11-12 Akim Demaille <akim@epita.fr>
14591
14592 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14593 Restore.
14594 * src/scan-gram.l (last_string): Is global to the file, not to
14595 yylex.
14596 * src/parse-gram.y (input): Don't append the epilogue here,
14597 (epilogue.opt): do it here, and free the scanner's obstack.
14598 * src/reader.c (epilogue_set): Rename as...
14599 (epilogue_augment): this.
14600 * data/c.m4 (b4_epilogue): Defaults to empty.
14601
14602 2002-11-12 Akim Demaille <akim@epita.fr>
14603
14604 * src/getargs.c (long_options): Remove duplicates.
14605 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14606 Remove.
14607 * doc/bison.rnh: Remove.
14608 * doc/bison.texinfo (VMS Invocation): Remove.
14609
14610 2002-11-12 Akim Demaille <akim@epita.fr>
14611
14612 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14613 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14614
14615 Use struniq for symbols.
14616
14617 * src/symtab.h (symbol_t): The tag member is a struniq.
14618 (symbol_type_set): Adjust.
14619 * src/symtab.c (symbol_new): Takes a struniq.
14620 (symbol_free): Don't free the tag member.
14621 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14622 (hash_compare_symbol, hash_symbol): these.
14623 Use the fact that tags as struniqs.
14624 (symbol_get): Use struniq_new.
14625 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14626 Returns a strniq.
14627 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14628 and type members are struniqs.
14629 * src/reader.c (get_merge_function)
14630 (grammar_current_rule_merge_set): Adjust.
14631 (TYPE, current_type): Are struniq.
14632
14633 Use struniq for file names.
14634
14635 * src/files.h, src/files.c (infile): Split into...
14636 (grammar_file, current_file): these.
14637 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14638 * src/reduce.c (reduce_print): Likewise.
14639 * src/getargs.c (getargs): Likewise.
14640 * src/complain.h, src/complain.c: Likewise.
14641 * src/main.c (main): Call struniqs_new early enough to use it for
14642 file names.
14643 Don't free the input file name.
14644
14645 2002-11-12 Akim Demaille <akim@epita.fr>
14646
14647 * src/symtab.c (symbol_free): Remove dead deactivated code:
14648 type_name are properly removed.
14649 Don't use XFREE to free items that cannot be NULL.
14650 * src/struniq.h, src/struniq.c: New.
14651 * src/main.c (main): Initialize/free struniqs.
14652 * src/parse-gram.y (%union): Add astruniq member.
14653 (yyprint): Adjust.
14654 * src/scan-gram.l (<{tag}>): Return a struniq.
14655 Free the obstack bit that used to store it.
14656 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14657
14658 2002-11-11 Paul Eggert <eggert@twinsun.com>
14659
14660 Revamp to fix many (but not all) of the C- and M4-related quoting
14661 problems. Among other things, this fixes the Bison bug reported
14662 by Jan Hubicka when processing the Bash grammar; see:
14663 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14664
14665 Use new @ escapes consistently. Represent brackets with @{ and @}
14666 rather than @<:@ and @:>@, since this works a bit better with dumb
14667 editors like vi. Represent @ with @@, since @ is now consistently
14668 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14669 __ofile__, to avoid unexpected expansions. Similarly, use @output
14670 rather than #output.
14671
14672 * data/c.m4 (b4_copyright): Omit file name from comment, since
14673 the file name could contain "*/".
14674 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14675 be quoted. All uses changed.
14676
14677 * data/glr.c: Use new @ escapes consistently.
14678 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14679 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14680 Remove, since they couldn't handle arbitrary characters in file
14681 names.
14682 * data/lalr1.cc: Likewise.
14683 * data/yacc.c: Likewise.
14684
14685 * src/files.c (output_infix): Remove; all uses removed.
14686 * src/files.h: Likewise.
14687
14688 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14689 mishandled funny characters in file names, and anyway it isn't
14690 needed any more.
14691 * data/yacc.c: Likewise.
14692 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14693
14694 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14695 * data/yacc.c: Likewise.
14696
14697 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14698 strings now.
14699 (muscle_init): Quote filename as a C string.
14700 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14701 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14702 * src/output.c (escaped_file_name_output): New function.
14703 (prepare_symbols): Quote tokens for M4.
14704 (prepare): Don't insert output_infix, output_prefix,
14705 output_parser_name, output_header_name; this is now down by scan-skel.
14706 Insert skeleton as a C string.
14707
14708 * src/output.c (user_actions_output, symbol_destructors_output,
14709 symbol_printers_output): Quote filenames for C and M4.
14710 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14711
14712 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14713 escapes other than \\ and \'; this simplifies the code.
14714 (<SC_STRING>): Likewise, for \\ and \".
14715 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14716 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14717 Use new escapes @{ and @} for [ and ].
14718
14719 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14720 them with auto vars.
14721 Switch to new escape scheme, where @ is the escape character uniformly.
14722 Abort if a stray escape character is found. Avoid unbounded input
14723 buffer when parsing non-escaped text.
14724
14725 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14726 __oline__, #output, $@, and @{ do not have unintended meanings.
14727
14728 2002-11-09 Paul Eggert <eggert@twinsun.com>
14729
14730 Fix the test failure due to GCC warnings described in
14731 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14732 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14733 evaluate to 0 if it's impossible for NINF to be in the respective
14734 table.
14735 (yygetLRActions, yyrecoverParseError): Use them.
14736
14737 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14738 counted in the token inserted at end of file. Now takes
14739 location_t *, not location_t, so that the location can be
14740 adjusted. All uses changed.
14741
14742 * tests/regression.at (Invalid inputs): Adjust wording in
14743 diagnostic to match the new behavior.
14744
14745 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14746 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14747 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14748 abort ();'. This reduces the runtime of the "Many lookaheads"
14749 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14750 GCC 3.2.
14751
14752 2002-11-07 Paul Eggert <eggert@twinsun.com>
14753
14754 * src/parse-gram.y (CHARACTER): Remove unused token.
14755 All uses removed.
14756
14757 * src/scan-gram.l: Remove stack option. We no longer use the
14758 stack, since the stack was never deeper than 1; instead, use the
14759 new auto var c_context to record the stacked value.
14760
14761 Remove nounput option. At an unexpected end of file, we now unput
14762 the minimal input necessary to end cleanly; this simplifies the
14763 code.
14764
14765 Avoid unbounded token sizes where this is easy.
14766
14767 (unexpected_end_of_file): New function.
14768 Use it to systematize the error message on unexpected EOF.
14769 (last-string): Now auto, not static.
14770 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14771 (scanner_last_string_free): Remove; not used.
14772 (percent_percent_count): Move decl to just before use.
14773 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14774 not the (never otherwised-used) CHARACTER.
14775
14776 2002-11-07 Akim Demaille <akim@epita.fr>
14777
14778 Let yyerror always receive the msg as last argument, so that
14779 yyerror can be variadic.
14780
14781 * data/yacc.c (b4_yyerror_args): New.
14782 Use it when calling yyerror.
14783 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14784 Use it when calling yyerror.
14785 * doc/bison.texinfo (Error Reporting): Adjust.
14786 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14787 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14788
14789 2002-11-06 Akim Demaille <akim@epita.fr>
14790
14791 #line should have quoted strings.
14792 Ideally, this should be done by m4_quotearg.
14793
14794 * src/scan-skel.l: Include quotearg.h.
14795 Quote __ofile__.
14796 * src/output.c (symbol_printers_output)
14797 (symbol_destructors_output): Quote the file name.
14798
14799 2002-11-06 Akim Demaille <akim@epita.fr>
14800
14801 * tests/regression.at (Invalid inputs): Adjust to the recent
14802 messages.
14803
14804 2002-11-06 Akim Demaille <akim@epita.fr>
14805
14806 Restore --no-lines.
14807 Reported by Jim Kent.
14808
14809 * data/c.m4 (b4_syncline): New.
14810 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14811 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14812 * src/output.c (user_actions_output): Likewise.
14813 (prepare): Define 'b4_synclines_flag'.
14814 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14815
14816 2002-11-06 Akim Demaille <akim@epita.fr>
14817
14818 * src/main.c (main): Free `infile'.
14819 * src/scan-gram.l (handle_syncline): New.
14820 Recognize `#line'.
14821 * src/output.c (user_actions_output, symbol_destructors_output)
14822 (symbol_printers_output): Use the location's file name, not
14823 infile.
14824 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14825
14826 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14827
14828 * src/tables.c (matching_state): Don't allow states to match if
14829 either has GLR conflict entries.
14830
14831 2002-11-05 Paul Eggert <eggert@twinsun.com>
14832
14833 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14834 "integer out of range" rather than "invalid value".
14835 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14836 accordingly.
14837
14838 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14839 Also, remove one static variable in the scanner.
14840
14841 * src/scan-gram.l (braces_level): Now auto, not static.
14842 Initialize to zero if the compiler is being picky.
14843 (INITIAL): Clear braces_level instead of incrementing it.
14844 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14845 as POSIX 1003.1-2001 requires.
14846 * src/system.h (IF_LINT): New macro, taken from coreutils.
14847 * configure.ac: Define "lint" if --enable-gcc-warnings.
14848
14849 2002-11-05 Akim Demaille <akim@epita.fr>
14850
14851 * src/scan-gram.l: When it starts with `%', complain about the
14852 whole directive, not just that `invalid character: %'.
14853
14854 2002-11-04 Akim Demaille <akim@epita.fr>
14855
14856 * Makefile.maint: Update from Autoconf.
14857 (update, cvs-update, po-update, do-po-update): New.
14858
14859 2002-11-04 Akim Demaille <akim@epita.fr>
14860
14861 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14862 and yyerror.
14863 Have yyerror `use' its arguments.
14864 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14865 returns true when location & yacc & pure & parse-param.
14866 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14867
14868 2002-11-04 Akim Demaille <akim@epita.fr>
14869
14870 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14871 clashes.
14872 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14873 font-lock-mode.
14874 Use complain_at.
14875 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14876 slot 0.
14877
14878 2002-11-03 Paul Eggert <eggert@twinsun.com>
14879
14880 * src/reader.c (get_merge_function, grammar_current_rule_check):
14881 Use consistent diagnostics for reporting type name clashes.
14882 Quote the types with <>, for consistency with Yacc.
14883 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14884
14885 2002-11-03 Akim Demaille <akim@epita.fr>
14886
14887 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14888 New.
14889 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14890 (b4_parse_param): Remove.
14891 Use b4_identification.
14892 Propagate b4_pure_args where needed to pass them to yyerror.
14893 * data/glr.m4 (b4_parse_param): Remove.
14894 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14895 (b4_lpure_formals): New.
14896 Use b4_identification.
14897 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14898 b4_user_formals and b4_user_args.
14899 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14900 (yyreportAmbiguity): When using a pure parser, also need
14901 the location, and the parse-params.
14902 Adjust callers.
14903 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14904 When using a pure parser, also need the parse-params.
14905 Adjust callers.
14906 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14907 (%pure-parser + %parse-param) LALR and GLR parsers.
14908 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14909 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14910 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14911 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14912 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14913 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14914 * doc/bison.texinfo: Untabify the whole file.
14915 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14916 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14917 (Error Reporting): Adjust to these new directives.
14918 Document %error-verbose, deprecate YYERROR_VERBOSE.
14919
14920 2002-11-03 Akim Demaille <akim@epita.fr>
14921
14922 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14923 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14924 command line options.
14925 * tests/cxx-type.at: Formatting changes.
14926
14927 2002-11-03 Paul Eggert <eggert@twinsun.com>
14928
14929 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14930 to count columns correctly, and to check for invalid inputs.
14931
14932 Use mbsnwidth to count columns correctly. Account for tabs, too.
14933 Include mbswidth.h.
14934 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14935 (extend_location): New function.
14936 (YY_LINES): Remove.
14937
14938 Handle CRLF in C code rather than in Lex code.
14939 (YY_INPUT): New macro.
14940 (no_cr_read): New function.
14941
14942 Scan UCNs, even though we don't fully handle them yet.
14943 (convert_ucn_to_byte): New function.
14944
14945 Handle backslash-newline correctly in C code.
14946 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14947 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14948 all uses changed.
14949 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14950 Use {splice} wherever C allows backslash-newline.
14951 YY_STEP after space, newline, vertical-tab.
14952 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14953
14954 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14955
14956 ({int}, handle_action_dollar, handle_action_at): Check for integer
14957 overflow.
14958
14959 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14960
14961 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14962 as well as \000. Check for UCHAR_MAX, not 255.
14963 Allow \x with an arbitrary positive number of digits, as in C.
14964 Check for overflow here.
14965 Allow \? and UCNs, for compatibility with C.
14966
14967 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14968 with quote slot used by complain_at.
14969
14970 * tests/input.at: Add tests for backslash-newline, m4 quotes
14971 in symbols, long literals, and funny escapes in strings.
14972
14973 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14974 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14975 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14976 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14977 * m4/mbswidth.m4: New file, from GNU coreutils.
14978
14979 * doc/bison.texinfo (Grammar Outline): Document // comments.
14980 (Symbols): Document that trigraphs have no special meaning in Bison,
14981 nor is backslash-newline allowed.
14982 (Actions): Document that trigraphs have no special meaning.
14983
14984 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14985 no longer used.
14986
14987 2002-11-02 Paul Eggert <eggert@twinsun.com>
14988
14989 * src/reader.c: Don't include quote.h; not needed.
14990 (get_merge_function): Reword warning to be consistent with
14991 type clash diagnostic in grammar_current_rule_check.
14992
14993 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14994 bug in trigraph handling.
14995
14996 * src/output.c (prepare_symbols): When printing token names,
14997 escape "[" as "@<:@" and likewise for "]".
14998
14999 * src/system.h (errno): Remove declaration, as we are now
15000 assuming C89 or better, and C89 guarantees errno.
15001
15002 2002-10-30 Paul Eggert <eggert@twinsun.com>
15003
15004 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
15005 Check for close failures.
15006 * src/files.h (xfclose): Return void, not int, since it always
15007 returned zero.
15008 * src/files.c (xfclose): Likewise. Report I/O error if ferror
15009 indicates one.
15010 * src/output.c (output_skeleton): Use xfclose rather than fclose
15011 and ferror. xfclose now checks ferror.
15012
15013 * data/glr.c (YYLEFTMOST_STATE): Remove.
15014 (yyreportTree): Use a stack-based leftmost state. This avoids
15015 our continuing battles with bogus warnings about initializers.
15016
15017 2002-10-30 Akim Demaille <akim@epita.fr>
15018
15019 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
15020 #if.
15021
15022 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15023
15024 * tests/glr-regr1.at: New test for reported regressions.
15025 * tests/testsuite.at: Add glr-regr1.at test.
15026 * tests/Makefile.am: Add glr-regr1.at test.
15027
15028 2002-10-24 Paul Eggert <eggert@twinsun.com>
15029
15030 Version 1.75a.
15031
15032 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
15033 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
15034 we use malloc. Don't assume 'A' through 'Z' are contiguous.
15035 Don't assume strdup exists; POSIX says its an XSI extension.
15036 Check for buffer overflow on input.
15037
15038 2002-10-24 Akim Demaille <akim@epita.fr>
15039
15040 * src/output.c (output_skeleton): Don't disable M4sugar comments
15041 too soon: it results in comments being expanded.
15042 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
15043 first output.
15044
15045 2002-10-24 Akim Demaille <akim@epita.fr>
15046
15047 * data/yacc.c (m4_int_type): New.
15048 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
15049 char' as only yacc.c wants K&R portability.
15050 * data/glr.c (yysigned_char): Remove.
15051 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
15052 Reported by Quoc Peyrot.
15053
15054 2002-10-23 Paul Eggert <eggert@twinsun.com>
15055
15056 * src/main.c (main): With --trace=time, report times even if a
15057 non-fatal error occurs. Formerly, the times were reported in some
15058 such cases but not in others.
15059 * src/reader.c (reader): Just return if a complaint has been issued,
15060 instead of exiting, so that 'main' can report times.
15061
15062 2002-10-22 Akim Demaille <akim@epita.fr>
15063
15064 * src/system.h: Include sys/types.
15065 Reported by Bert Deknuydt.
15066
15067 2002-10-23 Paul Eggert <eggert@twinsun.com>
15068
15069 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
15070 Suggested by Art Haas.
15071
15072 2002-10-22 Paul Eggert <eggert@twinsun.com>
15073
15074 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
15075 decl; not needed any more.
15076 * src/main.c (main): Use return to exit, undoing yesterday's change.
15077 The last OS that we could find where this wouldn't work is
15078 SunOS 3.5, and that's too old to worry about now.
15079
15080 * data/glr.c (struct yyltype): Define members even when not
15081 doing locations. This is more consistent with yacc.c, and it
15082 works around the following bug reports:
15083 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15084 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
15085
15086 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15087 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15088 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15089
15090 2002-10-22 Akim Demaille <akim@epita.fr>
15091
15092 * data/README: New.
15093
15094 2002-10-21 Paul Eggert <eggert@twinsun.com>
15095
15096 Be consistent about 'bool'; the old code used an enum in one
15097 module and an int in another, and this violates the C standard.
15098 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15099 * configure.ac (AC_HEADER_STDBOOL): Add.
15100 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15101 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15102 * src/symtab.c (hash_compare_symbol_t): Likewise.
15103 * src/system.h (bool, false, true): Use a definition consistent
15104 with ../lib/hash.c. All uses changed.
15105
15106 * src/complain.c (warning_issued): Renamed from warn_message_count,
15107 so that we needn't worry about integer overflow (!).
15108 Now of type bool. All uses changed.
15109 (complaint_issued): Renamed from complain_message_count; likewise.
15110
15111 * src/main.c (main): Use exit to exit with failure.
15112
15113 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15114 rather than 1 and 0.
15115 * src/main.c (main): Likewise.
15116 * src/getargs.c (getargs): Likewise.
15117 * src/reader.c (reader): Likewise.
15118
15119 * src/getarg.c (getargs): Remove duplicate code for
15120 "Try `bison --help'".
15121
15122 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15123 What was that "2" for?
15124
15125 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15126 * src/getargs.c (usage): Likewise.
15127
15128 * src/getargs.c (getargs): When there are too few operands, report
15129 the last one. When there are too many, report the first extra
15130 one. This is how diffutils does it.
15131
15132 2002-10-20 Paul Eggert <eggert@twinsun.com>
15133
15134 Remove K&R vestiges.
15135 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15136 * src/complain.c (VA_START): Remove. Assume prototypes.
15137 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15138 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15139 fatal): Assume prototypes.
15140 * src/complain.h: Assume prototypes.
15141 * src/system.h (PARAMS): Remove.
15142 Include <limits.h> unconditionally, since it's guaranteeed even
15143 for a freestanding C89 compiler.
15144 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15145 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
15146
15147 2002-10-20 Akim Demaille <akim@epita.fr>
15148
15149 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15150 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15151 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15152 (yyresolveStates, yyresolveAction, yyresolveStack)
15153 (yyprocessOneStack): Use them.
15154 (yy_reduce_print): New.
15155 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15156
15157 2002-10-20 Akim Demaille <akim@epita.fr>
15158
15159 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15160 arguments and output `void'.
15161 (b4_c_function): Rename as...
15162 (b4_c_function_def): this.
15163 (b4_c_function_decl, b4_c_ansi_function_def)
15164 (b4_c_ansi_function_decl): New.
15165 Change the interpretation of the arguments: before `int, foo', now
15166 `int foo, foo'.
15167 * data/yacc.c (yyparse): Prototype and define thanks to these.
15168 Adjust b4_c_function_def uses.
15169 * data/glr.c (yyparse): Likewise, but ANSI only.
15170
15171 2002-10-20 Akim Demaille <akim@epita.fr>
15172
15173 * src/output.c (prepare): Move the definition of `tokens_number',
15174 `nterms_number', `undef_token_number', `user_token_number_max'
15175 to...
15176 (prepare_tokens): Here.
15177 (prepare_tokens): Rename as...
15178 (prepare_symbols): this.
15179 (prepare): Move the definition of `rules_number' to...
15180 (prepare_rules): here.
15181 (prepare): Move the definition of `last', `final_state_number',
15182 `states_number' to...
15183 (prepare_states): here.
15184 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15185
15186 2002-10-20 Akim Demaille <akim@epita.fr>
15187
15188 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15189
15190 2002-10-20 Akim Demaille <akim@epita.fr>
15191
15192 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15193 * data/c.m4: here.
15194
15195 2002-10-20 Akim Demaille <akim@epita.fr>
15196
15197 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15198 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15199 `pair'.
15200 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15201 `name' to...
15202 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15203 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15204 These.
15205
15206 2002-10-19 Paul Eggert <eggert@twinsun.com>
15207
15208 Do not create a temporary file, as that involves security and
15209 cleanup headaches. Instead, use a pair of pipes.
15210 Derived from a suggestion by Florian Krohm.
15211 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15212 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15213 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15214 (BISON_PREREQ_SUBPIPE): Add.
15215 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15216 Add subpipe.h, subpipe.c.
15217 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15218 * po/POTFILES.in: Add lib/subpipe.c.
15219 * src/output.c: Include "subpipe.h".
15220 (m4_invoke): Remove decl.
15221 (scan_skel): New decl.
15222 (output_skeleton): Use pipe rather than temporary file for m4 input.
15223 Check that m4sugar.m4 is readable, to avoid deadlock.
15224 Check for pipe I/O error.
15225 * src/scan-skel.l (readpipe): Remove decl.
15226 (scan_skel): New function, to be used in place of m4_invoke.
15227 Read from stream rather than file.
15228
15229 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15230 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15231 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15232 this generates a more-accurate value anyway.
15233
15234 * lib/timevar.c (timervar_accumulate): Rename locals to
15235 avoid confusion with similarly-named more-global.
15236 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15237
15238 * src/output.c (prepare): Use xstrdup to convert char const *
15239 to char *, to avoid GCC warning.
15240
15241 2002-10-19 Akim Demaille <akim@epita.fr>
15242
15243 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15244 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15245 Use them to have `calc.y' ready for %pure-parser.
15246 * data/yacc.c (YYLEX): Pass a yylex return type to
15247 b4_c_function_call.
15248
15249 2002-10-19 Akim Demaille <akim@epita.fr>
15250
15251 Prototype support of %lex-param and %parse-param.
15252
15253 * src/parse-gram.y: Add the definition of the %lex-param and
15254 %parse-param tokens, plus their rules.
15255 Drop the `_' version of %glr-parser.
15256 Add the "," token.
15257 * src/scan-gram.l (INITIAL): Scan them.
15258 * src/muscle_tab.c: Comment changes.
15259 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15260 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15261 (muscle_entry_s): The `value' member is no longer const.
15262 Adjust all dependencies.
15263 * src/muscle_tab.c (muscle_init): Adjust: use
15264 MUSCLE_INSERT_STRING.
15265 Initialize the obstack earlier.
15266 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15267 (muscle_pair_list_grow): New.
15268 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15269 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15270 * tests/calc.at: Use %locations, not --locations.
15271 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15272
15273 2002-10-19 Akim Demaille <akim@epita.fr>
15274
15275 * src/getargs.c (usage): Take status as argument and exit
15276 accordingly.
15277 Report the traditional `Try ... --help' message when status != 0.
15278 (usage, version): Don't take a FILE * as arg, it is pointless.
15279 (getargs): When there is an incorrect number of arguments, make it
15280 an error, and report it GNUlically thanks to `usage ()'.
15281
15282 2002-10-18 Paul Eggert <eggert@twinsun.com>
15283
15284 * data/glr.c (yyreportParseError): Don't assume that sprintf
15285 yields the length of the printed string, as this is not true
15286 on SunOS 4.1.4. Reported by Peter Klein.
15287
15288 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15289 * tests/conflicts.at (%nonassoc and eof): Likewise.
15290 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15291
15292 2002-10-17 Akim Demaille <akim@epita.fr>
15293
15294 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15295 * src/getargs.c (trace_types, trace_args): Adjust.
15296 * src/reader.c (grammar_current_rule_prec_set)
15297 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15298 Standardize error messages.
15299 And s/@prec/%prec/!
15300 (reader): Use trace_flag to enable scanner/parser debugging,
15301 instead of an adhoc scheme.
15302 * src/scan-gram.l: Remove trailing debugging code.
15303
15304 2002-10-16 Paul Eggert <eggert@twinsun.com>
15305
15306 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15307 MUSCLE_TAB_H.
15308
15309 * NEWS: Officially drop support for building Bison with K&R C,
15310 since it didn't work anyway and it's not worth worrying about.
15311 * Makefile.maint (wget_files): Remove ansi2knr.c.
15312 (ansi2knr.c-url_prefix): Remove.
15313 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15314 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15315 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15316
15317 2002-10-15 Paul Eggert <eggert@twinsun.com>
15318
15319 Stop using the "enum_" trick for K&R-style function definitions;
15320 it confused me, and I was the author! Instead, assume that people
15321 who want to use K&R C compilers (when using these modules in GCC,
15322 perhaps?) will run ansi2knr.
15323
15324 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15325 All uses of "enum_" changed to "enum ".
15326 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15327 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15328
15329 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15330 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15331 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15332 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15333 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15334 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15335 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15336 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15337 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15338 Use function prototypes; this removes the need for declaring
15339 static functions simply to provide their prototypes.
15340 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15341 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15342 bitset_count_, bitset_create, bitset_dump, bitset_first,
15343 bitset_free, bitset_init, bitset_last, bitset_next,
15344 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15345 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15346 bitset_print, bitset_release_memory, bitset_toggle_,
15347 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15348 debug_bitset): Likewise.
15349 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15350 * lib/bitset_stats.c (bitset_log_histogram_print,
15351 bitset_percent_histogram_print, bitset_stats_and,
15352 bitset_stats_and_cmp, bitset_stats_and_or,
15353 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15354 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15355 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15356 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15357 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15358 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15359 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15360 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15361 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15362 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15363 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15364 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15365 bitset_stats_zero): Likewise.
15366 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15367 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15368 bitsetv_dump, debug_bitsetv): Likewise.
15369 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15370 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15371 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15372 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15373 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15374 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15375 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15376 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15377 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15378 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15379 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15380 Likewise.
15381 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15382 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15383 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15384 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15385 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15386 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15387 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15388 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15389 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15390 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15391 lbitset_xor_cmp, lbitset_zero): Likewise.
15392
15393 2002-10-14 Akim Demaille <akim@epita.fr>
15394
15395 Version 1.75.
15396
15397 2002-10-14 Akim Demaille <akim@epita.fr>
15398
15399 * tests/Makefile.am (maintainer-check-posix): New.
15400
15401 2002-10-14 Akim Demaille <akim@epita.fr>
15402
15403 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15404 member.
15405
15406 2002-10-14 Akim Demaille <akim@epita.fr>
15407
15408 * src/tables.c (table_ninf_remap): base -> tab.
15409 Reported by Matt Rosing.
15410
15411 2002-10-14 Paul Eggert <eggert@twinsun.com>
15412
15413 * tests/action.at, tests/calc.at, tests/conflicts.at,
15414 tests/cxx-type.at, tests/headers.at, tests/input.at,
15415 tests/regression.at, tests/synclines.at, tests/torture.at:
15416 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15417 so that the tests still work even if POSIXLY_CORRECT is set.
15418 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15419
15420 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15421 for portability to K&R hosts. Fix typo: signed char is guaranteed
15422 only to 127, not to 128.
15423 * data/glr.c (yysigned_char): New type.
15424 * data/yacc.c (yysigned_char): Likewise.
15425 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15426
15427 2002-10-13 Paul Eggert <eggert@twinsun.com>
15428
15429 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15430 true due to limited range of data type" warning from GCC.
15431
15432 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15433 by wrapping enum yytokentype's definition inside #ifndef
15434 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15435
15436 2002-10-13 Akim Demaille <akim@epita.fr>
15437
15438 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15439 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15440
15441 2002-10-13 Akim Demaille <akim@epita.fr>
15442
15443 * Makefile.maint: Update from Autoconf 2.54.
15444 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15445
15446 2002-10-13 Akim Demaille <akim@epita.fr>
15447
15448 * src/print.c (print_state): Separate the list of solved conflicts
15449 from the other items.
15450 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15451
15452 2002-10-13 Akim Demaille <akim@epita.fr>
15453
15454 Let nondeterministic skeletons be usable with deterministic
15455 tables.
15456
15457 With the patch, GAWK compiled by GCC without -O2 passes its test
15458 suite using a GLR parser driven by LALR tables. It fails with -O2
15459 because `struct stat' gives two different answers on my machine:
15460 88 (definition of an auto var) and later 96 (memset on this var).
15461 Hence the stack is badly corrumpted. The headers inclusion is to
15462 blame: if I move the awk.h inclusion before GLR's system header
15463 inclusion, the two struct stat have the same size.
15464
15465 * src/tables.c (pack_table): Always create conflict_table.
15466 (token_actions): Always create conflict_list.
15467 * data/glr.c (YYFLAG): Remove, unused.
15468
15469 2002-10-13 Akim Demaille <akim@epita.fr>
15470
15471 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15472 (O0FLAGS): New.
15473 (VALGRIND, GXX): New.
15474 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15475 * tests/bison.in: Run $PREBISON a pre-command.
15476 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15477 (maintainer-check-g++): New.
15478 * Makefile.am (maintainer-check): New.
15479
15480 2002-10-13 Akim Demaille <akim@epita.fr>
15481
15482 * data/glr.c: Formatting changes.
15483 Tweak some trace messages to match yacc.c's.
15484
15485 2002-10-13 Akim Demaille <akim@epita.fr>
15486
15487 GLR parsers sometimes raise parse errors instead of performing the
15488 default reduction.
15489 Reported by Charles-Henry de Boysson.
15490
15491 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15492 check the length of the traces when %glr.
15493 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15494 GLR's traces.
15495 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15496 Test GLR parsers.
15497 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15498 (yyltype): Remove the yy prefix from the member names.
15499 (yytable): Complete its comment.
15500 (yygetLRActions): Map error action number from YYTABLE from
15501 YYTABLE_NINF to 0.
15502 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15503 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15504 not satisfying as we could compare an YYACTION computed from
15505 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15506 only value for error actions.
15507 (yyreportParseError): In verbose parse error messages, don't issue
15508 `error' in the list of expected tokens.
15509 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15510 next action to perform to match glr.c's decoding.
15511 (yytable): Complete its comment.
15512
15513 2002-10-13 Paul Eggert <eggert@twinsun.com>
15514
15515 Fix problem reported by Henrik Grubbstroem in
15516 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15517 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15518 because the Bison parser reads the second action before reducing
15519 the first one.
15520 * src/scan-gram.l (rule_length): New static var.
15521 Use it to keep track of the rule length in the scanner, since
15522 we can't expect the parser to be in lock-step sync with the scanner.
15523 (handle_action_dollar, handle_action_at): Use this var.
15524 * tests/actions.at (Exotic Dollars): Test for the problem.
15525
15526 2002-10-12 Paul Eggert <eggert@twinsun.com>
15527
15528 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15529 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15530 Include <sys/time.h> when checking for clock_t and struct tms.
15531 Use same include order as source.
15532 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15533 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15534
15535 * lib/timevar.c: Update copyright date and clarify comments.
15536 (get_time) [IN_GCC]: Keep the GCC version for reference.
15537
15538 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15539 GCC version as of today, then merge Bison's changes.
15540 Change "GCC" to "Bison" in copyright notice. timevar.def's
15541 author is Akim, so change that too.
15542
15543 * src/reader.c (grammar_current_rule_check):
15544 Don't worry about the default action if $$ is untyped.
15545 Prevents bogus warnings reported by Jim Gifford in
15546 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15547
15548 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15549 * data/glr.c, data/lalr1.cc, data/yacc.c:
15550 Output token definitions before the first part of user declarations.
15551 Fixes compatibility problem reported by Jim Gifford for kbd in
15552 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15553
15554 2002-10-11 Paul Eggert <eggert@twinsun.com>
15555
15556 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15557 (yyparse): here. This undoes some of the 2002-07-25 change.
15558 Compatibility problem reported by Ralf S. Engelschall with
15559 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15560
15561 2002-10-11 Akim Demaille <akim@epita.fr>
15562
15563 * tests/regression.at Characters Escapes): New.
15564 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15565 characters.
15566 Reported by Jan Nieuwenhuizen.
15567
15568 2002-10-11 Akim Demaille <akim@epita.fr>
15569
15570 * po/id.po: New.
15571
15572 2002-10-10 Paul Eggert <eggert@twinsun.com>
15573
15574 Portability fixes for bitsets; this also avoids several GCC
15575 warnings.
15576
15577 * lib/abitset.c: Include <stddef.h>, for offsetof.
15578 * lib/lbitset.c: Likewise.
15579
15580 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15581 properly for vectors of objects. Do not assume that adding a
15582 header size to a multiple of a word size yields a value that is
15583 properly aligned for the whole union.
15584 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15585
15586 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15587 unique names for structures.
15588 * lib/ebitset.c (ebitset_bytes): Likewise.
15589 * lib/lbitset.c (lbitset_bytes): Likewise.
15590
15591 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15592 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15593 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15594 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15595 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15596 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15597 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15598 to improve the type-checking that GCC can do.
15599 * lib/bitset.c (bitset_op4_cmp): Likewise.
15600 * lib/bitset_stats.c (bitset_stats_count,
15601 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15602 bitset_stats_copy, bitset_stats_disjoint_p,
15603 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15604 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15605 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15606 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15607 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15608 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15609 bitset_stats_or_and_cmp): Likewise.
15610 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15611 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15612 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15613 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15614
15615 * lib/abitset.h: Include bitset.h, not bbitset.h.
15616 * lib/ebitset.h: Likewise.
15617 * lib/lbitset.h: Likewise.
15618
15619 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15620 All instances of parameters of type enum bitset_opts are now of
15621 type enum_bitset_opts, to conform to the C Standard, and similarly
15622 for enum_bitset_type.
15623 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15624 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15625
15626 Do not use "struct bitset_struct" to mean different things in
15627 different modules. Not only is this confusing, it violates
15628 the C Standard, which requires that structure types in different
15629 modules must be compatible if one is to be passed to the other.
15630 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15631 All instances of "struct bitset_struct *" replaced with "bitset".
15632 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15633 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15634 struct lbitset_struct, struct bitset_stats_struct): New types.
15635 All uses of struct bitset_struct changed to union bitset_union,
15636 etc.
15637 * lib/abitset.c (struct abitset_struct, abitset,
15638 struct bitset_struct): Remove.
15639 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15640 struct bitset_struct): Remove.
15641 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15642 bitset_struct): Remove.
15643 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15644 Likewise.
15645
15646 Do not call a function of type T using a call that assumes the
15647 function is of a different type U. Standard C requires that a
15648 function must be called with a type that is compatible with its
15649 definition.
15650 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15651 New decls.
15652 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15653 New functions.
15654 * lib/ebitset.c (PFV): Remove.
15655 * lib/lbitset.c (PFV): Likewise.
15656 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15657 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15658 decls.
15659 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15660 (ebitset_vtable): Use them.
15661 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15662 lbitset_xor): New functions.
15663 (lbitset_vtable): Use them.
15664
15665 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15666 Declare.
15667
15668 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15669 GCC warning.
15670 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15671 Use offsetof, for simplicity.
15672
15673 2002-10-06 Paul Eggert <eggert@twinsun.com>
15674
15675 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15676 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15677 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15678 which was inadvertently undone by the 2002-09-30 patch.
15679 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15680 the same width as int.
15681
15682 2002-10-04 Paul Eggert <eggert@twinsun.com>
15683
15684 Version 1.50.
15685
15686 * configure.ac (AC_INIT), NEWS: Increment version number.
15687
15688 * doc/bison.texinfo: Minor spelling, grammar, and white space
15689 fixes.
15690 (Symbols): Mention that any negative value returned from yylex
15691 signifies end-of-input. Warn about negative chars. Mention
15692 the portable Standard C character set.
15693
15694 The GNU coding standard says CFLAGS and YFLAGS are reserved
15695 for the installer to set.
15696 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15697 * src/Makefile.am (AM_CFLAGS): Likewise.
15698 (AM_YFLAGS): Renamed from YFLAGS.
15699
15700 Fix some MAX and MIN problems.
15701 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15702 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15703 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15704 * src/reader.c (reader): Use it.
15705
15706 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15707 POSIX 1003.1-2001 has removed fgrep.
15708
15709 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15710
15711 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15712 interpreted as signed.
15713 * lib/ebitset.c (ebitset_list): Fix bug.
15714
15715 2002-10-01 Paul Eggert <eggert@twinsun.com>
15716
15717 More fixes for 64-bit hosts and large bitsets.
15718
15719 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15720 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15721 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15722 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15723 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15724 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15725 bitset_count_): Likewise.
15726 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15727 bitset_first, bitset_last): Likewise.
15728 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15729 bitset_stats_list_reverse, bitset_stats_size,
15730 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15731 Likewise.
15732 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15733 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15734 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15735 bitsetv_reflexive_transitive_closure): Likewise.
15736 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15737 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15738 Likewise.
15739 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15740 Likewise.
15741
15742 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15743 Use size_t, not unsigned int, to count bytes.
15744 * lib/abitset.h (abitset_bytes): Likewise.
15745 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15746 Likewise.
15747 * lib/bitset.h (bitset_bytes): Likewise.
15748 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15749 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15750 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15751 * lib/ebitset.c (ebitset_bytes): Likewise.
15752 * lib/ebitset.h (ebitset_bytes): Likewise.
15753 * lib/lbitset.c (lbitset_bytes): Likewise.
15754 * lib/lbitset.h (lbitset_bytes): Likewise.
15755
15756 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15757 abitset_subset_p, abitset_disjoint_p, abitset_and,
15758 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15759 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15760 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15761 abitset_or_and, abitset_or_and_cmp):
15762 Use bitset_windex instead of unsigned int.
15763 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15764 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15765 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15766 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15767 Likewise.
15768 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15769
15770 * lib/bitset.c (bitset_print):
15771 Use proper printf formats for widths of integer types.
15772 * lib/bitset_stats.c (bitset_percent_histogram_print,
15773 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15774 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15775 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15776 * lib/lbitset.c (lbitset_bytes): Likewise.
15777
15778 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15779 BITSET_SIZE_MAX): New macros.
15780 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15781 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15782 to BITSET_WINDEX_MAX.
15783
15784 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15785 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15786 since we now return the bitset_bindex type (not int).
15787
15788 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15789 when computing sizes.
15790 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15791
15792 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15793 and avoid cast to unsigned.
15794
15795 2002-09-30 Akim Demaille <akim@epita.fr>
15796
15797 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15798 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15799 Updates from Michael Hayes.
15800
15801 2002-09-30 Art Haas <ahaas@neosoft.com>
15802
15803 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15804 invocations.
15805 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15806 defined.
15807
15808 2002-09-27 Akim Demaille <akim@epita.fr>
15809
15810 Version 1.49c.
15811
15812 2002-09-27 Akim Demaille <akim@epita.fr>
15813
15814 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15815 (Because of AC_LIBSOURCE).
15816
15817 2002-09-27 Akim Demaille <akim@epita.fr>
15818
15819 Playing with Autoscan.
15820
15821 * configure.ac: Remove the old LIBOBJ tweaks.
15822 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15823 * lib/strrchr.c: New.
15824 * lib/strtol.c: New, from the Coreutils 4.5.1.
15825
15826 2002-09-27 Akim Demaille <akim@epita.fr>
15827
15828 Playing with Autoscan.
15829
15830 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15831 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15832 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15833 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15834 Coreutils 4.5.1.
15835
15836 2002-09-24 Akim Demaille <akim@epita.fr>
15837
15838 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15839 (Frequently Asked Questions, Parser Stack Overflow): New.
15840
15841 2002-09-13 Akim Demaille <akim@epita.fr>
15842
15843 Playing with autoscan.
15844
15845 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15846 * src/files.c (skeleton_find): Remove, unused.
15847 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15848 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15849
15850 2002-09-13 Akim Demaille <akim@epita.fr>
15851
15852 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15853 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15854
15855 2002-09-13 Akim Demaille <akim@epita.fr>
15856
15857 * configure.ac: Require 2.54.
15858 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15859 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15860 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15861 Remove, provided by Autoconf macros.
15862
15863 2002-09-12 Akim Demaille <akim@epita.fr>
15864
15865 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15866
15867 2002-09-12 Akim Demaille <akim@epita.fr>
15868
15869 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15870 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15871 Reported by Martin Mokrejs.
15872
15873 2002-09-10 Akim Demaille <akim@epita.fr>
15874
15875 * src/parse-gram.y: Associate a human readable string to each
15876 token type.
15877 * tests/regression.at (Invalid inputs): Adjust.
15878
15879 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15880
15881 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15882 with an Autoconf-2.5x style configure.ac.
15883
15884 2002-09-06 Paul Eggert <eggert@twinsun.com>
15885
15886 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15887 exception applies only to yacc.c. This is a modification of a
15888 patch originally suggested by Akim Demaille.
15889
15890 2002-09-06 Akim Demaille <akim@epita.fr>
15891
15892 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15893 here to...
15894 * data/yacc.c: here.
15895
15896 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15897 LocationType.
15898 (b4_ltype): Default to yy::Location from location.hh.
15899
15900 2002-09-04 Jim Meyering <jim@meyering.net>
15901
15902 * data/yacc.c: Guard the declaration of yytoknum also with
15903 `#ifdef YYPRINT', so it is declared only when used.
15904
15905 2002-09-04 Akim Demaille <akim@epita.fr>
15906
15907 * configure.in: Rename as...
15908 * configure.ac: this.
15909 Bump to 1.49c.
15910
15911 2002-09-04 Akim Demaille <akim@epita.fr>
15912
15913 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15914 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15915 translate maintainer only messages.
15916
15917 2002-08-12 Paul Eggert <eggert@twinsun.com>
15918
15919 Version 1.49b.
15920
15921 * Makefile.am (SUBDIRS): Remove intl.
15922 (DISTCLEANFILES): Remove.
15923 * NEWS: Mention that GNU M4 is now required. Clarify what is
15924 meant by "larger grammars". Mention the pt_BR translation.
15925 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15926 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15927 Bump version from 0.11.2 to 0.11.5.
15928 (BISON_PREREQ_STAGE): Remove.
15929 (AM_GNU_GETTEXT): Use external gettext.
15930 (AC_OUTPUT): Remove intl/Makefile.
15931
15932 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15933
15934 * data/glr.c: Include string.h, for strlen.
15935 (yyreportParseError): Use size_t for yysize.
15936 (yy_yypstack): No longer nested inside yypstates, as nested
15937 functions are not portable. Do not assume size_t is the
15938 same width as int.
15939 (yypstates): Do not assume that ptrdiff_t is the same width
15940 as int, and similarly for yyposn and YYINDEX.
15941
15942 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15943
15944 * lib/Makefile.am (INCLUDES): Do not include from the intl
15945 directory, which has been removed.
15946 * src/Makefile.am (INCLUDES): Likewise.
15947
15948 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15949 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15950 New vars.
15951
15952 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15953 * tests/Makefile.am (EXTRA_DIST): Likewise.
15954
15955 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15956 Do not assume that bitset_windex is the same width as unsigned.
15957
15958 * lib/abitset.c (abitset_unused_clear): Do not assume that
15959 bitset_word is the same width as int.
15960 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15961 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15962 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15963 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15964 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15965
15966 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15967 portability to one's complement hosts!).
15968 * lib/ebitset.c (ebitset_op1): Likewise.
15969 * lib/lbitset.c (lbitset_op1): Likewise.
15970
15971 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15972 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15973 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15974 Sync with fileutils.
15975 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15976 lib/gettext.h: Sync with diffutils.
15977
15978 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15979 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15980
15981 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15982 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15983 check for void *.
15984
15985 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15986 size_t; the old version tried to do this but casted improperly.
15987 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15988 (bitset_test): Now returns int, not unsigned long.
15989
15990 * lib/bitset_stats.c: Include "gettext.h".
15991 (_): New macro.
15992 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15993 name locals "index", as it generates unnecessary warnings on some
15994 hosts that have an "index" function.
15995
15996 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15997 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15998 they need translation.
15999 * src/LR0.c (state_list_append, new_itemsets, get_state,
16000 append_states, generate_states): Likewise.
16001 * src/assoc.c (assoc_to_string): Likewise.
16002 * src/closure.c (print_closure, set_firsts, closure): Likewise.
16003 * src/gram.c (grammar_dump): Likewise.
16004 * src/injections.c (injections_compute): Likewise.
16005 * src/lalr.c (lookaheads_print): Likewise.
16006 * src/relation.c (relation_transpose): Likewise.
16007 * src/scan-gram.l: Likewise.
16008 * src/tables.c (table_grow, pack_vector): Likewise.
16009
16010 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
16011 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
16012 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
16013 * m4/mbstate_t.m4: Sync with fileutils.
16014 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
16015
16016 * po/LINGUAS: Add pt_BR.
16017 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
16018 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
16019 lib/timevar.c.
16020 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
16021 manual recommends.
16022 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
16023
16024 * src/complain.c (strerror_r): Remove decl; not needed.
16025 (strerror): Use same pattern as ../lib/error.c.
16026
16027 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
16028
16029 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
16030
16031 * src/main.c (main): Cast result of bindtextdomain and textdomain
16032 to void, to avoid a GCC warning when --disable-nls is in effect.
16033
16034 * src/scan-gram.l: Use strings rather than escapes when possible,
16035 to minimize the number of warnings from xgettext.
16036 (handle_action_dollar, handle_action_at): Don't use isdigit,
16037 as it mishandles negative chars and it may not work as expected
16038 outside the C locale.
16039
16040 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
16041 this is a GCC extension and is not portable to other compilers.
16042
16043 * src/system.h (alloca): Use same pattern as ../lib/error.c.
16044 Do not include <ctype.h>; no longer needed.
16045 Do not include <malloc.h>; no longer needed (and generates
16046 warnings on OpenBSD 3.0).
16047
16048 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
16049 it's not portable.
16050
16051 * tests/regression.at: Do not use 'cc -c input.c -o input';
16052 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
16053
16054 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
16055 exit status as failure, not just exit status 1. Sun C exits
16056 with status 2 sometimes.
16057
16058 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
16059 Use it for the two large tests.
16060
16061 2002-08-02 Akim Demaille <akim@epita.fr>
16062
16063 * src/conflicts.c (conflicts_output): Don't output rules never
16064 reduced here, since anyway that computation doesn't work.
16065 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
16066 (rule_useless_p, rule_never_reduced_p): New.
16067 (grammar_rules_partial_print): Use a filter instead of a range.
16068 Display the title only if needed.
16069 (grammar_rules_print): Adjust.
16070 (grammar_rules_never_reduced_report): New.
16071 * src/tables.c (action_row): Move the computation of rules never
16072 reduced to...
16073 (token_actions): here.
16074 * src/main.c (main): Make the parser before making the report, so
16075 that rules never reduced are computed.
16076 Call grammar_rules_never_reduced_report.
16077 * src/print.c (print_results): Report rules never reduced.
16078 * tests/conflicts.at, tests/reduce.at: Adjust.
16079
16080 2002-08-01 Akim Demaille <akim@epita.fr>
16081
16082 Instead of attaching lookaheads and duplicating the rules being
16083 reduced by a state, attach the lookaheads to the reductions.
16084
16085 * src/state.h (state_t): Remove the `lookaheads',
16086 `lookaheads_rule' member.
16087 (reductions_t): Add a `lookaheads' member.
16088 Use a regular array for the `rules'.
16089 * src/state.c (reductions_new): Initialize the lookaheads member
16090 to 0.
16091 (state_rule_lookaheads_print): Adjust.
16092 * src/state.h, src/state.c (state_reductions_find): New.
16093 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16094 (count_rr_conflicts): Adjust.
16095 * src/lalr.c (LArule): Remove.
16096 (add_lookback_edge): Adjust.
16097 (state_lookaheads_count): New.
16098 (states_lookaheads_initialize): Merge into...
16099 (initialize_LA): this.
16100 (lalr_free): Adjust.
16101 * src/main.c (main): Don't free nullable and derives too early: it
16102 is used by --verbose.
16103 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16104
16105 2002-08-01 Akim Demaille <akim@epita.fr>
16106
16107 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16108 `rule_number_t**'.
16109 (set_derives, free_derives): Rename as...
16110 (derives_compute, derives_free): this.
16111 Adjust all dependencies.
16112 * src/nullable.c (set_nullable, free_nullable): Rename as...
16113 (nullable_compute, nullable_free): these.
16114 (rule_list_t): Store rule_t *, not rule_number_t.
16115 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16116 pointers, instead of their numbers.
16117 * src/main.c (main): Call nullable_free, and derives_free earlier,
16118 as they were lo longer used.
16119
16120 2002-08-01 Akim Demaille <akim@epita.fr>
16121
16122 * lib/timevar.c (get_time): Include children time.
16123 * src/lalr.h (LA, LArule): Don't export them: used with the
16124 state_t.
16125 * src/lalr.c (LA, LArule): Static.
16126 * src/lalr.h, src/lalr.c (lalr_free): New.
16127 * src/main.c (main): Call it.
16128 * src/tables.c (pack_vector): Check whether loc is >= to the
16129 table_size, not >.
16130 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16131 (tables_generate): do it, since that's also it which allocates
16132 them.
16133 Don't free LA and LArule, main does.
16134
16135 2002-07-31 Akim Demaille <akim@epita.fr>
16136
16137 Separate parser tables computation and output.
16138
16139 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16140 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16141 (yydefgoto, yydefact, high): Move to...
16142 * src/tables.h, src/tables.c: here.
16143 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16144 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16145 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16146 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16147 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16148 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16149 (action_row, save_row, token_actions, save_column, default_goto)
16150 (goto_actions, sort_actions, matching_state, pack_vector)
16151 (table_ninf_remap, pack_table, prepare_actions): Move to...
16152 * src/tables.c: here.
16153 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16154 * src/output.c (token_actions, output_base, output_conflicts)
16155 (output_check): Merge into...
16156 (prepare_actions): this.
16157 (actions_output): Rename as...
16158 (user_actions_output): this.
16159 * src/main.c (main): Call tables_generate and tables_free.
16160
16161 2002-07-31 Akim Demaille <akim@epita.fr>
16162
16163 Steal GCC's --time-report support.
16164
16165 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16166 stolen/adjusted from GCC.
16167 * m4/stage.m4: Remove time related checks.
16168 * m4/timevar.m4: New.
16169 * configure.in: Adjust.
16170 * src/system.h: Adjust to using timevar.h.
16171 * src/getargs.h, src/getargs.c: Support trace_time for
16172 --trace=time.
16173 * src/main.c (stage): Remove.
16174 (main): Replace `stage' invocations with timevar calls.
16175 * src/output.c: Insert pertinent timevar calls.
16176
16177 2002-07-31 Akim Demaille <akim@epita.fr>
16178
16179 Let --trace have arguments.
16180
16181 * src/getargs.h (enum trace_e): New.
16182 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16183 (long_options, short_options): --trace/-T takes an optional
16184 argument.
16185 Change all the uses of trace_flag to reflect the new flags.
16186 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16187
16188 Strengthen `stage' portability.
16189
16190 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16191 * configure.in: Use it.
16192 Don't check for malloc.h and sys/times.h.
16193 * src/system.h: Include them when appropriate.
16194 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16195 times and struct tms are available.
16196
16197 2002-07-30 Akim Demaille <akim@epita.fr>
16198
16199 In verbose parse error message, don't report `error' as an
16200 expected token.
16201 * tests/actions.at (Printers and Destructors): Adjust.
16202 * tests/calc.at (Calculator $1): Adjust.
16203 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16204 error message, do not report the parser accepts the error token in
16205 that state.
16206
16207 2002-07-30 Akim Demaille <akim@epita.fr>
16208
16209 Normalize conflict related messages.
16210
16211 * src/complain.h, src/complain.c (warn, complain): New.
16212 * src/conflicts.c (conflicts_print): Use them.
16213 (conflict_report_yacc): New, extracted from...
16214 (conflicts_print): here.
16215 * tests/conflicts.at, tests/existing.at: Adjust.
16216
16217 2002-07-30 Akim Demaille <akim@epita.fr>
16218
16219 Report rules which are never reduced by the parser: those hidden
16220 by conflicts.
16221
16222 * src/LR0.c (save_reductions): Don't make the final state too
16223 different: save its reduction (accept) instead of having a state
16224 without any action (no shift or goto, no reduce).
16225 Note: the final state is now a ``regular'' state, i.e., the
16226 parsers now contain `reduce 0' as default reduction.
16227 Nevertheless, since they decide to `accept' when yystate =
16228 final_state, they still will not reduce rule 0.
16229 * src/print.c (print_actions, print_reduction): Adjust.
16230 * src/output.c (action_row): Track reduced rules.
16231 (token_actions): Report rules never reduced.
16232 * tests/conflicts.at, tests/regression.at: Adjust.
16233
16234 2002-07-30 Akim Demaille <akim@epita.fr>
16235
16236 `stage' was accidently included in a previous patch.
16237 Initiate its autoconfiscation.
16238
16239 * configure.in: Look for malloc.h and sys/times.h.
16240 * src/main.c (stage): Adjust.
16241 Report only when trace_flag.
16242
16243 2002-07-29 Akim Demaille <akim@epita.fr>
16244
16245 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16246 state_number_t.
16247 (errs_t): symbol_t*, not symbol_number_t.
16248 (reductions_t): rule_t*, not rule_number_t.
16249 (FOR_EACH_SHIFT): New.
16250 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16251 * src/print.c, src/print_graph.c: Adjust.
16252
16253 2002-07-29 Akim Demaille <akim@epita.fr>
16254
16255 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16256
16257 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16258 (endtoken, accept): these.
16259 * src/reader.c (reader): Set endtoken's default tag to "$end".
16260 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16261 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16262 Adjust.
16263
16264 2002-07-29 Akim Demaille <akim@epita.fr>
16265
16266 * src/reduce.c (reduce_grammar): When the language is empty,
16267 complain about the start symbol, not the axiom.
16268 Use its location.
16269 * tests/reduce.at (Empty Language): New.
16270
16271 2002-07-26 Akim Demaille <akim@epita.fr>
16272
16273 * src/reader.h, src/reader.c (gram_error): ... can't get
16274 yycontrol without making too strong assumptions on the parser
16275 itself.
16276 * src/output.c (prepare_tokens): Use the real 0th value of
16277 token_translations instead of `0'.
16278 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16279 visible here.
16280 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16281 for the time being: %locations ought to provide it to yyerror.
16282
16283 2002-07-25 Akim Demaille <akim@epita.fr>
16284
16285 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16286 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16287 * tests/regression.at (Web2c Actions): Adjust.
16288
16289 2002-07-25 Akim Demaille <akim@epita.fr>
16290
16291 Stop storing rules from 1 to nrules + 1.
16292
16293 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16294 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16295 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16296 Iterate from 0 to nrules.
16297 Use rule_number_as_item_number and item_number_as_rule_number.
16298 Adjust to `derive' now containing possibly 0.
16299 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16300 Handle the `- 1' part in rule numbers from/to item numbers.
16301 * src/conflicts.c (log_resolution): Fix the message which reversed
16302 shift and reduce.
16303 * src/output.c (action_row): Initialize default_rule to -1.
16304 (token_actions): Adjust.
16305 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16306 expected output.
16307 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16308
16309 2002-07-25 Akim Demaille <akim@epita.fr>
16310
16311 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16312 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16313 (b4_c_knr_arg_decl): New.
16314 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16315 yyreport_parse_error.
16316
16317 2002-07-25 Akim Demaille <akim@epita.fr>
16318
16319 * data/yacc.c (yyreport_parse_error): New, extracted from...
16320 (yyparse): here.
16321 (yydestruct, yysymprint): Move above yyparse.
16322 Be K&R compliant.
16323
16324 2002-07-25 Akim Demaille <akim@epita.fr>
16325
16326 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16327 replace...
16328 (b4_sint_type, b4_uint_type): these.
16329 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16330 * tests/regression.at (Web2c Actions): Adjust.
16331
16332 2002-07-25 Akim Demaille <akim@epita.fr>
16333
16334 * src/gram.h (TIEM_NUMBER_MAX): New.
16335 (item_number_of_rule_number, rule_number_of_item_number): Rename
16336 as...
16337 (rule_number_as_item_number, item_number_as_rule_number): these.
16338 Adjust dependencies.
16339 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16340 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16341 (symbol_number_to_vector_number): New.
16342 (order): Of vector_number_t* type.
16343 (base_t, BASE_MAX, BASE_MIN): New.
16344 (froms, tos, width, pos, check): Of base_t type.
16345 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16346 (actrow): Of action_number_t type.
16347 (conflrow): Of unsigned int type.
16348 (table_ninf, base_ninf): New.
16349 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16350 (muscle_insert_int_table, muscle_insert_base_table)
16351 (muscle_insert_rule_number_table): New.
16352 (prepare_tokens): Output `toknum' as int_table.
16353 (action_row): Returns a rule_number_t.
16354 Use ACTION_MIN, not SHRT_MIN.
16355 (token_actions): yydefact is rule_number_t*.
16356 (table_ninf_remap): New.
16357 (pack_table): Use it for `base' and `table'.
16358 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16359 replaced with...
16360 (YYPACT_NINF, YYTABLE_NINF): these.
16361 (yypact, yytable): Compute their types instead of hard-coded
16362 `short'.
16363 * tests/regression.at (Web2c Actions): Adjust.
16364
16365 2002-07-19 Akim Demaille <akim@epita.fr>
16366
16367 * src/scan-gram.l (id): Can start with an underscore.
16368
16369 2002-07-16 Akim Demaille <akim@epita.fr>
16370
16371 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16372 Adjust all former `associativity' dependencies.
16373 * src/symtab.c (symbol_new): Default associativity is `undef', not
16374 `right'.
16375 (symbol_check_alias_consistence): Adjust.
16376
16377 2002-07-09 Akim Demaille <akim@epita.fr>
16378
16379 * doc/bison.texinfo: Properly set the ``header'' part.
16380 Use @dircategory ``GNU programming tools'' as per Texinfo's
16381 documentation.
16382 Use @copying.
16383
16384 2002-07-09 Akim Demaille <akim@epita.fr>
16385
16386 * lib/quotearg.h: Protect against multiple inclusions.
16387 * src/location.h (location_t): Add a `file' member.
16388 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16389 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16390 `error_one_per_line' support.
16391
16392 2002-07-09 Akim Demaille <akim@epita.fr>
16393
16394 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16395 * src/reader.c (lineno): Remove.
16396 Adjust all dependencies.
16397 (get_merge_function): Take a location and use complain_at.
16398 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16399 * tests/regression.at (Invalid inputs, Mixing %token styles):
16400 Adjust.
16401
16402 2002-07-09 Akim Demaille <akim@epita.fr>
16403
16404 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16405 recovery rule, and forbid extensions when --yacc.
16406 (gram_error): Use complain_at.
16407 * src/reader.c (reader): Exit if there were parse errors.
16408
16409 2002-07-09 Akim Demaille <akim@epita.fr>
16410
16411 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16412 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16413 Reported by R Blake <blakers@mac.com>.
16414
16415 2002-07-09 Akim Demaille <akim@epita.fr>
16416
16417 * data/yacc.c: Output the copyright notive in the header.
16418
16419 2002-07-03 Akim Demaille <akim@epita.fr>
16420
16421 * src/output.c (froms, tos): Are state_number_t.
16422 (save_column): sp, sp1, and sp2 are state_number_t.
16423 (prepare): Rename `final' as `final_state_number', `nnts' as
16424 `nterms_number', `nrules' as `rules_number', `nstates' as
16425 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16426 unused.
16427 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16428 * data/lalr1.cc (nsym_): Remove, unused.
16429
16430 2002-07-03 Akim Demaille <akim@epita.fr>
16431
16432 * src/lalr.h, src/lalr.c (goto_number_t): New.
16433 * src/lalr.c (goto_list_t): New.
16434 Propagate them.
16435 * src/nullable.c (rule_list_t): New.
16436 Propagate.
16437 * src/types.h: Remove.
16438
16439 2002-07-03 Akim Demaille <akim@epita.fr>
16440
16441 * src/closure.c (print_fderives): Use rule_rhs_print.
16442 * src/derives.c (print_derives): Use rule_rhs_print.
16443 (rule_list_t): New, replaces `shorts'.
16444 (set_derives): Add comments.
16445 * tests/sets.at (Nullable, Firsts): Adjust.
16446
16447 2002-07-03 Akim Demaille <akim@epita.fr>
16448
16449 * src/output.c (prepare_actions): Free `tally' and `width'.
16450 (prepare_actions): Allocate and free `order'.
16451 * src/symtab.c (symbols_free): Free `symbols'.
16452 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16453 * src/output.c (m4_invoke): Move to...
16454 * src/scan-skel.l: here.
16455 (<<EOF>>): Close yyout, and free its name.
16456
16457 2002-07-03 Akim Demaille <akim@epita.fr>
16458
16459 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16460
16461 * src/LR0.c (new_state): Merge into...
16462 (state_list_append): this.
16463 (new_states): Merge into...
16464 (generate_states): here.
16465 (set_states): Don't ensure a proper `errs' state member here, do it...
16466 * src/conflicts.c (conflicts_solve): here.
16467 * src/state.h, src/state.c: Comment changes.
16468 (state_t): Rename member `shifts' as `transitions'.
16469 Adjust all dependencies.
16470 (errs_new): For consistency, also take the values as argument.
16471 (errs_dup): Remove.
16472 (state_errs_set): New.
16473 (state_reductions_set, state_transitions_set): Assert that no
16474 previous value was assigned.
16475 (state_free): New.
16476 (states_free): Use it.
16477 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16478 temporary storage: use `errs' and `nerrs' as elsewhere.
16479 (set_conflicts): Allocate and free this `errs'.
16480
16481 2002-07-02 Akim Demaille <akim@epita.fr>
16482
16483 * lib/libiberty.h: New.
16484 * lib: Update the bitset implementation from upstream.
16485 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16486 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16487 * src/main.c: Adjust bitset stats calls.
16488
16489 2002-07-01 Paul Eggert <eggert@twinsun.com>
16490
16491 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16492 char, so that negative chars don't collide with $.
16493
16494 2002-06-30 Akim Demaille <akim@epita.fr>
16495
16496 Have the GLR tests be `warning' checked, and fix the warnings.
16497
16498 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16499 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16500 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16501 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16502 (yyaddDeferredAction): static.
16503 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16504 (yyreportParseError): yyprefix is const.
16505 yytokenp is used only when verbose.
16506 (yy__GNUC__): Replace with __GNUC__.
16507 (yypdumpstack): yyi is size_t.
16508 (yypreference): Un-yy local variables and arguments, to avoid
16509 clashes with `yyr1'. Anyway, we are not in the user name space.
16510 (yytname_size): be an int, as is compared with ints.
16511 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16512 Use them.
16513 * tests/cxx-gram.at: Use quotation to protect $1.
16514 Use AT_COMPILE to enable warnings hunts.
16515 Prototype yylex and yyerror.
16516 `Use' argc.
16517 Include `string.h', not `strings.h'.
16518 Produce and prototype stmtMerge only when used.
16519 yylex takes a location.
16520
16521 2002-06-30 Akim Demaille <akim@epita.fr>
16522
16523 We spend a lot of time in quotearg, in particular when --verbose.
16524
16525 * src/symtab.c (symbol_get): Store a quoted version of the key.
16526 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16527 Adjust all callers.
16528
16529 2002-06-30 Akim Demaille <akim@epita.fr>
16530
16531 * src/state.h (reductions_t): Rename member `nreds' as num.
16532 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16533 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16534
16535 2002-06-30 Akim Demaille <akim@epita.fr>
16536
16537 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16538 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16539 (shifts_to): Rename as...
16540 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16541 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16542 (TRANSITION_IS_DISABLED, transitions_to): these.
16543
16544 2002-06-30 Akim Demaille <akim@epita.fr>
16545
16546 * src/print.c (print_shifts, print_gotos): Merge into...
16547 (print_transitions): this.
16548 (print_transitions, print_errs, print_reductions): Align the
16549 lookaheads columns.
16550 (print_core, print_transitions, print_errs, print_state,
16551 print_grammar): Output empty lines separator before, not after.
16552 (state_default_rule_compute): Rename as...
16553 (state_default_rule): this.
16554 * tests/conflicts.at (Defaulted Conflicted Reduction),
16555 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16556 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16557
16558 2002-06-30 Akim Demaille <akim@epita.fr>
16559
16560 Display items as we display rules.
16561
16562 * src/gram.h, src/gram.c (rule_lhs_print): New.
16563 * src/gram.c (grammar_rules_partial_print): Use it.
16564 * src/print.c (print_core): Likewise.
16565 * tests/conflicts.at (Defaulted Conflicted Reduction),
16566 (Unresolved SR Conflicts): Adjust.
16567 (Unresolved SR Conflicts): Adjust and rename as...
16568 (Resolved SR Conflicts): this, as was meant.
16569 * tests/regression.at (Web2c Report): Adjust.
16570
16571 2002-06-30 Akim Demaille <akim@epita.fr>
16572
16573 * src/print.c (state_default_rule_compute): New, extracted from...
16574 (print_reductions): here.
16575 Pessimize, but clarify the code.
16576 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16577
16578 2002-06-30 Akim Demaille <akim@epita.fr>
16579
16580 * src/output.c (action_row): Let default_rule be always a rule
16581 number.
16582
16583 2002-06-30 Akim Demaille <akim@epita.fr>
16584
16585 * src/closure.c (print_firsts, print_fderives, closure):
16586 Use BITSET_EXECUTE.
16587 * src/lalr.c (lookaheads_print): Likewise.
16588 * src/state.c (state_rule_lookaheads_print): Likewise.
16589 * src/print_graph.c (print_core): Likewise.
16590 * src/print.c (print_reductions): Likewise.
16591 * src/output.c (action_row): Likewise.
16592 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16593
16594 2002-06-30 Akim Demaille <akim@epita.fr>
16595
16596 * src/print_graph.c: Use report_flag.
16597
16598 2002-06-30 Akim Demaille <akim@epita.fr>
16599
16600 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16601 to...
16602 * src/relation.h, src/relation.c (traverse, relation_digraph)
16603 (relation_print, relation_transpose): New.
16604
16605 2002-06-30 Akim Demaille <akim@epita.fr>
16606
16607 * src/state.h, src/state.c (shifts_to): New.
16608 * src/lalr.c (build_relations): Use it.
16609
16610 2002-06-30 Akim Demaille <akim@epita.fr>
16611
16612 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16613 (item_number_of_rule_number, rule_number_of_item_number): New.
16614 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16615 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16616 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16617 Propagate their use.
16618 Much remains to be done, in particular wrt `shorts' from types.h.
16619
16620 2002-06-30 Akim Demaille <akim@epita.fr>
16621
16622 * src/symtab.c (symbol_new): Initialize the `printer' member.
16623
16624 2002-06-30 Akim Demaille <akim@epita.fr>
16625
16626 * src/LR0.c (save_reductions): Remove, replaced by...
16627 * src/state.h, src/state.c (state_reductions_set): New.
16628 (reductions, errs): Rename as...
16629 (reductions_t, errs_t): these.
16630 Adjust all dependencies.
16631
16632 2002-06-30 Akim Demaille <akim@epita.fr>
16633
16634 * src/LR0.c (state_list_t, state_list_append): New.
16635 (first_state, last_state): Now symbol_list_t.
16636 (this_state): Remove.
16637 (new_itemsets, append_states, save_reductions): Take a state_t as
16638 argument.
16639 (set_states, generate_states): Adjust.
16640 (save_shifts): Remove, replaced by...
16641 * src/state.h, src/state.c (state_shifts_set): New.
16642 (shifts): Rename as...
16643 (shifts_t): this.
16644 Adjust all dependencies.
16645 * src/state.h (state_t): Remove the `next' member.
16646
16647 2002-06-30 Akim Demaille <akim@epita.fr>
16648
16649 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16650 escaped in slot 0.
16651
16652 2002-06-30 Akim Demaille <akim@epita.fr>
16653
16654 Use hash.h for the state hash table.
16655
16656 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16657 (allocate_storage): Use state_hash_new.
16658 (free_storage): Use state_hash_free.
16659 (new_state, get_state): Adjust.
16660 * src/lalr.h, src/lalr.c (states): Move to...
16661 * src/states.h (state_t): Remove the `link' member, no longer
16662 used.
16663 * src/states.h, src/states.c: here.
16664 (state_hash_new, state_hash_free, state_hash_lookup)
16665 (state_hash_insert, states_free): New.
16666 * src/states.c (state_table, state_compare, state_hash): New.
16667 * src/output.c (output_actions): Do not free states now, since we
16668 still need to know the final_state number in `prepare', called
16669 afterwards. Do it...
16670 * src/main.c (main): here: call states_free after `output'.
16671
16672 2002-06-30 Akim Demaille <akim@epita.fr>
16673
16674 * src/state.h, src/state.c (state_new): New, extracted from...
16675 * src/LR0.c (new_state): here.
16676 * src/state.h (STATE_ALLOC): Move to...
16677 * src/state.c: here.
16678 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16679 * src/state.h, src/state.c: here.
16680
16681 2002-06-30 Akim Demaille <akim@epita.fr>
16682
16683 * src/reader.c (gensym): Rename as...
16684 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16685 (getsym): Rename as...
16686 (symbol_get): this.
16687
16688 2002-06-30 Akim Demaille <akim@epita.fr>
16689
16690 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16691 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16692 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16693 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16694
16695 2002-06-30 Akim Demaille <akim@epita.fr>
16696
16697 Make the test suite pass with warnings checked.
16698
16699 * tests/actions.at (Printers and Destructors): Improve.
16700 Avoid unsigned vs. signed issues.
16701 * tests/calc.at: Don't exercise the scanner here, do it...
16702 * tests/input.at (Torturing the Scanner): here.
16703
16704 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16705
16706 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16707 reorganize first lines parallel to yacc.c.
16708
16709 2002-06-28 Akim Demaille <akim@epita.fr>
16710
16711 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16712 (b4_token_enum, b4_token_defines): New, factored from...
16713 * data/lalr1.cc, data/yacc.c, glr.c: here.
16714
16715 2002-06-28 Akim Demaille <akim@epita.fr>
16716
16717 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16718 unused variables.
16719 * src/output.c (merger_output): static.
16720
16721 2002-06-28 Akim Demaille <akim@epita.fr>
16722
16723 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16724 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16725 pacify GCC.
16726 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16727
16728 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16729
16730 Accumulated changelog for new GLR parsing features.
16731
16732 * src/conflicts.c (count_total_conflicts): Change name to
16733 conflicts_total_count.
16734 * src/conflicts.h: Ditto.
16735 * src/output.c (token_actions): Use the new name.
16736 (output_conflicts): Change conflp => conflict_list_heads, and
16737 confl => conflict_list for better readability.
16738 * data/glr.c: Use the new names.
16739 * NEWS: Add self to GLR announcement.
16740
16741 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16742
16743 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16744 Akim Demaille.
16745
16746 * data/bison.glr: Change name to glr.c
16747 * data/glr.c: Renamed from bison.glr.
16748 * data/Makefile.am: Add glr.c
16749
16750 * src/getargs.c:
16751
16752 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16753 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16754
16755 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16756
16757 * data/bison.glr: Be sure to restore the
16758 current #line when returning to the skeleton contents after having
16759 exposed the input file's #line.
16760
16761 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16762
16763 * data/bison.glr: Bring up to date with changes to bison.simple.
16764
16765 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16766
16767 * data/bison.glr: Correct definitions that use b4_prefix.
16768 Various reformatting.
16769 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16770 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16771 yytokenp argument; now part of stack.
16772 (yychar): Define to behave as documented.
16773 (yyclearin): Ditto.
16774
16775 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16776
16777 * src/reader.h: Add declaration for free_merger_functions.
16778
16779 * src/reader.c (merge_functions): New variable.
16780 (get_merge_function): New function.
16781 (free_merger_functions): New function.
16782 (readgram): Check for %prec that is not followed by a symbol.
16783 Handle %dprec and %merge declarations.
16784 (packgram): Initialize dprec and merger fields in rules array.
16785
16786 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16787 conflict_list_cnt, conflict_list_free): New variables.
16788 (table_grow): Also grow conflict_table.
16789 (prepare_rules): Output dprec and merger tables.
16790 (conflict_row): New function.
16791 (action_row): Output conflict lists for GLR parser. Don't use
16792 default reduction in conflicted states for GLR parser so that there
16793 are spaces for the conflict lists.
16794 (save_row): Also save conflict information.
16795 (token_actions): Allocate conflict list.
16796 (merger_output): New function.
16797 (pack_vector): Pack conflict table, too.
16798 (output_conflicts): New function to output yyconflp and yyconfl.
16799 (output_check): Allocate conflict_tos.
16800 (output_actions): Output conflict tables, also.
16801 (output_skeleton): Output b4_mergers definition.
16802 (prepare): Output b4_max_rhs_length definition.
16803 Use 'bison.glr' as default skeleton for GLR parsers.
16804
16805 * src/gram.c (glr_parser): New flag.
16806 (grammar_free): Call free_merger_functions.
16807
16808 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16809 all pairs of conflicting reductions, rather than just all tokens
16810 causing conflicts. Needed to size conflict tables.
16811 (conflicts_output): Modify call to count_rr_conflicts for new
16812 interface.
16813 (conflicts_print): Ditto.
16814 (count_total_conflicts): New function.
16815
16816 * src/reader.h (merger_list): New type.
16817 (merge_functions): New variable.
16818
16819 * src/lex.h (tok_dprec, tok_merge): New token types.
16820
16821 * src/gram.h (rule_s): Add dprec and merger fields.
16822 (glr_parser): New flag.
16823
16824 * src/conflicts.h (count_total_conflicts): New function.
16825
16826 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16827
16828 * doc/bison.texinfo (Generalized LR Parsing): New section.
16829 (GLR Parsers): New section.
16830 (Language and Grammar): Mention GLR parsing.
16831 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16832 Correct typo ("tge" -> "the").
16833
16834 * data/bison.glr: New skeleton for GLR parsing.
16835
16836 * tests/cxx-gram.at: New tests for GLR parsing.
16837
16838 * tests/testsuite.at: Include cxx-gram.at.
16839
16840 * tests/Makefile.am: Add cxx-gram.at.
16841
16842 * src/parse-gram.y:
16843
16844 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16845
16846 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16847
16848 2002-06-27 Akim Demaille <akim@epita.fr>
16849
16850 * src/options.h, src/options.c: Remove.
16851 * src/getargs.c (short_options, long_options): New.
16852
16853 2002-06-27 Akim Demaille <akim@epita.fr>
16854
16855 * data/bison.simple, data/bison.c++: Rename as...
16856 * data/yacc.c, data/lalr1.cc: these.
16857 * doc/bison.texinfo (Environment Variables): Remove.
16858
16859 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16860
16861 * src/getargs.c (report_argmatch): Initialize strtok().
16862
16863 2002-06-20 Akim Demaille <akim@epita.fr>
16864
16865 * data/bison.simple (b4_symbol_actions): New, replaces...
16866 (b4_symbol_destructor, b4_symbol_printer): these.
16867 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16868 user token numbers.
16869
16870 2002-06-20 Akim Demaille <akim@epita.fr>
16871
16872 * data/bison.simple (yydestructor): Rename as...
16873 (yydestruct): this.
16874
16875 2002-06-20 Akim Demaille <akim@epita.fr>
16876
16877 * src/symtab.h, src/symtab.c (symbol_type_set)
16878 (symbol_destructor_set, symbol_precedence_set): The location is
16879 the last argument.
16880 Adjust all callers.
16881
16882 2002-06-20 Akim Demaille <akim@epita.fr>
16883
16884 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16885 internals.
16886 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16887 Takes a location.
16888 * src/symtab.h, src/symtab.c (symbol_class_set)
16889 (symbol_user_token_number_set): Likewise.
16890 Adjust all callers.
16891 Promote complain_at.
16892 * tests/input.at (Type Clashes): Adjust.
16893
16894 2002-06-20 Akim Demaille <akim@epita.fr>
16895
16896 * data/bison.simple (YYLEX): Fix the declaration when
16897 %pure-parser.
16898
16899 2002-06-20 Akim Demaille <akim@epita.fr>
16900
16901 * data/bison.simple (yysymprint): Don't print the token number,
16902 just its name.
16903 * tests/actions.at (Destructors): Rename as...
16904 (Printers and Destructors): this.
16905 Also exercise %printer.
16906
16907 2002-06-20 Akim Demaille <akim@epita.fr>
16908
16909 * data/bison.simple (YYDSYMPRINT): New.
16910 Use it to remove many of the #if YYDEBUG/if (yydebug).
16911
16912 2002-06-20 Akim Demaille <akim@epita.fr>
16913
16914 * src/symtab.h, src/symtab.c (symbol_t): printer and
16915 printer_location are new members.
16916 (symbol_printer_set): New.
16917 * src/parse-gram.y (PERCENT_PRINTER): New token.
16918 Handle its associated rule.
16919 * src/scan-gram.l: Adjust.
16920 (handle_destructor_at, handle_destructor_dollar): Rename as...
16921 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16922 * src/output.c (symbol_printers_output): New.
16923 (output_skeleton): Call it.
16924 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16925 since there are already many grammar files with a user `yyprint'.
16926 Replace the calls to YYPRINT to calls to yysymprint.
16927 * tests/calc.at: Adjust.
16928 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16929 taking advantage of parser very internal details (stack size!).
16930
16931 2002-06-20 Akim Demaille <akim@epita.fr>
16932
16933 * src/scan-gram.l: Complete the scanner with the missing patterns
16934 to pacify Flex.
16935 Use `quote' and `symbol_tag_get' where appropriate.
16936
16937 2002-06-19 Akim Demaille <akim@epita.fr>
16938
16939 * tests/actions.at (Destructors): Augment to test locations.
16940 * data/bison.simple (yydestructor): Pass it the current location
16941 if locations are enabled.
16942 Prototype only when __STDC__ or C++.
16943 Change the argument names to move into the yy name space: there is
16944 user code here.
16945
16946 2002-06-19 Akim Demaille <akim@epita.fr>
16947
16948 * data/bison.simple (b4_pure_if): New.
16949 Use it instead of #ifdef YYPURE.
16950
16951 2002-06-19 Akim Demaille <akim@epita.fr>
16952
16953 * data/bison.simple (b4_location_if): New.
16954 Use it instead of #ifdef YYLSP_NEEDED.
16955
16956 2002-06-19 Akim Demaille <akim@epita.fr>
16957
16958 Prepare @$ in %destructor, but currently don't bind it in the
16959 skeleton, as %location use is not cleaned up yet.
16960
16961 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16962 (handle_action_at): New.
16963 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16964 a braced_code_t and a location as additional arguments.
16965 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16966 unquote one when outputting `b4_dollar_dollar'.
16967 Adjust callers.
16968 * data/bison.simple (b4_eval): Remove.
16969 (b4_symbol_destructor): Adjust.
16970 * tests/input.at (Invalid @n): Adjust.
16971
16972 2002-06-19 Zack Weinberg <zack@codesourcery.com>
16973
16974 * doc/bison.texinfo: Document ability to have multiple
16975 prologue sections.
16976
16977 2002-06-18 Akim Demaille <akim@epita.fr>
16978
16979 * src/files.c (compute_base_names): When computing the output file
16980 names from the input file name, strip the directory part.
16981
16982 2002-06-18 Akim Demaille <akim@epita.fr>
16983
16984 * data/bison.simple.new: Comment changes.
16985 Reported by Andreas Schwab.
16986
16987 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16988
16989 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16990 there are no `label `yyoverflowlab' defined but not used' warnings
16991 when yyoverflow is defined.
16992
16993 2002-06-18 Akim Demaille <akim@epita.fr>
16994
16995 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16996 new member.
16997 (symbol_destructor_set): Adjust.
16998 * src/output.c (symbol_destructors_output): Output the destructor
16999 locations.
17000 Output the symbol name.
17001 * data/bison.simple (b4_symbol_destructor): Adjust.
17002
17003 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
17004 and Akim Demaille <akim@epita.fr>
17005
17006 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
17007 what's left on the stack when the error recovery hits EOF.
17008 * tests/actions.at (Destructors): Complete to exercise this case.
17009
17010 2002-06-17 Akim Demaille <akim@epita.fr>
17011
17012 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
17013 arguments is really empty, not only equal to `[]'.
17014 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
17015 member.
17016 (symbol_destructor_set): New.
17017 * src/output.c (symbol_destructors_output): New.
17018 * src/reader.h (brace_code_t, current_braced_code): New.
17019 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
17020 (handle_dollar): Rename as...
17021 (handle_action_dollar): this.
17022 (handle_destructor_dollar): New.
17023 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
17024 (grammar_declaration): Use it.
17025 * data/bison.simple (yystos): Is always defined.
17026 (yydestructor): New.
17027 * tests/actions.at (Destructors): New.
17028 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
17029
17030 2002-06-17 Akim Demaille <akim@epita.fr>
17031
17032 * src/symlist.h, src/symlist.c (symbol_list_length): New.
17033 * src/scan-gram.l (handle_dollar, handle_at): Compute the
17034 rule_length only when needed.
17035 * src/output.c (actions_output, token_definitions_output): Output
17036 the full M4 block.
17037 * src/symtab.c: Don't access directly to the symbol tag, use
17038 symbol_tag_get.
17039 * src/parse-gram.y: Use symbol_list_free.
17040
17041 2002-06-17 Akim Demaille <akim@epita.fr>
17042
17043 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
17044 (symbol_list_prepend, get_type_name): Move to...
17045 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
17046 (symbol_list_prepend, symbol_list_n_type_name_get): here.
17047 Adjust all callers.
17048 (symbol_list_free): New.
17049 * src/scan-gram.l (handle_dollar): Takes a location.
17050 * tests/input.at (Invalid $n): Adjust.
17051
17052 2002-06-17 Akim Demaille <akim@epita.fr>
17053
17054 * src/reader.h, src/reader.c (symbol_list_new): Export it.
17055 (symbol_list_prepend): New.
17056 * src/parse-gram.y (%union): `list' is a new member.
17057 (symbols.1): New, replaces...
17058 (terms_to_prec.1, nterms_to_type.1): these.
17059 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
17060 Take a location as additional argument.
17061 Adjust all callers.
17062
17063 2002-06-15 Akim Demaille <akim@epita.fr>
17064
17065 * src/parse-gram.y: Move %token in the declaration section so that
17066 we don't depend upon CVS Bison.
17067
17068 2002-06-15 Akim Demaille <akim@epita.fr>
17069
17070 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
17071 * src/print.c (print_core): Use it.
17072
17073 2002-06-15 Akim Demaille <akim@epita.fr>
17074
17075 * src/conflicts.c (log_resolution): Accept the rule involved in
17076 the sr conflicts instead of the lookahead number that points to
17077 that rule.
17078 (flush_reduce): Accept the current lookahead vector as argument,
17079 instead of the index in LA.
17080 (resolve_sr_conflict): Accept the current number of lookahead
17081 bitset to consider for the STATE, instead of the index in LA.
17082 (set_conflicts): Adjust.
17083 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17084
17085 2002-06-15 Akim Demaille <akim@epita.fr>
17086
17087 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17088 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17089 Adjust all dependencies.
17090 * src/lalr.c (initialize_lookaheads): Split into...
17091 (states_lookaheads_count, states_lookaheads_initialize): these.
17092 (lalr): Adjust.
17093
17094 2002-06-15 Akim Demaille <akim@epita.fr>
17095
17096 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17097 out of...
17098 (grammar_rules_print): here.
17099 * src/reduce.c (reduce_output): Use it.
17100 * tests/reduce.at (Useless Rules, Reduced Automaton)
17101 (Underivable Rules): Adjust.
17102
17103 2002-06-15 Akim Demaille <akim@epita.fr>
17104
17105 Copy BYacc's nice way to report the grammar.
17106
17107 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17108 New.
17109 Don't print the rules' location, it is confusing and useless.
17110 (rule_print): Use grammar_rhs_print.
17111 * src/print.c (print_grammar): Use grammar_rules_print.
17112
17113 2002-06-15 Akim Demaille <akim@epita.fr>
17114
17115 Complete and rationalize `useless thing' warnings.
17116
17117 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17118 (symbol_tag_print): New.
17119 Use them everywhere in place of accessing directly the tag member.
17120 * src/gram.h, src/gram.c (rule_print): New.
17121 Use it where a rule used to be printed `by hand'.
17122 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17123 (reduce_grammar_tables): Report the useless rules.
17124 (reduce_print): Useless things are a warning, not an error.
17125 Report it as such.
17126 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17127 (Reduced Automaton, Underivable Rules): Adjust.
17128 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17129 * tests/conflicts.at (Unresolved SR Conflicts)
17130 (Solved SR Conflicts): Adjust.
17131
17132 2002-06-15 Akim Demaille <akim@epita.fr>
17133
17134 Let symbols have a location.
17135
17136 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17137 (getsym): Adjust.
17138 Adjust all callers.
17139 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17140 Use location_t, not int.
17141 * src/symtab.c (symbol_check_defined): Take advantage of the
17142 location.
17143 * tests/regression.at (Invalid inputs): Adjust.
17144
17145 2002-06-15 Akim Demaille <akim@epita.fr>
17146
17147 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17148 (input): Don't try to initialize yylloc here, do it in the
17149 scanner.
17150 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17151 * src/gram.h (rule_t): Change line and action_line into location
17152 and action_location, of location_t type.
17153 Adjust all dependencies.
17154 * src/location.h, src/location.c (empty_location): New.
17155 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17156 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17157 (grammar_current_rule_symbol_append)
17158 (grammar_current_rule_action_append): Expect a location as argument.
17159 * src/reader.c (grammar_midrule_action): Adjust to attach an
17160 action's location as dummy symbol location.
17161 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17162 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17163 the line numbers.
17164
17165 2002-06-14 Akim Demaille <akim@epita.fr>
17166
17167 Grammar declarations may be found in the grammar section.
17168
17169 * src/parse-gram.y (rules_or_grammar_declaration): New.
17170 (declarations): Each declaration may end with a semicolon, not
17171 just...
17172 (grammar_declaration): `"%union"'.
17173 (grammar): Branch to rules_or_grammar_declaration.
17174
17175 2002-06-14 Akim Demaille <akim@epita.fr>
17176
17177 * src/main.c (main): Invoke scanner_free.
17178
17179 2002-06-14 Akim Demaille <akim@epita.fr>
17180
17181 * src/output.c (m4_invoke): Extracted from...
17182 (output_skeleton): here.
17183 Free tempfile.
17184
17185 2002-06-14 Akim Demaille <akim@epita.fr>
17186
17187 * src/parse-gram.y (directives, directive, gram)
17188 (grammar_directives, precedence_directives, precedence_directive):
17189 Rename as...
17190 (declarations, declaration, grammar, grammar_declaration)
17191 (precedence_declaration, precedence_declarator): these.
17192 (symbol_declaration): New.
17193
17194 2002-06-14 Akim Demaille <akim@epita.fr>
17195
17196 * src/files.c (action_obstack): Remove, unused.
17197 (output_obstack): Remove it, and all its dependencies, as it is no
17198 longer needed.
17199 * src/reader.c (epilogue_set): Build the epilogue in the
17200 muscle_obstack.
17201 * src/output.h, src/output.c (muscle_obstack): Move to...
17202 * src/muscle_tab.h, src/muscle_tab.h: here.
17203 (muscle_init): Initialize muscle_obstack.
17204 (muscle_free): New.
17205 * src/main.c (main): Call it.
17206
17207 2002-06-14 Akim Demaille <akim@epita.fr>
17208
17209 * src/location.h: New, extracted from...
17210 * src/reader.h: here.
17211 * src/Makefile.am (noinst_HEADERS): Merge into
17212 (bison_SOURCES): this.
17213 Add location.h.
17214 * src/parse-gram.y: Use location_t instead of Bison's.
17215 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17216 Use location_t instead of ints.
17217
17218 2002-06-14 Akim Demaille <akim@epita.fr>
17219
17220 * data/bison.simple, data/bison.c++: Be sure to restore the
17221 current #line when returning to the skeleton contents after having
17222 exposed the input file's #line.
17223
17224 2002-06-12 Akim Demaille <akim@epita.fr>
17225
17226 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17227 eager.
17228 * tests/actions.at (Exotic Dollars): New.
17229
17230 2002-06-12 Akim Demaille <akim@epita.fr>
17231
17232 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17233 ['"/] too eagerly.
17234 * tests/input.at (Torturing the Scanner): New.
17235
17236 2002-06-11 Akim Demaille <akim@epita.fr>
17237
17238 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17239 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17240 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17241 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17242 * src/reader.c (reader): Use it.
17243
17244 2002-06-11 Akim Demaille <akim@epita.fr>
17245
17246 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17247 Adjust all callers.
17248 (scanner_last_string_free): New.
17249
17250 2002-06-11 Akim Demaille <akim@epita.fr>
17251
17252 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17253 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17254 (last_string, YY_OBS_FREE): New.
17255 Use them when returning an ID.
17256
17257 2002-06-11 Akim Demaille <akim@epita.fr>
17258
17259 Have Bison grammars parsed by a Bison grammar.
17260
17261 * src/reader.c, src/reader.h (prologue_augment): New.
17262 * src/reader.c (copy_definition): Remove.
17263
17264 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17265 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17266 (grammar_current_rule_prec_set, grammar_current_rule_check)
17267 (grammar_current_rule_symbol_append)
17268 (grammar_current_rule_action_append): Export.
17269 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17270 (symbol_list_action_append): Remove.
17271 Hook the routines from reader.
17272 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17273 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17274
17275 * src/reader.c (read_declarations): Remove, unused.
17276
17277 * src/parse-gram.y: Handle the epilogue.
17278 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17279 (grammar_start_symbol_set): this.
17280 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17281 * src/reader.c (readgram): Remove, unused.
17282 (reader): Adjust to insert eoftoken and axiom where appropriate.
17283
17284 * src/reader.c (copy_dollar): Replace with...
17285 * src/scan-gram.h (handle_dollar): this.
17286 * src/parse-gram.y: Remove `%thong'.
17287
17288 * src/reader.c (copy_at): Replace with...
17289 * src/scan-gram.h (handle_at): this.
17290
17291 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17292 New.
17293
17294 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17295 time being.
17296
17297 * src/reader.h, src/reader.c (grammar_rule_end): New.
17298
17299 * src/parse.y (current_type, current_class): New.
17300 Implement `%nterm', `%token' support.
17301 Merge `%term' into `%token'.
17302 (string_as_id): New.
17303 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17304 type name.
17305
17306 * src/parse-gram.y: Be sure to handle properly the beginning of
17307 rules.
17308
17309 * src/parse-gram.y: Handle %type.
17310 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17311
17312 * src/parse-gram.y: More directives support.
17313 * src/options.c: No longer handle source directives.
17314
17315 * src/parse-gram.y: Fix %output.
17316
17317 * src/parse-gram.y: Handle %union.
17318 Use the prologue locations.
17319 * src/reader.c (parse_union_decl): Remove.
17320
17321 * src/reader.h, src/reader.c (epilogue_set): New.
17322 * src/parse-gram.y: Use it.
17323
17324 * data/bison.simple, data/bison.c++: b4_stype is now either not
17325 defined, then default to int, or to the contents of %union,
17326 without `union' itself.
17327 Adjust.
17328 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17329
17330 * src/output.c (actions_output): Don't output braces, as they are
17331 already handled by the scanner.
17332
17333 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17334 characters to themselves.
17335
17336 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17337 that the epilogue has a proper #line.
17338
17339 * src/parse-gram.y: Handle precedence/associativity.
17340
17341 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17342 a terminal.
17343 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17344 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17345 at all to define terminals that cannot be emitted.
17346
17347 * src/scan-gram.l: Escape M4 characters.
17348
17349 * src/scan-gram.l: Working properly with escapes in user
17350 strings/characters.
17351
17352 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17353 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17354 grammar.
17355 Use more modest sizes, as for the time being the parser does not
17356 release memory, and therefore the process swallows a huge amount
17357 of memory.
17358
17359 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17360 stricter %token grammar.
17361
17362 * src/symtab.h (associativity): Add `undef_assoc'.
17363 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17364 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17365
17366 * tests/regression.at (Invalid %directive): Remove, as it is now
17367 meaningless.
17368 (Invalid inputs): Adjust to the new error messages.
17369 (Token definitions): The new grammar doesn't allow too many
17370 eccentricities.
17371
17372 * src/lex.h, src/lex.c: Remove.
17373 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17374 (copy_character, copy_string2, copy_string, copy_identifier)
17375 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17376 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17377 (parse_action): Remove.
17378 * po/POTFILES.in: Adjust.
17379
17380 2002-06-11 Akim Demaille <akim@epita.fr>
17381
17382 * src/reader.c (parse_action): Don't store directly into the
17383 rule's action member: return the action as a string.
17384 Don't require `rule_length' as an argument: compute it.
17385 (grammar_current_rule_symbol_append)
17386 (grammar_current_rule_action_append): New, eved out from
17387 (readgram): here.
17388 Remove `action_flag', `rulelength', unused now.
17389
17390 2002-06-11 Akim Demaille <akim@epita.fr>
17391
17392 * src/reader.c (grammar_current_rule_prec_set).
17393 (grammar_current_rule_check): New, eved out from...
17394 (readgram): here.
17395 Remove `xaction', `first_rhs': useless.
17396 * tests/input.at (Type clashes): New.
17397 * tests/existing.at (GNU Cim Grammar): Adjust.
17398
17399 2002-06-11 Akim Demaille <akim@epita.fr>
17400
17401 * src/reader.c (grammar_midrule_action): New, Eved out from
17402 (readgram): here.
17403
17404 2002-06-11 Akim Demaille <akim@epita.fr>
17405
17406 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17407 New.
17408 (readgram): Use them as replacement of inlined code, crule and
17409 crule1.
17410
17411 2002-06-11 Akim Demaille <akim@epita.fr>
17412
17413 * src/reader.c (grammar_end, grammar_symbol_append): New.
17414 (readgram): Use them.
17415 Make the use of `p' as local as possible.
17416
17417 2002-06-10 Akim Demaille <akim@epita.fr>
17418
17419 GCJ's parser requires the tokens to be defined before the prologue.
17420
17421 * data/bison.simple: Output the token definition before the user's
17422 prologue.
17423 * tests/regression.at (Braces parsing, Duplicate string)
17424 (Mixing %token styles): Check the output from bison.
17425 (Early token definitions): New.
17426
17427 2002-06-10 Akim Demaille <akim@epita.fr>
17428
17429 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17430 assigning twice the same user number to a token, so that we can
17431 use it in...
17432 * src/lex.c (lex): here.
17433 Also use `symbol_class_set' instead of hand written code.
17434 * src/reader.c (parse_assoc_decl): Likewise.
17435
17436 2002-06-10 Akim Demaille <akim@epita.fr>
17437
17438 * src/symtab.c, src/symtab.c (symbol_class_set)
17439 (symbol_user_token_number_set): New.
17440 * src/reader.c (parse_token_decl): Use them.
17441 Use a switch instead of ifs.
17442 Use a single argument.
17443
17444 2002-06-10 Akim Demaille <akim@epita.fr>
17445
17446 Remove `%thong' support as it is undocumented, unused, duplicates
17447 `%token's job, and creates useless e-mail traffic with people who
17448 want to know what it is, why it is undocumented, unused, and
17449 duplicates `%token's job.
17450
17451 * src/reader.c (parse_thong_decl): Remove.
17452 * src/options.c (option_table): Remove "thong".
17453 * src/lex.h (tok_thong): Remove.
17454
17455 2002-06-10 Akim Demaille <akim@epita.fr>
17456
17457 * src/symtab.c, src/symtab.c (symbol_type_set)
17458 (symbol_precedence_set): New.
17459 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17460 (value_components_used): Remove, unused.
17461
17462 2002-06-09 Akim Demaille <akim@epita.fr>
17463
17464 Move symbols handling code out of the reader.
17465
17466 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17467 (axiom): Move to...
17468 * src/symtab.h, src/symtab.c: here.
17469
17470 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17471 * src/reader.c (startval): Rename as...
17472 * src/symtab.h, src/symtab.c (startsymbol): this.
17473 * src/reader.c: Adjust.
17474
17475 * src/reader.c (symbol_check_defined, symbol_make_alias)
17476 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17477 (token_translations_init)
17478 Move to...
17479 * src/symtab.c: here.
17480 * src/reader.c (packsymbols): Move to...
17481 * src/symtab.h, src/symtab.c (symbols_pack): here.
17482 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17483 argument.
17484
17485 2002-06-03 Akim Demaille <akim@epita.fr>
17486
17487 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17488 then statements.
17489
17490 2002-06-03 Akim Demaille <akim@epita.fr>
17491
17492 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17493 structs with non literals.
17494 * src/scan-skel.l: never-interactive.
17495 * src/conflicts.c (enum conflict_resolution_e): No trailing
17496 comma.
17497 * src/getargs.c (usage): Split long literal strings.
17498 Reported by Hans Aberg.
17499
17500 2002-05-28 Akim Demaille <akim@epita.fr>
17501
17502 * data/bison.c++: Use C++ ostreams.
17503 (cdebug_): New member.
17504
17505 2002-05-28 Akim Demaille <akim@epita.fr>
17506
17507 * src/output.c (output_skeleton): Be sure to allocate enough room
17508 for `/' _and_ for `\0' in full_skeleton.
17509
17510 2002-05-28 Akim Demaille <akim@epita.fr>
17511
17512 * data/bison.c++: Catch up with bison.simple:
17513 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17514 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17515 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17516 and popping traces.
17517
17518 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17519
17520 * src/output.c (output_skeleton): Put an explicit path in front of
17521 the skeleton file name, rather than relying on the -I directory,
17522 to partially alleviate effects of having a skeleton file lying around
17523 in the current directory.
17524
17525 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17526
17527 * src/conflicts.c (log_resolution): Correct typo:
17528 obstack_printf should be obstack_fgrow1.
17529
17530 2002-05-26 Akim Demaille <akim@epita.fr>
17531
17532 * src/state.h (state_t): `solved_conflicts' is a new member.
17533 * src/LR0.c (new_state): Set it to 0.
17534 * src/conflicts.h, src/conflicts.c (print_conflicts)
17535 (free_conflicts, solve_conflicts): Rename as...
17536 (conflicts_print, conflicts_free, conflicts_solve): these.
17537 Adjust callers.
17538 * src/conflicts.c (enum conflict_resolution_e)
17539 (solved_conflicts_obstack): New, used by...
17540 (log_resolution): this.
17541 Adjust to attach the conflict resolution to each state.
17542 Complete the description with the precedence/associativity
17543 information.
17544 (resolve_sr_conflict): Adjust.
17545 * src/print.c (print_state): Output its solved_conflicts.
17546 * tests/conflicts.at (Unresolved SR Conflicts)
17547 (Solved SR Conflicts): Exercise --report=all.
17548
17549 2002-05-26 Akim Demaille <akim@epita.fr>
17550
17551 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17552 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17553 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17554 (token_number_t, item_number_as_token_number)
17555 (token_number_as_item_number, muscle_insert_token_number_table):
17556 Rename as...
17557 (symbol_number_t, item_number_as_symbol_number)
17558 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17559 these, since it is more appropriate.
17560
17561 2002-05-26 Akim Demaille <akim@epita.fr>
17562
17563 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17564 `Error:' lines.
17565 * data/bison.simple (yystos) [YYDEBUG]: New.
17566 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17567 error recovery.
17568 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17569
17570 2002-05-25 Akim Demaille <akim@epita.fr>
17571
17572 * doc/bison.texinfo (Debugging): Split into...
17573 (Tracing): this new section, its former contents, and...
17574 (Understanding): this new section.
17575 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17576 by...
17577 (report_flag): this.
17578 Adjust all dependencies.
17579 (report_args, report_types, report_argmatch): New.
17580 (usage, getargs): Report/support -r, --report.
17581 * src/options.h
17582 (struct option_table_struct): Rename as..,
17583 (struct option_table_s): this.
17584 Rename the `set_flag' member to `flag' to match with getopt_long's
17585 struct.
17586 * src/options.c (option_table): Split verbose into an entry for
17587 %verbose, and another for --verbose.
17588 Support --report/-r, so remove -r from the obsolete --raw.
17589 * src/print.c: Attach full item sets and lookaheads reports to
17590 report_flag instead of trace_flag.
17591 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17592
17593 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17594 and Paul Eggert <eggert@twinsun.com>
17595
17596 * data/bison.simple (yyparse): Correct error handling to conform to
17597 POSIX and yacc. Specifically, after syntax error is discovered,
17598 do not reduce further before shifting the error token.
17599 Clean up the code a bit by removing the labels yyerrdefault,
17600 yyerrhandle, yyerrpop.
17601 * NEWS: Document the above.
17602
17603 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17604
17605 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17606 type; it isn't always big enough, since it doesn't necessarily
17607 include non-terminals.
17608 (yytranslate): Expand definition of yy_token_number_type, so that
17609 the latter can be removed.
17610 (yy_token_number_type): Remove, only one use.
17611 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17612 don't use TokenNumberType as element type.
17613
17614 * tests/regression.at: Modify expected output to agree with change
17615 to yyr1 and yytranslate.
17616
17617 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17618
17619 * src/reader.c (parse_action): Use copy_character instead of
17620 obstack_1grow.
17621
17622 2002-05-13 Akim Demaille <akim@epita.fr>
17623
17624 * tests/regression.at (Token definitions): Prototype yylex and
17625 yyerror.
17626
17627 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17628
17629 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17630 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17631 32-bit arithmetic.
17632 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17633
17634 2002-05-07 Akim Demaille <akim@epita.fr>
17635
17636 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17637 avoid GCC warnings.
17638
17639 2002-05-07 Akim Demaille <akim@epita.fr>
17640
17641 Kill GCC warnings.
17642
17643 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17644 over the RHS of each rule.
17645 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17646 * src/state.h (state_t): Member `nitems' is unsigned short.
17647 * src/LR0.c (get_state): Adjust.
17648 * src/reader.c (packgram): Likewise.
17649 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17650 `Type'.
17651 (muscle_insert_int_table): Remove, unused.
17652 (prepare_rules): Remove `max'.
17653
17654 2002-05-06 Akim Demaille <akim@epita.fr>
17655
17656 * src/closure.c (print_firsts): Display of the symbol tags.
17657 (bitmatrix_print): Move to...
17658 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17659 here.
17660 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17661
17662 2002-05-06 Akim Demaille <akim@epita.fr>
17663
17664 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17665 hash_do_for_each.
17666
17667 2002-05-06 Akim Demaille <akim@epita.fr>
17668
17669 * src/LR0.c (new_state, get_state): Instead of using the global
17670 `kernel_size' and `kernel_base', have two new arguments:
17671 `core_size' and `core'.
17672 Adjust callers.
17673
17674 2002-05-06 Akim Demaille <akim@epita.fr>
17675
17676 * src/reader.c (packgram): No longer end `ritem' with a 0
17677 sentinel: it is not used.
17678
17679 2002-05-05 Akim Demaille <akim@epita.fr>
17680
17681 New experimental feature: display the lookaheads in the report and
17682 graph.
17683
17684 * src/print (print_core): When --trace-flag, display the rules
17685 lookaheads.
17686 * src/print_graph.c (print_core): Likewise.
17687 Swap the arguments.
17688 Adjust caller.
17689
17690 2002-05-05 Akim Demaille <akim@epita.fr>
17691
17692 * tests/torture.at (Many lookaheads): New test.
17693
17694 2002-05-05 Akim Demaille <akim@epita.fr>
17695
17696 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17697 (GENERATE_MUSCLE_INSERT_TABLE): this.
17698 (output_int_table, output_unsigned_int_table, output_short_table)
17699 (output_token_number_table, output_item_number_table): Replace with...
17700 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17701 (muscle_insert_short_table, muscle_insert_token_number_table)
17702 (muscle_insert_item_number_table): these.
17703 Adjust all callers.
17704 (prepare_tokens): Don't free `translations', since...
17705 * src/reader.h, src/reader.c (grammar_free): do it.
17706 Move to...
17707 * src/gram.h, src/gram.c (grammar_free): here.
17708 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17709 b4_translate_max.
17710
17711 2002-05-05 Akim Demaille <akim@epita.fr>
17712
17713 * src/output.c (output_unsigned_int_table): New.
17714 (prepare_rules): `i' is unsigned.
17715 `prhs', `rline', `r2' are unsigned int.
17716 Rename muscle `rhs_number_max' as `rhs_max'.
17717 Output muscles `prhs_max', `rline_max', and `r2_max'.
17718 Free rline and r1.
17719 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17720 to compute types instead of constant types.
17721 * tests/regression.at (Web2c Actions): Adjust.
17722
17723 2002-05-04 Akim Demaille <akim@epita.fr>
17724
17725 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17726 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17727 Adjust dependencies.
17728 * src/output.c (token_definitions_output): Be sure not to output a
17729 `#define 'a'' when fed with `%token 'a' "a"'.
17730 * tests/regression.at (Token definitions): New.
17731
17732 2002-05-03 Paul Eggert <eggert@twinsun.com>
17733
17734 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17735 for K&R C.
17736
17737 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17738
17739 * Makefile.am (SUBDIRS): Remove intl.
17740 (EXTRA_DIST): Add config/config.rpath.
17741
17742 2002-05-03 Akim Demaille <akim@epita.fr>
17743
17744 * data/bison.simple (m4_if): Don't output empty enums.
17745 And actually, output valid enum definitions :(.
17746
17747 2002-05-03 Akim Demaille <akim@epita.fr>
17748
17749 * configure.bat: Remove, completely obsolete.
17750 * Makefile.am (EXTRA_DIST): Adjust.
17751 Don't distribute config.rpath...
17752 * config/Makefile.am (EXTRA_DIST): Do it.
17753
17754 2002-05-03 Akim Demaille <akim@epita.fr>
17755
17756 * configure.in (GETTEXT_VERSION): New.
17757 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17758
17759 2002-05-03 Akim Demaille <akim@epita.fr>
17760
17761 * data/bison.simple (b4_token_enum): New.
17762 (b4_token_defines): Use it to output tokens both as #define and
17763 enums.
17764 Suggested by Paul Eggert.
17765 * src/output.c (token_definitions_output): Don't output spurious
17766 white spaces.
17767
17768 2002-05-03 Akim Demaille <akim@epita.fr>
17769
17770 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17771
17772 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17773
17774 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17775 Update the stack class, give a try to deque as the default container.
17776
17777 2002-05-02 Akim Demaille <akim@epita.fr>
17778
17779 * data/bison.simple (yyparse): Do not implement @$ = @1.
17780 (YYLLOC_DEFAULT): Adjust to do it.
17781 * doc/bison.texinfo (Location Default Action): Fix.
17782
17783 2002-05-02 Akim Demaille <akim@epita.fr>
17784
17785 * src/reader.c (parse_braces): Merge into...
17786 (parse_action): this.
17787
17788 2002-05-02 Akim Demaille <akim@epita.fr>
17789
17790 * configure.in (ALL_LINGUAS): Remove.
17791 * po/LINGUAS, hr.po: New.
17792
17793 2002-05-02 Akim Demaille <akim@epita.fr>
17794
17795 Remove the so called hairy (semantic) parsers.
17796
17797 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17798 * src/gram.h, src/gram.c (semantic_parser): Remove.
17799 (rule_t): Remove the guard and guard_line members.
17800 * src/lex.h (token_t): remove tok_guard.
17801 * src/options.c (option_table): Remove %guard and %semantic_parser
17802 support.
17803 * src/output.c, src/output.h (guards_output): Remove.
17804 (prepare): Adjust.
17805 (token_definitions_output): Don't output the `T'
17806 tokens (???).
17807 (output_skeleton): Don't output the guards.
17808 * src/files.c, src/files.c (attrsfile): Remove.
17809 * src/reader.c (symbol_list): Remove the guard and guard_line
17810 members.
17811 Adjust dependencies.
17812 (parse_guard): Remove.
17813 * data/bison.hairy: Remove.
17814 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17815 BISON_HAIRY.
17816
17817 2002-05-02 Akim Demaille <akim@epita.fr>
17818
17819 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17820 (parse_guard): Rename the formal argument `stack_offset' as
17821 `rule_length', which is more readable.
17822 Adjust callers.
17823 (copy_at, copy_dollar): Instead of outputting the hard coded
17824 values of $$, $n and so forth, output invocation to b4_lhs_value,
17825 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17826 Note: this patch partially drops `semantic-parser' support: it
17827 always does `rule_length - n', where semantic parsers ought to
17828 always use `-n'.
17829 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17830 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17831
17832 2002-05-02 Akim Demaille <akim@epita.fr>
17833
17834 * configure.in (AC_INIT): Bump to 1.49b.
17835 (AM_INIT_AUTOMAKE): Short invocation.
17836
17837 2002-05-02 Akim Demaille <akim@epita.fr>
17838
17839 Version 1.49a.
17840
17841 2002-05-01 Akim Demaille <akim@epita.fr>
17842
17843 * src/skeleton.h: Remove.
17844
17845 2002-05-01 Akim Demaille <akim@epita.fr>
17846
17847 * src/skeleton.h: Fix the #endif.
17848 Reported by Magnus Fromreide.
17849
17850 2002-04-26 Paul Eggert <eggert@twinsun.com>
17851
17852 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17853 Define if we define YYSTYPE and YYLTYPE, respectively.
17854 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17855
17856 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17857
17858 * src/scan-skel.l: Postprocess quadrigraphs.
17859
17860 * src/reader.c (copy_character): New function, used to output
17861 single characters while replacing `[' and `]' with quadrigraphs, to
17862 avoid troubles with M4 quotes.
17863 (copy_comment): Output characters with copy_character.
17864 (read_additionnal_code): Likewise.
17865 (copy_string2): Likewise.
17866 (copy_definition): Likewise.
17867
17868 * tests/calc.at: Exercise M4 quoting.
17869
17870 2002-04-25 Akim Demaille <akim@epita.fr>
17871
17872 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17873 between `!' and the command.
17874 Reported by Paul Eggert.
17875
17876 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17877
17878 * tests/calc.at: Exercise prologue splitting.
17879
17880 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17881 `b4_post_prologue' instead of `b4_prologue'.
17882
17883 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17884 muscles.
17885 (output): Free pre_prologue_obstack and post_prologue_obstack.
17886 * src/files.h, src/files.c (attrs_obstack): Remove.
17887 (pre_prologue_obstack, post_prologue_obstack): New.
17888 * src/reader.c (copy_definition): Add a parameter to specify the
17889 obstack to fill, instead of using attrs_obstack unconditionally.
17890 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17891 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17892
17893 2002-04-23 Paul Eggert <eggert@twinsun.com>
17894
17895 * data/bison.simple: Remove unnecessary commentary and white
17896 space differences from 1_29-branch.
17897 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17898
17899 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17900 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17901 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17902 constructors or destructors.
17903
17904 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17905
17906 2002-04-23 Akim Demaille <akim@epita.fr>
17907
17908 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17909 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17910 location with columns.
17911 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17912 All reported by Paul Eggert.
17913
17914 2002-04-22 Akim Demaille <akim@epita.fr>
17915
17916 * src/reduce.c (dump_grammar): Move to...
17917 * src/gram.h, src/gram.c (grammar_dump): here.
17918 Be sure to separate long item numbers.
17919 Don't read the members of a rule's prec if its nil.
17920
17921 2002-04-22 Akim Demaille <akim@epita.fr>
17922
17923 * src/output.c (table_size, table_grow): New.
17924 (MAXTABLE): Remove, replace uses with table_size.
17925 (pack_vector): Instead of dying when the table is too big, grow it.
17926
17927 2002-04-22 Akim Demaille <akim@epita.fr>
17928
17929 * data/bison.simple (yyr1): Its type is that of a token number.
17930 * data/bison.c++ (r1_): Likewise.
17931 * tests/regression.at (Web2c Actions): Adjust.
17932
17933 2002-04-22 Akim Demaille <akim@epita.fr>
17934
17935 * src/reader.c (token_translations_init): 256 is now the default
17936 value for the error token, i.e., it will be assigned another
17937 number if the user assigned 256 to one of her tokens.
17938 (reader): Don't force 256 to error.
17939 * doc/bison.texinfo (Symbols): Adjust.
17940 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17941 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17942 etc. instead of 10, 20, 30 (which was used to `jump' over error
17943 (256) and undefined (2)).
17944
17945 2002-04-22 Akim Demaille <akim@epita.fr>
17946
17947 Propagate more token_number_t.
17948
17949 * src/gram.h (token_number_as_item_number)
17950 (item_number_as_token_number): New.
17951 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17952 Use it to create output_item_number_table and
17953 output_token_number_table.
17954 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17955 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17956 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17957 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17958
17959 2002-04-22 Akim Demaille <akim@epita.fr>
17960
17961 * src/output.h, src/output.c (get_lines_number): Remove.
17962
17963 2002-04-19 Akim Demaille <akim@epita.fr>
17964
17965 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17966 as Lex/Flex'.
17967 (Debugging): More details about enabling the debugging features.
17968 (Table of Symbols): Describe $$, $n, @$, and @n.
17969 Suggested by Tim Josling.
17970
17971 2002-04-19 Akim Demaille <akim@epita.fr>
17972
17973 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17974
17975 2002-04-10 Akim Demaille <akim@epita.fr>
17976
17977 * src/system.h: Rely on HAVE_LIMITS_H.
17978 Suggested by Paul Eggert.
17979
17980 2002-04-09 Akim Demaille <akim@epita.fr>
17981
17982 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17983 full stderr, and strip it according to the bison options, instead
17984 of composing the error message from different bits.
17985 This makes it easier to check for several error messages.
17986 Adjust all the invocations.
17987 Add an invocation exercising the error token.
17988 Add an invocation demonstrating a stupid error message.
17989 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17990 Adjust the tests.
17991 Error message are for stderr, not stdout.
17992
17993 2002-04-09 Akim Demaille <akim@epita.fr>
17994
17995 * src/gram.h, src/gram.c (error_token_number): Remove, use
17996 errtoken->number.
17997 * src/reader.c (reader): Don't specify the user token number (2)
17998 for $undefined, as it uselessly prevents using it.
17999 * src/gram.h (token_number_t): Move to...
18000 * src/symtab.h: here.
18001 (state_t.number): Is a token_number_t.
18002 * src/print.c, src/reader.c: Use undeftoken->number instead of
18003 hard coded 2.
18004 (Even though this 2 is not the same as above: the number of the
18005 undeftoken remains being 2, it is its user token number which
18006 might not be 2).
18007 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
18008 `user_token_number_max'.
18009 Output `undef_token_number'.
18010 * data/bison.simple, data/bison.c++: Use them.
18011 Be sure to map invalid yylex return values to
18012 `undef_token_number'. This saves us from gratuitous SEGV.
18013
18014 * tests/conflicts.at (Solved SR Conflicts)
18015 (Unresolved SR Conflicts): Adjust.
18016 * tests/regression.at (Web2c Actions): Adjust.
18017
18018 2002-04-08 Akim Demaille <akim@epita.fr>
18019
18020 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
18021 Adding #line.
18022 Remove the duplicate `typedefs'.
18023 (RhsNumberType): Fix the declaration and various other typos.
18024 Use __ofile__.
18025 * data/bison.simple: Use __ofile__.
18026 * src/scan-skel.l: Handle __ofile__.
18027
18028 2002-04-08 Akim Demaille <akim@epita.fr>
18029
18030 * src/gram.h (item_number_t): New, the type of item numbers in
18031 RITEM. Note that it must be able to code symbol numbers as
18032 positive number, and the negation of rule numbers as negative
18033 numbers.
18034 Adjust all dependencies (pretty many).
18035 * src/reduce.c (rule): Remove this `short *' pointer: use
18036 item_number_t.
18037 * src/system.h (MINSHORT, MAXSHORT): Remove.
18038 Include `limits.h'.
18039 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
18040 (shortcpy): Remove.
18041 (MAXTABLE): Move to...
18042 * src/output.c (MAXTABLE): here.
18043 (prepare_rules): Use output_int_table to output rhs.
18044 * data/bison.simple, data/bison.c++: Adjust.
18045 * tests/torture.at (Big triangle): Move the limit from 254 to
18046 500.
18047 * tests/regression.at (Web2c Actions): Ajust.
18048
18049 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
18050 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
18051 passes, but produces negative #line number, once fixed, GCC is
18052 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
18053 C), it passes.
18054 * src/state.h (state_h): Code input lines on ints, not shorts.
18055
18056 2002-04-08 Akim Demaille <akim@epita.fr>
18057
18058 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
18059 and then the grammar.
18060
18061 2002-04-08 Akim Demaille <akim@epita.fr>
18062
18063 * src/system.h: No longer using strndup.
18064
18065 2002-04-07 Akim Demaille <akim@epita.fr>
18066
18067 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
18068 * src/output.c (output_table_data): Return the longest number.
18069 (prepare_tokens): Output `token_number_max').
18070 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
18071 New.
18072 Use them to define yy_token_number_type/TokenNumberType.
18073 Use this type for yytranslate.
18074 * tests/torture.at (Big triangle): Push the limit from 124 to
18075 253.
18076 * tests/regression.at (Web2c Actions): Adjust.
18077
18078 2002-04-07 Akim Demaille <akim@epita.fr>
18079
18080 * tests/torture.at (Big triangle): New.
18081 (GNU AWK Grammar, GNU Cim Grammar): Move to...
18082 * tests/existing.at: here.
18083
18084 2002-04-07 Akim Demaille <akim@epita.fr>
18085
18086 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18087 nritems.
18088 Adjust dependencies.
18089
18090 2002-04-07 Akim Demaille <akim@epita.fr>
18091
18092 * src/reader.c: Normalize increments to prefix form.
18093
18094 2002-04-07 Akim Demaille <akim@epita.fr>
18095
18096 * src/reader.c, symtab.c: Remove debugging code.
18097
18098 2002-04-07 Akim Demaille <akim@epita.fr>
18099
18100 Rename all the `bucket's as `symbol_t'.
18101
18102 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18103 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18104 * src/symtab.c, src/symtab.h (bucket): Rename as...
18105 (symbol_t): this.
18106 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18107 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18108 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18109 (buckets_new, buckets_free, buckets_do): Rename as...
18110 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18111 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18112 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18113 (symbols_new, symbols_free, symbols_do): these.
18114
18115 2002-04-07 Akim Demaille <akim@epita.fr>
18116
18117 Use lib/hash for the symbol table.
18118
18119 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18120 EOF.
18121 * src/lex.c (lex): Set the `number' member of new terminals.
18122 * src/reader.c (bucket_check_defined, bucket_make_alias)
18123 (bucket_check_alias_consistence, bucket_translation): New.
18124 (reader, grammar_free, readgram, token_translations_init)
18125 (packsymbols): Adjust.
18126 (reader): Number the predefined tokens.
18127 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18128 for predefined tokens.
18129 * src/symtab.h (bucket): Remove all the hash table related
18130 members.
18131 * src/symtab.c (symtab): Replace by...
18132 (bucket_table): this.
18133 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18134 (buckets_new, buckets_do): New.
18135
18136 2002-04-07 Akim Demaille <akim@epita.fr>
18137
18138 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18139 (start_symbol, max_user_token_number, semantic_parser)
18140 (error_token_number): Initialize.
18141 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18142 Initialize.
18143 (reader): Don't.
18144 (errtoken, eoftoken, undeftoken, axiom): Extern.
18145
18146 2002-04-07 Akim Demaille <akim@epita.fr>
18147
18148 * src/gram.h (rule_s): prec and precsym are now pointers
18149 to the bucket giving the priority/associativity.
18150 Member `associativity' removed: useless.
18151 * src/reduce.c, src/conflicts.c: Adjust.
18152
18153 2002-04-07 Akim Demaille <akim@epita.fr>
18154
18155 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18156 Properly escape the symbols' TAG when outputting them.
18157
18158 2002-04-07 Akim Demaille <akim@epita.fr>
18159
18160 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18161
18162 2002-04-07 Akim Demaille <akim@epita.fr>
18163
18164 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18165 (LArule): this, which is an array to rule_t*.
18166 * src/print.c, src/conflicts.c: Adjust.
18167
18168 2002-04-07 Akim Demaille <akim@epita.fr>
18169
18170 * src/gram.h (rule_t): Rename `number' as `user_number'.
18171 `number' is a new member.
18172 Adjust dependencies.
18173 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18174
18175 2002-04-07 Akim Demaille <akim@epita.fr>
18176
18177 As a result of the previous patch, it is no longer needed
18178 to reorder ritem itself.
18179
18180 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18181
18182 2002-04-07 Akim Demaille <akim@epita.fr>
18183
18184 Be sure never to walk through RITEMS, but use only data related to
18185 the rules themselves. RITEMS should be banished.
18186
18187 * src/output.c (output_token_translations): Rename as...
18188 (prepare_tokens): this.
18189 In addition to `translate', prepare the muscles `tname' and
18190 `toknum', which were handled by...
18191 (output_rule_data): this.
18192 Remove, and move the remainder of its outputs into...
18193 (prepare_rules): this new routines, which also merges content from
18194 (output_gram): this.
18195 (prepare_rules): Be sure never to walk through RITEMS.
18196 (output_stos): Rename as...
18197 (prepare_stos): this.
18198 (output): Always invoke prepare_states, after all, just don't use it
18199 in the output if you don't need it.
18200
18201 2002-04-07 Akim Demaille <akim@epita.fr>
18202
18203 * src/LR0.c (new_state): Display `nstates' as the name of the
18204 newly created state.
18205 Adjust to initialize first_state and last_state if needed.
18206 Be sure to distinguish the initial from the final state.
18207 (new_states): Create the itemset of the initial state, and use
18208 new_state.
18209 * src/closure.c (closure): Now that the initial state has its
18210 items properly set, there is no need for a special case when
18211 creating `ruleset'.
18212
18213 As a result, now the rule 0, reducing to $axiom, is visible in the
18214 outputs. Adjust the test suite.
18215
18216 * tests/conflicts.at (Solved SR Conflicts)
18217 (Unresolved SR Conflicts): Adjust.
18218 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18219 * tests/conflicts.at (S/R in initial): New.
18220
18221 2002-04-07 Akim Demaille <akim@epita.fr>
18222
18223 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18224 the RHS of the rules.
18225 * src/output.c (output_gram): Likewise.
18226
18227 2002-04-07 Akim Demaille <akim@epita.fr>
18228
18229 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18230 bucket.
18231 Adjust all dependencies.
18232 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18233 `number' of the buckets too.
18234 * src/gram.h: Include `symtab.h'.
18235 (associativity): Move to...
18236 * src/symtab.h: here.
18237 No longer include `gram.h'.
18238
18239 2002-04-07 Akim Demaille <akim@epita.fr>
18240
18241 * src/gram.h, src/gram.c (rules_rhs_length): New.
18242 (ritem_longest_rhs): Use it.
18243 * src/gram.h (rule_t): `number' is a new member.
18244 * src/reader.c (packgram): Set it.
18245 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18246 the end of `rules', and count them out of `nrules'.
18247 (reduce_output, dump_grammar): Adjust.
18248 * src/print.c (print_grammar): It is no longer needed to check for
18249 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18250 * tests/reduce.at (Reduced Automaton): New test.
18251
18252 2002-04-07 Akim Demaille <akim@epita.fr>
18253
18254 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18255 lacking `+ 1' to nrules, Bison reported as useless a token if it
18256 was used solely to set the precedence of the last rule...
18257
18258 2002-04-07 Akim Demaille <akim@epita.fr>
18259
18260 * data/bison.c++, data/bison.simple: Don't output the current file
18261 name in #line, to avoid useless diffs between two identical
18262 outputs under different names.
18263
18264 2002-04-07 Akim Demaille <akim@epita.fr>
18265
18266 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18267 Normalize loops to using `< nrules + 1', not `<= nrules'.
18268
18269 2002-04-07 Akim Demaille <akim@epita.fr>
18270
18271 * TODO: Update.
18272
18273 2002-04-07 Akim Demaille <akim@epita.fr>
18274
18275 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18276 bucket.value as bucket.number.
18277
18278 2002-04-07 Akim Demaille <akim@epita.fr>
18279
18280 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18281 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18282 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18283 RHS, instead of being an index in RITEMS.
18284
18285 2002-04-04 Paul Eggert <eggert@twinsun.com>
18286
18287 * doc/bison.texinfo: Update copyright date.
18288 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18289 (Symbols): Warn about running Bison in one character set,
18290 but compiling and/or running in an incompatible one.
18291 Warn about character code 256, too.
18292
18293 2002-04-03 Paul Eggert <eggert@twinsun.com>
18294
18295 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18296 YYERROR_VERBOSE is nonzero, not whether it is defined.
18297
18298 Merge changes from bison-1_29-branch.
18299
18300 2002-03-20 Paul Eggert <eggert@twinsun.com>
18301
18302 Merge fixes from Debian bison_1.34-1.diff.
18303
18304 * configure.in (AC_PREREQ): 2.53.
18305
18306 2002-03-20 Akim Demaille <akim@epita.fr>
18307
18308 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18309
18310 2002-03-19 Paul Eggert <eggert@twinsun.com>
18311
18312 * src/bison.simple (YYCOPY): New macro.
18313 (YYSTACK_RELOCATE): Use it.
18314 Remove Type arg; no longer needed. All callers changed.
18315 (yymemcpy): Remove; no longer needed.
18316
18317 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18318 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18319
18320 2002-03-19 Akim Demaille <akim@epita.fr>
18321
18322 Test and fix the #line outputs.
18323
18324 * tests/atlocal.at (GCC): New.
18325 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
18326 (Prologue synch line, %union synch line, Postprologue synch line)
18327 (Action synch line, Epilogue synch line): New tests.
18328 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18329 * data/bison.simple, data/bison.c++: Use it.
18330
18331 2002-03-19 Akim Demaille <akim@epita.fr>
18332
18333 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18334 (Solved SR Conflicts, %expect not enough, %expect right)
18335 (%expect too much): Move to...
18336 * tests/conflicts.at: this new file.
18337
18338 2002-03-19 Akim Demaille <akim@epita.fr>
18339
18340 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18341 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18342 that we can move to enums for instance.
18343 * src/output.c (token_definitions_output): Output a list of
18344 `token-name, token-number' instead of the #define.
18345 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18346
18347 2002-03-14 Akim Demaille <akim@epita.fr>
18348
18349 Use Gettext 0.11.1.
18350
18351 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
18352
18353 * data/bison.c++: Make the user able to add members to the generated
18354 parser by subclassing.
18355
18356 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
18357
18358 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18359 a character.
18360 Reported by Nicolas Tisserand and Nicolas Burrus.
18361
18362 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18363
18364 * src/reader.c: Warn about lacking semi-colons, do not complain.
18365
18366 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18367
18368 * data/bison.c++: Remove a debug line.
18369
18370 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18371
18372 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18373 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18374 provide a default implementation.
18375
18376 2002-03-04 Akim Demaille <akim@epita.fr>
18377
18378 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18379 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18380 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18381 * tests/semantic.at (Parsing Guards): Similarly.
18382 * src/reader.at (readgram): Complain if the last rule is not ended
18383 with a semi-colon.
18384
18385 2002-03-04 Akim Demaille <akim@epita.fr>
18386
18387 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18388 * src/closure.c: here.
18389 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18390 RTC.
18391 * src/warshall.h, src/warshall.c: Remove.
18392 * tests/sets.at (Broken Closure): Adjust.
18393
18394 2002-03-04 Akim Demaille <akim@epita.fr>
18395
18396 * src/output.c (output_skeleton): tempdir is const.
18397 bytes_read is unused.
18398
18399 2002-03-04 Akim Demaille <akim@epita.fr>
18400
18401 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18402 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18403 Update.
18404 From Michael Hayes.
18405
18406 2002-03-04 Akim Demaille <akim@epita.fr>
18407
18408 * src/closure.c (closure): `r' is unused.
18409
18410 2002-03-04 Akim Demaille <akim@epita.fr>
18411
18412 * tests/sets.at (Broken Closure): Add the ending `;'.
18413 * src/reader.at (readgram): Complain if a rule is not ended with a
18414 semi-colon.
18415
18416 2002-03-04 Akim Demaille <akim@epita.fr>
18417
18418 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18419 (count_sr_conflicts): Use bitset_count.
18420 * src/reduce.c (inaccessable_symbols): Ditto.
18421 (bits_size): Remove.
18422 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18423
18424 2002-03-04 Akim Demaille <akim@epita.fr>
18425
18426 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18427 * src/reduce.c: Remove the `bitset_zero's following the
18428 `bitset_create's, as now it is performed by the latter.
18429
18430 2002-03-04 Akim Demaille <akim@epita.fr>
18431
18432 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18433 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18434 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18435 latest sources from Michael.
18436
18437 2002-03-04 Akim Demaille <akim@epita.fr>
18438
18439 * src/output.c (output): Don't free the grammar.
18440 * src/reader.c (grammar_free): New.
18441 * src/main.c (main): Call it and don't free symtab here.
18442
18443 2002-03-04 Akim Demaille <akim@epita.fr>
18444
18445 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18446 before returning.
18447 Reported by Benoit Perrot.
18448
18449 2002-03-04 Akim Demaille <akim@epita.fr>
18450
18451 Use bitset operations when possible, not loops over bits.
18452
18453 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18454 bitset_or.
18455 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18456 * src/reduce.c (useless_nonterminals): Formatting changes.
18457 * src/warshall.c (TC): Use bitset_or.
18458
18459 2002-03-04 Akim Demaille <akim@epita.fr>
18460
18461 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18462 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18463 Ditto.
18464
18465 2002-03-04 Akim Demaille <akim@epita.fr>
18466
18467 * src/lalr.c (F): Now a bitset*.
18468 Adjust all dependencies.
18469
18470 2002-03-04 Akim Demaille <akim@epita.fr>
18471
18472 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18473 Adjust all dependencies.
18474
18475 2002-03-04 Akim Demaille <akim@epita.fr>
18476
18477 * src/L0.c, src/LR0.h (nstates): Be size_t.
18478 Adjust comparisons (signed vs unsigned).
18479 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18480 bitset*.
18481 Adjust all dependencies.
18482
18483 2002-03-04 Akim Demaille <akim@epita.fr>
18484
18485 * src/closure.c (firsts): Now, also a bitset.
18486 Adjust all dependencies.
18487 (varsetsize): Remove, now unused.
18488 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18489
18490 2002-03-04 Akim Demaille <akim@epita.fr>
18491
18492 * src/print.c: Convert to use bitset.h, not hand coded iterations
18493 over ints.
18494
18495 2002-03-04 Akim Demaille <akim@epita.fr>
18496
18497 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18498
18499 2002-03-04 Akim Demaille <akim@epita.fr>
18500
18501 * src/closure.c (ruleset): Be a bitset.
18502 (rulesetsize): Remove.
18503
18504 2002-03-04 Akim Demaille <akim@epita.fr>
18505
18506 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18507 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18508 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18509 * src/closure.c (fderives): Be an array of bitsets.
18510
18511 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
18512
18513 * data/bison.c++: Merge the two generated headers. Insert a copyright
18514 notice in each output file.
18515
18516 2002-02-28 Akim Demaille <akim@epita.fr>
18517
18518 * data/bison.c++: Copy the prologue of bison.simple to fetch
18519 useful M4 definitions, such as b4_header_guard.
18520
18521 2002-02-25 Akim Demaille <akim@epita.fr>
18522
18523 * src/getargs.c (version): Give the name of the authors, and use a
18524 translator friendly scheme for the bgr
18525 copyright notice.
18526
18527 2002-02-25 Akim Demaille <akim@epita.fr>
18528
18529 * src/output.c (header_output): Remove, now handled completely via
18530 M4.
18531
18532 2002-02-25 Akim Demaille <akim@epita.fr>
18533
18534 * m4/m4.m4: New, from CVS Autoconf.
18535 * configure.in: Invoke it.
18536 * src/output.c (output_skeleton): Use its result instead of the
18537 hard coded name.
18538
18539 2002-02-25 Akim Demaille <akim@epita.fr>
18540
18541 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18542 Fileutils 4.1.5.
18543 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18544 * src/output.c (output_skeleton): Use mkstemp to create a real
18545 temporary file.
18546 Move the filling of `skeleton' and its muscle to...
18547 (prepare): here.
18548 (output): Move the definition of the prologue muscle to...
18549 (prepare): here.
18550 * src/system.h (DEFAULT_TMPDIR): New.
18551
18552 2002-02-14 Paul Eggert <eggert@twinsun.com>
18553
18554 Remove the support for C++ namespace cleanliness; it was
18555 causing more problems than it was curing, since it didn't work
18556 properly on some nonstandard C++ compilers. This can wait
18557 for a proper C++ parser.
18558
18559 * NEWS: Document this.
18560 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18561 of C++, as it's treated like C now.
18562 * src/bison.simple (YYSTD): Remove.
18563 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18564 Treat C++ just like Standard C instead of trying to support
18565 namespace cleanliness.
18566
18567 2002-02-14 Akim Demaille <akim@epita.fr>
18568
18569 * tests/regression.at (else): Adjust to Andreas' change.
18570
18571 2002-02-14 Akim Demaille <akim@epita.fr>
18572
18573 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18574
18575 2002-02-13 Andreas Schwab <schwab@suse.de>
18576
18577 * src/output.c (output_rule_data): Don't output NULL, it might
18578 not be defined yet.
18579
18580 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
18581
18582 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18583 (Copyright notice): Update.
18584
18585 2002-02-11 Akim Demaille <akim@epita.fr>
18586
18587 * tests/regression.at (%nonassoc and eof): Don't include
18588 nonportable headers.
18589
18590 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
18591
18592 * data/bison.c++: Correct error recovery. Make the user able to
18593 initialize the starting location.
18594
18595 2002-02-07 Akim Demaille <akim@epita.fr>
18596
18597 * tests/input.at: New.
18598
18599 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18600
18601 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18602 more consistent when naming methods and variables. Put preprocessor
18603 directives around tables only needed for debugging.
18604
18605 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18606
18607 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18608 C++ parsers.
18609 (yy::b4_name::parse): Use print_.
18610
18611 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18612
18613 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18614
18615 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18616
18617 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18618 C++ parsers.
18619 (yy::b4_name::parse): Build verbose error messages, and use error_.
18620
18621 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18622
18623 * data/bison.c++: Fix m4 quoting in comments.
18624
18625 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18626
18627 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18628 not expanded by m4.
18629
18630 2002-02-05 Akim Demaille <akim@epita.fr>
18631
18632 * data/bison.c++: Adjust to the M4 back end.
18633 More is certainly needed.
18634
18635 2002-02-05 Akim Demaille <akim@epita.fr>
18636
18637 Give a try to M4 as a back end.
18638
18639 * lib/readpipe.c: New, from wdiff.
18640 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18641 BISON_HAIRY.
18642 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18643 specific values. Now it is m4 that performs the lookup.
18644 * src/parse-skel.y: Remove.
18645 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18646 * src/output.c (actions_output, guards_output)
18647 (token_definitions_output): No longer keeps track of the output
18648 line number, hence remove the second argument.
18649 (guards_output): Check against the guard member of a rule, not the
18650 action member.
18651 Adjust callers.
18652 (output_skeleton): Don't look for the skeleton location, let m4 do
18653 that.
18654 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18655 file will be used.
18656 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18657 (prepare): Given that for the time being changesyntax is not
18658 usable in M4, rename the muscles using `-' to `_'.
18659 Define `defines_flag', `output_parser_name' and `output_header_name'.
18660 * src/output.h (actions_output, guards_output)
18661 (token_definitions_output): Adjust prototypes.
18662 * src/scan-skel.l: Instead of scanning the skeletons, it now
18663 processes the output of m4: `__oline__' and `#output'.
18664 * data/bison.simple: Adjust to be used by M4(sugar).
18665 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18666 to date.
18667 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18668 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18669 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18670 shamelessly stolen from CVS Autoconf.
18671
18672 2002-02-05 Akim Demaille <akim@epita.fr>
18673
18674 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18675 * configure.in: Check for the declarations of free and malloc.
18676 * src/muscle_tab.c: Adjust.
18677
18678 2002-02-05 Akim Demaille <akim@epita.fr>
18679
18680 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18681 which have no values.
18682
18683 2002-02-05 Akim Demaille <akim@epita.fr>
18684
18685 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18686 * data/: here.
18687
18688 2002-01-29 Paul Eggert <eggert@twinsun.com>
18689
18690 * src/bison.simple (YYSIZE_T): Do not define merely because
18691 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18692 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18693
18694 2002-01-27 Akim Demaille <akim@epita.fr>
18695
18696 Fix `%nonassoc and eof'.
18697
18698 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18699 which were not properly copied! Replace
18700 memcpy (res->errs, src->errs, src->nerrs);
18701 with
18702 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18703 !!!
18704 * tests/regression.at (%nonassoc and eof): Adjust to newest
18705 Autotest: `.' is not in the PATH.
18706
18707 2002-01-27 Akim Demaille <akim@epita.fr>
18708
18709 * tests/sets.at (AT_EXTRACT_SETS): New.
18710 (Nullable): Use it.
18711 (Firsts): New.
18712
18713 2002-01-26 Akim Demaille <akim@epita.fr>
18714
18715 * tests/actions.at, tests/calc.at, tests/headers.at,
18716 * tests/torture.at: Adjust to the newest Autotest which no longer
18717 forces `.' in the PATH.
18718
18719 2002-01-25 Akim Demaille <akim@epita.fr>
18720
18721 * tests/regression.at (%nonassoc and eof): New.
18722 Suggested by Robert Anisko.
18723
18724 2002-01-24 Akim Demaille <akim@epita.fr>
18725
18726 Bison dumps core when trying to complain about broken input files.
18727 Reported by Cris van Pelt.
18728
18729 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18730 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18731 into...
18732 (Invalid inputs): Strengthen: exercise parse_percent_token.
18733
18734 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18735
18736 * src/Makefile.am: Add bison.c++.
18737 * src/bison.c++: New skeleton.
18738
18739 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18740
18741 * po/it.po: New.
18742
18743 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18744
18745 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18746
18747 2002-01-20 Marc Autret <marc@gnu.org>
18748
18749 * src/files.c (compute_output_file_names): Fix
18750
18751 2002-01-20 Marc Autret <marc@gnu.org>
18752
18753 * tests/output.at: New test.
18754 * src/files.c (compute_base_names): Don't map extensions when
18755 the YACC flag is set, use defaults.
18756 Reported by Evgeny Stambulchik.
18757
18758 2002-01-20 Marc Autret <marc@gnu.org>
18759
18760 * src/system.h: Need to define __attribute__ away for non-GCC
18761 compilers as well (i.e., the vendor C compiler).
18762 Suggested by Albert Chin-A-Young.
18763
18764 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18765
18766 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18767 canonical definition.
18768 * src/system.h: Use the canonical definition for PARAMS (avoids
18769 a conflict with the macro from lib/hash.h).
18770
18771 2002-01-11 Akim Demaille <akim@epita.fr>
18772
18773 * configure.in: Use AC_FUNC_STRNLEN.
18774 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18775
18776 2002-01-09 Akim Demaille <akim@epita.fr>
18777
18778 * src/files.c, src/files.h (output_infix): New.
18779 (tab_extension): Remove.
18780 (compute_base_names): Compute the former, drop the latter.
18781 * src/output.c (prepare): Insert the muscles `output-infix', and
18782 `output-suffix'.
18783 * src/parse-skel.y (string, string.1): New.
18784 (section.header): Use it.
18785 (section.yacc): Remove.
18786 (prefix): Remove too.
18787 * src/scan-skel.l: Adjust.
18788 * src/bison.simple, src/bison.hairy: Adjust.
18789
18790 2002-01-09 Akim Demaille <akim@epita.fr>
18791
18792 * configure.in (WERROR_CFLAGS): Compute it.
18793 * src/Makefile.am (CFLAGS): Pass it.
18794 * tests/atlocal.in (CFLAGS): Idem.
18795 * src/files.c: Fix a few warnings.
18796 (get_extension_index): Remove, unused.
18797
18798 2002-01-08 Akim Demaille <akim@epita.fr>
18799
18800 * src/getargs.c (AS_FILE_NAME): New.
18801 (getargs): Use it to convert DOSish file names.
18802 * src/files.c (base_name): Rename as full_base_name to avoid
18803 clashes with `base_name ()'.
18804 (filename_split): New.
18805 (compute_base_names): N-th rewrite, using filename_split.
18806
18807 2002-01-08 Akim Demaille <akim@epita.fr>
18808
18809 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18810 New, stolen from the Fileutils 4.1.
18811 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18812 * configure.in: Check for the presence of memrchr, and of its
18813 prototype.
18814
18815 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18816
18817 * lib/hash.h (__P): Added definition for this macro.
18818 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18819 BUILT_SOURCES, to ensure they are generated first.
18820 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18821 %error-verbose to allow bootstrapping with bison 1.30x.
18822
18823 2002-01-06 Akim Demaille <akim@epita.fr>
18824
18825 * src/reader.c (parse_braces): Don't fetch the next char, the
18826 convention is to fetch on entry.
18827 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18828 'switch' without a following semicolon.
18829 * tests/regression.at (braces parsing): New.
18830
18831 2002-01-06 Akim Demaille <akim@epita.fr>
18832
18833 Bison is dead wrong in its RR conflict reports.
18834
18835 * tests/torture.at (GNU Cim Grammar): New.
18836 * src/conflicts.c (count_rr_conflicts): Fix.
18837
18838 2002-01-06 Akim Demaille <akim@epita.fr>
18839
18840 Creating package.m4 from configure.ac causes too many problems.
18841
18842 * tests/Makefile.am (package.m4): Create it by hand,
18843 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18844
18845 2002-01-06 Akim Demaille <akim@epita.fr>
18846
18847 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18848 skeleton.h.
18849
18850 2002-01-04 Paul Eggert <eggert@twinsun.com>
18851
18852 * doc/bison.texinfo (Debugging):
18853 Remove YYSTDERR; it's no longer defined or used.
18854 Also, s/cstdio.h/cstdio/.
18855
18856 2002-01-03 Akim Demaille <akim@epita.fr>
18857
18858 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18859
18860 2002-01-03 Akim Demaille <akim@epita.fr>
18861
18862 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18863 tracing code to --trace, wait for a better --trace option, with
18864 args.
18865
18866 2002-01-03 Akim Demaille <akim@epita.fr>
18867
18868 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18869 The ISO C++ standard is extremely clear about it: stderr is
18870 considered a macro, not a regular symbol (see table 94 `Header
18871 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18872 Therefore std:: does not apply to it. It still does with fprintf.
18873 Also, s/cstdio.h/cstdio/.
18874
18875 2002-01-03 Akim Demaille <akim@epita.fr>
18876
18877 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18878 for non system headers.
18879
18880 2002-01-02 Akim Demaille <akim@epita.fr>
18881
18882 Equip the skeleton chain with location tracking, runtime trace,
18883 pure parser and scanner.
18884
18885 * src/parse-skel.y: Request a pure parser, locations, and prefix
18886 renaming.
18887 (%union): Having several members with the same type does not help
18888 type mismatches, simplify.
18889 (YYPRINT, yyprint): New.
18890 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18891 (skel_error): this.
18892 Handle locations.
18893 * src/scan-skel.l: Adjust to these changes.
18894 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18895 (LOCATION_PRINT, skel_control_t): New.
18896
18897 2001-12-30 Akim Demaille <akim@epita.fr>
18898
18899 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18900 replace `gb' with BLANKS.
18901 * src/scan-skel.l: Adjust.
18902
18903 2001-12-30 Akim Demaille <akim@epita.fr>
18904
18905 * src/system.h: We don't need nor want bcopy.
18906 Throw away MS-DOS crap: we don't need getpid.
18907 * configure.in: We don't need strndup. It was even causing
18908 problems: because Flex includes the headers *before* us,
18909 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18910 not visible.
18911 * lib/xstrndup.c: New.
18912 * src/scan-skel.l: Use it.
18913 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18914 * src/parse-skel.y: Use %directives instead of #defines.
18915
18916 2001-12-30 Akim Demaille <akim@epita.fr>
18917
18918 * src/skeleton.h: New.
18919 * src/output.c (output_parser, output_master_parser): Remove, dead
18920 code.
18921 * src/output.h (get_lines_number, actions_output, guards_output)
18922 (token_definitions_output): Prototype them.
18923 * src/parse-skel.y: Add the license notice.
18924 Include output.h and skeleton.h.
18925 (process_skeleton): Returns void, and takes a single parameter.
18926 * src/scan-skel.l: Add the license notice.
18927 Include skeleton.h.
18928 Don't use %option yylineno: it seems that then Flex imagines
18929 REJECT has been used, and therefore it won't reallocate its
18930 buffers (which makes no other sense to me than a bug). It results
18931 in warnings for `unused: yy_flex_realloc'.
18932
18933 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
18934
18935 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18936 (MUSCLE_INSERT_PREFIX): ...to there.
18937 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18938 (MUSCLE_INSERT_PREFIX): Move from here...
18939
18940 * src/bison.hairy: Add a section directive. Put braces around muscle
18941 names. This parser skeleton is still broken, but Bison should not
18942 choke on a bad muscle 'syntax'.
18943 * src/bison.simple: Add a section directive. Put braces around muscle
18944 names.
18945
18946 * src/files.h (strsuffix, stringappend): Add declarations.
18947 (tab_extension): Add declaration.
18948 (short_base_name): Add declaration.
18949
18950 * src/files.c (strsuffix, stringappend): No longer static. These
18951 functions are used in the skeleton parser.
18952 (tab_extension): New.
18953 (compute_base_names): Use the computations done in this function
18954 to guess if the generated parsers should have '.tab' in their
18955 names.
18956 (short_base_name): No longer static.
18957
18958 * src/output.c (output_skeleton): New.
18959 (output): Disable call to output_master_parser, and give a try to
18960 a new skeleton handling system.
18961 (guards_output, actions_output): No longer static.
18962 (token_definitions_output, get_lines_number): No longer static.
18963
18964 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18965
18966 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18967 parse-skel.y.
18968
18969 * src/parse-skel.y: New file.
18970 * src/scan-skel.l: New file.
18971
18972 2001-12-29 Akim Demaille <akim@epita.fr>
18973
18974 %name-prefix is broken.
18975
18976 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18977 Adjust all dependencies.
18978 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18979 %name-prefix.
18980
18981 Renaming yylval but not yylloc is not consistent. Now we do.
18982
18983 * src/bison.simple: Prefix yylloc if used.
18984 * doc/bison.texinfo (Decl Summary): Document that.
18985
18986 2001-12-29 Akim Demaille <akim@epita.fr>
18987
18988 * doc/bison.texinfo: Promote `%long-directive' over
18989 `%long_directive'.
18990 Remove all references to fixed-output-files, yacc is enough.
18991
18992 2001-12-29 Akim Demaille <akim@epita.fr>
18993
18994 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18995 user prologue. These are defaults.
18996 * tests/actions.at (Mid-rule actions): Make sure the user can
18997 define YYDEBUG and YYERROR_VERBOSE.
18998
18999 2001-12-29 Akim Demaille <akim@epita.fr>
19000
19001 * src/output.c (header_output): Don't forget to export YYLTYPE and
19002 yylloc.
19003 * tests/headers.at (export YYLTYPE): New, make sure it does.
19004 * tests/regression.at (%union and --defines, Invalid CPP headers):
19005 Move to...
19006 * tests/headers.at: here.
19007
19008 2001-12-29 Akim Demaille <akim@epita.fr>
19009
19010 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
19011
19012 2001-12-29 Akim Demaille <akim@epita.fr>
19013
19014 * tests/actions.at (Mid-rule actions): Output on a single line
19015 instead of several.
19016
19017 2001-12-29 Akim Demaille <akim@epita.fr>
19018
19019 * doc/bison.texinfo: Formatting changes.
19020
19021 2001-12-29 Akim Demaille <akim@epita.fr>
19022
19023 Don't store the token defs in a muscle, just be ready to output it
19024 on command. Now possible via `symbols'. Fixes a memory leak.
19025
19026 * src/output.c (token_definitions_output): New.
19027 (output_parser, header_output): Use it.
19028 * src/reader.c (symbols_save): Remove.
19029
19030 2001-12-29 Akim Demaille <akim@epita.fr>
19031
19032 * src/bison.simple: Do not provide a default for YYSTYPE and
19033 YYLTYPE before the user's prologue. Otherwise it's hardly... a
19034 default.
19035
19036 2001-12-29 Akim Demaille <akim@epita.fr>
19037
19038 Mid-rule actions are simply... ignored!
19039
19040 * src/reader.c (readgram): Be sure to attach mid-rule actions to
19041 the empty-rule associated to the dummy symbol, not to the host
19042 rule.
19043 * tests/actions.at (Mid-rule actions): New.
19044
19045 2001-12-29 Akim Demaille <akim@epita.fr>
19046
19047 Memory leak.
19048
19049 * src/reader.c (reader): Free grammar.
19050
19051 2001-12-29 Akim Demaille <akim@epita.fr>
19052
19053 Memory leak.
19054
19055 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
19056 since it allocates it for each state, although only one is needed.
19057 (allocate_storage): Do it here.
19058
19059 2001-12-29 Akim Demaille <akim@epita.fr>
19060
19061 * src/options.h, src/options.c (create_long_option_table): Rename
19062 as...
19063 (long_option_table_new): this, with a clearer prototype.
19064 (percent_table): Remove, unused,
19065 * src/getargs.c (getargs): Adjust.
19066
19067 2001-12-29 Akim Demaille <akim@epita.fr>
19068
19069 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
19070 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
19071 as states.
19072
19073 2001-12-29 Akim Demaille <akim@epita.fr>
19074
19075 * src/lalr.c (build_relations): Rename `states' as `states1'.
19076 Sorry, I don't understand exactly what it is, no better name...
19077
19078 2001-12-29 Akim Demaille <akim@epita.fr>
19079
19080 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
19081 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
19082 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
19083 as rules.
19084
19085 2001-12-29 Akim Demaille <akim@epita.fr>
19086
19087 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19088 ago.
19089
19090 2001-12-29 Akim Demaille <akim@epita.fr>
19091
19092 * src/reader.c, src/reader.h (user_toknums): Remove.
19093 Adjust all users to use symbols[i]->user_token_number.
19094
19095 2001-12-29 Akim Demaille <akim@epita.fr>
19096
19097 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19098 Adjust all users to use symbols[i]->prec or ->assoc.
19099
19100 2001-12-29 Akim Demaille <akim@epita.fr>
19101
19102 * src/reader.c, src/reader.h (tags): Remove.
19103 Adjust all users to use symbols[i]->tag.
19104
19105 2001-12-29 Akim Demaille <akim@epita.fr>
19106
19107 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19108 and rule_table.
19109 * src/reader.c (packsymbols): Fill this table.
19110 Drop sprec.
19111 * src/conflicts.c (resolve_sr_conflict): Adjust.
19112 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19113 single table.
19114 Use symbols[i]->tag instead of tags[i].
19115
19116 2001-12-29 Akim Demaille <akim@epita.fr>
19117
19118 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19119 In addition, put a comment in there, to replace...
19120 * tests/regression.at (%union and C comments): Remove.
19121
19122 2001-12-29 Akim Demaille <akim@epita.fr>
19123
19124 * tests/regression.at (Web2c Actions): Blindly move the actual
19125 output as expected output. The contents *seem* right to me, but I
19126 can't pretend reading perfectly parser tables... Nonetheless, all
19127 the other tests pass correctly, the table look OK, even though the
19128 presence of `$axiom' is to be noted: AFAICS it is useless (but
19129 harmless).
19130
19131 2001-12-29 Akim Demaille <akim@epita.fr>
19132
19133 * src/reader.c (readgram): Don't add the rule 0 if there were no
19134 rules read. In other words, add it _after_ having performed
19135 grammar sanity checks.
19136 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19137
19138 2001-12-29 Akim Demaille <akim@epita.fr>
19139
19140 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19141 visible, and some states have now a different number.
19142
19143 2001-12-29 Akim Demaille <akim@epita.fr>
19144
19145 * src/reader.c (readgram): Bind the initial rule's lineno to that
19146 of the first rule.
19147 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19148 (Solved SR Conflicts): Adjust rule 0's line number.
19149
19150 2001-12-29 Akim Demaille <akim@epita.fr>
19151
19152 Fix the `GAWK Grammar' failure.
19153
19154 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19155 the reductions of the first state which was mistakenly confused
19156 with the final state because precisely final_state was initialized
19157 to 0.
19158 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19159 now noticed by Bison.
19160 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19161 have a reduction on $default.
19162
19163 2001-12-29 Akim Demaille <akim@epita.fr>
19164
19165 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19166 rule line numbers.
19167 * src/closure.c (print_closure): Likewise.
19168 * src/derives.c (print_derives): Likewise.
19169 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19170 now.
19171
19172 2001-12-29 Akim Demaille <akim@epita.fr>
19173
19174 * src/lalr.c (lookaheads_print): New.
19175 (lalr): Call it when --trace-flag.
19176 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19177 are dumped.
19178
19179 2001-12-29 Akim Demaille <akim@epita.fr>
19180
19181 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19182 when walking through ritem, even via rule->rhs.
19183 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19184 (useful_production, useless_nonterminals): Likewise.
19185 (reduce_grammar_tables): Likewise, plus update nritems.
19186 * src/nullable.c (set_nullable): Likewise.
19187 * src/lalr.c (build_relations): Likewise.
19188 * tests/sets.at (Nullable): Adjust.
19189 Fortunately, now, the $axiom is no longer nullable.
19190
19191 2001-12-29 Akim Demaille <akim@epita.fr>
19192
19193 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19194 the 0-sentinel.
19195 * src/gram.c (ritem_longest_rhs): Likewise.
19196 * src/reduce.c (nonterminals_reduce): Likewise.
19197 * src/print_graph.c (print_graph): Likewise.
19198 * src/output.c (output_rule_data): Likewise.
19199 * src/nullable.c (set_nullable): Likewise.
19200
19201 2001-12-29 Akim Demaille <akim@epita.fr>
19202
19203 * src/output.c: Comment changes.
19204
19205 2001-12-27 Paul Eggert <eggert@twinsun.com>
19206
19207 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19208 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19209 Sparc, as they were causing more porting problems than the
19210 (minor) performance improvement was worth.
19211
19212 Also, catch up with 1.31's YYSTD.
19213
19214 2001-12-27 Akim Demaille <akim@epita.fr>
19215
19216 * src/output.c (output_gram): Rely on nritems, not the
19217 0-sentinel. See below.
19218 Use -1 as separator, not 0.
19219 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19220 Rely on -1 as separator in yyrhs, instead of 0.
19221 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19222 twice `Now at end of input', therefore there are two lines less to
19223 expect.
19224
19225 2001-12-27 Akim Demaille <akim@epita.fr>
19226
19227 * tests/regression.at (Unresolved SR Conflicts):
19228 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19229 below.
19230
19231 2001-12-27 Akim Demaille <akim@epita.fr>
19232
19233 * src/LR0.c (new_state): Recognize the final state by the fact it
19234 is reached by eoftoken.
19235 (insert_start_shifting_state, insert_eof_shifting_state)
19236 (insert_accepting_state, augment_automaton): Remove, since now
19237 these states are automatically computed from the initial state.
19238 (generate_states): Adjust.
19239 * src/print.c: When reporting a rule number to the user, substract
19240 1, so that the axiom rule is rule 0, and the first user rule is 1.
19241 * src/reduce.c: Likewise.
19242 * src/print_graph.c (print_core): For the time being, just as for
19243 the report, depend upon --trace-flags to dump the full set of
19244 items.
19245 * src/reader.c (readgram): Once the grammar read, insert the rule
19246 0: `$axiom: START-SYMBOL $'.
19247 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19248 number of the states has changed (the final state is no longer
19249 necessarily the last), catch up.
19250
19251 2001-12-27 Akim Demaille <akim@epita.fr>
19252
19253 Try to make the use of the eoftoken valid. Given that its value
19254 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19255 is used instead of > 0 where appropriate, (ii), depend upon nritems
19256 instead of the 0-sentinel.
19257
19258 * src/gram.h, src/gram.c (nritems): New.
19259 Expected to be duplication of nitems, but for the time being...
19260 * src/reader.c (packgram): Assert nritems and nitems are equal.
19261 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19262 * src/closure.c (print_closure, print_fderives): Likewise.
19263 * src/gram.c (ritem_print): Likewise.
19264 * src/print.c (print_core, print_grammar): Likewise.
19265 * src/print_graph.c: Likewise.
19266
19267 2001-12-27 Akim Demaille <akim@epita.fr>
19268
19269 * src/main.c (main): If there are complains after grammar
19270 reductions, then output the report anyway if requested, then die.
19271 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19272 * src/reader.c (eoftoken): New.
19273 (parse_token_decl): If the token being defined has value `0', it
19274 is the eoftoken.
19275 (packsymbols): No longer hack `tags' to insert `$' by hand.
19276 Be sure to preserve the value of the eoftoken.
19277 (reader): Make sure eoftoken is defined.
19278 Initialize nsyms to 0: now eoftoken is created just like the others.
19279 * src/print.c (print_grammar): Don't special case the eof token.
19280 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19281 lie anyway, albeit pleasant.
19282 * tests/calc.at: Exercise error messages with eoftoken.
19283 Change the grammar so that empty input is invalid.
19284 Adjust expectations.
19285 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19286
19287 2001-12-27 Akim Demaille <akim@epita.fr>
19288
19289 * configure.in: Check the protos of strchr ans strspn.
19290 Replace strchr if needed.
19291 * src/system.h: Provide the protos of strchr, strspn and memchr if
19292 missing.
19293 * lib/strchr.c: New.
19294 * src/reader.c (symbols_save): Use strchr.
19295
19296 2001-12-27 Akim Demaille <akim@epita.fr>
19297
19298 * src/print.c, src/print_graph.c (escape): New.
19299 Use it to quote the TAGS outputs.
19300 * src/print_graph.c (print_state): Now errors are in red, and
19301 reductions in green.
19302 Prefer high to wide: output the state number on a line of its own.
19303
19304 2001-12-27 Akim Demaille <akim@epita.fr>
19305
19306 * src/state.h, src/state.c (reductions_new): New.
19307 * src/LR0.c (set_state_table): Let all the states have a
19308 `reductions', even if reduced to 0.
19309 (save_reductions): Adjust.
19310 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19311 * src/print.c (print_reductions, print_actions): Adjust.
19312 * src/output.c (action_row): Adjust.
19313
19314 2001-12-27 Akim Demaille <akim@epita.fr>
19315
19316 * src/state.h, src/state.c (errs_new, errs_dup): New.
19317 * src/LR0.c (set_state_table): Let all the states have an errs,
19318 even if reduced to 0.
19319 * src/print.c (print_errs, print_reductions): Adjust.
19320 * src/output.c (output_actions, action_row): Adjust.
19321 * src/conflicts.c (resolve_sr_conflict): Adjust.
19322
19323 2001-12-27 Akim Demaille <akim@epita.fr>
19324
19325 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19326
19327 2001-12-27 Akim Demaille <akim@epita.fr>
19328
19329 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19330 * src/print.c: here.
19331 (lookaheadset, shiftset): New, used as additional storage by
19332 print_reductions.
19333 (print_results): Adjust.
19334 (print_shifts, print_gotos, print_errs): New, extracted from...
19335 (print_actions): here.
19336 * src/print_graph.c (print_actions): Remove dead code.
19337
19338 2001-12-27 Akim Demaille <akim@epita.fr>
19339
19340 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19341 `$n' and `@n'.
19342
19343 2001-12-27 Akim Demaille <akim@epita.fr>
19344
19345 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19346 (build_relations): Adjust.
19347
19348 2001-12-27 Akim Demaille <akim@epita.fr>
19349
19350 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19351 duplication.
19352
19353 2001-12-27 Akim Demaille <akim@epita.fr>
19354
19355 * src/reader.c (packgram): Catch nitems overflows.
19356
19357 2001-12-27 Akim Demaille <akim@epita.fr>
19358
19359 * src/files.c, src/files.h (guard_obstack): Remove.
19360 * src/output.c (output): Adjust.
19361 * src/reader.c (parse_braces): New, factoring...
19362 (copy_action, copy_guard): these two which are renamed as...
19363 (parse_action, parse_guard): these.
19364 As a voluntary consequence, using braces around guards is now
19365 mandatory.
19366
19367 2001-12-27 Akim Demaille <akim@epita.fr>
19368
19369 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19370 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19371 members.
19372 (symbol_list_new): Adjust.
19373 (copy_action): action_line is the first line, not the last.
19374 (copy_guard): Just as for actions, store the `action' only, not
19375 the switch/case/break flesh.
19376 Don't parse the user action that might follow the guard, let...
19377 (readgram): do it, i.e., now, there can be an action after a
19378 guard.
19379 In other words the guard is just explicitly optional.
19380 (packgram): Adjust.
19381 * src/output.c (guards_output): New.
19382 (output_parser): Call it when needed.
19383 (output): Also free the guard and attrs obstacks.
19384 * src/files.c, src/files.h (obstack_save): Remove.
19385 (output_files): Remove.
19386 As a result, if one needs the former `.act' file, using an
19387 appropriate skeleton which requires actions and guards is now
19388 required.
19389 * src/main.c (main): Adjust.
19390 * tests/semantic.at: New.
19391 * tests/regression.at: Use `input.y' as input file name.
19392 Avoid 8+3 problems by requiring input.c when the test needs the
19393 parser.
19394
19395 2001-12-27 Akim Demaille <akim@epita.fr>
19396
19397 * src/reader.c (symbol_list_new): Be sure to initialize all the
19398 fields.
19399
19400 2001-12-27 Akim Demaille <akim@epita.fr>
19401
19402 All the hacks using a final pseudo state are now useless.
19403
19404 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19405 * src/lalr.c (nLA): New.
19406 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19407 instead of lookaheadsp from the pseudo state (nstate + 1).
19408
19409 2001-12-27 Akim Demaille <akim@epita.fr>
19410
19411 * src/output.c (action_row, token_actions): Use a state_t instead
19412 of a integer, and nlookaheads instead of the following state's
19413 lookaheadsp.
19414
19415 2001-12-27 Akim Demaille <akim@epita.fr>
19416
19417 * src/conflicts.c (log_resolution, flush_shift)
19418 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19419 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19420 (conflicts_print, print_reductions): Use a state_t instead of an
19421 integer when referring to a state.
19422 As much as possible, depend upon nlookaheads, instead of the
19423 `lookaheadsp' member of the following state (since lookaheads of
19424 successive states are successive, the difference between state n + 1
19425 and n served as the number of lookaheads for state n).
19426 * src/lalr.c (add_lookback_edge): Likewise.
19427 * src/print.c (print_core, print_actions, print_state)
19428 (print_results): Likewise.
19429 * src/print_graph.c (print_core, print_actions, print_state)
19430 (print_graph): Likewise.
19431 * src/conflicts.h: Adjust.
19432
19433 2001-12-27 Akim Demaille <akim@epita.fr>
19434
19435 * src/bison.hairy: Formatting/comment changes.
19436 ANSIfy.
19437 Remove `register' indications.
19438 Add plenty of `static'.
19439
19440 2001-12-27 Akim Demaille <akim@epita.fr>
19441
19442 * src/output.c (prepare): Drop the muscle `ntbase' which
19443 duplicates ntokens.
19444 * src/bison.simple: Formatting/comment changes.
19445 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19446 is an undocumented synonym.
19447
19448 2001-12-22 Akim Demaille <akim@epita.fr>
19449
19450 * src/output.c (output_table_data): Change the prototype to use
19451 `int' for array ranges: some invocations do pass an int, not a
19452 short.
19453 Reported by Wayne Green.
19454
19455 2001-12-22 Akim Demaille <akim@epita.fr>
19456
19457 Some actions of web2c.y are improperly triggered.
19458 Reported by Mike Castle.
19459
19460 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19461 * tests/regression.at (Web2c): Rename as...
19462 (Web2c Report): this.
19463 (Web2c Actions): New.
19464
19465 2001-12-22 Akim Demaille <akim@epita.fr>
19466
19467 Reductions in web2c.y are improperly reported.
19468 Reported by Mike Castle.
19469
19470 * src/conflicts.c (print_reductions): Fix.
19471 * tests/regression.at (Web2c): New.
19472
19473 2001-12-18 Akim Demaille <akim@epita.fr>
19474
19475 Some host fail on `assert (!"foo")', which expands to
19476 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19477 Reported by Nelson Beebee.
19478
19479 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19480 `#define it_succeeded 0' and `assert (it_succeeded)'.
19481
19482 2001-12-17 Marc Autret <autret_m@epita.fr>
19483
19484 * src/bison.simple: Don't hard code the skeleton line and filename.
19485 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19486 New line counter 'skeleton_line' (skeleton-line muscle).
19487
19488 2001-12-17 Paul Eggert <eggert@twinsun.com>
19489
19490 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19491 YYDEBUG must be defined to a nonzero value.
19492
19493 * src/bison.simple (yytname): Do not assume that the user defines
19494 YYDEBUG to a properly parenthesized expression.
19495
19496 2001-12-17 Akim Demaille <akim@epita.fr>
19497
19498 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19499 nlookaheads is a new member.
19500 Adjust all users.
19501 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19502 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19503 state.
19504
19505 2001-12-17 Akim Demaille <akim@epita.fr>
19506
19507 * src/files.h, src/files.c (open_files, close_files): Remove.
19508 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19509 let...
19510 * src/reader.c (reader): Do it.
19511
19512 2001-12-17 Akim Demaille <akim@epita.fr>
19513
19514 * src/conflicts.c (print_reductions): Formatting changes.
19515
19516 2001-12-17 Akim Demaille <akim@epita.fr>
19517
19518 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19519 (flush_reduce): New.
19520 (resolve_sr_conflict): Adjust.
19521
19522 2001-12-17 Akim Demaille <akim@epita.fr>
19523
19524 * src/output.c (output_obstack): Be static and rename as...
19525 (format_obstack): this, to avoid any confusion with files.c's
19526 output_obstack.
19527 * src/reader.h (muscle_obstack): Move to...
19528 * src/output.h: here, since it's defined in output.c.
19529
19530 2001-12-17 Akim Demaille <akim@epita.fr>
19531
19532 * src/output.c (action_row, save_column, default_goto)
19533 (sort_actions, matching_state, pack_vector): Better variable
19534 locality.
19535
19536 2001-12-17 Akim Demaille <akim@epita.fr>
19537
19538 * src/output.c: Various formatting changes.
19539
19540 2001-12-17 Akim Demaille <akim@epita.fr>
19541
19542 * src/files.c (output_files): Free the output_obstack.
19543 * src/main.c (main): Call print and print_graph conditionally.
19544 * src/print.c (print): Work unconditionally.
19545 * src/print_graph.c (print_graph): Work unconditionally.
19546 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19547
19548 2001-12-16 Marc Autret <autret_m@epita.fr>
19549
19550 * src/output.c (actions_output): Fix. When we use %no-lines,
19551 there is one less line per action.
19552
19553 2001-12-16 Marc Autret <autret_m@epita.fr>
19554
19555 * src/bison.simple: Remove a useless #line directive.
19556 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19557 * src/output.c (get_lines_number): New.
19558 (output_parser): Adjust, now takes care about the lines of a
19559 output muscles.
19560 Fix line numbering.
19561 (actions_output): Computes the number of lines taken by actions.
19562 (output_master_parser): Insert new skeleton which is the name of
19563 the output parser file name.
19564
19565 2001-12-15 Marc Autret <autret_m@epita.fr>
19566
19567 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19568
19569 2001-12-15 Marc Autret <autret_m@epita.fr>
19570
19571 * src/output.c (output_gram): Keep track of the hairy one.
19572
19573 2001-12-15 Akim Demaille <akim@epita.fr>
19574
19575 Make `make distcheck' work.
19576
19577 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19578 system.h which uses libgettext.h.
19579
19580 2001-12-15 Akim Demaille <akim@epita.fr>
19581
19582 * src/nullable.c (set_nullable): Useless rules must be skipped,
19583 otherwise, since we range over their symbols, we might look at a
19584 nonterminal which no longer ``exists'', i.e., it is not counted in
19585 `nvars', hence we overflow our arrays.
19586
19587 2001-12-15 Akim Demaille <akim@epita.fr>
19588
19589 The header can also be produced directly, without any obstack!
19590 Yahoo!
19591
19592 * src/files.c, src/files.h (defines_obstack): Remove.
19593 (compute_header_macro): Global.
19594 (defines_obstack_save): Remove.
19595 * src/reader.c (parse_union_decl): No longer output to
19596 defines_obstack: its content can be found in the `stype' muscle
19597 anyway.
19598 (output_token_translations): Merge into...
19599 (symbols_output): this.
19600 Rename as...
19601 (symbols_save): this.
19602 (reader): Adjust.
19603 * src/output.c (header_output): New.
19604 (output): Call it.
19605
19606 2001-12-15 Akim Demaille <akim@epita.fr>
19607
19608 * src/reader.c (parse_union_decl): Instead of handling two obstack
19609 simultaneously, use one to define the `stype' muscle, and use the
19610 value of the latter to fill defines_obstack.
19611 (copy_comment): Remove.
19612 (copy_comment2): Work for a single obstack.
19613 Rename as...
19614 (copy_comment): this.
19615
19616 2001-12-15 Akim Demaille <akim@epita.fr>
19617
19618 * src/lex.c, src/lex.h (xgetc): No longer static.
19619 * src/reader.c (parse_union_decl): Revamp.
19620
19621 2001-12-15 Akim Demaille <akim@epita.fr>
19622
19623 Still making progress in separating Bison into (i) input, (ii)
19624 process, (iii) output: now we can directly output the parser file
19625 without using table_obstack at all.
19626
19627 * src/files.c, src/files.h (table_obstack): Bye bye.
19628 (parser_file_name): New.
19629 * src/files.c (compute_output_file_names): Compute it.
19630 * src/output.c (actions_output, output_parser)
19631 (output_master_parser): To a file instead of an obstack.
19632
19633 2001-12-15 Akim Demaille <akim@epita.fr>
19634
19635 Attach actions to rules, instead of pre-outputting them to
19636 actions_obstack.
19637
19638 * src/gram.h (rule_t): action and action_line are new members.
19639 * src/reader.c (symbol_list): Likewise.
19640 (copy_action): Save the actions within the rule.
19641 (packgram): Save them in rule_table.
19642 * src/output.c (actions_output): New.
19643 (output_parser): Use it on `%%actions'.
19644 (output_rule_data): Don't free rule_table.
19645 (output): Do it.
19646 (prepare): Don't save the `action' muscle.
19647 * src/bison.simple: s/%%action/%%actions/.
19648
19649 2001-12-15 Akim Demaille <akim@epita.fr>
19650
19651 * src/reader.c (copy_action): When --yacc, don't append a `;'
19652 to the user action: let it fail if lacking.
19653 Suggested by Arnold Robbins and Tom Tromey.
19654
19655 2001-12-14 Akim Demaille <akim@epita.fr>
19656
19657 * src/lex.c (literalchar): Simply return the char you decoded, non
19658 longer mess around with obstacks and int pointers.
19659 Adjust all callers.
19660
19661 2001-12-14 Akim Demaille <akim@epita.fr>
19662
19663 * src/lex.c (literalchar): Don't escape the special characters,
19664 just decode them, and keep them as char (before, eol was output as
19665 the 2 char string `\n' etc.).
19666 * src/output.c (output_rule_data): Use quotearg to output the
19667 token strings.
19668
19669 2001-12-13 Paul Eggert <eggert@twinsun.com>
19670
19671 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19672 Do not infringe on the global user namespace when using C++.
19673 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19674 All uses of `fprintf' and `stderr' changed.
19675
19676 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19677
19678 2001-12-13 Akim Demaille <akim@epita.fr>
19679
19680 The computation of nullable is broken: it doesn't handle empty
19681 RHS's properly.
19682
19683 * tests/torture.at (GNU AWK Grammar): New.
19684 * tests/sets.at (Nullable): New.
19685 * src/nullable.c (set_nullable): Instead of blindly looping over
19686 `ritems', loop over the rules, and then over their rhs's.
19687
19688 Work around Autotest bugs.
19689
19690 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19691 frame, because Autotest understand lines starting with a `+' as
19692 traces from the shell. Then, they are not processed properly.
19693 Admittedly an Autotest bug, but we don't have time to wait for
19694 Autotest to catch up.
19695 * tests/regression.at (Broken Closure): Adjust to the new table
19696 frames.
19697 Move to...
19698 * tests/sets.at: here.
19699
19700 2001-12-13 Akim Demaille <akim@epita.fr>
19701
19702 * src/closure.c (closure): Use nrules instead of playing tricks
19703 with BITS_PER_WORD.
19704
19705 2001-12-13 Akim Demaille <akim@epita.fr>
19706
19707 * src/print.c (print_actions): Output the handling of `$' as the
19708 traces do: shifting the token EOF. Before EOF was treated as a
19709 nonterminal.
19710 * tests/regression.at: Adjust some tests.
19711 * src/print_graph.c (print_core): Complete the set of items via
19712 closure. The next-to-final and final states are still unsatisfying,
19713 but that's to be addressed elsewhere.
19714 No longer output the rule numbers, but do output the state number.
19715 A single loop for the shifts + gotos is enough, but picked a
19716 distinct color for each.
19717 (print_graph): Initialize and finalize closure.
19718
19719 2001-12-13 Akim Demaille <akim@epita.fr>
19720
19721 * src/reader.c (readgram): Remove dead code, an strip useless
19722 braces.
19723 (get_type): Remove, unused.
19724
19725 2001-12-12 Akim Demaille <akim@epita.fr>
19726
19727 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19728 on that of lib/error.c.
19729
19730 2001-12-12 Akim Demaille <akim@epita.fr>
19731
19732 Some hosts don't like `/' in includes.
19733
19734 * src/system.h: Include libgettext.h without qualifying the path.
19735 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19736 $(top_srcdir).
19737
19738 2001-12-11 Marc Autret <autret_m@epita.fr>
19739
19740 * src/output.c (output_parser): Remove useless muscle.
19741
19742 2001-12-11 Marc Autret <autret_m@epita.fr>
19743
19744 * src/bison.simple: Remove #line just before %%epilogue. It
19745 is now handled in ...
19746 * src/reader.c (read_additionnal_code): Add the output of a
19747 #line for the epilogue.
19748
19749 2001-12-10 Marc Autret <autret_m@epita.fr>
19750
19751 * src/reader.c (copy_definition): Re-use CPP-outed code which
19752 replace precedent remove.
19753 * src/bison.simple: Remove #line before %%prologue because
19754 %%input-line is wrong at this time.
19755
19756 2001-12-10 Marc Autret <autret_m@epita.fr>
19757
19758 * src/reader.c (symbols_output): Clean up.
19759 * src/output.c (output_gram, output): Clean up.
19760
19761 2001-12-10 Akim Demaille <akim@epita.fr>
19762
19763 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19764 * src/LR0.c (set_state_table): here.
19765 * src/lalr.c (lalr): Call it.
19766
19767 2001-12-10 Akim Demaille <akim@epita.fr>
19768
19769 * src/state.h (shifts): Remove the `number' member: shifts are
19770 attached to state, hence no longer need to be labelled with a
19771 state number.
19772
19773 2001-12-10 Akim Demaille <akim@epita.fr>
19774
19775 Now that states have a complete set of members, the linked list of
19776 shifts is useless: just fill directly the state's shifts member.
19777
19778 * src/state.h (shifts): Remove the `next' member.
19779 * src/LR0.c (first_state, last_state): Remove.
19780 Adjust the callers.
19781 (augment_automaton): Don't look for the shifts that must be added
19782 a shift on EOF: it is those of the state we looked for! But now,
19783 since shifts are attached, it is no longer needed to looking
19784 merely by its id: its number.
19785
19786 2001-12-10 Akim Demaille <akim@epita.fr>
19787
19788 * src/LR0.c (augment_automaton): Better variable locality.
19789 Remove an impossible branch: if there is a state corresponding to
19790 the start symbol being shifted, then there is shift for the start
19791 symbol from the initial state.
19792
19793 2001-12-10 Akim Demaille <akim@epita.fr>
19794
19795 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19796 only when appropriate: when insert_start_shifting_state' is not
19797 invoked.
19798 * tests/regression.at (Rule Line Numbers): Adjust.
19799
19800 2001-12-10 Akim Demaille <akim@epita.fr>
19801
19802 * src/LR0.c (augment_automaton): Now that all states have shifts,
19803 merge the two cases addition shifts to the initial state.
19804
19805 2001-12-10 Akim Demaille <akim@epita.fr>
19806
19807 * src/lalr.c (set_state_table): Move to...
19808 * src/LR0.c: here.
19809 * src/lalr.c (lalr): Don't call it...
19810 * src/LR0.c (generate_states): do it.
19811 * src/LR0.h (first_state): Remove, only the table is used.
19812
19813 2001-12-10 Akim Demaille <akim@epita.fr>
19814
19815 * src/LR0.h (first_shift, first_reduction): Remove.
19816 * src/lalr.c: Don't use first_shift: find shifts through the
19817 states.
19818
19819 2001-12-10 Akim Demaille <akim@epita.fr>
19820
19821 * src/LR0.c: Attach shifts to states as soon as they are
19822 computed.
19823 * src/lalr.c (set_state_table): Instead of assigning shifts to
19824 state, just assert that the mapping was properly done.
19825
19826 2001-12-10 Akim Demaille <akim@epita.fr>
19827
19828 * src/LR0.c (insert_start_shift): Rename as...
19829 (insert_start_shifting_state): this.
19830 (insert_eof_shifting_state, insert_accepting_state): New.
19831 (augment_automaton): Adjust.
19832 Better locality of the variables.
19833 When looking if the start_symbol is shifted from the initial
19834 state, using `while (... symbol != start_symbol ...)' sounds
19835 better than `while (... symbol < start_symbol ...)': If fail
19836 to see how the order between symbols could be relevant!
19837
19838 2001-12-10 Akim Demaille <akim@epita.fr>
19839
19840 * src/getargs.h: Don't declare `spec_name_prefix' and
19841 `spec_file_prefix', declared by src/files.h.
19842 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19843 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19844 * src/output.c (prepare): Adjust.
19845 * src/reader.c (symbols_output): Likewise.
19846 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19847
19848 2001-12-10 Akim Demaille <akim@epita.fr>
19849
19850 * src/muscle_tab.c (muscle_init): NULL is a better default than
19851 `"0"'.
19852
19853 2001-12-10 Akim Demaille <akim@epita.fr>
19854
19855 * src/reader.c (reader): Calling symbols_output once is enough.
19856
19857 2001-12-10 Akim Demaille <akim@epita.fr>
19858
19859 Now that states have a complete set of members, the linked list of
19860 reductions is useless: just fill directly the state's reductions
19861 member.
19862
19863 * src/state.h (struct reductions): Remove member `number' and
19864 `next'.
19865 * src/LR0.c (first_reduction, last_reduction): Remove.
19866 (save_reductions): Don't link the new reductions, store them in
19867 this_state.
19868 * src/lalr.c (set_state_table): No need to attach reductions to
19869 states, it's already done.
19870 * src/output.c (output_actions): No longer free the shifts, then
19871 the reductions, then the states: free all the states and their
19872 members.
19873
19874 2001-12-10 Akim Demaille <akim@epita.fr>
19875
19876 * src/options.c (OPTN, DRTV, BOTH): New.
19877 (option_table): Use them.
19878
19879 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19880 the job of system.h.
19881 * src/options.c: Don't include stdio.h and xalloc.h for the same
19882 reasons.
19883
19884 2001-12-10 Akim Demaille <akim@epita.fr>
19885
19886 * src/output.c (output, prepare): Make sure the values of the
19887 muscles `action' and `prologue' are 0-terminated.
19888
19889 2001-12-10 Akim Demaille <akim@epita.fr>
19890
19891 Clean up GCC warnings.
19892
19893 * src/reader.c (copy_action): `buf' is not used.
19894 (parse_skel_decl): Be static.
19895 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19896 * src/options.h (create_long_option_table): Have a real prototype.
19897 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19898 (hash_delete_at): Return const void *.
19899 Adjust casts to preserve the const.
19900
19901 2001-12-10 Akim Demaille <akim@epita.fr>
19902
19903 * configure.in: Require 2.52g.
19904 M4 is not needed, but AUTOM4TE is.
19905 * m4/m4.m4: Remove.
19906 * tests/Makefile.am: Adjust.
19907
19908 2001-12-10 Akim Demaille <akim@epita.fr>
19909
19910 One structure for states is enough, even though theoretically
19911 there are LR(0) states and LALR(1) states.
19912
19913 * src/lalr.h (state_t): Remove.
19914 (state_table): Be state_t **, not state_t *.
19915 * src/state.h (core, CORE_ALLOC): Rename as...
19916 (state_t, STATE_ALLOC): this.
19917 Add the LALR(1) members: shifts, reductions, errs.
19918 * src/LR0.c (state_table): Rename as...
19919 (state_hash): this, to avoid name clashes with the global
19920 `state_table'.
19921 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19922 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19923
19924 2001-12-10 Akim Demaille <akim@epita.fr>
19925
19926 Bison dumps core on bash.y.
19927 Reported by Pascal Bart.
19928
19929 * src/warshall.c (bitmatrix_print): New.
19930 (TC): Use it.
19931 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19932 j must be the outer loop.
19933 * tests/regression.at (Broken Closure): New.
19934
19935 2001-12-05 Akim Demaille <akim@epita.fr>
19936
19937 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19938 its argument.
19939 Reported by Peter Hamorsky.
19940
19941 2001-12-05 Akim Demaille <akim@epita.fr>
19942
19943 * src/conflicts.c (err_table): Remove.
19944 (resolve_sr_conflict): Adjust.
19945 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19946 Rename as...
19947 (state_t.reductions, state_t.shifts): this.
19948
19949 2001-12-05 Akim Demaille <akim@epita.fr>
19950
19951 * src/reduce.c (reduce_grammar_tables): No longer disable the
19952 removal of useless rules via CPP but via `if (0)', so that the
19953 compiler still check the code is valid.
19954 For instance, it should have noticed `rline' no longer exists: use
19955 the `line' member of rule_t.
19956 * src/gram.c (dummy, rline): Remove, unused.
19957
19958 2001-12-05 Akim Demaille <akim@epita.fr>
19959
19960 * src/output.c (pack_vector): Use assert, not berror.
19961 * src/main.c (berror): Remove, unused.
19962
19963 2001-12-05 Akim Demaille <akim@epita.fr>
19964
19965 New experimental feature: if --verbose --trace output all the
19966 items of a state, not only its kernel.
19967
19968 * src/print.c (print_core): If `trace_flag', then invoke closure
19969 before outputting the items of the state (print_core is no longer
19970 a correct name them).
19971 (print_results): Invoke new_closure/free_closure if needed.
19972
19973 2001-12-05 Akim Demaille <akim@epita.fr>
19974
19975 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19976 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19977 (nitemset): for consistency with the rest of the project.
19978
19979 2001-12-05 Akim Demaille <akim@epita.fr>
19980
19981 * src/closure.c (print_closure): Improve.
19982 (closure): Use it for printing input and output.
19983
19984 2001-12-05 Akim Demaille <akim@epita.fr>
19985
19986 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19987 indexed by nonterminals.
19988
19989 2001-12-05 Akim Demaille <akim@epita.fr>
19990
19991 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19992 what it was!).
19993 * src/warshall.h: Remove accidental duplication of the content.
19994
19995 2001-12-05 Akim Demaille <akim@epita.fr>
19996
19997 * src/closure.c (set_fderives): De-obfuscate.
19998
19999 2001-12-05 Akim Demaille <akim@epita.fr>
20000
20001 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
20002
20003 2001-12-05 Akim Demaille <akim@epita.fr>
20004
20005 * src/closure.c (set_firsts): De-obfuscate.
20006
20007 2001-12-05 Akim Demaille <akim@epita.fr>
20008
20009 * src/output.c (action_row): De-obfuscate
20010 using the good o' techniques: arrays not pointers, variable
20011 locality, BITISSET, RESETBIT etc.
20012
20013 2001-12-05 Akim Demaille <akim@epita.fr>
20014
20015 Pessimize the code to simplify it: from now on, all the states
20016 have a valid SHIFTS, which NSHIFTS is possibly 0.
20017
20018 * src/LR0.c (shifts_new): Be global and move to..
20019 * src/state.c, src/state.h: here.
20020 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
20021 * src/print_graph: Adjust.
20022
20023 2001-12-05 Akim Demaille <akim@epita.fr>
20024
20025 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
20026 * src/conflicts.c: Use it.
20027 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
20028 incorrectly ``simplified''.
20029
20030 2001-12-05 Akim Demaille <akim@epita.fr>
20031
20032 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
20033 using the good o' techniques: arrays not pointers, variable
20034 locality, BITISSET, RESETBIT etc.
20035
20036 2001-12-05 Akim Demaille <akim@epita.fr>
20037
20038 * src/state.h (SHIFT_SYMBOL): New.
20039 * src/conflicts.c: Use it to deobfuscate.
20040
20041 2001-12-05 Akim Demaille <akim@epita.fr>
20042
20043 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
20044 (print_reductions): De-obfuscate using the good o' techniques:
20045 arrays not pointers, variable locality, BITISSET.
20046
20047 2001-12-05 Akim Demaille <akim@epita.fr>
20048
20049 * src/conflicts.c (print_reductions): Arrays, not pointers.
20050 Use BITISSET.
20051
20052 2001-12-05 Akim Demaille <akim@epita.fr>
20053
20054 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20055
20056 2001-12-05 Akim Demaille <akim@epita.fr>
20057
20058 * src/conflicts.c (print_reductions): Improve variable locality.
20059
20060 2001-12-05 Akim Demaille <akim@epita.fr>
20061
20062 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20063
20064 2001-12-05 Akim Demaille <akim@epita.fr>
20065
20066 * src/conflicts.c (print_reductions): Improve variable locality.
20067
20068 2001-12-05 Akim Demaille <akim@epita.fr>
20069
20070 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
20071 * src/lalr.c: Use them.
20072
20073 2001-12-05 Akim Demaille <akim@epita.fr>
20074
20075 * src/LR0.c (augment_automaton): Formatting changes.
20076 Better variable locality.
20077
20078 2001-12-05 Akim Demaille <akim@epita.fr>
20079
20080 * src/lalr.c (matrix_print): New.
20081 (transpose): Use it.
20082 Use arrays instead of pointers.
20083
20084 2001-12-05 Akim Demaille <akim@epita.fr>
20085
20086 * src/lalr.c (maxrhs): Move to...
20087 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20088 * src/lalr.c (build_relations): Adjust.
20089
20090 2001-12-05 Akim Demaille <akim@epita.fr>
20091
20092 * src/lalr.c (transpose): Free the memory allocated to the
20093 argument, as it is replaced by the results by the unique caller.
20094 (build_relations): Merely invoke transpose: it handles the memory
20095 deallocation.
20096 Improve variable locality.
20097 Avoid variables used as mere abbreviations.
20098 (compute_lookaheads): Use arrays instead of pointers.
20099
20100 2001-12-05 Akim Demaille <akim@epita.fr>
20101
20102 * src/lalr.c (initialize_F): Improve variable locality.
20103 Avoid variables used as mere abbreviations.
20104
20105 2001-12-05 Akim Demaille <akim@epita.fr>
20106
20107 * src/derives.c (print_derives): Display the ruleno.
20108 * src/lalr.c (initialize_F, transpose): Better variable locality
20109 to improve readability.
20110 Avoid variables used as mere abbreviations.
20111
20112 2001-12-05 Akim Demaille <akim@epita.fr>
20113
20114 * src/lalr.c (traverse): Use arrays instead of pointers.
20115
20116 2001-12-05 Akim Demaille <akim@epita.fr>
20117
20118 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20119 the handling of squeue.
20120 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20121
20122 2001-12-05 Akim Demaille <akim@epita.fr>
20123
20124 Because useless nonterminals are now kept alive (instead of being
20125 `destroyed'), we now sometimes examine them, and store information
20126 related to them. Hence we need to know their number, and adjust
20127 memory allocations.
20128
20129 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20130 static.
20131 * src/LR0.c (allocate_itemsets): The memory allocated to
20132 `symbol_count' was used for two different purpose: once to count
20133 the number of occurrences of each symbol, and later reassigned to
20134 `shift_symbol', containing the symbol that can be shifted from a
20135 given state.
20136 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20137 only, and...
20138 (new_itemsets): Allocate `shift_symbol' here.
20139 (allocate_itemsets): symbol_count includes useless nonterminals.
20140 Make room for them.
20141 (free_storage): Use `free', not `XFREE', for pointers that cannot
20142 be null.
20143
20144 2001-12-05 Akim Demaille <akim@epita.fr>
20145
20146 * src/nullable.c (set_nullable): Deobfuscate the handling of
20147 ritem.
20148 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20149
20150 2001-12-05 Akim Demaille <akim@epita.fr>
20151
20152 * src/gram.c, src/gram.h (ritem_print): New.
20153 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20154 (This useless function was defined only to work around VMS linkers
20155 that can't handle compilation units with variables only).
20156 * src/reduce.c (dump_grammar): Use it to trace the construction of
20157 ritem.
20158
20159 2001-12-04 Paul Eggert <eggert@twinsun.com>
20160
20161 * src/bison.simple (union yyalloc): Change member names
20162 to be the same as the stack names.
20163 (yyparse): yyptr is now union yyalloc *, not char *.
20164 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20165 and may generate better code on some machines.
20166 (yystpcpy): Use prototype if __STDC__ is defined, not just
20167 if __cplusplus is defined.
20168
20169 2001-11-30 Akim Demaille <akim@epita.fr>
20170
20171 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20172 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20173 Gettext doesn't compile cleanly, and dies with -Werror.
20174 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20175 Include WARNING_CFLAGS here.
20176 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20177 before being defined.
20178
20179 2001-11-27 Paul Eggert <eggert@twinsun.com>
20180
20181 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20182 First arg is int, not unsigned.
20183 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20184 (SIZE_MAX, UINT_MAX): New macros.
20185 (quotearg_n_options): Abort if N is negative.
20186 Avoid overflow check on hosts where size_t is 64 bits and int
20187 is 32 bits, as overflow is impossible there.
20188 Fix off-by-one typo that caused unnecessary reallocation.
20189
20190 2001-11-29 Paul Eggert <eggert@twinsun.com>
20191
20192 Name space cleanup in generated parser.
20193
20194 * doc/bison.texinfo (Bison Parser): Discuss system headers
20195 and their effect on the user name space.
20196
20197 * src/bison.simple:
20198 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20199 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20200 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20201
20202 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20203 on user names when possible.
20204
20205 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20206 Simplify test for whather <alloca.h> exists.
20207
20208 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20209
20210 (<stdio.h>): Include if YYDEBUG.
20211
20212 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20213 ! defined (yyoverflow) && ! defined (yymemcpy).
20214
20215 (yymemcpy, yyparse): Rename local variables as needed so that
20216 they all begin with 'yy'.
20217
20218 (yystrlen, yystpcpy): New functions.
20219
20220 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20221 All uses changed.
20222
20223 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20224 instead of relying on string.h functions. Use YYSTACK_ALLOC
20225 and YYSTACK_FREE instead of malloc and free.
20226
20227 2001-11-30 Akim Demaille <akim@epita.fr>
20228
20229 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20230 before their first uses.
20231 (YYBISON, YYPURE): Move to the top of the output.
20232
20233 2001-11-30 Akim Demaille <akim@epita.fr>
20234
20235 * tests/reduce.at (Useless Nonterminals): Fix.
20236
20237 2001-11-30 Akim Demaille <akim@epita.fr>
20238
20239 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20240 if body instead of `;' to pacify GCC's warnings.
20241
20242 2001-11-30 Akim Demaille <akim@epita.fr>
20243
20244 Instead of mapping the LHS of unused rules to -1, keep the LHS
20245 valid, but flag the rules as invalid.
20246
20247 * src/gram.h (rule_t): `useful' is a new member.
20248 * src/print.c (print_grammar): Adjust.
20249 * src/derives.c (set_derives): Likewise.
20250 * src/reader.c (packgram, reduce_output): Likewise.
20251 * src/reduce.c (reduce_grammar_tables): Likewise.
20252 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20253
20254 2001-11-30 Akim Demaille <akim@epita.fr>
20255
20256 * src/reduce.c (reduce_output): Formatting changes.
20257 * src/print.c (print_results, print_grammar): Likewise.
20258 * tests/regression.at (Rule Line Numbers)
20259 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20260
20261 2001-11-30 Akim Demaille <akim@epita.fr>
20262
20263 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20264 useless nonterminals, move them at the end of the symbol arrays.
20265 (reduce_output): Adjust.
20266 * tests/reduce.at (Useless Nonterminals): Adjust.
20267
20268 2001-11-30 Akim Demaille <akim@epita.fr>
20269
20270 * src/reduce.c: Various comment/formatting changes.
20271 (nonterminals_reduce): New, extracted from...
20272 (reduce_grammar_tables): here.
20273 (reduce_grammar): Call nonterminals_reduce.
20274
20275 2001-11-29 Paul Eggert <eggert@twinsun.com>
20276
20277 * src/bison.simple (YYSTACK_REALLOC): Remove.
20278 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20279 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20280 New macros.
20281 (union yyalloc): New type.
20282 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20283 an arbitrary restriction on hosts where size_t is wider than int.
20284
20285 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20286 a parser stack overflow. Allocate just one block of memory for all
20287 three stacks, instead of allocating three blocks; this typically is
20288 faster and reduces fragmentation.
20289
20290 Do not limit the number of items in the stack to a value that fits
20291 in 'int', as this is an arbitrary limit on hosts with 64-bit
20292 size_t and 32-bit int.
20293
20294 2001-11-29 Marc Autret <autret_m@epita.fr>
20295
20296 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20297 of defining YYERROR_VERBOSE.
20298 [AT_DATA]: $4 is now out of C declarations in the prologue.
20299
20300 2001-11-28 Marc Autret <autret_m@epita.fr>
20301
20302 * src/reader.c (parse_dquoted_param): New.
20303 (parse_skel_decl): Use it.
20304 * src/lex.h: Add its prototype.
20305 * src/lex.c (literalchar): Become not static.
20306
20307 2001-11-28 Marc Autret <autret_m@epita.fr>
20308
20309 * src/output.h: And put its extern declaration here.
20310 * src/output.c (error_verbose): Define here.
20311 (prepare): Echo name modification.
20312 * src/getargs.h: Clean its extern declaration.
20313 * src/getargs.c (error_verbose_flag): Remove.
20314 (getargs): Remove case 'e'.
20315 * src/options.c (option_table): 'error-verbose' is now seen as simple
20316 percent option.
20317 Include output.h.
20318
20319 * src/reader.c (read_declarations): Remove case tok_include.
20320 (parse_include_decl): Remove.
20321 * src/lex.h (token_t): Remove tok_include.
20322 * src/options.c (option_table): 'include' is now a simple command line
20323 option.
20324
20325 2001-11-28 Marc Autret <autret_m@epita.fr>
20326
20327 * src/bison.simple: Adjust muscle names.
20328 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20329 * src/output.c (prepare): s/_/-/ for the muscles names.
20330 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20331
20332 2001-11-28 Marc Autret <autret_m@epita.fr>
20333
20334 * src/bison.simple: Fix debug.
20335 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20336
20337 2001-11-28 Akim Demaille <akim@epita.fr>
20338
20339 * src/LR0.c (shifts_new): New.
20340 (save_shifts, insert_start_shift, augment_automaton): Use it.
20341
20342 2001-11-28 Akim Demaille <akim@epita.fr>
20343
20344 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20345 keep ruleno only.
20346
20347 2001-11-28 Akim Demaille <akim@epita.fr>
20348
20349 * src/closure.c (closure): Instead of looping over word in array
20350 then bits in words, loop over bits in array.
20351
20352 2001-11-28 Akim Demaille <akim@epita.fr>
20353
20354 * src/closure.c (closure): No longer optimize the special case
20355 where all the bits of `ruleset[r]' are set to 0, to make the code
20356 clearer.
20357
20358 2001-11-28 Akim Demaille <akim@epita.fr>
20359
20360 * src/closure.c (closure): `r' and `c' are new variables, used to
20361 de-obfuscate accesses to RULESET and CORE.
20362
20363 2001-11-28 Akim Demaille <akim@epita.fr>
20364
20365 * src/reduce.c (reduce_print): Use ngettext.
20366 (dump_grammar): Improve the trace accuracy.
20367
20368 2001-11-28 Akim Demaille <akim@epita.fr>
20369
20370 * src/reduce.c (dump_grammar): Don't translate trace messages.
20371
20372 2001-11-28 Akim Demaille <akim@epita.fr>
20373
20374 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20375 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20376 as all tags are free'ed afterwards.
20377 From Enrico Scholz.
20378
20379 2001-11-27 Paul Eggert <eggert@twinsun.com>
20380
20381 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20382 use alloca when we didn't want to, and vice versa.
20383
20384 2001-11-27 Marc Autret <autret_m@epita.fr>
20385
20386 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20387 initialization.
20388 * src/output.c (prepare): Remove its update.
20389
20390 2001-11-27 Marc Autret <autret_m@epita.fr>
20391
20392 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20393 Use %error-verbose.
20394
20395 2001-11-27 Marc Autret <autret_m@epita.fr>
20396
20397 * src/bison.simple: Remove YYERROR_VERBOSE using.
20398 Use %%error_verbose.
20399 (yyparse): Likewise.
20400 * src/output.c (prepare): Give its final value.
20401 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20402 * src/getargs.h: Add its extern declaration.
20403 * src/getargs.c (error_verbose_flag): New int.
20404 (getargs): Update to catch new case.
20405 * src/options.c (option_table): 'error-verbose' is a new option.
20406 (shortopts): Update.
20407
20408 2001-11-27 Akim Demaille <akim@epita.fr>
20409
20410 * src/system.h: Use intl/libgettext.h.
20411 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20412
20413 2001-11-27 Akim Demaille <akim@epita.fr>
20414
20415 * tests/torture.at (Exploding the Stack Size with Malloc):
20416 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20417
20418 2001-11-27 Akim Demaille <akim@epita.fr>
20419
20420 * src/files.c: Include error.h.
20421 Reported by Hans Aberg.
20422
20423 2001-11-26 Marc Autret <autret_m@epita.fr>
20424
20425 * src/reader.c (parse_include_decl): New, not yet implemented.
20426 (read_declarations): Add case tok_include.
20427 * src/getargs.h (include): Add its extern definition.
20428 * src/getargs.c (include): New const char *.
20429 (getargs): Add case '-I'.
20430 * src/options.c (option_table): Add include as command line and
20431 percent option.
20432 * src/lex.h (token_t): Add tok_include.
20433
20434 2001-11-26 Akim Demaille <akim@epita.fr>
20435
20436 * src/reader.c (readgram): Make sure rules for mid-rule actions
20437 have a lineno equal to that of their host rule.
20438 Reported by Hans Aberg.
20439 * tests/regression.at (Rule Line Numbers): New.
20440
20441 2001-11-26 Akim Demaille <akim@epita.fr>
20442
20443 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20444 size_ts.
20445
20446 2001-11-26 Akim Demaille <akim@epita.fr>
20447
20448 * src/complain.c, src/complain.h (error): Remove, provided by
20449 lib/error.[ch].
20450
20451 2001-11-26 Akim Demaille <akim@epita.fr>
20452
20453 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20454 issue an error message.
20455 * tests/regression.at (Invalid %directive): New.
20456 Reported by Hans Aberg.
20457
20458 2001-11-26 Akim Demaille <akim@epita.fr>
20459
20460 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20461 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20462
20463 2001-11-26 Akim Demaille <akim@epita.fr>
20464
20465 * src/conflicts.c (conflicts_print): Don't complain at all when
20466 there are no reduce/reduce conflicts, and as many shift/reduce
20467 conflicts as expected.
20468 * tests/regression.at (%expect right): Adjust.
20469
20470 2001-11-23 Akim Demaille <akim@epita.fr>
20471
20472 * lib/alloca.c: Update, from fileutils.
20473
20474 2001-11-23 Akim Demaille <akim@epita.fr>
20475
20476 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20477
20478 2001-11-23 Akim Demaille <akim@epita.fr>
20479
20480 * src/system.h: Include alloca.h.
20481 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20482
20483 2001-11-23 Akim Demaille <akim@epita.fr>
20484
20485 * src/print_graph.c (print_actions): Remove `rule', unused.
20486 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20487 pacify GCC's signed < unsigned warnings.
20488 * src/closure.c (itemsetsize): Likewise.
20489 * src/reader.c (symbol_list_new): Static.
20490
20491 2001-11-23 Akim Demaille <akim@epita.fr>
20492
20493 Attaching lineno to buckets is stupid, since only one copy of each
20494 symbol is kept, only the line of the first occurrence is kept too.
20495
20496 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20497 * src/reader.c (rline_allocated): Remove, unused.
20498 (symbol_list): Have a `line' member.
20499 (symbol_list_new): New.
20500 (readgram): Use it.
20501 * src/print.c (print_grammar): Output the rule line numbers.
20502 * tests/regression.at (Solved SR Conflicts)
20503 (Unresolved SR Conflicts): Adjust.
20504 Reported by Hans Aberg.
20505
20506 2001-11-22 Marc Autret <autret_m@epita.fr>
20507
20508 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20509
20510 2001-11-22 Marc Autret <autret_m@epita.fr>
20511
20512 * src/muscle_tab.c (muscle_init): Remove initialization of
20513 skeleton muscle.
20514 * src/output.c (output_master_parser): Do it here.
20515
20516 2001-11-20 Akim Demaille <akim@epita.fr>
20517
20518 * po/sv.po: New.
20519 * configure.in (ALL_LINGUAS): Adjust.
20520 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20521 longer contains strings to translate.
20522
20523 2001-11-19 Akim Demaille <akim@epita.fr>
20524
20525 * src/conflicts.c (conflicts_print): Add a missing \n.
20526
20527 2001-11-19 Akim Demaille <akim@epita.fr>
20528
20529 * src/nullable.c (nullable_print): New.
20530 (set_nullable): Call it when tracing.
20531 Better locality of variables.
20532
20533 2001-11-19 Akim Demaille <akim@epita.fr>
20534
20535 * src/print.c (print_actions): Better locality of variables.
20536
20537 2001-11-19 Akim Demaille <akim@epita.fr>
20538
20539 * src/derives.c (print_derives): Fix and enrich.
20540 * src/closure.c (print_fderives): Likewise.
20541
20542 2001-11-19 Akim Demaille <akim@epita.fr>
20543
20544 * src/closure.c (itemsetend): Remove, replaced with...
20545 (itemsetsize): new.
20546
20547 2001-11-19 Akim Demaille <akim@epita.fr>
20548
20549 * src/LR0.c (kernel_end): Remove, replaced with...
20550 (kernel_size): new.
20551
20552 2001-11-19 Akim Demaille <akim@epita.fr>
20553
20554 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20555 to clarify.
20556
20557 2001-11-19 Akim Demaille <akim@epita.fr>
20558
20559 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20560
20561 2001-11-19 Akim Demaille <akim@epita.fr>
20562
20563 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20564 trace messages.
20565 * src/LR0.c: Likewise.
20566 (allocate_itemsets): Use arrays instead of pointers to clarify.
20567
20568 2001-11-19 Akim Demaille <akim@epita.fr>
20569
20570 * src/getargs.c (statistics_flag): Replace with...
20571 (trace_flag): New.
20572 (longopts): Accept --trace instead of --statistics.
20573 * src/getargs.h, src/options.c: Adjust.
20574 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20575 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20576
20577 2001-11-19 Akim Demaille <akim@epita.fr>
20578
20579 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20580 pointers to clarify the code.
20581 (save_reductions, save_shifts): Factor common parts of alternatives.
20582
20583 2001-11-19 Akim Demaille <akim@epita.fr>
20584
20585 * src/LR0.c (new_state, get_state): Complete TRACE code.
20586 * src/closure.c: Include `reader.h' to get `tags', needed by the
20587 trace code.
20588 Rename the conditional DEBUG as TRACE.
20589 Output consistently TRACEs to stderr, not stdout.
20590 * src/derives.c: Likewise.
20591 * src/reduce.c: (inaccessable_symbols): Using if is better style
20592 than goto.
20593 Use `#if TRACE' instead of `#if 0' for tracing code.
20594
20595 2001-11-19 Akim Demaille <akim@epita.fr>
20596
20597 * src/system.h (LIST_FREE, shortcpy): New.
20598 * src/LR0.c: Use them.
20599 * src/output.c (free_itemsets, free_reductions, free_shifts):
20600 Remove, replaced by LIST_FREE.
20601
20602 2001-11-19 Akim Demaille <akim@epita.fr>
20603
20604 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20605 (REDUCTIONS_ALLOC): New.
20606 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20607 allocation.
20608
20609 2001-11-19 Akim Demaille <akim@epita.fr>
20610
20611 * src/LR0.c (new_state): Complete trace code.
20612 * src/nullable.c (set_nullable): Don't translate traces.
20613
20614 2001-11-19 Akim Demaille <akim@epita.fr>
20615
20616 * src/print_graph.c (print_core): Better locality of variables.
20617 * src/print.c (print_core): Likewise.
20618
20619 2001-11-19 Akim Demaille <akim@epita.fr>
20620
20621 * src/vcg.c: You do the output, so you are responsible of the
20622 handling of VCG syntax, in particular: use quotearg.
20623 * src/print_graph.c: Don't.
20624 (print_actions): Don't output the actions as part of the nodes,
20625 since that's the job of the edges.
20626 (print_state): Don't output by hand: fill the node description,
20627 and ask for its output.
20628
20629 2001-11-19 Akim Demaille <akim@epita.fr>
20630
20631 * src/bison.simple (yyparse): When verbosely reporting an error,
20632 no longer put additional quotes around token names.
20633 * tests/calc.at: Adjust.
20634
20635 2001-11-19 Akim Demaille <akim@epita.fr>
20636
20637 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20638 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20639 * src/output.c: Adjust.
20640
20641 2001-11-19 Akim Demaille <akim@epita.fr>
20642
20643 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20644 (rule_t): this.
20645 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20646
20647 2001-11-19 Akim Demaille <akim@epita.fr>
20648
20649 * src/gram.h (rule_t): New.
20650 (rule_table): New.
20651 (rrhs, rlhs): Remove, part of state_t.
20652 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20653 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20654 * src/reader.c, src/reduce.c: Adjust.
20655
20656 2001-11-19 Akim Demaille <akim@epita.fr>
20657
20658 * src/reader.c (symbols_output): New, extracted from...
20659 (packsymbols): Here.
20660 (reader): Call it.
20661
20662 2001-11-19 Akim Demaille <akim@epita.fr>
20663
20664 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20665 (maxrhs): this new function.
20666
20667 2001-11-19 Akim Demaille <akim@epita.fr>
20668
20669 * src/lalr.c (F): New macro to access the variable F.
20670 Adjust.
20671
20672 2001-11-19 Akim Demaille <akim@epita.fr>
20673
20674 * src/lalr.h (LA): New macro to access the variable LA.
20675 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20676 * src/lalr.c: Adjust.
20677
20678 2001-11-19 Akim Demaille <akim@epita.fr>
20679
20680 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20681 (set_state_table): handle the `lookaheads' members.
20682
20683 2001-11-19 Akim Demaille <akim@epita.fr>
20684
20685 * src/lalr.h (lookaheads): Removed array, whose contents is now
20686 a member of...
20687 (state_t): this structure.
20688 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20689 Adjust.
20690
20691 2001-11-19 Akim Demaille <akim@epita.fr>
20692
20693 * src/lalr.h (consistent): Removed array, whose contents is now
20694 a member of...
20695 (state_t): this structure.
20696 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20697 Adjust.
20698
20699 2001-11-19 Akim Demaille <akim@epita.fr>
20700
20701 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20702 contents are now members of...
20703 (state_t): this structure.
20704 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20705 Adjust.
20706
20707 2001-11-19 Akim Demaille <akim@epita.fr>
20708
20709 * src/lalr.h (state_t): New.
20710 (state_table): Be a state_t * instead of a core **.
20711 (accessing_symbol): Remove, part of state_t.
20712 * src/lalr.c: Adjust.
20713 (set_accessing_symbol): Merge into...
20714 (set_state_table): this.
20715 * src/print_graph.c, src/conflicts.c: Adjust.
20716
20717 2001-11-14 Akim Demaille <akim@epita.fr>
20718
20719 * tests/calc.at, tests/output.at, tests/regression.at,
20720 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20721 now the tests are run in private dirs, therefore AC_CLEANUP and
20722 family can be simplified to 0-ary.
20723 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20724 use abs. path to find config.h.
20725 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20726 stderr, there can be way too much random noise.
20727 Instead pass -Werror to GCC and rely on the exit status.
20728 Reported by Wolfram Wagner.
20729
20730 2001-11-14 Akim Demaille <akim@epita.fr>
20731
20732 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20733 defined only if yyoverflow is defined, to avoid `warning: unused
20734 variable `yyvs1''.
20735 Reported by The Test Suite.
20736
20737 2001-11-14 Akim Demaille <akim@epita.fr>
20738
20739 * src/print.c: Include reduce.h.
20740 Reported by Hans Aberg.
20741
20742 2001-11-14 Akim Demaille <akim@epita.fr>
20743
20744 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20745 Revert a previous patch: these are really const.
20746 * src/conflicts.c (conflict_report): Additional useless pair of
20747 braces to pacify GCC's warnings for `if () if () {} else {}'.
20748 * src/lex.c (parse_percent_token): Replace equal_offset with
20749 arg_offset.
20750 arg is const.
20751 Be sure to strdup `arg' when used, since there is no reason for
20752 token_buffer not to change.
20753
20754 2001-11-14 Akim Demaille <akim@epita.fr>
20755
20756 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20757 definition.
20758 * src/main.c (main): Use them.
20759 Suggested by Hans Aberg.
20760
20761 2001-11-12 Akim Demaille <akim@epita.fr>
20762
20763 * src/system.h (ngettext): Now that we use ngettext, be sure to
20764 provide a default definition when NLS are not used.
20765
20766 2001-11-12 Akim Demaille <akim@epita.fr>
20767
20768 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20769 Use @kbd to denote user input.
20770 (Language and Grammar): ANSIfy the example.
20771 Adjust its layout for info/notinfo.
20772 (Location Tracking Calc): Output error messages to stderr.
20773 Output locations in a more GNUtically correct way.
20774 Fix a couple of Englishos.
20775 Adjust @group/@end group pairs.
20776
20777 2001-11-12 Akim Demaille <akim@epita.fr>
20778
20779 %expect was not functioning at all.
20780
20781 * src/conflicts.c (expected_conflicts): Set to -1.
20782 (conflict_report): Use ngettext.
20783 (conflicts_print): Check %expect and make its violation an error.
20784 * doc/bison.texinfo (Expect Decl): Adjust.
20785 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20786 * tests/regression.at (%expect not enough, %expect right)
20787 (%expect too much): New.
20788
20789 2001-11-12 Akim Demaille <akim@epita.fr>
20790
20791 * tests/regression.at (Conflicts): Rename as...
20792 (Unresolved SR Conflicts): this.
20793 (Solved SR Conflicts): New.
20794
20795 2001-11-12 Akim Demaille <akim@epita.fr>
20796
20797 * src/reduce.c (print_results): Rename as...
20798 (reduce_output): This.
20799 Output to OUT, passed as argument, instead of output_obstack.
20800 (dump_grammar): Likewise.
20801 (reduce_free): New.
20802 Also free V1.
20803 (reduce_grammar): No longer call reduce_output, since...
20804 * src/print.c (print_results): do it.
20805 * src/main.c (main): Call reduce_free;
20806
20807 2001-11-12 Akim Demaille <akim@epita.fr>
20808
20809 * src/conflicts.c (print_reductions): Accept OUT as argument.
20810 Output to it, not to output_obstack.
20811 * src/print.c (print_actions): Adjust.
20812
20813 2001-11-12 Akim Demaille <akim@epita.fr>
20814
20815 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20816 the result instead of using...
20817 (src_total, rrc_total, src_count, rrc_count): Remove.
20818 (any_conflicts): Remove.
20819 (print_conflicts): Split into...
20820 (conflicts_print, conflicts_output): New.
20821 * src/conflicts.h: Adjust.
20822 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20823 * src/print.c (print_grammar): Issue `\n' between two rules.
20824 * tests/regression.at (Conflicts): New.
20825 Reported by Tom Lane.
20826
20827 2001-11-12 Akim Demaille <akim@epita.fr>
20828
20829 * tests/regression.at (Invalid input): Remove, duplicate with
20830 ``Invalid input: 1''.
20831
20832 2001-11-12 Akim Demaille <akim@epita.fr>
20833
20834 * tests/torture.at (AT_DATA_STACK_TORTURE)
20835 (Exploding the Stack Size with Alloca)
20836 (Exploding the Stack Size with Malloc): New.
20837
20838 2001-11-12 Akim Demaille <akim@epita.fr>
20839
20840 * src/bison.simple (YYSTACK_REALLOC): New.
20841 (yyparse) [!yyoverflow]: Use it and free the old stack.
20842 Reported by Per Allansson.
20843
20844 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20845
20846 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20847 define CPP macro, which substitute YYSTYPE by yystype.
20848 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20849 with yyltype/YYLTYPE. This allows inclusion of the generated
20850 header within the parser if the compiler, such as GGC, accepts
20851 multiple equivalent #defines.
20852 From Akim.
20853
20854 2001-11-05 Akim Demaille <akim@epita.fr>
20855
20856 * src/reader.c (symbols_output): New, extracted from...
20857 (packsymbols): here.
20858 (reader): Adjust.
20859
20860 2001-11-05 Akim Demaille <akim@epita.fr>
20861
20862 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20863
20864 2001-11-05 Akim Demaille <akim@epita.fr>
20865
20866 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20867 pattern.
20868
20869 2001-11-05 Akim Demaille <akim@epita.fr>
20870
20871 * src/options.h (struct option_table_struct): set_flags is void*.
20872 * src/options.c (longopts): Support `--output' and `%output'.
20873 (usage): Adjust.
20874 * src/lex.h (tok_setopt): Remove, replaced with...
20875 (tok_intopt, tok_stropt): these new guys.
20876 * src/lex.c (getopt.h): Not needed.
20877 (token_buffer, unlexed_token_buffer): Not const.
20878 (percent_table): Promote `-' over `_' in directive names.
20879 Active `%name-prefix', `file-prefix', and `output'.
20880 (parse_percent_token): Accept possible arguments to directives.
20881 Promote `-' over `_' in directive names.
20882
20883 2001-11-04 Akim Demaille <akim@epita.fr>
20884
20885 * doc/bison.texinfo (Decl Summary): Split the list into
20886 `directives for grammars' and `directives for bison'.
20887 Sort'em.
20888 Add description of `%name-prefix', `file-prefix', and `output'.
20889 Promote `-' over `_' in directive names.
20890 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20891 Simplify the description of `--name-prefix'.
20892 Promote `-' over `_' in directive names.
20893 Promote `--output' over `--output-file'.
20894 Fix the description of `--defines'.
20895 * tests/output.at: Exercise %file-prefix and %output.
20896
20897 2001-11-02 Akim Demaille <akim@epita.fr>
20898
20899 * doc/refcard.tex: Update.
20900
20901 2001-11-02 Akim Demaille <akim@epita.fr>
20902
20903 * src/symtab.h (SUNDEF): New.
20904 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20905 stand for `uninitialized', instead of 0.
20906 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20907 * src/lex.c (lex): Adjust.
20908
20909 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20910 Number it 0.
20911 Let yylex return it instead of a plain 0.
20912 Reported by Dick Streefland.
20913
20914 2001-11-02 Akim Demaille <akim@epita.fr>
20915
20916 * tests/regression.at (Mixing %token styles): New test.
20917
20918 2001-11-02 Akim Demaille <akim@epita.fr>
20919
20920 * src/reader.c (parse_thong_decl): Formatting changes.
20921 (token_translations_init): New, extracted from...
20922 (packsymbols): Here.
20923 Adjust.
20924
20925 2001-11-01 Akim Demaille <akim@epita.fr>
20926
20927 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20928 Check that `9foo.y' produces correct cpp guards.
20929 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20930 guards.
20931 Reported by Wwp.
20932
20933 2001-11-01 Akim Demaille <akim@epita.fr>
20934
20935 * tests/regression.at (Invalid input: 2): New.
20936 * src/lex.c (unlexed_token_buffer): New.
20937 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20938 too.
20939 Reported by Wwp.
20940
20941 2001-11-01 Akim Demaille <akim@epita.fr>
20942
20943 * tests/calc.at: Catch up with 1.30.
20944 * configure.in: Bump to 1.49a.
20945 Adjust to newer Autotest.
20946
20947 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
20948
20949 * src/conflicts.c: Move global variables rrc_total and src_total ...
20950 (print_conflicts): here.
20951 * src/output.c (output): Free global variable user_toknums.
20952 * src/lex.c (token_obstack): Become static.
20953
20954 2001-10-18 Akim Demaille <akim@epita.fr>
20955
20956 * tests/atlocal.in (GCC): Add.
20957 * tests/calc.at: s/m4_match/m4_bmatch/.
20958 s/m4_patsubst/m4_bpatsubst/.
20959 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20960 * configure.in: AC_SUBST(GCC).
20961
20962 2001-10-14 Marc Autret <autret_m@epita.fr>
20963
20964 * src/options.c (create_long_option_table): Fix.
20965
20966 2001-10-10 Akim Demaille <akim@epita.fr>
20967
20968 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20969
20970 2001-10-04 Akim Demaille <akim@epita.fr>
20971
20972 * src/reader.c (parse_union_decl): Push the caracters in
20973 union_obstack, not attrs_obstack.
20974
20975 2001-10-04 Akim Demaille <akim@epita.fr>
20976
20977 Merge in the branch 1.29.
20978
20979 * src/reader.c (packsymbols): Use a temporary obstack for
20980 `%%tokendef', since output_stack is already used elsewhere.
20981
20982 2001-10-02 Akim Demaille <akim@epita.fr>
20983
20984 Bump 1.29d.
20985
20986 2001-10-02 Akim Demaille <akim@epita.fr>
20987
20988 Version 1.29c.
20989
20990 2001-10-02 Akim Demaille <akim@epita.fr>
20991
20992 * tests/regression.at (Invalid CPP headers): New.
20993 From Alexander Belopolsky.
20994 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20995
20996 2001-10-02 Akim Demaille <akim@epita.fr>
20997
20998 * tests/regression.at (Invalid input): New.
20999 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
21000 Reported by Shura.
21001
21002 2001-10-02 Akim Demaille <akim@epita.fr>
21003
21004 * tests/calc.at: Now that --debug works, the tests must be adjusted.
21005
21006 2001-10-02 Akim Demaille <akim@epita.fr>
21007
21008 * src/output.c (output_parser): Assert `skeleton'.
21009 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
21010 systems.
21011 From Shura.
21012
21013 2001-10-01 Marc Autret <autret_m@epita.fr>
21014
21015 * src/lex.h: Echo modifications.
21016 * src/lex.c (unlex): Parameter is now token_t.
21017 From Hans Aberg.
21018
21019 2001-10-01 Marc Autret <autret_m@epita.fr>
21020
21021 * src/main.c: Include lex.h.
21022 From Hans Aberg.
21023
21024 2001-09-29 Akim Demaille <akim@epita.fr>
21025
21026 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
21027
21028 2001-09-28 Akim Demaille <akim@epita.fr>
21029
21030 * tests/testsuite.at: Update to newer Autotest.
21031 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
21032
21033 2001-09-27 Akim Demaille <akim@epita.fr>
21034
21035 Position independent wrapper.
21036
21037 * tests/bison: Remove.
21038 * tests/bison.in: New.
21039 * configure.in: Adjust.
21040
21041 2001-09-27 Paul Eggert <eggert@twinsun.com>
21042
21043 Port quotearg fixes from tar 1.13.24.
21044
21045 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
21046 tm to be declared.
21047 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21048 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21049
21050 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
21051 * m4/mbrtowc.m4: New file.
21052 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
21053 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
21054
21055 2001-09-27 Akim Demaille <akim@epita.fr>
21056
21057 Bump to 1.29c.
21058
21059 2001-09-27 Akim Demaille <akim@epita.fr>
21060
21061 Version 1.29b.
21062
21063 2001-09-25 Akim Demaille <akim@epita.fr>
21064
21065 * src/system.h: Include `xalloc.h'.
21066 Remove it from the C files.
21067 * src/files.c (output_files): Free the obstacks.
21068 * src/lex.c (init_lex): Rename as...
21069 (lex_init): this.
21070 (lex_free): New.
21071 * src/main.c (main): Use it.
21072
21073 2001-09-24 Marc Autret <autret_m@epita.fr>
21074
21075 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
21076 to output informations in fout (FILE*).
21077 (open_graph, close_graph): Likewise.
21078 (output_graph, output_edge, output_node): Likewise.
21079 * src/vcg.h: Update function prototypes.
21080 * src/print_graph.c (print_graph): Open output graph file.
21081 (print_actions): Adjust.
21082 * src/files.h: Remove extern declaration.
21083 * src/files.c: Remove graph_obstack declaration.
21084 (open_files): Remove graph_obstack initialization.
21085 (output_files): Remove graph_obstack saving.
21086
21087 2001-09-24 Marc Autret <autret_m@epita.fr>
21088
21089 * src/files.c (compute_output_file_names): Fix.
21090
21091 2001-09-24 Marc Autret <autret_m@epita.fr>,
21092 Akim Demaille <akim@epita.fr>
21093
21094 * src/reader.c (reader): Remove call to free_symtab ().
21095 * src/main.c (main): Call it here.
21096 Include symtab.h.
21097 * src/conflicts.c (initialize_conflicts): Rename as...
21098 (solve_conflicts): this.
21099 * src/print.c (print_core, print_actions, print_state)
21100 (print_grammar): Dump to a file instead a `output_obstack'.
21101 (print_results): Dump `output_obstack', and then proceed with the
21102 FILE *.
21103 * src/files.c (compute_output_file_names, close_files): New.
21104 (output_files): Adjust.
21105 * src/main.c (main): Adjust.
21106
21107 2001-09-23 Marc Autret <autret_m@epita.fr>
21108
21109 * src/files.c (compute_header_macro): Computes header macro name
21110 from spec_defines_file when given.
21111
21112 2001-09-23 Marc Autret <autret_m@epita.fr>
21113
21114 * src/files.c (output_files): Add default extensions.
21115
21116 2001-09-22 Akim Demaille <akim@epita.fr>
21117
21118 * src/conflicts.c (finalize_conflicts): Rename as...
21119 (free_conflicts): this.
21120
21121 2001-09-22 Akim Demaille <akim@epita.fr>
21122
21123 * src/gram.c (gram_free): Rename back as...
21124 (dummy): this.
21125 (output_token_translations): Free `token_translations'.
21126 * src/symtab.c (free_symtab): Free the tag field.
21127
21128 2001-09-22 Akim Demaille <akim@epita.fr>
21129
21130 Remove `translations' as it is always set to true.
21131
21132 * src/gram.h: Adjust.
21133 * src/reader.c (packsymbols, parse_token_decl): Adjust
21134 * src/print.c (print_grammar): Adjust.
21135 * src/output.c (output_token_translations): Adjust.
21136 * src/lex.c (lex): Adjust.
21137 * src/gram.c: Be sure the set pointers to NULL.
21138 (dummy): Rename as...
21139 (gram_free): this.
21140
21141 2001-09-22 Akim Demaille <akim@epita.fr>
21142
21143 * configure.in: Invoke AM_LIB_DMALLOC.
21144 * src/system.h: Use dmalloc.
21145 * src/LR0.c: Be sure to have pointers initialized to NULL.
21146 (allocate_itemsets): Allocate kernel_items only if needed.
21147
21148 2001-09-22 Akim Demaille <akim@epita.fr>
21149
21150 * configure.in: Bump to 1.29b.
21151 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21152 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21153 need xmalloc.c in calc.y.
21154 From Pascal Bart.
21155
21156 2001-09-21 Akim Demaille <akim@epita.fr>
21157
21158 Version 1.29a.
21159 * Makefile.maint, config/config.guess, config/config.sub,
21160 * config/missing: Update from masters.
21161 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21162 upon package.m4.
21163 * configure.in (ALL_LINGUAS): Add `tr'.
21164
21165 2001-09-21 Akim Demaille <akim@epita.fr>
21166
21167 * tests/Makefile.am (package.m4): Move to...
21168 ($(srcdir)/$(TESTSUITE)): here.
21169
21170 2001-09-20 Akim Demaille <akim@epita.fr>
21171
21172 * src/complain.c: No longer try to be standalone: use system.h.
21173 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21174 * src/complain.h: Likewise.
21175 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21176 Remove the unused variable `n'.
21177 From Albert Chin-A-Young.
21178
21179 2001-09-18 Marc Autret <autret_m@epita.fr>
21180
21181 * doc/bison.1: Update.
21182 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21183 descriptions.
21184 (Option Cross Key): Update.
21185 Add --graph.
21186
21187 2001-09-18 Marc Autret <autret_m@epita.fr>
21188
21189 * tests/regression.at: New test (comment in %union).
21190
21191 2001-09-18 Marc Autret <autret_m@epita.fr>
21192
21193 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21194 do that.
21195 Reported by Keith Browne.
21196
21197 2001-09-18 Marc Autret <autret_m@epita.fr>
21198
21199 * tests/output.at: Add tests for --defines and --graph.
21200
21201 2001-09-18 Marc Autret <autret_m@epita.fr>
21202
21203 * tests/output.at: Removes tests of %{header,src}_extension features.
21204
21205 2001-09-18 Akim Demaille <akim@epita.fr>
21206
21207 * tests/Makefile.am (package.m4): New.
21208 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21209 (_AT_CHECK_CALC_ERROR): Likewise.
21210 Factor the `, ' part of verbose error messages.
21211
21212 2001-09-18 Marc Autret <autret_m@epita.fr>
21213
21214 * src/getargs.c (longopts): Declare --defines and --graph as options
21215 with optional arguments.
21216 * src/files.h: Add extern declarations.
21217 * src/files.c (spec_graph_file, spec_defines_file): New.
21218 (output_files): Update.
21219 Remove CPP-outed code.
21220
21221 2001-09-18 Marc Autret <autret_m@epita.fr>
21222
21223 Turn off %{source,header}_extension feature.
21224
21225 * src/files.c (compute_exts_from_gf): Update.
21226 (compute_exts_from_src): Update.
21227 (output_files): CPP-out useless code.
21228 * src/files.h: Remove {header,source}_extension extern declarations.
21229 * src/reader.c (parse_dquoted_param): CPP-out.
21230 (parse_header_extension_decl): Remove.
21231 (parse_source_extension_decl): Remove.
21232 (read_declarations): Remove cases tok_{hdrext,srcext}.
21233 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21234 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21235
21236 2001-09-10 Akim Demaille <akim@epita.fr>
21237
21238 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21239 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21240 (AT_CHECK_OUTPUT): this.
21241 Merely check ls' exit status, its output is useless.
21242
21243 2001-09-10 Akim Demaille <akim@epita.fr>
21244
21245 * tests/calc.at: Use m4_match.
21246 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21247
21248 2001-09-10 Marc Autret <autret_m@epita.fr>,
21249 Akim Demaille <akim@epita.fr>
21250
21251 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21252 enum color_e.
21253 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21254 to `normal'.
21255 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21256 * src/lex.h: Adjust prototype.
21257 (token_t): Add `tok_undef'.
21258 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21259 (parse_percent_token): Now returns token_t.
21260 Add default statement in switch.
21261 (lex): Separate `c' as an input variable, from the token_t result
21262 part.
21263 (unlexed): Is a token_t.
21264
21265 2001-09-10 Akim Demaille <akim@epita.fr>
21266
21267 * configure.in: Bump to 1.29a.
21268
21269 2001-09-07 Akim Demaille <akim@epita.fr>
21270
21271 Version 1.29.
21272
21273 2001-08-30 Akim Demaille <akim@epita.fr>
21274
21275 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21276 * m4/atconfig.m4: Remove.
21277 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21278 * tests/bison: New.
21279 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21280 m4_if, m4_patsubst, and m4_regexp.
21281 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21282 `input' file instead of echo.
21283
21284 2001-08-29 Akim Demaille <akim@epita.fr>
21285
21286 Bump to 1.28e.
21287
21288 2001-08-29 Akim Demaille <akim@epita.fr>
21289
21290 Version 1.28d.
21291
21292 2001-08-29 Paul Eggert <eggert@twinsun.com>
21293
21294 * src/bison.simple (yyparse): Don't take the address of an
21295 item before the start of an array, as that doesn't conform to
21296 the C Standard.
21297
21298 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21299
21300 * doc/bison.texinfo (Location Tracking Calc): New node.
21301
21302 2001-08-29 Paul Eggert <eggert@twinsun.com>
21303
21304 * src/output.c (output): Do not define const, as this now
21305 causes more problems than it cures.
21306
21307 2001-08-29 Akim Demaille <akim@epita.fr>
21308
21309 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21310 the nodes.
21311 Be sure to tag the `detailmenu'.
21312
21313 2001-08-29 Akim Demaille <akim@epita.fr>
21314
21315 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21316 download in a tmp dir.
21317
21318 2001-08-28 Marc Autret <autret_m@epita.fr>
21319
21320 * config/depcomp: New file.
21321
21322 2001-08-28 Marc Autret <autret_m@epita.fr>
21323
21324 * doc/bison.1 (mandoc): Adjust.
21325 From Juan Manuel Guerrero.
21326
21327 2001-08-28 Marc Autret <autret_m@epita.fr>
21328
21329 * src/print_graph.c (print_state): Fix.
21330
21331 2001-08-27 Marc Autret <autret_m@epita.fr>
21332
21333 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21334 char * members.
21335 Echo modifications to the functions prototypes.
21336 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21337
21338 2001-08-27 Marc Autret <autret_m@epita.fr>
21339
21340 * src/vcg.c: Include `xalloc.h'.
21341 (add_colorentry): New.
21342 (add_classname): New.
21343 (add_infoname): New.
21344 * src/vcg.h: Add new prototypes.
21345
21346 2001-08-27 Akim Demaille <akim@epita.fr>
21347
21348 * Makefile.maint: Sync. again with CVS Autoconf.
21349
21350 2001-08-27 Akim Demaille <akim@epita.fr>
21351
21352 * Makefile.maint: Formatting changes.
21353 (po-update, cvs-update, update): New targets.
21354 (AMTAR): Remove.
21355
21356 2001-08-27 Akim Demaille <akim@epita.fr>
21357
21358 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21359 * Makefile.maint: Sync. with CVS Autoconf.
21360
21361 2001-08-27 Marc Autret <autret_m@epita.fr>
21362
21363 * src/vcg.h (struct infoname_s): New.
21364 (struct colorentry_s): New.
21365 (graph_s): New fields {vertical,horizontal}_order in structure.
21366 Add `infoname' field.
21367 Add `colorentry' field;
21368 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21369 (G_HORIZONTAL_ORDER): New.
21370 (G_INFONAME): New.
21371 (G_COLORENTRY): New.
21372 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21373 Add output of `infoname'.
21374 Add output of `colorentry'.
21375
21376 2001-08-27 Marc Autret <autret_m@epita.fr>
21377
21378 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21379 This one shadowed a global parameter.
21380
21381 2001-08-24 Marc Autret <autret_m@epita.fr>
21382
21383 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21384 instead of `unsigned'.
21385 (print_state): Do not call obstack_object_size () in obstack_grow ()
21386 to avoid macro variables shadowing.
21387
21388 2001-08-23 Marc Autret <autret_m@epita.fr>
21389
21390 * src/lex.c (percent_table): Typo: s/naem/name/.
21391 Add graph option.
21392 Normalize new options declarations.
21393
21394 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21395
21396 * tests/suite.at: Exercise %header_extension and %source_extension.
21397
21398 2001-08-16 Marc Autret <autret_m@epita.fr>
21399
21400 * src/reader.c (parse_dquoted_param): New.
21401 (parse_header_extension_decl): Use it.
21402 (parse_source_extension_decl): Likewise.
21403
21404 2001-08-16 Marc Autret <autret_m@epita.fr>
21405
21406 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21407 (get_xxxx_str): Use assert () instead of complain ().
21408 Remove return invokations in default cases.
21409 (get_decision_str): Modify default behaviour. Remove second argument.
21410 Echo modifications on calls.
21411 (output_graph): Fix.
21412
21413 2001-08-16 Marc Autret <autret_m@epita.fr>
21414
21415 * src/getargs.c (usage): Update with ``-g, --graph''.
21416
21417 2001-08-16 Marc Autret <autret_m@epita.fr>
21418
21419 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21420 (Option Cross Key): Likewise.
21421 * doc/bison.1: Update.
21422
21423 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
21424
21425 * src/output.c (output_master_parser): Don't finish action_obstack.
21426 (output_parser): Don't care about the muscle action, here.
21427 (prepare): Copy the action_obstack in the action muscle.
21428 (output): Free action_obstack.
21429
21430 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21431
21432 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21433 will contain `%union' declaration.
21434 (parse_union_decl): Delete #line directive output.
21435 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21436 informations about %union.
21437 (parse_union_decl): Copy the union_obstack in the muscle stype.
21438 * src/bison.simple: Add new #line directive.
21439 Add typdef %%stype YYSTYPE.
21440
21441 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21442
21443 * src/bison.simple: Add new `#line' directive.
21444
21445 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
21446
21447 * src/bison.simple: New `#line' directive.
21448 * src/output.c (output_parser): Support new dynamic muscle input_line.
21449
21450 2001-09-22 Marc Autret <autret_m@epita.fr>
21451
21452 * src/output.c (output_master_parser): New.
21453 (output_parser): Be more re-entrant.
21454
21455 2001-09-21 Marc Autret <autret_m@epita.fr>
21456
21457 * src/reader.c (copy_definition, parse_union_decl): Update and use
21458 `linef' muscle.
21459 (copy_action): Likewise.
21460 Use obstack_1grow ().
21461 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21462
21463 2001-09-21 Marc Autret <autret_m@epita.fr>
21464
21465 * src/options.c (option_table): Adjust.
21466 * src/lex.c (parse_percent_token): Fix.
21467
21468 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21469
21470 * src/options.c (symtab.h): Include it, need by lex.h.
21471
21472 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21473
21474 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21475 is now an option_table_struct*.
21476 (option_strcmp): New function option_strcmp.
21477 (parse_percent_token): Call option_strcmp.
21478 * src/getargs.c (xalloc.h, options.h): Include it.
21479 (getargs): Call create_long_option_table.
21480 (getargs): Free longopts at the end of the function.
21481 (shortopts): Move in options.c.
21482 * src/options.c (create_long_option_table): New function. Convert
21483 information from option_table to option structure.
21484 * src/reader.c (options.h): Include it.
21485
21486 * src/Makefile.am: Adjust.
21487 * src/options.c (option_table): Create from longopts and percent_table.
21488 * src/getargs.c (longopts): Delete.
21489 * src/lex.c (struct percent_table_struct): Delete.
21490 (percent_table): Delete.
21491 (options.h): Include it.
21492 * src/options.c: Create.
21493 * src/options.h: Create.
21494 Declare enum opt_access_e.
21495 Define struct option_table_struct.
21496
21497 2001-09-20 Marc Autret <autret_m@epita.fr>
21498
21499 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21500 sections of Bison.
21501
21502 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
21503
21504 * src/bison.simple: s/%%filename/%%skeleton.
21505 * src/muscle_tab.c (getargs.h): Include it.
21506 (muscle_init): Insert new muscle skeleton.
21507
21508 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
21509
21510 * src/output.c (output_parser): Delete unused variable actions_dumped.
21511
21512 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
21513
21514 * src/output.c (output): Delete call to reader_output_yylsp.
21515 * src/reader.c (reader): Likewise.
21516 * src/reader.h: Delete declaration of reader_output_yylsp.
21517
21518 2001-09-02 Marc Autret <autret_m@epita.fr>
21519
21520 * src/reader.c: Include muscle_tab.h.
21521 (parse_union_decl): Update.
21522 (parse_macro_decl): Rename parse_muscle_decl.
21523 Update to use renamed functions and variable.
21524 (read_declarations, copy_action, read_additionnal_code, : Updated
21525 with correct variables and functions names.
21526 (packsymbols, reader): Likewise.
21527
21528 * src/reader.h (muscle_obstack): Extern declaration update.
21529
21530 * src/output.c: Include muscle_tab.h
21531 In all functions using macro_insert, change by using muscle_insert ().
21532 (macro_obstack): Rename muscle_obstack.
21533 Echo modifications in the whole file.
21534 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21535 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21536 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21537
21538 * src/muscle_tab.h: Update double inclusion macros.
21539 (macro_entry_s): Rename muscle_entry_s.
21540 Update prototypes.
21541
21542 * src/muscle_tab.c: Include muscle_tab.h.
21543 Rename macro_tabble to muscle_table.
21544 (mhash1, mhash2, mcmp): Use muscle_entry.
21545 (macro_init): Rename muscle_init. Update.
21546 (macro_insert): Rename muscle_insert. Update.
21547 (macro_find): Rename muscle_find. Update.
21548
21549 * src/main.c: Include muscle_tab.h.
21550 (main): Call muscle_init ().
21551 * src/Makefile.am (bison_SOURCES): Echo modifications.
21552
21553 2001-09-02 Marc Autret <autret_m@epita.fr>
21554
21555 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21556
21557 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21558
21559 2001-09-02 Marc Autret <autret_m@epita.fr>
21560
21561 * src/macrotab.c, src/macrotab.h: Remove.
21562
21563 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
21564
21565 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21566 filename.
21567
21568 2001-09-01 Marc Autret <autret_m@epita.fr>
21569
21570 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21571 to an explicit value to activate the feature. We do it here.
21572
21573 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21574
21575 * src/output.c (prepare): Delete the `filename' muscule insertion.
21576 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21577 (parse_union_decl): Likewise.
21578 * src/macrotab.c (macro_init): Initialize filename by infile.
21579
21580 2001-08-31 Marc Autret <autret_m@epita.fr>
21581
21582 * src/bison.simple (YYLSP_NEEDED): New definition.
21583 * src/output.c (prepare): Add macro insertion of `locations_flag'
21584
21585 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21586
21587 * src/output.c (prepare): Delete insertion of previous muscles,
21588 and insert the `prefix' muscles.
21589 * src/macrotab.c (macro_init): Likewise.
21590 (macro_init): Initialization prefix directive by `yy'.
21591 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21592 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21593 yylval, yydebug, yyerror, yynerrs and yyparse.
21594 New directive `#define' to substitute yydebug, ... with option
21595 name_prefix.
21596
21597 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21598
21599 * src/main.c (main): Standardize.
21600 * src/output.c (output_table_data, output_parser): Likewise.
21601 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21602
21603 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21604
21605 * src/reader.c (read_additionnal_code): Rename %%user_code to
21606 %%epilogue.
21607 * src/output.c (output): Rename %%declarations to %%prologue.
21608 * src/bison.simple: Echo modifications.
21609
21610 2001-08-31 Marc Autret <autret_m@epita.fr>
21611
21612 * src/reader.c (readgram): CleanUp.
21613 (output_token_defines): Likewise.
21614 (packsymbols): Likewise.
21615 (reader): Likewise.
21616 * src/output.c (output): CPP-out useless code.
21617
21618 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21619
21620 * src/reader.c (reader): Delete obsolete call to function
21621 output_trailers and output_headers.
21622 * src/output.h: Remove obsolete functions prototypes of output_headers
21623 and output_trailers.
21624
21625 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
21626
21627 * src/main.c: Include macrotab.h.
21628 * src/macrotab.h (macro_entry_s): Constify fields.
21629 Adjust functions prototypes.
21630 * src/macrotab.c (macro_insert): Constify key and value.
21631 (macro_find): Constify key.
21632 (macro_insert): Include 'xalloc.h'
21633 (macro_insert): Use XMALLOC.
21634 (macro_find): Constify return value.
21635 * src/output.c (output_table_data): Rename table to table_data.
21636 (output_parser): Constify macro_key, macro_value.
21637
21638 2001-08-30 Marc Autret <autret_m@epita.fr>
21639
21640 * src/reader.c (parse_skel_decl): New.
21641 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21642 * src/lex.h (token_t): New token `tok_skel'.
21643 * src/lex.c (percent_table): Add skeleton option entry.
21644 Standardize.
21645
21646 2001-08-29 Marc Autret <autret_m@epita.fr>
21647
21648 * src/bison.simple: Add %%user_code directive at the end.
21649 * src/reader.c (read_additionnal_code): New.
21650 (reader): Use it.
21651 * src/output.c (output_program): Remove.
21652 (output): Update.
21653
21654 2001-08-28 Marc Autret <autret_m@epita.fr>
21655
21656 * src/output.c (output_actions): Clean up.
21657 (output_gram): CPP-out useless code.
21658 * src/reader.c (reader): Clean up, CPP-out useless code.
21659
21660 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
21661
21662 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21663 directive.
21664 * src/bison.simple: Add `%%definitions'.
21665
21666 2001-08-28 Marc Autret <autret_m@epita.fr>
21667
21668 * config/depcomp: New file.
21669
21670 2001-08-27 Paul Eggert <eggert@twinsun.com>
21671
21672 * src/bison.simple (yyparse): Don't take the address of an
21673 item before the start of an array, as that doesn't conform to
21674 the C Standard.
21675
21676 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21677
21678 * src/output.c (output): Remove the initialization of the macro
21679 obstack. It was done too late here.
21680
21681 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21682 completely wrong.
21683 (reader): Initialize the macro obstack here, since we need it to grow
21684 '%define' directives.
21685
21686 * src/reader.h: Declare the macro obstack as extern.
21687
21688 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21689
21690 * src/output.c (output_parser): Fix. Store single '%' characters in
21691 the output obstack instead of throwing them away.
21692
21693 2001-08-27 Akim Demaille <akim@epita.fr>
21694
21695 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21696
21697 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21698
21699 * lib/Makefile.am: Adjust.
21700
21701 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21702
21703 * src/bison.simple: Update and add '%%' directives.
21704
21705 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21706
21707 * src/reader.c (reader): Remove calls to 'output_headers' and
21708 'output_trailers'. Remove some C output.
21709 (readgram): Disable a piece of code that was writing a default
21710 definition for 'YYSTYPE'.
21711 (reader_output_yylsp): Remove.
21712 (packsymbols): Output token defintions to a macro.
21713 (copy_definition): Disable C output.
21714
21715 * src/reader.c (parse_macro_decl): New function used to parse macro
21716 declarations.
21717 (copy_string2): Put the body of copy_string into this new function.
21718 Add a parameter to let the caller choose whether he wants to copy the
21719 string delimiters or not.
21720 (copy_string): Be a simple call to copy_string2 with the last argument
21721 bound to true.
21722 (read_declarations): Add case for macro definition.
21723 (copy_identifier): New.
21724 (parse_macro_decl): Read macro identifiers using copy_identifier
21725 rather than lex.
21726
21727 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21728
21729 * src/output.c (prepare): Add prefixed names.
21730 (output_parser): Output semantic actions.
21731 (output_parser): Fix bug on '%%line' directives.
21732
21733 * src/output.c (output_headers): Remove. The C code printed by this
21734 function should now be in the skeletons.
21735 (output_trailers): Remove.
21736 (output): Disable call to 'reader_output_yylsp'.
21737 (output_rule_data): Do not output tables to the table obstack.
21738
21739 * src/output.c: Remove some C dedicated output.
21740 Improve the use of macro and output obstacks.
21741 (output_defines): Remove.
21742
21743 * src/output.c (output_token_translations): Associate 'translate'
21744 table with a macro. No output to the table obstack.
21745 (output_gram): Same for 'rhs' and 'prhs'.
21746 (output_stos): Same for 'stos'.
21747 (output_rule_data): Same for 'r1' and 'r2'.
21748 (token_actions): Same for 'defact'.
21749 (goto_actions): Same for 'defgoto'.
21750 (output_base): Same for 'pact' and 'pgoto'.
21751 (output_table): Same for 'table'.
21752 (output_check): Same for 'check'.
21753
21754 * src/output.c (output_table_data): New function.
21755 (output_short_table): Remove.
21756 (output_short_or_char_table): Remove.
21757
21758 * src/output.c (output_parser): Replace most of the skeleton copy code
21759 with something new. Skeletons are now processed character by character
21760 rather than line by line, and Bison looks for '%%' macros. This is the
21761 first step in making Bison's output process (a lot) more flexible.
21762 (output_parser): Use the macro table.
21763
21764 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21765
21766 * src/main.c (main): Initialize the macro table.
21767
21768 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21769
21770 * src/lex.c (percent_table): Add tok_define.
21771 * src/lex.h: Add tok_define.
21772
21773 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21774
21775 * src/macrotab.c: New file.
21776 * src/macrotab.h: New file.
21777 * src/Makefile.am: Update.
21778
21779 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21780
21781 * lib/hash.c: New file.
21782 * lib/hash.h: New file.
21783 * lib/Makefile.am: Update.
21784
21785 2001-08-15 Akim Demaille <akim@epita.fr>
21786
21787 Version 1.28c.
21788
21789 2001-08-15 Marc Autret <autret_m@epita.fr>
21790
21791 * src/reader.c (readgram): Indent output macro YYSTYPE.
21792 (packsymbols): Likewise.
21793 (output_token_defines): Likewise.
21794 * src/files.c: Standardize.
21795 (compute_header_macro): New.
21796 (defines_obstack_save): New. Use compute_header_macro.
21797 (output_files): Update. Use defines_obstack_save.
21798
21799 2001-08-15 Akim Demaille <akim@epita.fr>
21800
21801 * doc/bison.texinfo (Table of Symbols): Document
21802 YYSTACK_USE_ALLOCA.
21803
21804 2001-08-15 Akim Demaille <akim@epita.fr>
21805
21806 * missing: Update from CVS Automake.
21807 * config/config.guess, config/config.sub, config/texinfo.tex:
21808 Update from gnu.org.
21809
21810 2001-08-15 Akim Demaille <akim@epita.fr>
21811
21812 * Makefile.maint: Sync with CVS Autoconf.
21813
21814 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21815
21816 * doc/bison.texinfo: Include GNU Free Documentation License from
21817 `fdl.texi'.
21818 * doc/fdl.texi: Add to package.
21819
21820 2001-08-14 Marc Autret <autret_m@epita.fr>
21821
21822 Turn on %{source,header}_extension features.
21823
21824 * src/lex.c (percent_table): Un-CPP out header_extension and
21825 source_extension.
21826 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21827 (compute_exts_from_src): Remove conditions. It restores priorities
21828 between options.
21829
21830 2001-08-14 Marc Autret <autret_m@epita.fr>
21831
21832 * src/files.c (compute_base_names): Add extensions computing when
21833 `--file-prefix' used.
21834 Standardize function calls.
21835
21836 2001-08-13 Marc Autret <autret_m@epita.fr>
21837
21838 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21839 defining it (defined but null disables alloca).
21840
21841 2001-08-13 Marc Autret <autret_m@epita.fr>
21842
21843 * src/bison.simple (_yy_memcpy): CPP reformat.
21844
21845 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21846
21847 * tests/atconfig.in (CPPFLAGS): Fix.
21848
21849 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21850
21851 * doc/bison.texinfo: Include GNU General Public License from
21852 `gpl.texi'.
21853 * doc/gpl.texi: Add to package.
21854
21855 2001-08-10 Marc Autret <autret_m@epita.fr>
21856
21857 * src/print_graph.h: Fix.
21858 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21859
21860 2001-08-10 Akim Demaille <akim@epita.fr>
21861
21862 * src/system.h: Provide default declarations for stpcpy, strndup,
21863 and strnlen.
21864
21865 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21866
21867 * doc/bison.texinfo (Locations): Update @$ stuff.
21868
21869 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21870
21871 * src/bison.simple (YYLLOC_DEFAULT): Update.
21872 (yyparse): Adjust.
21873
21874 2001-08-08 Marc Autret <autret_m@epita.fr>
21875
21876 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21877 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21878 Reported by Fabrice Bauzac.
21879
21880 2001-08-08 Marc Autret <autret_m@epita.fr>
21881
21882 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21883 * src/vcg.c (output_node): Fix.
21884 * src/vcg.h: Cleanup.
21885 * src/print_graph.c: Add comments.
21886 (node_output_size): New global variable. Simplify the formatting of
21887 the VCG graph output.
21888 (print_actions): Unused code is now used. It notifies the final state
21889 and no action states in the VCG graph. It also give the reduce actions.
21890 The `shift and goto' edges are red and the `go to state' edges are
21891 blue.
21892 Get the current node name and node_obstack by argument.
21893 (node_obstack): New variable.
21894 (print_state): Manage node_obstack.
21895 (print_core): Use node_obstack given by argument.
21896 A node is not only computed here but in print_actions also.
21897 (print_graph): CPP out useless code instead of commenting it.
21898
21899 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
21900
21901 * tests/atconfig.in (CPPFLAGS): Fix.
21902
21903 2001-08-07 Akim Demaille <akim@epita.fr>
21904
21905 * src/print_graph.c (quote): New.
21906 (print_core): Use it.
21907
21908 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21909
21910 * src/vcg.c (complain.h): Include it.
21911 Unepitaize `return' invocations.
21912 [NDEBUG] (main): Remove.
21913 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21914 * src/files.c (open_files): Initialize graph_obstack.
21915 * src/print_graph.c (print_actions): CPP out useless code.
21916 (print_core): Don't output the last `\n' in labels.
21917 Use `quote'.
21918 * src/files.c (output_files): Output the VCG file.
21919 * src/main.c (main): Invoke print_graph ();
21920
21921 2001-08-06 Marc Autret <autret_m@epita.fr>
21922
21923 Automaton VCG graph output.
21924 Using option ``-g'' or long option ``--graph'', you can generate
21925 a gram_filename.vcg file containing a VCG description of the LALR (1)
21926 automaton of your grammar.
21927
21928 * src/main.c: Call to print_graph() function.
21929 * src/getargs.h: Update.
21930 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21931 (graph_flag): New flag.
21932 (longopts): Update.
21933 (getargs): Add case `g'.
21934 * src/files.c (graph_obstack): New obstack struct.
21935 (open_files): Initialize new obstack.
21936 (output_files): Saves graph_obstack if required.
21937 * src/files.h (graph_obstack): New extern declaration.
21938 * src/Makefile.am: Add new source files.
21939
21940 2001-08-06 Marc Autret <autret_m@epita.fr>
21941
21942 * src/print_graph.c, src/print_graph.h (graph): New.
21943 * src/vcg.h: New file.
21944 * src/vcg.c: New file, VCG graph handling.
21945
21946 2001-08-06 Marc Autret <autret_m@epita.fr>
21947
21948 Add of %source_extension and %header_extension which specify
21949 the source or/and the header output file extension.
21950
21951 * src/files.c (compute_base_names): Remove initialisation of
21952 src_extension and header_extension.
21953 (compute_exts_from_gf): Update.
21954 (compute_exts_from_src): Update.
21955 (output_files): Update.
21956 * src/reader.c (parse_header_extension_decl): New.
21957 (parse_source_extension_decl): New.
21958 (read_declarations): New case statements for the new tokens.
21959 * src/lex.c (percent_table): Add entries for %source_extension
21960 and %header_extension.
21961 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21962
21963 2001-08-06 Marc Autret <autret_m@epita.fr>
21964
21965 * configure.in: Bump to 1.28c.
21966 * doc/bison.texinfo: Texinfo thingies.
21967
21968 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
21969
21970 * tests/atconfig.in (CPPFLAGS): Add.
21971 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21972
21973 2001-08-03 Akim Demaille <akim@epita.fr>
21974
21975 Version 1.28b.
21976
21977 2001-08-03 Akim Demaille <akim@epita.fr>
21978
21979 * tests/Makefile.am (check-local): Ship testsuite.
21980 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21981 Include `string.h'.
21982
21983 2001-08-03 Akim Demaille <akim@epita.fr>
21984
21985 * configure.in: Try using -Wformat when compiling.
21986
21987 2001-08-03 Akim Demaille <akim@epita.fr>
21988
21989 * configure.in: Bump to 1.28b.
21990
21991 2001-08-03 Akim Demaille <akim@epita.fr>
21992
21993 * src/complain.c: Adjust strerror_r portability issues.
21994
21995 2001-08-03 Akim Demaille <akim@epita.fr>
21996
21997 Version 1.28a.
21998
21999 2001-08-03 Akim Demaille <akim@epita.fr>
22000
22001 * src/getargs.c, src/getarg.h (skeleton)): Constify.
22002 * src/lex.c (literalchar): Avoid name clashes on `buf'.
22003 * src/getargs.c: Include complain.h.
22004 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
22005 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
22006
22007 2001-08-03 Akim Demaille <akim@epita.fr>
22008
22009 * src/reader.c (readgram): Display hidden chars in error messages.
22010
22011 2001-08-03 Akim Demaille <akim@epita.fr>
22012
22013 Update to gettext 0.10.39.
22014
22015 2001-08-03 Akim Demaille <akim@epita.fr>
22016
22017 * lib/strspn.c: New.
22018
22019 2001-08-01 Marc Autret <autret_m@epita.fr>
22020
22021 * doc/bison.texinfo: Update.
22022 * doc/bison.1 (mandoc): Update.
22023 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
22024 * src/files.c: Support output files extensions computing.
22025 (src_extension): New static variable.
22026 (header_extension): New static variable.
22027 (tr): New function.
22028 (get_extension_index): New function, gets the index of an extension
22029 filename in a string.
22030 (compute_exts_from_gf): New function, computes extensions from the
22031 grammar file extension.
22032 (compute_exts_from_src): New functions, computes extensions from the
22033 C source file extension, file given by ``-o'' option.
22034 (compute_base_names): Update.
22035 (output_files): Update.
22036
22037 2001-08-01 Robert Anisko <anisko_r@epita.fr>
22038
22039 * doc/bison.texi: Document @$.
22040 (Locations): New section.
22041
22042 2001-07-18 Akim Demaille <akim@epita.fr>
22043
22044 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
22045 * config/prev-version.txt, config/move-if-change: New.
22046 * Makefile.am: Adjust.
22047
22048 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
22049
22050 * src/bison.simple (yyparse): Suppress warning `comparaison
22051 between signed and unsigned'.
22052
22053 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
22054
22055 * src/getargs.h (raw_flag): Remove.
22056 * src/getargs.c: Die on `-r'/`--raw'.
22057 * src/lex.c (parse_percent_token): Die on `%raw'.
22058 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
22059 * tests/calc.at: Suppress test with option `--raw'.
22060
22061 2001-07-14 Akim Demaille <akim@epita.fr>
22062
22063 * config/: New.
22064 * configure.in: Require Autoconf 2.50.
22065 Update to gettext 0.10.38.
22066
22067 2001-03-16 Akim Demaille <akim@epita.fr>
22068
22069 * doc/bison.texinfo: ANSIfy the examples.
22070
22071 2001-03-16 Akim Demaille <akim@epita.fr>
22072
22073 * getargs.c (skeleton): New variable.
22074 (longopts): --skeleton is a new option.
22075 (shortopts, getargs): -S is a new option.
22076 * getargs.h: Declare skeleton.
22077 * output.c (output_parser): Use it.
22078
22079 2001-03-16 Akim Demaille <akim@epita.fr>
22080
22081 * m4/strerror_r.m4: New.
22082 * m4/error.m4: Run AC_FUNC_STRERROR_R.
22083 * lib/error.h, lib/error.c: Update.
22084
22085 2001-03-16 Akim Demaille <akim@epita.fr>
22086
22087 * src/getargs.c (longopts): Clean up.
22088
22089 2001-02-21 Akim Demaille <akim@epita.fr>
22090
22091 * src/reader.c (gensym): `gensym_count' is your own.
22092 Use a static buf to create the symbol name, as token_buffer is no
22093 longer a buffer.
22094
22095 2001-02-08 Akim Demaille <akim@epita.fr>
22096
22097 * src/conflicts.c (conflict_report): Be sure not to append to res
22098 between two calls, which could happen if both first sprintf were
22099 skipped, but not the first cp += strlen.
22100
22101 2001-02-08 Akim Demaille <akim@epita.fr>
22102
22103 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22104 New, from fileutils 4.0.37.
22105 * configure.in: Require Autoconf 2.49c. I took some time before
22106 making this decision. This is the only way out for portability
22107 issues in Bison, it would mean way too much duplicate effort to
22108 import in Bison features implemented in 2.49c since 2.13.
22109 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22110
22111 2001-02-02 Akim Demaille <akim@epita.fr>
22112
22113 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
22114 * lib/xalloc.h, lib/xmalloc.c: Update.
22115
22116 2001-01-19 Akim Demaille <akim@epita.fr>
22117
22118 Get rid of the ad hoc handling of token_buffer in the scanner: use
22119 the obstacks.
22120
22121 * src/lex.c (token_obstack): New.
22122 (init_lex): Initialize it. No longer call...
22123 (grow_token_buffer): this. Remove it.
22124 Adjust all the places which used it to use the obstack.
22125
22126 2001-01-19 Akim Demaille <akim@epita.fr>
22127
22128 * src/lex.h: Rename all the tokens:
22129 s/\bENDFILE\b/tok_eof/g;
22130 s/\bIDENTIFIER\b/tok_identifier/g;
22131 etc.
22132 Let them be enums, not #define, to ease debugging.
22133 Adjust all the code.
22134
22135 2001-01-18 Akim Demaille <akim@epita.fr>
22136
22137 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22138 * src/lex.c (maxtoken, grow_token_buffer): Static.
22139
22140 2001-01-18 Akim Demaille <akim@epita.fr>
22141
22142 Since we now use obstacks, more % directives can be enabled.
22143
22144 * src/lex.c (percent_table): Also accept `%yacc',
22145 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22146 `%debug'.
22147 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22148 instead of returning a token.
22149 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22150 * src/reader.c (read_declarations): Adjust.
22151 * src/files.c (open_files): Don't call `compute_base_names', don't
22152 compute `attrsfile' since they depend upon data which might be
22153 *in* the input file now.
22154 (output_files): Do it here.
22155 * src/output.c (output_headers): Document the fact that this patch
22156 introduces a guaranteed SEGV for semantic parsers.
22157 * doc/bison.texinfo: Document them.
22158 * tests/suite.at: Exercise these %options.
22159
22160 2000-12-20 Akim Demaille <akim@epita.fr>
22161
22162 Also handle the output file (--verbose) with obstacks.
22163
22164 * files.c (foutput): Remove.
22165 (output_obstack): New.
22166 Adjust all dependencies.
22167 * src/conflicts.c: Return a string.
22168 * src/system.h (obstack_grow_string): Rename as...
22169 (obstack_sgrow): this. Be ready to work with non literals.
22170 (obstack_fgrow4): New.
22171
22172 2000-12-20 Akim Demaille <akim@epita.fr>
22173
22174 * src/files.c (open_files): Fix the computation of short_base_name
22175 in the case of `-o foo.tab.c'.
22176
22177 2000-12-20 Akim Demaille <akim@epita.fr>
22178
22179 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22180 (copy_dollar): Now that everything uses obstacks, get rid of the
22181 FILE * parameters.
22182
22183 2000-12-20 Akim Demaille <akim@epita.fr>
22184
22185 * src/files.c (open_files): Actually the `.output' file is based
22186 on the short_base_name, not base_name.
22187 * tests/suite.at (Checking output file names): Adjust.
22188
22189 2000-12-20 Akim Demaille <akim@epita.fr>
22190
22191 * src/bison.s1: Remove, we now use directly...
22192 * src/bison.simple: this.
22193 * src/Makefile.am: Use pkgdata instead of data.
22194
22195 2000-12-20 Akim Demaille <akim@epita.fr>
22196
22197 * src/files.c (guard_obstack): New.
22198 (open_files): Initialize it.
22199 (output_files): Dump it...
22200 * src/files.h: Export it.
22201 * src/reader.c (copy_guard): Use it.
22202
22203 2000-12-19 Akim Demaille <akim@epita.fr>
22204
22205 * src/files.c (outfile, defsfile, actfile): Removed as global
22206 vars.
22207 (open_files): Don't compute them.
22208 (output_files): Adjust.
22209 (base_name, short_base_name): Be global.
22210 Adjust dependencies.
22211
22212 2000-12-19 Akim Demaille <akim@epita.fr>
22213
22214 * src/files.c (strsuffix): New.
22215 (stringappend): Be just like strcat but allocate.
22216 (base_names): Eve out from open_files.
22217 Try to simplify the rather hairy computation of base_name and
22218 short_base_name.
22219 (open_files): Use it.
22220 * tests/suite.at (Checking output file names): New test.
22221
22222 2000-12-19 Akim Demaille <akim@epita.fr>
22223
22224 * src/system.h (obstack_grow_literal_string): Rename as...
22225 (obstack_grow_string): this.
22226 * src/output.c (output_parser): Recognize `%% actions' instead of
22227 `$'.
22228 * src/bison.s1: s/$/%% actions/.
22229 * src/bison.hairy: Likewise.
22230
22231 2000-12-19 Akim Demaille <akim@epita.fr>
22232
22233 * src/output.c (output_parser): Compute the `#line' lines when
22234 there are.
22235 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22236 Suggested by Hans Aberg.
22237
22238 2000-12-19 Akim Demaille <akim@epita.fr>
22239
22240 Let the handling of the skeleton files be local to the procedures
22241 that use it.
22242
22243 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22244 longer static.
22245 (fparser, open_extra_files): Remove.
22246 (open_files, output_files): Don't take care of fparser.
22247 * src/files.h: Adjust.
22248 * src/output.c (output_parser): Open and close the file to the
22249 skeleton.
22250 * src/reader.c (read_declarations): When %semantic_parser, open
22251 fguard.
22252
22253 2000-12-19 Akim Demaille <akim@epita.fr>
22254
22255 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22256 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22257
22258 2000-12-19 Akim Demaille <akim@epita.fr>
22259
22260 * src/files.c (open_files): Yipee! We no longer need all the code
22261 looking for `/tmp' since we have no tmp file.
22262
22263 2000-12-19 Akim Demaille <akim@epita.fr>
22264
22265 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22266 New macros.
22267 * src/files.c (open_files): Less dependency on MSDOS etc.
22268
22269 2000-12-14 Akim Demaille <akim@epita.fr>
22270
22271 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22272 Provide a default definition.
22273 Use it when executing the default @ action.
22274 * src/reader.c (reader_output_yylsp): No longer include
22275 `timestamp' and `text' in the default YYLTYPE.
22276
22277 2000-12-12 Akim Demaille <akim@epita.fr>
22278
22279 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22280 (copy_guard): Quote the file names.
22281 Reported by Laurent Mascherpa.
22282
22283 2000-12-12 Akim Demaille <akim@epita.fr>
22284
22285 * src/output.c (output_headers, output_program, output): Be sure
22286 to escape special characters when outputting filenames.
22287 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22288 (output_headers): Don't depend on them, Use ACTSTR.
22289
22290 2000-11-17 Akim Demaille <akim@epita.fr>
22291
22292 * lib/obstack.h: Formatting changes.
22293 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22294 prevents type checking.
22295 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22296 cast the value to (void *): assigning a `foo *' to a `void *'
22297 variable is valid.
22298 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22299 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22300 append characters.
22301
22302 2000-11-17 Akim Demaille <akim@epita.fr>
22303
22304 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22305 as...
22306 (suite.m4, regression.m4, calc.m4): these.
22307 * tests/atgeneral.m4: Update from CVS Autoconf.
22308
22309 2000-11-17 Akim Demaille <akim@epita.fr>
22310
22311 * tests/regression.m4 (%union and --defines): New test,
22312 demonstrating a current bug in the obstack implementation.
22313
22314 2000-11-17 Akim Demaille <akim@epita.fr>
22315
22316 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22317 macros.
22318 Use them to declare the variables which are global or local to
22319 `yyparse'.
22320
22321 2000-11-17 Akim Demaille <akim@epita.fr>
22322
22323 * acconfig.h: Remove, no longer used.
22324
22325 2000-11-07 Akim Demaille <akim@epita.fr>
22326
22327 * src: s/Copyright (C)/Copyright/g.
22328
22329 2000-11-07 Akim Demaille <akim@epita.fr>
22330
22331 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22332 defining.
22333 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22334
22335 2000-11-07 Akim Demaille <akim@epita.fr>
22336
22337 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22338 Merge in a single CPP if/else.
22339
22340 2000-11-07 Akim Demaille <akim@epita.fr>
22341
22342 * src/output.c (output): Remove useless variables.
22343 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22344 argument `data' for consistency with the prototypes.
22345 Qualify it `const'.
22346 (obstack_copy, obstack_copy0): Rename the second argument as
22347 `address' for consistency. Qualify it `const'.
22348 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22349 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22350 `const' their input argument (`data' or `address').
22351 Adjust the corresponding macros to include `const' in casts.
22352
22353 2000-11-03 Akim Demaille <akim@epita.fr>
22354
22355 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22356 s/PFILE1/BISON_HAIRY/.
22357 Adjust dependencies.
22358
22359 2000-11-03 Akim Demaille <akim@epita.fr>
22360
22361 For some reason, this was not applied.
22362
22363 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22364 `unlink': it's no longer used.
22365
22366 2000-11-03 Akim Demaille <akim@epita.fr>
22367
22368 * src/files.c (skeleton_find): New function, eved out of...
22369 (open_files, open_extra_files): here.
22370
22371 2000-11-03 Akim Demaille <akim@epita.fr>
22372
22373 Don't use `atexit'.
22374
22375 * src/files.c (obstack_save): New function.
22376 (done): Rename as...
22377 (output_files): this.
22378 Use `obstack_save'.
22379 * src/main.c (main): Don't use `atexit' to register `done', since
22380 it no longer has to remove tmp files, just call `output_files'
22381 when there are no errors.
22382
22383 2000-11-02 Akim Demaille <akim@epita.fr>
22384
22385 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22386 `unlink': it's no longer used.
22387 * src/files.h: Formatting changes.
22388
22389 2000-11-02 Akim Demaille <akim@epita.fr>
22390
22391 Remove the last uses of mktemp and unlink/delete.
22392
22393 * src/files.c (fdefines, ftable): Removed.
22394 (defines_ostack, table_obstack): New.
22395 Adjust dependencies of the former into uses of the latter.
22396 * src/output.c (output_short_or_char_table, output_short_table):
22397 Convert to using obstacks.
22398 * src/reader.c (copy_comment2): Accept one FILE * and two
22399 obstacks.
22400 (output_token_defines, reader_output_yylsp): Use obstacks.
22401 * src/system.h (obstack_fgrow3): New.
22402 * po/POTFILES.in: Adjust.
22403
22404 2000-11-01 Akim Demaille <akim@epita.fr>
22405
22406 Change each use of `fattrs' into a use of `attrs_obstack'.
22407
22408 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22409 * src/files.c (fattrs): Remove.
22410 (attrs_obstack): New.
22411 Adjust all dependencies.
22412 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22413
22414 2000-11-01 Akim Demaille <akim@epita.fr>
22415
22416 Introduce obstacks.
22417 Change each use of `faction' into a use of `action_obstack'.
22418
22419 * lib/obstack.h, lib/obstack.c: New files.
22420 * src/files.c (faction): Remove.
22421 (action_obstack): New.
22422 Adjust all dependencies.
22423
22424 2000-10-20 Akim Demaille <akim@epita.fr>
22425
22426 * lib/quote.h (PARAMS): New macro. Use it.
22427
22428 2000-10-16 Akim Demaille <akim@epita.fr>
22429
22430 * src/output.c (output_short_or_char_table): New function.
22431 (output_short_table, output_token_translations): Use it.
22432 (goto_actions): Use output_short_table.
22433
22434 2000-10-16 Akim Demaille <akim@epita.fr>
22435
22436 * src/symtab.c (bucket_new): New function.
22437 (getsym): Use it.
22438
22439 * src/output.c (output_short_table): New argument to display the
22440 comment associated with the table.
22441 Adjust dependencies.
22442 (output_gram): Use it.
22443 (output_rule_data): Nicer output layout for YYTNAME.
22444
22445 2000-10-16 Akim Demaille <akim@epita.fr>
22446
22447 * src/lex.c (read_typename): New function.
22448 (lex): Use it.
22449 * src/reader.c (copy_dollar): Likewise.
22450
22451 2000-10-16 Akim Demaille <akim@epita.fr>
22452
22453 * src/reader.c (copy_comment2): Expect the input stream to be on
22454 the `/' which is suspected to open a comment, instead of being
22455 called after `//' or `/*' was read.
22456 (copy_comment, copy_definition, parse_union_decl, copy_action)
22457 (copy_guard): Adjust.
22458
22459 2000-10-16 Akim Demaille <akim@epita.fr>
22460
22461 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22462 `read_signed_integer'.
22463
22464 2000-10-16 Akim Demaille <akim@epita.fr>
22465
22466 * src/reader.c (copy_dollar): New function.
22467 (copy_guard, copy_action): Use it.
22468
22469 2000-10-16 Akim Demaille <akim@epita.fr>
22470
22471 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22472 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22473 New files, from Fileutils 4.0.27.
22474 * src/main.c (printable_version): Remove.
22475 * src/lex.c, src/reader.c: Use `quote'.
22476
22477 2000-10-04 Akim Demaille <akim@epita.fr>
22478
22479 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22480
22481 2000-10-04 Akim Demaille <akim@epita.fr>
22482
22483 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22484
22485 2000-10-04 Akim Demaille <akim@epita.fr>
22486
22487 When a literal string is used to define two different tokens,
22488 `bison -v' segfaults.
22489 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22490
22491 * tests/regression.m4: New file.
22492 Include the core of the sample provided by Piotr Gackiewicz.
22493 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22494 properly.
22495
22496 2000-10-04 Akim Demaille <akim@epita.fr>
22497
22498 * src/reader.c (parse_expect_decl): Keep `count' within the size
22499 of `buffer'.
22500 From Neil Booth.
22501
22502 2000-10-02 Paul Eggert <eggert@twinsun.com>
22503
22504 * bison.s1 (yyparse): Assign the default value
22505 unconditionally, to avoid a GCC warning and make the parser a
22506 tad smaller.
22507
22508 2000-10-02 Akim Demaille <akim@epita.fr>
22509
22510 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22511 options.
22512
22513 2000-10-02 Akim Demaille <akim@epita.fr>
22514
22515 * src/derives.c, src/print.c, src/reduce.c: To ease the
22516 translation, move some `\n' out of the translated strings.
22517
22518 2000-10-02 Akim Demaille <akim@epita.fr>
22519
22520 The location tracking mechanism is precious for parse error
22521 messages. Nevertheless, it is enabled only when `@n' is used in
22522 the grammar, which is a different issue (you can use it in error
22523 message, but not in the grammar per se). Therefore, there should
22524 be another means to enable it.
22525
22526 * src/getargs.c (getargs): Support `--locations'.
22527 (usage): Report it.
22528 * src/getargs.h (locationsflag): Export it.
22529 * src/lex.c (percent_table): Support `%locations'.
22530 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22531 with `locationsflag'.
22532 * doc/bison.texinfo: Document `--locations' and `%locations'.
22533 Sort the options.
22534 * tests/calc.m4: Test it.
22535
22536 For regularity of the names, replace each
22537 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22538 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22539 In addition replace each `flag' with `_flag'.
22540
22541 2000-10-02 Akim Demaille <akim@epita.fr>
22542
22543 Also test parse error messages, including with YYERROR_VERBOSE.
22544
22545 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22546 associative).
22547 Use it to check the computations.
22548 Use it to check `nonassoc' is honored.
22549 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22550 `--yyerror-verbose'.
22551 (_AT_CHECK_CALC): Adjust to this option.
22552 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22553
22554 2000-10-02 Akim Demaille <akim@epita.fr>
22555
22556 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22557 the latter demonstrates a flaw in the handling of non debugging
22558 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22559 was used in order to simplify:
22560
22561 #if YYDEBUG
22562 if (yydebug)
22563 {
22564 ...
22565 }
22566 #endif
22567
22568 into
22569
22570 if (yydebug)
22571 {
22572 ...
22573 }
22574
22575 unfortunately this leads to a CPP conflict when
22576 `--name-prefix=foo' is used since it produces `#define yydebug
22577 foodebug'.
22578
22579 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22580 (YYDPRINTF): New macro.
22581 Spread its use.
22582 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22583 the bison options.
22584 Also test `--verbose', `--defines' and `--name-prefix'.
22585
22586 2000-10-02 Akim Demaille <akim@epita.fr>
22587
22588 Improve the readability of the produced parsers.
22589
22590 * src/bison.s1: Formatting changes.
22591 Improve the comment related to the `$' mark.
22592 (yydefault): Don't fall through to `yyresume': `goto' there.
22593 * src/output.c (output_parser): When the `$' is met, skip the end
22594 of its line.
22595 New variable, `number_of_dollar_signs', to check there's exactly
22596 one `$' in the parser skeleton.
22597
22598 2000-10-02 Akim Demaille <akim@epita.fr>
22599
22600 * lib/xstrdup.c: New file, from the fileutils.
22601 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22602 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22603 instead of strlen + xmalloc + strcpy.
22604 * src/symtab.c (copys): Remove, use xstrdup instead.
22605
22606 2000-10-02 Akim Demaille <akim@epita.fr>
22607
22608 * src/gram.h (associativity): New enum type which replaces the
22609 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22610 `right_assoc', `left_assoc' and `non_assoc'.
22611 Adjust all dependencies.
22612 * src/reader.c: Formatting changes.
22613 (LTYPESTR): Don't define it, use it as a literal in
22614 `reader_output_yylsp'.
22615 * src/symtab.h (symbol_class): New enum type which replaces the
22616 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22617 `sunknown', `stoken and `snterm'.
22618
22619 2000-10-02 Akim Demaille <akim@epita.fr>
22620
22621 * src/getargs.c (fixed_outfiles): Rename as...
22622 (yaccflag): for consistency and accuracy.
22623 Adjust dependencies.
22624
22625 2000-10-02 Akim Demaille <akim@epita.fr>
22626
22627 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22628 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22629 difficult and introduced a lot of core dump. It turns out that
22630 Bison used an implementation of `xmalloc' based on `calloc', and
22631 at various places it does depend upon the initialization to 0. I
22632 have not tried to isolate the pertinent places, and all the former
22633 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22634 someone should address this issue.
22635
22636 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22637 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22638 files.
22639 Adjust dependencies.
22640 * src/warshall.h: New file.
22641 Propagate.
22642
22643 2000-10-02 Akim Demaille <akim@epita.fr>
22644
22645 Various anti-`extern in *.c' changes.
22646
22647 * src/system.h: Include `assert.h'.
22648
22649 2000-10-02 Akim Demaille <akim@epita.fr>
22650
22651 * src/state.h (nstates, final_state, first_state, first_shift)
22652 (first_reduction): Move their exportation from here...
22653 * src/LR0.h: to here.
22654 Adjust dependencies.
22655 * src/getargs.c (statisticsflag): New variable.
22656 Add support for `--statistics'.
22657 Adjust dependencies.
22658
22659 Remove a lot of now useless `extern' statements in most files.
22660
22661 2000-10-02 Akim Demaille <akim@epita.fr>
22662
22663 * src/LR0.h: New file.
22664 Propagate its use.
22665
22666 2000-10-02 Akim Demaille <akim@epita.fr>
22667
22668 * src/print.h: New file.
22669 Propagate its use.
22670 * src/print.c: Formatting and ordering changes.
22671 (verbose, terse): Replace with...
22672 (print_results): this new function.
22673 Adjust dependencies.
22674
22675 2000-10-02 Akim Demaille <akim@epita.fr>
22676
22677 * src/conflicts.c (conflict_report): New function.
22678 (conflict_log, verbose_conflict_log): Replace with...
22679 (print_conflicts): this function.
22680 Adjust dependencies.
22681 * src/conflicts.h: New file.
22682 Propagate its inclusion.
22683
22684 2000-10-02 Akim Demaille <akim@epita.fr>
22685
22686 * src/nullable.h: New file.
22687 Propagate its inclusion.
22688 * src/nullable.c: Formatting changes.
22689
22690 2000-10-02 Akim Demaille <akim@epita.fr>
22691
22692 * src/reduce.h: New file.
22693 Propagate its inclusion.
22694 * src/reduce.c: Topological sort and other formatting changes.
22695 (bool, TRUE, FALSE): Move their definition to...
22696 * src/system.h: here.
22697
22698 2000-10-02 Akim Demaille <akim@epita.fr>
22699
22700 * src/files.c: Formatting changes.
22701 (tryopen, tryclose, openfiles): Rename as...
22702 (xfopen, xfclose, open_files): this.
22703 (stringappend): static.
22704 * src/files.h: Complete the list of exported symbols.
22705 Propagate its use.
22706
22707 2000-10-02 Akim Demaille <akim@epita.fr>
22708
22709 * src/reader.h: New file.
22710 Propagate its use instead of tedious list of `extern' and
22711 prototypes.
22712 * src/reader.c: Formatting changes, topological sort,
22713 s/register//.
22714
22715 2000-10-02 Akim Demaille <akim@epita.fr>
22716
22717 * src/lex.h: Prototype `lex.c' exported functions.
22718 * src/reader.c: Adjust.
22719 * src/lex.c: Formatting changes.
22720 (safegetc): Rename as...
22721 (xgetc): this.
22722
22723 2000-10-02 Akim Demaille <akim@epita.fr>
22724
22725 * src/lalr.h: New file.
22726 Propagate its inclusion instead of prototypes and `extern'.
22727 * src/lalr.c: Formatting changes, topological sorting etc.
22728
22729 2000-10-02 Akim Demaille <akim@epita.fr>
22730
22731 * src/output.c (token_actions): Introduce a temporary array,
22732 YYDEFACT, that makes it possible for this function to use
22733 output_short_table.
22734
22735 2000-10-02 Akim Demaille <akim@epita.fr>
22736
22737 `user_toknums' is output as a `short[]' in `output.c', while it is
22738 defined as a `int[]' in `reader.c'. For consistency with the
22739 other output tables, `user_toknums' is now defined as a table of
22740 shorts.
22741
22742 * src/reader.c (user_toknums): Be a short table instead of an int
22743 table.
22744 Adjust dependencies.
22745
22746 Factor the short table outputs.
22747
22748 * src/output.c (output_short_table): New function.
22749 * src/output.c (output_gram, output_stos, output_rule_data)
22750 (output_base, output_table, output_check): Use it.
22751
22752 2000-10-02 Akim Demaille <akim@epita.fr>
22753
22754 * src/output.c (output): Topological sort of the functions, in
22755 order to get rid of the `static' prototypes.
22756 No longer use `register'.
22757 * src/output.h: New file.
22758 Propagate its inclusion in files explicitly prototyping functions
22759 from output.c.
22760
22761 2000-09-21 Akim Demaille <akim@epita.fr>
22762
22763 * src/atgeneral.m4: Update from Autoconf.
22764
22765 2000-09-21 Akim Demaille <akim@epita.fr>
22766
22767 * src/closure.h: New file.
22768 * src/closure.c: Formatting changes, topological sort over the
22769 functions, use of closure.h.
22770 (initialize_closure, finalize_closure): Rename as...
22771 (new_closure, free_closure): these. Adjust dependencies.
22772 * src/LR0.c: Formatting changes, topological sort, use of
22773 cloture.h.
22774 (initialize_states): Rename as...
22775 (new_states): this.
22776 * src/Makefile.am (noinst_HEADERS): Adjust.
22777
22778 2000-09-20 Akim Demaille <akim@epita.fr>
22779
22780 * src/acconfig.h: Don't protect config.h against multiple
22781 inclusion.
22782 Don't define PARAMS.
22783 * src/system.h: Define PARAMS.
22784 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22785 purpose of config.h. system.h must not try to fix wrong
22786 definitions in config.h.
22787
22788 2000-09-20 Akim Demaille <akim@epita.fr>
22789
22790 * src/derives.h: New file.
22791 * src/main.c, src/derives.h: Use it.
22792 Formatting changes.
22793 * src/Makefile.am (noinst_HEADERS): Adjust.
22794
22795 2000-09-20 Akim Demaille <akim@epita.fr>
22796
22797 * tests/atgeneral.m4: Update from Autoconf.
22798 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22799 (AT_CHECK_CALC): New macros.
22800 Use these macros to test bison with options `', `--raw',
22801 `--debug', `--yacc', `--yacc --debug'.
22802
22803 2000-09-19 Akim Demaille <akim@epita.fr>
22804
22805 * src/output.c: Formatting changes.
22806 * src/machine.h: Remove, leaving its contents in...
22807 * src/system.h: here.
22808 Include stdio.h.
22809 Adjust all dependencies on stdio.h and machine.h.
22810 * src/getargs.h: New file.
22811 Let all `extern' declarations about getargs.c be replaced with
22812 inclusion of `getargs.h'.
22813 * src/Makefile.am (noinst_HEADERS): Adjust.
22814
22815 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22816 scope.
22817 (yyerror): Returns void, not int.
22818 * doc/bison.texinfo: Formatting changes.
22819
22820 2000-09-19 Akim Demaille <akim@epita.fr>
22821
22822 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22823 portable.
22824
22825 2000-09-18 Akim Demaille <akim@epita.fr>
22826
22827 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22828 * src/Makefile.am (INCLUDES): Don't.
22829 Be ready to fetch headers in lib/.
22830
22831 2000-09-18 Akim Demaille <akim@epita.fr>
22832
22833 * doc/bison.texinfo: Update the copyright.
22834 ANSIfy and GNUify the examples.
22835 Remove the old menu.
22836
22837 2000-09-18 Akim Demaille <akim@epita.fr>
22838
22839 First set of tests: use the `calc' example from the documentation.
22840
22841 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22842 is defined only when YYDEBUG is.
22843 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22844 * src/files.c (tryopen, tryclose): Formatting changes.
22845 Move to the top and be static.
22846 * src/reader.c (read_signed_integer): Likewise.
22847 * tests/calc.m4: New file.
22848 * Makefile.am, suite.m4: Adjust.
22849 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22850
22851 2000-09-18 Akim Demaille <akim@epita.fr>
22852
22853 Add support for an Autotest test suite for Bison.
22854
22855 * m4/m4.m4, m4/atconfig.m4: New files.
22856 * m4/Makefile.am (EXTRA_DIST): Adjust.
22857 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22858 files.
22859 * src/getargs.c: Display a more standard --version message.
22860 * src/reader.c (reader): Formatting changes.
22861 No longer depend upon VERSION_STRING.
22862 * configure.in: No longer use `dnl'.
22863 Set up the test suite and the new directory `tests/.
22864 (VERSION_STRING): Remove.
22865
22866 2000-04-14 Akim Demaille <akim@epita.fr>
22867
22868 * src/reader.c (copy_comment2): New function, same as former
22869 `copy_comment', but outputs into two FILE *.
22870 (copy_comment): Use it.
22871 (parse_union_decl): Use it.
22872 (get_type, parse_start_decl): Use the same `invalid' message.
22873 (parse_start_decl, parse_union_decl): Use the same `multiple'
22874 message.
22875 (parse_union_decl, copy_guard, copy_action): Use the same
22876 `unmatched' message.
22877 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22878
22879 2000-03-31 Akim Demaille <akim@epita.fr>
22880
22881 * src/files.c (tryopen, tryclose): Move to the top.
22882 Be static.
22883
22884 2000-03-31 Akim Demaille <akim@epita.fr>
22885
22886 * src/main.c (main): Don't call `done', exit does it.
22887
22888 2000-03-31 Akim Demaille <akim@epita.fr>
22889
22890 * allocate.c: s/return (foo)/return foo/.
22891 * lalr.c: Likewise.
22892 * LR0.c: Likewise.
22893 * output.c: Likewise.
22894 * reader.c: Likewise.
22895 * symtab.c: Likewise.
22896 * vmsgetargs.c: Likewise.
22897
22898 2000-03-31 Akim Demaille <akim@epita.fr>
22899
22900 Clean up the error reporting functions.
22901
22902 * src/report.c: New file.
22903 * src/report.h: Likewise.
22904 * src/Makefile.am: Adjust.
22905 * m4/error.m4: New file.
22906 * m4/Makefile.am: Adjust.
22907 * configure.in (jm_PREREQ_ERROR): Call it.
22908 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22909 Remove.
22910 (fatal, fatals): Remove. All callers use complain.c::fatal.
22911 (warn, warni, warns, warnss, warnss): Remove. All callers use
22912 complain.c::complain.
22913 (toomany): Remove, use fatal instead.
22914 * src/files.c (done): No argument, use complain_message_count.
22915 * src/main.c (main): Register `done' to `atexit'.
22916
22917 * src/getargs.c (usage): More `fputs', less `fprintf'.
22918
22919 2000-03-28 Akim Demaille <akim@epita.fr>
22920
22921 * lib/: New directory.
22922 * Makefile.am (SUBDIRS): Adjust.
22923 * configure.in: Adjust.
22924 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22925 useless.
22926 * src/alloca.c: Moved to lib/.
22927 * src/getopt.c: Likewise.
22928 * src/getopt1.c: Likewise.
22929 * src/getopt.h: Likewise.
22930 * src/ansi2knr.c: Likewise.
22931 * src/ansi2knr.1: Likewise.
22932 * src/Makefile.am: Adjust.
22933 * lib/Makefile.am: New file.
22934
22935 2000-03-28 Akim Demaille <akim@epita.fr>
22936
22937 * src/getargs.c (usage): Refresh the help message.
22938
22939 2000-03-17 Akim Demaille <akim@epita.fr>
22940
22941 * src/getopt1.c: Updated from textutils 2.0e
22942 * src/getopt.c: Likewise.
22943 * src/getopt.h: Likewise.
22944
22945 2000-03-17 Akim Demaille <akim@epita.fr>
22946
22947 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22948 the file name, not the whole `#line LINE FILE'.
22949
22950 2000-03-17 Akim Demaille <akim@epita.fr>
22951
22952 On syntax errors, report the token on which we choked.
22953
22954 * src/bison.s1 (yyparse): In the label yyerrlab, when
22955 YYERROR_VERBOSE, add yychar in msg.
22956
22957 2000-03-17 Akim Demaille <akim@epita.fr>
22958
22959 * src/reader.c (copy_at): New function.
22960 (copy_guard): Use it.
22961 (copy_action): Use it.
22962
22963 2000-03-17 Akim Demaille <akim@epita.fr>
22964
22965 Be kind to translators, save some useless translations.
22966
22967 * src/main.c (banner): New function.
22968 (fatal_banner): Use it.
22969 (warn_banner): Use it.
22970
22971 2000-03-17 Akim Demaille <akim@epita.fr>
22972
22973 * src/reader.c (copy_definition): Use copy_string and
22974 copy_comment. Removed now unused `match', `ended',
22975 `cplus_comment'.
22976 (copy_comment, copy_string): Moved, to be visible from
22977 copy_definition.
22978
22979 2000-03-17 Akim Demaille <akim@epita.fr>
22980
22981 * src/reader.c (copy_string): Declare `static inline'. No
22982 problems with inline, since it is checked by configure.
22983 (copy_comment): Likewise.
22984
22985 2000-03-17 Akim Demaille <akim@epita.fr>
22986
22987 * src/reader.c (packsymbols): Formatting changes.
22988
22989 2000-03-17 Akim Demaille <akim@epita.fr>
22990
22991 * src/reader.c (copy_comment): New function, factored out from:
22992 (copy_action): Use it. Removed now unused `match', `ended',
22993 `cplus_comment'.
22994 (copy_guard): Likewise.
22995
22996 2000-03-17 Akim Demaille <akim@epita.fr>
22997
22998 * src/reader.c (copy_string): New function, factored out from:
22999 (copy_action): Use it.
23000 (copy_guard): Likewise.
23001
23002 2000-03-17 Akim Demaille <akim@epita.fr>
23003
23004 Change the handling of @s so that they behave exactly like $s.
23005 There is now a pseudo variable @$ (readble and writable), location
23006 of the lhs of the rule (by default ranging from the location of
23007 the first symbol of the rhs, to the location of the last symbol,
23008 or, if the rhs is empty, YYLLOC).
23009
23010 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
23011 yyval.
23012 (yyparse): When providing a default semantic action, provide a
23013 default location action.
23014 (after the $): No longer change `*YYLSP', just stack YYLOC the
23015 same way you stack YYVAL.
23016 * src/reader.c (read_declarations): Use warns.
23017 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
23018 (copy_action, case '@'): Likewise.
23019 Use a standard error message, to save useless work from
23020 translators.
23021
23022 2000-03-17 Akim Demaille <akim@epita.fr>
23023
23024 * src/bison.s1: Formatting and cosmetics changes.
23025 * src/reader.c: Likewise.
23026 Update the Copyright notice.
23027
23028 2000-03-17 Akim Demaille <akim@epita.fr>
23029
23030 * src/bison.s1 (#line): All set to `#line' only, since the
23031 Makefile now handles them.
23032
23033 2000-03-16 Akim Demaille <akim@epita.fr>
23034
23035 * src/output.c (output_rule_data): Output the documentation of
23036 some of the tables.
23037 (Copyright notice): Update.
23038 Formatting changes.
23039
23040 2000-03-16 Akim Demaille <akim@epita.fr>
23041
23042 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
23043 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
23044 One `#if YYDEBUG' remains, since it uses variables which are
23045 defined only if `YYDEBUG != 0'.
23046
23047 2000-03-16 Akim Demaille <akim@epita.fr>
23048
23049 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
23050 and related variables so that the similarities are highlighted.
23051
23052 2000-03-16 Akim Demaille <akim@epita.fr>
23053
23054 * src/bison.s1: Properly indent CPP directives.
23055
23056 2000-03-16 Akim Demaille <akim@epita.fr>
23057
23058 * src/bison.s1: Properly indent the `alloca' CPP section.
23059
23060 2000-03-16 Akim Demaille <akim@epita.fr>
23061
23062 Do not hard code values of directories in `configure.in'.
23063 Update the `configure' tool chain.
23064
23065 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
23066 src/makefile.am.
23067 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
23068 (AC_OUTPUT): Add m4/Makefile.
23069 Bump to bison 1.28a, 1.29 has never been released.
23070 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
23071 handled via src/Makefile.am.
23072 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
23073 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
23074 autoheader.
23075 * Makefile.am (SUBDIRS): Add m4.
23076 (ACLOCAL_AM_FLAGS): New variable.
23077 (AUTOMAKE_OPTIONS): Add check-news.
23078 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
23079 the proper line number and file name.
23080 (DEFS): Propagate the location of bison library files and of the
23081 locale files.
23082 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
23083 builddir.
23084 * acinclude.m4: Remove, replaced by the directory m4.
23085 * m4/Makefile.am (EXTRA_DIST): New variable.
23086 * m4/gettext.m4: New file, from the fileutils.
23087 * m4/lcmessage.m4: Likewise
23088 * m4/progtest.m4: Likewise.
23089 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23090
23091 2000-03-10 Akim Demaille <akim@epita.fr>
23092
23093 * src/closure.c:
23094 Formatting changes of various comments.
23095 Respect the GNU coding standards at various places.
23096 Don't use `_()' when no translation is needed.
23097
23098 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23099
23100 * src/files.c:
23101 OS/2 honors TMPDIR environment variable.
23102
23103 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23104
23105 * doc/bison.texinfo: Tweaked spelling and grammar.
23106 Updated ISBN.
23107 Removed reference to price of printed copy.
23108 Mention BISON_SIMPLE and BISON_HAIRY.
23109
23110 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23111
23112 * configure.in, NEWS:
23113 Bison 1.29 released.
23114
23115 1999-10-27 Jesse Thilo <jthilo@gnu.org>
23116
23117 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23118 Added reference card.
23119
23120 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23121
23122 * po/ru.po: Added Russian translation.
23123
23124 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23125
23126 * configure.in: Added Russian translation.
23127
23128 1999-07-06 Jesse Thilo <jthilo@gnu.org>
23129
23130 * configure.in, NEWS, README:
23131 Released version 1.28.
23132
23133 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23134
23135 * src/system.h:
23136 Squashed redefinition warning on some systems.
23137
23138 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23139 Have configure build version string instead of relying on ANSI string
23140 concatentation.
23141
23142 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23143
23144 * po/POTFILES.in: Got rid of version.c.
23145
23146 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23147
23148 * acconfig.h, configure.in:
23149 Have configure build version string instead of relying on ANSI string
23150 concatentation.
23151
23152 1999-06-08 Jesse Thilo <jthilo@gnu.org>
23153
23154 * doc/bison.1:
23155 Dropped mention of `+' for long-named options.
23156
23157 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23158
23159 * src/files.c: Added <unistd.h> for unlink().
23160
23161 * src/Makefile.am, src/system.h:
23162 I18n fixes.
23163
23164 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23165
23166 * README: Added a FAQ list.
23167
23168 * configure.in, acconfig.h:
23169 I18n fixes.
23170
23171 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23172
23173 * doc/FAQ, doc/Makefile.am:
23174 Added a FAQ list.
23175
23176 1999-05-19 Jesse Thilo <jthilo@gnu.org>
23177
23178 * src/alloc.h, src/symtab.h, src/version.c:
23179 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23180
23181 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23182
23183 * src/.cvsignore, src/Makefile.am:
23184 Reorganized: sources in `src', documentation in `doc'.
23185
23186 * src/lex.c (literalchar):
23187 fixed the code for escaping double quotes (thanks
23188 Jonathan Czisny.)
23189
23190 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23191
23192 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23193 Adjusted paths to reflect directory reorganization.
23194
23195 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23196
23197 * doc/.cvsignore, doc/Makefile.am:
23198 Reorganized: sources in `src', documentation in `doc'.
23199
23200 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23201
23202 * configure.in:
23203 Updated AC_INIT file to reflect directory reorganization.
23204
23205 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23206 Reorganized: sources in `src', documentation in `doc'.
23207
23208 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23209
23210 * src/allocate.c:
23211 Don't declare calloc() and realloc() if not necessary.
23212
23213 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23214
23215 * configure.in, acconfig.h, acinclude.m4:
23216 Don't declare calloc() and realloc() if not necessary.
23217
23218 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23219
23220 * po/.cvsignore: Added i18n support.
23221
23222 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23223
23224 * acconfig.h, configure.in, Makefile.am:
23225 Added i18n support.
23226
23227 1999-03-22 Jesse Thilo <jthilo@gnu.org>
23228
23229 * src/bison.s1: Fixed #line numbers.
23230
23231 1999-03-15 Jesse Thilo <jthilo@gnu.org>
23232
23233 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23234 Added PO files from Translation Project.
23235
23236 1999-03-03 Jesse Thilo <jthilo@gnu.org>
23237
23238 * Makefile.am:
23239 Added support for non-ANSI compilers (ansi2knr).
23240
23241 1999-02-16 Jesse Thilo <jthilo@gnu.org>
23242
23243 * configure.in: Bumped version number to 1.27.
23244
23245 * Makefile.am:
23246 Added `bison.simple' to list of files removed by `make distclean'.
23247
23248 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23249
23250 * src/files.c, src/files.h:
23251 Defined locations of parser files in config.h instead of Makefile.
23252
23253 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23254
23255 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23256 Defined locations of parser files in config.h instead of Makefile.
23257
23258 1999-02-09 Jesse Thilo <jthilo@gnu.org>
23259
23260 * Makefile.am:
23261 Removed inappropriate use of $< macro.
23262
23263 1999-02-05 Jesse Thilo <jthilo@gnu.org>
23264
23265 * po/Makefile.in.in, po/POTFILES.in:
23266 Add `po' directory skeleton.
23267
23268 1999-01-27 Jesse Thilo <jthilo@gnu.org>
23269
23270 * README: Document help-bison list.
23271
23272 * configure.in: Add check for mkstemp().
23273
23274 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23275
23276 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23277 Hush a few compiler warnings.
23278
23279 * src/files.c:
23280 Add tryclose(), which verifies that fclose was successful.
23281 Hush a couple of compiler warnings.
23282
23283 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23284
23285 * Makefile.am, OChangeLog:
23286 ChangeLog is now automatically generated. Include the old version as
23287 OChangeLog.
23288
23289 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23290
23291 * 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:
23292 Update FSF address.
23293
23294 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23295
23296 * doc/bison.texinfo: Fix formatting glitch.
23297
23298 * doc/bison.texinfo: Update FSF address.
23299
23300 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23301
23302 * acconfig.h: Update FSF address.
23303
23304 1999-01-08 Jesse Thilo <jthilo@gnu.org>
23305
23306 * src/system.h:
23307 Don't define PACKAGE here, since config.h defines it.
23308
23309 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23310
23311 * src/reader.c: Update copyright date.
23312
23313 * src/main.c:
23314 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23315 favor of output directly to stderr (avoids buffer overruns).
23316
23317 * src/reader.c: Some checks for premature EOF.
23318
23319 * 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:
23320 Use prototypes if the compiler understands them.
23321
23322 * src/files.c: Honor TMPDIR on Unix hosts.
23323 Use prototypes if the compiler understands them.
23324
23325 * src/reader.c:
23326 Fix a couple of buffer overrun bugs.
23327 Use prototypes if the compiler understands them.
23328
23329 * src/system.h: Include unistd.h and ctype.h.
23330 Use #ifdef instead of #if for NLS symbols.
23331
23332 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23333
23334 * doc/bison.texinfo:
23335 Delete comment "consider using @set for edition number, etc..." since
23336 we now are doing so.
23337
23338 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23339
23340 * configure.in:
23341 Use prototypes if the compiler understands them.
23342
23343 * NEWS: Document 1.26 highlights.
23344
23345 * Makefile.am: Require Automake 1.3 or later.
23346
23347 * acconfig.h:
23348 Use prototypes if the compiler understands them.
23349
23350 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23351
23352 * src/version.c:
23353 Use VERSION symbol from automake for version number.
23354
23355 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23356
23357 * acconfig.h, configure.in, version.cin:
23358 Use VERSION symbol from automake for version number.
23359
23360 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23361
23362 * Makefile.am:
23363 Distribute original version of simple parser (bison.s1), not built
23364 version (bison.simple).
23365
23366 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23367
23368 * doc/bison.texinfo: Add info dir entry.
23369
23370 * doc/bison.texinfo:
23371 Let automake put version number into documentation.
23372
23373 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23374
23375 * src/bison.cld, src/build.com, src/vmshlp.mar:
23376 Add non-RCS files from /gd/gnu/bison.
23377
23378 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23379
23380 * doc/bison.1:
23381 Document the BISON_HAIRY and BISON_SIMPLE variables.
23382
23383 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23384
23385 * src/version.c: Build version.c automatically.
23386
23387 * src/reader.c:
23388 Fix token numbering (used to start at 258, not 257).
23389
23390 * src/system.h: Include config.h.
23391
23392 * src/getargs.c: Update bug report address.
23393
23394 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23395 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23396
23397 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23398
23399 * Makefile.am:
23400 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23401
23402 * configure.in, version.cin:
23403 Build version.c automatically.
23404
23405 * AUTHORS: Add AUTHORS file.
23406
23407 * README: Update bug report address.
23408
23409 * bison.simple:
23410 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23411
23412 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23413 Add automake stuff.
23414
23415 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23416
23417 * doc/bison.texinfo: Clean up some formatting.
23418
23419 1998-05-05 Richard Stallman <rms@gnu.org>
23420
23421 * doc/bison.texinfo:
23422 Explain better why to make a pure parser.
23423
23424 1998-01-05 Richard Stallman <rms@gnu.org>
23425
23426 * src/files.c (openfiles):
23427 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23428 find a temporary directory, if possible. Do not unlink files while
23429 they are open.
23430
23431 1997-08-25 Richard Stallman <rms@gnu.org>
23432
23433 * src/reader.c (stack_offset;):
23434 Change some warni to warns.
23435
23436 * src/lex.c (literalchar): Use warns, not warni.
23437
23438 1997-06-28 Richard Stallman <rms@gnu.org>
23439
23440 * src/bison.s1: Add a Bison version comment.
23441
23442 * src/main.c (fatal, warn, berror):
23443 Use program_name.
23444
23445 1997-06-28 Richard Stallman <rms@gnu.org>
23446
23447 * Makefile.in (bison_version): New variable.
23448 (dist): Use that variable.
23449 (bison.s1): Substitute the Bison version into bison.simple.
23450
23451 * bison.simple: Add a Bison version comment.
23452
23453 1997-06-18 Richard Stallman <rms@gnu.org>
23454
23455 * src/main.c (fatal, warn, berror):
23456 Make error messages standard.
23457 (toomany): Improve error message text.
23458
23459 * 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:
23460 new.h renamed to alloc.h.
23461
23462 1997-06-18 Richard Stallman <rms@gnu.org>
23463
23464 * Makefile.in: new.h renamed to alloc.h.
23465
23466 1997-05-24 Richard Stallman <rms@gnu.org>
23467
23468 * src/lex.c (literalchar):
23469 Fix the code for escaping \, " and '.
23470
23471 (lex): Avoid trouble when there are many chars
23472 to discard in a char literal with just several chars in it.
23473
23474 1997-05-17 Richard Stallman <rms@gnu.org>
23475
23476 * src/bison.s1:
23477 Use malloc, if using alloca is troublesome.
23478 (YYSTACK_USE_ALLOCA): New flag macro.
23479 Define it for some systems and compilers.
23480 (YYSTACK_ALLOC): New macro.
23481 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23482 If it was malloc'd, free it.
23483
23484 1997-05-17 Richard Stallman <rms@gnu.org>
23485
23486 * bison.simple:
23487 Use malloc, if using alloca is troublesome.
23488 (YYSTACK_USE_ALLOCA): New flag macro.
23489 Define it for some systems and compilers.
23490 (YYSTACK_ALLOC): New macro.
23491 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23492 If it was malloc'd, free it.
23493
23494 1997-04-23 Richard Stallman <rms@gnu.org>
23495
23496 * src/bison.s1:
23497 (alloca) [__hpux]: Always define as __builtin_alloca.
23498
23499 1997-04-23 Richard Stallman <rms@gnu.org>
23500
23501 * bison.simple:
23502 (alloca) [__hpux]: Always define as __builtin_alloca.
23503
23504 1997-04-22 Richard Stallman <rms@gnu.org>
23505
23506 * src/bison.s1:
23507 [__hpux]: Include alloca.h (right for HPUX 10)
23508 instead of declaring alloca (right for HPUX 9).
23509
23510 * src/bison.s1 (__yy_memcpy):
23511 Declare arg `count' as unsigned int.
23512 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23513
23514 1997-04-22 Richard Stallman <rms@gnu.org>
23515
23516 * bison.simple:
23517 [__hpux]: Include alloca.h (right for HPUX 10)
23518 instead of declaring alloca (right for HPUX 9).
23519
23520 * bison.simple (__yy_memcpy):
23521 Declare arg `count' as unsigned int.
23522 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23523
23524 1997-01-03 Richard Stallman <rms@gnu.org>
23525
23526 * src/allocate.c: [__STDC__ or _MSC_VER]:
23527 Declare calloc and realloc to return void *.
23528
23529 1997-01-02 Richard Stallman <rms@gnu.org>
23530
23531 * src/system.h:
23532 [_MSC_VER]: Include stdlib.h and process.h.
23533 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23534
23535 * src/main.c (main): Return FAILURE as a value.
23536 (printable_version): Declare arg as int, not char.
23537
23538 1997-01-02 Richard Stallman <rms@gnu.org>
23539
23540 * Makefile.in (dist):
23541 Explicitly check for symlinks, and copy them.
23542
23543 1996-12-19 Richard Stallman <rms@gnu.org>
23544
23545 * src/files.c:
23546 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23547
23548 1996-12-18 Paul Eggert <eggert@gnu.org>
23549
23550 * src/bison.s1 (yyparse):
23551 If __GNUC__ and YYPARSE_PARAM are both defined,
23552 declare yyparse to have a void * argument.
23553
23554 1996-12-18 Paul Eggert <eggert@gnu.org>
23555
23556 * bison.simple (yyparse):
23557 If __GNUC__ and YYPARSE_PARAM are both defined,
23558 declare yyparse to have a void * argument.
23559
23560 1996-12-17 Richard Stallman <rms@gnu.org>
23561
23562 * src/reduce.c (nbits): Add some casts.
23563
23564 1996-08-12 Richard Stallman <rms@gnu.org>
23565
23566 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23567
23568 1996-08-12 Richard Stallman <rms@gnu.org>
23569
23570 * bison.simple: Test _MSDOS as well as _MSDOS_.
23571
23572 1996-07-31 Richard Stallman <rms@gnu.org>
23573
23574 * src/bison.s1:
23575 [__sun && __i386]: Include alloca.h.
23576
23577 1996-07-31 Richard Stallman <rms@gnu.org>
23578
23579 * bison.simple:
23580 [__sun && __i386]: Include alloca.h.
23581
23582 1996-07-30 Richard Stallman <rms@gnu.org>
23583
23584 * src/bison.s1: Comment change.
23585
23586 * src/bison.s1: Test _MSDOS_, not MSDOS.
23587
23588 1996-07-30 Richard Stallman <rms@gnu.org>
23589
23590 * bison.simple: Comment change.
23591
23592 * bison.simple: Test _MSDOS_, not MSDOS.
23593
23594 1996-06-01 Richard Stallman <rms@gnu.org>
23595
23596 * 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:
23597 Insert `_' macro around many string constants.
23598
23599 * src/main.c:
23600 Insert `_' macro around many string constants.
23601
23602 (main): Call setlocale, bindtextdomain and textdomain.
23603
23604 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23605 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23606 [ENABLE_NLS]: Include libintl.h.
23607 [ENABLE_NLS] (gettext): Define.
23608 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23609 (N_, PACKAGE, LOCALEDIR): New macros.
23610
23611 1996-06-01 Richard Stallman <rms@gnu.org>
23612
23613 * POTFILES.in: New file.
23614
23615 * Makefile.in (allocate.o):
23616 Define target explicitly.
23617
23618 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23619 (LDFLAGS): Set to @LDFLAGS@.
23620 (configure): Run autoconf only if preceding `cd' succeeds.
23621 (bison.s1): Redirect output to temporary file then move the
23622 temporary to the target, rather than redirecting directly to bison.s1.
23623 (clean): Remove config.status and config.log.
23624 (distclean): Don't remove config.status here.
23625
23626 1996-05-12 Richard Stallman <rms@gnu.org>
23627
23628 * src/bison.s1:
23629 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23630
23631 1996-05-12 Richard Stallman <rms@gnu.org>
23632
23633 * bison.simple:
23634 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23635
23636 1996-05-11 Richard Stallman <rms@gnu.org>
23637
23638 * src/bison.s1 (__yy_memcpy):
23639 Really reorder the args, as was supposedly done on Feb 14 1995.
23640 (yyparse): Calls changed accordingly.
23641
23642 1996-05-11 Richard Stallman <rms@gnu.org>
23643
23644 * Makefile.in (dist): Don't use $(srcdir).
23645
23646 * bison.simple (__yy_memcpy):
23647 Really reorder the args, as was supposedly done on Feb 14 1995.
23648 (yyparse): Calls changed accordingly.
23649
23650 1996-01-27 Richard Stallman <rms@gnu.org>
23651
23652 * src/output.c (output_rule_data):
23653 Test YYERROR_VERBOSE in the conditional
23654 around the definition of ttyname.
23655
23656 1995-12-29 Richard Stallman <rms@gnu.org>
23657
23658 * src/bison.s1:
23659 Fix line numbers in #line commands.
23660
23661 1995-12-29 Richard Stallman <rms@gnu.org>
23662
23663 * bison.simple:
23664 Fix line numbers in #line commands.
23665
23666 1995-12-27 Richard Stallman <rms@gnu.org>
23667
23668 * src/bison.s1 (YYPARSE_PARAM_DECL):
23669 In C++, make it always null.
23670 (YYPARSE_PARAM_ARG): New macro.
23671 (yyparse): Use YYPARSE_PARAM_ARG.
23672
23673 1995-12-27 Richard Stallman <rms@gnu.org>
23674
23675 * bison.simple (YYPARSE_PARAM_DECL):
23676 In C++, make it always null.
23677 (YYPARSE_PARAM_ARG): New macro.
23678 (yyparse): Use YYPARSE_PARAM_ARG.
23679
23680 1995-11-29 Richard Stallman <rms@gnu.org>
23681
23682 * doc/bison.texinfo:
23683 Describe literal string tokens, %raw, %no_lines, %token_table.
23684
23685 1995-11-29 Daniel Hagerty <hag@gnu.org>
23686
23687 * doc/bison.texinfo: Fixed update date
23688
23689 1995-10-16 Richard Stallman <rms@gnu.org>
23690
23691 * src/version.c: Version 1.25.
23692
23693 1995-10-16 Richard Stallman <rms@gnu.org>
23694
23695 * NEWS: *** empty log message ***
23696
23697 1995-10-16 Richard Stallman <rms@gnu.org>
23698
23699 * doc/bison.1, doc/bison.rnh:
23700 Add new options.
23701
23702 1995-10-15 Richard Stallman <rms@gnu.org>
23703
23704 * src/vmsgetargs.c, src/getargs.c:
23705 Added -n, -k, and -raw switches.
23706 (noparserflag, toknumflag, rawtoknumflag): New variables.
23707
23708 * src/symtab.h (SALIAS):
23709 New #define for adding aliases to %token.
23710 (struct bucket): Added `alias' field.
23711
23712 * src/reduce.c (reduce_grammar):
23713 Revise error message.
23714 (print_notices): Remove final `.' from error message.
23715
23716 * src/reader.c (reader_output_yylsp):
23717 New function.
23718 (readgram): Use `#if 0' around code that accepted %command
23719 inside grammar rules: The documentation doesn't allow it,
23720 and it will fail since the %command processors scan for the next %.
23721 (parse_token_decl): Extended the %token
23722 declaration to allow a multi-character symbol as an alias.
23723 (parse_thong_decl): New function.
23724 (read_declarations): Added %thong declarations.
23725 (read_declarations): Handle NOOP to deal with allowing
23726 % declarations as another means to specify the flags.
23727 (readgram): Allow %prec prior to semantics embedded in a rule.
23728 (skip_to_char, read_declarations, copy_definition)
23729 (parse_token_decl, parse_start_decl, parse_type_decl)
23730 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23731 (get_type_name, copy_guard, copy_action, readgram)
23732 (get_type, packsymbols): Revised most error messages.
23733 Changed `fatal' to `warnxxx' to avoid aborting for error.
23734 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23735 (read_declarations): Improve the error message for
23736 an invalid character. Do not abort.
23737 (read_declarations, copy_guard, copy_action): Use
23738 printable_version to avoid unprintable characters in printed output.
23739 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23740 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23741 Allow the type of a non-terminal can be given
23742 more than once, as long as all specifications give the same type.
23743
23744 * src/output.c:
23745 (output_headers, output_trailers, output, output_gram)
23746 (output_rule_data): Implement noparserflag variable.
23747 Implement toknumflag variable.
23748 (output): Call reader_output_yylsp to output LTYPESTR.
23749
23750 * src/main.c (main):
23751 If reader sees an error, don't process the grammar.
23752 (fatals): Updated to not use VARARGS1.
23753 (printable_version, int_to_string, warn, warni, warns, warnss)
23754 (warnsss): New error reporting functions. Avoid abort for error.
23755
23756 * src/lex.h:
23757 Added THONG and NOOP for alias processing.
23758 Added SETOPT for the new code that allows setting options with %flags.
23759
23760 * src/lex.c:
23761 Include getopt.h. Add some extern decls.
23762 (safegetc): New function to deal with EOF gracefully.
23763 (literalchar); new function to deal with reading \ escapes.
23764 (lex): Use literalchar.
23765 (lex): Implemented "..." tokens.
23766 (literalchar, lex, parse_percent_token): Made tokenbuffer
23767 always contain the token. This includes growing the token
23768 buffer while reading an integer.
23769 (parse_percent_token): Replaced if-else statement with percent_table.
23770 (parse_percent_token): Added % declarations as another
23771 way to specify the flags -n, -l, and -r. Also added hooks for
23772 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23773 major changes to files.c.
23774 (lex) Retain in the incoming stream a character following
23775 an incorrect '/'.
23776 (skip_white_space, lex): Revised most error messages
23777 and changed fatal to warn to avoid aborting.
23778 (percent_table): Added %thong declarations.
23779
23780 * src/gram.h: Comment changes.
23781
23782 * src/files.c (openfiles, open_extra_files, done):
23783 Add faction flag
23784 and actfile file. Handle noparserflag. Both for -n switch.
23785
23786 * src/conflicts.c (resolve_sr_conflict):
23787 Remove use of alloca.
23788
23789 1995-06-01 Jim Meyering <meyering@gnu.org>
23790
23791 * doc/bison.texinfo: *** empty log message ***
23792
23793 1995-05-06 Richard Stallman <rms@gnu.org>
23794
23795 * src/bison.s1: Comment change.
23796
23797 1995-05-06 Richard Stallman <rms@gnu.org>
23798
23799 * bison.simple: Comment change.
23800
23801 1995-05-03 Richard Stallman <rms@gnu.org>
23802
23803 * src/version.c: Version now 1.24.
23804
23805 * src/bison.s1: Change distribution terms.
23806
23807 * src/version.c: Version now 1.23.
23808
23809 1995-05-03 Richard Stallman <rms@gnu.org>
23810
23811 * doc/bison.texinfo:
23812 Rewrite "Conditions for Using Bison".
23813 Update version to 1.24.
23814
23815 1995-05-03 Richard Stallman <rms@gnu.org>
23816
23817 * bison.simple: Change distribution terms.
23818
23819 1995-02-23 Richard Stallman <rms@gnu.org>
23820
23821 * src/files.c: Test __VMS_POSIX as well as VMS.
23822
23823 1995-02-14 Jim Meyering <meyering@gnu.org>
23824
23825 * src/bison.s1 (__yy_memcpy):
23826 Renamed from __yy_bcopy to avoid
23827 confusion. Reverse FROM and TO arguments to be consistent with
23828 those of memcpy.
23829
23830 1995-02-14 Jim Meyering <meyering@gnu.org>
23831
23832 * bison.simple (__yy_memcpy):
23833 Renamed from __yy_bcopy to avoid
23834 confusion. Reverse FROM and TO arguments to be consistent with
23835 those of memcpy.
23836
23837 1994-11-10 David J. MacKenzie <djm@gnu.org>
23838
23839 * NEWS: reformat
23840
23841 * NEWS: New file.
23842
23843 * Makefile.in (DISTFILES): Include NEWS.
23844
23845 * Makefile.in (DISTFILES):
23846 Include install-sh, not install.sh.
23847
23848 * configure.in: Update to Autoconf v2 macro names.
23849
23850 1994-10-05 David J. MacKenzie <djm@gnu.org>
23851
23852 * Makefile.in: fix typo
23853
23854 * Makefile.in (prefix, exec_prefix):
23855 Let configure set them.
23856
23857 1994-09-28 David J. MacKenzie <djm@gnu.org>
23858
23859 * Makefile.in: Set datadir to $(prefix)/share.
23860
23861 1994-09-15 Richard Stallman <rms@gnu.org>
23862
23863 * src/bison.s1:
23864 Update copyright notice and GPL version.
23865
23866 1994-09-15 Richard Stallman <rms@gnu.org>
23867
23868 * bison.simple:
23869 Update copyright notice and GPL version.
23870
23871 1994-07-12 Richard Stallman <rms@gnu.org>
23872
23873 * src/reduce.c, src/reader.c:
23874 entered into RCS
23875
23876 1994-05-05 David J. MacKenzie <djm@gnu.org>
23877
23878 * Makefile.in: entered into RCS
23879
23880 1994-03-26 Richard Stallman <rms@gnu.org>
23881
23882 * src/bison.s1: entered into RCS
23883
23884 1994-03-26 Richard Stallman <rms@gnu.org>
23885
23886 * bison.simple: entered into RCS
23887
23888 1994-03-25 Richard Stallman <rms@gnu.org>
23889
23890 * src/main.c: entered into RCS
23891
23892 1994-03-24 Richard Stallman <rms@gnu.org>
23893
23894 * src/conflicts.c: entered into RCS
23895
23896 1994-01-02 Richard Stallman <rms@gnu.org>
23897
23898 * Makefile.in: *** empty log message ***
23899
23900 1993-11-21 Richard Stallman <rms@gnu.org>
23901
23902 * src/bison.s1: *** empty log message ***
23903
23904 1993-11-21 Richard Stallman <rms@gnu.org>
23905
23906 * doc/bison.texinfo: entered into RCS
23907
23908 * doc/bison.texinfo: *** empty log message ***
23909
23910 1993-11-21 Richard Stallman <rms@gnu.org>
23911
23912 * bison.simple: *** empty log message ***
23913
23914 1993-10-25 David J. MacKenzie <djm@gnu.org>
23915
23916 * doc/bison.texinfo: *** empty log message ***
23917
23918 1993-10-19 Richard Stallman <rms@gnu.org>
23919
23920 * src/bison.s1: *** empty log message ***
23921
23922 1993-10-19 Richard Stallman <rms@gnu.org>
23923
23924 * bison.simple: *** empty log message ***
23925
23926 1993-10-14 Richard Stallman <rms@gnu.org>
23927
23928 * src/bison.s1: *** empty log message ***
23929
23930 1993-10-14 Richard Stallman <rms@gnu.org>
23931
23932 * bison.simple: *** empty log message ***
23933
23934 1993-09-14 David J. MacKenzie <djm@gnu.org>
23935
23936 * doc/bison.texinfo: *** empty log message ***
23937
23938 1993-09-13 Noah Friedman <friedman@gnu.org>
23939
23940 * Makefile.in: *** empty log message ***
23941
23942 1993-09-10 Richard Stallman <rms@gnu.org>
23943
23944 * src/conflicts.c: *** empty log message ***
23945
23946 * src/system.h: entered into RCS
23947
23948 1993-09-10 Richard Stallman <rms@gnu.org>
23949
23950 * doc/bison.1: entered into RCS
23951
23952 1993-09-06 Noah Friedman <friedman@gnu.org>
23953
23954 * src/version.c: entered into RCS
23955
23956 1993-09-06 Noah Friedman <friedman@gnu.org>
23957
23958 * Makefile.in: *** empty log message ***
23959
23960 1993-07-30 David J. MacKenzie <djm@gnu.org>
23961
23962 * Makefile.in: *** empty log message ***
23963
23964 1993-07-24 Richard Stallman <rms@gnu.org>
23965
23966 * src/bison.s1: *** empty log message ***
23967
23968 1993-07-24 Richard Stallman <rms@gnu.org>
23969
23970 * bison.simple: *** empty log message ***
23971
23972 1993-07-08 David J. MacKenzie <djm@gnu.org>
23973
23974 * Makefile.in: *** empty log message ***
23975
23976 1993-07-04 Richard Stallman <rms@gnu.org>
23977
23978 * src/bison.s1: *** empty log message ***
23979
23980 1993-07-04 Richard Stallman <rms@gnu.org>
23981
23982 * bison.simple: *** empty log message ***
23983
23984 1993-06-26 David J. MacKenzie <djm@gnu.org>
23985
23986 * src/getargs.c: entered into RCS
23987
23988 1993-06-26 David J. MacKenzie <djm@gnu.org>
23989
23990 * doc/bison.texinfo: *** empty log message ***
23991
23992 * doc/bison.1: New file.
23993
23994 1993-06-25 Richard Stallman <rms@gnu.org>
23995
23996 * src/getargs.c: New file.
23997
23998 1993-06-16 Richard Stallman <rms@gnu.org>
23999
24000 * src/bison.s1: *** empty log message ***
24001
24002 1993-06-16 Richard Stallman <rms@gnu.org>
24003
24004 * bison.simple: *** empty log message ***
24005
24006 1993-06-03 Richard Stallman <rms@gnu.org>
24007
24008 * src/bison.s1: New file.
24009
24010 1993-06-03 Richard Stallman <rms@gnu.org>
24011
24012 * doc/bison.texinfo: *** empty log message ***
24013
24014 1993-06-03 Richard Stallman <rms@gnu.org>
24015
24016 * bison.simple: New file.
24017
24018 1993-05-19 Richard Stallman <rms@gnu.org>
24019
24020 * doc/bison.texinfo: New file.
24021
24022 1993-05-07 Noah Friedman <friedman@gnu.org>
24023
24024 * Makefile.in: *** empty log message ***
24025
24026 1993-04-28 Noah Friedman <friedman@gnu.org>
24027
24028 * src/reader.c: *** empty log message ***
24029
24030 1993-04-23 Noah Friedman <friedman@gnu.org>
24031
24032 * src/alloc.h: entered into RCS
24033
24034 1993-04-20 David J. MacKenzie <djm@gnu.org>
24035
24036 * src/version.c: *** empty log message ***
24037
24038 * src/files.c, src/allocate.c:
24039 entered into RCS
24040
24041 * src/reader.c: *** empty log message ***
24042
24043 * src/lex.c: entered into RCS
24044
24045 * src/conflicts.c: New file.
24046
24047 * src/symtab.c: entered into RCS
24048
24049 * src/alloc.h: New file.
24050
24051 * src/LR0.c: entered into RCS
24052
24053 1993-04-18 Noah Friedman <friedman@gnu.org>
24054
24055 * src/reader.c: New file.
24056
24057 * src/version.c: *** empty log message ***
24058
24059 1993-04-18 Noah Friedman <friedman@gnu.org>
24060
24061 * Makefile.in: *** empty log message ***
24062
24063 1993-04-17 Noah Friedman <friedman@gnu.org>
24064
24065 * Makefile.in: *** empty log message ***
24066
24067 1993-04-15 Richard Stallman <rms@gnu.org>
24068
24069 * src/main.c, src/files.c:
24070 New file.
24071
24072 1993-04-15 Noah Friedman <friedman@gnu.org>
24073
24074 * configure.in: entered into RCS
24075
24076 * configure.in: *** empty log message ***
24077
24078 * configure.in: New file.
24079
24080 1993-04-14 Richard Stallman <rms@gnu.org>
24081
24082 * Makefile.in: New file.
24083
24084 1993-04-13 Richard Stallman <rms@gnu.org>
24085
24086 * src/version.c: New file.
24087
24088 1993-03-25 Richard Stallman <rms@gnu.org>
24089
24090 * src/output.c: entered into RCS
24091
24092 1992-09-25 Richard Stallman <rms@gnu.org>
24093
24094 * configure.bat: entered into RCS
24095
24096 1992-06-22 Richard Stallman <rms@gnu.org>
24097
24098 * src/vmsgetargs.c: entered into RCS
24099
24100 1992-06-22 Richard Stallman <rms@gnu.org>
24101
24102 * doc/bison.rnh: entered into RCS
24103
24104 1992-04-20 David J. MacKenzie <djm@gnu.org>
24105
24106 * README: entered into RCS
24107
24108 1992-01-22 Richard Stallman <rms@gnu.org>
24109
24110 * src/machine.h: entered into RCS
24111
24112 1991-12-21 Richard Stallman <rms@gnu.org>
24113
24114 * src/lalr.c, src/closure.c:
24115 entered into RCS
24116
24117 1991-12-20 Richard Stallman <rms@gnu.org>
24118
24119 * src/state.h: entered into RCS
24120
24121 1991-12-18 Richard Stallman <rms@gnu.org>
24122
24123 * src/print.c, src/nullable.c, src/derives.c:
24124 entered into RCS
24125
24126 1991-11-03 David J. MacKenzie <djm@gnu.org>
24127
24128 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24129 entered into RCS
24130
24131 1988-09-09 Richard Stallman <rms@gnu.org>
24132
24133 * src/bison.hairy: entered into RCS
24134
24135 1987-12-16 Richard Stallman <rms@gnu.org>
24136
24137 * REFERENCES: entered into RCS
24138
24139
24140 -----
24141
24142 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
24143 Inc.
24144
24145 Copying and distribution of this file, with or without
24146 modification, are permitted provided the copyright notice and this
24147 notice are preserved.