]> git.saurik.com Git - bison.git/blame - ChangeLog
doc: clean up references to `Tracking Locations'.
[bison.git] / ChangeLog
CommitLineData
303834cc
JD
12011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
2
3 doc: clean up references to `Tracking Locations'.
4 * doc/bison.texinfo (Locations): Rename node to...
5 (Tracking Locations): ... this, which is its section name, and
6 update all cross references. The trouble is that there is another
7 node about locations. Its section name is `Locations', which was
8 easily confused with the node name of this node. Moreover, its
9 node name is `Locations Overview', which was mistakenly used to
10 label some cross references to this node.
11
a7b15ab9
JD
122011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
13
14 doc: clean up `Named References' a little.
15 * doc/bison.texinfo (Named References): Rename section to match
16 the node name, and update all cross references. Don't use the
17 acronyms RHS and LHS given that we don't expand them anywhere in
18 the manual. Try to use @samp and @code properly. Mention that
19 named references are experimental as we've already stated in NEWS.
20 (Destructor Decl): Expand the only remaining use of RHS or LHS.
21
a40e77eb
JD
222011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
23
24 doc: motivate named references.
25 Suggested by Hans Aberg at
26 <http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html>.
27 * doc/bison.texinfo (Named References): Explain briefly how
28 they're better than the traditional positional references.
29
378e917c
JD
302011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
31
32 doc: discuss named references after locations.
33 Reported by Hans Aberg at
34 <http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html>.
35 * NEWS (2.5.1): Document.
36 * doc/bison.texinfo (Named References): Because it discusses
37 locations in addition to semantic values, move this subsection out
38 of the section `Defining Language Semantics', where locations have
39 not yet been introduced, to be a new section after the following
40 section, `Tracking Locations'.
41
df6e3db0
JD
422011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
43
44 Prepare for the possibility of a 2.5.1 release.
45 * NEWS (2.5.1): New heading.
46
28801043
JD
472011-05-14 Joel E. Denny <joeldenny@joeldenny.org>
48
49 Version 2.5.
50 * NEWS (2.5): Set date.
51
84f6a6ca
JD
522011-05-14 Joel E. Denny <joeldenny@joeldenny.org>
53
54 Don't use IF_LINT in Bison sources.
55 It creates unnecessary differences between the sources that Bison
56 maintainers build and test (given that maintainers normally
57 configure with --enable-gcc-warnings) and the sources that Bison
58 users build. Instead, use PACIFY_CC, which doesn't. This change
59 fixes compiler warnings reported by Tys Lefering at
60 <http://lists.gnu.org/archive/html/bison-patches/2011-05/msg00004.html>.
61 * configure.ac: Don't AC_DEFINE lint regardless of the configure
62 options. This change affects imported gnulib sources, where
63 IF_LINT still appears and depends on lint.
64 * src/scan-gram.l, src/scan-skel.l: Replace uses of IF_LINT with
65 PACIFY_CC.
66 * src/system.h (IF_LINT): Remove cpp macro.
67 (PACIFY_CC): New cpp macro.
68
1f36f544
JD
692011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
70
71 Fix precedence for end token.
72 Since Bison 2.3b, which restored the ability of precedence
73 directives to assign user token numbers, doing so for user token
74 number 0 has produced an assertion failure.
75 * NEWS (2.5): Document fix.
76 * src/symtab.c (symbol_user_token_number_set): In the case of the
77 end token, don't decrement ntokens if it was never incremented.
78 * tests/regression.at (Token number in precedence declaration):
79 Extend.
80
ba60c395
JD
812011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
82
83 Pacify -DGNULIB_POSIXCHECK.
84 * bootstrap.conf (gnulib_modules): Add all modules suggested by
85 -DGNULIB_POSIXCHECK.
86 * src/files.c (file_name_split)
87 * src/getargs.c (getargs)
88 * src/location.c (boundary_set_from_string)
89 * src/output.c (output_skeleton)
90 * src/parse-gram.y (prologue_declaration)
91 * src/scan-gram.l (handle_syncline)
92 * src/symtab.c (symbol_new): Use mbschr and mbsrchr instead of
93 strchr and strrchr. In the cases of command-line options, file
94 names, and thus locations, functionality may be improved. In the
95 case of symbol names, there should be no functional difference as
96 all characters are ASCII, so the intended benefit is just warning
97 suppression.
98
7262f54f
JD
992011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
100
101 * NEWS (2.5): Fix minor typos.
102
4b568fc0
JD
1032011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
104
105 doc: clean up quotation style in NEWS.
106 * NEWS (2.5): For multi-character tokens in example grammar rules,
107 use "token" not 'token'. In English, use a consistent quotation
108 style; we might as well follow the precedent seen in info pages:
109 `quote' not "quote".
110
9fc4c025
JD
1112011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
112
113 tests: pacify gcc 4.6.0's -Wunused-but-set-variable.
114 Reported by Jim Meyering at
115 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
116 * tests/actions.at
117 (Default %printer and %destructor for mid-rule values): Define
118 YYLLOC_DEFAULT so that it uses its Rhs argument.
119
67b8cfbd
JD
1202011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
121
122 glr.c: omit yyresolveLocations when locations are disabled.
123 This prevents gcc 4.6.0's -Wunused-but-set-variable from warning
124 about yyresolveLocations's local yyrhsloc. When locations are
125 enabled, there's no such warning because YYLLOC_DEFAULT then uses
126 yyrhsloc. Reported by Jim Meyering at
127 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
128 * data/glr.c (yyresolveLocations): Omit definition when locations
129 are disabled.
130 (yyresolveValue): Omit yyresolveLocations invocation when
131 locations are disabled.
132
a801089c
JD
1332011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
134
135 gnulib, autoconf: update.
136 * README-hacking (Updating a submodule): Give advice on how to
137 determine the versions of gnulib and autoconf to which we should
138 update.
139 (Release Procedure): Note that submodules should be updated.
140 * bootstrap.conf (gnulib_modules): Rename pipe to spawn-pipe as
141 suggested in updated gnulib NEWS.
142 * gnulib: Choose a stable snapshot according to advice in Bison's
143 README-hacking.
144 * po/POTFILES.in (lib/pipe.c): Rename to...
145 (lib/spawn-pipe.c): ... this.
146 * src/output.c: Update to include spawn-pipe.h.
147 * submodules/autoconf: Update to latest for improvement in m4.m4
148 that excludes M4 with buggy strstr. The only other changes to
149 files that we use are copyright updates.
150
2f658d53
JD
1512011-04-09 Joel E. Denny <joeldenny@joeldenny.org>
152
153 Fix missing updates to GPLv3.
154 Reported by Tys Lefering at
155 <http://lists.gnu.org/archive/html/bison-patches/2011-04/msg00000.html>.
156 * src/print-xml.c, src/print-xml.h: In these files.
157
786743d5
JD
1582011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
159
160 Add -Wconflicts-sr and -Wconflicts-rr.
161 Thus, conflict reports are now affected by -Werror and -Wnone
162 (unless %expect or %expect-rr is specified). Reported by George
163 Neuner at
164 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
165 * NEWS (2.5): Document.
166 * doc/bison.texinfo (Bison Options): Document.
167 * src/complain.c, src/complain.h (set_warning_issued): Export
168 function.
169 * src/conflicts.c (conflicts_print): Suppress conflict report
170 based on -Wno-conflicts-sr and -Wno-conflicts-rr, and treat
171 conflicts as errors if -Werror.
172 * src/getargs.c (warnings_flag): Initialize with
173 warnings_conflicts_sr and warnings_conflicts_rr as well.
174 (warnings_args, warnings_types): Add entries for
175 warnings_conflicts_sr and warnings_conflicts_rr.
176 (usage): Update.
177 * src/getargs.h (enum warnings): Add entries for
178 warnings_conflicts_sr and warnings_conflicts_rr.
179 * tests/conflicts.at (-W versus %expect and %expect-rr): New test
180 group.
181 * tests/local.at (AT_BISON_CHECK_NO_XML): Update now that the
182 conflict report can produce a "warnings being treated as errors"
183 message. Also, check that stderr is now fully scrubbed by -Wnone
184 when the exit status is 0.
185
e4a14879
JD
1862011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
187
188 Pacify maintainer-check-posix.
189 Adding command-line options after the grammar file name is not
190 permitted, so disable checks that do that when
191 maintainer-check-posix is running.
192 * tests/local.at (AT_BISON_CHECK_NO_XML): Don't run the
193 problematic checks when POSIXLY_CORRECT=1. Also, for readability,
194 remove an unnecessary m4_if.
195
c39014ae
JD
1962011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
197
198 Add -Wother so -Wnone suppresses all warnings.
199 Reported by George Neuner at
200 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
201 * NEWS (2.5): Document.
202 * THANKS (George Neuner): Add.
203 * doc/bison.texinfo (Bison Options): Document.
204 * src/complain.c, src/complain.h
205 (warn_at, warn_at_indent, warn): Suppress warning if -Wno-other.
206 (midrule_value_at): New warning function, similar to yacc_at in
207 that it's controlled by its own warning category.
208 * src/getargs.c (warnings_flag): Initialize to warnings_other.
209 (warnings_args, warnings_types): Add entry for warnings_other.
210 (usage): Update.
211 * src/getargs.h (enum warnings): Add entry for warnings_other.
212 * src/gram.c (grammar_rules_useless_report): If -Wno-other, then
213 don't print useless rules.
214 * src/reader.c (symbol_should_be_used): Rather than adjusting the
215 return value based on whether midrule value warnings are enabled,
216 accept a new parameter for telling the caller whether true is
217 being returned for a potential midrule warning.
218 (grammar_rule_check): Use midrule_value_at for midrule value
219 warnings, and continue to use warn_at for all other warnings. Let
220 them check whether the warnings are enabled.
221 * tests/local.at (AT_BISON_CHECK): Update documentation.
222 (AT_BISON_CHECK_NO_XML): Check that -Wnone and --warnings=none
223 disable all warnings exercised in the test suite.
224
bf0e44e8
JD
2252011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
226
227 Don't let -Wnone disable -Werror.
228 Discussed at
229 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00009.html>.
230 * NEWS (2.5): Document.
231 * src/getargs.c (flags_argmatch): Accept a new argument that
232 specifies what flags "all" and thus "none" affect.
233 (FLAGS_ARGMATCH): Update flags_argmatch invocation.
234 * tests/input.at (-Werror is not affected by -Wnone and -Wall):
235 New test group.
236
86408959
JD
2372011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
238
239 * NEWS (2.5): Document fix for -Wno-CATEGORY.
240
709c7d11
JD
2412011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
242
243 doc: fix confusing citation of LAC publication.
244 Suggested by Akim Demaille.
245 * doc/bison.texinfo (LAC): Here.
246
f0ad1b2f
JD
2472011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
248
249 lr.default-reductions: rename "full" value to "most".
250 Unlike "consistent" and "accepting", "full" doesn't answer the
251 question of "which states".
252 * doc/bison.texinfo (%define Summary): Update.
253 (Default Reductions): Update.
254 * src/print.c (print_reductions): Update.
255 * src/reader.c (prepare_percent_define_front_end_variables):
256 Update.
257 * src/tables.c (action_row): Update.
258 * tests/input.at (%define enum variables): Update.
259 * tests/reduce.at (%define lr.default-reductions): Update.
260
f9d52903
JD
2612011-03-13 Joel E. Denny <joeldenny@joeldenny.org>
262
263 * src/parse-gram.c, src/parse-gram.h: Regenerate.
264
a4d1bf6a
AD
2652011-03-09 Akim Demaille <akim@lrde.epita.fr>
266
267 named references: fix double free.
268 In `rhs[name]: "a" | "b"', do not free "name" twice.
269 Reported by Tys Lefering.
270 <http://lists.gnu.org/archive/html/bug-bison/2010-06/msg00002.html>
271 * src/named-ref.h, src/named-ref.c (named_ref_copy): New.
272 * src/parse-gram.y (current_lhs): Rename as...
273 (current_lhs_symbol): this.
274 (current_lhs): New function. Use it to free the current lhs
275 named reference.
276 * src/reader.c: Bind lhs to a copy of the current named reference.
277 * src/symlist.c: Rely on free (0) being valid.
278 * tests/named-refs.at: Test this.
279
17d7bf83
AD
2802011-03-09 Akim Demaille <akim@lrde.epita.fr>
281
282 tests: style changes.
283 * tests/named-refs.at (Redundant words in LHS brackets)
284 (Unresolved references): here.
285
02803d55
JD
2862011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
287
288 java: fix parser tracing bug.
289 * NEWS (2.5): Document.
290 * data/lalr1.java (YYParser::YYStack::print): Don't skip top
291 element.
292
1a33f4f6
JD
2932011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
294
295 java: finish fixing parser stack popping bug.
296 * NEWS (2.5): Document.
297 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
298 in clearing the location stack. Also fix pop function that
299 accepts no arguments.
300
3f8ffd15
AB
3012011-03-06 Angelo Borsotti <angelo.borsotti@gmail.com> (tiny change)
302
303 java: fix parser stack popping bug.
304 Reported at
305 <http://lists.gnu.org/archive/html/bug-bison/2011-02/msg00005.html>.
306 * THANKS (Angelo Borsotti): Add.
307 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
308 in clearing the value stack. Previously, the top element of the
309 stack wasn't cleared and so the value was not garbage collected.
310
15e46f2d
JD
3112011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
312
313 doc: cite publication for LAC.
314 * doc/bison.texinfo (LAC): Here.
315
cc09e5be
JD
3162011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
317
318 doc: clean up terminology for mysterious conflicts.
319 * doc/bison.texinfo (Mystery Conflicts): Rename node to...
320 (Mysterious Conflicts): ... this, which is already the section
321 title and the name used in the index. Update all cross-references
322 to this node. Also, don't imply that R/R conflicts are the only
323 kind of mysterious conflict.
324
32493bc8
JD
3252011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
326
327 lr.default-reductions: rename "all" value to "full".
328 States that shift the error token do not have default reductions,
329 and GLR disables some default reductions, so "all" was a misnomer.
330 * doc/bison.texinfo (%define Summary): Update.
331 (Default Reductions): Update.
332 * src/print.c (print_reductions): Update.
333 * src/reader.c (prepare_percent_define_front_end_variables):
334 Update.
335 * src/tables.c (action_row): Update.
336 * tests/input.at (%define enum variables): Update.
337 * tests/reduce.at (%define lr.default-reductions): Update.
338
7fceb615
JD
3392011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
340
341 doc: create a new Tuning LR section in the manual.
342 And clean up all other documentation of the features described
343 there.
344 * NEWS (2.5): Tweak wording of lr.type and parse.lac entries a
345 bit, update the cross-references to the manual, and point out that
346 LAC has caveats. Don't be so adamant that IELR+LAC=canonical LR.
347 That is, as the referenced section in the manual documents, LAC
348 does not fix infinite parsing loops on syntax errors.
349 * doc/bison.texinfo: Consistently drop the "(1)" suffix from LALR,
350 IELR, and LR in @cindex.
351 (%define Summary): Condense the entries for lr.default-reductions,
352 lr.keep-unreachable-states, lr.type, and parse.lac into brief
353 summaries, and cross-reference the appropriate subsections of
354 Tuning LR. For parse.lac, mention that it's only implemented for
355 deterministic parsers in C. In parse.error entry, mention LAC,
356 and add cross-reference to the LAC section.
357 (Error Reporting): When mentioning parse.error, mention LAC, and
358 add cross-reference to the LAC section.
359 (Tuning LR): New section with an extended version of the
360 documentation removed from %define Summary. Change all
361 cross-references in the manual to point here instead of there.
362 (Calc++ Parser): When mentioning parse.error, mention LAC, and add
363 cross-reference to the LAC section.
364 (Table of Symbols): In %error-verbose entry, add cross-reference
365 to Error Reporting.
366 (Glossary): Capitalize entry titles consistently. Add definitions
367 for "defaulted state" and "unreachable state". Expand IELR
368 acronym in IELR's entry.
369
5e528941
JD
3702011-02-20 Joel E. Denny <joeldenny@joeldenny.org>
371
372 doc: add bibliography to manual.
373 * doc/bison.texinfo (Mystery Conflicts): Cross-reference
374 bibliography instead of citing publications directly.
375 (Generalized LR Parsing): Likewise.
376 (Bibliography): New section. Not all entries are cross-referenced
377 yet, but that will come in future patches.
378
6771a463
JD
3792011-02-19 Joel E. Denny <joeldenny@joeldenny.org>
380
381 java: test and document previous bug fix.
382 * NEWS (2.5): Document it.
383 * tests/java.at (_AT_DATA_JAVA_CALC_Y): To one of the yyerror
384 invocations, pass a location that spans multiple tokens. Change
385 yyerror to report all of a location rather than just the begin
386 position. Extend yylex and Position to count tokens on a line.
387 Remove getHashCode as it's unused. Update all expected output.
388
aa3bcdf3
BK
3892011-02-19 Bernd Kiefer <kiefer@dfki.de> (tiny change)
390
391 java: fix location handling bug.
392 Reported at
393 <http://lists.gnu.org/archive/html/bison-patches/2011-02/msg00005.html>.
394 * data/lalr1.java (YYParser::yylloc): For non-empty RHS, fix
395 reversed access to location stack.
396 * THANKS (Bernd Kiefer): Add.
397
84072495
JD
3982011-02-13 Joel E. Denny <joeldenny@joeldenny.org>
399
400 doc: fix some minor inconsistencies.
401 * doc/bison.texinfo (%define Summary): Fix mislabeled entry for
402 lex_symbol.
403 (%code Summary): For consistency with the variable list in the
404 %define Summary, enclose the list of %code qualifiers in a table
405 instead of an itemize.
406
51151d91
JD
4072011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
408
409 doc: clean up new subsections in manual.
410 * doc/bison.texinfo (%define Summary): Reword so it reads well as
411 a separate section. For example, add an intro, and move most of
412 the text outside of the @deffn so it is not indented so far.
413 (%code Summary): Likewise.
414 (Table of Symbols): Reword %code entry to match the %code entry in
415 Decl Summary.
416
35c1e5f0
JD
4172011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
418
419 doc: finish splitting apart the manual's Decl Summary section.
420 Suggested by Akim Demaille at
421 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
422 * doc/bison.texinfo (Decl Summary): Extract most of the %define
423 entry into...
424 (%define Summary): ... this new subsection, and update all
425 cross-references. For readability of the patches, rewriting of
426 the text so it makes sense as a separate subsection will come in a
427 later patch. Moreover, the majority of the text describing the
428 various new LR features should likely move to another new section
429 somewhere.
430
e0c07222
JD
4312011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
432
433 doc: begin to split apart the manual's Decl Summary section.
434 Discussed in thread starting at
435 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
436 * doc/bison.texinfo (Decl Summary): Extract most of the %code
437 entry into...
438 (%code Summary): ... this new subsection, and update all
439 cross-references. For readability of the patches, rewriting of
440 the text so it makes sense as a separate subsection will come in a
441 later patch.
442
ff7571c0
JD
4432011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
444
445 doc: clean up naming of various Bison files.
446 The Bison manual's names for various files associated with a Bison
447 parser has devolved into inconsistency. This patch makes the
448 naming consistent for the most important files. First, it chooses
449 "grammar file" over "input file". The former appears to be more
450 traditional in the Bison manual, and Bison has other input
451 files (skeletons). Second, it chooses "parser implementation
452 file" over names like "parser file", "parser source file", "parser
453 source code file", and "parser output file". The new name makes
454 it clearer where Bison generates the main parser implementation,
455 and it is easily distinguishable from "parser header file".
456 * doc/bison.texinfo: Implement throughout.
457
679e9935
JD
4582011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
459
460 doc: give credit to more of Bison's developers.
461 * doc/bison.texinfo (Introduction): Don't imply that only Robert
462 Corbett, Richard Stallman, and Wilfred Hansen have contributed to
463 Bison. However, I don't have time to write a full history, so
464 just point readers to THANKS and ChangeLog.
465
af28d414
JD
4662011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
467
468 doc: document experimental features better.
469 * doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
470 LR(1) are experimental. Mention Java. Normally experimental
471 features probably shouldn't be mentioned in the introduction.
472 However, if Bison's limitations to LALR(1), C, and C++ are so
473 important that they should be mentioned here, then it's important
474 to point out that Bison is beginning to escape those limitations.
475 Moreover, these particular experimental features have very little
476 chance of being removed.
477 * src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
478 experimental.
479
82f3355e
JD
4802011-01-29 Joel E. Denny <joeldenny@joeldenny.org>
481
482 Do not allow identifiers that start with a dash.
483 This cleans up our previous fixes for a bug whereby Bison
484 discarded `.field' in `$-1.field'. The previous fixes were less
485 restrictive about where a dash could appear in an identifier, but
486 the restrictions were hard to explain. That bug was reported and
487 this final fix was originally suggested by Paul Hilfinger. This
488 also fixes a remaining bug reported by Paul Eggert whereby Bison
489 parses `%token ID -123' as `%token ID - 123' and handles `-' as an
490 identifier. Now, `-' cannot be an identifier. Discussed in
491 threads beginning at
492 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
493 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
494 * NEWS (2.5): Update entry describing the dash extension to
495 grammar symbol names. Also, move that entry before the named
496 references entry because the latter mentions the former.
497 * doc/bison.texinfo (Symbol): Update documentation for symbol
498 names. As suggested by Paul Eggert, mention the effect of periods
499 and dashes on named references.
500 (Decl Summary): Update documentation for unquoted %define values,
501 which, as a side effect, can no longer start with dashes either.
502 * src/scan-code.l (id): Implement.
503 * src/scan-gram.l (id): Implement.
504 * tests/actions.at (Exotic Dollars): Extend test group to exercise
505 bug reported by Paul Hilfinger.
506 * tests/input.at (Symbols): Update test group, and extend to
507 exercise bug reported by Paul Eggert.
508 * tests/named-refs.at (Stray symbols in brackets): Update test
509 group.
510 ($ or @ followed by . or -): Likewise.
511 * tests/regression.at (Invalid inputs): Likewise.
512
fe3cae17
JD
5132011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
514
515 * data/yacc.c: Fix last apostrophe warning from xgettext.
516
3c9b20ff
PE
5172011-01-09 Paul Eggert <eggert@cs.ucla.edu>
518
519 Fix minor problems encountered by a fresh bootstrap.
520 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
521 as they confuse xgettext, which tries to parse them as C character
522 constants in a preprocessor directive.
523 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
524 that expression might not promote to int on some platforms.
525 * src/parse-gram.c, src/parse-gram.h: Regenerate.
526
5c9efc75
JD
5272011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
528
529 Improve error messages for `$' or `@' followed by `.' or `-'.
530 Previously, for this special case of an invalid reference, the
531 usual "symbol not found in production:" was printed. However,
532 because the symbol name was parsed as the empty string, that
533 message was followed immediately by a newline instead of a symbol
534 name. In reality, this is a syntax error, so the reference is
535 invalid regardless of the symbols actually appearing in the
536 production. Discussed at
537 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
538 * src/scan-code.l (parse_ref): Report the above case as a syntax
539 error. Other than that, continue to handle this case like any
540 other invalid reference that Bison manages to parse because
541 "possibly meant" messages can still be helpful to the user.
542 * tests/named-refs.at ($ or @ followed by . or -): New test group.
543
8a4281b9
JD
5442011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
545
546 doc: don't use @acronym.
547 Lately, many GNU packages are dropping it. See
548 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
549 * doc/bison.texinfo: Remove all uses.
550
e0319547
AR
5512011-01-05 Alex Rozenman <rozenman@gmail.com>
552
553 Do not allow identifiers that start with a negative number.
554 Reported by Paul Hilfinger as a side effect of named references
555 support at
556 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
557 Suggested by Paul Eggert.
558 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
559 * src/scan-gram.l ({letter}, {id}): Likewise.
560
15fe6bb4
JD
5612011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
562
563 * ChangeLog (2011-01-02): improve description.
564
355bdbdc
JD
5652011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
566
567 maint: don't update copyright years in bootstrap.
568 * .x-update-copyright: Add entry for bootstrap.
569 * bootstrap: Remove 2011 from copyright years. The bootstrap
570 version we're currently using comes from an older version of
571 gnulib.
572 * bootstrap.conf (bootstrap_sync): Add comments explaining this
573 issue.
574
575619af
JD
5752011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
576
577 maint: run "make update-copyright".
578
cb3f7f33
JD
5792011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
580
15fe6bb4 581 maint: prepare to use year ranges in copyright notices.
cb3f7f33 582 * README (Copyright statements): New section explaining the range
15fe6bb4
JD
583 notation. The GNU maintainers document requires this explanation:
584 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
585 I copied our explanation from coreutils.
cb3f7f33
JD
586 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
587 disabled Bison's automated use of ranges.
588 * cfg.mk (update-copyright-env): Likewise.
589
1eb63504
JD
5902011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
591
592 Correct my email address.
593 * ChangeLog: In all recent entries.
594 * THANKS (Joel E. Denny): Here.
595
5962010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
d397d9f0
JD
597
598 doc: cleanup.
599 * NEWS (2.5): Try to sort entries according to how interesting
600 users might find them.
601
1eb63504 6022010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
f1b238df
JD
603
604 doc: cleanup.
605 * NEWS (2.5): Make some minor improvements to wording, and format
606 entries more consistently.
607 * doc/bison.texinfo (Language and Grammar): Point out that IELR
608 and canonical LR are experimental features.
609 (Decl Summary): In list of %define variables, make wording more
610 consistent. Improve discussion of using LALR for GLR.
611
1eb63504 6122010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
fcf834f9
JD
613
614 parse.lac: document.
615 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
616 other corrections to verbose syntax error messages.
617 * doc/bison.texinfo (Decl Summary): Rewrite entries for
618 lr.default-reductions and lr.type to be clearer, to mention
619 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
620 for parse.lac.
621 (Glossary): Add entry for LAC.
622
1eb63504 6232010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
107844a3
JD
624
625 parse.lac: implement exploratory stack reallocations.
626 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
627 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
628 with values of "failures" (default) or "full".
629 (b4_declare_parser_state_variables): Add yyesa, yyes, and
630 yyes_capacity variables.
631 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
632 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
633 LAC requested.
634 (YYCOPY_NEEDED): New cpp macro.
635 (YYCOPY): Define if LAC requested.
636 (yy_lac_stack_realloc): New function implementing stack
637 reallocations. Use YYMAXDEPTH for maximum stack size given that
638 the stack should never need to grow larger than the main state
639 stack needs to grow without LAC.
640 (YY_LAC_ESTABLISH): Update yy_lac invocation.
641 (yy_lac): Add arguments for exploratory stack memory data
642 recorded in the main parser. Invoke yy_lac_stack_realloc when
643 reallocation is necessary.
644 (yysyntax_error): Add the same new arguments and pass them to
645 yy_lac.
646 (yypstate_delete): Free yyes if necessary.
647 (yyesa, yyes, yyes_capacity): #define these to yypstate members
648 in the case of push parsing.
649 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
650 Update yysyntax_error invocations. At yyreturn, free yyes if
651 necessary.
652 * src/parse-gram.y: %define parse.lac full.
653 * tests/input.at (LAC: errors for %define): Extend for
654 parse.lac-memory-trace.
655 * tests/regression.at (LAC: Exploratory stack): Extend to check
656 that stack reallocs happen when expected.
657 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
658 parse.lac.es-capacity-initial.
659
1eb63504 6602010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
bf35c71c
JD
661
662 parse.lac: implement as %define variable.
663 LAC = lookahead correction. See discussion at
664 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
665 However, one point there must be corrected: because of %nonassoc,
666 LAC is *not* always redundant for lr.type=canonical-lr.
667 * data/yacc.c: Accept values of "none" (default) or "full" for
668 parse.lac. Accept %define parse.lac.es-capacity to specify
669 capacity of LAC's temporary exploratory stack. It defaults to 20
670 and, for now, will not grow dynamically.
671 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
672 parse.lac!=none.
673 (YYBACKUP): Invoke YY_LAC_DISCARD.
674 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
675 yy_lac and track when it needs to be invoked
676 (yy_lac): New function that, given the current stack, determines
677 whether a token can eventually be shifted. Return status mimics
678 yyparse return status.
679 (yysyntax_error): Change yystate argument to yyssp so stack top
680 can be passed to yy_lac. If LAC is requested, build expected
681 token list by invoking yy_lac for every token instead of just
682 checking the current state for lookaheads. Return 2 if yy_lac
683 exhausts memory.
684 (yyparse, yypush_parse): Use local variable yy_lac_established and
685 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
686 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
687 is requested.
688 * tests/conflicts.at (%nonassoc and eof): Extend to check the
689 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
690 (parse.error=verbose and consistent errors): Likewise.
691 (LAC: %nonassoc requires splitting canonical LR states): New test
692 group demonstrating how LAC can fix canonical LR.
693 * tests/input.at (LAC: Errors for %define): New test group.
694 * tests/regression.at (LAC: Exploratory stack): New test group.
695 (LAC: Memory exhaustion): New test group.
696
1eb63504 6972010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
10bae98a
JD
698
699 build: use gnulib's new bootstrap_sync option.
700 Now, whenever we update bison's copy of gnulib, bootstrap will
701 update itself the next time it's run.
702 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
703 * bootstrap.conf (bootstrap_sync): Set to true.
704 * gnulib: Update to latest so bootstrap is in sync now.
705
1eb63504 7062010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
d2060f06
JD
707
708 yysyntax_error: fix for consistent error with lookahead.
709 * NEWS (2.5): Document.
710 * data/yacc.c (yysyntax_error): In a verbose syntax error
711 message while in a consistent state with a default action (which
712 must be an error action given that yysyntax_error is being
713 invoked), continue to drop the expected token list, but don't
714 drop the unexpected token unless there actually is no lookahead.
715 Moreover, handle that internally instead of returning 1 to tell
716 the caller to do it. With that meaning of 1 gone, renumber
717 return codes more usefully.
718 (yyparse, yypush_parse): Update yysyntax_error usage. Most
719 importantly, set yytoken to YYEMPTY when there's no lookahead.
720 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
721 unexpected token unless there actually is no lookahead.
722 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
723 pass yyempty_ not yyla.type to yysyntax_error_.
724 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
725 token unless there actually is no lookahead.
726 * data/lalr1.java (YYParser::parse): If there's no lookahead,
727 set yytoken to yyempty_ before invoking yysyntax_error.
728 (YYParser::yysyntax_error): Again, don't drop the unexpected
729 token unless there actually is no lookahead.
730 * tests/conflicts.at (parse.error=verbose and consistent
731 errors): Extend test group to further reveal how the previous
732 use of the simple "syntax error" message was too general. Test
733 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
734 failure.
735 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
736 to...
737 * tests/local.at: ... here.
738 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
739 (AT_BISON_OPTION_POPDEFS): Pop it.
740 (AT_FULL_COMPILE): Extend to handle Java.
741
1eb63504 7422010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
25a648d8
JD
743
744 yysyntax_error: more preparation for readability of next patch.
745 There are no behavioral changes here.
746 * data/glr.c (yyreportSyntaxError): Reorganize.
747 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
748 * tests/conflicts.at (parse.error=verbose and consistent errors):
749 Reorganize.
750
1eb63504 7512010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
b4bbc4a0
JD
752
753 yysyntax_error: prepare for readability of next patches.
754 These are purely whitespace changes that result in ugly code
755 but that make the next couple of patches much easier to read.
756 * data/glr.c (yyreportSyntaxError): Reindent.
757 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
758 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
759 * data/yacc.c (yysyntax_error): Reindent.
760
71431084
JD
7612010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
762
763 Fix memory leak.
764 * src/output.c (prepare_rules): Free temporary array.
765
34db451c
JD
7662010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
767
768 yysyntax_error: improve invocation readability.
769 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
770 invocation, get rid of the while loop, which is misleading
771 because there are really at most two iterations.
772
9d6bc5c4
JD
7732010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
774
775 * ChangeLog: Correct some errors in previous entries.
776
e503b9cb
JD
7772010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
778
779 maint: re-anchor all .gitignore entries.
780 * bootstrap: Copy from gnulib's latest for the fix to
781 automatically anchor entries it constructs.
782 * gnulib: Update to latest just so it has the same bootstrap.
783 * .gitignore, build-aux/.gitignore, doc/.gitignore:
784 * lib/.gitignore, m4/.gitignore, po/.gitignore:
785 * runtime-po/.gitignore: Re-anchor all entries.
786
95aed8db
PE
7872010-10-08 Paul Eggert <eggert@cs.ucla.edu>
788
8ff146cd
PE
789 Fix portability problem on OpenBSD 4.7.
790
791 Jim Meyering reported this in
792 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
793 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
794 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
795 for quite some time.
796 * src/parse-gram.c, src/parse-gram.h: Regenerate.
797 * tests/regression.at: Tamper with the renamed witness.
798
95aed8db
PE
799 Adjust to recent changes to gnulib bootstrap.
800
801 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
802 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
803 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
804 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
805 anymore and don't know of anybody else who does. If someone needs
806 these files, they can resurrect them.
807 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
808 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
809 Omit leading '/', since bootstrap omits it.
810 Adjust file names to match current contents better.
811 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
812 installed just for us.
813 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
814 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
815 needed somehow. Don't have time to look into why.
816 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
817 the GNU malloc behavior, where malloc (0) != NULL unless we're
818 out of storage? If not, we can omit malloc-gnu; but for now I left
819 it in to be safe.
820 (vc_ignore): Remove.
821 (gnulib_mk_hook): New function.
822 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
823 uses that convention.
824
39f5757a
PH
8252010-09-09 Paul Hilfinger <hilfinger@cs.berkeley.edu>
826
827 * data/glr.c (yySymbol): Define as int to avoid compiler warnings about
828 possible change of value.
829
d467f443
PH
8302010-09-08 Paul Hilfinger <hilfinger@cs.berkeley.edu>
831
832 * data/glr.c (yy_reduce_print): Change yyrhsVals to yyvsp to remove
833 compiler errors when using %debug.
834 Add declaration of yylow when locations in use to avoid compilation
835 error.
836 (yyglrReduce): Conditionalize message "Parse ... rejected by rule..."
837 on whether we are in split mode, for consistency with behavior of
838 non-GLR parsing.
839
c49784f5
AD
8402010-09-01 Akim Demaille <demaille@gostai.com>
841
842 Address GCC warnings about shadowed local variables (yyflag).
843 * data/glr.c (YYCHK): Rename yyflag as yychk_flag.
844 (yyprocessOneStack): Reduce the scope of yyaction, yyconflicts,
845 yyrule, and yyflag.
846
64877e5e
JD
8472010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
848
849 Version 2.4.3.
850 * NEWS (2.4.3): Set date.
851
83af6585
JD
8522010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
853
854 maint: add gettext version to release announcements.
855 Suggested by Paul Hilfinger at
856 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
857 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
858 * cfg.mk (bootstrap-tools): Add gettext.
859
93d7dde9
JD
8602010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
861
862 doc: fix -W and %expect documentation some.
863 * NEWS (2.4.3): Mention that there are documentation fixes.
864 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
865 turns conflicts into errors not warnings.
866 (Shift/Reduce): Likewise.
867 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
868
2bfcac9a
JD
8692010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
870
871 -Werror: fix for rules useless in parser after conflicts.
872 * NEWS (2.4.3): Document fix.
873 * src/complain.c (error_message): Extend to handle incomplete
874 error messages so warn and warn_at can be used in more cases.
875 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
876 -Werror is always obeyed.
877 * src/reduce.c (reduce_print): Use warn so that the "warnings
878 being treated as errors" message is printed consistently before
879 the first warning message. This makes testing easier.
880 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
881 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
882 --warnings=error when warnings appear in bison's stderr.
883
c61d4fa1
JD
8842010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
885
886 maint: enable gnits only at stable releases.
887 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
888 version string should disable gnits. Explain in comments.
889
825c88e8
JD
8902010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
891
892 i18n: update.
893 * po/POTFILES.in: Add src/graphviz.c.
894
343c3db8
JD
8952010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
896
897 i18n: fix for gnulib.
898 * po/POTFILES.in: Add remaining gnulib files that have
899 translatable strings.
900
42765f8e
JD
9012010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
902
903 build: fix our adjustments for gnulib files in lib.
904 * configure.ac: For prepending lib/ to the values of config
905 variables, fix detection of empty values. Also, due to recent
906 gnulib changes, add LIBUNISTRING_UNITYPES_H and
907 LIBUNISTRING_UNIWIDTH_H to the list of those variables.
908
e35bc778
JD
9092010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
910
911 maint: use announce-gen's new --mail-headers.
912 * HACKING (Announce): Update instructions.
913 * cfg.mk (announcement_Cc_): Define.
914 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
915 required by latest gnulib.
916 * gnulib: Update to latest.
917
b6ca79e8
JD
9182010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
919
920 tests: handle Valgrind that complains about >&-.
921 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
922 (Output files: -dv >&-): Skip test group if running
923 maintainer-check-valgrind.
924
ca2a6d15
PH
9252010-07-23 Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
926
927 * NEWS: Describe new semantic-predicate feature.
9d6bc5c4
JD
928 * data/c.m4 (b4_predicate_case): New definition.
929 * data/java.m4 (b4_predicate_case): New definition.
930 * data/glr.c (yyimmediate): Add definition.
931 (yydoAction): Remove comment, now obsolete.
932 Do YY_REDUCE_PRINT here.
933 (yyglrReduce): Alter comment to indicate that semantic values
934 need not be deferred.
935 Remove YY_REDUCE_PRINT from here; done in yydoAction.
936 (yyprocessOneStack): Pass immediate flag.
937 Delete stacks rejected by predicates in newly split-off parsers.
938 Change handling of yyerr so that only current stack gets deleted
939 when semantic predicate fails.
940 (yyfillin): Don't crash if a semantic value is unresolved (as may
941 happen in predicate rules).
942 Copy lr state as well in debugging mode.
943 Update comment on setting of yysval to include yyloc as well.
944 (yy_reduce_print): Add yynormal argument. Perform fillin properly.
945 Report unresolved RHS values.
946 (yyimmediate): New table.
947 * src/gram.h (struct rule): Add is_predicate field.
948 * src/output.c (user_actions_output): Use b4_predicate_case for
949 predicates.
950 (prepare_symbols): Output yyimmediate.
951 * src/scan-gram.l: Add %? token, SC_PREDICATE state.
952 * src/scan-code.l (code_props_rule_action_init): Add is_predicate
953 argument.
954 * src/scan-code.h (struct code_props): Add is_predicate field.
955 (code_props_rule_action_init): New interface.
956 * src/parse-gram.y (%?{...}): New token.
957 (rhs): Add %?{...} rule.
958 * src/parse-gram.c: Regenerate.
959 * src/parse-gram.h: Regenerate.
960 * src/reader.c (grammar_current_rule_action_append): Add
961 immediate argument.
962 (grammar_midrule_action): Use new interface for
963 code_props_rule_action_init.
964 (grammar_current_rule_action_append): Ditto.
965 (packgram): Transfer is_predicate value.
966 * src/reader.h (grammar_current_rule_action_append): New interface.
967 * doc/bison.texinfo: Document semantic predicates (%?).
968
969 * data/glr.c (yylhsNonterm, yyisDefaultedState,yyDefaultAction)
970 (yygetLRActions,yynewGLRStackItem,yyaddDeferredAction,yyinitStateSet)
971 (yyinitGLRStack,yyexpandGLRStack,yyupdateSplit,yymarkStackDeleted)
972 (yyundeleteLastStack,yyglrShift,yyglrShiftDefer,yydoAction,yyglrReduce)
973 (yyidenticalOptions,yymergeOptionSets,yyresolveStates,yyresolveAction)
974 (yyresolveLocations,yyresolveValue,yyreducePrint): Update parameter
975 names in comments and mention all parameters.
976 (struct yyGLRState): Fix description of yyposn field.
977 (yyresolveLocations): Correct comment so as not to imply action when
978 yyn1==0.
c49784f5 979
7d424de1
PE
9802010-06-17 Paul Eggert <eggert@cs.ucla.edu>
981
804e83b2
PE
982 Update from GFDL GFDL 1.2 to 1.3.
983 * doc/bison.texinfo: Update GFDL version number.
984 * doc/fdl.texi: Update to version 1.3, taken from:
985 http://www.gnu.org/licenses/fdl.texi
986
7d424de1
PE
987 Do not use date ranges in copyright notices.
988 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
989
990 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
991 * TODO, bootstrap, bootstrap.conf:
992 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
993 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
994 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
995 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
996 * data/lalr1.java, data/local.mk, data/location.cc:
997 * data/stack.hh, data/variant.hh, data/xslt/bison.xsl:
998 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
999 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
1000 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
1001 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
1002 * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h:
1003 * djgpp/testsuite.sed, doc/bison.texinfo, doc/local.mk:
1004 * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk:
1005 * examples/calc++/Makefile.am, examples/extexi:
1006 * examples/local.mk, lib/abitset.c, lib/abitset.h:
1007 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
1008 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
1009 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
1010 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
1011 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
1012 * lib/libiberty.h, lib/local.mk, lib/main.c, lib/timevar.c:
1013 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
1014 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
1015 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
1016 * src/AnnotationList.c, src/AnnotationList.h:
1017 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
1018 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
1019 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
1020 * src/complain.h, src/conflicts.c, src/conflicts.h:
1021 * src/derives.c, src/derives.h, src/files.c, src/files.h:
1022 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
1023 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
1024 * src/ielr.h, src/lalr.c, src/lalr.h, src/local.mk:
1025 * src/location.c, src/location.h, src/main.c:
1026 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
1027 * src/named-ref.h, src/nullable.c, src/nullable.h:
1028 * src/output.c, src/output.h, src/parse-gram.y:
1029 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
1030 * src/print_graph.c, src/print_graph.h, src/reader.c:
1031 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
1032 * src/relation.h, src/scan-code.h, src/scan-code.l:
1033 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
1034 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
1035 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
1036 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
1037 * tests/actions.at, tests/atlocal.in, tests/c++.at:
1038 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
1039 * tests/existing.at, tests/glr-regression.at:
1040 * tests/headers.at, tests/input.at, tests/java.at:
1041 * tests/local.at, tests/local.mk, tests/named-refs.at:
1042 * tests/output.at, tests/push.at, tests/reduce.at:
1043 * tests/regression.at, tests/sets.at, tests/skeletons.at:
1044 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
1045 Don't use date ranges in copyright notices.
1046
38435078
AD
10472010-05-11 Akim Demaille <demaille@gostai.com>
1048
1049 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
1050 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
1051 header file to the implementation file, after the user %code
1052 sections.
1053 * NEWS (2.5): Document this.
1054
e944aaff
AD
10552010-05-11 Akim Demaille <demaille@gostai.com>
1056
1057 doc: please Emacs.
1058 * doc/bison.texinfo (Local Variables): Move this after the
1059 LocalWords, since the latter are looked for in the whole document,
1060 while the former are looked for only at its end.
1061 Require american spell checking.
1062
86e5b440
AD
10632010-05-10 Akim Demaille <demaille@gostai.com>
1064
1065 doc: fix lalr1.cc documentation.
1066 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
1067 (C++ Bison Interface): Fix lalr1.cc skeleton name.
1068 (C++ Parser Interface): Fix semantic_type and location_type names.
1069 Document yy::parser::token.
1070 Reported by Jerry Quinn.
1071
bb9191dd
AD
10722010-05-10 Akim Demaille <demaille@gostai.com>
1073
1074 c++: use YYRHSLOC.
1075 * data/lalr1.cc (YYRHSLOC): New.
1076 (YYLLOC_DEFAULT): Use it.
1077 * data/glr.cc: If location_type was user defined, do not include
1078 location.hh, and do not produce location.hh and position.hh.
1079 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
1080 Check that glr.cc supports user defined location_type.
1081 * NEWS: Document this.
1082
8aec287e
AD
10832010-05-07 Akim Demaille <demaille@gostai.com>
1084
1085 doc: fix typo.
1086 * tests/synclines.at: here.
1087
c826013f
AD
10882010-05-04 Akim Demaille <demaille@gostai.com>
1089
1090 tests: enhance AT_SYNCLINES_COMPILE.
1091 * tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
1092 (AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
1093 taken care of in AT_SYNCLINES_COMPILE.
1094
7789b6e3
AD
10952010-05-04 Akim Demaille <demaille@gostai.com>
1096
1097 lalr1.cc: don't generate location.hh when location_type is defined
1098 * data/bison.m4 (b4_percent_define_get): Accept a default value.
1099 * data/c++.m4: Do not provide a default value for the %define
1100 variable location_type, rather, use b4_percent_define_get with a
1101 default argument where its value is needed.
1102 * data/lalr1.cc: Do not load location.cc (which outputs both
1103 location.hh and position.hh) if the user defined location_type.
1104 Do not include location.hh either.
1105
19ad326b
AD
11062010-05-04 Akim Demaille <demaille@gostai.com>
1107
1108 lalr1.cc: minor refactoring.
1109 * data/lalr1.cc: Don't issue empty namespaces.
1110
f5da8149
AD
11112010-05-04 Akim Demaille <demaille@gostai.com>
1112
1113 tests: fix %printer.
1114 Currently, there is no check that %printer ... <foo> (nor
1115 %destructor) is about an existing <foo> type. This C++ test had
1116 it wrong (<::std::string> vs. <std::string>).
1117
1118 * tests/c++.at (AT_CHECK_VARIANTS): In list.yy, redefine the
1119 pretty-printing of lists into something better for parser traces.
1120 Update the expected output.
1121 Fix correspondance between %type/%token and %printer.
1122
49976d5c
AD
11232010-05-04 Akim Demaille <demaille@gostai.com>
1124
1125 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
1126 * tests/calc.at (Span): Instead of begin/end, as in the built-in
1127 location class, use first and last.
1128 Define YYLLOC_DEFAULT to adjust to these changes.
1129 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
1130 location_type changes.
1131
bc81de36
JD
11322010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
1133
1134 tests: fix maintainer-xml-check.
1135 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
1136 Update output to include comments now produced by --graph.
1137 (xsl:template match="automaton"): As for --graph, name the
1138 digraph after the grammar file.
1139 * src/print-xml.c (escape_bufs): Enlarge array.
1140 (print_xml): Add bug-report and url attributes to
1141 bison-xml-report element.
1142
b7666378
JD
11432010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
1144
1145 In DOT output, convert from "/*" comments to "//" comments.
1146 This handles the possibility that a "*/" might appear in
1147 variable portions of those comments at some point in the future.
1148 * src/graphviz.c (start_graph): Implement.
1149
9b5049bd
JD
11502010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
1151
1152 Document that undefined %prec identifier warnings will remain.
1153 * NEWS (2.4.3): Here.
1154 (2.4.2): Here.
1155
02354690
JD
11562010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
1157
1158 Revert 2009-12-30 change for undefined %prec token complaints.
1159 That is, keep them as warnings because that should be sufficient
1160 to satisfy POSIX without creating backward compatibility issues.
1161 Suggested by Richard Stallman at
1162 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
1163 * NEWS (2.5): Remove mention of complaint.
56e92e0b
JD
1164 * src/reader.c (grammar_rule_check): Convert complaint back to
1165 warning.
02354690
JD
1166 * tests/input.at (%prec's token must be defined): Update.
1167
a7ddefd1
JD
11682010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
1169
1170 build: don't require src/bison during bootstrap.
1171 Suggested by Eric Blake at
1172 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
1173 * bootstrap.conf (bootstrap_epilogue): New function to make sure
1174 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
1175
c1bd4b2b
JD
11762010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
1177
1178 i18n: fix untranslatable string.
1179 Reported by Goran Uddeborg at
1180 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
1181 * src/muscle-tab.c (muscle_percent_define_insert): Here.
1182
67f1a2c2
AD
11832010-04-13 Akim Demaille <demaille@gostai.com>
1184
1185 tests: calc: minor refactoring.
1186 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
1187
4f756f88
AD
11882010-04-13 Akim Demaille <demaille@gostai.com>
1189
1190 tests: calc: simplify location management.
1191 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
1192 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
1193 define the appropriate AT_LOC accessors.
1194 * tests/calc.at: Use AT_LOC accessors.
1195
24bb8c8c
AD
11962010-04-13 Akim Demaille <demaille@gostai.com>
1197
1198 test location_type.
1199 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
1200 Define AT_LOCATION_TYPE_IF.
1201 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
1202 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
1203 used, provide a user location type and use it.
1204 (Simple LALR1 C++ Calculator): Add a test case for location_type.
1205
af129079
AD
12062010-04-13 Akim Demaille <demaille@gostai.com>
1207
1208 tests: check fclose's return value.
1209 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
1210
36dc3637
AD
12112010-04-13 Akim Demaille <demaille@gostai.com>
1212
1213 tests: don't depend on the actual location type.
1214 * tests/calc.at: Use yy::parser::location_type rather than
1215 yy::location, since the former is always right, and might point to
1216 another type than the latter.
1217
c499231d
AD
12182010-04-13 Akim Demaille <demaille@gostai.com>
1219
1220 formatting changes.
1221 * tests/calc.at: Formatting changes.
1222
7799ef15
AD
12232010-04-13 Akim Demaille <demaille@gostai.com>
1224
1225 lalr1.cc: remove useless forward declaration.
1226 * data/lalr1.cc: Include location.hh before stack.hh.
1227 Remove the useless forward declarations of position and location.
1228 Reported by Chris Morley.
1229 * data/glr.cc: Likewise.
1230
06cb07d5
JD
12312010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
1232
1233 * NEWS (2.4.3): Mention fix for Sun Studio C++.
1234
4586c8cd
JD
12352010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
1236
1237 tests: fix for newer Sun Studio C++.
1238 Reported by Dagobert Michelsen at
1239 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
1240 * THANKS (Dagobert Michelsen): Add.
1241 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
1242 Autoconf macro for handling the restrict keyword.
1243 * gnulib: Update to latest, which no longer overrides that macro
1244 from Autoconf.
1245
44c2b42d
JD
12462010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1247
1248 portability: fix pointer arithmetic to conform to C standard.
1249 Reported by Tys Lefering at
1250 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
1251 This fix is already implemented in glr.c and does not apply to
1252 lalr1.java.
1253 * data/lalr1.cc (yy::parser::parse): Increase size of
1254 yyerror_range and adjust subscripting so you don't have to
1255 subtract one from the beginning of the array.
1256 * data/yacc.c (b4_declare_parser_state_variables,
1257 yyparse, yypush_parse): Likewise.
1258
218287f5
AD
12592010-04-05 Akim Demaille <demaille@gostai.com>
1260
1261 remove useless include.
1262 * src/graphviz.h: Don't include stdbool.h.
1263
8176ab33
AD
12642010-04-05 Akim Demaille <demaille@gostai.com>
1265
1266 graph: sign the output file.
1267 * src/graphviz.c (start_graph): Issue comments about Bison.
1268 Suggested by Tys Lefering.
1269
4ad3921d
JD
12702010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
1271
1272 portability: fix test suite for GCC 4.5's new #error message.
1273 Reported by Tys Lefering at
1274 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
1275 * NEWS (2.4.3): Mention.
1276 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
1277
10a697de
AD
12782010-03-30 Akim Demaille <demaille@gostai.com>
1279
1280 fix comments.
1281 * src/graphviz.h: Add missing license notice.
1282 Document.
1283
d6b347e4
AD
12842010-03-25 Akim Demaille <demaille@gostai.com>
1285
1286 tests: fix 250: parse.error=verbose overflow.
1287 * tests/regression.at (parse.error=verbose overflow): Avoid the
1288 double inclusion of stdlib.h as it triggers hard errors.
1289
b8675840
JD
12902010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1291
1292 portability: fix for BSD make.
1293 Reported by Johan van Selst at
1294 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
1295 * tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
1296 this dependency list as in package.m4's target rule.
1297
8b9e021f
JD
12982010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1299
1300 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
1301 Reported by Johan van Selst at
1302 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
1303 * NEWS (2.4.3): New.
1304 * THANKS (Johan van Selst): Add.
1305 * etc/prefix-gnulib-mk (prefix): Adjust regex for makefile
1306 targets so that gnulib's new c++defs.h is matched.
1307 * gnulib: Update to latest.
1308
96a381c5
JD
13092010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1310
1311 maint: update for changes to gnulib's announce-gen.
1312 * HACKING (Announce): RELEASE_TYPE=major must now be written
1313 RELEASE_TYPE=stable.
1314
e19a049c
JD
13152010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1316
1317 Version 2.4.2.
1318 * NEWS (2.4.2): Set version and date. For the recent test suite
1319 portability fixes, don't be so optimistic about their success
1320 given the lack of feedback on the affected platforms.
1321
890aeb28
JD
13222010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1323
1324 tests: fix maintainer-xml-check for recent changes.
1325 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
1326 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
1327 output file whose name conflicts with a previous output file
1328 is now never generated.
1329
f39ab286
JD
13302010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1331
1332 portability: fix several issues with M4 subprocess.
1333
1334 M4's output pipe was not being drained upon fatal errors during
1335 scan_skel. As a result, broken-pipe messages from M4 were seen
1336 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
1337 failure in the test suite. The problem was that, on platforms
1338 where the default disposition for SIGPIPE is ignore instead of
1339 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
1340 then reported it. However, there's some sort of race condition,
1341 because the new test group occasionally succeeded.
1342 Reported by Albert Chin at
1343 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
1344
1345 There were also problems with the test suite livelocking on
1346 Tru64 5.1b. Reported by Didier Godefroy at
1347 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
1348 Switching to create_pipe_bidi suggested by Akim Demaille.
1349
1350 To attempt to solve both of these problems, switch to gnulib's
1351 create_pipe_bidi and register M4 process as a slave. Along the
1352 way, clean up file name conflict handling, which was affected by
1353 the broken-pipe problem before the switch.
1354 * NEWS (2.4.2): Document.
1355 * THANKS (Didier Godefroy): Add.
1356 * bootstrap.conf (gnulib_modules): Add pipe.
1357 * gnulib: Update to latest to make sure we have all the latest
1358 fixes.
1359 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
1360 subpipe.c.
1361 * po/POTFILES.in (lib/subpipe.c): Remove.
1362 * src/files.c (compute_output_file_names): Update invocations
1363 of output_file_name_check.
1364 (output_file_name_check): In the case that the grammar file
1365 would be overwritten, use complain instead of fatal, but replace
1366 the output file name with /dev/null. Use the /dev/null solution
1367 for the case of two conflicting output files as well because it
1368 seems safer in case Bison one day tries to open both files at
1369 the same time.
1370 * src/files.h (output_file_name_check): Update prototype.
1371 * src/output.c (output_skeleton): Use create_pipe_bidi and
1372 wait_subprocess. Assert that scan_skel completely drains the
1373 pipe.
1374 * src/scan-skel.l (at_directive_perform): Update
1375 output_file_name_check invocation.
1376 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
1377 grammar file actually isn't overwritten.
1378 (Conflicting output files: -o foo.y): Update expected output.
1379 * tests/skeletons.at (Fatal errors but M4 continues producing
1380 output): New test group.
1381
e32050b0
JD
13822010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
1383
1384 Update POTFILES.
1385 * HACKING (Release Procedure): Add reminder about keeping
1386 POTFILES files up-to-date.
1387 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
1388
efc4ed4a
JD
13892010-02-01 Joel E. Denny <jdenny@clemson.edu>
1390
1391 Code cleanup.
1392 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
1393 which is already defined in atconfig.
1394
95611b56
JD
13952010-01-22 Joel E. Denny <jdenny@clemson.edu>
1396
1397 tests: fix missing include caught by g++ 4.4.1.
1398 Reported by Tys Lefering.
1399 * HACKING (Release checks): Add note about trying a recent GCC.
1400 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
1401 cstdlib for abort.
1402 (_AT_DATA_EXPECT2_Y): Likewise.
1403
d6e40cba
JD
14042010-01-21 Joel E. Denny <jdenny@clemson.edu>
1405
1406 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
1407
80b70223
JD
14082010-01-21 Joel E. Denny <jdenny@clemson.edu>
1409
1410 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
1411 * HACKING (Release Procedure): Update notes on copyright years.
1412 * Makefile.am (update-package-copyright-year): New target rule.
1413 * build-aux/update-package-copyright-year: New file.
1414 * cfg.mk (update-copyright): Add update-package-copyright-year
1415 as a dependency.
1416
3320a276
JD
14172010-01-19 Joel E. Denny <jdenny@clemson.edu>
1418
1419 * bootstrap: Import improvements from latest gnulib.
1420
e30c0477
JD
14212010-01-19 Joel E. Denny <jdenny@clemson.edu>
1422
1423 build: require Automake 1.11.1 to avoid a security flaw.
1424 * HACKING (Release Procedure): Don't document Automake security
1425 flaw here.
1426 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
1427 why here.
1428
a538eeb1
JD
14292010-01-19 Joel E. Denny <jdenny@clemson.edu>
1430
1431 gnulib: update to latest.
1432
d6bdb90a
JD
14332010-01-19 Joel E. Denny <jdenny@clemson.edu>
1434
1435 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
1436
326e5cf8
JD
14372010-01-15 Joel E. Denny <jdenny@clemson.edu>
1438
1439 Thank the developer of the initial push parser implementation.
1440 This unfortunate oversight is several years old.
1441 * THANKS (Odd Arild Olsen): Add.
1442
fca9c5ef
JD
14432010-01-04 Joel E. Denny <jdenny@clemson.edu>
1444
1445 Fix some comments concerning LR(0) versus LALR(1).
1446
1447 Stop equating LR(0) with nondeterminism and LALR(1) with
1448 determinism. That is, if all states are consistent, then LR(0)
1449 tables are deterministic. On the other hand, LALR(1) tables
1450 might be nondeterministic before conflict resolution, and GLR
1451 permits LALR(1) tables to remain nondeterministic.
1452 * src/LR0.c, src/LR0.h: Here.
1453 * src/lalr.c, src/lalr.h: Here.
1454 * src/main.c (main): Here.
1455 * src/state.c, src/state.h: Here.
1456
1457 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
1458 parser tables.
1459
e141f4d4
JD
14602010-01-04 Joel E. Denny <jdenny@clemson.edu>
1461
1462 maint: run "make update-copyright"
1463
882be728
JD
14642009-12-30 Joel E. Denny <jdenny@clemson.edu>
1465
1466 POSIX: complain if %prec's token was not defined.
1467 * NEWS (2.5): Document.
1468 * src/reader.c (grammar_rule_check): Convert warning to
1469 complaint.
1470 * tests/input.at (%prec's token must be defined): Update.
1471
8bb3a2e7
JD
14722009-12-30 Joel E. Denny <jdenny@clemson.edu>
1473
1474 POSIX: warn if %prec's token was not defined.
1475 Reported by Florian Krohm at
1476 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
1477 * NEWS (2.4.2): Document.
1478 * src/reader.c (grammar_rule_check): Implement.
1479 (grammar_current_rule_prec_set): Add comments explaining that we
1480 here assume a %prec identifier is a token, but we still manage
1481 to support POSIX.
1482 * tests/input.at (%prec's token must be defined): New test
1483 group.
1484
505e1551
JD
14852009-12-31 Joel E. Denny <jdenny@clemson.edu>
1486
1487 * HACKING (Release Procedure): Recommend a secure automake.
1488
b8d19cf8
JD
14892009-12-29 Joel E. Denny <jdenny@clemson.edu>
1490
1491 portability: `<' and `>' are not always defined on addresses.
1492 Specifically, don't sort objects by their memory addresses when
1493 they're not allocated in the same array or other object. Though
1494 I haven't found a test case where that fails on my platform, C
1495 says the behavior is undefined.
1496 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1497 FIXME. Use new id field of InadequacyList nodes rather than
1498 their memory addresses when sorting.
1499 (AnnotationList__compute_from_inadequacies): Add
1500 inadequacy_list_node_count argument to pass to
1501 InadequacyList__new_conflict.
1502 * src/AnnotationList.h
1503 (AnnotationList__compute_from_inadequacies): Update prototype
1504 and documentation for new argument.
1505 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1506 node_count argument and use it to assign a unique ID.
1507 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1508 (InadequacyList): Add id field.
1509 (InadequacyList__new_conflict): Update prototype and
1510 documentation for new argument.
1511 * src/ielr.c (ielr_compute_annotation_lists): Update
1512 AnnotationList__compute_from_inadequacies invocation.
1513
df222dfa
JD
15142009-12-20 Joel E. Denny <jdenny@clemson.edu>
1515
1516 Fix handling of yychar manipulation in user semantic actions.
1517 The problem was that yacc.c didn't always update the yychar
1518 translation afterwards. However, other skeletons appear to be
1519 fine. glr.c appears to already translate yychar before every
1520 use. lalr1.cc does not define yychar and does not document its
1521 replacement, yyla, for users. It does provide yyclearin, but
1522 that does not manipulate yyla and thus requires no translation
1523 update. In lalr1.java, yychar is out of scope during semantic
1524 actions.
1525 * NEWS (2.5): Document.
1526 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1527 yytoken here.
1528 (yyparse, yypush_parse): Instead, translate before every use of
1529 yytoken, and add comments explaining this approach.
1530 * tests/actions.at (Destroying lookahead assigned by semantic
1531 action): New test group checking that translation happens before
1532 lookahead destructor calls at parser return. Previously,
1533 incorrect destructors were called.
1534 * tests/conflicts.at (parse.error=verbose and consistent
1535 errors): New test group checking that translation happens at
1536 syntax error detection before the associated verbose error
1537 message and the associated lookahead destructor calls. While
1538 the destructor call is fixed by this patch, the verbose error
1539 message is currently incorrect due to another bug (see
1540 comments in test group), so this is an expected failure for now.
1541
4395a9ff
JD
15422009-12-21 Joel E. Denny <jdenny@clemson.edu>
1543
1544 YYFAIL: warn about uses and remove from lalr1.java.
1545 * NEWS (2.5): Document.
9d6bc5c4 1546 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
4395a9ff
JD
1547 and make it private. Update all uses.
1548 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1549
1625df5b
JD
15502009-12-21 Joel E. Denny <jdenny@clemson.edu>
1551
1552 YYFAIL: deprecate.
1553 * NEWS (2.4.2): Document deprecation and the phase-out plan.
9d6bc5c4 1554 * data/lalr1.java (YYParser::YYFAIL): Add comment about
1625df5b
JD
1555 deprecation.
1556 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1557 YYFAIL from GCC cpp's -Wunused-macros.
1558 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1559 documentation.
1560 (LocalWords): Remove YYFAIL.
1561
5335b65a
JD
15622009-12-20 Joel E. Denny <jdenny@clemson.edu>
1563
1564 tests: cleanup.
1565 * tests/c++.at (Syntax error discarding no lookahead): Don't
1566 ignore stderr. Instead, eliminate remaining warnings.
1567
d59beda0
JD
15682009-12-18 Joel E. Denny <jdenny@clemson.edu>
1569
1570 lalr1.cc: don't discard non-existent lookahead on syntax error.
9d6bc5c4 1571 * data/lalr1.cc (yy::parser::parse): Check yyempty first.
d59beda0
JD
1572 * tests/c++.at (Syntax error discarding no lookahead): New test
1573 group.
1574
387b4d50
JD
15752009-12-17 Joel E. Denny <jdenny@clemson.edu>
1576
1577 Code cleanup.
1578 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1579 function, which is no longer used.
1580
a603c6e0
JD
15812009-12-16 Joel E. Denny <jdenny@clemson.edu>
1582
1583 Add gcc's -Wundef to test suite and fix another warning from it.
1584 * NEWS (2.4.2): Update description of -Wundef fix.
1585 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1586 (WARN_CFLAGS_TEST): New substitution.
1587 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1588 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1589 WARN_CFLAGS.
1590 (NO_WERROR_CFLAGS): Likewise.
1591 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1592
19750d31
JD
15932009-12-16 Joel E. Denny <jdenny@clemson.edu>
1594
1595 * data/yacc.c: Reformat m4 a little.
1596
c938d650
JD
15972009-12-16 Joel E. Denny <jdenny@clemson.edu>
1598
1599 Document gcc -Wundef fix.
1600 * NEWS (2.4.2): Here.
1601 * THANKS (Jonathan Nieder): Add.
1602
fcd32abd
JN
16032009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1604
1605 Simplify y.tab.c when location tracking is disabled.
1606 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1607 tracking is not enabled. Instead, unconditionally define
1608 YY_LOCATION_PRINT as a no-op for backward compatibility.
1609
ae93128c
JN
16102009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1611
1612 Avoid warnings from gcc -Wundef y.tab.c.
1613 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1614 defined before using them.
1615 * data/lalr1.cc: Likewise.
1616 * data/yacc.c: Likewise.
1617
c843aaab
JD
16182009-12-15 Joel E. Denny <jdenny@clemson.edu>
1619
1620 autoconf: update to latest for fix of M4 detection.
1621 Reported by Eric Blake.
1622 * submodules/autoconf: Update.
1623
5c99151a
JD
16242009-12-15 Joel E. Denny <jdenny@clemson.edu>
1625
1626 portability: use -DGNULIB_POSIXCHECK.
1627 Reported by Eric Blake. See discussions at
1628 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1629 and
1630 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1631 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1632 * bootstrap.conf (gnulib_modules): Add all the printf modules
1633 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1634 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1635 (excluded_files): Remove m4/printf-posix.m4.
1636 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1637 lib/libbison.a so gnulib libraries can be linked.
1638
75f94c6d
JD
16392009-12-15 Joel E. Denny <jdenny@clemson.edu>
1640
1641 gnulib: update for fix of fprintf-posix, which we'll use soon.
1642 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
1643 targets so that gnulib's new arg-nonnull.h and link-warning.h
1644 are matched.
1645 * gnulib: Update.
1646
ca01f454
JD
16472009-12-14 Joel E. Denny <jdenny@clemson.edu>
1648
1649 Enable assertion output and --disable-assert for configure.
1650 * bootstrap.conf (gnulib_modules): Add assert module.
1651 * src/system.h (aver): Define as assert, and summarize the
1652 discussion on this issue.
1653
9dc3ee6d
JD
16542009-12-14 Joel E. Denny <jdenny@clemson.edu>
1655
1656 Expand GLR acronym in summary of Bison.
1657 Based on discussion with Akim Demaille starting at
1658 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1659 * doc/bison.texinfo (Introduction): Here.
1660 * src/getargs.c (usage): Here.
1661
d013372c
AR
16622009-10-03 Alex Rozenman <rozenman@gmail.com>
1663
1664 Document named references.
1665 * doc/bison.texinfo (Actions): Add new example and xref to
1666 Using Named References node.
1667 (Using Named References): New node.
1668
5297ebb3
JD
16692009-10-16 Joel E. Denny <jdenny@clemson.edu>
1670
1671 cleanup.
1672 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1673 of char*.
1674 (Sbitset__isEmpty): Use Sbitset instead of char*.
1675 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1676 instead of char. This helps to avoid casting errors.
1677 (Sbitset__or): Use Sbitset instead of char*.
1678
175620d3
JD
16792009-10-16 Joel E. Denny <jdenny@clemson.edu>
1680
1681 portability: don't assume 8-bit bytes.
1682 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1683 * src/Sbitset.h (Sbitset__nbytes): Here.
1684 (Sbitset__byteAddress): Here.
1685 (Sbitset__bit_mask): Here.
1686 (Sbitset__last_byte_mask): Here.
1687 (Sbitset__ones): Here.
1688 (SBITSET__FOR_EACH): Here.
1689
786578e3
JD
16902009-10-11 Joel E. Denny <jdenny@clemson.edu>
1691
1692 portability: use va_start and va_end in the same function.
1693 * src/complain.c (error_message): Move va_end from here...
1694 (ERROR_MESSAGE): ... to here.
1695
416a9da6
JD
16962009-10-08 Joel E. Denny <jdenny@clemson.edu>
1697
1698 * data/bison.m4: Update comments for rename to muscle-tab.h.
1699
10659d0e
JD
17002009-10-07 Joel E. Denny <jdenny@clemson.edu>
1701
1702 Minor code cleanup.
1703 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1704 replace all uses with UNIQSTR_CONCAT.
1705 * src/uniqstr.c (uniqstr_vsprintf): New function.
1706 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1707 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1708 macros.
1709
3c5362b8
JD
17102009-10-06 Joel E. Denny <jdenny@clemson.edu>
1711
1712 * TODO (Complaint submessage indentation): New.
1713
b143f404
JD
17142009-10-04 Joel E. Denny <jdenny@clemson.edu>
1715
1716 Minor code cleanup.
1717 * src/parse-gram.y: Clean up sorting of declarations.
1718 Use types to simplify %printer declarations where possible.
1719 Provide %printer for BRACKETED_ID and symbol.prec.
1720 * src/symtab.c: Whitespace change.
1721
7439c5c0
JD
17222009-10-04 Joel E. Denny <jdenny@clemson.edu>
1723
1724 tests: skip tests of file names that platform does not support.
1725 Reported by Michael Raskin at
1726 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1727 * THANKS (Michael Raskin): Add.
1728 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1729 to fail at least for file names containing ":" or "\".
1730
45319f13
JD
17312009-09-23 Joel E. Denny <jdenny@clemson.edu>
1732
1733 yysyntax_error: avoid duplicate lookahead collection.
1734 Except when memory reallocation is required, this change
1735 eliminates the need to invoke yysyntax_error twice and thus to
1736 repeat the collection of lookaheads. It also prepares for
1737 future extensions that will make those repetitions more
1738 expensive and that will require additional memory management in
1739 yysyntax_error. Finally, it fixes an obscure bug already
1740 exercised in the test suite.
1741 * data/yacc.c (yysyntax_error): Add arguments for message
1742 buffer variables stored in the parser. Instead of size, return
1743 status similar to yyparse status but indicating success of
1744 message creation. Other than the actual reallocation of the
1745 message buffer, import and clean up memory management code
1746 from...
1747 (yyparse, yypush_parse): ... here.
1748 * tests/regression.at (parse.error=verbose overflow): No longer
1749 an expected failure.
1750
52cea04a
JD
17512009-09-23 Joel E. Denny <jdenny@clemson.edu>
1752
1753 yysyntax_error: test memory management more.
1754 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1755 * tests/regression.at (parse.error=verbose and
1756 YYSTACK_USE_ALLOCA): New test group.
1757 (parse.error=verbose overflow): New test group that reveals an
1758 obscure bug. Expected fail for now.
1759
37318e2f
JD
17602009-10-04 Joel E. Denny <jdenny@clemson.edu>
1761
1762 benchmarks: use %debug consistently among grammars.
1763 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
1764 %debug by default. It can affect the timings even if yydebug=0.
1765 (generate_grammar_calc): For consistency with other grammars,
1766 use YYDEBUG environment variable to set yydebug.
1767
f74d6d25
JD
17682009-10-03 Joel E. Denny <jdenny@clemson.edu>
1769
1770 Remove dead code.
1771 * src/symtab.c (symbol_pack): Here because every symbol's number
1772 is always defined by this time.
1773
5b1ff423
AR
17742009-10-03 Alex Rozenman <rozenman@gmail.com>
1775
1776 Add additional space after periods in NEWS.
1777 * NEWS (2.5): here.
1778
47eced30
JD
17792009-09-29 Joel E. Denny <jdenny@clemson.edu>
1780
1781 Use the correct conversion specifier for size_t.
1782 Reported by Jim Meyering.
1783 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1784 because Sbitset__Index is size_t.
1785 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1786
d8f68fc2
JD
17872009-09-27 Joel E. Denny <jdenny@clemson.edu>
1788
1789 tests: don't abuse AT_BISON_CHECK.
1790 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1791 additional shell commands outside of AT_BISON_CHECK.
1792
43aabb70
JD
17932009-09-26 Joel E. Denny <jdenny@clemson.edu>
1794
1795 tests: check that parse-gram.y's IELR and LALR are identical.
1796 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1797 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1798 group.
1799
66381412
AR
18002009-09-19 Alex Rozenman <rozenman@gmail.com>
1801
1802 Keep sub-messages aligned. Fix strings for translation.
5b1ff423
AR
1803 * src/location.h (location_print): Add return value.
1804 * src/location.c (location_print): Return number of printed
66381412 1805 characters.
5b1ff423
AR
1806 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1807 new functions.
1808 * src/complain.cpp (indent_ptr): New static variable.
1809 (error_message, complain_at_indent, warn_at_indent): Implement
1810 the alignment mechanism.
1811 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1812 for translations. Use new alignment mechanism.
1813 * tests/named-ref.at: Adjust test-cases.
66381412
AR
1814 * NEWS (2.5): Add an announcement about named references.
1815
a6ca4ce2
AD
18162009-09-17 Akim Demaille <demaille@gostai.com>
1817
1818 doc: fixes.
1819 * doc/bison.texinfo: here.
1820 Reported by Alex Rozenman.
1821
3cdc21cf
AD
18222009-09-16 Akim Demaille <demaille@gostai.com>
1823
1824 doc: lalr1.cc and variants.
1825 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
1826 "variant" %define variables.
1827 (C++ Semantic Values): Split into...
1828 (C++ Unions, C++ Variants): these.
1829 The latter is new.
1830 (C++ Parser Interface): Fix type names.
1831 Document parser::syntax_error.
1832 Document the fact that locations are not mandatory.
1833 (C++ Scanner Interface): Split into...
1834 (Split Symbols, Complete Symbols): these.
1835 The later is new.
1836 (Calc++ Parsing Driver): Use variants.
1837 Add more comments.
1838 Adjust style.
1839 (Calc++ Parser): Declare all the tokens, no
1840 longer accept raw characters.
1841 Remove %union.
1842 Adjust types and printers.
1843 Remove destructors.
1844 (Calc++ Scanner): Use make_<SYMBOL> functions.
1845 Use strerror in error message.
1846
f50bfcd6
AD
18472009-09-16 Akim Demaille <demaille@gostai.com>
1848
1849 doc: spell checking.
1850 * doc/bison.texinfo: here.
1851
6b5a0de9
AD
18522009-09-16 Akim Demaille <demaille@gostai.com>
1853
1854 doc: comment changes.
1855 * doc/bison.texinfo: Comment changes.
1856
2b08bceb
AD
18572009-09-16 Akim Demaille <demaille@gostai.com>
1858
1859 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
1860 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
1861 constructor to take a token_type instead of the (internal) symbol
1862 number.
1863 Call yytranslate_.
1864 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
1865 don't call yytranslate_ here.
1866
c981ce9b
AD
18672009-09-16 Akim Demaille <demaille@gostai.com>
1868
1869 TODO: statistics.
1870 * TODO (Figures): New.
1871
00d80a9c
JD
18722009-09-13 Joel E. Denny <jdenny@clemson.edu>
1873
1874 tests: clean up push.at test group titles.
1875 * tests/push.at: Remove "Push Parsing: " from test group titles
1876 because these are already under the banner "Push Parsing Tests".
1877
f64e406b
AR
18782009-09-12 Alex Rozenman <rozenman@gmail.com>
1879
1880 Provide an additional sub-message for clarity.
1881 Add "symbol not found in production" error message when
1882 an "invalid reference" is detected in named references
1883 resolution.
1884 * src/scan-code.l: Update "invalid reference" case.
1885 * tests/named-ref.at: Adjust test-cases.
1886
bb31eb56
JD
18872009-09-10 Joel E. Denny <jdenny@clemson.edu>
1888
1889 Clean up yacc.c a little.
1890 * data/yacc.c: Clean up M4 for readability, and make output
1891 whitespace more consistent. For the main parse function
1892 comment, instead of saying "yyparse or yypush_parse", say either
1893 "yyparse" or "yypush_parse" depending on which it actually is.
1894
2d399888
JD
18952009-09-10 Joel E. Denny <jdenny@clemson.edu>
1896
1897 Fix --enable-gcc-warnings.
1898 * src/parse-gram.y (%printer <param>): Handle param_none.
1899
ff601366
AD
19002009-09-09 Akim Demaille <demaille@gostai.com>
1901
1902 lalr1.cc: syntax_error as exceptions.
1903 It is common to use sort of factories in the user actions. These
1904 factories may check some "syntactic" constraints that are not
1905 enforced by the grammar itself. This is possible using YYERROR
1906 within the action itself. Provide the user with a means to throw
1907 a syntax_error exception.
1908
1909 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
1910 Declare and define yy::parser::syntax_error.
1911 * data/lalr1.cc: Include stdexcept.
1912 (yy::parser::parse): Wrap the user action within a try/catch.
1913 * data/glr.cc: Include stdexcept.
1914
29660062
AD
19152009-09-09 Akim Demaille <demaille@gostai.com>
1916
1917 lalr1.cc: add missing "inline".
1918 * data/c++.m4 (b4_public_types_define): Add missing inline to
1919 implementations provided in headers.
1920
2055a44e
AD
19212009-09-09 Akim Demaille <demaille@gostai.com>
1922
1923 %param: documentation.
1924 * NEWS (2.6): Document %param, %lex-param, and %parse-param
1925 changes.
1926 * doc/bison.texinfo: Document that %lex-param and %parse-param
1927 are n-ary.
1928 Changes some examples to demonstrate it.
1929 (Calc++ Parser): Use %param.
1930
dd875058
AD
19312009-09-09 Akim Demaille <demaille@gostai.com>
1932
1933 Regen.
1934
f71db70b
AD
19352009-09-09 Akim Demaille <demaille@gostai.com>
1936
1937 style changes.
1938 * src/parse-gram.y (add_param): Scope changes.
1939
eaca4c11
AD
19402009-09-09 Akim Demaille <demaille@gostai.com>
1941
1942 %parse: support several arguments.
1943 * src/parse-gram.y (current_param): New.
1944 (param_type): Add param_none.
1945 (params): New nonterminal.
1946 Use it.
1947
b18cdd91
AD
19482009-09-09 Akim Demaille <demaille@gostai.com>
1949
1950 Regen.
1951
a7706735
AD
19522009-09-09 Akim Demaille <demaille@gostai.com>
1953
1954 %param.
1955 Provide a means to factor lex-param and parse-param common
1956 declarations.
1957
1958 * src/parse-gram.y (param_type): New.
1959 Define a %printer for it.
1960 (add_param): Use it.
1961 (%parse-param, %lex-param): Merge into...
1962 (%parse): this new token.
1963 Adjust the grammar to use it.
1964 * src/scan-gram.l (RETURN_VALUE): New.
1965 (RETURN_PERCENT_FLAG): Use it.
1966 (RETURN_PERCENT_PARAM): New.
1967 Use it to support %parse-param, %lex-param and %param.
1968
9789acf0
JD
19692009-09-03 Joel E. Denny <jdenny@clemson.edu>
1970
1971 Use aver not assert.
1972 * src/output.c: Don't include assert.h.
1973 (output_skeleton): Use aver not assert.
1974 * src/system.h (aver): In documentation of why, add links to
1975 Paul Eggert's explanations in the mailing lists.
1976
61bc57e5
AR
19772009-09-05 Alex Rozenman <rozenman@gmail.com>
1978
1979 Use "Unresolved reference" error message when no symbols were found
1980 in a symbolic reference resolution. Remove .expr and -expr from
1981 the shown reference when the reference is unresolved.
1982 * src/scan-code.l: Change the error message, adjust location columns,
1983 rename variable "exact_mode" to "explicit_bracketing".
1984 * tests/named-ref.at: Adjust existing tests and add a new one.
1985
f4c75eaf
AD
19862009-09-04 Akim Demaille <demaille@gostai.com>
1987
1988 Adjust synclines in src/parse-gram.[ch].
1989 * tests/bison.in: Do some magic (including working around issues
1990 with ylwrap) when this wrapper is used to compile
1991 src/parse-gram.y.
1992
c6abeab1
JD
19932009-09-03 Joel E. Denny <jdenny@clemson.edu>
1994
1995 Complain about unused %define variables and %code qualifiers.
1996 * NEWS (2.5): Document.
1997 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1998 * doc/bison.texinfo (Decl Summary): Document complaint, and
1999 improve %define documentation a little otherwise.
2000 * tests/input.at (Reject unused %code qualifiers): Update.
2001 (%define errors): Update.
2002 (%define, --define, --force-define): Update.
2003 (%define backward compatibility): Update.
2004 (Unused %define api.pure): Update.
2005 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
2006
82db7cdb
JD
20072009-09-03 Joel E. Denny <jdenny@clemson.edu>
2008
2009 Don't suppress warnings about unused parse.error.
2010 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
2011 %define variable parse.error unless b4_error_verbose_flag is
2012 actually expanded in a skeleton.
2013
2755de8f
AD
20142009-09-03 Akim Demaille <demaille@gostai.com>
2015
2016 * NEWS (2.4.2): Add "Internationalization" item.
2017
1deef26d
AD
20182009-09-03 Akim Demaille <demaille@gostai.com>
2019
2020 bootstrap: fix/improve find_tool.
2021 * bootstrap (find_tool): Improve error messages.
2022 Fix typo about find_tool_names.
2023
2646cd54
JD
20242009-08-29 Joel E. Denny <jdenny@clemson.edu>
2025
2026 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
2027 See
2028 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
2029 * src/scan-code.h (code_props_rule_action_init): Rename
2030 named_ref arg to name so it doesn't shadow named_ref type. This
2031 makes it consistent with the function definition in scan-code.l
2032 anyway.
2033
cf499cff
JD
20342009-08-28 Joel E. Denny <jdenny@clemson.edu>
2035
2036 %define: accept unquoted values.
2037 * NEWS (2.5): Group all %define changes together, and document
2038 this one. Remove quotes in IELR and canonical LR entry.
2039 * doc/bison.texinfo: Remove quotes in most examples throughout.
2040 (Decl Summary): Update %define documentation.
2041 (Table of Symbols): Likewise.
2042 * src/ielr.c (LrType): Update documentation.
2043 * src/parse-gram.y (content.opt): Add production for ID.
2044 * tests/actions.at: Remove quotes in most tests.
2045 * tests/calc.at: Likewise.
2046 * tests/existing.at: Likewise.
2047 * tests/input.at: Likewise.
2048 * tests/local.at: Likewise.
2049 * tests/push.at: Likewise.
2050 * tests/reduce.at: Likewise.
2051 * tests/torture.at: Likewise.
2052
6ba96404
JD
20532009-08-28 Joel E. Denny <jdenny@clemson.edu>
2054
2055 %define lr.type: make values lowercase IDs.
2056 That is, "LALR" => "lalr", "IELR" => "ielr", and
2057 "canonical LR" => "canonical-lr".
2058 * NEWS (2.5): Update documentation.
2059 * doc/bison.texinfo (Decl Summary): Likewise.
2060 * src/ielr.c (ielr): Use new values.
2061 * src/ielr.h (ielr): Update documentation.
2062 * src/reader.c (prepare_percent_define_front_end_variables): Use
2063 and validate new values.
2064 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
2065 grammars.
2066 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
2067
4413bbd3
EB
20682009-08-27 Eric Blake <ebb9@byu.net>
2069
2070 scan-gram: avoid portability trap with ctype usage.
2071 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
2072 Avoid compiler warning.
2073
b70c7fb4
JD
20742009-08-27 Joel E. Denny <jdenny@clemson.edu>
2075
2076 tests: use perl for printing special sequences to files.
2077 And skip tests if perl is not available. This is better than
2078 playing tricks with shell portability. Suggested by Akim
2079 Demaille.
2080 * tests/input.at (Bad character literals): Use it here for
2081 omitting final newlines.
2082 (Bad escapes in literals): Use it here for special characters.
2083
d1cc31c5
JD
20842009-08-26 Joel E. Denny <jdenny@clemson.edu>
2085
2086 tests: show a use of %define lr.default-reductions "consistent"
2087 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
2088 prevents the omission of expected tokens for %error-verbose.
2089
3bed3a75
AD
20902009-08-26 Akim Demaille <demaille@gostai.com>
2091
2092 tests: portability fix.
2093 * tests/input.at (Bad escapes in literals): Don't expect "echo
2094 '\0'" to output \ then 0.
2095
aa0cb40d
JD
20962009-08-26 Joel E. Denny <jdenny@clemson.edu>
2097
2098 Actually handle the yytable zero value correctly this time.
2099 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
2100 zero values in the YYTABLE comments.
2101 * data/glr.c (yytable_value_is_error): Don't check for zero
2102 value.
2103 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
2104 * data/yacc.c (yytable_value_is_error): Likewise.
2105 * data/lalr1.java (yy_table_value_is_error_): Likewise.
2106 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
2107 * src/tables.h: In header comments, explain why it's useless to
2108 check for a zero value in yytable.
2109
f2b30bdf
JD
21102009-08-25 Joel E. Denny <jdenny@clemson.edu>
2111
2112 More fixes related to last two patches.
2113 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
2114 comments: zero indicates syntax error not default action.
2115 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
2116 defined.
2117 * data/glr.c (yyis_pact_ninf): Rename to...
2118 (yypact_value_is_default): ... this.
2119 (yyisDefaultedState): Update for rename.
2120 (yyis_table_ninf): Rename to...
2121 (yytable_value_is_error): ... this, and check for value zero
2122 besides just YYTABLE_NINF.
2123 (yygetLRActions): Check for default value from yypact. It
2124 appears that this check is always performed before this function
2125 is invoked, and so adding the check here is probably redundant.
2126 However, the code may evolve after this subtlety is forgotten.
2127 Also, update for rename to yytable_value_is_error. Because that
2128 macro now checks for zero, a different but equivalent branch of
2129 the if-then-else here is evaluated.
2130 (yyreportSyntaxError): Update for rename to
2131 yytable_value_is_error. The zero condition was mishandled
2132 before.
2133 (yyrecoverSyntaxError): Update for renames. No behavioral
2134 changes.
2135 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
2136 New function.
2137 (yy_table_value_is_error_): New function.
2138 (parse): Use new functions where possible. No behavioral
2139 changes.
2140 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
2141 The zero condition was mishandled before.
2142 * data/yacc.c (yyis_pact_ninf): Rename to...
2143 (yypact_value_is_default): ... this.
2144 (yyis_table_ninf): Rename to...
2145 (yytable_value_is_error): ... this, and check for value zero
2146 besides just YYTABLE_NINF.
2147 (yysyntax_error): Update for rename to yytable_value_is_error.
2148 The zero condition was mishandled before.
2149 (yyparse): Update for renames. No behavioral changes.
2150 * src/tables.h: Improve comments about yypact, yytable, etc.
2151 more. Most importantly, say yytable value of zero means syntax
2152 error not default action.
2153
53f036ce
JD
21542009-08-25 Joel E. Denny <jdenny@clemson.edu>
2155
2156 Fix %error-verbose for conflicts resolved by %nonassoc.
2157 * NEWS (2.5): Document.
2158 * data/glr.c (yyreportSyntaxError): Fix this by checking
2159 yyis_table_ninf.
2160 * data/yacc.c (yysyntax_error): Likewise.
2161 * data/lalr1.cc (yysyntax_error_): Fix this by checking
2162 yytable_ninf_.
2163 * data/lalr1.java (yysyntax_error): Likewise.
2164 * tests/conflicts.at (%nonassoc and eof): Update expected output
2165 and remove FIXME.
2166
87412882
JD
21672009-08-25 Joel E. Denny <jdenny@clemson.edu>
2168
2169 Some code and documentation improvements.
2170 * data/c.m4 (b4_table_value_equals): New macro to capture
2171 some repeated code.
2172 * data/glr.c (yyis_pact_ninf): Use it here.
2173 (yyis_table_ninf): Likewise.
2174 (yyreportSyntaxError): Improve internal comments.
2175 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
2176 Use it everywhere possible.
2177 (yyis_table_ninf): Likewise.
2178 (yysyntax_error): Improve internal comments.
2179 * data/lalr1.cc (yysyntax_error_): Likewise.
2180 * data/lalr1.java (yysyntax_error): Likewise.
2181 * src/tables.h: Improve comments about yypact, yytable, etc.
2182
e6c849d8
JD
21832009-08-21 Joel E. Denny <jdenny@clemson.edu>
2184
2185 Use locale when quoting.
2186 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
2187 quote rather than implementing quoting here.
2188
d8911864
EB
21892009-08-20 Eric Blake <ebb9@byu.net>
2190
b0778bdd
EB
2191 Make previous patch more robust.
2192 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
2193 argmatch.h.
2194 (output_skeleton): Use it.
2195 Suggested by Akim Demaille.
2196
d8911864
EB
2197 Import latest m4/m4.m4.
2198 * submodules/autoconf: Update to autoconf 2.64.
2199 * configure.ac (M4_GNU_OPTION): New define.
2200 * src/output.c (output_skeleton): Use it to resolve FIXME.
2201 * NEWS: Mention this.
2202
c2724603
JD
22032009-08-19 Joel E. Denny <jdenny@clemson.edu>
2204
2205 Fix complaints about escape sequences.
2206 Discussed starting at
2207 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
2208 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
2209 For a \0 and similar escape sequences meaning the null
2210 character, report an invalid escape sequence instead of an
2211 invalid null character because the latter does not actually
2212 appear in the user's input.
2213 In all escape sequence complaints, don't escape the initial
2214 backslash, and don't quote when the sequence appears at the end
2215 of the complaint line unless there's whitespace that quotearg
2216 won't escape.
2217 Consistently say "invalid" not "unrecognized".
2218 Consistently prefer "empty character literal" over "extra
2219 characters in character literal" warning for invalid escape
2220 sequences; that is, consistently discard those sequences.
2221 * tests/input.at (Bad escapes in literals): New.
2222
17aed602
AD
22232009-08-19 Akim Demaille <demaille@gostai.com>
2224
2225 doc: fixes.
2226 * doc/bison.texinfo: Fix minor Texinfo errors.
2227
9142239a
AD
22282009-08-19 Akim Demaille <demaille@gostai.com>
2229
2230 tests: distcc compliance.
2231 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
2232 error messages from the output.
2233
171ad99d
AD
22342009-08-19 Akim Demaille <demaille@gostai.com>
2235
2236 variables: simplify the upgrade of namespace into api.namespace.
2237
2238 This patch simplifies "variables: rename namespace as
2239 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
2240 Suggested by Joel E. Denny in
2241 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
2242
2243 * src/muscle-tab.c (muscle_percent_variable_update): New.
2244 (muscle_percent_define_insert): Use it in replacement of the
2245 previous tr invocation.
2246 Remove variable_tr, no longer needed.
2247 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
2248 Remove.
2249 * data/c++.m4: No longer handle namespace -> api.namespace.
2250 * tests/input.at (%define backward compatibility): Check that
2251 namespace is treated as api.namespace.
2252
d59e456d
AD
22532009-08-19 Akim Demaille <demaille@gostai.com>
2254
2255 doc: %initial-action to initialize yylloc.
2256 Reported by Bill Allombert.
2257 * doc/bison.texinfo: Set fill-column to 76.
2258 (Location Type): Document the use of %initial-action to initialize
2259 yylloc.
2260
ceb8b8e6
AD
22612009-08-19 Akim Demaille <demaille@gostai.com>
2262
2263 lalr1.cc: use state_type.
2264 * data/lalr1.cc (yysyntax_error_): Use state_type.
2265 Move argument names into yy*.
2266
7580c379
AD
22672009-08-19 Akim Demaille <demaille@gostai.com>
2268
2269 lalr1.cc: get rid of yyparse's yystate.
2270 yystate and yystack_[0].state are equal, keep only the latter.
2271 The former was also used as a temporary variable to compute the
2272 post-reduction state. Move this computation into an auxiliary
2273 function.
2274
2275 * data/glr.c (yyLRgotoState): Fuse variable definition and first
2276 assignment.
2277 * data/lalr1.cc (yy_lr_goto_state_): New.
2278 (yyparse): Use it.
2279 Replace remaining uses of yystate by yystate_[0].state.
2280 Remove the former.
2281
c4dc4c46
AD
22822009-08-19 Akim Demaille <demaille@gostai.com>
2283
2284 lalr1.cc: destroy $$ when YYERROR is called.
2285 * data/lalr1.cc (yyreduce): Compute the resulting state before
2286 running the user action so that yylhs is a valid symbol.
2287 (yyerrorlab): Since yylhs is complete (it knows its type), we can
2288 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
2289 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
2290
c67e466f
JD
22912009-08-18 Joel E. Denny <jdenny@clemson.edu>
2292
2293 maint: update for gnulib's recent update-copyright changes
2294 * gnulib: Update.
2295 * .x-update-copyright (COPYING): Add as it's no longer implied
2296 when .x-update-copyright is present.
2297 * cfg.mk (update-copyright-local): Remove, now ignored.
2298 (update-copyright): Declare update-b4-copyright as a dependency.
2299
af6d2358
AD
23002009-08-17 Akim Demaille <demaille@gostai.com>
2301
2302 build: require gettext 0.17.
2303
2304 Suggested by Bruno Haible.
2305 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
2306 * configure.ac: require gettext 0.17 to ensure compatibility with
2307 gnulib.
2308
91a2b9b1
AD
23092009-08-17 Akim Demaille <demaille@gostai.com>
2310
2311 build: lower gettext requirements.
2312
2313 Bison was uselessly requiring the formatstring macros from
2314 gettext, which resulted in mo files not being installed on systems
2315 that perfectly supported Bison mo files. Lower the requirement.
2316 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
2317
b0778bdd
EB
2318 * configure.ac: Require need-ngettext instead of
2319 need-formatstring-macros.
2320 Reported by Martin Jabocs.
2321 Suggested by Bruno Haible.
2322 * INSTALL: Restructure.
2323 (Internationalization): New.
91a2b9b1 2324
585935e8
JD
23252009-08-14 Joel E. Denny <jdenny@clemson.edu>
2326
2327 maint: fix use of copyright year intervals.
2328 * gnulib: Update.
2329 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
2330 as now recommended in gnulib/NEWS.
2331 * build-aux/update-b4-copyright: Fix.
2332 * cfg.mk (update-copyright-env): Configure update-copyright.
2333
83b60c97
JD
23342009-08-13 Joel E. Denny <jdenny@clemson.edu>
2335
2336 Make it easier to write deterministic tests.
2337 Continues Akim's work from his 2009-06-10 commits.
2338 * src/reader.c (check_and_convert_grammar): Don't add any
2339 symbols after the first symbols_do invocation.
2340 * src/symtab.c (symbols_sorted): New static global.
2341 (user_token_number_redeclaration): Update comments.
2342 (symbol_from_uniqstr): If a new symbol is being created, assert
2343 that symbols_sorted hasn't been allocated yet.
2344 (symbols_free): Free symbols_sorted.
2345 (symbols_cmp, symbols_cmp_qsort): New functions.
2346 (symbols_do): Sort symbol_table into symbols_sorted on first
2347 invocation.
2348 * tests/input.at (Numbered tokens): Recombine tests now that the
2349 output should be deterministic across multiple numbers.
2350
28169bab
AD
23512009-08-12 Akim Demaille <demaille@gostai.com>
2352
2353 tests: GCC 4.5 compliance.
2354 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
2355 messages about #error.
2356
9f14e187
AD
23572009-08-12 Akim Demaille <demaille@gostai.com>
2358
2359 build: fix the generation of the documentation.
2360 Some of our targets use "bison --help", but they can't depend on
2361 "bison" itself (to avoid additional requirements on the user), so
2362 they used to call "make src/bison" in the commands. Then
2363 concurrent builds may fail: one make might be aiming one of its
2364 jobs at compiling src/bison, and another job at generating the man
2365 page. If the latter is faster than the former, then we have two
2366 makes that concurrently try to compile src/bison.
2367
2368 This might also be a more convincing explanation for the failure
2369 described in the patch "build: fix paths".
2370
2371 * Makefile.am (SUFFIXES): Initialize.
2372 * build-aux/move-if-change: New, symlink to gnulib's.
2373 * build-aux/local.mk: Ship it.
2374 * doc/common.x: Remove, merged into...
2375 * doc/bison.x: here.
2376 * doc/local.mk (doc/bison.help): New.
2377 ($(CROSS_OPTIONS_TEXI)): Depend on it.
2378 Use src/bison.
2379 (.x.1): Replace with...
2380 (doc/bison.1): this explicit, simpler, target.
2381 (common_dep): Remove, inlined where appropriate.
2382 (SUFFIXES, PREPATH): Remove, unused.
2383
d1b55e81
AD
23842009-08-12 Akim Demaille <demaille@gostai.com>
2385
2386 gnulib: improve prefixing.
2387 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
2388 change the value of...
2389 (gl_LIBOBJS): this.
2390 Adjust more variables.
2391 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
2392 gl_LIBOBJS.
2393 (prefix): Also transform rules whose targets have slashes.
2394 Use $prefix liberally.
2395 Map @MKDIR_P@ to $(MKDIR_P).
2396 Prefix directories that are mkdir'd.
2397
838205d5
AD
23982009-08-12 Akim Demaille <demaille@gostai.com>
2399
2400 build: fix paths.
2401 When using $(top_builddir) inconsistently, Make (including GNU
2402 Make) is sometimes confused. As a result it may want to build
2403 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
2404 file, different names) concurrently, which, amusingly enough,
2405 might end with:
2406
2407 ranlib lib/libbison.a
2408 ranlib lib/libbison.a
2409 make[2]: *** [lib/libbison.a] Segmentation fault
2410
2411 on OS X.
2412
2413 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
2414 needed.
2415
67af7198
AD
24162009-08-12 Akim Demaille <demaille@gostai.com>
2417
2418 distcheck: fix.
2419
b0778bdd 2420 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
67af7198 2421
c467dc42
JD
24222009-08-10 Joel E. Denny <jdenny@clemson.edu>
2423
2424 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
2425
dfaa4860
JD
24262009-08-10 Joel E. Denny <jdenny@clemson.edu>
2427
2428 Miscellaneous code readability improvements.
2429
2430 * src/reader.c (reader): Move %define front-end variable
2431 defaults and checking into...
2432 (prepare_percent_define_front_end_variables): ... this new
2433 function.
2434
2435 * src/scan-gram.l (INITIAL): For consistency with string
2436 literals, don't store open quote on character literal. It's
2437 discarded before returning anyway.
2438 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
2439 Make length test more readable, and make the character stored
2440 for an empty literal more obvious while consistent with the
2441 previous behavior.
2442
2443 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
2444 USER_NUMBER_HAS_STRING_ALIAS throughout.
2445 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
2446 that is repeated in symtab.h. Improve argument names to make it
2447 clear which side of the symbol-string alias pair is which.
2448 (symbol_check_alias_consistency): Improve local variable names
2449 for the same purpose.
2450 * src/symtab.h (struct symbol): Make comments about aliases
2451 clearer.
2452 (symbol_make_alias): Improve comments and argument name.
2453 * src/output.c (token_definitions_output): Update for rename to
2454 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
2455
ce268795
AR
24562009-08-08 Alex Rozenman <rozenman@gmail.com>
2457
2458 Convert "misleading reference" messages to warnings.
2459 * src/scan-code.l: New function 'show_sub_messages', more
2460 factoring.
2461 * tests/named-ref.at: Adjust tests.
2462
401b73af
JD
24632009-08-06 Joel E. Denny <jdenny@clemson.edu>
2464
2465 maint: run "make update-copyright"
2466
a1a9422d
JD
24672009-08-06 Joel E. Denny <jdenny@clemson.edu>
2468
2469 maint: make update-b4-copyright easier to use
2470 * build-aux/update-b4-copyright: In warnings, report line
2471 numbers rather than character positions.
2472 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
2473 that update-copyright runs it.
2474 * gnulib: Update.
2475
0b61a8ec
JD
24762009-08-05 Joel E. Denny <jdenny@clemson.edu>
2477
2478 maint: clean up update-b4-copyright code
2479 * build-aux/update-b4-copyright: Do not accept 2-digit
2480 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
2481 Don't accept a `[' in a b4_copyright argument.
2482 Format code more consistently.
2483 Don't assume b4*copyright never occurs.
2484
269e222e
JD
24852009-08-04 Joel E. Denny <jdenny@clemson.edu>
2486
2487 maint: automate b4_copyright updates.
2488 * Makefile.am (update-b4-copyright): New target rule.
2489 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
2490 * build-aux/update-b4-copyright: New.
2491 * data/yacc.c: Remove stray characters around b4_copyright
2492 invocations.
2493
35905f2b
JD
24942009-08-04 Joel E. Denny <jdenny@clemson.edu>
2495
2496 maint: automate annual package-wide copyright-year update.
2497 * .x-update-copyright: New.
2498 * Makefile.am (EXTRA_DIST): Remove maint.mk.
2499 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
2500 update-copyright. Remove gnumakefile, which is implied by
2501 maintainer-makefile.
2502 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
2503 * gnulib: Update.
2504 * maint.mk: Remove, now copied from gnulib.
2505 * examples/extexi: Add missing "(C)" in copyright statement so
2506 update-copyright can recognize it.
2507 * src/LR0.h: Likewise.
2508 * src/print.h: Likewise.
2509 * src/print_graph.h: Likewise.
2510 * src/gram.c: Add missing comma in copyright statement.
2511 * src/gram.h: Likewise.
2512
b30e18dc
JD
25132009-08-04 Joel E. Denny <jdenny@clemson.edu>
2514
2515 Fix "make distcheck".
2516 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
2517 of just calc.stamp.
2518
8d90395d
JD
25192009-08-01 Joel E. Denny <jdenny@clemson.edu>
2520
2521 Pacify "gcc -Wunused" for the input function from Flex.
2522 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
2523 and later.
2524 * src/scan-code.l: Add "%option noinput", which I cannot find in
2525 the Flex manual, but which Flex has supported since at least as
2526 far back as 2.5.4. However, if any of our developers still use
2527 Flex 2.5.4, they'll need to stop configuring with
2528 --enable-gcc-warnings because "%option noinput" didn't work
2529 correctly until Flex 2.5.6.
2530 * src/scan-gram.l: Likewise.
2531 * src/scan-skel.l: Likewise.
2532
ba4184ec
AR
25332009-07-31 Alex Rozenman <rozenman@gmail.com>
2534
2535 Fix --enable-gcc-warnings problems.
2536 * src/reader.c: Adjust variable names.
2537 * src/scan-code.l: Fix prototypes and adjust names.
2538 * src/named-ref.c: Remove redundant "if".
2539
91a2af97
JD
25402009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2541
2542 Fix a --enable-gcc-warnings problem.
2543 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
2544 variable.
2545
3208e3f4
JD
25462009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2547
2548 Warn about character literals not of length one.
2549 * NEWS (2.5): Document.
2550 * src/scan-gram.l (INITIAL): Remove comment that we don't check
2551 the length.
2552 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
2553 * tests/input.at (Bad character literals): New test group.
2554
5add20ab 25552009-07-24 Alex Rozenman <rozenman@gmail.com>
13cdf208
AR
2556
2557 Fix some memory leaks.
2558 * src/named-ref.c: Add a pointer check (named_ref_free).
2559 * src/scan-code.l: New function (variant_table_free). Called in
2560 code_scanner_free.
2561 * src/symlist.c: Call to named_ref_free (symbol_list_free).
2562
e459fb0e
JD
25632009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2564
2565 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
2566
c4be5517
JD
25672009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
2568
2569 Some M4 cleanup in the testsuite.
2570 Suggested by Eric Blake at
2571 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
2572 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
2573 complicate the code by distinguishing between a missing value
2574 and an empty string value for an optional argument. This fix is
2575 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
2576 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
2577 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
2578 arguments are not needed because of the following changes.
2579 Fix stale comments.
2580 Bison developers should use GNU M4 and should not use
2581 POSIXLY_CORRECT when building the test suite, so do not
2582 complicate the code by avoiding $10 and above.
2583 Do not quote an empty string value for an optional argument, and
2584 do not distinguish between a missing value and an empty string
2585 value.
2586
feeb56cd
JD
25872009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2588
2589 Revert unnecessary column realignment in --help output.
2590 Reported by Akim Demaille at
2591 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
2592 * src/getargs.c (usage): Here.
2593
5add20ab 25942009-07-04 Alex Rozenman <rozenman@gmail.com>
629e4def
AR
2595
2596 Alphabetical order in src/local.mk.
2597 * src/local.mk: Adjust.
2598
5add20ab 25992009-07-04 Alex Rozenman <rozenman@gmail.com>
872b52bc
AR
2600
2601 Style changes and factoring.
2602 * src/named-ref.h: Add comments.
2603 * src/parse-gram.y: Readability and style changes.
2604 * src/reader.c: Factoring: assign_named_ref function.
2605 * src/scan-code.l: Factoring and style changes. Rename
2606 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2607 Use "unsigned" type for variant index. Improve readablity.
2608 * src/scan-gram.l: Change error messages and add comments.
2609 * src/symlist.h: symbol_list_null: New function decl.
2610 * src/symlist.c: symbol_list_null: Implement here.
2611 * tests/named-refs.at: Adjust for new error messages.
2612
83ea2423
EB
26132009-06-29 Eric Blake <ebb9@byu.net>
2614
2615 scan-code: avoid compiler warnings
2616 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2617
5ece73ea
AD
26182009-06-29 Akim Demaille <demaille@gostai.com>
2619
2620 build: avoid concurrent extraction of calc++.
2621 * examples/calc++/Makefile.am (calc.stamp): New.
2622 Depend on it to create the sources of calc++ so that concurrent
2623 builds don't launch several "extexi" in parallel.
2624 Not only this is inefficient, this also builds incorrect sources
2625 with several extractions mixed together.
2626
ad597a78
AD
26272009-06-29 Akim Demaille <demaille@gostai.com>
2628
2629 parse.error: fix.
2630 * data/bison.m4: Move code related to specific variables after the
2631 definition of the variable-maintaining macros so that we don't
2632 "invoke" b4_percent_define_check_values before it is defined.
2633
31b850d2
AD
26342009-06-29 Akim Demaille <demaille@gostai.com>
2635
2636 variables: parse.error
2637
2638 Implement, document, and test the replacement of %error-verbose
2639 by %define parse.error "verbose".
2640 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
2641 values of the parse.error variable.
2642 Make "simple" its default value.
2643 Check the valid values.
2644 * src/parse-gram.y: Use %define parse.error.
2645 (PERCENT_ERROR_VERBOSE): New token.
2646 Support it.
2647 * src/scan-gram.l: Support %error-verbose.
2648
2649 * doc/bison.texinfo (Decl Summary): Replace the documentation of
2650 %define error-verbose by that of %define parse.error.
2651 * NEWS: Document it.
2652
2653 * tests/actions.at, tests/calc.at: Use parse.error instead of
2654 %error-verbose.
2655
b9f1d9a4
AR
26562009-06-27 Alex Rozenman <rozenman@gmail.com>
2657
2658 Implement support for named symbol references.
2659 * src/parse-gram.y: Add new syntax (named_ref.opt).
2660 * src/reader.c: Store named refs in symbol lists.
2661 * src/reader.h: New argument for symbol_append and
2662 action_append functions.
2663 * src/scan-code.h: Add new field (named_ref) into
2664 code_props data structure. Keeps named ref of midrule
2665 actions.
2666 * src/scan-code.l: Support for named refs in semantic
2667 action code. New function 'parse_named_ref'.
2668 * src/scan-gram.l: Support bracketed id.
2669 * src/symlist.c: Store named refs in symbol lists.
2670 * src/symlist.h: New field in symbol list: named_ref.
2671 * src/named-ref.h: New file, a struct for named_ref.
2672 * src/named-ref.cp: New file, named_ref_new function.
2673 * src/local.mk: Add two new files.
2674 * tests/testsuite.at: Include new test group:
2675 * tests/named-refs.at: this new file.
2676
b5c212b6
AD
26772009-06-25 Akim Demaille <demaille@gostai.com>
2678
2679 hash: check insertion for memory exhaustion.
2680 * src/uniqstr.c (uniqstr_new): New.
2681
67501061
AD
26822009-06-24 Akim Demaille <demaille@gostai.com>
2683
2684 variables: rename namespace as api.namespace.
2685 Discussed in
2686 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
2687
2688 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
2689 New.
2690 (b4_percent_define_use): New.
2691 Use it where applicable.
2692 * data/c++.m4: Replace uses of the variable "namespace" by
2693 "api.namespace".
2694 Default the latter to the former.
2695 * doc/bison.texinfo (Decl Summary): Document "namespace" as
2696 obsolete.
2697 Document api.namespace.
2698 Use @samp to document %define uses, keep @code for identifiers.
2699 * NEWS: Likewise.
2700 * tests/c++.at, tests/input.at: Test api.namespace instead of
2701 namespace. (The tests passed with namespace.)
2702
41976786
AD
27032009-06-11 Akim Demaille <demaille@gostai.com>
2704
2705 style changes.
2706 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2707 * src/print-xml.c: Style changes.
2708 * tests/conflicts.at: Comment changes.
2709
44bb9084
AD
27102009-06-11 Akim Demaille <demaille@gostai.com>
2711
2712 xml: beware of user strings used to give a %prec to rules.
2713 * tests/conflicts.at (%prec with user strings): New.
2714 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2715 XML output.
2716
04d1e39d
AD
27172009-06-11 Akim Demaille <demaille@gostai.com>
2718
2719 hash: check insertion for memory exhaustion.
2720 * src/muscle-tab.c (muscle_insert, muscle_grow)
2721 * src/state.c (state_hash_insert): Check the return value of
2722 hash_insert.
2723
a8873669
AD
27242009-06-11 Akim Demaille <demaille@gostai.com>
2725
2726 tests: honor TESTSUITEFLAGS in every check target.
2727 * tests/local.mk (RUN_TESTSUITE): New.
2728 (check-local, installcheck-local, maintainer-check-g++)
2729 (maintainer-check-posix, maintainer-check-valgrind): Use it.
2730
8893145a
AD
27312009-06-10 Akim Demaille <demaille@gostai.com>
2732
2733 deterministic test suite.
2734 Some consistency checks on symbols are performed after all the
2735 symbols were read, by an iteration over the symbol table. This
2736 traversal is nondeterministic, which can be a problem for test
2737 cases.
2738 Avoid this.
2739 Addresses another form of nondeterminism reported by Joel E. Denny.
2740 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2741
2742 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2743 test in two.
2744 Use different file names for the three tests to make the
2745 maintenance easier.
2746
92d7a23a
AD
27472009-06-10 Akim Demaille <demaille@gostai.com>
2748
2749 gnulib: update.
b0778bdd
EB
2750 * gnulib: Update to latest.
2751 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2752 * m4/.gitignore: Regen.
2753 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2754 Call xalloc_die on hash_insert failures.
2755 Requested by the new __warn_unused_result__ attribute of
2756 hash_insert.
92d7a23a 2757
12cf133f
AD
27582009-06-10 Akim Demaille <demaille@gostai.com>
2759
2760 deterministic user-token-number redeclaration errors.
2761 Address nondeterminism reported by Joel E. Denny.
2762 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2763
2764 * src/uniqstr.h: Comment changes.
2765 * src/location.h (boundary_cmp, location_cmp): New.
2766 * src/symtab.c (user_token_number_redeclaration): New.
2767 (symbol_translation): Use it.
2768 * tests/input.at (Numbered tokens): Adjust the expected output.
2769
796a2b0a
AD
27702009-05-25 Akim Demaille <demaille@gostai.com>
2771
2772 build: avoid ignored errors.
2773 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
2774 errors, they pollute the output.
2775
0b6d43c5
JD
27762009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2777
2778 Convert multiple variable definition warnings to complaints.
2779 * NEWS (2.5): Add a new entry for that change.
2780 * doc/bison.texinfo (Decl Summary): Update %define entry.
2781 (Bison Options): Update -D/--define/-F/--force-define entry.
2782 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
2783 * src/muscle-tab.h (muscle_percent_define_insert): Update
2784 comments.
2785 * tests/input.at (`%define errors'): Update.
2786 (`%define, --define, --force-define'): Update.
2787
de5ab940
JD
27882009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2789
2790 -F/--force-define and relative %define/-D/--define priorities.
2791 * NEWS (2.5): Add documentation to -D/--define entry.
2792 * build-aux/cross-options.pl: Hard-code association of
2793 --force-define with %define.
2794 * doc/bison.texinfo (Decl Summary): In %define entry,
2795 cross-reference command-line options.
2796 (Bison Options): Add documentation to -D/--define entry.
2797 (Option Cross Key): Widen column for --force-define row.
2798 * src/getargs.c (usage): Document -F/--force-define. Realign
2799 options in output.
2800 (short_options, long_options, getargs): Parse -F/--force-define,
2801 and update muscle_percent_define_insert invocations.
2802 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
2803 (muscle_percent_define_insert): Add argument with that type.
2804 * src/muscle-tab.c (muscle_percent_define_insert): Implement
2805 -F/--force-define behavior and priorities.
2806 (muscle_percent_define_ensure): Update
2807 muscle_percent_define_insert invocation.
2808 * src/parse-gram.y (prologue_declaration): Update
2809 muscle_percent_define_insert invocations.
2810 * tests/input.at (`%define, --define'): Rename to...
2811 (`%define, --define, --force-define'): ... this and extend.
2812
f8e7258f
JD
28132009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2814
2815 Update some comments to make sense for -D.
2816 * data/bison.m4 (b4_check_user_names): In header comments, say
2817 "user occurrence" instead of "grammar occurrence".
2818 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
2819 (muscle_percent_code_grow): Likewise just for consistency.
2820
b987342b
JD
28212009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2822
2823 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2824
4977e0a7
JD
28252009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2826
2827 Handle a trailing `:' in a user-supplied C++ namespace better.
2828 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2829 among the closing braces here. This fix might make the
2830 generated code easier to debug, but otherwise it should be
2831 insignificant because a trailing `:' is a C++ error already.
2832
9b04dad7
AD
28332009-05-19 Akim Demaille <demaille@gostai.com>
2834
2835 remove useless variable.
2836 * src/getargs.c (skeleton_arg): Remove now useless variable.
2837 Should help the compiler see that this printf-like call is sane.
2838
4c6622c2
AD
28392009-05-15 Akim Demaille <demaille@gostai.com>
2840
2841 Rename token.prefix as api.tokens.prefix.
2842 Discussed here.
2843 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
2844
2845 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
2846 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
2847 (token.prefix): Rename as...
2848 (api.tokens.prefix): this.
2849
3c248d70
AD
28502009-05-11 Akim Demaille <demaille@gostai.com>
2851
2852 doc: use C++ headers.
2853 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2854 headers.
2855
99c08fb6
AD
28562009-05-11 Akim Demaille <demaille@gostai.com>
2857
2858 doc: token.prefix
2859 * doc/bison.simple (Decl Summary): Document token.prefix.
2860 (Calc++ Parser): Various fixes.
2861 Formatting changes.
2862 Use token.prefix.
2863 Introduce a macro TOKEN to shorten the code and make it more
2864 readable.
2865 (Calc++ Scanner): Adjust.
2866 * NEWS (Variable token.prefix): New.
2867
84a1cb5a
AD
28682009-05-04 Akim Demaille <demaille@gostai.com>
2869
2870 bison: catch bad symbol names.
2871 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2872 * tests/input.at: Adjust.
2873
cdf3f113
AD
28742009-05-04 Akim Demaille <demaille@gostai.com>
2875
2876 identifiers: dashes are letters.
2877 Dashes can now start identifiers (symbols and directives).
84a1cb5a 2878
cdf3f113
AD
2879 * src/scan-gram.l ({letter}): Add dash.
2880 ({id}): Remove it.
2881 * tests/input.at (Symbols): Adjust.
2882 Remove stray comment.
2883 * tests/regression.at (Invalid inputs): Adjust error message.
2884 * doc/bison.texinfo (Symbols): Update.
2885
98a345a2
JD
28862009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2887
2888 Declare %code to be a permanent feature.
2889 * NEWS (2.4.2): Here.
2890 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2891 experimental.
2892 (Decl Summary): Likewise.
2893
67212941
JD
28942009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2895
2896 Convert underscores to dashes in some %define variable names.
2897 For now, just api.push-pull and lr.keep-unreachable-states.
2898 Maintain old names for backward compatibility.
2899 * NEWS (2.5): Document.
2900 * data/c.m4 (b4_identification): Update comment.
2901 * data/yacc.c: Update access.
2902 * doc/bison.texinfo: Update.
2903 * etc/bench.pl.in (bench_push_parser): Update use.
2904 * src/files.c (tr): Move to...
2905 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2906 think of a better place to expose it. My logic is that, for all
2907 uses of tr so far, command-line arguments can be involved, and
2908 getargs.h is already included.
2909 * src/main.c (main): Update access.
2910 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2911 variable names to new variable names before assigning value.
2912 * src/reader.c (reader): Update setting default.
2913 * tests/calc.at: Update uses.
2914 * tests/conflicts.at (Unreachable States After Conflict
2915 Resolution): Update use.
2916 * tests/input.at (%define enum variables): Update use.
2917 (%define backward compatibility): New test group.
2918 * tests/push.at: Update uses.
2919 * tests/reduce.at: Update uses.
2920 * tests/torture.at: Update uses.
2921
ba5c6d94
JD
29222009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2923
2924 Set all front-end %define defaults in one place.
2925 * src/main.c (main): Move lr.keep_unreachable_states default...
2926 * src/reader.c (reader): ... to here.
2927
5bab9d08
JD
29282009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2929
2930 Rename lr.default_reductions to lr.default-reductions.
2931 * NEWS (2.5): Here.
2932 * doc/bison.texinfo: Here.
2933 * src/lalr.c (initialize_LA): Here.
2934 * src/print.c (print_reductions): Here.
2935 * src/reader.c (reader): Here.
2936 * src/tables.c (action_row): Here.
2937 * tests/input.at (%define enum variables): Here.
2938 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2939
d521ee19
JD
29402009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2941
2942 Pacify ./configure --enable-gcc-warnings.
2943 * tests/input.at (Symbols): Prototype yyerror and yylex.
2944
29452009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
c9aded4b
JD
2946
2947 Document how `%define "var" "value"' is not M4-friendly.
2948 * src/parse-gram.y (variable): In comments here.
2949
8f0d265e
JD
29502009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2951
2952 Clean up recent patches a little.
2953 Reported by Akim Demaille.
2954 * doc/bison.texinfo (Understanding): Fix typos.
2955 * src/print.c (print_reductions): Don't use negated variable.
2956
f4909773
JD
29572009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2958
2959 List accepted values for a %define enum variable with an invalid value.
2960 Suggested by Akim Demaille at
2961 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2962 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2963 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
2964 * tests/input.at (%define lr.default_reductions invalid values): Merge
2965 into...
2966 (%define enum variables): ... here, and update output.
2967
110ef36a
JD
29682009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2969
2970 Rename "default rule" to "default reduction".
2971 This includes changing variable names in code, changing
2972 comments, and renaming %define lr.default_rules to %define
2973 lr.default_reductions.
2974 * NEWS (2.5): Update IELR documentation.
2975 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
2976 documentation.
2977 * data/glr.c, data/lalr1.java: Sync copyright dates.
2978 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2979 and lr.type documentation. Make some other wording
2980 improvements.
2981 (Glossary): Adjust cross-references and Default Reduction
2982 definition.
2983 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2984 Remove a confusing comment pointed out by Akim Demaille.
2985 (initialize_LA): Adjust code.
2986 * src/print-xml.c (print_reductions): Adjust code.
2987 * src/print.c (print_reductions): Adjust code.
2988 * src/reader.c (reader): Adjust code.
2989 * src/tables.c (action_row): Adjust code.
2990 (token_actions): Adjust code.
2991 * src/tables.h: Adjust YYDEFACT documentation.
2992 * tests/input.at (%define lr.default_rules invalid values):
2993 Rename test group to...
2994 (%define lr.default_reductions invalid values): ... this, and
2995 update grammar file and expected output.
2996 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2997 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2998
746ee38c
AD
29992009-04-21 Akim Demaille <demaille@gostai.com>
3000
3001 tests: check the use of dashes and periods in symbols.
3002 * tests/input.at (Symbol): New test group.
3003
eb45ef3b
JD
30042009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3005
3006 Document %define lr.type and lr.default_rules.
3007 * NEWS (2.5): Add an entry.
3008 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
3009 besides just LALR(1) and GLR(1).
3010 * doc/bison.texinfo (Introduction): Likewise.
3011 (Language and Grammar): Bison is no longer limited to LALR(1)
3012 restrictions.
3013 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
3014 when trying to distinguish from GLR. Talk about LR(1) grammars
3015 rather than LALR(1) grammars.
3016 (Decl Summary): In %define api.push_pull entry, say it applies
3017 to deterministic parsers in C rather than LALR(1) parsers in C.
3018 Add lr.default_rules entry.
3019 Add lr.type entry.
3020 (Mystery Conflicts): Bison is no longer limited to LALR(1)
3021 restrictions.
3022 (Generalized LR Parsing): Same changes as for the previous GLR
3023 section.
3024 (Memory Management): Say deterministic rather than LALR(1).
3025 (Understanding): Correct some bison output.
3026 Index discussion of "accepting state".
3027 Say deterministic rather than LALR(1).
3028 (Bison Options): In --yacc entry, say deterministic rather than
3029 LALR(1).
3030 In --report, --graph, and --xml entries, just don't mention
3031 LALR(1).
3032 (C++ Parsers): Say deterministic rather than LALR(1).
3033 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
3034 (Glossary): Add Accepting State, Consistent State, Default Rule,
3035 and IELR(1) definitions.
3036 In Generalized LR (GLR) definition, make same changes as in
3037 previous GLR sections.
3038 In LALR(1) definition, say Bison uses LALR(1) by default rather
3039 than implying Bison is limited to LALR(1).
3040 (LocalWords): Add IELR.
3041
db34f798
JD
30422009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3043
3044 Finish implementing %define lr.type.
3045 Its value can be "LALR", "IELR", or "canonical LR".
3046 * lib/timevar.def (TV_IELR_PHASE1): New var.
3047 (TV_IELR_PHASE2): New var.
3048 (TV_IELR_PHASE3): New var.
3049 (TV_IELR_PHASE4): New var.
3050 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
3051 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
3052 Sbitset.h, ielr.h, and ielr.c.
3053 * src/getargs.h, src/getargs.c (enum trace, trace_args,
3054 trace_types): Add trace_ielr.
3055 * src/lalr.h, src/lalr.c (ngotos): Export it.
3056 (F): Rename to...
3057 (goto_follows): ... this, update all uses, and export it.
3058 (set_goto_map): Export it.
3059 (map_goto): Export it.
3060 (compute_lookahead_tokens): Don't free goto_follows yet. Now
3061 handled in ielr.
3062 (initialize_LA): Export it. Move lookback allocation to...
3063 (lalr): ... here because, for canonical LR, initialize_LA must
3064 be invoked but lookback and much of the rest of LALR isn't
3065 needed.
3066 * main.c (main): Instead of lalr, invoke ielr, which invokes
3067 lalr.
3068 * src/reader.c (reader): Default lr.type to "LALR".
3069 Default lr.default_rules to "accepting" if lr.type is "canonical
3070 LR". Leave the default as "all" otherwise.
3071 Check for a valid lr.type value.
3072 * src/state.h, src/state.c (struct state_list): Add state_list
3073 member.
3074 (state_new): Initialize state_list member to NULL.
3075 (state_new_isocore): New function, exported.
3076 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
3077 exercises all values of lr.type.
3078 (GNU AWK Grammar): Rename test group to...
3079 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
3080 AT_TEST_EXISTING_GRAMMAR.
3081 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
3082 (GNU pic Grammar): Rename test group to...
3083 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
3084 AT_TEST_EXISTING_GRAMMAR.
3085 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
3086 all values of lr.type.
3087 (Single State Split): New test groups using AT_TEST_LR_TYPE.
3088 (Lane Split): Likewise.
3089 (Complex Lane Split): Likewise.
3090 (Split During Added Lookahead Propagation): Likewise.
3091
7fe11bb5
JD
30922009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3093
3094 Add new files for IELR and canonical LR implementation.
3095 * src/AnnotationList.c: New.
3096 * src/AnnotationList.h: New.
3097 * src/InadequacyList.c: New.
3098 * src/InadequacyList.h: New.
3099 * src/Sbitset.c: New.
3100 * src/Sbitset.h: New.
3101 * src/ielr.c: New.
3102 * src/ielr.h: New.
3103
7254f6a8
JD
31042009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3105
3106 Implement %define lr.default_rules.
3107 Its value describes the states that are permitted to contain
3108 default rules: "all", "consistent", or "accepting".
3109 * src/reader.c (reader): Default lr.default_rules to "all".
3110 Check for a valid lr.default_rules value.
3111 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
3112 is "accepting", then only mark the accepting state as
3113 consistent.
3114 (initialize_LA): Tell state_lookahead_tokens_count whether
3115 lr.default_rules is "accepting".
3116 * src/tables.c (action_row): If lr.default_rules is not "all",
3117 then disable default rules in inconsistent states.
3118 * src/print.c (print_reductions): Use this opportunity to
3119 perform some assertions about whether lr.default_rules was
3120 obeyed correctly.
3121 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
3122 helps with checking the parser tables for a grammar.
3123 * tests/input.at (%define lr.default_rules invalid values): New
3124 test group.
3125 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
3126 AT_TEST_TABLES_AND_PARSE.
3127 (`no %define lr.default_rules'): New test group generated by
3128 AT_TEST_LR_DEFAULT_RULES.
3129 (`%define lr.default_rules "all"'): Likewise.
3130 (`%define lr.default_rules "consistent"'): Likewise.
3131 (`%define lr.default_rules "accepting"'): Likewise.
3132
72e727f2
AD
31332009-04-20 Akim Demaille <demaille@gostai.com>
3134
3135 Formatting change.
3136
90462b8d
AD
31372009-04-20 Akim Demaille <demaille@gostai.com>
3138
3139 bison: factoring.
3140 * src/output.c (token_definitions_output): Use symbol_id_get
3141 instead of duplicating its logic.
3142 * TODO (YYERRCODE): Extend.
3143
4f646c37
AD
31442009-04-20 Akim Demaille <demaille@gostai.com>
3145
71b00ed8
AD
3146 variables: prefer error-verbose to error_verbose.
3147 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
3148 instead of error_verbose.
3149 * src/scan-gram.l (%error-verbose): Map to the error-verbose
3150 variable.
3151 * doc/bison.texinfo: Promote %define error-verbose instead of
3152 %error-verbose.
3153 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
3154
31552009-04-15 Akim Demaille <demaille@gostai.com>
3156
4f646c37
AD
3157 variables: accept dashes.
3158 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
3159 underscores.
3160 * src/scan-gram.l ({id}): Also accept dashes after the initial
3161 letter.
3162 ({directive}): Use {id}.
3163 * src/parse-gram.y: Comment and formatting changes.
3164 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
3165 symbols.
3166 * src/complain.h, src/complain.c (yacc_at): New.
3167 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
3168 symbol names.
3169 * src/output.c (token_definitions_output): Do not #define token
3170 names with dashes.
3171
184e3179
AD
31722009-04-20 Akim Demaille <demaille@gostai.com>
3173
3174 Consistently refer to Yacc, not YACC.
3175 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
3176
41253c3a
JD
31772009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
3178
3179 Pacify make maintainer-check-posix.
3180 * tests/input.at (%define, --define): Move bison command-line
3181 options before grammar file name.
3182
197b82ba
JD
31832009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
3184
3185 Document semicolon warnings.
3186 * NEWS (2.5): Here.
3187
0c90a1f5
AD
31882009-04-14 Akim Demaille <demaille@gostai.com>
3189
3190 variables: use `parse.assert' instead of `assert'.
3191 * TODO (assert): Remove.
3192 * data/bison.m4 (b4_assert_if): Replace with...
3193 (b4_parse_assert_if): this.
3194 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
3195 * doc/bison.texinfo (Decl Summary): Document parse.assert.
3196
fa819509
AD
31972009-04-14 Akim Demaille <demaille@gostai.com>
3198
16dc0d90 3199 variables: use `parse.trace' instead of `debug'.
fa819509
AD
3200 * src/getargs.c (getargs): Map -t to %define trace.parse.
3201 * src/scan-gram.l (%debug): Map to %define trace.parse.
3202 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
3203 names to `_' in macro names.
3204 (b4_debug_if): Replace with...
3205 (b4_parse_trace_if): this.
3206 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
3207 * data/yacc.c: Adjust.
3208 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
3209 Use @code to label the variable list.
3210 Document the variable parse.trace.
3211 (Tracing): Promote the parse.trace variable.
3212 * TODO: %printer is not documented.
3213
f7dae1ea
AD
32142009-04-14 Akim Demaille <demaille@gostai.com>
3215
3216 doc: minor fixes.
3217 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
3218 (Table of Symbols): Remove duplicate entry for %debug.
3219
3535c071
EB
32202009-04-10 Eric Blake <ebb9@byu.net>
3221
3222 submodules: update to latest
3223 * submodules/autoconf: Use latest upstream Autoconf.
3224
cf48f675
EB
32252009-04-06 Eric Blake <ebb9@byu.net>
3226
3227 Work around autoconf 2.63b bug in testsuite.
3228 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
3229 autoconf bug related to # in test.
3230
50cca368
JD
32312009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
3232
3233 * NEWS (2.5): New section. Describe new -D/--define feature.
3234
3583d96b
AD
32352009-04-06 Akim Demaille <demaille@gostai.com>
3236
3237 Regen.
3238 * src/parse-gram.h, src/parse-gram.c: Regen.
3239
00f5d575
AD
32402009-04-06 Akim Demaille <demaille@gostai.com>
3241
3242 rename muscle_tab.* as muscle-tab.* for consistency.
3243 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
3244 * src/muscle-tab.h, src/muscle-tab.c: these.
3245 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
3246 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
3247
76bf5102
AD
32482009-04-06 Akim Demaille <demaille@gostai.com>
3249
3250 Makefile: introduce $(BISON).
3251 * src/local.mk (BISON): New.
3252 (YACC): Use it.
3253
bc0f5737
AD
32542009-04-06 Akim Demaille <demaille@gostai.com>
3255
3256 parser: handle %locations as %define locations.
3257 * src/getargs.h, src/getargs.c (locations_flag): Remove.
3258 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
3259 to set "locations" to true.
3260 * src/output.c (prepare): Don't output "locations".
3261 * src/scan-gram.l (%locations): Handle it as a %<flag>.
3262 * src/parse-gram.y: It's no longer a token.
3263 Don't handle it.
3264 * data/bison.m4 (b4_locations_if): Define it with
3265 b4_percent_define_if_define.
3266 * data/c.m4, data/glr.cc: Adjust.
3267
697c912f
AD
32682009-04-06 Akim Demaille <demaille@gostai.com>
3269
3270 Regen.
3271 * src/parse-gram.c: Regen.
3272
4920ae8b
AD
32732009-04-06 Akim Demaille <demaille@gostai.com>
3274
3275 muscle: factor the handling of obsolete of obsolete directives.
3276 Suggested by Joel E. Denny.
50cca368 3277
4920ae8b
AD
3278 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
3279 New, extracted from...
3280 * src/parse-gram.y (prologue_declaration: pure-parser): here.
3281 Remove it.
3282 (prologue_declaration: "%<flag>"): Use
3283 muscle_percent_define_ensure.
3284 (%error-verbose, %pure-parser): No longer tokens.
3285 * src/scan-gram.l (pure-parser): Return as a %<flag>.
3286
1d5b3c08
JD
32872009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
3288
3289 Fix options documentation.
3290 * build-aux/cross-options.pl: As in --help output, write optional
3291 arguments as [=ARG] not =[ARG].
3292 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
3293
62c99cf4
JD
32942009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
3295
3296 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
3297 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
3298 requirements for a correct m4 are stricter.
3299 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
3300 * configure.ac: Update to use AC_PROG_GNU_M4.
3301 Reported by Eric Blake.
3302
1c93f35b
JD
33032009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3304
3305 Help with updating web manual.
3306 * HACKING: Incorporate instructions from gnulib/doc/README.
3307 * bootstrap.conf (gnulib_modules): Add gendocs.
3308
86cfae0a
AD
33092009-04-03 Akim Demaille <demaille@gostai.com>
3310
3311 Regen.
3312 * src/parse-gram.h, src/parse-gram.c: Regen.
3313
ba061fa6
AD
33142009-04-03 Akim Demaille <demaille@gostai.com>
3315
3316 Factor %FLAG at scan level.
3317 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
3318 definitions and associated rules, replaced by....
3319 (PERCENT_FLAG): this new token type, and rule.
3320 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
3321 Use it for %debug and %error-verbose.
3322
b19ebeb3
AD
33232009-04-03 Akim Demaille <demaille@gostai.com>
3324
3325 Regen.
3326 * src/parse-gram.h, src/parse-gram.c: Regen.
3327
001a16a9
AD
33282009-04-03 Akim Demaille <demaille@gostai.com>
3329
3330 Treat %debug as %define debug.
3331 * data/bison.m4 (b4_debug_if): New.
3332 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
3333 * data/lalr1.java: Use it instead of b4_debug_flag.
3334 * src/getargs.h, src/getargs.c (debug_flag): Remove.
3335 * src/output.c (prepare): Don't output it.
3336 * src/parse-gram.y: Treat %debug as %define debug.
3337
33382009-04-03 Akim Demaille <demaille@gostai.com>
3339
3340 Treat %error-verbose as %define error_verbose.
3341 This allows to pass -Derror_verbose on the command line. Better
3342 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
3343 ERROR_VERBOSE being defined as false or true.
3344 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
3345 on b4_percent_define_ifdef, for does not check the defined value,
3346 but only whether the symbol is defined, rely on
3347 b4_percent_define_flag_if, so that a value of "false" is processed
3348 as a false.
3349 If not defined, define the flag to "false".
3350 (b4_error_verbose_if): New.
3351 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
3352 b4_error_verbose_flag.
3353 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
3354 * src/output.c (prepare): Don't output it.
3355 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
3356
92822aff
JD
33572009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3358
3359 Fix strange %define locations for default values.
3360 Reported by Akim Demaille at
3361 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
3362 and discussed again starting at
3363 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
3364 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
3365 because location information is bogus.
3366 Use angle brackets to delimit fake file name because square brackets
3367 look like underexpanded m4. Choose a better fake file name.
3368 Use negative line numbers.
3369 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
3370 * src/location.c (location_print): If line for a boundary is negative,
3371 only print that boundary's file name.
3372 * src/location.h: Document that.
3373 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3374 defaults): Update output.
3375
e021191b
JD
33762009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3377
3378 Pacify ./configure --enable-gcc-warnings.
3379 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
3380 in lib won't compile with it.
3381 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
3382
78f65418
AD
33832009-03-31 Akim Demaille <demaille@gostai.com>
3384
3385 bootstrap: --help to stdout.
3386 * bootstrap (usage): Don't send --help to stderr.
3387 Use a here doc instead of a long string.
3388
f7e241f4
AD
33892009-03-31 Akim Demaille <demaille@gostai.com>
3390
3391 bootstrap: README-hacking no longer exists
3392 * bootstrap (checkout_only_file): Set to HACKING.
3393
31d3e510
AD
33942009-03-26 Akim Demaille <demaille@gostai.com>
3395
3396 doc: merge HACKING and README-hacking.
3397 Two files is confusing.
3398 Reported by Alexandre Duret-Lutz.
1f9d8248 3399
31d3e510
AD
3400 * README-hacking: Merge into...
3401 * HACKING (Working from the repository): here.
3402
81535bfa
AD
34032009-03-26 Akim Demaille <demaille@gostai.com>
3404
3405 doc: update README-hacking.
3406 * README-hacking: We now use git and git submodules.
3407 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
3408
56f772e9
AD
34092009-03-26 Akim Demaille <demaille@gostai.com>
3410
3411 lalr1.cc: avoid GCC 4.3 warnings.
3412 GCC 4.3 now warns about "a || b && c" and asks for explicit
3413 parentheses.
3414 Reported by Alexandre Duret-Lutz.
3415 * data/location.cc: Update copyright years.
3416 (Position::operator==): Use parens to make precedence explicit.
3417 Compare lines and columns first, as they are more likely to be
3418 different, and they are faster to compare.
3419
11c073b7
AD
34202009-03-26 Akim Demaille <demaille@gostai.com>
3421
3422 gnulib: update.
3423 * gnulib: Update to latest.
3424 * src/local.mk (AM_CFLAGS): Move to...
3425 * Makefile.am: here.
3426 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
3427 AM_CFLAGS.
3428
91be6b28
AD
34292009-03-02 Akim Demaille <demaille@gostai.com>
3430
3431 Comment changes.
3432
cbf25ce7
AD
34332009-03-02 Akim Demaille <demaille@gostai.com>
3434
3435 Share b4_yytranslate_define.
3436 * data/lalr1.cc (b4_yytranslate_define): Move to...
3437 * data/c++.m4: here.
3438
882f02ed
AD
34392009-03-02 Akim Demaille <demaille@gostai.com>
3440
3441 Use locations in the variant example.
1f9d8248
AD
3442 Yes, this obfuscates the point of this example, variants only.
3443 But glr.cc cannot work (yet?) without locations. This change
3444 makes it easier to use this example with glr.cc.
11c073b7 3445
882f02ed
AD
3446 * examples/variant.yy (assert): %define it.
3447 (locations): Request them.
3448 (yylex): Bind the location to the stage.
3449
0623bacc
AD
34502009-03-02 Akim Demaille <demaille@gostai.com>
3451
3452 Dub make_TOKEN as a public type interface.
3453 * data/c++.m4 (b4_symbol_constructor_declare)
3454 (b4_symbol_constructor_define): New empty stubs.
3455 (b4_public_types_declare, b4_public_types_define): Use them.
3456 * data/lalr1.cc (b4_symbol_constructor_declare)
3457 (b4_symbol_constructor_declare_)
3458 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
3459 Move to...
3460 * data/variant.hh: here.
3461 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
3462 needed.
3463 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
3464 b4_symbol_constructor_declare, as it is now done by
3465 b4_public_types_define and b4_public_types_declare.
3466
5f5a90df
AD
34672009-03-02 Akim Demaille <demaille@gostai.com>
3468
3469 Coding style changes.
3470 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3471 (b4_symbol_constructor_declarations)
3472 (b4_symbol_constructor_definition_)
3473 (b4_symbol_constructor_definitions)
3474 (b4_yytranslate_definition): Rename as...
3475 (b4_symbol_constructor_declare_)
3476 (b4_symbol_constructor_declare)
3477 (b4_symbol_constructor_define_)
3478 (b4_symbol_constructor_define)
3479 (b4_yytranslate_define): these.
3480 * data/variant.hh (b4_variant_definition): Rename as...
3481 (b4_variant_define): this.
3482
b47b6ff7
AD
34832009-03-02 Akim Demaille <demaille@gostai.com>
3484
3485 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
3486 * data/bison.m4 (b4_percent_define_if_define): New.
3487 * data/c++.m4 (b4_variant_if): Move to...
3488 * data/bison.m4: Here, using b4_percent_define_if_define.
3489 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
3490 * data/bison.m4: Here, using b4_percent_define_if_define.
3491
1d6b689b
AD
34922009-03-02 Akim Demaille <demaille@gostai.com>
3493
3494 Dub symbol_type_base as a public type.
3495 * data/c++.m4 (b4_public_types_declare): Now define
3496 symbol_type_base and symbol_type.
3497 (b4_public_types_define): New.
3498 In both cases, the definitions are taken verbatim from lalr1.cc.
3499 * data/lalr1.cc: Adjust.
3500
4f84717d
AD
35012009-03-02 Akim Demaille <demaille@gostai.com>
3502
3503 b4_public_types_declare.
3504 * data/c++.m4 (b4_public_types_declare): New.
3505 * data/glr.cc, data/lalr1.cc: Use it.
3506
b9e4eb5b
AD
35072009-03-02 Akim Demaille <demaille@gostai.com>
3508
3509 b4_semantic_type_declare.
3510 * data/c++.m4 (b4_semantic_type_declare): New.
3511 Factors and generalizes what was in glr.cc and lalr1.cc.
3512 * data/variant.hh (b4_semantic_type_declare): Redefine it for
3513 variants.
3514 * data/lalr1.cc, data/glr.cc: Use it.
3515
6a6e7f0c
AD
35162009-02-26 Akim Demaille <demaille@gostai.com>
3517
3518 Upgrade gnulib.
3519 * gnulib: Upgrade from master.
3520 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
3521 Regen.
3522
e9e61b00
AD
35232009-02-25 Akim Demaille <demaille@gostai.com>
3524
3525 Remove useless arguments.
3526 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
3527 relevant.
3528
3eead995
AD
35292009-02-25 Akim Demaille <demaille@gostai.com>
3530
3531 Comment changes.
3532 * data/lalr1.cc: here.
3533
87f28efe
AD
35342009-02-25 Akim Demaille <demaille@gostai.com>
3535
3536 Fix glr.cc's debug level handling.
3537 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
3538 glr.c which is used.
3539 (debug_level, set_debug_level): Adjust.
3540
9be2a009
AD
35412009-02-25 Akim Demaille <demaille@gostai.com>
3542
3543 Copyright years.
3544 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
3545
07a6e87d
AD
35462009-02-25 Akim Demaille <demaille@gostai.com>
3547
3548 Style changes.
3549 * etc/bench.pl.in (generate_grammar_list): Consitently use
3550 location_type, not yy::location.
3551
33c78bd2
AD
35522009-02-25 Akim Demaille <demaille@gostai.com>
3553
3554 Comment change.
3555 * data/lalr1.cc: here.
3556
49572920
AD
35572009-02-19 Akim Demaille <demaille@gostai.com>
3558
3559 Make yyparser::error public.
3560 * data/lalr1.cc: here.
3561 There is no good reason to keep it private (and it is convenient
3562 to use it from the scanner for instance). It is already public in
3563 glr.cc.
3564
88654b47
AD
35652009-02-19 Akim Demaille <demaille@gostai.com>
3566
3567 Comment changes.
3568 * data/glr.cc: here.
3569
4524c55b
AD
35702009-02-19 Akim Demaille <demaille@gostai.com>
3571
3572 Remove trailing blanks.
6a6e7f0c
AD
3573 The epilogue has its own ending \n, no need to add another.
3574
4524c55b
AD
3575 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
3576 epilogue.
3577 * data/glr.cc: dnl when extending the epilogue.
3578 Remove stray "private:".
3579
6ceccee8
AD
35802009-02-19 Akim Demaille <demaille@gostai.com>
3581
3582 Use b4_c_modern.
3583 * data/c.m4 (b4_c_function_decl): Here.
3584
9c6a8966
AD
35852009-02-19 Akim Demaille <demaille@gostai.com>
3586
3587 Comment changes.
3588 * data/lalr1.cc: here.
3589
507aa0e2
AD
35902009-02-19 Akim Demaille <demaille@gostai.com>
3591
3592 Extract variant.hh
3593 * data/variant.hh: New, extracted from...
3594 * data/lalr1.cc: here.
3595 Adjust.
3596 * data/local.mk: Adjust.
3597
51bacae6
AD
35982009-02-19 Akim Demaille <demaille@gostai.com>
3599
3600 Extract stack.hh from lalr1.cc.
3601 * data/stack.hh: New.
3602 * data/lalr1.cc: Extract from here.
3603 * data/local.mk: Adjust.
3604
06c3084f
JD
36052009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
3606
3607 Add reminder about uploading public key to keys.gnupg.net.
3608 * HACKING (Release Procedure): Here.
3609
0ea583d2
AD
36102009-01-28 Akim Demaille <demaille@gostai.com>
3611
3612 * NEWS: Update information about 2.4.1 and 2.4.2.
3613
402b123d
AD
36142008-11-04 Akim Demaille <demaille@gostai.com>
3615
3616 Reformat NEWS.
3617 * NEWS: Use more outline-mode markup.
3618 Suggested by Jim Meyering.
3619
74553c98
AD
36202009-01-08 Akim Demaille <demaille@gostai.com>
3621
3622 Fix grep portability issues.
3623 Grep on Solaris does not support -q.
3624 Reported by Summum Bonum.
3625
3626 * NEWS: Add a stub for 2.4.2.
3627 * THANKS: Add Summum Bonum.
3628 * tests/atlocal.in (EGREP): New.
3629 (CC, CXX, XSLTPROC): Make it possible to override them via
3630 envvars.
3631 * tests/java.at: Use $EGREP instead of egrep.
3632 Use AT_CHECK's ignore instead of grep's -q.
3633
84eedf86
AD
36342008-12-11 Akim Demaille <demaille@gostai.com>
3635
3636 Pass the token type to yysyntax_error.
3637 * data/yacc.c (yysyntax_error): Take the transated token instead
3638 of the raw number.
3639 Adjust callers.
3640 * TODO: Update.
3641
5860cc8c
AD
36422008-12-11 Akim Demaille <demaille@gostai.com>
3643
3644 Formatting changes.
3645 * data/glr.c: Formatting changes.
3646
2b008529
AD
36472008-12-11 Akim Demaille <demaille@gostai.com>
3648
3649 Propagate i18n changes into glr.c.
3650 * TODO: Update.
3651 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
3652 building the error message format dynamically.
3653 * data/lalr1.java: Formatting changes.
3654
2cd1af95
AD
36552008-12-11 Akim Demaille <demaille@gostai.com>
3656
3657 Use testsuite -C.
3658 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
3659 Solves problems when top_srcdir is an absolute path.
3660 Suggested by Eric Blake.
3661 * configure.ac: Require Autoconf 2.62.
3662
eeb29422
AD
36632008-12-11 Akim Demaille <demaille@gostai.com>
3664
3665 Simplify the i18n of the error messages.
3666 * data/lalr1.cc: Comment changes.
3667 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
3668 lalr1.cc instead of building dynamically the format string.
3669
6617622c
AD
36702008-12-08 Akim Demaille <demaille@gostai.com>
3671
3672 Fix portability issue in the test suite.
3673 * tests/local.at (AT_MATCHES_CHECK): New.
3674 Based on Perl instead of Sed. Sed has too many portability
3675 pitfalls, not ever Sed is GNU Sed.
3676 * tests/actions.at (Fix user actions without a trailing semicolon):
3677 Use it.
3678
2ca1136c
AD
36792008-12-08 Akim Demaille <demaille@gostai.com>
3680
3681 Update data/README.
3682 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
3683
6c63b895
AD
36842008-12-08 Akim Demaille <demaille@gostai.com>
3685
3686 Install autoconf as a submodule to get m4sugar.
3687 * .gitmodules: Add submodules/autoconf.
3688 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
3689 submodules/autoconf.
3690
417e31d2
AD
36912008-12-08 Akim Demaille <demaille@gostai.com>
3692
3693 Test token.prefix in all the skeletons.
3694 * data/java.m4 (b4_token_enum): Use the token.prefix.
3695 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
3696 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
3697 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
3698 * tests/java.at: Comment changes.
3699 (AT_CHECK_JAVA_MINIMAL): Define the END token.
3700 (Java parser class and package names): Add token.prefix check.
3701
97abf544
AD
37022008-12-08 Akim Demaille <demaille@gostai.com>
3703
3704 Fix regeneration of atconfig.
3705 * tests/local.mk (tests/atconfig): The rule was incorrect, but
3706 remove it: now that there is no tests/Makefile.am, the top-level
3707 Makefile properly updates atconfig when needed.
3708
e8cd1ad6
DJ
37092008-12-07 Di-an Jan <dianj@freeshell.org>
3710
3711 Implement the FIXME that ends an user action with a semicolon
3712 if it seems necessary.
3713 * src/scan-code.l (flex rules section): Flag cpp directive from
3714 any `#' to the first unescaped end-of-line. Semicolon is not
3715 needed after `;', `{', '}', or cpp directives and is needed after
3716 any other token (whitespaces and comments have no effect).
3717 * tests/actions.at (Fix user actions without a trailing semicolon):
3718 New test.
3719 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
3720 to make user actions complete statements.
3721 Adjust column numbers in error messages.
3722 * tests/regression.at (Fix user actions without a trailing semicolon):
3723 Remove. Covered by new test.
3724
ce9447fc
AD
37252008-12-07 Akim Demaille <demaille@gostai.com>
3726
3727 Update gnulib.
3728 * gnulib: Update from master.
3729
d333175f
EB
37302008-12-05 Eric Blake <ebb9@byu.net>
3731
3732 Avoid compiler warning.
3733 * src/output.c (muscle_insert_item_number_table): Delete unused
3734 function.
3735
215b40ac
EB
37362008-12-02 Eric Blake <ebb9@byu.net>
3737
3738 Build testsuite with newer autoconf.
3739 * tests/output.at (m4_expand): Don't override in newer autoconf,
3740 where the underlying implementation changed.
3741 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
3742 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
3743 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
3744 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
3745 since some of them contain unbalanced ')'.
3746
3bb21113
AD
37472008-12-01 Akim Demaille <demaille@gostai.com>
3748
3749 Use b4_symbol for printers and destructors everywhere.
3750 * data/bison.m4 (b4_symbol_action_location): New.
3751 * data/c.m4 (b4_symbol_actions): Remove.
3752 Adjust all callers to use by b4_symbol_foreach and the corresponding
3753 b4_symbol_printer/destructor macro.
3754 * data/glr.cc: Adjust.
3755 * data/lalr1.java: Adjust the %destructor sanity check.
3756 * src/output.c (symbol_code_props_output): Remove, we no longer
3757 need the b4_symbol_printers/destructors tables.
3758
fb7c5b1f
AD
37592008-12-01 Akim Demaille <demaille@gostai.com>
3760
3761 Use b4_symbol_case_.
3762 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
3763 b4_symbol_case_.
3764
cf6fb222
AD
37652008-12-01 Akim Demaille <demaille@gostai.com>
3766
3767 Move b4_symbol based macro to bison.m4.
3768 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
3769 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
3770 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
3771 (b4_type_foreach): Move to...
3772 * data/bison.m4: Here.
3773 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
3774 b4_symbol_value_template instead of b4_symbol_value.
cf6fb222 3775
e3c52a63
AD
37762008-12-01 Akim Demaille <demaille@gostai.com>
3777
3778 b4_symbol/type_foreach.
3779 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
3780 Use them.
3781
2bde9113
AD
37822008-12-01 Akim Demaille <demaille@gostai.com>
3783
3784 Use the symbol properties to output the printer/destructor for lalr1.cc.
30c10faf
AD
3785 Instead of defining complex list of tuples to define various
3786 properties of the symbols, we now prefer to define symbols as
3787 "structs" in m4: using the symbol key (its number), and the
3788 property name, b4_symbol gives it value. Use this to handle
3789 destructors and printers.
3790
2bde9113
AD
3791 * src/output.c (CODE_PROP): New.
3792 (prepare_symbol_definitions): Use it to define the printer and
3793 destructor related attributes of the symbols.
3794 * data/lalr1.cc (b4_symbol_actions): Rename as...
3795 (b4_symbol_action): this.
3796 Use b4_symbol instead of 6 arguments.
3797 (b4_symbol_printer, b4_symbol_destructor): New.
3798 Use them instead of b4_symbol_actions.
3799
44494bf6
AD
38002008-12-01 Akim Demaille <demaille@gostai.com>
3801
3802 Avoid capturing variables too easily.
3803 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
3804 v__ and p__ instead of v and p.
3805
fad814bd
AD
38062008-12-01 Akim Demaille <demaille@gostai.com>
3807
3808 Remove spurious empty line before syncline.
3809 * data/bison.m4 (b4_syncline): Don't output an empty line before
3810 the output.
3811
feda5527
AD
38122008-11-26 Akim Demaille <demaille@gostai.com>
3813
3814 Convert lib/Makefile.am into lib/local.mk.
3815 The real problem is rather gnulib.mk, which itself is extracted
3816 from a Makefile.am that gnulib expects to the "recursive". The
3817 tool prefix-gnulib-mk converts such a gnulib.mk to be
3818 non-recursive. Also, some AC_SUBST variables need to be adjusted.
3819
3820 * etc/prefix-gnulib-mk: New.
3821 * bootstrap (slurp): Use it to convert further gnulib.mk.
3822 No longer try to avoid re-creation of lib/gnulib.mk as the changes
3823 are deeper.
3824 * lib/Makefile.am: Rename as...
3825 * lib/local.mk: this.
3826 Adjust to be prefixed.
3827 * Makefile.am, configure.ac: Adjust.
3828 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
3829
56ddee7f
AD
38302008-11-26 Akim Demaille <demaille@gostai.com>
3831
3832 s/_FLAGS/FLAGS/.
3833 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
3834 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
3835 Reported by Eric Blake.
3836
728e89a0
AD
38372008-11-26 Akim Demaille <demaille@gostai.com>
3838
3839 Use b4_parser_tables_define in glr.cc.
3840 * data/glr.c: Use b4_parser_tables_define instead of defining the
3841 (deterministic integral) tables by hand.
3842
2c1bf9bd
AD
38432008-11-26 Akim Demaille <demaille@gostai.com>
3844
3845 Use b4_parser_tables_define in Java.
3846 * data/java.m4 (b4_typed_parser_table): Rename as...
3847 (b4_typed_parser_table_define): this, for consistency.
3848 Accept a comment as $4.
3849 Move $2 into yy*_.
3850 (b4_integral_parser_table): Rename as...
3851 (b4_integral_parser_table_define): this.
3852 * data/lalr1.java: Adjust all uses.
3853 Use b4_parser_tables_define instead of generation by hand.
3854
ba206cf4
AD
38552008-11-26 Akim Demaille <demaille@gostai.com>
3856
3857 Prepare the convergence bw C style and Java table generation.
3858 * data/bison.m4 (b4_tables_map, b4_tables_declare)
3859 (b4_tables_define): Rename as...
3860 (b4_integral_parser_tables_map, b4_parser_tables_declare)
3861 (b4_parser_tables_define): these.
3862 * data/c.m4 (b4_table_define): Rename as...
3863 (b4_integral_parser_table_define): this.
3864 * data/lalr1.cc: Adjust.
3865 (b4_table_define, b4_table_declare): Rename as...
3866 (b4_integral_parser_table_define)
3867 (b4_integral_parser_table_declare): these.
3868 (yyrline_): Move the comment where it is actually used.
3869 * data/yacc.c: Adjust.
3870 (yyrline): Use b4_integral_parser_table_define.
3871
d12f8e49
AD
38722008-11-26 Akim Demaille <demaille@gostai.com>
3873
3874 Regen.
3875 * src/parse-gram.h, src/parse-gram.c: Regen.
3876
0991e29b
AD
38772008-11-26 Akim Demaille <demaille@gostai.com>
3878
3879 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
3880 * data/lalr1.cc (b4_tables_map): Move to...
3881 * data/bison.m4: here.
3882 Update the comment for yytable during the flight.
3883 (b4_tables_declare, b4_tables_define): New.
3884 * data/lalr1.cc: Use them.
3885 * data/c.m4 (b4_table_define): New.
3886 * data/yacc.c: Use b4_tables_define instead of output the tables
3887 by hand.
3888 * tests/regression.at (Web2c Actions): Adjust the expected output,
3889 the order of the tables changed.
3890
3d3bc1fe
AD
38912008-11-26 Akim Demaille <demaille@gostai.com>
3892
3893 Get rid of (yy)rhs and (yy)prhs.
3894 These tables are no longer needed in the parsers, and they don't seem to
3895 be useful. They are not documented either.
feda5527 3896
3d3bc1fe
AD
3897 * src/output.c (prepare_rules): Get rid of rhs and prhs.
3898 Adjust the computation of (yy)r2.
3899
08c81469
AD
39002008-11-26 Akim Demaille <demaille@gostai.com>
3901
3902 Rule length is unsigned.
3903 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
3904
932b0c96
AD
39052008-11-26 Akim Demaille <demaille@gostai.com>
3906
3907 Get rid of lalr1-split.cc.
3908 It was no longer maintainer.
feda5527 3909
932b0c96
AD
3910 * data/lalr1-split.cc: Remove.
3911 * etc/bench.pl.in (bench_fusion_parser): Remove.
3912 Adjust.
3913
8452c667
AD
39142008-11-26 Akim Demaille <demaille@gostai.com>
3915
3916 Use yy* consistently.
3917 * data/glr.c: Now that yyrhs no longer exists as a global
3918 variable, rename local "rhs" variables into "yyrhs" for
3919 consistency.
3920
783aa653
AD
39212008-11-25 Akim Demaille <demaille@gostai.com>
3922
3923 Get rid of yyrhs and yyprhs in glr.c.
3924 * data/glr.c (yyrhs, yyprhs): Remove.
3925 Instead, use the state stack and yystos.
3926
6130b755
AD
39272008-11-25 Akim Demaille <demaille@gostai.com>
3928
3929 Flag glr tests.
3930 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
3931 as an Autotest keyword.
3932
95a7b1c9
AD
39332008-11-25 Akim Demaille <demaille@gostai.com>
3934
3935 Prefer TESTSUITE_FLAGS.
3936 TESTSUITEFLAGS is barely readable.
feda5527 3937
95a7b1c9
AD
3938 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
3939 for backward compatibility.
3940 Use the former instead of the latter.
3941
b4f18401
AD
39422008-11-25 Akim Demaille <demaille@gostai.com>
3943
3944 Get rid of yyrhs and yyprhs in larl1.java.
3945 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
3946 (yy_reduce_print): Rather, use yystos_ and the state stack.
3947
c265fd6b
AD
39482008-11-25 Akim Demaille <demaille@gostai.com>
3949
3950 Formatting changes.
3951
68dbdee8
AD
39522008-11-25 Akim Demaille <demaille@gostai.com>
3953
3954 Get rid of yyrhs and yyprhs in yacc.c.
30c10faf
AD
3955 They were used to get the symbol types, given a rule number, when
3956 displaying the top of the stack before a reduction. But the
3957 symbol type is available from the state stack. This has two be
3958 benefits: two tables less in the parser (making it smaller), and a
3959 more consistent use of the three stacks which will help to fuse
3960 them.
feda5527 3961
68dbdee8
AD
3962 * data/yacc.c (yyprhs, yyrhs): Remove.
3963 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
3964 (yy_reduce_print): Take yyssp as argument.
3965 Use it, together with yystos, to get the symbol type.
3966 * tests/regression.at (Web2c Report): Remove these tables from the
3967 expected output.
3968
6ab1adbe
AD
39692008-11-25 Akim Demaille <demaille@gostai.com>
3970
3971 b4_tables_map.
3972 The point is to factor the generation of the tables across skeletons.
3973 This is language dependant.
feda5527 3974
6ab1adbe
AD
3975 * data/c.m4 (b4_comment_): New.
3976 Should be usable to define how to generate tables independently of
3977 the language.
3978 (b4_c_comment): New.
3979 (b4_comment): Bounce to b4_c_comment.
3980 Now support $2 = [PREFIX] for indentation.
3981 * data/lalr1.cc (b4_table_declare): Don't output a comment if
3982 there is no comment.
3983 Indent it properly when there is one.
3984 Output the ending semicolon.
3985 (b4_table_define): Space changes.
3986 Output the ending semicolon.
3987 (b4_tables_map): New.
3988 Use it twice instead of declaring and defining the (integral)
3989 tables by hand.
3990
0fddb3d5
AD
39912008-11-25 Akim Demaille <demaille@gostai.com>
3992
3993 b4_table_declare.
3994 * data/lalr1.cc (b4_table_declare): New.
3995 Use it to declare the tables defined with b4_table_define.
3996 (b4_table_define): Declare a third arg to match b4_table_declare
3997 signature.
3998 Move all the comments around invocations of b4_table_define into
3999 the invocations itselves.
4000 Move things around to have the order for declarations and
4001 definitions.
4002
c4ddc0fb
AD
40032008-11-25 Akim Demaille <demaille@gostai.com>
4004
4005 Formatting changes.
4006 * data/lalr1.java: here.
4007
e0c653e7
AD
40082008-11-25 Akim Demaille <demaille@gostai.com>
4009
4010 b4_args is more general than only C++.
4011 * data/lalr1.cc (b4_args, _b4_args): Move to...
4012 * data/bison.m4: here.
4013
4182a0a1
DJ
40142008-11-21 Di-an Jan <dianj@freeshell.org>
4015
4016 Implement no-XXX arguments for --warnings, --report, --trace.
4017 * src/getargs.c (flags_argmatch): Handles no-XXX.
4018 Fix typo in doxygen comment.
4019
01466c3e
AD
40202008-11-21 Akim Demaille <demaille@gostai.com>
4021
4022 Display the changes in cross-options.texi.
4023 * build-aux/cross-options.pl ($sep): New, to separate items.
4024 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
4025 changes.
4026
a7c09cba
DJ
40272008-11-20 Di-an Jan <dianj@freeshell.org>
4028
4029 Improves options in the manual.
4030 * doc/bison.texinfo (-g, -x): Add space before argument.
4031 (Option Cross Key): Implement FIXME: listing directives also.
4032 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
4033 (Short Option): Special case -d. Put arguments inside @option.
feda5527 4034 (Bison Directive): Add column, automatically extracted from
a7c09cba
DJ
4035 src/scan-gram.l (actual name passed as the first argument)
4036 with special case for %define.
4037 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
4038 to build-aux/cross-options.pl.
4039 * src/getargs.c (usage): Document limitations of cross-options.pl.
4040 * src/scan-gram.l: Likewise.
4041
6c88b51e
JD
40422008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
4043
4044 Fix unexpanded macros in GLR defines file.
4045 Reported by Csaba Raduly at
4046 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
4047 * THANKS (Csaba Raduly): Add.
4048 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
4049 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
4050 lexer in a separate module that includes the defines file.
4051 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
4052 source.
4053 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
4054 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
4055 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
4056 (AT_DATA_SOURCE_PROLOGUE): New.
4057 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
4058 (AT_DATA_SOURCE): New.
4059 (AT_FULL_COMPILE): Extend to support an additional source file.
4060
1e034807
AD
40612008-11-18 Akim Demaille <demaille@gostai.com>
4062
4063 More TODO.
4064 * TODO: More short term issues.
4065
e3dda35c
AD
40662008-11-18 Akim Demaille <demaille@gostai.com>
4067
4068 Regen.
4069 * src/parse-gram.h, src/parse-gram.c: Regen.
4070
bd187d7b
AD
40712008-11-18 Akim Demaille <demaille@gostai.com>
4072
4073 Use b4_subtract where possible.
4074 * data/lalr1.cc (b4_subtract): Move to...
4075 * data/bison.m4: here.
4076 * data/glr.c (b4_rhs_data): Use it.
4077 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
4078
6085ab0d
AD
40792008-11-18 Akim Demaille <demaille@gostai.com>
4080
4081 Remove incorrect mode specification.
4082 * data/glr.cc: Don't pretend it's C code.
4083
9ce405ce
JD
40842008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
4085
4086 Simplify last patch slightly.
4087 * src/getargs.c (getargs): Here.
4088
a8beef7e
JD
40892008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
4090
4091 Fix last warning from --enable-gcc-warnings.
4092 * src/getargs.c (getargs): Don't assign const address to non-const
4093 pointer.
4094
d50eea6d
JD
40952008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
4096
4097 Don't let maintainer-*-check targets force a version update.
4098 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
4099 handled.
4100
f5f419de
DJ
41012008-11-17 Di-an Jan <dianj@freeshell.org>
4102
4103 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
4104 Align menus. Adjust word wrapping. Use node names for menu names.
4105 (Examples): Don't abbreviate node names.
4106 (LocalWords): Remove abbreviations.
4107 (Copying): Make description a sentence.
d50eea6d 4108 (Java Action Features): Remove period to match the rest of menu.
f5f419de 4109
d73e55e0
DJ
41102008-11-17 Di-an Jan <dianj@freeshell.org>
4111
4112 Handles several --enable-gcc-warnings.
4113 * src/getargs.c (command_line_location): Set parameters to void.
4114 * src/output.c (symbol_type_name_cmp): Make static.
4115 (symbols_by_type_name): Set parameters to void.
4116 (symbol_definitions_output): Remove unused parameter. Rename as...
4117 (prepare_symbol_definitions): this.
4118 (muscles_output): Move symbol_definitions_output to...
4119 (output): here as prepare_symbol_definitions.
4120 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
d50eea6d 4121 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
d73e55e0 4122
68c989de
DJ
41232008-11-17 Di-an Jan <dianj@freeshell.org>
4124
4125 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
4126 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
4127
23ce6f4c
AD
41282008-11-16 Akim Demaille <demaille@gostai.com>
4129
4130 Add missing $(EXEEXT).
4131 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
4132 "src/bison$(EXEEXT)".
4133 Reported by Di-an Jan.
4134
dd704c35
AD
41352008-11-15 Akim Demaille <demaille@gostai.com>
4136
4137 * TODO: Update.
4138
dab244d5
AD
41392008-11-15 Akim Demaille <demaille@gostai.com>
4140
4141 Formatting changes.
4142 * tests/input.at: here.
4143
4b4da9fb
AD
41442008-11-15 Akim Demaille <demaille@gostai.com>
4145
4146 Remove duplicate header inclusion.
4147 * src/LR0.c: here.
4148
4ea3f53d
AD
41492008-11-15 Akim Demaille <demaille@gostai.com>
4150
4151 * src/parse-gram.h, src/parse-gram.c: Regen.
4152
cb823b6f
AD
41532008-11-15 Akim Demaille <demaille@gostai.com>
4154
4155 Support parametric types.
b06df3c2
AD
4156
4157 There are two issues to handle: first scanning nested angle
4158 bracket pairs to support types such as std::pair< std::string,
4159 std::list<std::string> > >.
4160
4161 Another issue is to address idiosyncracies of C++: do not glue two
4162 closing angle brackets together (otherwise it's operator>>), and
4163 avoid sticking blindly a TYPE to the opening <, as it can result
4164 in '<:' which is a digraph for '['.
4165
cb823b6f
AD
4166 * src/scan-gram.l (brace_level): Rename as...
4167 (nesting): this.
4168 (SC_TAG): New.
4169 Implement support for complex tags.
b06df3c2 4170 (tag): Accept
cb823b6f
AD
4171 , but not <.
4172 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
4173 (b4_symbol_variant): Leave space around types as parameters.
4174 * examples/variant.yy: Use nested template types and leading ::.
4175 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
4176 Rename as...
4177 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
4178 * tests/c++.at: Test parametric types.
4179
7b6e6753
AD
41802008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4181
4182 Test token.prefix.
4183 This is not sufficient, but we test at least that the make_SYMBOL
4184 interface is not affected by token.prefix. A more general test
4185 will be implemented when the support of token.prefix is generalized
4186 to more skeletons.
b06df3c2 4187
7b6e6753
AD
4188 * tests/c++.at: One more variant test, using token.prefix.
4189
dddec537
AD
41902008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4191
4192 Test the make_TOKEN interface.
4193 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
4194 Factor the common code in yylex.
4195 Use it to test "%define lex_symbol".
4196
7d3e21ba
AD
41972008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4198
4199 Formatting change.
4200
4fc55348
AD
42012008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4202
4203 Simplify code for variants bench marks.
4204 * etc/bench.pl.in (&generate_grammar_list): Define and use
4205 location_type.
4206 Factor the common code in yylex.
4207
070e6509
AD
42082008-11-15 Akim Demaille <demaille@gostai.com>
4209
4210 Better error message.
4211 * bootstrap (find_tool): Fix the error message.
4212
0078681b
AD
42132008-11-15 Akim Demaille <demaille@gostai.com>
4214
4215 Update variant.yy to newest interface.
4216 * examples/variant.yy: Define lex_symbol.
4217 Adjust.
4218
ff084799
AD
42192008-11-15 Akim Demaille <demaille@gostai.com>
4220
4221 Don't use locations in variant.yy.
4222 * examples/variant.yy: Adjust to not using locations.
4223
b0d79ec6
AD
42242008-11-15 Akim Demaille <demaille@gostai.com>
4225
4226 Comment changes.
4227 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
4228 comments for the license.
4229
d4977ce3
AD
42302008-11-15 Akim Demaille <demaille@gostai.com>
4231
4232 Remove tests/Makefile.am.
4233 * tests/Makefile.am: Rename as...
4234 * tests/local.mk: this.
4235 * Makefile.am, configure.ac: Adjust.
4236 * Makefile.am (DISTCLEANFILES): Define.
4237 (maintainer-check, maintainer-xml-check, maintainer-push-check):
4238 Remove, we no longer need to bounce to the real targets.
4239
87f1149a
AD
42402008-11-15 Akim Demaille <demaille@gostai.com>
4241
4242 Comment changes.
4243
36415906
AD
42442008-11-15 Akim Demaille <demaille@gostai.com>
4245
4246 djgpp/local.mk.
4247 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
4248 * djgpp/local.mk: this new file.
4249
e2c2f696
AD
42502008-11-15 Akim Demaille <demaille@gostai.com>
4251
4252 Remove doc/Makefile.am.
4253 * doc/Makefile.am: Rename as...
4254 * doc/local.mk: this.
4255 Adjust paths
4256 * Makefile.am, configure.ac: Adjust.
4257 * Makefile.am (MOSTLYCLEANFILES): New.
4258 * src/local.mk: Adjust.
4259
2ead32e6
AD
42602008-11-15 Akim Demaille <demaille@gostai.com>
4261
4262 Move sc_tight_scope into maint.mk.
b06df3c2
AD
4263 It does not work, and I don't know how it was supposed to work: it
4264 seems to be looking for sources in the build tree. I just moved
4265 it at a better place, fixing it is still required.
4266
2ead32e6
AD
4267 * src/local.mk (echo): Remove.
4268 (sc_tight_scope): Move to...
4269 * maint.mk: here.
4270
2df9ec37
AD
42712008-11-15 Akim Demaille <demaille@gostai.com>
4272
4273 Regen.
4274 * src/parse-gram.h, src/parse-gram.h: Regen.
4275
0305d25e
AD
42762008-11-15 Akim Demaille <demaille@gostai.com>
4277
4278 Remove src/Makefile.am.
4279 * src/Makefile.am: Rename as...
4280 * src/local.mk: this.
4281 Prefix all the paths with src/.
4282 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
4283 (AM_CPPFLAGS): Find find in builddir/src.
4284 (YACC): Move the flags into...
4285 (AM_YFLAGS): here.
4286 * maint.mk (sc_tight_scope): Disable.
4287 It used to bounce to the version in src/Makefile.am which is now
4288 part of this very Makefile.
4289 * Makefile.am, configure.ac: Adjust.
4290 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
4291 include "..." to find files "here": we are no longer in src/, so
4292 qualify the includes with src/.
4293 * doc/Makefile.am (PREPATH): No longer include the top_builddir
4294 prefix.
4295 (.x.1): Adjust to be able to create src/foo from the top level
4296 Makefile, instead of going bounce to src/Makefile the creation of
4297 foo.
4298
5277c0a3
AD
42992008-11-15 Akim Demaille <demaille@gostai.com>
4300
4301 Remove useless variable.
4302 * doc/Makefile.am (srcsrcdir): Remove.
4303
6a5aa0cd
AD
43042008-11-15 Akim Demaille <demaille@gostai.com>
4305
4306 Remove data/Makefile.am.
4307 * data/Makefile.am: Rename as...
4308 * data/local.mk: this.
4309 Adjust paths.
4310 * Makefile.am, configure.ac: Adjust.
4311
7cb794dc
AD
43122008-11-15 Akim Demaille <demaille@gostai.com>
4313
4314 Remove etc/Makefile.am.
4315 * etc/Makefile.am: Rename as...
4316 * etc/local.mk: this.
4317 Adjust.
4318 * Makefile.am, configure.ac: Adjust.
4319
cd409e3b
AD
43202008-11-15 Akim Demaille <demaille@gostai.com>
4321
4322 Remove examples/local.mk.
4323 examples/calc++/Makefile.am might be interesting to keep as is, since
4324 it is an example in itself.
2df9ec37 4325
cd409e3b
AD
4326 * examples/Makefile.am: Rename as...
4327 * examples/local.mk: this.
4328 Adjust.
4329 * Makefile.am, configure.ac: Adjust.
4330
9a1e4214
AD
43312008-11-15 Akim Demaille <demaille@gostai.com>
4332
4333 Remove build-aux/Makefile.am.
4334 Recursive Makefiles are really way too slow, let's get rid of some of
4335 them.
2df9ec37 4336
9a1e4214
AD
4337 * build-aux/Makefile.am: Rename as...
4338 * build-aux/local.mk: this.
4339 Adjust paths.
4340 * Makefile.am, configure.ac: Adjust.
4341
0634493c
AD
43422008-11-15 Akim Demaille <demaille@gostai.com>
4343
4344 Provide convenience constructors for locations and positions.
4345 * data/location.cc (position::position): Accept file, line and
4346 column as arguments with default values.
4347 Always qualify initial line and column literals as unsigned.
4348 (location::location): Provide convenience constructors.
4349
fe1b448a
AD
43502008-11-15 Akim Demaille <demaille@gostai.com>
4351
b06df3c2
AD
4352 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
4353 token type.
fe1b448a
AD
4354 Using template buys us nothing, and makes it uselessly complex to
4355 construct a symbol. Besides, it could not be generalized to other
4356 languages, while make_FOO would work in C/Java etc.
2df9ec37 4357
fe1b448a
AD
4358 * data/lalr1.cc (b4_symbol_): New.
4359 (b4_symbol): Use it.
4360 (b4_symbol_constructor_declaration_)
4361 (b4_symbol_constructor_definition_): Instead of generating
4362 specializations of an overloaded template function, just generate
4363 several functions whose names are forged from the token names
4364 without the token.prefix.
4365 (b4_symbol_constructor_declarations): Generate them for all the
4366 symbols, not just by class of symbol type, now that instead of
4367 specializing a function template by the token, we generate a
4368 function named after the token.
4369 (b4_symbol_constructor_specialization_)
4370 (b4_symbol_constructor_specializations): Remove.
4371 * etc/bench.pl.in: Adjust to this new API.
4372
5679f311
AD
43732008-11-13 Akim Demaille <demaille@gostai.com>
4374
4375 %define token.prefix.
b06df3c2
AD
4376 Provide a means to add a prefix to the name of the tokens as
4377 output in the generated files. Because of name clashes, it is
4378 good to have such a prefix such as TOK_ that protects from names
4379 such as EOF, FILE etc. But it clutters the grammar itself.
2df9ec37 4380
5679f311
AD
4381 * data/bison.m4 (token.prefix): Empty by default.
4382 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
4383 * data/lalr1.cc (b4_symbol): Ditto.
4384
3204049e
AD
43852008-11-13 Akim Demaille <demaille@gostai.com>
4386
4387 Compute at M4 time some of the subtractions.
90290ce5 4388 * data/lalr1.cc (b4_subtract): New.
3204049e
AD
4389 (b4_rhs_data): Use it.
4390
202598d3
AD
43912008-11-13 Akim Demaille <demaille@gostai.com>
4392
4393 symbol::token.
b06df3c2 4394 This allows the user to get the type of a token returned by yylex.
2df9ec37 4395
202598d3
AD
4396 * data/lalr1.cc (symbol::token): New.
4397 (yytoknum_): Define when %define lex_symbol, independently of
4398 %debug.
4399 (yytoken_number_): Move into...
4400 (symbol::token): here, since that's the only use.
4401 The other one is YYPRINT which was not officially supported
4402 by lalr1.cc, and anyway it did not work since YYPRINT uses this
4403 array under a different name (yytoknum).
4404
fc2476c7
AD
44052008-11-13 Akim Demaille <demaille@gostai.com>
4406
4407 YYERRCODE.
4408 * TODO (YYERRCODE): Mention the case of $undef.
4409
865f1e9f
AD
44102008-11-13 Akim Demaille <demaille@gostai.com>
4411
4412 TODO: YYPRINT.
4413 * TODO (YYPRINT): New.
4414
cb0b136a
AD
44152008-11-13 Akim Demaille <demaille@gostai.com>
4416
4417 Comment changes.
4418 * data/lalr1.cc, data/yacc.c: Fix the description of the
4419 yytranslate and yytoknum tables.
4420
2c086d29
AD
44212008-11-13 Akim Demaille <demaille@gostai.com>
4422
4423 Define make_symbol in the header.
b06df3c2
AD
4424 To reach good performances these functions should be inlined (yet
4425 this is to measure precisely). To this end they must be available
4426 to the caller.
2df9ec37 4427
2c086d29
AD
4428 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
4429 location_type with the class name.
4430 Since will now be output in the header, declare "inline".
4431 No longer use b4_symbol_constructor_specializations, but
4432 b4_symbol_constructor_definitions in the header.
4433 Don't call it in the *.cc file.
4434
1c4af381
AD
44352008-11-13 Akim Demaille <demaille@gostai.com>
4436
4437 Define yytranslate in the header for lex_symbol.
4438 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
4439 into the header file when using %define lex_symbol.
4440 (yytranslate_): Declare inline.
4441
e51b0a82
AD
44422008-11-13 Akim Demaille <demaille@gostai.com>
4443
b06df3c2
AD
4444 Define the constructors of symbol_type in
4445 b4_symbol_constructor_definitions.
e51b0a82 4446 The constructors are called by the make_symbol functions, which a
b06df3c2
AD
4447 forthcoming patch will move elsewhere. Hence the interest of
4448 putting them together.
2df9ec37 4449
b06df3c2
AD
4450 The stack_symbol_type does not need to be moved, it is used only
4451 by the parser.
2df9ec37 4452
e51b0a82
AD
4453 * data/lalr1.cc: Move symbol_type and symbol_base_type
4454 constructors into...
4455 (b4_symbol_constructor_definitions): here.
4456 Adjust.
4457
78835571
AD
44582008-11-13 Akim Demaille <demaille@gostai.com>
4459
4460 Make it easier to move the definition of yytranslate_.
4461 Forthcoming changes will make it possible to use yytranslate_
4462 from outside the parser implementation file.
2df9ec37 4463
78835571
AD
4464 * data/lalr1.cc (b4_yytranslate_definition): New.
4465 Use it.
4466
c1e6c88c
AD
44672008-11-13 Akim Demaille <demaille@gostai.com>
4468
4469 Remove useless class specification.
4470 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
4471 to refer to the class name to use a type defined by the class for
4472 arguments of member functions.
4473
4654b0c0
AD
44742008-11-13 Akim Demaille <demaille@gostai.com>
4475
4476 Finer input type for yytranslate.
4477 This patch is debatable: the tradition expects yylex to return an int
4478 which happens to correspond to token_number (which is an enum). This
4479 allows for instance to return characters (such as '*' etc.). But this
4480 goes against the stronger typing I am trying to have with the new
4481 lex interface which return a symbol_type. So in this case, feed
4482 yytranslate_ with a token_type.
2df9ec37 4483
4654b0c0
AD
4484 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
4485 expect a token_type.
4486
dd735e4e
AD
44872008-11-13 Akim Demaille <demaille@gostai.com>
4488
4489 Honor lex-params in %define lex_symbol mode.
4490 * data/lalr1.cc: Use b4_lex_param.
4491
6659366c
AD
44922008-11-13 Akim Demaille <demaille@gostai.com>
4493
4494 Simplify names.
4495 * src/output.c (symbol_definitions_output): Rename symbol
4496 attributes type_name and has_type_name as type and has_type.
4497 * data/lalr1.cc: Adjust uses.
4498
e9805e57
AD
44992008-11-13 Akim Demaille <demaille@gostai.com>
4500
4501 Use b4_type_names for the union type.
b06df3c2
AD
4502 The union used to compute the size of the variant used to iterate
4503 over the type of all the symbols, with a lot of redundancy. Now
4504 iterate over the lists of symbols having the same type-name.
2df9ec37 4505
e9805e57
AD
4506 * data/lalr1.cc (b4_char_sizeof_): New.
4507 (b4_char_sizeof): Use it.
4508 Adjust to be called with a list of numbers instead of a single
4509 number.
4510 Adjust its caller for new-line issues.
4511
aea10ef4
AD
45122008-11-13 Akim Demaille <demaille@gostai.com>
4513
4514 Define the "identifier" of a symbol.
b06df3c2
AD
4515 Symbols may have several string representations, for instance if
4516 they have an alias. What I call its "id" is a string that can be
4517 used as an identifier. May not exist.
2df9ec37 4518
b06df3c2
AD
4519 Currently the symbols which have the "tag_is_id" flag set are
4520 those that don't have an alias. Look harder for the id.
2df9ec37 4521
aea10ef4
AD
4522 * src/output.c (is_identifier): Move to...
4523 * src/symtab.c (is_identifier): here.
4524 * src/symtab.h, src/symtab.c (symbol_id_get): New.
4525 * src/output.c (symbol_definitions_output): Use it to define "id"
4526 and "has_id".
4527 Remove the definition of "tag_is_id".
4528 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
4529 "tag_is_id" were used to produce code.
4530 We still use "tag" for documentation.
4531
2ea7730c
AD
45322008-11-11 Akim Demaille <demaille@gostai.com>
4533
4534 Locations are no longer required by lalr1.cc.
4535 * data/lalr1.cc (_b4_args, b4_args): New.
4536 Adjust all uses of locations to make them optional.
4537 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
4538 (AT_CHECK_NAMESPACE): Check the use of locations.
4539 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
4540 without locations with lalr1.cc.
4541 Test these cases.
4542 * tests/output.at: Check lalr1.cc with and without location
4543 support.
4544 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
4545 Don't use locations.
4546
7ca2266a
AD
45472008-11-11 Akim Demaille <demaille@gostai.com>
4548
4549 AT_FULL_COMPILE.
4550 * tests/local.at (AT_FULL_COMPILE): New.
4551 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
4552
1a7a65f9
AD
45532008-11-11 Akim Demaille <demaille@gostai.com>
4554
4555 Support parens in calc++.
4556 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
4557 * examples/calc++/test (run): Check the expected output.
4558 Adjust callers.
4559 Check parens too.
4560
c944f7f2
AD
45612008-11-11 Akim Demaille <demaille@gostai.com>
4562
4563 Simplify lalr1.cc since %defines is mandatory.
4564 * data/lalr1.cc: Remove useless calls to b4_defines_if.
4565
dada3cd1
AD
45662008-11-11 Akim Demaille <demaille@gostai.com>
4567
4568 TODO: yyfmt.
4569 * TODO (yysyntax_error): New item.
4570
422c18f4
AD
45712008-11-11 Akim Demaille <demaille@gostai.com>
4572
4573 Prefer M4 to CPP.
4574 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
4575 YYERROR_VERBOSE.
4576
a0ffc175
AD
45772008-11-11 Akim Demaille <demaille@gostai.com>
4578
4579 Support i18n of the parse error messages.
4580 * TODO (lalr1.cc/I18n): Remove.
4581 * data/lalr1.cc (yysyntax_error_): Support the translation of the
4582 error messages, as done in yacc.c.
4583 Stay within the yy* pseudo namespace.
4584
00a8a083
AD
45852008-11-11 Akim Demaille <demaille@gostai.com>
4586
4587 More TODO.
4588 * TODO (single stack, yysyntax_error): New.
4589
09277875
AD
45902008-11-11 Akim Demaille <demaille@gostai.com>
4591
4592 Make it possible to return a symbol_type from yylex.
4593 * data/lalr1.cc (b4_lex_symbol_if): New.
4594 (parse): When lex_symbol is defined, expected yylex to return the
4595 complete lookahead.
4596 * etc/bench.pl.in (generate_grammar_list): Extend to support this
4597 yylex interface.
4598 (bench_variant_parser): Exercise it.
4599
64c1b92a
AD
46002008-11-11 Akim Demaille <demaille@gostai.com>
4601
4602 Remove useless bench case.
4603 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
4604 no longer used.
4605
2722aa42
AD
46062008-11-11 Akim Demaille <demaille@gostai.com>
4607
4608 Improve display of directives.
4609 * etc/bench.pl.in (parse_term): Don't add useless eol.
4610
918eb7c5
AD
46112008-11-11 Akim Demaille <demaille@gostai.com>
4612
4613 Use string_cast in the bench.
4614 * etc/bench.pl.in (generate_grammar_list): Define and use
4615 string_cast.
4616
39be9022
AD
46172008-11-11 Akim Demaille <demaille@gostai.com>
4618
4619 Replace yychar with a Boolean.
4620 * data/lalr1.cc (parse::yychar): Replace by...
4621 (parse::yyempty): this.
4622
a2e3fa77
AD
46232008-11-11 Akim Demaille <demaille@gostai.com>
4624
4625 Factor the tables.
4626 * TODO: New item.
4627
aba12ad1
AD
46282008-11-11 Akim Demaille <demaille@gostai.com>
4629
4630 Let yytranslate handle the eof case.
4631 * data/lalr1.cc (yytranslate_): Handle the EOF case.
4632 Adjust callers.
4633 No longer expect yychar to be equal to yyeof_, rather, test the
4634 lookahead's (translated) kind.
4635
27cb5b59
AD
46362008-11-11 Akim Demaille <demaille@gostai.com>
4637
4638 yychar cannot be empty in yyerrlab.
4639 * TODO (yychar == yyempty_): New.
4640 * data/lalr1.cc: Remove the handling of this case.
4641 This eases forthcoming changes related to yychar and yytranslate.
4642
fce629c0
AD
46432008-11-11 Akim Demaille <demaille@gostai.com>
4644
4645 Bench: syntactic sugar for %define/#define.
4646 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
4647 (&bench_push_parser, bench_variant_parser): Use this feature.
4648 (&eat): New.
4649 Use it.
4650
ce671960
AD
46512008-11-11 Akim Demaille <demaille@gostai.com>
4652
4653 Less memory pressure on the "list" bench.
4654 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
4655 the values, to limit memory pressure.
4656
2873fdf8
AD
46572008-11-11 Akim Demaille <demaille@gostai.com>
4658
4659 Introduce make_symbol.
b06df3c2
AD
4660 make_symbol provides a means to construct a full symbol (kind,
4661 value, location) in a single shot. It is meant to be a Symbol
4662 constructor, parameterized by the symbol kind so that overloading
4663 would prevent incorrect kind/value pairs. Unfortunately
4664 parameterized constructors do not work well in C++ (unless the
4665 parameter also appears as an argument, which is not acceptable),
4666 hence the use of a function instead of a constructor.
2df9ec37 4667
2873fdf8
AD
4668 * data/lalr1.cc (b4_symbol_constructor_declaration_)
4669 (b4_symbol_constructor_declarations)
4670 (b4_symbol_constructor_specialization_)
4671 (b4_symbol_constructor_specializations)
4672 (b4_symbol_constructor_definition_)
4673 (b4_symbol_constructor_definitions): New.
4674 Use them where appropriate to generate declaration, declaration of
4675 the specializations, and implementations of the templated
4676 overloaded function "make_symbol".
4677 (variant::variant): Always define a default ctor.
4678 Also provide a copy ctor.
4679 (symbol_base_type, symbol_type): New ctor overloads for value-less
4680 symbols.
4681 (symbol_type): Now public, so that functions such as yylex can use
4682 it.
4683
8be046d7
AD
46842008-11-11 Akim Demaille <demaille@gostai.com>
4685
4686 Inform m4 whether a tag is a valid id.
4687 * src/output.c (is_identifier): New.
4688 (symbol_definitions_output): Use it to define tag_is_id.
4689 But maybe this should be done at m4 level?
4690
de62edee
AD
46912008-11-11 Akim Demaille <demaille@gostai.com>
4692
4693 Test 214 was failing: it greps with a pattern containing [ ]*
4694 which obviously meant to catch spaces and tabs, but contained only
4695 spaces. Tabulations in sources are a nuisance, so to simplify the
4696 matter, get rid of all the tabulations in the Java sources. The
4697 other skeletons will be treated equally later.
4698
4699 * data/java.m4, data/lalr1.java: Untabify.
4700 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
4701 tabulations are no longer generated.
4702
905f0697
PB
47032008-11-11 Paolo Bonzini <bonzini@gnu.org>
4704
4705 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
4706 * configure.ac: Adjust usage.
4707 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4708 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4709 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
4710
09ccae9b
DJ
47112008-11-10 Di-an Jan <dianj@freeshell.org>
4712
4713 Workaround Java's ``code too large'' problem for parser tables
4714 in most cases, by using one function per initialization.
4715 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
4716 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
4717 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
4718 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
4719 (yytname_): Use b4_typed_parser_table.
4720 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
4721 ``code too large'' error.
4722
1979121c
DJ
47232008-11-10 Di-an Jan <dianj@freeshell.org>
4724
4725 * NEWS: Document them.
de62edee 4726
1979121c
DJ
4727 General Java skeleton improvements.
4728 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
4729 using gcj < 4.3 in the testsuite, according to comments in
4730 gnulib/m4/javacomp.m4.
4731 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
4732 location_type, position_type): Remove extraneous brackets from
4733 b4_percent_define_default.
4734 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
4735 m4_define and m4_define_default.
4736 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
4737 which marks the end of user code with appropriate syncline, like all
4738 the other skeletons.
4739 (b4_user_post_prologue): Add. Don't silently drop.
4740 (yylex): Remove.
4741 (parse): Inline yylex.
4742 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
4743 (%{...%}): Fix typo of %code imports.
4744 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
4745
4746 Support annotations on parser class with %define annotations.
4747 * data/lalr1.java (annotations): Add to parser class modifier.
4748 * doc/bison.texinfo (Java Parser Interface): Document
4749 %define annotations.
4750 (Java Declarations Summary): Document %define annotations.
4751 * tests/java.at (Java parser class modifiers): Test annotations.
4752
4753 Do not generate code for %error-verbose unless requested.
4754 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
4755 Make private. Make conditional on %error-verbose.
4756 (getErrorVerbose, setErrorVerbose): New.
4757 (yytnamerr_): Make conditional on %error-verbose.
4758 (yysyntax_error): Make some code conditional on %error-verbose.
4759 * doc/bison.texinfo (Java Bison Interface): Remove the parts
4760 about %error-verbose having no effect.
4761 (getErrorVerbose, setErrorVerbose): Document.
4762
4763 Move constants for token names to Lexer interface.
4764 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
4765 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
4766 (parse): Qualify EOF to Lexer.EOF.
4767 * doc/bison.texinfo (Java Parser Interface): Move documentation of
4768 EOF and token names to Java Lexer Interface.
4769 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
4770
4771 Make yyerror public.
4772 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
4773 (yyerror): Change to public. Add Javadoc comments. Use longer
4774 parameter names. Make the body rather than the declarator
4775 conditional on %locations.
4776 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
4777
4778 Allow user to add code to the constructor with %code init.
4779 * data/java.m4 (b4_init_throws): New, for %define init_throws.
4780 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
4781 Add %code init to the front of the constructor body.
4782 * doc/bison.texinfo (YYParser.YYParser): Document %code init
4783 and %define init_throws.
4784 (Java Declarations Summary): Document %code init and
4785 %define init_throws.
4786 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
4787 (Java constructor init and init_throws): Add tests.
de62edee 4788
42f832d6
AD
47892008-11-10 Akim Demaille <demaille@gostai.com>
4790
4791 Update TODO.
4792 * TODO (-D): is implemented.
4793 (associativity): Same precedence must have the same associativity.
4794 For instance, how can a * b / c be parsed if * is %left and / is
4795 %right?
4796 (YYERRORCODE, YYFAIL, YYBACKUP): New.
4797
247efe34
AD
47982008-11-10 Akim Demaille <demaille@gostai.com>
4799
4800 Formatting changes.
4801
5d731440
AD
48022008-11-10 Akim Demaille <demaille@gostai.com>
4803
4804 More information about the symbols.
4805 * src/output.c (type_names_output): Document all the symbols,
4806 including those that don't have a type-name.
4807 (symbol_definitions_output): Define "is_token" and
4808 "has_type_name".
4809 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
4810 type-name, now that they are defined too in b4_type_names.
4811
21db118b
AD
48122008-11-10 Akim Demaille <demaille@gostai.com>
4813
4814 Regen.
4815
6ed15cde
AD
48162008-11-10 Akim Demaille <demaille@gostai.com>
4817
4818 Make parser::yytranslate static.
b06df3c2
AD
4819 Small speedup (1%) on the list grammar. And makes yytranslate_
4820 available in non member functions.
de62edee 4821
6ed15cde
AD
4822 * data/lalr1.cc (yytranslate_): Does not need to be a instance
4823 function.
4824
30bb2edc
AD
48252008-11-10 Akim Demaille <demaille@gostai.com>
4826
4827 Avoid trailing spaces.
4828 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
4829 * data/lalr1.cc: Don't indent before rule and symbol actions, as
4830 they can be empty, and anyway this incorrectly indents the first
4831 action.
4832
b3a28fd4
AD
48332008-11-10 Akim Demaille <demaille@gostai.com>
4834
4835 Comment changes.
4836
914202bd
AD
48372008-11-10 Akim Demaille <demaille@gostai.com>
4838
4839 Use "enum" for integral constants.
4840 This is just nicer to read, I observed no speedup.
de62edee 4841
914202bd
AD
4842 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
4843 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
4844 (yyuser_token_number_max_, yyundef_token_): Move into...
4845 (yytranslate_): here.
4846
c17f9a4a
AD
48472008-11-10 Akim Demaille <demaille@gostai.com>
4848
4849 Shortcuts in bench directives.
4850 * etc/bench.pl.in (parse_dirs): New.
4851 Use it.
4852 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
4853 Create the benches in "benches/".
4854
b9855ea5
AD
48552008-11-10 Akim Demaille <demaille@gostai.com>
4856
4857 Formatting changes.
4858 * data/lalr1.cc: here.
4859
6e097787
AD
48602008-11-10 Akim Demaille <demaille@gostai.com>
4861
4862 Adjust verbose message to using emacs.
4863 * etc/bench.pl.in: Inform compilation-mode when we change the
4864 directory.
4865 (generate_grammar_list): Recognize %define "variant" in addition
4866 to %define variant.
4867
4c3cc7da
AD
48682008-11-10 Akim Demaille <demaille@gostai.com>
4869
4870 Classify symbols by type-name.
4871 * src/uniqstr.h (UNIQSTR_CMP): New.
4872 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
4873 (type_names_output): New.
4874 (muscles_output): Use it.
4875 * data/lalr1.cc (b4_symbol_action_): Remove.
4876 (b4_symbol_case_, b4_type_action_): New.
4877 Adjust uses of b4_symbol_action_ to use b4_type_action_.
4878
d69c9694
AD
48792008-11-10 Akim Demaille <demaille@gostai.com>
4880
4881 Change the handling of the symbols in the skeletons.
4882 Before we were using tables which lines were the symbols and which
4883 columns were things like number, tag, type-name etc. It is was
4884 difficult to extend: each time a column was added, all the numbers had
4885 to be updated (you asked for colon $2, not for "tag"). Also, it was
4886 hard to filter these tables when only a subset of the symbols (say the
4887 tokens, or the nterms, or the tokens that have and external number
4888 *and* a type-name) was of interest.
de62edee 4889
d69c9694
AD
4890 Now instead of monolithic tables, we define one macro per cell. For
4891 instance "b4_symbol(0, tag)" is a macro name which contents is
4892 self-decriptive. The macro "b4_symbol" provides easier access to
4893 these cells.
de62edee 4894
d69c9694
AD
4895 * src/output.c (type_names_output): Remove.
4896 (symbol_numbers_output, symbol_definitions_output): New.
4897 (muscles_output): Call them.
4898 (prepare_symbols): Define b4_symbols_number.
4899
5263bea9
AD
49002008-11-10 Akim Demaille <demaille@gostai.com>
4901
4902 --trace=muscles
4903 * src/getargs.h, src/getargs.c (trace_muscle): New.
4904 (trace_types, trace_args): Support it.
4905 * src/output.c (output_skeleton): Use it.
4906
4175f6bb
AD
49072008-11-10 Akim Demaille <demaille@gostai.com>
4908
4909 muscles_output.
4910 * src/output.c (muscles_output): New, extracted from...
4911 (output_skeleton): here.
4912 Adjust.
4913
1de69d6a
AD
49142008-11-10 Akim Demaille <demaille@gostai.com>
4915
4916 Formatting changes.
4917
36db78a7
AD
49182008-11-10 Akim Demaille <demaille@gostai.com>
4919
4920 Update the variant example.
4921 * examples/variant.yy: Formatting changes.
4922 One stage build.
4923
e5eb92e7
AD
49242008-11-10 Akim Demaille <demaille@gostai.com>
4925
4926 Support constructor with an argument.
4927 This improves the "list" bench by 2%.
de62edee 4928
e5eb92e7
AD
4929 * data/lalr1.cc (variant::build): Add an overloaded version with
4930 an argument.
4931 * tests/c++.at (AT_CHECK_VARIANT): Check it.
4932
76307410
AD
49332008-11-10 Akim Demaille <demaille@gostai.com>
4934
4935 Test variants.
4936 * tests/c++.at (AT_CHECK_VARIANTS): New.
4937 Use it with and without %define assert.
4938
d78f0ac9
AD
49392008-11-10 Akim Demaille <demaille@gostai.com>
4940
4941 Add %precedence support.
4942 Unfortunately it is not possible to reuse the %prec directive. This
4943 is because to please POSIX, we do not require to end the rules with a
4944 semicolon. As a result,
de62edee 4945
d78f0ac9 4946 foo: bar %prec baz
de62edee 4947
d78f0ac9
AD
4948 is ambiguous: either a rule which precedence is that of baz, or a rule,
4949 and then a declaration of the precedence of the token baz.
de62edee 4950
d78f0ac9
AD
4951 * doc/bison.texinfo: Document %precedence.
4952 (Precedence Only): New.
4953 * src/assoc.h, src/assoc.c (precedence_assoc): New.
4954 * src/conflicts.c (resolve_sr_conflict): Support it.
4955 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
4956 Parse it.
4957 * tests/calc.at: Use %precedence for NEG.
4958 * tests/conflicts.at (%precedence does not suffice)
4959 (%precedence suffices): New tests.
4960
c85be41a
AD
49612008-11-09 Akim Demaille <demaille@gostai.com>
4962
4963 Make benches in a sub dirs.
4964 * etc/bench.pl.in ($dir): New.
4965 Use it.
4966 Check the use of constructors with an argument.
4967 (bench_variant_parser): Fix.
4968
db65ca1f
AD
49692008-11-09 Akim Demaille <demaille@gostai.com>
4970
4971 fix eof condition
4972
9b0efa5b
AD
49732008-11-09 Akim Demaille <demaille@gostai.com>
4974
4975 Fix --help.
4976
432ac57a
AD
49772008-11-09 Akim Demaille <demaille@gostai.com>
4978
4979 Require the generation of parse-gram.output.
4980 * src/Makefile.am (YACC): Pass --report=all.
4981
deef2a0a
AD
49822008-11-09 Akim Demaille <demaille@gostai.com>
4983
4984 Formatting changes.
4985
df72984a
AD
49862008-11-09 Akim Demaille <demaille@gostai.com>
4987
4988 Update TODO.
4989 * TODO: Remove obsolete items.
4990 Update others.
4991
f10e19fd
AD
49922008-11-09 Akim Demaille <demaille@gostai.com>
4993
4994 Enhance bench.pl.
4995 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
4996 (@token, $grammar, $bench): New.
4997 (generate_grammar_variant): Rename as...
4998 (generate_grammar_list): this.
4999 (generate_grammar): Adjust.
5000 (bench_grammar): Rename as...
5001 (bench): this.
5002 Use it in the various bench-marking routines.
5003 (-b, -g): New options.
5004
5de9c593
AD
50052008-11-09 Akim Demaille <demaille@gostai.com>
5006
5007 Use a static hierarchy for symbols in the C++ parser.
5008 * data/lalr1.cc (symbol_base_type, symbol_type)
5009 (stack_symbol_type): Make it a static hierarchy.
5010 Adjust dependencies.
5011
757f8f98
AD
50122008-11-09 Akim Demaille <demaille@gostai.com>
5013
5014 bench.pl -d, --directive.
5015 * etc/bench.pl.in (@directive): New.
5016 (&bench_grammar): Use it.
5017 (&bench_list_grammar): New, to provide access to the "variant"
5018 grammar.
5019 Use it.
5020 (getopts): Support -d, --directive.
5021
d3be4f6d
AD
50222008-11-09 Akim Demaille <demaille@gostai.com>
5023
5024 Use inline for small operations.
5025 * data/lalr1.cc (symbol_base_type, symbol_type)
5026 (stack_symbol_type): Declare constructor and other operations as
5027 inline.
5028 (yy_destroy_): Inline.
5029
1f7d007b
AD
50302008-11-09 Akim Demaille <demaille@gostai.com>
5031
5032 Introduce a hierarchy for symbols.
5033 * data/lalr1.cc (symbol_base_type, symbol_type): New.
5034 (data_type): Rename as...
5035 (stack_symbol_type): this.
5036 Derive from symbol_base_type.
5037 (yy_symbol_value_print_): Merge into...
5038 (yy_symbol_print_): this.
5039 Rename as...
5040 (yy_print_): this.
5041 (yydestruct_): Rename as...
5042 (yy_destroy_): this.
5043 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
5044 (parser::parse): yyla is now of symbol_type.
5045 Use its type member instead of yytoken.
5046
bc0b0477
AD
50472008-11-09 Akim Demaille <demaille@gostai.com>
5048
5049 Rename data_type and stack_symbol_type.
5050 * data/lalr1.cc (data_type): Rename as...
5051 (stack_symbol_type): this.
5052
57295d14
AD
50532008-11-09 Akim Demaille <demaille@gostai.com>
5054
5055 Handle semantic value and location together.
5056 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
5057 yydata.value and yydata.location.
5058 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
5059 (YY_SYMBOL_PRINT): Now take semantic value and location as a
5060 single arg.
5061 Adjust all callers.
5062 (yydestruct_): New overload for a stack symbol.
5063
e9b0834e
AD
50642008-11-09 Akim Demaille <demaille@gostai.com>
5065
5066 Push a complete symbol, not connected parts.
5067 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
5068 state, value and location.
5069 Adjust callers.
5070
6082531a
AD
50712008-11-09 Akim Demaille <demaille@gostai.com>
5072
5073 Agregate yylval and yylloc.
5074 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
5075 (parser::yyla): this.
5076
33c195cc
AD
50772008-11-09 Akim Demaille <demaille@gostai.com>
5078
5079 Rely on the state stack to display reduction traces.
b06df3c2
AD
5080 To display rhs symbols before a reduction, we used information
5081 about the rule reduced, which required the tables yyrhs and
5082 yyprhs. Now use rely only on the state stack to get the same
5083 information.
de62edee 5084
33c195cc
AD
5085 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
5086 Use them.
5087 (parser::yyrhs_, parser::yyprhs_): Remove.
5088 (parser::yy_reduce_print_): Use the state stack.
5089
e1f93869
AD
50902008-11-09 Akim Demaille <demaille@gostai.com>
5091
5092 Fuse yyval and yyloc into yylhs.
5093 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
5094 yylhs.
5095 (parse): Replace yyval and yyloc with yylhs.value and
5096 yylhs.location.
5097 After a user action, compute yylhs.state earlier.
5098 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
5099 fresh error_token.
5100
2935744b
DJ
51012008-11-09 Di-an Jan <dianj@freeshell.org>
5102
5103 Remove unused variable.
5104 * src/output.c (type_names_output): Remove unused variable sep.
5105
bbf9ca37
PB
51062008-11-09 Paolo Bonzini <bonzini@gnu.org>
5107
5108 Change tests/output.at quoting.
5109 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
5110 expanding arguments.
5111
d9a9b96b
JD
51122008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
5113
5114 Don't add a semicolon to actions for %skeleton or %language.
5115 It breaks Java test cases as reported by Akim Demaille.
5116 * src/scan-code.l: Implement.
5117
51365192
JD
51182008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
5119
5120 Clean up %skeleton and %language priority implementation.
5121 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
5122 remove static qualifier because others will soon need to see it.
5123 (language_prio): Likewise.
5124 (getargs): Use command_line_prio rather than 0.
5125 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
5126 enum fields.
5127 (skeleton_prio): Extern it.
5128 (language_prio): Extern it.
5129 * src/parse-gram.y: Use grammar_prio rather than 1.
5130
9380cfd0
AD
51312008-11-07 Akim Demaille <demaille@gostai.com>
5132
5133 Moving push traces into yypush_.
5134 * data/lalr1.cc (yypush_): Now takes a optional trace message.
5135 Adjust all uses.
5136
8901f32e
AD
51372008-11-07 Akim Demaille <demaille@gostai.com>
5138
5139 The single-stack C++ parser is now the standard one.
5140 * data/lalr1.cc: Rename as...
5141 * data/lalr1-split.cc: this.
5142 * data/lalr1-fusion.cc: Rename as...
5143 * data/lalr1.cc: this.
5144 * etc/bench.pl.in: Adjust.
5145
8cdabf02
AD
51462008-11-07 Akim Demaille <demaille@gostai.com>
5147
5148 Avoid empty-if warnings.
5149 Reported by Quentin Hocquet.
de62edee 5150
8cdabf02
AD
5151 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
5152 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
5153
5a893c2b
AD
51542008-11-07 Akim Demaille <demaille@gostai.com>
5155
5156 Pass command line location to skeleton_arg and language_argmatch.
5157 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
5158 The location argument is now mandatory.
5159 Adjust all dependencies.
5160 (getargs): Use command_line_location.
5161
58697c6d
AD
51622008-11-07 Akim Demaille <demaille@gostai.com>
5163
5164 -D, --define.
5165 * src/getargs.c (usage): Document -D.
5166 Fix help string for --locations.
5167 (command_line_location): New.
5168 (short_options, long_options, getargs): Support -D, --define.
5169 (getargs): Move -d support at the right place.
5170 * doc/bison.texinfo (Bison Options): Update.
5171 * tests/input.at (%define, --define): New.
5172
9fe5a457
AD
51732008-11-07 Akim Demaille <demaille@gostai.com>
5174
5175 Initialize the muscle table before parsing the command line.
5176 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
5177 (getargs): Define file_name.
5178 * src/main.c (main): Initialize muscle_tab before calling
5179 getargs.
5180 * src/muscle_tab.c (muscle_init): No longer define file_name, as
5181 its value is not available yet.
5182
56c5eca9
AD
51832008-11-07 Akim Demaille <demaille@gostai.com>
5184
5185 Locations without columns for command line arguments.
5186 * src/location.c (location_print): Don't display negative columns.
5187 * src/location.h: Document this.
5188
9b9e0a7d
AD
51892008-11-07 Akim Demaille <demaille@gostai.com>
5190
5191 Fix --help.
5192 * src/getargs.c (usage): Fix help string for -W.
5193
74eae918
AD
51942008-11-07 Akim Demaille <demaille@gostai.com>
5195
5196 Handle more general types of option arguments.
5197 * build-aux/cross-options.pl: The argument ends at the first
5198 space, not the first non-symbol character.
5199 Use @var for each word appearing the argument description.
5200
a3d4c6fb
AD
52012008-11-07 Akim Demaille <demaille@gostai.com>
5202
5203 Destroy the variants that remain on the stack in case of error.
5204 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
5205 destructor.
5206 Display the value only if yymsg is nonnull.
5207 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
5208
2d32fc9f
AD
52092008-11-07 Akim Demaille <demaille@gostai.com>
5210
5211 Add "%define assert" to variants.
5212 This is used to help the user catch cases where some value gets
5213 ovewritten by a new one. This should not happen, as this will
5214 probably leak.
de62edee 5215
2d32fc9f
AD
5216 Unfortunately this uncovered a bug in the C++ parser itself: the
5217 lookahead value was not destroyed between two calls to yylex. For
5218 instance if the previous lookahead was a std::string, and then an int,
5219 then the value of the std::string was correctly taken (i.e., the
5220 lookahead was now an empty string), but std::string structure itself
5221 was not reclaimed.
de62edee 5222
2d32fc9f
AD
5223 This is now done in variant::build(other&) (which is used to take the
5224 value of the lookahead): other is not only stolen from its value, it
5225 is also destroyed. This incurs a new performance penalty of a few
5226 percent, and union becomes faster again.
de62edee 5227
2d32fc9f
AD
5228 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
5229 (b4_variant_if): New.
5230 (variant::built): New.
5231 Use it whereever the status of the variant changes.
5232 * etc/bench.pl.in: Check the penalty of %define assert.
5233
f6038cb8
AD
52342008-11-07 Akim Demaille <demaille@gostai.com>
5235
5236 Use "%define variant" in bench.pl.
5237 * etc/bench.pl.in: No longer use the pseudo directive %variants,
5238 just use %define variants.
5239
ccde1f98
AD
52402008-11-07 Akim Demaille <demaille@gostai.com>
5241
5242 Regen.
5243 * src/parse-gram.h, src/parse-gram.c: Regen.
5244
58bd33b7
JD
52452008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
5246
5247 Fix user actions without a trailing semicolon.
5248 Reported by Sergei Steshenko at
5249 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
5250 * THANKS (Sergei Steshenko): Add.
5251 * src/scan-code.l (SC_RULE_ACTION): Fix it.
5252 * tests/regression.at (Fix user actions without a trailing semicolon):
5253 New test case.
5254
639867b5
AD
52552008-11-04 Akim Demaille <demaille@gostai.com>
5256
5257 Use b4_copyright_years.
5258 * data/yacc.c (b4_copyright_years): New.
5259 Fix its value according to the comments in the file.
5260 Use it and undefine it.
5261
3c262606
AD
52622008-11-04 Akim Demaille <demaille@gostai.com>
5263
5264 Formatting changes.
5265 * data/lalr1-fusion.cc, src/parse-gram.y: here.
5266
a2b93d52
AD
52672008-11-04 Akim Demaille <demaille@gostai.com>
5268
5269 Formatting changes.
5270 * data/lalr1-fusion.cc: here.
5271
3a2803df
AD
52722008-11-04 Akim Demaille <demaille@gostai.com>
5273
5274 Use strict on bench.pl.
5275 * etc/bench.pl.in (&run, &generate_grammar): New.
5276 Rename the grammar generating functions for consistency.
5277 Change the interface so that the list of benches to run is passed
5278 as (optionless) arguments.
5279 (&compile): Use &run.
5280
a0d4650a
AD
52812008-11-04 Akim Demaille <demaille@gostai.com>
5282
5283 Remove spurious initial empty lines.
5284 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
5285 * data/yacc.c: End the @output lines with an @.
5286
cac9e09b
AD
52872008-11-04 Akim Demaille <demaille@gostai.com>
5288
5289 Improve the display of sizes.
5290 * etc/bench.p.in: Higher precision.
5291 Sort by decreasing size.
5292
4af4348a
AD
52932008-11-04 Akim Demaille <demaille@gostai.com>
5294
5295 Don't memcpy C++ structures.
5296 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
5297 arguments.
5298 (variant::build): New overload for
5299 copy-construction-that-destroys.
5300 (variant::swap): New.
5301 (parser::yypush_): Use it in variant mode.
5302
ef05c4d6
AD
53032008-11-04 Akim Demaille <demaille@gostai.com>
5304
5305 Better defaults for bench.pl.
5306 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
5307 default values.
5308 Adjust &verbose uses.
5309 (-q, --quiet): New.
5310
9718cfa9
AD
53112008-11-04 Akim Demaille <demaille@gostai.com>
5312
5313 Make variant.yy more complex.
5314 std::list cannot be copied via memcpy, they are more demanding than
5315 std::string. Use one std::list to strengthen the test.
de62edee 5316
9718cfa9
AD
5317 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
5318 Adjust.
5319 Create a list of strings, instead of a single large string.
5320
a6df593d
AD
53212008-11-04 Akim Demaille <demaille@gostai.com>
5322
5323 bench.pl --bench.
5324 * etc/bench.pl.in (--bench, $bench): New.
5325
006a0303
AD
53262008-11-04 Akim Demaille <demaille@gostai.com>
5327
5328 Sort methods.
5329 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
5330 Define it after as().
5331
faef3466
AD
53322008-11-04 Akim Demaille <demaille@gostai.com>
5333
5334 Useless parens.
5335 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
5336
2141aded
AD
53372008-11-04 Akim Demaille <demaille@gostai.com>
5338
5339 Issue missing synclines after user actions.
5340 * data/c.m4 (b4_case): Issue synclines on the output file.
5341
e426d17b
AD
53422008-11-04 Akim Demaille <demaille@gostai.com>
5343
5344 Remove trailing empty line.
5345 * data/lalr1-fusion.cc: Don't add an empty line after the user's
5346 epilogue.
5347
a9ce3f54
AD
53482008-11-04 Akim Demaille <demaille@gostai.com>
5349
5350 Fix output of copyright years.
5351 * data/bison.m4 (b4_copyright): Fix the indentation of the
5352 copyright year paragraph.
5353 Use b4_copyright_years when no years are given.
5354 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
5355 (b4_copyright_years): New.
5356 Use it.
5357
59c544c2
AD
53582008-11-04 Akim Demaille <demaille@gostai.com>
5359
5360 Avoid the spurious initial empty line.
5361 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
5362 the end of @output request to suppress the empty line that
5363 results.
5364
96b15448
AD
53652008-11-04 Akim Demaille <demaille@gostai.com>
5366
5367 Remove parser::rhs_number_type.
5368 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
5369 (yyrhs_): Use b4_table_define.
5370
f0633174
AD
53712008-11-04 Akim Demaille <demaille@gostai.com>
5372
5373 Fix iteration type.
5374 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
5375
417b8004
AD
53762008-11-04 Akim Demaille <demaille@gostai.com>
5377
5378 Factor the declaration of the integer tables.
5379 * data/lalr1-fusion.cc (b4_table_define): New.
5380 Use it.
5381
1a5246c6
AD
53822008-11-03 Akim Demaille <demaille@gostai.com>
5383
5384 Fix indentation of tables in lalr1.cc
5385 * data/lalr1-fusion.cc: Fix the indentation.
5386
f8a95c9c
AD
53872008-11-03 Akim Demaille <demaille@gostai.com>
5388
5389 Destroy the lhs symbols after reduction.
5390 * data/lalr1-fusion.cc (parse): After the user action, when in
5391 variant mode, destroy the lhs symbols.
5392
d7f4d823
AD
53932008-11-03 Akim Demaille <demaille@gostai.com>
5394
5395 Simplify yysyntax_error_ use.
5396 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
5397 type, but make it unnamed in the declaration when it is not used.
5398
8b9c89fb
AD
53992008-11-03 Akim Demaille <demaille@gostai.com>
5400
5401 Let yy::variant::build return an lvalue.
5402 * data/lalr1-fusion.cc (variant::build): Return a reference to the
5403 object.
5404
83243c24
AD
54052008-11-03 Akim Demaille <demaille@gostai.com>
5406
5407 Define yy::variant only when needed.
5408 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
5409 used.
5410
429b4848
AD
54112008-11-03 Akim Demaille <demaille@gostai.com>
5412
5413 Bench the three-stack lalr1.cc.
5414 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
5415 one-stack one.
5416
414c76a4
AD
54172008-11-03 Akim Demaille <demaille@gostai.com>
5418
5419 Fail on parse error in calc++.
5420 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
5421 status.
5422 * examples/calc++/test ($me, $number, $exit, run): New.
5423 Use them to propagate errors to the exit status.
5424
8a5783fd
AD
54252008-11-03 Akim Demaille <demaille@gostai.com>
5426
5427 Don't specify the skeleton twice in the example.
5428 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
5429 file does what is needed.
5430
0cc5bead
AD
54312008-11-03 Akim Demaille <demaille@gostai.com>
5432
5433 bench: Improve output.
5434 * etc/bench.pl.in (bench_grammar): Tune the printf format.
5435
5b421a4e
AD
54362008-11-03 Akim Demaille <demaille@gostai.com>
5437
5438 bench: check impact of %debug on variants.
5439 * etc/bench.pl.in (variant_grammar): Fix the computation of
5440 $variant.
5441 Generate a grammar file that can work with or without %debug.
5442 Do use the @directive.
5443 (bench_variant_parser): Check impact of %debug.
5444 (@directives): Rename all the occurrences to...
5445 (@directive): this, for consistency.
5446
d11ee647
AD
54472008-11-03 Akim Demaille <demaille@gostai.com>
5448
5449 bench: report the size too.
5450 * etc/bench.pl.in ($iterations): Defaults to -3.
5451 (&bench_grammar): Require hireswallclock.
5452 Compute and display the size of the result.
5453 More comments.
5454
e1b74b92
AD
54552008-11-03 Akim Demaille <demaille@gostai.com>
5456
5457 bench: More use of the verbosity level.
5458 * etc/bench.pl.in ($verbose, &verbose): New.
5459 Use them.
5460 More POD documentation.
5461
7e5f9c54
AD
54622008-11-03 Akim Demaille <demaille@gostai.com>
5463
5464 bench.pl: a command line interface
5465 * etc/bench.pl.in: More doc.
5466 Some fixes in the documentation.
5467 ($cflags, $iterations, &help, &getopt): New.
5468 Use them.
5469 (&variant_grammar): Let the number of stages be 10 times what is
5470 specified.
5471
7109a18d
AD
54722008-11-03 Akim Demaille <demaille@gostai.com>
5473
5474 Bench the use of Boost.Variants.
5475 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
5476 New.
5477 (&compile): Be ready to compile C++ parsers.
5478 (&bench_push_parser): Move debug information to the outermost
5479 level.
5480 * THANKS: Add Michiel De Wilde.
5481
922730fe
AD
54822008-11-03 Akim Demaille <demaille@gostai.com>
5483
5484 bench.pl: Pass directives as a list instead of as a string.
5485 * etc/bench.pl.in (&directives): New.
5486 (&triangular_grammar, &calc_grammar): Use it to format the Bison
5487 directives.
5488 (&triangular_grammar): Do use the directives (were ignored).
5489 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
5490 directives.
5491
7484f1d4
AD
54922008-11-03 Akim Demaille <demaille@gostai.com>
5493
5494 Improve genericity of bench.pl.
5495 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
5496 argument.
5497 (&bench_push_parser): New.
5498 Call it.
5499
15129f25
AD
55002008-11-03 Akim Demaille <demaille@gostai.com>
5501
5502 Add documentation to bench.pl.
5503 * etc/bench.pl.in: Comment changes.
5504
0e0ed236
AD
55052008-11-03 Akim Demaille <demaille@gostai.com>
5506
5507 Fuse the three stacks into a single one.
de62edee 5508
b06df3c2
AD
5509 In order to make it easy to perform benchmarks to ensure that
5510 there are no performance loss, lalr1.cc is forked into
5511 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
5512 lalr1.cc.
5513
5514 Meanwhile, to make sure that lalr1-fusion.cc is correctly
5515 exercized by the test suite, the user must install a symbolic link
5516 from lalr1.cc to it.
de62edee 5517
b06df3c2
AD
5518 Instead of having three stacks (state, value, location), use a
5519 stack of triples. This considerably simplifies the code (and it
5520 will be easier not to require locations as currently does the C++
5521 parser), and also gives a 10% speedup according to
5522 etc/bench (probably mainly since memory allocation is done once
5523 instead of three times).
de62edee 5524
0e0ed236
AD
5525 Another motivation is to make it easier to destruct properly
5526 semantic values: now that they are bound to their state (hence
5527 symbol type) it will be easier to call the appropriate destructor.
de62edee 5528
0e0ed236 5529 These changes should probably benefit the C parser too.
de62edee 5530
b06df3c2
AD
5531 * data/lalr1.cc: Copy as...
5532 * data/lalr1-fusion.cc: this new file.
0e0ed236
AD
5533 (b4_rhs_value, b4_rhs_location): New definitions overriding those
5534 from c++.m4.
5535 (state_stack_type, semantic_stack_type, location_stack_type)
5536 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
5537 (data_type, stack_type, yystack_): New.
5538 (YYLLOC_DEFAULT, yypush_): Adjust.
5539 (yyerror_range): Now based on data_type, not location_type.
5540
7dedf26e
AD
55412008-11-03 Akim Demaille <demaille@gostai.com>
5542
5543 Push the state, value, and location at the same time.
5544 This is needed to prepare a forthcoming patch that fuses the three
5545 stacks into one.
de62edee 5546
7dedf26e
AD
5547 * data/lalr1.cc (parser::yypush_): New.
5548 (parser::yynewstate): Change the semantics: instead of arriving to
5549 this label when value and location have been pushed, but yystate
5550 is to be pushed on the state stack, now the three of them must
5551 have been pushed before. yystate still must be the new state.
5552 This allows to use yypush_ everywhere instead of individual
5553 handling of the stacks.
5554
c4585f1e
AD
55552008-11-03 Akim Demaille <demaille@gostai.com>
5556
5557 Prefer references to pointers.
5558 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
5559 definition to use references instead of pointers.
5560 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
5561 Take the value and location as references.
5562 Adjust callers.
5563
56017c17
AD
55642008-11-03 Akim Demaille <demaille@gostai.com>
5565
5566 stack::size instead of stack::height.
5567 * data/lalr1.cc (stack::height): Rename as...
5568 (stack::size): this.
5569 Fix the output type.
5570 Comment changes.
5571
5ab8c47b
AD
55722008-11-03 Akim Demaille <demaille@gostai.com>
5573
5574 Use variants to support objects as semantic values.
b06df3c2
AD
5575 This patch was inspired by work by Michiel De Wilde. But he used
5576 Boost variants which (i) requires Boost on the user side, (ii) is
5577 slow, and (iii) has useless overhead (the parser knows the type of
5578 the semantic value there is no reason to duplicate this
5579 information as Boost.Variants do).
5580
5581 This implementation reserves a buffer large enough to store the
5582 largest objects. yy::variant implements this buffer. It was
5583 implemented with Quentin Hocquet.
de62edee 5584
5ab8c47b
AD
5585 * src/output.c (type_names_output): New.
5586 (output_skeleton): Invoke it.
5587 * data/c++.m4 (b4_variant_if): New.
5588 (b4_symbol_value): If needed, provide a definition for variants.
5589 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
5590 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
5591 (b4_char_sizeof, yy::variant): New.
5592 (parser::parse): If variants are requested, define
5593 parser::union_type, parser::variant, change the definition of
5594 semantic_type, construct $$ before running the user action instead
5595 of performing a default $$ = $1.
5596 * examples/variant.yy: New.
5597 Based on an example by Michiel De Wilde.
5598
1fa5d8bb
AD
55992008-11-03 Akim Demaille <demaille@gostai.com>
5600
5601 Parameterize the extraction of semantic values.
5602 To make future changes easier, no longer rely on ".TYPE" being the
5603 way to get a semantic value.
de62edee 5604
1fa5d8bb
AD
5605 * data/c.m4 (b4_symbol_value): New.
5606 Use it.
5607 * data/c++.m4, data/yacc.c: Use it.
5608 * data/glr.c: Use b4_symbol_value.
5609 (b4_rhs_data): New.
5610 Use it.
5611
91ba8a55
AD
56122008-11-03 Akim Demaille <demaille@gostai.com>
5613
5614 Prepare easier M4 changes.
5615 * data/lalr1.cc: Use escaped [] instead of literals to prepare
5616 future changes.
5617
c9ba9e59
JD
56182008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5619
5620 Initiate further development.
5621 * NEWS: Create an empty section for new entries.
5622 * gnulib: Update submodule to HEAD.
5623
bfb40910
JD
56242008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5625
5626 * NEWS: Version 2.4.
5627
241fda7a
JD
56282008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5629
5630 Prepare for next release.
5631 * NEWS: Briefly mention changes since 2.3b.
5632 * README: Say GNU m4 1.4.6, which we've been requiring in release
5633 announcements already, not 1.4.3, which breaks the build.
5634
ed4d67dc
JD
56352008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5636
5637 Say %language is experimental.
5638 We're thinking of extending it's effect on output file naming. See the
5639 thread at
5640 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
5641 * NEWS: Say it's experimental.
5642 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
5643 recommend it over %skeleton for now.
5644 (Bison Options): Likewise.
5645 (C++ Bison Interface): Use %skeleton not %language.
5646 (Calc++ Parser): Use %skeleton not %language.
5647 * src/getargs.c (usage): Say it's experimental.
5648
e254a580
DJ
56492008-11-01 Di-an Jan <dianj@freeshell.org>
5650 Paolo Bonzini <bonzini@gnu.org>
5651
5652 Support all Java parser class modifiers.
5653 * data/java.m4 (b4_percent_define_get3): New.
5654 (b4_final_if, b4_strictfp_if): New.
5655 * data/lalr1.java (final, strictfp, extends, implements): Support.
5656 * doc/bison.texinfo (final, strictfp, extends, implements): Add
5657 documentation.
5658 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
5659 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
5660 (AT_CHECK_JAVA_GREP): New.
5661 (Java parser class modifiers): New test.
5662 (Java parser class extends and implements): New test.
5663
5664 Model exception propagation better with throws and lex_throws.
5665 * data/java.m4 (b4_list2): New.
5666 (throws): Change default.
5667 * data/lalr1.java (yyaction): Add throws.
5668 (parse): Add lex_throws in addition to throws.
5669 * doc/bison.texinfo (throws, lex_throws): Add documentation.
5670 * tests/java.at (Java throws specifications): New test.
5671
5672 Improve documentation for Java parsers.
5673 * doc/bison.texinfo (Java Parsers): Add subsections.
5674 Don't quote first argument of %define.
5675 (Java Bison Interface): Document output files. Move documentation
5676 of parser class and merge into Java Parser Interface. Document
5677 features that error out. Document directives with no effect.
5678 Move note about Javadoc higher.
5679 (Java Semantic Values): Explicitly mention stype.
5680 Document that generic types cannot be used.
5681 (Java Location Values): Use @deftypeivar. Document constructors.
5682 Correct return value for toString.
5683 (Java Parser Interface): List undocumented constants/fields.
5684 Move documentation of fields added by %parse-param closer to list
5685 of members. Document that token names are added as fields.
5686 Document constructors accurately. Remove error method.
5687 (Java Scanner Interface): Move note on %pure-parser to Java Bison
5688 Interface. Describe %code lexer and yylex accutately.
5689 Remove documentation that does not match the code.
5690 (Java Action Features): New.
5691 (Java Differences): Add reference. Add item on semantic values.
5692 Add note about @{ ... @}. Clarify %% epilogue placement.
5693 (Java Declarations Summary): New.
5694
5695 Fix Java skeleton.
5696 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
5697 (b4_remove_comma): Quote test argument.
5698 (b4_identification): Remove "bison" field.
5699 * tests/java.at (Java parser class and package names): New test.
5700 (Java %parse-param and %lex-param): New test.
5701 (Java stype, position_class and location_class): New test.
5702
f259e4e6
PB
57032008-10-31 Di-an Jan <dianj@freeshell.org>
5704
5705 * data/lalr1.jave: Update copyright years.
5706 (YYParser): Correct name of "generated from" file in Javadoc:
5707 use b4_file_name instead of @ofile@.
5708 (Location constructor): Correct Javadoc parameter name.
5709 (yylloc): Add missing opening m4 quote after b4_location_if.
5710 This removes a stray [ in the Javadoc of Lexer.getStartPos.
5711 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
5712 (YYParser constructor): Correct Javadoc parameter name.
5713
cae5057f
JD
57142008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
5715
5716 Always put auxiliary code files in the same dir as other output files.
5717 * src/files.c (compute_file_name_parts): When the user specifies
5718 --output but not --file-prefix, extract the directory prefix from the
5719 file prefix not from the grammar file name. This affects the location
5720 of files like location.hh generated by the C++ skeleton. The includes
5721 in the other output files require this fix.
5722 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
5723 for expected output files.
5724 (Output files): Add a test for the above.
5725
4af432ba
JD
57262008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
5727
5728 * gnulib: Update submodule to HEAD.
5729
e26d4e43
JD
57302008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5731
5732 Update copyright year.
5733 * src/files.c: Here.
5734
c0ee9e21
DJ
57352008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
5736
5737 Don't overwrite the input file.
5738 * src/files.c (output_file_name_check): Fatal error if using input file
5739 for output.
5740 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
5741 argument.
5742 (Conflicting output files): Add test.
5743
482dc52f
AD
57442008-10-28 Akim Demaille <demaille@gostai.com>
5745
5746 Space changes.
5747 * data/lalr1.cc: Formatting changes.
5748
52cbbe84
AD
57492008-10-28 Akim Demaille <demaille@gostai.com>
5750
5751 Don't define debugging functions when !YYDEBUG.
5752 * data/lalr1.cc (debug_stream, set_debug_stream)
5753 (debug_level_type, debug_level, set_debug_level): Don't
5754 declare them when YYDEBUG is not defined.
5755 The implementation are already YYDEBUG-aware.
5756
0925d5bf
AD
57572008-10-28 Akim Demaille <demaille@gostai.com>
5758
5759 Prefer "continue" for empty loop bodies.
5760 * etc/bench.pl.in: Use "continue" instead of {}.
5761
cf98343c
AD
57622008-10-28 Akim Demaille <demaille@gostai.com>
5763
5764 Space and comments changes.
5765 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
5766 * data/c.m4, data/lalr1.cc: Space changes.
5767
9f467b7d
AD
57682008-10-28 Akim Demaille <demaille@gostai.com>
5769
5770 Make gnulib a submodule.
5771 * gnulib: New.
5772 * .gitmodules (gnulib): New.
5773
0f0e1ace
JD
57742008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5775
5776 Fix yyerror_range for user-defined location type in C++. Reported by
5777 Georg Sauthoff at
5778 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
5779 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
5780 * THANKS (Georg Sauthoff): Add.
5781
548e2104
JD
57822008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5783
5784 Update several administrative files mainly to facilitate releasing.
5785 * HACKING (Administrivia): Make the git-merge-changelog notes more
5786 helpful.
5787 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
5788 (Release Procedure): Update for git and add numerous details that were
5789 previously missing.
5790 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
5791 * maint.mk (announcement): Don't list bison as a bootstrap tool so
5792 that announcements don't claim we bootstrapped with whatever bison
5793 happened to be in PATH. Add flex as a bootstrap tool.
5794 * Makefile.maint: Remove, previously replaced by maint.mk.
5795 * Makefile.cfg: Remove, and migrate settings to...
5796 * cfg.mk: ... here for the sake of `make announcement'.
5797 * bootstrap.conf (gnulib_modules): Add announce-gen.
5798 * README: Say GNU Bison instead of just Bison. Suggested by Karl
5799 Berry.
5800
ddf17a6e
PB
58012008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
5802
5803 Small but important bugfixes for the Java skeleton.
5804 * data/lalr1.java (yyerror): Change Location to b4_location_type.
5805 (yy_symbol_print): Call toString on yyvaluep.
5806
e1145ad8
AD
58072008-08-29 Akim Demaille <demaille@gostai.com>
5808
5809 Clarify UPDATED use.
215b40ac 5810 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 5811 not to the release date of Bison.
215b40ac 5812 Reported by Joel E. Denny.
e1145ad8 5813
0df72d78
AD
58142008-08-29 Akim Demaille <demaille@gostai.com>
5815
5816 * README: Update FAQ pointer.
5817 Reported by Joel E. Denny.
5818
9a90b6bb
EB
58192008-08-27 Eric Blake <ebb9@byu.net>
5820
5821 Resync m4sugar from autoconf.
5822 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
5823 (m4_init): Adjust to latest m4.git changes.
5824 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
5825 effects.
5826 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
5827 (_m4_list_cmp): Reduce side effects.
5828
65015668
AD
58292008-08-27 Akim Demaille <demaille@gostai.com>
5830
5831 Check yyerrok in calc.at.
215b40ac
EB
5832 * tests/calc.at (calc.y): Use yyerrok on "( error )".
5833 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
5834 expected.
65015668 5835
98e26a92
AD
58362008-08-27 Akim Demaille <demaille@gostai.com>
5837
5838 Support yyerrok in lalr1.cc.
5839 YYBACKUP is still to import back into lalr1.cc.
215b40ac 5840 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 5841
86c0e784
JD
58422008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5843
5844 For maintainer-check*, don't recompile for a $(VERSION) update.
5845 * cfg.mk: New file.
5846 (_is-dist-target): Override the one in GNUmakefile.
5847 * Makefile.am (EXTRA_DIST): Add cfg.mk.
5848
88511166
JD
58492008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5850
5851 Update for recent change to gnulib.
5852 * src/parse-gram.y: Don't include strverscmp.h. It comes from
5853 string.h now.
5854
6bbb2ed5
EB
58552008-08-15 Eric Blake <ebb9@byu.net>
5856
d67c52e8
EB
5857 Remaining m4sugar merge from autoconf.
5858 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
5859 * data/m4sugar/foreach.m4: New file, copied from autoconf.
5860 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
5861 * src/output.c (output_skeleton): Tell m4 how to find it.
5862
6bbb2ed5
EB
5863 Partial m4sugar merge from autoconf: m4_map.
5864 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
5865 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
5866 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
5867 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
5868 for empty list.
5869 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
5870 Likewise.
5871 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
5872 declares it.
5873
8dce3875
JD
58742008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
5875
5876 Keep .version and PACKAGE_VERSION in sync.
5877 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
5878 dependency, and add comments justifying this in more detail. Discussed
5879 starting at
5880 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
5881
882a1fbf
EB
58822008-08-06 Eric Blake <ebb9@byu.net>
5883
a3764451
EB
5884 Partial m4sugar merge from autoconf: m4_shiftn.
5885 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
5886 (m4_shift2, m4_shift3): New macros.
5887 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
5888 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
5889 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
5890 * data/java.m4 (b4_remove_comma): Likewise.
5891
882a1fbf
EB
5892 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
5893 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
5894 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
5895 (m4_init): Consolidate wrapped text into single m4_wrap.
5896 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
5897 in wrapped text.
5898
a30e920d
EB
58992008-08-05 Eric Blake <ebb9@byu.net>
5900
dfcc5959
EB
5901 Partial m4sugar merge from autoconf: builtins, version.m4.
5902 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
5903 (m4_prepend): Remove, as it is unused and inherently quadratic,
5904 whereas m4_append is linear in newer m4.
5905 (m4_mkstemp): New builtin.
5906 (m4_symbols): Make rename conditional.
5907 (m4_version_prereq): Ensure fatal error if used in bison, which
5908 intentionally lacks version.m4.
5909
a30e920d
EB
5910 Fix comments in m4sugar.
5911 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
5912
445b7470
JD
59132008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5914
5915 Update for recent .gitignore fix in Gnulib.
5916 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
5917 anchored .gitignore entries.
5918
a1e50014
JD
59192008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5920
5921 Set gnu or gnits strictness.
5922 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
5923 development and gnits strictness for releases. Based on Eric Blake's
5924 suggestion at
5925 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
5926
d43f77e7
PB
59272008-07-31 Paolo Bonzini <bonzini@gnu.org>
5928
5929 * NEWS: Clarify documentation of %language.
5930
fee2ed87
PB
59312008-07-31 Paolo Bonzini <bonzini@gnu.org>
5932
5933 Support usage of git-merge-changelog.
5934 * .gitattributes: New.
5935 * HACKING: Document usage of git-merge-changelog.
5936 * bootstrap: Install git-merge-changelog entries in .git/config
5937 if appropriate.
5938
78029cd5
JD
59392008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5940
5941 Remove remaining dependence on CVS Id keyword.
5942 * ChangeLog: For the sake of people still using CVS, don't use dollars
5943 when mentioning Id.
5944 * data/xslt/bison.xsl: Remove Id from header comments, where it was
5945 unusual anyway.
5946 * data/xslt/xml2dot.xsl: Likewise.
5947 * data/xslt/xml2text.xsl: Likewise.
5948 * data/xslt/xml2xhtml.xsl: Likewise.
5949 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
5950 * doc/Makefile.am (neutralize): Remove, no longer needed.
5951 (.x.1): Don't use neutralize.
5952 (edit): Don't substitute for ID.
5953 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
5954
c53d18b1
JD
59552008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5956
5957 Fix dependence on computed configure variables.
5958 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
5959 $(top_srcdir)/configure.ac so that changes to computed variables, such
5960 as PACKAGE_VERSION, are seen.
5961 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
5962
5523ac79
JD
59632008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
5964
5965 Update copyright dates for recent changes.
5966 * Makefile.am: Here.
5967 * src/Makefile.am: Here.
5968 * src/reduce.c: Here.
5969 * tests/reduce.at: Here.
5970
8fa36911
JD
59712008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
5972
5973 Use git-version-gen for version names between releases.
5974 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
5975 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
5976 * .prev-version: New.
5977 * .version.in: Remove.
78029cd5 5978 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
5979 revision.
5980 * GNUmakefile: Remove, now copied from Gnulib.
5981 * Makefile.am: Add code suggested by comments in
5982 build-aux/git-version-gen.
5983 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
5984 .prev-version, and .version.
5985 * NEWS (2.3b+): Rename to...
5986 (?.?): ... this because we're dropping the "+" version naming scheme,
5987 but, in general, we still can't be sure of our next release name.
5988 * bootstrap: Add a quick hack to remove from .gitignore the
5989 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
5990 entry. This should really be fixed in gnulib instead.
5991 * bootstrap.conf (gnulib_modules): Add gnumakefile.
5992 * configure.ac (AC_INIT): Set version name by invoking
5993 build-aux/git-version-gen.
5994 (AC_CONFIG_FILES): Remove .version, now generated by
5995 build-aux/git-version-gen.
5996 * maint.mk: New, copied from coreutils.
5997 * doc/.cvsignore (bison.1): Add.
5998 * doc/.gitignore (/bison.1): Add.
5999 * doc/bison.1: Remove, generated.
6000 * src/.cvsignore (revision.c): Remove.
6001 * src/.gitignore (/revision.c): Remove.
6002 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
6003 (BUILT_SOURCES): Remove revision.c.
6004 (revision.c): Remove.
6005 * src/getargs.c (version): Don't print revision after the VERSION.
6006 * src/revision.h: Remove.
6007
bcf07cb7
JD
60082008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
6009
6010 Fix untranslatable composition of sentences. Reported by Goran
6011 Uddeborg at
6012 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
6013 * THANKS (Goran Uddeborg): Add.
6014 * src/reduce.c (reduce_print): Report the number of nonterminals and
6015 rules useless in the grammar in separate sentences.
6016 * tests/reduce.at (Useless Rules): Update output.
6017 (Reduced Automaton): Likewise.
6018 (Underivable Rules): Likewise.
6019 (Empty Language): Likewise.
6020
9aacab9a
JD
60212008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
6022
6023 Fix some .gitignore and .cvsignore problems.
6024 * bootstrap (insert_sorted_if_absent): Replace all uses with...
6025 (insert_vc_ignore): ... this new function, which prepends `/' to all
6026 .gitignore entries before passing them to insert_sorted_if_absent.
6027 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
6028 .cvsignore files are maintained even though Bison developers run
6029 bootstrap while using Git.
6030 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
6031 unneeded by Bison.
6032 (gnulib): Add.
6033 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
6034 unneeded. Reported by Eric Blake.
6035 * lib/.gitignore (/*~): Add.
6036 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
6037 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
6038 Blake.
6039 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
6040
a9fc7990
JD
60412008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
6042
6043 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
6044 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
6045 * bootstrap.conf (gnulib_modules): Add unsetenv.
6046 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
6047 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
6048 (/setenv.m4): Add.
6049 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
6050 the first argument because it may become position-dependent, and unset
6051 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
6052 Add comments explaining these issues in more detail.
6053
0f1d6f10
JD
60542008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
6055
6056 Add .gitignore everywhere based on .cvsignore.
6057 * .gitignore: New.
6058 * build-aux/.gitignore: New.
6059 * data/.gitignore: New.
6060 * doc/.gitignore: New.
6061 * etc/.gitignore: New.
6062 * examples/.gitignore: New.
6063 * examples/calc++/.gitignore: New.
6064 * lib/.gitignore: New.
6065 * m4/.gitignore: New.
6066 * po/.gitignore: New.
6067 * runtime-po/.gitignore: New.
6068 * src/.gitignore: New.
6069 * tests/.gitignore: New.
6070
7bd1665a
JD
60712008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
6072
6073 * NEWS (2.3b+): New section, empty for now.
6074 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
6075
72c5b982
JD
60762008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
6077
6078 * NEWS (2.3b): Update release date since there has been a delay in
6079 getting the announcements and tarballs out.
6080
bd02cd5d
JD
60812008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
6082
6083 * NEWS: Version 2.3b.
6084 * configure.ac (AC_INIT): Likewise.
6085 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
6086
9126263e
JD
60872008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
6088
6089 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
6090 been doing it for years.
6091 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
6092 (Release Procedure): Add FIXME about make alpha being unmaintained.
6093
fa6aa7b3
JD
60942008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
6095
6096 * data/yacc.c: Reformat m4 a little for readability.
6097 * src/lalr.c (build_relations): Correct comment.
6098
d30b312d
JMG
60992008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6100
6101 DJGPP specific issue.
6102 * djgpp/config.sed: Fixes required to run configure scripts generated
6103 by autoconf 2.62.
6104
138d4cd9
JD
61052008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
6106
6107 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
6108 coordinator@translationproject.org.
6109
8f7e2e1f
JD
61102008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6111
6112 * THANKS: Add Eric Blake.
6113
f55efa38
JD
61142008-04-23 Eric Blake <ebb9@byu.net>
6115
6116 Revert prior patch, by working around autoconf regression.
6117 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
6118 ("Output file name: ("): Uncomment test.
6119 ("Output file name: )"): Likewise.
6120 Based on an idea from Noah Misch.
6121
096c9f9d
JD
61222008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
6123
6124 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
6125 2.61. Reported by Juan Manuel Guerrero at
6126 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
6127 * tests/output.at ("Output file name: ("): Comment out test case for
6128 now.
6129 ("Output file name: )"): Likewise.
6130
0f664b89
JD
61312008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
6132
6133 * GNUmakefile: Update git-version-gen invocation so make dist
6134 succeeds.
6135
1cfe6375
JD
61362008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
6137
6138 Update to the current gnulib CVS repository, and fix trigraph handling
6139 in Bison.
6140 * bootstrap: Update gnulib CVS repository URL.
6141 (symlink_to_dir): Encapsulate the code that guarantees the destination
6142 directory exists into...
6143 (check_dst_dir): ... this new function, and...
6144 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
6145 fail when copying files into lib/uniwidth/.
6146 * src/output.c (prepare_symbols): When writing yytname muscles, where
6147 symbol names will be encoded in C-string literals, tell quotearg to
6148 escape trigraphs. This used to be the default in gnulib.
6149 * tests/regression.at (Token definitions): Because of the change in
6150 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
6151 escapes trigraphs in symbol names. Thus, yytname no longer has
6152 trigraphs unnecessarily doubly escaped. Update test case output.
6153 Extend test case to be sure Bison's own error messages will no longer
6154 have trigraphs in symbol names unnecessarily escaped once.
6155
74c52fc8
JD
61562008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
6157
6158 Fix make dist infinite loop reported by Juan Manuel Guerrero at
6159 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
6160 * .cvsignore: Add .version.
6161 * .version.in: New.
6162 * bootstrap.conf (gnulib_modules): Add git-version-gen.
6163 * configure.ac (AC_CONFIG_FILES): Add .version.
6164 * build-aux/.cvsignore: Add git-version-gen.
6165
8e55b3aa
JD
61662008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
6167
6168 * NEWS (2.3a+): Mention that -g now takes an argument.
6169 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
6170 consistency. Update the -g and -x entries now that they take
6171 arguments. Use brackets to indicate optional arguments.
6172 * src/getargs.c (usage): Explain the relationship between arguments of
6173 long and short options more completely. Document --defines and -d
6174 separately since the former takes an argument but, for POSIX Yacc, the
6175 latter does not.
6176 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 6177 (getargs): Sort cases.
8e55b3aa 6178
59c5ac72
AD
61792008-02-28 Akim Demaille <demaille@gostai.com>
6180
6181 * doc/bison.texinfo: Fix a few typos.
6182
118d4978
AD
61832008-02-28 Akim Demaille <akim@epita.fr>
6184
6185 * doc/bison.texinfo (Bison Options): Document -W.
6186 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
6187
7020f1e9
AD
61882008-02-28 Akim Demaille <akim@epita.fr>
6189
6190 * src/getargs.c (short_options): Split and sort for readability.
6191 -g and -x take optional arguments, just like their long options.
6192 * build-aux/cross-options.pl: Use /x to make the regexp easier to
6193 understand.
6194 Fix the handling of $opt which resulted in all the argument to be
6195 considered as optional.
6196
59da312b
JD
61972008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
6198
6199 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
6200 say its interface is experimental.
6201 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6202 Java.
6203 (Bison Options): In the -L and --language entry, mention Java.
6204 (Java Bison Interface): Say the interface is experimental.
6205 * src/getargs.c (usage): Mention -L and --language.
6206
6207 * NEWS (2.3a+): Say the push parsing interface is experimental.
6208 * doc/bison.texinfo (Push Decl): Likewise.
6209 (Decl Summary): Likewise in the "%define api.push_pull" entry.
6210 (Push Parser Function): Likewise.
6211 (Pull Parser Function): Likewise.
6212 (Parser Create Function): Likewise.
6213 (Parser Delete Function): Likewise.
6214 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
6215 yypull_parse, and yypush_parse entries.
6216
6217 * NEWS (2.3a+): Mention XML support, and say the schema is
6218 experimental.
6219 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
6220 * src/getargs.c (usage): Say the XML schema is experimental.
6221
6222 * NEWS (2.3a+): Say option instead of flag.
6223
2bb3ebec
WP
62242008-02-21 Wojciech Polak <polak@gnu.org>
6225
6226 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
6227 text.
6228
333e670c
JD
62292008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
6230
6231 Fix impure push parser compile error reported by Bob Rossi at
6232 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
6233 * data/yacc.c: Clean up whitespace in the output a little.
6234 (yypstate_allocated): Define for impure push parsers regardless of
6235 whether the pull interface is also requested.
6236 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
6237 check impure push parsers without the pull interface.
6238
6239 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
6240 yyerror takes arguments specified by %parse-param while yypstate_new
6241 does not.
6242 * doc/bison.texinfo (Parser Create Function): Document that
6243 yypstate_new returns 0 for multiple impure parser instances.
6244 * tests/push.at (Push Parsing: Multiple impure instances): Update
6245 expected stderr output.
6246
798096e1
JD
62472008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
6248
6249 * runtime-po/POTFILES.in (push.c): Remove.
6250
9ca7f077
JD
62512008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
6252
6253 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
6254 * data/push.c: Rename to...
6255 * data/yacc.c: ... this, overwriting it.
6256 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
6257 `%push-pull-parser' -> `%define api.push_pull "both"'.
6258 Remove old yacc.c tests, and update push.c tests to yacc.c.
6259
42ee26bb
JD
62602008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
6261
6262 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
6263 `"%code top" blocks' instead of `%code "top" blocks'.
6264 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
6265 Clean up whitespace in the output a little.
6266
b1cc23c4
JD
62672008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
6268
6269 Fix documentation problems reported by Tim Josling at
6270 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
6271 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
6272 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
6273 integers. Explain the effect of literal string aliases on error
6274 messages. Copy token 0 documentation from the C++ skeleton
6275 documentation.
6276
ab7f29f8
JD
62772008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
6278
6279 Accept a token number in a %left, %right, or %nonassoc for POSIX
6280 conformance. Reported by Tim Josling at
6281 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
6282 * NEWS (2.3a+): Mention.
6283 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
6284 and code numbers are treated by precedence declarations.
6285 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
6286 of symbols.1.
6287 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
6288 of symbol.
6289 (symbol.prec): New, just like symbol but allows INT.
6290 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
6291 longer holds.
6292 * tests/regression.at (Token number in precedence declaration): New
6293 test case.
6294
a924ef36
JMG
62952008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6296
6297 DJGPP specific issues.
6298 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
6299 be changed. Copyright timestamp adjusted.
6300 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
6301 be changed. Copyright timestamp adjusted.
6302 * djgpp/config.site: Copyright timestamp adjusted.
6303 * djgpp/config_h.sed: Copyright timestamp adjusted.
6304 * djgpp/djunpack.bat: Copyright timestamp adjusted.
6305 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
6306 filename translation list.
6307 * djgpp/subpipe.c (init_subpipe): Check the environment variables
6308 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
6309 files shall be created. Before trying to use the temp dir where the
6310 environment variable points to check that the dir really exists. If
6311 not default to the cwd as temp dir. Copyright timestamp adjusted.
6312 * djgpp/subpipe.h: Copyright timestamp adjusted.
6313 * djgpp/testsuite.sed: Copyright timestamp adjusted.
6314
389c8cfd
PE
63152008-01-30 Paul Eggert <eggert@cs.ucla.edu>
6316
6317 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
6318
5d1cfef4
PE
63192008-01-09 Paul Eggert <eggert@cs.ucla.edu>
6320
6321 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
6322 Problem reported by Claudio Saavedra in
6323 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
6324
e2dcf996
WP
63252008-01-05 Wojciech Polak <polak@gnu.org>
6326
6327 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
6328 document's title with the input grammar file name.
6329
da730230
JD
63302007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
6331
6332 Automate regression testing of the XML/XSLT implementation. Discussed
6333 starting at
6334 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
6335 * configure.ac (XSLTPROC): New substitution.
6336 * Makefile.am (maintainer-xml-check): New phony target invoking...
6337 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
6338 invoking make maintainer-check with BISON_TEST_XML=1.
6339 * tests/atlocal.in (XSLTPROC): New.
6340 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
6341 not to report reachable memory when Bison is expected to have a
6342 non-zero exit status and (2) to compare XML/XSLT output with --graph
6343 and --report=all output for every working grammar when
6344 BISON_TEST_XML=1.
6345 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
6346 (AT_BISON_CHECK_XML): New.
6347 (AT_QUELL_VALGRIND): New.
6348 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
6349 (AT_CHECK): ... don't redefine this since this was the old way to
6350 quell Valgrind.
6351 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
6352 AT_BISON_CHECK invocations.
6353 * tests/c++.at: Likewise.
6354 * tests/calc.at: Likewise.
6355 * tests/conflicts.at: Likewise.
6356 * tests/cxx-type.at: Likewise.
6357 * tests/existing.at: Likewise.
6358 * tests/glr-regression.at: Likewise.
6359 * tests/headers.at: Likewise.
6360 * tests/input.at: Likewise.
6361 * tests/java.at: Likewise.
6362 * tests/output.at: Likewise.
6363 * tests/push.at: Likewise.
6364 * tests/reduce.at: Likewise.
6365 * tests/regression.at: Likewise.
6366 * tests/sets.at: Likewise.
6367 * tests/skeletons.at: Likewise.
6368 * tests/synclines.at: Likewise.
6369 * tests/torture.at: Likewise.
6370 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
6371 tends to hang xsltproc.
6372 (Big horizontal): Likewise.
6373
408476bc
JD
63742007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
6375
6376 In XML output, remove redundant class attribute on symbol element.
6377 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
6378 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
6379 look up a symbol to determine whether it's a nonterminal or terminal.
6380 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
6381 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
6382
6383 Add prec/assoc information to XML output.
6384 * src/gram.c (grammar_rules_print_xml): For each rule that has a
6385 %prec, add a percent_prec attribute.
6386 * src/print-xml.c (print_grammar): For each terminal that has a
6387 precedence or associativity, add a prec or assoc attribute.
6388 (xml_indent): New.
6389 (xml_puts): Use xml_indent.
6390 (xml_printf): Use xml_indent.
6391 * src/print-xml.h (xml_indent): Prototype.
6392
6393 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
6394 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
6395
d4a26c48
JD
63962007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
6397
6398 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
6399 (bison:ruleByNumber): ... this for clarity.
6400 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
6401 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
6402 (xsl:template match="reduction"): Update.
6403 (xsl:template match="item"): Update.
6404 (xsl:template match="reduction"): Update.
6405
6406 In the XML output, don't print the list of rules where symbols appear.
6407 Compute it in XSLT instead. Discussed at
6408 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
6409 * data/xslt/bison.xsl (bison:ruleByLhs): New.
6410 (bison:ruleByRhs): New.
6411 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
6412 bison:ruleByRhs.
6413 (xsl:template match="terminal/rule"): Remove.
6414 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
6415 bison:ruleByRhs.
6416 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
6417 Remove.
6418 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
6419 bison:ruleByRhs and mode="number-link" for rule template.
6420 (xsl:template match="terminal/rule"): Remove.
6421 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
6422 bison:ruleByRhs and mode="number-link" for rule template.
6423 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
6424 Rewrite as...
6425 (xsl:template match="rule" mode="number-link"): ... this.
6426 * src/print-xml.c (print_grammar): Don't print the list of rules.
6427
ef1b4273
JD
64282007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6429
6430 Don't let --report affect XML output; always print all information.
6431 Discussed at
6432 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
6433 * src/conflicts.c (log_resolution): Implement.
6434 * src/print-xml.c (print_core): Implement.
6435 (print_state): Implement.
6436 (print_xml): Implement.
6437
6438 * NEWS (2.3a+): Fix quotes.
6439 * src/parse-gram.y (prologue_declaration): For consistency with -v,
6440 don't let %verbose clear the list specified by --report.
6441
0f6cd9e3
AD
64422007-11-26 Akim Demaille <akim@epita.fr>
6443
6444 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
6445
d80fb37a
JD
64462007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
6447
6448 In the XML output, list useless and unused symbols and rules with the
6449 useful ones and add a "usefulness" attribute. Discussed starting at
6450 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
6451 * src/gram.c (grammar_rules_partial_print_xml): Remove.
6452 (grammar_rules_print_xml): Print all rules instead of just those
6453 useful in the grammar, and add a "usefulness" attribute.
6454 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
6455 * src/print-xml.c (print_rules_useless_in_parser): Remove.
6456 (print_grammar): Print all nonterminals instead of just useful ones,
6457 and add a "usefulness" attribute to nonterminals and terminals.
6458 (print_xml): Don't print a separate "reductions" or
6459 "rules-useless-in-parser" element.
6460 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
6461 (reduce_xml): Remove.
6462 (reduce_token_unused_in_grammar): New.
6463 (reduce_nonterminal_useless_in_grammar): New.
6464 * src/reduce.h (reduce_xml): Remove prototype.
6465 (reduce_token_unused_in_grammar): Add prototype.
6466 (reduce_nonterminal_useless_in_grammar): Add prototype.
6467 * data/xslt/xml2text.xsl: Update for XML changes.
6468 * data/xslt/xml2xhtml.xsl: Update for XML changes.
6469 * tests/reduce.at (Useless Terminals): Update output.
6470 (Useless Rules): Update output.
6471 (Reduced Automaton): Update output.
6472
6473 Say "Terminals unused in grammar" instead of "Unused terminals".
6474 * NEWS (2.3a+): Update.
6475 * doc/bison.texinfo (Understanding): Update example output.
6476 * src/reduce.c (reduce_output): Implement.
6477 * data/xslt/xml2text.xsl: Implement.
6478 * data/xslt/xml2xhtml.xsl: Implement.
6479
1bb2bd75
JD
64802007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
6481
6482 Accept --report-file=FILE to override the default `.output' filename.
6483 * NEWS (2.3a+): Mention.
6484 * doc/bison.texinfo (Bison Options): Add an entry.
6485 * src/files.c (compute_output_file_names): Don't override
6486 spec_verbose_file if already set.
6487 * src/getargs.c (usage): Document --report-file.
6488 (REPORT_FILE_OPTION): New anonymous enum member.
6489 (long_options): Add entry for it.
6490 (getargs): Add case for it setting spec_verbose_file.
6491
6492 * build-aux/cross-options.pl: Don't record a short option just because
6493 there's an arg.
6494 * doc/.cvsignore: Add yacc.1.
6495
a005a9c4
AD
64962007-11-14 Akim Demaille <akim@epita.fr>
6497
6498 * doc/yacc.1.in: New.
6499 * configure.ac, doc/Makefile.am: Adjust.
6500 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
6501 config.h symbol.
6502 Use AC_SUBST for assignments too.
6503 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
6504
cff03fb2
JD
65052007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6506
6507 * src/gram.c: Remove comments that duplicate comments in gram.h.
6508
6509 When reporting useless rules and nonterminals, say "useless in grammar"
6510 instead of "useless", and say "useless in parser" instead of "never
6511 reduced". Discussed starting at
6512 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
6513 * NEWS (2.3a+): Mention this change.
6514 * data/xslt/xml2text.xsl: Update output text and expected input XML
6515 element names to match changes below.
6516 * data/xslt/xml2xhtml.xsl: Likewise.
6517 (xsl:template match="bison-xml-report"): Add missing entry in Table of
6518 Contents: "Rules useless in parser due to conflicts".
6519 * doc/bison.texinfo (Decl Summary): Reword a little.
6520 (Understanding): Update example output for changes below.
6521 * src/gram.c: (rule_useful_p): Rename to...
6522 (rule_useful_in_grammar_p): ... this.
6523 (rule_useless_p): Rename to...
6524 (rule_useless_in_grammar_p): ... this.
6525 (rule_never_reduced_p): Rename to...
6526 (rule_useless_in_parser_p): ... this.
6527 (grammar_rules_print): Update for renames.
6528 (grammar_rules_print_xml): Update for renames.
6529 (grammar_rules_never_reduced_report): Rename to...
6530 (grammar_rules_useless_report): ... this since it is used for either
6531 kind of useless rule.
6532 * src/gram.h: Reword comments and update function names in prototypes.
6533 * src/main.c (main): Say "rule useless in parser due to conflicts".
6534 * src/print-xml.c (print_rules_never_reduced): Rename to...
6535 (print_rules_useless_in_parser): ... this, and rename output XML
6536 element "rules-never-reduced" to "rules-useless-in-parser".
6537 (print_xml): Update for rename.
6538 * src/print.c (print_results): Say "Rules useless in parser due to
6539 conflicts".
6540 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
6541 (nonterminals_reduce): Say "nonterminal useless in grammar".
6542 (reduce_output): Say "Nonterminals useless in grammar".
6543 Say "Rules useless in grammar".
6544 (reduce_xml): Rename output XML element "useless" to
6545 "useless-in-grammar".
6546 (reduce_print): Don't report the count of grammatically useless rules
6547 as "rules never reduced" just because %yacc is specified.
6548 In the correct report of this count, say nonterminal(s) and rule(s)
6549 "useless in grammar".
6550 * tests/conflicts.at (S/R in initial): Update expected output.
6551 (Defaulted Conflicted Reduction): Likewise.
6552 (Unreachable States After Conflict Resolution): Likewise.
6553 * tests/existing.at (GNU pic Grammar): Likewise.
6554 * tests/reduce.at (Useless Nonterminals): Likewise.
6555 (Useless Rules): Likewise.
6556 (Reduced Automaton): Likewise.
6557 (Underivable Rules): Likewise.
6558 (Empty Language): Likewise.
6559
66f0441d
JD
65602007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6561
6562 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
6563 here document and before the EOF so that BSD's implementation of Bourne
6564 shell doesn't parse the delimiter as part of the here document.
6565 * doc/.cvsignore: Add cross-options.texi.
6566 * src/getargs.c (usage): Add a blank line after the warning categories.
6567
d0ee4105
PB
65682007-11-08 Paolo Bonzini <bonzini@gnu.org>
6569
6570 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
6571
e8b1fb9b
AD
65722007-11-05 Akim Demaille <akim@epita.fr>
6573
6574 Remove Id: from bison.1.
6575 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
6576 (perl -0777 -pi -e 's/\.PP\nId): New.
6577 (.x.1): Use it to ignore the version control revision.
6578
2f7a96b5
AD
65792007-11-05 Akim Demaille <demaille@gostai.com>
6580
6581 * build-aux/Makefile.am: Ship cross-options.pl.
6582 * doc/Makefile.am: Always refer to cross-options.texi with
6583 $(srcdir).
6584 (MAINTAINERCLEANFILES): Add it.
6585
f4101aa6
AD
65862007-11-04 Akim Demaille <demaille@gostai.com>
6587
6588 Generate the long/short option cross-table.
6589 * build-aux/cross-options.pl: New.
6590 * doc/Makefile.am (cross-options.texi): New.
6591 * doc/bison.texinfo: Use it.
6592
727a1401
AD
65932007-11-04 Akim Demaille <demaille@gostai.com>
6594
6595 Generate bison.1 using help2man.
6596 * doc/common.x, doc/bison.x: New.
6597 * doc/Makefile.am (bison.1, .x.1): New.
6598 The code is taken from autoconf-2.61/man/Makefile.am.
6599 * configure.ac: Look for help2man.
6600
6aeb9c57
AD
66012007-11-04 Akim Demaille <demaille@gostai.com>
6602
6603 Complete --help.
6604 * src/getargs.c (usage): Document -W, make it clear that -d,
6605 -g and -x have optional arguments.
6606
d7be4085
AD
66072007-11-04 Akim Demaille <demaille@gostai.com>
6608
6609 Find sha1sum when named gsha1sum.
6610 * bootstrap (find_tool): New.
6611 ($SHA1SUM): New.
6612
d9df47b6
JD
66132007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6614
6615 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
6616 at
6617 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
6618 * NEWS (2.3a+): Mention.
6619 * data/bison.m4 (b4_pure_if): Don't define it here.
6620 * data/c.m4 (b4_identification): Depend on individual skeletons to
6621 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
6622 values of the %define variables api.pure or api.push_pull. Define
6623 YYPURE, YYPUSH, and YYPULL accordingly.
6624 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
6625 glr.cc has already defined b4_pure_flag.
6626 * data/push.c: Define b4_pure_if based on `%define api.pure'.
6627 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 6628 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
6629 * doc/bison.texinfo (Pure Decl): Update.
6630 (Push Decl): Update.
6631 (Decl Summary): Add api.pure to %define entry.
6632 In %pure-parser entry, say it's deprecated and reference %define.
6633 (Pure Calling): Update.
6634 (Error Reporting): Update.
6635 (C++ Scanner Interface): Update.
6636 (How Can I Reset the Parser): Update.
6637 (Table of Symbols): In %pure-parser entry, say it's deprecated and
6638 reference %define.
6639 * src/getargs.c (pure_parser): Remove global variable.
6640 * src/getargs.h (pure_parser): Remove extern.
6641 * src/output.c (prepare): Don't define pure_flag muscle.
6642 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
6643 wrapper around `%define api.pure'.
6644 * tests/calc.at (Simple LALR Calculator): Update.
6645 (Simple GLR Calculator): Update.
6646 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
6647 Update.
6648 (GLR: Resolve ambiguity, pure, locations): Update.
6649 (GLR: Merge conflicting parses, pure, no locations): Update.
6650 (GLR: Merge conflicting parses, pure, locations): Update.
6651 * tests/glr-regression.at (Uninitialized location when reporting
6652 ambiguity): Update
6653 * tests/input.at (Unused %define api.pure): New test case.
6654 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
6655 AT_PURE_IF and AT_PURE_AND_LOC_IF.
6656 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6657
c373bf8b
JD
66582007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6659
6660 %define push_pull -> %define api.push_pull. Discussed starting at
6661 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
6662 * data/push.c: Expect the new name.
6663 * data/yacc.c: Likewise.
6664 * doc/bison.texinfo (Push Decl): Update.
6665 (Decl Summary): Update %define entry.
6666 (Push Parser Function): Update.
6667 (Pull Parser Function): Update.
6668 (Parser Create Function): Update.
6669 (Parser Delete Function): Update.
6670 * tests/calc.at (Simple LALR Calculator): Update.
6671 * tests/input.at (%define enum variables): Update.
6672 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6673 (Push Parsing: Multiple impure instances): Update.
6674 (Push Parsing: Unsupported Skeletons): Update.
6675 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
6676 (Exploding the Stack Size with Malloc): Update.
6677
6678 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
6679 other entries some.
6680
32f19b6b
JD
66812007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
6682
6683 For the XML output's terminal element, rename @number to @token-number,
6684 and add @symbol-number. In the nonterminal element, rename @number to
6685 @symbol-number. Discussed starting at
6686 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
6687 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
6688 renames.
6689 (xsl:template match="nonterminal"): Likewise.
6690 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
6691 (xsl:template match="nonterminal"): Likewise.
6692 * src/print-xml.c (print_grammar): Implement.
6693
255a6b90
JD
66942007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6695
6696 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
6697 2007-10-11 change, the child elements here are items not rules.
408476bc 6698 (xsl:template match="item"): New.
255a6b90
JD
6699 (xsl:template match="rule"): Update for new reduced itemset.
6700 (xsl:template match="point"): Remove.
6701 (xsl:template match="empty"): For consistency with --graph, don't
6702 output "/* empty */".
6703 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
6704 line-wrap, don't pass a negative value as first-line-length since this
6705 won't work with the following changes.
6706 (xsl:template name="line-wrap"): Simplify slightly.
6707 (xsl:template name="ws-search"): Eliminate recursion.
6708 * src/print_graph.c (print_core): Don't print a reduction's lookahead
6709 set next to an item whose dot is not at the end of the RHS even if it
6710 happens to be associated with the same rule.
6711
88c78747
JD
67122007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6713
31984206
JD
6714 Add %define lr.keep_unreachable_states.
6715 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
6716 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
6717 * src/main.c (main): Implement it.
6718 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6719 Extend to test it, and fix a typo.
6720
67212007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6722
6723 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
6724 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
6725 the example .output text.
6726 * tests/regression.at (Extra lookahead sets in report): Improve wording
6727 of comments.
6728
b7a70162
WP
67292007-10-17 Wojciech Polak <polak@gnu.org>
6730
6731 * src/print-xml.c (print_grammar): Renamed
6732 <terminal> and <nonterminal> attributes:
6733 "type" to "number" and "symbol" to "name".
6734 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
6735 Use new attribute names.
6736 (xsl:template match="nonterminal"): Likewise.
6737 * data/xslt/xml2xhtml.xsl: Likewise.
6738
a0de5091
JD
67392007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
6740
6741 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
6742 (Option Cross Key): Likewise.
6743
6744 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
6745 next to an item whose dot is not at the end of the RHS even if it
6746 happens to be associated with the same rule.
6747 * src/print.c (print_core): Likewise.
6748 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
6749 (Resolved SR Conflicts): Update output.
6750 * tests/regression.at (Extra lookahead sets in report): New test case.
6751
4c20d18d
WP
67522007-10-11 Wojciech Polak <polak@gnu.org>
6753
6754 * src/print-xml.c (print_core): Remove item set
6755 redundancy.
6756 * data/xslt/bison.xsl (bison:ruleNumber): New key.
6757 Improve processing time. Suggested by Joel E. Denny.
6758 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
6759 Write xsl:param "required" attribute as comment.
6760 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
6761 (xsl:template match="rule"): Support new reduced itemset.
6762 (xsl:template match="point"): Remove.
6763 * data/xslt/xml2xhtml.xsl: Likewise.
6764
f506ad1c
JD
67652007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6766
6767 * src/getargs.c (version): Update copyright year.
6768
21f1b063
JD
67692007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6770
6771 Make xml2dot.xsl and --graph produce the same output.
6772 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
6773 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
6774 escaped later.
6775 (xsl:template name="output-node"): Use the new escape template instead
6776 of the string-replace template directly.
6777 (xsl:template name="output-edge"): Likewise.
6778 (xsl:template name="escape"): New, escapes backslashes and newlines in
6779 addition to quotation marks.
6780 * src/graphviz.c (start_graph, output_node, output_edge): Add
6781 whitespace to output for legibility.
6782
6783 Make xml2text.xsl and --report produce the same output, and remove the
6784 XML "conflicts" element since a conflict summary is easily extracted
6785 from the automaton.
6786 * data/xslt/bison.xsl: New.
6787 (xsl:template match="state" mode="bison:count-conflicts): New.
6788 * data/xslt/xml2text.xsl: Import bison.xsl.
6789 (xsl:template match="bison-xml-report"): Instead of styling the
6790 "conflicts" element, style the "automaton" element with mode
6791 "conflicts". Unlike the former, the latter lists S/R and R/R
6792 conflicts for a state on the same line.
6793 (xsl:template match="conflicts"): Remove.
6794 (xsl:template match="conflict"): Remove.
6795 (xsl:template match="terminal"): Line-wrap the list of rules in which
6796 the terminal is used.
6797 (xsl:template match="nonterminal"): Likewise for nonterminals.
6798 (xsl:template match="automaton" mode="conflicts"): New.
6799 (xsl:template match="state" mode="conflicts"): New.
6800 (xsl:template name="line-wrap"): New.
6801 (xsl:template name="ws-search"): New.
6802 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
6803 (xsl:template match="bison-xml-report"): Instead of styling the
6804 "conflicts" element, style the "automaton" element with mode
6805 "conflicts."
6806 (xsl:template match="conflicts"): Remove.
6807 (xsl:template match="conflict"): Remove.
6808 (xsl:template match="automaton" mode="conflicts"): New.
6809 (xsl:template match="state" mode="conflicts): New.
6810 * src/conflicts.c (conflicts_output_xml): Remove.
6811 * src/conflicts.h (conflicts_output_xml): Remove prototype.
6812 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
6813 * src/print.c (print_grammar): Consistently wrap at the 66th column so
6814 the corresponding XSLT is easier. Also, never wrap between a word and
6815 the comma that follows it.
6816
793fbca5
JD
68172007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6818
6819 Improve C++ namespace support. Discussed starting at
6820 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
6821 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
6822 b4_namespace_close): New macros that interpret the %define variable
6823 "namespace" so its value can contain "::" to indicate nested
6824 namespaces.
6825 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
6826 the above macros.
6827 * data/lalr1.cc (b4_namespace): Likewise.
6828 * data/location.cc (b4_namespace): Likewise.
6829 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
6830 inside a new table in the general %define entry. Document `%define
6831 namespace' there as well. Point the %name-prefix entry to it since it
6832 explains it more completely in the case of C++.
6833 (C++ Bison Interface): Mention `%define namespace' instead of
6834 %name-prefix.
6835 (Table of Symbols): Remove the `%define push_pull' entry. The %define
6836 entry suffices.
6837 * tests/c++.at (Relative namespace references): New test case.
6838 (Absolute namespace references): New test case.
6839 (Syntactically invalid namespace references): New test case.
6840 * tests/input.at (C++ namespace reference errors): New test case.
6841
35b8730d
JD
68422007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6843
6844 Add syncline support and location accessor to internal %define
6845 interfaces.
6846 * data/bison.m4 (b4_percent_define_get_loc): New.
6847 (b4_percent_define_get_syncline): New.
6848 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
6849 (b4_percent_define_default): Record defining location as line 1 rather
6850 than 0 for the sake of synchronizing #line's, and define
6851 b4_percent_define_syncline(VARIABLE).
6852 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
6853 * src/muscle_tab.c (muscle_syncline_grow): New.
6854 (muscle_code_grow): Use muscle_syncline_grow.
6855 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
6856 define b4_percent_define_syncline(VARIABLE).
6857 (muscle_percent_define_get_loc): New.
6858 (muscle_percent_define_get_syncline): New.
6859 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
6860 remove some unused variables.
6861 (muscle_percent_define_default): Record defining location as line 1
6862 rather than 0 for the sake of synchronizing #line's, and define
6863 b4_percent_define_syncline(VARIABLE).
6864 (muscle_percent_define_check_values): Use
6865 muscle_percent_define_get_loc.
6866 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
6867 (muscle_percent_define_get_syncline): Prototype.
6868 * tests/skeletons.at (%define Boolean variables: invalid skeleton
6869 defaults): Update output for location change.
6870 (Complaining during macro argument expansion): Extend to test
6871 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
6872
7dc4a694
JD
68732007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
6874
6875 Fix some error-reporting macro bugs.
6876 * data/bison.m4 (b4_cat): New.
6877 (b4_error, b4_error_at): Use b4_cat to send error directives directly
6878 to stdout so they don't become arguments to other macros. Update
6879 comments and add examples.
6880 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
6881 add examples.
6882 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
6883 after printing the error directive so that M4 doesn't report subsequent
6884 problems that are induced by this problem.
6885 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
6886 instead of just in them. Recognize @\n in both places. Both expand to
6887 the empty string. Needed by b4_cat.
6888 * tests/skeletons.at (Complaining during macro argument expansion):
6889 New test case.
6890 (Fatal errors make M4 exit immediately): New test case.
6891
d4bd2295
JD
68922007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
6893
6894 Implement --print-datadir.
6895 * src/getargs.c (usage): Mention.
6896 (PRINT_DATADIR_OPTION): New anonymous enum member.
6897 (long_options): Add entry for it.
6898 (getargs): Add case for it calling compute_pkgdatadir.
6899 * src/output.c (output_skeleton): Encapsulate data directory
6900 computation from here...
6901 (prepare): ... and from here...
6902 (compute_pkgdatadir): ... into this new function.
6903 * src/output.h (compute_pkgdatadir): Prototype.
6904
34cdeddf
JD
69052007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
6906
6907 * src/print-xml.c (escape_bufs): New static global variable
6908 replacing...
6909 (xml_escape_n): ... the static local variable buf here.
6910 (print_xml): Free memory for escape_bufs.
6911 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
6912
d782395d
JD
69132007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
6914
6915 Replace `%push-parser' and `%push-pull-parser' with
6916 `%define push_pull "push"' and `%define push_pull "both"'.
6917 `%define push_pull "pull"' is the default.
6918 * doc/bison.texinfo (Push Decl, Push Parser Function,
6919 Pull Parser Function, Parser Create Function, Parser Delete Function):
6920 Update declarations.
6921 (Decl Summary, Table of Symbols): Replace %push-parser and
6922 %push-pull-parser entries with a %define push_pull entry.
6923 * data/bison.m4 (b4_percent_define_check_values): New macro.
6924 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
6925 definitions...
6926 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
6927 definitions...
6928 * data/push.c: ... to here and compute them from the value of the
6929 %define variable push_pull.
6930 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
6931 parsing requests here...
6932 * data/yacc.c: ... hack this to switch to push.c any time
6933 b4_use_push_pull_flag or the %define variable push_pull is set. This
6934 will go away when we mv push.c yacc.c.
6935 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
6936 push parsing is not supported since unused %define variables are
6937 reported anyway.
6938 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
6939 * src/muscle_tab.h (muscle_percent_define_check_values): Update
6940 comments for consistency with b4_percent_define_check_values.
6941 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
6942 muscles.
6943 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
6944 Remove.
6945 (prologue_declaration): Remove %push-parser and %push-pull-parser
6946 rules.
6947 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
6948 * tests/calc.at: Update declarations.
6949 * tests/input.at (%define enum variables): New test case.
6950 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
6951 declaration.
6952 (Push Parsing: Multiple impure instances): Update declaration.
6953 (Push Parsing: Unsupported Skeletons): New test case.
6954 * tests/torture.at (Exploding the Stack Size with Alloca): Update
6955 declaration.
6956 (Exploding the Stack Size with Malloc): Update declaration.
6957
3f999f78
WP
69582007-09-24 Wojciech Polak <polak@gnu.org>
6959
6960 Add XSLT transformations.
6961
6962 * data/xslt/xml2dot.xsl: Transform XML into DOT.
6963 * data/xslt/xml2text.xsl: Transform XML into plain text.
6964 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
6965 * data/Makefile.am (xsltdir): New variable.
6966 (dist_xslt_DATA): Add xslt/*.xsl files.
6967
a4f75309
PE
69682007-09-23 Paul Eggert <eggert@cs.ucla.edu>
6969
6970 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
6971 Problem reported by Wojciech Polak.
6972 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
6973 (xml_printf): Undo change I made on 21 September; that is,
6974 indent 2 spaces, not 1.
6975
ad5feac4
JD
69762007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
6977
6978 Pacify ./configure --enable-gcc-warnings.
6979 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
6980 `char const *' instead of `char *'.
6981 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
6982 local variable `sep'.
6983
41d7a5f2
PE
69842007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6985
6986 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
6987 elsewhere.
6988 * src/print-xml.c: Prefer "const" after types; that's more consistent.
6989 (xml_printf): Indent just 1 space for level.
6990 (e_char, xlate_char): Remove.
6991 (xml_escape_string): Rewrite to avoid undefined behavior (used
6992 storage that was freed from the stack).
6993 (xml_escape_n): Don't bother checking for subscript error.
6994
3f999f78
WP
69952007-09-21 Wojciech Polak <polak@gnu.org>
6996
6997 Add Bison XML Automaton Report.
41d7a5f2
PE
6998
6999 Add support for an -x option to generate an XML report.
7000 It is not documented yet.
7001 * src/print-xml.c: New file.
7002 * src/print-xml.h: Likewise.
7003 * lib/timevar.def (TV_XML): New var.
7004 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
7005 * src/conflicts.c: Include print-xml.h.
7006 (solved_conflicts_xml_obstack): New var.
7007 (log_resolution, conflicts_solve, conflicts_free):
7008 Add support for XML report.
7009 (conflicts_output_val): New function.
7010 * src/conflicts.h (conflicts_output_val): New decl.
7011 * src/files.c (spec_xml_file): New var.
7012 (compute_output_file_names, output_file_names_free): Add XML support.
7013 * src/files.h (spec_xml_file): New decl.
7014 * src/getargs.c (xml_flag): New var.
7015 (usage, short_options, long_options, getargs): Add XML support.
7016 * src/getargs.h (xml_flag): New decl.
7017 * src/gram.c: Include print-xml.h.
7018 (rule_lhs_print_xml, rule_rhs_print_xml):
7019 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
7020 New functions.
7021 * src/gram.h: Declare external ones.
7022 * src/main.c: Include print-xml.h.
7023 (main): Add XML support.
7024 * src/reduce.c: Include print-xml.h.
7025 (reduce_xml): New function.
7026 * src/reduce.h: Declare it.
7027 * src/state.c: Include print-xml.h.
7028 (state_new): Add XML support.
7029 (state_rule_lookahead_tokens_print_xml): New function.
7030 * src/state.h: Declare it.
7031 (struct state): New member solved_conflicts_xml.
7032 * src/symtab.c (symbol_class_get_string): New function.
7033 * src/symtab.h: Declare it.
7034
6d8e724d
PE
70352007-09-21 Paul Eggert <eggert@cs.ucla.edu>
7036
7037 * GNUmakefile: Switch to coreutils's version.
7038 * bootstrap: Likewise.
7039 * Makefile.cfg: Adjust to new GNUmakefile.
7040 * README-hacking: Likewise.
7041
7042 Import from gnulib:
7043
7044 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
7045 Bruno Haible <bruno@clisp.org>
7046
7047 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
7048 and is a script that invokes bison. Tighten the code. Add comments.
7049
922bdd7f
JD
70502007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
7051
7052 Spell "boolean" as "Boolean". Reported by Akim Demaille.
7053 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
7054 * doc/bison.texinfo (Decl Summary): Fix.
7055 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
7056 * tests/input.at (Boolean %define variables): Update output.
7057 * tests/skeletons.at (%define boolean variables: invalid skeleton
7058 defaults): Rename to...
7059 (%define Boolean variables: invalid skeleton defaults): ... this and
7060 update output.
7061
1b17b01d
JD
70622007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
7063
7064 In impure push mode, don't allow more than one yypstate to be allocated
7065 since multiple impure parsers would corrupt yynerrs.
7066 * data/push.c (yypstate_allocated): New static global variable
7067 initialized to 0.
7068 (yypull_parse): If yypstate_new returns 0, don't report it as memory
7069 exhaustion if yypstate_allocated is 1, but still return 2.
7070 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
7071 already 1. Otherwise, set it to 1.
7072 (yypstate_delete): Set it to 0.
7073 * tests/push.at (Push Parsing: Multiple impure instances): New test
7074 case.
7075
9987d1b3
JD
70762007-08-17 Bob Rossi <bob@brasko.net>
7077
7078 * doc/bison.texinfo (Push Decl): Document the push parser.
7079 (Table of Symbols): Ditto.
7080 (Pure Decl): Ditto.
7081 (Decl Summary): Ditto.
7082 (Multiple Parsers, Push Parser Function, Pull Parser Function,
7083 Parser Create Function, Parser Delete Function):
7084 Add new push parser symbols.
7085 (Table of Symbols): Document push-parser, push-pull-parser,
7086 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
7087
f16b0819
PE
70882007-08-15 Paul Eggert <eggert@cs.ucla.edu>
7089
7090 Update to GPLv3.
7091 * doc/gpl-3.0.texi: New file.
7092 * doc/gpl.texi: Remove.
7093 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
7094 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
7095 * README-hacking, TODO, bootstrap, bootstrap.conf:
7096 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
7097 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
7098 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
7099 * data/lalr1.cc, data/lalr1.java, data/location.cc:
7100 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
7101 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
7102 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
7103 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
7104 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
7105 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
7106 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
7107 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
7108 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
7109 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
7110 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
7111 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
7112 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
7113 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
7114 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
7115 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
7116 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
7117 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
7118 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
7119 * src/complain.c, src/complain.h, src/conflicts.c:
7120 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
7121 * src/files.h, src/flex-scanner.h, src/getargs.c:
7122 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
7123 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
7124 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
7125 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
7126 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
7127 * src/print.c, src/print.h, src/print_graph.c:
7128 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
7129 * src/reduce.h, src/relation.c, src/relation.h:
7130 * src/revision.h, src/scan-code.h, src/scan-code.l:
7131 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
7132 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
7133 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
7134 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
7135 * tests/Makefile.am, tests/actions.at, tests/c++.at:
7136 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
7137 * tests/existing.at, tests/glr-regression.at:
7138 * tests/headers.at, tests/input.at, tests/java.at:
7139 * tests/local.at, tests/output.at, tests/push.at:
7140 * tests/reduce.at, tests/regression.at, tests/sets.at:
7141 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
7142 * tests/torture.at:
7143 Update to GPLv3.
7144
728c4be2
JD
71452007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
7146
7147 Get rid of broken %no-parser, -n, and --no-parser implementation and
7148 documentation.
7149 * TODO: Don't mention them.
7150 * doc/bison.1: Likewise.
7151 * doc/bison.texinfo (Decl Summary): Likewise.
7152 (Bison Options): Likewise.
7153 (Option Cross Key): Likewise.
7154 * src/getargs.c (no_parser_flag): Remove global variable.
7155 (usage): Don't print description of -n and --no-parser.
7156 (long_options): Remove --no-parser entry here.
7157 (getargs): Remove -n case in the switch here.
7158 * src/getargs.h (no_parser_flag): Remove extern.
7159 * tests/regression.at (Web2c Actions): Remove comment that mentions
7160 --no-parser.
7161
5d31a216
JD
71622007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
7163
7164 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
7165 name user variables starting with `yy'. Just pass NULL instead of a
7166 dummy local &yylval to yypush_parse.
7167 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
7168 starting with `yy'.
7169
a2ea208d
JD
71702007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
7171
7172 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
7173 true since it's then always used regardless of whether yyoverflow is
7174 defined. Reported by Christian Burger at
7175 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
7176 * THANKS: Add Christian Burger.
7177
91661ebb
JD
7178 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
7179 node names: say "Decl Summary" not "Bison Declaration Summary".
7180
cbd50549
JD
71812007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
7182
7183 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
7184 determine whether this function has already complained about an invalid
7185 value for a %define boolean variable, don't check whether Bison has
7186 ever examined the value. As written, the check was a tautology.
7187 Instead, record and check for this complaint using a separate muscle.
7188
eb1b0740
JD
71892007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
7190
7191 Fix push parsing memory leak reported by Brandon Lucia at
7192 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
7193 * THANKS: Add Brandon Lucia.
7194 * data/push.c (yypstate_delete): Free the stack if it was reallocated
7195 but the parse never completed and thus freed it.
7196 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
7197 * tests/testsuite.at: Include push.at.
7198 * test/push.at: New.
7199 (Push Parsing: Memory Leak for Early Deletion): New test case.
7200
9d774aff
JD
72012007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
7202
7203 Improve handling of multiple S/R conflicts in the same state and of S/R
7204 conflicts involving multiple reductions.
7205 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
7206 set for a state here or Bison will abort if it is reassigned on a
7207 later conflicted reduction in the same state.
7208 Similarly, don't finalize and assign the solved conflicts report here
7209 or it will be lost if it is reassigned on a later conflicted reduction
7210 in the same state.
7211 (set_conflicts): Instead, assign them both here after all S/R conflicts
7212 in the state have been fully examined.
7213 * src/print.c (shift_set): Rename to...
7214 (no_reduce_set): ... this.
7215 (print_reductions): Update for rename, and add %nonassoc error action
7216 tokens to no_reduce_set so that, when printing the first remaining
7217 reduction on an error action token, the reduction is enclosed in
7218 brackets.
7219 (print_results): Update for rename.
7220 * tests/conflicts.at (Solved conflicts report for multiple reductions
7221 in a state): New test case.
7222 (%nonassoc error actions for multiple reductions in a state): New test
7223 case.
7224
7225 * src/main.c (main): Don't depend on C99 features.
7226
10159d2a
JD
72272007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
7228
7229 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
7230 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
7231 uniwidth.
10159d2a 7232
953b3935
JD
72332007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
7234
7235 * bootstrap (slurp): Create target directories that don't exist.
7236 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
7237
6ce2d93a
JD
72382007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7239
7240 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
7241 than item number.
7242 * closure.c (closure): Likewise.
7243 * state.h (reductions): Comment sorting of rules.
7244 (state): Comment sorting of items.
7245
ce3448d5
JD
72462007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
7247
7248 Fix C++ test cases after recent Gnulib changes. Discussed starting at
7249 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
7250 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
7251 definition in order to avoid Gnulib headers since we don't use config.h
7252 here.
7253 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
7254 rather than AT_DATA so that config.h is included.
7255
8a86eef0
JD
72562007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
7257
7258 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
7259 instead of fprintf. Guard these functions with #if YYDEBUG instead of
7260 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
7261 and so that YYFPRINTF is guaranteed to be defined here.
7262
b1a81613
JD
72632007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7264
7265 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
7266 with...
7267 (muscle_percent_define_check_values): ... this more helpful function.
7268 Again, it's not used yet, but it will be.
7269 * src/muscle_tab.h: Likewise.
7270
71b61d4d
JD
7271 Improve some comments in parser table construction.
7272 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
7273 (generate_states): Don't mention ruleset, which is internal to closure.
7274 * src/closure.c (closure): Explain sorting of core and itemset, which
7275 is required for this function to behave correctly.
7276 * src/closure.h (closure): Mention sorting.
7277
2a6b783d
JD
72782007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
7279
7280 * src/lalr.c (state_lookahead_tokens_count): For code readability,
7281 move the check for disabled transitions to an aver since conflict
7282 resolution hasn't happened yet.
7283
7284 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
7285 labels a state as inconsistent just because it has error transitions.
7286 The original form of this check appeared in revision 1.1 of lalr.c,
7287 which was committed on 1991-12-21. Now (at least), changing the
7288 consistency label on such a state appears to have no useful effect in
7289 any of the places it is examined, which I enumerate below. The key
7290 point to understanding each item in this enumeration is that a state
7291 with an error transition is labelled consistent in the first place only
7292 if it has no rules, so the check cannot matter for states that have
7293 rules. (1) Labelling a state as inconsistent will cause set_conflicts
7294 to try to identify its conflicts, and a state must have *rules* to have
7295 conflicts. (2) Labelling a state as inconsistent will affect how
7296 action_row sets the default *rule* for the state. (3) Labelling a
7297 state as inconsistent will cause build_relations to add lookback edges
7298 to *rules* in that state.
7299 * src/state.h (struct state): Word the comment for member consistent
7300 more carefully.
7301
14462c2b
JD
73022007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
7303
7304 Don't depend on C99 features.
7305 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
7306 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
7307 * src/reader.c (check_and_convert_grammar): Fix for-loop.
7308 * src/state.c (state_mark_reachable_states): Fix for-loop.
7309 (state_remove_unreachable_states): Fix for-loop.
7310
7311 Don't widen struct state with member reachable just to temporarily
7312 record reachability. Instead, use a local bitset.
7313 * src/state.h (struct state): Remove member.
7314 * src/state.c (state_new): Don't initialize it.
7315 (state_mark_reachable_states): Rename to...
7316 (state_record_reachable_states): ... this, and use bitset.
7317 (state_remove_unreachable_states): Use bitset.
7318
5a43d418
JD
73192007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
7320
7321 * src/Makefile.am (yacc): Quote target action commands properly so
7322 that the yacc script isn't corrupt. Reported by Hans Aberg at
7323 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
7324
0c650a20
JD
7325 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
7326 the case of pure parsers. Reported by Frans Englich at
7327 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
7328 * THANKS: Add Frans Englich.
7329
61fee93e
JD
7330 * NEWS (2.3a+): In the %code entry, reference section `Bison
7331 Declaration Summary' from the manual now since the %code summary has
7332 moved there.
7333 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
7334 in the rules section must be terminated by semicolons.
7335
f124d423
JD
73362007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
7337
7338 Extend the front-end API for %define variables to more completely
7339 mirror the back-end. This will be useful in the future.
7340 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
7341 Update comments to mention the new front-end counterparts of these
7342 macros.
7343 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
7344 for muscle_string_decode and muscle_location_decode.
7345 (muscle_string_decode): New static function.
7346 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
7347 (muscle_percent_define_get, muscle_percent_define_ifdef): New
7348 functions.
7349 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
7350 muscle_percent_define_get to mimic the b4_percent_define_flag_if
7351 implementation more closely.
7352 (muscle_percent_define_invalid_value): New function.
7353 * src/muscle_tab.h (muscle_percent_define_get,
7354 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
7355 Prototype.
7356
75ad86ee
JD
73572007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
7358
7359 * NEWS (2.3a+): Mention yesterday's state-removal change.
7360 (2.3a): Remove the %language entry, which was added after 2.3a.
7361 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
7362 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
7363 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
7364 tests/existing.at: Update copyright date.
7365
5967f0cf
JD
73662007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
7367
7368 If conflict resolution makes states unreachable, remove those states,
7369 report rules that are then unused, and don't report conflicts in those
7370 states.
7371 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
7372 New global function.
7373 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
7374 function.
7375 * src/main.c (main): After conflict resolution, remove the unreachable
7376 states and update all data structures that reference states by number.
7377 * src/state.c (state_new): Initialize each state's reachable member to
7378 false.
7379 (state_mark_reachable_states): New static function.
7380 (state_remove_unreachable_states): New global function.
7381 * src/state.h (struct state): Add member bool reachable.
7382 (state_remove_unreachable_states): Prototype.
7383 * tests/conflicts.at (Unreachable States After Conflict Resolution):
7384 New test case.
7385 * tests/existing.at (GNU pic Grammar): Update test case output now that
7386 an unused rule is discovered.
7387
b09f4f48
JD
73882007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
7389
7390 Minor code cleanup in parser table construction.
7391 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
7392 (new_itemsets, save_reductions): Update for rename to nitemset.
7393 * src/closure.c (nritemset): Rename to...
7394 (nitemset): ... this since the "r" appears to meaningless and isn't
7395 used in the comments.
7396 (closure): Update for rename.
7397 * src/closure.h (nritemset): Update extern to...
7398 (nitemset): ... this.
7399 * src/lalr.c (LA): Fix a typo in comments.
7400 * src/print.c (print_core): Update for rename to nitemset.
7401 * src/print_graph.c (print_graph): Likewise.
7402 * src/state.h: Fix some typos in header comments.
7403
bbb44d83
PE
74042007-04-04 Paul Eggert <eggert@cs.ucla.edu>
7405
9b33de72
PE
7406 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
7407 still sticks to ASCII. Sorry!
7408
bbb44d83
PE
7409 * README-hacking: New file, taken mostly from coreutils, with changes
7410 for Bison. Contains much of the contents of:
7411 * README-cvs: Remove.
7412 * bootstrap: Sync from gnulib.
7413 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
7414 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
7415
29553547
JD
74162007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
7417
7418 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
7419 Setzer.
7420 (Java Differences): Fix some typos.
7421 * THANKS: Add Sebastian Setzer.
7422
01b477c6
PB
74232007-03-07 Paolo Bonzini <bonzini@gnu.org>
7424
730739e4
AD
7425 * data/java.m4 (b4_single_class_if): Remove.
7426 (b4_abstract_if): Look at "%define abstract".
7427 (b4_lexer_if): New.
7428 (b4_union_name): Rename...
7429 (b4_yystype): ... to this. Map to "%define stype".
7430 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
7431 b4_maybe_throws): Fix quoting.
7432 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
7433 * data/lalr1.java (Lexer interface): Always define.
7434 (Lexer interface within parser class): Remove.
7435 (YYLexer class): New, used when "%code lexer" is present.
7436 (constructor): When "%code lexer" is used, pass %lex-param
7437 to the lexer constructor.
7438 (yylex, yyparse): Remove %lex-param from method invocations
7439 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
7440
7441 * doc/bison.texinfo (Java Bison Interface): Mention "%define
7442 abstract". Rename "%define union_name" to "%define stype".
7443 Rename method names according to previous patch.
7444 (Java Scanner Interface): Describe "%code lexer" instead of
7445 "%pure-parser" and "%define single_class".
7446 (Java Differences): Mention "%code lexer".
7447
7448 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
7449 Include scanner here, using macros from tests/local.at.
7450 (AT_DATA_CALC_Y): Remove final argument.
7451 (_AT_CHECK_JAVA_CALC): Likewise.
7452 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
7453 of %locations and %error-verbose.
7454 (main): Test with and without %lex-param.
7455 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
7456 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 7457
122bea3a
JMG
74582007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7459
7460 DJGPP spefic issue. Inhibit the use of disallowed characters for
7461 file name genertion on Win98, WinXP, etc. These are |<>":?*\
7462 and concern testsuite case 46.
7463 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
7464 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
7465 * djgpp/config.bat: Inhibit the use of disallowed characters.
7466
9611cfa2
JD
74672007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7468
7469 Miscellaneous %define and %code cleanup.
7470 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
7471 values are interpreted.
7472 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
7473 documentation a little more.
7474 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
7475 muscle_percent_define_insert, muscle_percent_code_grow): New
7476 functions/macros.
7477 * src/muscle_tab.h (muscle_percent_define_insert,
7478 muscle_percent_code_grow): Prototype.
7479 * src/parse-gram.y (prologue_declaration): Use
7480 muscle_percent_define_insert and muscle_percent_code_grow when parsing
7481 %define and %code directives.
7482
7483 Make it easy to share %define boolean variables between the front-end
7484 and back-end. Though not used yet, this will be useful in the future.
7485 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
7486 Bison uses of names rather than just skeleton uses of names.
7487 (b4_percent_define_get, b4_percent_define_ifdef): Rename
7488 b4_percent_define_skeleton_variables(VARIABLE) to
7489 b4_percent_define_bison_variables(VARIABLE).
7490 (b4_percent_code_get, b4_percent_code_ifdef): Rename
7491 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
7492 b4_percent_code_bison_qualifiers(QUALIFIER).
7493 (b4_check_user_names_wrap): Update for renames.
7494 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
7495 muscle_percent_define_default): New functions mimicking
7496 b4_percent_define_flag_if and b4_percent_define_default.
7497
7498 For %define variables, report locations for invalid values and
bbb44d83 7499 redefinitions.
9611cfa2
JD
7500 * data/bison.m4 (b4_percent_define_flag_if): Read
7501 b4_percent_define_loc(VARIABLE) to report the location of an invalid
7502 value for VARIABLE.
7503 (b4_percent_define_default): Save a special location in
7504 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
7505 must later be reported as invalid.
7506 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
7507 functions.
7508 (muscle_percent_define_insert): Record the location of VARIABLE in
7509 muscle percent_define_loc(VARIABLE), and use it to report the previous
7510 location for a redefinition.
7511 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
7512 (muscle_percent_define_default): Update like b4_percent_define_default.
7513 (muscle_grow_user_name_list): Rename to...
7514 (muscle_user_name_list_grow): ... this for consistency and use
7515 muscle_location_grow.
7516 * src/muscle_tab.h (muscle_location_grow): Prototype.
7517 * tests/input.at (%define errors): Update expected output.
7518 * tests/skeletons.at (%define boolean variables: invalid skeleton
7519 defaults): New test case.
7520
0bf92491
JD
75212007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
7522
7523 * src/print.c (lookahead_set, state_default_rule): Remove.
7524 (print_reductions): Replace state_default_rule invocation with
7525 equivalent use of yydefact, which was computed in token_actions in
7526 tables.c.
7527 (print_results): Don't allocate lookahead_set.
7528
d3b12988
PB
75292007-02-27 Paolo Bonzini <bonzini@gnu.org>
7530
7531 * data/lalr1.java: Prefix all private members with yy.
7532
f57a7536
JD
75332007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
7534
7535 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 7536 Sebastien Fricker at
f57a7536 7537 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 7538 * THANKS: Add Sebastien Fricker.
f57a7536
JD
7539 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
7540 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
7541 accept a variable number of arguments.
7542
6404a5bf
JD
75432007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
7544
7545 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
7546
e4e09639
JMG
75472007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7548
7549 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
7550 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
7551 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
7552
d7e0a1a7
PE
75532007-02-11 Paul Eggert <eggert@cs.ucla.edu>
7554
7555 Undo my 2007-02-07 change, switching back to the c-strcase module
7556 introduced in the 2007-02-03 change. Bruno Haible reported that
7557 the 2007-02-07 change would be dangerous in Turkish if we add a
7558 language whose name contains "i", since "i" is not lowercase "I"
7559 in Turkish.
7560 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
7561 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
7562 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
7563 * m4/.cvsignore: Remove strcase.m4.
7564 * src/getargs.c: Revert 2007-02-07 change, as follows.
7565 Include c-strcase.h.
7566 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
7567
deee93a1
JD
75682007-02-11 Bruno Haible <bruno@clisp.org>
7569
7570 Enable the Java related testsuite tests when the only Java compiler
7571 found is a gcj < 4.3. Discussed at
7572 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
7573 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
7574
574add85
JD
75752007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
7576
7577 * data/Makefile.am: Update copyright date.
7578 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
7579 yypstate_new returns NULL.
7580 (yypstate_new): Return NULL if malloc does.
7581 * src/reader.c (packgram): Move translation of rule actions from the
7582 beginning of packgram to...
7583 (check_and_convert_grammar): ... here right before packgram is invoked
7584 so it's easier to write more complete comments, and remove redundant
7585 code.
7586
e785ccf7
JD
75872007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
7588
7589 As in semantic actions, make @$ in %initial-action, %destructor, and
7590 %printer imply %locations.
7591 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
7592 scanning @$.
7593 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
7594 (@$ in %initial-action implies %locations,
7595 @$ in %destructor implies %locations,
7596 @$ in %printer implies %locations): ... these new test cases.
7597
1cfe1ed7
PE
75982007-02-07 Paul Eggert <eggert@cs.ucla.edu>
7599
7600 Undo most of the 2007-02-03 change, switching to the strcase module
7601 now that gnulib strcase has been fixed.
7602 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
7603 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
7604 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
7605 * m4/.cvsignore: Add strcase.m4.
7606 * src/getargs.c: Revert 2007-02-03 change, as follows.
7607 Don't include c-strcase.h.
7608 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
7609 strcasecmp has "unspecified behavior" outside the POSIX locale,
7610 but it works fine in practice if at least one argument is ASCII,
7611 as is the case in Bison.
7612
0049ec86
PB
76132007-02-07 Paolo Bonzini <bonzini@gnu.org>
7614
7615 * tests/java.at: Skip tests if only one of javac/java is present.
7616 Reported by Joel E. Denny.
7617 * tests/atlocal.in: Adjust copyright years.
7618
76192007-02-05 Paolo Bonzini <bonzini@gnu.org>
7620
7621 * data/lalr1.java (Stack): Work around old verifiers that disallow
7622 access to the private fields of an inner class, from the outer class.
7623 We can make Stack's fields public because user code doesn't have access
7624 to the instance of Stack used by parse(). Reported by Paul Eggert.
7625
2c2b7220
PE
76262007-02-03 Paul Eggert <eggert@cs.ucla.edu>
7627
7628 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
7629 the right spot for these files?
7630 * bootstrap.conf (gnulib_modules): Add c-strcase.
7631 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
7632 c-strncasecmp.c.
7633 * src/getargs.c: Include c-strcase.h.
7634 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
7635 to avoid unspecified behavior.
7636
b2b81dae
JD
76372007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
7638
7639 * doc/bison.texinfo (Decl Summary): Correct typo.
7640
c1d19e10
PB
76412007-01-30 Paolo Bonzini <bonzini@gnu.org>
7642
7643 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
7644 Complain if the value does not match empty, "true" or "false".
7645 * data/c++.m4: Adjust default definitions of %define variables.
7646 * data/java.m4: Adjust default definitions of %define variables.
7647 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
7648 to above behavior.
7649 * tests/input.at (Boolean %define variables): Test new behavior.
7650
8405b70c
PB
76512007-01-29 Paolo Bonzini <bonzini@gnu.org>
7652
7653 * NEWS: Mention java.
7654 * TODO: Remove things that are done.
7655 * bootstrap.conf: Add javacomp-script and javaexec-script.
7656 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
7657
7658 * data/Makefile.am: Add new files.
7659 * data/java-skel.m4: New.
7660 * data/java.m4: New.
7661 * data/lalr1.java: New.
7662
7663 * doc/bison.texinfo: Put "A Complete C++ Example" under
7664 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
7665 under Other Languages.
7666
7667 * src/getargs.c (valid_languages): Add Java.
7668 * src/getargs.h (struct bison_language): Update size of string fields.
7669
7670 * tests/Makefile.am: Add java.at.
7671 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
7672 * tests/java.at: New.
7673 * tests/testsuite.at: Include it.
7674
3eb82471
JD
76752007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
7676
7677 Clean up.
7678 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
7679 at_directive_argv arguments so these no longer have to be global
7680 variables. Also, update the implementation for the following changes.
7681 (fail_for_at_directive_too_many_args,
7682 fail_for_at_directive_too_few_args): Add at_directive_name argument.
7683 (at_directive_name): Remove as at_directive_argv[0] will be used for
7684 this now.
7685 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
7686 for the directive name.
7687 (at_directive_argc, at_directive_argv): Make these local within
7688 skel_lex instead of global.
7689 (INITIAL): Update directive start action for above changes.
7690 (SC_AT_DIRECTIVE_ARG): Rename to...
7691 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
7692 (SC_AT_DIRECTIVE_SKIP_WS): Update.
7693 (scan_skel): Move yylex_destroy to...
7694 (skel_scanner_free): ... here.
7695 * tests/skeletons.at (installed skeleton file name): Rename to...
7696 (installed skeleton file names): ... this.
7697
148d66d8
JD
76982007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
7699
7700 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
7701 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
7702 Summary" not "Directives".
7703 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
7704 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
7705 since the former is now the more complete one.
7706 (Prologue Alternatives): Likewise and do the same for %defines.
7707 (Table of Symbols): Add summary of %code, add summary of %define, and
7708 move full %code documentation to...
7709 (Decl Summary): ... here for consistency with other entries in these
7710 sections.
7711 Move %define entry in order to keep this list alphabetized.
7712 Reword %define entry a little to put less emphasis on the skeleton
7713 concept, which most users shouldn't have to think about.
7714
665f0c24
PE
77152007-01-26 Paul Eggert <eggert@cs.ucla.edu>
7716
7717 Adjust to recent gnulib changes.
7718 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
7719 Add string.h, string_.h, unistd_.h, wchar_.h.
7720 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
7721 * src/system.h: Don't include <stpcpy.h>; this is now done by
7722 <string.h>.
7723
592d0b1e
PB
77242007-01-23 Paolo Bonzini <bonzini@gnu.org>
7725
7726 Simplify implementation of unqualified %code, implement macros for
7727 uniform treatment of boolean %define flags. Document %define.
7728 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
7729 b4_percent_code_ifdef): New.
7730 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
7731 * data/c++.m4: Define default value for global_tokens_and_yystype.
7732 * data/glr.cc: Likewise.
7733 * data/location.cc: Use b4_percent_define_flag_if.
7734
148d66d8 7735 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
7736
7737 * src/parse-gram.y (Unqualified %code): Change muscle name to
7738 b4_percent_code().
7739 (content.opt): Default to empty.
7740
a7867f53
JD
77412007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7742
7743 Implement support for relative and absolute skeleton file names.
7744 Discussed starting at
7745 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
7746 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
7747 (Bison Options): Document in --skeleton entry.
7748 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
7749 full_skeleton can't necessarily hold all of pkgdatadir.
7750 If the specified skeleton file name contains a `/', don't prepend
7751 pkgdatadir.
7752 * src/parse-gram.y (prologue_declaration): If the specified skeleton
7753 file name contains a `/', prepend the grammar file directory.
7754 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
7755 * skeletons.at: New file.
7756 (relative skeleton file names): New test case.
7757 (installed skeleton file names): New test case.
7758 * tests/testsuite.at: Include skeletons.at.
7759
7760 * bootstrap: Update copyright to 2007.
7761
830c9b18
PB
77622007-01-17 Paolo Bonzini <bonzini@gnu.org>
7763
7764 * bootstrap: Remove occurrences of .#bootmp from the files.
7765
a8c2e813
AD
77662007-01-17 Akim Demaille <akim@epita.fr>
7767
7768 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
7769 nonterminals.
7770 Use per-type %printer.
7771
279cabb6
JD
77722007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7773
7774 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
7775 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7776 djgpp/config.site, src/files.c, src/files.h, src/main.c,
7777 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
7778 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
7779 tests/glr-regression.at, tests/input.at, tests/local.at,
7780 tests/output.at, tests/torture.at: Update copyright to 2007.
7781
bb32f4f2
AD
77822007-01-16 Akim Demaille <akim@epita.fr>
7783
7784 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
7785 error code.
7786 (Calc++ Scanner): Exit with failure if we can't open the input
7787 file.
7788 Accept "-" standing for stdin.
7789 (Calc++ Top Level): Print the result only if the parsing was
7790 successful.
7791
7cff04b5
AD
77922007-01-16 Akim Demaille <akim@epita.fr>
7793
7794 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
7795
a4e25e1d
JD
77962007-01-15 Paolo Bonzini <bonzini@gnu.org>
7797 and Joel E. Denny <jdenny@ces.clemson.edu>
7798
7799 Clean up %define and %code implementation in M4 some. Most
7800 importantly, rename all related macros to be in the b4_percent_define
7801 and b4_percent_code namespaces. Also, complete support for `.' in
7802 %define variable names and %code qualifiers.
7803 * data/bison.m4 (b4_check_user_names): Check for special
7804 "SKELETON-NAMESPACE(name)" macros instead of using two nested
7805 m4_foreach loops.
7806 (b4_get_percent_define, b4_get_percent_code): Rename to...
7807 (b4_percent_define_get, b4_percent_code_get): ... these.
7808 Extend documentation with examples.
7809 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
7810 b4_percent_define_skeleton_variables and
7811 b4_percent_code_skeleton_qualifiers.
7812 Expect any value for the %define variable `foo' to be stored in the
7813 macro named `b4_percent_define(foo)'; expect any %code blocks for the
7814 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
7815 expect any unqualified %code blocks to be stored in a macro named
7816 `b4_percent_code_unqualified'.
7817 Use m4_indir so that %define variable names and %code qualifiers can
7818 contain `.', which is allowed by the grammar parser.
7819 (b4_percent_define_default): New macro to set a default value for a
7820 %define variable.
7821 (m4_wrap): Update wrapped code, and fix some underquoting.
7822 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
7823 Expect grammar uses of %define variables and %code qualifiers to be
7824 defined in b4_percent_define_user_variables and
7825 b4_percent_code_user_qualifiers.
7826 * data/c++.m4: Use b4_percent_define_default rather than
7827 m4_define_default. Fix some underquoting. Skeleton usage of %define
7828 variable define_location_comparison now implies skeleton usage of
7829 %define variable filename_type.
7830 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7831 data/push.c, data/yacc.c: Update macro names.
7832 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
7833 muscle names.
7834
e37c665c
JMG
78352007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7836
7837 DJGPP specific issues.
7838
7839 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
7840 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
7841
7d2d521f
JD
78422007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7843
7844 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
7845 run parsers in all tests so that Valgrind is invoked during
7846 maintainer-check-valgrind.
7847 (Duplicate representation of merged trees): Free all semantic values.
7848 (Duplicated user destructor for lookahead): Likewise.
7849
e0ac9b4b
JD
78502007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7851
7852 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
7853 command-line prefix.
7854 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
7855 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
7856 miss Valgrind messages.
7857 (Exploding the Stack Size with Malloc): Likewise.
7858
78143faa
JD
78592007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7860
7861 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
7862 locals. Reported by Juan Manuel Guerrero at
7863 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
7864 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
7865 Fix some indentation also.
7866 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
7867 explaining this issue.
7868
7ecec4dd
JD
78692007-01-09 Paolo Bonzini <bonzini@gnu.org>
7870 and Joel E. Denny <jdenny@ces.clemson.edu>
7871
7872 Simplify union and prologue handling, and escape union and lex/parse
7873 params with digraphs.
7874 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
7875 values to the empty string since these are no longer guaranteed
7876 initialized by the front-end.
7877 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
7878 braces around b4_user_stype since this is no longer done by the
7879 front-end.
7880 * src/files.c, src/files.h (pre_prologue_obstack,
7881 post_prologue_obstack): Remove.
7882 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
7883 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
7884 with digraphs. This fixes lex params and parse params.
7885 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
7886 * src/output.c (prepare): Remove muscle insertion of the prologues.
7887 (output): Remove freeing of pre_prologue_obstack and
7888 post_prologue_obstack.
7889 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
7890 than prologue_augment for prologue parsing so you don't need prologue
7891 obstacks.
5c80250c
JD
7892 (grammar_declaration): For %union RHS, use `braceless' instead of
7893 "{...}" so that braces are already stripped and code is escaped with
7894 digraphs.
7ecec4dd
JD
7895 * src/reader.c (prologue_augment): Remove.
7896 (reader): Remove initialization of pre_prologue_obstack and
7897 post_prologue_obstack.
7898 * src/reader.h (prologue_augment): Remove.
7899
7900 * data/c.m4: Remove stray parenthesis.
7901
16dc6a9e
JD
79022007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7903
7904 Remove quotes from variables names in %define directives and from
7905 qualifiers in %code directives, and restrict the characters that are
7906 allowed in them to M4-friendly ones. For %define, continue to support
7907 the quoted form as a deprecated feature. Discussed starting at
7908 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
7909 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
7910 %code.
7911 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
7912 (Decl Summary): In %defines entry, update mention of `%code requires'
7913 and `%code provides'.
16dc6a9e
JD
7914 (C++ Location Values): Update %define uses.
7915 (Calc++ Parser Interface): Likewise.
7916 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 7917 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
7918 * src/parse-gram.y (prologue_declaration): For %define variables, use
7919 `variable' instead of `STRING'.
7920 (grammar_declaration): For %code qualifiers, use `ID' instead of
7921 `STRING'.
7922 (variable): New nonterminal that takes an `ID' or a `STRING'.
7923 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
7924 and %define uses.
7925 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
7926 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
7927 (%define errors): Update %define uses.
7928
e9813cd4
JD
79292007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7930
7931 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
7932 instead of muscle_insert for %define values so that M4-special
7933 characters are replaced with digraphs.
7934 * tests/input.at (%define errors): Extend to check weird values.
7935
6afc30cc
JD
79362007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7937
7938 Instead of having skeletons declare all valid %define variables and
7939 %code qualifiers, provide macros that retrieve the associated values
7940 and build these lists automatically. Thus Bison will now warn when a
7941 variable or qualifier is not used by the skeleton in the current
7942 invocation regardless of whether it might sometimes be used by that
7943 skeleton in other invocations. Also, move all %define value macros to
7944 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
7945 form, which is replaced by %code.
7946 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
7947 (b4_check_user_names): ... this, and change the series of valid name
7948 arguments to a single list argument for names used in the skeleton
7949 similar to the existing list argument for names used in the grammar.
7950 Warn instead of complaining.
7951 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
7952 values and %code code, to format %code code properly, and to build
7953 lists of all %define variables and %code qualifiers used in the
7954 skeleton: b4_skeleton_percent_define_variables and
7955 b4_skeleton_percent_code_qualifiers.
7956 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
7957 Remove, and...
7958 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
7959 the skeleton names lists can finish building first. In place of
7960 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
7961 expect the lists b4_user_percent_define_variables and
7962 b4_user_percent_code_qualifiers.
7963 * data/c++.m4: Where setting default values for b4_parser_class_name,
7964 b4_location_type, b4_filename_type, b4_namespace, and
7965 b4_define_location_comparison, update their names to the
7966 b4_percent_define_ namespace.
7967 * data/glr.c: Don't use b4_check_percent_define_variables and
7968 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7969 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
7970 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 7971 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
7972 * data/location.cc: Use b4_get_percent_define.
7973 * data/push.c: Don't use b4_check_percent_define_variables and
7974 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7975 * data/yacc.c: Likewise, and don't call m4_exit in
7976 b4_use_push_for_pull_if or m4_wrap code will never execute.
7977 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
7978 Rename to...
7979 (muscle_grow_user_name_list): ... this for consistency with the
7980 terminology used in bison.m4.
7981 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
7982 %define variable names, and rename muscle used_percent_define_variables
7983 to user_percent_define_variables.
7984 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
7985 user_percent_code_qualifiers.
7986 (content): Remove.
7987 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
7988 {CODE} form is no longer accepted.
7989 * tests/input.at (Reject bad %code qualifiers): Rename to...
7990 (Reject unused %code qualifiers): ... this, and update test output.
7991 (%define error): Update test output.
7992
7eb8a0bc
JD
79932007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
7994
7995 Check for unrecognized %define variables similar to checking for
7996 unrecognized %code qualifiers. Check for redefined %define variables.
7997 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
7998 generalizes...
7999 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
8000 (b4_check_percent_define_variables): New, also wraps it.
8001 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
8002 variables using b4_check_percent_define_variables.
8003 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
8004 all those exercised in the test suite and all those listed in the
8005 `Default values' section of c++.m4. Are there others?
8006 * data/push.c, data/yacc.c: Declare no valid %define variables.
8007 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
8008 similar to muscle_find, but it works even when the muscle stores a
8009 const value.
8010 (muscle_grow_used_name_list): New function for constructing the used
8011 name list muscles that b4_check_for_unrecognized_names requires.
8012 * src/parse-gram.y (prologue_declaration): Warn if a variable is
8013 %define'd more than once. Define the b4_used_percent_define_variables
8014 muscle with muscle_grow_used_name_list.
8015 (grammar_declaration): Abbreviate %code code with
8016 muscle_grow_used_name_list.
8017 * tests/input.at (%define errors): New.
8018
3fc65ead
JD
80192007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8020
8021 Provide warn_at, complain_at, and fatal_at function callbacks to the
8022 skeletons, and use this for %code qualifier complaints.
8023 * data/bison.m4 (b4_error_at): New, invoked by...
8024 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
8025 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
8026 @fatal_at(...@) directives.
8027 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
8028 qualifiers in b4_used_percent_code_qualifiers and to use
8029 b4_complain_at.
8030 * src/location.c, src/location.h (boundary_set_from_string): New global
8031 function.
8032 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
8033 function.
8034 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
8035 to b4_used_percent_code_qualifiers.
8036 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
8037 function.
8038 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
8039 (lineno): Rename to...
8040 (out_lineno): ... this so I don't misunderstand it again.
8041 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
8042 here; these newlines are in the input but not the output file.
8043 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
8044 (at_directive_perform): ... this new static function, and add handling
8045 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
8046 directives.
8047 * tests/input.at (Reject bad %code qualifiers): Update test output with
8048 locations and extend.
8049
8050 * tests/output.at (Output file name: [, Output file name: ]): Remove
8051 bogus comment about these tests failing.
8052
1c7b7e1d
JD
80532007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8054
8055 Clean up b4_check_percent_code_qualifiers a little.
8056 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
8057 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
8058 documentation and add examples.
8059 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
8060 qualifiers here.
8061
08af01c2
JD
80622007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8063
8064 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
8065 unreliable -- especially when they're hidden inside another macro.
8066 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
8067 data/c.m4: Remove m4_divert(-1).
8068 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
8069 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
8070 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 8071 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
8072 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
8073 pushed and popped by m4sugar, should be first on the stack.
8074
8075 Provide warn, complain, and fatal function callbacks to the skeletons.
8076 This provides more flexibility than m4_fatal, improves the error
8077 message format, and captures messages for translation. Discussed
8078 starting at
8079 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
8080 * data/bison.m4 (b4_error): New, invoked by...
8081 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
8082 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
8083 directives. Because these M4 macros might be called when the current
8084 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
8085 the previous removal of uses of m4_divert, which caused trouble.
8086 (b4_check_percent_code_qualifiers): Use b4_complain instead of
8087 m4_fatal to report unrecognized %code qualifiers.
8088 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
8089 push parser requests.
8090 * data/glr.c: Use b4_complain instead of m4_fatal to report
8091 non-deterministic push parser requests.
8092 Update @output usage to @output(...@) form.
8093 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
8094 report missing %defines. Update @output usage to @output(...@) form.
8095 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
8096 @output(...@) form.
8097 * src/main.c (main): Invoke skel_scanner_free.
8098 * src/scan-skel.h (skel_scanner_free): Prototype new function.
8099 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
8100 obstack_for_string from flex-scanner.h.
8101 (YY_DECL): Use to declare skel_lex static.
8102 (decode_at_digraphs): Remove; now handled in the new
8103 SC_AT_DIRECTIVE_ARG start condition.
8104 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
8105 functions.
8106 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
8107 at_directive_argv): New static globals.
8108 (INITIAL): Use fail_for_invalid_at.
8109 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
8110 recognize the start of a generalized `@directive(...@)' form and
8111 start...
8112 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
8113 directive args (using the new obstack_for_string), to decode the
8114 contained @ diagraphs, and to perform the directive. It recognizes
8115 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
8116 @output(...@).
8117 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
8118 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
8119 `@,'.
8120 (scan_skel): Initialize obstack_for_string on the first call.
8121 (skel_scanner_free): New function to free obstack_for_string.
8122 * tests/input.at (Reject bad %code qualifiers): Update test output.
8123
8e0a5e9e
JD
81242007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
8125
8126 Consolidate the 4 prologue alternative directives (%code, %requires,
8127 %provides, and %code-top) into a single %code directive with an
8128 optional qualifier field. Discussed at
8129 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
8130 * NEWS (2.3a+): Rewrite the existing entry for the prologue
8131 alternatives.
8132 * doc/bison.texinfo (Prologue Alternatives): Update.
8133 (Decl Summary): Update to %code "requires" and %code "provides".
8134 (Calc++ Parser): Update to %code "requires".
148d66d8 8135 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
8136 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
8137 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
8138 are replaced by b4_percent_code_provides and b4_percent_code_requires,
8139 which are skeleton-specific.
8140 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
8141 declare what %code qualifiers it supports and to complain if any other
8142 qualifiers were used in the grammar.
8143 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
8144 and b4_user_code([b4_percent_code_provides]) in place of
8145 b4_user_requires and b4_user_provides.
8146 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
8147 Add b4_user_code([b4_percent_code_top]) and
8148 b4_user_code([b4_percent_code]).
8149 Invoke b4_check_percent_code_qualifiers.
8150 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
8151 PERCENT_REQUIRES): Remove.
8152 (grammar_declaration): Remove RHS's for %code-top, %provides, and
8153 %requires. Rewrite the %code RHS as the unqualified form defining the
8154 muscle b4_percent_code. Add another RHS for the qualified %code form,
8155 which defines muscles of the form b4_percent_code_QUALIFIER and the
8156 b4_used_percent_code_qualifiers muscle.
8157 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
8158 PERCENT_REQUIRES): Remove.
8159 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
8160 %code "requires" and %code "provides".
8161 * tests/input.at (Reject bad %code qualifiers): New.
8162
95021767
JD
81632007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
8164
8165 Use the new code_props interface for destructors and printers.
8166 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
8167 printer_location members, and change the type of the destructor and
8168 printer members to code_props.
8169 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
8170 symbol_printer_get, semantic_type_destructor_set,
8171 semantic_type_printer_set, default_tagged_destructor_set,
8172 default_tagless_destructor_set, default_tagged_printer_set,
8173 default_tagless_printer_set): Use code_props in arguments and return
8174 types in place of char const * and location.
8175 (symbol_destructor_location_get, symbol_printer_location_get): Remove
8176 since the locations are now contained in the return of
8177 symbol_destructor_get and symbol_printer_get.
8178 * src/output.c (symbol_destructors_output, symbol_printers_output):
8179 Replace with...
8180 (symbol_code_props_output): ... this to eliminate duplicate code.
8181 (output_skeleton): Update to use symbol_code_props_output.
8182 * src/reader.c (symbol_should_be_used): Update use of
8183 symbol_destructor_get.
8184 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
8185 Update uses of the various _destructor_set and _printer_set functions.
8186 * src/symtab.c: (default_tagged_destructor_location,
8187 default_tagless_destructor_location, default_tagged_printer_location,
8188 default_tagless_printer_location): Remove since we...
8189 (default_tagged_destructor, default_tagless_destructor,
8190 default_tagged_printer, default_tagless_printer): ... change the type
8191 of these to code_props.
8192 (symbol_new, semantic_type_new, symbol_destructor_set,
8193 semantic_type_destructor_set, symbol_destructor_get,
8194 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
8195 symbol_check_alias_consistency, default_tagged_destructor_set,
8196 default_tagless_destructor_set, default_tagged_printer_set,
8197 default_tagless_printer_set): Update.
8198 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
8199 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
8200 code_props members.
8201 (symbol_print): Use SYMBOL_CODE_PRINT.
8202
f6857bbf
JD
82032007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
8204
8205 Use the new code_props interface for rule actions.
8206 * src/symlist.h (symbol_list): Replace action, action_location, and
8207 used members with a code_props action_props member.
8208 * src/reader.c (symbol_should_be_used, grammar_rule_check,
8209 grammar_midrule_action, grammar_current_rule_merge_set,
8210 grammar_current_rule_symbol_append, packgram): Update.
8211 * src/scan-code.h (translate_rule_action): Remove, no longer used.
8212 * src/scan-code.l (handle_action_dollar): Update.
8213 (translate_rule_action): Remove, no longer used.
8214 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
8215
7c0c6181
JD
82162007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8217
8218 Use the new code_props interface in parse-gram.y.
8219 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
8220 Update all uses of translate_* functions to use the new code_props
8221 interface and to use gram_scanner_last_string_free and
8222 code_scanner_last_string_free where possible.
8223 (grammar_declaration): symbol_list_destructor_set and
8224 symbol_list_printer_set now perform the translation, so don't do it
8225 here. Use gram_scanner_last_string_free where possible.
8226 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
8227 translate_code): Remove, no longer used.
8228 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
8229 symbol_list_printer_set): Perform code translation here rather than
8230 depending on the caller to do so.
8231
8232 * src/symlist.h (struct symbol_list): Correct some documentation typos.
8233 * src/scan-gram.h (gram_last_string): Remove declaration.
8234 * src/scan-gram.l (last_string): Declare it static.
8235
28e52c0d
JD
82362007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8237
8238 Encapsulate code properties and related functionality for the various
8239 destructors, printers, and actions into a code_props structure and
8240 interface. This patch merely implements code_props in scan-code.h and
8241 scan-code.l. Future patches will rewrite other modules to use it.
8242 Discussed starting at
8243 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
8244 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
8245 consistently initialize const structs that have an empty location
8246 field.
8247 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
8248 to ensure consistency.
8249 * src/scan-code.h (code_props): New structure.
8250 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
8251 function, macro, and const global variable for initializing a
8252 code_props with no code.
8253 (code_props_plain_init, code_props_symbol_action_init,
8254 code_props_rule_action_init, code_props_translate_code): The rest of
8255 the new code_props functional interface. Among other things, the init
8256 functions set the code_props kind field so that
8257 code_props_translate_code will know whether to behave like
8258 translate_symbol_action, translate_rule_action, or translate_code.
8259 These old translate functions must remain until all other modules are
8260 updated to use the new code_props interface.
8261 (code_scanner_last_string_free): New function similar to
8262 gram_scanner_last_string_free.
8263 (code_scanner_free): Add documentation.
8264 * src/scan-code.l: Implement the new interface.
8265 (code_lex): Make it static, add a code_props* argument, and remove the
8266 rule argument.
8267 (last_string): New static global similar to the one in scan-gram.l.
8268 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
8269 instead of rule.
8270 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
8271 code_props since Bison may one day use this information for destructors
8272 and printers.
8273 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
8274 (handle_action_dollar): Use symbol_list_n_get and set used flag
8275 directly since symbol_list_n_used_set is removed.
8276 (translate_action): Add a code_props* argument and remove the rule,
8277 action, and location arguments. Pass the code_props* on to code_lex.
8278 (translate_rule_action, translate_symbol_action, translate_code):
8279 Rewrite as wrappers around the new code_props interface.
8280 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
8281 it would eventually need to break the encapsulation of code_props.
8282
96034983
JD
82832007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
8284
8285 * etc/.cvsignore: New.
8286
945e396c
JD
82872007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
8288
8289 Add maintainer-push-check to run maintainer-check using push parsing in
8290 place of pull parsing where available.
8291 * Makefile.am (maintainer-push-check): New.
8292 * data/bison.m4 (b4_use_push_for_pull_if): New.
8293 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
8294 appropriately based on their existing values.
8295 (yypush_parse): Don't print push-parser-specific diagnostics if push
8296 parsing is being used in place of pull parsing.
8297 * data/yacc.c: If push parsing should replace pull parsing, redirect to
8298 push.c.
8299 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
8300 variable, and insert b4_use_push_for_pull_flag into muscles.
8301 * tests/Makefile.am (maintainer-push-check): New.
8302
7d596384
JD
83032006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
8304
8305 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
8306 (whether successful or failed) so that yypush_parse can be invoked
8307 again to start a new parse using the same yypstate.
8308 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
8309 check multiple yypull_parse invocations on the same yypstate. For pull
8310 mode, extend to check multiple yyparse invocations.
8311 (Exploding the Stack Size with Alloca): Extend to try with
8312 %push-pull-parser.
8313 (Exploding the Stack Size with Malloc): Likewise.
8314
8315 * tests/calc.at (Simple LALR Calculator): Don't specify
8316 %skeleton "push.c" since %push-pull-parser implies that now.
8317 * tests/headers.at (export YYLTYPE): Don't check for the push
8318 declarations. Otherwise, this test case can't be used to see if push
8319 mode can truly emulate pull mode.
8320 * tests/input.at (Torturing the Scanner): Likewise.
8321 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
8322 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
8323 AT_YACC_IF, which now includes the case of push mode since %skeleton
8324 need not be used for push mode. This will be more intuitive once
8325 push.c is renamed to yacc.c.
8326
7172e23e
JD
83272006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
8328
8329 For push mode, convert yyparse from a macro to a function, invoke yylex
8330 instead of passing a yylexp argument to yypull_parse, and don't
8331 generate yypull_parse or yyparse unless %push-pull-parser is declared.
8332 Discussed starting at
8333 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
8334 * data/bison.m4 (b4_pull_if): New.
8335 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
8336 * data/push.c: Improve M4 quoting a little.
8337 (b4_generate_macro_args, b4_parenthesize): Remove.
8338 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
8339 any time a pull parser is requested.
8340 Don't #define this as a wrapper around yypull_parse. Instead, when
8341 both push and pull are requested, make it a function that does that
8342 same thing.
8343 (yypull_parse): If there's a b4_prefix, #define this to
8344 b4_prefix[pull_parse] when both push and pull are requested.
8345 Don't define this as a function unless both push and pull are
8346 requested.
8347 Remove the yylexp argument and hard-code yylex invocation instead.
8348 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
8349 %push-parser.
8350 * src/getargs.c (pull_parser): New global initialized to true.
8351 * getargs.h (pull_parser): extern it.
8352 * src/output.c (prepare): Insert pull_flag muscle.
8353 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
8354 (prologue_declaration): Set both push_parser and pull_parser = true for
8355 %push-pull-parser. Set push_parser = true and pull_parser = false for
8356 %push-parser.
8357 * src/scan-gram.l: Don't accept %push_parser as an alternative to
8358 %push-parser since there's no backward-compatibility concern here.
8359 Scan %push-pull-parser.
8360 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
8361 instead of %push-parser.
8362 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
8363 prototype it in the module that calls yyparse.
8364 * tests/input.at (Torturing the Scanner): Likewise.
8365 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
8366
2e7944cb
JD
83672006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
8368
8369 Update etc/bench.pl. Optimize push mode a little (the yyn change
8370 deserves most of the credit).
8371 * Makefile.am (SUBDIRS): Add etc subdirectory.
8372 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
8373 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
8374 yytoken, yyval, and yyloc declarations to...
8375 (yyparse or yypush_parse): ... here to improve performance. For
8376 yypush_parse invocations after the first, be sure to assign yyn its old
8377 value again.
8378 (yypstate_new): Don't bother initializing the yyresult field since the
8379 initial value isn't used.
8380 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
8381 remove the #define that, in push mode, set it to yyps->NAME.
8382 * etc/Makefile.am: New.
8383 * etc/bench.pl: Remove and build it instead from...
8384 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
8385 "tests/bison" from the build directory by default rather than just
8386 invoking "bison" from $PATH.
8387 (calc_grammar): Update push parser code: don't declare yylval globally,
8388 don't define yyparse_wrapper, and don't #define yyparse.
8389 (bench_grammar): Update to check all working combinations of yacc.c,
8390 push.c, impure, pure, pull, and push.
8391
c3d50342
JD
83922006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
8393
8394 For push mode, add pull wrappers around yypush_parse.
8395 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
8396 (yypull_parse): New function wrapping yypush_parse.
8397 (yyparse): New #define wrapping yypull_parse.
8398 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
8399 is declared.
8400 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
8401 prototype yylex in the module that calls yyparse, and don't prototype
8402 yyparse there. Otherwise, the yyparse expansion won't compile.
8403 * tests/input.at (Torturing the Scanner): Likewise.
8404
94ebeba5
JD
84052006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
8406
8407 Enable push parsers to operate in impure mode. Thus, %push-parser no
8408 longer implies %pure-parser. The point of this change is to move
8409 towards being able to test the push parser code by running the entire
8410 test suite as if %push-parser had been declared.
8411 * data/push.c (yypush_parse): For impure mode, remove the
8412 yypushed_char, yypushed_val, and yypushed_loc arguments.
8413 Instead, declare these as local variables initialized to the global
8414 yychar, yylval, and yylloc.
8415 For the first yypush_parse invocation only, restore the initial values
8416 of these global variables when it's time to read a token since they
8417 have been overwritten.
8418 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
8419 %push-parser.
8420 * tests/calc.at (Simple LALR(1) Calculator): Always declare
8421 %pure-parser along with %push-parser since this test case was designed
8422 for pure push parsers.
8423 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
8424 (AT_YACC_OR_PUSH_IF): New.
8425 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
8426 add a note that it's still wrong for some cases (as it has been for a
8427 while).
8428 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
8429 %push-parser no longer implies %pure-parser.
8430
a0633178
JD
84312006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8432
8433 Remove some unnecessary differences between the pull parser code and
8434 the push parser code. This patch enables yynerrs in push mode.
8435 * data/push.c: Reformat M4 a little.
8436 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
8437 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
8438 because push mode is on. Instead, if pure mode is on, move yynerrs
8439 to...
8440 (b4_declare_parser_state_variables): ... here.
8441 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
8442 to yyps->NAME so it can be used in yypush_parse.
8443 (yypush_parse): Don't omit uses of yynerrs in push mode.
8444
8646b6a3
JD
84452006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8446
8447 Fix bug such that the first pushed token's value and location are
8448 sometimes overwritten (sometimes by %initial-action) before being used.
8449 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
8450 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
8451 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
8452 more closely mimic the pull parser logic.
8453 Don't copy the pushed token to yychar, yylval, and yylloc until it's
8454 time to read a token, which is after any initialization of yylval and
8455 yylloc.
8456 (gottoken): Rename label to...
8457 (yyread_pushed_token): ... for clarity and to avoid infringing on the
8458 user namespace.
8459
9baf4d74
JD
84602006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8461
8462 Rearrange initialization of the parser state variables so that the
8463 skeleton doesn't have to have a copy for pull mode and another for push
8464 mode. This patch also fixes at least a bug such that yylloc was not
8465 initialized (with b4_location_initial_line and
8466 b4_location_initial_column) upon calling yypush_parse. However, that
8467 initialization now overwrites the first token's location;
8468 %initial-action assigning @$ already did the same thing, and both bugs
8469 will be fixed in a later patch.
8470 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
8471 (b4_declare_parser_state_variables): Remove initialization of yytoken,
8472 yyss, yyvs, yyls, and yystacksize.
8473 (yypstate_new): Remove initialization of some yypstate fields: yystate,
8474 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
8475 yylsp.
8476 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
8477 yyps->NAME so it can be used in yypush_parse.
8478 (yyparse or yypush_parse): For yypush_parse, don't print the
8479 "Starting parse" diagnostic for invocations after the first.
8480 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
8481 yypush_parse, only do it for the first invocation.
8482 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
8483 initialization to occur in yypush_parse but only on the first
8484 invocation.
8485
23522164
JD
84862006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8487
8488 * data/push.c: Add CPP guards around push parser declarations in both
8489 the header and the code file.
8490 In the code file, move the push parser declarations to the same place
8491 they appear in the header file.
8492 Clean up the M4 some, especially the inconsistent underquoting in
8493 some b4_c_function_def and b4_c_function_decl uses.
8494
bb010fe5
JD
84952006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8496
8497 Encapsulate the push parser state variables into an M4 macro so the
8498 push skeleton doesn't have to list them again for pull mode's yyparse.
8499 For push mode, remove yypush_parse's local equivalents of these
8500 variables to eliminate unnecessary copying between the two sets at
8501 run-time. This patch also fixes at least a bug related to multiple
8502 %initial-action invocations in push mode.
8503 * data/push.c (b4_declare_parser_variables): Rename to...
8504 (b4_declare_scanner_communication_variables): ... this for clarity and
8505 update both uses.
8506 (b4_declare_yyparse_variables): Remove and move its contents to the one
8507 spot where it was invoked.
8508 (b4_declare_parser_state_variables): New macro containing the parser
8509 state variables required by push mode.
8510 (struct yypstate): Replace all fields but yynew with
8511 b4_declare_parser_state_variables.
8512 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
8513 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
8514 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
8515 (yyparse or yypush_parse): For yyparse in pull mode, replace local
8516 parser state variable declarations with
8517 b4_declare_parser_state_variables.
8518 Don't initialize parser state variables when calling yypush_parse since
8519 yypstate_new already does that.
8520 Invoke the user's initial action only upon the first yypush_parse
8521 invocation.
8522 Remove all code that copies between the local parser state variables
8523 and the yypstate.
8524
2d212f8c
JD
85252006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8526
8527 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
8528 prevent a name collision in a future patch where these names will
8529 sometimes be #define'd.
8530 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
8531 since it no longer has the same name as the existing argument.
8532 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
8533
e6e704dc
JD
85342006-12-19 Paolo Bonzini <bonzini@gnu.org>
8535 and Joel E. Denny <jdenny@ces.clemson.edu>
8536
8537 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
8538 that the argument is case-insensitive, and there's no `=' here.
8539 For the %skeleton entry, mention that %language is better.
8540 (Bison Options): Likewise for --language and --skeleton. Move the
8541 --skeleton entry so that the `Tuning the parser' section is sorted
8542 alphabetically on long options.
8543 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
8544 %language directive in detail here; cross-reference the %language
8545 documentation instead.
8546 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
8547 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 8548 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
8549 * examples/extexi (normalize): Instead of replacing every %require
8550 argument with the current Bison version, just substitute for
8551 `@value{VERSION}'. This guarantees that we're testing what actually
8552 appears in the documentation.
8553 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
8554 rather than `@VERSION@'.
8555
0e021770
PE
85562006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8557
fd575f05
PE
8558 * NEWS: Reword the %language news a bit, and put it earlier.
8559
0e021770
PE
8560 * src/getargs.c (skeleton_arg): Last arg is now location const *.
8561 Rewrite to simplify the logic.
8562 (language_argmatch): Likewise.
fd575f05
PE
8563 (program_name): We now own this var.
8564 * src/getargs.h (struct bison_language): Use char[] rather than
8565 const char *.
0e021770
PE
8566
8567 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
8568 Java is supported.
8569 * src/complain.c (program_name): Remove decl; no longer needed.
8570 * src/main.c (program_name): Remove; now belongs to getargs.
8571
85722006-12-18 Paolo Bonzini <bonzini@gnu.org>
8573
8574 * NEWS: Document %language.
8575
8576 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
8577
8578 * data/c-skel.m4, data/c++-skel.m4: New files.
8579 * data/glr.c: Complain on push parsers.
8580
8581 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
8582 over %skeleton.
148d66d8 8583 (Decl Summary): Document %language and %skeleton.
0e021770
PE
8584 (Command line): Document -L.
8585
8586 * examples/extexi: Rewrite %require directive.
8587 * examples/calc++/Makefile.am: Pass VERSION to extexi.
8588
8589 * src/files.c (compute_exts_from_gc): Look in language structure
8590 for .y extension.
8591 (compute_file_name_parts): Check whether .tab should be added.
8592 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
8593 (language, skeleton_arg, language_argmatch): New.
8594 (long_options): Add --language.
8595 (getargs): Use skeleton_arg, add -L/--language.
8596 * src/getargs.h: Include location.h.
8597 (struct bison_language, language, skeleton_arg, language_argmatch): New.
8598 * src/output.c (prepare): Pick default skeleton from struct language.
8599 Don't dispatch C skeletons here.
8600 * src/parse-gram.y (PERCENT_LANGUAGE): New.
8601 (prologue_declaration): Add "%language" rule, use skeleton_arg.
8602 * src/scan-gram.l ("%language"): New rule.
8603
8604 * tests/calc.at: Test %skeleton and %language.
8605 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
8606 (AT_GLR_IF): Look for %skeleton "glr.cc".
8607 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
8608 (AT_YACC_IF): Reject %language.
8609
5691bf57
PE
86102006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8611
db06f0ce
PE
8612 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
8613 since it wasn't used; only the typedef name 'semantic_type' is needed.
8614 Also, omit trailing white space.
8615
5691bf57
PE
8616 * bootstrap: Sync from coreutils.
8617 (gnulib_extra_files): Add build-aux/announce.gen.
8618 (slurp): Adjust .gitignore files like .cvsignore files.
8619 * build-aux/announce-gen: Remove from CVS, since bootstrap
8620 now creates this.
8621
791934e4
JD
86222006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
8623
8624 Make %push-parser imply %pure-parser. This fixes several bugs; see
8625 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
8626 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
8627 pure_parser = true.
8628 * data/push.c: Don't bother testing b4_push_if when deciding whether
8629 to expand b4_declare_parser_variables globally.
8630 (yypush_parse): Likewise in here.
8631
8632 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
8633 (yy_reduce_print): Reformat M4 for readability.
8634
ee5abb37
JD
86352006-12-15 Bob Rossi <bob@brasko.net>
8636 and Joel Denny <jdenny@ces.clemson.edu>
8637
8638 * data/push.c (yypstate): Add typedef, and update all uses of
8639 struct yypstate to just yypstate.
8640 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
8641
16ca01f9
JD
86422006-12-14 Bob Rossi <bob@brasko.net>
8643
8644 * data/push.c (yypush_parse): Declare prototype regardless of
8645 %locations option.
8646
ab8e7e1a
JD
86472006-12-14 Bob Rossi <bob@brasko.net>
8648
8649 * data/push.c (yyparse): Remove the prototype and the #define when in
8650 push-parser mode.
8651
9bf32be3
JD
86522006-12-13 Bob Rossi <bob@brasko.net>
8653
8654 * data/push.c (yypstate_init): Rename to...
8655 (yypstate_new): ... this and use b4_c_function_def.
8656 (yypstate_delete): New.
8657 (yypush_parse): Change parameters yynval and yynlloc to be const.
8658 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
8659 yypstate_delete functions.
8660
f02e2948
JD
86612006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
8662
8663 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
8664 strange test case titles. Reported by Bob Rossi.
8665
38eb7751
PE
86662006-12-13 Paul Eggert <eggert@cs.ucla.edu>
8667
8668 * TODO: Add pointer to Sylvain Schmitz's work on static detection
8669 of potential ambiguities in GLR grammers.
8670
bd9d212b
JD
86712006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
8672
8673 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
8674 `bison ', use m4_index instead of m4_substr since chopping up a string
8675 containing M4-special characters causes problems here.
8676
8677 Fix a couple of bugs related to special characters in user-specified
8678 file names, and make it easier for skeletons to compute output file
8679 names with the same file name prefix as Bison-computed output file
8680 names.
8681 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
8682 b4_parser_file_name and b4_spec_defines_file instead of
8683 @output_parser_name@ and @output_header_name@, which are now redundant.
8684 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
8685 b4_parser_file_name, b4_spec_defines_file, and the new
8686 @basename(FILENAME@) instead of @output_parser_name@ and
8687 @output_header_name@, which inappropriately escaped the file names as
8688 C string literals.
8689 * src/files.c (all_but_ext): Remove static qualifier.
8690 (compute_output_file_names): Move `free (all_but_ext)' to...
8691 (output_file_names_free): ... here since all_but_ext is needed later.
8692 * src/files.h (all_but_ext): Extern.
8693 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
8694 exactly what MUSCLE_INSERT_STRING used to do.
8695 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
8696 characters are escaped properly.
8697 * src/output.c (prepare): Define muscle file_name_all_but_ext as
8698 all_but_ext.
8699 For pkgdatadir muscle, maintain previous functionality by using
8700 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
8701 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
8702 digraphs would never be expanded. Hopefully no one has M4-special
8703 characters in his Bison installation path.
8704 * src/scan-skel.l: Don't parse @output_header_name@ and
8705 @output_parser_name@ anymore since they're now redundant.
8706 In @output, use decode_at_digraphs.
8707 Parse a new @basename command that invokes last_component.
8708 (decode_at_digraphs): New.
8709 (BASE_QPUTS): Remove unused.
8710 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
8711 (Output file name): New tests.
8712
3f7ca628
JD
87132006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
8714
8715 Warn about output files that are generated by the skeletons and that
8716 conflict with other output files.
8717 * data/glr.c: Don't generate the header file here when glr.cc does.
8718 * src/files.c (file_names, file_names_count): New static globals.
8719 (compute_output_file_names): Invoke output_file_name_check for files
8720 not generated by the skeletons and remove existing checks.
8721 (output_file_name_check): New function that warns about conflicting
8722 output file names.
8723 (output_file_names_free): Free file_names.
8724 * src/files.h (output_file_name_check): Declare.
8725 * src/scan-skel.l: Invoke output_file_name_check for files generated by
8726 the skeletons.
8727 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
8728 (Conflicting output files): New tests.
8729
178e123e
PE
87302006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8731
8732 * doc/bison.texinfo: Fix a couple of typos.
8733
87342006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
8735
8736 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
8737 Rename to...
8738 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
8739 update all uses.
8740 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
8741 (yypush_parse): Rename yypvars argument to yyps and remove redundant
8742 local pv.
8743 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
8744 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
8745
ea17f233
JD
87462006-12-07 Bob Rossi <bob@brasko.net>
8747 and Joel Denny <jdenny@ces.clemson.edu>
8748
8749 * data/push.c (yypvarsinit): Change return type from void* to struct
8750 yypvars*. No longer cast to void* on return.
8751 (struct yypvars): Remove yylen since it need not be remembered between
8752 yypushparse invocations.
8753 (yypushparse): Don't copy between yylen and pv->yylen.
8754
55a30bda
JD
87552006-12-05 Bob Rossi <bob@brasko.net>
8756
8757 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
8758 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
8759 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
8760 (struct yypvars): Remove b4_declare_parser_variables.
8761 (yypvarsinit): Remove init code for removed variables.
8762 (global scope): Do not declare b4_declare_parser_variables if
8763 push or pure mode.
8764 (yypushparse): Add b4_declare_parser_variables.
8765 Init new local variables, and remove init code for removed
8766 yypvars variables.
8767 (yyparse): Delete.
8768 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
8769 and yyparse for other modes.
8770 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
8771 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
8772 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
8773 (AT_PURE_LEX_IF): True if pure or push parser.
8774
85894313
JD
87752006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
8776
8777 Document Yacc prologue alternatives and default %destructor's and
8778 %printer's as experimental. Don't mention Java yet. Discussed at
8779 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
8780 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
8781 (2.3a): Annotate this entry to say the old forms of these features were
8782 also experimental.
8783 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 8784 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
8785 of Java (we'll want this back eventually).
8786
02975b9a
JD
87872006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
8788
8789 Support a file name argument to %defines. Deprecate `=' in
8790 %file-prefix, %name-prefix, and %output. Discussed at
8791 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
8792 * NEWS (2.3a+): Mention.
148d66d8 8793 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
8794 form of %defines, and remove `=' from entries for %file-prefix,
8795 %name-prefix, and %output.
8796 * src/parse-gram.y (prologue_declaration): Implement.
8797 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
8798 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
8799 all but one occurrence of %name-prefix.
8800 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
8801 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
8802 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
8803 occurrence of each of %file-prefix and %output. Add check for %defines
8804 with argument.
8805 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
8806 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
8807 Remove the `=' from %output.
8808
287b314e
JD
88092006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
8810
8811 Don't escape $ in test case titles since Autoconf 2.61 now does that
8812 correctly.
8813 * tests/actions.at (Default %printer and %destructor are not for error
8814 or $undefined): Here.
8815 (Default %printer and %destructor are not for $accept): Here.
8816 * tests/input.at (Invalid $n and @n): Here.
8817
3ebecc24
JD
88182006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
8819
8820 Rename <!> to <>. Discussed starting at
8821 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
8822 * NEWS (2.3a+): Update.
148d66d8 8823 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
8824 Update.
8825 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
8826 * src/scan-gram.l (INITIAL): Implement.
8827 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
8828 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
8829 comment.
8830 * tests/actions.at (Default tagless %printer and %destructor,
8831 Default tagged and per-type %printer and %destructor,
8832 Default %printer and %destructor are not for error or $undefined,
8833 Default %printer and %destructor are not for $accept,
8834 Default %printer and %destructor for mid-rule values): Update.
8835 * tests/input.at (Default %printer and %destructor redeclared,
8836 Unused values with default %destructor): Update.
8837
26b8a438
JD
88382006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
8839
8840 Don't let %prec take a nonterminal.
8841 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
8842 token.
8843 * tests/input.at (%prec takes a token): New test checking that %prec
8844 won't take a nonterminal.
8845
07c39ae9
JD
88462006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8847
405d53b7
JD
8848 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
8849 it was double-quoted.
07c39ae9
JD
8850 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
8851 grammar is maintained with Bison's highest standards.
8852 * src/getargs.c: Fix some typos in Doxygen comments.
8853
580b8926
JD
88542006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8855
8856 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
8857 later. Reported by Paul Eggert in
8858 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
8859 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
8860 * src/scan-code.l (translate_action): Don't bother invoking
8861 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
8862 (code_scanner_free): Instead of invoking
8863 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
8864 which frees more.
8865 * src/scan-gram.l (gram_scanner_free): Likewise.
8866 * src/scan-skel.l (scan_skel): Likewise.
8867
4502eadc
JD
88682006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
8869
8870 * src/files.c (tr): Change return type to void.
8871 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
8872 has been called previously for the same key.
8873 (muscle_find): Return storage instead of value so that
8874 --enable-gcc-warnings doesn't produce warnings that the return discards
8875 const. aver that the value and storage are the same since storage
8876 could potentially be NULL when value is not.
8877 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
8878 same as 0.
8879
7746c8f6
PE
88802006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8881
8882 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
8883 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
8884 us a slightly cleaner distribution, and also works.
8885 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
8886 gnulib changes.
8887
eb095650
PE
88882006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
8889 and Paul Eggert <eggert@cs.ucla.edu>
8890
8891 Don't let Bison leak memory except when it complains.
8892 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
8893 (spec_defines_file, dir_prefix): Now char *, not const char *,
8894 since they are freed.
8895 * src/files.c: Likewise.
8896 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
8897 Likewise.
8898 (tr): Now operates in-place. All uses changed.
8899 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
8900 values.
8901 (compute_file_name_parts, compute_output_file_names): Don't store
8902 read-only data in variables that will be freed.
8903 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
8904 src_extension, and header_extension.
8905 (output_file_names_free): New public function to free
8906 spec_verbose_file, spec_graph_file, spec_defines_file,
8907 parser_file_name, and dir_prefix.
8908 * src/getargs.c (getargs): Don't store read-only data in variables that
8909 will be freed.
8910 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
8911 (which previously existed but was unused), and quotearg_free.
8912 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
8913 * src/muscle_tab.c: Likewise.
8914 (muscle_entry): Make the value char const *,
8915 and add a new storage member that is char * and can be freed.
8916 (muscle_entry_free): New private function.
8917 (muscle_init): Use it instead of free.
8918 (muscle_insert, muscle_grow): Update and use new storage member.
8919 (muscle_code_grow): Free the string passed to muscle_grow
8920 since it's not needed anymore.
8921 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
8922 add a new `char *code' member.
8923 ("{...}"): Declare semantic type as code.
8924 * src/scan-code.h (translate_rule_action):
8925 (translate_symbol_action, translate_code, translate_action): Return
8926 `char const *' rather than `char *' since external code should not free
8927 these strings.
8928 * src/scan-code.l: Likewise.
8929 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
8930 which is "{...}" in the parser.
8931 * tests/Makefile.am (maintainer-check-valgrind): Set
8932 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
8933 Valgrind.
8934 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
8935 complain.
8936 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
8937 expecting a non-zero exit status sets --leak-check=summary and
8938 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
8939 this case, and we don't want to hear about it.
8940
ac564be4
PE
89412006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8942
8943 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
8944 instead of from the template, to simplify configuration a bit.
8945 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
8946 and m4/wint_t.m4, as they are needed with the latest gnulib.
8947
17bd8a73
JD
89482006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8949
8950 Disable unset/unused mid-rule value warnings by default, and recognize
8951 --warnings=midrule-values to enable them. Discussed starting at
8952 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
8953 * NEWS (2.3a+): Mention.
8954 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
8955 warnings): Add entry for midrule-values subargument.
8956 * src/reader.c (symbol_should_be_used): Don't return true just because
8957 the value is a set/used mid-rule value unless
8958 --warnings=midrule-values was specified.
8959 * tests/input.at (Unused values, Unused values before symbol
8960 declarations): Run tests with and without --warnings=midrule-values.
8961
8962 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
8963 than LIST_FREE directly.
8964
89eb3c76
JD
89652006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8966
8967 Finish implementing --warnings=error, which should not be implied by
8968 --warnings=all (or by its synonyms -W and --warnings without
8969 subarguments).
8970 * src/complain.c (set_warning_issued): New function to report that
8971 warnings are being treated as errors and to record an error if so.
8972 Invoke...
8973 (warn_at, warn): ... here.
8974 * src/getargs.c (warnings_args, warnings_types): Reorder so that
8975 "error - warnings are errors" does not appear above "all - all of the
8976 above".
8977 (getargs): For -W and --warnings without subarguments, don't let
8978 FLAGS_ARGMATCH set warnings_error in warnings_flag.
8979 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
8980
ba7560e2
JD
89812006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8982
8983 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
8984 empty subargument list. For example: `bison --warnings= parser.y'.
8985
31283fc3
JD
89862006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8987
8988 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
8989 the parser header file so that gcc doesn't warn.
8990
12e35840
JD
89912006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8992
8993 Split the default %destructor/%printer into two kinds: <*> and <!>.
8994 Discussed starting at
8995 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
8996 * NEWS (2.3a+): Mention.
8997 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
8998 previous change today related to mid-rules.
148d66d8 8999 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 9000 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
9001 (TYPE_TAG_ANY): Add as <*>.
9002 (TYPE_TAG_NONE): Add as <!>.
9003 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
9004 for <*> and <!>.
9005 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
9006 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
9007 * src/symlist.c (symbol_list_default_new): Split into tagged and
9008 tagless versions.
9009 (symbol_list_destructor_set, symbol_list_printer_set): Split
9010 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
9011 SYMLIST_DEFAULT_TAGLESS.
9012 * src/symlist.h: Update symbol_list_default*_new prototypes.
9013 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
9014 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
9015 * src/symtab.c (default_destructor, default_destructor_location,
9016 default_printer, default_printer_location): Split each into tagged and
9017 tagless versions.
9018 (symbol_destructor_get, symbol_destructor_location_get,
9019 symbol_printer_get, symbol_printer_location_get): Implement tagged
9020 default and tagless default cases.
9021 (default_destructor_set, default_printer_set): Split each into tagged
9022 and tagless versions.
9023 * src/symtab.h: Update prototypes.
9024 * tests/actions.at (Default %printer and %destructor): Rename to...
9025 (Default tagless %printer and %destructor): ... this, and extend.
9026 (Per-type %printer and %destructor): Rename to...
9027 (Default tagged and per-type %printer and %destructor): ... this, and
9028 extend.
9029 (Default %printer and %destructor for user-defined end token): Extend.
9030 (Default %printer and %destructor are not for error or $undefined):
9031 Update.
9032 (Default %printer and %destructor are not for $accept): Update.
9033 (Default %printer and %destructor for mid-rule values): Extend.
9034 * tests/input.at (Default %printer and %destructor redeclared): Extend.
9035 (Unused values with default %destructor): Extend.
9036
f91b1629
JD
90372006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
9038
9039 Don't apply the default %destructor/%printer to an unreferenced midrule
9040 value. Mentioned at
9041 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
9042 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
9043 like $@n instead of just @n so that the default %destructor/%printer
9044 logic doesn't see them as user-defined symbols.
9045 (symbol_is_dummy): Check for both forms of the name.
9046 * src/reader.c (packgram): Remove the `$' from each midrule symbol
9047 name for which the midrule value is referenced in any action.
9048 * tests/actions.at (Default %printer and %destructor for mid-rule
9049 values): New test.
9050 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
9051 for change to dummy symbol names.
9052
519d0004
JD
90532006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
9054
9055 Warn about unset midrule $$ if the corresponding $n is used.
9056 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
9057 $n usage.
9058 (packgram): Before invoking grammar_rule_check on any rule, make sure
9059 all actions have already been scanned in order to set `used' flags.
9060 Otherwise, checking that a midrule's $$ is set will not always work
9061 properly because the midrule check must forward-reference the midrule's
9062 parent rule.
9063 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
9064 warning.
9065
a501eca9
JD
90662006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
9067
9068 More improvements to the documentation of the prologue alternatives:
9069 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
9070 Bison manual.
9071 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
9072 some text to clarify the relative importance of the new directives and
9073 to show how these directives may be viewed as code labels.
9074
2cbe6b7f
JD
90752006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
9076
9077 Similar to the recently removed %before-header, add %code-top as the
9078 alternative to the pre-prologue. Mentioned at
9079 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
9080 Also, let the prologue alternatives appear in the grammar section.
9081 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
9082 (prologue_declaration): Move the existing prologue alternatives to...
9083 (grammar_declaration): ... here and add %code-top.
9084 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
9085
9086 Clean up and extend documentation for the prologue alternatives.
9087 * NEWS (2.3a+): Describe prologue alternatives.
9088 * doc/bison.texinfo (Prologue): Move discussion of prologue
9089 alternatives to...
9090 (Prologue Alternatives): ... this new section, and extend it to discuss
9091 all 4 directives in detail.
148d66d8
JD
9092 (Table of Symbols): Clean up discussion of prologue alternatives and
9093 add %code-top.
2cbe6b7f 9094
e557d3ea
JMG
90952006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9096
9097 DJGPP specific issues.
9098
9099 * djgpp/config.bat: config.hin has been moved to lib. Adjust
9100 config.bat accordingly.
9101 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
9102 * djgpp/config.site: Likewise.
9103
136a0f76
PB
91042006-10-16 Paolo Bonzini <bonzini@gnu.org>
9105
27bd5d67
PB
9106 Replace %*-header with %provides, %requires, %code. See discussion at
9107 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
9108
136a0f76
PB
9109 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
9110 (b4_user_start_header): Remove.
9111 * data/glr.c: Use new macros instead of b4_*start_header
9112 and b4_*end_header.
9113 * data/glr.cc: Likewise.
9114 * data/lalr1.cc: Likewise.
9115 * data/push.c: Likewise.
9116 * data/yacc.c: Likewise.
9117
9118 * doc/bison.texinfo: Remove %before-header, rename
9119 %{start,end,after}-header to %requires, %provides, %code.
9120
9121 * src/parse-gram.y: Likewise (also rename token names accordingly).
9122 * src/scan-gram.l: Likewise.
9123 * tests/actions.at: Likewise.
9124
10f429ef
PE
91252006-10-14 Paul Eggert <eggert@cs.ucla.edu>
9126
9127 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
9128 Problem reported by Joel E. Denny.
9129
91302006-10-14 Jim Meyering <jim@meyering.net>
9131
9132 (Sync from coreutils.)
9133 Work also when the working directory (with e.g. coreutils sources)
9134 is version controlled with git, rather than CVS.
9135 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
9136 rather than CVS.
9137 In messages and comments, say e.g., "checked-out sources",
9138 rather than "CVS sources".
9139 (version_controlled_file): New function. Work for git as well as
9140 for CVS. Don't use grep's -q option.
9141 (slurp): Call it here, in place of CVS-specific code.
9142
c4bd5bf7
JD
91432006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
9144
9145 Fix testsuite for ./configure --enable-gcc-warnings:
9146 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
9147 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
9148 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
9149 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
9150 * test/regression.at (Diagnostic that expects two alternatives):
9151 Likewise.
9152
46356ea4
PE
91532006-10-12 Paul Eggert <eggert@cs.ucla.edu>
9154
231ed89a
PE
9155 * bootstrap.conf (gnulib_modules): Add config-h.
9156 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
9157 worry about HAVE_CONFIG_H.
9158 * lib/abitset.c: Likewise.
9159 * lib/bitset.c: Likewise.
9160 * lib/bitset_stats.c: Likewise.
9161 * lib/bitsetv-print.c: Likewise.
9162 * lib/bitsetv.c: Likewise.
9163 * lib/ebitset.c: Likewise.
9164 * lib/get-errno.c: Likewise.
9165 * lib/lbitset.c: Likewise.
9166 * lib/subpipe.c: Likewise.
9167 * lib/timevar.c: Likewise.
9168 * lib/vbitset.c: Likewise.
9169 * lib/bitset.c: Include "bitset.h" first, to test interface.
9170 * lib/bitset_stats.c: Include "bitset_stats.h" first.
9171 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
9172 * lib/bitsetv.c: Include "bitsetv.h" first.
9173 * lib/get-errno.c: Include "get-errno.h" first.
9174 * m4/.cvsignore: Add config-h.m4.
9175 * tests/actions.at (Default %printer and %destructor for ...):
9176 Adjust expected line numbers in output to reflect removal of #if
9177 HAVE_CONFIG_H lines.
9178 * tests/glr-regression.at (Missed %merge type warnings when ...):
9179 Likewise.
9180 * tests/regression.at (Braced code in declaration in rules section):
9181 Likewise.
9182 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
9183 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
9184 Include <config.h> unconditionally.
9185
46356ea4
PE
9186 * bootstrap: Sync from coreutils, as follows:
9187
9188 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
9189
9190 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
9191 variable was sometimes used without being initialized. This
9192 messed up the installation of the INSTALL file in some cases.
9193
9194 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
9195
9196 * bootstrap (usage, main program, symlink_to_gnulib): Add option
9197 --copy. Inspired by a suggestion from Bruno Haible.
9198
9199 2006-10-03 Jim Meyering <jim@meyering.net>
9200
9201 * bootstrap: Undo last change to this file, since now gnulib-tool
9202 sticks with the automake default in generating dependencies.
9203
dd4bf078
PE
92042006-10-12 Paul Eggert <eggert@cs.ucla.edu>
9205
cf2a5f7c
PE
9206 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
9207 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
9208
9209 * doc/bison.1: Add copyright notice.
9210
9211 * data/glr.c: Don't include <stdarg.h>; not used.
9212
35fe0834
PE
9213 * NEWS: The -g and --graph options now output graphs in Graphviz
9214 DOT format, not VCG format.
9215 * doc/bison.1: Likewise.
9216 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
9217 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
9218 of this change in
9219 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
9220 * TODO: Remove Graphviz entry.
9221 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
9222 remove vcg.c, vcg.h, vcg_defaults.h.
9223 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
9224 * src/graphviz.c, src/graphviz.h: New files.
9225 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
9226 * src/files.h: Make comment more generic.
9227 * src/main.c (main): Likewise.
9228 * src/print_graph.h: Likewise.
9229 * src/getargs.c (usage): Make usage description more generic.
9230 * src/print_graph.c: Include graphviz.h rather than vcg.h.
9231 (static_graph, fgraph): Remove. All uses changed to pass
9232 arguments instead of sharing a static var.
9233 (print_core, print_actions, print_state, print_graph):
9234 Output graphviz format rather than VCG format.
9235 * tests/.cvsignore: Remove *.vcg; add *.dot.
9236 * tests/output.at: Expect *.dot files, not *.vcg files.
9237
dd4bf078
PE
9238 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
9239 accommodates the 2006-10-08 change.
9240
efdd7421
PE
92412006-10-11 Bob Rossi <bob@brasko.net>
9242
9243 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
9244 (b4_yyssa, b4_yyerror_range): New macros.
9245 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
9246 (yypvarsinit): Remove init of removed fields.
9247 (yypushparse): Remove use of removed fields; use new macros instead.
9248
96a1981a
PE
92492006-10-11 Paul Eggert <eggert@cs.ucla.edu>
9250
9251 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
9252 in a push parser. Reindent slightly to match yacc.c better.
9253
92542006-10-11 Bob Rossi <bob@brasko.net>
9255
46356ea4
PE
9256 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
9257 yymsg_alloc fields.
9258 (yypvarsinit, yypushparse): Remove init of removed fields.
9259 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 9260
c1630a8b
PE
92612006-10-09 Paul Eggert <eggert@cs.ucla.edu>
9262
9263 * THANKS: Add Paolo Bonzini and Bob Rossi.
9264
90b9908d
PB
92652006-10-08 Paolo Bonzini <bonzini@gnu.org>
9266
9267 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
9268 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
9269 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
9270 b4_define_user_cde and uses): Remove.
9271 (b4_comment, b4_prefix, b4_sync_start): New.
9272 * data/bison.m4: New file, with most of the content removed from c.m4.
9273 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
9274 * src/output.c (output_skeleton): Pass bison.m4.
9275 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
9276 only if specified.
9277
cf806753
PE
92782006-10-05 Paul Eggert <eggert@cs.ucla.edu>
9279
9280 Fix test failure reported by Tom Lane in
9281 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
9282 and try to make such failures easier to catch in the future.
9283 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
9284 that's now the caller's responsibility.
9285 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
9286 Set yychar = YYEOF if it's negative.
9287 * tests/actions.at (yylex): Abort if asked to read past EOF.
9288 * tests/conflicts.at (yylex): Likewise.
9289 * tests/cxx-type.at (yylex): Likewise.
9290 * tests/glr-regression.at (yylex): Likewise.
9291 * tests/input.at (yylex): Likewise.
9292 * tests/regression.at (yylex): Likewise.
9293 * tests/torture.at (yylex): Likewise.
9294
0e2f006a
PE
92952006-10-01 Paul Eggert <eggert@cs.ucla.edu>
9296
9297 Fix problems with translating English-language diagnostics.
9298 * bootstrap: Fix bug introduced in recent bootstrap changes, with
9299 respect to bison-runtime pot generation. The YY_ stuff
9300 wasn't being captured.
9301 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
9302 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
9303 * runtime-po/POTFILES.in: Add data/push.c.
9304
e3ddc1e3
PE
93052006-09-29 Paul Eggert <eggert@cs.ucla.edu>
9306
9307 Merge bootstrap changes from coreutils.
9308
9309 2006-09-28 Jim Meyering <jim@meyering.net>
9310
9311 Automatically generated dependencies are important even
9312 when all of the sources in a directory come from gnulib.
9313 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
9314 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
9315
9316 2006-09-23 Jim Meyering <jim@meyering.net>
9317
9318 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
9319
9320 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9321
9322 * bootstrap: Add support for --force.
9323 (usage): New function. Describe usage less tersely.
9324 (CVS_only_file): New var.
9325
01e972b3
PE
93262006-09-21 Paul Eggert <eggert@cs.ucla.edu>
9327
9328 * data/push.c (YYPUSH_MORE): Make it an enum instead.
9329 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
9330 Adjust white space and comments to match GNU style better.
9331
c63d3e90
PE
93322006-09-20 Bob Rossi <bob@brasko.net>
9333
9334 * data/push.c (yyresult_get): Remove function.
9335 (YYPUSH_MORE): Add #define.
9336 (yypushparse): Modify return value.
9337
e70f46d1
PE
93382006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9339
9340 * stamp-h.in: Remove; no longer needed.
9341 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
9342 Remove config.h, config.hin, intl (no longer created).
9343 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
9344 stamp-h1.
9345
9346 Sync bootstrap from coreutils, as follows:
9347
9348 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
9349
9350 * bootstrap (symlink_to_gnulib): New function.
9351 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
9352 to copies-of-gnulib.
9353 (cp_mark_as_generated, slurp, gnulib_files):
9354 Avoid making a copy if it's the same as the old version.
9355 (gnulib_files): Add support for this variable (used by Bison).
9356
a92be413
PE
93572006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9358
9359 * src/getargs.c (usage): Rework to use conventions similar to
9360 coreutils, to make translation a bit easier and the code a bit
9361 smaller. Problem reported by Tim Van Holder.
9362
4f82b42a
PE
93632006-09-15 Paul Eggert <eggert@cs.ucla.edu>
9364
3b2942e6
PE
9365 Use some of gnulib's new modules, taken from coreutils.
9366
9367 * bootstrap: Sync from coreutils, except add support for gnulib_files.
9368 * bootstrap.conf: New file.
9369 (gnulib_modules): Add configmake, inttypes, unistd.
9370 (XGETTEXT_OPTIONS): Add complain, complain_at,
9371 fatal, fatal_at, warn, warn_at, unexpected_end.
9372 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
9373 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
9374 (gl_EARLY): Add.
9375 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
9376 (gl_INIT): Add
9377 (GNULIB_AUTOCONF_SNIPPET): Remove.
9378 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
9379 the pickiest.
9380 * lib/.cvsignore: Add inttypes_.h.
9381 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
9382 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
9383 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
9384 no-longer-necessary initializations.
9385 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
9386 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
9387 use the unistd module.
9388 * src/system.h: Likewise.
9389 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
9390 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
9391 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
9392 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
9393 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
9394 * src/system.h: Include inttypes.h unconditionally, now that we
9395 use the inttypes module. Don't bother to include stdint.h, since
9396 inttypes.h now does that for us.
9397 (LOCALEDIR): Remove, now that we use the configmake module.
9398 * src/getargs.c: Include configmake.h.
9399 * src/main.c: Likewise.
9400 * src/output.c: Likewise.
9401 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
9402 not from $abs_top_builddir, since config.h moved.
9403
9404
4f82b42a
PE
9405 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
9406 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
9407
9408 * src/parse-gram.y (symbol_declaration): Don't put statements
9409 before declarations; it's not portable to C89.
9410 * src/scan-code.l (handle_action_at): Likewise.
9411
9412 * src/scan-code.l: Always initialize braces_level; the old code
9413 left it uninitialized and therefore had undefined behavior.
9414
9415 Don't attempt to redefine 'assert', since it runs afoul of
9416 systems where standard headers (mistakenly) include <assert.h>.
9417 Instead, define and use our own alternative, called 'aver'.
9418 * src/reader.c: Don't include assert.h, since we no longer
9419 use assert.
9420 * src/scan-code.l: Likewise.
9421 * src/system.h (assert): Remove, replacing with....
9422 (aver): New function, taking a bool arg. All uses changed.
9423 * src/tables.c (pack_vector): Ensure that aver arg is bool,
9424 not merely an integer.
9425
31c10e38
PE
94262006-09-15 Bob Rossi <bob@brasko.net>
9427
d6bdb90a
JD
9428 Add support for push parsing. Based on the original work of
9429 Odd Arild Olsen <oao@fibula.no>.
31c10e38
PE
9430 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
9431 * data/c.m4 (YYPUSH): New.
9432 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
d6bdb90a 9433 * data/push.c: New file.
31c10e38
PE
9434 * src/getargs.c (push_parser): New var.
9435 * src/getargs.h (push_parser): New declaration.
9436 * src/output.c (prepare): Add macro insertion of `push_flag'.
9437 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
9438 (prologue_declaration): Parse %push-parser.
9439 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
9440 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
9441 list of removed lines from the traces observed.
9442 (AT_CHECK_CALC_LALR): Added push parser tests.
9443
fa7b79c0
PE
94442006-09-13 Paul Eggert <eggert@cs.ucla.edu>
9445
21fe08ca
PE
9446 * NEWS: Version 2.3a.
9447 * configure.ac (AC_INIT): Likewise.
9448
e8ec4d9b
PE
9449 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
9450 "#define YYSTYPE int" that caused "make maintainer-check" to fail
9451 due to header ordering dependencies. I don't know why the #define
9452 was there.
9453
fa7b79c0
PE
9454 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
9455 runtime cost when YYDEBUG is not defined, and so that some tests
9456 that used to fail now work. Problem and initial suggestion by
9457 Paolo Bonzini.
9458 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
9459 * data/glr.cc (b4_parser_class_name):
9460 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
9461 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
9462 (yydebug_) [YYDEBUG]: New member.
9463 (yycdebug_): Now defined only if YYDEBUG.
9464 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
9465 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
9466 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
9467 if YYYDEBUG.
9468 (debug_stream, set_debug_stream, debug_level, set_debug_level):
9469 Define only if YYDEBUG.
9470 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
9471 set_debug_level.
9472 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
9473 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
9474 AT_CHECK_CALC_GLR_CC that are working now.
9475
4ec13d60
PE
94762006-09-12 Paul Eggert <eggert@cs.ucla.edu>
9477
9478 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
9479 We don't need them in glr.cc, and glr.c defines them.
9480 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
9481 assumes that defining it to anything is the same as defining
9482 it to 1. Problem reported by Paolo Bonzini.
9483
8e1687ae
PE
94842006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
9485
9486 * data/c.m4 (b4_null, b4_case): Define.
9487 * src/output.c (prepare_symbols): Use b4_null.
9488 (user_actions_output): Use b4_case.
9489
3dc5e96b
PE
94902006-09-11 Paul Eggert <eggert@cs.ucla.edu>
9491
aef3da86
PE
9492 * data/glr.c (b4_shared_declarations): Put start-header first,
9493 before any #includes that we generate, so that feature-test
9494 macros work. Problem reported by Michael Deutschmann in
9495 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
9496 * data/lalr1.cc: Likewise.
9497 * doc/bison.texinfo (Prologue): Document that feature-test macros
9498 should be defined before any Bison declarations.
9499 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
9500 that depend on location.hh after, not before, Bison decls, since
9501 we now include location.hh after the first user prologue.
9502
3dc5e96b
PE
9503 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
9504 Sander Brandenburg in
9505 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
9506 Also, fix minor white space and comment issues.
aef3da86
PE
9507 (Prologue): Mention that it's better to define feature-test macros
9508 before Bison declarations. Problem reported by Michael Deutschmann.
9509
9510 * README-cvs: Fix typo: "&" should be "&&". Problem reported
9511 by Jim Meyering.
9512 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
9513 This adjusts to recent gnulib changes.
3dc5e96b 9514
b2a0b7ca
JD
95152006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9516
9517 Finish implementation of per-type %destructor/%printer. Discussed
9518 starting at
9519 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
9520 and
9521 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
9522 * NEWS (2.3+): Add a description of this feature to the default
9523 %destructor/%printer description.
9524 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
9525 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
9526 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
9527 list node contains a semantic type.
9528 * src/symtab.c, src/symtab.h: Extend with a table that associates
9529 semantic types with their %destructor's and %printer's.
9530 (semantic_type_from_uniqstr, semantic_type_get,
9531 semantic_type_destructor_set, semantic_type_printer_set): New functions
9532 composing the public interface of that table.
9533 (symbol_destructor_get, symbol_destructor_location_get,
9534 symbol_printer_get, symbol_printer_location_get): If there's no
9535 per-symbol %destructor/%printer, look up the per-type before trying
9536 the default.
9537 * tests/actions.at (Per-type %printer and %destructor): New test case.
9538 * tests/input.at (Default %printer and %destructor redeclared):
9539 Extend to check that multiple occurrences of %symbol-default in a
9540 single %destructor/%printer declaration is an error.
9541 (Per-type %printer and %destructor redeclared, Unused values with
9542 per-type %destructor): New test cases.
9543
3be03b13
JD
95442006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9545
9546 Require default %destructor/%printer to be declared using
9547 %symbol-default instead of an empty symbol list, and start working on
9548 new per-type %destructor/%printer. Discussed at
9549 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
9550 * NEWS (2.3+): Add %symbol-default to example.
9551 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 9552 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
9553 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
9554 (generic_symlist, generic_symlist_item): New nonterminals for creating
9555 a list in which each item is a symbol, semantic type, or
9556 %symbol-default.
9557 (grammar_declaration): Use generic_symlist in %destructor and %printer
9558 declarations instead of symbols.1 or an empty list.
9559 (symbol_declaration, precedence_declaration, symbols.1): Update actions
9560 for changes to symbol_list.
9561 * src/reader.c: Update for changes to symbol_list.
9562 * src/scan-code.l: Likewise.
9563 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
9564 * src/symlist.c, src/symlist.h: Extend such that a list node may
9565 represent a semantic type or a %symbol-default in addition to just an
9566 ordinary symbol. Add switched functions for setting %destructor's and
9567 %printer's.
9568 * tests/actions.at, tests/input.at: Add %symbol-default to all default
9569 %destructor/%printer declarations.
9570
3508ce36
JD
95712006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
9572
9573 Whether the default %destructor/%printer applies to a particular symbol
9574 isn't a question of whether the user *declares* that symbol (in %token,
9575 for example). It's a question of whether the user by any means
9576 *defines* the symbol at all (by simply using a char token, for
9577 example). $end is defined by Bison whereas any other token with token
9578 number 0 is defined by the user. The error token is always defined by
9579 Bison regardless of whether the user declares it with %token, but we
9580 may one day let the user define error as a nonterminal instead.
9581 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
9582 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
9583 the meaning of "user-defined".
9584 * tests/actions.at (Default %printer and %destructor for user-declared
9585 end token): Rename to...
9586 (Default %printer and %destructor for user-defined end token): ...
9587 this.
9588
9589 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
9590 computation of whether to apply the default, don't maintain a list of
9591 every Bison-defined symbol. Instead, just check for a first character
9592 of '$', which a user symbol cannot have, and check for the error token.
9593
9350499c
JD
95942006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
9595
9596 Don't apply the default %destructor or %printer to the error token,
9597 $undefined, or $accept. This change fits the general rule that the
9598 default %destructor and %printer are only for user-declared symbols,
9599 and it solves several difficulties that are described in the new test
9600 cases listed below.
9601 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
9602 * tests/actions.at (Default %printer and %destructor are not for error
9603 or $undefined, Default %printer and %destructor are not for $accept):
9604 New test cases.
9605
4d7370cb
JD
96062006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
9607
9608 Allow %start after the first rule.
9609 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
9610 when parsing the first rule.
9611 (check_and_convert_grammar): Search for it here after all grammar
9612 declarations have been parsed. Skip midrules, which have dummy LHS
9613 nonterminals.
9614 * src/symtab.c (symbol_is_dummy): New function.
9615 * src/symtab.h (symbol_is_dummy): Declare it.
9616 * tests/input.at (%start after first rule): New test.
9617
6d0ef4ec
JD
96182006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9619
9620 Redo some of the previous commit: add back the ability to use
9621 non-aliased/undeclared string literals since it might be useful to
9622 those declaring %token-table.
9623 * src/reader.c (check_and_convert_grammar): Undo changes in previous
9624 commit: don't worry about complaints from symbols_pack.
9625 * src/symtab.c (symbol_new, symbol_class_set,
9626 symbol_check_alias_consistency): Undo changes in previous commit: count
9627 each string literal as a new symbol and token, assign it a symbol
9628 number, and don't complain about non-aliased string literals.
9629 (symbols_pack): Since symbol_make_alias still does not decrement symbol
9630 and token counts but does still set aliased tokens to the same number,
9631 symbol_pack_processor now leaves empty slots in the symbols array.
9632 Remove those slots.
9633 * tests/regression.at (Undeclared string literal): Remove test case
9634 added in previous commit since non-aliased string literals are allowed
9635 again.
9636 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
9637 remove unnecessary string literal declarations.
9638 * tests/sets.at (Firsts): Likewise.
9639
965537bc
JD
96402006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9641
9642 Don't allow an undeclared string literal, but allow a string literal to
9643 be used before its declaration.
9644 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
9645 symbols_pack complained.
9646 * src/symtab.c (symbol_new): Don't count a string literal as a new
9647 symbol.
9648 (symbol_class_set): Don't count a string literal as a new token, and
9649 don't assign it a symbol number since symbol_make_alias does that.
9650 (symbol_make_alias): It's not necessary to decrement the symbol and
9651 token counts anymore. Don't assume that an alias declaration occurs
9652 before any uses of the identifier or string, and thus don't assert that
9653 one of them has the highest symbol number so far.
9654 (symbol_check_alias_consistency): Complain if there's a string literal
9655 that wasn't declared as an alias.
9656 (symbols_pack): Bail if symbol_check_alias_consistency failed since
9657 symbol_pack asserts that every token has been assigned a symbol number
9658 although undeclared string literals have not.
9659 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 9660 string literal): New test cases.
965537bc
JD
9661 (Characters Escapes, Web2c Actions): Declare string literals as
9662 aliases.
9663 * tests/sets.at (Firsts): Likewise.
9664
47aee066
JD
96652006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
9666
9667 In the grammar scanner, STRING_FINISH unclosed constructs and return
9668 them to the parser in order to improve error messages.
9669 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
9670 SC_BRACED_CODE, SC_PROLOGUE): Implement.
9671 * tests/input.at (Unclosed constructs): New test case.
9672 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
9673 seen.
9674
9675 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
9676 unused global.
9677
1f6b3679
JD
96782006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
9679
9680 Handle string aliases for character tokens correctly.
9681 * src/symtab.c (symbol_user_token_number_set): If the token has an
9682 alias, check and set its alias's user token number instead of its own,
9683 which is set to indicate the alias. Previously, every occurrence of
9684 the character token in the grammar overwrote that alias indicator with
9685 the character code.
9686 * tests/input.at (String aliases for character tokens): New test.
9687
219741d8
JD
96882006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
9689
9690 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
9691
11daa4e7
PE
96922006-08-11 Paul Eggert <eggert@cs.ucla.edu>
9693
9694 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
9695 to prevent failures when building on older platforms.
9696 Check for autopoint failure.
9697 Set XGETTEXT_OPTIONS to values that check for C format strings,
9698 so that translators are warned about them (this also helps
9699 prevent core dumps).
9700
9701 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
9702 function, since it simplifies our code a bit.
9703
9704 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
9705 rather than -W, so we don't get bogus warnings about sign comparisons.
9706 Add -Wpointer-arith, since that warning is useful (it reports code
9707 that does not conform to C89 and that some compilers reject).
9708 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
9709 since it's no longer needed.
9710
f9bfc42a
JD
97112006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
9712
9713 Clean up scanners a bit.
9714 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
9715 definitions so gcc won't warn when obstack_for_string is unused.
9716 * src/scan-code.l: config.h and system.h are already #include'd by
9717 scan-code-c.c, so get rid of them here.
9718 * src/scan-gram.l: Likewise.
9719 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
9720 definitions rather than duplicating the rest of it.
9721 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
9722
06e8700a
JD
97232006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
9724
9725 Suppress signed/unsigned comparison warnings for yycheck.
9726 * data/c.m4 (b4_safest_int_type): New macro.
9727 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
9728 a signed int type, cast it to b4_safest_int_type first.
9729 * data/yacc.c: Likewise.
9730 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
9731 also overwritten.
9732
9c437126
PE
97332006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
9734
9735 * doc/bison.texinfo: Fix some typos.
9736
284d8a13
PE
97372006-08-02 Paul Eggert <eggert@cs.ucla.edu>
9738
9739 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
9740 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
9741
9742 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
9743 the latest gnulib does this a different way.
9744 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
9745 translation was patched, so stop omitting it.
9746
ec5479ce
JD
97472006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9748
9749 Enable declaration of default %printer/%destructor. Make the parser
9750 use these for all user-declared grammar symbols for which the user does
9751 not declare a specific %printer/%destructor. Thus, the parser uses it
9752 for token 0 if the user declares it but not if Bison generates it as
9753 $end. Discussed starting at
9754 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
9755 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
9756 and
9757 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
9758 * NEWS (2.3+): Mention.
9759 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
9760 declare a %destructor for a mid-rule's semantic value. It's just
9761 impossible to declare one specific to it.
9762 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
9763 code. Describe default %destructor form.
9764 * src/parse-gram.y (grammar_declaration): Parse default
9765 %printer/%destructor declarations.
9766 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
9767 and symbol_destructor_location_get rather than accessing the destructor
9768 and destructor_location members of struct symbol.
9769 (symbol_printers_output): Likewise but for %printer's.
9770 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
9771 again.
9772 * src/symtab.c (default_destructor, default_destructor_location,
9773 default_printer, default_printer_location): New static global
9774 variables to record the default %destructor and %printer.
9775 (symbol_destructor_get, symbol_destructor_location_get,
9776 symbol_printer_get, symbol_printer_location_get): New functions to
9777 compute the appropriate %destructor and %printer for a symbol.
9778 (default_destructor_set, default_printer_set): New functions to set the
9779 default %destructor and %printer.
9780 * src/symtab.h: Prototype all those new functions.
9781 * tests/actions.at (Default %printer and %destructor): New test to
9782 check that the right %printer and %destructor are called, that they're
9783 not called for $end, and that $$ and @$ work correctly.
9784 (Default %printer and %destructor for user-declared end token): New
9785 test to check that the default %printer and %destructor are called for
9786 a user-declared end token.
9787 * tests/input.at (Default %printer and %destructor redeclared, Unused
9788 values with default %destructor): New tests to check related grammar
9789 warnings and errors.
9790
868d2d96
JD
97912006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9792
9793 Clean up handling of %destructor for the end token (token 0).
9794 Discussed starting at
9795 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
9796 and
9797 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
9798
9799 Make the skeletons consistent in how they pop the end token and invoke
9800 its %destructor.
9801 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
9802 state, which has token number 0, since this would invoke the
9803 %destructor for the end token.
9804 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
9805 until after shifting the end token, or else it won't be popped.
9806 * data/yacc.c (yyparse): Likewise.
9807
9808 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
9809 it's the end token. Upon termination, destroy an unshifted lookahead
9810 even when it's the end token.
9811 * data/lalr1.cc (yy::parser::parse): Likewise.
9812 * data/yacc.c (yyparse): Likewise.
9813
9814 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
9815 value warnings for the end token when the user gives the end token a
9816 %destructor.
9817
9818 * tests/actions.at (Printers and Destructors): Test all the above.
9819
62a9592d
PE
98202006-07-24 Paul Eggert <eggert@cs.ucla.edu>
9821
9822 Update to latest gnulib and gettext versions.
9823 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
9824 Add fopen-safer.
9825 (gnulib_files): Add m4/warning.m4. Don't worry about files
9826 overwritten by autopoint.
9827 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
9828 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
9829 rejects them.
9830 Don't use autoreconf; instead, invoke autopoint etc. by hand,
9831 so that we can remove the intl files at a better time.
9832 (intl_files_to_remove): Remove aclocal.m4, since it gets
9833 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
9834 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
9835 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
9836 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
9837 Remove datarootdir hack; no longer needed.
9838 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
9839 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
9840 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
9841 strdup.h.
9842 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
9843 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
9844
10d6970f
PE
98452006-07-20 Paul Eggert <eggert@cs.ucla.edu>
9846
9847 * bootstrap: Adjust to today's change to gnulib-tool by invoking
9848 it with --assume-autoconf='latest-stable'.
9849
50a33993
JD
98502006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
9851
9852 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
9853 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
9854 YYSTYPE' and `{'.
9855 * src/muscle_tab.h (muscle_grow): Replace the header comments with
9856 those from muscle_tab.c since the old ones are misleading.
9857
2ce4ed68
AD
98582006-07-13 Akim Demaille <akim@epita.fr>
9859
9860 Support %define "KEY" {VALUE}.
9861 * src/scan-code.h, src/scan-code.l (translate_action)
9862 (translate_rule_action, translate_symbol_action, translate_code):
9863 Return char *, not const char *.
9864 * src/parse-gram.y (declaration): Rename as...
9865 (prologue_declaration): this.
9866 (string_content): Remove this nonterminal, use STRING.
9867 (braceless, content, content.opt): New nonterminal.
9868 Use them.
9869 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
9870 as value.
9871 * src/scan-gram.l (getargs.h): Don't include it.
9872
db7e5eb5
PE
98732006-07-12 Paul Eggert <eggert@cs.ucla.edu>
9874
9875 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
9876 rather than a for-loop that declares a local bool variable. This
9877 should work around a compatibility problem with a Cray x1e C++
9878 compiler reported by Hung Nguyen in
9879 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
9880 The for-loop was introduced in the 2004-11-17 change but I don't
9881 know why it was needed.
9882
a5d80ba5
AD
98832006-07-12 Akim Demaille <akim@epita.fr>
9884
9885 * data/c.m4: Comment changes.
9886
23eb2a69
AD
98872006-07-10 Akim Demaille <akim@lrde.epita.fr>
9888
9889 * src/complain.c (error_message, ERROR_MESSAGE): New.
9890 To factor...
9891 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
9892 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
9893
ddc8ede1
PE
98942006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9895
9896 * NEWS: Instead of %union, you can define and use your own union type
9897 YYSTYPE if your grammar contains at least one <type> tag.
9898 Your YYSTYPE need not be a macro; it can be a typedef.
9899 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
9900 (Union Decl, Decl Summary): Document this.
9901 * data/glr.c (YYSTYPE): Implement this.
9902 * data/glr.cc (YYSTYPE): Likewise.
9903 * data/lalr1.cc (YYSTYPE): Likewise.
9904 * data/yacc.c (YYSTYPE): Likewise.
9905 * src/output.c (prepare): Output tag_seen_flag.
9906 * src/parse-gram.y (declaration, grammar_declaration):
9907 Use 'union_seen' rather than 'typed' to determine whether
9908 %union has been seen, since grammars can now be typed without
9909 %union.
9910 (symbol_declaration, type.opt, symbol_def):
9911 Keep track of whether a tag has been seen.
9912 * src/reader.c (union_seen, tag_seen): New vars.
9913 (typed): remove.
9914 * src/reader.h (union_seen, tag_seen, typed): Likewise.
9915 * src/scan-code.l (untyped_var_seen): New variable.
9916 (handle_action_dollar): Adjust to above changes.
9917 (handle_action_dollar, handle_action_at):
9918 Improve overflow checking for outlandish numbers.
9919 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
9920 avoid new diagnostics generated by above changes.
9921 * tests/regression.at (YYSTYPE typedef): Add test to check
9922 for type tags without %union.
9923
9924 * src/symlist.c (symbol_list_length): Return int, not unsigned
9925 int, since callers expect int. This may need to get revisited
9926 once we have proper integer overflow checking.
9927
9928 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
9929 object is now static.
9930
9931 * src/getargs.c (flags_argmatch): Return void, not int,
9932 to pacify ./configure --enable-gcc-warnings.
9933
9934 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
9935 since last_string is already defined to FLEX_PREFIX (last_string).
9936
7b42569e
AD
99372006-07-09 Akim Demaille <akim@lrde.epita.fr>
9938
9939 Implement --warnings/-W.
9940 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
9941 replaced by...
9942 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
9943 Adjust callers.
9944 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
9945 (warnings_args, warnings_types): New.
9946 (getargs, short_options, long_options): Accept -W/--warnings.
9947 Sort the options by alphabetical order, upper case letter right
9948 before its lower case.
9949
3b452f4e
JD
99502006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
9951
9952 Change %merge result type clash warnings to errors. Discussed at
9953 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
9954 * src/reader.c (record_merge_function_type): Use complain_at.
9955 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9956 declared later): Update test case results.
9957
b8a41559
AD
99582006-07-09 Akim Demaille <akim@lrde.epita.fr>
9959
9960 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
9961 to be in alphabetical order.
9962 (trace_args): Spelling fixes.
9963
cd9e1ba2
PE
99642006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9965
9966 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
9967 so they don't collide with user-defined macros.
9968 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
9969 this was never guaranteed, and now that we're using gnulib stdint,
9970 which defines int_fast16_t to long int, the problem is exposed.
9971
cb48f191
PE
99722006-07-08 Paul Eggert <eggert@cs.ucla.edu>
9973
b8445a15
PE
9974 * data/c.m4 (b4_basename): Simplify a bit, since we don't
9975 need the full POSIX semantics (and weren't implementing them
9976 anyway).
9977
cb48f191
PE
9978 Adjust to Autoconf 2.60 and today's gnulib.
9979 * bootstrap (gnulib_modules): Add stdint.
9980 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
9981 no longer copies it.
9982 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
9983 since stdint needs the former and wcwidth (which is now required
9984 by mbswidth) needs the latter.
9985 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
9986 work around a compatibility glitch between gettext 0.14.6 and
9987 Autoconf 2.60.
9988 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
9989 Do not check for uintptr_t, since new stdint module does the right
9990 thing.
9991 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
9992 Add stdint.h, stdint_.h, wcwidth.h.
9993 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
9994 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
9995 stdint.m4, wchar_t.m4, wcwidth.m4.
9996 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
9997 usual order for ../lib/*.h files.
9998 (file_name_split): Use last_component, not base_name, to adjust
9999 to gnulib changes.
10000 * src/parse-gram.h: Include <strverscmp.h> in the usual order
10001 for ../lib/*.h files.
10002 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
10003 Define unconditionally, since we now assume the stdint module.
10004 * src/scan-skel.l: Include <dirname.h>.
10005 (BASE_QPUTS): Use last_component, not base_name.
10006 * src/system.h: Include <unlocked-io.h> in the usual order
10007 for ../lib/*.h files. Include <stdint.h> unconditionally,
10008 since we now use the stdint module.
10009 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
10010 HAVE_UINTPTR_T, since we now use the stdint module.
10011 (base_name): Remove decl, since files now include <dirname.h>
10012 to get the decl.
10013
cd48d21d
AD
100142006-07-08 Akim Demaille <akim@lrde.epita.fr>
10015
10016 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
10017 New, default to 1.
10018 * data/yacc.c, data/glr.c, data/location.cc: Use them.
10019 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
10020 default.
10021 * tests/calc.at: Adjust.
10022
8ec0a172
AD
100232006-07-08 Akim Demaille <akim@lrde.epita.fr>
10024
b8445a15 10025 * data/c.m4 (b4_basename): New.
8ec0a172
AD
10026 (b4_syncline): Also output the location of its invocation (from
10027 the skeleton).
10028 (b4_user_action, b4_define_user_action, b4_user_actions)
10029 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
10030 (b4_user_stype): New.
10031 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
10032
4a678af8
JD
100332006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
10034
10035 In the grammar file, the first column is 1 not 0 on the first line as
10036 on every other line.
10037 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
10038 * tests/input.at (Torturing the Scanner): Update output.
10039
10040 * src/scan-gram.l (scanner_cursor): Declare it static.
10041
dd60572a
JD
100422006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
10043
10044 In warnings, say "previous declaration" rather than "first
10045 declaration".
10046 * src/symtab.c (redeclaration): Do that here.
10047 * src/reader.c (record_merge_function_type): In the case of a result
10048 type clash, report the previous declaration rather than the very first
10049 one in the grammar file.
10050 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
10051 declared later): Add a third declaration to check this behavior.
10052 * tests/input.at (Incompatible Aliases): Update output.
10053
2073e1b6
AD
100542006-06-27 Akim Demaille <akim@epita.fr>
10055
10056 * doc/Doxyfile.in: New.
10057 * doc/Makefile.am: Use it.
10058 * src/lalr.h, src/symtab.h: Initial doxygenation.
10059
8ee5b538
JD
100602006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
10061
10062 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
10063 declared after the %merge. This continues the effort of the previous
10064 patch.
8ee5b538
JD
10065 * src/reader.c (get_merge_function): Don't set the merger type yet.
10066 (record_merge_function_type): New function for setting the merger type
10067 and checking for clashes.
10068 (grammar_current_rule_merge_set): Set the location of the %merge for
10069 the current rule.
10070 (packgram): Invoke record_merge_function_type for each rule now that
10071 all symbol type declarations have been parsed.
10072 * src/reader.h (merger_list.type_declaration_location): New member
10073 storing the location of the first %merge from which the type for this
10074 merging function was derived.
10075 * src/symlist.h (symbol_list.merger_declaration_location): New member
10076 storing the location of a rule's %merge, if any.
10077 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
10078 declared later): New test to catch the error fixed by the above patch.
10079
ffa4ba3a
JD
100802006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
10081
10082 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
10083 declarations appear after the rules. Discussed at
10084 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
10085 and
10086 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
10087 Don't mistake the type of $$ in a midrule to be that of its parent
10088 rule's $$.
ffa4ba3a
JD
10089 * src/reader.c (grammar_current_rule_end): Don't invoke
10090 grammar_rule_check yet since not all symbol declarations may have been
10091 parsed yet.
10092 (grammar_midrule_action): Likewise.
10093 Don't record whether the midrule's $$ has been used yet since actions
10094 haven't been translated yet.
10095 Record the midrule's parent rule and its RHS index within the parent
10096 rule.
10097 (grammar_current_rule_action_append): Don't translate the action yet
10098 since not all symbol declarations may have been parsed yet and, thus,
10099 warnings about types for $$, $n, @$, and @n can't be reported yet.
10100 (packgram): Translate the action and invoke grammar_rule_check now that
10101 all symbol declarations have been parsed.
10102 * src/scan-code.l (handle_action_dollar): Now that this is invoked
10103 after parsing the entire grammar file, the symbol list here in the case
10104 of a midrule is actually the midrule's empty RHS, so reference its
10105 parent rule's RHS where necessary.
10106 On the other hand, now that you can already know it's a midrule, you
10107 aren't forced to think $$ has the same type as its parent rule's $$.
10108 (handle_action_at): In the case of a midrule, reference the parent rule
10109 where necessary.
10110 * src/symlist.c (symbol_list_new): Initialize new midrule-related
10111 members.
10112 (symbol_list_length): Now that this is invoked after all rules have
10113 been parsed, a NULL symbol (rather than a NULL symbol list node)
10114 terminates a rule. symbol_list_print already does this correctly.
10115 * src/symlist.h (symbol_list.midrule_parent_rule,
10116 symbol_list.midrule_parent_rhs_index): New members so that midrules can
10117 remember their relationships with their parents.
10118 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
10119 fixed by the above patch.
10120 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
10121 implementing...
10122 (Unused values): ... this old test case and...
10123 (Unused values before symbol declarations): ... this new test case.
10124 This one is the same as `Unused values' except that all symbol
10125 declarations appear after the rules in order to catch the rest of the
10126 errors fixed by the above patch.
10127
e256e17f
JD
101282006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
10129
300a1930
JD
10130 More cleanup.
10131 * src/reader.c (current_rule): Declare it static since it's no longer
10132 used outside this file.
10133 (grammar_current_rule_action_append): Remove redundant arguments from
10134 translate_rule_action invocation.
10135 * src/reader.h (current_rule): Remove this unused extern.
10136 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
10137 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 10138
381ecb06
JD
101392006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
10140
10141 Clean up yesterday's patch.
10142 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
10143 to...
10144 * src/reader.c (grammar_current_rule_action_append): ... here for
10145 consistency with grammar_current_rule_symbol_append.
10146 * tests/regression.at (Braced code in declaration in rules section):
10147 Make yyerror and yylex static as usual.
10148
4210cd0b
JD
101492006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
10150
10151 Fix bug that mistakes braced code in a declaration in the rules section
10152 to be a rule action. Mentioned at
10153 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
10154 * src/scan-gram.l: Move midrule action detection from the start of the
10155 scanning of any braced code to...
10156 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
10157 action. For readability, use $2 and @2 rather than the equivalent
10158 global variables.
10159 * tests/regression.at (Braced code in declaration in rules section):
10160 New test to catch the error fixed by the above patch.
10161
10162 Work on code readability some.
10163 * src/scan-code.l (current_rule): Get rid of this misleading and
10164 redundant declaration: it's actually extern'ed in reader.h.
10165 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
10166 translate_action): Add a rule argument and use it instead of the global
10167 current_rule.
10168 (translate_rule_action): This already receives current_rule through an
10169 argument, so pass it on to translate_action instead of assigning
10170 current_rule to current_rule.
10171 (translate_symbol_action, translate_code): Pass rule = NULL to
10172 translate_action.
10173
34f98f46
JD
101742006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
10175
10176 Rename %before-definitions to %start-header and %after-definitions to
10177 %end-header. Don't use these declarations to separate pre-prologue
10178 blocks from post-prologue blocks. Add new order-independent
10179 declarations %before-header and %after-header as alternatives to the
10180 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
10181 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
10182 * NEWS (2.3+): Update for these changes.
10183 * data/glr.c (b4_before_definitions): Update to...
10184 (b4_start_header): ... this.
10185 (b4_after_definitions): Update to...
10186 (b4_end_header): ... this.
10187 * data/glr.cc: Likewise.
10188 * data/lalr1.cc: Likewise.
10189 * data/yacc.c: Likewise.
10190 * doc/bison.texinfo (The prologue): Update names, and replace remaining
10191 prologue blocks with %*-header declarations.
10192 (Calc++ Parser): Likewise.
91661ebb 10193 (Decl Summary): Update names.
148d66d8 10194 (Table of Symbols): Update description.
34f98f46
JD
10195 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
10196 (PERCENT_END_HEADER): ... this.
10197 (PERCENT_BEFORE_DEFINITIONS): Update to...
10198 (PERCENT_START_HEADER): ... this.
10199 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
10200 (declaration): Update token names and m4 macro names.
10201 When parsing %end-header and %start-header, invoke translate_code
10202 before muscle_code_grow, and no longer set global booleans to remember
10203 whether these declarations have been seen.
10204 Parse new %after-header and %before-header.
10205 * src/reader.c (before_definitions, after_definitions): Remove.
10206 (prologue_augment): Accept a new bool argument to specify whether to
10207 augment the pre-prologue or post-prologue.
10208 * src/reader.h (before_definitions, after_definitions): Remove these
10209 extern's.
10210 (prologue_augment): Add new bool argument.
10211 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
10212 (PERCENT_END_HEADER): ... this.
10213 (PERCENT_BEFORE_DEFINITIONS): Update to...
10214 (PERCENT_START_HEADER): ... this.
10215 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
10216 * tests/actions.at (Printers and Destructors): Update names.
10217
31b2b07e
JD
102182006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
10219
10220 Add comparison operators for C++ location classes. Discussed at
10221 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
10222 * data/c++.m4 (b4_define_location_comparison): New boolean %define
10223 declaration indicating whether filename_type has an operator==. If
10224 filename_type is `std::string', it defaults to `1', `0' otherwise.
10225 * data/location.cc: Iff b4_define_location_comparison is `1', add
10226 operator== and operator!= for class position and for class location.
10227
10228 Some minor fixes.
10229 * src/scan-action.l: Remove unused file.
10230 * src/symtab.c (symbol_printer_set): Use printer_location not
10231 destructor_location.
10232 * src/symtab.h (struct symbol): Replace incorrect source comment for
10233 printer members.
10234 * tests/input.at (Incompatible Aliases): Update output with correct
10235 printer location.
10236
9bc0dd67
JD
102372006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
10238
10239 Don't put the pre-prologue in the header file. For the yacc.c code
10240 file and the glr.c header and code files, move the pre-prologue before
10241 the token definitions. Add new %before-definitions and
10242 %after-definitions to declare code that will go in both the header file
10243 and code file. Discussed at
10244 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
10245 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
10246 and
10247 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
10248 * NEWS (2.3+): Describe these changes.
10249 * data/glr.c (b4_pre_prologue): Move from within to before...
10250 (b4_shared_declarations): ... this.
10251 Add new b4_before_definitions before b4_token_enums.
10252 Add new b4_after_definitions at the end.
10253 * data/glr.cc (b4_pre_prologue): Replace with...
10254 (b4_before_definitions): ... this in the header file.
10255 (b4_after_definitions): New near the end of the header file.
10256 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
10257 code file right before including the header file.
10258 (b4_before_definitions): New in the previous position of
10259 b4_pre_prologue in the header file.
10260 (b4_after_definitions): New near the end of the header file.
10261 * data/yacc.c: Clean up some m4 quoting especially in the header file.
10262 (b4_token_enums_defines): In the code file, move to right before
10263 YYSTYPE for consistency with the header file.
10264 (b4_before_definitions): New right before b4_token_enums_defines in
10265 both the header and code file.
10266 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
10267 header and code file.
10268 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
10269 of prologues for %union dependencies.
91661ebb
JD
10270 (Decl Summary): In %defines description, mention the effect of
10271 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
10272 (Calc++ Parser): Forward declare driver in a %before-definitions rather
10273 than in the pre-prologue so that make check succeeds.
148d66d8 10274 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
10275 %after-definitions.
10276 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
10277 %before-definitions.
10278 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
10279 (declaration): Parse those declarations and append to
10280 b4_before_definitions and b4_after_definitions, respectively.
10281 * src/reader.c (before_definitions, after_definitions): New bools to
10282 track whether those declarations have been seen.
10283 (prologue_augment): Add to the post-prologue if %union,
10284 %before-definitions, or %after-definitions has been seen.
10285 * src/reader.h (before_definitions, after_definitions): New extern's.
10286 * src/scan-gram.l: Scan the new declarations.
10287 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
10288 prologue block in a %before-definitions or a %after-definitions based
10289 on whether the %union is declared.
10290 * tests/regression.at (Early token definitions with --yacc, Early token
10291 definitions without --yacc): Move tests for token definitions into the
10292 post-prologue since token names are no longer defined in the
10293 pre-prologue.
10294
203b9274
AD
102952006-06-20 Akim Demaille <akim@epita.fr>
10296
10297 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
10298 (symbol_get): Use it.
10299 * src/parse-gram.y: Use it.
10300
a7ee59cf
JD
103012006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
10302
10303 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
10304 build succeeds when configured with --enable-gcc-warnings.
10305
5a2baae7
PE
103062006-06-19 Paul Eggert <eggert@cs.ucla.edu>
10307
33ad1a9c
PE
10308 * src/parse-gram.y (char_name): New function.
10309 (CHAR, STRING, string_content): For %printer, properly escape.
10310 (ID): Prefer fputs to fprintf.
10311 (id): Reindent to be consistent with other rules.
10312 Properly quote char.
10313
5a2baae7
PE
10314 The Translation Project changed its way of publishing translations
10315 to maintainers. I haven't received any responses to my request
10316 for supporting the old way, or for documenting the new way. I
10317 have modified 'bootstrap' to use screen scraping
10318 (in this case, HTML scraping). This is unreliable and inelegant,
10319 but I don't see any better way. Yuck.
10320 * bootstrap (TP_URL, WGET_COMMAND): New vars.
10321 (get_translations): New function, which uses HTML scraping to
10322 deduce locations of latest translations.
10323 Use this function to grab both bison and bison-runtime .po files.
10324 Don't bother priming the pump for the runtime-po domain any more,
10325 as it's now translated better than bison is.
10326
58d7a1a1
AD
103272006-06-19 Akim Demaille <akim@epita.fr>
10328
10329 * src/scan-gram.l: No longer "parse" things after `%union' until
10330 `{'. Rather, return a single "%union" token.
10331 No longer make symbols: return strings, and leave the conversion
10332 to symbols to the parser.
10333 (SC_PRE_CODE, token_type): Remove.
10334 * src/parse-gram.y (%union): New field `character'.
10335 Sort tokens.
10336 (CHAR): New token.
10337 (ID, ID_COLON): Now that the scanner no longer makes them
10338 identifiers, adjust all uses to invoke symbol_get.
10339 (id_colon): New, wraps the conversion from string to symbol.
10340 (%union): Accept a possible union_name.
10341 (symbol): Now can be a char.
10342 * data/c.m4 (b4_union_name): Leave a default value.
10343 * data/glr.c, data/yacc.c: Use it.
10344
b931235e
JD
103452006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
10346
10347 For associating token numbers with token names for "yacc.c", don't use
10348 #define statements unless `--yacc' is specified; always use enum
10349 yytokentype. Most important discussions start at:
10350 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
10351 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
10352 and
10353 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
10354 * NEWS (2.3+): Mention.
10355 * data/c.m4 (b4_yacc_if): New.
10356 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
10357 token #define's.
10358 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
10359 on token name definitions.
10360 * src/getargs.c (usage): Capitalize `Yacc' in English.
10361 * src/output.c (prepare): Define b4_yacc_flag.
10362 * tests/regression.at (Early token definitions): Test that tokens names
10363 are defined before the pre-prologue not just before the post-prologue.
10364 Remove this test case and copy to...
10365 (Early token definitions with --yacc): ... this to test #define's.
10366 (Early token definitions without --yacc): ... and this to test enums.
10367
9e6e7ed2
PE
103682006-06-11 Paul Eggert <eggert@cs.ucla.edu>
10369
10370 * NEWS: Reword the post-2.3 change to not be so optimistic about
10371 removing the old "look-ahead" spelling.
10372 Update previous look-ahead/lookahead change reports.
10373 * REFERENCES: look-ahead -> lookahead (since that's
10374 what he actually wrote).
10375 * doc/refcard.tex: look ahead -> lookahead,
10376 look-ahead -> lookahead
10377
742e4900
JD
103782006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
10379
10380 For consistency, use `lookahead' instead of `look-ahead' or
10381 `look_ahead'. Discussed starting at
10382 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
10383 and then at
10384 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
10385 * NEWS: For the next release, note the change to `--report'.
10386 * TODO, doc/bison.1: Update English.
10387 * doc/bison.texinfo: Update English.
10388 (Understanding Your Parser, Bison Options): Document as
10389 `--report=lookahead' rather than `--report=look-ahead'.
10390 * src/conflicts.c: Update English in comments.
10391 (lookahead_set): Rename from look_ahead_set.
10392 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
10393 (resolve_sr_conflict): Rename local look_ahead_tokens to
10394 lookahead_tokens, and update other uses.
10395 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
10396 count_rr_conflicts, conflicts_free): Update uses.
10397 * src/getargs.c (report_args): Move "lookahead" before alternate
10398 spellings.
10399 (report_types): Update uses.
10400 (usage): For `--report' usage description, state `lookahead' spelling
10401 rather than `look-ahead'.
10402 * src/getargs.h (report.report_lookahead_tokens): Rename from
10403 report_look_ahead_tokens.
10404 * src/lalr.c: Update English in comments.
10405 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
10406 (state_lookahead_tokens_count): Rename from
10407 state_look_ahead_tokens_count.
10408 Rename local n_look_ahead_tokens to n_lookahead_tokens.
10409 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
10410 Rename local n_look_ahead_tokens to n_lookahead_tokens.
10411 Update other uses.
10412 Update English in output.
10413 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
10414 * src/print.c: Update English in comments.
10415 (lookahead_set): Rename from look_ahead_set.
10416 (print_reduction): Rename argument lookahead_token from
10417 look_ahead_token.
10418 (print_core, state_default_rule, print_reductions, print_results):
10419 Update uses.
10420 * src/print_graph.c: Update English in comments.
10421 (print_core): Update uses.
10422 * src/state.c: Update English in comments.
10423 (reductions_new): Update uses.
10424 (state_rule_lookahead_tokens_print): Rename from
10425 state_rule_look_ahead_tokens_print, and update other uses.
10426 * src/state.h: Update English in comments.
10427 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
10428 (state_rule_lookahead_tokens_print): Rename from
10429 state_rule_look_ahead_tokens_print.
10430 * src/tables.c: Update English in comments.
10431 (conflict_row, action_row): Update uses.
10432 * tests/glr-regression.at
10433 (Incorrect lookahead during deterministic GLR,
10434 Incorrect lookahead during nondeterministic GLR): Rename
10435 print_look_ahead to print_lookahead.
10436 * tests/torture.at: Update English in comments.
10437 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
10438 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
10439 (Many lookahead tokens): Update uses.
10440 * data/glr.c: Update English in comments.
10441 * lalr1.cc: Likewise.
10442 * yacc.c: Likewise.
10443 * src/conflicts.h: Likewise.
10444 * src/lalr.h: Likewise.
10445 * src/main.c: Likewise.
10446 * src/output.c: Likewise.
10447 * src/parse-gram.c: Likewise.
10448 * src/tables.h: Likewise.
10449 * tests/calc.at: Likewise.
10450
3c40d0b5
JD
104512006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
10452
10453 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
10454
5d278082
PE
104552006-06-07 Paul Eggert <eggert@cs.ucla.edu>
10456
10457 * TODO: Add request from Nelson H. F. Beebe to be able to install
10458 Bison without installing the yacc script.
10459
9e668899
JD
104602006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
10461
10462 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
10463 and yytext if they're already #define'd.
10464 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
10465 * src/scan-code-c.c: ... here.
10466 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
10467 <config.h>.
10468
0c8e079f
JD
104692006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
10470
10471 Get Bison to build again when configured with --enable-gcc-warnings.
10472 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
10473 missing #include's.
10474 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
10475 loc argument as it shadows a global.
10476 * src/scan-gram.l: Remove stray comma that prevents boundary_set
10477 invocation.
10478
10479 * src/.cvsignore: Add scan-code.c.
10480
2346344a
AD
104812006-06-07 Akim Demaille <akim@epita.fr>
10482
10483 * src/scan-gram.l: Move the "add a trailing ; to actions" code
10484 to...
10485 * src/scan-code.l: here.
10486 * tests/input.at (Torturing the Scanner): Fix another location
10487 error.
10488
4862bdfd
AD
104892006-06-07 Akim Demaille <akim@epita.fr>
10490
10491 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
10492
e9071366
AD
104932006-06-06 Akim Demaille <akim@epita.fr>
10494
10495 Extract the parsing of user actions from the grammar scanner.
10496 As a consequence, the relation between the grammar scanner and
10497 parser is much simpler. We can also split "composite tokens" back
10498 into simple tokens.
10499 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
10500 * src/scan-gram.l (add_column_width, adjust_location): Move to and
10501 rename as...
10502 * src/location.h, src/location.c (add_column_width)
10503 (location_compute): these.
10504 Fix the column count: the initial column is 0.
10505 (location_print): Be robust to ending column being 0.
10506 * src/location.h (boundary_set): New.
10507 * src/main.c: Adjust to scanner_free being renamed as
10508 gram_scanner_free.
10509 * src/output.c: Include scan-code.h.
10510 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
10511 Use boundary_set.
10512 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
10513 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
10514 which is now, again, a separate token.
10515 Adjust all dependencies.
10516 Whereever actions with $ and @ are used, use translate_code.
10517 (action): Remove this nonterminal which is now useless.
10518 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
10519 (grammar_current_rule_action_append): Use translate_code.
10520 (packgram): Bound check ruleno, itemno, and rule_length.
10521 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
10522 (last_string, last_braced_code_loc, max_left_semantic_context)
10523 (scanner_initialize, scanner_free, scanner_last_string_free)
10524 (gram_out, gram_lineno, YY_DECL_): Move to...
10525 * src/scan-gram.h: this new file.
10526 (YY_DECL): Rename as...
10527 (GRAM_DECL): this.
10528 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
10529 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10530 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10531 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10532 Move these declarations, and...
10533 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
10534 these to...
10535 * src/flex-scanner.h: this new file.
10536 * src/scan-gram.l (rule_length, rule_length_overflow)
10537 (increment_rule_length): Remove.
10538 (last_braced_code_loc): Rename as...
10539 (gram_last_braced_code_loc): this.
10540 Adjust to the changes of the parser.
10541 Move all the handling of $ and @ into...
10542 * src/scan-code.l: here.
10543 * src/scan-gram.l (handle_dollar, handle_at): Remove.
10544 (handle_action_dollar, handle_action_at): Move to...
10545 * src/scan-code.l: here.
10546 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
10547 scan-code.h, scan-code-c.c, scan-gram.h.
10548 (EXTRA_bison_SOURCES): Add scan-code.l.
10549 (BUILT_SOURCES): Add scan-code.c.
10550 (yacc): Be robust to white spaces.
10551
10552 * tests/conflicts.at, tests/input.at, tests/reduce.at,
10553 * tests/regression.at: Adjust the column numbers.
10554 * tests/regression.at: Adjust the error message.
7891a7c4 10555
184e42f0
JD
105562006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10557
10558 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10559 Use Akim's wording from
10560 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
10561
7891a7c4
JD
105622006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10563
10564 Between Bison releases, manually append `+' to the previous Bison
10565 release number, and use that as a signal to automatically print the
10566 ChangeLog's CVS Id keyword from --version. Discussed starting at
10567 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
10568 * ChangeLog: Add Id header.
10569 * configure.ac (AC_INIT): Append `+' to `2.3'.
10570 * src/.cvsignore: Add revision.c.
10571 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
10572 (BUILT_SOURCES): Add revision.c.
10573 (revision.c): New target rule. This file defines a new global variable
10574 named revision. It initializes it with either the Id from ChangeLog
10575 or, if VERSION doesn't contain `+', with the empty string.
10576 * src/getargs.c (version): Print the value of revision.
10577 * src/revision.h: Extern revision.
10578
4ad3ed84
PE
105792006-06-05 Paul Eggert <eggert@cs.ucla.edu>
10580
10581 * NEWS: Version 2.3.
10582 * configure.ac (AC_INIT): Likewise.
10583
02103984
PE
105842006-05-30 Paul Eggert <eggert@cs.ucla.edu>
10585
10586 * data/glr.c (YYRECOVERING): Define to be a function-like macro
10587 with no arguments, not as an object-like macro. This is for
10588 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
10589 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
10590 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
10591 Document this.
10592
2c08afa5
JD
105932006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
10594
10595 * src/getargs.c (usage): Back out yesterday's modification of the
10596 --help output so that we don't have to wait for translation before
10597 releasing 2.3.
10598
6077da58
PE
105992006-05-29 Paul Eggert <eggert@cs.ucla.edu>
10600
10601 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
10602 Problem reported by Akim Demaille.
10603
2a26b6c2
JD
106042006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
10605
10606 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10607
aefef0d6
PE
106082006-05-26 Paul Eggert <eggert@cs.ucla.edu>
10609
10610 * data/yacc.c (yy_reduce_print): Omit trailing white space in
10611 generated source code. Problem reported by Frans Englich in
10612 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
10613
fcd8e201
PE
106142006-05-22 Paul Eggert <eggert@cs.ucla.edu>
10615
10616 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
10617 shell, not within 'make', so that 'make' by an ordinary builder
10618 (using GNU make) does not worry about configuring gzip. This also
10619 works around a bug reported independently by Keith Thompson and by
10620 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
10621 stderr rather than stdout, messing up the build logs.
10622
7b5cdcbd
JD
106232006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10624
10625 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
10626 to make sure that YYID will never be unused. This fixes a 'make
10627 maintainer-check' failure caused by the recent changes to the 'Trivial
10628 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
10629 not used.
10630 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
10631
5ad0a449
JD
106322006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10633
10634 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
10635 state before an empty RHS is always resolved here. Only the location
10636 of that state is guaranteed to be resolved, and that's enough. This
10637 fixes the remaining bug reported by Derek M. Jones in
10638 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10639 * tests/glr-regression.at (Uninitialized location when reporting
10640 ambiguity): Test the above case.
10641 Also, the embedded comments in this test case claim it checks the case
10642 of an empty RHS that has inherited the initial location. However, the
10643 corresponding LHS was already resolved, so yyresolveLocations didn't
10644 actually have reason to modify it. Fix this by forcing
10645 nondeterministic operation at the beginning of the parse.
10646
50cce58e
PE
106472006-05-20 Paul Eggert <eggert@cs.ucla.edu>
10648
10649 * data/c.m4 (b4_yy_symbol_print_generate):
10650 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
10651 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
10652 of the bugs reported today by Derek M Jones in
10653 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10654 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
10655 defined to be a type name without parens or brackets.
10656 (Location Type): Similarly for YYLTYPE.
10657 * tests/regression.at (Trivial grammars): Put in a test for this
10658 bug that will be caught by 'make maintainer-check' (though not,
10659 alas, by 'make check' unless your compiler is picky).
10660
ab8d9dc5
PE
106612006-05-19 Paul Eggert <eggert@cs.ucla.edu>
10662
0d2c8934 10663 * NEWS: Version 2.2.
ab8d9dc5
PE
10664 * configure.ac (AC_INIT): Likewise.
10665
9138c575
JD
106662006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
10667
10668 * data/glr.c (yyreportTree): Make room in yystates for the state
10669 preceding the RHS. This fixes the segmentation fault reported by Derek
10670 M. Jones in
10671 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
10672 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
10673 to the user. Reported for yyreportTree by Derek M. Jones later in the
10674 same thread.
10675 * THANKS: Add Derek M. Jones.
10676 Update my email address.
10677 Fix typo in Steve Murphy's name.
10678
276f48df
PE
106792006-05-14 Paul Eggert <eggert@cs.ucla.edu>
10680
d6645148
PE
10681 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
10682 checking against YYLAST that caused the parser to miss a potential
10683 alternative in its diagnostic.
10684 Problem reported by Maria Jose Moron Fernandez in
10685 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
10686 * data/lalr1.cc (yysyntax_error_): Likewise.
10687 * data/yacc.c (yysyntax_error): Likewise.
10688 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
10689 tokens, in case we run into an older C compiler.
10690 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
10691 Use them to check for the off-by-one error fixed above.
10692
276f48df
PE
10693 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
10694 YYSIZE_T, not size_t.
10695 * tests/regression.at (Trivial grammars): New test, to catch
10696 the error fixed by the above patch.
10697
cd8b5791
AD
106982006-05-14 Akim Demaille <akim@lrde.epita.fr>
10699
10700 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
10701 scheme.
10702 Reported by Steve Murphy.
10703
34376418
AD
107042006-05-14 Akim Demaille <akim@lrde.epita.fr>
10705
10706 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
10707 * data/glr.cc: b4_location_flag is now b4_locations_flag.
10708
327afc7c
AD
107092006-05-14 Akim Demaille <akim@lrde.epita.fr>
10710
10711 Implement --trace=m4.
10712 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
10713 * src/output.c (output_skeleton): When set, pass -dV to m4.
10714
10715 Factor the handling of flags in m4.
10716 * src/output.c (prepare): Rename the muscle names debug, defines,
10717 error_verbose to debug_flag, defines_flag, error_verbose_flag.
10718 * data/c.m4: Adjust.
10719 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
10720 Use b4_define_flag_if to define other b4_FLAG_if macros.
10721 (b4_location_if): As a consequence, rename as...
10722 (b4_locations_if): this, for consistency.
10723 Adjust all the skeletons.
10724
ba9ecd19
AD
107252006-05-14 Akim Demaille <akim@lrde.epita.fr>
10726
10727 * etc/bench.pm: Shorten bench names.
10728
4e83ea15
AD
107292006-05-14 Akim Demaille <akim@lrde.epita.fr>
10730
10731 * src/output.h, src/output.c (error_verbose): Move to...
10732 * src/getargs.h, src/getargs.c: here.
10733 Sort the flags.
10734 Adjust dependencies.
10735
6e93d810
PE
107362006-05-13 Paul Eggert <eggert@cs.ucla.edu>
10737
10738 * data/c.m4 (b4_copyright): Put the special exception for Bison
10739 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
10740 uses changed. Suggested by Akim Demaille. Also, wrap the
10741 copyright notice, in case it is longer than 80 columns. Replace
10742 comma by newline after title.
6e93d810 10743
eaea13f5
PE
107442006-05-11 Paul Eggert <eggert@cs.ucla.edu>
10745
10746 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
10747 incompatibility, not a bug. Mention that it wasn't fixed as of
10748 flex 2.5.33.
10749
3cf084ec
AD
107502006-05-11 Akim Demaille <akim@lrde.epita.fr>
10751
10752 * examples/extexi: Enforce the precedence of concatenation over
10753 >>.
0a9f1c7d 10754 Reported by Tommy Nordgren.
3cf084ec 10755
32c96bd7
AD
107562006-05-11 Akim Demaille <akim@lrde.epita.fr>
10757
10758 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
10759 with the member "token".
f94705b2 10760 Reported by Martin Nylin.
32c96bd7 10761
eaea13f5
PE
107622006-05-08 Paul Eggert <eggert@cs.ucla.edu>
10763
10764 * data/glr.c: Switch to Bison 2.2 special-exception language in
10765 the copyright notice. Use more-regular format for titles and
10766 copyright notices.
10767 * data/glr.cc: Likewise.
10768 * data/location.cc: Likewise.
10769 * data/yacc.cc: Likewise.
10770 * doc/bison.texinfo (Conditions): Document this.
10771 * NEWS: likewise. Upgrade version to 2.2.
10772
6e2d1146
AD
107732006-04-27 Akim Demaille <akim@lrde.epita.fr>
10774
10775 * data/glr.cc: Remove dead code.
10776
47671055
PE
107772006-04-25 Paul Eggert <eggert@cs.ucla.edu>
10778
10779 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
10780 that variable and the line breaks the bootstrap. Problem reported
10781 by Juan M. Guerrero.
10782
ed2e6384
AD
107832006-04-24 Akim Demaille <akim@lrde.epita.fr>
10784
10785 * doc/bison.texinfo (Multiple start-symbols): New.
10786
3cedc2dc
AD
107872006-04-24 Akim Demaille <akim@lrde.epita.fr>
10788
10789 * etc/README, etc/bench.pl: New.
10790
b2ddc3f3
AD
107912006-04-03 Akim Demaille <akim@lrde.epita.fr>
10792
10793 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
10794 rule.
10795 Reported by Mickael Labau.
10796 * tests/input.at (Torturing the Scanner): Test it.
10797
91e3ac9a
PE
107982006-03-16 Paul Eggert <eggert@cs.ucla.edu>
10799
10800 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
10801 Problem reported by Bob Rossi.
10802
108032006-03-13 Paul Eggert <eggert@cs.ucla.edu>
10804
10805 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
10806 and didn't really work.
10807 For the index, use @ifnotinfo, not @iftex.
10808 Minor cleanups of spacing and terminology.
10809
5cf61e93
AD
108102006-03-12 Akim Demaille <akim@lrde.epita.fr>
10811
10812 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
10813 of AT_NAME_PREFIX when %name-prefix is not used.
10814
aa08666d
AD
108152006-03-12 Akim Demaille <akim@lrde.epita.fr>
10816
10817 Apply --prefix to C++ skeletons too: they change the namespace.
10818 The test suite already exercize these cases.
10819 * data/c++.m4 (b4_namespace): New.
10820 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
10821 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
10822 * data/yacc.c, data/glr.c: Remove a useless `[]'.
10823 * doc/bison.texinfo: Document it.
10824 (Option Cross Key): Use @multitable in all formats. It looks
10825 nicer, even in TeX outputs.
10826 (Rules): Use the same code whatever the output type is.
10827 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
10828 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
10829 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 10830
45567173
AD
108312006-03-10 Akim Demaille <akim@lrde.epita.fr>
10832
10833 * TODO: Remove dead items.
10834
e9d8f881 108352006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
10836
10837 * doc/FAQ: Remove, merged into...
10838 * doc/bison.texinfo (FAQ): this.
10839 * doc/Makefile.am (EXTRA_DIST): Adjust.
10840
c095d689
AD
108412006-03-10 Akim Demaille <akim@lrde.epita.fr>
10842
10843 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
10844 even if empty.
10845 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
10846 * doc/bison.texinfo (Calc++ Scanner): Use it.
10847
6e0f8287
PE
108482006-03-09 Paul Eggert <eggert@cs.ucla.edu>
10849
10850 Fix two nits reported by twlevo, plus one more that I discovered.
10851
10852 * src/assoc.h (assoc_to_string): Give a name to the arg, as
10853 this is the usual Bison style.
10854 * src/location.h (location_print): Likewise.
10855
10856 * src/reader.h (token_name): Likewise.
10857
d6b771c3
PE
108582006-03-08 Paul Eggert <eggert@cs.ucla.edu>
10859
10860 Fix some nits reported by twlevo.
10861 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
10862 and "POSIX". Use more-modern syntax for URLs. Mention C++
10863 and ask for Java. Don't hardwire OS version numbers. Add
10864 copyright notice.
10865 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
10866 * src/conflicts.c (solved_conflicts_obstack): Now static.
10867
1e137b71
JD
108682006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
10869
10870 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
10871 page. Say "you can use it" not "you may use it" as on the web page;
10872 we're describing capabilities not granting permission.
10873
73f2e47e
PE
108742006-03-06 Paul Eggert <eggert@cs.ucla.edu>
10875
6d05403d
PE
10876 * data/glr.c (yyresolveLocations): Rename local variables to avoid
10877 shadowing warnings. Use usual patter for iterating through RHS.
10878 * tests/glr-regression.at
10879 (Uninitialized location when reporting ambiguity):
10880 Modify yylex so that it uses its argument, rather than trying
10881 to rely on ARGSUSED (which doesn't work for gcc with warnings).
10882 const char -> char const.
10883
73f2e47e
PE
10884 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
10885 Don't use tabs inside commands; it messes up 'ps'.
10886 Problem reported by twlevo.
10887
8710fc41
JD
108882006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
10889
10890 * tests/glr-regression.at (Uninitialized location when reporting
10891 ambiguity): New test case.
10892 * data/glr.c (yyresolveLocations): New function, which uses
10893 YYLLOC_DEFAULT.
10894 (yyresolveValue): Invoke yyresolveLocations before reporting an
10895 ambiguity.
10896 * doc/bison.texinfo (Default Action for Locations): Note
10897 YYLLOC_DEFAULT's usage for ambiguity locations.
10898 (GLR Semantic Actions): Cross-reference those notes.
10899
ae952af2
JD
109002006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
10901
10902 * tests/glr-regression.at (Leaked semantic values when reporting
10903 ambiguity): Remove unnecessary union and type declarations.
10904 (Leaked lookahead after nondeterministic parse syntax error): New test
10905 case.
10906 * data/glr.c (yyparse): Check for zero stacks remaining before
10907 attempting to shift the lookahead so that you don't lose it.
10908
35ee866a
JD
109092006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10910
10911 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
10912 * tests/glr-regression.at (Leaked semantic values when reporting
10913 ambiguity): New test case.
10914 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
10915 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
10916 now unnecessary yystackp parameter.
10917 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
10918 destructors can be called.
10919
10920 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
10921 in existing testcases.
10922
520181ab
JD
109232006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10924
10925 Don't leak semantic values for parent RHS when a user action cuts the
10926 parser, and clean up related code a bit.
10927 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
10928 cuts parse): Rename to...
10929 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
10930 for leaked parent RHS values.
10931 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
10932 between an unresolved state (non-empty chain of semantic options) and
10933 an incomplete one (signaled by an empty chain).
ae952af2 10934 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
10935 successfully or unsuccessfully resolved yyGLRState to...
10936 (yyresolveValue): ... here so that yyresolveValue always leaves a
10937 yyGLRState with consistent data and thus is easier to understand.
10938 Remove the yyvalp and yylocp parameters since they are always just
10939 taken from the yys parameter. When reporting a discarded merged value
10940 in debugging output, note that it is incompletely merged. Document the
10941 interface.
10942 (yyresolveAction): If resolving any of the RHS states fails, destroy
10943 them all rather than leaking them. Thus, as long as user actions are
10944 written to clean up the RHS correctly, yyresolveAction always cleans up
10945 the RHS of a semantic option. Document the interface.
10946
18d9185c
PE
109472006-02-27 Paul Eggert <eggert@cs.ucla.edu>
10948
10949 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
10950 led to a segmentation fault in GNU Pascal. Problem reported
10951 by Waldek Hebisch.
10952
841a7737
JD
109532006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
10954
10955 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
10956 mid-rule action inside a nonterminal symbol in order to declare a
10957 destructor for its semantic value.
10958
fc3f467f
PE
109592006-02-16 Paul Eggert <eggert@cs.ucla.edu>
10960
10961 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
10962 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
10963 __cplusplus && ! defined _STDLIB_H && !
10964 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
10965 defined free))]: Include <stdlib.h> rather than rolling our own
10966 declarations of malloc and free, to avoid problems with
10967 incompatible declarations (using 'throw') C++'s stdlib.h. This
10968 should fix Debian bug 340012
10969 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
10970 reported by Guillaume Melquiond.
10971
a3af26dd
PE
109722006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10973
4d7bc38c
PE
10974 * NEWS: Clarify symbols versus types in unused-value warnings.
10975
a3af26dd
PE
10976 * configure.ac (AC_INIT): Bump version number.
10977
4e26c69e
PE
109782006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10979
10980 * NEWS: Version 2.1a.
10981 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
10982 since C99 requires this.
10983
498e897c
PE
109842006-02-11 Paul Eggert <eggert@cs.ucla.edu>
10985
10986 * m4/c-working.m4: New file.
10987 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
10988
57bb17ca
PE
109892006-02-10 Paul Eggert <eggert@cs.ucla.edu>
10990
10991 * Makefile.maint: Merge from coreutils.
10992
0be105dc
PE
109932006-02-09 Paul Eggert <eggert@cs.ucla.edu>
10994
10995 More portability fixes for problems summarized by Nelson H. F. Beebe.
10996
10997 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
10998 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
10999 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
11000 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
11001 messes up because C++ code is compiled in 32-bit mode but linked
11002 in 64-bit mode.
11003
6fc0c024
PE
110042006-02-08 Paul Eggert <eggert@cs.ucla.edu>
11005
11006 More portability fixes for problems summarized by Nelson H. F. Beebe.
11007
7870f699
PE
11008 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
11009 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
11010
6fc0c024
PE
11011 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
11012 nodist_PROGRAMS, since we don't need to actually compile the
11013 example if we're just doing a plain 'make'. This avoids bothering
11014 the installer unnecessarily about problems due to weird C++
11015 compilers.
11016
fe6c2fde
PE
110172006-02-06 Paul Eggert <eggert@cs.ucla.edu>
11018
11019 More portability fixes for problems summarized by Nelson H. F. Beebe.
11020
11021 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
11022 than #include "...", and compile with -I'.'. The old method was
11023 not portable, according to Posix and the C standard, and it does
11024 not work with Sun C 5.7, where previous #line directives affect
11025 the working directory used in later #include "..." directives.
11026
927b425b
JMG
110272006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11028
11029 Various DJGGP specific issues in /djgpp
11030
d9735e9e
PE
110312006-02-02 Paul Eggert <eggert@cs.ucla.edu>
11032
11033 More portability fixes for problems summarized by Nelson H. F. Beebe.
11034
11035 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
11036 '#include <map>' works and that you can apply ++ to iterators.
11037
5a6755af
PE
110382006-02-01 Paul Eggert <eggert@cs.ucla.edu>
11039
67a0dc4f
PE
11040 Work around portability problems summarized by Nelson H. F. Beebe in
11041 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
11042
8c86f0ef
PE
11043 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
11044 that '#include <string>' works.
11045
de35dd59
PE
11046 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
11047 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
11048 "warning: sorry: semantics of inline function static data `const
11049 unsigned char translate_table[262]' are wrong (you'll wind up with
11050 multiple copies)".
11051
67a0dc4f
PE
11052 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
11053 or, xor to not_, and_, or_, and xor_, respectively. This works
11054 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
11055 random system header somewhere that includes the equivalent of
11056 <iso646.h>.
11057
5a6755af
PE
11058 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
11059 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 11060 Suite Version 2.0.
5a6755af 11061
3f001415
JD
110622006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
11063
11064 During deterministic GLR operation, user actions should be able to
11065 influence the parse by changing yychar. To make this easier to fix and
11066 to make glr.c easier to evolve in general, don't maintain yytoken in
11067 parallel with yychar; just compute yytoken when needed.
11068 * tests/glr-regression.at (Incorrect lookahead during deterministic
11069 GLR): Check that setting yychar in a user action has the intended
11070 effect.
11071 * data/glr.c (yyGLRStack): Remove yytokenp member.
11072 (yyclearin): Don't set *yytokenp.
11073 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
11074 yychar rather than *yytokenp to determine the current lookahead.
11075 Compute yytoken locally when needed.
11076 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
11077 point to.
11078
11079 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
11080 after `--report' documentation.
11081
e2a8c0f5
PE
110822006-01-30 Paul Eggert <eggert@cs.ucla.edu>
11083
11084 * src/parse-gram.y (grammar_declaration): Location of printer
11085 symbol is @1, not list->location. Bug reported by twlevo.
11086 * tests/input.at (Incompatible Aliases): Adjust to above change.
11087
6b702268
PE
110882006-01-29 Paul Eggert <eggert@cs.ucla.edu>
11089
27622431
PE
11090 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
11091 all the test at once. This makes the output easier to read in the
11092 normal case.
11093
6b702268
PE
11094 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
11095 got from <http://bro-ids.org/download.html>. The bug is that
11096 when two actions appeared in succession, the second one was
11097 scanned before the first one was added to the grammar rule
11098 as a midrule action. Bison then output the incorrect warning
11099 "parse.y:905.17-906.36: warning: unused value: $3".
11100 * src/parse-gram.y (BRACED_CODE, action): These are no longer
11101 associated with a value.
11102 (rhs): Don't invoke grammar_current_rule_action_append.
11103 (action): Invoke it here instead.
11104 * src/reader.c (grammar_midrule_action): Now extern.
11105 (grammar_current_rule_action_append): Don't invoke
11106 grammar_midrule_action; that is now the scanner's job.
11107 * src/reader.h (last_string, last_braced_code_loc):
11108 (grammar_midrule_action): New decls.
11109 * src/scan-gram.l (last_string): Now extern, sigh.
11110 (last_braced_code_loc): New extern variable.
11111 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
11112 rule already has an action.
11113 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
11114 * tests/input.at (AT_CHECK_UNUSED_VALUES):
11115 Add some tests to check that the above changes fixed the bug.
11116
d40ba6c2
PE
111172006-01-27 Paul Eggert <eggert@cs.ucla.edu>
11118
11119 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
11120 All used changed. Check whether the symbol has a destructor,
11121 not whether it is typed.
11122 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
11123 that the values are still reported as unused. All line numbers
11124 adjusted.
11125
401aace6
PE
111262006-01-23 Paul Eggert <eggert@cs.ucla.edu>
11127
11128 Work around a bug in bro 0.8, which underparenthesizes its
11129 definition of YYLLOC_DEFAULT.
11130 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
11131 their arguments.
11132 * data/lalr1.cc: Likewise.
11133 * data/yacc.cc: Likewise.
11134
06f01bc4
PE
111352006-01-22 Paul Eggert <eggert@cs.ucla.edu>
11136
401aace6
PE
11137 Work around a bug in Pike 7.0, and give the Pike folks a
11138 better way to override the usual int widths.
11139 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
11140 user can override the types.
11141 (short): #undef, to work around a bug in Pike 7.0.
11142 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
11143 (union yyalloc.yyss): Use yytype_int16 rather than short.
11144 All uses changed.
11145 (yysigned_char): Remove.
11146 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
11147 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
11148 * tests/regression.at (Web2c Actions): Adjust to above changes.
11149
11150 * src/reader.c (check_and_convert_grammar): New function.
11151 (reader): Close the input file even if something went wrong during
11152 parsing. Minor file descriptor leak reported by twlevo.
11153
06f01bc4
PE
11154 * src/assoc.c (assoc_to_string): Use a default: abort (); case
11155 to pacify gcc -Wswitch-default.
11156 * src/scan-gram.l (adjust_location): Use a default: break; case
11157 to pacify gcc -Wswitch-default.
11158 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
11159 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
11160 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
11161 Move these decls to scan-skel.l, since they don't need to be
11162 visible elsewhere.
11163 * src/scan-skel.l: Accept the above decls.
11164 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
11165 is used.
11166
02650b7f
PE
111672006-01-21 Paul Eggert <eggert@cs.ucla.edu>
11168
11169 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
11170 since we don't want to insist on a version number at the start
11171 of the changelog every time.
11172 * Makefile.maint: Sync from coreutils a bit better.
11173 (sc_trailing_blank): Renamed from sc_trailing_space.
11174 All uses changed.
11175 (sc_no_if_have_config_h, sc_require_config_h):
11176 (sc_prohibit_assert_without_use): New rules.
11177 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
11178 (sc_dd_max_sym_length): Fix leading spaces in rule.
11179 (sc_system_h_headers): Prefix with @.
11180 (sc_useless_cpp_parens, m4-check): Output line numbers.
11181 (changelog-check): Allow version only in head.
11182 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
11183 satisfy new Makefile.maint rule.
11184 * data/glr.c: Likewise.
11185 * data/glr.cc: Likewise.
11186 * data/lalr1.cc: Likewise.
11187 * data/yacc.c: Likewise.
11188 * lib/ebitsetv.c: Likewise.
11189 * lib/lbitset.c: Likewise.
11190 * lib/subpipe.c: Likewise.
11191 * lib/timevar.c: Likewise.
11192 * src/system.h: Likewise.
11193 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
11194 * djgpp/Makefile.maint: Add copyright notice.
11195 * djgpp/README.in: Likewise.
11196 * djgpp/config.bat: Likewise.
11197 * djgpp/config.site: Likewise.
11198 * djgpp/config_h.sed: Likewise.
11199 * djgpp/djunpack.bat: Likewise.
11200 * djgpp/config.sed: Fix copyright notice to match standard format.
11201 * djgpp/subpipe.h: Likewise.
11202 * lib/bitsetv-print.c: Likewise.
11203 * lib/bitsetv.c: Likewise.
11204 * lib/subpipe.h: Likewise.
11205 * lib/timevar.c: Likewise.
11206 * lib/timevar.h: Likewise.
11207 * djgpp/subpipe.c: Use standard recipe for config.h.
11208 * lib/abitset.c: Likewise.
11209 * lib/bitset.c: Likewise.
11210 * lib/bitset_stats.c: Likewise.
11211 * lib/bitsetv-print.c: Likewise.
11212 * lib/bitsetv.c: Likewise.
11213 * lib/ebitsetv.c: Likewise.
11214 * lib/get-errno.c: Likewise.
11215 * lib/lbitset.c: Likewise.
11216 * lib/subpipe.c: Likewise.
11217 * lib/timevar.c: Likewise.
11218 * lib/vbitset.c: Likewise.
11219 * tests/local.at: Likewise.
11220 * src/scan-gram.l: Don't include verify.h, since system.h does
11221 that for us.
11222 * .x-sc_require_config_h: New file.
11223 * .x-sc_unmarked_diagnostics: New file.
11224
287c78f6
PE
112252006-01-20 Paul Eggert <eggert@cs.ucla.edu>
11226
287c78f6
PE
11227 Be a bit more systematic about using 'abort'.
11228 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
11229 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
11230 Put 'default: abort ();' before some other case, to satisfy older
11231 pedantic compilers.
11232 * lib/bitset_stats.c (bitset_stats_init): Likewise.
11233 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
11234 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
11235 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
11236 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
11237 (get_decision_str, get_orientation_str, get_node_alignment_str):
11238 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
11239 (get_linestyle_str, get_arrowstyle_str): Likewise.
11240 * src/conflicts.c (resolve_sr_conflict):
11241 Use a default case rather than one for the one remaining enum
11242 value, to catch invalid enum values as well.
11243 * src/lalr.c (set_goto_map, map_goto):
11244 Prefer "assert (FOO);" to "if (!FOO) abort ();".
11245 * src/nullable.c (nullable_compute, token_definitions_output):
11246 Likewise.
11247 * src/reader.c (packgram, reader): Likewise.
11248 * src/state.c (transitions_to, state_new, state_reduction_find):
11249 Likewise.
11250 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
11251 (symbol_pack): Likewise.
11252 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
11253 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
11254 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
11255 * src/system.h: Don't include <assert.h>.
11256 (assert): New macro.
11257
11258 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
11259 (Destructor Decl, Parser Function, Pure Calling):
11260 Describe rules for braces inside C code more carefully.
287c78f6 11261
c66dfadd
PE
112622006-01-19 Paul Eggert <eggert@cs.ucla.edu>
11263
c21493b8
PE
11264 Fix some porting glitches found by Nelson H. F. Beebe.
11265 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
11266 compilers that don't understand that abort () does not return.
11267 * src/state.c (transitions_to): Likewise.
11268 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
11269 that '#include <cstdlib>' works.
11270 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
11271 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
11272 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
11273 for the benefit of some pre-C99 compilers.
11274
b6e3facf
PE
11275 * bootstrap: Undo changes to gnulib files that autoreconf made.
11276
c66dfadd
PE
11277 Minor fixups to get 'make maintainer-check' to work.
11278 * configure.ac: Don't use -Wnested-externs, as it's incompatible
11279 with the new verify.h implementation.
11280 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
11281 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
11282 * data/yacc.c (YYUSE): Likewise.
11283 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
11284 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
11285 * src/parse-gram.y (declaration): Don't pass a string constant
11286 to a function that expects char *, since GCC might complain
11287 about the constant value.
11288 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
11289 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
11290 before #defining them.
11291 * tests/glr-regression.at
11292 (Incorrectly initialized location for empty right-hand side in GLR):
11293 In yyerror, use the msg arg.
11294 (Corrupted semantic options if user action cuts parse):
11295 (Incorrect lookahead during deterministic GLR):
11296 (Incorrect lookahead during nondeterministic GLR):
11297 Don't name a local var 'index'; it shadows string.h's 'index'.
11298
ed94ef2a
AD
112992006-01-19 Akim Demaille <akim@epita.fr>
11300
11301 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
11302 location, not just parts of it.
11303
e9ad4aec
PE
113042006-01-18 Paul Eggert <eggert@cs.ucla.edu>
11305
d6ca7905
PE
11306 * NEWS: Document the fact that multiple %unions are now allowed.
11307 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
11308 * TODO: This feature is now implemented, so remove it from
11309 the wishlist.
d6ca7905 11310
ef1b70e0
PE
11311 * Makefile.maint: Merge with coreutils Makefile.maint.
11312 (CVS_LIST): Use build-aux version if available.
11313 (VERSION_REGEXP): New macro.
11314 (syntax-check-rules): Add sc_no_if_have_config_h,
11315 sc_prohibit_assert_without_use, sc_require_config_h,
11316 sc_useless_cpp_parens.
11317 (sc_obsolete_symbols): Check for O_NDELAY.
11318 (sc_dd_max_sym_length): Track coreutils.
11319 (sc_unmarked_diagnostics): Look in all files, not just *.c.
11320 (sc_useless_cpp_parens): New rule.
11321 (news-date-check): Look for version or today's date.
11322 (changelog-check): Don't require version number near head.
11323 (copyright-check): Use current year instead of hardwiring 2005.
11324 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
11325 (announcement): Add --gpg-key-ID.
11326
11327 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
11328 with "file system".
11329
2073ce56 11330 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
11331 array. Problem reported by twlevo.
11332 * src/reader.c (packgram): Prepend a new sentinel before ritem.
11333 * src/lalr.c (build_relations): Rely on new sentinel.
11334 * src/gram.c (gram_free): Adjust to new sentinel.
11335
b7691f15
JD
113362006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
11337
11338 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
11339 yylookaheadNeeds. All uses updated.
11340 (yysplitStack): Rename local yynewLookaheadStatuses to
11341 yynewLookaheadNeeds.
11342 * data/glr-regression.at (Incorrect lookahead during nondeterministic
11343 GLR): In comments, change `lookahead status' to `lookahead need'.
11344
ddee1b06
PH
113452006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11346
11347 * data/glr.c (yysplitStack): A little stylistic rewrite.
11348
12f4614d
PH
113492006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11350
11351 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
11352
32c29292
JD
113532006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
11354
11355 * doc/bison.texinfo: Fix some typos.
11356 (GLR Semantic Actions): New subsection discussing special
11357 considerations because GLR semantic actions might be deferred.
11358 (Actions): Mention look-ahead usage of yylval.
11359 (Actions and Locations): Mention look-ahead usage of yylloc.
11360 (Special Features for Use in Actions): Add YYEOF entry and mention it
11361 in the yychar entry.
11362 In the yychar entry, remove mention of the local yychar case (pure
11363 parser) since this is irrelevant information when writing semantic
148d66d8 11364 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
11365 yychar is otherwise described as an external variable.
11366 In the yychar entry, don't call it the `current' look-ahead since it
11367 isn't when semantic actions are deferred.
11368 In the yychar and yyclearin entries, add note about deferred semantic
11369 actions.
11370 Add yylloc and yylval entries discussing look-ahead usage.
11371 (Look-Ahead Tokens): When discussing yychar, don't call it the
11372 `current' look-ahead, and do mention yylval and yylloc.
11373 (Error Recovery): Cross-reference `Action Features' when mentioning
11374 yyclearin.
148d66d8 11375 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
11376 look-ahead.
11377 In the yylloc and yylval entries, mention look-ahead usage.
11378
de366a2f 113792006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
11380
11381 * tests/glr-regression.at: Update copyright year to 2006.
11382
bf70fa87
JD
113832006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
11384
11385 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
11386 use during nondeterministic operation to track which stacks have
11387 actually needed the current lookahead.
11388 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
11389 Allocate, deallocate, resize, and otherwise shuffle space for
11390 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
11391 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
11392 appropriately during nondeterministic operation.
11393 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
11394 members to store the current lookahead to be used by the deferred
11395 user action.
11396 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
11397 from which the RHS is taken. Set the lookahead members of the new
11398 yySemanticOption according to the lookahead status for stack yyk.
11399 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
11400 yyaddDeferredAction.
11401 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
11402 members of yySemanticOption before invoking yyuserAction, and then set
11403 them back to their current values afterward.
11404 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
11405 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
11406 * tests/glr-regression.at: Remove `.' from the ends of recent test case
11407 titles for consistency.
11408 (Leaked merged semantic value if user action cuts parse): In order to
11409 suppress lint warnings, use arguments in merge function, and assign
11410 char value < 128 in main.
11411 (Incorrect lookahead during deterministic GLR): New test case.
11412 (Incorrect lookahead during nondeterministic GLR): New test case.
11413
05449a2c
JD
114142006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
11415
de366a2f 11416 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
11417 !yyvaluep as signal that no semantic value is available to print.
11418 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
11419 to print a semantic value.
11420
4158e0a1 114212006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 11422
4158e0a1
JD
11423 * tests/glr-regression.at: For consistency with my newer test cases,
11424 don't thank myself.
11425
d659304d
JD
114262006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
11427
11428 * data/glr.c (yyresolveValue): When merging semantic options, if at
11429 least one user action succeeds but a later one cuts the parse, then
11430 destroy the semantic value before returning rather than leaking it.
11431 (yyresolveStates): If a user action cuts the parse and thus
11432 yyresolveValue fails, ignore the (unset) semantic value rather than
11433 corrupting the yyGLRState, and empty the semantic options list since
11434 the user actions should have called all necessary destructors.
11435 Simplify code with YYCHK.
11436 * tests/glr-regression.at (Corrupted semantic options if user action
11437 cuts parse): New test case.
11438 (Undesirable destructors if user action cuts parse): New test case.
11439 Before applying any of this patch, this test case never actually failed
11440 for me... but only because the corrupted semantic options usually
11441 masked this bug.
11442 (Leaked merged semantic value if user action cuts parse): New test
11443 case.
11444
6ec2c0f2
AD
114452006-01-05 Akim Demaille <akim@epita.fr>
11446
11447 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
11448
1b9c21fb
PE
114492006-01-04 Paul Eggert <eggert@cs.ucla.edu>
11450
11451 * data/c.m4 (b4_c_modern): New macro, with a new provision for
11452 _MSC_VER. Problem reported by Cenzato Marco.
11453 (b4_c_function_def): Use it.
11454 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
11455 b4_c_modern.
11456 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
11457 than rolling our own.
11458
84866159
AD
114592006-01-04 Akim Demaille <akim@epita.fr>
11460
11461 Also warn about non-used mid-rule values.
11462 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
11463 member.
11464 (symbol_list_new): Adjust.
11465 * src/reader.c (symbol_typed_p): New.
11466 (grammar_rule_check): Use it.
11467 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
11468 Check its rule.
11469 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
11470 Use it.
11471 * tests/actions.at (Exotic Dollars): Adjust.
11472
378f4bd8
AD
114732006-01-04 Akim Demaille <akim@epita.fr>
11474
11475 * src/reader.c (grammar_midrule_action): If $$ is set in a
11476 mid-rule, move the `used' bit to its lhs.
11477 * tests/input.at (Unused values): New.
11478 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
11479
e2a21b6f
PE
114802006-01-03 Paul Eggert <eggert@cs.ucla.edu>
11481
54662697
PE
11482 * doc/bison.texinfo (Bison Options): Say more accurately what
11483 --yacc does.
11484 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
11485 about declarations in the grammar when in Yacc mode, as POSIX does
11486 not require a diagnostic when the grammar uses extensions.
11487
11488 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
11489
073f9288
PE
11490 Warn about dubious constructions like "%token T T".
11491 Reported by twlevo.
11492 * src/symtab.h (struct symbol.declared): New member.
11493 * src/symtab.c (symbol_new): Initialize it to false.
11494 (symbol_class_set): New arg DECLARING, specifying whether
11495 this is a declaration that we want to warn about, if there
11496 is more than one of them. All uses changed.
11497
1221b78a
PE
11498 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
11499 Allow multiple %union directives, whose contents concatenate.
11500 * src/parse-gram.y (grammar_declaration): Likewise.
11501 Use muscle_code_grow, so that we don't need stype_line any more.
11502 All uses changed.
11503
11504 * src/muscle_tab.c (muscle_grow): Fix comment.
11505
e2a21b6f
PE
11506 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
11507 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
11508 Update copyright year to 2006.
11509
8f7e3cf9
AD
115102006-01-03 Akim Demaille <akim@epita.fr>
11511
11512 Have glr.cc pass (some of) the calc.at tests.
11513 * data/glr.cc (b4_parse_param_orig): New.
11514 (b4_parse_param): Improve its definition, and bound it more
11515 clearly in the skeleton.
11516 (b4_epilogue): Append, instead of prepending, in order to keep
11517 #line consistency.
11518 Simplify the generation of auxiliary functions: locations and
11519 purity are mandated.
11520 (b4_global_tokens_and_yystype): Honor it.
11521 * data/location.cc (c++.m4): Don't include it.
11522 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
11523 and AT_SKEL_CC_IF.
11524 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
11525 AT_LALR1_CC_IF.
11526 Be sure to initialize the first position's filename.
11527 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
11528 mandated anyway.
11529 (AT_CHECK_CALC_GLR_CC): New.
11530 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
11531
3953ed88
AD
115322006-01-02 Akim Demaille <akim@epita.fr>
11533
11534 * src/output.c (output_skeleton): Don't hard wire the inclusion of
11535 c.m4.
0a96ba81 11536 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
11537 * data/glr.cc: Do not include stack.hh.
11538
9ecafbbf
AD
115392006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
11540
11541 * data/glr.c: Reformat whitespace with tabs.
11542 (b4_lpure_formals): Remove this unused m4 macro.
11543 * tests/cxx-type.at: Reformat whitespace with tabs.
11544 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
11545 since it's a member. Rename type to isNterm for clarity.
11546
c4d497a0
AD
115472005-12-29 Akim <akim@sulaco.local>
11548
11549 Let glr.cc catch up with symbol_value_print.
11550 * data/glr.cc (b4_yysymprint_generate): Replace by...
11551 (b4_yy_symbol_print_generate): this.
11552 (yy_symbol_print, yy_symbol_value_print): Declare them.
11553
4517da37
PE
115542005-12-28 Paul Eggert <eggert@cs.ucla.edu>
11555
11556 * src/location.h (boundary): Note that a line or column equal
11557 to INT_MAX indicates an overflow.
11558 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
11559 (rule_length_overflow, increment_rule_length, add_column_width):
11560 New functions.
11561 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
11562 (<SC_BRACED_CODE>"}"):
11563 Use increment_rule_length rather than incrementing it by hand.
11564 (adjust_location, handle_syncline): Diagnose overflow.
11565 (handle_action_dollar, handle_action_at):
11566 Fix bug with monstrosities like $-2147483648.
11567 Remove now-unnecessary checks.
11568 (scan_integer): Verify assumptions and remove now-unnecessary checks.
11569 (convert_ucn_to_byte): Verify assumptions.
11570 (handle_syncline): New arg LOC. All callers changed.
11571 Don't store through a value derived from char const * pointer.
11572
11573 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
11574 GCC warnings.
11575
e3233bf6
PE
115762005-12-27 Paul Eggert <eggert@cs.ucla.edu>
11577
11578 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
11579 Remove unnecessary forward static decls.
11580
8f3596a6
AD
115812005-12-27 Akim Demaille <akim@epita.fr>
11582
11583 * src/reader.c (grammar_current_rule_check): Also check that $$
11584 is used.
11585 Take the rule to check as argument, hence rename as...
11586 (grammar_rule_check): this.
11587 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
11588 Rename as...
11589 (grammar_rule_begin, grammar_rule_end): these, for consistency.
11590 (grammar_midrule_action, grammar_symbol_append): Now static.
11591 * tests/torture.at (input): Don't rely on the default action
11592 being always performed.
11593 * tests/calc.at: "Set" $$ even when the action is "cut" with
11594 YYERROR or other.
11595 * tests/actions.at (Exotic Dollars): Instead of using unused
11596 values, check that the warning is issued.
11597
721be13c
PE
115982005-12-22 Paul Eggert <eggert@cs.ucla.edu>
11599
11600 * NEWS: Improve wording for unused-value warnings.
11601
a0af42fc
AD
116022005-12-22 Akim Demaille <akim@epita.fr>
11603
11604 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
11605 (b4_yysymprint_generate): Rename as...
11606 (b4_yy_symbol_print_generate): this.
11607 Generate yy_symbol_print instead of yysymprint.
11608 Generate also yy_symbol_value_print, and use it.
11609
affac613
AD
116102005-12-22 Akim Demaille <akim@epita.fr>
11611
721be13c 11612 * NEWS: Warn about unused values.
affac613
AD
11613 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
11614 a `used' member.
11615 (symbol_list_n_get, symbol_list_n_used_set): New.
11616 (symbol_list_n_type_name_get): Use symbol_list_n_get.
11617 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
11618 * src/reader.c (grammar_current_rule_check): Check that values are
11619 used.
11620 * src/symtab.c (symbol_print): Accept 0.
11621 * tests/existing.at: Remove the type information.
11622 Empty the actions.
11623 Remove useless actions (beware of mid-rule actions: perl -000
11624 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
11625 * tests/actions.at (Exotic Dollars): Use unused values.
11626 * tests/calc.at: Likewise.
11627 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11628 Likewise.
11629
11630 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
11631 rule_useful_p.
11632
9d9b8b70
PE
116332005-12-21 Paul Eggert <eggert@cs.ucla.edu>
11634
8bb4c753
PE
11635 Undo 2005-12-01 tentative license wording change. The wording is
11636 still being reviewed by the lawyers, and we don't want to wait for
11637 them before publishing a test release. For now, revert to the
11638 previous wording.
11639 * NEWS: Undo 2005-12-01 change.
11640 * data/glr.c: Revert to previous license wording.
11641 * data/glr.cc: Likewise.
11642 * data/lalr1.cc: Likewise.
11643 * data/location.cc: Likewise.
11644 * data/yacc.c: Likewise.
11645
9d9b8b70
PE
11646 * NEWS: Reword %destructor vs YYABORT etc.
11647 * data/glr.c: Use American spacing, for consistency.
11648 * data/glr.cc: Likewise.
11649 * data/lalr1.cc: Likewise.
11650 * data/yacc.c: Likewise.
11651 * data/yacc.c: Reformat comments slightly.
11652 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
11653 for consistency. Fix some spelling errors and reword recently-included
11654 text slightly.
11655 * tests/cxx-type.at: Cast results of malloc, for C++.
11656
2c3b392a
AD
116572005-12-21 Joel E. Denny <address@hidden>
11658
11659 * tests/cxx-type.at: Construct a tree, count the parents of shared
11660 nodes, and free each node once and only once. Previously, the memory
11661 for semantic values was leaked instead.
11662
d6cff4dc
AD
116632005-12-21 Joel E. Denny <address@hidden>
11664
11665 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
11666 (yylval, yylloc): If pure, #define to yystackp->yyval and
11667 yystackp->yyloc similar to yychar and yynerrs.
11668 (yyparse): If pure, remove local yylval and yylloc. Add local
11669 yystackp to accommodate pure definitions of yylval and yylloc.
11670 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
11671 yylvalp and yyllocp to &yylval and &yylloc.
11672 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
11673 namespace. Previously, nerrs and char were missing, but lval and lloc
11674 weren't necessary.
11675 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
11676 yylvalp and yyllocp parameters since, if pure, these are now always
11677 accessible through yystackp. If not pure, they are still accessible
11678 globally.
11679 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
11680 `if (YYID (N))' to pacify lint.
11681
a85284cf
AD
116822005-12-21 Akim Demaille <akim@epita.fr>
11683
11684 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
11685 destroy the RHS symbols of a rule.
11686 * data/yacc.c (yylen): Initialize to 0.
11687 Keep its value to the number of items to possibly shift.
11688 In particular, a regular successful parse that ends on YYFINAL by
11689 a (internal) YYACCEPT must not have yylen != 0.
11690 (yyerrorlab, yyreturn): Pop the RHS.
11691 Reorder a bit to emphasize the `shifting' bits of code.
11692 (YYPOPSTACK): Now accept a number of items to pop.
11693 * data/lalr1.cc: Likewise.
11694 * data/glr.c: Formatting changes.
11695 Use goto instead of fall through.
11696 * doc/bison.texinfo (Destructor Decl): Complete.
11697
d508c281
JMG
116982005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11699
11700 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11701 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
11702 * djgpp/config.bat: Replace every occurence of the file name
11703 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11704 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11705 * djgpp/config.sed: Replace every occurence of the file name
11706 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11707 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11708 * djgpp/djunpack.bat: DJGPP specific file.
11709 * djgpp/fnchange.lst: DJGPP specific file.
11710 * djgpp/README.in: Add new information about how to unpack the bison
11711 source on MSDOS and other systems which have 8.3 file name restrictions
11712 using djunpack.bat and fnchange.lst.
11713
3e7a2cd9
PE
117142005-12-12 Paul Eggert <eggert@cs.ucla.edu>
11715
11716 * bootstrap (build_cvs_prefix): Remove; unused.
11717 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
11718 when getting gnulib.
11719
117202005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
11721
11722 * data/glr.c: Reorder typedef declarations for structs to match order
11723 of struct declarations.
11724 Rename yystack everywhere to yystackp except in yyparse where it's not
11725 a pointer.
11726 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
11727 consistency.
11728 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
11729 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
11730 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
11731 lint.
11732
877519f8
PE
117332005-12-09 Paul Eggert <eggert@cs.ucla.edu>
11734
0eca5a39
PE
11735 * tests/sets.at (Accept): Fix typos in regular expression used to
11736 sed out the final state number.
11737
2cec9080
PE
11738 Work around portability problem on Solaris 10: flex-generated
11739 files include <stdio.h> before <config.h>, which messes up
11740 because the latter defines __EXTENSIONS__. Address the problem
11741 by creating two new little files that include <config.h> first,
11742 then include the flex-generated files. Rewrite everyone else
11743 to include <config.h> first, as well.
11744 * lib/timevar.c: Always include "config.h".
11745 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
11746 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
11747 (EXTRA_bison_SOURCES): New macro.
11748 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
11749 * src/system.h: Don't include config.h.
11750 * src/LR0.c: Include <config.h> first.
11751 * src/assoc.c: Likewise.
11752 * src/closure.c: Likewise.
11753 * src/complain.c: Likewise.
11754 * src/conflicts.c: Likewise.
11755 * src/derives.c: Likewise.
11756 * src/files.c: Likewise.
11757 * src/getargs.c: Likewise.
11758 * src/gram.c: Likewise.
11759 * src/lalr.c: Likewise.
11760 * src/location.c: Likewise.
11761 * src/main.c: Likewise.
11762 * src/muscle_tab.c: Likewise.
11763 * src/nullable.c: Likewise.
11764 * src/output.c: Likewise.
11765 * src/parse-gram.y: Likewise.
11766 * src/print.c: Likewise.
11767 * src/print_graph.c: Likewise.
11768 * src/reader.c: Likewise.
11769 * src/reduce.c: Likewise.
11770 * src/relation.c: Likewise.
11771 * src/state.c: Likewise.
11772 * src/symlist.c: Likewise.
11773 * src/symtab.c: Likewise.
11774 * src/tables.c: Likewise.
11775 * src/uniqstr.c: Likewise.
11776 * src/vcg.c: Likewise.
11777
877519f8
PE
11778 * src/parse-gram.y: Fix minor problems uncovered by lint.
11779 (current_lhs, current_lhs_location): Now static.
11780 (current_assoc): Remove unused variable.
11781
11782 Cleanups so that Bison-generated parsers have less lint.
11783 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
11784 Prepend /*ARGSUSED*/, for lint's sake.
11785 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
11786 definition if 'lint' is defined.
11787 (YYID): New macro (or function, if lint).
11788 All uses of /*CONSTCOND*/0 replaced by YYID(0).
11789 * data/yacc.c: Likewise.
11790 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
11791 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
11792 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
11793 is C++ only.
11794 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
11795 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
11796 Use YYID(0) rather than 0, for lint.
11797 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
11798 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
11799
f5228370
PE
118002005-12-07 Paul Eggert <eggert@cs.ucla.edu>
11801
11802 * tests/glr-regression.at
11803 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11804 Close memory leak reported by twlevo.
11805
69ce078b
PE
118062005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
11807
6ff99711
PE
11808 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
11809 all stacks.
11810 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
11811 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11812 New test case.
11813 (Duplicated user destructor for lookahead): This test now is expected
11814 to succeed.
11815
af3412cd
PE
118162005-12-01 Paul Eggert <eggert@cs.ucla.edu>
11817
32b5b719 11818 * NEWS: Document the following change.
af3412cd
PE
11819 * data/yacc.c: Say "parser skeleton" rather than "file", since
11820 it's no longer just a file.
11821 * data/glr.c: Grant a special exception for C GLR parsers, that
11822 reads like the already-existing exception for C LALR(1) parsers.
11823 * data/glr.cc: Likewise.
11824 * data/lalr1.cc: Likewise.
11825 * data/location.cc: Likewise.
11826 * data/yacc.c: Reword the "written by" statement to clarify that
11827 it was the parser skeleton, not the entire output file.
11828 * data/glr.c: Written by Paul Hilfinger.
11829 * data/glr.cc: Written by Akim Demaille.
11830 * data/lalr1.cc: Likewise.
11831
035aa4a0
PE
118322005-11-18 Paul Eggert <eggert@cs.ucla.edu>
11833
d9963c85
PE
11834 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
11835 Fix typos in previous change that broke 'make check'.
11836 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
11837 supported in C.
11838 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
11839 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
11840 We can revert this once things settle down.
11841
035aa4a0
PE
11842 * src/conflicts.c (conflicts_print): Don't print file name twice
11843 when %expect fails because there were no conflicts.
11844 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
11845 change.
11846 * tests/conflicts.at (%expect not enough, %expect too much):
11847 (%expect with reduce conflicts): Adjust to new behavior.
11848
118492005-11-18 Akim Demaille <akim@epita.fr>
11850
11851 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
11852 errors.
11853 * NEWS: Document this.
11854 * doc/bison.texinfo (Expect Decl): Likewise.
11855
d1ff7a7c
AD
118562005-11-16 Akim Demaille <akim@epita.fr>
11857
11858 Generalize the display of semantic values and locations in traces.
11859 * data/glr.c (yy_reduce_print): Fix indices (again).
11860 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
11861 literal integers.
11862 * data/lalr1.cc (yyreduce_print): Rename as...
11863 (yy_reduce_print): this.
11864 Display values and locations.
11865 * data/yacc.c (yy_reduce_print): Likewise.
11866 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
11867 (yysymprint): Move higher to be visible from yy_reduce_print).
11868 (yyparse): Adjust.
11869 * tests/calc.at: Adjust the expected length of the traces.
11870
6de5398d
AD
118712005-11-14 Akim Demaille <akim@epita.fr>
11872
11873 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
11874 from 1 to N, while values and location start at 0.
11875 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
11876
a1373f55
AD
118772005-11-14 Akim Demaille <akim@epita.fr>
11878
11879 * data/glr.c (yy_reduce_print): Fix the $ number.
11880
613d8952
AD
118812005-11-14 Akim Demaille <akim@epita.fr>
11882
11883 "Use" parse parameters.
11884 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
11885 * data/glr.c, data/glr.cc: Use them.
11886 * data/glr.c (YYUSE): Have a C++ definition that supports
11887 non-pointer types.
11888
b2741627
AD
118892005-11-14 Akim Demaille <akim@epita.fr>
11890
11891 * data/glr.c (yyexpandGLRStack): Declare only if defined.
11892
5059b5c8
AD
118932005-11-14 Akim Demaille <akim@epita.fr>
11894
42249483
AD
11895 * data/glr.cc: New.
11896 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 11897
4626a15d
AD
118982005-11-12 Akim Demaille <akim@epita.fr>
11899
11900 Let position and location be PODs.
11901 * data/location.cc (position::initialize, location::initialize): New.
11902 (position::position, location::location): Define only if
11903 b4_location_constructors is defined.
11904 * data/lalr1.cc (b4_location_constructors): Define it for backward
11905 compatibility.
11906 * doc/bison.texinfo (Initial Action Decl): Use initialize.
11907
119082005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
11909
11910 * data/lalr1.cc: Move the body of the ctor and dtor into the
11911 parser file (instead of the header).
11912 Wrap the implementations in a "namespace yy".
11913
119142005-11-12 Akim Demaille <akim@epita.fr>
11915
11916 Have glr.c include its header file when created.
11917 * data/glr.c (b4_shared_declarations): New.
11918 Output them verbatim in the parser if !%defines, otherwise
11919 output then in the header file, and include it instead.
11920
1989d947
AD
119212005-11-11 Akim Demaille <akim@epita.fr>
11922
11923 * data/glr.c: Comment changes.
11924
119252005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
11926
11927 When yydebug, report semantic and location values for reductions.
11928 * data/glr.c (yy_reduce_print): Report the semantic values and the
11929 locations.
11930 (YY_REDUCE_PRINT): Adjust.
11931 (yyglrReduce): Use them.
11932 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
11933 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
11934 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
11935 traces.
11936
02998094
AD
119372005-11-10 Akim Demaille <akim@epita.fr>
11938
11939 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
11940 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
11941 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
11942
5210672f
PE
119432005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
11944
11945 * m4/cxx.m4, examples/Makefile.am: Don't build
11946 examples/calc++ if no C++ compiler is available. (trivial change)
11947
a8991a1d
AD
119482005-11-09 Akim Demaille <akim@epita.fr>
11949
11950 * src/scan-skel.l: Use a couple of asserts.
11951
36b5e963
AD
119522005-11-03 Akim Demaille <akim@epita.fr>
11953
11954 In some (weird) cases, the final state number is incorrect.
11955 Reported by Alexandre Duret-Lutz.
11956 * src/LR0.c (state_list_append): Remove the computation of
11957 final_state.
11958 (save_reductions): Do it here.
11959 (get_state): Alpha conversion.
11960 (generate_states): Use a for loop.
11961 * src/gram.h (item_number_is_rule_number)
11962 (item_number_is_symbol_number): New.
11963 * src/state.c: Use assert.
11964 * src/system.h: Include assert.h.
11965 * tests/sets.at (Accept): New.
11966
44e7ead1
PH
119672005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11968
11969 * data/glr.c (yyfill): Adjust comment.
36b5e963 11970 (yyresolveAction): Initialize default location properly
44e7ead1
PH
11971 for empty right-hand sides.
11972 (yydoAction): Ditto.
11973 Add comment explaining apparently dead code.
36b5e963
AD
11974 * tests/glr-regression.at
11975 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 11976 New test.
36b5e963 11977
e10a80ee
PE
119782005-10-30 Paul Eggert <eggert@cs.ucla.edu>
11979
11980 * bootstrap (cleanup_gnulib): New function. Use it to clean up
11981 gnulib when interrupted. This fixes some race conditions and
11982 works around some portability problems (one noted by Paul
11983 Hilfinger).
11984
067b32ee
AD
119852005-10-22 Akim <akim@epita.fr>
11986
11987 * Makefile.cfg: Adjust to config -> build-aux.
11988 Reported by twledo.
11989
4b367315
AD
119902005-10-21 Akim Demaille <akim@epita.fr>
11991
11992 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
11993 the %parse-params.
11994 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
11995 * data/yacc.c (b4_Pure_if): Rename as...
11996 (b4_yacc_pure_if): this.
11997 (YY_SYMBOL_PRINT, yyparse): Adjust.
11998 * doc/bison.texinfo: Formatting changes.
11999
24cc23d9
AD
120002005-10-21 Akim Demaille <akim@epita.fr>
12001
12002 Finish the transition config -> build-aux.
12003 * configure.ac, Makefile.am: Use build-aux.
12004 * config/prev-version, config/announce-gen, config/Makefile.am:
12005 Move to...
12006 * build-aux/prev-version, build-aux/announce-gen,
12007 * build-aux/Makefile.am: here.
12008
d4476375
AD
120092005-10-14 Akim Demaille <akim@epita.fr>
12010
12011 * examples/calc++/test: Use set -x only when VERBOSE.
12012
302c0aee
PE
120132005-10-13 Paul Eggert <eggert@cs.ucla.edu>
12014
12015 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
12016 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
12017
7625ec2c
AD
120182005-10-13 Akim Demaille <akim@epita.fr>
12019
12020 * src/scan-skel.l: Output the base name parts of the parser and
12021 header file names.
302c0aee 12022 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
12023 additional checks.
12024 Use this to exercise C++ outputs in subdirs.
12025 Reported by Oleg Smolsky.
12026
ba0fe3c7
PE
120272005-10-12 Paul Eggert <eggert@cs.ucla.edu>
12028
12029 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
12030 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
12031 Problem reported by John P. Hartmann.
12032 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
12033 already defined it.
12034
9b8a5ce0
AD
120352005-10-12 Akim Demaille <akim@epita.fr>
12036
12037 * src/parse-gram.y (version_check): Exit 63 to please missing
12038 (stands for "version mismatch).
12039 * tests/input.at, doc/bison.texinfo: Adjust.
12040
4f6e011e
PE
120412005-10-10 Paul Eggert <eggert@cs.ucla.edu>
12042
12043 Work around portability problems with Visual Age C compiler
12044 (xlc and xlC_r) reported by John P. Hartmann.
12045 * data/location.cc (initial_column, initial_line): Remove.
12046 All uses replaced by 0 and 1.
12047 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
12048 that xlc complains about.
12049 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 12050 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 12051 as __STDC__.
4d7aa45e
PE
12052 * data/yacc.c (YYMODERN_C): New macro, which also looks at
12053 __STDC_VERSION__. Use it everywhere instead of looking at
12054 __STDC__ and __cplusplus.
4f6e011e 12055
a1b3bf8c
AD
120562005-10-10 Akim Demaille <akim@epita.fr>
12057
12058 * examples/calc++/test: Be quiet unless VERBOSE.
12059
412e44aa
PE
120602005-10-05 Paul Eggert <eggert@cs.ucla.edu>
12061
2a4647a3
PE
12062 * data/c.m4 (yydestruct, yysymprint):
12063 Use YYUSE instead of casting to void.
12064 * data/glr.c (YYUSE): New macro.
12065 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
12066 Use it instead of rolling our own.
12067 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
12068 (YYCHK1):
12069 Use /*CONSTCOND*/ to suppress lint warnings.
12070 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
12071 (YY_STACK_PRINT): Use 'false' not '0'.
12072 (YYUSE): New macro.
12073 (yysymprint_, yydestruct_): Use it instead of rolling our own.
12074 * data/yacc.c (YYUSE): New macro.
12075 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
12076 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
12077 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
12078
12079
412e44aa
PE
12080 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
12081 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
12082
88c6637f
PE
120832005-10-04 Paul Eggert <eggert@cs.ucla.edu>
12084
2f4f028d
PE
12085 Undo the parts of the unlocked-I/O change that substituted
12086 putc or puts for printf. This might hurt performance a bit,
12087 but some people prefer the printf style.
12088 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
12089 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
12090 All uses replaced by YYFPRINTF and YYDPRINTF.
12091 * data/yacc.c: Likewise.
12092 * lib/bitset.c (bitset_print): Likewise.
12093 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
12094 putc and puts.
12095 * lib/lbitset.c (debug_lbitset): Likewise.
12096 * src/closure.c (print_firsts, print_fderives): Likewise.
12097 * src/gram.c (grammar_dump): Likewise.
12098 * src/lalr.c (look_ahead_tokens_print): Likewise.
12099 * src/output.c (escaped_output): Likewise.
12100 (user_actions_output): Break apart two printfs.
12101 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
12102 * src/reduce.c (reduce_print): Likewise.
12103 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
12104 * src/system.h: Include unlocked-io.h rathe than stdio.h.
12105
88c6637f
PE
12106 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
12107 Use assignments rather than casts-to-void to suppress
12108 unused-variable warnings. This pacifies 'lint'.
12109 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
12110 unused-variable warnings.
12111
fb32e373
JMG
121122005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
12113
12114 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
12115
edb8f44f
PE
121162005-10-02 Paul Eggert <eggert@cs.ucla.edu>
12117
fb9c0b33
PE
12118 Use unlocked I/O for a minor performance improvement on hosts like
12119 GNU/Linux and Solaris that support unlocked I/O. The basic idea
12120 is to use the gnlib unlocked-io module, and to prefer putc and
12121 puts to printf when either will work (since the latter doesn't
12122 come in an unlocked flavor).
12123 * bootstrap (gnulib_modules): Add unlocked-io.
12124 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
12125 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
12126 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
12127 and similarly for puts and putc and printf.
12128 * data/yacc.c: Likewise.
12129 * lib/bitset.c (bitset_print): Likewise.
12130 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
12131 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
12132 to printf.
12133 * lib/lbitset.c (debug_lbitset): Likewise.
12134 * src/closure.c (print_firsts, print_fderives): Likewise.
12135 * src/gram.c (grammar_dump): Likewise.
12136 * src/lalr.c (look_ahead_tokens_print): Likewise.
12137 * src/output.c (escaped_output): Likewise.
12138 (user_actions_output): Coalesce two printfs.
2f4f028d 12139 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
12140 * src/reduce.c (reduce_print): Likewise.
12141 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 12142 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 12143
edb8f44f
PE
12144 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
12145 this confuses xgettext.
12146
b50d2359
AD
121472005-10-02 Akim Demaille <akim@epita.fr>
12148
12149 * bootstrap (gnulib_modules): Add strverscmp.
12150 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
12151 * m4/.cvsignore: Add strverscmp.m4.
12152 * src/parse-gram.y (%require): New token, new rule.
12153 (version_check): New.
12154 * src/scan-gram.l (%require): Adjust.
12155 * tests/input.at (AT_REQUIRE): New.
12156 Use it.
12157 * doc/bison.texinfo (Require Decl): New.
12158 (Calc++ Parser): Use %require.
12159
21667f64
AD
121602005-10-02 Akim Demaille <akim@epita.fr>
12161
12162 * data/location.cc: New.
12163
2b81e969
AD
121642005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
12165 Akim Demaille <akim@epita.fr>
12166
12167 Make sure -odir/foo.cc creates dir/location.hh etc.
12168 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
12169 (spec_file_prefix, spec_verbose_file, spec_graph_file)
12170 (spec_defines_file): Now const.
12171 (dir_prefix): New.
12172 (short_base_name): Remove.
12173 * src/files.c: Adjust.
12174 (dirname.h): Include.
12175 (base_name): Don't prototype it.
12176 (finput): Remove, duplicates gram_in.
12177 (full_base_name, short_base_name): Replace by...
12178 (all_but_ext, all_but_tab_ext): these.
12179 (compute_base_names): Rename as...
12180 (compute_file_name_parts): this.
12181 Update to compute the new variables, including dir_prefix.
12182 Adjust dependencies.
12183 * src/output.c (prepare): Output them.
12184 * src/reader.c: Adjust to use gram_in, not finput.
12185 * src/scan-skel.l (@dir_prefix@): New.
12186
ad6a9b97
JMG
121872005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
12188
12189 * lib/subpipe.c: New function end_of_output_subpipe() added
12190 to allow support for non-posix systems. This is a no-op function
12191 for posix systems.
12192
12193 * lib/subpipe.h: New function end_of_output_subpipe() added
12194 to allow support for non-posix systems. This is a no-op function
12195 for posix systems.
12196
12197 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
12198 handle the lack of pipe/fork functionality on non-posix systems.
12199
12200 * djgpp/Makefile.maint: DJGPP specific file.
12201
12202 * djgpp/README.in: DJGPP specific file.
12203
12204 * djgpp/config.bat: DJGPP specific configuration file.
12205
12206 * djgpp/config.sed: DJGPP specific configuration file.
12207
12208 * djgpp/config.site: DJGPP specific configuration file.
12209
12210 * djgpp/config_h.sed: DJGPP specific configuration file.
12211
12212 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
12213
12214 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
12215
fc695704
AD
122162005-10-02 Akim Demaille <akim@epita.fr>
12217
12218 * data/location.cc: New, extract from...
12219 * data/lalr1.cc: here.
12220 (location.hh): Include it after the user prologue, in case the
12221 filename type is defined by the user.
12222 Forward declation location and position before the pre-prologue.
12223 (yyresult_): Rename as...
12224 (yyresult): this, it's a local variable, not an attribute.
12225 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
12226
122272005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
12228
12229 * examples/extexi: Restore the #line generation.
12230
fb9712a9
AD
122312005-09-30 Akim Demaille <akim@epita.fr>,
12232 Alexandre Duret-Lutz <adl@gnu.org>
12233
12234 Move the token type and YYSTYPE in the parser class.
12235 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
12236 (parser::token): New, from the moved free definition of tokens.
12237 (parser::semantic_value): Now a full definition instead of an
12238 indirection to YYSTYPE.
12239 (b4_post_prologue): No longer included in the header file, but
12240 in the implementation file.
12241 * doc/bison.texi (C+ Language Interface): Update.
12242 * src/parse-gram.y: Support unary %define.
12243 * tests/actions.at: Define global_tokens_and_yystype for backward
12244 compatibility until we update the tests.
12245 * tests/calc.at: Idem.
12246 (first_line, first_column, last_line, last_column): Define for lalr1.cc
12247 to simplify the code.
12248
55f0c7b1
PE
122492005-09-29 Paul Eggert <eggert@cs.ucla.edu>
12250
12251 Port to SunOS 4.1.4, which lacks strtoul and strerror.
12252 Ah, the good old days! Problem reported by Peter Klein.
12253 * bootstrap (gnulib_modules): Add strerror, strtoul.
12254 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
12255 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
12256
fb9712a9 122572005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
12258
12259 * data/c.m4 (b4_error_verbose_if): New.
12260 * data/lalr1.cc: Use it.
12261 (YYERROR_VERBOSE_IF): Remove.
12262 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
12263 parser members, replaced by...
12264 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
12265 local variables.
12266 (yysyntax_error_): Takes the state number as argument.
12267 (yyreduce_print_): Use the argument yyrule, not the former
12268 attribute yyn_.
12269
8a6f72f3
PE
122702005-09-26 Paul Eggert <eggert@cs.ucla.edu>
12271
12272 * bootstrap (gnulib_modules): Add verify.
12273 * lib/.cvsignore: Add verify.h.
12274 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
12275 * src/system.h (verify): Remove.
12276 Include verify.h instead.
12277 * src/tables.c (tables_generate): Use new API for 'verify'.
12278
0d50976f
PE
122792005-09-21 Paul Eggert <eggert@cs.ucla.edu>
12280
ebc3737e
PE
12281 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
12282 local variables whose names begin with 'yy'.
12283 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
12284 Trivial changes from Joel E. Denny.
12285
0d50976f
PE
12286 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
12287 it itself.
12288 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
12289 don't use alloca any more.
12290
12291 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
12292 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 12293 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
12294 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
12295 to match yacc.c, to test more hosts.
12296
a05b79df
PE
122972005-09-20 Paul Eggert <eggert@cs.ucla.edu>
12298
55289366
PE
12299 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
12300 doesn't affect behavior.
12301 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
12302 Solaris, AIX, MSC.
12303 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
12304 This works a bit better with glibc, if user code has already included
12305 stdlib.h.
12306 * doc/bison.texinfo (Bison Parser): Document that users can't
12307 arbitrarily use malloc and free for other purposes. Document
12308 that <alloca.h> and <malloc.h> might be included.
12309 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
12310 user must declare alloca.
12311
a05b79df
PE
12312 * HACKING (release): Forwarn the Translation Project about
12313 stable releses.
12314
3ab2ca22
AD
123152005-09-20 Akim Demaille <akim@epita.fr>
12316
12317 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
12318
a9739e7c
PE
123192005-09-19 Paul Eggert <eggert@cs.ucla.edu>
12320
a702593e
PE
12321 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
12322 (YYSTACK_ALLOC_MAXIMUM): Use it.
12323 (yysyntax_error): New function.
12324 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
12325 multiple syntax errors are reported, and alloca is being used.
12326 Instead, reallocate buffers twice as big each time, so that
12327 we waste at most half the allocated memory. Start with a small
12328 (128-byte) buffer that will suffice in most cases anyway.
12329 Use yysyntax_error to do most of the work.
12330
12331 * doc/bison.texinfo (Error Reporting, Table of Symbols):
12332 yynerrs is the number of errors reported, not the number of
12333 errors encountered.
12334
a9739e7c
PE
12335 * tests/glr-regression.at (Duplicated user destructor for lookahead):
12336 Mark it as expected to fail.
12337 Cast result of malloc; problem reported by twlevo@xs4all.nl.
12338 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
12339 Don't start user-code symbols with "yy", to avoid name space problems.
12340
f479c6c6
AD
123412005-09-19 Akim Demaille <akim@epita.fr>
12342
12343 Remove the traits, failed experiment.
12344 It never proved useful, and anyway because of the current
12345 definition, it was not possible to have several specialization of
12346 this traits, making it useless.
12347 * data/lalr1.cc (yy:traits): Remove.
12348 Inline its definitions in the parser class.
12349
e2586f82
AD
123502005-09-19 Akim Demaille <akim@epita.fr>
12351
12352 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
12353 least Mac OSX with a /usr/local install of gettext.
12354
2e8cf949
AD
123552005-09-19 Akim Demaille <akim@epita.fr>
12356
12357 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
12358 and yytoken for similarity with the other skeletons.
12359
c7fb0b90
AD
123602005-09-19 Akim Demaille <akim@epita.fr>
12361
4e26c69e 12362 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 12363
1bd0deda
PE
123642005-09-16 Paul Eggert <eggert@cs.ucla.edu>
12365
12366 * NEWS: Version 2.1.
12367
12368 * NEWS: Remove notice of yytname change, since it was never in an
12369 official release.
12370 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
12371 diagnostic.
12372 * src/output.c (prepare): Likewise.
12373 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
12374 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
12375 is not defined. This is an awful hack, but it's enough for now.
12376 All callers changed.
12377 * tests/glr-regression-at (make_value): Args are const pointers now,
12378 to avoid GCC warning.
12379 (Duplicated user destructor for lookahead): New test. Currently
12380 skipped. It fails on my host but I'm not sure it'll always fail.
12381
123822005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
12383
12384 * src/symtab.h (struct symbol): Declare the printer and destructor
12385 as const, to avoid accidental calls to free.
12386 (symbol_destructor_set, symbol_printer_set): Adjust.
12387 * src/symtab.c: Adjust.
12388
1bd0deda 123892005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
12390
12391 * data/c.m4 (b4_token_enums): New.
12392 (b4_token_defines): Rename as...
12393 (b4_token_enums_defines): this.
12394 (b4_token_defines): New, output only the #defines.
12395 * data/yacc.c, data/glr.c: Adjust.
12396 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
12397 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
12398 as default values.
12399
dbcdae2d
AD
124002005-09-16 Akim Demaille <akim@epita.fr>
12401
12402 * data/lalr1.cc (yylex_): Remove, inline its code.
12403 (yyreport_syntax_error_): Remove, replaced by...
12404 (yysyntax_error_): this which returns a string and leaves to the
12405 caller the call to the users' error function.
12406 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
12407 Move from members of the parser object...
12408 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
12409 to local variables of the parse function.
12410
70d8f291
AD
124112005-09-16 Akim Demaille <akim@epita.fr>
12412
12413 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
12414 since it's in Bison's name space.
12415
b47dbebe
PE
124162005-09-15 Paul Eggert <eggert@cs.ucla.edu>
12417
ae199bf1
PE
12418 * data/glr.c (yyresolveValue): Add default case to pacify
12419 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
12420
b47dbebe
PE
12421 * NEWS: Document when yyparse started to return 2.
12422 * doc/bison.texinfo (Parser Function): Document when yyparse
12423 returns 2.
12424
12425 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
12426 (b4_filename_type): Renamed back from b4_file_name_type. All uses
12427 changed.
12428 (class position): file_name -> filename (reverting). All uses changed.
12429
124302005-09-14 Paul Eggert <eggert@cs.ucla.edu>
12431
12432 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
12433 do anything if $@ exists. This reverts part of the 2005-07-07
12434 patch.
12435
00292f66
PE
124362005-09-11 Paul Eggert <eggert@cs.ucla.edu>
12437
12438 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
12439 contains obsolete information and isn't worth distributing as a
12440 separate file anyway.
12441 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
12442 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
12443 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
12444 (yyparse): Abort if user code uses longjmp to throw an unexpected
12445 value.
12446
a420f962
PE
124472005-09-09 Paul Eggert <eggert@cs.ucla.edu>
12448
00292f66
PE
12449 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
12450 Suggested by twlevo@xs4all.nl.
12451
127287e9
PE
12452 * data/glr.c (YYCHK1): Do not assume YYE is in range.
12453 This avoids a diagnostic from gcc -Wswitch-enum.
12454 Problem reported by twlevo@xs4all.nl.
12455
a420f962
PE
12456 * doc/bison.texinfo: Don't use "filename", as per GNU coding
12457 standards. Use "file name" or "file" or "name", depending on
12458 the context.
12459 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
12460 not to hack/foo.tab.c.
12461 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
12462 * data/glr.c: b4_filename -> b4_file_name.
12463 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
12464 All uses changed.
12465 (class position): filename -> file_name. All uses changed.
12466 * data/yacc.c: b4_filename -> b4_file_name.
12467 * lib/bitset.h: filename -> file_name in local vars.
12468 * lib/bitset_stats.c: Likewise.
12469 * src/files.c: Likewise.
12470 * src/scan-skel.l ("@output ".*\n): Likewise.
12471 * src/files.c (file_name_split): Renamed from filename_split.
12472 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
12473
124742005-09-08 Paul Eggert <eggert@cs.ucla.edu>
12475
12476 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
12477 to accommodate latest gnulib.
12478
12479 * tests/glr-regression.at (Duplicate representation of merged trees):
12480 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
12481
12482 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
12483 needed.
12484
42a6501d
PE
124852005-08-26 Paul Eggert <eggert@cs.ucla.edu>
12486
12487 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
12488 All uses changed. Invoke user destructor after an error during a
12489 split parse (trivial change from Joel E. Denny).
12490
12491 * tests/glr-regression.at
12492 (User destructor after an error during a split parse): New test case.
12493 Problem reported by Joel E. Denny in:
12494 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
12495
ef9a1faf
PE
124962005-08-25 Paul Eggert <eggert@cs.ucla.edu>
12497
5b4aaf78
PE
12498 * README-cvs: Give URLs for recommended tools.
12499 Mention Gzip version problem, and bootstrapping issues.
12500 Remove troubleshooting section, as it's somewhat obsolete.
12501
b5240ba5
PE
12502 * bootstrap (no_cache): New var, to accommodate different wget
12503 variants. Use it instead of '-C off'. Problem reported by
12504 twlevo@xs4all.nl.
12505
ef9a1faf
PE
12506 * data/glr.c (yydestroyStackItem): New function.
12507 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
12508 debugging information. Problem reported by Joel E. Denny.
12509
e6efa9da
AD
125102005-08-25 Akim Demaille <akim@epita.fr>
12511
12512 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
12513
adc90f13
PE
125142005-08-24 Paul Eggert <eggert@cs.ucla.edu>
12515
12516 * data/glr.c (yyrecoverSyntaxError, yyreturn):
12517 Don't invoke destructor on unresolved entries.
12518 * tests/glr-regression.at
12519 (User destructor for unresolved GLR semantic value): New test case.
12520 Problem reported by Joel E. Denny in:
12521 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
12522
f9315de5
PE
125232005-08-21 Paul Eggert <eggert@cs.ucla.edu>
12524
15d29c1f
PE
12525 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
12526 Add strnlen.c.
12527 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
12528 lib-prefix.m4, po.m4.
12529
dd5f2af2
PE
12530 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
12531 in yydestruct diagnostic, since it might not be an error.
12532 Problem reported by Joel Denny near end of
12533 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 12534 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
12535 * data/yacc.c (yyreturn): Likewise.
12536 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
12537
12538 * src/files.c: Remove obsolete FIXME comment.
12539
12540 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
12541 with the other templates, and to fix bogus run-on messages such
12542 as the one reported at the end of
12543 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
12544 All callers changed to avoid the newline.
12545 (yyprocessOneStack): Output two lines rather than one, to accommodate
12546 the above change. This changes the debug output format slightly.
12547
f9315de5
PE
12548 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
12549 reported by Joel E. Denny in
12550 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
12551 (trivial change).
12552 * tests/glr-regression.at (Duplicate representation of merged trees):
12553 New test, from Joel E. Denny in:
12554 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
12555 * THANKS: Add Joel E. Denny.
12556
12557 * configure.ac (AC_INIT): Bump to 2.0c.
12558
04098407
PE
125592005-07-24 Paul Eggert <eggert@cs.ucla.edu>
12560
12561 * NEWS: Version 2.0b.
12562
ca5d2013
PE
12563 * Makefile.am (SUBDIRS): Put examples before tests, so that
12564 "make check" doesn't finish with "All 1 tests passed".
12565
3d54b576
PE
12566 * tests/regression.at (Token definitions): Don't rely on
12567 AT_PARSER_CHECK for data that contains backslashes. It currently
12568 uses 'echo', and 'echo' isn't portable if its argument contains
12569 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
12570 that the byte '\0xff' is not printable in the C locale; it is,
12571 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
12572 not printable, so use '\0x81' to test.
12573
d53ae497
PE
12574 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
12575 version of GCC, since the macro is used with non-GCC compilers.
12576
fc01665e
PE
12577 Fix core dump reported by Pablo De Napoli in
12578 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
12579 * tests/regression.at (Invalid inputs with {}): New test.
12580 * src/parse-gram.y (token_name): Translate type before using
12581 it as an index.
12582
04098407
PE
12583 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
12584 the user's name space. All uses changed to __attribute__
12585 ((__unused__)).
12586 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
12587 Add __attribute__ ((__noreturn__)).
12588
12589 * etc/clcommit: Remove. We weren't using it, and it failed
12590 "make maintainer-distcheck".
12591 * Makefile.maint: Merge from coreutils.
12592 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
12593 (syntax-check-rules): Change list of rules as described below.
12594 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
12595 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
12596 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
12597 (sc_trailing_space): New rules.
12598 (sc_xalloc_h_in_src): Remove.
12599 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
12600 (sc_space_tab, sc_error_exit_success, sc_changelog):
12601 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
12602 (makefile-check, po-check, author_mark_check):
12603 (makefile_path_separator_check, copyright-check):
12604 Use grep -n, to make it easier to find violations.
12605 Use CVS_LIST and CVS_LIST_EXCEPT.
12606 (header_regexp, h_re): Remove.
12607 (dd_c): New macro.
12608 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
12609 (my-distcheck): Use more-modern GCC flags.
12610 (signatures, %.asc): Remove.
12611 (rel-files, announcement): Remove signatures.
12612 Restore old updating code, even though we don't use it, so
12613 that we're the same as coreutils.
12614 (alpha, beta, major): Depend on news-date-check.
12615 Make the upload commands.
12616
12617 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
12618 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
12619 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
12620 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
12621 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
12622 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
12623 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
12624 * tests/sets.at: Likewise.
12625
12626 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
12627 we comment out the Autoconf version number.
12628 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
12629 it's error-prone and "make maintainer-distcheck" rejects it.
12630
12631 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
12632 Indent calls to "error" to pacify "make maintainer-distcheck",
12633 when the calls are not intended to be translated.
12634 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
12635
12636 * src/Makefile.am (DEFS): Use +=, to pacify
12637 "make maintainer-distcheck".
12638 (bison_SOURCES): Add scan-skel.h.
12639 (sc_tight_scope): New rule, from coreutils.
12640
12641 * src/files.c (src_extension, header_extension):
12642 Now static, not extern.
12643 * src/getargs.c (short_options): Likewise.
12644 * src/muscle_tab.c (muscle_table): Likewise.
12645 * src/parse-gram.y (current_class, current_type, current_prec):
12646 Likewise.
12647 * src/reader.c (grammar_end, previous_rule_end): Likewise.
12648 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
12649 * src/main.c (main): Cast bindtextdomain and textdomain calls to
12650 void, to avoid warning when NLS is disabled.
12651 * src/output.c: Include scan-skel.h.
12652 (scan_skel): Remove decl, since scan-skel.h does this.
12653 (output_skeleton):
12654 Indent calls to "error" to pacify "make maintainer-distcheck".
12655 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
12656 * src/reader.h (gram_end, gram_lineno): New decls to pacify
12657 "make maintainer-distcheck".
12658 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
12659 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
12660 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
12661 (skel_lex_destroy, scan_skel): Move these decls to...
12662 * src/scan-skel.h: New file.
12663 * src/uniqstr.c (uniqstr_assert):
12664 Indent calls to "error" to pacify "make maintainer-distcheck".
12665
12666 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
12667 not @VAR@.
12668
12669 * tests/torture.at: Revamp to avoid misuse of atoi that
12670 "make maintainer-distcheck" complained about.
12671
12672 * examples/extexi (message): Don't print a message more than once,
12673 and omit line-number decoration that makes Emacs compile think
12674 that informative messages are worth worrying about.
12675
126762005-07-22 Paul Eggert <eggert@cs.ucla.edu>
12677
12678 * configure.ac: Update version number.
12679
12680 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
12681 accidentally.
12682 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
12683 autogenerated by the maintainer.
12684 * examples/calc++/.cvsignore: Add *.yy.
12685
12686 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
12687 * lib/bitset_stats.c (bitset_stats_init): Likewise.
12688 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12689
12690 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
12691
12692 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
12693 from maintainer-distcheck about casting the argument of 'free'.
12694
12695 * NEWS: Mention recent yytname changes.
12696 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
12697
12698 * bootstrap: For translations that have not yet been upgraded to
12699 the new runtime-po domain, prime the pump by extracting the
12700 relevant strings from the obsolete translations. This code can be
12701 removed once the bison-runtime domain has been translated by each
12702 team.
12703
12704 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
12705 now that token names are already quoted.
12706
12707 Fix problem reported by Anthony Heading.
12708 * data/glr.c (YYTOKEN_TABLE): New macro.
12709 (yytname): Define if YYTOKEN_TABLE.
12710 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
12711 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
12712 (YYERROR_VERBOSE): Define the same way the other skeletons do.
12713 * src/output.c (prepare_symbols): Output token_table_flag.
12714
0ffda363
PE
127152005-07-21 Paul Eggert <eggert@cs.ucla.edu>
12716
12717 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
12718 again if the first call fails.
12719
12720 * data/glr.c (yytnamerr): New function.
12721 (yyreportSyntaxError): Use it to dequote most string literals.
12722 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
12723 with other skeletons. All uses changed.
12724 (yytnameerr_): New function.
12725 (yyreport_syntax_error): Use it to dequote most string literals.
12726 * data/yacc.c (yytnamerr): New function.
12727 (yyerrlab): Use it to decode most string literals.
12728 * doc/bison.texinfo (Decl Summary, Calling Convention):
12729 Clarify quoting convention of yytname.
12730 * src/output.c (prepare_symbols): Quote all names. This undoes
12731 the 2005-04-17 change, which is now accomplished (mostly) via
12732 changes in the parsers as described above.
12733 * tests/regression.at (Token definitions, Web2c Actions):
12734 Undo most 2005-04-17 change here, too.
12735
127362005-07-20 Paul Eggert <eggert@cs.ucla.edu>
12737
12738 Fix more problems reported by twlevo@xs4all.nl.
12739 * tests/cxx-type.at: Don't pipe output of ./types through sed to
12740 remove trailing spaces. This loses the exit status of ./types,
12741 and isn't needed since ./types shouldn't be emitting trailing
12742 spaces.
12743 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
12744 as the stack isn't valid in that case.
12745
12746 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
12747 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
12748 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
12749 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
12750 is used.
12751 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
12752 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
12753 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
12754 Likewise.
12755
12756 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
12757 overly-picky compilers that reject 'char *foo = "bar";'.
12758
12759 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
12760 to FILE * parameter, not to stderr. This fixes a typo introduced
12761 in the 2005-07-12 change.
12762
12763 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
12764 warnings from GCC 4.
12765
12766 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
12767 (yyglrShiftDefer, yysplitStack):
12768 Remove unused parameters b4_pure_formals. All uses changed.
12769 (yyglrShift): Remove unused parameters b4_user_formals.
12770 All uses changed.
12771 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
12772
6100a9aa
PE
127732005-07-18 Paul Eggert <eggert@cs.ucla.edu>
12774
258b75ca
PE
12775 Destructor cleanups and regularization among the three skeletons.
12776 * NEWS: Document the behavior changes.
12777 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
12778 stack before failing, as the cleanup code will do it for us now.
12779 * data/lalr1.cc (yyerrlab): Likewise.
12780 * data/glr.c (yyparse): Pop everything off the stack before
12781 freeing it, so that destructors get called properly.
12782 * data/lalr1.cc (yyreturn): Likewise.
12783 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
12784 This is more consistent.
12785 * doc/bison.texinfo (Destructor Decl): Mention more reasons
12786 why destructors might be called. 1.875 -> 2.1.
12787 (Destructor Decl, Decl Summary, Table of Symbols):
12788 Some English-language cleanups for %destructor.
12789 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12790 Add output line for destructor of start symbol.
12791 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
12792 because of that same extra output line.
12793
1a059451
PE
12794 * NEWS: Document minor wording changes in diagnostics of
12795 Bison-generated parsers.
12796 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
12797 Remove unused formals. All uses changed.
12798 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
12799 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
12800 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
12801 Rename yyoverflowab to yyexhaustedlab.
12802 When memory exhaustion occurs during syntax-error reporting,
12803 report it separately rather than in a single diagnostic; this
12804 eases translation.
12805 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
12806 (Memory Exhausted): Renamed from Parser Stack Overflow.
12807 Revamp wording slightly to prefer "memory exhaustion".
12808 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
12809
97460c78
PE
12810 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
12811
30757c8c
PE
12812 Add i18n support to the GLR skeleton. Partially fix the C++
12813 skeleton; a C++ expert needs to finish this. Remove debugging
12814 msgids; there's little point to having them translated, since they
12815 can be understood only by someone who can read the
12816 (English-language) source code.
12817
12818 Generate runtime-po/bison-runtime.pot automatically, so that we
12819 don't have to worry about garbage getting in that file. We'll
12820 make sure after the next official release that old msgids don't
12821 get lost. See
12822 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
12823
12824 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
12825 Now auto-generated.
12826 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
12827 Fix typos in explanations of the runtime file.
12828 * bootstrap: Change gettext keyword from YYI18N to YY_.
12829 Use standard Makefile.in.in in runtime-po, since we'll arrange
12830 for backward-compatible bison-runtime.po files in a different way.
12831 * data/glr.c (YY_): New macro, from yacc.c.
12832 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
12833 Translate messages intended for users.
12834 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
12835 the wording in the other skeletons. We don't know that the memory
12836 is virtual.
12837 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
12838 Use same method that yacc.c uses.
12839 Don't translate debugging messages.
12840 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
12841 it doesn't work (yet), and requires C++ expertise to fix.
12842 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
12843 Move defn to a more logical place, to be consistent with other
12844 skeletons.
12845 Don't translate debugging messages.
12846 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
12847 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
12848 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
12849 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
12850
ac8c5689
PE
12851 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
12852 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
12853 void, not int.
12854 * tests/glr-regression.at (Badly Collapsed GLR States):
12855 Likewise.
12856 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12857 yylex should return 0 at EOF rather than aborting.
12858
6100a9aa
PE
12859 Improve tests for stack overflow in GLR parser.
12860 Problem reported by twlevo@xs4all.nl.
12861 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
12862 All uses removed.
12863 (yyStackOverflow): Just longjmp, but with value 2 so that caller
12864 can handle the problem.
12865 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
12866 (yyparse): New local variable yyresult to record the result.
12867 Use result of setjmp to set it, rather than storing itinto
12868 struct.
12869 (yyDone): Remove label.
12870 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
12871 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
12872 if YYABORT is used).
12873 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
12874 yyparse status; put status > 1 into diagnostic.
12875 Check that status==2 works.
12876 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
12877 Use exit status 3 for failure to open (which shouldn't happen).
12878
15f40952
PE
128792005-07-17 Paul Eggert <eggert@cs.ucla.edu>
12880
67fd79c4
PE
12881 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
12882 1 on syntax error; just let yyparse do its thing.
12883 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
12884 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
12885 (Exploding the Stack Size with Alloca):
12886 (Exploding the Stack Size with Malloc):
12887 Expect exit status 2, not 1, since the parser is supposed to blow
12888 its stack. Problem reported by twlevo@xs4all.nl.
12889
15f40952
PE
12890 * data/glr.c (yyparse): Don't assume that the initial calls
12891 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
12892 Print a stack-overflow message and fail instead.
12893 Initialize the line-number information before creating the stack,
12894 so that the stack-overflow message can report line zero safely.
12895
f32c66b5
PE
128962005-07-14 Paul Eggert <eggert@cs.ucla.edu>
12897
a22ff96f 12898 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
12899 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
12900 (yyuserMerge): Provide a default case if b4_mergers is empty.
12901 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
12902 * tests/glr-regression.at
12903 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 12904 Add casts to pacify C++ compilers.
1beb0b24
PE
12905 * tests/glr-regression.at (Improper merging of GLR delayed action
12906 sets): Declare yylex before using it.
f32c66b5 12907 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
12908 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
12909 test for valgrind; valgrind is independent of g++.
12910 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
12911 for compatibility with POSIX 1003.1-2001 (if running coreutils).
12912 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
12913 Use a destructor, so that we can expand the stack. Change
12914 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 12915
d741bd1b
PE
129162005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12917
12918 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
12919 a valgrind failure. Problem reported by twlevo@xs4all.nl.
12920
0410a6e0
PE
129212005-07-13 Paul Eggert <eggert@cs.ucla.edu>
12922
12923 * PACKAGING: New file, suggested by Bruno Haible and taken from
12924 similar wording in gettext's PACKAGING file.
12925 * NEWS: Mention PACKAGING.
12926 * Makefile.am (EXTRA_DIST): Add PACKAGING.
12927
f7ab6a50
PE
129282005-07-12 Paul Eggert <eggert@cs.ucla.edu>
12929
baf785db 12930 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
12931 * bootstrap: Get runtime translations into runtime-po.
12932 Create runtime-po files automatically, if possible.
12933 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
12934 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
12935 does not infringe on the user's name space.
12936 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
12937 * doc/bison.texinfo (Internationalization): Revamp the English
12938 and Texinfo syntax a bit, to try to make it clearer.
12939 (Bison Options, Option Cross Key): Mention --print-localedir.
12940 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
12941 YYENABLE_NLS. Quote a bit more.
12942 * runtime-po/.cvsignore: New file.
12943 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
12944 * runtime-po/Rules-quot: Remove; now created by bootstrap.
12945 * runtime-po/quot.sed: Likewise.
12946 * runtime-po/boldquot.sed: Likewise.
12947 * runtime-po/en@quot.header: Likewise.
12948 * runtime-po/en@boldquot.header: Likewise.
12949 * runtime-po/insert-header.sin: Likewise.
12950 * runtime-po/remove-potcdate.sin: Likewise.
12951 * runtime-po/Makevars: Likewise.
12952 * runtime-po/LINGUAS: Likewise.
12953 * runtime-po/de.po: Likewise; we will rely on the translation project
12954 to maintain this, so "bootstrap" should get it.
0410a6e0 12955 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
12956 its value.
12957 * src/main.c (main): Bind the bison-runtime domain, too.
12958
129592005-07-12 Bruno Haible <bruno@clisp.org>
12960
12961 * data/yacc.c: Include <libintl.h> when NLS is enabled.
12962 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
12963 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
12964 * runtime-po: New directory.
12965 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
12966 $(DOMAIN).pot-update rule, so that old messages are never dropped.
12967 * runtime-po/Rules-quot: New file, copied from po/.
12968 * runtime-po/quot.sed: Likewise.
12969 * runtime-po/boldquot.sed: Likewise.
12970 * runtime-po/en@quot.header: Likewise.
12971 * runtime-po/en@boldquot.header: Likewise.
12972 * runtime-po/insert-header.sin: Likewise.
12973 * runtime-po/remove-potcdate.sin: Likewise.
12974 * runtime-po/Makevars: New file.
12975 * runtime-po/POTFILES.in: New file.
12976 * runtime-po/LINGUAS: New file.
12977 * runtime-po/bison-runtime.pot: New file.
12978 * runtime-po/de.po: New file.
12979 * m4/bison.m4: New file.
12980 * Makefile.am (SUBDIRS): Add runtime-po.
12981 (aclocaldir, aclocal_DATA): New variables.
12982 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
12983 Define aclocaldir.
12984 * src/getargs.c (usage): Document --print-localedir option.
12985 (PRINT_LOCALEDIR_OPTION): New enum item.
12986 (long_options): Add --print-localedir option.
12987 (getargs): Handle --print-localedir option.
12988 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
12989 (Internationalization): New section.
12990
22dda0f0
AD
129912005-07-12 Akim Demaille <akim@epita.fr>
12992
12993 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
12994 for consistency with the rest of the code.
12995 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
12996 Add separators.
12997
82b248ad
AD
129982005-07-12 Akim Demaille <akim@epita.fr>
12999
13000 * src/parse-gram.y: Use %printer instead of YYPRINT.
13001
fa0e9314
AD
130022005-07-12 Akim Demaille <akim@epita.fr>
13003
867a3e00
AD
13004 * src/symtab.h, src/symtab.c (symbol_print): New.
13005 * src/symlist.h, src/symlist.c (symbol_list_print): New.
13006 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
13007
130082005-07-12 Akim Demaille <akim@epita.fr>
13009
13010 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
13011 b4_at_dollar and b4_dollar_dollar.
13012
e054b190
PE
130132005-07-11 Paul Eggert <eggert@cs.ucla.edu>
13014
13015 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
13016 and Pennello's paper.
13017
34160ec4
PE
130182005-07-09 Paul Eggert <eggert@cs.ucla.edu>
13019
407d4a75
PE
13020 * data/yacc.c (yyparse): Undo previous patch. Instead,
13021 set yylsp[0] and yyvsp[0] only if the initial action
13022 sets yylloc and yylval, respectively.
13023
34160ec4
PE
13024 * data/yacc.c (yyparse): In the initial action, set
13025 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
13026 This avoids the use of undefined variables if the initial
13027 action does not set yylloc and/or yylval.
13028
c3d5a4a7
PE
130292005-07-07 Paul Eggert <eggert@cs.ucla.edu>
13030
b34d96c1
PE
13031 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
13032 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
13033 Remove from CVS. These files are automatically generated.
13034 * examples/extexi: Clarify that this file is now part of Bison,
13035 not GNU M4, and that it works with any POSIX-compatible Awk.
13036 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
13037 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
13038 so that we also get calc++-parser.yy. Geneate it.
13039 Use $(AWK), not gawk, since any conforming Awk will do.
13040 Put comment before action, since older 'make' can't handle comment
13041 in action.
13042 $(BUILT_SOURCES): List all built sources, not just some of them.
13043 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
13044 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
13045 $($(calc_sources_generated)): Remove unnecessary test for existence
13046 of target. (This had a shell syntax error anyway; a stray "x".)
13047 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
13048 calc++-parser.yy.
13049 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
13050
c3d5a4a7
PE
13051 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
13052 implied by the other modules.
13053
828c373b
AD
130542005-07-06 Akim Demaille <akim@epita.fr>
13055
13056 Bind examples/calc++ to the package.
13057 * examples/calc++/Makefile: Remove, replaced by...
13058 * examples/calc++/Makefile.am: ... this new file.
13059 * examples/calc++/test: Remove input.
13060 * examples/calc++/compile: Remove.
13061 * examples/Makefile.am: New.
13062 * configure.ac, Makefile.am: Adjust.
13063 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
13064
63cb01d6
PE
130652005-07-05 Paul Eggert <eggert@cs.ucla.edu>
13066
fd2df2ed
PE
13067 * data/glr.c (yyFail): Drastically simplify; since the format argument
13068 never had any % directives, we can simply pass it to yyerror.
13069 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
13070 be modified later, as that is the usual style in glr.c.
13071 Problems reported by Paul Hilfinger.
13072
63cb01d6
PE
13073 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
13074 and size overflow errors.
13075 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
13076 in case the user prolog sets feature-test macros like _GNU_SOURCE.
13077 (YYSIZEMAX): New macro.
13078 (yystpcpy): New function, taken from yacc.c.
13079 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
13080 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
13081 so that we don't have to maintain their signatures.
13082 (yyFail): Check for buffer overflow, by using vsnprintf rather
13083 than vsprintf. Allocate a bigger buffer if possible.
13084 Report an error if buffer allocation fails.
13085 (yyStackOverflow): New function.
13086 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
13087 the initialization was successful. It might fail if storage was
13088 exhausted.
13089 (yyexpandGLRStack): Add more checks for storage allocation failure.
13090 Use yyStackOverflow to report failures.
13091 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
13092 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
13093 Don't assume stack number fits in int.
13094 (yysplitStack): Check for storage allocation failure.
13095 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
13096 can print diagnostics on storage allocation failure. All callers
13097 changed.
13098 (yyresolveValue): Use yybool for boolean.
13099 (yyreportSyntaxError): Check for size-calculation overflow.
13100 This code is taken from yacc.c.
13101 (yyparse): Check for storage allocation errors when allocating
13102 the initial stack.
13103
1c59e0a1
AD
131042005-07-05 Akim Demaille <akim@epita.fr>
13105
13106 Extract calc++ from the documentation.
13107 * doc/bison.texinfo (Calc++): Add the extraction marks.
13108 * examples/extexi: New, from the aborted GNU Programming 2E.
13109 Separate the different paragraph of a file with empty lines.
13110 * examples/Makefile: Use it to extract the whole calc++ example.
13111
8a0adb01
AD
131122005-06-24 Akim Demaille <akim@epita.fr>
13113
13114 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
13115 class typedefs.
13116
12545799
AD
131172005-06-22 Akim Demaille <akim@epita.fr>
13118
13119 * doc/bison.texinfo (C++ Language Interface): First stab.
13120 (C++ Parsers): Remove.
13121
99be0235
AD
131222005-06-22 Akim Demaille <akim@epita.fr>
13123
13124 * data/lalr1.cc (yylex_): Honor %lex-param.
13125
0ffd4fd1
AD
131262005-06-22 Akim Demaille <akim@epita.fr>
13127
13128 Start a set of simple examples.
13129 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
13130 * examples/calc++/calc++-driver.hh,
13131 * examples/calc++/calc++-parser.yy,
13132 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
13133 * examples/calc++/compile, examples/calc++/test: New.
13134
0925ebb4
PE
131352005-06-09 Paul Eggert <eggert@cs.ucla.edu>
13136
13137 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
13138 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
13139 which stems from the 2005-05-27 patch.
13140
43d3b664
PH
131412005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
13142
13143 * data/glr.c: Modify treatment of unused parameters to permit use
13144 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
13145
3062864d
PE
131462005-05-30 Paul Eggert <eggert@cs.ucla.edu>
13147
13148 Fix infringement on user name space reported by Janos Zoltan Szabo.
13149 * data/yacc.c (yyparse): strlen -> yystrlen.
13150
989b5b8e
AD
131512005-05-30 Akim Demaille <akim@epita.fr>
13152
13153 * data/lalr1.cc (_): New.
13154 Translate the various messages.
13155
bedf57f5
PE
131562005-05-27 Paul Eggert <eggert@cs.ucla.edu>
13157
13158 Fix infringement on user name space reported by Bruno Haible.
13159 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
13160 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
13161 the user's name space.
13162 (alloca): Include <stdlib.h> to get it, if it's not built in.
13163 (YYMALLOC, YYFREE): Define only if needed.
13164 (malloc, free): Declare, but only if needed, as this infringes on
13165 the user name space.
13166
4d1801f1
PE
131672005-05-25 Paul Eggert <eggert@cs.ucla.edu>
13168
13169 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
13170 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
13171 with %d format.
13172 * lib/ebitset.c (min, max): Undef before defining.
13173 * lib/vbitset.c (min, max): Likewise.
13174 * lib/subpipe.c (create_subpipe): Save local variables in case
13175 vfork clobbers them.
13176
131772005-05-24 Bruno Haible <bruno@clisp.org>
13178
13179 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
13180 error message syntax used by gcc-4.0.
13181
b94a9e1e
PE
131822005-05-23 Paul Eggert <eggert@cs.ucla.edu>
13183
85ac3861
PE
13184 * README: Mention m4 1.4.3. Remove obsolete advice about
13185 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
13186
b94a9e1e
PE
13187 * bootstrap: Remove workaround for problem I encountered with
13188 gettext 0.14.1; it seems to be fixed now.
13189
51c30d21
PE
131902005-05-22 Paul Eggert <eggert@cs.ucla.edu>
13191
009ce67d
PE
13192 * NEWS: Version 2.0a.
13193
f2a97c62
PE
13194 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
13195 the previous change.
13196
c8775f93
PE
13197 Various maintainer cleanups.
13198 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
13199 conftest*, for benefit of CVS commands run at the same time as
13200 "configure". Add build-aux, since "bootstrap" now creates it and
13201 its subfiles.
13202 * Makefile.cfg (move_if_change): Remove.
13203 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
13204 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
13205 (po_repo, do-po-update, po-update, wget_files, get-targets):
13206 (config.guess-url_prefix, config.sub-url_prefix):
13207 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
13208 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
13209 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
13210 Remove.
13211 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
13212 this is now the recommended name.
13213 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
13214 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
13215 ylwrap. These files now go into build-aux.
13216 * config/move-if-change: Remove.
13217 * config/prev-version.txt: Bump from 1.75 to 2.0.
13218
3ea5f0ec
PE
13219 * bootstrap: Add stdio-safer, unistd-safer modules.
13220 Remove m4/glibc2.m4 (introduced by latest gnulib, but
13221 we don't need it).
13222 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
13223 fopen-safer.c, stdio-safer.h, unistd-safer.h.
13224 * lib/subpipe.c: Include "unistd-safer.h".
13225 (create_subpipe): Make sure all the newly-created
13226 file descriptors are > 2, so that diagnostics don't
13227 get sent down them (which might cause Bison to hang, in theory).
13228 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
13229 * src/files.c (xfopen): Use fopen_safer, not fopen.
13230
51c30d21
PE
13231 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
13232 yesterday's yacc.c fix.
13233
cea1469d
PE
132342005-05-21 Paul Eggert <eggert@cs.ucla.edu>
13235
3ea5f0ec
PE
13236 * data/glr.c, data/lalr1.cc: Update copyright date.
13237
cea1469d
PE
13238 Fix a destructor bug reported by Wolfgang Spraul in
13239 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
13240 * data/yacc.c (yyabortlab): Don't call destructor, and
13241 don't set yychar to EMPTY.
13242 (yyoverflowlab): Don't call destructor.
13243 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
13244 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
13245 since we no longer output the message "discarding lookahead token
13246 end of input ()".
13247
5e6f62f2
PH
132482005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13249
13250 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
13251 fix a small glitch in debugging output.
13252 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
13253 after YY_SYMBOL_PRINT where needed.
13254
13255 (struct yyGLRState): Add some comments.
13256 (struct yySemanticOption): Add some comments.
13257 (union yyGLRStackItem): Add comment.
13258
13259 (yymergeOptionSets): Correct this to properly perform the union,
13260 avoiding infinite reported by Michael Rosien.
13261 Update comment.
13262
13263 * tests/glr-regression.at: Add test for GLR merging error reported
13264 by M. Rosien.
cea1469d 13265
0fb669f9
PE
132662005-05-13 Paul Eggert <eggert@cs.ucla.edu>
13267
13268 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
13269 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
13270 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
13271 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
13272 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
13273 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
13274 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
13275 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
13276 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
13277 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
13278 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
13279 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
13280 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
13281 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
13282 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
13283 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
13284 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
13285 src/derives.h, src/files.c, src/files.h, src/getargs.c,
13286 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
13287 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
13288 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
13289 src/output.h, src/parse-gram.c, src/parse-gram.h,
13290 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
13291 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
13292 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
13293 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
13294 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
13295 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
13296 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
13297 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
13298 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
13299 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
13300 tests/reduce.at, tests/regression.at, tests/sets.at,
13301 tests/synclines.at, tests/testsuite.at, tests/torture.at:
13302 Update FSF postal mail address.
13303
51f4735e
PE
133042005-05-11 Paul Eggert <eggert@cs.ucla.edu>
13305
13306 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
13307 Problem reported by Ralf Menzel.
13308
80ce3401
PE
133092005-05-01 Paul Eggert <eggert@cs.ucla.edu>
13310
13311 * tests/actions.at: Test that stack overflow invokes destructors.
13312 From Marcus Holland-Moritz.
13313 * data/yacc.c (yyerrlab): Move the code that destroys the stack
13314 from here....
13315 (yyreturn): to here. That way, destructors are called properly
13316 even if the stack overflows, or the user calls YYACCEPT or
13317 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
13318 (yyoverflowlab): Destroy the lookahead.
13319
133202005-04-24 Paul Eggert <eggert@cs.ucla.edu>
13321
13322 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
13323
72f000b0
PE
133242005-04-17 Paul Eggert <eggert@cs.ucla.edu>
13325
13326 * NEWS: Bison-generated C parsers no longer quote literal strings
13327 associated with tokens.
13328 * src/output.c (prepare_symbols): Don't escape strings,
13329 since users don't want to see C escapes.
13330 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
13331 in diagnostics.
c19683bb 13332 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
13333 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
13334
1094323f
PE
133352005-04-16 Paul Eggert <eggert@cs.ucla.edu>
13336
13337 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
13338 the data size is known to be too small and we can't increase it.
13339 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
13340
ca407bdf
PE
133412005-04-15 Paul Eggert <eggert@cs.ucla.edu>
13342
13343 * src/parse-gram.y: Include quotearg.h.
13344 (string_as_id): Quote $1 before using it as a key, since the
13345 lexer no longer quotes it for us.
13346 (string_content): Don't strip quotes, since lexer no longer
13347 quotes it for us.
13348 * src/scan-gram.l: Include quotearg.h.
13349 ("\""): Omit quote.
13350 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
13351 a key, since the rest of the lexer doesn't quote it.
13352 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
13353 * tests/regression.at (Token definitions): Check for backslashes
13354 in token strings.
13355
13356 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
13357 (YYSIZE_T): Define to unsigned long int when using an older compiler.
13358 (yyparse): Revamp code to generate long syntax error message, to
13359 make it easier to translate, and to avoid problems with arithmetic
13360 overflow. Change "virtual memory" to "memory" in diagnostic, since
13361 we don't know whether the memory is virtual.
13362
1ce59070
PE
133632005-04-13 Paul Eggert <eggert@cs.ucla.edu>
13364
13365 * NEWS: Bison-generated C parsers now use the _ macro to
13366 translate strings.
13367 * data/yacc.c (_) [!defined _]: New macro.
13368 All English strings wrapped inside this macro.
13369 * doc/bison.texinfo (Bison Parser): Document _.
13370 * po/POTFILES.in: Include src/parse-gram.c, since it now
13371 includes translateable strings that parse-gram.y doesn't.
13372
a749a695
PE
133732005-04-12 Paul Eggert <eggert@cs.ucla.edu>
13374
13375 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
13376 reverting the 2004-10-11 change to this function.
13377 (symbol_check_alias_consistency): Don't call symbol_type_set
13378 if the type name is already correct.
13379 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
13380
8fb1053b
PE
133812005-03-25 Paul Eggert <eggert@cs.ucla.edu>
13382
13383 * tests/regression.at (Token definitions): Don't use a token named
13384 c, as that generates a "#define c ..." that runs afoul of buggy
13385 stdlib.h that uses the identifier c as a member of struct
13386 drand48_data. Problem reported by Horst Wente.
13387
ff498c4a
PE
133882005-03-21 Paul Eggert <eggert@cs.ucla.edu>
13389
13390 * bootstrap: Change translation URL from
13391 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
13392 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
13393 redirection glitches. Problem reported by twlevo@xs4all.nl.
13394
65211d70
PE
133952005-03-20 Paul Eggert <eggert@cs.ucla.edu>
13396
13397 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
13398 after operands; POSIX says this isn't portable for the c99 command.
13399
9577fb1f
PE
134002005-03-18 Paul Eggert <eggert@cs.ucla.edu>
13401
13402 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
13403 immediately if a data overrun has occurred; this may help us track
13404 down what may be a spurious failure on MacOS.
13405
78b178f7
PE
134062005-03-17 Paul Eggert <eggert@cs.ucla.edu>
13407
a2599d0f
PE
13408 Respond to problems reported by twlevo@xs4all.nl.
13409
13410 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
13411
78b178f7
PE
13412 * src/vcg.h: Comment fix.
13413 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
13414 (G_CMAX): Change to -1 instead of INT_MAX.
13415
13416 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 13417
7296e729
PE
134182005-03-15 Paul Eggert <eggert@cs.ucla.edu>
13419
13420 * src/tables.c (state_number_to_vector_number): Put it inside an
13421 "#if 0", since it's not currently used. Problem reported by
13422 Roland McGrath.
13423
05ac60f3
PE
134242005-03-06 Paul Eggert <eggert@cs.ucla.edu>
13425
13426 * src/output.c (escaped_output): Renamed from
13427 escaped_file_name_output, since we now use it for symbol tags as
13428 well. All uses changed.
13429 (symbol_destructors_output, symbol_printers_output):
13430 Escape symbol tags too.
13431 Problem reported by Matyas Forstner in
13432 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
13433
13434 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
13435 not needed.
13436 * src/output.c (user_actions_output, token_definitions_output,
13437 symbol_destructors_output, symbol_printers_output): Likewise.
13438 * src/reader.c (prologue_augment): Likewise.
13439 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
13440
13441 * src/vcg.c (output_edge): Don't quote linestyle arg.
13442 Problem reported by twlevo@xs4all.nl.
13443
7eb453ac
PE
134442005-02-28 Paul Eggert <eggert@cs.ucla.edu>
13445
13446 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
13447 example, reported by Derek M Jones. Also, make the example even
13448 more outrageous, to better illustrate how bad the problem is.
13449
4c04c52a
PE
134502005-02-24 Paul Eggert <eggert@cs.ucla.edu>
13451
13452 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
13453 putsym. Typo reported by Sebastian Piping.
13454
a61e1620
PE
134552005-02-23 Paul Eggert <eggert@cs.ucla.edu>
13456
13457 * doc/bison.texinfo (Language and Grammar): some -> same
13458 (Epilogue): int he -> in the
13459 Typos reported by Sebastian Piping via Justin Pence.
13460
9ec93868
PE
134612005-02-07 Paul Eggert <eggert@cs.ucla.edu>
13462
13463 * tests/glr-regression.at (Improper handling of embedded actions
13464 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
13465 embedded actions and $-N in GLR parsers", work around an Autoconf bug
13466 with dollar signs in test names.
13467 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
13468 for a similar reason.
13469
73ce7e7e
PE
134702005-01-28 Paul Eggert <eggert@cs.ucla.edu>
13471
13472 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
13473 wants to redefine G_VIEW.
13474
2e72b98e
PE
134752005-01-27 Paul Eggert <eggert@cs.ucla.edu>
13476
13477 * src/vcg.c (get_view_str): Remove case for normal_view.
13478 Problem reported by twlevo@xs4all.nl.
13479
e0d634e5
PE
134802005-01-24 Paul Eggert <eggert@cs.ucla.edu>
13481
ccf830a4
PE
13482 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
13483 Problem reported by twlevo@xs4all.nl.
13484
e0d634e5
PE
13485 * doc/bison.texinfo: Change @dircategory from "GNU programming
13486 tools" to "Software development". Requested by Richard Stallman
13487 via Karl Berry.
13488
7bbc8cb0
PE
134892005-01-23 Paul Eggert <eggert@cs.ucla.edu>
13490
13491 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
13492 Problem reported by twlevo@xs4all.nl.
13493
08b770bc
PE
134942005-01-21 Paul Eggert <eggert@cs.ucla.edu>
13495
13496 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
13497 keyword; it's not needed with modern compilers, and it doesn't
13498 affect correctness with older compilers. Suggested by
13499 twlevo@xs4all.nl.
13500
95f22ad2
PE
135012005-01-17 Paul Eggert <eggert@cs.ucla.edu>
13502
13503 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
13504 gcc -Wswitch-default.
13505 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13506 * data/yacc.c (yyparse): Likewise.
13507
d229d15c
PE
135082005-01-12 Paul Eggert <eggert@cs.ucla.edu>
13509
13510 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
13511 already. Let config.h define any nonstandard values.
13512
ecadd90f
PE
135132005-01-10 Paul Eggert <eggert@cs.ucla.edu>
13514
13515 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
13516 for the benefit of slower hosts. Problem reported by
13517 Nelson H. F. Beebe.
13518
213744b5
PE
135192005-01-07 Paul Eggert <eggert@cs.ucla.edu>
13520
13521 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
13522 being defined and not used.
13523 * data/lalr1.cc (yyparse): Likewise.
13524 Use "if (false)" rather than "if (0)".
13525
249d3236
PE
135262005-01-05 Paul Eggert <eggert@cs.ucla.edu>
13527
13528 * TODO: Mention that we should allow NUL bytes in tokens.
13529
987cc1fb
PE
135302005-01-02 Paul Eggert <eggert@cs.ucla.edu>
13531
13532 * src/scan-skel.l (<<EOF>>): Don't close standard output.
13533 Problem reported by Hans Aberg.
13534
08fe02d9
PE
135352005-01-01 Paul Eggert <eggert@cs.ucla.edu>
13536
13537 * src/getargs.c (version): Happy new year; update overall
13538 program copyright date from 2004 to 2005.
13539
13540 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
13541 Problem reported by Hans Aberg.
13542 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
13543 (Output file names.): Add a test for the case when standard output
13544 is closed.
13545
010c0266
PE
135462004-12-26 Paul Eggert <eggert@cs.ucla.edu>
13547
13548 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
13549 to fix an oversight in the Bison 2.0 manual.
13550
da12206a
PE
135512004-12-25 Paul Eggert <eggert@cs.ucla.edu>
13552
13553 * NEWS: Version 2.0. Reformat the existing news items since
13554 1.875, so that related items are grouped together.
3a4734aa 13555 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
13556 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
13557
c935d934
PE
13558 * tests/torture.at (Exploding the Stack Size with Alloca): Set
13559 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
13560 otherwise, we're not testing alloca. Unfortunately there's no
13561 simple way to consult HAVE_ALLOCA here.
13562
da12206a
PE
13563 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
13564 for yymsg, too.
13565
13566 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
13567 hand. This avoids a warning about comparing int to size_t when
13568 GCC warnings are enabled.
13569
0a2c5137
PE
135702004-12-22 Paul Eggert <eggert@cs.ucla.edu>
13571
d7e14fc0
PE
13572 * NEWS: Bison-generated parsers no longer default to using the
13573 alloca function (when available) to extend the parser stack, due
13574 to widespread problems in unchecked stack-overflow detection.
13575 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
13576 responsibility to set it to a positive value. This lets the user
13577 specify a value that is not a preprocessor constant.
13578 * data/yacc.c (YYMAXDEPTH): Likewise.
13579 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
13580 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
13581 to be a compile-time constant. However, explain the constraints on it.
13582 Also, explain the constraints on YYINITDEPTH.
13583 (Table of Symbols): Explain that alloca is no longer the default.
13584 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
13585 to 1.
13586
0a2c5137
PE
13587 * doc/bison.texinfo (Location Default Action): Mention that n must
13588 be zero when k is zero. Suggested by Frank Heckenbach.
13589
e019c247
AD
135902004-12-22 Akim Demaille <akim@epita.fr>
13591
13592 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
13593 (parser::state_type, parser::semantic_type, parser::location_type):
13594 Private, not public.
13595 (parser::parse): Return ints, not bool.
13596 Returning a bool introduces a problem: 0 corresponds to false, and
13597 it seems weird to return false on success. Returning true changes
13598 the conventions for yyparse.
13599 Alternatively we could return void and send an exception.
13600 There is no clear consensus (yet?).
13601 (state_stack, semantic_stack, location_stack): Rename as...
13602 (state_stack_type, semantic_stack_type, location_stack_type): these.
13603 Private, not public.
13604 * tests/c++.at: New.
13605 * tests/testsuite.at, tests/Makefile.am: Adjust.
13606
72731bb7
AD
136072004-12-21 Akim Demaille <akim@epita.fr>
13608
13609 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
13610
9a0d8bec
AD
136112004-12-21 Akim Demaille <akim@epita.fr>
13612
13613 Don't impose std::string for filenames.
13614
13615 * data/lalr1.cc (b4_filename_type): New.
13616 (position::filename): Use it.
13617 (parser.hh): Move the inclusion of stack.hh and location.hh below
13618 the user code, so that needed headers for the filename type can be
13619 included first.
72731bb7
AD
13620 Forward declare them before the user code.
13621 * tests/Makefile.am (check-local, installcheck-local): Pass
13622 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 13623
99880de5
AD
136242004-12-20 Akim Demaille <akim@epita.fr>
13625
13626 Use more STL like names: my_class instead of MyClass.
13627
13628 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
13629 (SemanticStack, SemanticType, StateStack, StateType)
13630 (TokenNumberType, Stack, Slice, Traits, Parser::location)
13631 (Parser::value): Rename as...
13632 (location_stack, location_type, rhs_number_type, semantic_stack)
13633 (semantic_type, state_stack, state_type, token_number_type, stack)
13634 (slice, traits, parser::yylloc, parser::yylval): these.
13635
13636 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
13637
9bec482e
PE
136382004-12-19 Paul Eggert <eggert@cs.ucla.edu>
13639
13640 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
13641 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13642
f6fbd3da
PE
136432004-12-17 Paul Eggert <eggert@cs.ucla.edu>
13644
13645 Remove uses of 'short int' and 'unsigned short int'. This raises
13646 some arbitrary limits. It uses more memory but nowadays that's
13647 not much of an issue.
13648
13649 This change does not affect the generated parsers; that's a different
13650 task, as some users will want to conserve memory there.
13651
13652 Ideally we should use size_t to represent all object counts, and
13653 something like ptrdiff_t to represent signed differences of object
13654 counts; but that will require more code-cleanup than I have the
13655 time to do right now.
13656
13657 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
13658 Use size_t, not int or short int, to count objects.
13659 * src/closure.c (nritemset, closure): Likewise.
13660 * src/closure.h (nritemset, closure): Likewise.
13661 * src/nullable.c (nullable_compute): Likewise.
13662 * src/print.c (print_core): Likewise.
13663 * src/print_graph.c (print_core): Likewise.
13664 * src/state.c (state_compare, state_hash): Likewise.
13665 * src/state.h (struct state): Likewise.
13666 * src/tables.c (default_goto, goto_actions): Likewise.
13667
13668 * src/gram.h (rule_number, rule): Use int, not short int.
13669 * src/output.c (prepare_rules): Likewise.
13670 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
13671 errs, reductions): Likewise.
13672 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
13673 Likewise.
13674 * src/tables.c (vector_number, tally, action_number,
13675 ACTION_NUMBER_MINIMUM): Likewise.
13676 * src/output.c (muscle_insert_short_int_table): Remove.
13677
efeed023
AD
136782004-12-17 Akim Demaille <akim@epita.fr>
13679
13680 * data/lalr1.cc: Extensive Doxygenation.
13681 (error_): Rename as...
13682 (error): this, since it is visible to the user.
13683 Adjust callers.
13684 (Parser::message): Now an automatic variable from...
13685 (Parser::yyreport_syntax_error_): here.
13686 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
13687 Parser::error.
13688 * tests/input.at: Escape $.
13689
bc82c5a5
PE
136902004-12-16 Paul Eggert <eggert@cs.ucla.edu>
13691
13692 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
13693 Parenthesize rhs to avoid obscure problems with mistakes like
13694 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
13695 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13696 b4_rhs_location): Likewise.
13697 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13698 b4_rhs_location): Likewise.
13699
fd19f271
AD
137002004-12-16 Akim Demaille <akim@epita.fr>
13701
13702 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
13703 yacc.c: be sure to stay within yycheck_.
13704 * tests/actions.at: Re-enable C++ tests.
13705
10454ea4
AD
137062004-12-16 Akim Demaille <akim@epita.fr>
13707
13708 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
13709 real.
13710
c5b95ccf
AD
137112004-12-16 Akim Demaille <akim@epita.fr>
13712
13713 Use #define to handle the %name-prefix.
13714
13715 * data/glr.c, data/yacc.c: Comment changes.
13716 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
13717 so that one can refer to yylex in the parser file, and have it
13718 renamed, as is the case with other skeletons.
13719
617a8f12
AD
137202004-12-16 Akim Demaille <akim@epita.fr>
13721
13722 Move lalr1.cc internals into yy*.
13723
13724 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
13725 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
13726 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
13727 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
13728 (empty_, final_, terror_, errcode_, ntokens_)
13729 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
13730 (looka_, ilooka_, error_range_, nerrs_):
13731 Rename as...
13732 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
13733 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
13734 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
13735 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
13736 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
13737 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
13738 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
13739 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
13740 these.
13741
1e547e6e
PE
137422004-12-15 Paul Eggert <eggert@cs.ucla.edu>
13743
13744 Fix some problems reported by twlevo at xs4all.
13745 * src/symtab.c (symbol_new): Report an error if the input grammar
13746 contains too many symbols. This is better than calling abort() later.
13747 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
13748 (struct node, struct graph):
13749 Rename member expand to stretch. All uses changed.
13750 (struct graph): Remove member layoutalgorithm. All uses removed.
13751 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
13752 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
13753 All uses changed.
13754 (N_STRETCH): Rename from N_EXPAND. All uses changed.
13755
735d6bd4
AD
137562004-12-15 Akim Demaille <akim@epita.fr>
13757
13758 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
13759 Add more Doxygen comments.
13760 (symprint_, stack_print_, reduce_print_, destruct_, pop)
13761 (report_syntax_error_, translate_): Rename as...
13762 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
13763 (yypop_, yyreport_syntax_error_, yytranslate_): this.
13764
2e1f5829
AD
137652004-12-15 Akim Demaille <akim@epita.fr>
13766
13767 * data/lalr1.cc (lex_): Rename as...
13768 (yylex_): this.
13769 Move the trace here.
13770 Take the %name-prefix into account.
13771 Reported by Alexandre Duret-Lutz.
13772
a3cb6248
AD
137732004-12-15 Akim Demaille <akim@epita.fr>
13774
13775 Simplify the C++ parser constructor.
13776
13777 * data/lalr1.cc (debug_): Rename as...
13778 (yydebug_): so that the parser's internals are always in the yy*
13779 pseudo namespace.
13780 Adjust uses.
13781 (b4_parse_param_decl): Remove the leading comma as it is now only
13782 called as unique argument list.
13783 (Parser::Parser): Remove the constructor accepting a location and
13784 an initial debugging level.
13785 Remove from the other ctor the argument for the debugging level.
13786 (debug_level_type, debug_level, set_debug_level): New.
13787
13788 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
13789 constructor calls.
13790
07fed891
AD
137912004-12-15 Akim Demaille <akim@epita.fr>
13792
13793 Remove b4_root related material: failure experiment
a3cb6248 13794 (which goal was to allow to derive from a class).
07fed891
AD
13795
13796 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
13797 definitions and uses.
13798
e603eaa5
PE
137992004-12-14 Paul Eggert <eggert@cs.ucla.edu>
13800
13801 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
13802 not 2, since it's not portable to subtract 1 from the start of an
13803 array. The new item 0 is never set or used. All uses changed.
13804
13805 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
13806 the default definition of YYLLOC_DEFAULT. Problem reported
13807 by Frank Heckenbach.
13808
fafb007d
PE
138092004-12-12 Paul Eggert <eggert@cs.ucla.edu>
13810
13811 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
13812 the normal case and one for the error case. Just use the
13813 first one uniformly. Problem reported by Frank Heckenbach.
13814 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
13815 use exactly the same macro in both places.
13816 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
13817 so that the normal-case YYRHSLOC works for the error case too.
13818 All uses changed.
13819 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
13820 (YYLLOC_DEFAULT): Use the same macro as glr.c.
13821 * doc/bison.texinfo (Location Default Action): Don't claim that
13822 we have an array of locations. Use the same macro for both glr
13823 and lalr parsers. Mention YYRHSLOC. Mention what happens when
13824 the index is 0.
13825
48814dcd
PE
138262004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13827
a4e1a53b
PE
13828 * HACKING: Update email addresses to send announcements to.
13829
48814dcd
PE
13830 * configure.ac (AC_INIT): Bump version to 1.875f.
13831
337116ba
PE
138322004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13833
13834 * NEWS: Version 1.875e.
13835 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
13836
13837 * src/scan-skel.l: Include "complain.h", for "fatal".
13838
13839 * src/relation.h (relation_print, relation_digraph):
13840 Relation sizes are of type relation_node, not size_t (this is
13841 merely a doc fix, since the two types are equivalent).
13842 (relation_transpose): Relation sizes are of type relation_node,
13843 not int.
13844 * src/relation.c: Likewise.
13845 (top, infinity): Now of type relation_node, not int.
13846 (traverse, relation_transpose): Use relation_node, not int.
13847
13848 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
13849 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
13850 (yyparse): Remove unused local introduced in 2004-10-25 patch.
13851
13852 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 13853 specifying whether the test should be skipped. Use it tp
337116ba 13854 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 13855 fail on some hosts, and should be skipped.
337116ba 13856
da2a7671
PE
138572004-12-08 Paul Eggert <eggert@cs.ucla.edu>
13858
13859 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
13860 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
13861 unless otherwise specified below.
13862
13863 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
13864 to allocate kernel_base, kernel_items, kernel_size, since
13865 they needn't be initialized to 0.
13866 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
13867 * src/closure.c (new_closure): Likewise, for itemset.
13868 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
13869 * src/lalr.c (set_goto_map): Likewise, for temp_map.
13870 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
13871 (build_relations): Likewise for edge, states1, includes.
13872 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
13873 * src/reader.c (packgram): Likewise, for ritem, rules.
13874 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
13875 * src/relation.c (relation_digraph): Likewise for VERTICES.
13876 (relation_transpose): Likewise for new_R, end_R.
13877 * src/symtab.c (symbols_token_translations_init): Likewise for
13878 token_translations.
13879 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
13880 (token_actions): Likewise for yydefact, actrow, conflrow,
13881 conflict_list.
13882 (save_column): Likewise for froms[symno], tos[symno].
13883 (goto_actions): Likewise for state_count.
13884 (pack_table): Likewise for base, pos, check.
13885 (tables_generate): Likewise for width.
13886
13887 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
13888 for initial core. Just have a separate core, so we needn't worry
13889 about whether kernel_size and kernel_base are initialized.
13890
13891 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
13892 kernel_size, kernel_items): Remove unnecessary initialization.
13893 * src/conflicts.c (conflicts): Likewise.
13894 * src/derives.c (derives): Likewise.
13895 * src/muscle_tablc (muscle_insert): Likewise.
13896 * src/relation.c (relation_digraph): Likewise.
13897 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
13898 conflrow, conflict_table, conflict_list, table, check):
13899 Likewise.
13900
13901 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
13902 This is because all callers pass unsigned int.
13903 * src/closure.h (new_closure): Likewise.
13904
13905 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
13906 (build_relations): Initialize includes[i] in all cases.
13907 * src/reader.c (packgram): Always initialize rules[ruleno].prec
13908 and rules[ruleno].precsym. Initialize members in order.
13909 * src/relation.c (relation_transpose): Always initialize new_R[i]
13910 and end_R[i].
13911 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
13912
13913 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
13914 conflict_list[0] was always 0, but now it isn't initialized.
13915
13916 * src/table.c (table_grow): When conflict_table grew, the grown
13917 area wasn't cleared. Fix this.
13918
13919 * lib/.cvsignore: Add strdup.c, strdup.h.
13920 * m4/.cvsignore: Add strdup.m4.
13921
00baeeac
PE
139222004-12-07 Paul Eggert <eggert@cs.ucla.edu>
13923
13924 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
13925 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
13926 GOTO_NUMBER_MAXIMUM, since we occasionally compute
13927 ngotos + 1 without checking for overflow.
13928 (build_relations): Use END_NODE, not -1, to denote end of edges.
13929 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
13930 build_relations): Use goto_number, not int, for goto numbers.
13931 * src/tables.c (save_column, default_goto): Likewise.
13932
be3d9d42
AD
139332004-11-23 Akim Demaille <akim@epita.fr>
13934
13935 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
13936 of #defining from yystype.
13937 Don't typedef yystype, C++ does not need it.
13938 This lets it possible to forward declare it as union.
13939
78e526d5
PE
139402004-11-23 Paul Eggert <eggert@cs.ucla.edu>
13941
13942 * bootstrap (gnulib_modules): Add extensions.
13943 Problem reported by Jim Meyering.
13944
afbb696d
PE
139452004-11-22 Paul Eggert <eggert@cs.ucla.edu>
13946
13947 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
13948 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
13949 src/system.h, src/tables.c: XFREE -> free, to accommodate
13950 recent change to gnulib xalloc.h.
78e526d5 13951 Problem reported by Jim Meyering.
afbb696d 13952
c1f8f16a
AD
139532004-11-17 Akim Demaille <akim@epita.fr>
13954
13955 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
13956
db7e5eb5 139572004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
13958 Alexandre Duret-Lutz <adl@gnu.org>
13959
13960 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
13961 changes.
13962 (YYCDEBUG): Adjust.
13963 Use it instead of cdebug_.
13964 (Parser::debug_stream, Parser::set_debug_stream): New.
13965 (Parser::symprint_): Define cdebug_ for temporary backward
13966 compatibility.
13967 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
13968 debug_stream ().
13969
68e11668
AD
139702004-11-17 Akim Demaille <akim@epita.fr>
13971
13972 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
13973 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
13974 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
13975 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13976
97cbc73e
PE
139772004-10-27 Paul Eggert <eggert@cs.ucla.edu>
13978
13979 * data/glr.c (yyloc_default): Remove; not used.
13980 Problem reported by Frank Heckenbach.
13981
e342c3be
AD
139822004-10-25 Akim Demaille <akim@epita.fr>
13983
13984 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
13985 Introduce another definition to address simple location arrays.
13986 (yyGLRStack): New member: yyerror_range.
13987 (yyrecoverSyntaxError, yyparse): Update it.
13988 (yyrecoverSyntaxError): Use it when shifting the error token to
13989 have an accurate range, equivalent to the one computed by both
13990 yacc.c and lalr1.cc.
13991 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
13992 that column numbers start at column 0, as per GNU Coding
13993 Standards, the others tests, and the doc.
13994 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
13995 Adjust to the above change (first column is 0).
13996 And adjust the location of the "<error>", now covering the whole
13997 line.
13998
93602feb 139992004-10-22 Akim Demaille <akim@epita.fr>
04098407 14000 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
14001
14002 Remove some arbitrary limits on goto numbers and relations.
14003 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
14004 initial values, since they're never used.
14005 (set_goto_map): ngotos is now unsigned, so test for overflow
14006 by seeing whether it wraps around to zero.
14007 * src/lalr.h (goto_number): Now size_t, not short int.
14008 (GOTO_NUMBER_MAXIMUM): Remove.
14009 * src/relation.c (relation_print, traverse, relation_transpose):
14010 Check for END_NODE rather than looking at sign.
14011 * src/relation.h (END_NODE): New macro.
14012 (relation_node): Now size_t, not short int.
14013
dba08b04
PE
140142004-10-22 Paul Eggert <eggert@cs.ucla.edu>
14015
14016 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
14017 keyword, not an identifier. Problem reported by Baron Schwartz in
14018 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
14019
df09ef2e
AD
140202004-10-11 Akim Demaille <akim@epita.fr>
14021
14022 * src/symtab.c (symbol_check_alias_consistency): Also check
14023 type names, destructors, and printers.
14024 Reported by Alexandre Duret-Lutz.
14025 Recode the handling of associativity and precedence in terms
14026 of symbol_precedence_set.
14027 Accept no redeclaration at all, not even equal to the previous
14028 value.
14029 (redeclaration): New.
14030 Use it to factor redeclaration complaints.
14031 (symbol_make_alias): Don't set the type of the alias, let
14032 symbol_check_alias_consistency do it as for other features.
14033 * src/symtab.h (symbol): Add new member prec_location, and
14034 type_location.
14035 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
14036 * tests/input.at (Incompatible Aliases): New.
14037
146bc99d
PE
140382004-10-09 Paul Eggert <eggert@cs.ucla.edu>
14039
14040 .cvsignore fixes to accommodate gnulib changes,
14041 and the practice of naming build directories "_build".
14042 * .cvsignore: Add "_*". Sort.
14043 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
14044 * m4/.cvsignore: Add "*_gl.m4".
14045
e503aa60
AD
140462004-10-06 Akim Demaille <akim@epita.fr>
14047
14048 * src/parse-gram.y (add_param): Fix the truncation of trailing
14049 spaces.
14050
b4a20338
AD
140512004-10-05 Akim Demaille <akim@epita.fr>
14052
14053 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
14054 whether the reducion was empty or not. This leaves room to
14055 improve the use of YYLLOC_DEFAULT in such a case.
14056 lalr1.cc is still experimental, so changing this is acceptable.
14057 And finally, there are probably not many users who changed the
14058 handling of locations in GLR, so changing is admissible too.
14059
14060 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
14061 empty reduction, set @$ to an empty location ending the previously
14062 stacked symbol.
14063 Adjust uses to make sure the code is triggered on empty
14064 reductions.
14065 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
14066 expected output: empty reductions have empty locations.
14067
f85a5e6f
AD
140682004-09-29 Akim Demaille <akim@epita.fr>
14069
14070 * data/lalr1.cc: Move towards a more standard C++ coding style
14071 for templates: Class < T > -> Class<T>.
14072
b203fc2c
AD
140732004-09-29 Akim Demaille <akim@epita.fr>
14074
14075 * data/lalr1.cc: Reinstall the former ctor, for sake of
14076 compatibility, but warn it will be removed.
14077 Move towards a more standard C++ coding style (i.e., type *var ->
14078 type* var).
14079
5b7e1e73
PE
140802004-09-27 Paul Eggert <eggert@cs.ucla.edu>
14081
3fee967f
PE
14082 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
14083 since it's less likely to work if NULs are involved in the future.
5b7e1e73 14084
0dcca5c2
AD
140852004-09-27 Akim Demaille <akim@epita.fr>
14086
14087 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
14088
6dde1c82
AD
140892004-09-27 Akim Demaille <akim@epita.fr>
14090
14091 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 14092 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
14093 and argument names.
14094 (b4_cc_constructor_call): Likewise.
14095
b233d555
AD
140962004-09-24 Akim Demaille <akim@epita.fr>
14097
14098 * src/parse-gram.y (add_param): Strip the leading and trailing
14099 blanks from a formal argument declaration.
14100 (YY_LOCATION_PRINT): New.
14101
619404e3
AD
141022004-09-24 Akim Demaille <akim@epita.fr>
14103
14104 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
14105 after the location.
14106
dd8d9022
AD
141072004-09-24 Akim Demaille <akim@epita.fr>
14108
14109 * doc/bison.texinfo (Table of Symbols): Sort.
14110
0092f063
AD
141112004-09-21 Akim Demaille <akim@epita.fr>
14112
14113 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
14114 the useless parentheses.
14115 Suggested by Paul Eggert.
14116
451364ed
AD
141172004-09-20 Akim Demaille <akim@epita.fr>
14118
14119 Let the initial-action act on the look-ahead, and use it for the
14120 "initial push" (corresponding to an hypothetical beginning-of-file).
14121 And let lalr1.cc honor %initial-action.
14122
14123 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
14124 example.
14125 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
14126 (Parser::Parser): Remove the ctor that used to initialize it.
14127 (Parser::parse): Like in the other skeletons, issue the "starting
14128 parse" message before any action.
14129 Honor %initial-action.
14130 Initialize the stacks with the lookahead.
14131 * data/yacc.c: Let $$ and @$ in %initial-action designate the
14132 look-ahead.
14133 Push them in the stacks.
14134 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
14135
18d192f0
AD
141362004-09-20 Akim Demaille <akim@epita.fr>
14137
14138 * doc/bison.texinfo (Initial Action Decl): New.
14139
b8458aa5
AD
141402004-09-20 Akim Demaille <akim@epita.fr>
14141
14142 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
14143 clearer criterion to define it.
14144 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
14145 When reducing on an empty RHS, use the latest stacked location as
14146 location.
14147 yylloc is not always available.
14148 * data/glr.c: Likewise.
14149 Also, honor initial-actions.
14150
3fc16193
AD
141512004-09-20 Akim Demaille <akim@epita.fr>
14152
14153 * data/yacc.c (YY_LOCATION_PRINT): New.
14154 Define when we know YYLTYPE's structure, i.e., when the default
14155 YYLLOC_DEFAULT is used.
14156 * data/c.m4 (b4_yysymprint_generate): Use it.
14157 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
14158 value of the result.
14159 (error_start_): Replace with...
14160 (error_range_): this location array.
14161 This allows to replace code relying on the implementation of
14162 locations by portable code.
14163 * data/yacc.c (yylerrsp): Replace with...
14164 (yyerror_range): this.
14165 Every time a token is popped, update yyerror_range[0], to have an
14166 accurate location for the error token.
14167 * data/glr.c (YY_LOCATION_PRINT): New.
14168 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
14169 deference a pointer.
14170 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
14171 report the location in %printers.
14172
14173 * src/scan-skel.l: Instead of abort, report error messages to ease
14174 understanding skeleton scanning failures.
14175
ecfe33e7
AD
141762004-09-16 Akim Demaille <akim@epita.fr>
14177
14178 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
14179 (iterator, const_iterator): these, to be more in the C++ spirit.
14180 Also, return reverse iterators so that when displaying the stack
14181 we display its bottom first.
14182 (Parser::stack_print_, Parser::reduce_print_): Match the messages
14183 from yacc.c.
14184 We should probably use vector here though.
14185
1576d44d
AD
141862004-09-16 Akim Demaille <akim@epita.fr>
14187
14188 Have more complete shift traces.
14189
14190 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
14191 to report Shifts instead of ad hoc YYDPRINTF invocations,
14192 including for the error token.
14193 * data/lalr1.cc (symprint_): Output the location.
14194 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
14195 output the location within the %printer.
14196 Activate GLR tests, at least to make sure they compile properly.
14197 They still don't pass though.
14198 * tests/calc.at: Adjust expect verbose output, since now "Entering
14199 state..." is on a different line than the "Shifting" message.
14200
9c66f418
AD
142012004-09-08 Akim Demaille <akim@epita.fr>
14202
14203 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
14204 Bison directive from the Bison file to the invocation of this
14205 macro, so that these directives are passed to
14206 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
14207 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
14208 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
14209 the extra Bison directives instead of the whole series.
14210 Change the grammar so that there are recoverable errors, and
14211 unrecoverable errors. Now we can have the parser give up before
14212 consuming the whole input. As a result we now can observe that
14213 the lookahead is freed when needed.
14214 Change the parser source to parse argv[1] instead of a hard coded
14215 string.
14216 Simplify yylex, and give a value and location to EOF.
14217 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
14218 passed directives already coded in the file.
14219 Add some tests to check the location of "error".
14220 For some tests, the C++ parser is correct, and not yacc.c.
14221 For other tests, they provide different, but unsatisfying, values,
14222 so keep the C++ value so that at least one parser is "correct"
14223 according to the test suite.
14224 (Actions after errors): Remove, this is subsumed by the
14225 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
14226
52d5733f
AD
142272004-09-06 Akim Demaille <akim@epita.fr>
14228
14229 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 14230 (Parser::pop): New.
52d5733f
AD
14231 Use it.
14232
a0e68930
AD
142332004-09-06 Akim Demaille <akim@epita.fr>
14234
14235 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
14236 argument, an informative message.
14237 Call YY_SYMBOL_PRINT.
14238 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
14239 * data/lalr1.cc (destruct_): Likewise.
14240 In addition, no longer depend on b4_yysymprint_generate and
14241 b4_yydestruct_generate to generate these functions, do it "by
14242 hand".
14243
e757bb10
AD
142442004-09-03 Akim Demaille <akim@epita.fr>
14245
14246 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
14247 invoked, yydestruct the lookahead.
14248 * tests/calc.at (Calculator $1): Update the expected lengths of
14249 traces: there is an added line for the discarded lookahead.
14250 * doc/bison.texinfo (Destructor Decl): Some rewording.
14251 Define "discarded" symbols.
14252
0fe1f06d
AD
142532004-09-02 Akim Demaille <akim@epita.fr>
14254
14255 * data/lalr1.cc (translate_, destruct_): No reason to be static.
14256
284acc8b
AD
142572004-09-02 Akim Demaille <akim@epita.fr>
14258
14259 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
14260 (YYDSYMPRINTF): Rename as...
14261 (YY_SYMBOL_PRINT): this.
14262 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
14263 two.
14264 Use it instead of direct symprint_ calls.
14265 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
14266 one.
14267
a5eb1ed2
AD
142682004-09-02 Akim Demaille <akim@epita.fr>
14269
b7c72fe1
AD
14270 * data/lalr1.cc (b4_yysymprint_generate): New.
14271 (symprint_): New member function, defined when YYDEBUG.
14272 Use it consistently instead of token/nterm debugging output by
14273 hand.
a5eb1ed2
AD
14274 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
14275 %printer calls to use cdebug_ when using lalr1.cc.
14276
417141dd
AD
142772004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
14278
14279 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
14280 with #ifdef YYDEBUG.
14281
2fa09258
AD
142822004-08-26 Akim Demaille <akim@epita.fr>
14283
14284 * doc/bison.texinfo (Implementing Loops): Rename as...
14285 (Implementing Gotos/Loops): this.
14286
9378b508
PE
142872004-08-13 Paul Eggert <eggert@cs.ucla.edu>
14288
14289 Adjust to latest gnulib.
14290 * bootstrap (gnulib_modules): Add xalloc-die.
14291 Set LC_ALL=C so that file names sort consistently.
14292 Prefer the gnulib copies of gettext.m4, glibc21.m4,
14293 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
14294 uintmax_t.m4, ulonglong.m4.
14295 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
14296 po.m4 since we are now using _gl.m4 instead.
14297
87a8ad5c
PE
142982004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
14299
14300 * src/scan-action.l: Remove. Scanning of semantic actions is
14301 handled in scan-gram.l.
14302
dca81a78
PE
143032004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
14304
14305 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
14306
14307 * src/location.h (struct): The file member is a uniqstr.
14308 (equal_boundaries): Use UNIQSTR_EQ for comparison.
14309
c9cbf7c5
PE
143102004-07-22 Paul Eggert <eggert@cs.ucla.edu>
14311
14312 Fix bug with non-%union parsers that have printers or destructors,
14313 which led to a Bison core dump. Reported by Peter Fales in
14314 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 14315
c9cbf7c5
PE
14316 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
14317 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
14318 not to our own type.
14319 * src/output.c (symbol_destructors_output, symbol_printers_output):
14320 Don't assume %union.
14321 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
14322 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
14323 UNION-FLAG. All callers changed.
14324 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
14325 Use type char, not unsigned int, when declaring an array of char;
14326 this lets us remove a cast.
14327 (Printers and Destructors): Add non-%union test cases.
14328
fa7e68c3
PE
143292004-06-21 Paul Eggert <eggert@cs.ucla.edu>
14330
14331 * doc/bison.texinfo: Minor editorial changes, mostly to the new
14332 GLR writeups. E.g., avoid frenchspacing and the future tense,
14333 change "lookahead" to "look-ahead", and change "wrt" to "with
14334 respect to".
2fa09258 14335
fa7e68c3
PE
143362004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
14337
14338 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
14339 New sections, split off from the GLR Parsers section. Put the new
14340 Simple GLR Parser near the start of the GLR section, for clarity.
14341 Rewrite connective text.
14342
99a9344e
PE
143432004-06-21 Frank Heckenbach <frank@g-n-u.de>
14344
14345 * doc/bison.texinfo (Simple GLR Parsers): New section.
14346
8dd162d3
PE
143472004-06-21 Paul Eggert <eggert@cs.ucla.edu>
14348
14349 * NEWS, TODO, doc/bison.texinfo:
14350 Use "look-ahead" instead of "lookahead", to be consistent.
14351 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
14352 while we're fixing "look-ahead".
14353 * src/conflicts.c (shift_set): Renamed from shiftset.
14354 (look_ahead_set): Renamed from lookaheadset.
14355 * src/print.c: Likewise.
14356 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
14357 name for "lookahead".
14358 (report_types, usage): Likewise.
14359 * src/getargs.h (report_look_ahead_tokens): Renamed from
14360 report_lookaheads.
14361 * src/lalr.c (compute_look_ahead_tokens): Renamed from
14362 compute_lookaheads.
14363 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
14364 (look_ahead_tokens_print): Renamed from lookaheads_print.
14365 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
14366 state_rule_lookaheads_print.
14367 * src/state.h: Likewise.
14368 (reductions.look_ahead_tokens): Renamed from lookaheads.
14369 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
14370 AT_DATA_LOOKAHEADS_GRAMMAR.
14371
57a90331
PE
143722004-06-03 Paul Eggert <eggert@cs.ucla.edu>
14373
14374 * README: Update location of patched M4 distribution.
14375
8ed3234a
PE
143762004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
14377
14378 Don't assume the C++ compiler takes the same arguments as the C compiler
14379 (trivial change).
14380 * configure.ac (O0CXXFLAGS): New var.
14381 * tests/atlocal.in (CXXFLAGS): Use it.
14382
07971983
PE
143832004-05-29 Paul Eggert <eggert@cs.ucla.edu>
14384
14385 Fix some "make check" problems with C++ reported by
14386 Albert Chin-A-Young for Tru64 C++ in this thread:
14387 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
14388
14389 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
14390 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
14391 Output to a .cc file for C++, not to a .c file.
14392 * tests/calc.at (AT_CHECK_CALC): Likewise.
14393 * tests/regression.at (AT_CHECK_DANCER): Likewise.
14394 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
14395
29058652
PE
143962004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
14397
14398 * tests/calc.at, tests/actions.at: Workaround for SGI
14399 C++ compiler. (trivial change)
14400
62cb8a99
PE
144012004-05-27 Paul Eggert <eggert@cs.ucla.edu>
14402
fd418816
PE
14403 Spent a few hours checking out which prerequisite versions the
14404 current sources actually require. I went all the way back to
14405 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
14406 a seemingly endless set of combinations of versions more recent
14407 than that. The bottom line is that the current sources require
14408 fairly recent versions of the build tools, and it'll be some work
14409 to change this.
14410 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
14411 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
14412 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
14413 Add comments explaining why those particular versions are
14414 currently needed.
2fa09258 14415
62cb8a99
PE
14416 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
14417 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 14418 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
14419
14420 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
14421 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
14422
caa52c10
PE
144232004-05-26 Paul Eggert <eggert@cs.ucla.edu>
14424
14425 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
14426 0.11.5. Suggested by Bruno Haible.
14427 * bootstrap: Remove gettext version checking.
14428
14429 * doc/bison.texinfo (Decl Summary): Also mention that %union
14430 can depend on prerequisite types. Problem reported by Tim
14431 Van Holder.
14432
4bfd5e4e
PE
144332004-05-25 Paul Eggert <eggert@cs.ucla.edu>
14434
2cef3017
PE
14435 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
14436 * README-alpha: Don't tell people not to package this.
14437
b9c85d5c
PE
14438 * bootstrap: Don't assume $(...) works; use `...` instead.
14439 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
14440 gettext better.
14441
4bfd5e4e
PE
14442 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
14443 put into the -d output file, and mention what to do if YYSTYPE is
14444 defined as a macro.
14445
6a36ff94
PE
144462004-05-24 Paul Eggert <eggert@cs.ucla.edu>
14447
6712933e
PE
14448 Undo change made earlier today: it caused autopoint to not bring
14449 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
14450 autopoint's.
14451
14452 * bootstrap: Check that gettext version matches what's in
14453 configure.ac. Warn users to ignore robots.txt ERROR 404.
14454 * bootstrap: Undo today's earlier change (logged below).
14455 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 14456
6a36ff94
PE
14457 The gettext version checking is causing more trouble than it's
14458 curing; remove it. Problem reported by Paul Hilfinger.
14459
14460 * bootstrap: Issue a warning that one can expect a message
14461 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
14462 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
14463
209ea708
PE
144642004-05-23 Paul Eggert <eggert@cs.ucla.edu>
14465
14466 Ensure that the C++ compiler used for testing actually works on a
14467 simple test program; if not, skip the C++-related tests. Problem
14468 reported by Vin Shelton in:
161a71f3 14469 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
14470
14471 * m4/cxx.m4: New file.
14472 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
14473 * tests/atlocal.in (BISON_CXX_WORKS): Add.
14474 * tests/local.at (AT_COMPILE_CXX): Use it.
14475
41ca2549
PE
144762004-05-21 Paul Eggert <eggert@cs.ucla.edu>
14477
383e69dc
PE
14478 * data/glr.c (yylloc): Output this macro even if locations are not
14479 being generated, as the GLR parser needs it even in that case.
14480 Problem reported by Troy A. Johnson
14481 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
14482
41ca2549
PE
14483 * configure.ac (AC_INIT): Update to 1.875e.
14484
e476c87d
PE
144852004-05-21 Paul Eggert <eggert@cs.ucla.edu>
14486
14487 * NEWS: Version 1.875d.
14488 * configure.ac (AC_INIT): Likewise.
14489 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
14490
14491 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
14492 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
14493 lalr1.cc runs afoul of the first, and the last two are no longer
14494 supported by GCC 3.4.0.
14495 * README: Mention GNU m4 1.4 or later; mention m4 patches.
14496 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
14497
233a88ad
PE
144982004-05-06 Paul Eggert <eggert@cs.ucla.edu>
14499
14500 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
14501 unsigned int, for compatibility with latest gnulib hash module.
14502 * src/state.c (state_hash, state_hasher): Likewise.
14503 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
14504 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 14505
12ffdd28
PE
145062004-05-03 Paul Eggert <eggert@cs.ucla.edu>
14507
14508 * NEWS: Unescaped newlines are no longer allowed in char & strings.
14509
14510 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
14511 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
14512 character and string literals.
14513 (unexpected_end): New function.
14514 (unexpected_eof): Use it.
14515 (unexpected_newline): New function.
14516 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
14517 actions.
e476c87d 14518
12ffdd28
PE
14519 * NEWS: Document %expect-rr.
14520
14521 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
14522 Fix typo by replacing $1 with $option.
14523 Remove more 'intl'-related files.
9668e2be 14524 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
14525
14526 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
14527 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
14528 strtoul.c.
14529 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
14530 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
14531 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
14532 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
14533 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
14534 * src/.cvsignore: Add *.output.
14535
14536 * src/parse-gram.y: Put copyright notice inside %{ %} so it
14537 gets copied to the output file.
e476c87d 14538
1f65350a
PE
145392004-04-28 Paul Eggert <eggert@twinsun.com>
14540
14541 Get files from the gnulib and po repositories, instead of relying
14542 on them being in our CVS. Upgrade to latest versions of gnulib
14543 and Automake.
14544
14545 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
14546 * bootstrap: Bootstrap from gnulib and po repositories.
14547 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
14548 * README-cvs: Document these changes. Remove version numbers from
14549 mentions of build tools, since they change so often. Mention Flex.
14550
14551 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
14552 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
14553 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
14554 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 14555 does this for us.
12ffdd28
PE
14556 (AC_ISC_POSIX): Remove; we no longer support this
14557 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
14558 (AC_HEADER_STDC): Remove: we now assume C89 or better.
14559 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
14560 Do not check for C89 headers, except for locale.h which is used
14561 by the Yacc library and must port to K&R hosts.
14562 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
14563 Do not check for C89 functions, except for setlocale which is
14564 used by the Yacc library.
14565 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
14566 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
14567 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
14568 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
14569 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
14570 AM_GNU_GETTEXT): Remove; now done by:
14571 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
14572 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
14573 for us.
14574
14575 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
14576 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
14577 Define to empty, as gnulib.mk will do the rest for us.
14578 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
14579 for us.
14580 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
14581 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
14582
14583 * src/files.c: Include gnulib's xstrndup.h.
14584
14585 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
14586 (REALLOC): Use xnrealloc, for likewise.
14587 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
14588 (strnlen, memrchr): Remove decls; functions no longer used.
14589 Include <stpcpy.h>.
14590
14591 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
14592 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14593 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
14594 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
14595 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
14596 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
14597 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
14598 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
14599 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
14600 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
14601 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
14602 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14603 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
14604 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
14605 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
14606 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
14607 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
14608 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
14609 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
14610 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
14611 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
14612 Remove, as these files are now generated automatically
14613 by bootstrap or automake.
14614
14615 * po/ChangeLog: Remove: all but one entry was a duplicate
14616 of this file, and I moved that 2000-11-02 entry here.
14617
14618 * config/.cvsignore: Add Makefile, depcomp, install-sh.
14619 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
14620 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
14621 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
14622 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
14623 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
14624 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
14625 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
14626 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
14627 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
14628 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
14629 xstrndup.h.
14630 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
14631 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
14632 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
14633 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
14634 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
14635 * src/.cvsignore: Remove *_.c.
14636
14637
14638 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
14639 support it. (The latest stable gzip doesn't.)
14640
146412004-04-27 Paul Eggert <eggert@twinsun.com>
14642
14643 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
14644 case, as stos_ is now used by destructors due to the 2004-02-09
14645 change.
14646
14647 Remove more K&R C support.
14648 * lib/libiberty.y (PARAMS): Remove. All uses removed.
14649 * lib/subpipe.c (errno): Remove decl.
14650 Include <stdlib.h> unconditionally.
14651 (EXIT_FAILURE): Remove macro.
14652 * src/complain.c (vfprintf, strerror): Remove.
14653 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
14654 unconditionally.
14655 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
14656 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
14657 (strchr, strspn, memchr): Remove decls.
14658 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
14659 unconditionally. Do not declare perror.
14660 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
14661 unconditionally.
14662
14663 * src/complain.c (_): Remove useless defn, as system.h defines this.
14664
14665 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
14666 with latest obstack.h.
14667 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
14668 to procedure types, as obstack.h now does that for us.
14669 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
14670
14671 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
14672 so that this include file can stand alone.
14673 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
14674 does this now. Include subpipe.h first after config.h, to
14675 test whether it can stand alone.
14676
14677 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
14678 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
14679 unused declaration.
14680
14681 * tests/synclines.at (%union synch line): Put a dummy member in
14682 the union, because empty unions aren't allowed in C. Caught
14683 by GCC 3.4.0.
14684
4f16766c
PE
146852004-04-13 Jim Meyering <jim@meyering.net>
14686
14687 * src/conflicts.c (conflicts_print): Correct format string typo:
14688 use `%%' to produce literal `%'. (trivial change)
14689
779e7ceb
PE
146902004-03-30 Paul Eggert <eggert@twinsun.com>
14691
14692 * src/getargs.c (version): Update copyright year to 2004.
14693
14694 * data/c.m4 (b4_int_type): Use 'short int' rather than
14695 'short', and similarly for 'long', 'unsigned', etc.
14696 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
14697 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
14698 yy_yypstack, yydumpstack): Likewise.
14699 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
14700 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
14701 Likewise.
14702 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
14703 yy_stack_print, yyparse): Likewise.
14704 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
14705 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
14706 * lib/bitset.c (bitset_print): Likewise.
14707 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
14708 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14709 * lib/bitsetv.c (bitsetv_dump): Likewise.
14710 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
14711 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
14712 Likewise.
14713 * src/LR0.c (allocate_itemsets): Likewise.
14714 * src/gram.h (rule_number, rule): Likewise.
14715 * src/lalr.h (goto_number): Likewise.
14716 * src/nullable.c (nullable_compute): Likewise.
14717 * src/output.c (prepare_rules): Likewise.
14718 * src/relation.c (relation_print, relation_digraph): Likewise.
14719 * src/relation.h (relation_node): Likewise.
14720 * src/state.h (state_number, transitions, errs, reductions,
14721 struct state): Likewise.
14722 * src/symtab.h (symbol_number, struct symbol): Likewise.
14723 * src/tables.c (vector_number, tally, action_number,
14724 default_goto, goto_actions): Likewise.
14725 * tests/existing.at (GNU Cim Grammar): Likewise.
14726 * tests/regression.at (Web2c Actions): Likewise.
14727
14728 * src/output.c (muscle_insert_short_int_table): Renamed from
14729 muscle_insert_short_table. All uses changed.
14730
d6328241
PH
147312004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
14732
14733 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
14734 (declaration): Replace expected_conflicts with expected_sr_conflicts.
14735 Add %expect-rr rule.
4f16766c 14736
d6328241
PH
14737 * src/scan-gram.l: Recognize %expect-rr.
14738
4f16766c 14739 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 14740 expected_conflicts.
4f16766c 14741 (expected_rr_conflicts): Declare.
d6328241
PH
14742
14743 * src/conflicts.c (expected_sr_conflicts): Rename from
14744 expected_conflicts.
14745 (expected_rr_conflicts): Define.
14746 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
14747 for GLR parsers.
14748 Use expected_sr_conflicts in place of expected_conflicts.
14749 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 14750
d6328241 14751 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 14752
1452af69
PE
147532004-03-08 Paul Eggert <eggert@gnu.org>
14754
14755 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 14756 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
14757
14758 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
14759 in lalr1.cc.
14760 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
14761 * src/scan-gram.l (scan_integer): New function.
14762 ({int}): Use it.
14763 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
14764 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
14765 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
14766 Say "long int", not "long", for uniformity with GNU style.
14767
006d217d
PE
147682004-02-25 Paul Eggert <eggert@twinsun.com>
14769
14770 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
14771 compilers. This fixes a problem with Intel's C++ compiler being
14772 chatty, reported by Guido Trentalancia in
161a71f3 14773 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 14774
c2729758
ADL
147752004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
14776
14777 Support %destructor and merge error locations in lalr1.cc.
14778
14779 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
14780 (Parser::stos_): Define unconditionally.
14781 (Parser::destruct_): New method. Generate its body with
14782 b4_yydestruct_generate.
14783 (Parser::error_start_): New attribute.
14784 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
14785 token which are discarded.
14786 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
14787 error_start_ when erroneous token are discarded.
14788 (Parser::parse) <yyerrlab1>: Compute the location of the error
14789 token so that it covers all the discarded tokens.
14790 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
14791 it can be called with `%skeleton "lalr1.cc"', and do that.
14792
dd0e0635
PE
147932004-02-02 Paul Eggert <eggert@twinsun.com>
14794
14795 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
14796 $(top_srcdir)/lib and ../lib. This fixes a bug reported
14797 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
14798 There's no need to mention top_builddir since Automake does that
14799 for us.
14800 (INCLUDES): Remove, as Automake says it's obsolescent.
14801 Contents migrated into AM_CPPFLAGS as described above.
14802 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
14803
148042004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
14805
14806 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
14807 (yyreportSyntaxError): Handle case where lookahead token is
14808 YYEMPTY.
14809
be16239b
PH
148102004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14811
14812 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
14813 resulting parsers are compilable with C++.
14814
5fa90832
PE
148152003-12-23 Paul Eggert <eggert@twinsun.com>
14816
14817 * config/depcomp, config/install-sh: Sync with Automake 1.8.
14818 * src/output.c (output_skeleton): Rename local var.
14819 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
14820 Bison tokens, as this runs afoul of the 2003-10-07 change that
14821 disallowed NUL bytes in character constants or string literals.
14822
14823 * tests/local.at: Require Autoconf 2.59's Autotest.
14824 * tests/testsuite.at: Don't include local.at, since we now assume
14825 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
14826 including it.
14827 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
14828 multiple inclusion warnings.
dd0e0635 14829
b165c324
AD
148302003-12-02 Akim Demaille <akim@epita.fr>
14831
14832 * doc/bison.texinfo (How Can I Reset the Parser): More about start
14833 conditions.
14834 From Bruno Haible.
14835
26e06a21
ADL
148362003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
14837
14838 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
14839
92ac3705
PE
148402003-10-07 Paul Eggert <eggert@twinsun.com>
14841
6a5ecb38
PE
14842 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
14843 if testsuite doesn't exist.
14844
92ac3705
PE
14845 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
14846 literals, unfortunately.
14847 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
14848 Complain about NUL bytes in character constants or string literals.
14849
91d2c560
PE
148502003-10-05 Paul Eggert <eggert@twinsun.com>
14851
14852 * NEWS: Don't document %no-default-prec, as it's still
14853 too experimental.
14854 * doc/bison.texinfo: Document %no-default-prec only if
14855 the defaultprec flag is set. Normally it's not.
14856
0cc3da3a
PE
148572003-10-04 Paul Eggert <eggert@twinsun.com>
14858
14859 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
14860 non-modifiable lvalue, instead of a modifiable one.
14861 * doc/bison.texinfo (Actions): Document that $$ can
14862 be assigned to. Do not claim that $$ and $N are
14863 array element references: user code should not rely on this.
14864
22fccf95
PE
148652003-10-01 Paul Eggert <eggert@twinsun.com>
14866
14867 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
14868 (grammar_declaration): Use it.
14869 * src/scan-gram.l: New token %no-default-prec.
14870 * tests/conflicts.at: Revamp tests to use %no-default-prec.
14871 * NEWS, doc/bison.texinfo: Document the above.
14872
fc8f2965
AD
148732003-10-01 Akim Demaille <akim@epita.fr>
14874
14875 VCG no longer supports long_straight_phase.
14876
14877 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
14878 * src/print_graph.c (print_graph): Adjust.
14879
39a06c25
PE
148802003-09-30 Frank Heckenbach <frank@g-n-u.de>
14881 and Paul Eggert <eggert@twinsun.com>
14882
14883 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
14884 Table of Symbols): Document %default-prec.
14885 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
14886 (grammar_declaration): Set default_prec on %default-prec.
14887 * src/scan-gram.l (%default-prec): New token.
14888 * src/reader.h (default_prec): New flag.
14889 * src/reader.c: Likewise.
14890 (packgram): Handle it.
14891 * tests/conflicts.at (%default-prec without %prec,
14892 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 14893
39a06c25
PE
148942003-09-30 Paul Eggert <eggert@twinsun.com>
14895
14896 * tests/testsuite.at: Include local.at, not input.at, fixing
14897 a typo in the 2003-08-25 patch.
14898
62b6aef9
AD
148992003-08-27 Akim Demaille <akim@epita.fr>
14900
14901 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
14902 GCC warnings.
14903
89e1cc61
AD
149042003-08-26 Akim Demaille <akim@epita.fr>
14905
14906 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
14907 "<\#" to avoid magic from Gnus when posting parts of this script.
14908
a08460b0
AD
149092003-08-26 Akim Demaille <akim@epita.fr>
14910
14911 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
14912 (Parser::parse): here.
14913 Adjust: nerrs and errstatus is now replaced by...
14914 (Parser::nerrs_, Parser::errstatus_): New.
14915
603f1cfd
AD
149162003-08-25 Akim Demaille <akim@epita.fr>
14917
14918 * config/announce-gen, Makefile.cfg: New.
14919 * Makefile.am: Adjust.
14920 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
14921 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
14922
cd3684cf
AD
149232003-08-25 Akim Demaille <akim@epita.fr>
14924
14925 When reducing initial empty rules, Bison parser read an initial
14926 location that is not defined. This results in garbage, and that
14927 affects Bison's own parser. Therefore we need (i) to extend Bison
14928 to support a means to initialize this location, and (ii) to use
14929 this CVS Bison to fix CVS Bison's parser.
14930
14931 * src/reader.h, reader.c (epilogue_augment): Remove, replace
14932 with...
14933 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
14934 * src/parse-gram.y: Adjust.
14935 (%initial-action): New.
14936 (%error-verbose): Since we require CVS Bison, there is no reason
14937 not to use it.
14938 * src/scan-gram.l: Adjust.
14939 * src/Makefile.am (YACC): New, to make sure we use our own parser.
14940 * data/yacc.c (yyparse): Use b4_initial_action.
14941
4e03e201
AD
149422003-08-25 Akim Demaille <akim@epita.fr>
14943
14944 * doc/bison.texinfo: Don't promote stdout for error messages.
14945
8c182d05
AD
149462003-08-25 Akim Demaille <akim@epita.fr>
14947
14948 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
14949 From Alexandre Duret-Lutz.
14950
6a60c4cf
PE
149512003-08-25 Akim Demaille <akim@epita.fr>
14952
14953 Version 1.875c.
14954
25f66e1a
AD
149552003-08-25 Akim Demaille <akim@epita.fr>
14956
14957 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
14958 Use them.
14959
5348bfbe
AD
149602003-08-25 Akim Demaille <akim@epita.fr>
14961
14962 * data/lalr1.cc (Parser::reduce_print_): New.
14963 Use it.
14964
47301314
AD
149652003-08-25 Akim Demaille <akim@epita.fr>
14966
14967 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
14968 error recovery loops. This patch is based on
161a71f3 14969 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
14970 Also, augment the similarity between lalr1.cc and yacc.c.
14971 Note: the locations of error recovery rules are not correct yet.
14972
14973 * data/lalr1.cc: Comment changes to augment the similarity between
14974 lalr1.cc and yacc.c.
14975 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
14976 (yyerrlab1): Remove, but where it used to be (now the bottom part of
14977 yyerrlab), when hitting EOF, pop the whole stack here instead of
14978 merely falling thru the default error handling mechanism.
14979 (yyerrorlab): New label, with the old contents of YYERROR,
14980 plus the following change: pop the stack of rhs corresponding
14981 to the production that invoked YYERROR. That is how Yacc
14982 behaves (required by POSIX).
14983 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
14984 fail.
14985
1f7a61ff
AD
149862003-08-25 Akim Demaille <akim@epita.fr>
14987
14988 Tune local.at so that people can "autom4te -l autotest calc.at -o
14989 calc" for instance, to extract a sub test suite.
14990
14991 * tests/testsuite.at: Move the initialization, Autotest version
14992 requirement, and AT_TESTED invocation into...
14993 * tests/local.at: here.
14994 * tests/testsuite.at: Include it for compatibility with Autoconf
14995 2.57.
14996 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
14997 be ignore.
14998
327b5b56
PE
149992003-08-04 Paul Eggert <eggert@twinsun.com>
15000
15001 Rework code slightly to avoid gcc -Wtraditional warnings.
15002 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
15003 The returned value is now stored in *YY0. All callers changed.
15004 * src/output.c (merge_output): Adjust to the above change.
15005
0051e3ed
PE
150062003-07-26 Paul Eggert <eggert@twinsun.com>
15007
15008 * data/glr.c (YYASSERT): New macro.
15009 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
15010 yyresolveStates, yyprocessOneStack):
15011 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
15012 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 15013
137437c6
PE
150142003-07-25 Paul Eggert <eggert@twinsun.com>
15015
5b620e06
PE
15016 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
15017 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 15018 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
15019 by Frank Heckenbach, though I have omitted the structure-initialization
15020 part of his glr-knr.diff patch since I recall that the Portable
15021 C Compiler didn't require that change.
15022
137437c6
PE
15023 Let the user specify how to allocate and free memory.
15024 Derived from a suggestion by Frank Heckenbach in
161a71f3 15025 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
15026 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
15027 All uses of free, malloc, realloc changed to use these macros,
15028 and unnecessary casts removed.
15029 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
15030
ddb85ca5
PE
150312003-07-06 Matthias Mann <MatthiasMann@gmx.de>
15032
15033 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
15034 use s.empty() rather than s == "" to test for empty string; see
161a71f3 15035 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
15036 (trivial change)
15037
39910e09
AD
150382003-06-25 Akim Demaille <akim@epita.fr>
15039
15040 * config/depcomp, config/install-sh: Update from masters.
15041
0ae99356
PE
150422003-06-20 Paul Eggert <eggert@twinsun.com>
15043
15044 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
15045 and return properly parenthesized result.
15046 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
15047 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
15048 Remove unnecessary parentheses from uses.
15049 * doc/bison.texinfo (Location Default Action): Describe the
15050 conventions for parentheses.
15051
cd05d13c
PE
150522003-06-19 Paul Eggert <eggert@twinsun.com>
15053
81fd08ca
PE
15054 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
15055 yyreportTree): Do not assume that size_t is the same width as int,
15056 when printing sizes. Print sizes using an unsigned format.
15057 Problem reported by Frank Heckenbach in
161a71f3 15058 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 15059
cd05d13c
PE
15060 Port to Forte Developer 7 C compiler.
15061 * data/glr.c (struct YYLTYPE): If locations are not being used,
15062 declare a single dummy member, as empty structs do not conform
15063 to the C standard.
15064 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
15065 the Forte Developer 7 C compiler complains that end-of-loop
15066 code is not reached.
15067
4dcf140b
PE
150682003-06-17 Paul Eggert <eggert@twinsun.com>
15069
15070 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
15071 avoid warnings from picky compilers about redefinition of PARAMS.
15072
8dd76bee
PE
150732003-06-17 Paul Eggert <eggert@twinsun.com>
15074
15075 Version 1.875b.
15076
15077 * NEWS: Document 1.875b.
15078
15079 * lib/bbitset.h: Do not include config.h; that's the includer's job.
15080 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
15081 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
15082 Don't use 'index' in comments, as it's a builtin fn on some hosts.
15083 * lib/bitset_stats.c: Include gettext.h unconditionally, as
15084 per recent gettext manual's suggestion.
15085 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
15086 Use prototypes, not old-style definitions.
15087 * lib/lbitset.c (lbitset_unused_clear): Likewise.
15088 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
15089 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
15090 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
15091 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
15092 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
15093 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
15094 vbitset_or_and_cmp, vbitset_copy): Likewise.
15095
15096 * lib/libiberty.h: Do not include config.h; that's the includer's job.
15097 Do not include <stdlib.h>.
15098 (PARAMS): Define unconditionally for C89.
15099 (ATTRIBUTE_NORETURN): Remove.
15100 (ATTRIBUTE_UNUSED): Define unconditionally.
15101
15102 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 15103 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
15104 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
15105 * lib/vbitset.c, lib/vbitset.h: New files.
15106 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15107 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
15108 from libbitset.
15109
15110 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
15111 `How Can I Reset @code{yyparse}', since texinfo does not allow
15112 arbitrary @ in node names.
15113
15114 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
15115 shouldn't be needed according to the gettext 0.12.1 documentation
15116 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 15117 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 15118 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 15119 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 15120
8dd76bee
PE
15121 * lib/.cvsignore: Add stdbool.h.
15122 * m4/.cvsignore: Add nls.m4, po.m4.
15123
15124 Upgrade to CVS gnulib.
15125 * stdbool_.h: File renamed from stdbool.h.in.
15126 * configure.ac (AM_STDBOOL_H): Invoke this instead of
15127 AC_HEADER_STDBOOL.
15128 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
15129 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
15130 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
15131 (MOSTLYCLEANFILES): New var.
15132 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
15133 (stdbool.h): New rule.
15134 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
15135 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
15136 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
15137 m4/quote.m4: Upgrade to today's gnulib.
15138
15139 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
15140 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
15141 the tests right now.
15142 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
15143 yyerror are declared before use; C99 requires this.
15144
25005f6a
PH
151452003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15146
15147 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
15148 first.
15149 (yyrecoverSyntaxError): Correct the logic for setting and testing
15150 yyerrState.
15151 Correct comment on handling EOF.
15152 Allow states with only a default reduction, rather than failing
8dd76bee 15153 (I can't quite reconstruct why these were not allowed before).
25005f6a 15154
137437c6 15155 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 15156 buffer overruns, corrupting state.
8dd76bee
PE
15157
15158 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
15159 definition.
15160 * src/reader.h (max_left_semantic_context): New variable declaration.
15161 * src/scan-gram.l (max_left_semantic_context): Define.
15162 (handle_action_dollar): Update max_left_semantic_context.
15163 * data/glr.c (YYMAXLEFT): New definition.
15164 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
15165 (yyresolveAction): Ditto.
15166
15167 Fixes to problems with location handling in GLR parsers reported by
15168 Frank Heckenbach (2003/06/05).
15169
15170 * data/glr.c (YYLTYPE): Make trivial if locations not used.
15171 (YYRHSLOC): Add parentheses, and define only if locations used.
15172 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
15173 locations not used.
15174 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
15175 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 15176
25005f6a
PH
15177 * tests/cxx-type.at: Exercise location information; update tests
15178 to differentiate output with and without locations.
8dd76bee 15179 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
15180 because default YYLTYPE not yet defined.
15181 Change semantic actions to compute strings, rather than printing
15182 them directly (to test proper passing of semantics values). Change
15183 output to prefix notation and update test data and expected results.
15184 (yylex): Track locations.
15185 (stmtMerge): Return value rather than printing, and include arguments
15186 in value.
8dd76bee 15187
711f40b7
PE
151882003-06-03 Paul Eggert <eggert@twinsun.com>
15189
15190 Avoid warnings generated by GCC 2.95.4 when Bison is
15191 configured with --enable-gcc-warnings.
15192 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
15193 yy::]b4_parser_class_name[::translate_,
15194 yy::Stack::operator[] (unsigned),
15195 yy::Stack::operator[] (unsigned) const,
15196 yy::Slice::operator[] (unsigned),
15197 yy::Slice::operator[] (unsigned) const):
15198 Rename local vars to avoid warnings.
15199 * tests/glr-regression.at (Improper handling of embedded actions
15200 and $-N in GLR parsers): Remove unused local variable from yylex.
15201 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
15202 (void) as arg when not pure, since we now assume C89 when building
15203 Bison. Pacify GCC by using parameter.
15204
ac695f7d
PE
152052003-06-02 Paul Eggert <eggert@twinsun.com>
15206
15207 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
15208 yy::Location::lines, yy::Location::columns): Rename arguments
15209 to avoid shadowing; this removes a warning generated by GCC 3.3.
15210
26ec81e0
PE
152112003-06-01 Paul Eggert <eggert@twinsun.com>
15212
15213 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
15214 to g++, as GCC 3.3 complains if you do it.
15215 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
15216 everything that WARNING_CFLAGS has, except omit warnings
15217 not suitable for C++.
15218 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
15219 * tests/atlocal.in (CXXFLAGS): New var.
15220 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
15221
15222 Fix a GLR parser bug I reported in February; see
161a71f3 15223 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
15224 The problem was that GLR parsers did not conform to the C standard,
15225 because actions like { $1 = $2 + $3; } expanded to expressions
15226 that invoked YYFILL in separate subexpressions, and YYFILL assigned
15227 to a local variable. The C standard says that expressions
15228 like (var = f ()) + (var = f ()) have undefined behavior.
15229 Another problem was that GCC sometimes issues warnings that
15230 yyfill and its parameters are unused.
15231
15232 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
15233 as possibly unused.
15234 (yyfill): New function.
15235 (YYFILL): Use it.
15236 (yyuserAction): Change type of yynormal to bool, so that it matches
15237 the new yyfill signature. Mark it as possibly unused.
15238
15239
15240 Follow up on a bug I reported in February, where a Bison-generated
15241 parser can loop. Provide a test case and a fix for yacc.c. I
15242 don't have a fix for lalr1.cc or for glr.c, unfortunately.
15243 The original bug report is in:
161a71f3 15244 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
15245
15246 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
15247 macro's size was becoming unwieldy.
15248 (yyerrlab): Do not discard an empty lookahead symbol, as this
15249 might destroy garbage.
15250 (yyerrorlab): New label, with the old contents of YYERROR,
15251 plus the following change: pop the stack of rhs corresponding
15252 to the production that invoked YYERROR. That is how Yacc
15253 behaves, and POSIX requires this behavior.
15254 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
15255 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
15256 Define 'alarm' to do nothing if unistd.h is not available.
15257 Add a new rule "exp: '-' error;" to test the above change to
15258 data/yacc.c. Use 'alarm' to abort any test taking longer than
15259 10 seconds, as it's probably looping.
15260 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
15261 Also, the new yacc.c generates two fewer diagnostics for an
15262 existing test.
15263
d0829076
PE
152642003-05-24 Paul Eggert <eggert@twinsun.com>
15265
c6ae27df
PE
15266 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
15267 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
15268 This fixes a problem reported by John Bowman when the Compaq/HP
15269 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
15270 -ansi -Wall -gall).
15271 * data/yacc.c (union yyalloc): Likewise.
15272 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 15273
d0829076
PE
15274 Switch from 'int' to 'bool' where that makes sense.
15275
15276 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
15277 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
15278 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
15279 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
15280 Return or accept bool, not int. All callers changed.
15281 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
15282 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
15283 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
15284 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
15285 bitset_or_and_cmp_): Likewise.
15286 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
15287 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
15288 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
15289 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
15290 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
15291 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
15292 bitset_stats_or_and_cmp): Likewise.
15293 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
15294 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
15295 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
15296 ebitset_xor_cmp): Likewise.
15297 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
15298 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
15299 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
15300 lbitset_xor_cmp): Likewise.
15301 * lib/bbitset.h: Include <stdbool.h>.
15302 (struct bitset_vtable): The following members now return bool, not
15303 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
15304 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
15305 or_and_cmp).
15306 * src/conflicts.c (count_rr_conflicts): Likewise.
15307 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
15308 All uses changed.
15309 * lib/ebitset.c (ebitset_obstack_init): Likewise.
15310 * lib/lbitset.c (lbitset_obstack_init): Likewise.
15311 * src/getargs.c (debug_flag, defines_flag, locations_flag,
15312 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
15313 graph_flag): Likewise.
15314 * src/getargs.h (debug_flag, defines_flag, locations_flag,
15315 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
15316 graph_flag): Likewise.
15317 * src/output.c (error_verbose): Likewise.
15318 * src/output.h (error_verbose): Likewise.
15319 * src/reader.c (start_flag, typed): Likewise.
15320 * src/reader.h (typed): Likewise.
15321 * src/getargs.c (LOCATIONS_OPTION): New constant.
15322 (long_options, getargs): Use it.
15323 * src/lalr.c (build_relations): Use bool, not int.
15324 * src/nullable.c (nullable_compute): Likewise.
15325 * src/print.c (print_reductions): Likewise.
15326 * src/tables.c (action_row, pack_vector): Likewise.
15327 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
15328 * src/output.c (prepare): Use it.
15329 * src/output.c (token_definitions_output,
15330 symbol_destructors_output, symbol_destructors_output): Use string,
15331 not boolean integer, to keep track of whether to output separator.
15332 * src/print_graph.c (print_core): Likewise.
15333 * src/state.c (state_rule_lookaheads_print): Likewise.
15334
15335 * config/install-sh: Sync from automake 1.7.5.
15336
6b2584b7
PE
153372003-05-14 Paul Eggert <eggert@twinsun.com>
15338
15339 * src/parse-gram.y (rules_or_grammar_declaration): Require a
15340 semicolon after a grammar declaration, in the interest of possible
15341 future changes to the Bison input language.
15342 Do not allow a stray semicolon at the start of the grammar.
15343 (rhses.1): Allow one or more semicolons after any rule, including
15344 just before "|" as required by POSIX.
15345 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
15346 grammar.
15347
caf37a36
ADL
153482003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
15349
15350 %parse-param support for lalr1.cc.
15351
15352 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
15353 b4_cc_constructor_calls, b4_cc_constructor_call,
15354 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
15355 definitions.
15356 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
15357 parse-param arguments.
15358 (yy::b4_parser_class_name): Declare instance variables to
15359 hold parse-param arguments.
15360 * tests/calc.at: s/value/semantic_value/ because value clashes
15361 with a member of yy::b4_parser_class_name. Adjust C++ code
15362 to handle %parse-param. Enable %parse-param test in C++.
15363
3ab37077
PE
153642003-05-12 Paul Eggert <eggert@twinsun.com>
15365
15366 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
15367 English a bit. Fix fclose typo. Change "const char" to "char
15368 const", and use ANSI C rather than K&R for "main". Suggest
15369 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
15370 and suggest yy_switch_to_buffer.
15371
153722003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
15373
15374 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
15375 C89. This avoids a diagnostic on compilers that define __STDC__
15376 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 15377 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 15378
e743727f
PE
153792003-05-03 Paul Eggert <eggert@twinsun.com>
15380
15381 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
15382 Do not overrun array bounds.
15383 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 15384 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 15385
916708d5
AD
153862003-04-29 Akim Demaille <akim@epita.fr>
15387
15388 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
15389 * src/getargs.c, src/getargs.h: here, as bool, not int.
15390 (nondeterministic_parser): New.
15391 * src/parse-gram.y, src/scan-gram.l: Support
15392 %nondeterministic-parser.
15393 * src/output.c (prepare): Use nondeterministic_parser instead
15394 of glr_parser where appropriate.
15395 * src/tables.c (conflict_row, action_row, save_row)
15396 (token_actions, token_actions, pack_vector): Ditto.
15397
a06ea4aa
AD
153982003-04-29 Akim Demaille <akim@epita.fr>
15399
15400 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
15401
211074ca
AD
154022003-04-29 Akim Demaille <akim@epita.fr>
15403
15404 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
15405 with %pure-parser and %locations to exercise the patch from Yakov
15406 Markovitch below.
15407
6175ffe3
PE
154082003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
15409
15410 * data/yacc.c: (b4_lex_param): Corrected for the case where
15411 %lex-param is provided and %pure-parser isn't.
15412
b1e95857
PE
154132003-04-27 Paul Eggert <eggert@twinsun.com>
15414
15415 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 15416 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
15417 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
15418 if it is not defined.
15419 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
15420
acda9df6
PE
154212003-04-26 Paul Eggert <eggert@twinsun.com>
15422
3470c57b
PE
15423 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
15424 Declare to be of type suitable for the ninf value itself, not of
15425 type suitable for the corresponding table, since the latter might
15426 be unsigned but the ninf value might be negative. This fixes a
15427 bug reported by Alexandre Duret-Lutz in
161a71f3 15428 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 15429
acda9df6
PE
15430 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
15431 invokes it. We shouldn't invoke it twice because it will attempt
15432 to put error.o in the archive twice. This fixes a glitch reported
15433 by Martin Mokrejs in
161a71f3 15434 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 15435
b5250f26
PE
154362003-04-21 Paul Eggert <eggert@twinsun.com>
15437
15438 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
15439 to gnulib.
15440
089ac0f1
PE
154412003-04-21 Yakov Markovitch <Markovitch@iso.ru>
15442
15443 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
15444 Fix obvious typo that results in uncompilable GLR parsers
15445 when both %pure-parser and %locations are used. (trivial change)
15446
5ededac6
PE
154472003-04-17 Paul Eggert <eggert@twinsun.com>
15448
1b8f2fff
PE
15449 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
15450 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
15451 Do not insert the expected token via unput, as this runs afoul
15452 of a POSIX-compatibility bug in flex 2.5.31.
15453 All uses changed to BEGIN the parent state,
15454 since we no longer insert the expected token via unput.
15455 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
15456 that is no longer emitted after the above change.
15457
5ededac6
PE
15458 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
15459 the first one. This change is from Paul Hilfinger, and it fixes
15460 regression reported by Werner Lemberg in
161a71f3 15461 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
15462
15463 (resolve_sr_conflict): Don't invoke state_errs_set
15464 unless one or more tokens have been explicitly made errors.
15465 Otherwise, the above change causes Bison to abort.
15466
15467 * tests/existing.at (GNU pic Grammar): New test case, taken from
15468 Lemberg's email.
15469
b8be9132
AD
154702003-03-31 Akim Demaille <akim@epita.fr>
15471
15472 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
15473
d423d460
AD
154742003-03-31 Akim Demaille <akim@epita.fr>
15475
15476 * src/output.c (prepare_symbols): Avoid trailing spaces in the
15477 output.
15478
c7e441b4
AD
154792003-03-31 Akim Demaille <akim@epita.fr>
15480
15481 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
15482 From Paul Hilfinger.
15483
231897ad
AD
154842003-03-29 Akim Demaille <akim@epita.fr>
15485
15486 * m4/error.m4: Do not put under dynamic conditions some code which
15487 expansion is under static control.
15488
5b066063
AD
154892003-03-29 Akim Demaille <akim@epita.fr>
15490
15491 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
15492
22a74fec
AD
154932003-03-29 Akim Demaille <akim@epita.fr>
15494
15495 * doc/bison.texinfo (Strings are Destroyed): New.
15496
0eee27e7
PE
154972003-03-13 Paul Eggert <eggert@twinsun.com>
15498
15499 * .cvsignore: Add configure.lineno.
15500 * src/.cvsignore: Add yacc.
15501 * tests/.cvsignore: Add testsuite.log.
15502 * doc/fdl.texi: Sync with latest FSF version.
15503
f61aad93
PE
155042003-03-12 Paul Eggert <eggert@twinsun.com>
15505
537636c7
PE
15506 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
15507 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
15508 cursor, instead of leaving it undefined. This fixes a bug
15509 reported by Tim Van Holder in
161a71f3 15510 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
15511 * tests/input.at (Torturing the Scanner): Test the scanner on
15512 an empty input file, which was Tim Van Holder's test case.
15513
15514 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
15515 <sys/resource.h> can be included, include sys/time.h and
15516 sys/times.h first, if available. This works around the SunOS
15517 4.1.4 porting bug reported by Bruce Becker in
161a71f3 15518 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
15519
15520 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
15521 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
15522 AC_HEADER_SYS_WAIT.
15523
f61aad93
PE
15524 Merge changes from gnulib. This was prompted because the CVS
15525 snapshot didn't build on Solaris 7 due to strnlen problems.
15526
15527 These changes need to be merged back into gnulib:
15528 * lib/hash.c: Include <stdbool.h> unconditionally.
15529 * m4/onceonly.m4 (m4_quote): New macro.
15530 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
15531 Quote AC_FOREACH variable-expansions properly.
15532 The 2003-01-03 obstack.h change also needs merging.
15533 {end of changes requiring merging}
5b066063 15534
f61aad93
PE
15535 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
15536 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
15537 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
15538 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
15539 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
15540 New files, imported from gnulib.
15541 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
15542 above.
15543
15544 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
15545 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
15546 gnulib sources.
15547
15548 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
15549 Add.
15550 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
15551 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
15552 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
15553 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
15554 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
15555 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
15556 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
15557 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
15558 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
15559 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
15560 (jm_PREREQ_ARGMATCH): Remove.
15561 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
15562 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
15563
15564 * src/system.h: Include <stdbool.h> unconditionally.
15565
15566 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
15567 assuming at least C89 in the bitset code for some time now.
15568
d2ffe116
AD
155692003-03-03 Akim Demaille <akim@epita.fr>
15570
15571 * ro.po: New.
15572
052826fd
AD
155732003-03-02 Akim Demaille <akim@epita.fr>
15574
15575 * doc/bison.texinfo (Table of Symbols): Reactivate the
15576 documentation for %lex-param, and %parse-param.
15577
c4749565
AD
155782003-03-02 Akim Demaille <akim@epita.fr>
15579
15580 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
15581 generate verbose error messages.
15582 Use the number of tokens as an upper bound in yytname, as it
15583 cannot be a non terminal.
15584
d5286af1
AD
155852003-03-02 Akim Demaille <akim@epita.fr>
15586
15587 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
15588 message.
15589
22e304a6
AD
155902003-03-02 Akim Demaille <akim@epita.fr>
15591
22e304a6
AD
15592 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
15593 Use them to exercise yycheck overrun.
15594 Based on Andrew Suffield's grammar.
15595
67a25fed
AD
155962003-03-02 Akim Demaille <akim@epita.fr>
15597
15598 Create tests/local.at for Bison generic testing macros.
15599
15600 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
15601 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
15602 This new file.
15603 * tests/calc.at (AT_CHECK_CALC): Adjust.
15604 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
15605 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
15606 * tests/local.at: here.
15607 (AT_COMPILE_CXX): Tags the tests using it as c++.
15608 Ignore the test if CXX is not functional.
15609
9c2b381f
PE
156102003-03-01 Paul Eggert <eggert@twinsun.com>
15611
15612 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
15613 not loc->end, since loc->end might contain garbage and this leads
15614 to undefined behavior on some platforms.
15615 (id_loc, token_start): Use (IF_LINTed) initial values that do not
15616 depend on *loc, so that the reader doesn't give the the false
15617 impression that *loc is initialized.
15618 (<INITIAL>"%%"): Do not bother setting code_start, since its value
15619 does not survive the return.
15620
0433ba88
AD
156212003-03-01 Akim Demaille <akim@epita.fr>
15622
15623 * src/scan-gram.l (code_start): Always initialize it when entering
15624 into yylex, as SC_EPILOGUE is activated *before* the corresponding
15625 yylex invocation. An alternative would be making it static, but
15626 then it starts with the second %%'s beginning, instead of its end.
15627
b305ea69
PE
156282003-02-28 Paul Eggert <eggert@twinsun.com>
15629
15630 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
15631 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 15632 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 15633
c3d25e01
PE
156342003-02-26 Paul Eggert <eggert@twinsun.com>
15635
15636 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
15637 Remove Sequent/Pyramid discussion (nobody uses them any more).
15638 Merge VMS and MS-DOS discussion; these ports may well be dead
15639 but let's keep mentioning them for now. Put <> around email
15640 addresses. Add copyright notice.
15641
c267ffbc
PE
156422003-02-24 Paul Eggert <eggert@twinsun.com>
15643
15644 * data/glr.c (yy_reduce_print): yylineno -> yylno,
15645 to avoid collision with flex use of yylineno.
15646 Problem reported by Bruce Lilly in
161a71f3 15647 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
15648 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
15649 * data/yacc.c (yy_reduce_print): Likewise.
15650
15651 * config/depcomp: Sync with Automake 1.7.3.
15652
f939fc12
AD
156532003-02-21 Akim Demaille <akim@epita.fr>
15654
15655 * data/lalr1.cc: Use temporary variables instead of casts to
15656 change integer types.
15657 Suggested by Paul Eggert.
15658
95923bd6
AD
156592003-02-21 Akim Demaille <akim@epita.fr>
15660
15661 * doc/bison.texinfo: Use "location" consistently to refer to @n,
15662 to avoid confusions with lalr1.cc's notion of Position.
15663 Suggested by Paul Eggert.
15664
2cdc240e
AD
156652003-02-20 Akim Demaille <akim@epita.fr>
15666
15667 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
15668 before initial_columns.
15669 (location.hh): Use consistent variable names when defining the
15670 operator<<.
15671 Use "last" so that we subtract from Positions, not from unsigned.
15672
5d003116
AD
156732003-02-20 Akim Demaille <akim@epita.fr>
15674
15675 * data/lalr1.cc (position.hh): New subfile, including the extended
15676 and Doxygen'ed documentation of class Position.
15677 (location.hh): Use it.
15678 Document a` la Doxygen.
ba1ecc07 15679 With the help of Benoit Perrot.
5d003116 15680
d02b25f9
AD
156812003-02-20 Akim Demaille <akim@epita.fr>
15682
15683 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
15684 AT_YACC_IF.
15685 Redefine AT_YYERROR_SEES_LOC_IF using it.
15686 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
15687 not defined.
15688 Don't use the location in yy::Parser::error_ and
15689 yy::Parser::print_ when not %locations.
15690 Activate more lalr1.cc tests.
15691
0d1c3a04
AD
156922003-02-19 Akim Demaille <akim@epita.fr>
15693
15694 * data/lalr1.cc: When displaying a line number, be sure to make it
15695 an int.
15696
60a777aa
AD
156972003-02-19 Akim Demaille <akim@epita.fr>
15698
15699 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
15700 Remove, useless.
15701 (YYABORT, YYACCEPT, YYERROR): New.
15702 * tests/calc.at: Renable the lalr1.cc test.
15703
0b86fc41
AD
157042003-02-19 Akim Demaille <akim@epita.fr>
15705
15706 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
15707 error recovery, mixing with/without pops and discarding of the
15708 lookahead.
15709 Exercise YYERROR.
15710 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
15711
da99a5dc
PE
157122003-02-17 Paul Eggert <eggert@twinsun.com>
15713
15714 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
15715 * tests/testsuite.at (AT_COMPILE): Use them.
15716 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 15717 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 15718
93b8c255
PE
157192003-02-12 Paul Eggert <eggert@twinsun.com>
15720
15721 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
15722 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 15723 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
15724 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
15725 Check for malloc failure, for consistency with yacc.c.
15726 (yytname_size): Remove, for consistency with yacc.c.
15727
15728 The bug still remains in data/lalr1.cc, as I didn't have time
15729 to fix it there.
15730
7548fed2
AD
157312003-02-06 Akim Demaille <akim@epita.fr>
15732
15733 * configure.ac (GXX): Rename as...
15734 (CXX): this, to keep the original Autoconf semantics.
15735 Require 2.57.
15736 * data/lalr1.cc: Fix b4_copyright invocations.
15737 If YYDEBUG is not defined, don't depend upon name_ being defined.
15738 (location.hh): Include string and iostream.
15739 (Position::filename): New member.
15740 (Position::Position ()): New.
15741 (operator<< (Position)): New.
15742 (operator- (Position, int)): New.
15743 (Location::first, Location::last): Rename as...
15744 (Location::begin, Location::end): these, to mock the conventional
15745 iterator names.
15746 (operator<< (Location)): New.
15747 * tests/atlocal.in (CXX): New.
15748 * tests/testsuite.at (AT_COMPILE_CXX): New.
15749 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
15750 locations in a more synthetic way.
15751 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
15752 lalr1.cc is used.
15753 Adjust the C locations to match those from Emacs: first column is
15754 column 0.
15755 Change all the expected results.
15756 Conform to the GCS: simplify the locations when applicable.
15757 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
15758 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
15759 these CPP macros with the m4 macros new defined by...
15760 (AT_CHECK_PUSHDEFS): this, i.e.:
15761 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 15762 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
15763 New macros.
15764 (AT_CHECK_POPDEFS): Undefine them.
15765 (AT_CHECK_CALC_LALR1_CC): New.
15766 Use it for the first lalr1.cc test.
15767
43a176ef
AD
157682003-02-04 Akim Demaille <akim@epita.fr>
15769
15770 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
15771 Location as is defined.
15772
fc049e9c
AD
157732003-02-04 Akim Demaille <akim@epita.fr>
15774
15775 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
15776 name_ being defined.
15777
a737b216
PE
157782003-02-03 Paul Eggert <eggert@twinsun.com>
15779
15780 * src/gram.h (start_symbol): Remove unused decl.
15781
15782 Use more-consistent naming conventions for local vars.
15783
15784 * src/derives.c (derives_compute): Change type of local var from
15785 int to rule_number.
15786 * src/gram.c (grammar_rules_partial_print): Likewise.
15787 * src/print.c (print_core): Likewise.
15788 * src/reduce.c (reduce_grammar_tables): Likewise.
15789
15790 * src/gram.c (grammar_dump): Change name of item_number *
15791 local var from r to rp.
15792 * src/nullable.c (nullable_compute): Likewise.
15793
15794 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
15795
15796 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
15797 for symbol or symbol_number var.
15798 * src/reader.c (grammar_start_symbol_set): Likewise.
15799 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
15800 Likewise.
15801 * src/state.c (transitions_to): Likewise.
15802 * src/state.h: Likewise.
15803 * src/tables.c (symbol_number_to_vector_number): Likewise.
15804
15805 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
15806 char * var.
15807
15808 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
15809 var.
15810
15811 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
15812 var.
15813
15814 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
15815 Use str, not s, for char * var. Use ch, not c, for character var.
15816 Use size for size var.
15817
15818 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
15819 char * var.
15820 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
15821 uniqstr var.
15822 * src/uniqstr.h: Likewise.
15823
15824 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15825 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15826 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
15827 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
15828 param to have same name as that of enum, so that we don't use
15829 "s" to stand for a non-state.
15830
68e93ad5
AD
158312003-02-02 Akim Demaille <akim@epita.fr>
15832
15833 * src/scan-skel.l: Scan more than one inert character per yylex
15834 invocation.
15835
92898986
PE
158362003-02-01 Paul Eggert <eggert@twinsun.com>
15837
15838 Version 1.875a.
15839
1d9d5d71
PE
15840 * po/LINGUAS: Add ms.
15841
0435d061
AD
158422003-01-30 Akim Demaille <akim@epita.fr>
15843
15844 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
15845
6029a57f
PH
158462003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15847
15848 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
15849 of $1.
0435d061
AD
15850
15851 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 15852 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 15853 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 15854
6029a57f
PH
15855 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
15856 (b4_rhs_location): Ditto.
0435d061 15857 (yyfill): New function to copy from stack tree into array
6029a57f 15858 incrementally.
0435d061
AD
15859 (yyuserAction): Modify to allow incremental move of semantic values
15860 to rhs array when in GLR mode.
15861 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
15862 as needed.
15863 Remove dummy use of yystack, as there is now a guaranteed use.
15864 (yydoAction): Modify to allow incremental move of semantic values
15865 to rhs array when in GLR mode.
15866 (yyresolveAction): Ditto.
15867 (yyglrShiftDefer): Update comment.
0435d061 15868 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
15869 (yyglrReduce): Ditto.
15870 (yydoAction): Ditto
0435d061 15871
6029a57f
PH
15872 * tests/glr-regr1.at: Rename to ...
15873 * tests/glr-regression.at: Add new regression test for the problems
15874 described above (adapted from S. Eken).
15875 Update copyright notice.
15876 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
15877 * tests/Makefile.am: Ditto.
15878
6cee6297
PE
158792003-01-28 Paul Eggert <eggert@twinsun.com>
15880
15881 * data/lalr1.cc: Do not use @output_header_name@ unless
15882 b4_defines_flag is set. This fixes two bugs reported by
15883 Tim Van Holder in
161a71f3
PE
15884 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
15885 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 15886
b2a836b5
PE
158872003-01-21 Paul Eggert <eggert@twinsun.com>
15888
15889 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
15890 we don't need to worry about yyerrlab1 being reported as an
15891 "unused label" by non-GCC C compilers. The downside is that if
15892 locations are used then a couple of statements are duplicated each
15893 time YYERROR is invoked, but the upside is that the warnings
15894 should vanish.
15895 (yyerrlab1): Move code to YERROR.
15896 (yyerrlab2): Remove. Change uses back to yyerrlab1.
15897 This reverts some of the 2002-12-27 change.
15898
4196b931
PE
158992003-01-17 Paul Eggert <eggert@twinsun.com>
15900
15901 * src/output.c (symbol_printers_output): Fix typo that led
15902 to core dump. Problem reported by Antonio Rus in
161a71f3 15903 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 15904
3ae831b4
AD
159052003-01-13 Akim Demaille <akim@epita.fr>,
15906 Quoc Peyrot <chojin@lrde.epita.fr>,
15907 Robert Anisko <anisko_r@lrde.epita.fr>
15908
15909 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
15910 when the stacks contain one element, as the loop would otherwise
15911 free the last state, and then use the top state (the one we just
15912 popped). This means that the initial elements will not be freed
15913 explicitly, as is the case in yacc.c; it is not a problem, as
15914 these elements have fake values.
15915
e3aa65c5
PE
159162003-01-11 Paul Eggert <eggert@twinsun.com>
15917
15918 * NEWS: %expect-violations are now just warnings, reverting
15919 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
15920 bootstrapping problem reported by Matthias Klose; see
161a71f3 15921 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
15922 * src/conflicts.c (conflicts_print): Likewise.
15923 * tests/conflicts.at (%expect not enough, %expect too much,
15924 %expect with reduce conflicts): Likewise.
15925 * doc/bison.texinfo (Expect Decl): Document this. Also mention
15926 that the warning is enabled if the number of conflicts changes
15927 (not necessarily increases).
15928
15929 * src/getargs.c (version): Update copyright year.
15930
f0057011
AD
159312003-01-09 Akim Demaille <akim@epita.fr>
15932
15933 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
15934
1ee6d2a0
PE
159352003-01-08 Paul Eggert <eggert@twinsun.com>
15936
15937 * Makefile.maint (WGETFLAGS):
15938 New macro, containing "-C off" to disable proxy caches.
15939 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
15940 (rel-check): Use $(WGET) instead of wget.
15941
d4fd77c4
PE
159422003-01-06 Paul Eggert <eggert@twinsun.com>
15943
15944 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
15945 the GLR paper of Scott, Johnstone and Hussain.
15946
464c6927
PE
159472003-01-04 Paul Eggert <eggert@twinsun.com>
15948
d600ee67
PE
15949 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
15950 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
15951 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
15952 (EXTRA_LIBRARIES): New var, for liby.a.
15953 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
15954 (EXTRA_SCRIPTS): New var, for yacc.
15955
464c6927
PE
15956 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
15957 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
15958 Problem reported by Nelson H. F. Beebe.
15959
159602003-01-03 Paul Eggert <eggert@twinsun.com>
15961
15962 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
15963 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
15964 when compiling Bison 1.875's `bitset bset = obstack_alloc
15965 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
15966
15967 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
15968 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
15969 grow to a huge size with typical invocation.
d600ee67 15970
464c6927
PE
15971 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
15972 Use the pattern recommended by Autoconf 2.57, except also protect
15973 against double-definition.
15974 * src/system.h: Likewise.
15975 Portability issues reported by Nelson H. F. Beebe.
d600ee67 15976
464c6927
PE
15977 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
15978 All uses changed. Provide a definition in both C and C++.
15979 (yytrue, yyfalse): Define even if defined (__cplusplus).
15980
15981 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
15982 Reported by Nelson H. F. Beebe.
d600ee67 15983
464c6927
PE
15984 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
15985
0f42c7d5
PE
159862003-01-02 Paul Eggert <eggert@twinsun.com>
15987
15988 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
15989 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
15990 Bug reported by Nelson H. F. Beebe.
15991
dc546b0f
PE
159922003-01-01 Paul Eggert <eggert@twinsun.com>
15993
15994 * Version 1.875.
15995
2c09b6a7
PE
159962002-12-30 Paul Eggert <eggert@twinsun.com>
15997
15998 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
15999 Moved here from...
16000 (<INITIAL>","): Here. This causes stray "," to be treated
16001 more uniformly.
16002
dc546b0f 16003 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
16004 last brace in braced code when not in Yacc mode, for compatibility
16005 with Bison 1.35. This resurrects the 2001-12-15 patch to
16006 src/reader.c.
16007
16008 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
16009 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
16010
535c0f63
PE
160112002-12-28 Paul Eggert <eggert@twinsun.com>
16012
16013 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
16014 that of SYM's type. This fixes Debian bug 168069, reported by
16015 Thomas Olsson.
d600ee67 16016
963fcc17
PE
160172002-12-28 Paul Eggert <eggert@twinsun.com>
16018
16019 Version 1.75f.
16020
16021 Switch back to the Yacc style of conflict reports, undoing some
16022 of the 2002-07-30 change.
16023 * doc/bison.texinfo (Understanding): Use Yacc style for
16024 conflict reports. Also, use new way of locating rules.
16025 * src/conflicts.c (conflict_report):
16026 Renamed from conflict_report_yacc, removing the old
16027 'conflict_report'. Translate the entire conflict report at once,
16028 so that we don't assume that "," has the same interpretation in
16029 all languages.
16030 (conflicts_output): Use Yacc-style conflict report for each state,
16031 instead of our more-complicated style.
16032 (conflicts_print): Use Yacc-style conflict report, except print
16033 the input file name when not emulating Yacc.
16034 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
16035 Conflicted Reduction, %expect not enough, %expect too much,
16036 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
16037 * tests/existing.at (GNU Cim Grammar): Likewise.
16038 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
16039
16040 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
16041 fatal): Don't invoke fflush; it's not needed and it might even be
16042 harmful for stdout, as stdout might not be open.
16043 * src/reduce.c (reduce_print): Likewise.
16044
b1efe548
PE
160452002-12-27 Paul Eggert <eggert@twinsun.com>
16046
16047 Fix a bug where error locations were not being recorded correctly.
16048 This problem was originally reported by Paul Hilfinger in
161a71f3 16049 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
16050
16051 * data/yacc.c (yyparse): New local var yylerrsp, to record the
16052 top of the location stack's error locations.
16053 (yyerrlab): Set it. When discarding a token, push its location
16054 onto yylerrsp so that we don't lose track of the error's end.
16055 (yyerrlab1): Now is only the target of YYERROR, so that we can
16056 properly record the location of the action that failed. For GCC
16057 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
16058 GCC warning about yyerrlab1 being unused if YYERROR is unused.
16059 (yyerrlab2): New label, which yyerrlab now falls through to.
16060 Compute the error's location by applying YYLLOC_DEFAULT to
16061 the locations of all the symbols that went into the error.
16062 * doc/bison.texinfo (Location Default Action): Mention that
16063 YYLLOC_DEFAULT is also invoked for syntax errors.
16064 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
16065 Error locations include the locations of all the tokens that were
16066 discarded, not just the last token.
d600ee67 16067
983c5c2c
PE
160682002-12-26 Paul Eggert <eggert@twinsun.com>
16069
b1efe548
PE
16070 * src/files.c: Include quote.h.
16071 (compute_output_file_names): Warn if we detect conflicting
16072 outputs to the same file. This should catch the misunderstanding
16073 exemplified by Debian Bug 165349, reported by Bruce Stephens..
16074
16075 * src/conflicts.c (conflicts_print): If the user specifies
16076 "%expect N", report an error if there are any reduce/reduce
16077 conflicts. This is what the manual says should happen.
16078 This fixes Debian bug 130890, reported by Anthony DeRobertis.
16079 * tests/conflicts.at (%expect with reduce conflicts): New test.
16080
983c5c2c
PE
16081 Don't use m4_include on relative file names, as it doesn't work as
16082 desired if there happens to be a file with that name under ".".
d600ee67 16083
983c5c2c
PE
16084 * m4sugar/version.m4: Remove; it was included but it wasn't used.
16085 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
16086 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
16087 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
16088 * src/output.c (output_skeleton): Use full path names when
16089 specifying a file to include; don't rely on include path, as
16090 it's unreliable when the working file contains a file with
16091 that name.
d600ee67 16092
983c5c2c
PE
160932002-12-25 Paul Eggert <eggert@twinsun.com>
16094
16095 Remove obsolete references to bison.simple and bison.hairy.
16096 Problem mentioned by Aubin Mahe in
161a71f3 16097 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
16098 * data/glr.c: Comment fix.
16099 * doc/bison.1: Remove references. Also, mention "yacc".
16100
16101 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
16102 with -g option.
16103
16104 * src/parse-gram.y (declaration): Use enum "report_states" rather
16105 than its numeric value 1.
16106
16107 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
16108 opening a new one. This fixes Debian bug 165349, reported by
16109 Bruce Stephens.
16110
23f2d9dc
PE
161112002-12-24 Paul Eggert <eggert@twinsun.com>
16112
16113 Version 1.75e.
16114
16115 * Makefile.maint (cvs-update): Don't assume that the shell
16116 supports $(...), as Solaris sh doesn't.
16117
16118 * src/parse-gram.y (lloc_default): Remove test for empty
16119 nonterminals at the end, since it didn't change the result.
16120
161212002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
16122
16123 If the user does not define YYSTYPE as a macro, Bison now declares it
16124 using typedef instead of defining it as a macro. POSIX requires this.
16125 For consistency, YYLTYPE is also declared instead of defined.
16126
16127 %union directives can now have a tag before the `{', e.g., the
16128 directive `%union foo {...}' now generates the C code
16129 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
16130 The default union tag is `YYSTYPE', for compatibility with Solaris 9
16131 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
16132 instead of `yyltype'.
16133
16134 `yystype' and `yyltype' are now obsolescent macros instead of being
16135 typedefs or tags; they are no longer documented and will be
16136 withdrawn in a future release.
16137
16138 * data/glr.c (b4_location_type): Remove.
16139 (YYSTYPE): Renamed from yystype.
16140 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
16141 (struct YYLTYPE): Renamed from struct yyltype.
16142 (YYLTYPE): Renamed from yyltype.
16143 (yyltype, yystype): New (and obsolescent) macros,
16144 for backward compatibility.
16145 * data/yacc.c: Likewise.
16146
16147 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
16148 does not specify a union tag. This is for compatibility with
16149 Solaris 9 yacc.
16150
16151 * src/parse-gram.y (add_param): 2nd arg is now char * not char
16152 const *, since it is now modified by stripping surrounding { }.
16153 (current_braced_code): Remove.
16154 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
16155 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
16156 trailing " {...}". Now of type <chars>.
16157 (grammar_declaration): Adjust to bundled tokens.
16158 (code_content): Remove; stripping is now done by add_param.
16159 (print_token_value): Print contents of bundled tokens.
16160 (token_name): New function.
16161
16162 * src/reader.h (braced_code, current_braced_code): Remove.
16163 (token_name): New decl.
16164
16165 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
16166 token_type, not braced_code code_kind. All uses changed.
16167 (SC_PRE_CODE): New state, for scanning after a keyword that
16168 has (or usually has) an immediately-following braced code.
16169 (token_type): New local var, to keep track of which token type
16170 to return when scanning braced code.
16171 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 16172 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
16173 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
16174 instead of returning a token type immediately.
16175 (<INITIAL>"{"): Set token type.
16176 (<SC_BRACED_CODE>"}"): Use it.
16177 (handle_action_dollar, handle_action_at): Now returns bool
16178 indicating success. Fail if ! current_rule; this prevents a core dump.
16179 (handle_symbol_code_dollar, handle_symbol_code_at):
16180 Remove; merge body into caller.
16181 (handle_dollar, handle_at): Complain in invalid contexts.
16182
16183 * NEWS, doc/bison.texinfo: Document the above.
16184 * NEWS: Fix years and program names in copyright notice.
16185
879ca4f8
PE
161862002-12-17 Paul Eggert <eggert@twinsun.com>
16187
16188 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
16189 Reporting, Table of Symbols): Omit mentions of %lex-param and
16190 %parse-param from the documentation for now.
16191
1c5fe69d
PE
161922002-12-15 Paul Eggert <eggert@twinsun.com>
16193
16194 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
16195 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
16196 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
16197 disagreed with the Bison documentation. Bug
16198 reported by Andrew Walrond.
d600ee67 16199
1c5fe69d
PE
16200 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
16201 as the caller now does that.
16202 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
16203 (YYEMPTY): Parenthesize right hand side, since others use it.
16204 (yyparse): Don't assume that our generated code is the only code
16205 that sets yychar.
16206
d1de5372
PE
162072002-12-13 Paul Eggert <eggert@twinsun.com>
16208
16209 Version 1.75d.
16210
16211 POSIX requires a "yacc" command.
16212 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
16213 (MOSTLYCLEANFILES): Add yacc.
16214 (yacc): New rule.
1c5fe69d 16215 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
16216 as an alias for bison y.
16217
16218 * po/LINGUAS: Add da.
d600ee67 16219
d1de5372
PE
16220 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
16221 problem with latest <getopt.h>.
16222 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
16223
16224 * doc/fdl.texi: Upgrade to 1.2.
16225 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
16226 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
16227 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
16228 gnulib.
16229 * config/install-sh: Sync with autotools.
16230
16231 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 16232 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
16233 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
16234 locations are requested.
16235 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
16236 locations are requested.
16237
d0f3fe23
PE
162382002-12-12 Paul Eggert <eggert@twinsun.com>
16239
16240 Remove unportable casts and storage allocation tricks.
16241 While we're at it, remove almost all casts, since they
16242 usually aren't needed and are a sign of trouble.
16243
16244 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
16245
16246 * src/derives.c (derives_compute): Do not subtract NTOKENS from
16247 the pointer DSET returned by malloc; this isn't portable.
16248 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
16249 Similarly for DERIVES.
16250 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
16251 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
16252 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
16253
16254 * src/derives.c (derives_compute): Do not bother invoking
16255 int_of_rule_number, since rule numbers are integers.
16256
16257 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
16258 rather than XMALLOC (char, N).
16259
16260 * src/files.c (filename_split): Rewrite to avoid cast.
16261
16262 * src/gram.h (symbol_number_as_item_number,
16263 item_number_as_symbol_number, rule_number_as_item_number,
16264 item_number_as_rule_number):
16265 Now inline functions rather than macros, to avoid casts.
16266 * src/state.h (state_number_as_int): Likewise.
16267 * src/tables.c (state_number_to_vector_number,
16268 symbol_number_to_vector_number): Likewise.
16269
16270 * src/gram.h (int_of_rule_number): Remove; no longer used.
16271
16272 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
16273 since the resulting storage is always stored into.
16274
16275 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
16276 where it's needed.
16277
16278 * src/muscle_tab.c (muscle_m4_output):
16279 Now inline. Return bool, not int.
16280 * src/state.c (state_compare): Likewise.
16281 * src/symtab.c (symbol_check_defined,
16282 symbol_check_alias_consistency, symbol_pack, symbol_translation,
16283 hash_compare_symbol, hash_symbol):
16284 Likewise.
16285 * src/uniqstr.c (uniqstr_print): Likewise.
16286 * src/muscle_tab.c (muscle_m4_output_processor):
16287 New function, to avoid casts.
16288 * src/state.c (state_comparator, stage_hasher): Likewise.
16289 * src/symtab.c (symbol_check_defined_processor,
16290 symbol_check_alias_consistency_processor, symbol_pack_processor,
16291 symbol_translation_processor, hash_symbol_comparator,
16292 hash_symbol_hasher): Likewise.
16293 * src/uniqstr.c (uniqstr_print_processor): Likewise.
16294 * src/muscle_tab.c (muscles_m4_output):
16295 Use new functions instead of casting old functions unportably.
16296 * src/state.c (state_hash_new): Likewise.
16297 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
16298 symbols_token_translations_init):
16299 Likewise.
16300 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
16301
16302 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
16303 var instead of casting to long, to avoid casts.
16304 (prepare_states): Use MALLOC rather than alloca, so that we don't
16305 have to worry about alloca.
16306 * src/state.c (state_hash_lookup): Likewise.
16307
16308 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
16309 local var instead of casting to unsigned char, to avoid casts.
16310
16311 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
16312 STATE_ALLOC): Remove.
16313 (transitions_new, errs_new, reductions_new, state_new): Use malloc
16314 rather than calloc, and use offsetof to avoid allocating slightly
16315 too much storage.
16316 (state_new): Initialize all members.
16317
16318 * src/state.c (state_hash): Use unsigned accumulator, not signed.
16319
16320 * src/symtab.c (symbol_free): Remove; unused.
16321 (symbol_get): Remove cast in lhs of assignment.
16322 (symbols_do): Now static. Accept generic arguments, not
16323 hashing-related ones.
16324
16325 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
16326 (symbol_processor): Remove.
16327 (symbols_do): Remove decl; now static.
16328
16329 * src/system.h (alloca): Remove; decl no longer needed.
16330 (<stddef.h>): Include, for offsetof.
16331 (<inttypes.>, <stdint.h>): Include if available.
16332 (uintptr_t): New type, if system lacks it.
16333 (CALLOC, MALLOC, REALLOC): New macros.
16334 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
16335 new macros.
16336
16337 * src/tables.c (table_size): Now int, to pacify GCC.
16338 (table_grow, table_ninf_remap): Use signed table size.
16339 (save_row): Don't bother initializing locals when not needed.
16340 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
16341 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
16342
16343 * src/vcg.h: Correct misspellings.
16344
16345 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
16346
16347
16348 * src/getargs.c (getargs): Don't assume EOF == -1.
16349
26b4a969
PE
163502002-12-09 Paul Eggert <eggert@twinsun.com>
16351
16352 Change identifier spellings to avoid collisions with names
16353 that are reserved by POSIX.
16354
16355 Don't use names ending in _t, since POSIX reserves them.
16356 For consistency, remove _e and _s endings -- they're weren't
16357 needed to remove ambiguity. All uses changed.
16358 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
16359 turn was just renamed from struniq_t.
16360 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
16361 which in turn was just renamed from struniq_processor_t.
16362 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
16363 in turn was renamed from hash_compare_struniq_t.
16364 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
16365 (state_list): Renamed from state_list_t.
16366 * src/assoc.h (assoc): Renamed from assoc_t.
16367 * src/conflicts.c (enum conflict_resolution): Renamed from
16368 enum conflict_resolution_e.
16369 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
16370 (rule_list): Renamed from rule_list_t.
16371 * src/getargs.h (enum trace): Renamed from enum trace_e.
16372 (enum report): Renamed from enum report_e.
16373 * src/gram.h (item_number): Renamed from item_number_t.
16374 (rule_number): Renamed from rule_number_t.
16375 (struct rule_s): Remove the "rule_s" part; not used.
16376 (rule): Renamed from rule_t.
16377 (rule_filter): Renamed from rule_filter_t.
16378 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
16379 (goto_list): Renamed from goto_list_t.
16380 * src/lalr.h (goto_number): Renamed from goto_number_t.
16381 * src/location.h (location): Renamed from location_t.
16382 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
16383 and moved here from:
16384 * src/muscle_tab.h (muscle_entry_t): here.
16385 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
16386 (rule_list): Renamed from rule_list_t.
16387 * src/print_graph.c (static_graph): Renamed from graph.
16388 * src/reader.h (braced_code): Renamed from braced_code_t.
16389 Remove brace_code_e tag.
16390 * src/relation.h (relation_node): Renamed from relation_node_t.
16391 (relation_nodes): Renamed from relation_nodes_t.
16392 (relation): Renamed from relation_t.
16393 * src/state.h (state_number): Renamed from state_number_t.
16394 (struct state): Renamed from struct state_s.
16395 (state): Renamed from state_t.
16396 (transitions): Renamed from transitions_t. Unused (and
16397 misspelled) transtion_s tag removed.
16398 (errs): Renamed from errs_t. Unused errs_s tag removed.
16399 (reductions): Renamed from reductions_t. Unused tag
16400 reductions_s removed.
16401 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
16402 (struct symbol_list): Renamed from struct symbol_list_s.
16403 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
16404 (struct symbol): Renamed from struct symbol_s.
16405 (symbol): Renamed from symbol_t.
16406 * src/tables.c (vector_number): Renamed from vector_number_t.
16407 (action_number): Renamed from action_t.
16408 * src/tables.h (base_number): Renamed from base_t.
16409 * src/vcg.h (enum color): Renamed from enum color_e.
16410 (enum textmode): Renamed from enum textmode_e.
16411 (enum shape): Renamed from enum shape_e.
16412 (struct colorentry): Renamed from struct colorentry_s.
16413 (struct classname): Renamed from struct classname_s.
16414 (struct infoname): Renamed from struct infoname_s.
16415 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
16416 (enum decision): Renamed from enum decision_e.
16417 (enum orientation): Renamed from enum orientation_e.
16418 (enum alignment): Renamed from enum alignment_e.
16419 (enum arrow_mode): Renamed from enum arrow_mode_e.
16420 (enum crossing_type): Renamed from enum crossing_type_e.
16421 (enum view): Renamed from enum view_e.
16422 (struct node): Renamed from struct node_s.
16423 (node): Renamed from node_t.
16424 (enum linestyle): Renamed from enum linestyle_e.
16425 (enum arrowstyle): Renamed from enum arrowstyle_e.
16426 (struct edge): Renamed from struct edge.
16427 (edge): Renamed from edge_t.
16428 (struct graph): Renamed from struct graph_s.
16429 (graph): Renamed from graph_t.
16430 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
16431 Rename value_t -> value.
16432 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
16433 value_t_as_yystype -> value_as_yystype.
16434
16435 Don't include <errno.h> in the mainstream code, since it
16436 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
16437 * lib/get-errno.c, lib/get-errno.h: New files.
16438 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
16439 get-errno.c.
16440 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
16441 * src/output.c (output_skeleton): Likewise.
16442 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
16443 instead of errno.
16444 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
16445 Likewise.
16446 (handle_action_dollar, handle_action_at): Likewise.
16447 * src/system.h: Do not include <errno.h>.
16448 (TAB_EXT): Renamed from EXT_TAB.
16449 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
16450
16451 Avoid str[a-z]*, since <string.h> reserves that name space.
16452 Change all instances of "struniq" in names to "uniqstr", and
16453 likewise for "STRUNIQ" and "UNIQSTR".
16454 * src/uniqstr.c: Renamed from src/struniq.c.
16455 * src/uniqstr.h: Renamed from src/struniq.h.
16456 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
16457 * src/files.c (strsuffix): Remove; unused.
16458 (concat2): Renamed from stringappend. Now static.
16459 * src/files.h (strsuffix, stringappend): Remove; unused.
16460 * src/parse-gram.y (<chars>): Renamed from <string>.
16461 (<uniqstr>): Renamed from <struniq>.
16462 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
16463 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
16464 (struct graph_s.expand): Renamed from struct graph_s.stretch.
16465 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
16466 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
16467 (N_EXPAND): Renamed from N_STRETCH.
16468
16469 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
16470 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
16471 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
16472 Remove; unused.
16473 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
16474 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
16475 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
16476 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
16477 (BASE_MAXIMUM): Renamed from BASE_MAX.
16478 (BASE_MINIMUM): Renamed from BASE_MIN.
16479 (ACTION_MAX): Remove; unused.
16480 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
16481 Unnecessary casts removed from above defines.
16482
16483
16484 Fix misspelling in names.
16485 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
16486 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
16487 G_NODE_ALIGNEMENT.
16488
16489
16490 * lib/timevar.c (timevar_report): Renamed from time_report,
16491 for consistency with other names.
16492 * lib/timevar.h (timevar_report): New decl.
16493 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
16494
16495
16496 Sort include-file uses.
16497
16498 Reorder all include files under src to be in the order "system.h".
16499 then the ../lib include files in angle brackets (alphabetized),
16500 then the . include files in double-quotes (alphabetized). Fix
16501 dependency breakages encountered in this process, as follows:
16502 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
16503 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
16504 * src/state.h: Include "symtab.h".
16505
996b1c7e
PE
165062002-12-08 Paul Eggert <eggert@twinsun.com>
16507
16508 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
16509 since this causes problems when __file__ contains character
16510 sequences like "@" that are treated specially by src/scan-skel.l.
16511 Instead, just use the file's basename. This fixes the bug
16512 reported by Martin Mokrejs in
161a71f3 16513 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 16514
e19c4e5d
PE
165152002-12-06 Paul Eggert <eggert@twinsun.com>
16516
16517 Add support for rules that do not have trailing semicolons, as
16518 POSIX requires. Improve the quality of locations in Bison
16519 diagnostics.
26b4a969 16520
e19c4e5d
PE
16521 * src/location.c: Include <quotearg.h>.
16522 (empty_location): Now const.
16523 (location_print): New function. Follow the recommendation of the
16524 GNU Coding Standards for locations that span file boundaries.
16525 * src/location.h: Do not include <quotearg.h>; no longer needed.
16526 (boundary): New type.
16527 (location_t): Use it. This allows locations to span file boundaries.
16528 All member uses changed: file -> start.file or end.file (as needed),
16529 first_line -> start.line, first_column -> start.column,
16530 last_line -> end.line, last_column -> end.column.
16531 (equal_boundaries): New function.
16532 (LOCATION_RESET, LOCATION_STEP): Remove.
16533 (LOCATION_PRINT): Remove. All callers changed to use location_print.
16534 (empty_location): Now const.
16535 (location_print): New decl.
16536 * src/parse-gram.y (lloc_default): New function, which handles
16537 empty locations more accurately.
16538 (YYLLOC_DEFAULT): Use it.
16539 (%token COLON): Remove.
16540 (%token ID_COLON): New token.
26b4a969 16541 (rules): Use it.
e19c4e5d
PE
16542 (declarations, rules): Remove trailing semicolon.
16543 (declaration, rules_or_grammar_declaration):
16544 Allow empty (";") declaration.
16545 (symbol_def): Remove empty actions; no longer needed.
16546 (rules_or_grammar_declaration): Remove trailing semicolon.
16547 (semi_colon.opt): Remove.
16548 * src/reader.h: Include location.h.
16549 (scanner_cursor): New decl.
16550 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
16551 rolling our own.
16552 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
16553 of *loc.
16554 (STEP): Remove. No longer needed, now that adjust_location does
16555 the work. All uses removed.
16556 (scanner_cursor): New var.
16557 (adjust_location): Renamed from extend_location. It now sets
16558 *loc and adjusts the scanner cursor. All uses changed.
16559 Don't bother testing for CR.
16560 (handle_syncline): Remove location arg; now updates scanner cursor.
16561 All callers changed.
16562 (unexpected_end_of_file): Now accepts start boundary of token or
16563 comment, not location. All callers changed. Update scanner cursor,
16564 not the location.
16565 (SC_AFTER_IDENTIFIER): New state.
16566 (context_state): Renamed from c_context. All uses changed.
16567 (id_loc, code_start, token_start): New local vars.
16568 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
16569 processing of Yacc white space and equivalents here.
16570 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
16571 instead of returning ID immediately, since we need to search for
16572 a subsequent colon.
16573 (<INITIAL>"'", "\""): Save token_start.
16574 (<INITIAL>"%{", "{", "%%"): Save code_start.
16575 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
16576 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
16577 BEGIN context_state at end, not INITIAL.
16578 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
16579 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
16580 Return correct token start.
16581 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
16582 the start of a character, string or multiline comment is found.
16583 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
16584 Reduction): Adjust reported locations to match the more-precise
16585 results now expected.
16586 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
16587 * tests/reduce.at (Useless Rules, Reduced Automaton,
16588 Underivable Rules): Likewise.
16589 * tests/regression.at (Invalid inputs): No longer `expecting ";"
16590 or "|"' now that so many other tokens are allowed by the new grammar.
16591
16592 * src/complain.h (current_file): Remove duplicate decl;
16593 current_file is now owned by files.h.
16594 * src/complain.c, src/scan-gram.l: Include files.h.
16595
165962002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 16597
e19c4e5d
PE
16598 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
16599 promotes to int; it might be unsigned int.
16600 * data/yacc.c (yy_reduce_print): Likewise.
16601
16602 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
16603 be #defined in the prologue, not in the Bison declarations.
16604 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 16605
b64755e3
PE
166062002-12-02 Paul Eggert <eggert@twinsun.com>
16607
16608 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
16609 * lib/strtoul.c: New file, from gnulib.
16610 This fixes a porting bug reported by Peter Klein in
161a71f3 16611 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 16612
6e746484
PE
166132002-11-30 Paul Eggert <eggert@twinsun.com>
16614
b64755e3
PE
16615 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
16616 and put only a forward declaration in the prologue. This is for
16617 consistency with the other scanner helper functions.
16618
6ba55592
PE
16619 Type clashes now generate warnings, not errors, since it
16620 appears that POSIX may allow some grammars with type clashes.
16621 * src/reader.c (grammar_current_rule_check): Warn about
16622 type clashes instead of complaining.
16623 * tests/input.at (Type Clashes): Expect warnings, not complaints.
16624
6e746484
PE
16625 Add Yacc library, since POSIX requires it.
16626 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
16627 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
16628 * lib/main.c, lib/yyerror.c: New files.
16629
16630 gram_error can be static; it need not be extern.
16631 * src/reader.h (gram_error): Remove decl.
16632 * src/parse-gram.y (gram_error): Now static. Add static decl.
16633 (print_token_value): Omit parameter names from forward decl,
16634 for consistency.
16635
88510f9c
PE
166362002-11-29 Paul Eggert <eggert@twinsun.com>
16637
6e746484
PE
16638 * doc/bison.texinfo: Emphasize that yylex and yyerror must
16639 be declared before being used. E.g., one should typically
16640 declare them in the prologue. Use GNU coding style in examples.
16641 Put "const" consistently after the type it modifies. Mention
16642 that C99 supports "inline". Mention that yyerror traditionally
16643 returns "int".
16644
88510f9c
PE
16645 %parse-param and %lex-param now take just one argument, the
16646 declaration; the argument name is deduced from the declaration.
16647
16648 * doc/bison.texinfo (Parser Function, Pure Calling, Error
16649 Reporting, Table of Symbols): Document this.
16650 * src/parse-gram.y (add_param): New function.
16651 (COMMA): Remove.
16652 (declaration): Implement new rule for %parse-param and %lex-param.
16653 * src/scan-gram.l: "," now elicits a warning, rather than being
16654 a token; this is more compatible with byacc.
16655 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
16656
bb92250c
PE
166572002-11-27 Paul Eggert <eggert@twinsun.com>
16658
16659 Rename identifiers to avoid real and potential collisions.
16660
16661 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
16662 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 16663 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
16664 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
16665 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
16666 * src/parse-gram.y (print_token_value): Renamed from yyprint.
16667 All uses changed.
16668 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
16669 The name "yycontrol" violates the name space rules, and this stuff
16670 wasn't being used anyway.
16671 (input): Remove action; this stuff wasn't being used.
16672 (gram_error): Rename local variable yylloc -> loc.
16673 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
16674 (YY_DECL): Don't use "yy" at start of local variables.
16675 All uses changed, e.g., yylloc -> loc.
16676 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
16677 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
16678 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
16679 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
16680
16681 * src/parse-gram.y (gram_error): loc is now const *.
16682 * src/reader.h (gram_error): Likewise.
16683
3af4feb2
PE
166842002-11-24 Paul Eggert <eggert@twinsun.com>
16685
16686 Version 1.75c.
16687
16688 * tests/actions.at (Actions after errors): Use an output format
16689 more similar to that of the Printers and Destructors test.
16690 Test the position of the ';' token too.
16691 (Printers and Destructors): Likewise.
16692 (Printers and Destructors: %glr-parser): Remove for now, to avoid
16693 unnecessarily alarming people when the test fails.
16694
16695 * data/yacc.c (yyerrlab1): Move this label down, so that the
16696 parser does not discard the lookahead token if the user code
16697 invokes YYERROR. This change is required for POSIX conformance.
16698
16699 * lib/error.c: Sync with gnulib.
16700
167012002-11-22 Paul Eggert <eggert@twinsun.com>
16702
16703 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
16704 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
16705 * lib/xmalloc.c: Likewise.
26b4a969 16706
58004308
PE
167072002-11-20 Paul Eggert <eggert@twinsun.com>
16708
16709 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
16710
167112002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 16712
58004308
PE
16713 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
16714 should use `if (! x) abort ();' rather than `assert (x);', and
16715 anyway it's one less thing to worry about configuring.
16716
16717 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
16718 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
16719 and replace all instances of assert with abort.
16720 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
16721 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
16722
16723 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
16724 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
16725 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
16726 hash_find_entry, hash_rehash, hash_insert): Likewise.
16727 * src/conflicts.c (resolve_sr_conflict): Likewise.
16728 * src/lalr.c (set_goto_map, map_goto): Likewise.
16729 * src/nullable.c (nullable_compute): Likewise.
16730 * src/output.c (prepare_rules, token_definitions_output): Likewise.
16731 * src/reader.c (packgram, reader): Likewise.
16732 * src/state.c (state_new, state_free, state_transitions_set,
16733 state_reduction_find): Likewise.
16734 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
16735 symbol_pack): Likewise.
16736 * src/tables.c (conflict_row, pack_vector): Likewise.
16737 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
16738 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
16739 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
16740 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
16741
16742 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
16743 (ARGMATCH_CONSTRAINT): New macro.
16744 (ARGMATCH_ASSERT): Use it.
16745
16746 * src/system.h (verify): New macro.
16747 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
16748 rather than assert.
16749 * src/tables.c (tables_generate): Likewise.
16750
16751 * src/struniq.c (struniq_assert): Now returns void, and aborts
16752 if the assertion is false.
16753 (struniq_assert_p): Remove.
16754 * src/struniq.h: Likewise.
16755
76ae8198
PE
167562002-11-18 Paul Eggert <eggert@twinsun.com>
16757
16758 * data/glr.c (yygetLRActions): Replace `yyindex' with
16759 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
16760 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 16761 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 16762
d3c4e709
AD
167632002-11-18 Akim Demaille <akim@epita.fr>
16764
16765 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
16766 space.
16767 From Tim Van Holder.
16768
8d8a7238
PE
167692002-11-17 Paul Eggert <eggert@twinsun.com>
16770
16771 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
16772 to "SyntaxError" for consistency with my 2002-11-15 change.
16773
16774 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
16775 not define to {}, since this breaks the common use of `YYDPRINTF
16776 ((...));' if a single statement is desired (e.g. before `else').
16777 Work around GCC warnings by surrounding corresponding calls with
16778 {} if needed.
16779 (yyhasResolvedValue): Remove unused function.
16780 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
16781 loop body.
16782 (yyreportSyntaxError): Renamed from yyreportParseError.
16783 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
16784 All uses changed.
16785 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
16786 extern when possible. Remove unused initializations.
16787
b0937b22
AD
167882002-11-16 Akim Demaille <akim@epita.fr>
16789
16790 Augment the similarity between GLR and LALR traces.
16791
16792 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
16793 (YY_REDUCE_PRINT): New.
16794 (yyparse): Use them.
16795 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
16796 YYDPRINT here.
16797 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
16798 state reached after the reduction/recovery, since...
16799 (yyparse, yyprocessOneStack): Report the state we are entering in.
16800
c5e3e510
AD
168012002-11-16 Akim Demaille <akim@epita.fr>
16802
16803 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
16804 Add support for --trace=skeleton.
16805 * src/scan-skel.l: %option debug.
16806 Scan strings of non-@ or \n instead of character by character.
16807 (scan_skel): Handle trace_skeleton.
16808 (QPUTS): New.
16809 (@output_parser_name@, @output_header_name@): ``Restore'' their
16810 support (used to be M4 macros).
16811 * data/yacc.c: Quote larger chunks, a la glr.c.
16812 * data/lalr1.cc: Likewise.
16813 The header guards are no longer available, so use some other
16814 string than `YYLSP_NEEDED'.
16815
4c6cc1db
AD
168162002-11-16 Akim Demaille <akim@epita.fr>
16817
16818 Make the ``Printers and Destructors'' test more verbose, taking
16819 `yacc.c''s behavior as (possibly wrong) reference.
16820
16821 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
16822 instead of fprint on stdout.
16823 Set and report the last_line of the symbols.
16824 Consistently display values and locations.
16825
6d9e8019
PE
168262002-11-16 Paul Eggert <eggert@twinsun.com>
16827
16828 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
16829
6e649e65
PE
168302002-11-15 Paul Eggert <eggert@twinsun.com>
16831
b25d88f6
PE
16832 * tests/actions.at (Actions after errors): New test case.
16833
6e649e65
PE
16834 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
16835 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
16836 tests/action.at, tests/calc.at, tests/conflicts.at,
16837 tests/cxx-type.at, tests/regression.at:
16838 "parse error" -> "syntax error" for POSIX compatibility.
16839 "parsing stack overflow..." -> "parser stack overflow" so
16840 that code matches Bison documentation.
16841
0f39aab9
AD
168422002-11-15 Akim Demaille <akim@epita.fr>
16843
16844 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
16845 take two BRACED_CODE, not two string_content.
16846 Free the scanner's obstack when we are done.
16847 (code_content): New.
16848 * tests/calc.at: Adjust.
16849 * doc/bison.texinfo: Adjust.
16850 Also, make sure to include the `,' for these declarations.
16851
761c1926
AD
168522002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
16853
16854 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
16855 definition; avoids potential autoreconf problems.
16856
b0f98b10
AD
168572002-11-15 Akim Demaille <akim@epita.fr>
16858
16859 Always check the value returned by yyparse.
16860
16861 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
16862 returned by yyparse.
16863 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
16864 Adjust calls.
16865 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
16866 returned by yyparse.
16867
970785f1
PH
168682002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16869
16870 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
16871 on input.at test.
16872
8fcc7db1
PE
168732002-11-14 Paul Eggert <eggert@twinsun.com>
16874
7ec1b48e
PE
16875 * src/output.c (output_skeleton): Call xfopen instead of
16876 duplicating xfopen's body.
16877
cfff7583 16878 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 16879 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 16880
8fcc7db1
PE
16881 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
16882 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
16883 Group compiler. Instead, use "$CC -E bar.c". Include the .h
16884 file twice in the grammar, as an extra check.
16885
16886 * tests/input.at (Torturing the Scanner): Surround the
16887 backslash-newline tests with "#if 0", to make it less likely that
16888 we'll run into compiler bugs. Bring back solitary \ inside
16889 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 16890 test backslash-newline in C character constant.
8fcc7db1 16891
4e8d992c
AD
168922002-11-14 Akim Demaille <akim@epita.fr>
16893
16894 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
16895 status of the compiler.
f32b346d 16896 Calling `exit 1' is no longer needed.
4e8d992c
AD
16897 Reported by Nelson H. F. Beebe.
16898
9501dc6e
AD
168992002-11-14 Akim Demaille <akim@epita.fr>
16900
16901 * tests/atlocal.in (CPPFLAGS): We have config.h.
16902 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
16903 New.
16904 * tests/actions.at, tests/calc.at, tests/conflicts.at,
16905 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
16906 * tests/regression.at, tests/torture.at: Use them for all the
16907 grammars that are to be compiled.
16908 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
16909 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
16910 * doc/bison.texinfo (GLR Parsers): Document `inline'.
16911
18b519c0
AD
169122002-11-14 Akim Demaille <akim@epita.fr>
16913
16914 * doc/bison.texinfo: Various formatting changes (alignments in
16915 samples, additional @group/@end group, GCS in samples.
16916 Use @deffn instead of simple @table to define the directives,
16917 macros, variables etc.
16918
9a86cdb9
PE
169192002-11-13 Paul Eggert <eggert@twinsun.com>
16920
daa33def 16921 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 16922 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 16923
daa33def 16924 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 16925 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
16926 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
16927 * tests/headers.at (export YYLTYPE): Likewise.
16928
16929 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 16930 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 16931
9a86cdb9
PE
16932 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
16933 comments, since they're not portable. Use GNU coding style.
16934
9c1e26bd
AD
169352002-11-13 Akim Demaille <akim@epita.fr>
16936
16937 * data/yacc.c: Leave bigger chunks of quoted text.
16938 (YYDSYMPRINTF): New.
16939 Use it to report symbol activities.
16940 * data/glr.c (YYDSYMPRINTF): New.
16941 Use it.
16942
87f721cc
PE
169432002-11-12 Paul Eggert <eggert@twinsun.com>
16944
16945 Version 1.75b.
16946
16947 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
16948 (yyglrReduce): Return yyok, not 0.
16949 This should avoid the enumerated-type warnings reported
464c6927 16950 by Nelson H. F. Beebe in
161a71f3 16951 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
16952
16953 * lib/bbitset.h (BITSET_INLINE): Remove.
16954 * lib/bitset.h [! BITSET_INLINE]: Remove.
16955 (bitset_set, bitset_reset, bitset_test): Rename local vars
16956 to avoid shadowing warnings by GCC.
16957
16958 * data/glr.c (inline): Remove #define. It's the user's
16959 responsibility to #define it away, just like 'const'.
464c6927 16960 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 16961 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 16962
87f721cc
PE
16963 * Makefile.maint (po-check): Scan .l and .y files instead of the
16964 .c and the .h files that they generate. This fixes the bug
16965 reported by Tim Van Holder in:
161a71f3 16966 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
16967 Look for N_ as well as for _. Try to avoid matching #define for
16968 N_ and _.
16969 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
16970 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
16971 * src/scan-gram.l: Revamp regular expressions so that " and '
16972 do not confuse xgettext.
16973
16974 * src/struniq.h (struniq_new): Do not declare the return type
16975 to be 'const'; this violates the C standard.
16976 * src/struniq.c (struniq_new): Likewise.
16977
be14ade5
AD
169782002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
16979
16980 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
16981 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
16982 linker.
16983
05291fbc
AD
169842002-11-12 Akim Demaille <akim@epita.fr>
16985
16986 * Makefile.maint: Sync with Autoconf:
16987 (local_updates): New.
16988
1f5fd52e
AD
169892002-11-12 Akim Demaille <akim@epita.fr>
16990
16991 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
16992
283f1e64
AD
169932002-11-12 Akim Demaille <akim@epita.fr>
16994
16995 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
16996 locations.
16997
886b69d1
AD
169982002-11-12 Akim Demaille <akim@epita.fr>
16999
17000 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
17001 not yyvalue.
17002
3df37415
AD
170032002-11-12 Akim Demaille <akim@epita.fr>
17004
17005 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
17006 Use it to test the GLR parser.
17007
7bd6c77e
AD
170082002-11-12 Akim Demaille <akim@epita.fr>
17009
17010 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
17011 defines it.
17012 * data/glr.c (yystos): New.
17013 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
17014 (YYDSYMPRINT): New.
17015 (yyval): Don't define it, it is handled via M4.
17016 (yyrecoverParseError): Free verbosely the discarded symbols.
17017 * data/yacc.c (yysymprint): Remove, rather...
17018 (b4_yysymprint_generate): invoke.
17019 * data/c.m4 (b4_yysymprint_generate): New.
17020 Accept pointers as arguments, as opposed to the version from
17021 yacc.c.
17022 (b4_yydestruct_generate): Likewise.
17023 * tests/cations.at (Printers and Destructors): Use Bison directives
17024 instead of CPP macros.
17025 Don't rely on internal details.
17026
b0400cc6
AD
170272002-11-12 Akim Demaille <akim@epita.fr>
17028
17029 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
17030 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
17031 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
17032 it against YYEMPTY and so forth), work on yytoken (i.e., set
17033 it to YYEMPTY etc.).
17034 (yydestruct): Replace with a b4_yydestruct_generate invocation.
17035 (b4_symbol_actions): Remove.
17036 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
17037 for 0, end-of-input.
17038
72f889cc
AD
170392002-11-12 Akim Demaille <akim@epita.fr>
17040
17041 * doc/bison.texinfo (Destructor Decl): New.
17042
b1ae9233
AD
170432002-11-12 Akim Demaille <akim@epita.fr>
17044
17045 * src/tables.c (tables_generate): Use free for pointers that
17046 cannot be NULL, not XFREE.
17047 (pack_vector): Use assert, not fatal, for bound violations.
17048 * src/state.c (state_new): Likewise.
17049 * src/reader.c (reader): Likewise.
17050 * src/lalr.c (set_goto_map): Likewise.
72f889cc 17051 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
17052 the file name.
17053
7ec2d4cd
AD
170542002-11-12 Akim Demaille <akim@epita.fr>
17055
17056 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
17057 Restore.
17058 * src/scan-gram.l (last_string): Is global to the file, not to
17059 yylex.
17060 * src/parse-gram.y (input): Don't append the epilogue here,
17061 (epilogue.opt): do it here, and free the scanner's obstack.
17062 * src/reader.c (epilogue_set): Rename as...
17063 (epilogue_augment): this.
17064 * data/c.m4 (b4_epilogue): Defaults to empty.
17065
573a6cd3
AD
170662002-11-12 Akim Demaille <akim@epita.fr>
17067
17068 * src/getargs.c (long_options): Remove duplicates.
17069 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
17070 Remove.
17071 * doc/bison.rnh: Remove.
17072 * doc/bison.texinfo (VMS Invocation): Remove.
17073
95612cfa
AD
170742002-11-12 Akim Demaille <akim@epita.fr>
17075
17076 * src/struniq.h, src/struniq.c (struniq_t): Is const.
17077 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
17078
17079 Use struniq for symbols.
17080
17081 * src/symtab.h (symbol_t): The tag member is a struniq.
17082 (symbol_type_set): Adjust.
17083 * src/symtab.c (symbol_new): Takes a struniq.
17084 (symbol_free): Don't free the tag member.
17085 (hash_compare_symbol_t, hash_symbol_t): Rename as...
17086 (hash_compare_symbol, hash_symbol): these.
17087 Use the fact that tags as struniqs.
17088 (symbol_get): Use struniq_new.
17089 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
17090 Returns a strniq.
17091 * src/reader.h (merger_list, grammar_currentmerge_set): The name
17092 and type members are struniqs.
17093 * src/reader.c (get_merge_function)
17094 (grammar_current_rule_merge_set): Adjust.
17095 (TYPE, current_type): Are struniq.
17096
17097 Use struniq for file names.
17098
17099 * src/files.h, src/files.c (infile): Split into...
17100 (grammar_file, current_file): these.
17101 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
17102 * src/reduce.c (reduce_print): Likewise.
17103 * src/getargs.c (getargs): Likewise.
17104 * src/complain.h, src/complain.c: Likewise.
17105 * src/main.c (main): Call struniqs_new early enough to use it for
17106 file names.
17107 Don't free the input file name.
17108
3e6656f9
AD
171092002-11-12 Akim Demaille <akim@epita.fr>
17110
17111 * src/symtab.c (symbol_free): Remove dead deactivated code:
17112 type_name are properly removed.
17113 Don't use XFREE to free items that cannot be NULL.
17114 * src/struniq.h, src/struniq.c: New.
17115 * src/main.c (main): Initialize/free struniqs.
17116 * src/parse-gram.y (%union): Add astruniq member.
17117 (yyprint): Adjust.
17118 * src/scan-gram.l (<{tag}>): Return a struniq.
17119 Free the obstack bit that used to store it.
17120 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
17121
7672019c
PE
171222002-11-11 Paul Eggert <eggert@twinsun.com>
17123
17124 Revamp to fix many (but not all) of the C- and M4-related quoting
17125 problems. Among other things, this fixes the Bison bug reported
17126 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 17127 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
17128
17129 Use new @ escapes consistently. Represent brackets with @{ and @}
17130 rather than @<:@ and @:>@, since this works a bit better with dumb
17131 editors like vi. Represent @ with @@, since @ is now consistently
17132 an escape. Use @oline@ and @ofile@ rather than __oline__ and
17133 __ofile__, to avoid unexpected expansions. Similarly, use @output
17134 rather than #output.
17135
17136 * data/c.m4 (b4_copyright): Omit file name from comment, since
17137 the file name could contain "*/".
17138 (b4_synclines_flag): Don't quote the 2nd argument; it should already
17139 be quoted. All uses changed.
17140
17141 * data/glr.c: Use new @ escapes consistently.
17142 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
17143 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
17144 Remove, since they couldn't handle arbitrary characters in file
17145 names.
17146 * data/lalr1.cc: Likewise.
17147 * data/yacc.c: Likewise.
17148
17149 * src/files.c (output_infix): Remove; all uses removed.
17150 * src/files.h: Likewise.
17151
17152 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
17153 mishandled funny characters in file names, and anyway it isn't
17154 needed any more.
17155 * data/yacc.c: Likewise.
17156 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
17157
17158 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
17159 * data/yacc.c: Likewise.
17160
17161 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
17162 strings now.
17163 (muscle_init): Quote filename as a C string.
17164 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
17165 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
17166 * src/output.c (escaped_file_name_output): New function.
17167 (prepare_symbols): Quote tokens for M4.
17168 (prepare): Don't insert output_infix, output_prefix,
17169 output_parser_name, output_header_name; this is now down by scan-skel.
17170 Insert skeleton as a C string.
17171
17172 * src/output.c (user_actions_output, symbol_destructors_output,
17173 symbol_printers_output): Quote filenames for C and M4.
17174 * src/reader.c (prologue_augment, epilogue_set): Likewise.
17175
17176 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
17177 escapes other than \\ and \'; this simplifies the code.
17178 (<SC_STRING>): Likewise, for \\ and \".
17179 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
17180 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
17181 Use new escapes @{ and @} for [ and ].
17182
17183 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
17184 them with auto vars.
17185 Switch to new escape scheme, where @ is the escape character uniformly.
17186 Abort if a stray escape character is found. Avoid unbounded input
17187 buffer when parsing non-escaped text.
17188
17189 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
17190 __oline__, #output, $@, and @{ do not have unintended meanings.
17191
acea4f3b
PE
171922002-11-09 Paul Eggert <eggert@twinsun.com>
17193
17194 Fix the test failure due to GCC warnings described in
161a71f3 17195 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
17196 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
17197 evaluate to 0 if it's impossible for NINF to be in the respective
17198 table.
17199 (yygetLRActions, yyrecoverParseError): Use them.
17200
17201 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
17202 counted in the token inserted at end of file. Now takes
17203 location_t *, not location_t, so that the location can be
17204 adjusted. All uses changed.
17205
17206 * tests/regression.at (Invalid inputs): Adjust wording in
17207 diagnostic to match the new behavior.
17208
17209 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
17210 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
17211 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
17212 abort ();'. This reduces the runtime of the "Many lookaheads"
17213 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
17214 GCC 3.2.
17215
20ef1ad5
PE
172162002-11-07 Paul Eggert <eggert@twinsun.com>
17217
17218 * src/parse-gram.y (CHARACTER): Remove unused token.
17219 All uses removed.
17220
17221 * src/scan-gram.l: Remove stack option. We no longer use the
17222 stack, since the stack was never deeper than 1; instead, use the
17223 new auto var c_context to record the stacked value.
17224
17225 Remove nounput option. At an unexpected end of file, we now unput
17226 the minimal input necessary to end cleanly; this simplifies the
17227 code.
17228
17229 Avoid unbounded token sizes where this is easy.
17230
17231 (unexpected_end_of_file): New function.
17232 Use it to systematize the error message on unexpected EOF.
17233 (last-string): Now auto, not static.
17234 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
17235 (scanner_last_string_free): Remove; not used.
17236 (percent_percent_count): Move decl to just before use.
17237 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
17238 not the (never otherwised-used) CHARACTER.
17239
93724f13
AD
172402002-11-07 Akim Demaille <akim@epita.fr>
17241
17242 Let yyerror always receive the msg as last argument, so that
17243 yyerror can be variadic.
17244
17245 * data/yacc.c (b4_yyerror_args): New.
17246 Use it when calling yyerror.
17247 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
17248 Use it when calling yyerror.
17249 * doc/bison.texinfo (Error Reporting): Adjust.
17250 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
17251 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
17252
6e40b4eb
AD
172532002-11-06 Akim Demaille <akim@epita.fr>
17254
17255 #line should have quoted strings.
17256 Ideally, this should be done by m4_quotearg.
17257
17258 * src/scan-skel.l: Include quotearg.h.
17259 Quote __ofile__.
17260 * src/output.c (symbol_printers_output)
17261 (symbol_destructors_output): Quote the file name.
17262
2dfbfc12
AD
172632002-11-06 Akim Demaille <akim@epita.fr>
17264
17265 * tests/regression.at (Invalid inputs): Adjust to the recent
17266 messages.
17267
437c2d80
AD
172682002-11-06 Akim Demaille <akim@epita.fr>
17269
17270 Restore --no-lines.
17271 Reported by Jim Kent.
17272
17273 * data/c.m4 (b4_syncline): New.
17274 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
17275 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
17276 * src/output.c (user_actions_output): Likewise.
17277 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 17278 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 17279
900c5db5
AD
172802002-11-06 Akim Demaille <akim@epita.fr>
17281
17282 * src/main.c (main): Free `infile'.
17283 * src/scan-gram.l (handle_syncline): New.
17284 Recognize `#line'.
17285 * src/output.c (user_actions_output, symbol_destructors_output)
17286 (symbol_printers_output): Use the location's file name, not
17287 infile.
17288 * src/reader.c (prologue_augment, epilogue_set): Likewise.
17289
e183b123 172902002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 17291
e183b123 17292 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 17293 either has GLR conflict entries.
e183b123 17294
193eb6b7
PE
172952002-11-05 Paul Eggert <eggert@twinsun.com>
17296
e183b123
PE
17297 * src/scan-gram.l: Use more accurate diagnostics, e.g.
17298 "integer out of range" rather than "invalid value".
17299 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
17300 accordingly.
17301
193eb6b7
PE
17302 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
17303 Also, remove one static variable in the scanner.
17304
17305 * src/scan-gram.l (braces_level): Now auto, not static.
17306 Initialize to zero if the compiler is being picky.
17307 (INITIAL): Clear braces_level instead of incrementing it.
17308 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
17309 as POSIX 1003.1-2001 requires.
17310 * src/system.h (IF_LINT): New macro, taken from coreutils.
17311 * configure.ac: Define "lint" if --enable-gcc-warnings.
17312
29c01725
AD
173132002-11-05 Akim Demaille <akim@epita.fr>
17314
17315 * src/scan-gram.l: When it starts with `%', complain about the
17316 whole directive, not just that `invalid character: %'.
17317
8aeac3ca
AD
173182002-11-04 Akim Demaille <akim@epita.fr>
17319
17320 * Makefile.maint: Update from Autoconf.
17321 (update, cvs-update, po-update, do-po-update): New.
17322
793a58bb
AD
173232002-11-04 Akim Demaille <akim@epita.fr>
17324
17325 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
17326 and yyerror.
17327 Have yyerror `use' its arguments.
17328 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
17329 returns true when location & yacc & pure & parse-param.
17330 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
17331
c4d720cd
AD
173322002-11-04 Akim Demaille <akim@epita.fr>
17333
17334 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
17335 clashes.
17336 * src/scan-gram.l: Use [\'] instead of ['] to pacify
17337 font-lock-mode.
17338 Use complain_at.
17339 Use quote, not quote_n since LOCATION_PRINT no longer uses the
17340 slot 0.
17341
613a0dc5
PE
173422002-11-03 Paul Eggert <eggert@twinsun.com>
17343
17344 * src/reader.c (get_merge_function, grammar_current_rule_check):
17345 Use consistent diagnostics for reporting type name clashes.
17346 Quote the types with <>, for consistency with Yacc.
17347 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
17348
2a8d363a
AD
173492002-11-03 Akim Demaille <akim@epita.fr>
17350
17351 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
17352 New.
17353 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
17354 (b4_parse_param): Remove.
17355 Use b4_identification.
17356 Propagate b4_pure_args where needed to pass them to yyerror.
17357 * data/glr.m4 (b4_parse_param): Remove.
17358 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
17359 (b4_lpure_formals): New.
17360 Use b4_identification.
17361 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
17362 b4_user_formals and b4_user_args.
17363 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
17364 (yyreportAmbiguity): When using a pure parser, also need
17365 the location, and the parse-params.
17366 Adjust callers.
17367 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
17368 When using a pure parser, also need the parse-params.
17369 Adjust callers.
17370 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
17371 (%pure-parser + %parse-param) LALR and GLR parsers.
17372 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
17373 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
17374 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
17375 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
17376 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
17377 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
17378 * doc/bison.texinfo: Untabify the whole file.
17379 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
17380 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
17381 (Error Reporting): Adjust to these new directives.
17382 Document %error-verbose, deprecate YYERROR_VERBOSE.
17383
9e32add8
AD
173842002-11-03 Akim Demaille <akim@epita.fr>
17385
17386 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
17387 AT_CHECK_CALC_GLR invocations to use % directives, instead of
17388 command line options.
17389 * tests/cxx-type.at: Formatting changes.
17390
b02d90a5
PE
173912002-11-03 Paul Eggert <eggert@twinsun.com>
17392
17393 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
17394 to count columns correctly, and to check for invalid inputs.
9e32add8 17395
b02d90a5
PE
17396 Use mbsnwidth to count columns correctly. Account for tabs, too.
17397 Include mbswidth.h.
17398 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
17399 (extend_location): New function.
17400 (YY_LINES): Remove.
17401
17402 Handle CRLF in C code rather than in Lex code.
17403 (YY_INPUT): New macro.
17404 (no_cr_read): New function.
17405
17406 Scan UCNs, even though we don't fully handle them yet.
17407 (convert_ucn_to_byte): New function.
17408
17409 Handle backslash-newline correctly in C code.
17410 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
17411 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
17412 all uses changed.
17413 (tag, splice): New EREs. Do not allow NUL or newline in tags.
17414 Use {splice} wherever C allows backslash-newline.
17415 YY_STEP after space, newline, vertical-tab.
17416 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 17417
b02d90a5
PE
17418 (letter, id): Don't assume ASCII; e.g., spell out a-z.
17419
17420 ({int}, handle_action_dollar, handle_action_at): Check for integer
17421 overflow.
9e32add8 17422
b02d90a5
PE
17423 (YY_STEP): Omit trailing semicolon, so that it's more like C.
17424
17425 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
17426 as well as \000. Check for UCHAR_MAX, not 255.
17427 Allow \x with an arbitrary positive number of digits, as in C.
17428 Check for overflow here.
17429 Allow \? and UCNs, for compatibility with C.
17430
17431 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
17432 with quote slot used by complain_at.
17433
17434 * tests/input.at: Add tests for backslash-newline, m4 quotes
17435 in symbols, long literals, and funny escapes in strings.
17436
17437 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
17438 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
17439 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
17440 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
17441 * m4/mbswidth.m4: New file, from GNU coreutils.
17442
17443 * doc/bison.texinfo (Grammar Outline): Document // comments.
17444 (Symbols): Document that trigraphs have no special meaning in Bison,
17445 nor is backslash-newline allowed.
17446 (Actions): Document that trigraphs have no special meaning.
17447
17448 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
17449 no longer used.
17450
174512002-11-02 Paul Eggert <eggert@twinsun.com>
17452
17453 * src/reader.c: Don't include quote.h; not needed.
17454 (get_merge_function): Reword warning to be consistent with
17455 type clash diagnostic in grammar_current_rule_check.
17456
17457 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
17458 bug in trigraph handling.
17459
17460 * src/output.c (prepare_symbols): When printing token names,
17461 escape "[" as "@<:@" and likewise for "]".
17462
17463 * src/system.h (errno): Remove declaration, as we are now
17464 assuming C89 or better, and C89 guarantees errno.
17465
762b212b
PE
174662002-10-30 Paul Eggert <eggert@twinsun.com>
17467
17468 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
17469 Check for close failures.
17470 * src/files.h (xfclose): Return void, not int, since it always
17471 returned zero.
17472 * src/files.c (xfclose): Likewise. Report I/O error if ferror
17473 indicates one.
17474 * src/output.c (output_skeleton): Use xfclose rather than fclose
17475 and ferror. xfclose now checks ferror.
17476
17477 * data/glr.c (YYLEFTMOST_STATE): Remove.
17478 (yyreportTree): Use a stack-based leftmost state. This avoids
17479 our continuing battles with bogus warnings about initializers.
17480
56100c60
AD
174812002-10-30 Akim Demaille <akim@epita.fr>
17482
17483 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
17484 #if.
17485
51b4a04c
PH
174862002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17487
17488 * tests/glr-regr1.at: New test for reported regressions.
17489 * tests/testsuite.at: Add glr-regr1.at test.
17490 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 17491
bf1ebda2
PE
174922002-10-24 Paul Eggert <eggert@twinsun.com>
17493
5c16c6b1
PE
17494 Version 1.75a.
17495
bf1ebda2
PE
17496 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
17497 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
17498 we use malloc. Don't assume 'A' through 'Z' are contiguous.
17499 Don't assume strdup exists; POSIX says its an XSI extension.
17500 Check for buffer overflow on input.
17501
b526ee61
AD
175022002-10-24 Akim Demaille <akim@epita.fr>
17503
17504 * src/output.c (output_skeleton): Don't disable M4sugar comments
17505 too soon: it results in comments being expanded.
17506 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
17507 first output.
17508
f1886bb2
AD
175092002-10-24 Akim Demaille <akim@epita.fr>
17510
17511 * data/yacc.c (m4_int_type): New.
17512 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
17513 char' as only yacc.c wants K&R portability.
17514 * data/glr.c (yysigned_char): Remove.
17515 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
17516 Reported by Quoc Peyrot.
17517
c5576256
PE
175182002-10-23 Paul Eggert <eggert@twinsun.com>
17519
17520 * src/main.c (main): With --trace=time, report times even if a
17521 non-fatal error occurs. Formerly, the times were reported in some
17522 such cases but not in others.
17523 * src/reader.c (reader): Just return if a complaint has been issued,
17524 instead of exiting, so that 'main' can report times.
17525
27b0ffea
AD
175262002-10-22 Akim Demaille <akim@epita.fr>
17527
17528 * src/system.h: Include sys/types.
17529 Reported by Bert Deknuydt.
17530
223a7883
PE
175312002-10-23 Paul Eggert <eggert@twinsun.com>
17532
17533 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
17534 Suggested by Art Haas.
17535
175362002-10-22 Paul Eggert <eggert@twinsun.com>
17537
17538 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
17539 decl; not needed any more.
17540 * src/main.c (main): Use return to exit, undoing yesterday's change.
17541 The last OS that we could find where this wouldn't work is
17542 SunOS 3.5, and that's too old to worry about now.
17543
17544 * data/glr.c (struct yyltype): Define members even when not
17545 doing locations. This is more consistent with yacc.c, and it
17546 works around the following bug reports:
161a71f3
PE
17547 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
17548 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 17549
223a7883
PE
17550 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
17551 @acronym consistently. Standardize on "Yacc" instead of "YACC",
17552 "Algol" instead of "ALGOL". Give a bit more history about BNF.
17553
8b76775a
AD
175542002-10-22 Akim Demaille <akim@epita.fr>
17555
17556 * data/README: New.
17557
6db10d14
PE
175582002-10-21 Paul Eggert <eggert@twinsun.com>
17559
17560 Be consistent about 'bool'; the old code used an enum in one
17561 module and an int in another, and this violates the C standard.
17562 * m4/stdbool.m4: New file, from coreutils 4.5.3.
17563 * configure.ac (AC_HEADER_STDBOOL): Add.
17564 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
17565 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
17566 * src/symtab.c (hash_compare_symbol_t): Likewise.
17567 * src/system.h (bool, false, true): Use a definition consistent
17568 with ../lib/hash.c. All uses changed.
17569
17570 * src/complain.c (warning_issued): Renamed from warn_message_count,
17571 so that we needn't worry about integer overflow (!).
17572 Now of type bool. All uses changed.
17573 (complaint_issued): Renamed from complain_message_count; likewise.
17574
17575 * src/main.c (main): Use exit to exit with failure.
27b0ffea 17576
6db10d14
PE
17577 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
17578 rather than 1 and 0.
17579 * src/main.c (main): Likewise.
17580 * src/getargs.c (getargs): Likewise.
17581 * src/reader.c (reader): Likewise.
17582
17583 * src/getarg.c (getargs): Remove duplicate code for
17584 "Try `bison --help'".
17585
17586 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
17587 What was that "2" for?
17588
17589 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
17590 * src/getargs.c (usage): Likewise.
17591
17592 * src/getargs.c (getargs): When there are too few operands, report
17593 the last one. When there are too many, report the first extra
17594 one. This is how diffutils does it.
17595
92a060fd
PE
175962002-10-20 Paul Eggert <eggert@twinsun.com>
17597
17598 Remove K&R vestiges.
17599 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
17600 * src/complain.c (VA_START): Remove. Assume prototypes.
17601 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
17602 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
17603 fatal): Assume prototypes.
17604 * src/complain.h: Assume prototypes.
17605 * src/system.h (PARAMS): Remove.
17606 Include <limits.h> unconditionally, since it's guaranteeed even
17607 for a freestanding C89 compiler.
17608 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
17609 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 17610
e7cb57c0
AD
176112002-10-20 Akim Demaille <akim@epita.fr>
17612
17613 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
17614 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
17615 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
17616 (yyresolveStates, yyresolveAction, yyresolveStack)
17617 (yyprocessOneStack): Use them.
17618 (yy_reduce_print): New.
17619 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
17620
0245f82d
AD
176212002-10-20 Akim Demaille <akim@epita.fr>
17622
17623 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
17624 arguments and output `void'.
17625 (b4_c_function): Rename as...
17626 (b4_c_function_def): this.
17627 (b4_c_function_decl, b4_c_ansi_function_def)
17628 (b4_c_ansi_function_decl): New.
17629 Change the interpretation of the arguments: before `int, foo', now
17630 `int foo, foo'.
17631 * data/yacc.c (yyparse): Prototype and define thanks to these.
17632 Adjust b4_c_function_def uses.
17633 * data/glr.c (yyparse): Likewise, but ANSI only.
17634
39912f52
AD
176352002-10-20 Akim Demaille <akim@epita.fr>
17636
17637 * src/output.c (prepare): Move the definition of `tokens_number',
17638 `nterms_number', `undef_token_number', `user_token_number_max'
17639 to...
17640 (prepare_tokens): Here.
17641 (prepare_tokens): Rename as...
17642 (prepare_symbols): this.
17643 (prepare): Move the definition of `rules_number' to...
17644 (prepare_rules): here.
17645 (prepare): Move the definition of `last', `final_state_number',
17646 `states_number' to...
17647 (prepare_states): here.
17648 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
17649
20c1e2ad
AD
176502002-10-20 Akim Demaille <akim@epita.fr>
17651
17652 * src/tables.h, src/tables.c, src/output.c: Comment changes.
17653
21964f43
AD
176542002-10-20 Akim Demaille <akim@epita.fr>
17655
17656 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
17657 * data/c.m4: here.
17658
66d30cd4
AD
176592002-10-20 Akim Demaille <akim@epita.fr>
17660
17661 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
17662 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
17663 `pair'.
17664 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
17665 `name' to...
17666 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
17667 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
17668 These.
17669
95f2c9fe
PE
176702002-10-19 Paul Eggert <eggert@twinsun.com>
17671
17672 Do not create a temporary file, as that involves security and
17673 cleanup headaches. Instead, use a pair of pipes.
17674 Derived from a suggestion by Florian Krohm.
17675 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
17676 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
17677 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
17678 (BISON_PREREQ_SUBPIPE): Add.
17679 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
17680 Add subpipe.h, subpipe.c.
17681 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
17682 * po/POTFILES.in: Add lib/subpipe.c.
17683 * src/output.c: Include "subpipe.h".
17684 (m4_invoke): Remove decl.
17685 (scan_skel): New decl.
17686 (output_skeleton): Use pipe rather than temporary file for m4 input.
17687 Check that m4sugar.m4 is readable, to avoid deadlock.
17688 Check for pipe I/O error.
17689 * src/scan-skel.l (readpipe): Remove decl.
17690 (scan_skel): New function, to be used in place of m4_invoke.
17691 Read from stream rather than file.
66d30cd4 17692
95f2c9fe
PE
17693 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
17694 float, as this generates a warning on Solaris 8 + GCC 3.2 with
17695 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
17696 this generates a more-accurate value anyway.
17697
17698 * lib/timevar.c (timervar_accumulate): Rename locals to
17699 avoid confusion with similarly-named more-global.
17700 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
17701
17702 * src/output.c (prepare): Use xstrdup to convert char const *
17703 to char *, to avoid GCC warning.
17704
c19988b7
AD
177052002-10-19 Akim Demaille <akim@epita.fr>
17706
17707 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
17708 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
17709 Use them to have `calc.y' ready for %pure-parser.
17710 * data/yacc.c (YYLEX): Pass a yylex return type to
17711 b4_c_function_call.
17712
ae7453f2
AD
177132002-10-19 Akim Demaille <akim@epita.fr>
17714
17715 Prototype support of %lex-param and %parse-param.
17716
17717 * src/parse-gram.y: Add the definition of the %lex-param and
17718 %parse-param tokens, plus their rules.
17719 Drop the `_' version of %glr-parser.
17720 Add the "," token.
17721 * src/scan-gram.l (INITIAL): Scan them.
17722 * src/muscle_tab.c: Comment changes.
17723 (muscle_insert, muscle_find): Rename `pair' as `probe'.
17724 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
17725 (muscle_entry_s): The `value' member is no longer const.
17726 Adjust all dependencies.
17727 * src/muscle_tab.c (muscle_init): Adjust: use
17728 MUSCLE_INSERT_STRING.
17729 Initialize the obstack earlier.
17730 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
17731 (muscle_pair_list_grow): New.
17732 * data/c.m4 (b4_c_function_call, b4_c_args): New.
17733 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
17734 * tests/calc.at: Use %locations, not --locations.
17735 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
17736
0e575721
AD
177372002-10-19 Akim Demaille <akim@epita.fr>
17738
17739 * src/getargs.c (usage): Take status as argument and exit
17740 accordingly.
17741 Report the traditional `Try ... --help' message when status != 0.
17742 (usage, version): Don't take a FILE * as arg, it is pointless.
17743 (getargs): When there is an incorrect number of arguments, make it
17744 an error, and report it GNUlically thanks to `usage ()'.
17745
724ce7f5
PE
177462002-10-18 Paul Eggert <eggert@twinsun.com>
17747
3a781eb2
PE
17748 * data/glr.c (yyreportParseError): Don't assume that sprintf
17749 yields the length of the printed string, as this is not true
17750 on SunOS 4.1.4. Reported by Peter Klein.
17751
724ce7f5
PE
17752 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
17753 * tests/conflicts.at (%nonassoc and eof): Likewise.
17754 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
17755
473d0a75
AD
177562002-10-17 Akim Demaille <akim@epita.fr>
17757
17758 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
17759 * src/getargs.c (trace_types, trace_args): Adjust.
17760 * src/reader.c (grammar_current_rule_prec_set)
17761 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
17762 Standardize error messages.
17763 And s/@prec/%prec/!
17764 (reader): Use trace_flag to enable scanner/parser debugging,
17765 instead of an adhoc scheme.
17766 * src/scan-gram.l: Remove trailing debugging code.
17767
e76d2469
PE
177682002-10-16 Paul Eggert <eggert@twinsun.com>
17769
93e2236a
PE
17770 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
17771 MUSCLE_TAB_H.
17772
e76d2469
PE
17773 * NEWS: Officially drop support for building Bison with K&R C,
17774 since it didn't work anyway and it's not worth worrying about.
17775 * Makefile.maint (wget_files): Remove ansi2knr.c.
17776 (ansi2knr.c-url_prefix): Remove.
17777 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
17778 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17779 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17780
5bd1c419
PE
177812002-10-15 Paul Eggert <eggert@twinsun.com>
17782
17783 Stop using the "enum_" trick for K&R-style function definitions;
17784 it confused me, and I was the author! Instead, assume that people
17785 who want to use K&R C compilers (when using these modules in GCC,
17786 perhaps?) will run ansi2knr.
17787
17788 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
17789 All uses of "enum_" changed to "enum ".
17790 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17791 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 17792
5bd1c419
PE
17793 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
17794 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
17795 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
17796 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
17797 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
17798 abitset_not, abitset_ones, abitset_or, abitset_or_and,
17799 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
17800 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
17801 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
17802 Use function prototypes; this removes the need for declaring
17803 static functions simply to provide their prototypes.
17804 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
17805 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
17806 bitset_count_, bitset_create, bitset_dump, bitset_first,
17807 bitset_free, bitset_init, bitset_last, bitset_next,
17808 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
17809 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
17810 bitset_print, bitset_release_memory, bitset_toggle_,
17811 bitset_type_choose, bitset_type_get, bitset_type_name_get,
17812 debug_bitset): Likewise.
17813 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
17814 * lib/bitset_stats.c (bitset_log_histogram_print,
17815 bitset_percent_histogram_print, bitset_stats_and,
17816 bitset_stats_and_cmp, bitset_stats_and_or,
17817 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
17818 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
17819 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
17820 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
17821 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
17822 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
17823 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
17824 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
17825 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
17826 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
17827 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
17828 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
17829 bitset_stats_zero): Likewise.
17830 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17831 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17832 bitsetv_dump, debug_bitsetv): Likewise.
17833 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
17834 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
17835 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
17836 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
17837 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
17838 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
17839 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
17840 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
17841 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
17842 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
17843 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
17844 Likewise.
17845 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
17846 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
17847 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
17848 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
17849 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
17850 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
17851 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
17852 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
17853 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
17854 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
17855 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 17856
ae26e1f0
AD
178572002-10-14 Akim Demaille <akim@epita.fr>
17858
17859 Version 1.75.
17860
d43baf71
AD
178612002-10-14 Akim Demaille <akim@epita.fr>
17862
17863 * tests/Makefile.am (maintainer-check-posix): New.
17864
7ebc83e3
AD
178652002-10-14 Akim Demaille <akim@epita.fr>
17866
17867 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
17868 member.
17869
05846dae
AD
178702002-10-14 Akim Demaille <akim@epita.fr>
17871
17872 * src/tables.c (table_ninf_remap): base -> tab.
17873 Reported by Matt Rosing.
17874
1318e37d
PE
178752002-10-14 Paul Eggert <eggert@twinsun.com>
17876
447fbb17
PE
17877 * tests/action.at, tests/calc.at, tests/conflicts.at,
17878 tests/cxx-type.at, tests/headers.at, tests/input.at,
17879 tests/regression.at, tests/synclines.at, tests/torture.at:
17880 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
17881 so that the tests still work even if POSIXLY_CORRECT is set.
17882 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 17883
1318e37d
PE
17884 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
17885 for portability to K&R hosts. Fix typo: signed char is guaranteed
17886 only to 127, not to 128.
17887 * data/glr.c (yysigned_char): New type.
17888 * data/yacc.c (yysigned_char): Likewise.
17889 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
17890
cc0f0794
PE
178912002-10-13 Paul Eggert <eggert@twinsun.com>
17892
5038f418
PE
17893 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
17894 true due to limited range of data type" warning from GCC.
17895
cc0f0794
PE
17896 * data/c.m4 (b4_token_defines): Protect against double-inclusion
17897 by wrapping enum yytokentype's definition inside #ifndef
17898 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
17899
6fed0802
AD
179002002-10-13 Akim Demaille <akim@epita.fr>
17901
17902 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
17903 Un yy- yyrhs to avoid the name clash with the global YYRHS.
17904
32f0598d
AD
179052002-10-13 Akim Demaille <akim@epita.fr>
17906
17907 * Makefile.maint: Update from Autoconf 2.54.
17908 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
17909
7ea9a33f
AD
179102002-10-13 Akim Demaille <akim@epita.fr>
17911
17912 * src/print.c (print_state): Separate the list of solved conflicts
17913 from the other items.
17914 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
17915
ea99527d
AD
179162002-10-13 Akim Demaille <akim@epita.fr>
17917
17918 Let nondeterministic skeletons be usable with deterministic
17919 tables.
17920
17921 With the patch, GAWK compiled by GCC without -O2 passes its test
17922 suite using a GLR parser driven by LALR tables. It fails with -O2
17923 because `struct stat' gives two different answers on my machine:
17924 88 (definition of an auto var) and later 96 (memset on this var).
17925 Hence the stack is badly corrumpted. The headers inclusion is to
17926 blame: if I move the awk.h inclusion before GLR's system header
17927 inclusion, the two struct stat have the same size.
17928
17929 * src/tables.c (pack_table): Always create conflict_table.
17930 (token_actions): Always create conflict_list.
17931 * data/glr.c (YYFLAG): Remove, unused.
17932
f377f69f
AD
179332002-10-13 Akim Demaille <akim@epita.fr>
17934
17935 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
17936 (O0FLAGS): New.
17937 (VALGRIND, GXX): New.
17938 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
17939 * tests/bison.in: Run $PREBISON a pre-command.
17940 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
17941 (maintainer-check-g++): New.
17942 * Makefile.am (maintainer-check): New.
17943
2a1fe6ed
AD
179442002-10-13 Akim Demaille <akim@epita.fr>
17945
17946 * data/glr.c: Formatting changes.
17947 Tweak some trace messages to match yacc.c's.
17948
f50adbbd
AD
179492002-10-13 Akim Demaille <akim@epita.fr>
17950
17951 GLR parsers sometimes raise parse errors instead of performing the
17952 default reduction.
17953 Reported by Charles-Henry de Boysson.
17954
17955 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 17956 check the length of the traces when %glr.
f50adbbd
AD
17957 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
17958 GLR's traces.
17959 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
17960 Test GLR parsers.
17961 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
17962 (yyltype): Remove the yy prefix from the member names.
17963 (yytable): Complete its comment.
17964 (yygetLRActions): Map error action number from YYTABLE from
17965 YYTABLE_NINF to 0.
17966 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
17967 (which was a bug: it should have been YYTABEL_NINF, and yet it was
17968 not satisfying as we could compare an YYACTION computed from
17969 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
17970 only value for error actions.
17971 (yyreportParseError): In verbose parse error messages, don't issue
17972 `error' in the list of expected tokens.
17973 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
17974 next action to perform to match glr.c's decoding.
17975 (yytable): Complete its comment.
17976
bcbad5b9
PE
179772002-10-13 Paul Eggert <eggert@twinsun.com>
17978
17979 Fix problem reported by Henrik Grubbstroem in
161a71f3 17980 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
17981 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
17982 because the Bison parser reads the second action before reducing
17983 the first one.
17984 * src/scan-gram.l (rule_length): New static var.
17985 Use it to keep track of the rule length in the scanner, since
17986 we can't expect the parser to be in lock-step sync with the scanner.
17987 (handle_action_dollar, handle_action_at): Use this var.
17988 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 17989
14904b89
PE
179902002-10-12 Paul Eggert <eggert@twinsun.com>
17991
1fe611e5
PE
17992 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
17993 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
17994 Include <sys/time.h> when checking for clock_t and struct tms.
17995 Use same include order as source.
17996 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 17997 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 17998
1fe611e5
PE
17999 * lib/timevar.c: Update copyright date and clarify comments.
18000 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 18001
1fe611e5
PE
18002 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
18003 GCC version as of today, then merge Bison's changes.
18004 Change "GCC" to "Bison" in copyright notice. timevar.def's
18005 author is Akim, so change that too.
18006
98194095
PE
18007 * src/reader.c (grammar_current_rule_check):
18008 Don't worry about the default action if $$ is untyped.
18009 Prevents bogus warnings reported by Jim Gifford in
161a71f3 18010 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 18011
14904b89
PE
18012 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
18013 * data/glr.c, data/lalr1.cc, data/yacc.c:
18014 Output token definitions before the first part of user declarations.
18015 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 18016 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 18017
ff6dca18
PE
180182002-10-11 Paul Eggert <eggert@twinsun.com>
18019
18020 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
18021 (yyparse): here. This undoes some of the 2002-07-25 change.
18022 Compatibility problem reported by Ralf S. Engelschall with
18023 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
18024
eb714592
AD
180252002-10-11 Akim Demaille <akim@epita.fr>
18026
18027 * tests/regression.at Characters Escapes): New.
18028 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
18029 characters.
18030 Reported by Jan Nieuwenhuizen.
18031
b7195100
AD
180322002-10-11 Akim Demaille <akim@epita.fr>
18033
18034 * po/id.po: New.
18035
f28a0f2d
PE
180362002-10-10 Paul Eggert <eggert@twinsun.com>
18037
18038 Portability fixes for bitsets; this also avoids several GCC
18039 warnings.
18040
18041 * lib/abitset.c: Include <stddef.h>, for offsetof.
18042 * lib/lbitset.c: Likewise.
18043
18044 * lib/abitset.c (abitset_bytes): Return a size that is aligned
18045 properly for vectors of objects. Do not assume that adding a
18046 header size to a multiple of a word size yields a value that is
18047 properly aligned for the whole union.
18048 * lib/bitsetv.c (bitsetv_alloc): Likewise.
18049
18050 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
18051 unique names for structures.
18052 * lib/ebitset.c (ebitset_bytes): Likewise.
18053 * lib/lbitset.c (lbitset_bytes): Likewise.
18054
18055 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
18056 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
18057 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
18058 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
18059 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
18060 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
18061 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
18062 to improve the type-checking that GCC can do.
18063 * lib/bitset.c (bitset_op4_cmp): Likewise.
18064 * lib/bitset_stats.c (bitset_stats_count,
18065 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
18066 bitset_stats_copy, bitset_stats_disjoint_p,
18067 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
18068 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
18069 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
18070 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
18071 bitset_stats_and_or_cmp, bitset_stats_andn_or,
18072 bitset_stats_andn_or_cmp, bitset_stats_or_and,
18073 bitset_stats_or_and_cmp): Likewise.
18074 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
18075 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
18076 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
18077 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
18078
18079 * lib/abitset.h: Include bitset.h, not bbitset.h.
18080 * lib/ebitset.h: Likewise.
18081 * lib/lbitset.h: Likewise.
18082
18083 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
18084 All instances of parameters of type enum bitset_opts are now of
18085 type enum_bitset_opts, to conform to the C Standard, and similarly
18086 for enum_bitset_type.
18087 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
18088 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
18089
18090 Do not use "struct bitset_struct" to mean different things in
18091 different modules. Not only is this confusing, it violates
18092 the C Standard, which requires that structure types in different
18093 modules must be compatible if one is to be passed to the other.
18094 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
18095 All instances of "struct bitset_struct *" replaced with "bitset".
18096 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
18097 (union bitset_union, struct abitset_struct, struct ebitset_struct,
18098 struct lbitset_struct, struct bitset_stats_struct): New types.
18099 All uses of struct bitset_struct changed to union bitset_union,
18100 etc.
ba0fe3c7 18101 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
18102 struct bitset_struct): Remove.
18103 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
18104 struct bitset_struct): Remove.
18105 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
18106 bitset_struct): Remove.
18107 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
18108 Likewise.
18109
18110 Do not call a function of type T using a call that assumes the
18111 function is of a different type U. Standard C requires that a
18112 function must be called with a type that is compatible with its
18113 definition.
18114 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
18115 New decls.
18116 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
18117 New functions.
18118 * lib/ebitset.c (PFV): Remove.
18119 * lib/lbitset.c (PFV): Likewise.
18120 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
18121 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
18122 decls.
18123 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
18124 (ebitset_vtable): Use them.
18125 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
18126 lbitset_xor): New functions.
18127 (lbitset_vtable): Use them.
18128
18129 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
18130 Declare.
18131
18132 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
18133 GCC warning.
18134 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
18135 Use offsetof, for simplicity.
18136
6fbe4984
PE
181372002-10-06 Paul Eggert <eggert@twinsun.com>
18138
18139 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
18140 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 18141 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
18142 which was inadvertently undone by the 2002-09-30 patch.
18143 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
18144 the same width as int.
18145
420f93c8
PE
181462002-10-04 Paul Eggert <eggert@twinsun.com>
18147
18148 Version 1.50.
18149
18150 * configure.ac (AC_INIT), NEWS: Increment version number.
18151
18152 * doc/bison.texinfo: Minor spelling, grammar, and white space
18153 fixes.
18154 (Symbols): Mention that any negative value returned from yylex
18155 signifies end-of-input. Warn about negative chars. Mention
18156 the portable Standard C character set.
18157
18158 The GNU coding standard says CFLAGS and YFLAGS are reserved
18159 for the installer to set.
18160 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
18161 * src/Makefile.am (AM_CFLAGS): Likewise.
18162 (AM_YFLAGS): Renamed from YFLAGS.
18163
18164 Fix some MAX and MIN problems.
18165 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
18166 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
18167 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
18168 * src/reader.c (reader): Use it.
18169
18170 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
18171 POSIX 1003.1-2001 has removed fgrep.
18172
181732002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
18174
18175 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
18176 interpreted as signed.
18177 * lib/ebitset.c (ebitset_list): Fix bug.
18178
ff68026d
PE
181792002-10-01 Paul Eggert <eggert@twinsun.com>
18180
18181 More fixes for 64-bit hosts and large bitsets.
18182
18183 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
18184 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
18185 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
18186 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
18187 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
18188 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
18189 bitset_count_): Likewise.
18190 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
18191 bitset_first, bitset_last): Likewise.
18192 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
18193 bitset_stats_list_reverse, bitset_stats_size,
18194 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
18195 Likewise.
18196 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
18197 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
18198 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
18199 bitsetv_reflexive_transitive_closure): Likewise.
18200 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
18201 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
18202 Likewise.
18203 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
18204 Likewise.
420f93c8 18205
ff68026d
PE
18206 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
18207 Use size_t, not unsigned int, to count bytes.
18208 * lib/abitset.h (abitset_bytes): Likewise.
18209 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
18210 Likewise.
18211 * lib/bitset.h (bitset_bytes): Likewise.
18212 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
18213 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
18214 * lib/bitsetv.c (bitsetv_alloc): Likewise.
18215 * lib/ebitset.c (ebitset_bytes): Likewise.
18216 * lib/ebitset.h (ebitset_bytes): Likewise.
18217 * lib/lbitset.c (lbitset_bytes): Likewise.
18218 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 18219
ff68026d
PE
18220 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
18221 abitset_subset_p, abitset_disjoint_p, abitset_and,
18222 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
18223 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
18224 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
18225 abitset_or_and, abitset_or_and_cmp):
18226 Use bitset_windex instead of unsigned int.
18227 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
18228 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
18229 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
18230 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
18231 Likewise.
18232 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 18233
ff68026d
PE
18234 * lib/bitset.c (bitset_print):
18235 Use proper printf formats for widths of integer types.
18236 * lib/bitset_stats.c (bitset_percent_histogram_print,
18237 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
18238 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
18239 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
18240 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 18241
ff68026d
PE
18242 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
18243 BITSET_SIZE_MAX): New macros.
18244 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
18245 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
18246 to BITSET_WINDEX_MAX.
18247
18248 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
18249 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
18250 since we now return the bitset_bindex type (not int).
18251
18252 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
18253 when computing sizes.
18254 * lib/ebitset.c (ebitset_elts_grow): Likewise.
18255
18256 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
18257 and avoid cast to unsigned.
18258
6aa452a6
AD
182592002-09-30 Akim Demaille <akim@epita.fr>
18260
18261 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
18262 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
18263 Updates from Michael Hayes.
18264
927f7817
AD
182652002-09-30 Art Haas <ahaas@neosoft.com>
18266
18267 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
18268 invocations.
18269 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
18270 defined.
18271
9738f41e
AD
182722002-09-27 Akim Demaille <akim@epita.fr>
18273
18274 Version 1.49c.
18275
a5c75d7f
AD
182762002-09-27 Akim Demaille <akim@epita.fr>
18277
18278 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
18279 (Because of AC_LIBSOURCE).
18280
8280e179
AD
182812002-09-27 Akim Demaille <akim@epita.fr>
18282
18283 Playing with Autoscan.
18284
18285 * configure.ac: Remove the old LIBOBJ tweaks.
18286 (AC_REPLACE_FUNCS): Add strrchr and strtol.
18287 * lib/strrchr.c: New.
18288 * lib/strtol.c: New, from the Coreutils 4.5.1.
18289
ae64af35
AD
182902002-09-27 Akim Demaille <akim@epita.fr>
18291
18292 Playing with Autoscan.
18293
18294 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
18295 * lib/Makefile.am (libbison_a_SOURCES): No longer include
18296 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
18297 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
18298 Coreutils 4.5.1.
18299
d1a1114f
AD
183002002-09-24 Akim Demaille <akim@epita.fr>
18301
18302 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
18303 (Frequently Asked Questions, Parser Stack Overflow): New.
18304
b906441c
AD
183052002-09-13 Akim Demaille <akim@epita.fr>
18306
18307 Playing with autoscan.
18308
18309 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
18310 * src/files.c (skeleton_find): Remove, unused.
18311 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
18312 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
18313
bd701811
AD
183142002-09-13 Akim Demaille <akim@epita.fr>
18315
18316 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
18317 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
18318
e0a13e7b
AD
183192002-09-13 Akim Demaille <akim@epita.fr>
18320
18321 * configure.ac: Require 2.54.
18322 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
18323 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
18324 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
18325 Remove, provided by Autoconf macros.
18326
c97011bf
AD
183272002-09-12 Akim Demaille <akim@epita.fr>
18328
18329 * m4/prereq.m4: Update, from Coreutils 4.5.1.
18330
d862b1be
AD
183312002-09-12 Akim Demaille <akim@epita.fr>
18332
18333 * m4/prereq.m4: Update, from Fileutils 4.1.5.
18334 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
18335 Reported by Martin Mokrejs.
18336
3d38c03a
AD
183372002-09-10 Akim Demaille <akim@epita.fr>
18338
18339 * src/parse-gram.y: Associate a human readable string to each
18340 token type.
18341 * tests/regression.at (Invalid inputs): Adjust.
18342
b6347355
AD
183432002-09-10 Gary V. Vaughan <gary@gnu.org>
18344
18345 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
18346 with an Autoconf-2.5x style configure.ac.
18347
09ba4ab2
PE
183482002-09-06 Paul Eggert <eggert@twinsun.com>
18349
18350 * doc/bison.texinfo (Conditions): Make explicit that the GPL
18351 exception applies only to yacc.c. This is a modification of a
18352 patch originally suggested by Akim Demaille.
18353
21846f69
AD
183542002-09-06 Akim Demaille <akim@epita.fr>
18355
09ba4ab2
PE
18356 * data/c.m4 (b4_copyright): Move the GPL exception comment from
18357 here to...
18358 * data/yacc.c: here.
18359
21846f69
AD
18360 * data/lalr1.cc (struct yyltype): Don't define it, since we use
18361 LocationType.
18362 (b4_ltype): Default to yy::Location from location.hh.
18363
c0ad8bf3
AD
183642002-09-04 Jim Meyering <jim@meyering.net>
18365
18366 * data/yacc.c: Guard the declaration of yytoknum also with
18367 `#ifdef YYPRINT', so it is declared only when used.
18368
3a93251e
AD
183692002-09-04 Akim Demaille <akim@epita.fr>
18370
18371 * configure.in: Rename as...
18372 * configure.ac: this.
18373 Bump to 1.49c.
18374
427c0dda
AD
183752002-09-04 Akim Demaille <akim@epita.fr>
18376
18377 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
18378 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
18379 translate maintainer only messages.
18380
6a254321
PE
183812002-08-12 Paul Eggert <eggert@twinsun.com>
18382
645e30d1
PE
18383 Version 1.49b.
18384
6a254321
PE
18385 * Makefile.am (SUBDIRS): Remove intl.
18386 (DISTCLEANFILES): Remove.
18387 * NEWS: Mention that GNU M4 is now required. Clarify what is
18388 meant by "larger grammars". Mention the pt_BR translation.
18389 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
18390 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
18391 Bump version from 0.11.2 to 0.11.5.
18392 (BISON_PREREQ_STAGE): Remove.
18393 (AM_GNU_GETTEXT): Use external gettext.
18394 (AC_OUTPUT): Remove intl/Makefile.
18395
18396 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
18397
18398 * data/glr.c: Include string.h, for strlen.
18399 (yyreportParseError): Use size_t for yysize.
18400 (yy_yypstack): No longer nested inside yypstates, as nested
18401 functions are not portable. Do not assume size_t is the
18402 same width as int.
18403 (yypstates): Do not assume that ptrdiff_t is the same width
18404 as int, and similarly for yyposn and YYINDEX.
18405
18406 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
18407
18408 * lib/Makefile.am (INCLUDES): Do not include from the intl
18409 directory, which has been removed.
18410 * src/Makefile.am (INCLUDES): Likewise.
18411
18412 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
18413 (bitsets_sources, additional_bitsets_sources, timevars_sources):
18414 New vars.
18415
18416 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
18417 * tests/Makefile.am (EXTRA_DIST): Likewise.
18418
18419 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
18420 Do not assume that bitset_windex is the same width as unsigned.
18421
18422 * lib/abitset.c (abitset_unused_clear): Do not assume that
18423 bitset_word is the same width as int.
18424 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
18425 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
18426 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
18427 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
18428 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
18429
18430 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
18431 portability to one's complement hosts!).
18432 * lib/ebitset.c (ebitset_op1): Likewise.
18433 * lib/lbitset.c (lbitset_op1): Likewise.
18434
18435 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
18436 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
18437 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
18438 Sync with fileutils.
18439 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
18440 lib/gettext.h: Sync with diffutils.
18441
18442 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
18443 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
18444
18445 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
18446 PROTOTYPES to check for prototypes, and "defined __STDC__" to
18447 check for void *.
18448
18449 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
18450 size_t; the old version tried to do this but casted improperly.
18451 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
18452 (bitset_test): Now returns int, not unsigned long.
18453
18454 * lib/bitset_stats.c: Include "gettext.h".
18455 (_): New macro.
18456 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
18457 name locals "index", as it generates unnecessary warnings on some
18458 hosts that have an "index" function.
18459
18460 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
18461 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
18462 they need translation.
18463 * src/LR0.c (state_list_append, new_itemsets, get_state,
18464 append_states, generate_states): Likewise.
18465 * src/assoc.c (assoc_to_string): Likewise.
18466 * src/closure.c (print_closure, set_firsts, closure): Likewise.
18467 * src/gram.c (grammar_dump): Likewise.
18468 * src/injections.c (injections_compute): Likewise.
18469 * src/lalr.c (lookaheads_print): Likewise.
18470 * src/relation.c (relation_transpose): Likewise.
18471 * src/scan-gram.l: Likewise.
18472 * src/tables.c (table_grow, pack_vector): Likewise.
18473
18474 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
18475 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
18476 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
18477 * m4/mbstate_t.m4: Sync with fileutils.
18478 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
18479
18480 * po/LINGUAS: Add pt_BR.
18481 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
18482 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
18483 lib/timevar.c.
18484 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
18485 manual recommends.
18486 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
18487
18488 * src/complain.c (strerror_r): Remove decl; not needed.
18489 (strerror): Use same pattern as ../lib/error.c.
18490
18491 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
18492
18493 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
18494
18495 * src/main.c (main): Cast result of bindtextdomain and textdomain
18496 to void, to avoid a GCC warning when --disable-nls is in effect.
18497
18498 * src/scan-gram.l: Use strings rather than escapes when possible,
18499 to minimize the number of warnings from xgettext.
18500 (handle_action_dollar, handle_action_at): Don't use isdigit,
18501 as it mishandles negative chars and it may not work as expected
18502 outside the C locale.
18503
18504 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
18505 this is a GCC extension and is not portable to other compilers.
18506
18507 * src/system.h (alloca): Use same pattern as ../lib/error.c.
18508 Do not include <ctype.h>; no longer needed.
18509 Do not include <malloc.h>; no longer needed (and generates
18510 warnings on OpenBSD 3.0).
18511
18512 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
18513 it's not portable.
18514
18515 * tests/regression.at: Do not use 'cc -c input.c -o input';
18516 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
18517
18518 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
18519 exit status as failure, not just exit status 1. Sun C exits
18520 with status 2 sometimes.
18521
18522 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
18523 Use it for the two large tests.
18524
c8f002c7
AD
185252002-08-02 Akim Demaille <akim@epita.fr>
18526
18527 * src/conflicts.c (conflicts_output): Don't output rules never
18528 reduced here, since anyway that computation doesn't work.
18529 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
18530 (rule_useless_p, rule_never_reduced_p): New.
18531 (grammar_rules_partial_print): Use a filter instead of a range.
18532 Display the title only if needed.
18533 (grammar_rules_print): Adjust.
18534 (grammar_rules_never_reduced_report): New.
18535 * src/tables.c (action_row): Move the computation of rules never
18536 reduced to...
18537 (token_actions): here.
18538 * src/main.c (main): Make the parser before making the report, so
18539 that rules never reduced are computed.
18540 Call grammar_rules_never_reduced_report.
18541 * src/print.c (print_results): Report rules never reduced.
18542 * tests/conflicts.at, tests/reduce.at: Adjust.
18543
cd08e51e
AD
185442002-08-01 Akim Demaille <akim@epita.fr>
18545
18546 Instead of attaching lookaheads and duplicating the rules being
18547 reduced by a state, attach the lookaheads to the reductions.
18548
18549 * src/state.h (state_t): Remove the `lookaheads',
18550 `lookaheads_rule' member.
18551 (reductions_t): Add a `lookaheads' member.
18552 Use a regular array for the `rules'.
18553 * src/state.c (reductions_new): Initialize the lookaheads member
18554 to 0.
18555 (state_rule_lookaheads_print): Adjust.
18556 * src/state.h, src/state.c (state_reductions_find): New.
18557 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
18558 (count_rr_conflicts): Adjust.
18559 * src/lalr.c (LArule): Remove.
18560 (add_lookback_edge): Adjust.
18561 (state_lookaheads_count): New.
18562 (states_lookaheads_initialize): Merge into...
18563 (initialize_LA): this.
18564 (lalr_free): Adjust.
18565 * src/main.c (main): Don't free nullable and derives too early: it
18566 is used by --verbose.
18567 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
18568
bb0027a9
AD
185692002-08-01 Akim Demaille <akim@epita.fr>
18570
18571 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
18572 `rule_number_t**'.
18573 (set_derives, free_derives): Rename as...
18574 (derives_compute, derives_free): this.
18575 Adjust all dependencies.
18576 * src/nullable.c (set_nullable, free_nullable): Rename as...
18577 (nullable_compute, nullable_free): these.
18578 (rule_list_t): Store rule_t *, not rule_number_t.
18579 * src/state.c (state_rule_lookaheads_print): Directly compare rule
18580 pointers, instead of their numbers.
18581 * src/main.c (main): Call nullable_free, and derives_free earlier,
18582 as they were lo longer used.
18583
3325ddc4
AD
185842002-08-01 Akim Demaille <akim@epita.fr>
18585
18586 * lib/timevar.c (get_time): Include children time.
18587 * src/lalr.h (LA, LArule): Don't export them: used with the
18588 state_t.
18589 * src/lalr.c (LA, LArule): Static.
18590 * src/lalr.h, src/lalr.c (lalr_free): New.
18591 * src/main.c (main): Call it.
18592 * src/tables.c (pack_vector): Check whether loc is >= to the
18593 table_size, not >.
18594 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
18595 (tables_generate): do it, since that's also it which allocates
18596 them.
18597 Don't free LA and LArule, main does.
18598
c6f1a33c
AD
185992002-07-31 Akim Demaille <akim@epita.fr>
18600
18601 Separate parser tables computation and output.
18602
18603 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
18604 (conflict_list, conflict_list_cnt, table, check, table_ninf)
18605 (yydefgoto, yydefact, high): Move to...
18606 * src/tables.h, src/tables.c: here.
18607 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18608 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18609 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
18610 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
18611 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
18612 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
18613 (action_row, save_row, token_actions, save_column, default_goto)
18614 (goto_actions, sort_actions, matching_state, pack_vector)
18615 (table_ninf_remap, pack_table, prepare_actions): Move to...
18616 * src/tables.c: here.
18617 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
18618 * src/output.c (token_actions, output_base, output_conflicts)
18619 (output_check): Merge into...
18620 (prepare_actions): this.
18621 (actions_output): Rename as...
18622 (user_actions_output): this.
18623 * src/main.c (main): Call tables_generate and tables_free.
18624
1509d42f
AD
186252002-07-31 Akim Demaille <akim@epita.fr>
18626
18627 Steal GCC's --time-report support.
18628
18629 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
18630 stolen/adjusted from GCC.
18631 * m4/stage.m4: Remove time related checks.
18632 * m4/timevar.m4: New.
18633 * configure.in: Adjust.
18634 * src/system.h: Adjust to using timevar.h.
18635 * src/getargs.h, src/getargs.c: Support trace_time for
18636 --trace=time.
18637 * src/main.c (stage): Remove.
18638 (main): Replace `stage' invocations with timevar calls.
18639 * src/output.c: Insert pertinent timevar calls.
18640
273a74fa
AD
186412002-07-31 Akim Demaille <akim@epita.fr>
18642
18643 Let --trace have arguments.
18644
18645 * src/getargs.h (enum trace_e): New.
18646 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
18647 (long_options, short_options): --trace/-T takes an optional
18648 argument.
18649 Change all the uses of trace_flag to reflect the new flags.
18650 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
18651
18652 Strengthen `stage' portability.
18653
18654 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
18655 * configure.in: Use it.
18656 Don't check for malloc.h and sys/times.h.
18657 * src/system.h: Include them when appropriate.
18658 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
18659 times and struct tms are available.
18660
217598da
AD
186612002-07-30 Akim Demaille <akim@epita.fr>
18662
18663 In verbose parse error message, don't report `error' as an
18664 expected token.
18665 * tests/actions.at (Printers and Destructors): Adjust.
18666 * tests/calc.at (Calculator $1): Adjust.
18667 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
18668 error message, do not report the parser accepts the error token in
18669 that state.
18670
52489d44
AD
186712002-07-30 Akim Demaille <akim@epita.fr>
18672
18673 Normalize conflict related messages.
18674
18675 * src/complain.h, src/complain.c (warn, complain): New.
18676 * src/conflicts.c (conflicts_print): Use them.
18677 (conflict_report_yacc): New, extracted from...
18678 (conflicts_print): here.
18679 * tests/conflicts.at, tests/existing.at: Adjust.
18680
e8832397
AD
186812002-07-30 Akim Demaille <akim@epita.fr>
18682
18683 Report rules which are never reduced by the parser: those hidden
18684 by conflicts.
18685
18686 * src/LR0.c (save_reductions): Don't make the final state too
18687 different: save its reduction (accept) instead of having a state
18688 without any action (no shift or goto, no reduce).
18689 Note: the final state is now a ``regular'' state, i.e., the
18690 parsers now contain `reduce 0' as default reduction.
18691 Nevertheless, since they decide to `accept' when yystate =
18692 final_state, they still will not reduce rule 0.
18693 * src/print.c (print_actions, print_reduction): Adjust.
18694 * src/output.c (action_row): Track reduced rules.
18695 (token_actions): Report rules never reduced.
18696 * tests/conflicts.at, tests/regression.at: Adjust.
18697
caf23d24
AD
186982002-07-30 Akim Demaille <akim@epita.fr>
18699
18700 `stage' was accidently included in a previous patch.
18701 Initiate its autoconfiscation.
18702
18703 * configure.in: Look for malloc.h and sys/times.h.
18704 * src/main.c (stage): Adjust.
18705 Report only when trace_flag.
18706
640748ee
AD
187072002-07-29 Akim Demaille <akim@epita.fr>
18708
18709 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
18710 state_number_t.
18711 (errs_t): symbol_t*, not symbol_number_t.
18712 (reductions_t): rule_t*, not rule_number_t.
18713 (FOR_EACH_SHIFT): New.
18714 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
18715 * src/print.c, src/print_graph.c: Adjust.
18716
88bce5a2
AD
187172002-07-29 Akim Demaille <akim@epita.fr>
18718
18719 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
18720
18721 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
18722 (endtoken, accept): these.
18723 * src/reader.c (reader): Set endtoken's default tag to "$end".
18724 Set undeftoken's tag to "$undefined" instead of "$undefined.".
18725 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
18726 Adjust.
18727
1bfb97db
AD
187282002-07-29 Akim Demaille <akim@epita.fr>
18729
18730 * src/reduce.c (reduce_grammar): When the language is empty,
18731 complain about the start symbol, not the axiom.
18732 Use its location.
18733 * tests/reduce.at (Empty Language): New.
18734
fc5734fe
AD
187352002-07-26 Akim Demaille <akim@epita.fr>
18736
18737 * src/reader.h, src/reader.c (gram_error): ... can't get
18738 yycontrol without making too strong assumptions on the parser
18739 itself.
18740 * src/output.c (prepare_tokens): Use the real 0th value of
18741 token_translations instead of `0'.
18742 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
18743 visible here.
18744 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
18745 for the time being: %locations ought to provide it to yyerror.
18746
3650b4b8
AD
187472002-07-25 Akim Demaille <akim@epita.fr>
18748
18749 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
18750 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
18751 * tests/regression.at (Web2c Actions): Adjust.
18752
4b3d3a8e
AD
187532002-07-25 Akim Demaille <akim@epita.fr>
18754
18755 Stop storing rules from 1 to nrules + 1.
18756
18757 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
18758 * src/nullable.c, src/output.c, src/print.c, src/reader.c
18759 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
18760 Iterate from 0 to nrules.
18761 Use rule_number_as_item_number and item_number_as_rule_number.
18762 Adjust to `derive' now containing possibly 0.
18763 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
18764 Handle the `- 1' part in rule numbers from/to item numbers.
18765 * src/conflicts.c (log_resolution): Fix the message which reversed
18766 shift and reduce.
18767 * src/output.c (action_row): Initialize default_rule to -1.
18768 (token_actions): Adjust.
18769 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
18770 expected output.
18771 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
18772
4a2a22f4
AD
187732002-07-25 Akim Demaille <akim@epita.fr>
18774
18775 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
18776 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
18777 (b4_c_knr_arg_decl): New.
18778 * data/yacc.c: Use it to define yysymprint, yydestruct, and
18779 yyreport_parse_error.
18780
b8df3223
AD
187812002-07-25 Akim Demaille <akim@epita.fr>
18782
18783 * data/yacc.c (yyreport_parse_error): New, extracted from...
18784 (yyparse): here.
18785 (yydestruct, yysymprint): Move above yyparse.
18786 Be K&R compliant.
18787
a762e609
AD
187882002-07-25 Akim Demaille <akim@epita.fr>
18789
18790 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
18791 replace...
18792 (b4_sint_type, b4_uint_type): these.
18793 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
18794 * tests/regression.at (Web2c Actions): Adjust.
18795
12b0043a
AD
187962002-07-25 Akim Demaille <akim@epita.fr>
18797
18798 * src/gram.h (TIEM_NUMBER_MAX): New.
18799 (item_number_of_rule_number, rule_number_of_item_number): Rename
18800 as...
18801 (rule_number_as_item_number, item_number_as_rule_number): these.
18802 Adjust dependencies.
18803 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18804 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18805 (symbol_number_to_vector_number): New.
18806 (order): Of vector_number_t* type.
18807 (base_t, BASE_MAX, BASE_MIN): New.
18808 (froms, tos, width, pos, check): Of base_t type.
18809 (action_number_t, ACTION_MIN, ACTION_MAX): New.
18810 (actrow): Of action_number_t type.
18811 (conflrow): Of unsigned int type.
18812 (table_ninf, base_ninf): New.
18813 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
18814 (muscle_insert_int_table, muscle_insert_base_table)
18815 (muscle_insert_rule_number_table): New.
18816 (prepare_tokens): Output `toknum' as int_table.
18817 (action_row): Returns a rule_number_t.
18818 Use ACTION_MIN, not SHRT_MIN.
18819 (token_actions): yydefact is rule_number_t*.
18820 (table_ninf_remap): New.
18821 (pack_table): Use it for `base' and `table'.
18822 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
18823 replaced with...
18824 (YYPACT_NINF, YYTABLE_NINF): these.
18825 (yypact, yytable): Compute their types instead of hard-coded
18826 `short'.
18827 * tests/regression.at (Web2c Actions): Adjust.
18828
5dde258a
AD
188292002-07-19 Akim Demaille <akim@epita.fr>
18830
18831 * src/scan-gram.l (id): Can start with an underscore.
18832
a945ec39
AD
188332002-07-16 Akim Demaille <akim@epita.fr>
18834
18835 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
18836 Adjust all former `associativity' dependencies.
18837 * src/symtab.c (symbol_new): Default associativity is `undef', not
18838 `right'.
18839 (symbol_check_alias_consistence): Adjust.
18840
fae437e8
AD
188412002-07-09 Akim Demaille <akim@epita.fr>
18842
18843 * doc/bison.texinfo: Properly set the ``header'' part.
18844 Use @dircategory ``GNU programming tools'' as per Texinfo's
18845 documentation.
18846 Use @copying.
18847
1a715ef2
AD
188482002-07-09 Akim Demaille <akim@epita.fr>
18849
18850 * lib/quotearg.h: Protect against multiple inclusions.
18851 * src/location.h (location_t): Add a `file' member.
18852 (LOCATION_RESET, LOCATION_PRINT): Adjust.
18853 * src/complain.c (warn_at, complain_at, fatal_at): Drop
18854 `error_one_per_line' support.
18855
a5d50994
AD
188562002-07-09 Akim Demaille <akim@epita.fr>
18857
18858 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
18859 * src/reader.c (lineno): Remove.
18860 Adjust all dependencies.
18861 (get_merge_function): Take a location and use complain_at.
18862 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
18863 * tests/regression.at (Invalid inputs, Mixing %token styles):
18864 Adjust.
18865
b275314e
AD
188662002-07-09 Akim Demaille <akim@epita.fr>
18867
18868 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
18869 recovery rule, and forbid extensions when --yacc.
18870 (gram_error): Use complain_at.
18871 * src/reader.c (reader): Exit if there were parse errors.
18872
865b9df1
AD
188732002-07-09 Akim Demaille <akim@epita.fr>
18874
18875 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
18876 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
18877 Reported by R Blake <blakers@mac.com>.
18878
c76e14da
AD
188792002-07-09 Akim Demaille <akim@epita.fr>
18880
18881 * data/yacc.c: Output the copyright notive in the header.
18882
7db2ed2d
AD
188832002-07-03 Akim Demaille <akim@epita.fr>
18884
18885 * src/output.c (froms, tos): Are state_number_t.
18886 (save_column): sp, sp1, and sp2 are state_number_t.
18887 (prepare): Rename `final' as `final_state_number', `nnts' as
18888 `nterms_number', `nrules' as `rules_number', `nstates' as
18889 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
18890 unused.
18891 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
18892 * data/lalr1.cc (nsym_): Remove, unused.
18893
e68e0410
AD
188942002-07-03 Akim Demaille <akim@epita.fr>
18895
18896 * src/lalr.h, src/lalr.c (goto_number_t): New.
18897 * src/lalr.c (goto_list_t): New.
18898 Propagate them.
18899 * src/nullable.c (rule_list_t): New.
18900 Propagate.
18901 * src/types.h: Remove.
18902
e1a4f3a4
AD
189032002-07-03 Akim Demaille <akim@epita.fr>
18904
18905 * src/closure.c (print_fderives): Use rule_rhs_print.
18906 * src/derives.c (print_derives): Use rule_rhs_print.
18907 (rule_list_t): New, replaces `shorts'.
18908 (set_derives): Add comments.
18909 * tests/sets.at (Nullable, Firsts): Adjust.
18910
536545f3
AD
189112002-07-03 Akim Demaille <akim@epita.fr>
18912
18913 * src/output.c (prepare_actions): Free `tally' and `width'.
18914 (prepare_actions): Allocate and free `order'.
18915 * src/symtab.c (symbols_free): Free `symbols'.
18916 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
18917 * src/output.c (m4_invoke): Move to...
18918 * src/scan-skel.l: here.
18919 (<<EOF>>): Close yyout, and free its name.
18920
8b752b00
AD
189212002-07-03 Akim Demaille <akim@epita.fr>
18922
18923 Fix some memory leaks, and fix a bug: state 0 was examined twice.
18924
18925 * src/LR0.c (new_state): Merge into...
18926 (state_list_append): this.
18927 (new_states): Merge into...
18928 (generate_states): here.
18929 (set_states): Don't ensure a proper `errs' state member here, do it...
18930 * src/conflicts.c (conflicts_solve): here.
18931 * src/state.h, src/state.c: Comment changes.
18932 (state_t): Rename member `shifts' as `transitions'.
18933 Adjust all dependencies.
18934 (errs_new): For consistency, also take the values as argument.
18935 (errs_dup): Remove.
18936 (state_errs_set): New.
18937 (state_reductions_set, state_transitions_set): Assert that no
18938 previous value was assigned.
18939 (state_free): New.
18940 (states_free): Use it.
18941 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
18942 temporary storage: use `errs' and `nerrs' as elsewhere.
18943 (set_conflicts): Allocate and free this `errs'.
18944
613f5e1a
AD
189452002-07-02 Akim Demaille <akim@epita.fr>
18946
18947 * lib/libiberty.h: New.
18948 * lib: Update the bitset implementation from upstream.
18949 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
18950 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
18951 * src/main.c: Adjust bitset stats calls.
18952
26e0cadc
PE
189532002-07-01 Paul Eggert <eggert@twinsun.com>
18954
18955 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
18956 char, so that negative chars don't collide with $.
18957
1154cced
AD
189582002-06-30 Akim Demaille <akim@epita.fr>
18959
18960 Have the GLR tests be `warning' checked, and fix the warnings.
18961
18962 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
18963 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
18964 (yyremoveDeletes): `yyi' and `yyj' are size_t.
18965 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
18966 (yyaddDeferredAction): static.
18967 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
18968 (yyreportParseError): yyprefix is const.
18969 yytokenp is used only when verbose.
18970 (yy__GNUC__): Replace with __GNUC__.
18971 (yypdumpstack): yyi is size_t.
18972 (yypreference): Un-yy local variables and arguments, to avoid
18973 clashes with `yyr1'. Anyway, we are not in the user name space.
18974 (yytname_size): be an int, as is compared with ints.
18975 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
18976 Use them.
18977 * tests/cxx-gram.at: Use quotation to protect $1.
18978 Use AT_COMPILE to enable warnings hunts.
18979 Prototype yylex and yyerror.
18980 `Use' argc.
18981 Include `string.h', not `strings.h'.
18982 Produce and prototype stmtMerge only when used.
18983 yylex takes a location.
18984
97650f4e
AD
189852002-06-30 Akim Demaille <akim@epita.fr>
18986
18987 We spend a lot of time in quotearg, in particular when --verbose.
18988
18989 * src/symtab.c (symbol_get): Store a quoted version of the key.
18990 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
18991 Adjust all callers.
18992
d2576365
AD
189932002-06-30 Akim Demaille <akim@epita.fr>
18994
18995 * src/state.h (reductions_t): Rename member `nreds' as num.
18996 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
18997 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
18998
ccaf65bc
AD
189992002-06-30 Akim Demaille <akim@epita.fr>
19000
19001 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
19002 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
19003 (shifts_to): Rename as...
19004 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
19005 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
19006 (TRANSITION_IS_DISABLED, transitions_to): these.
19007
87675353
AD
190082002-06-30 Akim Demaille <akim@epita.fr>
19009
19010 * src/print.c (print_shifts, print_gotos): Merge into...
19011 (print_transitions): this.
19012 (print_transitions, print_errs, print_reductions): Align the
19013 lookaheads columns.
19014 (print_core, print_transitions, print_errs, print_state,
19015 print_grammar): Output empty lines separator before, not after.
19016 (state_default_rule_compute): Rename as...
19017 (state_default_rule): this.
19018 * tests/conflicts.at (Defaulted Conflicted Reduction),
19019 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
19020 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
19021
ce4ccb4b
AD
190222002-06-30 Akim Demaille <akim@epita.fr>
19023
19024 Display items as we display rules.
19025
19026 * src/gram.h, src/gram.c (rule_lhs_print): New.
19027 * src/gram.c (grammar_rules_partial_print): Use it.
19028 * src/print.c (print_core): Likewise.
19029 * tests/conflicts.at (Defaulted Conflicted Reduction),
19030 (Unresolved SR Conflicts): Adjust.
19031 (Unresolved SR Conflicts): Adjust and rename as...
19032 (Resolved SR Conflicts): this, as was meant.
19033 * tests/regression.at (Web2c Report): Adjust.
19034
bc933ef1
AD
190352002-06-30 Akim Demaille <akim@epita.fr>
19036
19037 * src/print.c (state_default_rule_compute): New, extracted from...
19038 (print_reductions): here.
19039 Pessimize, but clarify the code.
19040 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
19041
53d4308d
AD
190422002-06-30 Akim Demaille <akim@epita.fr>
19043
19044 * src/output.c (action_row): Let default_rule be always a rule
19045 number.
19046
574fb2d5
AD
190472002-06-30 Akim Demaille <akim@epita.fr>
19048
19049 * src/closure.c (print_firsts, print_fderives, closure):
19050 Use BITSET_EXECUTE.
19051 * src/lalr.c (lookaheads_print): Likewise.
19052 * src/state.c (state_rule_lookaheads_print): Likewise.
19053 * src/print_graph.c (print_core): Likewise.
19054 * src/print.c (print_reductions): Likewise.
19055 * src/output.c (action_row): Likewise.
19056 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
19057
05811fd7
AD
190582002-06-30 Akim Demaille <akim@epita.fr>
19059
19060 * src/print_graph.c: Use report_flag.
19061
0e4d5753
AD
190622002-06-30 Akim Demaille <akim@epita.fr>
19063
19064 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
19065 to...
19066 * src/relation.h, src/relation.c (traverse, relation_digraph)
19067 (relation_print, relation_transpose): New.
19068
24c7d800
AD
190692002-06-30 Akim Demaille <akim@epita.fr>
19070
19071 * src/state.h, src/state.c (shifts_to): New.
19072 * src/lalr.c (build_relations): Use it.
19073
9222837b
AD
190742002-06-30 Akim Demaille <akim@epita.fr>
19075
19076 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
19077 (item_number_of_rule_number, rule_number_of_item_number): New.
19078 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
19079 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19080 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
19081 Propagate their use.
19082 Much remains to be done, in particular wrt `shorts' from types.h.
19083
260008e5
AD
190842002-06-30 Akim Demaille <akim@epita.fr>
19085
19086 * src/symtab.c (symbol_new): Initialize the `printer' member.
19087
8a731ca8
AD
190882002-06-30 Akim Demaille <akim@epita.fr>
19089
19090 * src/LR0.c (save_reductions): Remove, replaced by...
19091 * src/state.h, src/state.c (state_reductions_set): New.
19092 (reductions, errs): Rename as...
19093 (reductions_t, errs_t): these.
19094 Adjust all dependencies.
19095
32e1e0a4
AD
190962002-06-30 Akim Demaille <akim@epita.fr>
19097
19098 * src/LR0.c (state_list_t, state_list_append): New.
19099 (first_state, last_state): Now symbol_list_t.
19100 (this_state): Remove.
19101 (new_itemsets, append_states, save_reductions): Take a state_t as
19102 argument.
19103 (set_states, generate_states): Adjust.
19104 (save_shifts): Remove, replaced by...
19105 * src/state.h, src/state.c (state_shifts_set): New.
19106 (shifts): Rename as...
19107 (shifts_t): this.
19108 Adjust all dependencies.
19109 * src/state.h (state_t): Remove the `next' member.
19110
e5fb6710
AD
191112002-06-30 Akim Demaille <akim@epita.fr>
19112
19113 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
19114 escaped in slot 0.
19115
c7ca99d4
AD
191162002-06-30 Akim Demaille <akim@epita.fr>
19117
19118 Use hash.h for the state hash table.
19119
19120 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
19121 (allocate_storage): Use state_hash_new.
19122 (free_storage): Use state_hash_free.
19123 (new_state, get_state): Adjust.
19124 * src/lalr.h, src/lalr.c (states): Move to...
19125 * src/states.h (state_t): Remove the `link' member, no longer
19126 used.
19127 * src/states.h, src/states.c: here.
19128 (state_hash_new, state_hash_free, state_hash_lookup)
19129 (state_hash_insert, states_free): New.
19130 * src/states.c (state_table, state_compare, state_hash): New.
19131 * src/output.c (output_actions): Do not free states now, since we
19132 still need to know the final_state number in `prepare', called
19133 afterwards. Do it...
19134 * src/main.c (main): here: call states_free after `output'.
19135
df0e7316
AD
191362002-06-30 Akim Demaille <akim@epita.fr>
19137
19138 * src/state.h, src/state.c (state_new): New, extracted from...
19139 * src/LR0.c (new_state): here.
19140 * src/state.h (STATE_ALLOC): Move to...
19141 * src/state.c: here.
19142 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
19143 * src/state.h, src/state.c: here.
19144
39f41916
AD
191452002-06-30 Akim Demaille <akim@epita.fr>
19146
19147 * src/reader.c (gensym): Rename as...
19148 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
19149 (getsym): Rename as...
19150 (symbol_get): this.
19151
d57650a5
AD
191522002-06-30 Akim Demaille <akim@epita.fr>
19153
19154 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
19155 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
19156 * src/output.c, src/print.c, src/print_graph.c: Propagate.
19157 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
19158
5a08f1ce
AD
191592002-06-30 Akim Demaille <akim@epita.fr>
19160
19161 Make the test suite pass with warnings checked.
19162
19163 * tests/actions.at (Printers and Destructors): Improve.
19164 Avoid unsigned vs. signed issues.
19165 * tests/calc.at: Don't exercise the scanner here, do it...
19166 * tests/input.at (Torturing the Scanner): here.
19167
720623af
PH
191682002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19169
88e7e941 19170 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
19171 reorganize first lines parallel to yacc.c.
19172
fb8135fa
AD
191732002-06-28 Akim Demaille <akim@epita.fr>
19174
19175 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
19176 (b4_token_enum, b4_token_defines): New, factored from...
19177 * data/lalr1.cc, data/yacc.c, glr.c: here.
19178
41442480
AD
191792002-06-28 Akim Demaille <akim@epita.fr>
19180
19181 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
19182 unused variables.
19183 * src/output.c (merger_output): static.
19184
e0e5bf84
AD
191852002-06-28 Akim Demaille <akim@epita.fr>
19186
ba0fe3c7 19187 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
19188 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
19189 pacify GCC.
19190 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 19191
676385e2
PH
191922002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19193
19194 Accumulated changelog for new GLR parsing features.
19195
6a254321 19196 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
19197 conflicts_total_count.
19198 * src/conflicts.h: Ditto.
19199 * src/output.c (token_actions): Use the new name.
19200 (output_conflicts): Change conflp => conflict_list_heads, and
19201 confl => conflict_list for better readability.
19202 * data/glr.c: Use the new names.
19203 * NEWS: Add self to GLR announcement.
e0e5bf84 19204
676385e2
PH
19205 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
19206
19207 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
19208 Akim Demaille.
19209
19210 * data/bison.glr: Change name to glr.c
19211 * data/glr.c: Renamed from bison.glr.
19212 * data/Makefile.am: Add glr.c
e0e5bf84
AD
19213
19214 * src/getargs.c:
19215
676385e2 19216 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 19217 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 19218
676385e2
PH
19219 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19220
19221 * data/bison.glr: Be sure to restore the
19222 current #line when returning to the skeleton contents after having
19223 exposed the input file's #line.
19224
19225 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19226
19227 * data/bison.glr: Bring up to date with changes to bison.simple.
19228
19229 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19230
19231 * data/bison.glr: Correct definitions that use b4_prefix.
19232 Various reformatting.
19233 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
19234 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
19235 yytokenp argument; now part of stack.
19236 (yychar): Define to behave as documented.
19237 (yyclearin): Ditto.
e0e5bf84 19238
676385e2
PH
19239 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19240
19241 * src/reader.h: Add declaration for free_merger_functions.
19242
19243 * src/reader.c (merge_functions): New variable.
19244 (get_merge_function): New function.
19245 (free_merger_functions): New function.
19246 (readgram): Check for %prec that is not followed by a symbol.
19247 Handle %dprec and %merge declarations.
19248 (packgram): Initialize dprec and merger fields in rules array.
19249
19250 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
19251 conflict_list_cnt, conflict_list_free): New variables.
19252 (table_grow): Also grow conflict_table.
e0e5bf84 19253 (prepare_rules): Output dprec and merger tables.
676385e2 19254 (conflict_row): New function.
e0e5bf84 19255 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
19256 default reduction in conflicted states for GLR parser so that there
19257 are spaces for the conflict lists.
19258 (save_row): Also save conflict information.
19259 (token_actions): Allocate conflict list.
19260 (merger_output): New function.
19261 (pack_vector): Pack conflict table, too.
19262 (output_conflicts): New function to output yyconflp and yyconfl.
19263 (output_check): Allocate conflict_tos.
19264 (output_actions): Output conflict tables, also.
19265 (output_skeleton): Output b4_mergers definition.
19266 (prepare): Output b4_max_rhs_length definition.
19267 Use 'bison.glr' as default skeleton for GLR parsers.
19268
19269 * src/gram.c (glr_parser): New flag.
19270 (grammar_free): Call free_merger_functions.
19271
19272 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
19273 all pairs of conflicting reductions, rather than just all tokens
19274 causing conflicts. Needed to size conflict tables.
e0e5bf84 19275 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
19276 interface.
19277 (conflicts_print): Ditto.
19278 (count_total_conflicts): New function.
19279
19280 * src/reader.h (merger_list): New type.
19281 (merge_functions): New variable.
19282
19283 * src/lex.h (tok_dprec, tok_merge): New token types.
19284
19285 * src/gram.h (rule_s): Add dprec and merger fields.
19286 (glr_parser): New flag.
19287
19288 * src/conflicts.h (count_total_conflicts): New function.
19289
19290 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
19291
19292 * doc/bison.texinfo (Generalized LR Parsing): New section.
19293 (GLR Parsers): New section.
19294 (Language and Grammar): Mention GLR parsing.
19295 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
19296 Correct typo ("tge" -> "the").
19297
19298 * data/bison.glr: New skeleton for GLR parsing.
19299
19300 * tests/cxx-gram.at: New tests for GLR parsing.
19301
19302 * tests/testsuite.at: Include cxx-gram.at.
19303
19304 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 19305
676385e2
PH
19306 * src/parse-gram.y:
19307
19308 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
19309
19310 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 19311
b5480d74 193122002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
19313
19314 * src/options.h, src/options.c: Remove.
19315 * src/getargs.c (short_options, long_options): New.
19316
60491a94
AD
193172002-06-27 Akim Demaille <akim@epita.fr>
19318
19319 * data/bison.simple, data/bison.c++: Rename as...
19320 * data/yacc.c, data/lalr1.cc: these.
19321 * doc/bison.texinfo (Environment Variables): Remove.
19322
9be0c25b
AD
193232002-06-25 Raja R Harinath <harinath@cs.umn.edu>
19324
19325 * src/getargs.c (report_argmatch): Initialize strtok().
19326
1ae72863
AD
193272002-06-20 Akim Demaille <akim@epita.fr>
19328
19329 * data/bison.simple (b4_symbol_actions): New, replaces...
19330 (b4_symbol_destructor, b4_symbol_printer): these.
19331 (yysymprint): Be sure to call YYPRINT only for tokens, and using
19332 user token numbers.
19333
87542d29
AD
193342002-06-20 Akim Demaille <akim@epita.fr>
19335
19336 * data/bison.simple (yydestructor): Rename as...
19337 (yydestruct): this.
19338
1a31ed21
AD
193392002-06-20 Akim Demaille <akim@epita.fr>
19340
19341 * src/symtab.h, src/symtab.c (symbol_type_set)
19342 (symbol_destructor_set, symbol_precedence_set): The location is
19343 the last argument.
19344 Adjust all callers.
19345
e776192e
AD
193462002-06-20 Akim Demaille <akim@epita.fr>
19347
19348 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
19349 internals.
19350 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
19351 Takes a location.
19352 * src/symtab.h, src/symtab.c (symbol_class_set)
19353 (symbol_user_token_number_set): Likewise.
19354 Adjust all callers.
19355 Promote complain_at.
19356 * tests/input.at (Type Clashes): Adjust.
19357
5c1180b3
AD
193582002-06-20 Akim Demaille <akim@epita.fr>
19359
19360 * data/bison.simple (YYLEX): Fix the declaration when
19361 %pure-parser.
19362
e3170060
AD
193632002-06-20 Akim Demaille <akim@epita.fr>
19364
19365 * data/bison.simple (yysymprint): Don't print the token number,
19366 just its name.
19367 * tests/actions.at (Destructors): Rename as...
19368 (Printers and Destructors): this.
19369 Also exercise %printer.
19370
253862fd
AD
193712002-06-20 Akim Demaille <akim@epita.fr>
19372
19373 * data/bison.simple (YYDSYMPRINT): New.
19374 Use it to remove many of the #if YYDEBUG/if (yydebug).
19375
366eea36
AD
193762002-06-20 Akim Demaille <akim@epita.fr>
19377
19378 * src/symtab.h, src/symtab.c (symbol_t): printer and
19379 printer_location are new members.
19380 (symbol_printer_set): New.
19381 * src/parse-gram.y (PERCENT_PRINTER): New token.
19382 Handle its associated rule.
19383 * src/scan-gram.l: Adjust.
19384 (handle_destructor_at, handle_destructor_dollar): Rename as...
19385 (handle_symbol_code_at, handle_symbol_code_dollar): these.
19386 * src/output.c (symbol_printers_output): New.
19387 (output_skeleton): Call it.
19388 * data/bison.simple (yysymprint): New. Cannot be named yyprint
19389 since there are already many grammar files with a user `yyprint'.
19390 Replace the calls to YYPRINT to calls to yysymprint.
19391 * tests/calc.at: Adjust.
19392 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
19393 taking advantage of parser very internal details (stack size!).
19394
4f25ebb0
AD
193952002-06-20 Akim Demaille <akim@epita.fr>
19396
19397 * src/scan-gram.l: Complete the scanner with the missing patterns
19398 to pacify Flex.
19399 Use `quote' and `symbol_tag_get' where appropriate.
19400
93b68a0e
AD
194012002-06-19 Akim Demaille <akim@epita.fr>
19402
19403 * tests/actions.at (Destructors): Augment to test locations.
19404 * data/bison.simple (yydestructor): Pass it the current location
19405 if locations are enabled.
19406 Prototype only when __STDC__ or C++.
19407 Change the argument names to move into the yy name space: there is
19408 user code here.
19409
58612f1d
AD
194102002-06-19 Akim Demaille <akim@epita.fr>
19411
74310291
AD
19412 * data/bison.simple (b4_pure_if): New.
19413 Use it instead of #ifdef YYPURE.
19414
194152002-06-19 Akim Demaille <akim@epita.fr>
19416
19417 * data/bison.simple (b4_location_if): New.
58612f1d
AD
19418 Use it instead of #ifdef YYLSP_NEEDED.
19419
f25bfb75
AD
194202002-06-19 Akim Demaille <akim@epita.fr>
19421
19422 Prepare @$ in %destructor, but currently don't bind it in the
19423 skeleton, as %location use is not cleaned up yet.
19424
19425 * src/scan-gram.l (handle_dollar, handle_destructor_at)
19426 (handle_action_at): New.
19427 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
19428 a braced_code_t and a location as additional arguments.
19429 (handle_destructor_dollar): Instead of requiring `b4_eval', just
19430 unquote one when outputting `b4_dollar_dollar'.
19431 Adjust callers.
19432 * data/bison.simple (b4_eval): Remove.
19433 (b4_symbol_destructor): Adjust.
19434 * tests/input.at (Invalid @n): Adjust.
19435
c732d2c6
AD
194362002-06-19 Zack Weinberg <zack@codesourcery.com>
19437
19438 * doc/bison.texinfo: Document ability to have multiple
19439 prologue sections.
19440
8c165d89
AD
194412002-06-18 Akim Demaille <akim@epita.fr>
19442
19443 * src/files.c (compute_base_names): When computing the output file
19444 names from the input file name, strip the directory part.
19445
ca98bf57
AD
194462002-06-18 Akim Demaille <akim@epita.fr>
19447
19448 * data/bison.simple.new: Comment changes.
19449 Reported by Andreas Schwab.
19450
0bfb02ff
AD
194512002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
19452
19453 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
19454 there are no `label `yyoverflowlab' defined but not used' warnings
19455 when yyoverflow is defined.
19456
24c0aad7
AD
194572002-06-18 Akim Demaille <akim@epita.fr>
19458
19459 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
19460 new member.
19461 (symbol_destructor_set): Adjust.
19462 * src/output.c (symbol_destructors_output): Output the destructor
19463 locations.
19464 Output the symbol name.
19465 * data/bison.simple (b4_symbol_destructor): Adjust.
19466
5719c109
AD
194672002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
19468 and Akim Demaille <akim@epita.fr>
19469
19470 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
19471 what's left on the stack when the error recovery hits EOF.
19472 * tests/actions.at (Destructors): Complete to exercise this case.
19473
9280d3ef
AD
194742002-06-17 Akim Demaille <akim@epita.fr>
19475
19476 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
19477 arguments is really empty, not only equal to `[]'.
19478 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
19479 member.
19480 (symbol_destructor_set): New.
19481 * src/output.c (symbol_destructors_output): New.
19482 * src/reader.h (brace_code_t, current_braced_code): New.
19483 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
19484 (handle_dollar): Rename as...
19485 (handle_action_dollar): this.
19486 (handle_destructor_dollar): New.
19487 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
19488 (grammar_declaration): Use it.
19489 * data/bison.simple (yystos): Is always defined.
19490 (yydestructor): New.
19491 * tests/actions.at (Destructors): New.
19492 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
19493
dafdc66f
AD
194942002-06-17 Akim Demaille <akim@epita.fr>
19495
19496 * src/symlist.h, src/symlist.c (symbol_list_length): New.
19497 * src/scan-gram.l (handle_dollar, handle_at): Compute the
19498 rule_length only when needed.
19499 * src/output.c (actions_output, token_definitions_output): Output
19500 the full M4 block.
19501 * src/symtab.c: Don't access directly to the symbol tag, use
19502 symbol_tag_get.
19503 * src/parse-gram.y: Use symbol_list_free.
19504
56c47203
AD
195052002-06-17 Akim Demaille <akim@epita.fr>
19506
19507 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
19508 (symbol_list_prepend, get_type_name): Move to...
19509 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
19510 (symbol_list_prepend, symbol_list_n_type_name_get): here.
19511 Adjust all callers.
19512 (symbol_list_free): New.
19513 * src/scan-gram.l (handle_dollar): Takes a location.
19514 * tests/input.at (Invalid $n): Adjust.
19515
1e0bab92
AD
195162002-06-17 Akim Demaille <akim@epita.fr>
19517
19518 * src/reader.h, src/reader.c (symbol_list_new): Export it.
19519 (symbol_list_prepend): New.
19520 * src/parse-gram.y (%union): `list' is a new member.
19521 (symbols.1): New, replaces...
19522 (terms_to_prec.1, nterms_to_type.1): these.
19523 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
19524 Take a location as additional argument.
19525 Adjust all callers.
19526
04e60654
AD
195272002-06-15 Akim Demaille <akim@epita.fr>
19528
19529 * src/parse-gram.y: Move %token in the declaration section so that
19530 we don't depend upon CVS Bison.
19531
10e5b8bd
AD
195322002-06-15 Akim Demaille <akim@epita.fr>
19533
19534 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
19535 * src/print.c (print_core): Use it.
19536
9801d40c
AD
195372002-06-15 Akim Demaille <akim@epita.fr>
19538
19539 * src/conflicts.c (log_resolution): Accept the rule involved in
19540 the sr conflicts instead of the lookahead number that points to
19541 that rule.
19542 (flush_reduce): Accept the current lookahead vector as argument,
19543 instead of the index in LA.
19544 (resolve_sr_conflict): Accept the current number of lookahead
19545 bitset to consider for the STATE, instead of the index in LA.
19546 (set_conflicts): Adjust.
19547 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
19548
c0263492
AD
195492002-06-15 Akim Demaille <akim@epita.fr>
19550
19551 * src/state.h (state_t): Replace the `lookaheadsp' member, a
19552 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
19553 Adjust all dependencies.
19554 * src/lalr.c (initialize_lookaheads): Split into...
19555 (states_lookaheads_count, states_lookaheads_initialize): these.
19556 (lalr): Adjust.
19557
9757c359
AD
195582002-06-15 Akim Demaille <akim@epita.fr>
19559
19560 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
19561 out of...
19562 (grammar_rules_print): here.
19563 * src/reduce.c (reduce_output): Use it.
19564 * tests/reduce.at (Useless Rules, Reduced Automaton)
19565 (Underivable Rules): Adjust.
19566
6b98e4b5
AD
195672002-06-15 Akim Demaille <akim@epita.fr>
19568
19569 Copy BYacc's nice way to report the grammar.
19570
19571 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
19572 New.
19573 Don't print the rules' location, it is confusing and useless.
19574 (rule_print): Use grammar_rhs_print.
19575 * src/print.c (print_grammar): Use grammar_rules_print.
19576
6b98e4b5
AD
195772002-06-15 Akim Demaille <akim@epita.fr>
19578
19579 Complete and rationalize `useless thing' warnings.
19580
19581 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
19582 (symbol_tag_print): New.
19583 Use them everywhere in place of accessing directly the tag member.
19584 * src/gram.h, src/gram.c (rule_print): New.
19585 Use it where a rule used to be printed `by hand'.
19586 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
19587 (reduce_grammar_tables): Report the useless rules.
19588 (reduce_print): Useless things are a warning, not an error.
19589 Report it as such.
19590 * tests/reduce.at (Useless Nonterminals, Useless Rules):
19591 (Reduced Automaton, Underivable Rules): Adjust.
19592 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
19593 * tests/conflicts.at (Unresolved SR Conflicts)
19594 (Solved SR Conflicts): Adjust.
19595
ee000ba4
AD
195962002-06-15 Akim Demaille <akim@epita.fr>
19597
19598 Let symbols have a location.
19599
19600 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
19601 (getsym): Adjust.
19602 Adjust all callers.
19603 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
19604 Use location_t, not int.
19605 * src/symtab.c (symbol_check_defined): Take advantage of the
19606 location.
19607 * tests/regression.at (Invalid inputs): Adjust.
19608
8efe435c
AD
196092002-06-15 Akim Demaille <akim@epita.fr>
19610
19611 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
19612 (input): Don't try to initialize yylloc here, do it in the
19613 scanner.
19614 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
19615 * src/gram.h (rule_t): Change line and action_line into location
19616 and action_location, of location_t type.
19617 Adjust all dependencies.
19618 * src/location.h, src/location.c (empty_location): New.
19619 * src/reader.h, src/reader.c (grammar_start_symbol_set)
19620 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
19621 (grammar_current_rule_symbol_append)
19622 (grammar_current_rule_action_append): Expect a location as argument.
19623 * src/reader.c (grammar_midrule_action): Adjust to attach an
19624 action's location as dummy symbol location.
19625 * src/symtab.h, src/symtab.c (startsymbol_location): New.
19626 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
19627 the line numbers.
19628
1921f1d7
AD
196292002-06-14 Akim Demaille <akim@epita.fr>
19630
19631 Grammar declarations may be found in the grammar section.
19632
19633 * src/parse-gram.y (rules_or_grammar_declaration): New.
19634 (declarations): Each declaration may end with a semicolon, not
19635 just...
19636 (grammar_declaration): `"%union"'.
19637 (grammar): Branch to rules_or_grammar_declaration.
19638
4515534c
AD
196392002-06-14 Akim Demaille <akim@epita.fr>
19640
19641 * src/main.c (main): Invoke scanner_free.
19642
f958596b
AD
196432002-06-14 Akim Demaille <akim@epita.fr>
19644
19645 * src/output.c (m4_invoke): Extracted from...
19646 (output_skeleton): here.
19647 Free tempfile.
19648
2c569025
AD
196492002-06-14 Akim Demaille <akim@epita.fr>
19650
19651 * src/parse-gram.y (directives, directive, gram)
19652 (grammar_directives, precedence_directives, precedence_directive):
19653 Rename as...
19654 (declarations, declaration, grammar, grammar_declaration)
19655 (precedence_declaration, precedence_declarator): these.
19656 (symbol_declaration): New.
19657
592e8d4d
AD
196582002-06-14 Akim Demaille <akim@epita.fr>
19659
19660 * src/files.c (action_obstack): Remove, unused.
19661 (output_obstack): Remove it, and all its dependencies, as it is no
19662 longer needed.
19663 * src/reader.c (epilogue_set): Build the epilogue in the
19664 muscle_obstack.
19665 * src/output.h, src/output.c (muscle_obstack): Move to...
19666 * src/muscle_tab.h, src/muscle_tab.h: here.
19667 (muscle_init): Initialize muscle_obstack.
19668 (muscle_free): New.
19669 * src/main.c (main): Call it.
19670
0c15323d
AD
196712002-06-14 Akim Demaille <akim@epita.fr>
19672
19673 * src/location.h: New, extracted from...
19674 * src/reader.h: here.
19675 * src/Makefile.am (noinst_HEADERS): Merge into
19676 (bison_SOURCES): this.
19677 Add location.h.
19678 * src/parse-gram.y: Use location_t instead of Bison's.
19679 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
19680 Use location_t instead of ints.
19681
e96c9728
AD
196822002-06-14 Akim Demaille <akim@epita.fr>
19683
19684 * data/bison.simple, data/bison.c++: Be sure to restore the
19685 current #line when returning to the skeleton contents after having
19686 exposed the input file's #line.
19687
75d1fe16
AD
196882002-06-12 Akim Demaille <akim@epita.fr>
19689
19690 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
19691 eager.
19692 * tests/actions.at (Exotic Dollars): New.
19693
6c35d22c
AD
196942002-06-12 Akim Demaille <akim@epita.fr>
19695
19696 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
19697 ['"/] too eagerly.
19698 * tests/input.at (Torturing the Scanner): New.
19699
1d6412ad
AD
197002002-06-11 Akim Demaille <akim@epita.fr>
19701
19702 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
19703 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
19704 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
19705 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
19706 * src/reader.c (reader): Use it.
19707
4cdb01db
AD
197082002-06-11 Akim Demaille <akim@epita.fr>
19709
19710 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
19711 Adjust all callers.
19712 (scanner_last_string_free): New.
19713
44995b2e
AD
197142002-06-11 Akim Demaille <akim@epita.fr>
19715
19716 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
19717 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
19718 (last_string, YY_OBS_FREE): New.
19719 Use them when returning an ID.
19720
e9955c83
AD
197212002-06-11 Akim Demaille <akim@epita.fr>
19722
19723 Have Bison grammars parsed by a Bison grammar.
19724
19725 * src/reader.c, src/reader.h (prologue_augment): New.
19726 * src/reader.c (copy_definition): Remove.
19727
19728 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
19729 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
19730 (grammar_current_rule_prec_set, grammar_current_rule_check)
19731 (grammar_current_rule_symbol_append)
19732 (grammar_current_rule_action_append): Export.
19733 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
19734 (symbol_list_action_append): Remove.
19735 Hook the routines from reader.
19736 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
19737 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
19738
19739 * src/reader.c (read_declarations): Remove, unused.
19740
19741 * src/parse-gram.y: Handle the epilogue.
19742 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
19743 (grammar_start_symbol_set): this.
19744 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
19745 * src/reader.c (readgram): Remove, unused.
19746 (reader): Adjust to insert eoftoken and axiom where appropriate.
19747
19748 * src/reader.c (copy_dollar): Replace with...
19749 * src/scan-gram.h (handle_dollar): this.
19750 * src/parse-gram.y: Remove `%thong'.
19751
19752 * src/reader.c (copy_at): Replace with...
19753 * src/scan-gram.h (handle_at): this.
19754
19755 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
19756 New.
19757
19758 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
19759 time being.
19760
19761 * src/reader.h, src/reader.c (grammar_rule_end): New.
19762
19763 * src/parse.y (current_type, current_class): New.
19764 Implement `%nterm', `%token' support.
19765 Merge `%term' into `%token'.
19766 (string_as_id): New.
19767 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
19768 type name.
19769
19770 * src/parse-gram.y: Be sure to handle properly the beginning of
19771 rules.
19772
19773 * src/parse-gram.y: Handle %type.
19774 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
19775
19776 * src/parse-gram.y: More directives support.
19777 * src/options.c: No longer handle source directives.
19778
19779 * src/parse-gram.y: Fix %output.
19780
19781 * src/parse-gram.y: Handle %union.
19782 Use the prologue locations.
19783 * src/reader.c (parse_union_decl): Remove.
19784
19785 * src/reader.h, src/reader.c (epilogue_set): New.
19786 * src/parse-gram.y: Use it.
19787
19788 * data/bison.simple, data/bison.c++: b4_stype is now either not
19789 defined, then default to int, or to the contents of %union,
19790 without `union' itself.
19791 Adjust.
19792 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
19793
19794 * src/output.c (actions_output): Don't output braces, as they are
19795 already handled by the scanner.
19796
19797 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
19798 characters to themselves.
19799
19800 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
19801 that the epilogue has a proper #line.
19802
19803 * src/parse-gram.y: Handle precedence/associativity.
19804
19805 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
19806 a terminal.
19807 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
19808 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
19809 at all to define terminals that cannot be emitted.
19810
19811 * src/scan-gram.l: Escape M4 characters.
19812
19813 * src/scan-gram.l: Working properly with escapes in user
19814 strings/characters.
19815
19816 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
19817 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
19818 grammar.
19819 Use more modest sizes, as for the time being the parser does not
19820 release memory, and therefore the process swallows a huge amount
19821 of memory.
19822
19823 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
19824 stricter %token grammar.
19825
19826 * src/symtab.h (associativity): Add `undef_assoc'.
19827 (symbol_precedence_set): Do nothing when passed an undef_assoc.
19828 * src/symtab.c (symbol_check_alias_consistence): Adjust.
19829
19830 * tests/regression.at (Invalid %directive): Remove, as it is now
19831 meaningless.
19832 (Invalid inputs): Adjust to the new error messages.
19833 (Token definitions): The new grammar doesn't allow too many
19834 eccentricities.
19835
19836 * src/lex.h, src/lex.c: Remove.
19837 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
19838 (copy_character, copy_string2, copy_string, copy_identifier)
19839 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
19840 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
19841 (parse_action): Remove.
19842 * po/POTFILES.in: Adjust.
19843
2e047461
AD
198442002-06-11 Akim Demaille <akim@epita.fr>
19845
cd05d13c 19846 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
19847 rule's action member: return the action as a string.
19848 Don't require `rule_length' as an argument: compute it.
19849 (grammar_current_rule_symbol_append)
19850 (grammar_current_rule_action_append): New, eved out from
19851 (readgram): here.
19852 Remove `action_flag', `rulelength', unused now.
19853
9af3fbce
AD
198542002-06-11 Akim Demaille <akim@epita.fr>
19855
19856 * src/reader.c (grammar_current_rule_prec_set).
19857 (grammar_current_rule_check): New, eved out from...
19858 (readgram): here.
19859 Remove `xaction', `first_rhs': useless.
19860 * tests/input.at (Type clashes): New.
19861 * tests/existing.at (GNU Cim Grammar): Adjust.
19862
1485e106
AD
198632002-06-11 Akim Demaille <akim@epita.fr>
19864
19865 * src/reader.c (grammar_midrule_action): New, Eved out from
19866 (readgram): here.
19867
da4160c3
AD
198682002-06-11 Akim Demaille <akim@epita.fr>
19869
19870 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
19871 New.
19872 (readgram): Use them as replacement of inlined code, crule and
19873 crule1.
19874
f6d0f937
AD
198752002-06-11 Akim Demaille <akim@epita.fr>
19876
19877 * src/reader.c (grammar_end, grammar_symbol_append): New.
19878 (readgram): Use them.
19879 Make the use of `p' as local as possible.
19880
69078d4b
AD
198812002-06-10 Akim Demaille <akim@epita.fr>
19882
19883 GCJ's parser requires the tokens to be defined before the prologue.
19884
19885 * data/bison.simple: Output the token definition before the user's
19886 prologue.
19887 * tests/regression.at (Braces parsing, Duplicate string)
19888 (Mixing %token styles): Check the output from bison.
19889 (Early token definitions): New.
19890
5e424082
AD
198912002-06-10 Akim Demaille <akim@epita.fr>
19892
19893 * src/symtab.c (symbol_user_token_number_set): Don't complain when
19894 assigning twice the same user number to a token, so that we can
19895 use it in...
19896 * src/lex.c (lex): here.
19897 Also use `symbol_class_set' instead of hand written code.
19898 * src/reader.c (parse_assoc_decl): Likewise.
19899
44536b35
AD
199002002-06-10 Akim Demaille <akim@epita.fr>
19901
19902 * src/symtab.c, src/symtab.c (symbol_class_set)
19903 (symbol_user_token_number_set): New.
19904 * src/reader.c (parse_token_decl): Use them.
19905 Use a switch instead of ifs.
19906 Use a single argument.
19907
8b9f2372
AD
199082002-06-10 Akim Demaille <akim@epita.fr>
19909
19910 Remove `%thong' support as it is undocumented, unused, duplicates
19911 `%token's job, and creates useless e-mail traffic with people who
19912 want to know what it is, why it is undocumented, unused, and
19913 duplicates `%token's job.
19914
19915 * src/reader.c (parse_thong_decl): Remove.
19916 * src/options.c (option_table): Remove "thong".
19917 * src/lex.h (tok_thong): Remove.
19918
3ae2b51f
AD
199192002-06-10 Akim Demaille <akim@epita.fr>
19920
19921 * src/symtab.c, src/symtab.c (symbol_type_set)
19922 (symbol_precedence_set): New.
19923 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
19924 (value_components_used): Remove, unused.
19925
2f1afb73
AD
199262002-06-09 Akim Demaille <akim@epita.fr>
19927
19928 Move symbols handling code out of the reader.
19929
19930 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
19931 (axiom): Move to...
19932 * src/symtab.h, src/symtab.c: here.
19933
19934 * src/gram.c (start_symbol): Remove: use startsymbol->number.
19935 * src/reader.c (startval): Rename as...
19936 * src/symtab.h, src/symtab.c (startsymbol): this.
19937 * src/reader.c: Adjust.
19938
19939 * src/reader.c (symbol_check_defined, symbol_make_alias)
19940 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19941 (token_translations_init)
19942 Move to...
19943 * src/symtab.c: here.
19944 * src/reader.c (packsymbols): Move to...
19945 * src/symtab.h, src/symtab.c (symbols_pack): here.
19946 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
19947 argument.
19948
e9bca3ad
AD
199492002-06-03 Akim Demaille <akim@epita.fr>
19950
19951 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
19952 then statements.
19953
86eff183
AD
199542002-06-03 Akim Demaille <akim@epita.fr>
19955
19956 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
19957 structs with non literals.
19958 * src/scan-skel.l: never-interactive.
19959 * src/conflicts.c (enum conflict_resolution_e): No trailing
19960 comma.
19961 * src/getargs.c (usage): Split long literal strings.
19962 Reported by Hans Aberg.
19963
717be197
AD
199642002-05-28 Akim Demaille <akim@epita.fr>
19965
19966 * data/bison.c++: Use C++ ostreams.
19967 (cdebug_): New member.
19968
670ddffd
AD
199692002-05-28 Akim Demaille <akim@epita.fr>
19970
19971 * src/output.c (output_skeleton): Be sure to allocate enough room
19972 for `/' _and_ for `\0' in full_skeleton.
19973
769b430f
AD
199742002-05-28 Akim Demaille <akim@epita.fr>
19975
19976 * data/bison.c++: Catch up with bison.simple:
19977 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19978 and Paul Eggert <eggert@twinsun.com>: `error' handing.
19979 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
19980 and popping traces.
19981
7067cb36
PH
199822002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19983
19984 * src/output.c (output_skeleton): Put an explicit path in front of
19985 the skeleton file name, rather than relying on the -I directory,
19986 to partially alleviate effects of having a skeleton file lying around
19987 in the current directory.
769b430f 19988
4a713ec2
PH
199892002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19990
769b430f 19991 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
19992 obstack_printf should be obstack_fgrow1.
19993
b408954b
AD
199942002-05-26 Akim Demaille <akim@epita.fr>
19995
19996 * src/state.h (state_t): `solved_conflicts' is a new member.
19997 * src/LR0.c (new_state): Set it to 0.
19998 * src/conflicts.h, src/conflicts.c (print_conflicts)
19999 (free_conflicts, solve_conflicts): Rename as...
20000 (conflicts_print, conflicts_free, conflicts_solve): these.
20001 Adjust callers.
20002 * src/conflicts.c (enum conflict_resolution_e)
20003 (solved_conflicts_obstack): New, used by...
20004 (log_resolution): this.
20005 Adjust to attach the conflict resolution to each state.
20006 Complete the description with the precedence/associativity
20007 information.
20008 (resolve_sr_conflict): Adjust.
20009 * src/print.c (print_state): Output its solved_conflicts.
20010 * tests/conflicts.at (Unresolved SR Conflicts)
20011 (Solved SR Conflicts): Exercise --report=all.
20012
a49aecd5
AD
200132002-05-26 Akim Demaille <akim@epita.fr>
20014
20015 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
20016 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
20017 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
20018 (token_number_t, item_number_as_token_number)
20019 (token_number_as_item_number, muscle_insert_token_number_table):
20020 Rename as...
20021 (symbol_number_t, item_number_as_symbol_number)
20022 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
20023 these, since it is more appropriate.
20024
5504898e
AD
200252002-05-26 Akim Demaille <akim@epita.fr>
20026
20027 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
20028 `Error:' lines.
20029 * data/bison.simple (yystos) [YYDEBUG]: New.
20030 (yyparse) [YYDEBUG]: Display the symbols which are popped during
20031 error recovery.
20032 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
20033
ec3bc396
AD
200342002-05-25 Akim Demaille <akim@epita.fr>
20035
20036 * doc/bison.texinfo (Debugging): Split into...
20037 (Tracing): this new section, its former contents, and...
20038 (Understanding): this new section.
20039 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
20040 by...
20041 (report_flag): this.
20042 Adjust all dependencies.
20043 (report_args, report_types, report_argmatch): New.
20044 (usage, getargs): Report/support -r, --report.
20045 * src/options.h
20046 (struct option_table_struct): Rename as..,
20047 (struct option_table_s): this.
20048 Rename the `set_flag' member to `flag' to match with getopt_long's
20049 struct.
20050 * src/options.c (option_table): Split verbose into an entry for
20051 %verbose, and another for --verbose.
20052 Support --report/-r, so remove -r from the obsolete --raw.
20053 * src/print.c: Attach full item sets and lookaheads reports to
20054 report_flag instead of trace_flag.
20055 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
20056
78df8250
PE
200572002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
20058 and Paul Eggert <eggert@twinsun.com>
769b430f 20059
78df8250
PE
20060 * data/bison.simple (yyparse): Correct error handling to conform to
20061 POSIX and yacc. Specifically, after syntax error is discovered,
20062 do not reduce further before shifting the error token.
20063 Clean up the code a bit by removing the labels yyerrdefault,
20064 yyerrhandle, yyerrpop.
20065 * NEWS: Document the above.
20066
c0c9ea05
PH
200672002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
20068
20069 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
20070 type; it isn't always big enough, since it doesn't necessarily
20071 include non-terminals.
769b430f 20072 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
20073 the latter can be removed.
20074 (yy_token_number_type): Remove, only one use.
20075 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
20076 don't use TokenNumberType as element type.
769b430f 20077
c0c9ea05
PH
20078 * tests/regression.at: Modify expected output to agree with change
20079 to yyr1 and yytranslate.
769b430f 20080
6390a83f
FK
200812002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
20082
20083 * src/reader.c (parse_action): Use copy_character instead of
20084 obstack_1grow.
20085
db7c8e9a
AD
200862002-05-13 Akim Demaille <akim@epita.fr>
20087
20088 * tests/regression.at (Token definitions): Prototype yylex and
20089 yyerror.
20090
fcc61800
PH
200912002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
20092
158c687b 20093 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
20094 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
20095 32-bit arithmetic.
20096 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
20097
5683e9b2
AD
200982002-05-07 Akim Demaille <akim@epita.fr>
20099
20100 * tests/synclines.at: Be sure to prototype yylex and yyerror to
20101 avoid GCC warnings.
20102
0c2d3f4c
AD
201032002-05-07 Akim Demaille <akim@epita.fr>
20104
20105 Kill GCC warnings.
20106
20107 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
20108 over the RHS of each rule.
20109 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
20110 * src/state.h (state_t): Member `nitems' is unsigned short.
20111 * src/LR0.c (get_state): Adjust.
20112 * src/reader.c (packgram): Likewise.
20113 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
20114 `Type'.
20115 (muscle_insert_int_table): Remove, unused.
20116 (prepare_rules): Remove `max'.
20117
1565b720
AD
201182002-05-06 Akim Demaille <akim@epita.fr>
20119
20120 * src/closure.c (print_firsts): Display of the symbol tags.
20121 (bitmatrix_print): Move to...
20122 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
20123 here.
20124 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
20125
cfaee611
AD
201262002-05-06 Akim Demaille <akim@epita.fr>
20127
20128 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
20129 hash_do_for_each.
20130
458be8e0
AD
201312002-05-06 Akim Demaille <akim@epita.fr>
20132
20133 * src/LR0.c (new_state, get_state): Instead of using the global
20134 `kernel_size' and `kernel_base', have two new arguments:
20135 `core_size' and `core'.
20136 Adjust callers.
20137
a900a624
AD
201382002-05-06 Akim Demaille <akim@epita.fr>
20139
20140 * src/reader.c (packgram): No longer end `ritem' with a 0
20141 sentinel: it is not used.
20142
d4e7d3a1
AD
201432002-05-05 Akim Demaille <akim@epita.fr>
20144
20145 New experimental feature: display the lookaheads in the report and
20146 graph.
20147
20148 * src/print (print_core): When --trace-flag, display the rules
20149 lookaheads.
20150 * src/print_graph.c (print_core): Likewise.
20151 Swap the arguments.
20152 Adjust caller.
20153
39ceb25b
AD
201542002-05-05 Akim Demaille <akim@epita.fr>
20155
20156 * tests/torture.at (Many lookaheads): New test.
20157
5372019f
AD
201582002-05-05 Akim Demaille <akim@epita.fr>
20159
20160 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
20161 (GENERATE_MUSCLE_INSERT_TABLE): this.
20162 (output_int_table, output_unsigned_int_table, output_short_table)
20163 (output_token_number_table, output_item_number_table): Replace with...
20164 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
20165 (muscle_insert_short_table, muscle_insert_token_number_table)
20166 (muscle_insert_item_number_table): these.
20167 Adjust all callers.
20168 (prepare_tokens): Don't free `translations', since...
20169 * src/reader.h, src/reader.c (grammar_free): do it.
20170 Move to...
20171 * src/gram.h, src/gram.c (grammar_free): here.
20172 * data/bison.simple, data/bison.c++: b4_token_number_max is now
20173 b4_translate_max.
20174
5df5f6d5
AD
201752002-05-05 Akim Demaille <akim@epita.fr>
20176
20177 * src/output.c (output_unsigned_int_table): New.
20178 (prepare_rules): `i' is unsigned.
20179 `prhs', `rline', `r2' are unsigned int.
20180 Rename muscle `rhs_number_max' as `rhs_max'.
20181 Output muscles `prhs_max', `rline_max', and `r2_max'.
20182 Free rline and r1.
20183 * data/bison.simple, data/bison.c++: Adjust to use these muscles
20184 to compute types instead of constant types.
20185 * tests/regression.at (Web2c Actions): Adjust.
20186
b87f8b21
AD
201872002-05-04 Akim Demaille <akim@epita.fr>
20188
20189 * src/symtab.h (SALIAS, SUNDEF): Rename as...
20190 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
20191 Adjust dependencies.
20192 * src/output.c (token_definitions_output): Be sure not to output a
20193 `#define 'a'' when fed with `%token 'a' "a"'.
20194 * tests/regression.at (Token definitions): New.
20195
8bb936e4
PE
201962002-05-03 Paul Eggert <eggert@twinsun.com>
20197
20198 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
20199 for K&R C.
20200
202012002-05-03 gettextize <bug-gnu-gettext@gnu.org>
20202
20203 * Makefile.am (SUBDIRS): Remove intl.
20204 (EXTRA_DIST): Add config/config.rpath.
20205
53c71a12
AD
202062002-05-03 Akim Demaille <akim@epita.fr>
20207
20208 * data/bison.simple (m4_if): Don't output empty enums.
20209 And actually, output valid enum definitions :(.
20210
289dd0cf
AD
202112002-05-03 Akim Demaille <akim@epita.fr>
20212
20213 * configure.bat: Remove, completely obsolete.
20214 * Makefile.am (EXTRA_DIST): Adjust.
20215 Don't distribute config.rpath...
20216 * config/Makefile.am (EXTRA_DIST): Do it.
20217
db85e524
AD
202182002-05-03 Akim Demaille <akim@epita.fr>
20219
20220 * configure.in (GETTEXT_VERSION): New.
20221 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
20222
83ccf991
AD
202232002-05-03 Akim Demaille <akim@epita.fr>
20224
20225 * data/bison.simple (b4_token_enum): New.
20226 (b4_token_defines): Use it to output tokens both as #define and
20227 enums.
20228 Suggested by Paul Eggert.
20229 * src/output.c (token_definitions_output): Don't output spurious
20230 white spaces.
20231
1f418995
AD
202322002-05-03 Akim Demaille <akim@epita.fr>
20233
20234 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
20235
45119f04
RA
202362002-05-02 Robert Anisko <robert@lrde.epita.fr>
20237
20238 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
20239 Update the stack class, give a try to deque as the default container.
20240
b2d52318
AD
202412002-05-02 Akim Demaille <akim@epita.fr>
20242
20243 * data/bison.simple (yyparse): Do not implement @$ = @1.
20244 (YYLLOC_DEFAULT): Adjust to do it.
20245 * doc/bison.texinfo (Location Default Action): Fix.
20246
3a8b4109
AD
202472002-05-02 Akim Demaille <akim@epita.fr>
20248
20249 * src/reader.c (parse_braces): Merge into...
20250 (parse_action): this.
20251
84614e13
AD
202522002-05-02 Akim Demaille <akim@epita.fr>
20253
20254 * configure.in (ALL_LINGUAS): Remove.
20255 * po/LINGUAS, hr.po: New.
20256
fdbcd8e2
AD
202572002-05-02 Akim Demaille <akim@epita.fr>
20258
20259 Remove the so called hairy (semantic) parsers.
20260
20261 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
20262 * src/gram.h, src/gram.c (semantic_parser): Remove.
20263 (rule_t): Remove the guard and guard_line members.
20264 * src/lex.h (token_t): remove tok_guard.
20265 * src/options.c (option_table): Remove %guard and %semantic_parser
20266 support.
20267 * src/output.c, src/output.h (guards_output): Remove.
20268 (prepare): Adjust.
20269 (token_definitions_output): Don't output the `T'
20270 tokens (???).
20271 (output_skeleton): Don't output the guards.
20272 * src/files.c, src/files.c (attrsfile): Remove.
20273 * src/reader.c (symbol_list): Remove the guard and guard_line
20274 members.
20275 Adjust dependencies.
20276 (parse_guard): Remove.
20277 * data/bison.hairy: Remove.
20278 * doc/bison.texinfo (Environment Variables): Remove occurrences of
20279 BISON_HAIRY.
20280
82b6cb3f
AD
202812002-05-02 Akim Demaille <akim@epita.fr>
20282
20283 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
20284 (parse_guard): Rename the formal argument `stack_offset' as
20285 `rule_length', which is more readable.
20286 Adjust callers.
20287 (copy_at, copy_dollar): Instead of outputting the hard coded
20288 values of $$, $n and so forth, output invocation to b4_lhs_value,
20289 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
20290 Note: this patch partially drops `semantic-parser' support: it
20291 always does `rule_length - n', where semantic parsers ought to
20292 always use `-n'.
82b6cb3f
AD
20293 * data/bison.simple, data/bison.c++ (b4_lhs_value)
20294 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
20295
6cbfbcc5
AD
202962002-05-02 Akim Demaille <akim@epita.fr>
20297
20298 * configure.in (AC_INIT): Bump to 1.49b.
20299 (AM_INIT_AUTOMAKE): Short invocation.
20300
b8548114
AD
203012002-05-02 Akim Demaille <akim@epita.fr>
20302
20303 Version 1.49a.
20304
c20cd1fa
AD
203052002-05-01 Akim Demaille <akim@epita.fr>
20306
20307 * src/skeleton.h: Remove.
20308
8a9566d4
AD
203092002-05-01 Akim Demaille <akim@epita.fr>
20310
20311 * src/skeleton.h: Fix the #endif.
20312 Reported by Magnus Fromreide.
20313
8c6d399a
PE
203142002-04-26 Paul Eggert <eggert@twinsun.com>
20315
20316 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
20317 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 20318 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 20319
2b7ed18a
RA
203202002-04-25 Robert Anisko <robert@lrde.epita.fr>
20321
20322 * src/scan-skel.l: Postprocess quadrigraphs.
20323
20324 * src/reader.c (copy_character): New function, used to output
20325 single characters while replacing `[' and `]' with quadrigraphs, to
20326 avoid troubles with M4 quotes.
20327 (copy_comment): Output characters with copy_character.
20328 (read_additionnal_code): Likewise.
20329 (copy_string2): Likewise.
20330 (copy_definition): Likewise.
20331
20332 * tests/calc.at: Exercise M4 quoting.
20333
34a89c50
AD
203342002-04-25 Akim Demaille <akim@epita.fr>
20335
20336 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
20337 between `!' and the command.
20338 Reported by Paul Eggert.
20339
0dd1580a
RA
203402002-04-24 Robert Anisko <robert@lrde.epita.fr>
20341
20342 * tests/calc.at: Exercise prologue splitting.
20343
20344 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
20345 `b4_post_prologue' instead of `b4_prologue'.
20346
20347 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
20348 muscles.
20349 (output): Free pre_prologue_obstack and post_prologue_obstack.
20350 * src/files.h, src/files.c (attrs_obstack): Remove.
20351 (pre_prologue_obstack, post_prologue_obstack): New.
20352 * src/reader.c (copy_definition): Add a parameter to specify the
20353 obstack to fill, instead of using attrs_obstack unconditionally.
20354 (read_declarations): Pass pre_prologue_obstack to copy_definition if
20355 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
20356
83c1796f
PE
203572002-04-23 Paul Eggert <eggert@twinsun.com>
20358
20359 * data/bison.simple: Remove unnecessary commentary and white
20360 space differences from 1_29-branch.
20361 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
20362
20363 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
20364 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
20365 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
20366 constructors or destructors.
20367
20368 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
20369
1207eeac
AD
203702002-04-23 Akim Demaille <akim@epita.fr>
20371
20372 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
20373 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
20374 location with columns.
20375 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
20376 All reported by Paul Eggert.
20377
78ab8f67
AD
203782002-04-22 Akim Demaille <akim@epita.fr>
20379
20380 * src/reduce.c (dump_grammar): Move to...
20381 * src/gram.h, src/gram.c (grammar_dump): here.
20382 Be sure to separate long item numbers.
20383 Don't read the members of a rule's prec if its nil.
20384
133c20e2
AD
203852002-04-22 Akim Demaille <akim@epita.fr>
20386
20387 * src/output.c (table_size, table_grow): New.
20388 (MAXTABLE): Remove, replace uses with table_size.
20389 (pack_vector): Instead of dying when the table is too big, grow it.
20390
9515e8a7
AD
203912002-04-22 Akim Demaille <akim@epita.fr>
20392
20393 * data/bison.simple (yyr1): Its type is that of a token number.
20394 * data/bison.c++ (r1_): Likewise.
20395 * tests/regression.at (Web2c Actions): Adjust.
20396
23c5a174
AD
203972002-04-22 Akim Demaille <akim@epita.fr>
20398
20399 * src/reader.c (token_translations_init): 256 is now the default
20400 value for the error token, i.e., it will be assigned another
20401 number if the user assigned 256 to one of her tokens.
20402 (reader): Don't force 256 to error.
20403 * doc/bison.texinfo (Symbols): Adjust.
20404 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
20405 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
20406 etc. instead of 10, 20, 30 (which was used to `jump' over error
20407 (256) and undefined (2)).
20408
5fbb0954
AD
204092002-04-22 Akim Demaille <akim@epita.fr>
20410
20411 Propagate more token_number_t.
20412
20413 * src/gram.h (token_number_as_item_number)
20414 (item_number_as_token_number): New.
20415 * src/output.c (GENERATE_OUTPUT_TABLE): New.
20416 Use it to create output_item_number_table and
20417 output_token_number_table.
20418 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
20419 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
20420 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
20421 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
20422
4f940944
AD
204232002-04-22 Akim Demaille <akim@epita.fr>
20424
20425 * src/output.h, src/output.c (get_lines_number): Remove.
20426
3ded9a63
AD
204272002-04-19 Akim Demaille <akim@epita.fr>
20428
20429 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
20430 as Lex/Flex'.
20431 (Debugging): More details about enabling the debugging features.
20432 (Table of Symbols): Describe $$, $n, @$, and @n.
20433 Suggested by Tim Josling.
20434
e0c471a9
AD
204352002-04-19 Akim Demaille <akim@epita.fr>
20436
20437 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
20438
fecc10cd
AD
204392002-04-10 Akim Demaille <akim@epita.fr>
20440
20441 * src/system.h: Rely on HAVE_LIMITS_H.
20442 Suggested by Paul Eggert.
20443
51dec47b
AD
204442002-04-09 Akim Demaille <akim@epita.fr>
20445
20446 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
20447 full stderr, and strip it according to the bison options, instead
20448 of composing the error message from different bits.
20449 This makes it easier to check for several error messages.
20450 Adjust all the invocations.
20451 Add an invocation exercising the error token.
20452 Add an invocation demonstrating a stupid error message.
20453 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
20454 Adjust the tests.
20455 Error message are for stderr, not stdout.
20456
007a50a4
AD
204572002-04-09 Akim Demaille <akim@epita.fr>
20458
20459 * src/gram.h, src/gram.c (error_token_number): Remove, use
20460 errtoken->number.
20461 * src/reader.c (reader): Don't specify the user token number (2)
20462 for $undefined, as it uselessly prevents using it.
20463 * src/gram.h (token_number_t): Move to...
20464 * src/symtab.h: here.
20465 (state_t.number): Is a token_number_t.
20466 * src/print.c, src/reader.c: Use undeftoken->number instead of
20467 hard coded 2.
20468 (Even though this 2 is not the same as above: the number of the
20469 undeftoken remains being 2, it is its user token number which
20470 might not be 2).
20471 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
20472 `user_token_number_max'.
20473 Output `undef_token_number'.
20474 * data/bison.simple, data/bison.c++: Use them.
20475 Be sure to map invalid yylex return values to
20476 `undef_token_number'. This saves us from gratuitous SEGV.
20477
20478 * tests/conflicts.at (Solved SR Conflicts)
20479 (Unresolved SR Conflicts): Adjust.
20480 * tests/regression.at (Web2c Actions): Adjust.
20481
06446ccf
AD
204822002-04-08 Akim Demaille <akim@epita.fr>
20483
20484 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
20485 Adding #line.
20486 Remove the duplicate `typedefs'.
20487 (RhsNumberType): Fix the declaration and various other typos.
20488 Use __ofile__.
20489 * data/bison.simple: Use __ofile__.
20490 * src/scan-skel.l: Handle __ofile__.
20491
62a3e4f0
AD
204922002-04-08 Akim Demaille <akim@epita.fr>
20493
20494 * src/gram.h (item_number_t): New, the type of item numbers in
20495 RITEM. Note that it must be able to code symbol numbers as
20496 positive number, and the negation of rule numbers as negative
20497 numbers.
20498 Adjust all dependencies (pretty many).
20499 * src/reduce.c (rule): Remove this `short *' pointer: use
20500 item_number_t.
20501 * src/system.h (MINSHORT, MAXSHORT): Remove.
20502 Include `limits.h'.
20503 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
20504 (shortcpy): Remove.
20505 (MAXTABLE): Move to...
20506 * src/output.c (MAXTABLE): here.
20507 (prepare_rules): Use output_int_table to output rhs.
20508 * data/bison.simple, data/bison.c++: Adjust.
20509 * tests/torture.at (Big triangle): Move the limit from 254 to
20510 500.
20511 * tests/regression.at (Web2c Actions): Ajust.
20512
20513 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
20514 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
20515 passes, but produces negative #line number, once fixed, GCC is
20516 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
20517 C), it passes.
20518 * src/state.h (state_h): Code input lines on ints, not shorts.
20519
bb88b0fc
AD
205202002-04-08 Akim Demaille <akim@epita.fr>
20521
20522 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
20523 and then the grammar.
20524
9a636f47
AD
205252002-04-08 Akim Demaille <akim@epita.fr>
20526
20527 * src/system.h: No longer using strndup.
20528
680e8701
AD
205292002-04-07 Akim Demaille <akim@epita.fr>
20530
20531 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
20532 * src/output.c (output_table_data): Return the longest number.
20533 (prepare_tokens): Output `token_number_max').
20534 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
20535 New.
20536 Use them to define yy_token_number_type/TokenNumberType.
20537 Use this type for yytranslate.
20538 * tests/torture.at (Big triangle): Push the limit from 124 to
20539 253.
20540 * tests/regression.at (Web2c Actions): Adjust.
20541
817e9f41
AD
205422002-04-07 Akim Demaille <akim@epita.fr>
20543
20544 * tests/torture.at (Big triangle): New.
20545 (GNU AWK Grammar, GNU Cim Grammar): Move to...
20546 * tests/existing.at: here.
20547
5123689b
AD
205482002-04-07 Akim Demaille <akim@epita.fr>
20549
20550 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
20551 nritems.
20552 Adjust dependencies.
20553
f3849179
AD
205542002-04-07 Akim Demaille <akim@epita.fr>
20555
20556 * src/reader.c: Normalize increments to prefix form.
20557
bd02036a
AD
205582002-04-07 Akim Demaille <akim@epita.fr>
20559
20560 * src/reader.c, symtab.c: Remove debugging code.
20561
db8837cb
AD
205622002-04-07 Akim Demaille <akim@epita.fr>
20563
20564 Rename all the `bucket's as `symbol_t'.
20565
20566 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
20567 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
20568 * src/symtab.c, src/symtab.h (bucket): Rename as...
20569 (symbol_t): this.
20570 (symbol_list_new, bucket_check_defined, bucket_make_alias)
20571 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
20572 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20573 (buckets_new, buckets_free, buckets_do): Rename as...
20574 (symbol_list_new, symbol_check_defined, symbol_make_alias)
20575 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
20576 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
20577 (symbols_new, symbols_free, symbols_do): these.
20578
72a23c97
AD
205792002-04-07 Akim Demaille <akim@epita.fr>
20580
20581 Use lib/hash for the symbol table.
20582
20583 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
20584 EOF.
20585 * src/lex.c (lex): Set the `number' member of new terminals.
20586 * src/reader.c (bucket_check_defined, bucket_make_alias)
20587 (bucket_check_alias_consistence, bucket_translation): New.
20588 (reader, grammar_free, readgram, token_translations_init)
20589 (packsymbols): Adjust.
20590 (reader): Number the predefined tokens.
20591 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
20592 for predefined tokens.
20593 * src/symtab.h (bucket): Remove all the hash table related
20594 members.
20595 * src/symtab.c (symtab): Replace by...
20596 (bucket_table): this.
20597 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20598 (buckets_new, buckets_do): New.
20599
280a38c3
AD
206002002-04-07 Akim Demaille <akim@epita.fr>
20601
20602 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
20603 (start_symbol, max_user_token_number, semantic_parser)
20604 (error_token_number): Initialize.
20605 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
20606 Initialize.
20607 (reader): Don't.
20608 (errtoken, eoftoken, undeftoken, axiom): Extern.
20609
03b31c0c
AD
206102002-04-07 Akim Demaille <akim@epita.fr>
20611
20612 * src/gram.h (rule_s): prec and precsym are now pointers
20613 to the bucket giving the priority/associativity.
20614 Member `associativity' removed: useless.
20615 * src/reduce.c, src/conflicts.c: Adjust.
20616
8b3df748
AD
206172002-04-07 Akim Demaille <akim@epita.fr>
20618
20619 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
20620 Properly escape the symbols' TAG when outputting them.
20621
e601aa1d
AD
206222002-04-07 Akim Demaille <akim@epita.fr>
20623
20624 * src/lalr.h (LA): Is a bitsetv, not bitset*.
20625
b0299a2e
AD
206262002-04-07 Akim Demaille <akim@epita.fr>
20627
20628 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
20629 (LArule): this, which is an array to rule_t*.
20630 * src/print.c, src/conflicts.c: Adjust.
20631
d7e1f00c
AD
206322002-04-07 Akim Demaille <akim@epita.fr>
20633
20634 * src/gram.h (rule_t): Rename `number' as `user_number'.
20635 `number' is a new member.
20636 Adjust dependencies.
20637 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
20638
cc9305dd
AD
206392002-04-07 Akim Demaille <akim@epita.fr>
20640
20641 As a result of the previous patch, it is no longer needed
20642 to reorder ritem itself.
20643
20644 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
20645
b0940840
AD
206462002-04-07 Akim Demaille <akim@epita.fr>
20647
20648 Be sure never to walk through RITEMS, but use only data related to
20649 the rules themselves. RITEMS should be banished.
20650
20651 * src/output.c (output_token_translations): Rename as...
20652 (prepare_tokens): this.
20653 In addition to `translate', prepare the muscles `tname' and
20654 `toknum', which were handled by...
20655 (output_rule_data): this.
20656 Remove, and move the remainder of its outputs into...
20657 (prepare_rules): this new routines, which also merges content from
20658 (output_gram): this.
20659 (prepare_rules): Be sure never to walk through RITEMS.
20660 (output_stos): Rename as...
20661 (prepare_stos): this.
20662 (output): Always invoke prepare_states, after all, just don't use it
20663 in the output if you don't need it.
20664
643a5994
AD
206652002-04-07 Akim Demaille <akim@epita.fr>
20666
20667 * src/LR0.c (new_state): Display `nstates' as the name of the
20668 newly created state.
20669 Adjust to initialize first_state and last_state if needed.
20670 Be sure to distinguish the initial from the final state.
20671 (new_states): Create the itemset of the initial state, and use
20672 new_state.
20673 * src/closure.c (closure): Now that the initial state has its
20674 items properly set, there is no need for a special case when
20675 creating `ruleset'.
20676
20677 As a result, now the rule 0, reducing to $axiom, is visible in the
20678 outputs. Adjust the test suite.
20679
20680 * tests/conflicts.at (Solved SR Conflicts)
20681 (Unresolved SR Conflicts): Adjust.
20682 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
20683 * tests/conflicts.at (S/R in initial): New.
20684
b4c4ccc2
AD
206852002-04-07 Akim Demaille <akim@epita.fr>
20686
20687 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
20688 the RHS of the rules.
20689 * src/output.c (output_gram): Likewise.
20690
bba97eb2
AD
206912002-04-07 Akim Demaille <akim@epita.fr>
20692
20693 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
20694 bucket.
20695 Adjust all dependencies.
20696 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
20697 `number' of the buckets too.
20698 * src/gram.h: Include `symtab.h'.
20699 (associativity): Move to...
20700 * src/symtab.h: here.
20701 No longer include `gram.h'.
20702
c3b407f4
AD
207032002-04-07 Akim Demaille <akim@epita.fr>
20704
20705 * src/gram.h, src/gram.c (rules_rhs_length): New.
20706 (ritem_longest_rhs): Use it.
20707 * src/gram.h (rule_t): `number' is a new member.
20708 * src/reader.c (packgram): Set it.
20709 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
20710 the end of `rules', and count them out of `nrules'.
20711 (reduce_output, dump_grammar): Adjust.
20712 * src/print.c (print_grammar): It is no longer needed to check for
20713 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
20714 * tests/reduce.at (Reduced Automaton): New test.
20715
11652ab3
AD
207162002-04-07 Akim Demaille <akim@epita.fr>
20717
20718 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
20719 lacking `+ 1' to nrules, Bison reported as useless a token if it
20720 was used solely to set the precedence of the last rule...
20721
26b23c1a
AD
207222002-04-07 Akim Demaille <akim@epita.fr>
20723
20724 * data/bison.c++, data/bison.simple: Don't output the current file
20725 name in #line, to avoid useless diffs between two identical
20726 outputs under different names.
20727
18bcecb0
AD
207282002-04-07 Akim Demaille <akim@epita.fr>
20729
20730 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
20731 Normalize loops to using `< nrules + 1', not `<= nrules'.
20732
fa770c86
AD
207332002-04-07 Akim Demaille <akim@epita.fr>
20734
20735 * TODO: Update.
20736
d9b739c3
AD
207372002-04-07 Akim Demaille <akim@epita.fr>
20738
20739 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
20740 bucket.value as bucket.number.
20741
99013900
AD
207422002-04-07 Akim Demaille <akim@epita.fr>
20743
20744 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
20745 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
20746 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
20747 RHS, instead of being an index in RITEMS.
20748
e966383b
PE
207492002-04-04 Paul Eggert <eggert@twinsun.com>
20750
20751 * doc/bison.texinfo: Update copyright date.
20752 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
20753 (Symbols): Warn about running Bison in one character set,
20754 but compiling and/or running in an incompatible one.
20755 Warn about character code 256, too.
20756
207572002-04-03 Paul Eggert <eggert@twinsun.com>
20758
20759 * src/bison.data (YYSTACK_ALLOC): Depend on whether
20760 YYERROR_VERBOSE is nonzero, not whether it is defined.
20761
20762 Merge changes from bison-1_29-branch.
c307773e 20763
8d6c48b9
PE
207642002-03-20 Paul Eggert <eggert@twinsun.com>
20765
20766 Merge fixes from Debian bison_1.34-1.diff.
20767
20768 * configure.in (AC_PREREQ): 2.53.
20769
e53c6322
AD
207702002-03-20 Akim Demaille <akim@epita.fr>
20771
20772 * src/conflicts.c (log_resolution): Argument `resolution' is const.
20773
9ffbeca7
PE
207742002-03-19 Paul Eggert <eggert@twinsun.com>
20775
21db0b2a
PE
20776 * src/bison.simple (YYCOPY): New macro.
20777 (YYSTACK_RELOCATE): Use it.
20778 Remove Type arg; no longer needed. All callers changed.
20779 (yymemcpy): Remove; no longer needed.
20780
9ffbeca7
PE
20781 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
20782 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
20783
642cb8f8
AD
207842002-03-19 Akim Demaille <akim@epita.fr>
20785
20786 Test and fix the #line outputs.
20787
20788 * tests/atlocal.at (GCC): New.
20789 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 20790 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
20791 (Action synch line, Epilogue synch line): New tests.
20792 * src/reader.c (parse_union_decl): Define the muscle stype_line.
20793 * data/bison.simple, data/bison.c++: Use it.
20794
3c31a486
AD
207952002-03-19 Akim Demaille <akim@epita.fr>
20796
20797 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
20798 (Solved SR Conflicts, %expect not enough, %expect right)
20799 (%expect too much): Move to...
20800 * tests/conflicts.at: this new file.
20801
0d8bed56
AD
208022002-03-19 Akim Demaille <akim@epita.fr>
20803
20804 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
20805 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
20806 that we can move to enums for instance.
20807 * src/output.c (token_definitions_output): Output a list of
20808 `token-name, token-number' instead of the #define.
20809 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
20810
9208d17f
AD
208112002-03-14 Akim Demaille <akim@epita.fr>
20812
20813 Use Gettext 0.11.1.
20814
af27eacb
RA
208152002-03-09 Robert Anisko <robert@lrde.epita.fr>
20816
20817 * data/bison.c++: Make the user able to add members to the generated
20818 parser by subclassing.
20819
9101a310
RA
208202002-03-05 Robert Anisko <robert@lrde.epita.fr>
20821
20822 * src/reader.c (read_additionnal_code): `c' should be an integer, not
20823 a character.
20824 Reported by Nicolas Tisserand and Nicolas Burrus.
20825
fff9bf0b
RA
208262002-03-04 Robert Anisko <robert@lrde.epita.fr>
20827
20828 * src/reader.c: Warn about lacking semi-colons, do not complain.
20829
64dba31e
RA
208302002-03-04 Robert Anisko <robert@lrde.epita.fr>
20831
20832 * data/bison.c++: Remove a debug line.
20833
374f5a14
RA
208342002-03-04 Robert Anisko <robert@lrde.epita.fr>
20835
20836 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
20837 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
20838 provide a default implementation.
20839
bfcf1f3a
AD
208402002-03-04 Akim Demaille <akim@epita.fr>
20841
20842 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
20843 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
20844 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
20845 * tests/semantic.at (Parsing Guards): Similarly.
20846 * src/reader.at (readgram): Complain if the last rule is not ended
20847 with a semi-colon.
20848
65ccf9fc
AD
208492002-03-04 Akim Demaille <akim@epita.fr>
20850
20851 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
20852 * src/closure.c: here.
20853 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
20854 RTC.
20855 * src/warshall.h, src/warshall.c: Remove.
20856 * tests/sets.at (Broken Closure): Adjust.
20857
d0039cbc
AD
208582002-03-04 Akim Demaille <akim@epita.fr>
20859
20860 * src/output.c (output_skeleton): tempdir is const.
20861 bytes_read is unused.
20862
345cea78
AD
208632002-03-04 Akim Demaille <akim@epita.fr>
20864
20865 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20866 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
20867 Update.
20868 From Michael Hayes.
20869
564801f7
AD
208702002-03-04 Akim Demaille <akim@epita.fr>
20871
20872 * src/closure.c (closure): `r' is unused.
20873
e5352bc7
AD
208742002-03-04 Akim Demaille <akim@epita.fr>
20875
20876 * tests/sets.at (Broken Closure): Add the ending `;'.
20877 * src/reader.at (readgram): Complain if a rule is not ended with a
20878 semi-colon.
20879
914feea9
AD
208802002-03-04 Akim Demaille <akim@epita.fr>
20881
20882 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
20883 (count_sr_conflicts): Use bitset_count.
20884 * src/reduce.c (inaccessable_symbols): Ditto.
20885 (bits_size): Remove.
20886 * src/warshall.h, src/warshall.c: Convert to bitsetv.
20887
f0250de6
AD
208882002-03-04 Akim Demaille <akim@epita.fr>
20889
20890 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
20891 * src/reduce.c: Remove the `bitset_zero's following the
20892 `bitset_create's, as now it is performed by the latter.
20893
ef017502
AD
208942002-03-04 Akim Demaille <akim@epita.fr>
20895
20896 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
20897 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
20898 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
20899 latest sources from Michael.
20900
76514394
AD
209012002-03-04 Akim Demaille <akim@epita.fr>
20902
20903 * src/output.c (output): Don't free the grammar.
20904 * src/reader.c (grammar_free): New.
20905 * src/main.c (main): Call it and don't free symtab here.
20906
55024580
AD
209072002-03-04 Akim Demaille <akim@epita.fr>
20908
20909 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
20910 before returning.
20911 Reported by Benoit Perrot.
20912
f9abaa2c
AD
209132002-03-04 Akim Demaille <akim@epita.fr>
20914
20915 Use bitset operations when possible, not loops over bits.
20916
20917 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
20918 bitset_or.
20919 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
20920 * src/reduce.c (useless_nonterminals): Formatting changes.
20921 * src/warshall.c (TC): Use bitset_or.
20922
0e721e75
AD
209232002-03-04 Akim Demaille <akim@epita.fr>
20924
20925 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
20926 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
20927 Ditto.
20928
0fb1ffb1
AD
209292002-03-04 Akim Demaille <akim@epita.fr>
20930
20931 * src/lalr.c (F): Now a bitset*.
20932 Adjust all dependencies.
20933
b86796bf
AD
209342002-03-04 Akim Demaille <akim@epita.fr>
20935
20936 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
20937 Adjust all dependencies.
20938
602bbf31
AD
209392002-03-04 Akim Demaille <akim@epita.fr>
20940
20941 * src/L0.c, src/LR0.h (nstates): Be size_t.
20942 Adjust comparisons (signed vs unsigned).
20943 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
20944 bitset*.
20945 Adjust all dependencies.
20946
d8a0245c
AD
209472002-03-04 Akim Demaille <akim@epita.fr>
20948
20949 * src/closure.c (firsts): Now, also a bitset.
20950 Adjust all dependencies.
20951 (varsetsize): Remove, now unused.
20952 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
20953
34ba9743
AD
209542002-03-04 Akim Demaille <akim@epita.fr>
20955
20956 * src/print.c: Convert to use bitset.h, not hand coded iterations
20957 over ints.
20958
ed86e78c
AD
209592002-03-04 Akim Demaille <akim@epita.fr>
20960
20961 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
20962
dfdb1797
AD
209632002-03-04 Akim Demaille <akim@epita.fr>
20964
20965 * src/closure.c (ruleset): Be a bitset.
20966 (rulesetsize): Remove.
20967
7086e707
AD
209682002-03-04 Akim Demaille <akim@epita.fr>
20969
20970 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20971 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
20972 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
20973 * src/closure.c (fderives): Be an array of bitsets.
20974
98254360
RA
209752002-02-28 Robert Anisko <robert@lrde.epita.fr>
20976
20977 * data/bison.c++: Merge the two generated headers. Insert a copyright
20978 notice in each output file.
20979
a75c057f
AD
209802002-02-28 Akim Demaille <akim@epita.fr>
20981
20982 * data/bison.c++: Copy the prologue of bison.simple to fetch
20983 useful M4 definitions, such as b4_header_guard.
20984
06b00abc
AD
209852002-02-25 Akim Demaille <akim@epita.fr>
20986
20987 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
20988 translator friendly scheme for the bgr
20989 copyright notice.
06b00abc 20990
70e7d534
AD
209912002-02-25 Akim Demaille <akim@epita.fr>
20992
20993 * src/output.c (header_output): Remove, now handled completely via
20994 M4.
20995
abe017f6
AD
209962002-02-25 Akim Demaille <akim@epita.fr>
20997
20998 * m4/m4.m4: New, from CVS Autoconf.
20999 * configure.in: Invoke it.
21000 * src/output.c (output_skeleton): Use its result instead of the
21001 hard coded name.
21002
381fb12e
AD
210032002-02-25 Akim Demaille <akim@epita.fr>
21004
21005 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
21006 Fileutils 4.1.5.
21007 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
21008 * src/output.c (output_skeleton): Use mkstemp to create a real
21009 temporary file.
21010 Move the filling of `skeleton' and its muscle to...
21011 (prepare): here.
21012 (output): Move the definition of the prologue muscle to...
21013 (prepare): here.
21014 * src/system.h (DEFAULT_TMPDIR): New.
21015
6f38107f
PE
210162002-02-14 Paul Eggert <eggert@twinsun.com>
21017
21018 Remove the support for C++ namespace cleanliness; it was
21019 causing more problems than it was curing, since it didn't work
21020 properly on some nonstandard C++ compilers. This can wait
21021 for a proper C++ parser.
21022
21023 * NEWS: Document this.
21024 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
21025 of C++, as it's treated like C now.
21026 * src/bison.simple (YYSTD): Remove.
21027 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
21028 Treat C++ just like Standard C instead of trying to support
21029 namespace cleanliness.
21030
80cce3da
AD
210312002-02-14 Akim Demaille <akim@epita.fr>
21032
21033 * tests/regression.at (else): Adjust to Andreas' change.
21034
842e8679
AD
210352002-02-14 Akim Demaille <akim@epita.fr>
21036
21037 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
21038
4bda3f10
AD
210392002-02-13 Andreas Schwab <schwab@suse.de>
21040
21041 * src/output.c (output_rule_data): Don't output NULL, it might
21042 not be defined yet.
21043
4162fa07 210442002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 21045
4162fa07
RA
21046 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
21047 (Copyright notice): Update.
b418ecd8 21048
bd16a5dc
AD
210492002-02-11 Akim Demaille <akim@epita.fr>
21050
21051 * tests/regression.at (%nonassoc and eof): Don't include
21052 nonportable headers.
21053
8d69a1a3
RA
210542002-02-08 Robert Anisko <robert@lrde.epita.fr>
21055
21056 * data/bison.c++: Correct error recovery. Make the user able to
21057 initialize the starting location.
21058
9b2d0677
AD
210592002-02-07 Akim Demaille <akim@epita.fr>
21060
21061 * tests/input.at: New.
21062
69e2658b
RA
210632002-02-07 Robert Anisko <robert@lrde.epita.fr>
21064
21065 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 21066 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
21067 directives around tables only needed for debugging.
21068
4aacc3a7
RA
210692002-02-07 Robert Anisko <robert@lrde.epita.fr>
21070
21071 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
21072 C++ parsers.
21073 (yy::b4_name::parse): Use print_.
21074
762a801e
RA
210752002-02-07 Robert Anisko <robert@lrde.epita.fr>
21076
21077 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
21078
4bb2bc3f
RA
210792002-02-07 Robert Anisko <robert@lrde.epita.fr>
21080
21081 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
21082 C++ parsers.
21083 (yy::b4_name::parse): Build verbose error messages, and use error_.
21084
6b45a3ca
RA
210852002-02-06 Robert Anisko <robert@lrde.epita.fr>
21086
21087 * data/bison.c++: Fix m4 quoting in comments.
21088
50997c6e
RA
210892002-02-06 Robert Anisko <robert@lrde.epita.fr>
21090
21091 * data/bison.c++: Adjust the parser code. Fix some muscles that were
21092 not expanded by m4.
21093
3f3eed27
AD
210942002-02-05 Akim Demaille <akim@epita.fr>
21095
21096 * data/bison.c++: Adjust to the M4 back end.
21097 More is certainly needed.
21098
be2a1a68
AD
210992002-02-05 Akim Demaille <akim@epita.fr>
21100
21101 Give a try to M4 as a back end.
21102
21103 * lib/readpipe.c: New, from wdiff.
21104 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
21105 BISON_HAIRY.
21106 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
21107 specific values. Now it is m4 that performs the lookup.
21108 * src/parse-skel.y: Remove.
21109 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
21110 * src/output.c (actions_output, guards_output)
21111 (token_definitions_output): No longer keeps track of the output
21112 line number, hence remove the second argument.
21113 (guards_output): Check against the guard member of a rule, not the
21114 action member.
21115 Adjust callers.
21116 (output_skeleton): Don't look for the skeleton location, let m4 do
21117 that.
21118 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
21119 file will be used.
21120 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
21121 (prepare): Given that for the time being changesyntax is not
21122 usable in M4, rename the muscles using `-' to `_'.
21123 Define `defines_flag', `output_parser_name' and `output_header_name'.
21124 * src/output.h (actions_output, guards_output)
21125 (token_definitions_output): Adjust prototypes.
21126 * src/scan-skel.l: Instead of scanning the skeletons, it now
21127 processes the output of m4: `__oline__' and `#output'.
21128 * data/bison.simple: Adjust to be used by M4(sugar).
21129 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
21130 to date.
21131 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
21132 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
21133 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
21134 shamelessly stolen from CVS Autoconf.
21135
beda758b
AD
211362002-02-05 Akim Demaille <akim@epita.fr>
21137
21138 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
21139 * configure.in: Check for the declarations of free and malloc.
21140 * src/muscle_tab.c: Adjust.
21141
5ece6d43
AD
211422002-02-05 Akim Demaille <akim@epita.fr>
21143
21144 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
21145 which have no values.
21146
5bb18f9a
AD
211472002-02-05 Akim Demaille <akim@epita.fr>
21148
21149 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
21150 * data/: here.
21151
894dd62e
PE
211522002-01-29 Paul Eggert <eggert@twinsun.com>
21153
21154 * src/bison.simple (YYSIZE_T): Do not define merely because
21155 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
21156 On some platforms, <alloca.h> does not declare YYSTD (size_t).
21157
82841af7
AD
211582002-01-27 Akim Demaille <akim@epita.fr>
21159
21160 Fix `%nonassoc and eof'.
21161
21162 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
21163 which were not properly copied! Replace
21164 memcpy (res->errs, src->errs, src->nerrs);
21165 with
21166 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
21167 !!!
21168 * tests/regression.at (%nonassoc and eof): Adjust to newest
21169 Autotest: `.' is not in the PATH.
21170
318b76e9
AD
211712002-01-27 Akim Demaille <akim@epita.fr>
21172
21173 * tests/sets.at (AT_EXTRACT_SETS): New.
21174 (Nullable): Use it.
21175 (Firsts): New.
21176
30d2f3d5
AD
211772002-01-26 Akim Demaille <akim@epita.fr>
21178
21179 * tests/actions.at, tests/calc.at, tests/headers.at,
21180 * tests/torture.at: Adjust to the newest Autotest which no longer
21181 forces `.' in the PATH.
21182
30f8c395
AD
211832002-01-25 Akim Demaille <akim@epita.fr>
21184
21185 * tests/regression.at (%nonassoc and eof): New.
21186 Suggested by Robert Anisko.
21187
29ae55f1
AD
211882002-01-24 Akim Demaille <akim@epita.fr>
21189
21190 Bison dumps core when trying to complain about broken input files.
21191 Reported by Cris van Pelt.
21192
21193 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
21194 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
21195 into...
21196 (Invalid inputs): Strengthen: exercise parse_percent_token.
21197
2b548aa6
RA
211982002-01-24 Robert Anisko <robert.anisko@epita.fr>
21199
21200 * src/Makefile.am: Add bison.c++.
21201 * src/bison.c++: New skeleton.
21202
bb0146c2
AD
212032002-01-21 Paolo Bonzini <bonzini@gnu.org>
21204
21205 * po/it.po: New.
21206
bec30531
AD
212072002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
21208
21209 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
21210
fc6edc45
MA
212112002-01-20 Marc Autret <marc@gnu.org>
21212
21213 * src/files.c (compute_output_file_names): Fix
21214
5e5d5415
MA
212152002-01-20 Marc Autret <marc@gnu.org>
21216
21217 * tests/output.at: New test.
21218 * src/files.c (compute_base_names): Don't map extensions when
21219 the YACC flag is set, use defaults.
21220 Reported by Evgeny Stambulchik.
21221
44ea3fbd
MA
212222002-01-20 Marc Autret <marc@gnu.org>
21223
ba0fe3c7
PE
21224 * src/system.h: Need to define __attribute__ away for non-GCC
21225 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
21226 Suggested by Albert Chin-A-Young.
21227
338963d1
TVH
212282002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
21229
21230 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
21231 canonical definition.
21232 * src/system.h: Use the canonical definition for PARAMS (avoids
21233 a conflict with the macro from lib/hash.h).
21234
c57b2479
AD
212352002-01-11 Akim Demaille <akim@epita.fr>
21236
21237 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 21238 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 21239
b85810ae
AD
212402002-01-09 Akim Demaille <akim@epita.fr>
21241
21242 * src/files.c, src/files.h (output_infix): New.
21243 (tab_extension): Remove.
21244 (compute_base_names): Compute the former, drop the latter.
21245 * src/output.c (prepare): Insert the muscles `output-infix', and
21246 `output-suffix'.
21247 * src/parse-skel.y (string, string.1): New.
21248 (section.header): Use it.
21249 (section.yacc): Remove.
21250 (prefix): Remove too.
21251 * src/scan-skel.l: Adjust.
21252 * src/bison.simple, src/bison.hairy: Adjust.
21253
cae60122
AD
212542002-01-09 Akim Demaille <akim@epita.fr>
21255
21256 * configure.in (WERROR_CFLAGS): Compute it.
21257 * src/Makefile.am (CFLAGS): Pass it.
21258 * tests/atlocal.in (CFLAGS): Idem.
21259 * src/files.c: Fix a few warnings.
21260 (get_extension_index): Remove, unused.
21261
ae404801
AD
212622002-01-08 Akim Demaille <akim@epita.fr>
21263
21264 * src/getargs.c (AS_FILE_NAME): New.
21265 (getargs): Use it to convert DOSish file names.
21266 * src/files.c (base_name): Rename as full_base_name to avoid
21267 clashes with `base_name ()'.
21268 (filename_split): New.
21269 (compute_base_names): N-th rewrite, using filename_split.
21270
22312b71
AD
212712002-01-08 Akim Demaille <akim@epita.fr>
21272
21273 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
21274 New, stolen from the Fileutils 4.1.
21275 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
21276 * configure.in: Check for the presence of memrchr, and of its
21277 prototype.
21278
a67cef01
TVH
212792002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
21280
21281 * lib/hash.h (__P): Added definition for this macro.
21282 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
21283 BUILT_SOURCES, to ensure they are generated first.
21284 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
21285 %error-verbose to allow bootstrapping with bison 1.30x.
21286
2b25d624
AD
212872002-01-06 Akim Demaille <akim@epita.fr>
21288
21289 * src/reader.c (parse_braces): Don't fetch the next char, the
21290 convention is to fetch on entry.
21291 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
21292 'switch' without a following semicolon.
21293 * tests/regression.at (braces parsing): New.
21294
3460813b
AD
212952002-01-06 Akim Demaille <akim@epita.fr>
21296
21297 Bison is dead wrong in its RR conflict reports.
21298
21299 * tests/torture.at (GNU Cim Grammar): New.
21300 * src/conflicts.c (count_rr_conflicts): Fix.
21301
73784c64
AD
213022002-01-06 Akim Demaille <akim@epita.fr>
21303
21304 Creating package.m4 from configure.ac causes too many problems.
21305
21306 * tests/Makefile.am (package.m4): Create it by hand,
21307 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
21308
25d81090
AD
213092002-01-06 Akim Demaille <akim@epita.fr>
21310
21311 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
21312 skeleton.h.
21313
a9b8959e
PE
213142002-01-04 Paul Eggert <eggert@twinsun.com>
21315
21316 * doc/bison.texinfo (Debugging):
21317 Remove YYSTDERR; it's no longer defined or used.
21318 Also, s/cstdio.h/cstdio/.
21319
25d81090
AD
213202002-01-03 Akim Demaille <akim@epita.fr>
21321
21322 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
21323
1109455c
AD
213242002-01-03 Akim Demaille <akim@epita.fr>
21325
21326 * src/parse-skel.y (process_skeleton): Don't bind the parser's
21327 tracing code to --trace, wait for a better --trace option, with
21328 args.
21329
7ea5e977
AD
213302002-01-03 Akim Demaille <akim@epita.fr>
21331
21332 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
21333 The ISO C++ standard is extremely clear about it: stderr is
21334 considered a macro, not a regular symbol (see table 94 `Header
21335 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
21336 Therefore std:: does not apply to it. It still does with fprintf.
21337 Also, s/cstdio.h/cstdio/.
21338
fab5b110
AD
213392002-01-03 Akim Demaille <akim@epita.fr>
21340
21341 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
21342 for non system headers.
21343
aed7fd9b
AD
213442002-01-02 Akim Demaille <akim@epita.fr>
21345
21346 Equip the skeleton chain with location tracking, runtime trace,
21347 pure parser and scanner.
21348
21349 * src/parse-skel.y: Request a pure parser, locations, and prefix
21350 renaming.
21351 (%union): Having several members with the same type does not help
21352 type mismatches, simplify.
21353 (YYPRINT, yyprint): New.
21354 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
21355 (skel_error): this.
21356 Handle locations.
21357 * src/scan-skel.l: Adjust to these changes.
21358 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
21359 (LOCATION_PRINT, skel_control_t): New.
21360
24fad99e
AD
213612001-12-30 Akim Demaille <akim@epita.fr>
21362
21363 * src/parse-skel.y: Get rid of the shift/reduce conflict:
21364 replace `gb' with BLANKS.
21365 * src/scan-skel.l: Adjust.
21366
a4b36db4
AD
213672001-12-30 Akim Demaille <akim@epita.fr>
21368
21369 * src/system.h: We don't need nor want bcopy.
21370 Throw away MS-DOS crap: we don't need getpid.
21371 * configure.in: We don't need strndup. It was even causing
21372 problems: because Flex includes the headers *before* us,
21373 _GNU_SOURCE is not defined by config.h, and therefore strndup was
21374 not visible.
21375 * lib/xstrndup.c: New.
21376 * src/scan-skel.l: Use it.
21377 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
21378 * src/parse-skel.y: Use %directives instead of #defines.
21379
1239777d
AD
213802001-12-30 Akim Demaille <akim@epita.fr>
21381
21382 * src/skeleton.h: New.
21383 * src/output.c (output_parser, output_master_parser): Remove, dead
21384 code.
21385 * src/output.h (get_lines_number, actions_output, guards_output)
21386 (token_definitions_output): Prototype them.
21387 * src/parse-skel.y: Add the license notice.
21388 Include output.h and skeleton.h.
21389 (process_skeleton): Returns void, and takes a single parameter.
21390 * src/scan-skel.l: Add the license notice.
21391 Include skeleton.h.
21392 Don't use %option yylineno: it seems that then Flex imagines
21393 REJECT has been used, and therefore it won't reallocate its
21394 buffers (which makes no other sense to me than a bug). It results
21395 in warnings for `unused: yy_flex_realloc'.
21396
9b3add5b
RA
213972001-12-30 Robert Anisko <robert.anisko@epita.fr>
21398
21399 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
21400 (MUSCLE_INSERT_PREFIX): ...to there.
21401 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
21402 (MUSCLE_INSERT_PREFIX): Move from here...
21403
21404 * src/bison.hairy: Add a section directive. Put braces around muscle
21405 names. This parser skeleton is still broken, but Bison should not
21406 choke on a bad muscle 'syntax'.
21407 * src/bison.simple: Add a section directive. Put braces around muscle
21408 names.
21409
21410 * src/files.h (strsuffix, stringappend): Add declarations.
21411 (tab_extension): Add declaration.
21412 (short_base_name): Add declaration.
21413
21414 * src/files.c (strsuffix, stringappend): No longer static. These
21415 functions are used in the skeleton parser.
21416 (tab_extension): New.
21417 (compute_base_names): Use the computations done in this function
fab5b110 21418 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
21419 names.
21420 (short_base_name): No longer static.
21421
21422 * src/output.c (output_skeleton): New.
21423 (output): Disable call to output_master_parser, and give a try to
21424 a new skeleton handling system.
21425 (guards_output, actions_output): No longer static.
21426 (token_definitions_output, get_lines_number): No longer static.
21427
21428 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
21429
fab5b110 21430 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
21431 parse-skel.y.
21432
21433 * src/parse-skel.y: New file.
21434 * src/scan-skel.l: New file.
21435
b5b61c61
AD
214362001-12-29 Akim Demaille <akim@epita.fr>
21437
21438 %name-prefix is broken.
21439
21440 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
21441 Adjust all dependencies.
21442 * tests/headers.at (export YYLTYPE): Strengthen this test: use
21443 %name-prefix.
21444
21445 Renaming yylval but not yylloc is not consistent. Now we do.
21446
21447 * src/bison.simple: Prefix yylloc if used.
21448 * doc/bison.texinfo (Decl Summary): Document that.
21449
8c9a50be
AD
214502001-12-29 Akim Demaille <akim@epita.fr>
21451
21452 * doc/bison.texinfo: Promote `%long-directive' over
21453 `%long_directive'.
21454 Remove all references to fixed-output-files, yacc is enough.
21455
d99361e6
AD
214562001-12-29 Akim Demaille <akim@epita.fr>
21457
21458 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
21459 user prologue. These are defaults.
21460 * tests/actions.at (Mid-rule actions): Make sure the user can
21461 define YYDEBUG and YYERROR_VERBOSE.
21462
b9cecb91
AD
214632001-12-29 Akim Demaille <akim@epita.fr>
21464
21465 * src/output.c (header_output): Don't forget to export YYLTYPE and
21466 yylloc.
21467 * tests/headers.at (export YYLTYPE): New, make sure it does.
21468 * tests/regression.at (%union and --defines, Invalid CPP headers):
21469 Move to...
21470 * tests/headers.at: here.
21471
aea13e97
AD
214722001-12-29 Akim Demaille <akim@epita.fr>
21473
21474 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
21475
931394cb
AD
214762001-12-29 Akim Demaille <akim@epita.fr>
21477
21478 * tests/actions.at (Mid-rule actions): Output on a single line
21479 instead of several.
21480
704a47c4
AD
214812001-12-29 Akim Demaille <akim@epita.fr>
21482
21483 * doc/bison.texinfo: Formatting changes.
21484
091e20bb
AD
214852001-12-29 Akim Demaille <akim@epita.fr>
21486
21487 Don't store the token defs in a muscle, just be ready to output it
21488 on command. Now possible via `symbols'. Fixes a memory leak.
21489
21490 * src/output.c (token_definitions_output): New.
21491 (output_parser, header_output): Use it.
21492 * src/reader.c (symbols_save): Remove.
21493
cce71710
AD
214942001-12-29 Akim Demaille <akim@epita.fr>
21495
21496 * src/bison.simple: Do not provide a default for YYSTYPE and
21497 YYLTYPE before the user's prologue. Otherwise it's hardly... a
21498 default.
21499
82c035a8
AD
215002001-12-29 Akim Demaille <akim@epita.fr>
21501
21502 Mid-rule actions are simply... ignored!
21503
21504 * src/reader.c (readgram): Be sure to attach mid-rule actions to
21505 the empty-rule associated to the dummy symbol, not to the host
21506 rule.
21507 * tests/actions.at (Mid-rule actions): New.
21508
8419d367
AD
215092001-12-29 Akim Demaille <akim@epita.fr>
21510
21511 Memory leak.
21512
21513 * src/reader.c (reader): Free grammar.
21514
375d5806
AD
215152001-12-29 Akim Demaille <akim@epita.fr>
21516
21517 Memory leak.
21518
21519 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
21520 since it allocates it for each state, although only one is needed.
21521 (allocate_storage): Do it here.
21522
f51cb8ff
AD
215232001-12-29 Akim Demaille <akim@epita.fr>
21524
21525 * src/options.h, src/options.c (create_long_option_table): Rename
21526 as...
21527 (long_option_table_new): this, with a clearer prototype.
21528 (percent_table): Remove, unused,
21529 * src/getargs.c (getargs): Adjust.
21530
29e88316
AD
215312001-12-29 Akim Demaille <akim@epita.fr>
21532
21533 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
21534 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
21535 as states.
21536
b9f71f19
AD
215372001-12-29 Akim Demaille <akim@epita.fr>
21538
21539 * src/lalr.c (build_relations): Rename `states' as `states1'.
21540 Sorry, I don't understand exactly what it is, no better name...
21541
1a2b5d37
AD
215422001-12-29 Akim Demaille <akim@epita.fr>
21543
21544 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
21545 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
21546 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
21547 as rules.
21548
1cca533e
AD
215492001-12-29 Akim Demaille <akim@epita.fr>
21550
21551 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
21552 ago.
21553
c03ae966
AD
215542001-12-29 Akim Demaille <akim@epita.fr>
21555
21556 * src/reader.c, src/reader.h (user_toknums): Remove.
21557 Adjust all users to use symbols[i]->user_token_number.
21558
5a670b1e
AD
215592001-12-29 Akim Demaille <akim@epita.fr>
21560
21561 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
21562 Adjust all users to use symbols[i]->prec or ->assoc.
21563
ad949da9
AD
215642001-12-29 Akim Demaille <akim@epita.fr>
21565
21566 * src/reader.c, src/reader.h (tags): Remove.
21567 Adjust all users to use symbols[i]->tag.
21568
0e78e603
AD
215692001-12-29 Akim Demaille <akim@epita.fr>
21570
21571 * src/gram.h, src/gram.c (symbols): New, similar to state_table
21572 and rule_table.
21573 * src/reader.c (packsymbols): Fill this table.
21574 Drop sprec.
21575 * src/conflicts.c (resolve_sr_conflict): Adjust.
21576 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
21577 single table.
21578 Use symbols[i]->tag instead of tags[i].
21579
213e640e
AD
215802001-12-29 Akim Demaille <akim@epita.fr>
21581
21582 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
21583 In addition, put a comment in there, to replace...
21584 * tests/regression.at (%union and C comments): Remove.
21585
e7b8bef1
AD
215862001-12-29 Akim Demaille <akim@epita.fr>
21587
21588 * tests/regression.at (Web2c Actions): Blindly move the actual
21589 output as expected output. The contents *seem* right to me, but I
21590 can't pretend reading perfectly parser tables... Nonetheless, all
21591 the other tests pass correctly, the table look OK, even though the
21592 presence of `$axiom' is to be noted: AFAICS it is useless (but
21593 harmless).
21594
b68e7744
AD
215952001-12-29 Akim Demaille <akim@epita.fr>
21596
21597 * src/reader.c (readgram): Don't add the rule 0 if there were no
21598 rules read. In other words, add it _after_ having performed
21599 grammar sanity checks.
21600 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
21601
78d5bae9
AD
216022001-12-29 Akim Demaille <akim@epita.fr>
21603
21604 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
21605 visible, and some states have now a different number.
21606
ff442794
AD
216072001-12-29 Akim Demaille <akim@epita.fr>
21608
21609 * src/reader.c (readgram): Bind the initial rule's lineno to that
21610 of the first rule.
21611 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
21612 (Solved SR Conflicts): Adjust rule 0's line number.
21613
610ab194
AD
216142001-12-29 Akim Demaille <akim@epita.fr>
21615
21616 Fix the `GAWK Grammar' failure.
21617
21618 * src/LR0.c (final_state): Initialize to -1 so that we do compute
21619 the reductions of the first state which was mistakenly confused
21620 with the final state because precisely final_state was initialized
21621 to 0.
21622 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
21623 now noticed by Bison.
21624 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
21625 have a reduction on $default.
21626
29d29c8f
AD
216272001-12-29 Akim Demaille <akim@epita.fr>
21628
21629 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
21630 rule line numbers.
21631 * src/closure.c (print_closure): Likewise.
21632 * src/derives.c (print_derives): Likewise.
21633 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
21634 now.
21635
7c6b64d0
AD
216362001-12-29 Akim Demaille <akim@epita.fr>
21637
21638 * src/lalr.c (lookaheads_print): New.
21639 (lalr): Call it when --trace-flag.
21640 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
21641 are dumped.
21642
3d4daee3
AD
216432001-12-29 Akim Demaille <akim@epita.fr>
21644
21645 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
21646 when walking through ritem, even via rule->rhs.
21647 * src/reduce.c (dump_grammar, useful_production, reduce_output)
21648 (useful_production, useless_nonterminals): Likewise.
21649 (reduce_grammar_tables): Likewise, plus update nritems.
21650 * src/nullable.c (set_nullable): Likewise.
21651 * src/lalr.c (build_relations): Likewise.
21652 * tests/sets.at (Nullable): Adjust.
21653 Fortunately, now, the $axiom is no longer nullable.
21654
9e7f6bbd
AD
216552001-12-29 Akim Demaille <akim@epita.fr>
21656
21657 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
21658 the 0-sentinel.
21659 * src/gram.c (ritem_longest_rhs): Likewise.
21660 * src/reduce.c (nonterminals_reduce): Likewise.
21661 * src/print_graph.c (print_graph): Likewise.
21662 * src/output.c (output_rule_data): Likewise.
21663 * src/nullable.c (set_nullable): Likewise.
21664
255ef638
AD
216652001-12-29 Akim Demaille <akim@epita.fr>
21666
21667 * src/output.c: Comment changes.
21668
0d8a7363
AD
216692001-12-27 Paul Eggert <eggert@twinsun.com>
21670
21671 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
21672 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
21673 Sparc, as they were causing more porting problems than the
21674 (minor) performance improvement was worth.
21675
21676 Also, catch up with 1.31's YYSTD.
21677
3db472b9
AD
216782001-12-27 Akim Demaille <akim@epita.fr>
21679
21680 * src/output.c (output_gram): Rely on nritems, not the
21681 0-sentinel. See below.
21682 Use -1 as separator, not 0.
21683 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
21684 Rely on -1 as separator in yyrhs, instead of 0.
21685 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
21686 twice `Now at end of input', therefore there are two lines less to
21687 expect.
21688
b365aa05
AD
216892001-12-27 Akim Demaille <akim@epita.fr>
21690
21691 * tests/regression.at (Unresolved SR Conflicts):
21692 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
21693 below.
21694
30171f79
AD
216952001-12-27 Akim Demaille <akim@epita.fr>
21696
21697 * src/LR0.c (new_state): Recognize the final state by the fact it
21698 is reached by eoftoken.
21699 (insert_start_shifting_state, insert_eof_shifting_state)
21700 (insert_accepting_state, augment_automaton): Remove, since now
21701 these states are automatically computed from the initial state.
21702 (generate_states): Adjust.
21703 * src/print.c: When reporting a rule number to the user, substract
21704 1, so that the axiom rule is rule 0, and the first user rule is 1.
21705 * src/reduce.c: Likewise.
21706 * src/print_graph.c (print_core): For the time being, just as for
21707 the report, depend upon --trace-flags to dump the full set of
21708 items.
21709 * src/reader.c (readgram): Once the grammar read, insert the rule
21710 0: `$axiom: START-SYMBOL $'.
21711 * tests/set.at: Adjust: rule 0 is now displayed, and since the
21712 number of the states has changed (the final state is no longer
21713 necessarily the last), catch up.
21714
75142d45
AD
217152001-12-27 Akim Demaille <akim@epita.fr>
21716
21717 Try to make the use of the eoftoken valid. Given that its value
21718 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
21719 is used instead of > 0 where appropriate, (ii), depend upon nritems
21720 instead of the 0-sentinel.
21721
21722 * src/gram.h, src/gram.c (nritems): New.
21723 Expected to be duplication of nitems, but for the time being...
21724 * src/reader.c (packgram): Assert nritems and nitems are equal.
21725 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
21726 * src/closure.c (print_closure, print_fderives): Likewise.
21727 * src/gram.c (ritem_print): Likewise.
21728 * src/print.c (print_core, print_grammar): Likewise.
21729 * src/print_graph.c: Likewise.
21730
b7c49edf
AD
217312001-12-27 Akim Demaille <akim@epita.fr>
21732
21733 * src/main.c (main): If there are complains after grammar
21734 reductions, then output the report anyway if requested, then die.
21735 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
21736 * src/reader.c (eoftoken): New.
21737 (parse_token_decl): If the token being defined has value `0', it
21738 is the eoftoken.
21739 (packsymbols): No longer hack `tags' to insert `$' by hand.
21740 Be sure to preserve the value of the eoftoken.
21741 (reader): Make sure eoftoken is defined.
21742 Initialize nsyms to 0: now eoftoken is created just like the others.
21743 * src/print.c (print_grammar): Don't special case the eof token.
21744 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
21745 lie anyway, albeit pleasant.
21746 * tests/calc.at: Exercise error messages with eoftoken.
21747 Change the grammar so that empty input is invalid.
21748 Adjust expectations.
21749 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
21750
ec2da99f
AD
217512001-12-27 Akim Demaille <akim@epita.fr>
21752
21753 * configure.in: Check the protos of strchr ans strspn.
21754 Replace strchr if needed.
21755 * src/system.h: Provide the protos of strchr, strspn and memchr if
21756 missing.
21757 * lib/strchr.c: New.
21758 * src/reader.c (symbols_save): Use strchr.
21759
8adfa272
AD
217602001-12-27 Akim Demaille <akim@epita.fr>
21761
21762 * src/print.c, src/print_graph.c (escape): New.
21763 Use it to quote the TAGS outputs.
21764 * src/print_graph.c (print_state): Now errors are in red, and
21765 reductions in green.
21766 Prefer high to wide: output the state number on a line of its own.
21767
80dac38c
AD
217682001-12-27 Akim Demaille <akim@epita.fr>
21769
21770 * src/state.h, src/state.c (reductions_new): New.
21771 * src/LR0.c (set_state_table): Let all the states have a
21772 `reductions', even if reduced to 0.
21773 (save_reductions): Adjust.
21774 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
21775 * src/print.c (print_reductions, print_actions): Adjust.
21776 * src/output.c (action_row): Adjust.
21777
2cec70b9
AD
217782001-12-27 Akim Demaille <akim@epita.fr>
21779
21780 * src/state.h, src/state.c (errs_new, errs_dup): New.
21781 * src/LR0.c (set_state_table): Let all the states have an errs,
21782 even if reduced to 0.
21783 * src/print.c (print_errs, print_reductions): Adjust.
21784 * src/output.c (output_actions, action_row): Adjust.
21785 * src/conflicts.c (resolve_sr_conflict): Adjust.
21786
13ca549a
AD
217872001-12-27 Akim Demaille <akim@epita.fr>
21788
21789 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
21790
5092aba5
AD
217912001-12-27 Akim Demaille <akim@epita.fr>
21792
21793 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
21794 * src/print.c: here.
21795 (lookaheadset, shiftset): New, used as additional storage by
21796 print_reductions.
21797 (print_results): Adjust.
21798 (print_shifts, print_gotos, print_errs): New, extracted from...
21799 (print_actions): here.
21800 * src/print_graph.c (print_actions): Remove dead code.
21801
11e2beca
AD
218022001-12-27 Akim Demaille <akim@epita.fr>
21803
21804 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
21805 `$n' and `@n'.
21806
dac3c910
AD
218072001-12-27 Akim Demaille <akim@epita.fr>
21808
21809 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
21810 (build_relations): Adjust.
21811
d0b0fefa
AD
218122001-12-27 Akim Demaille <akim@epita.fr>
21813
21814 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
21815 duplication.
21816
adc8c848
AD
218172001-12-27 Akim Demaille <akim@epita.fr>
21818
21819 * src/reader.c (packgram): Catch nitems overflows.
21820
14d293ac
AD
218212001-12-27 Akim Demaille <akim@epita.fr>
21822
21823 * src/files.c, src/files.h (guard_obstack): Remove.
21824 * src/output.c (output): Adjust.
21825 * src/reader.c (parse_braces): New, factoring...
21826 (copy_action, copy_guard): these two which are renamed as...
21827 (parse_action, parse_guard): these.
21828 As a voluntary consequence, using braces around guards is now
21829 mandatory.
21830
f499b062
AD
218312001-12-27 Akim Demaille <akim@epita.fr>
21832
21833 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
21834 * src/reader.c (symbol_list): `guard' and `guard_line' are new
21835 members.
21836 (symbol_list_new): Adjust.
21837 (copy_action): action_line is the first line, not the last.
21838 (copy_guard): Just as for actions, store the `action' only, not
21839 the switch/case/break flesh.
21840 Don't parse the user action that might follow the guard, let...
21841 (readgram): do it, i.e., now, there can be an action after a
21842 guard.
21843 In other words the guard is just explicitly optional.
21844 (packgram): Adjust.
21845 * src/output.c (guards_output): New.
21846 (output_parser): Call it when needed.
21847 (output): Also free the guard and attrs obstacks.
21848 * src/files.c, src/files.h (obstack_save): Remove.
21849 (output_files): Remove.
21850 As a result, if one needs the former `.act' file, using an
21851 appropriate skeleton which requires actions and guards is now
21852 required.
21853 * src/main.c (main): Adjust.
21854 * tests/semantic.at: New.
21855 * tests/regression.at: Use `input.y' as input file name.
21856 Avoid 8+3 problems by requiring input.c when the test needs the
21857 parser.
21858
d945f5cd
AD
218592001-12-27 Akim Demaille <akim@epita.fr>
21860
21861 * src/reader.c (symbol_list_new): Be sure to initialize all the
21862 fields.
21863
d200e455
AD
218642001-12-27 Akim Demaille <akim@epita.fr>
21865
21866 All the hacks using a final pseudo state are now useless.
21867
21868 * src/LR0.c (set_state_table): state_table holds exactly nstates.
21869 * src/lalr.c (nLA): New.
21870 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
21871 instead of lookaheadsp from the pseudo state (nstate + 1).
21872
f9507c28
AD
218732001-12-27 Akim Demaille <akim@epita.fr>
21874
21875 * src/output.c (action_row, token_actions): Use a state_t instead
21876 of a integer, and nlookaheads instead of the following state's
21877 lookaheadsp.
21878
065fbd27
AD
218792001-12-27 Akim Demaille <akim@epita.fr>
21880
21881 * src/conflicts.c (log_resolution, flush_shift)
21882 (resolve_sr_conflict, set_conflicts, solve_conflicts)
21883 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
21884 (conflicts_print, print_reductions): Use a state_t instead of an
21885 integer when referring to a state.
21886 As much as possible, depend upon nlookaheads, instead of the
21887 `lookaheadsp' member of the following state (since lookaheads of
21888 successive states are successive, the difference between state n + 1
21889 and n served as the number of lookaheads for state n).
21890 * src/lalr.c (add_lookback_edge): Likewise.
21891 * src/print.c (print_core, print_actions, print_state)
21892 (print_results): Likewise.
21893 * src/print_graph.c (print_core, print_actions, print_state)
21894 (print_graph): Likewise.
21895 * src/conflicts.h: Adjust.
21896
1b177bd7
AD
218972001-12-27 Akim Demaille <akim@epita.fr>
21898
21899 * src/bison.hairy: Formatting/comment changes.
21900 ANSIfy.
21901 Remove `register' indications.
21902 Add plenty of `static'.
21903
7742ddeb
AD
219042001-12-27 Akim Demaille <akim@epita.fr>
21905
21906 * src/output.c (prepare): Drop the muscle `ntbase' which
21907 duplicates ntokens.
21908 * src/bison.simple: Formatting/comment changes.
21909 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
21910 is an undocumented synonym.
21911
1fa14068
AD
219122001-12-22 Akim Demaille <akim@epita.fr>
21913
21914 * src/output.c (output_table_data): Change the prototype to use
21915 `int' for array ranges: some invocations do pass an int, not a
21916 short.
21917 Reported by Wayne Green.
21918
b9752825
AD
219192001-12-22 Akim Demaille <akim@epita.fr>
21920
21921 Some actions of web2c.y are improperly triggered.
21922 Reported by Mike Castle.
21923
21924 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
21925 * tests/regression.at (Web2c): Rename as...
21926 (Web2c Report): this.
21927 (Web2c Actions): New.
21928
776209d6
AD
219292001-12-22 Akim Demaille <akim@epita.fr>
21930
21931 Reductions in web2c.y are improperly reported.
21932 Reported by Mike Castle.
21933
21934 * src/conflicts.c (print_reductions): Fix.
21935 * tests/regression.at (Web2c): New.
21936
275fc3ad
AD
219372001-12-18 Akim Demaille <akim@epita.fr>
21938
21939 Some host fail on `assert (!"foo")', which expands to
21940 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
21941 Reported by Nelson Beebee.
21942
21943 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
21944 `#define it_succeeded 0' and `assert (it_succeeded)'.
21945
897668ee
MA
219462001-12-17 Marc Autret <autret_m@epita.fr>
21947
21948 * src/bison.simple: Don't hard code the skeleton line and filename.
21949 * src/output.c (output_parser): Rename 'line' as 'output_line'.
21950 New line counter 'skeleton_line' (skeleton-line muscle).
21951
ab3399e0
PE
219522001-12-17 Paul Eggert <eggert@twinsun.com>
21953
21954 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
21955 YYDEBUG must be defined to a nonzero value.
21956
21957 * src/bison.simple (yytname): Do not assume that the user defines
21958 YYDEBUG to a properly parenthesized expression.
21959
3877f72b
AD
219602001-12-17 Akim Demaille <akim@epita.fr>
21961
21962 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
21963 nlookaheads is a new member.
21964 Adjust all users.
21965 * src/lalr.h (nlookaheads): Remove this orphan declaration.
21966 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
21967 state.
776209d6 21968
331dbc1b
AD
219692001-12-17 Akim Demaille <akim@epita.fr>
21970
21971 * src/files.h, src/files.c (open_files, close_files): Remove.
21972 * src/main.c (main): Don't open/close files, nor invoke lex_free,
21973 let...
21974 * src/reader.c (reader): Do it.
776209d6 21975
be750e4c
AD
219762001-12-17 Akim Demaille <akim@epita.fr>
21977
21978 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 21979
709ae8c6
AD
219802001-12-17 Akim Demaille <akim@epita.fr>
21981
21982 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
21983 (flush_reduce): New.
21984 (resolve_sr_conflict): Adjust.
776209d6 21985
f87685c3
AD
219862001-12-17 Akim Demaille <akim@epita.fr>
21987
21988 * src/output.c (output_obstack): Be static and rename as...
21989 (format_obstack): this, to avoid any confusion with files.c's
21990 output_obstack.
21991 * src/reader.h (muscle_obstack): Move to...
21992 * src/output.h: here, since it's defined in output.c.
21993
837491d8
AD
219942001-12-17 Akim Demaille <akim@epita.fr>
21995
21996 * src/output.c (action_row, save_column, default_goto)
21997 (sort_actions, matching_state, pack_vector): Better variable
21998 locality.
21999
796d61fb
AD
220002001-12-17 Akim Demaille <akim@epita.fr>
22001
22002 * src/output.c: Various formatting changes.
776209d6 22003
64d15509
AD
220042001-12-17 Akim Demaille <akim@epita.fr>
22005
22006 * src/files.c (output_files): Free the output_obstack.
22007 * src/main.c (main): Call print and print_graph conditionally.
22008 * src/print.c (print): Work unconditionally.
22009 * src/print_graph.c (print_graph): Work unconditionally.
22010 * src/conflicts.c (log_resolution): Output only if verbose_flag.
22011
fbc8ecb7
MA
220122001-12-16 Marc Autret <autret_m@epita.fr>
22013
22014 * src/output.c (actions_output): Fix. When we use %no-lines,
22015 there is one less line per action.
22016
f0440388
MA
220172001-12-16 Marc Autret <autret_m@epita.fr>
22018
22019 * src/bison.simple: Remove a useless #line directive.
22020 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
22021 * src/output.c (get_lines_number): New.
776209d6 22022 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
22023 output muscles.
22024 Fix line numbering.
22025 (actions_output): Computes the number of lines taken by actions.
22026 (output_master_parser): Insert new skeleton which is the name of
22027 the output parser file name.
22028
a79986b8
MA
220292001-12-15 Marc Autret <autret_m@epita.fr>
22030
22031 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
22032
4ec8e00f
MA
220332001-12-15 Marc Autret <autret_m@epita.fr>
22034
22035 * src/output.c (output_gram): Keep track of the hairy one.
22036
1a4648ff
AD
220372001-12-15 Akim Demaille <akim@epita.fr>
22038
22039 Make `make distcheck' work.
22040
22041 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
22042 system.h which uses libgettext.h.
22043
9c2c67e6
AD
220442001-12-15 Akim Demaille <akim@epita.fr>
22045
22046 * src/nullable.c (set_nullable): Useless rules must be skipped,
22047 otherwise, since we range over their symbols, we might look at a
22048 nonterminal which no longer ``exists'', i.e., it is not counted in
22049 `nvars', hence we overflow our arrays.
22050
93ede233
AD
220512001-12-15 Akim Demaille <akim@epita.fr>
22052
22053 The header can also be produced directly, without any obstack!
22054 Yahoo!
22055
22056 * src/files.c, src/files.h (defines_obstack): Remove.
22057 (compute_header_macro): Global.
22058 (defines_obstack_save): Remove.
22059 * src/reader.c (parse_union_decl): No longer output to
22060 defines_obstack: its content can be found in the `stype' muscle
22061 anyway.
22062 (output_token_translations): Merge into...
22063 (symbols_output): this.
22064 Rename as...
22065 (symbols_save): this.
22066 (reader): Adjust.
22067 * src/output.c (header_output): New.
22068 (output): Call it.
22069
2666f928
AD
220702001-12-15 Akim Demaille <akim@epita.fr>
22071
22072 * src/reader.c (parse_union_decl): Instead of handling two obstack
22073 simultaneously, use one to define the `stype' muscle, and use the
22074 value of the latter to fill defines_obstack.
22075 (copy_comment): Remove.
22076 (copy_comment2): Work for a single obstack.
22077 Rename as...
22078 (copy_comment): this.
22079
428046f8
AD
220802001-12-15 Akim Demaille <akim@epita.fr>
22081
22082 * src/lex.c, src/lex.h (xgetc): No longer static.
22083 * src/reader.c (parse_union_decl): Revamp.
22084
ea52d706
AD
220852001-12-15 Akim Demaille <akim@epita.fr>
22086
22087 Still making progress in separating Bison into (i) input, (ii)
22088 process, (iii) output: now we can directly output the parser file
22089 without using table_obstack at all.
22090
22091 * src/files.c, src/files.h (table_obstack): Bye bye.
22092 (parser_file_name): New.
22093 * src/files.c (compute_output_file_names): Compute it.
22094 * src/output.c (actions_output, output_parser)
22095 (output_master_parser): To a file instead of an obstack.
22096
3f96f4dc
AD
220972001-12-15 Akim Demaille <akim@epita.fr>
22098
22099 Attach actions to rules, instead of pre-outputting them to
22100 actions_obstack.
22101
22102 * src/gram.h (rule_t): action and action_line are new members.
22103 * src/reader.c (symbol_list): Likewise.
22104 (copy_action): Save the actions within the rule.
22105 (packgram): Save them in rule_table.
22106 * src/output.c (actions_output): New.
22107 (output_parser): Use it on `%%actions'.
22108 (output_rule_data): Don't free rule_table.
22109 (output): Do it.
22110 (prepare): Don't save the `action' muscle.
22111 * src/bison.simple: s/%%action/%%actions/.
22112
51576fb3
AD
221132001-12-15 Akim Demaille <akim@epita.fr>
22114
22115 * src/reader.c (copy_action): When --yacc, don't append a `;'
22116 to the user action: let it fail if lacking.
dee049eb 22117 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 22118
2648a72d
AD
221192001-12-14 Akim Demaille <akim@epita.fr>
22120
22121 * src/lex.c (literalchar): Simply return the char you decoded, non
22122 longer mess around with obstacks and int pointers.
22123 Adjust all callers.
22124
92790e5b
AD
221252001-12-14 Akim Demaille <akim@epita.fr>
22126
22127 * src/lex.c (literalchar): Don't escape the special characters,
22128 just decode them, and keep them as char (before, eol was output as
22129 the 2 char string `\n' etc.).
22130 * src/output.c (output_rule_data): Use quotearg to output the
22131 token strings.
22132
927c1557
PE
221332001-12-13 Paul Eggert <eggert@twinsun.com>
22134
22135 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
22136 Do not infringe on the global user namespace when using C++.
22137 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
22138 All uses of `fprintf' and `stderr' changed.
22139
22140 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
22141
ed8e1f68
AD
221422001-12-13 Akim Demaille <akim@epita.fr>
22143
22144 The computation of nullable is broken: it doesn't handle empty
22145 RHS's properly.
22146
22147 * tests/torture.at (GNU AWK Grammar): New.
22148 * tests/sets.at (Nullable): New.
22149 * src/nullable.c (set_nullable): Instead of blindly looping over
22150 `ritems', loop over the rules, and then over their rhs's.
22151
22152 Work around Autotest bugs.
22153
22154 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
22155 frame, because Autotest understand lines starting with a `+' as
22156 traces from the shell. Then, they are not processed properly.
22157 Admittedly an Autotest bug, but we don't have time to wait for
22158 Autotest to catch up.
22159 * tests/regression.at (Broken Closure): Adjust to the new table
22160 frames.
22161 Move to...
22162 * tests/sets.at: here.
22163
cb581495
AD
221642001-12-13 Akim Demaille <akim@epita.fr>
22165
22166 * src/closure.c (closure): Use nrules instead of playing tricks
22167 with BITS_PER_WORD.
22168
2e729273
AD
221692001-12-13 Akim Demaille <akim@epita.fr>
22170
22171 * src/print.c (print_actions): Output the handling of `$' as the
22172 traces do: shifting the token EOF. Before EOF was treated as a
22173 nonterminal.
22174 * tests/regression.at: Adjust some tests.
22175 * src/print_graph.c (print_core): Complete the set of items via
22176 closure. The next-to-final and final states are still unsatisfying,
22177 but that's to be addressed elsewhere.
22178 No longer output the rule numbers, but do output the state number.
22179 A single loop for the shifts + gotos is enough, but picked a
22180 distinct color for each.
22181 (print_graph): Initialize and finalize closure.
22182
107f7dfb
AD
221832001-12-13 Akim Demaille <akim@epita.fr>
22184
22185 * src/reader.c (readgram): Remove dead code, an strip useless
22186 braces.
22187 (get_type): Remove, unused.
22188
9b53a24f
AD
221892001-12-12 Akim Demaille <akim@epita.fr>
22190
22191 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
22192 on that of lib/error.c.
22193
dbfb6dcd
AD
221942001-12-12 Akim Demaille <akim@epita.fr>
22195
22196 Some hosts don't like `/' in includes.
22197
22198 * src/system.h: Include libgettext.h without qualifying the path.
22199 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
22200 $(top_srcdir).
22201
c25fb648
MA
222022001-12-11 Marc Autret <autret_m@epita.fr>
22203
22204 * src/output.c (output_parser): Remove useless muscle.
22205
710ddc4f
MA
222062001-12-11 Marc Autret <autret_m@epita.fr>
22207
22208 * src/bison.simple: Remove #line just before %%epilogue. It
22209 is now handled in ...
22210 * src/reader.c (read_additionnal_code): Add the output of a
22211 #line for the epilogue.
22212
e83d80b8
MA
222132001-12-10 Marc Autret <autret_m@epita.fr>
22214
927c1557 22215 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
22216 replace precedent remove.
22217 * src/bison.simple: Remove #line before %%prologue because
22218 %%input-line is wrong at this time.
22219
971d5158
MA
222202001-12-10 Marc Autret <autret_m@epita.fr>
22221
22222 * src/reader.c (symbols_output): Clean up.
927c1557 22223 * src/output.c (output_gram, output): Clean up.
971d5158 22224
5edafffd
AD
222252001-12-10 Akim Demaille <akim@epita.fr>
22226
22227 * src/lalr.c (initialize_lookaheads): New. Extracted from...
22228 * src/LR0.c (set_state_table): here.
22229 * src/lalr.c (lalr): Call it.
22230
0279f8e9
AD
222312001-12-10 Akim Demaille <akim@epita.fr>
22232
22233 * src/state.h (shifts): Remove the `number' member: shifts are
22234 attached to state, hence no longer need to be labelled with a
22235 state number.
22236
190c4f5f
AD
222372001-12-10 Akim Demaille <akim@epita.fr>
22238
22239 Now that states have a complete set of members, the linked list of
22240 shifts is useless: just fill directly the state's shifts member.
22241
22242 * src/state.h (shifts): Remove the `next' member.
22243 * src/LR0.c (first_state, last_state): Remove.
22244 Adjust the callers.
22245 (augment_automaton): Don't look for the shifts that must be added
22246 a shift on EOF: it is those of the state we looked for! But now,
22247 since shifts are attached, it is no longer needed to looking
22248 merely by its id: its number.
22249
2a73b93d
AD
222502001-12-10 Akim Demaille <akim@epita.fr>
22251
22252 * src/LR0.c (augment_automaton): Better variable locality.
22253 Remove an impossible branch: if there is a state corresponding to
22254 the start symbol being shifted, then there is shift for the start
22255 symbol from the initial state.
22256
74392f6a
AD
222572001-12-10 Akim Demaille <akim@epita.fr>
22258
22259 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
22260 only when appropriate: when insert_start_shifting_state' is not
22261 invoked.
22262 * tests/regression.at (Rule Line Numbers): Adjust.
22263
37c82725
AD
222642001-12-10 Akim Demaille <akim@epita.fr>
22265
22266 * src/LR0.c (augment_automaton): Now that all states have shifts,
22267 merge the two cases addition shifts to the initial state.
22268
6a164e0c
AD
222692001-12-10 Akim Demaille <akim@epita.fr>
22270
22271 * src/lalr.c (set_state_table): Move to...
22272 * src/LR0.c: here.
22273 * src/lalr.c (lalr): Don't call it...
22274 * src/LR0.c (generate_states): do it.
22275 * src/LR0.h (first_state): Remove, only the table is used.
22276
7215de24
AD
222772001-12-10 Akim Demaille <akim@epita.fr>
22278
22279 * src/LR0.h (first_shift, first_reduction): Remove.
22280 * src/lalr.c: Don't use first_shift: find shifts through the
22281 states.
22282
80e25d4d
AD
222832001-12-10 Akim Demaille <akim@epita.fr>
22284
22285 * src/LR0.c: Attach shifts to states as soon as they are
22286 computed.
22287 * src/lalr.c (set_state_table): Instead of assigning shifts to
22288 state, just assert that the mapping was properly done.
22289
0ab3728b
AD
222902001-12-10 Akim Demaille <akim@epita.fr>
22291
22292 * src/LR0.c (insert_start_shift): Rename as...
22293 (insert_start_shifting_state): this.
22294 (insert_eof_shifting_state, insert_accepting_state): New.
22295 (augment_automaton): Adjust.
22296 Better locality of the variables.
22297 When looking if the start_symbol is shifted from the initial
22298 state, using `while (... symbol != start_symbol ...)' sounds
22299 better than `while (... symbol < start_symbol ...)': If fail
22300 to see how the order between symbols could be relevant!
22301
78af9bbc
AD
223022001-12-10 Akim Demaille <akim@epita.fr>
22303
22304 * src/getargs.h: Don't declare `spec_name_prefix' and
22305 `spec_file_prefix', declared by src/files.h.
22306 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
22307 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
22308 * src/output.c (prepare): Adjust.
22309 * src/reader.c (symbols_output): Likewise.
22310 * src/vmsgetargs.c: Vaguely adjust, but who cares?
22311
bdef2a41
AD
223122001-12-10 Akim Demaille <akim@epita.fr>
22313
22314 * src/muscle_tab.c (muscle_init): NULL is a better default than
22315 `"0"'.
22316
3735969c
AD
223172001-12-10 Akim Demaille <akim@epita.fr>
22318
22319 * src/reader.c (reader): Calling symbols_output once is enough.
22320
49701457
AD
223212001-12-10 Akim Demaille <akim@epita.fr>
22322
22323 Now that states have a complete set of members, the linked list of
22324 reductions is useless: just fill directly the state's reductions
22325 member.
22326
22327 * src/state.h (struct reductions): Remove member `number' and
22328 `next'.
22329 * src/LR0.c (first_reduction, last_reduction): Remove.
22330 (save_reductions): Don't link the new reductions, store them in
22331 this_state.
22332 * src/lalr.c (set_state_table): No need to attach reductions to
22333 states, it's already done.
22334 * src/output.c (output_actions): No longer free the shifts, then
22335 the reductions, then the states: free all the states and their
22336 members.
22337
0edad749
AD
223382001-12-10 Akim Demaille <akim@epita.fr>
22339
22340 * src/options.c (OPTN, DRTV, BOTH): New.
22341 (option_table): Use them.
22342
0edad749
AD
22343 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
22344 the job of system.h.
22345 * src/options.c: Don't include stdio.h and xalloc.h for the same
22346 reasons.
22347
5449dd0f
AD
223482001-12-10 Akim Demaille <akim@epita.fr>
22349
22350 * src/output.c (output, prepare): Make sure the values of the
22351 muscles `action' and `prologue' are 0-terminated.
22352
a870c567
AD
223532001-12-10 Akim Demaille <akim@epita.fr>
22354
22355 Clean up GCC warnings.
22356
22357 * src/reader.c (copy_action): `buf' is not used.
22358 (parse_skel_decl): Be static.
22359 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
22360 * src/options.h (create_long_option_table): Have a real prototype.
22361 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
22362 (hash_delete_at): Return const void *.
22363 Adjust casts to preserve the const.
22364
80df8768
AD
223652001-12-10 Akim Demaille <akim@epita.fr>
22366
22367 * configure.in: Require 2.52g.
22368 M4 is not needed, but AUTOM4TE is.
22369 * m4/m4.m4: Remove.
22370 * tests/Makefile.am: Adjust.
22371
f693ad14
AD
223722001-12-10 Akim Demaille <akim@epita.fr>
22373
22374 One structure for states is enough, even though theoretically
22375 there are LR(0) states and LALR(1) states.
22376
22377 * src/lalr.h (state_t): Remove.
22378 (state_table): Be state_t **, not state_t *.
22379 * src/state.h (core, CORE_ALLOC): Rename as...
22380 (state_t, STATE_ALLOC): this.
22381 Add the LALR(1) members: shifts, reductions, errs.
22382 * src/LR0.c (state_table): Rename as...
22383 (state_hash): this, to avoid name clashes with the global
22384 `state_table'.
22385 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
22386 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
22387
74ffbcb6
AD
223882001-12-10 Akim Demaille <akim@epita.fr>
22389
22390 Bison dumps core on bash.y.
22391 Reported by Pascal Bart.
22392
22393 * src/warshall.c (bitmatrix_print): New.
22394 (TC): Use it.
ba0fe3c7 22395 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
22396 j must be the outer loop.
22397 * tests/regression.at (Broken Closure): New.
22398
07708e19
AD
223992001-12-05 Akim Demaille <akim@epita.fr>
22400
22401 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
22402 its argument.
ba1ecc07 22403 Reported by Peter Hamorsky.
07708e19 22404
92b16366
AD
224052001-12-05 Akim Demaille <akim@epita.fr>
22406
22407 * src/conflicts.c (err_table): Remove.
22408 (resolve_sr_conflict): Adjust.
22409 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
22410 Rename as...
22411 (state_t.reductions, state_t.shifts): this.
22412
076ab033
AD
224132001-12-05 Akim Demaille <akim@epita.fr>
22414
22415 * src/reduce.c (reduce_grammar_tables): No longer disable the
22416 removal of useless rules via CPP but via `if (0)', so that the
22417 compiler still check the code is valid.
22418 For instance, it should have noticed `rline' no longer exists: use
22419 the `line' member of rule_t.
22420 * src/gram.c (dummy, rline): Remove, unused.
22421
3843c413
AD
224222001-12-05 Akim Demaille <akim@epita.fr>
22423
22424 * src/output.c (pack_vector): Use assert, not berror.
22425 * src/main.c (berror): Remove, unused.
22426
43168960
AD
224272001-12-05 Akim Demaille <akim@epita.fr>
22428
22429 New experimental feature: if --verbose --trace output all the
22430 items of a state, not only its kernel.
22431
22432 * src/print.c (print_core): If `trace_flag', then invoke closure
22433 before outputting the items of the state (print_core is no longer
22434 a correct name them).
22435 (print_results): Invoke new_closure/free_closure if needed.
22436
b2872512
AD
224372001-12-05 Akim Demaille <akim@epita.fr>
22438
22439 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
22440 * src/closure.c, src/closure.h (itemsetsize): Rename as...
22441 (nitemset): for consistency with the rest of the project.
22442
23cbcc6c
AD
224432001-12-05 Akim Demaille <akim@epita.fr>
22444
22445 * src/closure.c (print_closure): Improve.
22446 (closure): Use it for printing input and output.
22447
03ec521c
AD
224482001-12-05 Akim Demaille <akim@epita.fr>
22449
22450 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
22451 indexed by nonterminals.
22452
3a7456dd
AD
224532001-12-05 Akim Demaille <akim@epita.fr>
22454
22455 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
22456 what it was!).
22457 * src/warshall.h: Remove accidental duplication of the content.
22458
1cbcf2e7
AD
224592001-12-05 Akim Demaille <akim@epita.fr>
22460
22461 * src/closure.c (set_fderives): De-obfuscate.
22462
84182270
AD
224632001-12-05 Akim Demaille <akim@epita.fr>
22464
22465 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
22466
3f6f053c
AD
224672001-12-05 Akim Demaille <akim@epita.fr>
22468
22469 * src/closure.c (set_firsts): De-obfuscate.
22470
7a5350ba
AD
224712001-12-05 Akim Demaille <akim@epita.fr>
22472
22473 * src/output.c (action_row): De-obfuscate
22474 using the good o' techniques: arrays not pointers, variable
22475 locality, BITISSET, RESETBIT etc.
22476
d954473d
AD
224772001-12-05 Akim Demaille <akim@epita.fr>
22478
22479 Pessimize the code to simplify it: from now on, all the states
22480 have a valid SHIFTS, which NSHIFTS is possibly 0.
22481
22482 * src/LR0.c (shifts_new): Be global and move to..
22483 * src/state.c, src/state.h: here.
22484 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
22485 * src/print_graph: Adjust.
22486
9839bbe5
AD
224872001-12-05 Akim Demaille <akim@epita.fr>
22488
22489 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
22490 * src/conflicts.c: Use it.
22491 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
22492 incorrectly ``simplified''.
22493
9f136c07
AD
224942001-12-05 Akim Demaille <akim@epita.fr>
22495
22496 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
22497 using the good o' techniques: arrays not pointers, variable
22498 locality, BITISSET, RESETBIT etc.
22499
b608206e
AD
225002001-12-05 Akim Demaille <akim@epita.fr>
22501
22502 * src/state.h (SHIFT_SYMBOL): New.
22503 * src/conflicts.c: Use it to deobfuscate.
22504
52afa962
AD
225052001-12-05 Akim Demaille <akim@epita.fr>
22506
22507 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
22508 (print_reductions): De-obfuscate using the good o' techniques:
22509 arrays not pointers, variable locality, BITISSET.
22510
e74dc321
AD
225112001-12-05 Akim Demaille <akim@epita.fr>
22512
22513 * src/conflicts.c (print_reductions): Arrays, not pointers.
22514 Use BITISSET.
22515
768fca83
AD
225162001-12-05 Akim Demaille <akim@epita.fr>
22517
22518 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22519
a17e599f
AD
225202001-12-05 Akim Demaille <akim@epita.fr>
22521
22522 * src/conflicts.c (print_reductions): Improve variable locality.
22523
a04bc341
AD
225242001-12-05 Akim Demaille <akim@epita.fr>
22525
22526 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22527
c8ea038e
AD
225282001-12-05 Akim Demaille <akim@epita.fr>
22529
22530 * src/conflicts.c (print_reductions): Improve variable locality.
22531
aa2aab3c
AD
225322001-12-05 Akim Demaille <akim@epita.fr>
22533
22534 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
22535 * src/lalr.c: Use them.
22536
b178c8cc
AD
225372001-12-05 Akim Demaille <akim@epita.fr>
22538
22539 * src/LR0.c (augment_automaton): Formatting changes.
22540 Better variable locality.
22541
f67d13aa
AD
225422001-12-05 Akim Demaille <akim@epita.fr>
22543
22544 * src/lalr.c (matrix_print): New.
22545 (transpose): Use it.
22546 Use arrays instead of pointers.
22547
c2713865
AD
225482001-12-05 Akim Demaille <akim@epita.fr>
22549
22550 * src/lalr.c (maxrhs): Move to...
22551 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
22552 * src/lalr.c (build_relations): Adjust.
22553
9887c18a
AD
225542001-12-05 Akim Demaille <akim@epita.fr>
22555
22556 * src/lalr.c (transpose): Free the memory allocated to the
22557 argument, as it is replaced by the results by the unique caller.
22558 (build_relations): Merely invoke transpose: it handles the memory
22559 deallocation.
22560 Improve variable locality.
22561 Avoid variables used as mere abbreviations.
22562 (compute_lookaheads): Use arrays instead of pointers.
22563
4d4f699c
AD
225642001-12-05 Akim Demaille <akim@epita.fr>
22565
22566 * src/lalr.c (initialize_F): Improve variable locality.
22567 Avoid variables used as mere abbreviations.
22568
80a69750
AD
225692001-12-05 Akim Demaille <akim@epita.fr>
22570
22571 * src/derives.c (print_derives): Display the ruleno.
22572 * src/lalr.c (initialize_F, transpose): Better variable locality
22573 to improve readability.
22574 Avoid variables used as mere abbreviations.
22575
fe961097
AD
225762001-12-05 Akim Demaille <akim@epita.fr>
22577
22578 * src/lalr.c (traverse): Use arrays instead of pointers.
22579
e3e4e814
AD
225802001-12-05 Akim Demaille <akim@epita.fr>
22581
22582 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
22583 the handling of squeue.
22584 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22585
630e182b
AD
225862001-12-05 Akim Demaille <akim@epita.fr>
22587
22588 Because useless nonterminals are now kept alive (instead of being
22589 `destroyed'), we now sometimes examine them, and store information
22590 related to them. Hence we need to know their number, and adjust
22591 memory allocations.
22592
22593 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
22594 static.
22595 * src/LR0.c (allocate_itemsets): The memory allocated to
22596 `symbol_count' was used for two different purpose: once to count
22597 the number of occurrences of each symbol, and later reassigned to
22598 `shift_symbol', containing the symbol that can be shifted from a
22599 given state.
22600 Deobfuscate, i.e., allocate, use and free `symbol_count' here
22601 only, and...
22602 (new_itemsets): Allocate `shift_symbol' here.
22603 (allocate_itemsets): symbol_count includes useless nonterminals.
22604 Make room for them.
22605 (free_storage): Use `free', not `XFREE', for pointers that cannot
22606 be null.
22607
81b51460
AD
226082001-12-05 Akim Demaille <akim@epita.fr>
22609
22610 * src/nullable.c (set_nullable): Deobfuscate the handling of
22611 ritem.
22612 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22613
3067fbef
AD
226142001-12-05 Akim Demaille <akim@epita.fr>
22615
22616 * src/gram.c, src/gram.h (ritem_print): New.
22617 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
22618 (This useless function was defined only to work around VMS linkers
22619 that can't handle compilation units with variables only).
22620 * src/reduce.c (dump_grammar): Use it to trace the construction of
22621 ritem.
22622
c2bea5f9
PE
226232001-12-04 Paul Eggert <eggert@twinsun.com>
22624
7d27c823
PE
22625 * src/bison.simple (union yyalloc): Change member names
22626 to be the same as the stack names.
22627 (yyparse): yyptr is now union yyalloc *, not char *.
22628 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
22629 and may generate better code on some machines.
c2bea5f9
PE
22630 (yystpcpy): Use prototype if __STDC__ is defined, not just
22631 if __cplusplus is defined.
35687a9d 22632
2c8a9dfa
AD
226332001-11-30 Akim Demaille <akim@epita.fr>
22634
22635 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
22636 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
22637 Gettext doesn't compile cleanly, and dies with -Werror.
22638 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
22639 Include WARNING_CFLAGS here.
22640 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
22641 before being defined.
22642
f4e421e6
AD
226432001-11-27 Paul Eggert <eggert@twinsun.com>
22644
22645 * lib/quotearg.h (quotearg_n, quotearg_n_style):
22646 First arg is int, not unsigned.
22647 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22648 (SIZE_MAX, UINT_MAX): New macros.
22649 (quotearg_n_options): Abort if N is negative.
22650 Avoid overflow check on hosts where size_t is 64 bits and int
22651 is 32 bits, as overflow is impossible there.
22652 Fix off-by-one typo that caused unnecessary reallocation.
22653
7093d0f5
AD
226542001-11-29 Paul Eggert <eggert@twinsun.com>
22655
22656 Name space cleanup in generated parser.
22657
22658 * doc/bison.texinfo (Bison Parser): Discuss system headers
22659 and their effect on the user name space.
22660
22661 * src/bison.simple:
22662 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
22663 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
22664 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
22665
22666 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
22667 on user names when possible.
22668
22669 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
22670 Simplify test for whather <alloca.h> exists.
22671
22672 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
22673
22674 (<stdio.h>): Include if YYDEBUG.
22675
22676 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
22677 ! defined (yyoverflow) && ! defined (yymemcpy).
22678
22679 (yymemcpy, yyparse): Rename local variables as needed so that
22680 they all begin with 'yy'.
22681
22682 (yystrlen, yystpcpy): New functions.
22683
22684 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
22685 All uses changed.
22686
22687 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
22688 instead of relying on string.h functions. Use YYSTACK_ALLOC
22689 and YYSTACK_FREE instead of malloc and free.
22690
fd51e5ff
AD
226912001-11-30 Akim Demaille <akim@epita.fr>
22692
22693 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
22694 before their first uses.
22695 (YYBISON, YYPURE): Move to the top of the output.
22696
7d13ff5f
AD
226972001-11-30 Akim Demaille <akim@epita.fr>
22698
22699 * tests/reduce.at (Useless Nonterminals): Fix.
22700
892a3995
AD
227012001-11-30 Akim Demaille <akim@epita.fr>
22702
22703 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
22704 if body instead of `;' to pacify GCC's warnings.
22705
68f1e3ed
AD
227062001-11-30 Akim Demaille <akim@epita.fr>
22707
22708 Instead of mapping the LHS of unused rules to -1, keep the LHS
22709 valid, but flag the rules as invalid.
22710
22711 * src/gram.h (rule_t): `useful' is a new member.
22712 * src/print.c (print_grammar): Adjust.
22713 * src/derives.c (set_derives): Likewise.
22714 * src/reader.c (packgram, reduce_output): Likewise.
22715 * src/reduce.c (reduce_grammar_tables): Likewise.
22716 * tests/reduce.at (Underivable Rules, Useless Rules): New.
22717
d2d1b42b
AD
227182001-11-30 Akim Demaille <akim@epita.fr>
22719
22720 * src/reduce.c (reduce_output): Formatting changes.
22721 * src/print.c (print_results, print_grammar): Likewise.
22722 * tests/regression.at (Rule Line Numbers)
22723 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
22724
760b53a8
AD
227252001-11-30 Akim Demaille <akim@epita.fr>
22726
22727 * src/reduce.c (nonterminals_reduce): Instead of throwing away
22728 useless nonterminals, move them at the end of the symbol arrays.
22729 (reduce_output): Adjust.
22730 * tests/reduce.at (Useless Nonterminals): Adjust.
22731
00238958
AD
227322001-11-30 Akim Demaille <akim@epita.fr>
22733
22734 * src/reduce.c: Various comment/formatting changes.
22735 (nonterminals_reduce): New, extracted from...
22736 (reduce_grammar_tables): here.
22737 (reduce_grammar): Call nonterminals_reduce.
22738
396452de
PE
227392001-11-29 Paul Eggert <eggert@twinsun.com>
22740
22741 * src/bison.simple (YYSTACK_REALLOC): Remove.
22742 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
22743 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
22744 New macros.
22745 (union yyalloc): New type.
22746 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
22747 an arbitrary restriction on hosts where size_t is wider than int.
22748
22749 (yyparse): Don't dump core if alloca or malloc fails; instead, report
22750 a parser stack overflow. Allocate just one block of memory for all
22751 three stacks, instead of allocating three blocks; this typically is
22752 faster and reduces fragmentation.
22753
22754 Do not limit the number of items in the stack to a value that fits
22755 in 'int', as this is an arbitrary limit on hosts with 64-bit
22756 size_t and 32-bit int.
22757
147e184c
MA
227582001-11-29 Marc Autret <autret_m@epita.fr>
22759
22760 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
22761 of defining YYERROR_VERBOSE.
22762 [AT_DATA]: $4 is now out of C declarations in the prologue.
22763
426cf563
MA
227642001-11-28 Marc Autret <autret_m@epita.fr>
22765
22766 * src/reader.c (parse_dquoted_param): New.
22767 (parse_skel_decl): Use it.
22768 * src/lex.h: Add its prototype.
22769 * src/lex.c (literalchar): Become not static.
22770
c7925b99
MA
227712001-11-28 Marc Autret <autret_m@epita.fr>
22772
22773 * src/output.h: And put its extern declaration here.
22774 * src/output.c (error_verbose): Define here.
22775 (prepare): Echo name modification.
22776 * src/getargs.h: Clean its extern declaration.
22777 * src/getargs.c (error_verbose_flag): Remove.
22778 (getargs): Remove case 'e'.
22779 * src/options.c (option_table): 'error-verbose' is now seen as simple
22780 percent option.
22781 Include output.h.
22782
22783 * src/reader.c (read_declarations): Remove case tok_include.
22784 (parse_include_decl): Remove.
22785 * src/lex.h (token_t): Remove tok_include.
22786 * src/options.c (option_table): 'include' is now a simple command line
22787 option.
22788
5b5d1929
MA
227892001-11-28 Marc Autret <autret_m@epita.fr>
22790
22791 * src/bison.simple: Adjust muscle names.
22792 * src/muscle_tab.c (muscle_init): Also rename the muscles.
22793 * src/output.c (prepare): s/_/-/ for the muscles names.
22794 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
22795
8850be4b
MA
227962001-11-28 Marc Autret <autret_m@epita.fr>
22797
22798 * src/bison.simple: Fix debug.
22799 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
22800
4a38e613
AD
228012001-11-28 Akim Demaille <akim@epita.fr>
22802
22803 * src/LR0.c (shifts_new): New.
22804 (save_shifts, insert_start_shift, augment_automaton): Use it.
22805
4b35e1c1
AD
228062001-11-28 Akim Demaille <akim@epita.fr>
22807
22808 * src/closure.c (closure): `b' and `ruleno' denote the same value:
22809 keep ruleno only.
22810
d2b04478
AD
228112001-11-28 Akim Demaille <akim@epita.fr>
22812
22813 * src/closure.c (closure): Instead of looping over word in array
22814 then bits in words, loop over bits in array.
22815
2c4c30aa
AD
228162001-11-28 Akim Demaille <akim@epita.fr>
22817
22818 * src/closure.c (closure): No longer optimize the special case
22819 where all the bits of `ruleset[r]' are set to 0, to make the code
22820 clearer.
22821
576890b7
AD
228222001-11-28 Akim Demaille <akim@epita.fr>
22823
22824 * src/closure.c (closure): `r' and `c' are new variables, used to
22825 de-obfuscate accesses to RULESET and CORE.
22826
cb487d7d
AD
228272001-11-28 Akim Demaille <akim@epita.fr>
22828
22829 * src/reduce.c (reduce_print): Use ngettext.
22830 (dump_grammar): Improve the trace accuracy.
22831
6013d43f
AD
228322001-11-28 Akim Demaille <akim@epita.fr>
22833
22834 * src/reduce.c (dump_grammar): Don't translate trace messages.
22835
cb4956ee
AD
228362001-11-28 Akim Demaille <akim@epita.fr>
22837
22838 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
22839 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
22840 as all tags are free'ed afterwards.
22841 From Enrico Scholz.
22842
648185ab
PE
228432001-11-27 Paul Eggert <eggert@twinsun.com>
22844
22845 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
22846 use alloca when we didn't want to, and vice versa.
22847
68254a03
MA
228482001-11-27 Marc Autret <autret_m@epita.fr>
22849
9113b58f
AD
22850 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
22851 initialization.
68254a03
MA
22852 * src/output.c (prepare): Remove its update.
22853
04d843a2
MA
228542001-11-27 Marc Autret <autret_m@epita.fr>
22855
22856 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
22857 Use %error-verbose.
22858
d2079671 228592001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
22860
22861 * src/bison.simple: Remove YYERROR_VERBOSE using.
22862 Use %%error_verbose.
22863 (yyparse): Likewise.
22864 * src/output.c (prepare): Give its final value.
22865 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
22866 * src/getargs.h: Add its extern declaration.
22867 * src/getargs.c (error_verbose_flag): New int.
22868 (getargs): Update to catch new case.
22869 * src/options.c (option_table): 'error-verbose' is a new option.
22870 (shortopts): Update.
22871
e0327bc8
AD
228722001-11-27 Akim Demaille <akim@epita.fr>
22873
22874 * src/system.h: Use intl/libgettext.h.
22875 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
22876
000f1a3c
AD
228772001-11-27 Akim Demaille <akim@epita.fr>
22878
22879 * tests/torture.at (Exploding the Stack Size with Malloc):
22880 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
22881
26cfe0be
AD
228822001-11-27 Akim Demaille <akim@epita.fr>
22883
22884 * src/files.c: Include error.h.
22885 Reported by Hans Aberg.
22886
f6bd5427
MA
228872001-11-26 Marc Autret <autret_m@epita.fr>
22888
d2079671 22889 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
22890 (read_declarations): Add case tok_include.
22891 * src/getargs.h (include): Add its extern definition.
22892 * src/getargs.c (include): New const char *.
22893 (getargs): Add case '-I'.
22894 * src/options.c (option_table): Add include as command line and
22895 percent option.
22896 * src/lex.h (token_t): Add tok_include.
22897
2ca209c1
AD
228982001-11-26 Akim Demaille <akim@epita.fr>
22899
22900 * src/reader.c (readgram): Make sure rules for mid-rule actions
22901 have a lineno equal to that of their host rule.
22902 Reported by Hans Aberg.
22903 * tests/regression.at (Rule Line Numbers): New.
22904
0e41b407
AD
229052001-11-26 Akim Demaille <akim@epita.fr>
22906
22907 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
22908 size_ts.
22909
229102001-11-26 Akim Demaille <akim@epita.fr>
22911
22912 * src/complain.c, src/complain.h (error): Remove, provided by
22913 lib/error.[ch].
22914
e0c40012
AD
229152001-11-26 Akim Demaille <akim@epita.fr>
22916
22917 * src/reader.c (read_declarations): Don't abort on tok_illegal,
22918 issue an error message.
22919 * tests/regression.at (Invalid %directive): New.
22920 Reported by Hans Aberg.
22921
5e147124
AD
229222001-11-26 Akim Demaille <akim@epita.fr>
22923
22924 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
22925 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
22926
a034c8b8
AD
229272001-11-26 Akim Demaille <akim@epita.fr>
22928
22929 * src/conflicts.c (conflicts_print): Don't complain at all when
22930 there are no reduce/reduce conflicts, and as many shift/reduce
22931 conflicts as expected.
22932 * tests/regression.at (%expect right): Adjust.
22933
c64a20f3
AD
229342001-11-23 Akim Demaille <akim@epita.fr>
22935
22936 * lib/alloca.c: Update, from fileutils.
22937
5b0d29bb
AD
229382001-11-23 Akim Demaille <akim@epita.fr>
22939
22940 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
22941
722c4bfe
AD
229422001-11-23 Akim Demaille <akim@epita.fr>
22943
22944 * src/system.h: Include alloca.h.
22945 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
22946
6255b435
AD
229472001-11-23 Akim Demaille <akim@epita.fr>
22948
22949 * src/print_graph.c (print_actions): Remove `rule', unused.
22950 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
22951 pacify GCC's signed < unsigned warnings.
22952 * src/closure.c (itemsetsize): Likewise.
22953 * src/reader.c (symbol_list_new): Static.
22954
b29b2ed5
AD
229552001-11-23 Akim Demaille <akim@epita.fr>
22956
22957 Attaching lineno to buckets is stupid, since only one copy of each
22958 symbol is kept, only the line of the first occurrence is kept too.
22959
22960 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
22961 * src/reader.c (rline_allocated): Remove, unused.
22962 (symbol_list): Have a `line' member.
22963 (symbol_list_new): New.
22964 (readgram): Use it.
22965 * src/print.c (print_grammar): Output the rule line numbers.
22966 * tests/regression.at (Solved SR Conflicts)
22967 (Unresolved SR Conflicts): Adjust.
22968 Reported by Hans Aberg.
22969
a81b1d4a
MA
229702001-11-22 Marc Autret <autret_m@epita.fr>
22971
22972 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
22973
c1ecb3c1
MA
229742001-11-22 Marc Autret <autret_m@epita.fr>
22975
22976 * src/muscle_tab.c (muscle_init): Remove initialization of
22977 skeleton muscle.
22978 * src/output.c (output_master_parser): Do it here.
22979
fbe01355
AD
229802001-11-20 Akim Demaille <akim@epita.fr>
22981
22982 * po/sv.po: New.
22983 * configure.in (ALL_LINGUAS): Adjust.
22984 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
22985 longer contains strings to translate.
22986
81e895c0
AD
229872001-11-19 Akim Demaille <akim@epita.fr>
22988
22989 * src/conflicts.c (conflicts_print): Add a missing \n.
22990
6bb1878b
AD
229912001-11-19 Akim Demaille <akim@epita.fr>
22992
22993 * src/nullable.c (nullable_print): New.
22994 (set_nullable): Call it when tracing.
22995 Better locality of variables.
22996
d9ec2d07
AD
229972001-11-19 Akim Demaille <akim@epita.fr>
22998
22999 * src/print.c (print_actions): Better locality of variables.
23000
720e5c1b
AD
230012001-11-19 Akim Demaille <akim@epita.fr>
23002
23003 * src/derives.c (print_derives): Fix and enrich.
23004 * src/closure.c (print_fderives): Likewise.
23005
fb908786
AD
230062001-11-19 Akim Demaille <akim@epita.fr>
23007
23008 * src/closure.c (itemsetend): Remove, replaced with...
23009 (itemsetsize): new.
23010
125ecb56
AD
230112001-11-19 Akim Demaille <akim@epita.fr>
23012
23013 * src/LR0.c (kernel_end): Remove, replaced with...
23014 (kernel_size): new.
23015
d8cf039f
AD
230162001-11-19 Akim Demaille <akim@epita.fr>
23017
23018 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
23019 to clarify.
23020
7bec0760
AD
230212001-11-19 Akim Demaille <akim@epita.fr>
23022
23023 * src/closure.c (closure): Use arrays instead of pointers to clarify.
23024
c87d4863
AD
230252001-11-19 Akim Demaille <akim@epita.fr>
23026
23027 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
23028 trace messages.
23029 * src/LR0.c: Likewise.
23030 (allocate_itemsets): Use arrays instead of pointers to clarify.
23031
9bfe901c
AD
230322001-11-19 Akim Demaille <akim@epita.fr>
23033
23034 * src/getargs.c (statistics_flag): Replace with...
23035 (trace_flag): New.
23036 (longopts): Accept --trace instead of --statistics.
23037 * src/getargs.h, src/options.c: Adjust.
23038 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
23039 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
23040
97db7bd4
AD
230412001-11-19 Akim Demaille <akim@epita.fr>
23042
cc72668c 23043 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
23044 pointers to clarify the code.
23045 (save_reductions, save_shifts): Factor common parts of alternatives.
23046
2c5f66ed
AD
230472001-11-19 Akim Demaille <akim@epita.fr>
23048
23049 * src/LR0.c (new_state, get_state): Complete TRACE code.
23050 * src/closure.c: Include `reader.h' to get `tags', needed by the
23051 trace code.
23052 Rename the conditional DEBUG as TRACE.
23053 Output consistently TRACEs to stderr, not stdout.
23054 * src/derives.c: Likewise.
23055 * src/reduce.c: (inaccessable_symbols): Using if is better style
23056 than goto.
23057 Use `#if TRACE' instead of `#if 0' for tracing code.
23058
300f275f
AD
230592001-11-19 Akim Demaille <akim@epita.fr>
23060
23061 * src/system.h (LIST_FREE, shortcpy): New.
23062 * src/LR0.c: Use them.
23063 * src/output.c (free_itemsets, free_reductions, free_shifts):
23064 Remove, replaced by LIST_FREE.
23065
f59c437a
AD
230662001-11-19 Akim Demaille <akim@epita.fr>
23067
23068 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
23069 (REDUCTIONS_ALLOC): New.
23070 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
23071 allocation.
23072
6986fd9e
AD
230732001-11-19 Akim Demaille <akim@epita.fr>
23074
23075 * src/LR0.c (new_state): Complete trace code.
23076 * src/nullable.c (set_nullable): Don't translate traces.
23077
4bc30f78
AD
230782001-11-19 Akim Demaille <akim@epita.fr>
23079
23080 * src/print_graph.c (print_core): Better locality of variables.
23081 * src/print.c (print_core): Likewise.
23082
08a946e0
AD
230832001-11-19 Akim Demaille <akim@epita.fr>
23084
23085 * src/vcg.c: You do the output, so you are responsible of the
23086 handling of VCG syntax, in particular: use quotearg.
23087 * src/print_graph.c: Don't.
23088 (print_actions): Don't output the actions as part of the nodes,
23089 since that's the job of the edges.
23090 (print_state): Don't output by hand: fill the node description,
9bfe901c 23091 and ask for its output.
08a946e0 23092
f0473484
AD
230932001-11-19 Akim Demaille <akim@epita.fr>
23094
cc72668c
AD
23095 * src/bison.simple (yyparse): When verbosely reporting an error,
23096 no longer put additional quotes around token names.
f0473484
AD
23097 * tests/calc.at: Adjust.
23098
e41dc700
AD
230992001-11-19 Akim Demaille <akim@epita.fr>
23100
23101 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
23102 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
23103 * src/output.c: Adjust.
23104
652a871c
AD
231052001-11-19 Akim Demaille <akim@epita.fr>
23106
23107 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
23108 (rule_t): this.
23109 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
23110
b2ed6e58
AD
231112001-11-19 Akim Demaille <akim@epita.fr>
23112
23113 * src/gram.h (rule_t): New.
23114 (rule_table): New.
23115 (rrhs, rlhs): Remove, part of state_t.
23116 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
23117 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
23118 * src/reader.c, src/reduce.c: Adjust.
23119
edad7067
AD
231202001-11-19 Akim Demaille <akim@epita.fr>
23121
23122 * src/reader.c (symbols_output): New, extracted from...
23123 (packsymbols): Here.
23124 (reader): Call it.
23125
3feec034
AD
231262001-11-19 Akim Demaille <akim@epita.fr>
23127
23128 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
23129 (maxrhs): this new function.
23130
ddcd5fdf
AD
231312001-11-19 Akim Demaille <akim@epita.fr>
23132
cc72668c 23133 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
23134 Adjust.
23135
bb527fc2
AD
231362001-11-19 Akim Demaille <akim@epita.fr>
23137
cc72668c 23138 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
23139 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23140 * src/lalr.c: Adjust.
23141
a845a697
AD
231422001-11-19 Akim Demaille <akim@epita.fr>
23143
23144 * src/lalr.c (initialize_LA): Only initialize LA. Let...
23145 (set_state_table): handle the `lookaheads' members.
23146
f004bf6a
AD
231472001-11-19 Akim Demaille <akim@epita.fr>
23148
cc72668c
AD
23149 * src/lalr.h (lookaheads): Removed array, whose contents is now
23150 a member of...
f004bf6a
AD
23151 (state_t): this structure.
23152 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23153 Adjust.
23154
de326cc0
AD
231552001-11-19 Akim Demaille <akim@epita.fr>
23156
cc72668c
AD
23157 * src/lalr.h (consistent): Removed array, whose contents is now
23158 a member of...
de326cc0
AD
23159 (state_t): this structure.
23160 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23161 Adjust.
23162
90b4416b
AD
231632001-11-19 Akim Demaille <akim@epita.fr>
23164
cc72668c
AD
23165 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
23166 contents are now members of...
90b4416b
AD
23167 (state_t): this structure.
23168 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23169 Adjust.
23170
9703cc49
AD
231712001-11-19 Akim Demaille <akim@epita.fr>
23172
23173 * src/lalr.h (state_t): New.
23174 (state_table): Be a state_t * instead of a core **.
23175 (accessing_symbol): Remove, part of state_t.
23176 * src/lalr.c: Adjust.
23177 (set_accessing_symbol): Merge into...
23178 (set_state_table): this.
23179 * src/print_graph.c, src/conflicts.c: Adjust.
23180
d803322e
AD
231812001-11-14 Akim Demaille <akim@epita.fr>
23182
23183 * tests/calc.at, tests/output.at, tests/regression.at,
23184 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
23185 now the tests are run in private dirs, therefore AC_CLEANUP and
23186 family can be simplified to 0-ary.
23187 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
23188 use abs. path to find config.h.
23189 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
23190 stderr, there can be way too much random noise.
23191 Instead pass -Werror to GCC and rely on the exit status.
23192 Reported by Wolfram Wagner.
23193
3d76b07d
AD
231942001-11-14 Akim Demaille <akim@epita.fr>
23195
23196 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
23197 defined only if yyoverflow is defined, to avoid `warning: unused
23198 variable `yyvs1''.
23199 Reported by The Test Suite.
23200
09b503c8
AD
232012001-11-14 Akim Demaille <akim@epita.fr>
23202
23203 * src/print.c: Include reduce.h.
23204 Reported by Hans Aberg.
23205
232062001-11-14 Akim Demaille <akim@epita.fr>
23207
23208 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
23209 Revert a previous patch: these are really const.
23210 * src/conflicts.c (conflict_report): Additional useless pair of
23211 braces to pacify GCC's warnings for `if () if () {} else {}'.
23212 * src/lex.c (parse_percent_token): Replace equal_offset with
23213 arg_offset.
23214 arg is const.
23215 Be sure to strdup `arg' when used, since there is no reason for
23216 token_buffer not to change.
23217
0f37a994
AD
232182001-11-14 Akim Demaille <akim@epita.fr>
23219
23220 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
23221 definition.
23222 * src/main.c (main): Use them.
23223 Suggested by Hans Aberg.
23224
d39d93b8
AD
232252001-11-12 Akim Demaille <akim@epita.fr>
23226
23227 * src/system.h (ngettext): Now that we use ngettext, be sure to
23228 provide a default definition when NLS are not used.
23229
9edcd895
AD
232302001-11-12 Akim Demaille <akim@epita.fr>
23231
23232 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
23233 Use @kbd to denote user input.
23234 (Language and Grammar): ANSIfy the example.
23235 Adjust its layout for info/notinfo.
23236 (Location Tracking Calc): Output error messages to stderr.
23237 Output locations in a more GNUtically correct way.
23238 Fix a couple of Englishos.
23239 Adjust @group/@end group pairs.
23240
7da99ede
AD
232412001-11-12 Akim Demaille <akim@epita.fr>
23242
e3aa65c5 23243 %expect was not functioning at all.
7da99ede
AD
23244
23245 * src/conflicts.c (expected_conflicts): Set to -1.
23246 (conflict_report): Use ngettext.
23247 (conflicts_print): Check %expect and make its violation an error.
23248 * doc/bison.texinfo (Expect Decl): Adjust.
23249 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
23250 * tests/regression.at (%expect not enough, %expect right)
23251 (%expect too much): New.
23252
ba9dda1a
AD
232532001-11-12 Akim Demaille <akim@epita.fr>
23254
23255 * tests/regression.at (Conflicts): Rename as...
23256 (Unresolved SR Conflicts): this.
23257 (Solved SR Conflicts): New.
23258
337c5bd1
AD
232592001-11-12 Akim Demaille <akim@epita.fr>
23260
23261 * src/reduce.c (print_results): Rename as...
23262 (reduce_output): This.
23263 Output to OUT, passed as argument, instead of output_obstack.
23264 (dump_grammar): Likewise.
23265 (reduce_free): New.
23266 Also free V1.
23267 (reduce_grammar): No longer call reduce_output, since...
23268 * src/print.c (print_results): do it.
23269 * src/main.c (main): Call reduce_free;
23270
c73a41af
AD
232712001-11-12 Akim Demaille <akim@epita.fr>
23272
23273 * src/conflicts.c (print_reductions): Accept OUT as argument.
23274 Output to it, not to output_obstack.
23275 * src/print.c (print_actions): Adjust.
23276
0df87bb6
AD
232772001-11-12 Akim Demaille <akim@epita.fr>
23278
23279 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
23280 the result instead of using...
23281 (src_total, rrc_total, src_count, rrc_count): Remove.
23282 (any_conflicts): Remove.
23283 (print_conflicts): Split into...
23284 (conflicts_print, conflicts_output): New.
23285 * src/conflicts.h: Adjust.
23286 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 23287 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
23288 * tests/regression.at (Conflicts): New.
23289 Reported by Tom Lane.
23290
e4d3d4de
AD
232912001-11-12 Akim Demaille <akim@epita.fr>
23292
23293 * tests/regression.at (Invalid input): Remove, duplicate with
23294 ``Invalid input: 1''.
23295
6d7d248e
AD
232962001-11-12 Akim Demaille <akim@epita.fr>
23297
23298 * tests/torture.at (AT_DATA_STACK_TORTURE)
23299 (Exploding the Stack Size with Alloca)
23300 (Exploding the Stack Size with Malloc): New.
23301
e9e4c321
AD
233022001-11-12 Akim Demaille <akim@epita.fr>
23303
23304 * src/bison.simple (YYSTACK_REALLOC): New.
23305 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 23306 Reported by Per Allansson.
e9e4c321 23307
5f7e0832
AD
233082001-11-12 Pascal Bart <pascal.bart@epita.fr>
23309
23310 * src/bison.simple: Define type yystype instead of YYSTYPE, and
23311 define CPP macro, which substitute YYSTYPE by yystype.
23312 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
23313 with yyltype/YYLTYPE. This allows inclusion of the generated
23314 header within the parser if the compiler, such as GGC, accepts
23315 multiple equivalent #defines.
23316 From Akim.
23317
e3f1699f
AD
233182001-11-05 Akim Demaille <akim@epita.fr>
23319
23320 * src/reader.c (symbols_output): New, extracted from...
23321 (packsymbols): here.
23322 (reader): Adjust.
23323
65be0866
AD
233242001-11-05 Akim Demaille <akim@epita.fr>
23325
23326 * src/lex.c (parse_percent_token): s/quotearg/quote/.
23327
e4d910bf
AD
233282001-11-05 Akim Demaille <akim@epita.fr>
23329
23330 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
23331 pattern.
23332
951366c1
AD
233332001-11-05 Akim Demaille <akim@epita.fr>
23334
23335 * src/options.h (struct option_table_struct): set_flags is void*.
23336 * src/options.c (longopts): Support `--output' and `%output'.
23337 (usage): Adjust.
23338 * src/lex.h (tok_setopt): Remove, replaced with...
23339 (tok_intopt, tok_stropt): these new guys.
23340 * src/lex.c (getopt.h): Not needed.
23341 (token_buffer, unlexed_token_buffer): Not const.
23342 (percent_table): Promote `-' over `_' in directive names.
23343 Active `%name-prefix', `file-prefix', and `output'.
23344 (parse_percent_token): Accept possible arguments to directives.
23345 Promote `-' over `_' in directive names.
23346
d8988b2f
AD
233472001-11-04 Akim Demaille <akim@epita.fr>
23348
23349 * doc/bison.texinfo (Decl Summary): Split the list into
23350 `directives for grammars' and `directives for bison'.
23351 Sort'em.
23352 Add description of `%name-prefix', `file-prefix', and `output'.
23353 Promote `-' over `_' in directive names.
23354 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
23355 Simplify the description of `--name-prefix'.
23356 Promote `-' over `_' in directive names.
23357 Promote `--output' over `--output-file'.
23358 Fix the description of `--defines'.
23359 * tests/output.at: Exercise %file-prefix and %output.
23360
6468d18e
AD
233612001-11-02 Akim Demaille <akim@epita.fr>
23362
23363 * doc/refcard.tex: Update.
23364
6b7e85b9
AD
233652001-11-02 Akim Demaille <akim@epita.fr>
23366
23367 * src/symtab.h (SUNDEF): New.
23368 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
23369 stand for `uninitialized', instead of 0.
23370 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
23371 * src/lex.c (lex): Adjust.
23372
23373 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
23374 Number it 0.
23375 Let yylex return it instead of a plain 0.
23376 Reported by Dick Streefland.
23377
cd5aafcf
AD
233782001-11-02 Akim Demaille <akim@epita.fr>
23379
23380 * tests/regression.at (Mixing %token styles): New test.
23381
037ca2f1
AD
233822001-11-02 Akim Demaille <akim@epita.fr>
23383
23384 * src/reader.c (parse_thong_decl): Formatting changes.
23385 (token_translations_init): New, extracted from...
23386 (packsymbols): Here.
23387 Adjust.
23388
270a173c
AD
233892001-11-01 Akim Demaille <akim@epita.fr>
23390
23391 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
23392 Check that `9foo.y' produces correct cpp guards.
23393 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
23394 guards.
23395 Reported by Wwp.
23396
561f9a30
AD
233972001-11-01 Akim Demaille <akim@epita.fr>
23398
23399 * tests/regression.at (Invalid input: 2): New.
23400 * src/lex.c (unlexed_token_buffer): New.
23401 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
23402 too.
23403 Reported by Wwp.
23404
f987e9d2
AD
234052001-11-01 Akim Demaille <akim@epita.fr>
23406
23407 * tests/calc.at: Catch up with 1.30.
23408 * configure.in: Bump to 1.49a.
23409 Adjust to newer Autotest.
23410
0846f581
PB
234112001-10-19 Pascal Bart <pascal.bart@epita.fr>
23412
23413 * src/conflicts.c: Move global variables rrc_total and src_total ...
23414 (print_conflicts): here.
23415 * src/output.c (output): Free global variable user_toknums.
23416 * src/lex.c (token_obstack): Become static.
23417
3c1a79b3
AD
234182001-10-18 Akim Demaille <akim@epita.fr>
23419
23420 * tests/atlocal.in (GCC): Add.
23421 * tests/calc.at: s/m4_match/m4_bmatch/.
23422 s/m4_patsubst/m4_bpatsubst/.
23423 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
23424 * configure.in: AC_SUBST(GCC).
23425
5d52e7d0
MA
234262001-10-14 Marc Autret <autret_m@epita.fr>
23427
23428 * src/options.c (create_long_option_table): Fix.
23429
631aa1d3
AD
234302001-10-10 Akim Demaille <akim@epita.fr>
23431
23432 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
23433
f6ec6d13
AD
234342001-10-04 Akim Demaille <akim@epita.fr>
23435
23436 * src/reader.c (parse_union_decl): Push the caracters in
23437 union_obstack, not attrs_obstack.
23438
342b8b6e
AD
234392001-10-04 Akim Demaille <akim@epita.fr>
23440
23441 Merge in the branch 1.29.
23442
23443 * src/reader.c (packsymbols): Use a temporary obstack for
23444 `%%tokendef', since output_stack is already used elsewhere.
23445
23446 2001-10-02 Akim Demaille <akim@epita.fr>
23447
23448 Bump 1.29d.
23449
23450 2001-10-02 Akim Demaille <akim@epita.fr>
23451
23452 Version 1.29c.
23453
23454 2001-10-02 Akim Demaille <akim@epita.fr>
23455
23456 * tests/regression.at (Invalid CPP headers): New.
23457 From Alexander Belopolsky.
23458 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
23459
23460 2001-10-02 Akim Demaille <akim@epita.fr>
23461
23462 * tests/regression.at (Invalid input): New.
23463 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
23464 Reported by Shura.
23465
23466 2001-10-02 Akim Demaille <akim@epita.fr>
23467
23468 * tests/calc.at: Now that --debug works, the tests must be adjusted.
23469
23470 2001-10-02 Akim Demaille <akim@epita.fr>
23471
23472 * src/output.c (output_parser): Assert `skeleton'.
23473 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
23474 systems.
23475 From Shura.
23476
23477 2001-10-01 Marc Autret <autret_m@epita.fr>
23478
23479 * src/lex.h: Echo modifications.
23480 * src/lex.c (unlex): Parameter is now token_t.
23481 From Hans Aberg.
23482
23483 2001-10-01 Marc Autret <autret_m@epita.fr>
23484
23485 * src/main.c: Include lex.h.
23486 From Hans Aberg.
23487
23488 2001-09-29 Akim Demaille <akim@epita.fr>
23489
23490 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
23491
23492 2001-09-28 Akim Demaille <akim@epita.fr>
23493
23494 * tests/testsuite.at: Update to newer Autotest.
23495 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
23496
23497 2001-09-27 Akim Demaille <akim@epita.fr>
23498
23499 Position independent wrapper.
23500
23501 * tests/bison: Remove.
23502 * tests/bison.in: New.
23503 * configure.in: Adjust.
23504
23505 2001-09-27 Paul Eggert <eggert@twinsun.com>
23506
23507 Port quotearg fixes from tar 1.13.24.
23508
23509 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23510 tm to be declared.
23511 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
23512 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
23513
23514 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
23515 * m4/mbrtowc.m4: New file.
23516 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
23517 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
23518
23519 2001-09-27 Akim Demaille <akim@epita.fr>
23520
23521 Bump to 1.29c.
23522
23523 2001-09-27 Akim Demaille <akim@epita.fr>
23524
23525 Version 1.29b.
23526
23527 2001-09-25 Akim Demaille <akim@epita.fr>
23528
23529 * src/system.h: Include `xalloc.h'.
23530 Remove it from the C files.
23531 * src/files.c (output_files): Free the obstacks.
23532 * src/lex.c (init_lex): Rename as...
23533 (lex_init): this.
23534 (lex_free): New.
23535 * src/main.c (main): Use it.
23536
23537 2001-09-24 Marc Autret <autret_m@epita.fr>
23538
23539 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
23540 to output informations in fout (FILE*).
23541 (open_graph, close_graph): Likewise.
23542 (output_graph, output_edge, output_node): Likewise.
23543 * src/vcg.h: Update function prototypes.
23544 * src/print_graph.c (print_graph): Open output graph file.
23545 (print_actions): Adjust.
23546 * src/files.h: Remove extern declaration.
23547 * src/files.c: Remove graph_obstack declaration.
23548 (open_files): Remove graph_obstack initialization.
23549 (output_files): Remove graph_obstack saving.
23550
23551 2001-09-24 Marc Autret <autret_m@epita.fr>
23552
23553 * src/files.c (compute_output_file_names): Fix.
23554
23555 2001-09-24 Marc Autret <autret_m@epita.fr>,
23556 Akim Demaille <akim@epita.fr>
23557
23558 * src/reader.c (reader): Remove call to free_symtab ().
23559 * src/main.c (main): Call it here.
23560 Include symtab.h.
23561 * src/conflicts.c (initialize_conflicts): Rename as...
23562 (solve_conflicts): this.
23563 * src/print.c (print_core, print_actions, print_state)
23564 (print_grammar): Dump to a file instead a `output_obstack'.
23565 (print_results): Dump `output_obstack', and then proceed with the
23566 FILE *.
23567 * src/files.c (compute_output_file_names, close_files): New.
23568 (output_files): Adjust.
23569 * src/main.c (main): Adjust.
23570
23571 2001-09-23 Marc Autret <autret_m@epita.fr>
23572
23573 * src/files.c (compute_header_macro): Computes header macro name
23574 from spec_defines_file when given.
23575
23576 2001-09-23 Marc Autret <autret_m@epita.fr>
23577
23578 * src/files.c (output_files): Add default extensions.
23579
23580 2001-09-22 Akim Demaille <akim@epita.fr>
23581
23582 * src/conflicts.c (finalize_conflicts): Rename as...
23583 (free_conflicts): this.
23584
23585 2001-09-22 Akim Demaille <akim@epita.fr>
23586
23587 * src/gram.c (gram_free): Rename back as...
23588 (dummy): this.
23589 (output_token_translations): Free `token_translations'.
23590 * src/symtab.c (free_symtab): Free the tag field.
23591
23592 2001-09-22 Akim Demaille <akim@epita.fr>
23593
23594 Remove `translations' as it is always set to true.
23595
23596 * src/gram.h: Adjust.
23597 * src/reader.c (packsymbols, parse_token_decl): Adjust
23598 * src/print.c (print_grammar): Adjust.
23599 * src/output.c (output_token_translations): Adjust.
23600 * src/lex.c (lex): Adjust.
23601 * src/gram.c: Be sure the set pointers to NULL.
23602 (dummy): Rename as...
23603 (gram_free): this.
23604
23605 2001-09-22 Akim Demaille <akim@epita.fr>
23606
23607 * configure.in: Invoke AM_LIB_DMALLOC.
23608 * src/system.h: Use dmalloc.
23609 * src/LR0.c: Be sure to have pointers initialized to NULL.
23610 (allocate_itemsets): Allocate kernel_items only if needed.
23611
23612 2001-09-22 Akim Demaille <akim@epita.fr>
23613
23614 * configure.in: Bump to 1.29b.
23615 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
23616 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
23617 need xmalloc.c in calc.y.
23618 From Pascal Bart.
23619
23620 2001-09-21 Akim Demaille <akim@epita.fr>
23621
23622 Version 1.29a.
23623 * Makefile.maint, config/config.guess, config/config.sub,
23624 * config/missing: Update from masters.
23625 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
23626 upon package.m4.
23627 * configure.in (ALL_LINGUAS): Add `tr'.
23628
23629 2001-09-21 Akim Demaille <akim@epita.fr>
23630
23631 * tests/Makefile.am (package.m4): Move to...
23632 ($(srcdir)/$(TESTSUITE)): here.
23633
23634 2001-09-20 Akim Demaille <akim@epita.fr>
23635
23636 * src/complain.c: No longer try to be standalone: use system.h.
23637 Don't assume __STDC__ is defined to 1. Just test if it is defined.
23638 * src/complain.h: Likewise.
23639 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
23640 Remove the unused variable `n'.
23641 From Albert Chin-A-Young.
23642
23643 2001-09-18 Marc Autret <autret_m@epita.fr>
23644
23645 * doc/bison.1: Update.
23646 * doc/bison.texinfo (Bison Options): Update --defines and --graph
23647 descriptions.
23648 (Option Cross Key): Update.
23649 Add --graph.
23650
23651 2001-09-18 Marc Autret <autret_m@epita.fr>
23652
23653 * tests/regression.at: New test (comment in %union).
23654
23655 2001-09-18 Marc Autret <autret_m@epita.fr>
23656
23657 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
23658 do that.
23659 Reported by Keith Browne.
23660
23661 2001-09-18 Marc Autret <autret_m@epita.fr>
23662
23663 * tests/output.at: Add tests for --defines and --graph.
23664
23665 2001-09-18 Marc Autret <autret_m@epita.fr>
23666
23667 * tests/output.at: Removes tests of %{header,src}_extension features.
23668
23669 2001-09-18 Akim Demaille <akim@epita.fr>
23670
23671 * tests/Makefile.am (package.m4): New.
23672 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
23673 (_AT_CHECK_CALC_ERROR): Likewise.
23674 Factor the `, ' part of verbose error messages.
23675
23676 2001-09-18 Marc Autret <autret_m@epita.fr>
23677
23678 * src/getargs.c (longopts): Declare --defines and --graph as options
23679 with optional arguments.
23680 * src/files.h: Add extern declarations.
23681 * src/files.c (spec_graph_file, spec_defines_file): New.
23682 (output_files): Update.
23683 Remove CPP-outed code.
23684
23685 2001-09-18 Marc Autret <autret_m@epita.fr>
23686
23687 Turn off %{source,header}_extension feature.
23688
23689 * src/files.c (compute_exts_from_gf): Update.
23690 (compute_exts_from_src): Update.
23691 (output_files): CPP-out useless code.
23692 * src/files.h: Remove {header,source}_extension extern declarations.
23693 * src/reader.c (parse_dquoted_param): CPP-out.
23694 (parse_header_extension_decl): Remove.
23695 (parse_source_extension_decl): Remove.
23696 (read_declarations): Remove cases tok_{hdrext,srcext}.
23697 * src/lex.c (percent_table): Remove {header,source}_extension entries.
23698 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
23699
23700 2001-09-10 Akim Demaille <akim@epita.fr>
23701
23702 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
23703 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
23704 (AT_CHECK_OUTPUT): this.
23705 Merely check ls' exit status, its output is useless.
23706
23707 2001-09-10 Akim Demaille <akim@epita.fr>
23708
23709 * tests/calc.at: Use m4_match.
23710 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
23711
23712 2001-09-10 Marc Autret <autret_m@epita.fr>,
23713 Akim Demaille <akim@epita.fr>
23714
23715 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
23716 enum color_e.
23717 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
23718 to `normal'.
23719 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
23720 * src/lex.h: Adjust prototype.
23721 (token_t): Add `tok_undef'.
23722 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
23723 (parse_percent_token): Now returns token_t.
23724 Add default statement in switch.
23725 (lex): Separate `c' as an input variable, from the token_t result
23726 part.
23727 (unlexed): Is a token_t.
23728
23729 2001-09-10 Akim Demaille <akim@epita.fr>
23730
23731 * configure.in: Bump to 1.29a.
23732
23733 2001-09-07 Akim Demaille <akim@epita.fr>
23734
23735 Version 1.29.
23736
23737 2001-08-30 Akim Demaille <akim@epita.fr>
23738
23739 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
23740 * m4/atconfig.m4: Remove.
23741 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
23742 * tests/bison: New.
23743 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
23744 m4_if, m4_patsubst, and m4_regexp.
23745 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
23746 `input' file instead of echo.
23747
23748 2001-08-29 Akim Demaille <akim@epita.fr>
23749
23750 Bump to 1.28e.
23751
23752 2001-08-29 Akim Demaille <akim@epita.fr>
23753
23754 Version 1.28d.
23755
23756 2001-08-29 Paul Eggert <eggert@twinsun.com>
23757
23758 * src/bison.simple (yyparse): Don't take the address of an
23759 item before the start of an array, as that doesn't conform to
23760 the C Standard.
23761
23762 2001-08-29 Robert Anisko <anisko_r@epita.fr>
23763
23764 * doc/bison.texinfo (Location Tracking Calc): New node.
23765
23766 2001-08-29 Paul Eggert <eggert@twinsun.com>
23767
23768 * src/output.c (output): Do not define const, as this now
23769 causes more problems than it cures.
23770
23771 2001-08-29 Akim Demaille <akim@epita.fr>
23772
23773 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
23774 the nodes.
23775 Be sure to tag the `detailmenu'.
23776
23777 2001-08-29 Akim Demaille <akim@epita.fr>
23778
23779 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
23780 download in a tmp dir.
23781
23782 2001-08-28 Marc Autret <autret_m@epita.fr>
23783
23784 * config/depcomp: New file.
23785
23786 2001-08-28 Marc Autret <autret_m@epita.fr>
23787
23788 * doc/bison.1 (mandoc): Adjust.
23789 From Juan Manuel Guerrero.
23790
23791 2001-08-28 Marc Autret <autret_m@epita.fr>
23792
23793 * src/print_graph.c (print_state): Fix.
23794
23795 2001-08-27 Marc Autret <autret_m@epita.fr>
23796
23797 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
23798 char * members.
23799 Echo modifications to the functions prototypes.
23800 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
23801
23802 2001-08-27 Marc Autret <autret_m@epita.fr>
23803
23804 * src/vcg.c: Include `xalloc.h'.
23805 (add_colorentry): New.
23806 (add_classname): New.
23807 (add_infoname): New.
23808 * src/vcg.h: Add new prototypes.
23809
23810 2001-08-27 Akim Demaille <akim@epita.fr>
23811
23812 * Makefile.maint: Sync. again with CVS Autoconf.
23813
23814 2001-08-27 Akim Demaille <akim@epita.fr>
23815
23816 * Makefile.maint: Formatting changes.
23817 (po-update, cvs-update, update): New targets.
23818 (AMTAR): Remove.
23819
23820 2001-08-27 Akim Demaille <akim@epita.fr>
23821
23822 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23823 * Makefile.maint: Sync. with CVS Autoconf.
23824
23825 2001-08-27 Marc Autret <autret_m@epita.fr>
23826
23827 * src/vcg.h (struct infoname_s): New.
23828 (struct colorentry_s): New.
23829 (graph_s): New fields {vertical,horizontal}_order in structure.
23830 Add `infoname' field.
23831 Add `colorentry' field;
23832 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
23833 (G_HORIZONTAL_ORDER): New.
23834 (G_INFONAME): New.
23835 (G_COLORENTRY): New.
23836 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
23837 Add output of `infoname'.
23838 Add output of `colorentry'.
23839
23840 2001-08-27 Marc Autret <autret_m@epita.fr>
23841
23842 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
23843 This one shadowed a global parameter.
23844
23845 2001-08-24 Marc Autret <autret_m@epita.fr>
23846
23847 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
23848 instead of `unsigned'.
23849 (print_state): Do not call obstack_object_size () in obstack_grow ()
23850 to avoid macro variables shadowing.
23851
23852 2001-08-23 Marc Autret <autret_m@epita.fr>
23853
23854 * src/lex.c (percent_table): Typo: s/naem/name/.
23855 Add graph option.
23856 Normalize new options declarations.
23857
23858 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
23859
23860 * tests/suite.at: Exercise %header_extension and %source_extension.
23861
23862 2001-08-16 Marc Autret <autret_m@epita.fr>
23863
23864 * src/reader.c (parse_dquoted_param): New.
23865 (parse_header_extension_decl): Use it.
23866 (parse_source_extension_decl): Likewise.
23867
23868 2001-08-16 Marc Autret <autret_m@epita.fr>
23869
23870 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
23871 (get_xxxx_str): Use assert () instead of complain ().
23872 Remove return invokations in default cases.
23873 (get_decision_str): Modify default behaviour. Remove second argument.
23874 Echo modifications on calls.
23875 (output_graph): Fix.
23876
23877 2001-08-16 Marc Autret <autret_m@epita.fr>
23878
23879 * src/getargs.c (usage): Update with ``-g, --graph''.
23880
23881 2001-08-16 Marc Autret <autret_m@epita.fr>
23882
23883 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
23884 (Option Cross Key): Likewise.
23885 * doc/bison.1: Update.
23886
1c8c2190
PB
238872001-09-25 Pascal Bart <pascal.bart@epita.fr>
23888
23889 * src/output.c (output_master_parser): Don't finish action_obstack.
23890 (output_parser): Don't care about the muscle action, here.
23891 (prepare): Copy the action_obstack in the action muscle.
23892 (output): Free action_obstack.
23893
180d45ba
PB
238942001-09-23 Pascal Bart <pascal.bart@epita.fr>
23895
23896 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
23897 will contain `%union' declaration.
23898 (parse_union_decl): Delete #line directive output.
23899 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
23900 informations about %union.
23901 (parse_union_decl): Copy the union_obstack in the muscle stype.
23902 * src/bison.simple: Add new #line directive.
23903 Add typdef %%stype YYSTYPE.
23904
c51d1a19
PB
239052001-09-23 Pascal Bart <pascal.bart@epita.fr>
23906
23907 * src/bison.simple: Add new `#line' directive.
23908
6f9344da
PB
239092001-09-22 Pascal Bart <pascal.bart@epita.fr>
23910
23911 * src/bison.simple: New `#line' directive.
23912 * src/output.c (output_parser): Support new dynamic muscle input_line.
23913
652def80
MA
239142001-09-22 Marc Autret <autret_m@epita.fr>
23915
23916 * src/output.c (output_master_parser): New.
23917 (output_parser): Be more re-entrant.
23918
25b222fa
MA
239192001-09-21 Marc Autret <autret_m@epita.fr>
23920
23921 * src/reader.c (copy_definition, parse_union_decl): Update and use
23922 `linef' muscle.
23923 (copy_action): Likewise.
23924 Use obstack_1grow ().
23925 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
23926
6bc35ae5
MA
239272001-09-21 Marc Autret <autret_m@epita.fr>
23928
23929 * src/options.c (option_table): Adjust.
23930 * src/lex.c (parse_percent_token): Fix.
23931
c0629aa1
PB
239322001-09-20 Pascal Bart <pascal.bart@epita.fr>
23933
23934 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 23935
82b6d266
PB
239362001-09-20 Pascal Bart <pascal.bart@epita.fr>
23937
23938 * src/lex.c (parse_percent_token): Change type of variable `tx', which
23939 is now an option_table_struct*.
23940 (option_strcmp): New function option_strcmp.
23941 (parse_percent_token): Call option_strcmp.
23942 * src/getargs.c (xalloc.h, options.h): Include it.
23943 (getargs): Call create_long_option_table.
23944 (getargs): Free longopts at the end of the function.
23945 (shortopts): Move in options.c.
23946 * src/options.c (create_long_option_table): New function. Convert
23947 information from option_table to option structure.
23948 * src/reader.c (options.h): Include it.
23949
23950 * src/Makefile.am: Adjust.
23951 * src/options.c (option_table): Create from longopts and percent_table.
23952 * src/getargs.c (longopts): Delete.
23953 * src/lex.c (struct percent_table_struct): Delete.
23954 (percent_table): Delete.
23955 (options.h): Include it.
23956 * src/options.c: Create.
23957 * src/options.h: Create.
23958 Declare enum opt_access_e.
23959 Define struct option_table_struct.
23960
75f5aaea
MA
239612001-09-20 Marc Autret <autret_m@epita.fr>
23962
23963 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
23964 sections of Bison.
23965
f508cb0a
PB
239662001-09-19 Pascal Bart <pascal.bart@epita.fr>
23967
23968 * src/bison.simple: s/%%filename/%%skeleton.
23969 * src/muscle_tab.c (getargs.h): Include it.
23970 (muscle_init): Insert new muscle skeleton.
23971
13105fc1
PB
239722001-09-18 Pascal Bart <pascal.bart@epita.fr>
23973
23974 * src/output.c (output_parser): Delete unused variable actions_dumped.
23975
b0c4483e
PB
239762001-09-07 Pascal Bart <pascal.bart@epita.fr>
23977
23978 * src/output.c (output): Delete call to reader_output_yylsp.
23979 * src/reader.c (reader): Likewise.
ba0fe3c7 23980 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 23981
11d82f03
MA
239822001-09-02 Marc Autret <autret_m@epita.fr>
23983
23984 * src/reader.c: Include muscle_tab.h.
23985 (parse_union_decl): Update.
23986 (parse_macro_decl): Rename parse_muscle_decl.
23987 Update to use renamed functions and variable.
23988 (read_declarations, copy_action, read_additionnal_code, : Updated
23989 with correct variables and functions names.
23990 (packsymbols, reader): Likewise.
342b8b6e 23991
11d82f03 23992 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 23993
11d82f03
MA
23994 * src/output.c: Include muscle_tab.h
23995 In all functions using macro_insert, change by using muscle_insert ().
23996 (macro_obstack): Rename muscle_obstack.
23997 Echo modifications in the whole file.
23998 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
23999 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
24000 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
24001
24002 * src/muscle_tab.h: Update double inclusion macros.
24003 (macro_entry_s): Rename muscle_entry_s.
24004 Update prototypes.
342b8b6e 24005
11d82f03
MA
24006 * src/muscle_tab.c: Include muscle_tab.h.
24007 Rename macro_tabble to muscle_table.
24008 (mhash1, mhash2, mcmp): Use muscle_entry.
24009 (macro_init): Rename muscle_init. Update.
24010 (macro_insert): Rename muscle_insert. Update.
24011 (macro_find): Rename muscle_find. Update.
24012
24013 * src/main.c: Include muscle_tab.h.
24014 (main): Call muscle_init ().
24015 * src/Makefile.am (bison_SOURCES): Echo modifications.
24016
93a37297
MA
240172001-09-02 Marc Autret <autret_m@epita.fr>
24018
f753cd62 24019 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 24020
f753cd62
MA
24021 * src/muscle_tab.c, src/muscle_tab.h: Add files.
24022
240232001-09-02 Marc Autret <autret_m@epita.fr>
24024
24025 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 24026
682d48cd
PB
240272001-09-01 Pascal Bart <pascal.bart@epita.fr>
24028
342b8b6e 24029 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
24030 filename.
24031
087c8fda
MA
240322001-09-01 Marc Autret <autret_m@epita.fr>
24033
24034 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
24035 to an explicit value to activate the feature. We do it here.
24036
dda680cb
PB
240372001-08-31 Pascal Bart <pascal.bart@epita.fr>
24038
24039 * src/output.c (prepare): Delete the `filename' muscule insertion.
24040 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
24041 (parse_union_decl): Likewise.
24042 * src/macrotab.c (macro_init): Initialize filename by infile.
24043
9e644e64
MA
240442001-08-31 Marc Autret <autret_m@epita.fr>
24045
24046 * src/bison.simple (YYLSP_NEEDED): New definition.
24047 * src/output.c (prepare): Add macro insertion of `locations_flag'
24048
17da6427
PB
240492001-08-31 Pascal Bart <pascal.bart@epita.fr>
24050
24051 * src/output.c (prepare): Delete insertion of previous muscles,
24052 and insert the `prefix' muscles.
24053 * src/macrotab.c (macro_init): Likewise.
24054 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 24055 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
24056 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
24057 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 24058 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
24059 name_prefix.
24060
e8cb70b9
PB
240612001-08-31 Pascal Bart <pascal.bart@epita.fr>
24062
24063 * src/main.c (main): Standardize.
24064 * src/output.c (output_table_data, output_parser): Likewise.
24065 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
24066
63c2d5de
MA
240672001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
24068
342b8b6e 24069 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
24070 %%epilogue.
24071 * src/output.c (output): Rename %%declarations to %%prologue.
24072 * src/bison.simple: Echo modifications.
342b8b6e 24073
d8cb5183
MA
240742001-08-31 Marc Autret <autret_m@epita.fr>
24075
24076 * src/reader.c (readgram): CleanUp.
24077 (output_token_defines): Likewise.
24078 (packsymbols): Likewise.
24079 (reader): Likewise.
24080 * src/output.c (output): CPP-out useless code.
24081
6c686258
PB
240822001-08-31 Pascal Bart <pascal.bart@epita.fr>
24083
342b8b6e 24084 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
24085 output_trailers and output_headers.
24086 * src/output.h: Remove obsolete functions prototypes of output_headers
24087 and output_trailers.
24088
8f451ef7
PB
240892001-08-30 Pascal Bart <pascal.bart@epita.fr>
24090
24091 * src/main.c: Include macrotab.h.
342b8b6e 24092 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
24093 Adjust functions prototypes.
24094 * src/macrotab.c (macro_insert): Constify key and value.
24095 (macro_find): Constify key.
24096 (macro_insert): Include 'xalloc.h'
24097 (macro_insert): Use XMALLOC.
24098 (macro_find): Constify return value.
24099 * src/output.c (output_table_data): Rename table to table_data.
24100 (output_parser): Constify macro_key, macro_value.
24101
997b6fd0 241022001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
24103
24104 * src/reader.c (parse_skel_decl): New.
342b8b6e 24105 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
24106 * src/lex.h (token_t): New token `tok_skel'.
24107 * src/lex.c (percent_table): Add skeleton option entry.
24108 Standardize.
24109
ff48177d
MA
241102001-08-29 Marc Autret <autret_m@epita.fr>
24111
24112 * src/bison.simple: Add %%user_code directive at the end.
24113 * src/reader.c (read_additionnal_code): New.
24114 (reader): Use it.
24115 * src/output.c (output_program): Remove.
24116 (output): Update.
24117
b33160bf
MA
241182001-08-28 Marc Autret <autret_m@epita.fr>
24119
24120 * src/output.c (output_actions): Clean up.
4e5caae2 24121 (output_gram): CPP-out useless code.
b33160bf
MA
24122 * src/reader.c (reader): Clean up, CPP-out useless code.
24123
d1a2daf7
PB
241242001-08-28 Pascal Bart <pascal.bart@epita.fr>
24125
342b8b6e 24126 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 24127 directive.
d1a2daf7
PB
24128 * src/bison.simple: Add `%%definitions'.
24129
2b763dfe
MA
241302001-08-28 Marc Autret <autret_m@epita.fr>
24131
24132 * config/depcomp: New file.
24133
f1a87ef6
PE
241342001-08-27 Paul Eggert <eggert@twinsun.com>
24135
24136 * src/bison.simple (yyparse): Don't take the address of an
24137 item before the start of an array, as that doesn't conform to
24138 the C Standard.
24139
82e236e2
RA
241402001-08-27 Robert Anisko <robert.anisko@epita.fr>
24141
f1a87ef6 24142 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
24143 obstack. It was done too late here.
24144
24145 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
24146 completely wrong.
24147 (reader): Initialize the macro obstack here, since we need it to grow
24148 '%define' directives.
24149
24150 * src/reader.h: Declare the macro obstack as extern.
24151
b0cfa28a
RA
241522001-08-27 Robert Anisko <robert.anisko@epita.fr>
24153
24154 * src/output.c (output_parser): Fix. Store single '%' characters in
24155 the output obstack instead of throwing them away.
24156
6fc74234
AD
241572001-08-27 Akim Demaille <akim@epita.fr>
24158
24159 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
24160
9c76d118
RA
241612001-08-25 Robert Anisko <robert.anisko@epita.fr>
24162
24163 * lib/Makefile.am: Adjust.
24164
a8289c62
RA
241652001-08-25 Robert Anisko <robert.anisko@epita.fr>
24166
24167 * src/bison.simple: Update and add '%%' directives.
24168
b6610515
RA
241692001-08-25 Robert Anisko <robert.anisko@epita.fr>
24170
24171 * src/reader.c (reader): Remove calls to 'output_headers' and
24172 'output_trailers'. Remove some C output.
24173 (readgram): Disable a piece of code that was writing a default
24174 definition for 'YYSTYPE'.
24175 (reader_output_yylsp): Remove.
24176 (packsymbols): Output token defintions to a macro.
24177 (copy_definition): Disable C output.
6fc74234 24178
b6610515
RA
24179 * src/reader.c (parse_macro_decl): New function used to parse macro
24180 declarations.
24181 (copy_string2): Put the body of copy_string into this new function.
24182 Add a parameter to let the caller choose whether he wants to copy the
24183 string delimiters or not.
24184 (copy_string): Be a simple call to copy_string2 with the last argument
24185 bound to true.
24186 (read_declarations): Add case for macro definition.
24187 (copy_identifier): New.
6fc74234 24188 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
24189 rather than lex.
24190
26f609ff
RA
241912001-08-25 Robert Anisko <robert.anisko@epita.fr>
24192
24193 * src/output.c (prepare): Add prefixed names.
24194 (output_parser): Output semantic actions.
24195 (output_parser): Fix bug on '%%line' directives.
6fc74234 24196
26f609ff
RA
24197 * src/output.c (output_headers): Remove. The C code printed by this
24198 function should now be in the skeletons.
24199 (output_trailers): Remove.
24200 (output): Disable call to 'reader_output_yylsp'.
24201 (output_rule_data): Do not output tables to the table obstack.
24202
24203 * src/output.c: Remove some C dedicated output.
24204 Improve the use of macro and output obstacks.
24205 (output_defines): Remove.
6fc74234 24206
26f609ff
RA
24207 * src/output.c (output_token_translations): Associate 'translate'
24208 table with a macro. No output to the table obstack.
24209 (output_gram): Same for 'rhs' and 'prhs'.
24210 (output_stos): Same for 'stos'.
24211 (output_rule_data): Same for 'r1' and 'r2'.
24212 (token_actions): Same for 'defact'.
24213 (goto_actions): Same for 'defgoto'.
24214 (output_base): Same for 'pact' and 'pgoto'.
24215 (output_table): Same for 'table'.
24216 (output_check): Same for 'check'.
6fc74234 24217
26f609ff
RA
24218 * src/output.c (output_table_data): New function.
24219 (output_short_table): Remove.
24220 (output_short_or_char_table): Remove.
6fc74234 24221
26f609ff
RA
24222 * src/output.c (output_parser): Replace most of the skeleton copy code
24223 with something new. Skeletons are now processed character by character
24224 rather than line by line, and Bison looks for '%%' macros. This is the
24225 first step in making Bison's output process (a lot) more flexible.
24226 (output_parser): Use the macro table.
24227
6f43b113
RA
242282001-08-25 Robert Anisko <robert.anisko@epita.fr>
24229
24230 * src/main.c (main): Initialize the macro table.
24231
dd3127cf
RA
242322001-08-25 Robert Anisko <robert.anisko@epita.fr>
24233
24234 * src/lex.c (percent_table): Add tok_define.
24235 * src/lex.h: Add tok_define.
24236
aa321494
RA
242372001-08-25 Robert Anisko <robert.anisko@epita.fr>
24238
24239 * src/macrotab.c: New file.
24240 * src/macrotab.h: New file.
24241 * src/Makefile.am: Update.
24242
68bd3b6b
RA
242432001-08-25 Robert Anisko <robert.anisko@epita.fr>
24244
24245 * lib/hash.c: New file.
24246 * lib/hash.h: New file.
24247 * lib/Makefile.am: Update.
24248
45f8dd1e
AD
242492001-08-15 Akim Demaille <akim@epita.fr>
24250
24251 Version 1.28c.
24252
40a64a7a 242532001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
24254
24255 * src/reader.c (readgram): Indent output macro YYSTYPE.
24256 (packsymbols): Likewise.
24257 (output_token_defines): Likewise.
24258 * src/files.c: Standardize.
24259 (compute_header_macro): New.
24260 (defines_obstack_save): New. Use compute_header_macro.
24261 (output_files): Update. Use defines_obstack_save.
24262
f9a8293a
AD
242632001-08-15 Akim Demaille <akim@epita.fr>
24264
24265 * doc/bison.texinfo (Table of Symbols): Document
24266 YYSTACK_USE_ALLOCA.
24267
150ca7a7
AD
242682001-08-15 Akim Demaille <akim@epita.fr>
24269
24270 * missing: Update from CVS Automake.
24271 * config/config.guess, config/config.sub, config/texinfo.tex:
24272 Update from gnu.org.
24273
69b5cec4
AD
242742001-08-15 Akim Demaille <akim@epita.fr>
24275
24276 * Makefile.maint: Sync with CVS Autoconf.
24277
f2b5126e
PB
242782001-08-14 Pascal Bart <pascal.bart@epita.fr>
24279
69b5cec4 24280 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
24281 `fdl.texi'.
24282 * doc/fdl.texi: Add to package.
24283
4ecbf796
MA
242842001-08-14 Marc Autret <autret_m@epita.fr>
24285
24286 Turn on %{source,header}_extension features.
24287
69b5cec4 24288 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
24289 source_extension.
24290 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 24291 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
24292 between options.
24293
95fb5662
MA
242942001-08-14 Marc Autret <autret_m@epita.fr>
24295
24296 * src/files.c (compute_base_names): Add extensions computing when
24297 `--file-prefix' used.
24298 Standardize function calls.
24299
78d09da9
MA
243002001-08-13 Marc Autret <autret_m@epita.fr>
24301
69b5cec4 24302 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
24303 defining it (defined but null disables alloca).
24304
5a009f2c
MA
243052001-08-13 Marc Autret <autret_m@epita.fr>
24306
24307 * src/bison.simple (_yy_memcpy): CPP reformat.
24308
1e41465a
PB
243092001-08-13 Pascal Bart <pascal.bart@epita.fr>
24310
24311 * tests/atconfig.in (CPPFLAGS): Fix.
24312
c67a198d
PB
243132001-08-10 Pascal Bart <pascal.bart@epita.fr>
24314
79282c6c 24315 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
24316 `gpl.texi'.
24317 * doc/gpl.texi: Add to package.
24318
09a6de7e
MA
243192001-08-10 Marc Autret <autret_m@epita.fr>
24320
24321 * src/print_graph.h: Fix.
24322 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
24323
b77b9ee0
AD
243242001-08-10 Akim Demaille <akim@epita.fr>
24325
24326 * src/system.h: Provide default declarations for stpcpy, strndup,
24327 and strnlen.
24328
3e259915
MA
243292001-08-10 Robert Anisko <anisko_r@epita.fr>
24330
24331 * doc/bison.texinfo (Locations): Update @$ stuff.
24332
ca96bc2d
MA
243332001-08-09 Robert Anisko <anisko_r@epita.fr>
24334
24335 * src/bison.simple (YYLLOC_DEFAULT): Update.
24336 (yyparse): Adjust.
24337
fdc6758b
MA
243382001-08-08 Marc Autret <autret_m@epita.fr>
24339
b77b9ee0 24340 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
24341 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
24342 Reported by Fabrice Bauzac.
957d4dbf 24343
600cad3b
MA
243442001-08-08 Marc Autret <autret_m@epita.fr>
24345
24346 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
24347 * src/vcg.c (output_node): Fix.
24348 * src/vcg.h: Cleanup.
24349 * src/print_graph.c: Add comments.
b77b9ee0 24350 (node_output_size): New global variable. Simplify the formatting of
600cad3b 24351 the VCG graph output.
b77b9ee0 24352 (print_actions): Unused code is now used. It notifies the final state
600cad3b 24353 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 24354 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
24355 blue.
24356 Get the current node name and node_obstack by argument.
24357 (node_obstack): New variable.
24358 (print_state): Manage node_obstack.
24359 (print_core): Use node_obstack given by argument.
24360 A node is not only computed here but in print_actions also.
24361 (print_graph): CPP out useless code instead of commenting it.
24362
976e528f
AD
243632001-08-07 Pascal Bart <pascal.bart@epita.fr>
24364
24365 * tests/atconfig.in (CPPFLAGS): Fix.
24366
20e8e5ca
AD
243672001-08-07 Akim Demaille <akim@epita.fr>
24368
24369 * src/print_graph.c (quote): New.
24370 (print_core): Use it.
24371
957d4dbf 243722001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 24373
3e3da797
AD
24374 * src/vcg.c (complain.h): Include it.
24375 Unepitaize `return' invocations.
c4b66126 24376 [NDEBUG] (main): Remove.
79282c6c 24377 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
24378 * src/files.c (open_files): Initialize graph_obstack.
24379 * src/print_graph.c (print_actions): CPP out useless code.
24380 (print_core): Don't output the last `\n' in labels.
24381 Use `quote'.
24382 * src/files.c (output_files): Output the VCG file.
24383 * src/main.c (main): Invoke print_graph ();
3e3da797 24384
957d4dbf 243852001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
24386
24387 Automaton VCG graph output.
24388 Using option ``-g'' or long option ``--graph'', you can generate
24389 a gram_filename.vcg file containing a VCG description of the LALR (1)
24390 automaton of your grammar.
24391
24392 * src/main.c: Call to print_graph() function.
24393 * src/getargs.h: Update.
24394 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
24395 (graph_flag): New flag.
24396 (longopts): Update.
24397 (getargs): Add case `g'.
24398 * src/files.c (graph_obstack): New obstack struct.
24399 (open_files): Initialize new obstack.
24400 (output_files): Saves graph_obstack if required.
24401 * src/files.h (graph_obstack): New extern declaration.
24402 * src/Makefile.am: Add new source files.
24403
927c1557 244042001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
24405
24406 * src/print_graph.c, src/print_graph.h (graph): New.
24407 * src/vcg.h: New file.
24408 * src/vcg.c: New file, VCG graph handling.
24409
7333d403
AD
244102001-08-06 Marc Autret <autret_m@epita.fr>
24411
24412 Add of %source_extension and %header_extension which specify
24413 the source or/and the header output file extension.
24414
24415 * src/files.c (compute_base_names): Remove initialisation of
24416 src_extension and header_extension.
24417 (compute_exts_from_gf): Update.
24418 (compute_exts_from_src): Update.
24419 (output_files): Update.
24420 * src/reader.c (parse_header_extension_decl): New.
24421 (parse_source_extension_decl): New.
24422 (read_declarations): New case statements for the new tokens.
24423 * src/lex.c (percent_table): Add entries for %source_extension
24424 and %header_extension.
24425 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
24426
84163231
AD
244272001-08-06 Marc Autret <autret_m@epita.fr>
24428
24429 * configure.in: Bump to 1.28c.
24430 * doc/bison.texinfo: Texinfo thingies.
24431
8303fc42
AD
244322001-08-04 Pascal Bart <pascal.bart@epita.fr>
24433
24434 * tests/atconfig.in (CPPFLAGS): Add.
24435 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
24436
70a84437
AD
244372001-08-03 Akim Demaille <akim@epita.fr>
24438
24439 Version 1.28b.
24440
2ce10144
AD
244412001-08-03 Akim Demaille <akim@epita.fr>
24442
24443 * tests/Makefile.am (check-local): Ship testsuite.
24444 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
24445 Include `string.h'.
24446
1e3e4bc1
AD
244472001-08-03 Akim Demaille <akim@epita.fr>
24448
24449 * configure.in: Try using -Wformat when compiling.
24450
42b45b7f
AD
244512001-08-03 Akim Demaille <akim@epita.fr>
24452
24453 * configure.in: Bump to 1.28b.
24454
8f13fe33
AD
244552001-08-03 Akim Demaille <akim@epita.fr>
24456
24457 * src/complain.c: Adjust strerror_r portability issues.
24458
b37ba92c
AD
244592001-08-03 Akim Demaille <akim@epita.fr>
24460
24461 Version 1.28a.
24462
b0ce6046
AD
244632001-08-03 Akim Demaille <akim@epita.fr>
24464
24465 * src/getargs.c, src/getarg.h (skeleton)): Constify.
24466 * src/lex.c (literalchar): Avoid name clashes on `buf'.
24467 * src/getargs.c: Include complain.h.
24468 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
24469 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
24470
d01c415b
AD
244712001-08-03 Akim Demaille <akim@epita.fr>
24472
24473 * src/reader.c (readgram): Display hidden chars in error messages.
24474
459dd1a6
AD
244752001-08-03 Akim Demaille <akim@epita.fr>
24476
24477 Update to gettext 0.10.39.
24478
53b74c0c
AD
244792001-08-03 Akim Demaille <akim@epita.fr>
24480
24481 * lib/strspn.c: New.
24482
234a3be3
AD
244832001-08-01 Marc Autret <autret_m@epita.fr>
24484
24485 * doc/bison.texinfo: Update.
24486 * doc/bison.1 (mandoc): Update.
24487 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
24488 * src/files.c: Support output files extensions computing.
24489 (src_extension): New static variable.
24490 (header_extension): New static variable.
24491 (tr): New function.
24492 (get_extension_index): New function, gets the index of an extension
24493 filename in a string.
24494 (compute_exts_from_gf): New function, computes extensions from the
24495 grammar file extension.
24496 (compute_exts_from_src): New functions, computes extensions from the
24497 C source file extension, file given by ``-o'' option.
24498 (compute_base_names): Update.
24499 (output_files): Update.
24500
847bf1f5
AD
245012001-08-01 Robert Anisko <anisko_r@epita.fr>
24502
d995fee7 24503 * doc/bison.texi: Document @$.
847bf1f5
AD
24504 (Locations): New section.
24505
d074a105
AD
245062001-07-18 Akim Demaille <akim@epita.fr>
24507
24508 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
24509 * config/prev-version.txt, config/move-if-change: New.
24510 * Makefile.am: Adjust.
24511
3419715d
AD
245122001-07-08 Pascal Bart <pascal.bart@epita.fr>
24513
24514 * src/bison.simple (yyparse): Suppress warning `comparaison
24515 between signed and unsigned'.
24516
62ab6972
AD
245172001-07-05 Pascal Bart <pascal.bart@epita.fr>
24518
24519 * src/getargs.h (raw_flag): Remove.
24520 * src/getargs.c: Die on `-r'/`--raw'.
24521 * src/lex.c (parse_percent_token): Die on `%raw'.
24522 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
24523 * tests/calc.at: Suppress test with option `--raw'.
24524
1e24cc5b
AD
245252001-07-14 Akim Demaille <akim@epita.fr>
24526
24527 * config/: New.
24528 * configure.in: Require Autoconf 2.50.
24529 Update to gettext 0.10.38.
24530
32dfccf8
AD
245312001-03-16 Akim Demaille <akim@epita.fr>
24532
24533 * doc/bison.texinfo: ANSIfy the examples.
24534
cd5bd6ac
AD
245352001-03-16 Akim Demaille <akim@epita.fr>
24536
24537 * getargs.c (skeleton): New variable.
24538 (longopts): --skeleton is a new option.
24539 (shortopts, getargs): -S is a new option.
24540 * getargs.h: Declare skeleton.
24541 * output.c (output_parser): Use it.
24542
5141b016
AD
245432001-03-16 Akim Demaille <akim@epita.fr>
24544
24545 * m4/strerror_r.m4: New.
24546 * m4/error.m4: Run AC_FUNC_STRERROR_R.
24547 * lib/error.h, lib/error.c: Update.
24548
447992b9
AD
245492001-03-16 Akim Demaille <akim@epita.fr>
24550
24551 * src/getargs.c (longopts): Clean up.
24552
274d42ce
AD
245532001-02-21 Akim Demaille <akim@epita.fr>
24554
24555 * src/reader.c (gensym): `gensym_count' is your own.
24556 Use a static buf to create the symbol name, as token_buffer is no
24557 longer a buffer.
24558
22c821f3
AD
245592001-02-08 Akim Demaille <akim@epita.fr>
24560
24561 * src/conflicts.c (conflict_report): Be sure not to append to res
24562 between two calls, which could happen if both first sprintf were
24563 skipped, but not the first cp += strlen.
24564
18569462
AD
245652001-02-08 Akim Demaille <akim@epita.fr>
24566
24567 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
24568 New, from fileutils 4.0.37.
24569 * configure.in: Require Autoconf 2.49c. I took some time before
24570 making this decision. This is the only way out for portability
24571 issues in Bison, it would mean way too much duplicate effort to
24572 import in Bison features implemented in 2.49c since 2.13.
24573 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
24574
0d8f3c8a
AD
245752001-02-02 Akim Demaille <akim@epita.fr>
24576
24577 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 24578 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 24579
f17bcd1f
AD
245802001-01-19 Akim Demaille <akim@epita.fr>
24581
24582 Get rid of the ad hoc handling of token_buffer in the scanner: use
24583 the obstacks.
24584
24585 * src/lex.c (token_obstack): New.
24586 (init_lex): Initialize it. No longer call...
24587 (grow_token_buffer): this. Remove it.
24588 Adjust all the places which used it to use the obstack.
24589
511e79b3
AD
245902001-01-19 Akim Demaille <akim@epita.fr>
24591
24592 * src/lex.h: Rename all the tokens:
24593 s/\bENDFILE\b/tok_eof/g;
24594 s/\bIDENTIFIER\b/tok_identifier/g;
24595 etc.
24596 Let them be enums, not #define, to ease debugging.
24597 Adjust all the code.
24598
0d6508ef
AD
245992001-01-18 Akim Demaille <akim@epita.fr>
24600
24601 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
24602 * src/lex.c (maxtoken, grow_token_buffer): Static.
24603
6deb4447
AD
246042001-01-18 Akim Demaille <akim@epita.fr>
24605
24606 Since we now use obstacks, more % directives can be enabled.
24607
24608 * src/lex.c (percent_table): Also accept `%yacc',
24609 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
24610 `%debug'.
24611 Handle the actions for `%semantic_parser' and `%pure_parser' here,
24612 instead of returning a token.
24613 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
24614 * src/reader.c (read_declarations): Adjust.
24615 * src/files.c (open_files): Don't call `compute_base_names', don't
24616 compute `attrsfile' since they depend upon data which might be
24617 *in* the input file now.
24618 (output_files): Do it here.
24619 * src/output.c (output_headers): Document the fact that this patch
24620 introduces a guaranteed SEGV for semantic parsers.
24621 * doc/bison.texinfo: Document them.
24622 * tests/suite.at: Exercise these %options.
24623
ff4423cc
AD
246242000-12-20 Akim Demaille <akim@epita.fr>
24625
24626 Also handle the output file (--verbose) with obstacks.
24627
24628 * files.c (foutput): Remove.
24629 (output_obstack): New.
24630 Adjust all dependencies.
24631 * src/conflicts.c: Return a string.
24632 * src/system.h (obstack_grow_string): Rename as...
24633 (obstack_sgrow): this. Be ready to work with non literals.
24634 (obstack_fgrow4): New.
24635
956dba3a
AD
246362000-12-20 Akim Demaille <akim@epita.fr>
24637
24638 * src/files.c (open_files): Fix the computation of short_base_name
24639 in the case of `-o foo.tab.c'.
24640
337bab46
AD
246412000-12-20 Akim Demaille <akim@epita.fr>
24642
24643 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
24644 (copy_dollar): Now that everything uses obstacks, get rid of the
24645 FILE * parameters.
24646
5d3214b8
AD
246472000-12-20 Akim Demaille <akim@epita.fr>
24648
24649 * src/files.c (open_files): Actually the `.output' file is based
24650 on the short_base_name, not base_name.
24651 * tests/suite.at (Checking output file names): Adjust.
24652
29092a57
AD
246532000-12-20 Akim Demaille <akim@epita.fr>
24654
24655 * src/bison.s1: Remove, we now use directly...
24656 * src/bison.simple: this.
24657 * src/Makefile.am: Use pkgdata instead of data.
24658
ea5607fd
AD
246592000-12-20 Akim Demaille <akim@epita.fr>
24660
24661 * src/files.c (guard_obstack): New.
24662 (open_files): Initialize it.
24663 (output_files): Dump it...
24664 * src/files.h: Export it.
24665 * src/reader.c (copy_guard): Use it.
24666
27110317
AD
246672000-12-19 Akim Demaille <akim@epita.fr>
24668
24669 * src/files.c (outfile, defsfile, actfile): Removed as global
24670 vars.
24671 (open_files): Don't compute them.
24672 (output_files): Adjust.
24673 (base_name, short_base_name): Be global.
24674 Adjust dependencies.
24675
19c50364
AD
246762000-12-19 Akim Demaille <akim@epita.fr>
24677
24678 * src/files.c (strsuffix): New.
24679 (stringappend): Be just like strcat but allocate.
24680 (base_names): Eve out from open_files.
24681 Try to simplify the rather hairy computation of base_name and
24682 short_base_name.
24683 (open_files): Use it.
24684 * tests/suite.at (Checking output file names): New test.
24685
573c1d9f
AD
246862000-12-19 Akim Demaille <akim@epita.fr>
24687
24688 * src/system.h (obstack_grow_literal_string): Rename as...
24689 (obstack_grow_string): this.
24690 * src/output.c (output_parser): Recognize `%% actions' instead of
24691 `$'.
24692 * src/bison.s1: s/$/%% actions/.
24693 * src/bison.hairy: Likewise.
24694
ef7ddedd
AD
246952000-12-19 Akim Demaille <akim@epita.fr>
24696
24697 * src/output.c (output_parser): Compute the `#line' lines when
24698 there are.
24699 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
24700 Suggested by Hans Aberg.
24701
ff61dabd
AD
247022000-12-19 Akim Demaille <akim@epita.fr>
24703
24704 Let the handling of the skeleton files be local to the procedures
24705 that use it.
24706
24707 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
24708 longer static.
24709 (fparser, open_extra_files): Remove.
24710 (open_files, output_files): Don't take care of fparser.
24711 * src/files.h: Adjust.
24712 * src/output.c (output_parser): Open and close the file to the
24713 skeleton.
24714 * src/reader.c (read_declarations): When %semantic_parser, open
24715 fguard.
24716
55b96341
AD
247172000-12-19 Akim Demaille <akim@epita.fr>
24718
24719 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
24720 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
24721
358c15b7
AD
247222000-12-19 Akim Demaille <akim@epita.fr>
24723
24724 * src/files.c (open_files): Yipee! We no longer need all the code
24725 looking for `/tmp' since we have no tmp file.
24726
7de3329e
AD
247272000-12-19 Akim Demaille <akim@epita.fr>
24728
24729 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
24730 New macros.
24731 * src/files.c (open_files): Less dependency on MSDOS etc.
24732
3abcd459
AD
247332000-12-14 Akim Demaille <akim@epita.fr>
24734
24735 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
24736 Provide a default definition.
24737 Use it when executing the default @ action.
24738 * src/reader.c (reader_output_yylsp): No longer include
24739 `timestamp' and `text' in the default YYLTYPE.
24740
2a91a95e
AD
247412000-12-12 Akim Demaille <akim@epita.fr>
24742
24743 * src/reader.c (copy_definition, parse_union_decl, copy_action)
24744 (copy_guard): Quote the file names.
24745 Reported by Laurent Mascherpa.
24746
14d3eb9b
AD
247472000-12-12 Akim Demaille <akim@epita.fr>
24748
24749 * src/output.c (output_headers, output_program, output): Be sure
24750 to escape special characters when outputting filenames.
24751 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
24752 (output_headers): Don't depend on them, Use ACTSTR.
24753
d7045ec6
AD
247542000-11-17 Akim Demaille <akim@epita.fr>
24755
24756 * lib/obstack.h: Formatting changes.
24757 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
24758 prevents type checking.
24759 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24760 cast the value to (void *): assigning a `foo *' to a `void *'
24761 variable is valid.
24762 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24763 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
24764 append characters.
24765
6fd54b73
AD
247662000-11-17 Akim Demaille <akim@epita.fr>
24767
24768 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
24769 as...
24770 (suite.m4, regression.m4, calc.m4): these.
24771 * tests/atgeneral.m4: Update from CVS Autoconf.
24772
4c50eae6
AD
247732000-11-17 Akim Demaille <akim@epita.fr>
24774
24775 * tests/regression.m4 (%union and --defines): New test,
24776 demonstrating a current bug in the obstack implementation.
24777
a35f64ea
AD
247782000-11-17 Akim Demaille <akim@epita.fr>
24779
24780 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
24781 macros.
24782 Use them to declare the variables which are global or local to
24783 `yyparse'.
24784
7de23534
AD
247852000-11-17 Akim Demaille <akim@epita.fr>
24786
24787 * acconfig.h: Remove, no longer used.
24788
aa7815f5
AD
247892000-11-07 Akim Demaille <akim@epita.fr>
24790
24791 * src: s/Copyright (C)/Copyright/g.
24792
5af1f549
AD
247932000-11-07 Akim Demaille <akim@epita.fr>
24794
24795 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
24796 defining.
24797 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
24798
553e2b22
AD
247992000-11-07 Akim Demaille <akim@epita.fr>
24800
24801 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
24802 Merge in a single CPP if/else.
24803
8a4f41d6
AD
248042000-11-07 Akim Demaille <akim@epita.fr>
24805
24806 * src/output.c (output): Remove useless variables.
24807 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
24808 argument `data' for consistency with the prototypes.
24809 Qualify it `const'.
24810 (obstack_copy, obstack_copy0): Rename the second argument as
24811 `address' for consistency. Qualify it `const'.
24812 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
24813 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
24814 `const' their input argument (`data' or `address').
24815 Adjust the corresponding macros to include `const' in casts.
24816
095a3fb5
AD
248172000-11-03 Akim Demaille <akim@epita.fr>
24818
24819 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
24820 s/PFILE1/BISON_HAIRY/.
24821 Adjust dependencies.
24822
d1cdce7c
AD
248232000-11-03 Akim Demaille <akim@epita.fr>
24824
090c5ebf 24825 For some reason, this was not applied.
d1cdce7c
AD
24826
24827 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24828 `unlink': it's no longer used.
24829
9311529b
AD
248302000-11-03 Akim Demaille <akim@epita.fr>
24831
24832 * src/files.c (skeleton_find): New function, eved out of...
24833 (open_files, open_extra_files): here.
24834
d8880f69
AD
248352000-11-03 Akim Demaille <akim@epita.fr>
24836
24837 Don't use `atexit'.
24838
24839 * src/files.c (obstack_save): New function.
24840 (done): Rename as...
24841 (output_files): this.
24842 Use `obstack_save'.
24843 * src/main.c (main): Don't use `atexit' to register `done', since
24844 it no longer has to remove tmp files, just call `output_files'
24845 when there are no errors.
24846
0dbb648e
AD
248472000-11-02 Akim Demaille <akim@epita.fr>
24848
24849 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24850 `unlink': it's no longer used.
24851 * src/files.h: Formatting changes.
24852
896fe5c1
AD
248532000-11-02 Akim Demaille <akim@epita.fr>
24854
24855 Remove the last uses of mktemp and unlink/delete.
24856
24857 * src/files.c (fdefines, ftable): Removed.
24858 (defines_ostack, table_obstack): New.
24859 Adjust dependencies of the former into uses of the latter.
24860 * src/output.c (output_short_or_char_table, output_short_table):
24861 Convert to using obstacks.
24862 * src/reader.c (copy_comment2): Accept one FILE * and two
24863 obstacks.
24864 (output_token_defines, reader_output_yylsp): Use obstacks.
24865 * src/system.h (obstack_fgrow3): New.
1f65350a 24866 * po/POTFILES.in: Adjust.
896fe5c1 24867
dd60faec
AD
248682000-11-01 Akim Demaille <akim@epita.fr>
24869
24870 Change each use of `fattrs' into a use of `attrs_obstack'.
24871
24872 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
24873 * src/files.c (fattrs): Remove.
24874 (attrs_obstack): New.
24875 Adjust all dependencies.
24876 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
24877
8c7ebe49
AD
248782000-11-01 Akim Demaille <akim@epita.fr>
24879
24880 Introduce obstacks.
24881 Change each use of `faction' into a use of `action_obstack'.
24882
24883 * lib/obstack.h, lib/obstack.c: New files.
24884 * src/files.c (faction): Remove.
24885 (action_obstack): New.
24886 Adjust all dependencies.
24887
77aee789
AD
248882000-10-20 Akim Demaille <akim@epita.fr>
24889
24890 * lib/quote.h (PARAMS): New macro. Use it.
24891
43591cec
AD
248922000-10-16 Akim Demaille <akim@epita.fr>
24893
24894 * src/output.c (output_short_or_char_table): New function.
24895 (output_short_table, output_token_translations): Use it.
24896 (goto_actions): Use output_short_table.
24897
1e9798d5
AD
248982000-10-16 Akim Demaille <akim@epita.fr>
24899
24900 * src/symtab.c (bucket_new): New function.
24901 (getsym): Use it.
24902
24903 * src/output.c (output_short_table): New argument to display the
24904 comment associated with the table.
24905 Adjust dependencies.
24906 (output_gram): Use it.
24907 (output_rule_data): Nicer output layout for YYTNAME.
24908
f282676b
AD
249092000-10-16 Akim Demaille <akim@epita.fr>
24910
24911 * src/lex.c (read_typename): New function.
24912 (lex): Use it.
24913 * src/reader.c (copy_dollar): Likewise.
24914
550a72a3
AD
249152000-10-16 Akim Demaille <akim@epita.fr>
24916
24917 * src/reader.c (copy_comment2): Expect the input stream to be on
24918 the `/' which is suspected to open a comment, instead of being
24919 called after `//' or `/*' was read.
24920 (copy_comment, copy_definition, parse_union_decl, copy_action)
24921 (copy_guard): Adjust.
24922
131e2fef
AD
249232000-10-16 Akim Demaille <akim@epita.fr>
24924
24925 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
24926 `read_signed_integer'.
24927
79282c5a
AD
249282000-10-16 Akim Demaille <akim@epita.fr>
24929
24930 * src/reader.c (copy_dollar): New function.
24931 (copy_guard, copy_action): Use it.
24932
ff4a34be
AD
249332000-10-16 Akim Demaille <akim@epita.fr>
24934
24935 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
24936 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
24937 New files, from Fileutils 4.0.27.
24938 * src/main.c (printable_version): Remove.
24939 * src/lex.c, src/reader.c: Use `quote'.
24940
249412000-10-04 Akim Demaille <akim@epita.fr>
24942
24943 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
24944
14ded682
AD
249452000-10-04 Akim Demaille <akim@epita.fr>
24946
24947 * doc/bison.texinfo: Various typos spotted by Neil Booth.
24948
8e03724b
AD
249492000-10-04 Akim Demaille <akim@epita.fr>
24950
24951 When a literal string is used to define two different tokens,
24952 `bison -v' segfaults.
24953 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
24954
24955 * tests/regression.m4: New file.
24956 Include the core of the sample provided by Piotr Gackiewicz.
24957 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
24958 properly.
24959
a9e64249
AD
249602000-10-04 Akim Demaille <akim@epita.fr>
24961
24962 * src/reader.c (parse_expect_decl): Keep `count' within the size
24963 of `buffer'.
24964 From Neil Booth.
24965
da9abf43
AD
249662000-10-02 Paul Eggert <eggert@twinsun.com>
24967
24968 * bison.s1 (yyparse): Assign the default value
24969 unconditionally, to avoid a GCC warning and make the parser a
24970 tad smaller.
24971
c33638bb
AD
249722000-10-02 Akim Demaille <akim@epita.fr>
24973
24974 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
24975 options.
24976
444c570a
AD
249772000-10-02 Akim Demaille <akim@epita.fr>
24978
24979 * src/derives.c, src/print.c, src/reduce.c: To ease the
24980 translation, move some `\n' out of the translated strings.
24981
89cab50d
AD
249822000-10-02 Akim Demaille <akim@epita.fr>
24983
24984 The location tracking mechanism is precious for parse error
24985 messages. Nevertheless, it is enabled only when `@n' is used in
24986 the grammar, which is a different issue (you can use it in error
24987 message, but not in the grammar per se). Therefore, there should
24988 be another means to enable it.
24989
24990 * src/getargs.c (getargs): Support `--locations'.
24991 (usage): Report it.
24992 * src/getargs.h (locationsflag): Export it.
24993 * src/lex.c (percent_table): Support `%locations'.
24994 * src/reader.c (yylsp_needed): Remove this variable, now replaced
24995 with `locationsflag'.
24996 * doc/bison.texinfo: Document `--locations' and `%locations'.
24997 Sort the options.
24998 * tests/calc.m4: Test it.
24999
25000 For regularity of the names, replace each
25001 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
25002 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
25003 In addition replace each `flag' with `_flag'.
25004
d6c2cba0
AD
250052000-10-02 Akim Demaille <akim@epita.fr>
25006
25007 Also test parse error messages, including with YYERROR_VERBOSE.
25008
25009 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
25010 associative).
25011 Use it to check the computations.
25012 Use it to check `nonassoc' is honored.
25013 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
25014 `--yyerror-verbose'.
25015 (_AT_CHECK_CALC): Adjust to this option.
25016 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
25017
5a35a6cb
AD
250182000-10-02 Akim Demaille <akim@epita.fr>
25019
25020 Test also `--verbose', `--defines' and `--name-prefix'. Testing
25021 the latter demonstrates a flaw in the handling of non debugging
25022 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
25023 was used in order to simplify:
25024
25025 #if YYDEBUG
25026 if (yydebug)
25027 {
25028 ...
25029 }
25030 #endif
25031
25032 into
25033
25034 if (yydebug)
25035 {
25036 ...
25037 }
25038
25039 unfortunately this leads to a CPP conflict when
25040 `--name-prefix=foo' is used since it produces `#define yydebug
25041 foodebug'.
25042
25043 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
25044 (YYDPRINTF): New macro.
25045 Spread its use.
25046 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
25047 the bison options.
25048 Also test `--verbose', `--defines' and `--name-prefix'.
25049
71da9eea
AD
250502000-10-02 Akim Demaille <akim@epita.fr>
25051
25052 Improve the readability of the produced parsers.
25053
25054 * src/bison.s1: Formatting changes.
25055 Improve the comment related to the `$' mark.
25056 (yydefault): Don't fall through to `yyresume': `goto' there.
25057 * src/output.c (output_parser): When the `$' is met, skip the end
25058 of its line.
25059 New variable, `number_of_dollar_signs', to check there's exactly
25060 one `$' in the parser skeleton.
25061
95e36146
AD
250622000-10-02 Akim Demaille <akim@epita.fr>
25063
25064 * lib/xstrdup.c: New file, from the fileutils.
25065 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
25066 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
25067 instead of strlen + xmalloc + strcpy.
25068 * src/symtab.c (copys): Remove, use xstrdup instead.
25069
d7020c20
AD
250702000-10-02 Akim Demaille <akim@epita.fr>
25071
25072 * src/gram.h (associativity): New enum type which replaces the
25073 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
25074 `right_assoc', `left_assoc' and `non_assoc'.
25075 Adjust all dependencies.
25076 * src/reader.c: Formatting changes.
25077 (LTYPESTR): Don't define it, use it as a literal in
25078 `reader_output_yylsp'.
25079 * src/symtab.h (symbol_class): New enum type which replaces the
25080 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
25081 `sunknown', `stoken and `snterm'.
25082
1916f98e
AD
250832000-10-02 Akim Demaille <akim@epita.fr>
25084
25085 * src/getargs.c (fixed_outfiles): Rename as...
25086 (yaccflag): for consistency and accuracy.
25087 Adjust dependencies.
25088
d7913476
AD
250892000-10-02 Akim Demaille <akim@epita.fr>
25090
25091 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
25092 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
25093 difficult and introduced a lot of core dump. It turns out that
25094 Bison used an implementation of `xmalloc' based on `calloc', and
25095 at various places it does depend upon the initialization to 0. I
25096 have not tried to isolate the pertinent places, and all the former
25097 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
25098 someone should address this issue.
25099
25100 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
25101 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
25102 files.
25103 Adjust dependencies.
25104 * src/warshall.h: New file.
25105 Propagate.
25106
340ef489
AD
251072000-10-02 Akim Demaille <akim@epita.fr>
25108
25109 Various anti-`extern in *.c' changes.
25110
25111 * src/system.h: Include `assert.h'.
25112
b2ca4022
AD
251132000-10-02 Akim Demaille <akim@epita.fr>
25114
25115 * src/state.h (nstates, final_state, first_state, first_shift)
25116 (first_reduction): Move their exportation from here...
25117 * src/LR0.h: to here.
25118 Adjust dependencies.
25119 * src/getargs.c (statisticsflag): New variable.
25120 Add support for `--statistics'.
25121 Adjust dependencies.
25122
25123 Remove a lot of now useless `extern' statements in most files.
25124
403b315b
AD
251252000-10-02 Akim Demaille <akim@epita.fr>
25126
25127 * src/LR0.h: New file.
25128 Propagate its use.
25129
07a58c13
AD
251302000-10-02 Akim Demaille <akim@epita.fr>
25131
25132 * src/print.h: New file.
25133 Propagate its use.
25134 * src/print.c: Formatting and ordering changes.
25135 (verbose, terse): Replace with...
25136 (print_results): this new function.
25137 Adjust dependencies.
25138
0619caf0
AD
251392000-10-02 Akim Demaille <akim@epita.fr>
25140
25141 * src/conflicts.c (conflict_report): New function.
25142 (conflict_log, verbose_conflict_log): Replace with...
25143 (print_conflicts): this function.
25144 Adjust dependencies.
25145 * src/conflicts.h: New file.
25146 Propagate its inclusion.
25147
3519ec76
AD
251482000-10-02 Akim Demaille <akim@epita.fr>
25149
25150 * src/nullable.h: New file.
25151 Propagate its inclusion.
25152 * src/nullable.c: Formatting changes.
25153
015acc48
AD
251542000-10-02 Akim Demaille <akim@epita.fr>
25155
25156 * src/reduce.h: New file.
25157 Propagate its inclusion.
25158 * src/reduce.c: Topological sort and other formatting changes.
25159 (bool, TRUE, FALSE): Move their definition to...
25160 * src/system.h: here.
25161
8963a27b
AD
251622000-10-02 Akim Demaille <akim@epita.fr>
25163
25164 * src/files.c: Formatting changes.
25165 (tryopen, tryclose, openfiles): Rename as...
25166 (xfopen, xfclose, open_files): this.
25167 (stringappend): static.
25168 * src/files.h: Complete the list of exported symbols.
25169 Propagate its use.
25170
a70083a3
AD
251712000-10-02 Akim Demaille <akim@epita.fr>
25172
25173 * src/reader.h: New file.
25174 Propagate its use instead of tedious list of `extern' and
25175 prototypes.
25176 * src/reader.c: Formatting changes, topological sort,
25177 s/register//.
25178
abadc117
AD
251792000-10-02 Akim Demaille <akim@epita.fr>
25180
25181 * src/lex.h: Prototype `lex.c' exported functions.
25182 * src/reader.c: Adjust.
25183 * src/lex.c: Formatting changes.
25184 (safegetc): Rename as...
25185 (xgetc): this.
25186
720d742f
AD
251872000-10-02 Akim Demaille <akim@epita.fr>
25188
25189 * src/lalr.h: New file.
25190 Propagate its inclusion instead of prototypes and `extern'.
25191 * src/lalr.c: Formatting changes, topological sorting etc.
25192
f2acea59
AD
251932000-10-02 Akim Demaille <akim@epita.fr>
25194
25195 * src/output.c (token_actions): Introduce a temporary array,
25196 YYDEFACT, that makes it possible for this function to use
25197 output_short_table.
25198
d019d655
AD
251992000-10-02 Akim Demaille <akim@epita.fr>
25200
25201 `user_toknums' is output as a `short[]' in `output.c', while it is
25202 defined as a `int[]' in `reader.c'. For consistency with the
25203 other output tables, `user_toknums' is now defined as a table of
25204 shorts.
25205
25206 * src/reader.c (user_toknums): Be a short table instead of an int
25207 table.
25208 Adjust dependencies.
25209
25210 Factor the short table outputs.
25211
25212 * src/output.c (output_short_table): New function.
25213 * src/output.c (output_gram, output_stos, output_rule_data)
25214 (output_base, output_table, output_check): Use it.
25215
6c89f1c1
AD
252162000-10-02 Akim Demaille <akim@epita.fr>
25217
25218 * src/output.c (output): Topological sort of the functions, in
25219 order to get rid of the `static' prototypes.
25220 No longer use `register'.
25221 * src/output.h: New file.
25222 Propagate its inclusion in files explicitly prototyping functions
25223 from output.c.
25224
d9efd181
AD
252252000-09-21 Akim Demaille <akim@epita.fr>
25226
25227 * src/atgeneral.m4: Update from Autoconf.
25228
c29240e7 252292000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
25230
25231 * src/closure.h: New file.
25232 * src/closure.c: Formatting changes, topological sort over the
25233 functions, use of closure.h.
25234 (initialize_closure, finalize_closure): Rename as...
25235 (new_closure, free_closure): these. Adjust dependencies.
25236 * src/LR0.c: Formatting changes, topological sort, use of
25237 cloture.h.
25238 (initialize_states): Rename as...
25239 (new_states): this.
25240 * src/Makefile.am (noinst_HEADERS): Adjust.
25241
499daa50
AD
252422000-09-20 Akim Demaille <akim@epita.fr>
25243
25244 * src/acconfig.h: Don't protect config.h against multiple
25245 inclusion.
25246 Don't define PARAMS.
25247 * src/system.h: Define PARAMS.
25248 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
25249 purpose of config.h. system.h must not try to fix wrong
25250 definitions in config.h.
25251
cc84fd5d
AD
252522000-09-20 Akim Demaille <akim@epita.fr>
25253
25254 * src/derives.h: New file.
25255 * src/main.c, src/derives.h: Use it.
25256 Formatting changes.
25257 * src/Makefile.am (noinst_HEADERS): Adjust.
25258
db5b3a89
AD
252592000-09-20 Akim Demaille <akim@epita.fr>
25260
25261 * tests/atgeneral.m4: Update from Autoconf.
25262 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
25263 (AT_CHECK_CALC): New macros.
25264 Use these macros to test bison with options `', `--raw',
25265 `--debug', `--yacc', `--yacc --debug'.
25266
ceed8467
AD
252672000-09-19 Akim Demaille <akim@epita.fr>
25268
25269 * src/output.c: Formatting changes.
25270 * src/machine.h: Remove, leaving its contents in...
25271 * src/system.h: here.
25272 Include stdio.h.
25273 Adjust all dependencies on stdio.h and machine.h.
25274 * src/getargs.h: New file.
25275 Let all `extern' declarations about getargs.c be replaced with
25276 inclusion of `getargs.h'.
25277 * src/Makefile.am (noinst_HEADERS): Adjust.
25278
25279 * tests/calc.m4 (yyin): Be initialized in main, not on the global
25280 scope.
25281 (yyerror): Returns void, not int.
25282 * doc/bison.texinfo: Formatting changes.
25283
05a1d24b
AD
252842000-09-19 Akim Demaille <akim@epita.fr>
25285
25286 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
25287 portable.
25288
cbd25751
AD
252892000-09-18 Akim Demaille <akim@epita.fr>
25290
25291 * configure.in: Append WARNING_CFLAGS to CFLAGS.
25292 * src/Makefile.am (INCLUDES): Don't.
25293 Be ready to fetch headers in lib/.
25294
13863333
AD
252952000-09-18 Akim Demaille <akim@epita.fr>
25296
25297 * doc/bison.texinfo: Update the copyright.
25298 ANSIfy and GNUify the examples.
25299 Remove the old menu.
25300
0d533154
AD
253012000-09-18 Akim Demaille <akim@epita.fr>
25302
25303 First set of tests: use the `calc' example from the documentation.
25304
25305 * src/bison.s1 (yyparse): Condition the code using `yytname' which
25306 is defined only when YYDEBUG is.
25307 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
25308 * src/files.c (tryopen, tryclose): Formatting changes.
25309 Move to the top and be static.
25310 * src/reader.c (read_signed_integer): Likewise.
25311 * tests/calc.m4: New file.
25312 * Makefile.am, suite.m4: Adjust.
25313 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
25314
e79137ac
AD
253152000-09-18 Akim Demaille <akim@epita.fr>
25316
25317 Add support for an Autotest test suite for Bison.
25318
25319 * m4/m4.m4, m4/atconfig.m4: New files.
25320 * m4/Makefile.am (EXTRA_DIST): Adjust.
25321 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
25322 files.
25323 * src/getargs.c: Display a more standard --version message.
25324 * src/reader.c (reader): Formatting changes.
25325 No longer depend upon VERSION_STRING.
25326 * configure.in: No longer use `dnl'.
25327 Set up the test suite and the new directory `tests/.
25328 (VERSION_STRING): Remove.
25329
27821bff
AD
253302000-04-14 Akim Demaille <akim@epita.fr>
25331
25332 * src/reader.c (copy_comment2): New function, same as former
25333 `copy_comment', but outputs into two FILE *.
25334 (copy_comment): Use it.
25335 (parse_union_decl): Use it.
25336 (get_type, parse_start_decl): Use the same `invalid' message.
25337 (parse_start_decl, parse_union_decl): Use the same `multiple'
25338 message.
25339 (parse_union_decl, copy_guard, copy_action): Use the same
25340 `unmatched' message.
25341 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
25342
cfe5fbc0
AD
253432000-03-31 Akim Demaille <akim@epita.fr>
25344
25345 * src/files.c (tryopen, tryclose): Move to the top.
25346 Be static.
25347
cb7db13e
AD
253482000-03-31 Akim Demaille <akim@epita.fr>
25349
25350 * src/main.c (main): Don't call `done', exit does it.
25351
a0f6b076
AD
253522000-03-31 Akim Demaille <akim@epita.fr>
25353
36281465
AD
25354 * allocate.c: s/return (foo)/return foo/.
25355 * lalr.c: Likewise.
25356 * LR0.c: Likewise.
25357 * output.c: Likewise.
25358 * reader.c: Likewise.
25359 * symtab.c: Likewise.
25360 * vmsgetargs.c: Likewise.
25361
253622000-03-31 Akim Demaille <akim@epita.fr>
25363
25364 Clean up the error reporting functions.
a0f6b076
AD
25365
25366 * src/report.c: New file.
25367 * src/report.h: Likewise.
25368 * src/Makefile.am: Adjust.
25369 * m4/error.m4: New file.
25370 * m4/Makefile.am: Adjust.
25371 * configure.in (jm_PREREQ_ERROR): Call it.
25372 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
25373 Remove.
25374 (fatal, fatals): Remove. All callers use complain.c::fatal.
25375 (warn, warni, warns, warnss, warnss): Remove. All callers use
25376 complain.c::complain.
25377 (toomany): Remove, use fatal instead.
25378 * src/files.c (done): No argument, use complain_message_count.
25379 * src/main.c (main): Register `done' to `atexit'.
25380
25381 * src/getargs.c (usage): More `fputs', less `fprintf'.
25382
18539825
AD
253832000-03-28 Akim Demaille <akim@epita.fr>
25384
25385 * lib/: New directory.
25386 * Makefile.am (SUBDIRS): Adjust.
25387 * configure.in: Adjust.
25388 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
25389 useless.
25390 * src/alloca.c: Moved to lib/.
25391 * src/getopt.c: Likewise.
25392 * src/getopt1.c: Likewise.
25393 * src/getopt.h: Likewise.
25394 * src/ansi2knr.c: Likewise.
25395 * src/ansi2knr.1: Likewise.
25396 * src/Makefile.am: Adjust.
25397 * lib/Makefile.am: New file.
25398
9f306f2a
AD
253992000-03-28 Akim Demaille <akim@epita.fr>
25400
25401 * src/getargs.c (usage): Refresh the help message.
25402
0ba347b6
AD
254032000-03-17 Akim Demaille <akim@epita.fr>
25404
25405 * src/getopt1.c: Updated from textutils 2.0e
25406 * src/getopt.c: Likewise.
25407 * src/getopt.h: Likewise.
25408
dbe7f271
AD
254092000-03-17 Akim Demaille <akim@epita.fr>
25410
25411 * src/Makefile.am (bison.simple): Fix the awk program: quote only
25412 the file name, not the whole `#line LINE FILE'.
25413
75bbe78d
AD
254142000-03-17 Akim Demaille <akim@epita.fr>
25415
25416 On syntax errors, report the token on which we choked.
25417
aa5fd0ee
AD
25418 * src/bison.s1 (yyparse): In the label yyerrlab, when
25419 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 25420
7b306f52
AD
254212000-03-17 Akim Demaille <akim@epita.fr>
25422
aa5fd0ee 25423 * src/reader.c (copy_at): New function.
7b306f52
AD
25424 (copy_guard): Use it.
25425 (copy_action): Use it.
25426
e87b5700
AD
254272000-03-17 Akim Demaille <akim@epita.fr>
25428
25429 Be kind to translators, save some useless translations.
25430
aa5fd0ee 25431 * src/main.c (banner): New function.
e87b5700
AD
25432 (fatal_banner): Use it.
25433 (warn_banner): Use it.
25434
ae3c3164
AD
254352000-03-17 Akim Demaille <akim@epita.fr>
25436
aa5fd0ee
AD
25437 * src/reader.c (copy_definition): Use copy_string and
25438 copy_comment. Removed now unused `match', `ended',
25439 `cplus_comment'.
ae3c3164
AD
25440 (copy_comment, copy_string): Moved, to be visible from
25441 copy_definition.
25442
4dc58e7c
AD
254432000-03-17 Akim Demaille <akim@epita.fr>
25444
aa5fd0ee
AD
25445 * src/reader.c (copy_string): Declare `static inline'. No
25446 problems with inline, since it is checked by configure.
4dc58e7c
AD
25447 (copy_comment): Likewise.
25448
0a6384c4
AD
254492000-03-17 Akim Demaille <akim@epita.fr>
25450
aa5fd0ee 25451 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 25452
3cef001a
AD
254532000-03-17 Akim Demaille <akim@epita.fr>
25454
aa5fd0ee 25455 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
25456 (copy_action): Use it. Removed now unused `match', `ended',
25457 `cplus_comment'.
25458 (copy_guard): Likewise.
25459
ca36d2ef
AD
254602000-03-17 Akim Demaille <akim@epita.fr>
25461
aa5fd0ee 25462 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
25463 (copy_action): Use it.
25464 (copy_guard): Likewise.
25465
6666f98f
AD
254662000-03-17 Akim Demaille <akim@epita.fr>
25467
25468 Change the handling of @s so that they behave exactly like $s.
25469 There is now a pseudo variable @$ (readble and writable), location
25470 of the lhs of the rule (by default ranging from the location of
25471 the first symbol of the rhs, to the location of the last symbol,
25472 or, if the rhs is empty, YYLLOC).
25473
25474 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
25475 yyval.
25476 (yyparse): When providing a default semantic action, provide a
25477 default location action.
25478 (after the $): No longer change `*YYLSP', just stack YYLOC the
25479 same way you stack YYVAL.
25480 * src/reader.c (read_declarations): Use warns.
25481 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
25482 (copy_action, case '@'): Likewise.
25483 Use a standard error message, to save useless work from
25484 translators.
25485
41aca2e0
AD
254862000-03-17 Akim Demaille <akim@epita.fr>
25487
aa5fd0ee
AD
25488 * src/bison.s1: Formatting and cosmetics changes.
25489 * src/reader.c: Likewise.
41aca2e0
AD
25490 Update the Copyright notice.
25491
dc08c1d5
AD
254922000-03-17 Akim Demaille <akim@epita.fr>
25493
aa5fd0ee
AD
25494 * src/bison.s1 (#line): All set to `#line' only, since the
25495 Makefile now handles them.
dc08c1d5 25496
9ee3c97b
AD
254972000-03-16 Akim Demaille <akim@epita.fr>
25498
25499 * src/output.c (output_rule_data): Output the documentation of
25500 some of the tables.
25501 (Copyright notice): Update.
25502 Formatting changes.
25503
0de741ca
AD
255042000-03-16 Akim Demaille <akim@epita.fr>
25505
25506 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
25507 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
25508 One `#if YYDEBUG' remains, since it uses variables which are
25509 defined only if `YYDEBUG != 0'.
25510
bb10be54
AD
255112000-03-16 Akim Demaille <akim@epita.fr>
25512
25513 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
25514 and related variables so that the similarities are highlighted.
25515
b07b484a
AD
255162000-03-16 Akim Demaille <akim@epita.fr>
25517
25518 * src/bison.s1: Properly indent CPP directives.
25519
361f60b3
AD
255202000-03-16 Akim Demaille <akim@epita.fr>
25521
25522 * src/bison.s1: Properly indent the `alloca' CPP section.
25523
8c44d3ec
AD
255242000-03-16 Akim Demaille <akim@epita.fr>
25525
25526 Do not hard code values of directories in `configure.in'.
25527 Update the `configure' tool chain.
25528
25529 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
25530 src/makefile.am.
25531 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
25532 (AC_OUTPUT): Add m4/Makefile.
25533 Bump to bison 1.28a, 1.29 has never been released.
25534 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
25535 handled via src/Makefile.am.
25536 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
25537 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
25538 autoheader.
25539 * Makefile.am (SUBDIRS): Add m4.
25540 (ACLOCAL_AM_FLAGS): New variable.
25541 (AUTOMAKE_OPTIONS): Add check-news.
25542 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
25543 the proper line number and file name.
25544 (DEFS): Propagate the location of bison library files and of the
25545 locale files.
25546 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
25547 builddir.
25548 * acinclude.m4: Remove, replaced by the directory m4.
25549 * m4/Makefile.am (EXTRA_DIST): New variable.
25550 * m4/gettext.m4: New file, from the fileutils.
25551 * m4/lcmessage.m4: Likewise
25552 * m4/progtest.m4: Likewise.
25553 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
25554
f95997e7
AD
255552000-03-10 Akim Demaille <akim@epita.fr>
25556
25557 * src/closure.c:
25558 Formatting changes of various comments.
25559 Respect the GNU coding standards at various places.
25560 Don't use `_()' when no translation is needed.
25561
255621999-12-13 Jesse Thilo <jthilo@gnu.org>
25563
25564 * src/files.c:
25565 OS/2 honors TMPDIR environment variable.
25566
255671999-12-13 Jesse Thilo <jthilo@gnu.org>
25568
25569 * doc/bison.texinfo: Tweaked spelling and grammar.
25570 Updated ISBN.
25571 Removed reference to price of printed copy.
25572 Mention BISON_SIMPLE and BISON_HAIRY.
25573
255741999-12-13 Jesse Thilo <jthilo@gnu.org>
25575
25576 * configure.in, NEWS:
25577 Bison 1.29 released.
25578
255791999-10-27 Jesse Thilo <jthilo@gnu.org>
25580
25581 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
25582 Added reference card.
25583
255841999-07-26 Jesse Thilo <jthilo@gnu.org>
25585
25586 * po/ru.po: Added Russian translation.
25587
255881999-07-26 Jesse Thilo <jthilo@gnu.org>
25589
25590 * configure.in: Added Russian translation.
25591
255921999-07-06 Jesse Thilo <jthilo@gnu.org>
25593
25594 * configure.in, NEWS, README:
25595 Released version 1.28.
25596
255971999-06-14 Jesse Thilo <jthilo@gnu.org>
25598
25599 * src/system.h:
25600 Squashed redefinition warning on some systems.
25601
25602 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
25603 Have configure build version string instead of relying on ANSI string
25604 concatentation.
25605
256061999-06-14 Jesse Thilo <jthilo@gnu.org>
25607
25608 * po/POTFILES.in: Got rid of version.c.
25609
256101999-06-14 Jesse Thilo <jthilo@gnu.org>
25611
25612 * acconfig.h, configure.in:
25613 Have configure build version string instead of relying on ANSI string
25614 concatentation.
25615
256161999-06-08 Jesse Thilo <jthilo@gnu.org>
25617
25618 * doc/bison.1:
25619 Dropped mention of `+' for long-named options.
25620
256211999-05-30 Jesse Thilo <jthilo@gnu.org>
25622
25623 * src/files.c: Added <unistd.h> for unlink().
25624
25625 * src/Makefile.am, src/system.h:
25626 I18n fixes.
25627
256281999-05-30 Jesse Thilo <jthilo@gnu.org>
25629
25630 * README: Added a FAQ list.
25631
25632 * configure.in, acconfig.h:
25633 I18n fixes.
25634
256351999-05-30 Jesse Thilo <jthilo@gnu.org>
25636
25637 * doc/FAQ, doc/Makefile.am:
25638 Added a FAQ list.
25639
256401999-05-19 Jesse Thilo <jthilo@gnu.org>
25641
25642 * src/alloc.h, src/symtab.h, src/version.c:
25643 Protected inclusion of "config.h" with HAVE_CONFIG_H.
25644
256451999-04-18 Jesse Thilo <jthilo@gnu.org>
25646
25647 * src/.cvsignore, src/Makefile.am:
25648 Reorganized: sources in `src', documentation in `doc'.
25649
25650 * src/lex.c (literalchar):
25651 fixed the code for escaping double quotes (thanks
25652 Jonathan Czisny.)
25653
256541999-04-18 Jesse Thilo <jthilo@gnu.org>
25655
25656 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
25657 Adjusted paths to reflect directory reorganization.
25658
256591999-04-18 Jesse Thilo <jthilo@gnu.org>
25660
25661 * doc/.cvsignore, doc/Makefile.am:
25662 Reorganized: sources in `src', documentation in `doc'.
25663
256641999-04-18 Jesse Thilo <jthilo@gnu.org>
25665
25666 * configure.in:
25667 Updated AC_INIT file to reflect directory reorganization.
25668
25669 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
25670 Reorganized: sources in `src', documentation in `doc'.
25671
256721999-04-13 Jesse Thilo <jthilo@gnu.org>
25673
25674 * src/allocate.c:
25675 Don't declare calloc() and realloc() if not necessary.
25676
256771999-04-13 Jesse Thilo <jthilo@gnu.org>
25678
25679 * configure.in, acconfig.h, acinclude.m4:
25680 Don't declare calloc() and realloc() if not necessary.
25681
256821999-03-23 Jesse Thilo <jthilo@gnu.org>
25683
25684 * po/.cvsignore: Added i18n support.
25685
256861999-03-23 Jesse Thilo <jthilo@gnu.org>
25687
25688 * acconfig.h, configure.in, Makefile.am:
25689 Added i18n support.
25690
256911999-03-22 Jesse Thilo <jthilo@gnu.org>
25692
25693 * src/bison.s1: Fixed #line numbers.
25694
256951999-03-15 Jesse Thilo <jthilo@gnu.org>
25696
25697 * po/es.po, po/fr.po, po/nl.po, po/de.po:
25698 Added PO files from Translation Project.
25699
257001999-03-03 Jesse Thilo <jthilo@gnu.org>
25701
25702 * Makefile.am:
25703 Added support for non-ANSI compilers (ansi2knr).
25704
257051999-02-16 Jesse Thilo <jthilo@gnu.org>
25706
25707 * configure.in: Bumped version number to 1.27.
25708
25709 * Makefile.am:
25710 Added `bison.simple' to list of files removed by `make distclean'.
25711
257121999-02-12 Jesse Thilo <jthilo@gnu.org>
25713
25714 * src/files.c, src/files.h:
25715 Defined locations of parser files in config.h instead of Makefile.
25716
257171999-02-12 Jesse Thilo <jthilo@gnu.org>
25718
25719 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
25720 Defined locations of parser files in config.h instead of Makefile.
25721
257221999-02-09 Jesse Thilo <jthilo@gnu.org>
25723
25724 * Makefile.am:
25725 Removed inappropriate use of $< macro.
25726
257271999-02-05 Jesse Thilo <jthilo@gnu.org>
25728
25729 * po/Makefile.in.in, po/POTFILES.in:
25730 Add `po' directory skeleton.
25731
257321999-01-27 Jesse Thilo <jthilo@gnu.org>
25733
25734 * README: Document help-bison list.
25735
25736 * configure.in: Add check for mkstemp().
25737
257381999-01-20 Jesse Thilo <jthilo@gnu.org>
25739
25740 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
25741 Hush a few compiler warnings.
25742
25743 * src/files.c:
25744 Add tryclose(), which verifies that fclose was successful.
25745 Hush a couple of compiler warnings.
25746
257471999-01-20 Jesse Thilo <jthilo@gnu.org>
25748
25749 * Makefile.am, OChangeLog:
25750 ChangeLog is now automatically generated. Include the old version as
25751 OChangeLog.
25752
257531999-01-14 Jesse Thilo <jthilo@gnu.org>
25754
25755 * 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:
25756 Update FSF address.
25757
257581999-01-14 Jesse Thilo <jthilo@gnu.org>
25759
25760 * doc/bison.texinfo: Fix formatting glitch.
25761
25762 * doc/bison.texinfo: Update FSF address.
25763
257641999-01-14 Jesse Thilo <jthilo@gnu.org>
25765
25766 * acconfig.h: Update FSF address.
25767
257681999-01-08 Jesse Thilo <jthilo@gnu.org>
25769
25770 * src/system.h:
25771 Don't define PACKAGE here, since config.h defines it.
25772
257731998-12-30 Jesse Thilo <jthilo@gnu.org>
25774
25775 * src/reader.c: Update copyright date.
25776
25777 * src/main.c:
25778 Ditch sprintf to statically-sized buffers in fatal/warn functions in
25779 favor of output directly to stderr (avoids buffer overruns).
25780
25781 * src/reader.c: Some checks for premature EOF.
25782
25783 * 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:
25784 Use prototypes if the compiler understands them.
25785
25786 * src/files.c: Honor TMPDIR on Unix hosts.
25787 Use prototypes if the compiler understands them.
25788
25789 * src/reader.c:
25790 Fix a couple of buffer overrun bugs.
25791 Use prototypes if the compiler understands them.
25792
25793 * src/system.h: Include unistd.h and ctype.h.
25794 Use #ifdef instead of #if for NLS symbols.
25795
257961998-12-30 Jesse Thilo <jthilo@gnu.org>
25797
25798 * doc/bison.texinfo:
25799 Delete comment "consider using @set for edition number, etc..." since
25800 we now are doing so.
25801
258021998-12-30 Jesse Thilo <jthilo@gnu.org>
25803
25804 * configure.in:
25805 Use prototypes if the compiler understands them.
25806
25807 * NEWS: Document 1.26 highlights.
25808
25809 * Makefile.am: Require Automake 1.3 or later.
25810
25811 * acconfig.h:
25812 Use prototypes if the compiler understands them.
25813
258141998-12-29 Jesse Thilo <jthilo@gnu.org>
25815
25816 * src/version.c:
25817 Use VERSION symbol from automake for version number.
25818
258191998-12-29 Jesse Thilo <jthilo@gnu.org>
25820
25821 * acconfig.h, configure.in, version.cin:
25822 Use VERSION symbol from automake for version number.
25823
258241998-11-28 Jesse Thilo <jthilo@gnu.org>
25825
25826 * Makefile.am:
25827 Distribute original version of simple parser (bison.s1), not built
25828 version (bison.simple).
25829
258301998-11-28 Jesse Thilo <jthilo@gnu.org>
25831
25832 * doc/bison.texinfo: Add info dir entry.
25833
25834 * doc/bison.texinfo:
25835 Let automake put version number into documentation.
25836
258371998-11-26 Jesse Thilo <jthilo@gnu.org>
25838
25839 * src/bison.cld, src/build.com, src/vmshlp.mar:
25840 Add non-RCS files from /gd/gnu/bison.
25841
258421998-11-26 Jesse Thilo <jthilo@gnu.org>
25843
25844 * doc/bison.1:
25845 Document the BISON_HAIRY and BISON_SIMPLE variables.
25846
258471998-11-25 Jesse Thilo <jthilo@gnu.org>
25848
25849 * src/version.c: Build version.c automatically.
25850
25851 * src/reader.c:
25852 Fix token numbering (used to start at 258, not 257).
25853
25854 * src/system.h: Include config.h.
25855
25856 * src/getargs.c: Update bug report address.
25857
25858 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
25859 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
25860
258611998-11-25 Jesse Thilo <jthilo@gnu.org>
25862
25863 * Makefile.am:
25864 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25865
25866 * configure.in, version.cin:
25867 Build version.c automatically.
25868
25869 * AUTHORS: Add AUTHORS file.
25870
25871 * README: Update bug report address.
25872
25873 * bison.simple:
25874 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25875
25876 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
25877 Add automake stuff.
25878
258791998-11-25 Jesse Thilo <jthilo@gnu.org>
25880
25881 * doc/bison.texinfo: Clean up some formatting.
25882
258831998-05-05 Richard Stallman <rms@gnu.org>
25884
25885 * doc/bison.texinfo:
25886 Explain better why to make a pure parser.
25887
258881998-01-05 Richard Stallman <rms@gnu.org>
25889
25890 * src/files.c (openfiles):
25891 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
25892 find a temporary directory, if possible. Do not unlink files while
25893 they are open.
25894
258951997-08-25 Richard Stallman <rms@gnu.org>
25896
25897 * src/reader.c (stack_offset;):
25898 Change some warni to warns.
25899
25900 * src/lex.c (literalchar): Use warns, not warni.
25901
259021997-06-28 Richard Stallman <rms@gnu.org>
25903
25904 * src/bison.s1: Add a Bison version comment.
25905
25906 * src/main.c (fatal, warn, berror):
25907 Use program_name.
25908
259091997-06-28 Richard Stallman <rms@gnu.org>
25910
25911 * Makefile.in (bison_version): New variable.
25912 (dist): Use that variable.
25913 (bison.s1): Substitute the Bison version into bison.simple.
25914
25915 * bison.simple: Add a Bison version comment.
25916
259171997-06-18 Richard Stallman <rms@gnu.org>
25918
25919 * src/main.c (fatal, warn, berror):
25920 Make error messages standard.
25921 (toomany): Improve error message text.
25922
25923 * 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:
25924 new.h renamed to alloc.h.
25925
259261997-06-18 Richard Stallman <rms@gnu.org>
25927
25928 * Makefile.in: new.h renamed to alloc.h.
25929
259301997-05-24 Richard Stallman <rms@gnu.org>
25931
25932 * src/lex.c (literalchar):
25933 Fix the code for escaping \, " and '.
25934
25935 (lex): Avoid trouble when there are many chars
25936 to discard in a char literal with just several chars in it.
25937
259381997-05-17 Richard Stallman <rms@gnu.org>
25939
25940 * src/bison.s1:
25941 Use malloc, if using alloca is troublesome.
25942 (YYSTACK_USE_ALLOCA): New flag macro.
25943 Define it for some systems and compilers.
25944 (YYSTACK_ALLOC): New macro.
25945 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25946 If it was malloc'd, free it.
25947
259481997-05-17 Richard Stallman <rms@gnu.org>
25949
25950 * bison.simple:
25951 Use malloc, if using alloca is troublesome.
25952 (YYSTACK_USE_ALLOCA): New flag macro.
25953 Define it for some systems and compilers.
25954 (YYSTACK_ALLOC): New macro.
25955 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25956 If it was malloc'd, free it.
25957
259581997-04-23 Richard Stallman <rms@gnu.org>
25959
25960 * src/bison.s1:
25961 (alloca) [__hpux]: Always define as __builtin_alloca.
25962
259631997-04-23 Richard Stallman <rms@gnu.org>
25964
25965 * bison.simple:
25966 (alloca) [__hpux]: Always define as __builtin_alloca.
25967
259681997-04-22 Richard Stallman <rms@gnu.org>
25969
25970 * src/bison.s1:
25971 [__hpux]: Include alloca.h (right for HPUX 10)
25972 instead of declaring alloca (right for HPUX 9).
25973
25974 * src/bison.s1 (__yy_memcpy):
25975 Declare arg `count' as unsigned int.
25976 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25977
259781997-04-22 Richard Stallman <rms@gnu.org>
25979
25980 * bison.simple:
25981 [__hpux]: Include alloca.h (right for HPUX 10)
25982 instead of declaring alloca (right for HPUX 9).
25983
25984 * bison.simple (__yy_memcpy):
25985 Declare arg `count' as unsigned int.
25986 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25987
259881997-01-03 Richard Stallman <rms@gnu.org>
25989
25990 * src/allocate.c: [__STDC__ or _MSC_VER]:
25991 Declare calloc and realloc to return void *.
25992
259931997-01-02 Richard Stallman <rms@gnu.org>
25994
25995 * src/system.h:
25996 [_MSC_VER]: Include stdlib.h and process.h.
25997 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
25998
25999 * src/main.c (main): Return FAILURE as a value.
26000 (printable_version): Declare arg as int, not char.
26001
260021997-01-02 Richard Stallman <rms@gnu.org>
26003
26004 * Makefile.in (dist):
26005 Explicitly check for symlinks, and copy them.
26006
260071996-12-19 Richard Stallman <rms@gnu.org>
26008
26009 * src/files.c:
26010 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
26011
260121996-12-18 Paul Eggert <eggert@gnu.org>
26013
26014 * src/bison.s1 (yyparse):
26015 If __GNUC__ and YYPARSE_PARAM are both defined,
26016 declare yyparse to have a void * argument.
26017
260181996-12-18 Paul Eggert <eggert@gnu.org>
26019
26020 * bison.simple (yyparse):
26021 If __GNUC__ and YYPARSE_PARAM are both defined,
26022 declare yyparse to have a void * argument.
26023
260241996-12-17 Richard Stallman <rms@gnu.org>
26025
26026 * src/reduce.c (nbits): Add some casts.
26027
260281996-08-12 Richard Stallman <rms@gnu.org>
26029
26030 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
26031
260321996-08-12 Richard Stallman <rms@gnu.org>
26033
26034 * bison.simple: Test _MSDOS as well as _MSDOS_.
26035
260361996-07-31 Richard Stallman <rms@gnu.org>
26037
26038 * src/bison.s1:
26039 [__sun && __i386]: Include alloca.h.
26040
260411996-07-31 Richard Stallman <rms@gnu.org>
26042
26043 * bison.simple:
26044 [__sun && __i386]: Include alloca.h.
26045
260461996-07-30 Richard Stallman <rms@gnu.org>
26047
26048 * src/bison.s1: Comment change.
26049
26050 * src/bison.s1: Test _MSDOS_, not MSDOS.
26051
260521996-07-30 Richard Stallman <rms@gnu.org>
26053
26054 * bison.simple: Comment change.
26055
26056 * bison.simple: Test _MSDOS_, not MSDOS.
26057
260581996-06-01 Richard Stallman <rms@gnu.org>
26059
26060 * 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:
26061 Insert `_' macro around many string constants.
26062
26063 * src/main.c:
26064 Insert `_' macro around many string constants.
26065
26066 (main): Call setlocale, bindtextdomain and textdomain.
26067
26068 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
26069 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
26070 [ENABLE_NLS]: Include libintl.h.
26071 [ENABLE_NLS] (gettext): Define.
26072 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
26073 (N_, PACKAGE, LOCALEDIR): New macros.
26074
260751996-06-01 Richard Stallman <rms@gnu.org>
26076
26077 * POTFILES.in: New file.
26078
26079 * Makefile.in (allocate.o):
26080 Define target explicitly.
26081
26082 * Makefile.in (CFLAGS): Set to @CFLAGS@.
26083 (LDFLAGS): Set to @LDFLAGS@.
26084 (configure): Run autoconf only if preceding `cd' succeeds.
26085 (bison.s1): Redirect output to temporary file then move the
26086 temporary to the target, rather than redirecting directly to bison.s1.
26087 (clean): Remove config.status and config.log.
26088 (distclean): Don't remove config.status here.
26089
260901996-05-12 Richard Stallman <rms@gnu.org>
26091
26092 * src/bison.s1:
26093 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
26094
260951996-05-12 Richard Stallman <rms@gnu.org>
26096
26097 * bison.simple:
26098 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
26099
261001996-05-11 Richard Stallman <rms@gnu.org>
26101
26102 * src/bison.s1 (__yy_memcpy):
26103 Really reorder the args, as was supposedly done on Feb 14 1995.
26104 (yyparse): Calls changed accordingly.
26105
261061996-05-11 Richard Stallman <rms@gnu.org>
26107
26108 * Makefile.in (dist): Don't use $(srcdir).
26109
26110 * bison.simple (__yy_memcpy):
26111 Really reorder the args, as was supposedly done on Feb 14 1995.
26112 (yyparse): Calls changed accordingly.
26113
261141996-01-27 Richard Stallman <rms@gnu.org>
26115
26116 * src/output.c (output_rule_data):
26117 Test YYERROR_VERBOSE in the conditional
26118 around the definition of ttyname.
26119
261201995-12-29 Richard Stallman <rms@gnu.org>
26121
26122 * src/bison.s1:
26123 Fix line numbers in #line commands.
26124
261251995-12-29 Richard Stallman <rms@gnu.org>
26126
26127 * bison.simple:
26128 Fix line numbers in #line commands.
26129
261301995-12-27 Richard Stallman <rms@gnu.org>
26131
26132 * src/bison.s1 (YYPARSE_PARAM_DECL):
26133 In C++, make it always null.
26134 (YYPARSE_PARAM_ARG): New macro.
26135 (yyparse): Use YYPARSE_PARAM_ARG.
26136
261371995-12-27 Richard Stallman <rms@gnu.org>
26138
26139 * bison.simple (YYPARSE_PARAM_DECL):
26140 In C++, make it always null.
26141 (YYPARSE_PARAM_ARG): New macro.
26142 (yyparse): Use YYPARSE_PARAM_ARG.
26143
261441995-11-29 Richard Stallman <rms@gnu.org>
26145
26146 * doc/bison.texinfo:
26147 Describe literal string tokens, %raw, %no_lines, %token_table.
26148
261491995-11-29 Daniel Hagerty <hag@gnu.org>
26150
26151 * doc/bison.texinfo: Fixed update date
26152
261531995-10-16 Richard Stallman <rms@gnu.org>
26154
26155 * src/version.c: Version 1.25.
26156
261571995-10-16 Richard Stallman <rms@gnu.org>
26158
26159 * NEWS: *** empty log message ***
26160
261611995-10-16 Richard Stallman <rms@gnu.org>
26162
26163 * doc/bison.1, doc/bison.rnh:
26164 Add new options.
26165
261661995-10-15 Richard Stallman <rms@gnu.org>
26167
26168 * src/vmsgetargs.c, src/getargs.c:
26169 Added -n, -k, and -raw switches.
26170 (noparserflag, toknumflag, rawtoknumflag): New variables.
26171
26172 * src/symtab.h (SALIAS):
26173 New #define for adding aliases to %token.
26174 (struct bucket): Added `alias' field.
26175
26176 * src/reduce.c (reduce_grammar):
26177 Revise error message.
26178 (print_notices): Remove final `.' from error message.
26179
26180 * src/reader.c (reader_output_yylsp):
26181 New function.
26182 (readgram): Use `#if 0' around code that accepted %command
26183 inside grammar rules: The documentation doesn't allow it,
26184 and it will fail since the %command processors scan for the next %.
26185 (parse_token_decl): Extended the %token
26186 declaration to allow a multi-character symbol as an alias.
26187 (parse_thong_decl): New function.
26188 (read_declarations): Added %thong declarations.
26189 (read_declarations): Handle NOOP to deal with allowing
26190 % declarations as another means to specify the flags.
26191 (readgram): Allow %prec prior to semantics embedded in a rule.
26192 (skip_to_char, read_declarations, copy_definition)
26193 (parse_token_decl, parse_start_decl, parse_type_decl)
26194 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
26195 (get_type_name, copy_guard, copy_action, readgram)
26196 (get_type, packsymbols): Revised most error messages.
26197 Changed `fatal' to `warnxxx' to avoid aborting for error.
26198 Revised and use multiple warnxxx functions to avoid using VARARGS1.
26199 (read_declarations): Improve the error message for
26200 an invalid character. Do not abort.
26201 (read_declarations, copy_guard, copy_action): Use
26202 printable_version to avoid unprintable characters in printed output.
26203 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
26204 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
26205 Allow the type of a non-terminal can be given
26206 more than once, as long as all specifications give the same type.
26207
26208 * src/output.c:
26209 (output_headers, output_trailers, output, output_gram)
26210 (output_rule_data): Implement noparserflag variable.
26211 Implement toknumflag variable.
26212 (output): Call reader_output_yylsp to output LTYPESTR.
26213
26214 * src/main.c (main):
26215 If reader sees an error, don't process the grammar.
26216 (fatals): Updated to not use VARARGS1.
26217 (printable_version, int_to_string, warn, warni, warns, warnss)
26218 (warnsss): New error reporting functions. Avoid abort for error.
26219
26220 * src/lex.h:
26221 Added THONG and NOOP for alias processing.
26222 Added SETOPT for the new code that allows setting options with %flags.
26223
26224 * src/lex.c:
26225 Include getopt.h. Add some extern decls.
26226 (safegetc): New function to deal with EOF gracefully.
26227 (literalchar); new function to deal with reading \ escapes.
26228 (lex): Use literalchar.
26229 (lex): Implemented "..." tokens.
26230 (literalchar, lex, parse_percent_token): Made tokenbuffer
26231 always contain the token. This includes growing the token
26232 buffer while reading an integer.
26233 (parse_percent_token): Replaced if-else statement with percent_table.
26234 (parse_percent_token): Added % declarations as another
26235 way to specify the flags -n, -l, and -r. Also added hooks for
26236 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
26237 major changes to files.c.
26238 (lex) Retain in the incoming stream a character following
26239 an incorrect '/'.
26240 (skip_white_space, lex): Revised most error messages
26241 and changed fatal to warn to avoid aborting.
26242 (percent_table): Added %thong declarations.
26243
26244 * src/gram.h: Comment changes.
26245
26246 * src/files.c (openfiles, open_extra_files, done):
26247 Add faction flag
26248 and actfile file. Handle noparserflag. Both for -n switch.
26249
26250 * src/conflicts.c (resolve_sr_conflict):
26251 Remove use of alloca.
26252
262531995-06-01 Jim Meyering <meyering@gnu.org>
26254
26255 * doc/bison.texinfo: *** empty log message ***
26256
262571995-05-06 Richard Stallman <rms@gnu.org>
26258
26259 * src/bison.s1: Comment change.
26260
262611995-05-06 Richard Stallman <rms@gnu.org>
26262
26263 * bison.simple: Comment change.
26264
262651995-05-03 Richard Stallman <rms@gnu.org>
26266
26267 * src/version.c: Version now 1.24.
26268
26269 * src/bison.s1: Change distribution terms.
26270
26271 * src/version.c: Version now 1.23.
26272
262731995-05-03 Richard Stallman <rms@gnu.org>
26274
26275 * doc/bison.texinfo:
26276 Rewrite "Conditions for Using Bison".
26277 Update version to 1.24.
26278
262791995-05-03 Richard Stallman <rms@gnu.org>
26280
26281 * bison.simple: Change distribution terms.
26282
262831995-02-23 Richard Stallman <rms@gnu.org>
26284
26285 * src/files.c: Test __VMS_POSIX as well as VMS.
26286
262871995-02-14 Jim Meyering <meyering@gnu.org>
26288
26289 * src/bison.s1 (__yy_memcpy):
26290 Renamed from __yy_bcopy to avoid
26291 confusion. Reverse FROM and TO arguments to be consistent with
26292 those of memcpy.
26293
262941995-02-14 Jim Meyering <meyering@gnu.org>
26295
26296 * bison.simple (__yy_memcpy):
26297 Renamed from __yy_bcopy to avoid
26298 confusion. Reverse FROM and TO arguments to be consistent with
26299 those of memcpy.
26300
263011994-11-10 David J. MacKenzie <djm@gnu.org>
26302
26303 * NEWS: reformat
26304
26305 * NEWS: New file.
26306
26307 * Makefile.in (DISTFILES): Include NEWS.
26308
26309 * Makefile.in (DISTFILES):
26310 Include install-sh, not install.sh.
26311
26312 * configure.in: Update to Autoconf v2 macro names.
26313
263141994-10-05 David J. MacKenzie <djm@gnu.org>
26315
26316 * Makefile.in: fix typo
26317
26318 * Makefile.in (prefix, exec_prefix):
26319 Let configure set them.
26320
263211994-09-28 David J. MacKenzie <djm@gnu.org>
26322
26323 * Makefile.in: Set datadir to $(prefix)/share.
26324
263251994-09-15 Richard Stallman <rms@gnu.org>
26326
26327 * src/bison.s1:
26328 Update copyright notice and GPL version.
26329
263301994-09-15 Richard Stallman <rms@gnu.org>
26331
26332 * bison.simple:
26333 Update copyright notice and GPL version.
26334
263351994-07-12 Richard Stallman <rms@gnu.org>
26336
26337 * src/reduce.c, src/reader.c:
26338 entered into RCS
26339
263401994-05-05 David J. MacKenzie <djm@gnu.org>
26341
26342 * Makefile.in: entered into RCS
26343
263441994-03-26 Richard Stallman <rms@gnu.org>
26345
26346 * src/bison.s1: entered into RCS
26347
263481994-03-26 Richard Stallman <rms@gnu.org>
26349
26350 * bison.simple: entered into RCS
26351
263521994-03-25 Richard Stallman <rms@gnu.org>
26353
26354 * src/main.c: entered into RCS
26355
263561994-03-24 Richard Stallman <rms@gnu.org>
26357
26358 * src/conflicts.c: entered into RCS
26359
263601994-01-02 Richard Stallman <rms@gnu.org>
26361
26362 * Makefile.in: *** empty log message ***
26363
263641993-11-21 Richard Stallman <rms@gnu.org>
26365
26366 * src/bison.s1: *** empty log message ***
26367
263681993-11-21 Richard Stallman <rms@gnu.org>
26369
26370 * doc/bison.texinfo: entered into RCS
26371
26372 * doc/bison.texinfo: *** empty log message ***
26373
263741993-11-21 Richard Stallman <rms@gnu.org>
26375
26376 * bison.simple: *** empty log message ***
26377
263781993-10-25 David J. MacKenzie <djm@gnu.org>
26379
26380 * doc/bison.texinfo: *** empty log message ***
26381
263821993-10-19 Richard Stallman <rms@gnu.org>
26383
26384 * src/bison.s1: *** empty log message ***
26385
263861993-10-19 Richard Stallman <rms@gnu.org>
26387
26388 * bison.simple: *** empty log message ***
26389
263901993-10-14 Richard Stallman <rms@gnu.org>
26391
26392 * src/bison.s1: *** empty log message ***
26393
263941993-10-14 Richard Stallman <rms@gnu.org>
26395
26396 * bison.simple: *** empty log message ***
26397
263981993-09-14 David J. MacKenzie <djm@gnu.org>
26399
26400 * doc/bison.texinfo: *** empty log message ***
26401
264021993-09-13 Noah Friedman <friedman@gnu.org>
26403
26404 * Makefile.in: *** empty log message ***
26405
264061993-09-10 Richard Stallman <rms@gnu.org>
26407
26408 * src/conflicts.c: *** empty log message ***
26409
26410 * src/system.h: entered into RCS
26411
264121993-09-10 Richard Stallman <rms@gnu.org>
26413
26414 * doc/bison.1: entered into RCS
26415
264161993-09-06 Noah Friedman <friedman@gnu.org>
26417
26418 * src/version.c: entered into RCS
26419
264201993-09-06 Noah Friedman <friedman@gnu.org>
26421
26422 * Makefile.in: *** empty log message ***
26423
264241993-07-30 David J. MacKenzie <djm@gnu.org>
26425
26426 * Makefile.in: *** empty log message ***
26427
264281993-07-24 Richard Stallman <rms@gnu.org>
26429
26430 * src/bison.s1: *** empty log message ***
26431
264321993-07-24 Richard Stallman <rms@gnu.org>
26433
26434 * bison.simple: *** empty log message ***
26435
264361993-07-08 David J. MacKenzie <djm@gnu.org>
26437
26438 * Makefile.in: *** empty log message ***
26439
264401993-07-04 Richard Stallman <rms@gnu.org>
26441
26442 * src/bison.s1: *** empty log message ***
26443
264441993-07-04 Richard Stallman <rms@gnu.org>
26445
26446 * bison.simple: *** empty log message ***
26447
264481993-06-26 David J. MacKenzie <djm@gnu.org>
26449
26450 * src/getargs.c: entered into RCS
26451
264521993-06-26 David J. MacKenzie <djm@gnu.org>
26453
26454 * doc/bison.texinfo: *** empty log message ***
26455
26456 * doc/bison.1: New file.
26457
264581993-06-25 Richard Stallman <rms@gnu.org>
26459
26460 * src/getargs.c: New file.
26461
264621993-06-16 Richard Stallman <rms@gnu.org>
26463
26464 * src/bison.s1: *** empty log message ***
26465
264661993-06-16 Richard Stallman <rms@gnu.org>
26467
26468 * bison.simple: *** empty log message ***
26469
264701993-06-03 Richard Stallman <rms@gnu.org>
26471
26472 * src/bison.s1: New file.
26473
264741993-06-03 Richard Stallman <rms@gnu.org>
26475
26476 * doc/bison.texinfo: *** empty log message ***
26477
264781993-06-03 Richard Stallman <rms@gnu.org>
26479
26480 * bison.simple: New file.
26481
264821993-05-19 Richard Stallman <rms@gnu.org>
26483
26484 * doc/bison.texinfo: New file.
26485
264861993-05-07 Noah Friedman <friedman@gnu.org>
26487
26488 * Makefile.in: *** empty log message ***
26489
264901993-04-28 Noah Friedman <friedman@gnu.org>
26491
26492 * src/reader.c: *** empty log message ***
26493
264941993-04-23 Noah Friedman <friedman@gnu.org>
26495
26496 * src/alloc.h: entered into RCS
26497
264981993-04-20 David J. MacKenzie <djm@gnu.org>
26499
26500 * src/version.c: *** empty log message ***
26501
26502 * src/files.c, src/allocate.c:
26503 entered into RCS
26504
26505 * src/reader.c: *** empty log message ***
26506
26507 * src/lex.c: entered into RCS
26508
26509 * src/conflicts.c: New file.
26510
26511 * src/symtab.c: entered into RCS
26512
26513 * src/alloc.h: New file.
26514
26515 * src/LR0.c: entered into RCS
26516
265171993-04-18 Noah Friedman <friedman@gnu.org>
26518
26519 * src/reader.c: New file.
26520
26521 * src/version.c: *** empty log message ***
26522
265231993-04-18 Noah Friedman <friedman@gnu.org>
26524
26525 * Makefile.in: *** empty log message ***
26526
265271993-04-17 Noah Friedman <friedman@gnu.org>
26528
26529 * Makefile.in: *** empty log message ***
26530
265311993-04-15 Richard Stallman <rms@gnu.org>
26532
26533 * src/main.c, src/files.c:
26534 New file.
26535
265361993-04-15 Noah Friedman <friedman@gnu.org>
26537
26538 * configure.in: entered into RCS
26539
26540 * configure.in: *** empty log message ***
26541
26542 * configure.in: New file.
26543
265441993-04-14 Richard Stallman <rms@gnu.org>
26545
26546 * Makefile.in: New file.
26547
265481993-04-13 Richard Stallman <rms@gnu.org>
26549
26550 * src/version.c: New file.
26551
265521993-03-25 Richard Stallman <rms@gnu.org>
26553
26554 * src/output.c: entered into RCS
26555
265561992-09-25 Richard Stallman <rms@gnu.org>
26557
26558 * configure.bat: entered into RCS
26559
265601992-06-22 Richard Stallman <rms@gnu.org>
26561
26562 * src/vmsgetargs.c: entered into RCS
26563
265641992-06-22 Richard Stallman <rms@gnu.org>
26565
26566 * doc/bison.rnh: entered into RCS
26567
265681992-04-20 David J. MacKenzie <djm@gnu.org>
26569
26570 * README: entered into RCS
26571
265721992-01-22 Richard Stallman <rms@gnu.org>
26573
26574 * src/machine.h: entered into RCS
26575
265761991-12-21 Richard Stallman <rms@gnu.org>
26577
26578 * src/lalr.c, src/closure.c:
26579 entered into RCS
26580
265811991-12-20 Richard Stallman <rms@gnu.org>
26582
26583 * src/state.h: entered into RCS
26584
265851991-12-18 Richard Stallman <rms@gnu.org>
26586
26587 * src/print.c, src/nullable.c, src/derives.c:
26588 entered into RCS
26589
265901991-11-03 David J. MacKenzie <djm@gnu.org>
26591
26592 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
26593 entered into RCS
26594
265951988-09-09 Richard Stallman <rms@gnu.org>
26596
26597 * src/bison.hairy: entered into RCS
26598
265991987-12-16 Richard Stallman <rms@gnu.org>
26600
26601 * REFERENCES: entered into RCS
dc546b0f 26602
f294a2c2 26603
04098407 26604 -----
f294a2c2 26605
575619af
JD
26606 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
26607 Inc.
f294a2c2 26608
04098407
PE
26609 Copying and distribution of this file, with or without
26610 modification, are permitted provided the copyright notice and this
26611 notice are preserved.