]> git.saurik.com Git - bison.git/blame - ChangeLog
Fix missing updates to GPLv3.
[bison.git] / ChangeLog
CommitLineData
fea2d6b0
JD
12011-04-09 Joel E. Denny <joeldenny@joeldenny.org>
2
3 Fix missing updates to GPLv3.
4 Reported by Tys Lefering at
5 <http://lists.gnu.org/archive/html/bison-patches/2011-04/msg00000.html>.
6 * src/print-xml.c, src/print-xml.h: In these files.
7
6f8bdce2
JD
82011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
9
10 Add -Wconflicts-sr and -Wconflicts-rr.
11 Thus, conflict reports are now affected by -Werror and -Wnone
12 (unless %expect or %expect-rr is specified). Reported by George
13 Neuner at
14 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
15 * NEWS (2.5): Document.
16 * doc/bison.texinfo (Bison Options): Document.
17 * src/complain.c, src/complain.h (set_warning_issued): Export
18 function.
19 * src/conflicts.c (conflicts_print): Suppress conflict report
20 based on -Wno-conflicts-sr and -Wno-conflicts-rr, and treat
21 conflicts as errors if -Werror.
22 * src/getargs.c (warnings_flag): Initialize with
23 warnings_conflicts_sr and warnings_conflicts_rr as well.
24 (warnings_args, warnings_types): Add entries for
25 warnings_conflicts_sr and warnings_conflicts_rr.
26 (usage): Update.
27 * src/getargs.h (enum warnings): Add entries for
28 warnings_conflicts_sr and warnings_conflicts_rr.
29 * tests/conflicts.at (-W versus %expect and %expect-rr): New test
30 group.
31 * tests/local.at (AT_BISON_CHECK_NO_XML): Update now that the
32 conflict report can produce a "warnings being treated as errors"
33 message. Also, check that stderr is now fully scrubbed by -Wnone
34 when the exit status is 0.
35
fc7ce997
JD
362011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
37
38 Pacify maintainer-check-posix.
39 Adding command-line options after the grammar file name is not
40 permitted, so disable checks that do that when
41 maintainer-check-posix is running.
42 * tests/local.at (AT_BISON_CHECK_NO_XML): Don't run the
43 problematic checks when POSIXLY_CORRECT=1. Also, for readability,
44 remove an unnecessary m4_if.
45
8ffd7912
JD
462011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
47
48 Add -Wother so -Wnone suppresses all warnings.
49 Reported by George Neuner at
50 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
51 * NEWS (2.5): Document.
52 * THANKS (George Neuner): Add.
53 * doc/bison.texinfo (Bison Options): Document.
54 * src/complain.c, src/complain.h
55 (warn_at, warn_at_indent, warn): Suppress warning if -Wno-other.
56 (midrule_value_at): New warning function, similar to yacc_at in
57 that it's controlled by its own warning category.
58 * src/getargs.c (warnings_flag): Initialize to warnings_other.
59 (warnings_args, warnings_types): Add entry for warnings_other.
60 (usage): Update.
61 * src/getargs.h (enum warnings): Add entry for warnings_other.
62 * src/gram.c (grammar_rules_useless_report): If -Wno-other, then
63 don't print useless rules.
64 * src/reader.c (symbol_should_be_used): Rather than adjusting the
65 return value based on whether midrule value warnings are enabled,
66 accept a new parameter for telling the caller whether true is
67 being returned for a potential midrule warning.
68 (grammar_rule_check): Use midrule_value_at for midrule value
69 warnings, and continue to use warn_at for all other warnings. Let
70 them check whether the warnings are enabled.
71 * tests/local.at (AT_BISON_CHECK): Update documentation.
72 (AT_BISON_CHECK_NO_XML): Check that -Wnone and --warnings=none
73 disable all warnings exercised in the test suite.
74
dab96632
JD
752011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
76
77 Don't let -Wnone disable -Werror.
78 Discussed at
79 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00009.html>.
80 * NEWS (2.5): Document.
81 * src/getargs.c (flags_argmatch): Accept a new argument that
82 specifies what flags "all" and thus "none" affect.
83 (FLAGS_ARGMATCH): Update flags_argmatch invocation.
84 * tests/input.at (-Werror is not affected by -Wnone and -Wall):
85 New test group.
86
248dba53
JD
872011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
88
89 * NEWS (2.5): Document fix for -Wno-CATEGORY.
90
20cc7149
DJ
912008-11-21 Di-an Jan <dianj@freeshell.org>
92
93 Implement no-XXX arguments for --warnings, --report, --trace.
94 * src/getargs.c (flags_argmatch): Handles no-XXX.
95 Fix typo in doxygen comment.
96
56706c61
JD
972011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
98
99 doc: fix confusing citation of LAC publication.
100 Suggested by Akim Demaille.
101 * doc/bison.texinfo (LAC): Here.
102
a6e5a280
JD
1032011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
104
105 lr.default-reductions: rename "full" value to "most".
106 Unlike "consistent" and "accepting", "full" doesn't answer the
107 question of "which states".
108 * doc/bison.texinfo (%define Summary): Update.
109 (Default Reductions): Update.
110 * src/print.c (print_reductions): Update.
111 * src/reader.c (prepare_percent_define_front_end_variables):
112 Update.
113 * src/tables.c (action_row): Update.
114 * tests/input.at (%define enum variables): Update.
115 * tests/reduce.at (%define lr.default-reductions): Update.
116
49e8e901
JD
1172011-03-13 Joel E. Denny <joeldenny@joeldenny.org>
118
119 * src/parse-gram.c, src/parse-gram.h: Regenerate.
120
8f462efe
AD
1212011-03-09 Akim Demaille <akim@lrde.epita.fr>
122
123 named references: fix double free.
124 In `rhs[name]: "a" | "b"', do not free "name" twice.
125 Reported by Tys Lefering.
126 <http://lists.gnu.org/archive/html/bug-bison/2010-06/msg00002.html>
127 * src/named-ref.h, src/named-ref.c (named_ref_copy): New.
128 * src/parse-gram.y (current_lhs): Rename as...
129 (current_lhs_symbol): this.
130 (current_lhs): New function. Use it to free the current lhs
131 named reference.
132 * src/reader.c: Bind lhs to a copy of the current named reference.
133 * src/symlist.c: Rely on free (0) being valid.
134 * tests/named-refs.at: Test this.
135
686e83e3
AD
1362011-03-09 Akim Demaille <akim@lrde.epita.fr>
137
138 tests: style changes.
139 * tests/named-refs.at (Redundant words in LHS brackets)
140 (Unresolved references): here.
141
f0e2c228
JD
1422011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
143
144 java: fix parser tracing bug.
145 * NEWS (2.5): Document.
146 * data/lalr1.java (YYParser::YYStack::print): Don't skip top
147 element.
148
4c2a6e42
JD
1492011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
150
151 java: finish fixing parser stack popping bug.
152 * NEWS (2.5): Document.
153 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
154 in clearing the location stack. Also fix pop function that
155 accepts no arguments.
156
6f75992b
AB
1572011-03-06 Angelo Borsotti <angelo.borsotti@gmail.com> (tiny change)
158
159 java: fix parser stack popping bug.
160 Reported at
161 <http://lists.gnu.org/archive/html/bug-bison/2011-02/msg00005.html>.
162 * THANKS (Angelo Borsotti): Add.
163 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
164 in clearing the value stack. Previously, the top element of the
165 stack wasn't cleared and so the value was not garbage collected.
166
121c4982
JD
1672011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
168
169 doc: cite publication for LAC.
170 * doc/bison.texinfo (LAC): Here.
171
5da0355a
JD
1722011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
173
174 doc: clean up terminology for mysterious conflicts.
175 * doc/bison.texinfo (Mystery Conflicts): Rename node to...
176 (Mysterious Conflicts): ... this, which is already the section
177 title and the name used in the index. Update all cross-references
178 to this node. Also, don't imply that R/R conflicts are the only
179 kind of mysterious conflict.
180
d815ec4a
JD
1812011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
182
183 lr.default-reductions: rename "all" value to "full".
184 States that shift the error token do not have default reductions,
185 and GLR disables some default reductions, so "all" was a misnomer.
186 * doc/bison.texinfo (%define Summary): Update.
187 (Default Reductions): Update.
188 * src/print.c (print_reductions): Update.
189 * src/reader.c (prepare_percent_define_front_end_variables):
190 Update.
191 * src/tables.c (action_row): Update.
192 * tests/input.at (%define enum variables): Update.
193 * tests/reduce.at (%define lr.default-reductions): Update.
194
6f04ee6c
JD
1952011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
196
197 doc: create a new Tuning LR section in the manual.
198 And clean up all other documentation of the features described
199 there.
200 * NEWS (2.5): Tweak wording of lr.type and parse.lac entries a
201 bit, update the cross-references to the manual, and point out that
202 LAC has caveats. Don't be so adamant that IELR+LAC=canonical LR.
203 That is, as the referenced section in the manual documents, LAC
204 does not fix infinite parsing loops on syntax errors.
205 * doc/bison.texinfo: Consistently drop the "(1)" suffix from LALR,
206 IELR, and LR in @cindex.
207 (%define Summary): Condense the entries for lr.default-reductions,
208 lr.keep-unreachable-states, lr.type, and parse.lac into brief
209 summaries, and cross-reference the appropriate subsections of
210 Tuning LR. For parse.lac, mention that it's only implemented for
211 deterministic parsers in C.
212 (Error Reporting): When mentioning %error-verbose, mention LAC,
213 and add cross-reference to the LAC section.
214 (Tuning LR): New section with an extended version of the
215 documentation removed from %define Summary. Change all
216 cross-references in the manual to point here instead of there.
217 (Calc++ Parser): When mentioning %error-verbose, mention LAC, and
218 add cross-reference to the LAC section.
219 (Table of Symbols): In %error-verbose and YYERROR_VERBOSE entries,
220 add cross-references to Error Reporting.
221 (Glossary): Capitalize entry titles consistently. Add definitions
222 for "defaulted state" and "unreachable state". Expand IELR
223 acronym in IELR's entry.
224
71caec06
JD
2252011-02-20 Joel E. Denny <joeldenny@joeldenny.org>
226
227 doc: add bibliography to manual.
228 * doc/bison.texinfo (Mystery Conflicts): Cross-reference
229 bibliography instead of citing publications directly.
230 (Generalized LR Parsing): Likewise.
231 (Bibliography): New section. Not all entries are cross-referenced
232 yet, but that will come in future patches.
233
77768165
JD
2342011-02-19 Joel E. Denny <joeldenny@joeldenny.org>
235
236 java: test and document previous bug fix.
237 * NEWS (2.5): Document it.
238 * tests/java.at (_AT_DATA_JAVA_CALC_Y): To one of the yyerror
239 invocations, pass a location that spans multiple tokens. Change
240 yyerror to report all of a location rather than just the begin
241 position. Extend yylex and Position to count tokens on a line.
242 Remove getHashCode as it's unused. Update all expected output.
243
8db68289
BK
2442011-02-19 Bernd Kiefer <kiefer@dfki.de> (tiny change)
245
246 java: fix location handling bug.
247 Reported at
248 <http://lists.gnu.org/archive/html/bison-patches/2011-02/msg00005.html>.
249 * data/lalr1.java (YYParser::yylloc): For non-empty RHS, fix
250 reversed access to location stack.
251 * THANKS (Bernd Kiefer): Add.
252
f3103c5b
AD
2532010-05-11 Akim Demaille <demaille@gostai.com>
254
255 doc: please Emacs.
256 * doc/bison.texinfo (Local Variables): Move this after the
257 LocalWords, since the latter are looked for in the whole document,
258 while the former are looked for only at its end.
259 Require american spell checking.
260
406dec82
JD
2612011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
262
263 doc: clean up new subsections in manual.
264 * doc/bison.texinfo (%define Summary): Reword so it reads well as
265 a separate section. For example, add an intro, and move most of
266 the text outside of the @deffn so it is not indented so far.
267 (%code Summary): Likewise.
268 (Table of Symbols): Reword %code entry to match the %code entry in
269 Decl Summary.
270
2f4518a1
JD
2712011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
272
273 doc: finish splitting apart the manual's Decl Summary section.
274 Suggested by Akim Demaille at
275 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
276 * doc/bison.texinfo (Decl Summary): Extract most of the %define
277 entry into...
278 (%define Summary): ... this new subsection, and update all
279 cross-references. For readability of the patches, rewriting of
280 the text so it makes sense as a separate subsection will come in a
281 later patch. Moreover, the majority of the text describing the
282 various new LR features should likely move to another new section
283 somewhere.
284
8e6f2266
JD
2852011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
286
287 doc: begin to split apart the manual's Decl Summary section.
288 Discussed in thread starting at
289 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
290 * doc/bison.texinfo (Decl Summary): Extract most of the %code
291 entry into...
292 (%code Summary): ... this new subsection, and update all
293 cross-references. For readability of the patches, rewriting of
294 the text so it makes sense as a separate subsection will come in a
295 later patch.
296
9913d6e4
JD
2972011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
298
299 doc: clean up naming of various Bison files.
300 The Bison manual's names for various files associated with a Bison
301 parser has devolved into inconsistency. This patch makes the
302 naming consistent for the most important files. First, it chooses
303 "grammar file" over "input file". The former appears to be more
304 traditional in the Bison manual, and Bison has other input
305 files (skeletons). Second, it chooses "parser implementation
306 file" over names like "parser file", "parser source file", "parser
307 source code file", and "parser output file". The new name makes
308 it clearer where Bison generates the main parser implementation,
309 and it is easily distinguishable from "parser header file".
310 * doc/bison.texinfo: Implement throughout.
311
840341d6
JD
3122011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
313
314 doc: give credit to more of Bison's developers.
315 * doc/bison.texinfo (Introduction): Don't imply that only Robert
316 Corbett, Richard Stallman, and Wilfred Hansen have contributed to
317 Bison. However, I don't have time to write a full history, so
318 just point readers to THANKS and ChangeLog.
319
d89e48b3
JD
3202011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
321
322 doc: document experimental features better.
323 * doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
324 LR(1) are experimental. Mention Java. Normally experimental
325 features probably shouldn't be mentioned in the introduction.
326 However, if Bison's limitations to LALR(1), C, and C++ are so
327 important that they should be mentioned here, then it's important
328 to point out that Bison is beginning to escape those limitations.
329 Moreover, these particular experimental features have very little
330 chance of being removed.
331 * src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
332 experimental.
333
eb8c66bb
JD
3342011-01-29 Joel E. Denny <joeldenny@joeldenny.org>
335
336 Do not allow identifiers that start with a dash.
337 This cleans up our previous fixes for a bug whereby Bison
338 discarded `.field' in `$-1.field'. The previous fixes were less
339 restrictive about where a dash could appear in an identifier, but
340 the restrictions were hard to explain. That bug was reported and
341 this final fix was originally suggested by Paul Hilfinger. This
342 also fixes a remaining bug reported by Paul Eggert whereby Bison
343 parses `%token ID -123' as `%token ID - 123' and handles `-' as an
344 identifier. Now, `-' cannot be an identifier. Discussed in
345 threads beginning at
346 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
347 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
348 * NEWS (2.5): Update entry describing the dash extension to
349 grammar symbol names. Also, move that entry before the named
350 references entry because the latter mentions the former.
351 * doc/bison.texinfo (Symbol): Update documentation for symbol
352 names. As suggested by Paul Eggert, mention the effect of periods
353 and dashes on named references.
354 (Decl Summary): Update documentation for unquoted %define values,
355 which, as a side effect, can no longer start with dashes either.
356 * src/scan-code.l (id): Implement.
357 * src/scan-gram.l (id): Implement.
358 * tests/actions.at (Exotic Dollars): Extend test group to exercise
359 bug reported by Paul Hilfinger.
360 * tests/input.at (Symbols): Update test group, and extend to
361 exercise bug reported by Paul Eggert.
362 * tests/named-refs.at (Stray symbols in brackets): Update test
363 group.
364 ($ or @ followed by . or -): Likewise.
365 * tests/regression.at (Invalid inputs): Likewise.
366
448dc38b
JD
3672011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
368
369 * data/yacc.c: Fix last apostrophe warning from xgettext.
370
7e5ef706
PE
3712011-01-09 Paul Eggert <eggert@cs.ucla.edu>
372
373 Fix minor problems encountered by a fresh bootstrap.
374 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
375 as they confuse xgettext, which tries to parse them as C character
376 constants in a preprocessor directive.
377 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
378 that expression might not promote to int on some platforms.
379 * src/parse-gram.c, src/parse-gram.h: Regenerate.
380
8cbbf178
JD
3812011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
382
383 Improve error messages for `$' or `@' followed by `.' or `-'.
384 Previously, for this special case of an invalid reference, the
385 usual "symbol not found in production:" was printed. However,
386 because the symbol name was parsed as the empty string, that
387 message was followed immediately by a newline instead of a symbol
388 name. In reality, this is a syntax error, so the reference is
389 invalid regardless of the symbols actually appearing in the
390 production. Discussed at
391 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
392 * src/scan-code.l (parse_ref): Report the above case as a syntax
393 error. Other than that, continue to handle this case like any
394 other invalid reference that Bison manages to parse because
395 "possibly meant" messages can still be helpful to the user.
396 * tests/named-refs.at ($ or @ followed by . or -): New test group.
397
35430378
JD
3982011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
399
400 doc: don't use @acronym.
401 Lately, many GNU packages are dropping it. See
402 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
403 * doc/bison.texinfo: Remove all uses.
404
d236ad94
AR
4052011-01-05 Alex Rozenman <rozenman@gmail.com>
406
407 Do not allow identifiers that start with a negative number.
408 Reported by Paul Hilfinger as a side effect of named references
409 support at
410 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
411 Suggested by Paul Eggert.
412 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
413 * src/scan-gram.l ({letter}, {id}): Likewise.
414
9a4292e5
JD
4152011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
416
417 * ChangeLog (2011-01-02): improve description.
418
17300e83
JD
4192011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
420
421 maint: don't update copyright years in bootstrap.
422 * .x-update-copyright: Add entry for bootstrap.
423 * bootstrap: Remove 2011 from copyright years. The bootstrap
424 version we're currently using comes from an older version of
425 gnulib.
426 * bootstrap.conf (bootstrap_sync): Add comments explaining this
427 issue.
428
ea0a7676
JD
4292011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
430
431 maint: run "make update-copyright".
432
f52e1e5e
JD
4332011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
434
9a4292e5 435 maint: prepare to use year ranges in copyright notices.
f52e1e5e 436 * README (Copyright statements): New section explaining the range
9a4292e5
JD
437 notation. The GNU maintainers document requires this explanation:
438 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
439 I copied our explanation from coreutils.
f52e1e5e
JD
440 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
441 disabled Bison's automated use of ranges.
442 * cfg.mk (update-copyright-env): Likewise.
443
210c1eef
JD
4442011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
445
446 Correct my email address.
447 * ChangeLog: In all recent entries.
448 * THANKS (Joel E. Denny): Here.
449
4502010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
6ee881f6
JD
451
452 doc: cleanup.
453 * NEWS (2.5): Try to sort entries according to how interesting
454 users might find them.
455
210c1eef 4562010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
3b1977ea
JD
457
458 doc: cleanup.
459 * NEWS (2.5): Make some minor improvements to wording, and format
460 entries more consistently.
461 * doc/bison.texinfo (Language and Grammar): Point out that IELR
462 and canonical LR are experimental features.
463 (Decl Summary): In list of %define variables, make wording more
464 consistent. Improve discussion of using LALR for GLR.
465
210c1eef 4662010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
4c38b19e
JD
467
468 parse.lac: document.
469 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
470 other corrections to verbose syntax error messages.
471 * doc/bison.texinfo (Decl Summary): Rewrite entries for
472 lr.default-reductions and lr.type to be clearer, to mention
473 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
474 for parse.lac.
475 (Glossary): Add entry for LAC.
476
210c1eef 4772010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
723fe7d1
JD
478
479 parse.lac: implement exploratory stack reallocations.
480 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
481 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
482 with values of "failures" (default) or "full".
483 (b4_declare_parser_state_variables): Add yyesa, yyes, and
484 yyes_capacity variables.
485 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
486 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
487 LAC requested.
488 (YYCOPY_NEEDED): New cpp macro.
489 (YYCOPY): Define if LAC requested.
490 (yy_lac_stack_realloc): New function implementing stack
491 reallocations. Use YYMAXDEPTH for maximum stack size given that
492 the stack should never need to grow larger than the main state
493 stack needs to grow without LAC.
494 (YY_LAC_ESTABLISH): Update yy_lac invocation.
495 (yy_lac): Add arguments for exploratory stack memory data
496 recorded in the main parser. Invoke yy_lac_stack_realloc when
497 reallocation is necessary.
498 (yysyntax_error): Add the same new arguments and pass them to
499 yy_lac.
500 (yypstate_delete): Free yyes if necessary.
501 (yyesa, yyes, yyes_capacity): #define these to yypstate members
502 in the case of push parsing.
503 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
504 Update yysyntax_error invocations. At yyreturn, free yyes if
505 necessary.
506 * src/parse-gram.y: %define parse.lac full.
507 * tests/input.at (LAC: errors for %define): Extend for
508 parse.lac-memory-trace.
509 * tests/regression.at (LAC: Exploratory stack): Extend to check
510 that stack reallocs happen when expected.
511 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
512 parse.lac.es-capacity-initial.
513
210c1eef 5142010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
ea13bea8
JD
515
516 parse.lac: implement as %define variable.
517 LAC = lookahead correction. See discussion at
518 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
519 However, one point there must be corrected: because of %nonassoc,
520 LAC is *not* always redundant for lr.type=canonical-lr.
521 * data/yacc.c: Accept values of "none" (default) or "full" for
522 parse.lac. Accept %define parse.lac.es-capacity to specify
523 capacity of LAC's temporary exploratory stack. It defaults to 20
524 and, for now, will not grow dynamically.
525 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
526 parse.lac!=none.
527 (YYBACKUP): Invoke YY_LAC_DISCARD.
528 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
529 yy_lac and track when it needs to be invoked
530 (yy_lac): New function that, given the current stack, determines
531 whether a token can eventually be shifted. Return status mimics
532 yyparse return status.
533 (yysyntax_error): Change yystate argument to yyssp so stack top
534 can be passed to yy_lac. If LAC is requested, build expected
535 token list by invoking yy_lac for every token instead of just
536 checking the current state for lookaheads. Return 2 if yy_lac
537 exhausts memory.
538 (yyparse, yypush_parse): Use local variable yy_lac_established and
539 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
540 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
541 is requested.
542 * tests/conflicts.at (%nonassoc and eof): Extend to check the
543 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
544 (%error-verbose and consistent errors): Likewise.
545 (LAC: %nonassoc requires splitting canonical LR states): New test
546 group demonstrating how LAC can fix canonical LR.
547 * tests/input.at (LAC: Errors for %define): New test group.
548 * tests/regression.at (LAC: Exploratory stack): New test group.
549 (LAC: Memory exhaustion): New test group.
550
210c1eef 5512010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
dcd39f1d
JD
552
553 build: use gnulib's new bootstrap_sync option.
554 Now, whenever we update bison's copy of gnulib, bootstrap will
555 update itself the next time it's run.
556 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
557 * bootstrap.conf (bootstrap_sync): Set to true.
558 * gnulib: Update to latest so bootstrap is in sync now.
559
210c1eef 5602010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
3b837882
JD
561
562 yysyntax_error: adjust prior fixes for branch-2.5's lalr1.cc.
563 On master, there is no yychar in lalr1.cc, but there is on
564 branch-2.5, and the prior cherry-pick of "Fix handling of yychar
565 manipulation in user semantic actions" wasn't adjusted for that
566 difference.
567 * data/lalr1.cc (yy::parser::parse): Translate yychar before
568 every use of yytoken, and add comments explaining this approach.
569 * tests/conflicts.at (%error-verbose and consistent errors):
570 Extend to test yychar manipulation with lalr1.cc.
571
210c1eef 5722010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
095a1d11
JD
573
574 yysyntax_error: fix for consistent error with lookahead.
575 * NEWS (2.5): Document.
576 * data/yacc.c (yysyntax_error): In a verbose syntax error
577 message while in a consistent state with a default action (which
578 must be an error action given that yysyntax_error is being
579 invoked), continue to drop the expected token list, but don't
580 drop the unexpected token unless there actually is no lookahead.
581 Moreover, handle that internally instead of returning 1 to tell
582 the caller to do it. With that meaning of 1 gone, renumber
583 return codes more usefully.
584 (yyparse, yypush_parse): Update yysyntax_error usage. Most
585 importantly, set yytoken to YYEMPTY when there's no lookahead.
586 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
587 unexpected token unless there actually is no lookahead.
588 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
589 set yytoken to yyempty_ before invoking yysyntax_error_.
590 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
591 token unless there actually is no lookahead.
592 * data/lalr1.java (YYParser::parse): If there's no lookahead,
593 set yytoken to yyempty_ before invoking yysyntax_error.
594 (YYParser::yysyntax_error): Again, don't drop the unexpected
595 token unless there actually is no lookahead.
596 * tests/conflicts.at (%error-verbose and consistent
597 errors): Extend test group to further reveal how the previous
598 use of the simple "syntax error" message was too general. Test
599 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
600 failure.
601 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
602 to...
603 * tests/local.at: ... here.
604 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
605 (AT_BISON_OPTION_POPDEFS): Pop it.
606 (AT_FULL_COMPILE): Extend to handle Java.
607
210c1eef 6082010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
678094a2
JD
609
610 yysyntax_error: more preparation for readability of next patch.
611 There are no behavioral changes here.
612 * data/glr.c (yyreportSyntaxError): Reorganize.
613 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
614 * tests/conflicts.at (%error-verbose and consistent errors):
615 Reorganize.
616
210c1eef 6172010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
f953cb20
JD
618
619 yysyntax_error: prepare for readability of next patches.
620 These are purely whitespace changes that result in ugly code
621 but that make the next couple of patches much easier to read.
622 * data/glr.c (yyreportSyntaxError): Reindent.
623 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
624 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
625 * data/yacc.c (yysyntax_error): Reindent.
626
0e0f066b
JD
6272010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
628
629 yysyntax_error: improve invocation readability.
630 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
631 invocation, get rid of the while loop, which is misleading
632 because there are really at most two iterations.
633
5f1485d8
JD
6342010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
635
636 * ChangeLog: Correct some errors in previous entries.
637
2f3fd8f9
JD
6382010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
639
640 maint: re-anchor all .gitignore entries.
641 * bootstrap: Copy from gnulib's latest for the fix to
642 automatically anchor entries it constructs.
643 * gnulib: Update to latest just so it has the same bootstrap.
644 * .gitignore, build-aux/.gitignore, doc/.gitignore:
645 * lib/.gitignore, m4/.gitignore, po/.gitignore:
646 * runtime-po/.gitignore: Re-anchor all entries.
647
86996fca
PE
6482010-10-08 Paul Eggert <eggert@cs.ucla.edu>
649
ea6046b9
PE
650 Fix portability problem on OpenBSD 4.7.
651
652 Jim Meyering reported this in
653 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
654 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
655 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
656 for quite some time.
657 * src/parse-gram.c, src/parse-gram.h: Regenerate.
658 * tests/regression.at: Tamper with the renamed witness.
659
86996fca
PE
660 Adjust to recent changes to gnulib bootstrap.
661
662 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
663 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
664 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
665 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
666 anymore and don't know of anybody else who does. If someone needs
667 these files, they can resurrect them.
668 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
669 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
670 Omit leading '/', since bootstrap omits it.
671 Adjust file names to match current contents better.
672 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
673 installed just for us.
674 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
675 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
676 needed somehow. Don't have time to look into why.
677 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
678 the GNU malloc behavior, where malloc (0) != NULL unless we're
679 out of storage? If not, we can omit malloc-gnu; but for now I left
680 it in to be safe.
681 (vc_ignore): Remove.
682 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
683 uses that convention.
684
7527c744
JD
6852010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
686
687 Version 2.4.3.
688 * NEWS (2.4.3): Set date.
689
d034d520
JD
6902010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
691
692 maint: add gettext version to release announcements.
693 Suggested by Paul Hilfinger at
694 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
695 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
696 * cfg.mk (bootstrap-tools): Add gettext.
697
cf22447c
JD
6982010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
699
700 doc: fix -W and %expect documentation some.
701 * NEWS (2.4.3): Mention that there are documentation fixes.
702 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
703 turns conflicts into errors not warnings.
704 (Shift/Reduce): Likewise.
705 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
706
4631c34f
JD
7072010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
708
709 -Werror: fix for rules useless in parser after conflicts.
710 * NEWS (2.4.3): Document fix.
711 * src/complain.c (error_message): Extend to handle incomplete
712 error messages so warn and warn_at can be used in more cases.
713 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
714 -Werror is always obeyed.
715 * src/reduce.c (reduce_print): Use warn so that the "warnings
716 being treated as errors" message is printed consistently before
717 the first warning message. This makes testing easier.
718 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
719 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
720 --warnings=error when warnings appear in bison's stderr.
721
3e948170
JD
7222010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
723
724 maint: enable gnits only at stable releases.
725 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
726 version string should disable gnits. Explain in comments.
727
82df2d6d
JD
7282010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
729
730 i18n: update.
731 * po/POTFILES.in: Add src/graphviz.c.
732
6e0ecb9a
JD
7332010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
734
735 i18n: fix for gnulib.
736 * po/POTFILES.in: Add remaining gnulib files that have
737 translatable strings.
738
83e34842
JD
7392010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
740
741 maint: use announce-gen's new --mail-headers.
742 * HACKING (Announce): Update instructions.
743 * cfg.mk (announcement_Cc_): Define.
744 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
745 required by latest gnulib.
746 * gnulib: Update to latest.
747
0162a44c
JD
7482010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
749
750 tests: handle Valgrind that complains about >&-.
751 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
752 (Output files: -dv >&-): Skip test group if running
753 maintainer-check-valgrind.
754
241ac701
AD
7552010-06-17 Paul Eggert <eggert@cs.ucla.edu>
756
757 Update from GFDL GFDL 1.2 to 1.3.
758 * doc/bison.texinfo: Update GFDL version number.
759 * doc/fdl.texi: Update to version 1.3, taken from:
760 http://www.gnu.org/licenses/fdl.texi
761
6e30ede8
PE
7622010-06-17 Paul Eggert <eggert@cs.ucla.edu>
763
764 Do not use date ranges in copyright notices.
765 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
766
767 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
768 * TODO, bootstrap, bootstrap.conf:
769 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
770 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
771 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
772 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
773 * data/lalr1.java, data/location.cc:
774 * data/xslt/bison.xsl:
775 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
776 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
777 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
778 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
779 * djgpp/subpipe.c, djgpp/subpipe.h:
780 * djgpp/testsuite.sed, doc/bison.texinfo:
781 * doc/refcard.tex, etc/README, etc/bench.pl.in:
782 * examples/calc++/Makefile.am, examples/extexi:
783 * lib/abitset.c, lib/abitset.h:
784 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
785 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
786 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
787 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
788 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
789 * lib/libiberty.h, lib/main.c, lib/timevar.c:
790 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
791 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
792 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
793 * src/AnnotationList.c, src/AnnotationList.h:
794 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
795 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
796 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
797 * src/complain.h, src/conflicts.c, src/conflicts.h:
798 * src/derives.c, src/derives.h, src/files.c, src/files.h:
799 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
800 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
801 * src/ielr.h, src/lalr.c, src/lalr.h:
802 * src/location.c, src/location.h, src/main.c:
803 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
804 * src/named-ref.h, src/nullable.c, src/nullable.h:
805 * src/output.c, src/output.h, src/parse-gram.y:
806 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
807 * src/print_graph.c, src/print_graph.h, src/reader.c:
808 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
809 * src/relation.h, src/scan-code.h, src/scan-code.l:
810 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
811 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
812 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
813 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
814 * tests/actions.at, tests/atlocal.in, tests/c++.at:
815 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
816 * tests/existing.at, tests/glr-regression.at:
817 * tests/headers.at, tests/input.at, tests/java.at:
818 * tests/local.at, tests/named-refs.at:
819 * tests/output.at, tests/push.at, tests/reduce.at:
820 * tests/regression.at, tests/sets.at, tests/skeletons.at:
821 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
822 * data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
823 * tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
824 * etc/Makefile.am:
825 Don't use date ranges in copyright notices.
826
3d4a0cad
AD
8272010-05-11 Akim Demaille <demaille@gostai.com>
828
829 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
830 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
831 header file to the implementation file, after the user %code
832 sections.
833 * NEWS (2.5): Document this.
834
e7bab2df
AD
8352010-05-07 Akim Demaille <demaille@gostai.com>
836
837 c++: use YYRHSLOC.
838 * data/lalr1.cc (YYRHSLOC): New.
839 (YYLLOC_DEFAULT): Use it.
840 * data/glr.cc: If location_type was user defined, do not include
841 location.hh, and do not produce location.hh and position.hh.
842 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
843 Check that glr.cc supports user defined location_type.
844 * NEWS: Document this.
845
baacae49
AD
8462010-05-10 Akim Demaille <demaille@gostai.com>
847
848 doc: fix lalr1.cc documentation.
849 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
850 (C++ Bison Interface): Fix lalr1.cc skeleton name.
851 (C++ Parser Interface): Fix semantic_type and location_type names.
852 Document yy::parser::token.
853 Reported by Jerry Quinn.
854
95a2de56
AD
8552010-05-04 Akim Demaille <demaille@gostai.com>
856
857 lalr1.cc: don't generate location.hh when location_type is defined
858 * data/bison.m4 (b4_percent_define_use): New.
859 (b4_percent_define_get): Use it.
860 Accept a default value.
861 * data/c++.m4: Do not provide a default value for the %define
862 variable location_type, rather, use b4_percent_define_get with a
863 default argument where its value is needed.
864 * data/lalr1.cc: Do not load location.cc (which outputs both
865 location.hh and position.hh) if the user defined location_type.
866 Do not include location.hh either.
867 * data/glr.cc: Likewise.
868
0f404a0a
AD
8692010-05-04 Akim Demaille <demaille@gostai.com>
870
871 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
872 * tests/calc.at (Span): Instead of begin/end, as in the built-in
873 location class, use first and last.
874 Define YYLLOC_DEFAULT to adjust to these changes.
875 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
876 location_type changes.
877
bdc360ae
AD
8782010-05-04 Akim Demaille <demaille@gostai.com>
879
880 tests: enhance AT_SYNCLINES_COMPILE.
881 * tests/synclines.at (AT_TEST_SYNCLINE): Move GCC 4.5 protection
882 into...
883 (AT_SYNCLINES_COMPILE): here.
884 Add more distcc patterns.
885
ca7a59e8
JD
8862010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
887
888 tests: fix maintainer-xml-check.
889 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
890 Update output to include comments now produced by --graph.
891 (xsl:template match="automaton"): As for --graph, name the
892 digraph after the grammar file.
893 * src/print-xml.c (escape_bufs): Enlarge array.
894 (print_xml): Add bug-report and url attributes to
895 bison-xml-report element.
896
ad6f84e5
JD
8972010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
898
899 In DOT output, convert from "/*" comments to "//" comments.
900 This handles the possibility that a "*/" might appear in
901 variable portions of those comments at some point in the future.
902 * src/graphviz.c (start_graph): Implement.
903
43fdc9fd
JD
9042010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
905
906 Document that undefined %prec identifier warnings will remain.
907 * NEWS (2.4.3): Here.
908 (2.4.2): Here.
909
e02df72c
JD
9102010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
911
912 Revert 2009-12-30 change for undefined %prec token complaints.
913 That is, keep them as warnings because that should be sufficient
914 to satisfy POSIX without creating backward compatibility issues.
915 Suggested by Richard Stallman at
916 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
917 * NEWS (2.5): Remove mention of complaint.
21279295
JD
918 * src/reader.c (grammar_rule_check): Convert complaint back to
919 warning.
e02df72c
JD
920 * tests/input.at (%prec's token must be defined): Update.
921
ba3063f6
JD
9222010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
923
924 build: don't require src/bison during bootstrap.
925 Suggested by Eric Blake at
926 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
927 * bootstrap.conf (bootstrap_epilogue): New function to make sure
928 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
929
e0fda26c
JD
9302010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
931
932 i18n: fix untranslatable string.
933 Reported by Goran Uddeborg at
934 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
935 * src/muscle-tab.c (muscle_percent_define_insert): Here.
936
ecbca7db
AD
9372010-04-13 Akim Demaille <demaille@gostai.com>
938
939 tests: calc: minor refactoring.
940 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
941
ed228e60
AD
9422010-04-13 Akim Demaille <demaille@gostai.com>
943
944 tests: calc: simplify location management.
945 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
946 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
947 define the appropriate AT_LOC accessors.
948 * tests/calc.at: Use AT_LOC accessors.
949
cacfdef7
AD
9502010-04-13 Akim Demaille <demaille@gostai.com>
951
952 test location_type.
953 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
954 Define AT_LOCATION_TYPE_IF.
955 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
956 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
957 used, provide a user location type and use it.
958 (Simple LALR1 C++ Calculator): Add a test case for location_type.
959
2f61c4a2
AD
9602010-04-13 Akim Demaille <demaille@gostai.com>
961
962 tests: check fclose's return value.
963 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
964
16d9244d
AD
9652010-04-13 Akim Demaille <demaille@gostai.com>
966
967 tests: don't depend on the actual location type.
968 * tests/calc.at: Use yy::parser::location_type rather than
969 yy::location, since the former is always right, and might point to
970 another type than the latter.
971
3e4a253b
AD
9722010-04-13 Akim Demaille <demaille@gostai.com>
973
974 formatting changes.
975 * tests/calc.at: Formatting changes.
976
df5df58d
AD
9772010-04-13 Akim Demaille <demaille@gostai.com>
978
979 lalr1.cc: remove useless forward declaration.
980 * data/lalr1.cc: Include location.hh before stack.hh.
981 Remove the useless forward declarations of position and location.
982 Reported by Chris Morley.
983 * data/glr.cc: Likewise.
984
88bb35d6
JD
9852010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
986
987 * NEWS (2.4.3): Mention fix for Sun Studio C++.
988
585ef2eb
JD
9892010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
990
991 tests: fix for newer Sun Studio C++.
992 Reported by Dagobert Michelsen at
993 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
994 * THANKS (Dagobert Michelsen): Add.
995 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
996 Autoconf macro for handling the restrict keyword.
997 * gnulib: Update to latest, which no longer overrides that macro
998 from Autoconf.
999
a005dbcb
JD
10002010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1001
1002 portability: fix pointer arithmetic to conform to C standard.
1003 Reported by Tys Lefering at
1004 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
1005 This fix is already implemented in glr.c and does not apply to
1006 lalr1.java.
1007 * data/lalr1.cc (yy::parser::parse): Increase size of
1008 yyerror_range and adjust subscripting so you don't have to
1009 subtract one from the beginning of the array.
1010 * data/yacc.c (b4_declare_parser_state_variables,
1011 yyparse, yypush_parse): Likewise.
1012
8a8b33e8
AD
10132010-04-05 Akim Demaille <demaille@gostai.com>
1014
1015 remove useless include.
1016 * src/graphviz.h: Don't include stdbool.h.
1017
a0279765
AD
10182010-04-05 Akim Demaille <demaille@gostai.com>
1019
1020 graph: sign the output file.
1021 * src/graphviz.c (start_graph): Issue comments about Bison.
1022 Suggested by Tys Lefering.
1023
132247cd
JD
10242010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
1025
1026 portability: fix test suite for GCC 4.5's new #error message.
1027 Reported by Tys Lefering at
1028 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
1029 * NEWS (2.4.3): Mention.
1030 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
1031
c0259969
AD
10322010-03-30 Akim Demaille <demaille@gostai.com>
1033
1034 fix comments.
1035 * src/graphviz.h: Add missing license notice.
1036 Document.
1037
23761f42
AD
10382010-03-25 Akim Demaille <demaille@gostai.com>
1039
1040 tests: fix 250: parse.error=verbose overflow.
1041 * tests/regression.at (parse.error=verbose overflow): Avoid the
1042 double inclusion of stdlib.h as it triggers hard errors.
1043
9097fda0
JD
10442010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1045
1046 portability: fix for BSD make.
1047 Reported by Johan van Selst at
1048 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
1049 * tests/Makefile.am ($(TESTSUITE)): Qualify package.m4 in
1050 this dependency list as in package.m4's target rule.
1051
7a9c3cb3
JD
10522010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1053
1054 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
1055 Reported by Johan van Selst at
1056 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
1057 * NEWS (2.4.3): New.
1058 * THANKS (Johan van Selst): Add.
1059 * gnulib: Update to latest.
1060
5a3c69f1
JD
10612010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1062
1063 maint: update for changes to gnulib's announce-gen.
1064 * HACKING (Announce): RELEASE_TYPE=major must now be written
1065 RELEASE_TYPE=stable.
1066
ea66d039
JD
10672010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1068
1069 Version 2.4.2.
1070 * NEWS (2.4.2): Set version and date. For the recent test suite
1071 portability fixes, don't be so optimistic about their success
1072 given the lack of feedback on the affected platforms.
1073
c50befe6
JD
10742010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1075
1076 tests: fix maintainer-xml-check for recent changes.
1077 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
1078 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
1079 output file whose name conflicts with a previous output file
1080 is now never generated.
1081
47fa5747
JD
10822010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1083
1084 portability: fix several issues with M4 subprocess.
1085
1086 M4's output pipe was not being drained upon fatal errors during
1087 scan_skel. As a result, broken-pipe messages from M4 were seen
1088 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
1089 failure in the test suite. The problem was that, on platforms
1090 where the default disposition for SIGPIPE is ignore instead of
1091 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
1092 then reported it. However, there's some sort of race condition,
1093 because the new test group occasionally succeeded.
1094 Reported by Albert Chin at
1095 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
1096
1097 There were also problems with the test suite livelocking on
1098 Tru64 5.1b. Reported by Didier Godefroy at
1099 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
1100 Switching to create_pipe_bidi suggested by Akim Demaille.
1101
1102 To attempt to solve both of these problems, switch to gnulib's
1103 create_pipe_bidi and register M4 process as a slave. Along the
1104 way, clean up file name conflict handling, which was affected by
1105 the broken-pipe problem before the switch.
1106 * NEWS (2.4.2): Document.
1107 * THANKS (Didier Godefroy): Add.
1108 * bootstrap.conf (gnulib_modules): Add pipe.
1109 * gnulib: Update to latest to make sure we have all the latest
1110 fixes.
1111 * lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
1112 subpipe.c.
1113 * po/POTFILES.in (lib/subpipe.c): Remove.
1114 * src/files.c (compute_output_file_names): Update invocations
1115 of output_file_name_check.
1116 (output_file_name_check): In the case that the grammar file
1117 would be overwritten, use complain instead of fatal, but replace
1118 the output file name with /dev/null. Use the /dev/null solution
1119 for the case of two conflicting output files as well because it
1120 seems safer in case Bison one day tries to open both files at
1121 the same time.
1122 * src/files.h (output_file_name_check): Update prototype.
1123 * src/output.c (output_skeleton): Use create_pipe_bidi and
1124 wait_subprocess. Assert that scan_skel completely drains the
1125 pipe.
1126 * src/scan-skel.l (at_directive_perform): Update
1127 output_file_name_check invocation.
1128 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
1129 grammar file actually isn't overwritten.
1130 (Conflicting output files: -o foo.y): Update expected output.
1131 * tests/skeletons.at (Fatal errors but M4 continues producing
1132 output): New test group.
1133
d67e37a7
JD
11342010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
1135
1136 Update POTFILES.
1137 * HACKING (Release Procedure): Add reminder about keeping
1138 POTFILES files up-to-date.
1139 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
1140
0ee1af2e
JD
11412010-02-01 Joel E. Denny <jdenny@clemson.edu>
1142
1143 Code cleanup.
1144 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
1145 which is already defined in atconfig.
1146
2655c7cd
JD
11472010-01-21 Joel E. Denny <jdenny@clemson.edu>
1148
1149 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
1150
8ebc7dca
JD
11512010-01-21 Joel E. Denny <jdenny@clemson.edu>
1152
1153 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
1154 * HACKING (Release Procedure): Update notes on copyright years.
1155 * Makefile.am (update-package-copyright-year): New target rule.
1156 * build-aux/update-package-copyright-year: New file.
1157 * cfg.mk (update-copyright): Add update-package-copyright-year
1158 as a dependency.
1159
f0a43dd1
JD
11602010-01-19 Joel E. Denny <jdenny@clemson.edu>
1161
1162 * bootstrap: Import improvements from latest gnulib.
1163
e4ca7a85
JD
11642010-01-19 Joel E. Denny <jdenny@clemson.edu>
1165
1166 build: require Automake 1.11.1 to avoid a security flaw.
1167 * HACKING (Release Procedure): Don't document Automake security
1168 flaw here.
1169 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
1170 why here.
1171
8d830047
JD
11722010-01-19 Joel E. Denny <jdenny@clemson.edu>
1173
1174 gnulib: update to latest.
1175
e5926647
JD
11762010-01-19 Joel E. Denny <jdenny@clemson.edu>
1177
1178 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
1179
5a2f6eb4
JD
11802010-01-15 Joel E. Denny <jdenny@clemson.edu>
1181
1182 Thank the developer of the initial push parser implementation.
1183 This unfortunate oversight is several years old.
1184 * THANKS (Odd Arild Olsen): Add.
1185
1c4ad777
JD
11862010-01-04 Joel E. Denny <jdenny@clemson.edu>
1187
1188 Fix some comments concerning LR(0) versus LALR(1).
1189
1190 Stop equating LR(0) with nondeterminism and LALR(1) with
1191 determinism. That is, if all states are consistent, then LR(0)
1192 tables are deterministic. On the other hand, LALR(1) tables
1193 might be nondeterministic before conflict resolution, and GLR
1194 permits LALR(1) tables to remain nondeterministic.
1195 * src/LR0.c, src/LR0.h: Here.
1196 * src/lalr.c, src/lalr.h: Here.
1197 * src/main.c (main): Here.
1198 * src/state.c, src/state.h: Here.
1199
1200 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
1201 parser tables.
1202
1462fcee
JD
12032010-01-04 Joel E. Denny <jdenny@clemson.edu>
1204
1205 maint: run "make update-copyright"
1206
510df951
JD
12072009-12-30 Joel E. Denny <jdenny@clemson.edu>
1208
1209 POSIX: complain if %prec's token was not defined.
1210 * NEWS (2.5): Document.
1211 * src/reader.c (grammar_rule_check): Convert warning to
1212 complaint.
1213 * tests/input.at (%prec's token must be defined): Update.
1214
2c203528
JD
12152009-12-30 Joel E. Denny <jdenny@clemson.edu>
1216
1217 POSIX: warn if %prec's token was not defined.
1218 Reported by Florian Krohm at
1219 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
1220 * NEWS (2.4.2): Document.
1221 * src/reader.c (grammar_rule_check): Implement.
1222 (grammar_current_rule_prec_set): Add comments explaining that we
1223 here assume a %prec identifier is a token, but we still manage
1224 to support POSIX.
1225 * tests/input.at (%prec's token must be defined): New test
1226 group.
1227
a93cdd3d
JD
12282009-12-31 Joel E. Denny <jdenny@clemson.edu>
1229
1230 * HACKING (Release Procedure): Recommend a secure automake.
1231
bb57985c
AD
12322008-12-11 Akim Demaille <demaille@gostai.com>
1233
1234 Propagate i18n changes into glr.c.
1235 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1236 building the error message format dynamically.
1237 * data/lalr1.java: Formatting changes.
1238
70afaf26
JD
12392009-12-22 Joel E. Denny <jdenny@clemson.edu>
1240
1241 Port small part of master's 11707b2b so future ports are easier.
1242 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
1243
8200219a
AD
12442008-12-11 Akim Demaille <demaille@gostai.com>
1245
1246 Simplify the i18n of the error messages.
1247 * data/lalr1.cc: Comment changes.
1248
39f6a8d1
AD
12492008-11-11 Akim Demaille <demaille@gostai.com>
1250
1251 Prefer M4 to CPP.
1252 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1253 YYERROR_VERBOSE.
1254
e657f369
AD
12552008-11-11 Akim Demaille <demaille@gostai.com>
1256
1257 Support i18n of the parse error messages.
1258 * TODO (lalr1.cc/I18n): Remove.
1259 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1260 error messages, as done in yacc.c.
1261 Stay within the yy* pseudo namespace.
1262
1e05521d
JD
12632009-12-22 Joel E. Denny <jdenny@clemson.edu>
1264
1265 Port small part of master's 8901f32e so future ports are easier.
1266 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
1267 argument, but name it in the function definition only when
1268 verbose error messages are enabled and it'll thus be used.
1269 (yy::parser::parse): Update use of yysyntax_error_.
1270
2728ac7e
JD
12712009-12-29 Joel E. Denny <jdenny@clemson.edu>
1272
1273 portability: `<' and `>' are not always defined on addresses.
1274 Specifically, don't sort objects by their memory addresses when
1275 they're not allocated in the same array or other object. Though
1276 I haven't found a test case where that fails on my platform, C
1277 says the behavior is undefined.
1278 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1279 FIXME. Use new id field of InadequacyList nodes rather than
1280 their memory addresses when sorting.
1281 (AnnotationList__compute_from_inadequacies): Add
1282 inadequacy_list_node_count argument to pass to
1283 InadequacyList__new_conflict.
1284 * src/AnnotationList.h
1285 (AnnotationList__compute_from_inadequacies): Update prototype
1286 and documentation for new argument.
1287 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1288 node_count argument and use it to assign a unique ID.
1289 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1290 (InadequacyList): Add id field.
1291 (InadequacyList__new_conflict): Update prototype and
1292 documentation for new argument.
1293 * src/ielr.c (ielr_compute_annotation_lists): Update
1294 AnnotationList__compute_from_inadequacies invocation.
1295
abcc7c03
JD
12962009-12-20 Joel E. Denny <jdenny@clemson.edu>
1297
1298 Fix handling of yychar manipulation in user semantic actions.
1299 The problem was that yacc.c didn't always update the yychar
1300 translation afterwards. However, other skeletons appear to be
1301 fine. glr.c appears to already translate yychar before every
1302 use. lalr1.cc does not define yychar and does not document its
1303 replacement, yyla, for users. It does provide yyclearin, but
1304 that does not manipulate yyla and thus requires no translation
1305 update. In lalr1.java, yychar is out of scope during semantic
1306 actions.
1307 * NEWS (2.5): Document.
1308 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1309 yytoken here.
1310 (yyparse, yypush_parse): Instead, translate before every use of
1311 yytoken, and add comments explaining this approach.
1312 * tests/actions.at (Destroying lookahead assigned by semantic
1313 action): New test group checking that translation happens before
1314 lookahead destructor calls at parser return. Previously,
1315 incorrect destructors were called.
1316 * tests/conflicts.at (%error-verbose and consistent
1317 errors): New test group checking that translation happens at
1318 syntax error detection before the associated verbose error
1319 message and the associated lookahead destructor calls. While
1320 the destructor call is fixed by this patch, the verbose error
1321 message is currently incorrect due to another bug (see
1322 comments in test group), so this is an expected failure for now.
1323
62efdd2a
JD
13242009-12-21 Joel E. Denny <jdenny@clemson.edu>
1325
1326 YYFAIL: warn about uses and remove from lalr1.java.
1327 * NEWS (2.5): Document.
5f1485d8 1328 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
62efdd2a
JD
1329 and make it private. Update all uses.
1330 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1331
41d35e54
JD
13322009-12-21 Joel E. Denny <jdenny@clemson.edu>
1333
1334 YYFAIL: deprecate.
1335 * NEWS (2.4.2): Document deprecation and the phase-out plan.
5f1485d8 1336 * data/lalr1.java (YYParser::YYFAIL): Add comment about
41d35e54
JD
1337 deprecation.
1338 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1339 YYFAIL from GCC cpp's -Wunused-macros.
1340 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1341 documentation.
1342 (LocalWords): Remove YYFAIL.
1343
692d04cb
JD
13442009-12-17 Joel E. Denny <jdenny@clemson.edu>
1345
1346 Code cleanup.
1347 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1348 function, which is no longer used.
1349
34731471
JD
13502009-12-16 Joel E. Denny <jdenny@clemson.edu>
1351
1352 Add gcc's -Wundef to test suite and fix another warning from it.
1353 * NEWS (2.4.2): Update description of -Wundef fix.
1354 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1355 (WARN_CFLAGS_TEST): New substitution.
1356 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1357 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1358 WARN_CFLAGS.
1359 (NO_WERROR_CFLAGS): Likewise.
1360 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1361
3bba2dad
JD
13622009-12-16 Joel E. Denny <jdenny@clemson.edu>
1363
1364 * data/yacc.c: Reformat m4 a little.
1365
af2ffe5c
JD
13662009-12-16 Joel E. Denny <jdenny@clemson.edu>
1367
1368 Document gcc -Wundef fix.
1369 * NEWS (2.4.2): Here.
1370 * THANKS (Jonathan Nieder): Add.
1371
874ac415
JN
13722009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1373
1374 Simplify y.tab.c when location tracking is disabled.
1375 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1376 tracking is not enabled. Instead, unconditionally define
1377 YY_LOCATION_PRINT as a no-op for backward compatibility.
1378
06caf0e1
JN
13792009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1380
1381 Avoid warnings from gcc -Wundef y.tab.c.
1382 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1383 defined before using them.
1384 * data/lalr1.cc: Likewise.
1385 * data/yacc.c: Likewise.
1386
687f011a
JD
13872009-12-15 Joel E. Denny <jdenny@clemson.edu>
1388
1389 autoconf: update to latest for fix of M4 detection.
1390 Reported by Eric Blake.
1391 * submodules/autoconf: Update.
1392
fb9a3976
JD
13932009-12-15 Joel E. Denny <jdenny@clemson.edu>
1394
1395 portability: use -DGNULIB_POSIXCHECK.
1396 Reported by Eric Blake. See discussions at
1397 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1398 and
1399 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1400 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1401 * bootstrap.conf (gnulib_modules): Add all the printf modules
1402 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1403 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1404 (excluded_files): Remove m4/printf-posix.m4.
1405 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1406 lib/libbison.a so gnulib libraries can be linked.
1407
f1fb412c
JD
14082009-12-14 Joel E. Denny <jdenny@clemson.edu>
1409
1410 Enable assertion output and --disable-assert for configure.
1411 * bootstrap.conf (gnulib_modules): Add assert module.
1412 * src/system.h (aver): Define as assert, and summarize the
1413 discussion on this issue.
1414
51c7ca01
JD
14152009-12-14 Joel E. Denny <jdenny@clemson.edu>
1416
1417 Expand GLR acronym in summary of Bison.
1418 Based on discussion with Akim Demaille starting at
1419 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1420 * doc/bison.texinfo (Introduction): Here.
1421 * src/getargs.c (usage): Here.
1422
1f68dca5
AR
14232009-10-03 Alex Rozenman <rozenman@gmail.com>
1424
1425 Document named references.
1426 * doc/bison.texinfo (Actions): Add new example and xref to
1427 Using Named References node.
1428 (Using Named References): New node.
1429
aa01d193
JD
14302009-10-16 Joel E. Denny <jdenny@clemson.edu>
1431
1432 cleanup.
1433 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1434 of char*.
1435 (Sbitset__isEmpty): Use Sbitset instead of char*.
1436 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1437 instead of char. This helps to avoid casting errors.
1438 (Sbitset__or): Use Sbitset instead of char*.
1439
61747047
JD
14402009-10-16 Joel E. Denny <jdenny@clemson.edu>
1441
1442 portability: don't assume 8-bit bytes.
1443 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1444 * src/Sbitset.h (Sbitset__nbytes): Here.
1445 (Sbitset__byteAddress): Here.
1446 (Sbitset__bit_mask): Here.
1447 (Sbitset__last_byte_mask): Here.
1448 (Sbitset__ones): Here.
1449 (SBITSET__FOR_EACH): Here.
1450
a70596de
JD
14512009-10-11 Joel E. Denny <jdenny@clemson.edu>
1452
1453 portability: use va_start and va_end in the same function.
1454 * src/complain.c (error_message): Move va_end from here...
1455 (ERROR_MESSAGE): ... to here.
1456
51f255a5
JD
14572009-10-08 Joel E. Denny <jdenny@clemson.edu>
1458
1459 * data/bison.m4: Update comments for rename to muscle-tab.h.
1460
23ec25b7
JD
14612009-10-08 Joel E. Denny <jdenny@clemson.edu>
1462
1463 Rename muscle_tab.* to muscle-tab.* for consistency with master.
1464 * src/Makefile.am (bison_SOURCES): Update.
1465 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
1466 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
1467 src/tables.c: Update include.
1468 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
1469 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
1470 include.
1471
0ab402b4
JD
14722009-10-07 Joel E. Denny <jdenny@clemson.edu>
1473
1474 Minor code cleanup.
1475 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1476 replace all uses with UNIQSTR_CONCAT.
1477 * src/uniqstr.c (uniqstr_vsprintf): New function.
1478 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1479 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1480 macros.
1481
42ec0ae1
JD
14822009-10-04 Joel E. Denny <jdenny@clemson.edu>
1483
1484 Minor code cleanup.
1485 * src/parse-gram.y: Clean up sorting of declarations.
1486 Use types to simplify %printer declarations where possible.
1487 Provide %printer for BRACKETED_ID and symbol.prec.
1488 * src/symtab.c: Whitespace change.
1489
9637e0ed
JD
14902009-10-04 Joel E. Denny <jdenny@clemson.edu>
1491
1492 tests: skip tests of file names that platform does not support.
1493 Reported by Michael Raskin at
1494 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1495 * THANKS (Michael Raskin): Add.
1496 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1497 to fail at least for file names containing ":" or "\".
1498
69a2ab11
JD
14992009-09-23 Joel E. Denny <jdenny@clemson.edu>
1500
1501 yysyntax_error: avoid duplicate lookahead collection.
1502 Except when memory reallocation is required, this change
1503 eliminates the need to invoke yysyntax_error twice and thus to
1504 repeat the collection of lookaheads. It also prepares for
1505 future extensions that will make those repetitions more
1506 expensive and that will require additional memory management in
1507 yysyntax_error. Finally, it fixes an obscure bug already
1508 exercised in the test suite.
1509 * data/yacc.c (yysyntax_error): Add arguments for message
1510 buffer variables stored in the parser. Instead of size, return
1511 status similar to yyparse status but indicating success of
1512 message creation. Other than the actual reallocation of the
1513 message buffer, import and clean up memory management code
1514 from...
1515 (yyparse, yypush_parse): ... here.
1516 * tests/regression.at (%error-verbose overflow): No longer an
1517 expected failure.
1518
d88cf117
JD
15192009-09-23 Joel E. Denny <jdenny@clemson.edu>
1520
1521 yysyntax_error: test memory management more.
1522 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1523 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
1524 New test group.
1525 (%error-verbose overflow): New test group that reveals an
1526 obscure bug. Expected fail for now.
1527
9da640ea
AD
15282008-12-11 Akim Demaille <demaille@gostai.com>
1529
1530 Pass the token type to yysyntax_error.
1531 * data/yacc.c (yysyntax_error): Take the transated token instead
1532 of the raw number.
1533 Adjust callers.
1534
d3d3628b
AD
15352008-12-11 Akim Demaille <demaille@gostai.com>
1536
1537 Simplify the i18n of the error messages.
1538 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
1539 of building dynamically the format string.
1540
4c6b13f3
JD
15412009-10-03 Joel E. Denny <jdenny@clemson.edu>
1542
1543 Remove dead code.
1544 * src/symtab.c (symbol_pack): Here because every symbol's number
1545 is always defined by this time.
1546
f840c05a
AR
15472009-10-03 Alex Rozenman <rozenman@gmail.com>
1548
1549 Add additional space after periods in NEWS.
1550 * NEWS (2.5): here.
1551
17a407dc
JD
15522009-09-29 Joel E. Denny <jdenny@clemson.edu>
1553
1554 Use the correct conversion specifier for size_t.
1555 Reported by Jim Meyering.
1556 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1557 because Sbitset__Index is size_t.
1558 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1559
4b7a4c1b
JD
15602009-09-27 Joel E. Denny <jdenny@clemson.edu>
1561
1562 tests: don't abuse AT_BISON_CHECK.
1563 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1564 additional shell commands outside of AT_BISON_CHECK.
1565
873ac263
JD
15662009-09-26 Joel E. Denny <jdenny@clemson.edu>
1567
1568 tests: check that parse-gram.y's IELR and LALR are identical.
1569 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1570 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1571 group.
1572
232be91a
AD
15732009-09-16 Akim Demaille <demaille@gostai.com>
1574
1575 doc: comment changes.
1576 * doc/bison.texinfo: Comment changes.
1577
c781580d
AD
15782009-09-16 Akim Demaille <demaille@gostai.com>
1579
1580 doc: spell checking.
1581 * doc/bison.texinfo: here.
1582
348f5608
AR
15832009-09-19 Alex Rozenman <rozenman@gmail.com>
1584
1585 Keep sub-messages aligned. Fix strings for translation.
f840c05a
AR
1586 * src/location.h (location_print): Add return value.
1587 * src/location.c (location_print): Return number of printed
348f5608 1588 characters.
f840c05a
AR
1589 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1590 new functions.
1591 * src/complain.cpp (indent_ptr): New static variable.
1592 (error_message, complain_at_indent, warn_at_indent): Implement
1593 the alignment mechanism.
1594 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1595 for translations. Use new alignment mechanism.
1596 * tests/named-ref.at: Adjust test-cases.
348f5608
AR
1597 * NEWS (2.5): Add an announcement about named references.
1598
d93b5f50
JD
15992009-09-13 Joel E. Denny <jdenny@clemson.edu>
1600
1601 tests: clean up push.at test group titles.
1602 * tests/push.at: Remove "Push Parsing: " from test group titles
1603 because these are already under the banner "Push Parsing Tests".
1604
4c56b131
AR
16052009-09-12 Alex Rozenman <rozenman@gmail.com>
1606
1607 Provide an additional sub-message for clarity.
1608 Add "symbol not found in production" error message when
1609 an "invalid reference" is detected in named references
1610 resolution.
1611 * src/scan-code.l: Update "invalid reference" case.
1612 * tests/named-ref.at: Adjust test-cases.
1613
93d0103d
JD
16142009-09-10 Joel E. Denny <jdenny@clemson.edu>
1615
1616 Clean up yacc.c a little.
1617 * data/yacc.c: Clean up M4 for readability, and make output
1618 whitespace more consistent. For the main parse function
1619 comment, instead of saying "yyparse or yypush_parse", say either
1620 "yyparse" or "yypush_parse" depending on which it actually is.
1621
628be6c9
JD
16222009-09-03 Joel E. Denny <jdenny@clemson.edu>
1623
1624 Complain about unused %define variables and %code qualifiers.
1625 * NEWS (2.5): Document.
1626 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1627 * doc/bison.texinfo (Decl Summary): Document complaint, and
1628 improve %define documentation a little otherwise.
1629 * tests/input.at (Reject unused %code qualifiers): Update.
1630 (%define errors): Update.
1631 (%define, --define, --force-define): Update.
1632 (%define backward compatibility): Update.
1633 (Unused %define api.pure): Update.
1634 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1635
c842365a
JD
16362009-09-03 Joel E. Denny <jdenny@clemson.edu>
1637
1638 Use aver not assert.
1639 * src/output.c: Don't include assert.h.
1640 (output_skeleton): Use aver not assert.
1641 * src/system.h (aver): In documentation of why, add links to
1642 Paul Eggert's explanations in the mailing lists.
1643
14e568d7
AR
16442009-09-05 Alex Rozenman <rozenman@gmail.com>
1645
1646 Use "Unresolved reference" error message when no symbols were found
1647 in a symbolic reference resolution. Remove .expr and -expr from
1648 the shown reference when the reference is unresolved.
1649 * src/scan-code.l: Change the error message, adjust location columns,
1650 rename variable "exact_mode" to "explicit_bracketing".
1651 * tests/named-ref.at: Adjust existing tests and add a new one.
1652
dac8cc0d
AD
16532009-09-03 Akim Demaille <demaille@gostai.com>
1654
1655 * NEWS (2.4.2): Add "Internationalization" item.
1656
3710dd02
AD
16572009-09-03 Akim Demaille <demaille@gostai.com>
1658
1659 bootstrap: fix/improve find_tool.
1660 * bootstrap (find_tool): Improve error messages.
1661 Fix typo about find_tool_names.
1662
9852b61c
JD
16632009-08-29 Joel E. Denny <jdenny@clemson.edu>
1664
1665 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1666 See
1667 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1668 * src/scan-code.h (code_props_rule_action_init): Rename
1669 named_ref arg to name so it doesn't shadow named_ref type. This
1670 makes it consistent with the function definition in scan-code.l
1671 anyway.
1672
f37495f6
JD
16732009-08-28 Joel E. Denny <jdenny@clemson.edu>
1674
1675 %define: accept unquoted values.
1676 * NEWS (2.5): Group all %define changes together, and document
1677 this one. Remove quotes in IELR and canonical LR entry.
1678 * doc/bison.texinfo: Remove quotes in most examples throughout.
1679 (Decl Summary): Update %define documentation.
1680 (Table of Symbols): Likewise.
1681 * src/ielr.c (LrType): Update documentation.
1682 * src/parse-gram.y (content.opt): Add production for ID.
5bf2bf7a 1683 * tests/calc.at: Remove quotes in most tests.
f37495f6
JD
1684 * tests/existing.at: Likewise.
1685 * tests/input.at: Likewise.
1686 * tests/local.at: Likewise.
1687 * tests/push.at: Likewise.
1688 * tests/reduce.at: Likewise.
1689 * tests/torture.at: Likewise.
1690
3a414bbf
JD
16912009-08-28 Joel E. Denny <jdenny@clemson.edu>
1692
1693 %define lr.type: make values lowercase IDs.
1694 That is, "LALR" => "lalr", "IELR" => "ielr", and
1695 "canonical LR" => "canonical-lr".
1696 * NEWS (2.5): Update documentation.
1697 * doc/bison.texinfo (Decl Summary): Likewise.
1698 * src/ielr.c (ielr): Use new values.
1699 * src/ielr.h (ielr): Update documentation.
1700 * src/reader.c (prepare_percent_define_front_end_variables): Use
1701 and validate new values.
1702 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1703 grammars.
1704 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1705
4bb975e1
EB
17062009-08-27 Eric Blake <ebb9@byu.net>
1707
1708 scan-gram: avoid portability trap with ctype usage.
1709 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1710 Avoid compiler warning.
1711
74baf5c9
JD
17122009-08-27 Joel E. Denny <jdenny@clemson.edu>
1713
1714 tests: use perl for printing special sequences to files.
1715 And skip tests if perl is not available. This is better than
1716 playing tricks with shell portability. Suggested by Akim
1717 Demaille.
1718 * tests/input.at (Bad character literals): Use it here for
1719 omitting final newlines.
1720 (Bad escapes in literals): Use it here for special characters.
1721
d63e1279
JD
17222009-08-26 Joel E. Denny <jdenny@clemson.edu>
1723
1724 tests: show a use of %define lr.default-reductions "consistent"
1725 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1726 prevents the omission of expected tokens for %error-verbose.
1727
833d1720
AD
17282009-08-26 Akim Demaille <demaille@gostai.com>
1729
1730 tests: portability fix.
1731 * tests/input.at (Bad escapes in literals): Don't expect "echo
1732 '\0'" to output \ then 0.
1733
e4bcae3c
JD
17342009-08-26 Joel E. Denny <jdenny@clemson.edu>
1735
1736 Actually handle the yytable zero value correctly this time.
1737 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
1738 mention zero values in the YYTABLE comments.
1739 * data/glr.c (yytable_value_is_error): Don't check for zero
1740 value.
1741 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1742 * data/yacc.c (yytable_value_is_error): Likewise.
1743 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1744 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1745 * src/tables.h: In header comments, explain why it's useless to
1746 check for a zero value in yytable.
1747
d5eb0826
JD
17482009-08-25 Joel E. Denny <jdenny@clemson.edu>
1749
1750 More fixes related to last two patches.
1751 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1752 defined.
1753 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
1754 yytable comments: zero indicates syntax error not default
1755 action.
1756 * data/glr.c (yyis_pact_ninf): Rename to...
1757 (yypact_value_is_default): ... this.
1758 (yyisDefaultedState): Update for rename.
1759 (yyis_table_ninf): Rename to...
1760 (yytable_value_is_error): ... this, and check for value zero
1761 besides just YYTABLE_NINF.
1762 (yygetLRActions): Check for default value from yypact. It
1763 appears that this check is always performed before this function
1764 is invoked, and so adding the check here is probably redundant.
1765 However, the code may evolve after this subtlety is forgotten.
1766 Also, update for rename to yytable_value_is_error. Because that
1767 macro now checks for zero, a different but equivalent branch of
1768 the if-then-else here is evaluated.
1769 (yyreportSyntaxError): Update for rename to
1770 yytable_value_is_error. The zero condition was mishandled
1771 before.
1772 (yyrecoverSyntaxError): Update for renames. No behavioral
1773 changes.
1774 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1775 New function.
1776 (yy_table_value_is_error_): New function.
1777 (parse): Use new functions where possible. No behavioral
1778 changes.
1779 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1780 The zero condition was mishandled before.
1781 * data/yacc.c (yyis_pact_ninf): Rename to...
1782 (yypact_value_is_default): ... this.
1783 (yyis_table_ninf): Rename to...
1784 (yytable_value_is_error): ... this, and check for value zero
1785 besides just YYTABLE_NINF.
1786 (yysyntax_error): Update for rename to yytable_value_is_error.
1787 The zero condition was mishandled before.
1788 (yyparse): Update for renames. No behavioral changes.
1789 * src/tables.h: Improve comments about yypact, yytable, etc.
1790 more. Most importantly, say yytable value of zero means syntax
1791 error not default action.
1792
1fa30307
JD
17932009-08-25 Joel E. Denny <jdenny@clemson.edu>
1794
1795 Fix %error-verbose for conflicts resolved by %nonassoc.
1796 * NEWS (2.5): Document.
1797 * data/glr.c (yyreportSyntaxError): Fix this by checking
1798 yyis_table_ninf.
1799 * data/yacc.c (yysyntax_error): Likewise.
1800 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1801 yytable_ninf_.
1802 * data/lalr1.java (yysyntax_error): Likewise.
1803 * tests/conflicts.at (%nonassoc and eof): Update expected output
1804 and remove FIXME.
1805
77373efa
JD
18062009-08-25 Joel E. Denny <jdenny@clemson.edu>
1807
1808 Some code and documentation improvements.
1809 * data/c.m4 (b4_table_value_equals): New macro to capture
1810 some repeated code.
1811 * data/glr.c (yyis_pact_ninf): Use it here.
1812 (yyis_table_ninf): Likewise.
1813 (yyreportSyntaxError): Improve internal comments.
1814 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1815 Use it everywhere possible.
1816 (yyis_table_ninf): Likewise.
1817 (yysyntax_error): Improve internal comments.
1818 * data/lalr1.cc (yysyntax_error_): Likewise.
1819 * data/lalr1.java (yysyntax_error): Likewise.
1820 * src/tables.h: Improve comments about yypact, yytable, etc.
1821
890ab17c
JD
18222009-08-21 Joel E. Denny <jdenny@clemson.edu>
1823
1824 Use locale when quoting.
1825 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1826 quote rather than implementing quoting here.
1827
c5196098
EB
18282009-08-20 Eric Blake <ebb9@byu.net>
1829
aa50ba7b
EB
1830 Make previous patch more robust.
1831 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1832 argmatch.h.
1833 (output_skeleton): Use it.
1834 Suggested by Akim Demaille.
1835
c5196098
EB
1836 Import latest m4/m4.m4.
1837 * submodules/autoconf: Update to autoconf 2.64.
1838 * configure.ac (M4_GNU_OPTION): New define.
1839 * src/output.c (output_skeleton): Use it to resolve FIXME.
1840 * NEWS: Mention this.
1841
39fb7e62
JD
18422009-08-19 Joel E. Denny <jdenny@clemson.edu>
1843
1844 Fix complaints about escape sequences.
1845 Discussed starting at
1846 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1847 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1848 For a \0 and similar escape sequences meaning the null
1849 character, report an invalid escape sequence instead of an
1850 invalid null character because the latter does not actually
1851 appear in the user's input.
1852 In all escape sequence complaints, don't escape the initial
1853 backslash, and don't quote when the sequence appears at the end
1854 of the complaint line unless there's whitespace that quotearg
1855 won't escape.
1856 Consistently say "invalid" not "unrecognized".
1857 Consistently prefer "empty character literal" over "extra
1858 characters in character literal" warning for invalid escape
1859 sequences; that is, consistently discard those sequences.
1860 * tests/input.at (Bad escapes in literals): New.
1861
c33bc800
AD
18622009-08-19 Akim Demaille <demaille@gostai.com>
1863
1864 doc: fixes.
1865 * doc/bison.texinfo: Fix minor Texinfo errors.
1866
8fbbeba2
AD
18672009-08-19 Akim Demaille <demaille@gostai.com>
1868
1869 doc: %initial-action to initialize yylloc.
1870 Reported by Bill Allombert.
1871 * doc/bison.texinfo: Set fill-column to 76.
1872 (Location Type): Document the use of %initial-action to initialize
1873 yylloc.
1874
1874a474
JD
18752009-08-18 Joel E. Denny <jdenny@clemson.edu>
1876
1877 maint: update for gnulib's recent update-copyright changes
1878 * gnulib: Update.
1879 * .x-update-copyright (COPYING): Add as it's no longer implied
1880 when .x-update-copyright is present.
1881 * cfg.mk (update-copyright-local): Remove, now ignored.
1882 (update-copyright): Declare update-b4-copyright as a dependency.
1883
f4bfd5a9
AD
18842009-08-17 Akim Demaille <demaille@gostai.com>
1885
1886 build: require gettext 0.17.
1887
1888 Suggested by Bruno Haible.
1889 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1890 * configure.ac: require gettext 0.17 to ensure compatibility with
1891 gnulib.
1892
2509eba6
AD
18932009-08-17 Akim Demaille <demaille@gostai.com>
1894
1895 build: lower gettext requirements.
1896
1897 Bison was uselessly requiring the formatstring macros from
1898 gettext, which resulted in mo files not being installed on systems
1899 that perfectly supported Bison mo files. Lower the requirement.
1900 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1901
aa50ba7b
EB
1902 * configure.ac: Require need-ngettext instead of
1903 need-formatstring-macros.
1904 Reported by Martin Jabocs.
1905 Suggested by Bruno Haible.
1906 * INSTALL: Restructure.
1907 (Internationalization): New.
2509eba6 1908
314542f9
JD
19092009-08-14 Joel E. Denny <jdenny@clemson.edu>
1910
1911 maint: fix use of copyright year intervals.
1912 * gnulib: Update.
1913 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1914 as now recommended in gnulib/NEWS.
1915 * build-aux/update-b4-copyright: Fix.
1916 * cfg.mk (update-copyright-env): Configure update-copyright.
1917
24985964
JD
19182009-08-13 Joel E. Denny <jdenny@clemson.edu>
1919
1920 Make it easier to write deterministic tests.
1921 Continues Akim's work from his 2009-06-10 commits.
1922 * src/reader.c (check_and_convert_grammar): Don't add any
1923 symbols after the first symbols_do invocation.
1924 * src/symtab.c (symbols_sorted): New static global.
1925 (user_token_number_redeclaration): Update comments.
1926 (symbol_from_uniqstr): If a new symbol is being created, assert
1927 that symbols_sorted hasn't been allocated yet.
1928 (symbols_free): Free symbols_sorted.
1929 (symbols_cmp, symbols_cmp_qsort): New functions.
1930 (symbols_do): Sort symbol_table into symbols_sorted on first
1931 invocation.
1932 * tests/input.at (Numbered tokens): Recombine tests now that the
1933 output should be deterministic across multiple numbers.
1934
47076da5
AD
19352009-08-12 Akim Demaille <demaille@gostai.com>
1936
1937 distcheck: fix.
1938
aa50ba7b 1939 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
47076da5 1940
36dfe466
JD
19412009-08-10 Joel E. Denny <jdenny@clemson.edu>
1942
1943 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
1944
07c0db18
JD
19452009-08-10 Joel E. Denny <jdenny@clemson.edu>
1946
1947 Miscellaneous code readability improvements.
1948
1949 * src/reader.c (reader): Move %define front-end variable
1950 defaults and checking into...
1951 (prepare_percent_define_front_end_variables): ... this new
1952 function.
1953
1954 * src/scan-gram.l (INITIAL): For consistency with string
1955 literals, don't store open quote on character literal. It's
1956 discarded before returning anyway.
1957 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1958 Make length test more readable, and make the character stored
1959 for an empty literal more obvious while consistent with the
1960 previous behavior.
1961
1962 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1963 USER_NUMBER_HAS_STRING_ALIAS throughout.
1964 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1965 that is repeated in symtab.h. Improve argument names to make it
1966 clear which side of the symbol-string alias pair is which.
1967 (symbol_check_alias_consistency): Improve local variable names
1968 for the same purpose.
1969 * src/symtab.h (struct symbol): Make comments about aliases
1970 clearer.
1971 (symbol_make_alias): Improve comments and argument name.
1972 * src/output.c (token_definitions_output): Update for rename to
1973 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1974
1a323c2f
AR
19752009-08-08 Alex Rozenman <rozenman@gmail.com>
1976
1977 Convert "misleading reference" messages to warnings.
1978 * src/scan-code.l: New function 'show_sub_messages', more
1979 factoring.
1980 * tests/named-ref.at: Adjust tests.
1981
38609c34
JD
19822009-08-06 Joel E. Denny <jdenny@clemson.edu>
1983
1984 maint: run "make update-copyright"
1985
642f240e
JD
19862009-08-06 Joel E. Denny <jdenny@clemson.edu>
1987
1988 maint: make update-b4-copyright easier to use
1989 * build-aux/update-b4-copyright: In warnings, report line
1990 numbers rather than character positions.
1991 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1992 that update-copyright runs it.
1993 * gnulib: Update.
1994
d0caad01
JD
19952009-08-05 Joel E. Denny <jdenny@clemson.edu>
1996
1997 maint: clean up update-b4-copyright code
1998 * build-aux/update-b4-copyright: Do not accept 2-digit
1999 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
2000 Don't accept a `[' in a b4_copyright argument.
2001 Format code more consistently.
2002 Don't assume b4*copyright never occurs.
2003
ac2def56
JD
20042009-08-04 Joel E. Denny <jdenny@clemson.edu>
2005
2006 maint: automate b4_copyright updates.
2007 * Makefile.am (update-b4-copyright): New target rule.
2008 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
2009 * build-aux/update-b4-copyright: New.
2010 * data/yacc.c: Remove stray characters around b4_copyright
2011 invocations.
2012
dbbb64f0
JD
20132009-08-04 Joel E. Denny <jdenny@clemson.edu>
2014
2015 maint: automate annual package-wide copyright-year update.
2016 * .x-update-copyright: New.
2017 * Makefile.am (EXTRA_DIST): Remove maint.mk.
2018 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
2019 update-copyright. Remove gnumakefile, which is implied by
2020 maintainer-makefile.
2021 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
2022 * gnulib: Update.
2023 * maint.mk: Remove, now copied from gnulib.
2024 * examples/extexi: Add missing "(C)" in copyright statement so
2025 update-copyright can recognize it.
2026 * src/LR0.h: Likewise.
2027 * src/print.h: Likewise.
2028 * src/print_graph.h: Likewise.
2029 * src/gram.c: Add missing comma in copyright statement.
2030 * src/gram.h: Likewise.
2031
bfa018d4
JD
20322009-08-04 Joel E. Denny <jdenny@clemson.edu>
2033
2034 Fix "make distcheck".
2035 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
2036 of just calc.stamp.
2037
4521fcdf
JD
20382009-08-01 Joel E. Denny <jdenny@clemson.edu>
2039
2040 Pacify "gcc -Wunused" for the input function from Flex.
2041 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
2042 and later.
2043 * src/scan-code.l: Add "%option noinput", which I cannot find in
2044 the Flex manual, but which Flex has supported since at least as
2045 far back as 2.5.4. However, if any of our developers still use
2046 Flex 2.5.4, they'll need to stop configuring with
2047 --enable-gcc-warnings because "%option noinput" didn't work
2048 correctly until Flex 2.5.6.
2049 * src/scan-gram.l: Likewise.
2050 * src/scan-skel.l: Likewise.
2051
992e874a
AR
20522009-07-31 Alex Rozenman <rozenman@gmail.com>
2053
2054 Fix --enable-gcc-warnings problems.
2055 * src/reader.c: Adjust variable names.
2056 * src/scan-code.l: Fix prototypes and adjust names.
2057 * src/named-ref.c: Remove redundant "if".
2058
a1ed2b71
JD
20592009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2060
2061 Fix a --enable-gcc-warnings problem.
2062 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
2063 variable.
2064
cbc6a70e 20652009-07-24 Alex Rozenman <rozenman@gmail.com>
1e20ad11
AR
2066
2067 Fix some memory leaks.
2068 * src/named-ref.c: Add a pointer check (named_ref_free).
2069 * src/scan-code.l: New function (variant_table_free). Called in
2070 code_scanner_free.
2071 * src/symlist.c: Call to named_ref_free (symbol_list_free).
2072
ac9b0e95
JD
20732009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2074
2075 Warn about character literals not of length one.
2076 * NEWS (2.5): Document.
2077 * src/scan-gram.l (INITIAL): Remove comment that we don't check
2078 the length.
2079 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
2080 * tests/input.at (Bad character literals): New test group.
2081
2de160e1
JD
20822009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2083
2084 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
2085
cba97506
JD
20862009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
2087
2088 Some M4 cleanup in the testsuite.
2089 Suggested by Eric Blake at
2090 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
2091 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
2092 complicate the code by distinguishing between a missing value
2093 and an empty string value for an optional argument. This fix is
2094 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
2095 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
2096 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
2097 arguments are not needed because of the following changes.
2098 Fix stale comments.
2099 Bison developers should use GNU M4 and should not use
2100 POSIXLY_CORRECT when building the test suite, so do not
2101 complicate the code by avoiding $10 and above.
2102 Do not quote an empty string value for an optional argument, and
2103 do not distinguish between a missing value and an empty string
2104 value.
2105
62eb2d1b
JD
21062009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
2107
2108 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
2109
620b2e36
JD
21102009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2111
2112 Revert unnecessary column realignment in --help output.
2113 Reported by Akim Demaille at
2114 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
2115 * src/getargs.c (usage): Here.
2116
cbc6a70e 21172009-07-04 Alex Rozenman <rozenman@gmail.com>
dad6544d
AR
2118
2119 Alphabetical order in src/Makefile.am.
2120 * src/Makefile.am: Adjust.
2121
cbc6a70e 21222009-07-04 Alex Rozenman <rozenman@gmail.com>
d5e8574b
AR
2123
2124 Style changes and factoring.
2125 * src/named-ref.h: Add comments.
2126 * src/parse-gram.y: Readability and style changes.
2127 * src/reader.c: Factoring: assign_named_ref function.
2128 * src/scan-code.l: Factoring and style changes. Rename
2129 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2130 Use "unsigned" type for variant index. Improve readablity.
2131 * src/scan-gram.l: Change error messages and add comments.
2132 * src/symlist.h: symbol_list_null: New function decl.
2133 * src/symlist.c: symbol_list_null: Implement here.
2134 * tests/named-refs.at: Adjust for new error messages.
2135
ae09ec85
EB
21362009-06-29 Eric Blake <ebb9@byu.net>
2137
2138 scan-code: avoid compiler warnings
2139 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2140
80d653fd
AD
21412009-06-29 Akim Demaille <demaille@gostai.com>
2142
2143 build: avoid concurrent extraction of calc++.
2144 * examples/calc++/Makefile.am (calc.stamp): New.
2145 Depend on it to create the sources of calc++ so that concurrent
2146 builds don't launch several "extexi" in parallel.
2147 Not only this is inefficient, this also builds incorrect sources
2148 with several extractions mixed together.
2149
7685e2f7
AR
21502009-06-27 Alex Rozenman <rozenman@gmail.com>
2151
2152 Implement support for named symbol references.
2153 * src/parse-gram.y: Add new syntax (named_ref.opt).
2154 * src/reader.c: Store named refs in symbol lists.
2155 * src/reader.h: New argument for symbol_append and
2156 action_append functions.
2157 * src/scan-code.h: Add new field (named_ref) into
2158 code_props data structure. Keeps named ref of midrule
2159 actions.
2160 * src/scan-code.l: Support for named refs in semantic
2161 action code. New function 'parse_named_ref'.
2162 * src/scan-gram.l: Support bracketed id.
2163 * src/symlist.c: Store named refs in symbol lists.
2164 * src/symlist.h: New field in symbol list: named_ref.
2165 * src/named-ref.h: New file, a struct for named_ref.
2166 * src/named-ref.cp: New file, named_ref_new function.
2167 * src/local.mk: Add two new files.
2168 * tests/testsuite.at: Include new test group:
2169 * tests/named-refs.at: this new file.
2170
67f8cf51
AD
21712009-06-25 Akim Demaille <demaille@gostai.com>
2172
2173 hash: check insertion for memory exhaustion.
2174 * src/uniqstr.c (uniqstr_new): New.
2175
83b66ddd
AD
21762009-06-11 Akim Demaille <demaille@gostai.com>
2177
2178 style changes.
2179 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2180 * src/print-xml.c: Style changes.
2181 * tests/conflicts.at: Comment changes.
2182
517cb0ad
AD
21832009-06-11 Akim Demaille <demaille@gostai.com>
2184
2185 xml: beware of user strings used to give a %prec to rules.
2186 * tests/conflicts.at (%prec with user strings): New.
2187 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2188 XML output.
2189
75c7a52a
AD
21902009-06-11 Akim Demaille <demaille@gostai.com>
2191
2192 hash: check insertion for memory exhaustion.
2193 * src/muscle-tab.c (muscle_insert, muscle_grow)
2194 * src/state.c (state_hash_insert): Check the return value of
2195 hash_insert.
2196
66ed9753
AD
21972009-06-10 Akim Demaille <demaille@gostai.com>
2198
2199 deterministic test suite.
2200 Some consistency checks on symbols are performed after all the
2201 symbols were read, by an iteration over the symbol table. This
2202 traversal is nondeterministic, which can be a problem for test
2203 cases.
2204 Avoid this.
2205 Addresses another form of nondeterminism reported by Joel E. Denny.
2206 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2207
2208 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2209 test in two.
2210 Use different file names for the three tests to make the
2211 maintenance easier.
2212
ed15d907
AD
22132009-06-10 Akim Demaille <demaille@gostai.com>
2214
95d176ff
AD
2215 deterministic user-token-number redeclaration errors.
2216 Address nondeterminism reported by Joel E. Denny.
2217 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2218
2219 * src/uniqstr.h: Comment changes.
2220 * src/location.h (boundary_cmp, location_cmp): New.
2221 * src/symtab.c (user_token_number_redeclaration): New.
2222 (symbol_translation): Use it.
2223 * tests/input.at (Numbered tokens): Adjust the expected output.
2224
22252009-05-25 Akim Demaille <demaille@gostai.com>
2226
ed15d907 2227 gnulib: update.
aa50ba7b
EB
2228 * gnulib: Update to latest.
2229 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2230 * m4/.gitignore: Regen.
2231 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2232 Call xalloc_die on hash_insert failures.
2233 Requested by the new __warn_unused_result__ attribute of
2234 hash_insert.
ed15d907 2235
e3a33f7c
JD
22362009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2237
2238 Convert multiple variable definition warnings to complaints.
2239 * NEWS (2.5): Add a new entry for that change.
2240 * doc/bison.texinfo (Decl Summary): Update %define entry.
2241 (Bison Options): Update -D/--define/-F/--force-define entry.
2242 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
2243 * src/muscle_tab.h (muscle_percent_define_insert): Update
2244 comments.
2245 * tests/input.at (`%define errors'): Update.
2246 (`%define, --define, --force-define'): Update.
2247
34d41938
JD
22482009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2249
2250 -F/--force-define and relative %define/-D/--define priorities.
2251 * NEWS (2.5): Add documentation to -D/--define entry.
2252 * build-aux/cross-options.pl: Hard-code association of
2253 --force-define with %define.
2254 * doc/bison.texinfo (Decl Summary): In %define entry,
2255 cross-reference command-line options.
2256 (Bison Options): Add documentation to -D/--define entry.
2257 (Option Cross Key): Widen column for --force-define row.
2258 * src/getargs.c (usage): Document -F/--force-define. Realign
2259 options in output.
2260 (short_options, long_options, getargs): Parse -F/--force-define,
2261 and update muscle_percent_define_insert invocation.
2262 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
2263 (muscle_percent_define_insert): Add argument with that type.
2264 * src/muscle_tab.c (muscle_percent_define_insert): Implement
2265 -F/--force-define behavior and priorities.
2266 * src/parse-gram.y (prologue_declaration): Update
2267 muscle_percent_define_insert invocations.
2268 * tests/input.at (`%define, --define'): Rename to...
2269 (`%define, --define, --force-define'): ... this and extend.
2270
246c4efa
JD
22712009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2272
2273 Update some comments to make sense for -D.
2274 * data/bison.m4 (b4_check_user_names): In header comments, say
2275 "user occurrence" instead of "grammar occurrence".
2276 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
2277 (muscle_percent_code_grow): Likewise just for consistency.
2278
531683e7
JD
22792009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2280
2281 * data/c++.m4: Update copyright year.
2282
e7bfa8b7
JD
22832009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2284
2285 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2286
8c221795
JD
22872009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2288
2289 Handle a trailing `:' in a user-supplied C++ namespace better.
2290 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2291 among the closing braces here. This fix might make the
2292 generated code easier to debug, but otherwise it should be
2293 insignificant because a trailing `:' is a C++ error already.
2294
c8bf65f0
AD
22952009-05-19 Akim Demaille <demaille@gostai.com>
2296
2297 remove useless variable.
2298 * src/getargs.c (skeleton_arg): Remove now useless variable.
2299 Should help the compiler see that this printf-like call is sane.
2300
7ac45a46
AD
23012009-05-11 Akim Demaille <demaille@gostai.com>
2302
2303 doc: use C++ headers.
2304 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2305 headers.
2306
601bdfab
AD
23072009-05-05 Akim Demaille <demaille@gostai.com>
2308
2309 fix hexadecimal token number support.
2310 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
2311
d19123e6
AD
23122009-05-05 Akim Demaille <demaille@gostai.com>
2313
2314 tests: check token numbers.
2315 * tests/input.at (Numbered tokens): New.
2316
ecdfea9a
AD
23172009-05-04 Akim Demaille <demaille@gostai.com>
2318
2319 bison: catch bad symbol names.
2320 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2321 * tests/input.at: Adjust.
2322
43e6aea5
AD
23232009-05-04 Akim Demaille <demaille@gostai.com>
2324
2325 space changes.
2326 * src/scan-gram.l: Untabify to be robust to zealous editors.
2327
c046698e
AD
23282009-05-04 Akim Demaille <demaille@gostai.com>
2329
2330 identifiers: dashes are letters.
2331 Dashes can now start identifiers (symbols and directives).
b10dd689 2332
c046698e
AD
2333 * src/scan-gram.l ({letter}): Add dash.
2334 ({id}): Remove it.
2335 * tests/input.at (Symbols): Adjust.
2336 Remove stray comment.
2337 * tests/regression.at (Invalid inputs): Adjust error message.
2338 * doc/bison.texinfo (Symbols): Update.
2339
966aba65
JD
23402009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2341
2342 Declare %code to be a permanent feature.
2343 * NEWS (2.4.2): Here.
2344 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2345 experimental.
2346 (Decl Summary): Likewise.
2347
812775a0
JD
23482009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2349
2350 Convert underscores to dashes in some %define variable names.
2351 For now, just api.push-pull and lr.keep-unreachable-states.
2352 Maintain old names for backward compatibility.
2353 * NEWS (2.5): Document.
2354 * data/c.m4 (b4_identification): Update comment.
2355 * data/yacc.c: Update access.
2356 * doc/bison.texinfo: Update.
2357 * etc/bench.pl.in (bench_grammar): Update use.
2358 * src/files.c (tr): Move to...
2359 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2360 think of a better place to expose it. My logic is that, for all
2361 uses of tr so far, command-line arguments can be involved, and
2362 getargs.h is already included.
2363 * src/main.c (main): Update access.
2364 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2365 variable names to new variable names before assigning value.
2366 * src/reader.c (reader): Update setting default.
2367 * tests/calc.at: Update uses.
2368 * tests/conflicts.at (Unreachable States After Conflict
2369 Resolution): Update use.
2370 * tests/input.at (%define enum variables): Update use.
2371 (%define backward compatibility): New test group.
2372 * tests/push.at: Update uses.
2373 * tests/reduce.at: Update uses.
2374 * tests/torture.at: Update uses.
2375
1c4aa81d
JD
23762009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2377
2378 Set all front-end %define defaults in one place.
2379 * src/main.c (main): Move lr.keep_unreachable_states default...
2380 * src/reader.c (reader): ... to here.
2381
1d0f55cc
JD
23822009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2383
2384 Rename lr.default_reductions to lr.default-reductions.
2385 * NEWS (2.5): Here.
2386 * doc/bison.texinfo: Here.
2387 * src/lalr.c (initialize_LA): Here.
2388 * src/print.c (print_reductions): Here.
2389 * src/reader.c (reader): Here.
2390 * src/tables.c (action_row): Here.
2391 * tests/input.at (%define enum variables): Here.
2392 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2393
0b593457
JD
23942009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2395
2396 Pacify ./configure --enable-gcc-warnings.
2397 * tests/input.at (Symbols): Prototype yyerror and yylex.
2398
0939aa2d
AD
23992009-04-21 Akim Demaille <demaille@gostai.com>
2400
2401 tests: check the use of dashes and periods in symbols.
2402 * tests/input.at (Symbol): New test group.
2403
0b593457 24042009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
ae618dcc
JD
2405
2406 Document how `%define "var" "value"' is not M4-friendly.
2407 * src/parse-gram.y (variable): In comments here.
2408
0b593457 24092009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
6789b8bd
JD
2410
2411 Add copyright updates missed during previous cherry pick.
2412 * src/output.c: Here.
2413 * src/parse-gram.y: Here.
2414 * src/scan-gram.l: Here.
2415
663ce7bb
AD
24162009-04-20 Akim Demaille <demaille@gostai.com>
2417
2418 variables: accept dashes.
2419 * src/scan-gram.l ({id}): Also accept dashes after the initial
2420 letter.
2421 ({directive}): Use {id}.
2422 * src/parse-gram.y: Comment and formatting changes.
2423 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2424 symbols.
2425 * src/complain.h, src/complain.c (yacc_at): New.
2426 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2427 symbol names.
2428 * src/output.c (token_definitions_output): Do not #define token
2429 names with dashes.
2430
379261b3
JD
24312009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2432
2433 Clean up recent patches a little.
2434 Reported by Akim Demaille.
2435 * doc/bison.texinfo (Understanding): Fix typos.
2436 * src/print.c (print_reductions): Don't use negated variable.
2437
25029e16
JD
24382009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2439
2440 List accepted values for a %define enum variable with an invalid value.
2441 Suggested by Akim Demaille at
2442 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2443 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2444 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
2445 * tests/input.at (%define lr.default_reductions invalid values): Merge
2446 into...
2447 (%define enum variables): ... here, and update output.
2448
620b5727
JD
24492009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2450
2451 Rename "default rule" to "default reduction".
2452 This includes changing variable names in code, changing
2453 comments, and renaming %define lr.default_rules to %define
2454 lr.default_reductions.
2455 * NEWS (2.5): Update IELR documentation.
2456 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
2457 Adjust YYDEFACT and yydefact_ documentation.
2458 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2459 and lr.type documentation. Make some other wording
2460 improvements.
2461 (Glossary): Adjust cross-references and Default Reduction
2462 definition.
2463 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2464 Remove a confusing comment pointed out by Akim Demaille.
2465 (initialize_LA): Adjust code.
2466 * src/print-xml.c (print_reductions): Adjust code.
2467 * src/print.c (print_reductions): Adjust code.
2468 * src/reader.c (reader): Adjust code.
2469 * src/tables.c (action_row): Adjust code.
2470 (token_actions): Adjust code.
2471 * src/tables.h: Adjust YYDEFACT documentation.
2472 * tests/input.at (%define lr.default_rules invalid values):
2473 Rename test group to...
2474 (%define lr.default_reductions invalid values): ... this, and
2475 update grammar file and expected output.
2476 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2477 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2478
34a6c2d1
JD
24792009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2480
2481 Document %define lr.type and lr.default_rules.
2482 * NEWS (2.5): Add an entry.
2483 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2484 besides just LALR(1) and GLR(1).
2485 * doc/bison.texinfo (Introduction): Likewise.
2486 (Language and Grammar): Bison is no longer limited to LALR(1)
2487 restrictions.
2488 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2489 when trying to distinguish from GLR. Talk about LR(1) grammars
2490 rather than LALR(1) grammars.
2491 (Decl Summary): In %define api.push_pull entry, say it applies
2492 to deterministic parsers in C rather than LALR(1) parsers in C.
2493 Add lr.default_rules entry.
2494 Add lr.type entry.
2495 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2496 restrictions.
2497 (Generalized LR Parsing): Same changes as for the previous GLR
2498 section.
2499 (Memory Management): Say deterministic rather than LALR(1).
2500 (Understanding): Correct some bison output.
2501 Index discussion of "accepting state".
2502 Say deterministic rather than LALR(1).
2503 (Bison Options): In --yacc entry, say deterministic rather than
2504 LALR(1).
2505 In --report, --graph, and --xml entries, just don't mention
2506 LALR(1).
2507 (C++ Parsers): Say deterministic rather than LALR(1).
2508 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2509 (Glossary): Add Accepting State, Consistent State, Default Rule,
2510 and IELR(1) definitions.
2511 In Generalized LR (GLR) definition, make same changes as in
2512 previous GLR sections.
2513 In LALR(1) definition, say Bison uses LALR(1) by default rather
2514 than implying Bison is limited to LALR(1).
2515 (LocalWords): Add IELR.
2516
f805dfcb
JD
25172009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2518
2519 Finish implementing %define lr.type.
2520 Its value can be "LALR", "IELR", or "canonical LR".
2521 * lib/timevar.def (TV_IELR_PHASE1): New var.
2522 (TV_IELR_PHASE2): New var.
2523 (TV_IELR_PHASE3): New var.
2524 (TV_IELR_PHASE4): New var.
2525 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2526 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2527 Sbitset.h, ielr.h, and ielr.c.
2528 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2529 trace_types): Add trace_ielr.
2530 * src/lalr.h, src/lalr.c (ngotos): Export it.
2531 (F): Rename to...
2532 (goto_follows): ... this, update all uses, and export it.
2533 (set_goto_map): Export it.
2534 (map_goto): Export it.
2535 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2536 handled in ielr.
2537 (initialize_LA): Export it. Move lookback allocation to...
2538 (lalr): ... here because, for canonical LR, initialize_LA must
2539 be invoked but lookback and much of the rest of LALR isn't
2540 needed.
2541 * main.c (main): Instead of lalr, invoke ielr, which invokes
2542 lalr.
2543 * src/reader.c (reader): Default lr.type to "LALR".
2544 Default lr.default_rules to "accepting" if lr.type is "canonical
2545 LR". Leave the default as "all" otherwise.
2546 Check for a valid lr.type value.
2547 * src/state.h, src/state.c (struct state_list): Add state_list
2548 member.
2549 (state_new): Initialize state_list member to NULL.
2550 (state_new_isocore): New function, exported.
2551 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2552 exercises all values of lr.type.
2553 (GNU AWK Grammar): Rename test group to...
2554 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2555 AT_TEST_EXISTING_GRAMMAR.
2556 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2557 (GNU pic Grammar): Rename test group to...
2558 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2559 AT_TEST_EXISTING_GRAMMAR.
2560 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2561 all values of lr.type.
2562 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2563 (Lane Split): Likewise.
2564 (Complex Lane Split): Likewise.
2565 (Split During Added Lookahead Propagation): Likewise.
2566
166366b2
JD
25672009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2568
2569 Add new files for IELR and canonical LR implementation.
2570 * src/AnnotationList.c: New.
2571 * src/AnnotationList.h: New.
2572 * src/InadequacyList.c: New.
2573 * src/InadequacyList.h: New.
2574 * src/Sbitset.c: New.
2575 * src/Sbitset.h: New.
2576 * src/ielr.c: New.
2577 * src/ielr.h: New.
2578
03c07b03
JD
25792009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2580
2581 Implement %define lr.default_rules.
2582 Its value describes the states that are permitted to contain
2583 default rules: "all", "consistent", or "accepting".
2584 * src/reader.c (reader): Default lr.default_rules to "all".
2585 Check for a valid lr.default_rules value.
2586 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2587 is "accepting", then only mark the accepting state as
2588 consistent.
2589 (initialize_LA): Tell state_lookahead_tokens_count whether
2590 lr.default_rules is "accepting".
2591 * src/tables.c (action_row): If lr.default_rules is not "all",
2592 then disable default rules in inconsistent states.
2593 * src/print.c (print_reductions): Use this opportunity to
2594 perform some assertions about whether lr.default_rules was
2595 obeyed correctly.
2596 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2597 helps with checking the parser tables for a grammar.
2598 * tests/input.at (%define lr.default_rules invalid values): New
2599 test group.
2600 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2601 AT_TEST_TABLES_AND_PARSE.
2602 (`no %define lr.default_rules'): New test group generated by
2603 AT_TEST_LR_DEFAULT_RULES.
2604 (`%define lr.default_rules "all"'): Likewise.
2605 (`%define lr.default_rules "consistent"'): Likewise.
2606 (`%define lr.default_rules "accepting"'): Likewise.
2607
44c124a3
AD
26082009-04-20 Akim Demaille <demaille@gostai.com>
2609
2610 Consistently refer to Yacc, not YACC.
2611 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2612
42660736
JD
26132009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2614
2615 Pacify make maintainer-check-posix.
2616 * tests/input.at (%define, --define): Move bison command-line
2617 options before grammar file name.
2618
a2d05674
JD
26192009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2620
2621 Document semicolon warnings.
2622 * NEWS (2.5): Here.
2623
c4fae1ef
AD
26242008-12-08 Akim Demaille <demaille@gostai.com>
2625
2626 Fix portability issue in the test suite.
2627 * tests/local.at (AT_MATCHES_CHECK): New.
2628 Based on Perl instead of Sed. Sed has too many portability
2629 pitfalls, not ever Sed is GNU Sed.
2630 * tests/actions.at (Fix user actions without a trailing semicolon):
2631 Use it.
2632
42f4393a
DJ
26332008-12-07 Di-an Jan <dianj@freeshell.org>
2634
2635 Implement the FIXME that ends an user action with a semicolon
2636 if it seems necessary.
2637 * src/scan-code.l (flex rules section): Flag cpp directive from
2638 any `#' to the first unescaped end-of-line. Semicolon is not
2639 needed after `;', `{', '}', or cpp directives and is needed after
2640 any other token (whitespaces and comments have no effect).
2641 * tests/actions.at (Fix user actions without a trailing semicolon):
2642 New test.
2643 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2644 to make user actions complete statements.
2645 Adjust column numbers in error messages.
2646 * tests/regression.at (Fix user actions without a trailing semicolon):
2647 Remove. Covered by new test.
2648
bd5df716
AD
26492009-04-14 Akim Demaille <demaille@gostai.com>
2650
2651 doc: minor fixes.
2652 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2653 (Table of Symbols): Remove duplicate entry for %debug.
2654
7ba0d59d
EB
26552009-04-10 Eric Blake <ebb9@byu.net>
2656
2657 submodules: update to latest
2658 * submodules/autoconf: Use latest upstream Autoconf.
2659
b4d71a96
EB
26602009-04-06 Eric Blake <ebb9@byu.net>
2661
2662 Work around autoconf 2.63b bug in testsuite.
2663 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2664 autoconf bug related to # in test.
2665
4ecd3681
JD
26662009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2667
2668 * NEWS (2.5): Describe new -D/--define feature.
2669
c65e5292
AD
26702008-11-10 Akim Demaille <demaille@gostai.com>
2671
2672 --trace=muscles
2673 * src/getargs.h, src/getargs.c (trace_muscle): New.
2674 (trace_types, trace_args): Support it.
2675 * src/output.c (output_skeleton): Use it.
2676
96002de2
AD
26772008-11-10 Akim Demaille <demaille@gostai.com>
2678
2679 muscles_output.
2680 * src/output.c (muscles_output): New, extracted from...
2681 (output_skeleton): here.
2682 Adjust.
2683
fadb13b5
AD
26842008-11-21 Akim Demaille <demaille@gostai.com>
2685
2686 Display the changes in cross-options.texi.
2687 * build-aux/cross-options.pl ($sep): New, to separate items.
2688 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
2689 the changes.
2690
72183df4
DJ
26912008-11-20 Di-an Jan <dianj@freeshell.org>
2692
2693 Improves options in the manual.
2694 * doc/bison.texinfo (-g, -x): Add space before argument.
2695 (Option Cross Key): Implement FIXME: listing directives also.
2696 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2697 (Short Option): Special case -d. Put arguments inside @option.
fadb13b5 2698 (Bison Directive): Add column, automatically extracted from
72183df4
DJ
2699 src/scan-gram.l (actual name passed as the first argument)
2700 with special case for %define.
2701 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
2702 to build-aux/cross-options.pl.
2703 * src/getargs.c (usage): Document limitations of cross-options.pl.
2704 * src/scan-gram.l: Likewise.
2705
e80b068c
AD
27062009-02-25 Akim Demaille <demaille@gostai.com>
2707
2708 Copyright years.
2709 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2710
e3ee30b8
AD
27112008-12-08 Akim Demaille <demaille@gostai.com>
2712
2713 Install autoconf as a submodule to get m4sugar.
2714 * .gitmodules: Add submodules/autoconf.
2715 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2716 submodules/autoconf.
2717
c4eb1e84
JD
27182008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2719
2720 Simplify last patch slightly.
2721 * src/getargs.c (getargs): Here.
2722
10fa0146
JD
27232008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2724
2725 Fix last warning from --enable-gcc-warnings.
2726 * src/getargs.c (getargs): Don't assign const address to non-const
2727 pointer.
2728
6f5be1ab
DJ
27292008-11-17 Di-an Jan <dianj@freeshell.org>
2730
2731 Handle --enable-gcc-warnings.
2732 * src/getargs.c (command_line_location): Set parameters to void.
2733
11c4e57d
AD
27342008-11-11 Akim Demaille <demaille@gostai.com>
2735
2736 AT_FULL_COMPILE.
2737 * tests/actions.at, tests/regression.at: Use it.
2738
e186a284
AD
27392008-11-07 Akim Demaille <demaille@gostai.com>
2740
2741 Pass command line location to skeleton_arg and language_argmatch.
2742 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2743 The location argument is now mandatory.
2744 Adjust all dependencies.
2745 (getargs): Use command_line_location.
2746
e14c6831
AD
27472008-11-07 Akim Demaille <demaille@gostai.com>
2748
2749 -D, --define.
2750 * src/getargs.c (usage): Document -D.
2751 Fix help string for --locations.
2752 (command_line_location): New.
2753 (short_options, long_options, getargs): Support -D, --define.
2754 (getargs): Move -d support at the right place.
2755 * doc/bison.texinfo (Bison Options): Update.
2756 * tests/input.at (%define, --define): New.
2757
75c21b61
AD
27582008-11-07 Akim Demaille <demaille@gostai.com>
2759
2760 Initialize the muscle table before parsing the command line.
2761 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2762 (getargs): Define file_name.
2763 * src/main.c (main): Initialize muscle_tab before calling
2764 getargs.
2765 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2766 its value is not available yet.
2767
33d2a860
AD
27682008-11-09 Akim Demaille <demaille@gostai.com>
2769
2770 Require the generation of parse-gram.output.
2771 * src/Makefile.am (YACC): Pass --report=all.
2772
006faedf
JD
27732009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2774
2775 * NEWS (2.5): New stub.
2776
ecd1b61c
JD
27772009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2778
2779 Fix options documentation.
2780 * build-aux/cross-options.pl: As in --help output, write optional
2781 arguments as [=ARG] not =[ARG].
2782 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2783
f67c4037
AD
27842008-11-07 Akim Demaille <demaille@gostai.com>
2785
2786 Fix --help.
2787 * src/getargs.c (usage): Fix help string for -W.
2788
0213d651
AD
27892008-11-07 Akim Demaille <demaille@gostai.com>
2790
2791 Handle more general types of option arguments.
2792 * build-aux/cross-options.pl: The argument ends at the first
2793 space, not the first non-symbol character.
2794 Use @var for each word appearing the argument description.
2795
c19178bf
JD
27962009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2797
2798 Remove spurious initial empty lines.
2799 * data/location.cc: End the @output lines with an @.
2800
0d2b2ab0
AD
28012008-11-04 Akim Demaille <demaille@gostai.com>
2802
2803 Remove spurious initial empty lines.
2804 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2805 * data/yacc.c: End the @output lines with an @.
2806
8ba62e3e
JD
28072009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2808
2809 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2810 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2811 requirements for a correct m4 are stricter.
2812 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
2813 * configure.ac: Update to use AC_PROG_GNU_M4.
2814 Reported by Eric Blake.
2815
5bc993d9
JD
28162009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2817
2818 Help with updating web manual.
2819 * HACKING: Incorporate instructions from gnulib/doc/README.
2820 * bootstrap.conf (gnulib_modules): Add gendocs.
2821
580c075d
JD
28222009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2823
2824 Fix strange %define locations for default values.
2825 Reported by Akim Demaille at
2826 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2827 and discussed again starting at
2828 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2829 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2830 because location information is bogus.
2831 Use angle brackets to delimit fake file name because square brackets
2832 look like underexpanded m4. Choose a better fake file name.
2833 Use negative line numbers.
2834 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2835 * src/location.c (location_print): If line for a boundary is negative,
2836 only print that boundary's file name.
2837 * src/location.h: Document that.
2838 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2839 defaults): Update output.
2840
5d3a1ecb
AD
28412008-11-07 Akim Demaille <demaille@gostai.com>
2842
2843 Locations without columns for command line arguments.
2844 * src/location.c (location_print): Don't display negative columns.
2845 * src/location.h: Document this.
2846
015e86a7
JD
28472009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2848
2849 Add reminder about uploading public key to keys.gnupg.net.
2850 * HACKING (Release Procedure): Here.
2851
c1455bab
AD
28522009-03-31 Akim Demaille <demaille@gostai.com>
2853
2854 bootstrap: --help to stdout.
2855 * bootstrap (usage): Don't send --help to stderr.
2856 Use a here doc instead of a long string.
2857
2075a82a
AD
28582009-03-31 Akim Demaille <demaille@gostai.com>
2859
2860 bootstrap: README-hacking no longer exists
2861 * bootstrap (checkout_only_file): Set to HACKING.
2862
26fccd4d
AD
28632009-03-26 Akim Demaille <demaille@gostai.com>
2864
2865 doc: merge HACKING and README-hacking.
2866 Two files is confusing.
2867 Reported by Alexandre Duret-Lutz.
5bc993d9 2868
26fccd4d
AD
2869 * README-hacking: Merge into...
2870 * HACKING (Working from the repository): here.
2871
6469c4d7
AD
28722009-03-26 Akim Demaille <demaille@gostai.com>
2873
2874 doc: update README-hacking.
2875 * README-hacking: We now use git and git submodules.
2876 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2877
b328890a
AD
28782009-03-26 Akim Demaille <demaille@gostai.com>
2879
2880 lalr1.cc: avoid GCC 4.3 warnings.
2881 GCC 4.3 now warns about "a || b && c" and asks for explicit
2882 parentheses.
2883 Reported by Alexandre Duret-Lutz.
2884 * data/location.cc: Update copyright years.
2885 (Position::operator==): Use parens to make precedence explicit.
2886 Compare lines and columns first, as they are more likely to be
2887 different, and they are faster to compare.
2888
f3079439
AD
28892009-03-26 Akim Demaille <demaille@gostai.com>
2890
2891 gnulib: update.
2892 * gnulib: Update to latest.
2893 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
2894 use +=.
2895
8defe11b
AD
28962009-01-08 Akim Demaille <demaille@gostai.com>
2897
2898 Fix grep portability issues.
2899 Grep on Solaris does not support -q.
2900 Reported by Summum Bonum.
5bc993d9 2901
8defe11b
AD
2902 * NEWS: Add a stub for 2.4.2.
2903 * THANKS: Add Summum Bonum.
2904 * tests/atlocal.in (EGREP): New.
2905 (CC, CXX, XSLTPROC): Make it possible to override them via
2906 envvars.
2907 * tests/java.at: Use $EGREP instead of egrep.
2908 Use AT_CHECK's ignore instead of grep's -q.
2909
41930e7a
JD
29102008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2911
2912 Version 2.4.1.
2913 * NEWS: Set version and date.
2914 * lib/Makefile.am: Update copyright year.
2915 * tests/atlocal.in: Update copyright year.
2916
d07932ef
JD
29172008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2918
2919 Semicolon feature removal is not about future language support.
2920 * NEWS: The semicolon feature is no longer active for newer languages,
2921 so don't claim that it causes trouble for them.
2922
0364b334
JD
29232008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2924
2925 * gnulib: Update submodule to HEAD.
2926
876fd835
AD
29272008-12-09 Akim Demaille <demaille@gostai.com>
2928
2929 Update data/README.
2930 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2931
bee1df15
EB
29322008-12-05 Eric Blake <ebb9@byu.net>
2933
2934 Build testsuite with newer autoconf.
2935 * tests/output.at (m4_expand): Don't override in newer autoconf,
2936 where the underlying implementation changed.
2937 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2938 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2939 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2940 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2941 since some of them contain unbalanced ')'.
2942
7e6d1e22
JD
29432008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2944
2945 * NEWS: Clarify a little.
2946
a957d06c
JD
29472008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2948
2949 * NEWS: Update for recent changes.
2950
462503f8
JD
29512008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2952
2953 Fix unexpanded macros in GLR defines file.
2954 Reported by Csaba Raduly at
2955 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2956 * THANKS (Csaba Raduly): Add.
2957 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2958 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2959 lexer in a separate module that includes the defines file.
2960 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
2961 source.
2962 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2963 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2964 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2965 (AT_DATA_SOURCE_PROLOGUE): New.
2966 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2967 (AT_DATA_SOURCE): New.
2968 (AT_FULL_COMPILE): New, copied from master branch and extended to
2969 support an additional source file.
2970
bf151b75
JD
29712008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2972
2973 Don't let maintainer-*-check targets force a version update.
2974 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2975 handled.
2976
f56274a8
DJ
29772008-11-17 Di-an Jan <dianj@freeshell.org>
2978
2979 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2980 Align menus. Adjust word wrapping. Use node names for menu names.
2981 (Examples): Don't abbreviate node names.
2982 (LocalWords): Remove abbreviations.
2983 (Copying): Make description a sentence.
bf151b75 2984 (Java Action Features): Remove period to match the rest of menu.
f56274a8 2985
b5775a81
PB
29862008-11-11 Paolo Bonzini <bonzini@gnu.org>
2987
2988 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2989 * configure.ac: Adjust usage.
2990 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2991 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2992 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2993
7ed73f82
JD
29942008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2995
2996 Don't add a semicolon to actions for %skeleton or %language.
2997 It breaks Java test cases as reported by Akim Demaille.
2998 * src/scan-code.l: Implement.
2999
4b1ebc49
JD
30002008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3001
3002 Clean up %skeleton and %language priority implementation.
3003 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
3004 remove static qualifier because others will soon need to see it.
3005 (language_prio): Likewise.
3006 (getargs): Use command_line_prio rather than 0.
3007 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
3008 enum fields.
3009 (skeleton_prio): Extern it.
3010 (language_prio): Extern it.
3011 * src/parse-gram.y: Use grammar_prio rather than 1.
3012
738cde3e
AD
30132008-11-04 Akim Demaille <demaille@gostai.com>
3014
3015 * NEWS: Mention the trailing semicolon in action.
3016
d6fb461d
AD
30172008-11-04 Akim Demaille <demaille@gostai.com>
3018
3019 Reformat NEWS.
3020 * NEWS: Use more outline-mode markup.
3021 Suggested by Jim Meyering.
3022
14da0cdd
JD
30232008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
3024
3025 Fix user actions without a trailing semicolon.
3026 Reported by Sergei Steshenko at
3027 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
3028 * THANKS (Sergei Steshenko): Add.
3029 * src/scan-code.l (SC_RULE_ACTION): Fix it.
3030 * tests/regression.at (Fix user actions without a trailing semicolon):
3031 New test case.
3032
c9ba9e59
JD
30332008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3034
3035 Initiate further development.
3036 * NEWS: Create an empty section for new entries.
3037 * gnulib: Update submodule to HEAD.
3038
bfb40910
JD
30392008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3040
3041 * NEWS: Version 2.4.
3042
241fda7a
JD
30432008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3044
3045 Prepare for next release.
3046 * NEWS: Briefly mention changes since 2.3b.
3047 * README: Say GNU m4 1.4.6, which we've been requiring in release
3048 announcements already, not 1.4.3, which breaks the build.
3049
ed4d67dc
JD
30502008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3051
3052 Say %language is experimental.
3053 We're thinking of extending it's effect on output file naming. See the
3054 thread at
3055 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3056 * NEWS: Say it's experimental.
3057 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3058 recommend it over %skeleton for now.
3059 (Bison Options): Likewise.
3060 (C++ Bison Interface): Use %skeleton not %language.
3061 (Calc++ Parser): Use %skeleton not %language.
3062 * src/getargs.c (usage): Say it's experimental.
3063
e254a580
DJ
30642008-11-01 Di-an Jan <dianj@freeshell.org>
3065 Paolo Bonzini <bonzini@gnu.org>
3066
3067 Support all Java parser class modifiers.
3068 * data/java.m4 (b4_percent_define_get3): New.
3069 (b4_final_if, b4_strictfp_if): New.
3070 * data/lalr1.java (final, strictfp, extends, implements): Support.
3071 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3072 documentation.
3073 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3074 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3075 (AT_CHECK_JAVA_GREP): New.
3076 (Java parser class modifiers): New test.
3077 (Java parser class extends and implements): New test.
3078
3079 Model exception propagation better with throws and lex_throws.
3080 * data/java.m4 (b4_list2): New.
3081 (throws): Change default.
3082 * data/lalr1.java (yyaction): Add throws.
3083 (parse): Add lex_throws in addition to throws.
3084 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3085 * tests/java.at (Java throws specifications): New test.
3086
3087 Improve documentation for Java parsers.
3088 * doc/bison.texinfo (Java Parsers): Add subsections.
3089 Don't quote first argument of %define.
3090 (Java Bison Interface): Document output files. Move documentation
3091 of parser class and merge into Java Parser Interface. Document
3092 features that error out. Document directives with no effect.
3093 Move note about Javadoc higher.
3094 (Java Semantic Values): Explicitly mention stype.
3095 Document that generic types cannot be used.
3096 (Java Location Values): Use @deftypeivar. Document constructors.
3097 Correct return value for toString.
3098 (Java Parser Interface): List undocumented constants/fields.
3099 Move documentation of fields added by %parse-param closer to list
3100 of members. Document that token names are added as fields.
3101 Document constructors accurately. Remove error method.
3102 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3103 Interface. Describe %code lexer and yylex accutately.
3104 Remove documentation that does not match the code.
3105 (Java Action Features): New.
3106 (Java Differences): Add reference. Add item on semantic values.
3107 Add note about @{ ... @}. Clarify %% epilogue placement.
3108 (Java Declarations Summary): New.
3109
3110 Fix Java skeleton.
3111 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3112 (b4_remove_comma): Quote test argument.
3113 (b4_identification): Remove "bison" field.
3114 * tests/java.at (Java parser class and package names): New test.
3115 (Java %parse-param and %lex-param): New test.
3116 (Java stype, position_class and location_class): New test.
3117
f259e4e6
PB
31182008-10-31 Di-an Jan <dianj@freeshell.org>
3119
3120 * data/lalr1.jave: Update copyright years.
3121 (YYParser): Correct name of "generated from" file in Javadoc:
3122 use b4_file_name instead of @ofile@.
3123 (Location constructor): Correct Javadoc parameter name.
3124 (yylloc): Add missing opening m4 quote after b4_location_if.
3125 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3126 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3127 (YYParser constructor): Correct Javadoc parameter name.
3128
cae5057f
JD
31292008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3130
3131 Always put auxiliary code files in the same dir as other output files.
3132 * src/files.c (compute_file_name_parts): When the user specifies
3133 --output but not --file-prefix, extract the directory prefix from the
3134 file prefix not from the grammar file name. This affects the location
3135 of files like location.hh generated by the C++ skeleton. The includes
3136 in the other output files require this fix.
3137 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3138 for expected output files.
3139 (Output files): Add a test for the above.
3140
4af432ba
JD
31412008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3142
3143 * gnulib: Update submodule to HEAD.
3144
e26d4e43
JD
31452008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3146
3147 Update copyright year.
3148 * src/files.c: Here.
3149
c0ee9e21
DJ
31502008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3151
3152 Don't overwrite the input file.
3153 * src/files.c (output_file_name_check): Fatal error if using input file
3154 for output.
3155 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3156 argument.
3157 (Conflicting output files): Add test.
3158
482dc52f
AD
31592008-10-28 Akim Demaille <demaille@gostai.com>
3160
3161 Space changes.
3162 * data/lalr1.cc: Formatting changes.
3163
52cbbe84
AD
31642008-10-28 Akim Demaille <demaille@gostai.com>
3165
3166 Don't define debugging functions when !YYDEBUG.
3167 * data/lalr1.cc (debug_stream, set_debug_stream)
3168 (debug_level_type, debug_level, set_debug_level): Don't
3169 declare them when YYDEBUG is not defined.
3170 The implementation are already YYDEBUG-aware.
3171
0925d5bf
AD
31722008-10-28 Akim Demaille <demaille@gostai.com>
3173
3174 Prefer "continue" for empty loop bodies.
3175 * etc/bench.pl.in: Use "continue" instead of {}.
3176
cf98343c
AD
31772008-10-28 Akim Demaille <demaille@gostai.com>
3178
3179 Space and comments changes.
3180 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3181 * data/c.m4, data/lalr1.cc: Space changes.
3182
9f467b7d
AD
31832008-10-28 Akim Demaille <demaille@gostai.com>
3184
3185 Make gnulib a submodule.
3186 * gnulib: New.
3187 * .gitmodules (gnulib): New.
3188
0f0e1ace
JD
31892008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3190
3191 Fix yyerror_range for user-defined location type in C++. Reported by
3192 Georg Sauthoff at
3193 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3194 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3195 * THANKS (Georg Sauthoff): Add.
3196
548e2104
JD
31972008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3198
3199 Update several administrative files mainly to facilitate releasing.
3200 * HACKING (Administrivia): Make the git-merge-changelog notes more
3201 helpful.
3202 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3203 (Release Procedure): Update for git and add numerous details that were
3204 previously missing.
3205 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3206 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3207 that announcements don't claim we bootstrapped with whatever bison
3208 happened to be in PATH. Add flex as a bootstrap tool.
3209 * Makefile.maint: Remove, previously replaced by maint.mk.
3210 * Makefile.cfg: Remove, and migrate settings to...
3211 * cfg.mk: ... here for the sake of `make announcement'.
3212 * bootstrap.conf (gnulib_modules): Add announce-gen.
3213 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3214 Berry.
3215
ddf17a6e
PB
32162008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3217
3218 Small but important bugfixes for the Java skeleton.
3219 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3220 (yy_symbol_print): Call toString on yyvaluep.
3221
e1145ad8
AD
32222008-08-29 Akim Demaille <demaille@gostai.com>
3223
3224 Clarify UPDATED use.
bee1df15 3225 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 3226 not to the release date of Bison.
bee1df15 3227 Reported by Joel E. Denny.
e1145ad8 3228
0df72d78
AD
32292008-08-29 Akim Demaille <demaille@gostai.com>
3230
3231 * README: Update FAQ pointer.
3232 Reported by Joel E. Denny.
3233
9a90b6bb
EB
32342008-08-27 Eric Blake <ebb9@byu.net>
3235
3236 Resync m4sugar from autoconf.
3237 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3238 (m4_init): Adjust to latest m4.git changes.
3239 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3240 effects.
3241 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3242 (_m4_list_cmp): Reduce side effects.
3243
65015668
AD
32442008-08-27 Akim Demaille <demaille@gostai.com>
3245
3246 Check yyerrok in calc.at.
bee1df15
EB
3247 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3248 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3249 expected.
65015668 3250
98e26a92
AD
32512008-08-27 Akim Demaille <demaille@gostai.com>
3252
3253 Support yyerrok in lalr1.cc.
3254 YYBACKUP is still to import back into lalr1.cc.
bee1df15 3255 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 3256
86c0e784
JD
32572008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3258
3259 For maintainer-check*, don't recompile for a $(VERSION) update.
3260 * cfg.mk: New file.
3261 (_is-dist-target): Override the one in GNUmakefile.
3262 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3263
88511166
JD
32642008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3265
3266 Update for recent change to gnulib.
3267 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3268 string.h now.
3269
6bbb2ed5
EB
32702008-08-15 Eric Blake <ebb9@byu.net>
3271
d67c52e8
EB
3272 Remaining m4sugar merge from autoconf.
3273 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3274 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3275 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3276 * src/output.c (output_skeleton): Tell m4 how to find it.
3277
6bbb2ed5
EB
3278 Partial m4sugar merge from autoconf: m4_map.
3279 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3280 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3281 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3282 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3283 for empty list.
3284 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3285 Likewise.
3286 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3287 declares it.
3288
8dce3875
JD
32892008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3290
3291 Keep .version and PACKAGE_VERSION in sync.
3292 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3293 dependency, and add comments justifying this in more detail. Discussed
3294 starting at
3295 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3296
882a1fbf
EB
32972008-08-06 Eric Blake <ebb9@byu.net>
3298
a3764451
EB
3299 Partial m4sugar merge from autoconf: m4_shiftn.
3300 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3301 (m4_shift2, m4_shift3): New macros.
3302 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3303 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3304 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3305 * data/java.m4 (b4_remove_comma): Likewise.
3306
882a1fbf
EB
3307 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3308 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3309 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3310 (m4_init): Consolidate wrapped text into single m4_wrap.
3311 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3312 in wrapped text.
3313
a30e920d
EB
33142008-08-05 Eric Blake <ebb9@byu.net>
3315
dfcc5959
EB
3316 Partial m4sugar merge from autoconf: builtins, version.m4.
3317 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3318 (m4_prepend): Remove, as it is unused and inherently quadratic,
3319 whereas m4_append is linear in newer m4.
3320 (m4_mkstemp): New builtin.
3321 (m4_symbols): Make rename conditional.
3322 (m4_version_prereq): Ensure fatal error if used in bison, which
3323 intentionally lacks version.m4.
3324
a30e920d
EB
3325 Fix comments in m4sugar.
3326 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3327
445b7470
JD
33282008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3329
3330 Update for recent .gitignore fix in Gnulib.
3331 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3332 anchored .gitignore entries.
3333
a1e50014
JD
33342008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3335
3336 Set gnu or gnits strictness.
3337 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3338 development and gnits strictness for releases. Based on Eric Blake's
3339 suggestion at
3340 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3341
d43f77e7
PB
33422008-07-31 Paolo Bonzini <bonzini@gnu.org>
3343
3344 * NEWS: Clarify documentation of %language.
3345
fee2ed87
PB
33462008-07-31 Paolo Bonzini <bonzini@gnu.org>
3347
3348 Support usage of git-merge-changelog.
3349 * .gitattributes: New.
3350 * HACKING: Document usage of git-merge-changelog.
3351 * bootstrap: Install git-merge-changelog entries in .git/config
3352 if appropriate.
3353
78029cd5
JD
33542008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3355
3356 Remove remaining dependence on CVS Id keyword.
3357 * ChangeLog: For the sake of people still using CVS, don't use dollars
3358 when mentioning Id.
3359 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3360 unusual anyway.
3361 * data/xslt/xml2dot.xsl: Likewise.
3362 * data/xslt/xml2text.xsl: Likewise.
3363 * data/xslt/xml2xhtml.xsl: Likewise.
3364 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3365 * doc/Makefile.am (neutralize): Remove, no longer needed.
3366 (.x.1): Don't use neutralize.
3367 (edit): Don't substitute for ID.
3368 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3369
c53d18b1
JD
33702008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3371
3372 Fix dependence on computed configure variables.
3373 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3374 $(top_srcdir)/configure.ac so that changes to computed variables, such
3375 as PACKAGE_VERSION, are seen.
3376 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3377
5523ac79
JD
33782008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3379
3380 Update copyright dates for recent changes.
3381 * Makefile.am: Here.
3382 * src/Makefile.am: Here.
3383 * src/reduce.c: Here.
3384 * tests/reduce.at: Here.
3385
8fa36911
JD
33862008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3387
3388 Use git-version-gen for version names between releases.
3389 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3390 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3391 * .prev-version: New.
3392 * .version.in: Remove.
78029cd5 3393 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
3394 revision.
3395 * GNUmakefile: Remove, now copied from Gnulib.
3396 * Makefile.am: Add code suggested by comments in
3397 build-aux/git-version-gen.
3398 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3399 .prev-version, and .version.
3400 * NEWS (2.3b+): Rename to...
3401 (?.?): ... this because we're dropping the "+" version naming scheme,
3402 but, in general, we still can't be sure of our next release name.
3403 * bootstrap: Add a quick hack to remove from .gitignore the
3404 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3405 entry. This should really be fixed in gnulib instead.
3406 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3407 * configure.ac (AC_INIT): Set version name by invoking
3408 build-aux/git-version-gen.
3409 (AC_CONFIG_FILES): Remove .version, now generated by
3410 build-aux/git-version-gen.
3411 * maint.mk: New, copied from coreutils.
3412 * doc/.cvsignore (bison.1): Add.
3413 * doc/.gitignore (/bison.1): Add.
3414 * doc/bison.1: Remove, generated.
3415 * src/.cvsignore (revision.c): Remove.
3416 * src/.gitignore (/revision.c): Remove.
3417 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3418 (BUILT_SOURCES): Remove revision.c.
3419 (revision.c): Remove.
3420 * src/getargs.c (version): Don't print revision after the VERSION.
3421 * src/revision.h: Remove.
3422
bcf07cb7
JD
34232008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3424
3425 Fix untranslatable composition of sentences. Reported by Goran
3426 Uddeborg at
3427 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3428 * THANKS (Goran Uddeborg): Add.
3429 * src/reduce.c (reduce_print): Report the number of nonterminals and
3430 rules useless in the grammar in separate sentences.
3431 * tests/reduce.at (Useless Rules): Update output.
3432 (Reduced Automaton): Likewise.
3433 (Underivable Rules): Likewise.
3434 (Empty Language): Likewise.
3435
9aacab9a
JD
34362008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3437
3438 Fix some .gitignore and .cvsignore problems.
3439 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3440 (insert_vc_ignore): ... this new function, which prepends `/' to all
3441 .gitignore entries before passing them to insert_sorted_if_absent.
3442 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3443 .cvsignore files are maintained even though Bison developers run
3444 bootstrap while using Git.
3445 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3446 unneeded by Bison.
3447 (gnulib): Add.
3448 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3449 unneeded. Reported by Eric Blake.
3450 * lib/.gitignore (/*~): Add.
3451 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3452 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3453 Blake.
3454 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3455
a9fc7990
JD
34562008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3457
3458 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3459 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3460 * bootstrap.conf (gnulib_modules): Add unsetenv.
3461 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3462 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3463 (/setenv.m4): Add.
3464 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3465 the first argument because it may become position-dependent, and unset
3466 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3467 Add comments explaining these issues in more detail.
3468
0f1d6f10
JD
34692008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3470
3471 Add .gitignore everywhere based on .cvsignore.
3472 * .gitignore: New.
3473 * build-aux/.gitignore: New.
3474 * data/.gitignore: New.
3475 * doc/.gitignore: New.
3476 * etc/.gitignore: New.
3477 * examples/.gitignore: New.
3478 * examples/calc++/.gitignore: New.
3479 * lib/.gitignore: New.
3480 * m4/.gitignore: New.
3481 * po/.gitignore: New.
3482 * runtime-po/.gitignore: New.
3483 * src/.gitignore: New.
3484 * tests/.gitignore: New.
3485
7bd1665a
JD
34862008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3487
3488 * NEWS (2.3b+): New section, empty for now.
3489 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3490
72c5b982
JD
34912008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3492
3493 * NEWS (2.3b): Update release date since there has been a delay in
3494 getting the announcements and tarballs out.
3495
bd02cd5d
JD
34962008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3497
3498 * NEWS: Version 2.3b.
3499 * configure.ac (AC_INIT): Likewise.
3500 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3501
9126263e
JD
35022008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3503
3504 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3505 been doing it for years.
3506 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3507 (Release Procedure): Add FIXME about make alpha being unmaintained.
3508
fa6aa7b3
JD
35092008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3510
3511 * data/yacc.c: Reformat m4 a little for readability.
3512 * src/lalr.c (build_relations): Correct comment.
3513
d30b312d
JMG
35142008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3515
3516 DJGPP specific issue.
3517 * djgpp/config.sed: Fixes required to run configure scripts generated
3518 by autoconf 2.62.
3519
138d4cd9
JD
35202008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3521
3522 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3523 coordinator@translationproject.org.
3524
8f7e2e1f
JD
35252008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3526
3527 * THANKS: Add Eric Blake.
3528
f55efa38
JD
35292008-04-23 Eric Blake <ebb9@byu.net>
3530
3531 Revert prior patch, by working around autoconf regression.
3532 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3533 ("Output file name: ("): Uncomment test.
3534 ("Output file name: )"): Likewise.
3535 Based on an idea from Noah Misch.
3536
096c9f9d
JD
35372008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3538
3539 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3540 2.61. Reported by Juan Manuel Guerrero at
3541 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3542 * tests/output.at ("Output file name: ("): Comment out test case for
3543 now.
3544 ("Output file name: )"): Likewise.
3545
0f664b89
JD
35462008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3547
3548 * GNUmakefile: Update git-version-gen invocation so make dist
3549 succeeds.
3550
1cfe6375
JD
35512008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3552
3553 Update to the current gnulib CVS repository, and fix trigraph handling
3554 in Bison.
3555 * bootstrap: Update gnulib CVS repository URL.
3556 (symlink_to_dir): Encapsulate the code that guarantees the destination
3557 directory exists into...
3558 (check_dst_dir): ... this new function, and...
3559 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3560 fail when copying files into lib/uniwidth/.
3561 * src/output.c (prepare_symbols): When writing yytname muscles, where
3562 symbol names will be encoded in C-string literals, tell quotearg to
3563 escape trigraphs. This used to be the default in gnulib.
3564 * tests/regression.at (Token definitions): Because of the change in
3565 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3566 escapes trigraphs in symbol names. Thus, yytname no longer has
3567 trigraphs unnecessarily doubly escaped. Update test case output.
3568 Extend test case to be sure Bison's own error messages will no longer
3569 have trigraphs in symbol names unnecessarily escaped once.
3570
74c52fc8
JD
35712008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3572
3573 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3574 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3575 * .cvsignore: Add .version.
3576 * .version.in: New.
3577 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3578 * configure.ac (AC_CONFIG_FILES): Add .version.
3579 * build-aux/.cvsignore: Add git-version-gen.
3580
8e55b3aa
JD
35812008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3582
3583 * NEWS (2.3a+): Mention that -g now takes an argument.
3584 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3585 consistency. Update the -g and -x entries now that they take
3586 arguments. Use brackets to indicate optional arguments.
3587 * src/getargs.c (usage): Explain the relationship between arguments of
3588 long and short options more completely. Document --defines and -d
3589 separately since the former takes an argument but, for POSIX Yacc, the
3590 latter does not.
3591 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 3592 (getargs): Sort cases.
8e55b3aa 3593
59c5ac72
AD
35942008-02-28 Akim Demaille <demaille@gostai.com>
3595
3596 * doc/bison.texinfo: Fix a few typos.
3597
118d4978
AD
35982008-02-28 Akim Demaille <akim@epita.fr>
3599
3600 * doc/bison.texinfo (Bison Options): Document -W.
3601 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3602
7020f1e9
AD
36032008-02-28 Akim Demaille <akim@epita.fr>
3604
3605 * src/getargs.c (short_options): Split and sort for readability.
3606 -g and -x take optional arguments, just like their long options.
3607 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3608 understand.
3609 Fix the handling of $opt which resulted in all the argument to be
3610 considered as optional.
3611
59da312b
JD
36122008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3613
3614 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3615 say its interface is experimental.
3616 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3617 Java.
3618 (Bison Options): In the -L and --language entry, mention Java.
3619 (Java Bison Interface): Say the interface is experimental.
3620 * src/getargs.c (usage): Mention -L and --language.
3621
3622 * NEWS (2.3a+): Say the push parsing interface is experimental.
3623 * doc/bison.texinfo (Push Decl): Likewise.
3624 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3625 (Push Parser Function): Likewise.
3626 (Pull Parser Function): Likewise.
3627 (Parser Create Function): Likewise.
3628 (Parser Delete Function): Likewise.
3629 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3630 yypull_parse, and yypush_parse entries.
3631
3632 * NEWS (2.3a+): Mention XML support, and say the schema is
3633 experimental.
3634 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3635 * src/getargs.c (usage): Say the XML schema is experimental.
3636
3637 * NEWS (2.3a+): Say option instead of flag.
3638
2bb3ebec
WP
36392008-02-21 Wojciech Polak <polak@gnu.org>
3640
3641 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3642 text.
3643
333e670c
JD
36442008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3645
3646 Fix impure push parser compile error reported by Bob Rossi at
3647 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3648 * data/yacc.c: Clean up whitespace in the output a little.
3649 (yypstate_allocated): Define for impure push parsers regardless of
3650 whether the pull interface is also requested.
3651 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3652 check impure push parsers without the pull interface.
3653
3654 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3655 yyerror takes arguments specified by %parse-param while yypstate_new
3656 does not.
3657 * doc/bison.texinfo (Parser Create Function): Document that
3658 yypstate_new returns 0 for multiple impure parser instances.
3659 * tests/push.at (Push Parsing: Multiple impure instances): Update
3660 expected stderr output.
3661
798096e1
JD
36622008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3663
3664 * runtime-po/POTFILES.in (push.c): Remove.
3665
9ca7f077
JD
36662008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3667
3668 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3669 * data/push.c: Rename to...
3670 * data/yacc.c: ... this, overwriting it.
3671 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3672 `%push-pull-parser' -> `%define api.push_pull "both"'.
3673 Remove old yacc.c tests, and update push.c tests to yacc.c.
3674
42ee26bb
JD
36752008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3676
3677 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3678 `"%code top" blocks' instead of `%code "top" blocks'.
3679 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3680 Clean up whitespace in the output a little.
3681
b1cc23c4
JD
36822008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3683
3684 Fix documentation problems reported by Tim Josling at
3685 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3686 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3687 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3688 integers. Explain the effect of literal string aliases on error
3689 messages. Copy token 0 documentation from the C++ skeleton
3690 documentation.
3691
ab7f29f8
JD
36922008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3693
3694 Accept a token number in a %left, %right, or %nonassoc for POSIX
3695 conformance. Reported by Tim Josling at
3696 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3697 * NEWS (2.3a+): Mention.
3698 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3699 and code numbers are treated by precedence declarations.
3700 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3701 of symbols.1.
3702 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3703 of symbol.
3704 (symbol.prec): New, just like symbol but allows INT.
3705 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3706 longer holds.
3707 * tests/regression.at (Token number in precedence declaration): New
3708 test case.
3709
a924ef36
JMG
37102008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3711
3712 DJGPP specific issues.
3713 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3714 be changed. Copyright timestamp adjusted.
3715 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3716 be changed. Copyright timestamp adjusted.
3717 * djgpp/config.site: Copyright timestamp adjusted.
3718 * djgpp/config_h.sed: Copyright timestamp adjusted.
3719 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3720 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3721 filename translation list.
3722 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3723 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3724 files shall be created. Before trying to use the temp dir where the
3725 environment variable points to check that the dir really exists. If
3726 not default to the cwd as temp dir. Copyright timestamp adjusted.
3727 * djgpp/subpipe.h: Copyright timestamp adjusted.
3728 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3729
389c8cfd
PE
37302008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3731
3732 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3733
5d1cfef4
PE
37342008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3735
3736 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3737 Problem reported by Claudio Saavedra in
3738 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3739
e2dcf996
WP
37402008-01-05 Wojciech Polak <polak@gnu.org>
3741
3742 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3743 document's title with the input grammar file name.
3744
da730230
JD
37452007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3746
3747 Automate regression testing of the XML/XSLT implementation. Discussed
3748 starting at
3749 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3750 * configure.ac (XSLTPROC): New substitution.
3751 * Makefile.am (maintainer-xml-check): New phony target invoking...
3752 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3753 invoking make maintainer-check with BISON_TEST_XML=1.
3754 * tests/atlocal.in (XSLTPROC): New.
3755 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3756 not to report reachable memory when Bison is expected to have a
3757 non-zero exit status and (2) to compare XML/XSLT output with --graph
3758 and --report=all output for every working grammar when
3759 BISON_TEST_XML=1.
3760 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3761 (AT_BISON_CHECK_XML): New.
3762 (AT_QUELL_VALGRIND): New.
3763 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3764 (AT_CHECK): ... don't redefine this since this was the old way to
3765 quell Valgrind.
3766 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3767 AT_BISON_CHECK invocations.
3768 * tests/c++.at: Likewise.
3769 * tests/calc.at: Likewise.
3770 * tests/conflicts.at: Likewise.
3771 * tests/cxx-type.at: Likewise.
3772 * tests/existing.at: Likewise.
3773 * tests/glr-regression.at: Likewise.
3774 * tests/headers.at: Likewise.
3775 * tests/input.at: Likewise.
3776 * tests/java.at: Likewise.
3777 * tests/output.at: Likewise.
3778 * tests/push.at: Likewise.
3779 * tests/reduce.at: Likewise.
3780 * tests/regression.at: Likewise.
3781 * tests/sets.at: Likewise.
3782 * tests/skeletons.at: Likewise.
3783 * tests/synclines.at: Likewise.
3784 * tests/torture.at: Likewise.
3785 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3786 tends to hang xsltproc.
3787 (Big horizontal): Likewise.
3788
408476bc
JD
37892007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3790
3791 In XML output, remove redundant class attribute on symbol element.
3792 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3793 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3794 look up a symbol to determine whether it's a nonterminal or terminal.
3795 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3796 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3797
3798 Add prec/assoc information to XML output.
3799 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3800 %prec, add a percent_prec attribute.
3801 * src/print-xml.c (print_grammar): For each terminal that has a
3802 precedence or associativity, add a prec or assoc attribute.
3803 (xml_indent): New.
3804 (xml_puts): Use xml_indent.
3805 (xml_printf): Use xml_indent.
3806 * src/print-xml.h (xml_indent): Prototype.
3807
3808 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3809 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3810
d4a26c48
JD
38112007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3812
3813 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3814 (bison:ruleByNumber): ... this for clarity.
3815 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3816 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3817 (xsl:template match="reduction"): Update.
3818 (xsl:template match="item"): Update.
3819 (xsl:template match="reduction"): Update.
3820
3821 In the XML output, don't print the list of rules where symbols appear.
3822 Compute it in XSLT instead. Discussed at
3823 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3824 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3825 (bison:ruleByRhs): New.
3826 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3827 bison:ruleByRhs.
3828 (xsl:template match="terminal/rule"): Remove.
3829 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3830 bison:ruleByRhs.
3831 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3832 Remove.
3833 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3834 bison:ruleByRhs and mode="number-link" for rule template.
3835 (xsl:template match="terminal/rule"): Remove.
3836 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3837 bison:ruleByRhs and mode="number-link" for rule template.
3838 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3839 Rewrite as...
3840 (xsl:template match="rule" mode="number-link"): ... this.
3841 * src/print-xml.c (print_grammar): Don't print the list of rules.
3842
ef1b4273
JD
38432007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3844
3845 Don't let --report affect XML output; always print all information.
3846 Discussed at
3847 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3848 * src/conflicts.c (log_resolution): Implement.
3849 * src/print-xml.c (print_core): Implement.
3850 (print_state): Implement.
3851 (print_xml): Implement.
3852
3853 * NEWS (2.3a+): Fix quotes.
3854 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3855 don't let %verbose clear the list specified by --report.
3856
0f6cd9e3
AD
38572007-11-26 Akim Demaille <akim@epita.fr>
3858
3859 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3860
d80fb37a
JD
38612007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3862
3863 In the XML output, list useless and unused symbols and rules with the
3864 useful ones and add a "usefulness" attribute. Discussed starting at
3865 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3866 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3867 (grammar_rules_print_xml): Print all rules instead of just those
3868 useful in the grammar, and add a "usefulness" attribute.
3869 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3870 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3871 (print_grammar): Print all nonterminals instead of just useful ones,
3872 and add a "usefulness" attribute to nonterminals and terminals.
3873 (print_xml): Don't print a separate "reductions" or
3874 "rules-useless-in-parser" element.
3875 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3876 (reduce_xml): Remove.
3877 (reduce_token_unused_in_grammar): New.
3878 (reduce_nonterminal_useless_in_grammar): New.
3879 * src/reduce.h (reduce_xml): Remove prototype.
3880 (reduce_token_unused_in_grammar): Add prototype.
3881 (reduce_nonterminal_useless_in_grammar): Add prototype.
3882 * data/xslt/xml2text.xsl: Update for XML changes.
3883 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3884 * tests/reduce.at (Useless Terminals): Update output.
3885 (Useless Rules): Update output.
3886 (Reduced Automaton): Update output.
3887
3888 Say "Terminals unused in grammar" instead of "Unused terminals".
3889 * NEWS (2.3a+): Update.
3890 * doc/bison.texinfo (Understanding): Update example output.
3891 * src/reduce.c (reduce_output): Implement.
3892 * data/xslt/xml2text.xsl: Implement.
3893 * data/xslt/xml2xhtml.xsl: Implement.
3894
1bb2bd75
JD
38952007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3896
3897 Accept --report-file=FILE to override the default `.output' filename.
3898 * NEWS (2.3a+): Mention.
3899 * doc/bison.texinfo (Bison Options): Add an entry.
3900 * src/files.c (compute_output_file_names): Don't override
3901 spec_verbose_file if already set.
3902 * src/getargs.c (usage): Document --report-file.
3903 (REPORT_FILE_OPTION): New anonymous enum member.
3904 (long_options): Add entry for it.
3905 (getargs): Add case for it setting spec_verbose_file.
3906
3907 * build-aux/cross-options.pl: Don't record a short option just because
3908 there's an arg.
3909 * doc/.cvsignore: Add yacc.1.
3910
a005a9c4
AD
39112007-11-14 Akim Demaille <akim@epita.fr>
3912
3913 * doc/yacc.1.in: New.
3914 * configure.ac, doc/Makefile.am: Adjust.
3915 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3916 config.h symbol.
3917 Use AC_SUBST for assignments too.
3918 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3919
cff03fb2
JD
39202007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3921
3922 * src/gram.c: Remove comments that duplicate comments in gram.h.
3923
3924 When reporting useless rules and nonterminals, say "useless in grammar"
3925 instead of "useless", and say "useless in parser" instead of "never
3926 reduced". Discussed starting at
3927 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3928 * NEWS (2.3a+): Mention this change.
3929 * data/xslt/xml2text.xsl: Update output text and expected input XML
3930 element names to match changes below.
3931 * data/xslt/xml2xhtml.xsl: Likewise.
3932 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3933 Contents: "Rules useless in parser due to conflicts".
3934 * doc/bison.texinfo (Decl Summary): Reword a little.
3935 (Understanding): Update example output for changes below.
3936 * src/gram.c: (rule_useful_p): Rename to...
3937 (rule_useful_in_grammar_p): ... this.
3938 (rule_useless_p): Rename to...
3939 (rule_useless_in_grammar_p): ... this.
3940 (rule_never_reduced_p): Rename to...
3941 (rule_useless_in_parser_p): ... this.
3942 (grammar_rules_print): Update for renames.
3943 (grammar_rules_print_xml): Update for renames.
3944 (grammar_rules_never_reduced_report): Rename to...
3945 (grammar_rules_useless_report): ... this since it is used for either
3946 kind of useless rule.
3947 * src/gram.h: Reword comments and update function names in prototypes.
3948 * src/main.c (main): Say "rule useless in parser due to conflicts".
3949 * src/print-xml.c (print_rules_never_reduced): Rename to...
3950 (print_rules_useless_in_parser): ... this, and rename output XML
3951 element "rules-never-reduced" to "rules-useless-in-parser".
3952 (print_xml): Update for rename.
3953 * src/print.c (print_results): Say "Rules useless in parser due to
3954 conflicts".
3955 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3956 (nonterminals_reduce): Say "nonterminal useless in grammar".
3957 (reduce_output): Say "Nonterminals useless in grammar".
3958 Say "Rules useless in grammar".
3959 (reduce_xml): Rename output XML element "useless" to
3960 "useless-in-grammar".
3961 (reduce_print): Don't report the count of grammatically useless rules
3962 as "rules never reduced" just because %yacc is specified.
3963 In the correct report of this count, say nonterminal(s) and rule(s)
3964 "useless in grammar".
3965 * tests/conflicts.at (S/R in initial): Update expected output.
3966 (Defaulted Conflicted Reduction): Likewise.
3967 (Unreachable States After Conflict Resolution): Likewise.
3968 * tests/existing.at (GNU pic Grammar): Likewise.
3969 * tests/reduce.at (Useless Nonterminals): Likewise.
3970 (Useless Rules): Likewise.
3971 (Reduced Automaton): Likewise.
3972 (Underivable Rules): Likewise.
3973 (Empty Language): Likewise.
3974
66f0441d
JD
39752007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3976
3977 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3978 here document and before the EOF so that BSD's implementation of Bourne
3979 shell doesn't parse the delimiter as part of the here document.
3980 * doc/.cvsignore: Add cross-options.texi.
3981 * src/getargs.c (usage): Add a blank line after the warning categories.
3982
d0ee4105
PB
39832007-11-08 Paolo Bonzini <bonzini@gnu.org>
3984
3985 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3986
e8b1fb9b
AD
39872007-11-05 Akim Demaille <akim@epita.fr>
3988
3989 Remove Id: from bison.1.
3990 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3991 (perl -0777 -pi -e 's/\.PP\nId): New.
3992 (.x.1): Use it to ignore the version control revision.
3993
2f7a96b5
AD
39942007-11-05 Akim Demaille <demaille@gostai.com>
3995
3996 * build-aux/Makefile.am: Ship cross-options.pl.
3997 * doc/Makefile.am: Always refer to cross-options.texi with
3998 $(srcdir).
3999 (MAINTAINERCLEANFILES): Add it.
4000
f4101aa6
AD
40012007-11-04 Akim Demaille <demaille@gostai.com>
4002
4003 Generate the long/short option cross-table.
4004 * build-aux/cross-options.pl: New.
4005 * doc/Makefile.am (cross-options.texi): New.
4006 * doc/bison.texinfo: Use it.
4007
727a1401
AD
40082007-11-04 Akim Demaille <demaille@gostai.com>
4009
4010 Generate bison.1 using help2man.
4011 * doc/common.x, doc/bison.x: New.
4012 * doc/Makefile.am (bison.1, .x.1): New.
4013 The code is taken from autoconf-2.61/man/Makefile.am.
4014 * configure.ac: Look for help2man.
4015
6aeb9c57
AD
40162007-11-04 Akim Demaille <demaille@gostai.com>
4017
4018 Complete --help.
4019 * src/getargs.c (usage): Document -W, make it clear that -d,
4020 -g and -x have optional arguments.
4021
d7be4085
AD
40222007-11-04 Akim Demaille <demaille@gostai.com>
4023
4024 Find sha1sum when named gsha1sum.
4025 * bootstrap (find_tool): New.
4026 ($SHA1SUM): New.
4027
d9df47b6
JD
40282007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4029
4030 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4031 at
4032 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4033 * NEWS (2.3a+): Mention.
4034 * data/bison.m4 (b4_pure_if): Don't define it here.
4035 * data/c.m4 (b4_identification): Depend on individual skeletons to
4036 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4037 values of the %define variables api.pure or api.push_pull. Define
4038 YYPURE, YYPUSH, and YYPULL accordingly.
4039 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4040 glr.cc has already defined b4_pure_flag.
4041 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4042 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 4043 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
4044 * doc/bison.texinfo (Pure Decl): Update.
4045 (Push Decl): Update.
4046 (Decl Summary): Add api.pure to %define entry.
4047 In %pure-parser entry, say it's deprecated and reference %define.
4048 (Pure Calling): Update.
4049 (Error Reporting): Update.
4050 (C++ Scanner Interface): Update.
4051 (How Can I Reset the Parser): Update.
4052 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4053 reference %define.
4054 * src/getargs.c (pure_parser): Remove global variable.
4055 * src/getargs.h (pure_parser): Remove extern.
4056 * src/output.c (prepare): Don't define pure_flag muscle.
4057 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4058 wrapper around `%define api.pure'.
4059 * tests/calc.at (Simple LALR Calculator): Update.
4060 (Simple GLR Calculator): Update.
4061 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4062 Update.
4063 (GLR: Resolve ambiguity, pure, locations): Update.
4064 (GLR: Merge conflicting parses, pure, no locations): Update.
4065 (GLR: Merge conflicting parses, pure, locations): Update.
4066 * tests/glr-regression.at (Uninitialized location when reporting
4067 ambiguity): Update
4068 * tests/input.at (Unused %define api.pure): New test case.
4069 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4070 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4071 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4072
c373bf8b
JD
40732007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4074
4075 %define push_pull -> %define api.push_pull. Discussed starting at
4076 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4077 * data/push.c: Expect the new name.
4078 * data/yacc.c: Likewise.
4079 * doc/bison.texinfo (Push Decl): Update.
4080 (Decl Summary): Update %define entry.
4081 (Push Parser Function): Update.
4082 (Pull Parser Function): Update.
4083 (Parser Create Function): Update.
4084 (Parser Delete Function): Update.
4085 * tests/calc.at (Simple LALR Calculator): Update.
4086 * tests/input.at (%define enum variables): Update.
4087 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4088 (Push Parsing: Multiple impure instances): Update.
4089 (Push Parsing: Unsupported Skeletons): Update.
4090 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4091 (Exploding the Stack Size with Malloc): Update.
4092
4093 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4094 other entries some.
4095
32f19b6b
JD
40962007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4097
4098 For the XML output's terminal element, rename @number to @token-number,
4099 and add @symbol-number. In the nonterminal element, rename @number to
4100 @symbol-number. Discussed starting at
4101 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4102 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4103 renames.
4104 (xsl:template match="nonterminal"): Likewise.
4105 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4106 (xsl:template match="nonterminal"): Likewise.
4107 * src/print-xml.c (print_grammar): Implement.
4108
255a6b90
JD
41092007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4110
4111 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4112 2007-10-11 change, the child elements here are items not rules.
408476bc 4113 (xsl:template match="item"): New.
255a6b90
JD
4114 (xsl:template match="rule"): Update for new reduced itemset.
4115 (xsl:template match="point"): Remove.
4116 (xsl:template match="empty"): For consistency with --graph, don't
4117 output "/* empty */".
4118 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4119 line-wrap, don't pass a negative value as first-line-length since this
4120 won't work with the following changes.
4121 (xsl:template name="line-wrap"): Simplify slightly.
4122 (xsl:template name="ws-search"): Eliminate recursion.
4123 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4124 set next to an item whose dot is not at the end of the RHS even if it
4125 happens to be associated with the same rule.
4126
88c78747
JD
41272007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4128
31984206
JD
4129 Add %define lr.keep_unreachable_states.
4130 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4131 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4132 * src/main.c (main): Implement it.
4133 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4134 Extend to test it, and fix a typo.
4135
41362007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4137
4138 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
4139 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4140 the example .output text.
4141 * tests/regression.at (Extra lookahead sets in report): Improve wording
4142 of comments.
4143
b7a70162
WP
41442007-10-17 Wojciech Polak <polak@gnu.org>
4145
4146 * src/print-xml.c (print_grammar): Renamed
4147 <terminal> and <nonterminal> attributes:
4148 "type" to "number" and "symbol" to "name".
4149 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4150 Use new attribute names.
4151 (xsl:template match="nonterminal"): Likewise.
4152 * data/xslt/xml2xhtml.xsl: Likewise.
4153
a0de5091
JD
41542007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4155
4156 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4157 (Option Cross Key): Likewise.
4158
4159 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4160 next to an item whose dot is not at the end of the RHS even if it
4161 happens to be associated with the same rule.
4162 * src/print.c (print_core): Likewise.
4163 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4164 (Resolved SR Conflicts): Update output.
4165 * tests/regression.at (Extra lookahead sets in report): New test case.
4166
4c20d18d
WP
41672007-10-11 Wojciech Polak <polak@gnu.org>
4168
4169 * src/print-xml.c (print_core): Remove item set
4170 redundancy.
4171 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4172 Improve processing time. Suggested by Joel E. Denny.
4173 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4174 Write xsl:param "required" attribute as comment.
4175 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4176 (xsl:template match="rule"): Support new reduced itemset.
4177 (xsl:template match="point"): Remove.
4178 * data/xslt/xml2xhtml.xsl: Likewise.
4179
f506ad1c
JD
41802007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4181
4182 * src/getargs.c (version): Update copyright year.
4183
21f1b063
JD
41842007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4185
4186 Make xml2dot.xsl and --graph produce the same output.
4187 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4188 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4189 escaped later.
4190 (xsl:template name="output-node"): Use the new escape template instead
4191 of the string-replace template directly.
4192 (xsl:template name="output-edge"): Likewise.
4193 (xsl:template name="escape"): New, escapes backslashes and newlines in
4194 addition to quotation marks.
4195 * src/graphviz.c (start_graph, output_node, output_edge): Add
4196 whitespace to output for legibility.
4197
4198 Make xml2text.xsl and --report produce the same output, and remove the
4199 XML "conflicts" element since a conflict summary is easily extracted
4200 from the automaton.
4201 * data/xslt/bison.xsl: New.
4202 (xsl:template match="state" mode="bison:count-conflicts): New.
4203 * data/xslt/xml2text.xsl: Import bison.xsl.
4204 (xsl:template match="bison-xml-report"): Instead of styling the
4205 "conflicts" element, style the "automaton" element with mode
4206 "conflicts". Unlike the former, the latter lists S/R and R/R
4207 conflicts for a state on the same line.
4208 (xsl:template match="conflicts"): Remove.
4209 (xsl:template match="conflict"): Remove.
4210 (xsl:template match="terminal"): Line-wrap the list of rules in which
4211 the terminal is used.
4212 (xsl:template match="nonterminal"): Likewise for nonterminals.
4213 (xsl:template match="automaton" mode="conflicts"): New.
4214 (xsl:template match="state" mode="conflicts"): New.
4215 (xsl:template name="line-wrap"): New.
4216 (xsl:template name="ws-search"): New.
4217 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4218 (xsl:template match="bison-xml-report"): Instead of styling the
4219 "conflicts" element, style the "automaton" element with mode
4220 "conflicts."
4221 (xsl:template match="conflicts"): Remove.
4222 (xsl:template match="conflict"): Remove.
4223 (xsl:template match="automaton" mode="conflicts"): New.
4224 (xsl:template match="state" mode="conflicts): New.
4225 * src/conflicts.c (conflicts_output_xml): Remove.
4226 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4227 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4228 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4229 the corresponding XSLT is easier. Also, never wrap between a word and
4230 the comma that follows it.
4231
793fbca5
JD
42322007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4233
4234 Improve C++ namespace support. Discussed starting at
4235 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4236 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4237 b4_namespace_close): New macros that interpret the %define variable
4238 "namespace" so its value can contain "::" to indicate nested
4239 namespaces.
4240 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4241 the above macros.
4242 * data/lalr1.cc (b4_namespace): Likewise.
4243 * data/location.cc (b4_namespace): Likewise.
4244 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4245 inside a new table in the general %define entry. Document `%define
4246 namespace' there as well. Point the %name-prefix entry to it since it
4247 explains it more completely in the case of C++.
4248 (C++ Bison Interface): Mention `%define namespace' instead of
4249 %name-prefix.
4250 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4251 entry suffices.
4252 * tests/c++.at (Relative namespace references): New test case.
4253 (Absolute namespace references): New test case.
4254 (Syntactically invalid namespace references): New test case.
4255 * tests/input.at (C++ namespace reference errors): New test case.
4256
35b8730d
JD
42572007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4258
4259 Add syncline support and location accessor to internal %define
4260 interfaces.
4261 * data/bison.m4 (b4_percent_define_get_loc): New.
4262 (b4_percent_define_get_syncline): New.
4263 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4264 (b4_percent_define_default): Record defining location as line 1 rather
4265 than 0 for the sake of synchronizing #line's, and define
4266 b4_percent_define_syncline(VARIABLE).
4267 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4268 * src/muscle_tab.c (muscle_syncline_grow): New.
4269 (muscle_code_grow): Use muscle_syncline_grow.
4270 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4271 define b4_percent_define_syncline(VARIABLE).
4272 (muscle_percent_define_get_loc): New.
4273 (muscle_percent_define_get_syncline): New.
4274 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4275 remove some unused variables.
4276 (muscle_percent_define_default): Record defining location as line 1
4277 rather than 0 for the sake of synchronizing #line's, and define
4278 b4_percent_define_syncline(VARIABLE).
4279 (muscle_percent_define_check_values): Use
4280 muscle_percent_define_get_loc.
4281 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4282 (muscle_percent_define_get_syncline): Prototype.
4283 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4284 defaults): Update output for location change.
4285 (Complaining during macro argument expansion): Extend to test
4286 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4287
7dc4a694
JD
42882007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4289
4290 Fix some error-reporting macro bugs.
4291 * data/bison.m4 (b4_cat): New.
4292 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4293 to stdout so they don't become arguments to other macros. Update
4294 comments and add examples.
4295 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4296 add examples.
4297 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4298 after printing the error directive so that M4 doesn't report subsequent
4299 problems that are induced by this problem.
4300 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4301 instead of just in them. Recognize @\n in both places. Both expand to
4302 the empty string. Needed by b4_cat.
4303 * tests/skeletons.at (Complaining during macro argument expansion):
4304 New test case.
4305 (Fatal errors make M4 exit immediately): New test case.
4306
d4bd2295
JD
43072007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4308
4309 Implement --print-datadir.
4310 * src/getargs.c (usage): Mention.
4311 (PRINT_DATADIR_OPTION): New anonymous enum member.
4312 (long_options): Add entry for it.
4313 (getargs): Add case for it calling compute_pkgdatadir.
4314 * src/output.c (output_skeleton): Encapsulate data directory
4315 computation from here...
4316 (prepare): ... and from here...
4317 (compute_pkgdatadir): ... into this new function.
4318 * src/output.h (compute_pkgdatadir): Prototype.
4319
34cdeddf
JD
43202007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4321
4322 * src/print-xml.c (escape_bufs): New static global variable
4323 replacing...
4324 (xml_escape_n): ... the static local variable buf here.
4325 (print_xml): Free memory for escape_bufs.
4326 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4327
d782395d
JD
43282007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4329
4330 Replace `%push-parser' and `%push-pull-parser' with
4331 `%define push_pull "push"' and `%define push_pull "both"'.
4332 `%define push_pull "pull"' is the default.
4333 * doc/bison.texinfo (Push Decl, Push Parser Function,
4334 Pull Parser Function, Parser Create Function, Parser Delete Function):
4335 Update declarations.
4336 (Decl Summary, Table of Symbols): Replace %push-parser and
4337 %push-pull-parser entries with a %define push_pull entry.
4338 * data/bison.m4 (b4_percent_define_check_values): New macro.
4339 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4340 definitions...
4341 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4342 definitions...
4343 * data/push.c: ... to here and compute them from the value of the
4344 %define variable push_pull.
4345 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4346 parsing requests here...
4347 * data/yacc.c: ... hack this to switch to push.c any time
4348 b4_use_push_pull_flag or the %define variable push_pull is set. This
4349 will go away when we mv push.c yacc.c.
4350 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4351 push parsing is not supported since unused %define variables are
4352 reported anyway.
4353 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4354 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4355 comments for consistency with b4_percent_define_check_values.
4356 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4357 muscles.
4358 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4359 Remove.
4360 (prologue_declaration): Remove %push-parser and %push-pull-parser
4361 rules.
4362 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4363 * tests/calc.at: Update declarations.
4364 * tests/input.at (%define enum variables): New test case.
4365 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4366 declaration.
4367 (Push Parsing: Multiple impure instances): Update declaration.
4368 (Push Parsing: Unsupported Skeletons): New test case.
4369 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4370 declaration.
4371 (Exploding the Stack Size with Malloc): Update declaration.
4372
3f999f78
WP
43732007-09-24 Wojciech Polak <polak@gnu.org>
4374
4375 Add XSLT transformations.
4376
4377 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4378 * data/xslt/xml2text.xsl: Transform XML into plain text.
4379 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4380 * data/Makefile.am (xsltdir): New variable.
4381 (dist_xslt_DATA): Add xslt/*.xsl files.
4382
a4f75309
PE
43832007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4384
4385 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4386 Problem reported by Wojciech Polak.
4387 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4388 (xml_printf): Undo change I made on 21 September; that is,
4389 indent 2 spaces, not 1.
4390
ad5feac4
JD
43912007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4392
4393 Pacify ./configure --enable-gcc-warnings.
4394 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4395 `char const *' instead of `char *'.
4396 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4397 local variable `sep'.
4398
41d7a5f2
PE
43992007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4400
4401 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4402 elsewhere.
4403 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4404 (xml_printf): Indent just 1 space for level.
4405 (e_char, xlate_char): Remove.
4406 (xml_escape_string): Rewrite to avoid undefined behavior (used
4407 storage that was freed from the stack).
4408 (xml_escape_n): Don't bother checking for subscript error.
4409
3f999f78
WP
44102007-09-21 Wojciech Polak <polak@gnu.org>
4411
4412 Add Bison XML Automaton Report.
41d7a5f2
PE
4413
4414 Add support for an -x option to generate an XML report.
4415 It is not documented yet.
4416 * src/print-xml.c: New file.
4417 * src/print-xml.h: Likewise.
4418 * lib/timevar.def (TV_XML): New var.
4419 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4420 * src/conflicts.c: Include print-xml.h.
4421 (solved_conflicts_xml_obstack): New var.
4422 (log_resolution, conflicts_solve, conflicts_free):
4423 Add support for XML report.
4424 (conflicts_output_val): New function.
4425 * src/conflicts.h (conflicts_output_val): New decl.
4426 * src/files.c (spec_xml_file): New var.
4427 (compute_output_file_names, output_file_names_free): Add XML support.
4428 * src/files.h (spec_xml_file): New decl.
4429 * src/getargs.c (xml_flag): New var.
4430 (usage, short_options, long_options, getargs): Add XML support.
4431 * src/getargs.h (xml_flag): New decl.
4432 * src/gram.c: Include print-xml.h.
4433 (rule_lhs_print_xml, rule_rhs_print_xml):
4434 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4435 New functions.
4436 * src/gram.h: Declare external ones.
4437 * src/main.c: Include print-xml.h.
4438 (main): Add XML support.
4439 * src/reduce.c: Include print-xml.h.
4440 (reduce_xml): New function.
4441 * src/reduce.h: Declare it.
4442 * src/state.c: Include print-xml.h.
4443 (state_new): Add XML support.
4444 (state_rule_lookahead_tokens_print_xml): New function.
4445 * src/state.h: Declare it.
4446 (struct state): New member solved_conflicts_xml.
4447 * src/symtab.c (symbol_class_get_string): New function.
4448 * src/symtab.h: Declare it.
4449
6d8e724d
PE
44502007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4451
4452 * GNUmakefile: Switch to coreutils's version.
4453 * bootstrap: Likewise.
4454 * Makefile.cfg: Adjust to new GNUmakefile.
4455 * README-hacking: Likewise.
4456
4457 Import from gnulib:
4458
4459 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4460 Bruno Haible <bruno@clisp.org>
4461
4462 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4463 and is a script that invokes bison. Tighten the code. Add comments.
4464
922bdd7f
JD
44652007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4466
4467 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4468 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4469 * doc/bison.texinfo (Decl Summary): Fix.
4470 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4471 * tests/input.at (Boolean %define variables): Update output.
4472 * tests/skeletons.at (%define boolean variables: invalid skeleton
4473 defaults): Rename to...
4474 (%define Boolean variables: invalid skeleton defaults): ... this and
4475 update output.
4476
1b17b01d
JD
44772007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4478
4479 In impure push mode, don't allow more than one yypstate to be allocated
4480 since multiple impure parsers would corrupt yynerrs.
4481 * data/push.c (yypstate_allocated): New static global variable
4482 initialized to 0.
4483 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4484 exhaustion if yypstate_allocated is 1, but still return 2.
4485 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4486 already 1. Otherwise, set it to 1.
4487 (yypstate_delete): Set it to 0.
4488 * tests/push.at (Push Parsing: Multiple impure instances): New test
4489 case.
4490
9987d1b3
JD
44912007-08-17 Bob Rossi <bob@brasko.net>
4492
4493 * doc/bison.texinfo (Push Decl): Document the push parser.
4494 (Table of Symbols): Ditto.
4495 (Pure Decl): Ditto.
4496 (Decl Summary): Ditto.
4497 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4498 Parser Create Function, Parser Delete Function):
4499 Add new push parser symbols.
4500 (Table of Symbols): Document push-parser, push-pull-parser,
4501 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4502
f16b0819
PE
45032007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4504
4505 Update to GPLv3.
4506 * doc/gpl-3.0.texi: New file.
4507 * doc/gpl.texi: Remove.
4508 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4509 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4510 * README-hacking, TODO, bootstrap, bootstrap.conf:
4511 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4512 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4513 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4514 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4515 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4516 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4517 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4518 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4519 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4520 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4521 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4522 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4523 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4524 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4525 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4526 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4527 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4528 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4529 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4530 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4531 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4532 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4533 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4534 * src/complain.c, src/complain.h, src/conflicts.c:
4535 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4536 * src/files.h, src/flex-scanner.h, src/getargs.c:
4537 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4538 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4539 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4540 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4541 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4542 * src/print.c, src/print.h, src/print_graph.c:
4543 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4544 * src/reduce.h, src/relation.c, src/relation.h:
4545 * src/revision.h, src/scan-code.h, src/scan-code.l:
4546 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4547 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4548 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4549 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4550 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4551 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4552 * tests/existing.at, tests/glr-regression.at:
4553 * tests/headers.at, tests/input.at, tests/java.at:
4554 * tests/local.at, tests/output.at, tests/push.at:
4555 * tests/reduce.at, tests/regression.at, tests/sets.at:
4556 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4557 * tests/torture.at:
4558 Update to GPLv3.
4559
728c4be2
JD
45602007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4561
4562 Get rid of broken %no-parser, -n, and --no-parser implementation and
4563 documentation.
4564 * TODO: Don't mention them.
4565 * doc/bison.1: Likewise.
4566 * doc/bison.texinfo (Decl Summary): Likewise.
4567 (Bison Options): Likewise.
4568 (Option Cross Key): Likewise.
4569 * src/getargs.c (no_parser_flag): Remove global variable.
4570 (usage): Don't print description of -n and --no-parser.
4571 (long_options): Remove --no-parser entry here.
4572 (getargs): Remove -n case in the switch here.
4573 * src/getargs.h (no_parser_flag): Remove extern.
4574 * tests/regression.at (Web2c Actions): Remove comment that mentions
4575 --no-parser.
4576
5d31a216
JD
45772007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4578
4579 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4580 name user variables starting with `yy'. Just pass NULL instead of a
4581 dummy local &yylval to yypush_parse.
4582 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4583 starting with `yy'.
4584
a2ea208d
JD
45852007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4586
4587 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4588 true since it's then always used regardless of whether yyoverflow is
4589 defined. Reported by Christian Burger at
4590 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4591 * THANKS: Add Christian Burger.
4592
91661ebb
JD
4593 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4594 node names: say "Decl Summary" not "Bison Declaration Summary".
4595
cbd50549
JD
45962007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4597
4598 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4599 determine whether this function has already complained about an invalid
4600 value for a %define boolean variable, don't check whether Bison has
4601 ever examined the value. As written, the check was a tautology.
4602 Instead, record and check for this complaint using a separate muscle.
4603
eb1b0740
JD
46042007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4605
4606 Fix push parsing memory leak reported by Brandon Lucia at
4607 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4608 * THANKS: Add Brandon Lucia.
4609 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4610 but the parse never completed and thus freed it.
4611 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4612 * tests/testsuite.at: Include push.at.
4613 * test/push.at: New.
4614 (Push Parsing: Memory Leak for Early Deletion): New test case.
4615
9d774aff
JD
46162007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4617
4618 Improve handling of multiple S/R conflicts in the same state and of S/R
4619 conflicts involving multiple reductions.
4620 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4621 set for a state here or Bison will abort if it is reassigned on a
4622 later conflicted reduction in the same state.
4623 Similarly, don't finalize and assign the solved conflicts report here
4624 or it will be lost if it is reassigned on a later conflicted reduction
4625 in the same state.
4626 (set_conflicts): Instead, assign them both here after all S/R conflicts
4627 in the state have been fully examined.
4628 * src/print.c (shift_set): Rename to...
4629 (no_reduce_set): ... this.
4630 (print_reductions): Update for rename, and add %nonassoc error action
4631 tokens to no_reduce_set so that, when printing the first remaining
4632 reduction on an error action token, the reduction is enclosed in
4633 brackets.
4634 (print_results): Update for rename.
4635 * tests/conflicts.at (Solved conflicts report for multiple reductions
4636 in a state): New test case.
4637 (%nonassoc error actions for multiple reductions in a state): New test
4638 case.
4639
4640 * src/main.c (main): Don't depend on C99 features.
4641
10159d2a
JD
46422007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4643
4644 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
4645 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4646 uniwidth.
10159d2a 4647
953b3935
JD
46482007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4649
4650 * bootstrap (slurp): Create target directories that don't exist.
4651 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4652
6ce2d93a
JD
46532007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4654
4655 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4656 than item number.
4657 * closure.c (closure): Likewise.
4658 * state.h (reductions): Comment sorting of rules.
4659 (state): Comment sorting of items.
4660
ce3448d5
JD
46612007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4662
4663 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4664 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4665 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4666 definition in order to avoid Gnulib headers since we don't use config.h
4667 here.
4668 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4669 rather than AT_DATA so that config.h is included.
4670
8a86eef0
JD
46712007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4672
4673 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4674 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4675 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4676 and so that YYFPRINTF is guaranteed to be defined here.
4677
b1a81613
JD
46782007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4679
4680 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4681 with...
4682 (muscle_percent_define_check_values): ... this more helpful function.
4683 Again, it's not used yet, but it will be.
4684 * src/muscle_tab.h: Likewise.
4685
71b61d4d
JD
4686 Improve some comments in parser table construction.
4687 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4688 (generate_states): Don't mention ruleset, which is internal to closure.
4689 * src/closure.c (closure): Explain sorting of core and itemset, which
4690 is required for this function to behave correctly.
4691 * src/closure.h (closure): Mention sorting.
4692
2a6b783d
JD
46932007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4694
4695 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4696 move the check for disabled transitions to an aver since conflict
4697 resolution hasn't happened yet.
4698
4699 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4700 labels a state as inconsistent just because it has error transitions.
4701 The original form of this check appeared in revision 1.1 of lalr.c,
4702 which was committed on 1991-12-21. Now (at least), changing the
4703 consistency label on such a state appears to have no useful effect in
4704 any of the places it is examined, which I enumerate below. The key
4705 point to understanding each item in this enumeration is that a state
4706 with an error transition is labelled consistent in the first place only
4707 if it has no rules, so the check cannot matter for states that have
4708 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4709 to try to identify its conflicts, and a state must have *rules* to have
4710 conflicts. (2) Labelling a state as inconsistent will affect how
4711 action_row sets the default *rule* for the state. (3) Labelling a
4712 state as inconsistent will cause build_relations to add lookback edges
4713 to *rules* in that state.
4714 * src/state.h (struct state): Word the comment for member consistent
4715 more carefully.
4716
14462c2b
JD
47172007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4718
4719 Don't depend on C99 features.
4720 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4721 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4722 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4723 * src/state.c (state_mark_reachable_states): Fix for-loop.
4724 (state_remove_unreachable_states): Fix for-loop.
4725
4726 Don't widen struct state with member reachable just to temporarily
4727 record reachability. Instead, use a local bitset.
4728 * src/state.h (struct state): Remove member.
4729 * src/state.c (state_new): Don't initialize it.
4730 (state_mark_reachable_states): Rename to...
4731 (state_record_reachable_states): ... this, and use bitset.
4732 (state_remove_unreachable_states): Use bitset.
4733
5a43d418
JD
47342007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4735
4736 * src/Makefile.am (yacc): Quote target action commands properly so
4737 that the yacc script isn't corrupt. Reported by Hans Aberg at
4738 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4739
0c650a20
JD
4740 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4741 the case of pure parsers. Reported by Frans Englich at
4742 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4743 * THANKS: Add Frans Englich.
4744
61fee93e
JD
4745 * NEWS (2.3a+): In the %code entry, reference section `Bison
4746 Declaration Summary' from the manual now since the %code summary has
4747 moved there.
4748 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4749 in the rules section must be terminated by semicolons.
4750
f124d423
JD
47512007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4752
4753 Extend the front-end API for %define variables to more completely
4754 mirror the back-end. This will be useful in the future.
4755 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4756 Update comments to mention the new front-end counterparts of these
4757 macros.
4758 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4759 for muscle_string_decode and muscle_location_decode.
4760 (muscle_string_decode): New static function.
4761 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4762 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4763 functions.
4764 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4765 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4766 implementation more closely.
4767 (muscle_percent_define_invalid_value): New function.
4768 * src/muscle_tab.h (muscle_percent_define_get,
4769 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4770 Prototype.
4771
75ad86ee
JD
47722007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4773
4774 * NEWS (2.3a+): Mention yesterday's state-removal change.
4775 (2.3a): Remove the %language entry, which was added after 2.3a.
4776 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4777 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4778 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4779 tests/existing.at: Update copyright date.
4780
5967f0cf
JD
47812007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4782
4783 If conflict resolution makes states unreachable, remove those states,
4784 report rules that are then unused, and don't report conflicts in those
4785 states.
4786 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4787 New global function.
4788 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4789 function.
4790 * src/main.c (main): After conflict resolution, remove the unreachable
4791 states and update all data structures that reference states by number.
4792 * src/state.c (state_new): Initialize each state's reachable member to
4793 false.
4794 (state_mark_reachable_states): New static function.
4795 (state_remove_unreachable_states): New global function.
4796 * src/state.h (struct state): Add member bool reachable.
4797 (state_remove_unreachable_states): Prototype.
4798 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4799 New test case.
4800 * tests/existing.at (GNU pic Grammar): Update test case output now that
4801 an unused rule is discovered.
4802
b09f4f48
JD
48032007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4804
4805 Minor code cleanup in parser table construction.
4806 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4807 (new_itemsets, save_reductions): Update for rename to nitemset.
4808 * src/closure.c (nritemset): Rename to...
4809 (nitemset): ... this since the "r" appears to meaningless and isn't
4810 used in the comments.
4811 (closure): Update for rename.
4812 * src/closure.h (nritemset): Update extern to...
4813 (nitemset): ... this.
4814 * src/lalr.c (LA): Fix a typo in comments.
4815 * src/print.c (print_core): Update for rename to nitemset.
4816 * src/print_graph.c (print_graph): Likewise.
4817 * src/state.h: Fix some typos in header comments.
4818
bbb44d83
PE
48192007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4820
9b33de72
PE
4821 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4822 still sticks to ASCII. Sorry!
4823
bbb44d83
PE
4824 * README-hacking: New file, taken mostly from coreutils, with changes
4825 for Bison. Contains much of the contents of:
4826 * README-cvs: Remove.
4827 * bootstrap: Sync from gnulib.
4828 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4829 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4830
29553547
JD
48312007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4832
4833 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4834 Setzer.
4835 (Java Differences): Fix some typos.
4836 * THANKS: Add Sebastian Setzer.
4837
01b477c6
PB
48382007-03-07 Paolo Bonzini <bonzini@gnu.org>
4839
730739e4
AD
4840 * data/java.m4 (b4_single_class_if): Remove.
4841 (b4_abstract_if): Look at "%define abstract".
4842 (b4_lexer_if): New.
4843 (b4_union_name): Rename...
4844 (b4_yystype): ... to this. Map to "%define stype".
4845 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4846 b4_maybe_throws): Fix quoting.
4847 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4848 * data/lalr1.java (Lexer interface): Always define.
4849 (Lexer interface within parser class): Remove.
4850 (YYLexer class): New, used when "%code lexer" is present.
4851 (constructor): When "%code lexer" is used, pass %lex-param
4852 to the lexer constructor.
4853 (yylex, yyparse): Remove %lex-param from method invocations
4854 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4855
4856 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4857 abstract". Rename "%define union_name" to "%define stype".
4858 Rename method names according to previous patch.
4859 (Java Scanner Interface): Describe "%code lexer" instead of
4860 "%pure-parser" and "%define single_class".
4861 (Java Differences): Mention "%code lexer".
4862
4863 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4864 Include scanner here, using macros from tests/local.at.
4865 (AT_DATA_CALC_Y): Remove final argument.
4866 (_AT_CHECK_JAVA_CALC): Likewise.
4867 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4868 of %locations and %error-verbose.
4869 (main): Test with and without %lex-param.
4870 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4871 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 4872
122bea3a
JMG
48732007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4874
4875 DJGPP spefic issue. Inhibit the use of disallowed characters for
4876 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4877 and concern testsuite case 46.
4878 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4879 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4880 * djgpp/config.bat: Inhibit the use of disallowed characters.
4881
9611cfa2
JD
48822007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4883
4884 Miscellaneous %define and %code cleanup.
4885 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4886 values are interpreted.
4887 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4888 documentation a little more.
4889 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4890 muscle_percent_define_insert, muscle_percent_code_grow): New
4891 functions/macros.
4892 * src/muscle_tab.h (muscle_percent_define_insert,
4893 muscle_percent_code_grow): Prototype.
4894 * src/parse-gram.y (prologue_declaration): Use
4895 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4896 %define and %code directives.
4897
4898 Make it easy to share %define boolean variables between the front-end
4899 and back-end. Though not used yet, this will be useful in the future.
4900 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4901 Bison uses of names rather than just skeleton uses of names.
4902 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4903 b4_percent_define_skeleton_variables(VARIABLE) to
4904 b4_percent_define_bison_variables(VARIABLE).
4905 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4906 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4907 b4_percent_code_bison_qualifiers(QUALIFIER).
4908 (b4_check_user_names_wrap): Update for renames.
4909 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4910 muscle_percent_define_default): New functions mimicking
4911 b4_percent_define_flag_if and b4_percent_define_default.
4912
4913 For %define variables, report locations for invalid values and
bbb44d83 4914 redefinitions.
9611cfa2
JD
4915 * data/bison.m4 (b4_percent_define_flag_if): Read
4916 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4917 value for VARIABLE.
4918 (b4_percent_define_default): Save a special location in
4919 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4920 must later be reported as invalid.
4921 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4922 functions.
4923 (muscle_percent_define_insert): Record the location of VARIABLE in
4924 muscle percent_define_loc(VARIABLE), and use it to report the previous
4925 location for a redefinition.
4926 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4927 (muscle_percent_define_default): Update like b4_percent_define_default.
4928 (muscle_grow_user_name_list): Rename to...
4929 (muscle_user_name_list_grow): ... this for consistency and use
4930 muscle_location_grow.
4931 * src/muscle_tab.h (muscle_location_grow): Prototype.
4932 * tests/input.at (%define errors): Update expected output.
4933 * tests/skeletons.at (%define boolean variables: invalid skeleton
4934 defaults): New test case.
4935
0bf92491
JD
49362007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4937
4938 * src/print.c (lookahead_set, state_default_rule): Remove.
4939 (print_reductions): Replace state_default_rule invocation with
4940 equivalent use of yydefact, which was computed in token_actions in
4941 tables.c.
4942 (print_results): Don't allocate lookahead_set.
4943
d3b12988
PB
49442007-02-27 Paolo Bonzini <bonzini@gnu.org>
4945
4946 * data/lalr1.java: Prefix all private members with yy.
4947
f57a7536
JD
49482007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4949
4950 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 4951 Sebastien Fricker at
f57a7536 4952 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 4953 * THANKS: Add Sebastien Fricker.
f57a7536
JD
4954 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4955 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4956 accept a variable number of arguments.
4957
6404a5bf
JD
49582007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4959
4960 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4961
e4e09639
JMG
49622007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4963
4964 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4965 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4966 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4967
d7e0a1a7
PE
49682007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4969
4970 Undo my 2007-02-07 change, switching back to the c-strcase module
4971 introduced in the 2007-02-03 change. Bruno Haible reported that
4972 the 2007-02-07 change would be dangerous in Turkish if we add a
4973 language whose name contains "i", since "i" is not lowercase "I"
4974 in Turkish.
4975 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4976 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4977 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4978 * m4/.cvsignore: Remove strcase.m4.
4979 * src/getargs.c: Revert 2007-02-07 change, as follows.
4980 Include c-strcase.h.
4981 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4982
deee93a1
JD
49832007-02-11 Bruno Haible <bruno@clisp.org>
4984
4985 Enable the Java related testsuite tests when the only Java compiler
4986 found is a gcj < 4.3. Discussed at
4987 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4988 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4989
574add85
JD
49902007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4991
4992 * data/Makefile.am: Update copyright date.
4993 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4994 yypstate_new returns NULL.
4995 (yypstate_new): Return NULL if malloc does.
4996 * src/reader.c (packgram): Move translation of rule actions from the
4997 beginning of packgram to...
4998 (check_and_convert_grammar): ... here right before packgram is invoked
4999 so it's easier to write more complete comments, and remove redundant
5000 code.
5001
e785ccf7
JD
50022007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5003
5004 As in semantic actions, make @$ in %initial-action, %destructor, and
5005 %printer imply %locations.
5006 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5007 scanning @$.
5008 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5009 (@$ in %initial-action implies %locations,
5010 @$ in %destructor implies %locations,
5011 @$ in %printer implies %locations): ... these new test cases.
5012
1cfe1ed7
PE
50132007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5014
5015 Undo most of the 2007-02-03 change, switching to the strcase module
5016 now that gnulib strcase has been fixed.
5017 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5018 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5019 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5020 * m4/.cvsignore: Add strcase.m4.
5021 * src/getargs.c: Revert 2007-02-03 change, as follows.
5022 Don't include c-strcase.h.
5023 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5024 strcasecmp has "unspecified behavior" outside the POSIX locale,
5025 but it works fine in practice if at least one argument is ASCII,
5026 as is the case in Bison.
5027
0049ec86
PB
50282007-02-07 Paolo Bonzini <bonzini@gnu.org>
5029
5030 * tests/java.at: Skip tests if only one of javac/java is present.
5031 Reported by Joel E. Denny.
5032 * tests/atlocal.in: Adjust copyright years.
5033
50342007-02-05 Paolo Bonzini <bonzini@gnu.org>
5035
5036 * data/lalr1.java (Stack): Work around old verifiers that disallow
5037 access to the private fields of an inner class, from the outer class.
5038 We can make Stack's fields public because user code doesn't have access
5039 to the instance of Stack used by parse(). Reported by Paul Eggert.
5040
2c2b7220
PE
50412007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5042
5043 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5044 the right spot for these files?
5045 * bootstrap.conf (gnulib_modules): Add c-strcase.
5046 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5047 c-strncasecmp.c.
5048 * src/getargs.c: Include c-strcase.h.
5049 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5050 to avoid unspecified behavior.
5051
b2b81dae
JD
50522007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5053
5054 * doc/bison.texinfo (Decl Summary): Correct typo.
5055
c1d19e10
PB
50562007-01-30 Paolo Bonzini <bonzini@gnu.org>
5057
5058 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5059 Complain if the value does not match empty, "true" or "false".
5060 * data/c++.m4: Adjust default definitions of %define variables.
5061 * data/java.m4: Adjust default definitions of %define variables.
5062 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5063 to above behavior.
5064 * tests/input.at (Boolean %define variables): Test new behavior.
5065
8405b70c
PB
50662007-01-29 Paolo Bonzini <bonzini@gnu.org>
5067
5068 * NEWS: Mention java.
5069 * TODO: Remove things that are done.
5070 * bootstrap.conf: Add javacomp-script and javaexec-script.
5071 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5072
5073 * data/Makefile.am: Add new files.
5074 * data/java-skel.m4: New.
5075 * data/java.m4: New.
5076 * data/lalr1.java: New.
5077
5078 * doc/bison.texinfo: Put "A Complete C++ Example" under
5079 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5080 under Other Languages.
5081
5082 * src/getargs.c (valid_languages): Add Java.
5083 * src/getargs.h (struct bison_language): Update size of string fields.
5084
5085 * tests/Makefile.am: Add java.at.
5086 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5087 * tests/java.at: New.
5088 * tests/testsuite.at: Include it.
5089
3eb82471
JD
50902007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5091
5092 Clean up.
5093 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5094 at_directive_argv arguments so these no longer have to be global
5095 variables. Also, update the implementation for the following changes.
5096 (fail_for_at_directive_too_many_args,
5097 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5098 (at_directive_name): Remove as at_directive_argv[0] will be used for
5099 this now.
5100 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5101 for the directive name.
5102 (at_directive_argc, at_directive_argv): Make these local within
5103 skel_lex instead of global.
5104 (INITIAL): Update directive start action for above changes.
5105 (SC_AT_DIRECTIVE_ARG): Rename to...
5106 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5107 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5108 (scan_skel): Move yylex_destroy to...
5109 (skel_scanner_free): ... here.
5110 * tests/skeletons.at (installed skeleton file name): Rename to...
5111 (installed skeleton file names): ... this.
5112
148d66d8
JD
51132007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5114
5115 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5116 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5117 Summary" not "Directives".
5118 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5119 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5120 since the former is now the more complete one.
5121 (Prologue Alternatives): Likewise and do the same for %defines.
5122 (Table of Symbols): Add summary of %code, add summary of %define, and
5123 move full %code documentation to...
5124 (Decl Summary): ... here for consistency with other entries in these
5125 sections.
5126 Move %define entry in order to keep this list alphabetized.
5127 Reword %define entry a little to put less emphasis on the skeleton
5128 concept, which most users shouldn't have to think about.
5129
665f0c24
PE
51302007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5131
5132 Adjust to recent gnulib changes.
5133 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5134 Add string.h, string_.h, unistd_.h, wchar_.h.
5135 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5136 * src/system.h: Don't include <stpcpy.h>; this is now done by
5137 <string.h>.
5138
592d0b1e
PB
51392007-01-23 Paolo Bonzini <bonzini@gnu.org>
5140
5141 Simplify implementation of unqualified %code, implement macros for
5142 uniform treatment of boolean %define flags. Document %define.
5143 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5144 b4_percent_code_ifdef): New.
5145 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5146 * data/c++.m4: Define default value for global_tokens_and_yystype.
5147 * data/glr.cc: Likewise.
5148 * data/location.cc: Use b4_percent_define_flag_if.
5149
148d66d8 5150 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
5151
5152 * src/parse-gram.y (Unqualified %code): Change muscle name to
5153 b4_percent_code().
5154 (content.opt): Default to empty.
5155
a7867f53
JD
51562007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5157
5158 Implement support for relative and absolute skeleton file names.
5159 Discussed starting at
5160 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5161 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5162 (Bison Options): Document in --skeleton entry.
5163 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5164 full_skeleton can't necessarily hold all of pkgdatadir.
5165 If the specified skeleton file name contains a `/', don't prepend
5166 pkgdatadir.
5167 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5168 file name contains a `/', prepend the grammar file directory.
5169 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5170 * skeletons.at: New file.
5171 (relative skeleton file names): New test case.
5172 (installed skeleton file names): New test case.
5173 * tests/testsuite.at: Include skeletons.at.
5174
5175 * bootstrap: Update copyright to 2007.
5176
830c9b18
PB
51772007-01-17 Paolo Bonzini <bonzini@gnu.org>
5178
5179 * bootstrap: Remove occurrences of .#bootmp from the files.
5180
a8c2e813
AD
51812007-01-17 Akim Demaille <akim@epita.fr>
5182
5183 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5184 nonterminals.
5185 Use per-type %printer.
5186
279cabb6
JD
51872007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5188
5189 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5190 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5191 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5192 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5193 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5194 tests/glr-regression.at, tests/input.at, tests/local.at,
5195 tests/output.at, tests/torture.at: Update copyright to 2007.
5196
bb32f4f2
AD
51972007-01-16 Akim Demaille <akim@epita.fr>
5198
5199 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5200 error code.
5201 (Calc++ Scanner): Exit with failure if we can't open the input
5202 file.
5203 Accept "-" standing for stdin.
5204 (Calc++ Top Level): Print the result only if the parsing was
5205 successful.
5206
7cff04b5
AD
52072007-01-16 Akim Demaille <akim@epita.fr>
5208
5209 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5210
a4e25e1d
JD
52112007-01-15 Paolo Bonzini <bonzini@gnu.org>
5212 and Joel E. Denny <jdenny@ces.clemson.edu>
5213
5214 Clean up %define and %code implementation in M4 some. Most
5215 importantly, rename all related macros to be in the b4_percent_define
5216 and b4_percent_code namespaces. Also, complete support for `.' in
5217 %define variable names and %code qualifiers.
5218 * data/bison.m4 (b4_check_user_names): Check for special
5219 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5220 m4_foreach loops.
5221 (b4_get_percent_define, b4_get_percent_code): Rename to...
5222 (b4_percent_define_get, b4_percent_code_get): ... these.
5223 Extend documentation with examples.
5224 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5225 b4_percent_define_skeleton_variables and
5226 b4_percent_code_skeleton_qualifiers.
5227 Expect any value for the %define variable `foo' to be stored in the
5228 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5229 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5230 expect any unqualified %code blocks to be stored in a macro named
5231 `b4_percent_code_unqualified'.
5232 Use m4_indir so that %define variable names and %code qualifiers can
5233 contain `.', which is allowed by the grammar parser.
5234 (b4_percent_define_default): New macro to set a default value for a
5235 %define variable.
5236 (m4_wrap): Update wrapped code, and fix some underquoting.
5237 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5238 Expect grammar uses of %define variables and %code qualifiers to be
5239 defined in b4_percent_define_user_variables and
5240 b4_percent_code_user_qualifiers.
5241 * data/c++.m4: Use b4_percent_define_default rather than
5242 m4_define_default. Fix some underquoting. Skeleton usage of %define
5243 variable define_location_comparison now implies skeleton usage of
5244 %define variable filename_type.
5245 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5246 data/push.c, data/yacc.c: Update macro names.
5247 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5248 muscle names.
5249
e37c665c
JMG
52502007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5251
5252 DJGPP specific issues.
5253
5254 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5255 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5256
7d2d521f
JD
52572007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5258
5259 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5260 run parsers in all tests so that Valgrind is invoked during
5261 maintainer-check-valgrind.
5262 (Duplicate representation of merged trees): Free all semantic values.
5263 (Duplicated user destructor for lookahead): Likewise.
5264
e0ac9b4b
JD
52652007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5266
5267 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5268 command-line prefix.
5269 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5270 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5271 miss Valgrind messages.
5272 (Exploding the Stack Size with Malloc): Likewise.
5273
78143faa
JD
52742007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5275
5276 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5277 locals. Reported by Juan Manuel Guerrero at
5278 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5279 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5280 Fix some indentation also.
5281 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5282 explaining this issue.
5283
7ecec4dd
JD
52842007-01-09 Paolo Bonzini <bonzini@gnu.org>
5285 and Joel E. Denny <jdenny@ces.clemson.edu>
5286
5287 Simplify union and prologue handling, and escape union and lex/parse
5288 params with digraphs.
5289 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5290 values to the empty string since these are no longer guaranteed
5291 initialized by the front-end.
5292 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5293 braces around b4_user_stype since this is no longer done by the
5294 front-end.
5295 * src/files.c, src/files.h (pre_prologue_obstack,
5296 post_prologue_obstack): Remove.
5297 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5298 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5299 with digraphs. This fixes lex params and parse params.
5300 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5301 * src/output.c (prepare): Remove muscle insertion of the prologues.
5302 (output): Remove freeing of pre_prologue_obstack and
5303 post_prologue_obstack.
5304 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5305 than prologue_augment for prologue parsing so you don't need prologue
5306 obstacks.
5c80250c
JD
5307 (grammar_declaration): For %union RHS, use `braceless' instead of
5308 "{...}" so that braces are already stripped and code is escaped with
5309 digraphs.
7ecec4dd
JD
5310 * src/reader.c (prologue_augment): Remove.
5311 (reader): Remove initialization of pre_prologue_obstack and
5312 post_prologue_obstack.
5313 * src/reader.h (prologue_augment): Remove.
5314
5315 * data/c.m4: Remove stray parenthesis.
5316
16dc6a9e
JD
53172007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5318
5319 Remove quotes from variables names in %define directives and from
5320 qualifiers in %code directives, and restrict the characters that are
5321 allowed in them to M4-friendly ones. For %define, continue to support
5322 the quoted form as a deprecated feature. Discussed starting at
5323 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5324 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5325 %code.
5326 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
5327 (Decl Summary): In %defines entry, update mention of `%code requires'
5328 and `%code provides'.
16dc6a9e
JD
5329 (C++ Location Values): Update %define uses.
5330 (Calc++ Parser Interface): Likewise.
5331 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 5332 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
5333 * src/parse-gram.y (prologue_declaration): For %define variables, use
5334 `variable' instead of `STRING'.
5335 (grammar_declaration): For %code qualifiers, use `ID' instead of
5336 `STRING'.
5337 (variable): New nonterminal that takes an `ID' or a `STRING'.
5338 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5339 and %define uses.
5340 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5341 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5342 (%define errors): Update %define uses.
5343
e9813cd4
JD
53442007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5345
5346 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5347 instead of muscle_insert for %define values so that M4-special
5348 characters are replaced with digraphs.
5349 * tests/input.at (%define errors): Extend to check weird values.
5350
6afc30cc
JD
53512007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5352
5353 Instead of having skeletons declare all valid %define variables and
5354 %code qualifiers, provide macros that retrieve the associated values
5355 and build these lists automatically. Thus Bison will now warn when a
5356 variable or qualifier is not used by the skeleton in the current
5357 invocation regardless of whether it might sometimes be used by that
5358 skeleton in other invocations. Also, move all %define value macros to
5359 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5360 form, which is replaced by %code.
5361 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5362 (b4_check_user_names): ... this, and change the series of valid name
5363 arguments to a single list argument for names used in the skeleton
5364 similar to the existing list argument for names used in the grammar.
5365 Warn instead of complaining.
5366 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5367 values and %code code, to format %code code properly, and to build
5368 lists of all %define variables and %code qualifiers used in the
5369 skeleton: b4_skeleton_percent_define_variables and
5370 b4_skeleton_percent_code_qualifiers.
5371 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5372 Remove, and...
5373 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5374 the skeleton names lists can finish building first. In place of
5375 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5376 expect the lists b4_user_percent_define_variables and
5377 b4_user_percent_code_qualifiers.
5378 * data/c++.m4: Where setting default values for b4_parser_class_name,
5379 b4_location_type, b4_filename_type, b4_namespace, and
5380 b4_define_location_comparison, update their names to the
5381 b4_percent_define_ namespace.
5382 * data/glr.c: Don't use b4_check_percent_define_variables and
5383 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5384 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5385 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 5386 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
5387 * data/location.cc: Use b4_get_percent_define.
5388 * data/push.c: Don't use b4_check_percent_define_variables and
5389 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5390 * data/yacc.c: Likewise, and don't call m4_exit in
5391 b4_use_push_for_pull_if or m4_wrap code will never execute.
5392 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5393 Rename to...
5394 (muscle_grow_user_name_list): ... this for consistency with the
5395 terminology used in bison.m4.
5396 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5397 %define variable names, and rename muscle used_percent_define_variables
5398 to user_percent_define_variables.
5399 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5400 user_percent_code_qualifiers.
5401 (content): Remove.
5402 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5403 {CODE} form is no longer accepted.
5404 * tests/input.at (Reject bad %code qualifiers): Rename to...
5405 (Reject unused %code qualifiers): ... this, and update test output.
5406 (%define error): Update test output.
5407
7eb8a0bc
JD
54082007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5409
5410 Check for unrecognized %define variables similar to checking for
5411 unrecognized %code qualifiers. Check for redefined %define variables.
5412 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5413 generalizes...
5414 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5415 (b4_check_percent_define_variables): New, also wraps it.
5416 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5417 variables using b4_check_percent_define_variables.
5418 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5419 all those exercised in the test suite and all those listed in the
5420 `Default values' section of c++.m4. Are there others?
5421 * data/push.c, data/yacc.c: Declare no valid %define variables.
5422 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5423 similar to muscle_find, but it works even when the muscle stores a
5424 const value.
5425 (muscle_grow_used_name_list): New function for constructing the used
5426 name list muscles that b4_check_for_unrecognized_names requires.
5427 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5428 %define'd more than once. Define the b4_used_percent_define_variables
5429 muscle with muscle_grow_used_name_list.
5430 (grammar_declaration): Abbreviate %code code with
5431 muscle_grow_used_name_list.
5432 * tests/input.at (%define errors): New.
5433
3fc65ead
JD
54342007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5435
5436 Provide warn_at, complain_at, and fatal_at function callbacks to the
5437 skeletons, and use this for %code qualifier complaints.
5438 * data/bison.m4 (b4_error_at): New, invoked by...
5439 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5440 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5441 @fatal_at(...@) directives.
5442 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5443 qualifiers in b4_used_percent_code_qualifiers and to use
5444 b4_complain_at.
5445 * src/location.c, src/location.h (boundary_set_from_string): New global
5446 function.
5447 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5448 function.
5449 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5450 to b4_used_percent_code_qualifiers.
5451 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5452 function.
5453 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5454 (lineno): Rename to...
5455 (out_lineno): ... this so I don't misunderstand it again.
5456 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5457 here; these newlines are in the input but not the output file.
5458 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5459 (at_directive_perform): ... this new static function, and add handling
5460 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5461 directives.
5462 * tests/input.at (Reject bad %code qualifiers): Update test output with
5463 locations and extend.
5464
5465 * tests/output.at (Output file name: [, Output file name: ]): Remove
5466 bogus comment about these tests failing.
5467
1c7b7e1d
JD
54682007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5469
5470 Clean up b4_check_percent_code_qualifiers a little.
5471 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5472 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5473 documentation and add examples.
5474 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5475 qualifiers here.
5476
08af01c2
JD
54772007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5478
5479 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5480 unreliable -- especially when they're hidden inside another macro.
5481 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5482 data/c.m4: Remove m4_divert(-1).
5483 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5484 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5485 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 5486 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
5487 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5488 pushed and popped by m4sugar, should be first on the stack.
5489
5490 Provide warn, complain, and fatal function callbacks to the skeletons.
5491 This provides more flexibility than m4_fatal, improves the error
5492 message format, and captures messages for translation. Discussed
5493 starting at
5494 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5495 * data/bison.m4 (b4_error): New, invoked by...
5496 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5497 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5498 directives. Because these M4 macros might be called when the current
5499 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5500 the previous removal of uses of m4_divert, which caused trouble.
5501 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5502 m4_fatal to report unrecognized %code qualifiers.
5503 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5504 push parser requests.
5505 * data/glr.c: Use b4_complain instead of m4_fatal to report
5506 non-deterministic push parser requests.
5507 Update @output usage to @output(...@) form.
5508 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5509 report missing %defines. Update @output usage to @output(...@) form.
5510 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5511 @output(...@) form.
5512 * src/main.c (main): Invoke skel_scanner_free.
5513 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5514 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5515 obstack_for_string from flex-scanner.h.
5516 (YY_DECL): Use to declare skel_lex static.
5517 (decode_at_digraphs): Remove; now handled in the new
5518 SC_AT_DIRECTIVE_ARG start condition.
5519 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5520 functions.
5521 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5522 at_directive_argv): New static globals.
5523 (INITIAL): Use fail_for_invalid_at.
5524 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5525 recognize the start of a generalized `@directive(...@)' form and
5526 start...
5527 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5528 directive args (using the new obstack_for_string), to decode the
5529 contained @ diagraphs, and to perform the directive. It recognizes
5530 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5531 @output(...@).
5532 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5533 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5534 `@,'.
5535 (scan_skel): Initialize obstack_for_string on the first call.
5536 (skel_scanner_free): New function to free obstack_for_string.
5537 * tests/input.at (Reject bad %code qualifiers): Update test output.
5538
8e0a5e9e
JD
55392007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5540
5541 Consolidate the 4 prologue alternative directives (%code, %requires,
5542 %provides, and %code-top) into a single %code directive with an
5543 optional qualifier field. Discussed at
5544 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5545 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5546 alternatives.
5547 * doc/bison.texinfo (Prologue Alternatives): Update.
5548 (Decl Summary): Update to %code "requires" and %code "provides".
5549 (Calc++ Parser): Update to %code "requires".
148d66d8 5550 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
5551 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5552 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5553 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5554 which are skeleton-specific.
5555 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5556 declare what %code qualifiers it supports and to complain if any other
5557 qualifiers were used in the grammar.
5558 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5559 and b4_user_code([b4_percent_code_provides]) in place of
5560 b4_user_requires and b4_user_provides.
5561 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5562 Add b4_user_code([b4_percent_code_top]) and
5563 b4_user_code([b4_percent_code]).
5564 Invoke b4_check_percent_code_qualifiers.
5565 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5566 PERCENT_REQUIRES): Remove.
5567 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5568 %requires. Rewrite the %code RHS as the unqualified form defining the
5569 muscle b4_percent_code. Add another RHS for the qualified %code form,
5570 which defines muscles of the form b4_percent_code_QUALIFIER and the
5571 b4_used_percent_code_qualifiers muscle.
5572 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5573 PERCENT_REQUIRES): Remove.
5574 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5575 %code "requires" and %code "provides".
5576 * tests/input.at (Reject bad %code qualifiers): New.
5577
95021767
JD
55782007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5579
5580 Use the new code_props interface for destructors and printers.
5581 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5582 printer_location members, and change the type of the destructor and
5583 printer members to code_props.
5584 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5585 symbol_printer_get, semantic_type_destructor_set,
5586 semantic_type_printer_set, default_tagged_destructor_set,
5587 default_tagless_destructor_set, default_tagged_printer_set,
5588 default_tagless_printer_set): Use code_props in arguments and return
5589 types in place of char const * and location.
5590 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5591 since the locations are now contained in the return of
5592 symbol_destructor_get and symbol_printer_get.
5593 * src/output.c (symbol_destructors_output, symbol_printers_output):
5594 Replace with...
5595 (symbol_code_props_output): ... this to eliminate duplicate code.
5596 (output_skeleton): Update to use symbol_code_props_output.
5597 * src/reader.c (symbol_should_be_used): Update use of
5598 symbol_destructor_get.
5599 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5600 Update uses of the various _destructor_set and _printer_set functions.
5601 * src/symtab.c: (default_tagged_destructor_location,
5602 default_tagless_destructor_location, default_tagged_printer_location,
5603 default_tagless_printer_location): Remove since we...
5604 (default_tagged_destructor, default_tagless_destructor,
5605 default_tagged_printer, default_tagless_printer): ... change the type
5606 of these to code_props.
5607 (symbol_new, semantic_type_new, symbol_destructor_set,
5608 semantic_type_destructor_set, symbol_destructor_get,
5609 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5610 symbol_check_alias_consistency, default_tagged_destructor_set,
5611 default_tagless_destructor_set, default_tagged_printer_set,
5612 default_tagless_printer_set): Update.
5613 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5614 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5615 code_props members.
5616 (symbol_print): Use SYMBOL_CODE_PRINT.
5617
f6857bbf
JD
56182007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5619
5620 Use the new code_props interface for rule actions.
5621 * src/symlist.h (symbol_list): Replace action, action_location, and
5622 used members with a code_props action_props member.
5623 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5624 grammar_midrule_action, grammar_current_rule_merge_set,
5625 grammar_current_rule_symbol_append, packgram): Update.
5626 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5627 * src/scan-code.l (handle_action_dollar): Update.
5628 (translate_rule_action): Remove, no longer used.
5629 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5630
7c0c6181
JD
56312007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5632
5633 Use the new code_props interface in parse-gram.y.
5634 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5635 Update all uses of translate_* functions to use the new code_props
5636 interface and to use gram_scanner_last_string_free and
5637 code_scanner_last_string_free where possible.
5638 (grammar_declaration): symbol_list_destructor_set and
5639 symbol_list_printer_set now perform the translation, so don't do it
5640 here. Use gram_scanner_last_string_free where possible.
5641 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5642 translate_code): Remove, no longer used.
5643 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5644 symbol_list_printer_set): Perform code translation here rather than
5645 depending on the caller to do so.
5646
5647 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5648 * src/scan-gram.h (gram_last_string): Remove declaration.
5649 * src/scan-gram.l (last_string): Declare it static.
5650
28e52c0d
JD
56512007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5652
5653 Encapsulate code properties and related functionality for the various
5654 destructors, printers, and actions into a code_props structure and
5655 interface. This patch merely implements code_props in scan-code.h and
5656 scan-code.l. Future patches will rewrite other modules to use it.
5657 Discussed starting at
5658 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5659 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5660 consistently initialize const structs that have an empty location
5661 field.
5662 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5663 to ensure consistency.
5664 * src/scan-code.h (code_props): New structure.
5665 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5666 function, macro, and const global variable for initializing a
5667 code_props with no code.
5668 (code_props_plain_init, code_props_symbol_action_init,
5669 code_props_rule_action_init, code_props_translate_code): The rest of
5670 the new code_props functional interface. Among other things, the init
5671 functions set the code_props kind field so that
5672 code_props_translate_code will know whether to behave like
5673 translate_symbol_action, translate_rule_action, or translate_code.
5674 These old translate functions must remain until all other modules are
5675 updated to use the new code_props interface.
5676 (code_scanner_last_string_free): New function similar to
5677 gram_scanner_last_string_free.
5678 (code_scanner_free): Add documentation.
5679 * src/scan-code.l: Implement the new interface.
5680 (code_lex): Make it static, add a code_props* argument, and remove the
5681 rule argument.
5682 (last_string): New static global similar to the one in scan-gram.l.
5683 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5684 instead of rule.
5685 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5686 code_props since Bison may one day use this information for destructors
5687 and printers.
5688 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5689 (handle_action_dollar): Use symbol_list_n_get and set used flag
5690 directly since symbol_list_n_used_set is removed.
5691 (translate_action): Add a code_props* argument and remove the rule,
5692 action, and location arguments. Pass the code_props* on to code_lex.
5693 (translate_rule_action, translate_symbol_action, translate_code):
5694 Rewrite as wrappers around the new code_props interface.
5695 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5696 it would eventually need to break the encapsulation of code_props.
5697
96034983
JD
56982007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5699
5700 * etc/.cvsignore: New.
5701
945e396c
JD
57022007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5703
5704 Add maintainer-push-check to run maintainer-check using push parsing in
5705 place of pull parsing where available.
5706 * Makefile.am (maintainer-push-check): New.
5707 * data/bison.m4 (b4_use_push_for_pull_if): New.
5708 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5709 appropriately based on their existing values.
5710 (yypush_parse): Don't print push-parser-specific diagnostics if push
5711 parsing is being used in place of pull parsing.
5712 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5713 push.c.
5714 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5715 variable, and insert b4_use_push_for_pull_flag into muscles.
5716 * tests/Makefile.am (maintainer-push-check): New.
5717
7d596384
JD
57182006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5719
5720 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5721 (whether successful or failed) so that yypush_parse can be invoked
5722 again to start a new parse using the same yypstate.
5723 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5724 check multiple yypull_parse invocations on the same yypstate. For pull
5725 mode, extend to check multiple yyparse invocations.
5726 (Exploding the Stack Size with Alloca): Extend to try with
5727 %push-pull-parser.
5728 (Exploding the Stack Size with Malloc): Likewise.
5729
5730 * tests/calc.at (Simple LALR Calculator): Don't specify
5731 %skeleton "push.c" since %push-pull-parser implies that now.
5732 * tests/headers.at (export YYLTYPE): Don't check for the push
5733 declarations. Otherwise, this test case can't be used to see if push
5734 mode can truly emulate pull mode.
5735 * tests/input.at (Torturing the Scanner): Likewise.
5736 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5737 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5738 AT_YACC_IF, which now includes the case of push mode since %skeleton
5739 need not be used for push mode. This will be more intuitive once
5740 push.c is renamed to yacc.c.
5741
7172e23e
JD
57422006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5743
5744 For push mode, convert yyparse from a macro to a function, invoke yylex
5745 instead of passing a yylexp argument to yypull_parse, and don't
5746 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5747 Discussed starting at
5748 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5749 * data/bison.m4 (b4_pull_if): New.
5750 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5751 * data/push.c: Improve M4 quoting a little.
5752 (b4_generate_macro_args, b4_parenthesize): Remove.
5753 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5754 any time a pull parser is requested.
5755 Don't #define this as a wrapper around yypull_parse. Instead, when
5756 both push and pull are requested, make it a function that does that
5757 same thing.
5758 (yypull_parse): If there's a b4_prefix, #define this to
5759 b4_prefix[pull_parse] when both push and pull are requested.
5760 Don't define this as a function unless both push and pull are
5761 requested.
5762 Remove the yylexp argument and hard-code yylex invocation instead.
5763 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5764 %push-parser.
5765 * src/getargs.c (pull_parser): New global initialized to true.
5766 * getargs.h (pull_parser): extern it.
5767 * src/output.c (prepare): Insert pull_flag muscle.
5768 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5769 (prologue_declaration): Set both push_parser and pull_parser = true for
5770 %push-pull-parser. Set push_parser = true and pull_parser = false for
5771 %push-parser.
5772 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5773 %push-parser since there's no backward-compatibility concern here.
5774 Scan %push-pull-parser.
5775 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5776 instead of %push-parser.
5777 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5778 prototype it in the module that calls yyparse.
5779 * tests/input.at (Torturing the Scanner): Likewise.
5780 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5781
2e7944cb
JD
57822006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5783
5784 Update etc/bench.pl. Optimize push mode a little (the yyn change
5785 deserves most of the credit).
5786 * Makefile.am (SUBDIRS): Add etc subdirectory.
5787 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5788 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5789 yytoken, yyval, and yyloc declarations to...
5790 (yyparse or yypush_parse): ... here to improve performance. For
5791 yypush_parse invocations after the first, be sure to assign yyn its old
5792 value again.
5793 (yypstate_new): Don't bother initializing the yyresult field since the
5794 initial value isn't used.
5795 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5796 remove the #define that, in push mode, set it to yyps->NAME.
5797 * etc/Makefile.am: New.
5798 * etc/bench.pl: Remove and build it instead from...
5799 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5800 "tests/bison" from the build directory by default rather than just
5801 invoking "bison" from $PATH.
5802 (calc_grammar): Update push parser code: don't declare yylval globally,
5803 don't define yyparse_wrapper, and don't #define yyparse.
5804 (bench_grammar): Update to check all working combinations of yacc.c,
5805 push.c, impure, pure, pull, and push.
5806
c3d50342
JD
58072006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5808
5809 For push mode, add pull wrappers around yypush_parse.
5810 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5811 (yypull_parse): New function wrapping yypush_parse.
5812 (yyparse): New #define wrapping yypull_parse.
5813 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5814 is declared.
5815 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5816 prototype yylex in the module that calls yyparse, and don't prototype
5817 yyparse there. Otherwise, the yyparse expansion won't compile.
5818 * tests/input.at (Torturing the Scanner): Likewise.
5819
94ebeba5
JD
58202006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5821
5822 Enable push parsers to operate in impure mode. Thus, %push-parser no
5823 longer implies %pure-parser. The point of this change is to move
5824 towards being able to test the push parser code by running the entire
5825 test suite as if %push-parser had been declared.
5826 * data/push.c (yypush_parse): For impure mode, remove the
5827 yypushed_char, yypushed_val, and yypushed_loc arguments.
5828 Instead, declare these as local variables initialized to the global
5829 yychar, yylval, and yylloc.
5830 For the first yypush_parse invocation only, restore the initial values
5831 of these global variables when it's time to read a token since they
5832 have been overwritten.
5833 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5834 %push-parser.
5835 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5836 %pure-parser along with %push-parser since this test case was designed
5837 for pure push parsers.
5838 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5839 (AT_YACC_OR_PUSH_IF): New.
5840 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5841 add a note that it's still wrong for some cases (as it has been for a
5842 while).
5843 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5844 %push-parser no longer implies %pure-parser.
5845
a0633178
JD
58462006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5847
5848 Remove some unnecessary differences between the pull parser code and
5849 the push parser code. This patch enables yynerrs in push mode.
5850 * data/push.c: Reformat M4 a little.
5851 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5852 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5853 because push mode is on. Instead, if pure mode is on, move yynerrs
5854 to...
5855 (b4_declare_parser_state_variables): ... here.
5856 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5857 to yyps->NAME so it can be used in yypush_parse.
5858 (yypush_parse): Don't omit uses of yynerrs in push mode.
5859
8646b6a3
JD
58602006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5861
5862 Fix bug such that the first pushed token's value and location are
5863 sometimes overwritten (sometimes by %initial-action) before being used.
5864 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5865 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5866 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5867 more closely mimic the pull parser logic.
5868 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5869 time to read a token, which is after any initialization of yylval and
5870 yylloc.
5871 (gottoken): Rename label to...
5872 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5873 user namespace.
5874
9baf4d74
JD
58752006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5876
5877 Rearrange initialization of the parser state variables so that the
5878 skeleton doesn't have to have a copy for pull mode and another for push
5879 mode. This patch also fixes at least a bug such that yylloc was not
5880 initialized (with b4_location_initial_line and
5881 b4_location_initial_column) upon calling yypush_parse. However, that
5882 initialization now overwrites the first token's location;
5883 %initial-action assigning @$ already did the same thing, and both bugs
5884 will be fixed in a later patch.
5885 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5886 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5887 yyss, yyvs, yyls, and yystacksize.
5888 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5889 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5890 yylsp.
5891 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5892 yyps->NAME so it can be used in yypush_parse.
5893 (yyparse or yypush_parse): For yypush_parse, don't print the
5894 "Starting parse" diagnostic for invocations after the first.
5895 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5896 yypush_parse, only do it for the first invocation.
5897 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5898 initialization to occur in yypush_parse but only on the first
5899 invocation.
5900
23522164
JD
59012006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5902
5903 * data/push.c: Add CPP guards around push parser declarations in both
5904 the header and the code file.
5905 In the code file, move the push parser declarations to the same place
5906 they appear in the header file.
5907 Clean up the M4 some, especially the inconsistent underquoting in
5908 some b4_c_function_def and b4_c_function_decl uses.
5909
bb010fe5
JD
59102006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5911
5912 Encapsulate the push parser state variables into an M4 macro so the
5913 push skeleton doesn't have to list them again for pull mode's yyparse.
5914 For push mode, remove yypush_parse's local equivalents of these
5915 variables to eliminate unnecessary copying between the two sets at
5916 run-time. This patch also fixes at least a bug related to multiple
5917 %initial-action invocations in push mode.
5918 * data/push.c (b4_declare_parser_variables): Rename to...
5919 (b4_declare_scanner_communication_variables): ... this for clarity and
5920 update both uses.
5921 (b4_declare_yyparse_variables): Remove and move its contents to the one
5922 spot where it was invoked.
5923 (b4_declare_parser_state_variables): New macro containing the parser
5924 state variables required by push mode.
5925 (struct yypstate): Replace all fields but yynew with
5926 b4_declare_parser_state_variables.
5927 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5928 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5929 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5930 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5931 parser state variable declarations with
5932 b4_declare_parser_state_variables.
5933 Don't initialize parser state variables when calling yypush_parse since
5934 yypstate_new already does that.
5935 Invoke the user's initial action only upon the first yypush_parse
5936 invocation.
5937 Remove all code that copies between the local parser state variables
5938 and the yypstate.
5939
2d212f8c
JD
59402006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5941
5942 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5943 prevent a name collision in a future patch where these names will
5944 sometimes be #define'd.
5945 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5946 since it no longer has the same name as the existing argument.
5947 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5948
e6e704dc
JD
59492006-12-19 Paolo Bonzini <bonzini@gnu.org>
5950 and Joel E. Denny <jdenny@ces.clemson.edu>
5951
5952 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5953 that the argument is case-insensitive, and there's no `=' here.
5954 For the %skeleton entry, mention that %language is better.
5955 (Bison Options): Likewise for --language and --skeleton. Move the
5956 --skeleton entry so that the `Tuning the parser' section is sorted
5957 alphabetically on long options.
5958 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5959 %language directive in detail here; cross-reference the %language
5960 documentation instead.
5961 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5962 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 5963 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
5964 * examples/extexi (normalize): Instead of replacing every %require
5965 argument with the current Bison version, just substitute for
5966 `@value{VERSION}'. This guarantees that we're testing what actually
5967 appears in the documentation.
5968 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5969 rather than `@VERSION@'.
5970
0e021770
PE
59712006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5972
fd575f05
PE
5973 * NEWS: Reword the %language news a bit, and put it earlier.
5974
0e021770
PE
5975 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5976 Rewrite to simplify the logic.
5977 (language_argmatch): Likewise.
fd575f05
PE
5978 (program_name): We now own this var.
5979 * src/getargs.h (struct bison_language): Use char[] rather than
5980 const char *.
0e021770
PE
5981
5982 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5983 Java is supported.
5984 * src/complain.c (program_name): Remove decl; no longer needed.
5985 * src/main.c (program_name): Remove; now belongs to getargs.
5986
59872006-12-18 Paolo Bonzini <bonzini@gnu.org>
5988
5989 * NEWS: Document %language.
5990
5991 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5992
5993 * data/c-skel.m4, data/c++-skel.m4: New files.
5994 * data/glr.c: Complain on push parsers.
5995
5996 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5997 over %skeleton.
148d66d8 5998 (Decl Summary): Document %language and %skeleton.
0e021770
PE
5999 (Command line): Document -L.
6000
6001 * examples/extexi: Rewrite %require directive.
6002 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6003
6004 * src/files.c (compute_exts_from_gc): Look in language structure
6005 for .y extension.
6006 (compute_file_name_parts): Check whether .tab should be added.
6007 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6008 (language, skeleton_arg, language_argmatch): New.
6009 (long_options): Add --language.
6010 (getargs): Use skeleton_arg, add -L/--language.
6011 * src/getargs.h: Include location.h.
6012 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6013 * src/output.c (prepare): Pick default skeleton from struct language.
6014 Don't dispatch C skeletons here.
6015 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6016 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6017 * src/scan-gram.l ("%language"): New rule.
6018
6019 * tests/calc.at: Test %skeleton and %language.
6020 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6021 (AT_GLR_IF): Look for %skeleton "glr.cc".
6022 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6023 (AT_YACC_IF): Reject %language.
6024
5691bf57
PE
60252006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6026
db06f0ce
PE
6027 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6028 since it wasn't used; only the typedef name 'semantic_type' is needed.
6029 Also, omit trailing white space.
6030
5691bf57
PE
6031 * bootstrap: Sync from coreutils.
6032 (gnulib_extra_files): Add build-aux/announce.gen.
6033 (slurp): Adjust .gitignore files like .cvsignore files.
6034 * build-aux/announce-gen: Remove from CVS, since bootstrap
6035 now creates this.
6036
791934e4
JD
60372006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6038
6039 Make %push-parser imply %pure-parser. This fixes several bugs; see
6040 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6041 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6042 pure_parser = true.
6043 * data/push.c: Don't bother testing b4_push_if when deciding whether
6044 to expand b4_declare_parser_variables globally.
6045 (yypush_parse): Likewise in here.
6046
6047 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6048 (yy_reduce_print): Reformat M4 for readability.
6049
ee5abb37
JD
60502006-12-15 Bob Rossi <bob@brasko.net>
6051 and Joel Denny <jdenny@ces.clemson.edu>
6052
6053 * data/push.c (yypstate): Add typedef, and update all uses of
6054 struct yypstate to just yypstate.
6055 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6056
16ca01f9
JD
60572006-12-14 Bob Rossi <bob@brasko.net>
6058
6059 * data/push.c (yypush_parse): Declare prototype regardless of
6060 %locations option.
6061
ab8e7e1a
JD
60622006-12-14 Bob Rossi <bob@brasko.net>
6063
6064 * data/push.c (yyparse): Remove the prototype and the #define when in
6065 push-parser mode.
6066
9bf32be3
JD
60672006-12-13 Bob Rossi <bob@brasko.net>
6068
6069 * data/push.c (yypstate_init): Rename to...
6070 (yypstate_new): ... this and use b4_c_function_def.
6071 (yypstate_delete): New.
6072 (yypush_parse): Change parameters yynval and yynlloc to be const.
6073 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6074 yypstate_delete functions.
6075
f02e2948
JD
60762006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6077
6078 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6079 strange test case titles. Reported by Bob Rossi.
6080
38eb7751
PE
60812006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6082
6083 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6084 of potential ambiguities in GLR grammers.
6085
bd9d212b
JD
60862006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6087
6088 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6089 `bison ', use m4_index instead of m4_substr since chopping up a string
6090 containing M4-special characters causes problems here.
6091
6092 Fix a couple of bugs related to special characters in user-specified
6093 file names, and make it easier for skeletons to compute output file
6094 names with the same file name prefix as Bison-computed output file
6095 names.
6096 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6097 b4_parser_file_name and b4_spec_defines_file instead of
6098 @output_parser_name@ and @output_header_name@, which are now redundant.
6099 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6100 b4_parser_file_name, b4_spec_defines_file, and the new
6101 @basename(FILENAME@) instead of @output_parser_name@ and
6102 @output_header_name@, which inappropriately escaped the file names as
6103 C string literals.
6104 * src/files.c (all_but_ext): Remove static qualifier.
6105 (compute_output_file_names): Move `free (all_but_ext)' to...
6106 (output_file_names_free): ... here since all_but_ext is needed later.
6107 * src/files.h (all_but_ext): Extern.
6108 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6109 exactly what MUSCLE_INSERT_STRING used to do.
6110 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6111 characters are escaped properly.
6112 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6113 all_but_ext.
6114 For pkgdatadir muscle, maintain previous functionality by using
6115 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6116 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6117 digraphs would never be expanded. Hopefully no one has M4-special
6118 characters in his Bison installation path.
6119 * src/scan-skel.l: Don't parse @output_header_name@ and
6120 @output_parser_name@ anymore since they're now redundant.
6121 In @output, use decode_at_digraphs.
6122 Parse a new @basename command that invokes last_component.
6123 (decode_at_digraphs): New.
6124 (BASE_QPUTS): Remove unused.
6125 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6126 (Output file name): New tests.
6127
3f7ca628
JD
61282006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6129
6130 Warn about output files that are generated by the skeletons and that
6131 conflict with other output files.
6132 * data/glr.c: Don't generate the header file here when glr.cc does.
6133 * src/files.c (file_names, file_names_count): New static globals.
6134 (compute_output_file_names): Invoke output_file_name_check for files
6135 not generated by the skeletons and remove existing checks.
6136 (output_file_name_check): New function that warns about conflicting
6137 output file names.
6138 (output_file_names_free): Free file_names.
6139 * src/files.h (output_file_name_check): Declare.
6140 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6141 the skeletons.
6142 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6143 (Conflicting output files): New tests.
6144
178e123e
PE
61452006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6146
6147 * doc/bison.texinfo: Fix a couple of typos.
6148
61492006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
6150
6151 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6152 Rename to...
6153 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6154 update all uses.
6155 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6156 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6157 local pv.
6158 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6159 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6160
ea17f233
JD
61612006-12-07 Bob Rossi <bob@brasko.net>
6162 and Joel Denny <jdenny@ces.clemson.edu>
6163
6164 * data/push.c (yypvarsinit): Change return type from void* to struct
6165 yypvars*. No longer cast to void* on return.
6166 (struct yypvars): Remove yylen since it need not be remembered between
6167 yypushparse invocations.
6168 (yypushparse): Don't copy between yylen and pv->yylen.
6169
55a30bda
JD
61702006-12-05 Bob Rossi <bob@brasko.net>
6171
6172 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6173 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6174 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6175 (struct yypvars): Remove b4_declare_parser_variables.
6176 (yypvarsinit): Remove init code for removed variables.
6177 (global scope): Do not declare b4_declare_parser_variables if
6178 push or pure mode.
6179 (yypushparse): Add b4_declare_parser_variables.
6180 Init new local variables, and remove init code for removed
6181 yypvars variables.
6182 (yyparse): Delete.
6183 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6184 and yyparse for other modes.
6185 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6186 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6187 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6188 (AT_PURE_LEX_IF): True if pure or push parser.
6189
85894313
JD
61902006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6191
6192 Document Yacc prologue alternatives and default %destructor's and
6193 %printer's as experimental. Don't mention Java yet. Discussed at
6194 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6195 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6196 (2.3a): Annotate this entry to say the old forms of these features were
6197 also experimental.
6198 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 6199 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
6200 of Java (we'll want this back eventually).
6201
02975b9a
JD
62022006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6203
6204 Support a file name argument to %defines. Deprecate `=' in
6205 %file-prefix, %name-prefix, and %output. Discussed at
6206 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6207 * NEWS (2.3a+): Mention.
148d66d8 6208 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
6209 form of %defines, and remove `=' from entries for %file-prefix,
6210 %name-prefix, and %output.
6211 * src/parse-gram.y (prologue_declaration): Implement.
6212 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6213 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6214 all but one occurrence of %name-prefix.
6215 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6216 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6217 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6218 occurrence of each of %file-prefix and %output. Add check for %defines
6219 with argument.
6220 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6221 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6222 Remove the `=' from %output.
6223
287b314e
JD
62242006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6225
6226 Don't escape $ in test case titles since Autoconf 2.61 now does that
6227 correctly.
6228 * tests/actions.at (Default %printer and %destructor are not for error
6229 or $undefined): Here.
6230 (Default %printer and %destructor are not for $accept): Here.
6231 * tests/input.at (Invalid $n and @n): Here.
6232
3ebecc24
JD
62332006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6234
6235 Rename <!> to <>. Discussed starting at
6236 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6237 * NEWS (2.3a+): Update.
148d66d8 6238 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
6239 Update.
6240 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6241 * src/scan-gram.l (INITIAL): Implement.
6242 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6243 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6244 comment.
6245 * tests/actions.at (Default tagless %printer and %destructor,
6246 Default tagged and per-type %printer and %destructor,
6247 Default %printer and %destructor are not for error or $undefined,
6248 Default %printer and %destructor are not for $accept,
6249 Default %printer and %destructor for mid-rule values): Update.
6250 * tests/input.at (Default %printer and %destructor redeclared,
6251 Unused values with default %destructor): Update.
6252
26b8a438
JD
62532006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6254
6255 Don't let %prec take a nonterminal.
6256 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6257 token.
6258 * tests/input.at (%prec takes a token): New test checking that %prec
6259 won't take a nonterminal.
6260
07c39ae9
JD
62612006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6262
405d53b7
JD
6263 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6264 it was double-quoted.
07c39ae9
JD
6265 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6266 grammar is maintained with Bison's highest standards.
6267 * src/getargs.c: Fix some typos in Doxygen comments.
6268
580b8926
JD
62692006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6270
6271 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6272 later. Reported by Paul Eggert in
6273 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6274 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6275 * src/scan-code.l (translate_action): Don't bother invoking
6276 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6277 (code_scanner_free): Instead of invoking
6278 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6279 which frees more.
6280 * src/scan-gram.l (gram_scanner_free): Likewise.
6281 * src/scan-skel.l (scan_skel): Likewise.
6282
4502eadc
JD
62832006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6284
6285 * src/files.c (tr): Change return type to void.
6286 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6287 has been called previously for the same key.
6288 (muscle_find): Return storage instead of value so that
6289 --enable-gcc-warnings doesn't produce warnings that the return discards
6290 const. aver that the value and storage are the same since storage
6291 could potentially be NULL when value is not.
6292 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6293 same as 0.
6294
7746c8f6
PE
62952006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6296
6297 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6298 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6299 us a slightly cleaner distribution, and also works.
6300 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6301 gnulib changes.
6302
eb095650
PE
63032006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6304 and Paul Eggert <eggert@cs.ucla.edu>
6305
6306 Don't let Bison leak memory except when it complains.
6307 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6308 (spec_defines_file, dir_prefix): Now char *, not const char *,
6309 since they are freed.
6310 * src/files.c: Likewise.
6311 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6312 Likewise.
6313 (tr): Now operates in-place. All uses changed.
6314 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6315 values.
6316 (compute_file_name_parts, compute_output_file_names): Don't store
6317 read-only data in variables that will be freed.
6318 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6319 src_extension, and header_extension.
6320 (output_file_names_free): New public function to free
6321 spec_verbose_file, spec_graph_file, spec_defines_file,
6322 parser_file_name, and dir_prefix.
6323 * src/getargs.c (getargs): Don't store read-only data in variables that
6324 will be freed.
6325 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6326 (which previously existed but was unused), and quotearg_free.
6327 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6328 * src/muscle_tab.c: Likewise.
6329 (muscle_entry): Make the value char const *,
6330 and add a new storage member that is char * and can be freed.
6331 (muscle_entry_free): New private function.
6332 (muscle_init): Use it instead of free.
6333 (muscle_insert, muscle_grow): Update and use new storage member.
6334 (muscle_code_grow): Free the string passed to muscle_grow
6335 since it's not needed anymore.
6336 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6337 add a new `char *code' member.
6338 ("{...}"): Declare semantic type as code.
6339 * src/scan-code.h (translate_rule_action):
6340 (translate_symbol_action, translate_code, translate_action): Return
6341 `char const *' rather than `char *' since external code should not free
6342 these strings.
6343 * src/scan-code.l: Likewise.
6344 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6345 which is "{...}" in the parser.
6346 * tests/Makefile.am (maintainer-check-valgrind): Set
6347 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6348 Valgrind.
6349 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6350 complain.
6351 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6352 expecting a non-zero exit status sets --leak-check=summary and
6353 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6354 this case, and we don't want to hear about it.
6355
ac564be4
PE
63562006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6357
6358 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6359 instead of from the template, to simplify configuration a bit.
6360 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6361 and m4/wint_t.m4, as they are needed with the latest gnulib.
6362
17bd8a73
JD
63632006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6364
6365 Disable unset/unused mid-rule value warnings by default, and recognize
6366 --warnings=midrule-values to enable them. Discussed starting at
6367 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6368 * NEWS (2.3a+): Mention.
6369 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6370 warnings): Add entry for midrule-values subargument.
6371 * src/reader.c (symbol_should_be_used): Don't return true just because
6372 the value is a set/used mid-rule value unless
6373 --warnings=midrule-values was specified.
6374 * tests/input.at (Unused values, Unused values before symbol
6375 declarations): Run tests with and without --warnings=midrule-values.
6376
6377 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6378 than LIST_FREE directly.
6379
89eb3c76
JD
63802006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6381
6382 Finish implementing --warnings=error, which should not be implied by
6383 --warnings=all (or by its synonyms -W and --warnings without
6384 subarguments).
6385 * src/complain.c (set_warning_issued): New function to report that
6386 warnings are being treated as errors and to record an error if so.
6387 Invoke...
6388 (warn_at, warn): ... here.
6389 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6390 "error - warnings are errors" does not appear above "all - all of the
6391 above".
6392 (getargs): For -W and --warnings without subarguments, don't let
6393 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6394 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6395
ba7560e2
JD
63962006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6397
6398 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6399 empty subargument list. For example: `bison --warnings= parser.y'.
6400
31283fc3
JD
64012006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6402
6403 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6404 the parser header file so that gcc doesn't warn.
6405
12e35840
JD
64062006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6407
6408 Split the default %destructor/%printer into two kinds: <*> and <!>.
6409 Discussed starting at
6410 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6411 * NEWS (2.3a+): Mention.
6412 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6413 previous change today related to mid-rules.
148d66d8 6414 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 6415 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
6416 (TYPE_TAG_ANY): Add as <*>.
6417 (TYPE_TAG_NONE): Add as <!>.
6418 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6419 for <*> and <!>.
6420 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6421 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6422 * src/symlist.c (symbol_list_default_new): Split into tagged and
6423 tagless versions.
6424 (symbol_list_destructor_set, symbol_list_printer_set): Split
6425 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6426 SYMLIST_DEFAULT_TAGLESS.
6427 * src/symlist.h: Update symbol_list_default*_new prototypes.
6428 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6429 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6430 * src/symtab.c (default_destructor, default_destructor_location,
6431 default_printer, default_printer_location): Split each into tagged and
6432 tagless versions.
6433 (symbol_destructor_get, symbol_destructor_location_get,
6434 symbol_printer_get, symbol_printer_location_get): Implement tagged
6435 default and tagless default cases.
6436 (default_destructor_set, default_printer_set): Split each into tagged
6437 and tagless versions.
6438 * src/symtab.h: Update prototypes.
6439 * tests/actions.at (Default %printer and %destructor): Rename to...
6440 (Default tagless %printer and %destructor): ... this, and extend.
6441 (Per-type %printer and %destructor): Rename to...
6442 (Default tagged and per-type %printer and %destructor): ... this, and
6443 extend.
6444 (Default %printer and %destructor for user-defined end token): Extend.
6445 (Default %printer and %destructor are not for error or $undefined):
6446 Update.
6447 (Default %printer and %destructor are not for $accept): Update.
6448 (Default %printer and %destructor for mid-rule values): Extend.
6449 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6450 (Unused values with default %destructor): Extend.
6451
f91b1629
JD
64522006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6453
6454 Don't apply the default %destructor/%printer to an unreferenced midrule
6455 value. Mentioned at
6456 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6457 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6458 like $@n instead of just @n so that the default %destructor/%printer
6459 logic doesn't see them as user-defined symbols.
6460 (symbol_is_dummy): Check for both forms of the name.
6461 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6462 name for which the midrule value is referenced in any action.
6463 * tests/actions.at (Default %printer and %destructor for mid-rule
6464 values): New test.
6465 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6466 for change to dummy symbol names.
6467
519d0004
JD
64682006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6469
6470 Warn about unset midrule $$ if the corresponding $n is used.
6471 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6472 $n usage.
6473 (packgram): Before invoking grammar_rule_check on any rule, make sure
6474 all actions have already been scanned in order to set `used' flags.
6475 Otherwise, checking that a midrule's $$ is set will not always work
6476 properly because the midrule check must forward-reference the midrule's
6477 parent rule.
6478 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6479 warning.
6480
a501eca9
JD
64812006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6482
6483 More improvements to the documentation of the prologue alternatives:
6484 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6485 Bison manual.
6486 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6487 some text to clarify the relative importance of the new directives and
6488 to show how these directives may be viewed as code labels.
6489
2cbe6b7f
JD
64902006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6491
6492 Similar to the recently removed %before-header, add %code-top as the
6493 alternative to the pre-prologue. Mentioned at
6494 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6495 Also, let the prologue alternatives appear in the grammar section.
6496 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6497 (prologue_declaration): Move the existing prologue alternatives to...
6498 (grammar_declaration): ... here and add %code-top.
6499 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6500
6501 Clean up and extend documentation for the prologue alternatives.
6502 * NEWS (2.3a+): Describe prologue alternatives.
6503 * doc/bison.texinfo (Prologue): Move discussion of prologue
6504 alternatives to...
6505 (Prologue Alternatives): ... this new section, and extend it to discuss
6506 all 4 directives in detail.
148d66d8
JD
6507 (Table of Symbols): Clean up discussion of prologue alternatives and
6508 add %code-top.
2cbe6b7f 6509
e557d3ea
JMG
65102006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6511
6512 DJGPP specific issues.
6513
6514 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6515 config.bat accordingly.
6516 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6517 * djgpp/config.site: Likewise.
6518
136a0f76
PB
65192006-10-16 Paolo Bonzini <bonzini@gnu.org>
6520
27bd5d67
PB
6521 Replace %*-header with %provides, %requires, %code. See discussion at
6522 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6523
136a0f76
PB
6524 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6525 (b4_user_start_header): Remove.
6526 * data/glr.c: Use new macros instead of b4_*start_header
6527 and b4_*end_header.
6528 * data/glr.cc: Likewise.
6529 * data/lalr1.cc: Likewise.
6530 * data/push.c: Likewise.
6531 * data/yacc.c: Likewise.
6532
6533 * doc/bison.texinfo: Remove %before-header, rename
6534 %{start,end,after}-header to %requires, %provides, %code.
6535
6536 * src/parse-gram.y: Likewise (also rename token names accordingly).
6537 * src/scan-gram.l: Likewise.
6538 * tests/actions.at: Likewise.
6539
10f429ef
PE
65402006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6541
6542 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6543 Problem reported by Joel E. Denny.
6544
65452006-10-14 Jim Meyering <jim@meyering.net>
6546
6547 (Sync from coreutils.)
6548 Work also when the working directory (with e.g. coreutils sources)
6549 is version controlled with git, rather than CVS.
6550 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6551 rather than CVS.
6552 In messages and comments, say e.g., "checked-out sources",
6553 rather than "CVS sources".
6554 (version_controlled_file): New function. Work for git as well as
6555 for CVS. Don't use grep's -q option.
6556 (slurp): Call it here, in place of CVS-specific code.
6557
c4bd5bf7
JD
65582006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6559
6560 Fix testsuite for ./configure --enable-gcc-warnings:
6561 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6562 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6563 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6564 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6565 * test/regression.at (Diagnostic that expects two alternatives):
6566 Likewise.
6567
46356ea4
PE
65682006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6569
231ed89a
PE
6570 * bootstrap.conf (gnulib_modules): Add config-h.
6571 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6572 worry about HAVE_CONFIG_H.
6573 * lib/abitset.c: Likewise.
6574 * lib/bitset.c: Likewise.
6575 * lib/bitset_stats.c: Likewise.
6576 * lib/bitsetv-print.c: Likewise.
6577 * lib/bitsetv.c: Likewise.
6578 * lib/ebitset.c: Likewise.
6579 * lib/get-errno.c: Likewise.
6580 * lib/lbitset.c: Likewise.
6581 * lib/subpipe.c: Likewise.
6582 * lib/timevar.c: Likewise.
6583 * lib/vbitset.c: Likewise.
6584 * lib/bitset.c: Include "bitset.h" first, to test interface.
6585 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6586 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6587 * lib/bitsetv.c: Include "bitsetv.h" first.
6588 * lib/get-errno.c: Include "get-errno.h" first.
6589 * m4/.cvsignore: Add config-h.m4.
6590 * tests/actions.at (Default %printer and %destructor for ...):
6591 Adjust expected line numbers in output to reflect removal of #if
6592 HAVE_CONFIG_H lines.
6593 * tests/glr-regression.at (Missed %merge type warnings when ...):
6594 Likewise.
6595 * tests/regression.at (Braced code in declaration in rules section):
6596 Likewise.
6597 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6598 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6599 Include <config.h> unconditionally.
6600
46356ea4
PE
6601 * bootstrap: Sync from coreutils, as follows:
6602
6603 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6604
6605 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6606 variable was sometimes used without being initialized. This
6607 messed up the installation of the INSTALL file in some cases.
6608
6609 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6610
6611 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6612 --copy. Inspired by a suggestion from Bruno Haible.
6613
6614 2006-10-03 Jim Meyering <jim@meyering.net>
6615
6616 * bootstrap: Undo last change to this file, since now gnulib-tool
6617 sticks with the automake default in generating dependencies.
6618
dd4bf078
PE
66192006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6620
cf2a5f7c
PE
6621 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6622 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6623
6624 * doc/bison.1: Add copyright notice.
6625
6626 * data/glr.c: Don't include <stdarg.h>; not used.
6627
35fe0834
PE
6628 * NEWS: The -g and --graph options now output graphs in Graphviz
6629 DOT format, not VCG format.
6630 * doc/bison.1: Likewise.
6631 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
6632 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6633 of this change in
6634 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
6635 * TODO: Remove Graphviz entry.
6636 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6637 remove vcg.c, vcg.h, vcg_defaults.h.
6638 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6639 * src/graphviz.c, src/graphviz.h: New files.
6640 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6641 * src/files.h: Make comment more generic.
6642 * src/main.c (main): Likewise.
6643 * src/print_graph.h: Likewise.
6644 * src/getargs.c (usage): Make usage description more generic.
6645 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6646 (static_graph, fgraph): Remove. All uses changed to pass
6647 arguments instead of sharing a static var.
6648 (print_core, print_actions, print_state, print_graph):
6649 Output graphviz format rather than VCG format.
6650 * tests/.cvsignore: Remove *.vcg; add *.dot.
6651 * tests/output.at: Expect *.dot files, not *.vcg files.
6652
dd4bf078
PE
6653 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6654 accommodates the 2006-10-08 change.
6655
efdd7421
PE
66562006-10-11 Bob Rossi <bob@brasko.net>
6657
6658 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6659 (b4_yyssa, b4_yyerror_range): New macros.
6660 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6661 (yypvarsinit): Remove init of removed fields.
6662 (yypushparse): Remove use of removed fields; use new macros instead.
6663
96a1981a
PE
66642006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6665
6666 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6667 in a push parser. Reindent slightly to match yacc.c better.
6668
66692006-10-11 Bob Rossi <bob@brasko.net>
6670
46356ea4
PE
6671 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6672 yymsg_alloc fields.
6673 (yypvarsinit, yypushparse): Remove init of removed fields.
6674 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 6675
c1630a8b
PE
66762006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6677
6678 * THANKS: Add Paolo Bonzini and Bob Rossi.
6679
90b9908d
PB
66802006-10-08 Paolo Bonzini <bonzini@gnu.org>
6681
6682 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6683 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6684 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6685 b4_define_user_cde and uses): Remove.
6686 (b4_comment, b4_prefix, b4_sync_start): New.
6687 * data/bison.m4: New file, with most of the content removed from c.m4.
6688 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6689 * src/output.c (output_skeleton): Pass bison.m4.
6690 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6691 only if specified.
6692
cf806753
PE
66932006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6694
6695 Fix test failure reported by Tom Lane in
6696 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6697 and try to make such failures easier to catch in the future.
6698 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6699 that's now the caller's responsibility.
6700 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6701 Set yychar = YYEOF if it's negative.
6702 * tests/actions.at (yylex): Abort if asked to read past EOF.
6703 * tests/conflicts.at (yylex): Likewise.
6704 * tests/cxx-type.at (yylex): Likewise.
6705 * tests/glr-regression.at (yylex): Likewise.
6706 * tests/input.at (yylex): Likewise.
6707 * tests/regression.at (yylex): Likewise.
6708 * tests/torture.at (yylex): Likewise.
6709
0e2f006a
PE
67102006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6711
6712 Fix problems with translating English-language diagnostics.
6713 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6714 respect to bison-runtime pot generation. The YY_ stuff
6715 wasn't being captured.
6716 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6717 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6718 * runtime-po/POTFILES.in: Add data/push.c.
6719
e3ddc1e3
PE
67202006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6721
6722 Merge bootstrap changes from coreutils.
6723
6724 2006-09-28 Jim Meyering <jim@meyering.net>
6725
6726 Automatically generated dependencies are important even
6727 when all of the sources in a directory come from gnulib.
6728 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6729 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6730
6731 2006-09-23 Jim Meyering <jim@meyering.net>
6732
6733 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6734
6735 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6736
6737 * bootstrap: Add support for --force.
6738 (usage): New function. Describe usage less tersely.
6739 (CVS_only_file): New var.
6740
01e972b3
PE
67412006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6742
6743 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6744 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6745 Adjust white space and comments to match GNU style better.
6746
c63d3e90
PE
67472006-09-20 Bob Rossi <bob@brasko.net>
6748
6749 * data/push.c (yyresult_get): Remove function.
6750 (YYPUSH_MORE): Add #define.
6751 (yypushparse): Modify return value.
6752
e70f46d1
PE
67532006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6754
6755 * stamp-h.in: Remove; no longer needed.
6756 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6757 Remove config.h, config.hin, intl (no longer created).
6758 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6759 stamp-h1.
6760
6761 Sync bootstrap from coreutils, as follows:
6762
6763 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6764
6765 * bootstrap (symlink_to_gnulib): New function.
6766 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6767 to copies-of-gnulib.
6768 (cp_mark_as_generated, slurp, gnulib_files):
6769 Avoid making a copy if it's the same as the old version.
6770 (gnulib_files): Add support for this variable (used by Bison).
6771
a92be413
PE
67722006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6773
6774 * src/getargs.c (usage): Rework to use conventions similar to
6775 coreutils, to make translation a bit easier and the code a bit
6776 smaller. Problem reported by Tim Van Holder.
6777
4f82b42a
PE
67782006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6779
3b2942e6
PE
6780 Use some of gnulib's new modules, taken from coreutils.
6781
6782 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6783 * bootstrap.conf: New file.
6784 (gnulib_modules): Add configmake, inttypes, unistd.
6785 (XGETTEXT_OPTIONS): Add complain, complain_at,
6786 fatal, fatal_at, warn, warn_at, unexpected_end.
6787 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6788 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6789 (gl_EARLY): Add.
6790 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6791 (gl_INIT): Add
6792 (GNULIB_AUTOCONF_SNIPPET): Remove.
6793 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6794 the pickiest.
6795 * lib/.cvsignore: Add inttypes_.h.
6796 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6797 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6798 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6799 no-longer-necessary initializations.
6800 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6801 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6802 use the unistd module.
6803 * src/system.h: Likewise.
6804 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6805 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6806 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6807 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6808 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6809 * src/system.h: Include inttypes.h unconditionally, now that we
6810 use the inttypes module. Don't bother to include stdint.h, since
6811 inttypes.h now does that for us.
6812 (LOCALEDIR): Remove, now that we use the configmake module.
6813 * src/getargs.c: Include configmake.h.
6814 * src/main.c: Likewise.
6815 * src/output.c: Likewise.
6816 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6817 not from $abs_top_builddir, since config.h moved.
6818
6819
4f82b42a
PE
6820 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6821 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6822
6823 * src/parse-gram.y (symbol_declaration): Don't put statements
6824 before declarations; it's not portable to C89.
6825 * src/scan-code.l (handle_action_at): Likewise.
6826
6827 * src/scan-code.l: Always initialize braces_level; the old code
6828 left it uninitialized and therefore had undefined behavior.
6829
6830 Don't attempt to redefine 'assert', since it runs afoul of
6831 systems where standard headers (mistakenly) include <assert.h>.
6832 Instead, define and use our own alternative, called 'aver'.
6833 * src/reader.c: Don't include assert.h, since we no longer
6834 use assert.
6835 * src/scan-code.l: Likewise.
6836 * src/system.h (assert): Remove, replacing with....
6837 (aver): New function, taking a bool arg. All uses changed.
6838 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6839 not merely an integer.
6840
31c10e38
PE
68412006-09-15 Bob Rossi <bob@brasko.net>
6842
e5926647
JD
6843 Add support for push parsing. Based on the original work of
6844 Odd Arild Olsen <oao@fibula.no>.
31c10e38
PE
6845 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6846 * data/c.m4 (YYPUSH): New.
6847 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
e5926647 6848 * data/push.c: New file.
31c10e38
PE
6849 * src/getargs.c (push_parser): New var.
6850 * src/getargs.h (push_parser): New declaration.
6851 * src/output.c (prepare): Add macro insertion of `push_flag'.
6852 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6853 (prologue_declaration): Parse %push-parser.
6854 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6855 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6856 list of removed lines from the traces observed.
6857 (AT_CHECK_CALC_LALR): Added push parser tests.
6858
fa7b79c0
PE
68592006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6860
21fe08ca
PE
6861 * NEWS: Version 2.3a.
6862 * configure.ac (AC_INIT): Likewise.
6863
e8ec4d9b
PE
6864 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6865 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6866 due to header ordering dependencies. I don't know why the #define
6867 was there.
6868
fa7b79c0
PE
6869 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6870 runtime cost when YYDEBUG is not defined, and so that some tests
6871 that used to fail now work. Problem and initial suggestion by
6872 Paolo Bonzini.
6873 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6874 * data/glr.cc (b4_parser_class_name):
6875 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6876 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6877 (yydebug_) [YYDEBUG]: New member.
6878 (yycdebug_): Now defined only if YYDEBUG.
6879 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6880 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6881 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6882 if YYYDEBUG.
6883 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6884 Define only if YYDEBUG.
6885 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6886 set_debug_level.
6887 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6888 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6889 AT_CHECK_CALC_GLR_CC that are working now.
6890
4ec13d60
PE
68912006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6892
6893 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6894 We don't need them in glr.cc, and glr.c defines them.
6895 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6896 assumes that defining it to anything is the same as defining
6897 it to 1. Problem reported by Paolo Bonzini.
6898
8e1687ae
PE
68992006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6900
6901 * data/c.m4 (b4_null, b4_case): Define.
6902 * src/output.c (prepare_symbols): Use b4_null.
6903 (user_actions_output): Use b4_case.
6904
3dc5e96b
PE
69052006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6906
aef3da86
PE
6907 * data/glr.c (b4_shared_declarations): Put start-header first,
6908 before any #includes that we generate, so that feature-test
6909 macros work. Problem reported by Michael Deutschmann in
6910 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6911 * data/lalr1.cc: Likewise.
6912 * doc/bison.texinfo (Prologue): Document that feature-test macros
6913 should be defined before any Bison declarations.
6914 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6915 that depend on location.hh after, not before, Bison decls, since
6916 we now include location.hh after the first user prologue.
6917
3dc5e96b
PE
6918 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6919 Sander Brandenburg in
6920 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6921 Also, fix minor white space and comment issues.
aef3da86
PE
6922 (Prologue): Mention that it's better to define feature-test macros
6923 before Bison declarations. Problem reported by Michael Deutschmann.
6924
6925 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6926 by Jim Meyering.
6927 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6928 This adjusts to recent gnulib changes.
3dc5e96b 6929
b2a0b7ca
JD
69302006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6931
6932 Finish implementation of per-type %destructor/%printer. Discussed
6933 starting at
6934 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6935 and
6936 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6937 * NEWS (2.3+): Add a description of this feature to the default
6938 %destructor/%printer description.
6939 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6940 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6941 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6942 list node contains a semantic type.
6943 * src/symtab.c, src/symtab.h: Extend with a table that associates
6944 semantic types with their %destructor's and %printer's.
6945 (semantic_type_from_uniqstr, semantic_type_get,
6946 semantic_type_destructor_set, semantic_type_printer_set): New functions
6947 composing the public interface of that table.
6948 (symbol_destructor_get, symbol_destructor_location_get,
6949 symbol_printer_get, symbol_printer_location_get): If there's no
6950 per-symbol %destructor/%printer, look up the per-type before trying
6951 the default.
6952 * tests/actions.at (Per-type %printer and %destructor): New test case.
6953 * tests/input.at (Default %printer and %destructor redeclared):
6954 Extend to check that multiple occurrences of %symbol-default in a
6955 single %destructor/%printer declaration is an error.
6956 (Per-type %printer and %destructor redeclared, Unused values with
6957 per-type %destructor): New test cases.
6958
3be03b13
JD
69592006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6960
6961 Require default %destructor/%printer to be declared using
6962 %symbol-default instead of an empty symbol list, and start working on
6963 new per-type %destructor/%printer. Discussed at
6964 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6965 * NEWS (2.3+): Add %symbol-default to example.
6966 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 6967 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
6968 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6969 (generic_symlist, generic_symlist_item): New nonterminals for creating
6970 a list in which each item is a symbol, semantic type, or
6971 %symbol-default.
6972 (grammar_declaration): Use generic_symlist in %destructor and %printer
6973 declarations instead of symbols.1 or an empty list.
6974 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6975 for changes to symbol_list.
6976 * src/reader.c: Update for changes to symbol_list.
6977 * src/scan-code.l: Likewise.
6978 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6979 * src/symlist.c, src/symlist.h: Extend such that a list node may
6980 represent a semantic type or a %symbol-default in addition to just an
6981 ordinary symbol. Add switched functions for setting %destructor's and
6982 %printer's.
6983 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6984 %destructor/%printer declarations.
6985
3508ce36
JD
69862006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6987
6988 Whether the default %destructor/%printer applies to a particular symbol
6989 isn't a question of whether the user *declares* that symbol (in %token,
6990 for example). It's a question of whether the user by any means
6991 *defines* the symbol at all (by simply using a char token, for
6992 example). $end is defined by Bison whereas any other token with token
6993 number 0 is defined by the user. The error token is always defined by
6994 Bison regardless of whether the user declares it with %token, but we
6995 may one day let the user define error as a nonterminal instead.
6996 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6997 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6998 the meaning of "user-defined".
6999 * tests/actions.at (Default %printer and %destructor for user-declared
7000 end token): Rename to...
7001 (Default %printer and %destructor for user-defined end token): ...
7002 this.
7003
7004 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7005 computation of whether to apply the default, don't maintain a list of
7006 every Bison-defined symbol. Instead, just check for a first character
7007 of '$', which a user symbol cannot have, and check for the error token.
7008
9350499c
JD
70092006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7010
7011 Don't apply the default %destructor or %printer to the error token,
7012 $undefined, or $accept. This change fits the general rule that the
7013 default %destructor and %printer are only for user-declared symbols,
7014 and it solves several difficulties that are described in the new test
7015 cases listed below.
7016 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7017 * tests/actions.at (Default %printer and %destructor are not for error
7018 or $undefined, Default %printer and %destructor are not for $accept):
7019 New test cases.
7020
4d7370cb
JD
70212006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7022
7023 Allow %start after the first rule.
7024 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7025 when parsing the first rule.
7026 (check_and_convert_grammar): Search for it here after all grammar
7027 declarations have been parsed. Skip midrules, which have dummy LHS
7028 nonterminals.
7029 * src/symtab.c (symbol_is_dummy): New function.
7030 * src/symtab.h (symbol_is_dummy): Declare it.
7031 * tests/input.at (%start after first rule): New test.
7032
6d0ef4ec
JD
70332006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7034
7035 Redo some of the previous commit: add back the ability to use
7036 non-aliased/undeclared string literals since it might be useful to
7037 those declaring %token-table.
7038 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7039 commit: don't worry about complaints from symbols_pack.
7040 * src/symtab.c (symbol_new, symbol_class_set,
7041 symbol_check_alias_consistency): Undo changes in previous commit: count
7042 each string literal as a new symbol and token, assign it a symbol
7043 number, and don't complain about non-aliased string literals.
7044 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7045 and token counts but does still set aliased tokens to the same number,
7046 symbol_pack_processor now leaves empty slots in the symbols array.
7047 Remove those slots.
7048 * tests/regression.at (Undeclared string literal): Remove test case
7049 added in previous commit since non-aliased string literals are allowed
7050 again.
7051 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7052 remove unnecessary string literal declarations.
7053 * tests/sets.at (Firsts): Likewise.
7054
965537bc
JD
70552006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7056
7057 Don't allow an undeclared string literal, but allow a string literal to
7058 be used before its declaration.
7059 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7060 symbols_pack complained.
7061 * src/symtab.c (symbol_new): Don't count a string literal as a new
7062 symbol.
7063 (symbol_class_set): Don't count a string literal as a new token, and
7064 don't assign it a symbol number since symbol_make_alias does that.
7065 (symbol_make_alias): It's not necessary to decrement the symbol and
7066 token counts anymore. Don't assume that an alias declaration occurs
7067 before any uses of the identifier or string, and thus don't assert that
7068 one of them has the highest symbol number so far.
7069 (symbol_check_alias_consistency): Complain if there's a string literal
7070 that wasn't declared as an alias.
7071 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7072 symbol_pack asserts that every token has been assigned a symbol number
7073 although undeclared string literals have not.
7074 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 7075 string literal): New test cases.
965537bc
JD
7076 (Characters Escapes, Web2c Actions): Declare string literals as
7077 aliases.
7078 * tests/sets.at (Firsts): Likewise.
7079
47aee066
JD
70802006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7081
7082 In the grammar scanner, STRING_FINISH unclosed constructs and return
7083 them to the parser in order to improve error messages.
7084 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7085 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7086 * tests/input.at (Unclosed constructs): New test case.
7087 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7088 seen.
7089
7090 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7091 unused global.
7092
1f6b3679
JD
70932006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7094
7095 Handle string aliases for character tokens correctly.
7096 * src/symtab.c (symbol_user_token_number_set): If the token has an
7097 alias, check and set its alias's user token number instead of its own,
7098 which is set to indicate the alias. Previously, every occurrence of
7099 the character token in the grammar overwrote that alias indicator with
7100 the character code.
7101 * tests/input.at (String aliases for character tokens): New test.
7102
219741d8
JD
71032006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7104
7105 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7106
11daa4e7
PE
71072006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7108
7109 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7110 to prevent failures when building on older platforms.
7111 Check for autopoint failure.
7112 Set XGETTEXT_OPTIONS to values that check for C format strings,
7113 so that translators are warned about them (this also helps
7114 prevent core dumps).
7115
7116 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7117 function, since it simplifies our code a bit.
7118
7119 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7120 rather than -W, so we don't get bogus warnings about sign comparisons.
7121 Add -Wpointer-arith, since that warning is useful (it reports code
7122 that does not conform to C89 and that some compilers reject).
7123 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7124 since it's no longer needed.
7125
f9bfc42a
JD
71262006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7127
7128 Clean up scanners a bit.
7129 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7130 definitions so gcc won't warn when obstack_for_string is unused.
7131 * src/scan-code.l: config.h and system.h are already #include'd by
7132 scan-code-c.c, so get rid of them here.
7133 * src/scan-gram.l: Likewise.
7134 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7135 definitions rather than duplicating the rest of it.
7136 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7137
06e8700a
JD
71382006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7139
7140 Suppress signed/unsigned comparison warnings for yycheck.
7141 * data/c.m4 (b4_safest_int_type): New macro.
7142 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7143 a signed int type, cast it to b4_safest_int_type first.
7144 * data/yacc.c: Likewise.
7145 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7146 also overwritten.
7147
9c437126
PE
71482006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7149
7150 * doc/bison.texinfo: Fix some typos.
7151
284d8a13
PE
71522006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7153
7154 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7155 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7156
7157 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7158 the latest gnulib does this a different way.
7159 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7160 translation was patched, so stop omitting it.
7161
ec5479ce
JD
71622006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7163
7164 Enable declaration of default %printer/%destructor. Make the parser
7165 use these for all user-declared grammar symbols for which the user does
7166 not declare a specific %printer/%destructor. Thus, the parser uses it
7167 for token 0 if the user declares it but not if Bison generates it as
7168 $end. Discussed starting at
7169 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7170 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7171 and
7172 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7173 * NEWS (2.3+): Mention.
7174 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7175 declare a %destructor for a mid-rule's semantic value. It's just
7176 impossible to declare one specific to it.
7177 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7178 code. Describe default %destructor form.
7179 * src/parse-gram.y (grammar_declaration): Parse default
7180 %printer/%destructor declarations.
7181 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7182 and symbol_destructor_location_get rather than accessing the destructor
7183 and destructor_location members of struct symbol.
7184 (symbol_printers_output): Likewise but for %printer's.
7185 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7186 again.
7187 * src/symtab.c (default_destructor, default_destructor_location,
7188 default_printer, default_printer_location): New static global
7189 variables to record the default %destructor and %printer.
7190 (symbol_destructor_get, symbol_destructor_location_get,
7191 symbol_printer_get, symbol_printer_location_get): New functions to
7192 compute the appropriate %destructor and %printer for a symbol.
7193 (default_destructor_set, default_printer_set): New functions to set the
7194 default %destructor and %printer.
7195 * src/symtab.h: Prototype all those new functions.
7196 * tests/actions.at (Default %printer and %destructor): New test to
7197 check that the right %printer and %destructor are called, that they're
7198 not called for $end, and that $$ and @$ work correctly.
7199 (Default %printer and %destructor for user-declared end token): New
7200 test to check that the default %printer and %destructor are called for
7201 a user-declared end token.
7202 * tests/input.at (Default %printer and %destructor redeclared, Unused
7203 values with default %destructor): New tests to check related grammar
7204 warnings and errors.
7205
868d2d96
JD
72062006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7207
7208 Clean up handling of %destructor for the end token (token 0).
7209 Discussed starting at
7210 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7211 and
7212 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7213
7214 Make the skeletons consistent in how they pop the end token and invoke
7215 its %destructor.
7216 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7217 state, which has token number 0, since this would invoke the
7218 %destructor for the end token.
7219 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7220 until after shifting the end token, or else it won't be popped.
7221 * data/yacc.c (yyparse): Likewise.
7222
7223 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7224 it's the end token. Upon termination, destroy an unshifted lookahead
7225 even when it's the end token.
7226 * data/lalr1.cc (yy::parser::parse): Likewise.
7227 * data/yacc.c (yyparse): Likewise.
7228
7229 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7230 value warnings for the end token when the user gives the end token a
7231 %destructor.
7232
7233 * tests/actions.at (Printers and Destructors): Test all the above.
7234
62a9592d
PE
72352006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7236
7237 Update to latest gnulib and gettext versions.
7238 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7239 Add fopen-safer.
7240 (gnulib_files): Add m4/warning.m4. Don't worry about files
7241 overwritten by autopoint.
7242 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7243 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7244 rejects them.
7245 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7246 so that we can remove the intl files at a better time.
7247 (intl_files_to_remove): Remove aclocal.m4, since it gets
7248 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7249 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7250 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7251 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7252 Remove datarootdir hack; no longer needed.
7253 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7254 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7255 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7256 strdup.h.
7257 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7258 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7259
10d6970f
PE
72602006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7261
7262 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7263 it with --assume-autoconf='latest-stable'.
7264
50a33993
JD
72652006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7266
7267 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7268 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7269 YYSTYPE' and `{'.
7270 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7271 those from muscle_tab.c since the old ones are misleading.
7272
2ce4ed68
AD
72732006-07-13 Akim Demaille <akim@epita.fr>
7274
7275 Support %define "KEY" {VALUE}.
7276 * src/scan-code.h, src/scan-code.l (translate_action)
7277 (translate_rule_action, translate_symbol_action, translate_code):
7278 Return char *, not const char *.
7279 * src/parse-gram.y (declaration): Rename as...
7280 (prologue_declaration): this.
7281 (string_content): Remove this nonterminal, use STRING.
7282 (braceless, content, content.opt): New nonterminal.
7283 Use them.
7284 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7285 as value.
7286 * src/scan-gram.l (getargs.h): Don't include it.
7287
db7e5eb5
PE
72882006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7289
7290 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7291 rather than a for-loop that declares a local bool variable. This
7292 should work around a compatibility problem with a Cray x1e C++
7293 compiler reported by Hung Nguyen in
7294 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7295 The for-loop was introduced in the 2004-11-17 change but I don't
7296 know why it was needed.
7297
a5d80ba5
AD
72982006-07-12 Akim Demaille <akim@epita.fr>
7299
7300 * data/c.m4: Comment changes.
7301
23eb2a69
AD
73022006-07-10 Akim Demaille <akim@lrde.epita.fr>
7303
7304 * src/complain.c (error_message, ERROR_MESSAGE): New.
7305 To factor...
7306 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7307 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7308
ddc8ede1
PE
73092006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7310
7311 * NEWS: Instead of %union, you can define and use your own union type
7312 YYSTYPE if your grammar contains at least one <type> tag.
7313 Your YYSTYPE need not be a macro; it can be a typedef.
7314 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7315 (Union Decl, Decl Summary): Document this.
7316 * data/glr.c (YYSTYPE): Implement this.
7317 * data/glr.cc (YYSTYPE): Likewise.
7318 * data/lalr1.cc (YYSTYPE): Likewise.
7319 * data/yacc.c (YYSTYPE): Likewise.
7320 * src/output.c (prepare): Output tag_seen_flag.
7321 * src/parse-gram.y (declaration, grammar_declaration):
7322 Use 'union_seen' rather than 'typed' to determine whether
7323 %union has been seen, since grammars can now be typed without
7324 %union.
7325 (symbol_declaration, type.opt, symbol_def):
7326 Keep track of whether a tag has been seen.
7327 * src/reader.c (union_seen, tag_seen): New vars.
7328 (typed): remove.
7329 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7330 * src/scan-code.l (untyped_var_seen): New variable.
7331 (handle_action_dollar): Adjust to above changes.
7332 (handle_action_dollar, handle_action_at):
7333 Improve overflow checking for outlandish numbers.
7334 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7335 avoid new diagnostics generated by above changes.
7336 * tests/regression.at (YYSTYPE typedef): Add test to check
7337 for type tags without %union.
7338
7339 * src/symlist.c (symbol_list_length): Return int, not unsigned
7340 int, since callers expect int. This may need to get revisited
7341 once we have proper integer overflow checking.
7342
7343 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7344 object is now static.
7345
7346 * src/getargs.c (flags_argmatch): Return void, not int,
7347 to pacify ./configure --enable-gcc-warnings.
7348
7349 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7350 since last_string is already defined to FLEX_PREFIX (last_string).
7351
7b42569e
AD
73522006-07-09 Akim Demaille <akim@lrde.epita.fr>
7353
7354 Implement --warnings/-W.
7355 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7356 replaced by...
7357 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7358 Adjust callers.
7359 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7360 (warnings_args, warnings_types): New.
7361 (getargs, short_options, long_options): Accept -W/--warnings.
7362 Sort the options by alphabetical order, upper case letter right
7363 before its lower case.
7364
3b452f4e
JD
73652006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7366
7367 Change %merge result type clash warnings to errors. Discussed at
7368 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7369 * src/reader.c (record_merge_function_type): Use complain_at.
7370 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7371 declared later): Update test case results.
7372
b8a41559
AD
73732006-07-09 Akim Demaille <akim@lrde.epita.fr>
7374
7375 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7376 to be in alphabetical order.
7377 (trace_args): Spelling fixes.
7378
cd9e1ba2
PE
73792006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7380
7381 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7382 so they don't collide with user-defined macros.
7383 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7384 this was never guaranteed, and now that we're using gnulib stdint,
7385 which defines int_fast16_t to long int, the problem is exposed.
7386
cb48f191
PE
73872006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7388
b8445a15
PE
7389 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7390 need the full POSIX semantics (and weren't implementing them
7391 anyway).
7392
cb48f191
PE
7393 Adjust to Autoconf 2.60 and today's gnulib.
7394 * bootstrap (gnulib_modules): Add stdint.
7395 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7396 no longer copies it.
7397 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7398 since stdint needs the former and wcwidth (which is now required
7399 by mbswidth) needs the latter.
7400 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7401 work around a compatibility glitch between gettext 0.14.6 and
7402 Autoconf 2.60.
7403 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7404 Do not check for uintptr_t, since new stdint module does the right
7405 thing.
7406 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7407 Add stdint.h, stdint_.h, wcwidth.h.
7408 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7409 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7410 stdint.m4, wchar_t.m4, wcwidth.m4.
7411 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7412 usual order for ../lib/*.h files.
7413 (file_name_split): Use last_component, not base_name, to adjust
7414 to gnulib changes.
7415 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7416 for ../lib/*.h files.
7417 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7418 Define unconditionally, since we now assume the stdint module.
7419 * src/scan-skel.l: Include <dirname.h>.
7420 (BASE_QPUTS): Use last_component, not base_name.
7421 * src/system.h: Include <unlocked-io.h> in the usual order
7422 for ../lib/*.h files. Include <stdint.h> unconditionally,
7423 since we now use the stdint module.
7424 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7425 HAVE_UINTPTR_T, since we now use the stdint module.
7426 (base_name): Remove decl, since files now include <dirname.h>
7427 to get the decl.
7428
cd48d21d
AD
74292006-07-08 Akim Demaille <akim@lrde.epita.fr>
7430
7431 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7432 New, default to 1.
7433 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7434 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7435 default.
7436 * tests/calc.at: Adjust.
7437
8ec0a172
AD
74382006-07-08 Akim Demaille <akim@lrde.epita.fr>
7439
b8445a15 7440 * data/c.m4 (b4_basename): New.
8ec0a172
AD
7441 (b4_syncline): Also output the location of its invocation (from
7442 the skeleton).
7443 (b4_user_action, b4_define_user_action, b4_user_actions)
7444 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7445 (b4_user_stype): New.
7446 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7447
4a678af8
JD
74482006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7449
7450 In the grammar file, the first column is 1 not 0 on the first line as
7451 on every other line.
7452 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7453 * tests/input.at (Torturing the Scanner): Update output.
7454
7455 * src/scan-gram.l (scanner_cursor): Declare it static.
7456
dd60572a
JD
74572006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7458
7459 In warnings, say "previous declaration" rather than "first
7460 declaration".
7461 * src/symtab.c (redeclaration): Do that here.
7462 * src/reader.c (record_merge_function_type): In the case of a result
7463 type clash, report the previous declaration rather than the very first
7464 one in the grammar file.
7465 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7466 declared later): Add a third declaration to check this behavior.
7467 * tests/input.at (Incompatible Aliases): Update output.
7468
2073e1b6
AD
74692006-06-27 Akim Demaille <akim@epita.fr>
7470
7471 * doc/Doxyfile.in: New.
7472 * doc/Makefile.am: Use it.
7473 * src/lalr.h, src/symtab.h: Initial doxygenation.
7474
8ee5b538
JD
74752006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7476
7477 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
7478 declared after the %merge. This continues the effort of the previous
7479 patch.
8ee5b538
JD
7480 * src/reader.c (get_merge_function): Don't set the merger type yet.
7481 (record_merge_function_type): New function for setting the merger type
7482 and checking for clashes.
7483 (grammar_current_rule_merge_set): Set the location of the %merge for
7484 the current rule.
7485 (packgram): Invoke record_merge_function_type for each rule now that
7486 all symbol type declarations have been parsed.
7487 * src/reader.h (merger_list.type_declaration_location): New member
7488 storing the location of the first %merge from which the type for this
7489 merging function was derived.
7490 * src/symlist.h (symbol_list.merger_declaration_location): New member
7491 storing the location of a rule's %merge, if any.
7492 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7493 declared later): New test to catch the error fixed by the above patch.
7494
ffa4ba3a
JD
74952006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7496
7497 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
7498 declarations appear after the rules. Discussed at
7499 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7500 and
7501 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7502 Don't mistake the type of $$ in a midrule to be that of its parent
7503 rule's $$.
ffa4ba3a
JD
7504 * src/reader.c (grammar_current_rule_end): Don't invoke
7505 grammar_rule_check yet since not all symbol declarations may have been
7506 parsed yet.
7507 (grammar_midrule_action): Likewise.
7508 Don't record whether the midrule's $$ has been used yet since actions
7509 haven't been translated yet.
7510 Record the midrule's parent rule and its RHS index within the parent
7511 rule.
7512 (grammar_current_rule_action_append): Don't translate the action yet
7513 since not all symbol declarations may have been parsed yet and, thus,
7514 warnings about types for $$, $n, @$, and @n can't be reported yet.
7515 (packgram): Translate the action and invoke grammar_rule_check now that
7516 all symbol declarations have been parsed.
7517 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7518 after parsing the entire grammar file, the symbol list here in the case
7519 of a midrule is actually the midrule's empty RHS, so reference its
7520 parent rule's RHS where necessary.
7521 On the other hand, now that you can already know it's a midrule, you
7522 aren't forced to think $$ has the same type as its parent rule's $$.
7523 (handle_action_at): In the case of a midrule, reference the parent rule
7524 where necessary.
7525 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7526 members.
7527 (symbol_list_length): Now that this is invoked after all rules have
7528 been parsed, a NULL symbol (rather than a NULL symbol list node)
7529 terminates a rule. symbol_list_print already does this correctly.
7530 * src/symlist.h (symbol_list.midrule_parent_rule,
7531 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7532 remember their relationships with their parents.
7533 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7534 fixed by the above patch.
7535 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7536 implementing...
7537 (Unused values): ... this old test case and...
7538 (Unused values before symbol declarations): ... this new test case.
7539 This one is the same as `Unused values' except that all symbol
7540 declarations appear after the rules in order to catch the rest of the
7541 errors fixed by the above patch.
7542
e256e17f
JD
75432006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7544
300a1930
JD
7545 More cleanup.
7546 * src/reader.c (current_rule): Declare it static since it's no longer
7547 used outside this file.
7548 (grammar_current_rule_action_append): Remove redundant arguments from
7549 translate_rule_action invocation.
7550 * src/reader.h (current_rule): Remove this unused extern.
7551 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7552 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 7553
381ecb06
JD
75542006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7555
7556 Clean up yesterday's patch.
7557 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7558 to...
7559 * src/reader.c (grammar_current_rule_action_append): ... here for
7560 consistency with grammar_current_rule_symbol_append.
7561 * tests/regression.at (Braced code in declaration in rules section):
7562 Make yyerror and yylex static as usual.
7563
4210cd0b
JD
75642006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7565
7566 Fix bug that mistakes braced code in a declaration in the rules section
7567 to be a rule action. Mentioned at
7568 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7569 * src/scan-gram.l: Move midrule action detection from the start of the
7570 scanning of any braced code to...
7571 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7572 action. For readability, use $2 and @2 rather than the equivalent
7573 global variables.
7574 * tests/regression.at (Braced code in declaration in rules section):
7575 New test to catch the error fixed by the above patch.
7576
7577 Work on code readability some.
7578 * src/scan-code.l (current_rule): Get rid of this misleading and
7579 redundant declaration: it's actually extern'ed in reader.h.
7580 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7581 translate_action): Add a rule argument and use it instead of the global
7582 current_rule.
7583 (translate_rule_action): This already receives current_rule through an
7584 argument, so pass it on to translate_action instead of assigning
7585 current_rule to current_rule.
7586 (translate_symbol_action, translate_code): Pass rule = NULL to
7587 translate_action.
7588
34f98f46
JD
75892006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7590
7591 Rename %before-definitions to %start-header and %after-definitions to
7592 %end-header. Don't use these declarations to separate pre-prologue
7593 blocks from post-prologue blocks. Add new order-independent
7594 declarations %before-header and %after-header as alternatives to the
7595 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7596 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7597 * NEWS (2.3+): Update for these changes.
7598 * data/glr.c (b4_before_definitions): Update to...
7599 (b4_start_header): ... this.
7600 (b4_after_definitions): Update to...
7601 (b4_end_header): ... this.
7602 * data/glr.cc: Likewise.
7603 * data/lalr1.cc: Likewise.
7604 * data/yacc.c: Likewise.
7605 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7606 prologue blocks with %*-header declarations.
7607 (Calc++ Parser): Likewise.
91661ebb 7608 (Decl Summary): Update names.
148d66d8 7609 (Table of Symbols): Update description.
34f98f46
JD
7610 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7611 (PERCENT_END_HEADER): ... this.
7612 (PERCENT_BEFORE_DEFINITIONS): Update to...
7613 (PERCENT_START_HEADER): ... this.
7614 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7615 (declaration): Update token names and m4 macro names.
7616 When parsing %end-header and %start-header, invoke translate_code
7617 before muscle_code_grow, and no longer set global booleans to remember
7618 whether these declarations have been seen.
7619 Parse new %after-header and %before-header.
7620 * src/reader.c (before_definitions, after_definitions): Remove.
7621 (prologue_augment): Accept a new bool argument to specify whether to
7622 augment the pre-prologue or post-prologue.
7623 * src/reader.h (before_definitions, after_definitions): Remove these
7624 extern's.
7625 (prologue_augment): Add new bool argument.
7626 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7627 (PERCENT_END_HEADER): ... this.
7628 (PERCENT_BEFORE_DEFINITIONS): Update to...
7629 (PERCENT_START_HEADER): ... this.
7630 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7631 * tests/actions.at (Printers and Destructors): Update names.
7632
31b2b07e
JD
76332006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7634
7635 Add comparison operators for C++ location classes. Discussed at
7636 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7637 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7638 declaration indicating whether filename_type has an operator==. If
7639 filename_type is `std::string', it defaults to `1', `0' otherwise.
7640 * data/location.cc: Iff b4_define_location_comparison is `1', add
7641 operator== and operator!= for class position and for class location.
7642
7643 Some minor fixes.
7644 * src/scan-action.l: Remove unused file.
7645 * src/symtab.c (symbol_printer_set): Use printer_location not
7646 destructor_location.
7647 * src/symtab.h (struct symbol): Replace incorrect source comment for
7648 printer members.
7649 * tests/input.at (Incompatible Aliases): Update output with correct
7650 printer location.
7651
9bc0dd67
JD
76522006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7653
7654 Don't put the pre-prologue in the header file. For the yacc.c code
7655 file and the glr.c header and code files, move the pre-prologue before
7656 the token definitions. Add new %before-definitions and
7657 %after-definitions to declare code that will go in both the header file
7658 and code file. Discussed at
7659 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7660 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7661 and
7662 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7663 * NEWS (2.3+): Describe these changes.
7664 * data/glr.c (b4_pre_prologue): Move from within to before...
7665 (b4_shared_declarations): ... this.
7666 Add new b4_before_definitions before b4_token_enums.
7667 Add new b4_after_definitions at the end.
7668 * data/glr.cc (b4_pre_prologue): Replace with...
7669 (b4_before_definitions): ... this in the header file.
7670 (b4_after_definitions): New near the end of the header file.
7671 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7672 code file right before including the header file.
7673 (b4_before_definitions): New in the previous position of
7674 b4_pre_prologue in the header file.
7675 (b4_after_definitions): New near the end of the header file.
7676 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7677 (b4_token_enums_defines): In the code file, move to right before
7678 YYSTYPE for consistency with the header file.
7679 (b4_before_definitions): New right before b4_token_enums_defines in
7680 both the header and code file.
7681 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7682 header and code file.
7683 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7684 of prologues for %union dependencies.
91661ebb
JD
7685 (Decl Summary): In %defines description, mention the effect of
7686 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
7687 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7688 than in the pre-prologue so that make check succeeds.
148d66d8 7689 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
7690 %after-definitions.
7691 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7692 %before-definitions.
7693 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7694 (declaration): Parse those declarations and append to
7695 b4_before_definitions and b4_after_definitions, respectively.
7696 * src/reader.c (before_definitions, after_definitions): New bools to
7697 track whether those declarations have been seen.
7698 (prologue_augment): Add to the post-prologue if %union,
7699 %before-definitions, or %after-definitions has been seen.
7700 * src/reader.h (before_definitions, after_definitions): New extern's.
7701 * src/scan-gram.l: Scan the new declarations.
7702 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7703 prologue block in a %before-definitions or a %after-definitions based
7704 on whether the %union is declared.
7705 * tests/regression.at (Early token definitions with --yacc, Early token
7706 definitions without --yacc): Move tests for token definitions into the
7707 post-prologue since token names are no longer defined in the
7708 pre-prologue.
7709
203b9274
AD
77102006-06-20 Akim Demaille <akim@epita.fr>
7711
7712 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7713 (symbol_get): Use it.
7714 * src/parse-gram.y: Use it.
7715
a7ee59cf
JD
77162006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7717
7718 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7719 build succeeds when configured with --enable-gcc-warnings.
7720
5a2baae7
PE
77212006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7722
33ad1a9c
PE
7723 * src/parse-gram.y (char_name): New function.
7724 (CHAR, STRING, string_content): For %printer, properly escape.
7725 (ID): Prefer fputs to fprintf.
7726 (id): Reindent to be consistent with other rules.
7727 Properly quote char.
7728
5a2baae7
PE
7729 The Translation Project changed its way of publishing translations
7730 to maintainers. I haven't received any responses to my request
7731 for supporting the old way, or for documenting the new way. I
7732 have modified 'bootstrap' to use screen scraping
7733 (in this case, HTML scraping). This is unreliable and inelegant,
7734 but I don't see any better way. Yuck.
7735 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7736 (get_translations): New function, which uses HTML scraping to
7737 deduce locations of latest translations.
7738 Use this function to grab both bison and bison-runtime .po files.
7739 Don't bother priming the pump for the runtime-po domain any more,
7740 as it's now translated better than bison is.
7741
58d7a1a1
AD
77422006-06-19 Akim Demaille <akim@epita.fr>
7743
7744 * src/scan-gram.l: No longer "parse" things after `%union' until
7745 `{'. Rather, return a single "%union" token.
7746 No longer make symbols: return strings, and leave the conversion
7747 to symbols to the parser.
7748 (SC_PRE_CODE, token_type): Remove.
7749 * src/parse-gram.y (%union): New field `character'.
7750 Sort tokens.
7751 (CHAR): New token.
7752 (ID, ID_COLON): Now that the scanner no longer makes them
7753 identifiers, adjust all uses to invoke symbol_get.
7754 (id_colon): New, wraps the conversion from string to symbol.
7755 (%union): Accept a possible union_name.
7756 (symbol): Now can be a char.
7757 * data/c.m4 (b4_union_name): Leave a default value.
7758 * data/glr.c, data/yacc.c: Use it.
7759
b931235e
JD
77602006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7761
7762 For associating token numbers with token names for "yacc.c", don't use
7763 #define statements unless `--yacc' is specified; always use enum
7764 yytokentype. Most important discussions start at:
7765 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7766 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7767 and
7768 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7769 * NEWS (2.3+): Mention.
7770 * data/c.m4 (b4_yacc_if): New.
7771 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7772 token #define's.
7773 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7774 on token name definitions.
7775 * src/getargs.c (usage): Capitalize `Yacc' in English.
7776 * src/output.c (prepare): Define b4_yacc_flag.
7777 * tests/regression.at (Early token definitions): Test that tokens names
7778 are defined before the pre-prologue not just before the post-prologue.
7779 Remove this test case and copy to...
7780 (Early token definitions with --yacc): ... this to test #define's.
7781 (Early token definitions without --yacc): ... and this to test enums.
7782
9e6e7ed2
PE
77832006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7784
7785 * NEWS: Reword the post-2.3 change to not be so optimistic about
7786 removing the old "look-ahead" spelling.
7787 Update previous look-ahead/lookahead change reports.
7788 * REFERENCES: look-ahead -> lookahead (since that's
7789 what he actually wrote).
7790 * doc/refcard.tex: look ahead -> lookahead,
7791 look-ahead -> lookahead
7792
742e4900
JD
77932006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7794
7795 For consistency, use `lookahead' instead of `look-ahead' or
7796 `look_ahead'. Discussed starting at
7797 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7798 and then at
7799 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7800 * NEWS: For the next release, note the change to `--report'.
7801 * TODO, doc/bison.1: Update English.
7802 * doc/bison.texinfo: Update English.
7803 (Understanding Your Parser, Bison Options): Document as
7804 `--report=lookahead' rather than `--report=look-ahead'.
7805 * src/conflicts.c: Update English in comments.
7806 (lookahead_set): Rename from look_ahead_set.
7807 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7808 (resolve_sr_conflict): Rename local look_ahead_tokens to
7809 lookahead_tokens, and update other uses.
7810 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7811 count_rr_conflicts, conflicts_free): Update uses.
7812 * src/getargs.c (report_args): Move "lookahead" before alternate
7813 spellings.
7814 (report_types): Update uses.
7815 (usage): For `--report' usage description, state `lookahead' spelling
7816 rather than `look-ahead'.
7817 * src/getargs.h (report.report_lookahead_tokens): Rename from
7818 report_look_ahead_tokens.
7819 * src/lalr.c: Update English in comments.
7820 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7821 (state_lookahead_tokens_count): Rename from
7822 state_look_ahead_tokens_count.
7823 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7824 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7825 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7826 Update other uses.
7827 Update English in output.
7828 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7829 * src/print.c: Update English in comments.
7830 (lookahead_set): Rename from look_ahead_set.
7831 (print_reduction): Rename argument lookahead_token from
7832 look_ahead_token.
7833 (print_core, state_default_rule, print_reductions, print_results):
7834 Update uses.
7835 * src/print_graph.c: Update English in comments.
7836 (print_core): Update uses.
7837 * src/state.c: Update English in comments.
7838 (reductions_new): Update uses.
7839 (state_rule_lookahead_tokens_print): Rename from
7840 state_rule_look_ahead_tokens_print, and update other uses.
7841 * src/state.h: Update English in comments.
7842 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7843 (state_rule_lookahead_tokens_print): Rename from
7844 state_rule_look_ahead_tokens_print.
7845 * src/tables.c: Update English in comments.
7846 (conflict_row, action_row): Update uses.
7847 * tests/glr-regression.at
7848 (Incorrect lookahead during deterministic GLR,
7849 Incorrect lookahead during nondeterministic GLR): Rename
7850 print_look_ahead to print_lookahead.
7851 * tests/torture.at: Update English in comments.
7852 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7853 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7854 (Many lookahead tokens): Update uses.
7855 * data/glr.c: Update English in comments.
7856 * lalr1.cc: Likewise.
7857 * yacc.c: Likewise.
7858 * src/conflicts.h: Likewise.
7859 * src/lalr.h: Likewise.
7860 * src/main.c: Likewise.
7861 * src/output.c: Likewise.
7862 * src/parse-gram.c: Likewise.
7863 * src/tables.h: Likewise.
7864 * tests/calc.at: Likewise.
7865
3c40d0b5
JD
78662006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7867
7868 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7869
5d278082
PE
78702006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7871
7872 * TODO: Add request from Nelson H. F. Beebe to be able to install
7873 Bison without installing the yacc script.
7874
9e668899
JD
78752006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7876
7877 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7878 and yytext if they're already #define'd.
7879 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7880 * src/scan-code-c.c: ... here.
7881 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7882 <config.h>.
7883
0c8e079f
JD
78842006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7885
7886 Get Bison to build again when configured with --enable-gcc-warnings.
7887 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7888 missing #include's.
7889 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7890 loc argument as it shadows a global.
7891 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7892 invocation.
7893
7894 * src/.cvsignore: Add scan-code.c.
7895
2346344a
AD
78962006-06-07 Akim Demaille <akim@epita.fr>
7897
7898 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7899 to...
7900 * src/scan-code.l: here.
7901 * tests/input.at (Torturing the Scanner): Fix another location
7902 error.
7903
4862bdfd
AD
79042006-06-07 Akim Demaille <akim@epita.fr>
7905
7906 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7907
e9071366
AD
79082006-06-06 Akim Demaille <akim@epita.fr>
7909
7910 Extract the parsing of user actions from the grammar scanner.
7911 As a consequence, the relation between the grammar scanner and
7912 parser is much simpler. We can also split "composite tokens" back
7913 into simple tokens.
7914 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7915 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7916 rename as...
7917 * src/location.h, src/location.c (add_column_width)
7918 (location_compute): these.
7919 Fix the column count: the initial column is 0.
7920 (location_print): Be robust to ending column being 0.
7921 * src/location.h (boundary_set): New.
7922 * src/main.c: Adjust to scanner_free being renamed as
7923 gram_scanner_free.
7924 * src/output.c: Include scan-code.h.
7925 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7926 Use boundary_set.
7927 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7928 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7929 which is now, again, a separate token.
7930 Adjust all dependencies.
7931 Whereever actions with $ and @ are used, use translate_code.
7932 (action): Remove this nonterminal which is now useless.
7933 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7934 (grammar_current_rule_action_append): Use translate_code.
7935 (packgram): Bound check ruleno, itemno, and rule_length.
7936 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7937 (last_string, last_braced_code_loc, max_left_semantic_context)
7938 (scanner_initialize, scanner_free, scanner_last_string_free)
7939 (gram_out, gram_lineno, YY_DECL_): Move to...
7940 * src/scan-gram.h: this new file.
7941 (YY_DECL): Rename as...
7942 (GRAM_DECL): this.
7943 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7944 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7945 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7946 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7947 Move these declarations, and...
7948 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7949 these to...
7950 * src/flex-scanner.h: this new file.
7951 * src/scan-gram.l (rule_length, rule_length_overflow)
7952 (increment_rule_length): Remove.
7953 (last_braced_code_loc): Rename as...
7954 (gram_last_braced_code_loc): this.
7955 Adjust to the changes of the parser.
7956 Move all the handling of $ and @ into...
7957 * src/scan-code.l: here.
7958 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7959 (handle_action_dollar, handle_action_at): Move to...
7960 * src/scan-code.l: here.
7961 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7962 scan-code.h, scan-code-c.c, scan-gram.h.
7963 (EXTRA_bison_SOURCES): Add scan-code.l.
7964 (BUILT_SOURCES): Add scan-code.c.
7965 (yacc): Be robust to white spaces.
7966
7967 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7968 * tests/regression.at: Adjust the column numbers.
7969 * tests/regression.at: Adjust the error message.
7891a7c4 7970
184e42f0
JD
79712006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7972
7973 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7974 Use Akim's wording from
7975 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7976
7891a7c4
JD
79772006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7978
7979 Between Bison releases, manually append `+' to the previous Bison
7980 release number, and use that as a signal to automatically print the
7981 ChangeLog's CVS Id keyword from --version. Discussed starting at
7982 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7983 * ChangeLog: Add Id header.
7984 * configure.ac (AC_INIT): Append `+' to `2.3'.
7985 * src/.cvsignore: Add revision.c.
7986 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7987 (BUILT_SOURCES): Add revision.c.
7988 (revision.c): New target rule. This file defines a new global variable
7989 named revision. It initializes it with either the Id from ChangeLog
7990 or, if VERSION doesn't contain `+', with the empty string.
7991 * src/getargs.c (version): Print the value of revision.
7992 * src/revision.h: Extern revision.
7993
4ad3ed84
PE
79942006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7995
7996 * NEWS: Version 2.3.
7997 * configure.ac (AC_INIT): Likewise.
7998
02103984
PE
79992006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8000
8001 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8002 with no arguments, not as an object-like macro. This is for
8003 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8004 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8005 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8006 Document this.
8007
2c08afa5
JD
80082006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8009
8010 * src/getargs.c (usage): Back out yesterday's modification of the
8011 --help output so that we don't have to wait for translation before
8012 releasing 2.3.
8013
6077da58
PE
80142006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8015
8016 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8017 Problem reported by Akim Demaille.
8018
2a26b6c2
JD
80192006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8020
8021 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8022
aefef0d6
PE
80232006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8024
8025 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8026 generated source code. Problem reported by Frans Englich in
8027 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8028
fcd8e201
PE
80292006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8030
8031 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8032 shell, not within 'make', so that 'make' by an ordinary builder
8033 (using GNU make) does not worry about configuring gzip. This also
8034 works around a bug reported independently by Keith Thompson and by
8035 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8036 stderr rather than stdout, messing up the build logs.
8037
7b5cdcbd
JD
80382006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8039
8040 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8041 to make sure that YYID will never be unused. This fixes a 'make
8042 maintainer-check' failure caused by the recent changes to the 'Trivial
8043 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8044 not used.
8045 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8046
5ad0a449
JD
80472006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8048
8049 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8050 state before an empty RHS is always resolved here. Only the location
8051 of that state is guaranteed to be resolved, and that's enough. This
8052 fixes the remaining bug reported by Derek M. Jones in
8053 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8054 * tests/glr-regression.at (Uninitialized location when reporting
8055 ambiguity): Test the above case.
8056 Also, the embedded comments in this test case claim it checks the case
8057 of an empty RHS that has inherited the initial location. However, the
8058 corresponding LHS was already resolved, so yyresolveLocations didn't
8059 actually have reason to modify it. Fix this by forcing
8060 nondeterministic operation at the beginning of the parse.
8061
50cce58e
PE
80622006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8063
8064 * data/c.m4 (b4_yy_symbol_print_generate):
8065 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8066 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8067 of the bugs reported today by Derek M Jones in
8068 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8069 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8070 defined to be a type name without parens or brackets.
8071 (Location Type): Similarly for YYLTYPE.
8072 * tests/regression.at (Trivial grammars): Put in a test for this
8073 bug that will be caught by 'make maintainer-check' (though not,
8074 alas, by 'make check' unless your compiler is picky).
8075
ab8d9dc5
PE
80762006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8077
0d2c8934 8078 * NEWS: Version 2.2.
ab8d9dc5
PE
8079 * configure.ac (AC_INIT): Likewise.
8080
9138c575
JD
80812006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8082
8083 * data/glr.c (yyreportTree): Make room in yystates for the state
8084 preceding the RHS. This fixes the segmentation fault reported by Derek
8085 M. Jones in
8086 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8087 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8088 to the user. Reported for yyreportTree by Derek M. Jones later in the
8089 same thread.
8090 * THANKS: Add Derek M. Jones.
8091 Update my email address.
8092 Fix typo in Steve Murphy's name.
8093
276f48df
PE
80942006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8095
d6645148
PE
8096 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8097 checking against YYLAST that caused the parser to miss a potential
8098 alternative in its diagnostic.
8099 Problem reported by Maria Jose Moron Fernandez in
8100 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8101 * data/lalr1.cc (yysyntax_error_): Likewise.
8102 * data/yacc.c (yysyntax_error): Likewise.
8103 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8104 tokens, in case we run into an older C compiler.
8105 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8106 Use them to check for the off-by-one error fixed above.
8107
276f48df
PE
8108 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8109 YYSIZE_T, not size_t.
8110 * tests/regression.at (Trivial grammars): New test, to catch
8111 the error fixed by the above patch.
8112
cd8b5791
AD
81132006-05-14 Akim Demaille <akim@lrde.epita.fr>
8114
8115 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8116 scheme.
8117 Reported by Steve Murphy.
8118
34376418
AD
81192006-05-14 Akim Demaille <akim@lrde.epita.fr>
8120
8121 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8122 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8123
327afc7c
AD
81242006-05-14 Akim Demaille <akim@lrde.epita.fr>
8125
8126 Implement --trace=m4.
8127 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8128 * src/output.c (output_skeleton): When set, pass -dV to m4.
8129
8130 Factor the handling of flags in m4.
8131 * src/output.c (prepare): Rename the muscle names debug, defines,
8132 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8133 * data/c.m4: Adjust.
8134 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8135 Use b4_define_flag_if to define other b4_FLAG_if macros.
8136 (b4_location_if): As a consequence, rename as...
8137 (b4_locations_if): this, for consistency.
8138 Adjust all the skeletons.
8139
ba9ecd19
AD
81402006-05-14 Akim Demaille <akim@lrde.epita.fr>
8141
8142 * etc/bench.pm: Shorten bench names.
8143
4e83ea15
AD
81442006-05-14 Akim Demaille <akim@lrde.epita.fr>
8145
8146 * src/output.h, src/output.c (error_verbose): Move to...
8147 * src/getargs.h, src/getargs.c: here.
8148 Sort the flags.
8149 Adjust dependencies.
8150
6e93d810
PE
81512006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8152
8153 * data/c.m4 (b4_copyright): Put the special exception for Bison
8154 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
8155 uses changed. Suggested by Akim Demaille. Also, wrap the
8156 copyright notice, in case it is longer than 80 columns. Replace
8157 comma by newline after title.
6e93d810 8158
eaea13f5
PE
81592006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8160
8161 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8162 incompatibility, not a bug. Mention that it wasn't fixed as of
8163 flex 2.5.33.
8164
3cf084ec
AD
81652006-05-11 Akim Demaille <akim@lrde.epita.fr>
8166
8167 * examples/extexi: Enforce the precedence of concatenation over
8168 >>.
0a9f1c7d 8169 Reported by Tommy Nordgren.
3cf084ec 8170
32c96bd7
AD
81712006-05-11 Akim Demaille <akim@lrde.epita.fr>
8172
8173 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8174 with the member "token".
f94705b2 8175 Reported by Martin Nylin.
32c96bd7 8176
eaea13f5
PE
81772006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8178
8179 * data/glr.c: Switch to Bison 2.2 special-exception language in
8180 the copyright notice. Use more-regular format for titles and
8181 copyright notices.
8182 * data/glr.cc: Likewise.
8183 * data/location.cc: Likewise.
8184 * data/yacc.cc: Likewise.
8185 * doc/bison.texinfo (Conditions): Document this.
8186 * NEWS: likewise. Upgrade version to 2.2.
8187
6e2d1146
AD
81882006-04-27 Akim Demaille <akim@lrde.epita.fr>
8189
8190 * data/glr.cc: Remove dead code.
8191
47671055
PE
81922006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8193
8194 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8195 that variable and the line breaks the bootstrap. Problem reported
8196 by Juan M. Guerrero.
8197
ed2e6384
AD
81982006-04-24 Akim Demaille <akim@lrde.epita.fr>
8199
8200 * doc/bison.texinfo (Multiple start-symbols): New.
8201
3cedc2dc
AD
82022006-04-24 Akim Demaille <akim@lrde.epita.fr>
8203
8204 * etc/README, etc/bench.pl: New.
8205
b2ddc3f3
AD
82062006-04-03 Akim Demaille <akim@lrde.epita.fr>
8207
8208 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8209 rule.
8210 Reported by Mickael Labau.
8211 * tests/input.at (Torturing the Scanner): Test it.
8212
91e3ac9a
PE
82132006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8214
8215 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8216 Problem reported by Bob Rossi.
8217
82182006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8219
8220 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8221 and didn't really work.
8222 For the index, use @ifnotinfo, not @iftex.
8223 Minor cleanups of spacing and terminology.
8224
5cf61e93
AD
82252006-03-12 Akim Demaille <akim@lrde.epita.fr>
8226
8227 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8228 of AT_NAME_PREFIX when %name-prefix is not used.
8229
aa08666d
AD
82302006-03-12 Akim Demaille <akim@lrde.epita.fr>
8231
8232 Apply --prefix to C++ skeletons too: they change the namespace.
8233 The test suite already exercize these cases.
8234 * data/c++.m4 (b4_namespace): New.
8235 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8236 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8237 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8238 * doc/bison.texinfo: Document it.
8239 (Option Cross Key): Use @multitable in all formats. It looks
8240 nicer, even in TeX outputs.
8241 (Rules): Use the same code whatever the output type is.
8242 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8243 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8244 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 8245
45567173
AD
82462006-03-10 Akim Demaille <akim@lrde.epita.fr>
8247
8248 * TODO: Remove dead items.
8249
e9d8f881 82502006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
8251
8252 * doc/FAQ: Remove, merged into...
8253 * doc/bison.texinfo (FAQ): this.
8254 * doc/Makefile.am (EXTRA_DIST): Adjust.
8255
c095d689
AD
82562006-03-10 Akim Demaille <akim@lrde.epita.fr>
8257
8258 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8259 even if empty.
8260 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8261 * doc/bison.texinfo (Calc++ Scanner): Use it.
8262
6e0f8287
PE
82632006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8264
8265 Fix two nits reported by twlevo, plus one more that I discovered.
8266
8267 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8268 this is the usual Bison style.
8269 * src/location.h (location_print): Likewise.
8270
8271 * src/reader.h (token_name): Likewise.
8272
d6b771c3
PE
82732006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8274
8275 Fix some nits reported by twlevo.
8276 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8277 and "POSIX". Use more-modern syntax for URLs. Mention C++
8278 and ask for Java. Don't hardwire OS version numbers. Add
8279 copyright notice.
8280 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8281 * src/conflicts.c (solved_conflicts_obstack): Now static.
8282
1e137b71
JD
82832006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8284
8285 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8286 page. Say "you can use it" not "you may use it" as on the web page;
8287 we're describing capabilities not granting permission.
8288
73f2e47e
PE
82892006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8290
6d05403d
PE
8291 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8292 shadowing warnings. Use usual patter for iterating through RHS.
8293 * tests/glr-regression.at
8294 (Uninitialized location when reporting ambiguity):
8295 Modify yylex so that it uses its argument, rather than trying
8296 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8297 const char -> char const.
8298
73f2e47e
PE
8299 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8300 Don't use tabs inside commands; it messes up 'ps'.
8301 Problem reported by twlevo.
8302
8710fc41
JD
83032006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8304
8305 * tests/glr-regression.at (Uninitialized location when reporting
8306 ambiguity): New test case.
8307 * data/glr.c (yyresolveLocations): New function, which uses
8308 YYLLOC_DEFAULT.
8309 (yyresolveValue): Invoke yyresolveLocations before reporting an
8310 ambiguity.
8311 * doc/bison.texinfo (Default Action for Locations): Note
8312 YYLLOC_DEFAULT's usage for ambiguity locations.
8313 (GLR Semantic Actions): Cross-reference those notes.
8314
ae952af2
JD
83152006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8316
8317 * tests/glr-regression.at (Leaked semantic values when reporting
8318 ambiguity): Remove unnecessary union and type declarations.
8319 (Leaked lookahead after nondeterministic parse syntax error): New test
8320 case.
8321 * data/glr.c (yyparse): Check for zero stacks remaining before
8322 attempting to shift the lookahead so that you don't lose it.
8323
35ee866a
JD
83242006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8325
8326 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8327 * tests/glr-regression.at (Leaked semantic values when reporting
8328 ambiguity): New test case.
8329 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8330 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8331 now unnecessary yystackp parameter.
8332 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8333 destructors can be called.
8334
8335 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8336 in existing testcases.
8337
520181ab
JD
83382006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8339
8340 Don't leak semantic values for parent RHS when a user action cuts the
8341 parser, and clean up related code a bit.
8342 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
8343 cuts parse): Rename to...
8344 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
8345 for leaked parent RHS values.
8346 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8347 between an unresolved state (non-empty chain of semantic options) and
8348 an incomplete one (signaled by an empty chain).
ae952af2 8349 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
8350 successfully or unsuccessfully resolved yyGLRState to...
8351 (yyresolveValue): ... here so that yyresolveValue always leaves a
8352 yyGLRState with consistent data and thus is easier to understand.
8353 Remove the yyvalp and yylocp parameters since they are always just
8354 taken from the yys parameter. When reporting a discarded merged value
8355 in debugging output, note that it is incompletely merged. Document the
8356 interface.
8357 (yyresolveAction): If resolving any of the RHS states fails, destroy
8358 them all rather than leaking them. Thus, as long as user actions are
8359 written to clean up the RHS correctly, yyresolveAction always cleans up
8360 the RHS of a semantic option. Document the interface.
8361
18d9185c
PE
83622006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8363
8364 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8365 led to a segmentation fault in GNU Pascal. Problem reported
8366 by Waldek Hebisch.
8367
841a7737
JD
83682006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8369
8370 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8371 mid-rule action inside a nonterminal symbol in order to declare a
8372 destructor for its semantic value.
8373
fc3f467f
PE
83742006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8375
8376 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8377 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8378 __cplusplus && ! defined _STDLIB_H && !
8379 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8380 defined free))]: Include <stdlib.h> rather than rolling our own
8381 declarations of malloc and free, to avoid problems with
8382 incompatible declarations (using 'throw') C++'s stdlib.h. This
8383 should fix Debian bug 340012
8384 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8385 reported by Guillaume Melquiond.
8386
a3af26dd
PE
83872006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8388
4d7bc38c
PE
8389 * NEWS: Clarify symbols versus types in unused-value warnings.
8390
a3af26dd
PE
8391 * configure.ac (AC_INIT): Bump version number.
8392
4e26c69e
PE
83932006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8394
8395 * NEWS: Version 2.1a.
8396 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8397 since C99 requires this.
8398
498e897c
PE
83992006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8400
8401 * m4/c-working.m4: New file.
8402 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8403
57bb17ca
PE
84042006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8405
8406 * Makefile.maint: Merge from coreutils.
8407
0be105dc
PE
84082006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8409
8410 More portability fixes for problems summarized by Nelson H. F. Beebe.
8411
8412 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8413 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8414 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8415 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8416 messes up because C++ code is compiled in 32-bit mode but linked
8417 in 64-bit mode.
8418
6fc0c024
PE
84192006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8420
8421 More portability fixes for problems summarized by Nelson H. F. Beebe.
8422
7870f699
PE
8423 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8424 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8425
6fc0c024
PE
8426 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8427 nodist_PROGRAMS, since we don't need to actually compile the
8428 example if we're just doing a plain 'make'. This avoids bothering
8429 the installer unnecessarily about problems due to weird C++
8430 compilers.
8431
fe6c2fde
PE
84322006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8433
8434 More portability fixes for problems summarized by Nelson H. F. Beebe.
8435
8436 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8437 than #include "...", and compile with -I'.'. The old method was
8438 not portable, according to Posix and the C standard, and it does
8439 not work with Sun C 5.7, where previous #line directives affect
8440 the working directory used in later #include "..." directives.
8441
927b425b
JMG
84422006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8443
8444 Various DJGGP specific issues in /djgpp
8445
d9735e9e
PE
84462006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8447
8448 More portability fixes for problems summarized by Nelson H. F. Beebe.
8449
8450 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8451 '#include <map>' works and that you can apply ++ to iterators.
8452
5a6755af
PE
84532006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8454
67a0dc4f
PE
8455 Work around portability problems summarized by Nelson H. F. Beebe in
8456 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8457
8c86f0ef
PE
8458 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8459 that '#include <string>' works.
8460
de35dd59
PE
8461 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8462 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8463 "warning: sorry: semantics of inline function static data `const
8464 unsigned char translate_table[262]' are wrong (you'll wind up with
8465 multiple copies)".
8466
67a0dc4f
PE
8467 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8468 or, xor to not_, and_, or_, and xor_, respectively. This works
8469 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8470 random system header somewhere that includes the equivalent of
8471 <iso646.h>.
8472
5a6755af
PE
8473 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8474 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 8475 Suite Version 2.0.
5a6755af 8476
3f001415
JD
84772006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8478
8479 During deterministic GLR operation, user actions should be able to
8480 influence the parse by changing yychar. To make this easier to fix and
8481 to make glr.c easier to evolve in general, don't maintain yytoken in
8482 parallel with yychar; just compute yytoken when needed.
8483 * tests/glr-regression.at (Incorrect lookahead during deterministic
8484 GLR): Check that setting yychar in a user action has the intended
8485 effect.
8486 * data/glr.c (yyGLRStack): Remove yytokenp member.
8487 (yyclearin): Don't set *yytokenp.
8488 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8489 yychar rather than *yytokenp to determine the current lookahead.
8490 Compute yytoken locally when needed.
8491 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8492 point to.
8493
8494 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8495 after `--report' documentation.
8496
e2a8c0f5
PE
84972006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8498
8499 * src/parse-gram.y (grammar_declaration): Location of printer
8500 symbol is @1, not list->location. Bug reported by twlevo.
8501 * tests/input.at (Incompatible Aliases): Adjust to above change.
8502
6b702268
PE
85032006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8504
27622431
PE
8505 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8506 all the test at once. This makes the output easier to read in the
8507 normal case.
8508
6b702268
PE
8509 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8510 got from <http://bro-ids.org/download.html>. The bug is that
8511 when two actions appeared in succession, the second one was
8512 scanned before the first one was added to the grammar rule
8513 as a midrule action. Bison then output the incorrect warning
8514 "parse.y:905.17-906.36: warning: unused value: $3".
8515 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8516 associated with a value.
8517 (rhs): Don't invoke grammar_current_rule_action_append.
8518 (action): Invoke it here instead.
8519 * src/reader.c (grammar_midrule_action): Now extern.
8520 (grammar_current_rule_action_append): Don't invoke
8521 grammar_midrule_action; that is now the scanner's job.
8522 * src/reader.h (last_string, last_braced_code_loc):
8523 (grammar_midrule_action): New decls.
8524 * src/scan-gram.l (last_string): Now extern, sigh.
8525 (last_braced_code_loc): New extern variable.
8526 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8527 rule already has an action.
8528 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8529 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8530 Add some tests to check that the above changes fixed the bug.
8531
d40ba6c2
PE
85322006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8533
8534 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8535 All used changed. Check whether the symbol has a destructor,
8536 not whether it is typed.
8537 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8538 that the values are still reported as unused. All line numbers
8539 adjusted.
8540
401aace6
PE
85412006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8542
8543 Work around a bug in bro 0.8, which underparenthesizes its
8544 definition of YYLLOC_DEFAULT.
8545 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8546 their arguments.
8547 * data/lalr1.cc: Likewise.
8548 * data/yacc.cc: Likewise.
8549
06f01bc4
PE
85502006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8551
401aace6
PE
8552 Work around a bug in Pike 7.0, and give the Pike folks a
8553 better way to override the usual int widths.
8554 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8555 user can override the types.
8556 (short): #undef, to work around a bug in Pike 7.0.
8557 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8558 (union yyalloc.yyss): Use yytype_int16 rather than short.
8559 All uses changed.
8560 (yysigned_char): Remove.
8561 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8562 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8563 * tests/regression.at (Web2c Actions): Adjust to above changes.
8564
8565 * src/reader.c (check_and_convert_grammar): New function.
8566 (reader): Close the input file even if something went wrong during
8567 parsing. Minor file descriptor leak reported by twlevo.
8568
06f01bc4
PE
8569 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8570 to pacify gcc -Wswitch-default.
8571 * src/scan-gram.l (adjust_location): Use a default: break; case
8572 to pacify gcc -Wswitch-default.
8573 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8574 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8575 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8576 Move these decls to scan-skel.l, since they don't need to be
8577 visible elsewhere.
8578 * src/scan-skel.l: Accept the above decls.
8579 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8580 is used.
8581
02650b7f
PE
85822006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8583
8584 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8585 since we don't want to insist on a version number at the start
8586 of the changelog every time.
8587 * Makefile.maint: Sync from coreutils a bit better.
8588 (sc_trailing_blank): Renamed from sc_trailing_space.
8589 All uses changed.
8590 (sc_no_if_have_config_h, sc_require_config_h):
8591 (sc_prohibit_assert_without_use): New rules.
8592 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8593 (sc_dd_max_sym_length): Fix leading spaces in rule.
8594 (sc_system_h_headers): Prefix with @.
8595 (sc_useless_cpp_parens, m4-check): Output line numbers.
8596 (changelog-check): Allow version only in head.
8597 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8598 satisfy new Makefile.maint rule.
8599 * data/glr.c: Likewise.
8600 * data/glr.cc: Likewise.
8601 * data/lalr1.cc: Likewise.
8602 * data/yacc.c: Likewise.
8603 * lib/ebitsetv.c: Likewise.
8604 * lib/lbitset.c: Likewise.
8605 * lib/subpipe.c: Likewise.
8606 * lib/timevar.c: Likewise.
8607 * src/system.h: Likewise.
8608 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8609 * djgpp/Makefile.maint: Add copyright notice.
8610 * djgpp/README.in: Likewise.
8611 * djgpp/config.bat: Likewise.
8612 * djgpp/config.site: Likewise.
8613 * djgpp/config_h.sed: Likewise.
8614 * djgpp/djunpack.bat: Likewise.
8615 * djgpp/config.sed: Fix copyright notice to match standard format.
8616 * djgpp/subpipe.h: Likewise.
8617 * lib/bitsetv-print.c: Likewise.
8618 * lib/bitsetv.c: Likewise.
8619 * lib/subpipe.h: Likewise.
8620 * lib/timevar.c: Likewise.
8621 * lib/timevar.h: Likewise.
8622 * djgpp/subpipe.c: Use standard recipe for config.h.
8623 * lib/abitset.c: Likewise.
8624 * lib/bitset.c: Likewise.
8625 * lib/bitset_stats.c: Likewise.
8626 * lib/bitsetv-print.c: Likewise.
8627 * lib/bitsetv.c: Likewise.
8628 * lib/ebitsetv.c: Likewise.
8629 * lib/get-errno.c: Likewise.
8630 * lib/lbitset.c: Likewise.
8631 * lib/subpipe.c: Likewise.
8632 * lib/timevar.c: Likewise.
8633 * lib/vbitset.c: Likewise.
8634 * tests/local.at: Likewise.
8635 * src/scan-gram.l: Don't include verify.h, since system.h does
8636 that for us.
8637 * .x-sc_require_config_h: New file.
8638 * .x-sc_unmarked_diagnostics: New file.
8639
287c78f6
PE
86402006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8641
287c78f6
PE
8642 Be a bit more systematic about using 'abort'.
8643 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8644 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8645 Put 'default: abort ();' before some other case, to satisfy older
8646 pedantic compilers.
8647 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8648 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8649 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8650 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
8651 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8652 (get_decision_str, get_orientation_str, get_node_alignment_str):
8653 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8654 (get_linestyle_str, get_arrowstyle_str): Likewise.
8655 * src/conflicts.c (resolve_sr_conflict):
8656 Use a default case rather than one for the one remaining enum
8657 value, to catch invalid enum values as well.
8658 * src/lalr.c (set_goto_map, map_goto):
8659 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8660 * src/nullable.c (nullable_compute, token_definitions_output):
8661 Likewise.
8662 * src/reader.c (packgram, reader): Likewise.
8663 * src/state.c (transitions_to, state_new, state_reduction_find):
8664 Likewise.
8665 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8666 (symbol_pack): Likewise.
8667 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
8668 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8669 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
8670 * src/system.h: Don't include <assert.h>.
8671 (assert): New macro.
8672
8673 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8674 (Destructor Decl, Parser Function, Pure Calling):
8675 Describe rules for braces inside C code more carefully.
287c78f6 8676
c66dfadd
PE
86772006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8678
c21493b8
PE
8679 Fix some porting glitches found by Nelson H. F. Beebe.
8680 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8681 compilers that don't understand that abort () does not return.
8682 * src/state.c (transitions_to): Likewise.
8683 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8684 that '#include <cstdlib>' works.
8685 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8686 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8687 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8688 for the benefit of some pre-C99 compilers.
8689
b6e3facf
PE
8690 * bootstrap: Undo changes to gnulib files that autoreconf made.
8691
c66dfadd
PE
8692 Minor fixups to get 'make maintainer-check' to work.
8693 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8694 with the new verify.h implementation.
8695 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8696 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8697 * data/yacc.c (YYUSE): Likewise.
8698 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8699 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8700 * src/parse-gram.y (declaration): Don't pass a string constant
8701 to a function that expects char *, since GCC might complain
8702 about the constant value.
8703 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8704 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8705 before #defining them.
8706 * tests/glr-regression.at
8707 (Incorrectly initialized location for empty right-hand side in GLR):
8708 In yyerror, use the msg arg.
8709 (Corrupted semantic options if user action cuts parse):
8710 (Incorrect lookahead during deterministic GLR):
8711 (Incorrect lookahead during nondeterministic GLR):
8712 Don't name a local var 'index'; it shadows string.h's 'index'.
8713
ed94ef2a
AD
87142006-01-19 Akim Demaille <akim@epita.fr>
8715
8716 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8717 location, not just parts of it.
8718
e9ad4aec
PE
87192006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8720
d6ca7905
PE
8721 * NEWS: Document the fact that multiple %unions are now allowed.
8722 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
8723 * TODO: This feature is now implemented, so remove it from
8724 the wishlist.
d6ca7905 8725
ef1b70e0
PE
8726 * Makefile.maint: Merge with coreutils Makefile.maint.
8727 (CVS_LIST): Use build-aux version if available.
8728 (VERSION_REGEXP): New macro.
8729 (syntax-check-rules): Add sc_no_if_have_config_h,
8730 sc_prohibit_assert_without_use, sc_require_config_h,
8731 sc_useless_cpp_parens.
8732 (sc_obsolete_symbols): Check for O_NDELAY.
8733 (sc_dd_max_sym_length): Track coreutils.
8734 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8735 (sc_useless_cpp_parens): New rule.
8736 (news-date-check): Look for version or today's date.
8737 (changelog-check): Don't require version number near head.
8738 (copyright-check): Use current year instead of hardwiring 2005.
8739 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8740 (announcement): Add --gpg-key-ID.
8741
8742 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8743 with "file system".
8744
2073ce56 8745 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
8746 array. Problem reported by twlevo.
8747 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8748 * src/lalr.c (build_relations): Rely on new sentinel.
8749 * src/gram.c (gram_free): Adjust to new sentinel.
8750
b7691f15
JD
87512006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8752
8753 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8754 yylookaheadNeeds. All uses updated.
8755 (yysplitStack): Rename local yynewLookaheadStatuses to
8756 yynewLookaheadNeeds.
8757 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8758 GLR): In comments, change `lookahead status' to `lookahead need'.
8759
ddee1b06
PH
87602006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8761
8762 * data/glr.c (yysplitStack): A little stylistic rewrite.
8763
12f4614d
PH
87642006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8765
8766 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8767
32c29292
JD
87682006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8769
8770 * doc/bison.texinfo: Fix some typos.
8771 (GLR Semantic Actions): New subsection discussing special
8772 considerations because GLR semantic actions might be deferred.
8773 (Actions): Mention look-ahead usage of yylval.
8774 (Actions and Locations): Mention look-ahead usage of yylloc.
8775 (Special Features for Use in Actions): Add YYEOF entry and mention it
8776 in the yychar entry.
8777 In the yychar entry, remove mention of the local yychar case (pure
8778 parser) since this is irrelevant information when writing semantic
148d66d8 8779 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
8780 yychar is otherwise described as an external variable.
8781 In the yychar entry, don't call it the `current' look-ahead since it
8782 isn't when semantic actions are deferred.
8783 In the yychar and yyclearin entries, add note about deferred semantic
8784 actions.
8785 Add yylloc and yylval entries discussing look-ahead usage.
8786 (Look-Ahead Tokens): When discussing yychar, don't call it the
8787 `current' look-ahead, and do mention yylval and yylloc.
8788 (Error Recovery): Cross-reference `Action Features' when mentioning
8789 yyclearin.
148d66d8 8790 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
8791 look-ahead.
8792 In the yylloc and yylval entries, mention look-ahead usage.
8793
de366a2f 87942006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
8795
8796 * tests/glr-regression.at: Update copyright year to 2006.
8797
bf70fa87
JD
87982006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8799
8800 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8801 use during nondeterministic operation to track which stacks have
8802 actually needed the current lookahead.
8803 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8804 Allocate, deallocate, resize, and otherwise shuffle space for
8805 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8806 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8807 appropriately during nondeterministic operation.
8808 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8809 members to store the current lookahead to be used by the deferred
8810 user action.
8811 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8812 from which the RHS is taken. Set the lookahead members of the new
8813 yySemanticOption according to the lookahead status for stack yyk.
8814 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8815 yyaddDeferredAction.
8816 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8817 members of yySemanticOption before invoking yyuserAction, and then set
8818 them back to their current values afterward.
8819 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8820 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8821 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8822 titles for consistency.
8823 (Leaked merged semantic value if user action cuts parse): In order to
8824 suppress lint warnings, use arguments in merge function, and assign
8825 char value < 128 in main.
8826 (Incorrect lookahead during deterministic GLR): New test case.
8827 (Incorrect lookahead during nondeterministic GLR): New test case.
8828
05449a2c
JD
88292006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8830
de366a2f 8831 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
8832 !yyvaluep as signal that no semantic value is available to print.
8833 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8834 to print a semantic value.
8835
4158e0a1 88362006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 8837
4158e0a1
JD
8838 * tests/glr-regression.at: For consistency with my newer test cases,
8839 don't thank myself.
8840
d659304d
JD
88412006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8842
8843 * data/glr.c (yyresolveValue): When merging semantic options, if at
8844 least one user action succeeds but a later one cuts the parse, then
8845 destroy the semantic value before returning rather than leaking it.
8846 (yyresolveStates): If a user action cuts the parse and thus
8847 yyresolveValue fails, ignore the (unset) semantic value rather than
8848 corrupting the yyGLRState, and empty the semantic options list since
8849 the user actions should have called all necessary destructors.
8850 Simplify code with YYCHK.
8851 * tests/glr-regression.at (Corrupted semantic options if user action
8852 cuts parse): New test case.
8853 (Undesirable destructors if user action cuts parse): New test case.
8854 Before applying any of this patch, this test case never actually failed
8855 for me... but only because the corrupted semantic options usually
8856 masked this bug.
8857 (Leaked merged semantic value if user action cuts parse): New test
8858 case.
8859
6ec2c0f2
AD
88602006-01-05 Akim Demaille <akim@epita.fr>
8861
8862 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8863
1b9c21fb
PE
88642006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8865
8866 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8867 _MSC_VER. Problem reported by Cenzato Marco.
8868 (b4_c_function_def): Use it.
8869 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8870 b4_c_modern.
8871 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8872 than rolling our own.
8873
84866159
AD
88742006-01-04 Akim Demaille <akim@epita.fr>
8875
8876 Also warn about non-used mid-rule values.
8877 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8878 member.
8879 (symbol_list_new): Adjust.
8880 * src/reader.c (symbol_typed_p): New.
8881 (grammar_rule_check): Use it.
8882 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8883 Check its rule.
8884 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8885 Use it.
8886 * tests/actions.at (Exotic Dollars): Adjust.
8887
378f4bd8
AD
88882006-01-04 Akim Demaille <akim@epita.fr>
8889
8890 * src/reader.c (grammar_midrule_action): If $$ is set in a
8891 mid-rule, move the `used' bit to its lhs.
8892 * tests/input.at (Unused values): New.
8893 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8894
e2a21b6f
PE
88952006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8896
54662697
PE
8897 * doc/bison.texinfo (Bison Options): Say more accurately what
8898 --yacc does.
8899 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8900 about declarations in the grammar when in Yacc mode, as POSIX does
8901 not require a diagnostic when the grammar uses extensions.
8902
8903 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8904
073f9288
PE
8905 Warn about dubious constructions like "%token T T".
8906 Reported by twlevo.
8907 * src/symtab.h (struct symbol.declared): New member.
8908 * src/symtab.c (symbol_new): Initialize it to false.
8909 (symbol_class_set): New arg DECLARING, specifying whether
8910 this is a declaration that we want to warn about, if there
8911 is more than one of them. All uses changed.
8912
1221b78a
PE
8913 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8914 Allow multiple %union directives, whose contents concatenate.
8915 * src/parse-gram.y (grammar_declaration): Likewise.
8916 Use muscle_code_grow, so that we don't need stype_line any more.
8917 All uses changed.
8918
8919 * src/muscle_tab.c (muscle_grow): Fix comment.
8920
e2a21b6f
PE
8921 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8922 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8923 Update copyright year to 2006.
8924
8f7e3cf9
AD
89252006-01-03 Akim Demaille <akim@epita.fr>
8926
8927 Have glr.cc pass (some of) the calc.at tests.
8928 * data/glr.cc (b4_parse_param_orig): New.
8929 (b4_parse_param): Improve its definition, and bound it more
8930 clearly in the skeleton.
8931 (b4_epilogue): Append, instead of prepending, in order to keep
8932 #line consistency.
8933 Simplify the generation of auxiliary functions: locations and
8934 purity are mandated.
8935 (b4_global_tokens_and_yystype): Honor it.
8936 * data/location.cc (c++.m4): Don't include it.
8937 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8938 and AT_SKEL_CC_IF.
8939 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8940 AT_LALR1_CC_IF.
8941 Be sure to initialize the first position's filename.
8942 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8943 mandated anyway.
8944 (AT_CHECK_CALC_GLR_CC): New.
8945 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8946
3953ed88
AD
89472006-01-02 Akim Demaille <akim@epita.fr>
8948
8949 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8950 c.m4.
0a96ba81 8951 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
8952 * data/glr.cc: Do not include stack.hh.
8953
9ecafbbf
AD
89542006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8955
8956 * data/glr.c: Reformat whitespace with tabs.
8957 (b4_lpure_formals): Remove this unused m4 macro.
8958 * tests/cxx-type.at: Reformat whitespace with tabs.
8959 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8960 since it's a member. Rename type to isNterm for clarity.
8961
c4d497a0
AD
89622005-12-29 Akim <akim@sulaco.local>
8963
8964 Let glr.cc catch up with symbol_value_print.
8965 * data/glr.cc (b4_yysymprint_generate): Replace by...
8966 (b4_yy_symbol_print_generate): this.
8967 (yy_symbol_print, yy_symbol_value_print): Declare them.
8968
4517da37
PE
89692005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8970
8971 * src/location.h (boundary): Note that a line or column equal
8972 to INT_MAX indicates an overflow.
8973 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8974 (rule_length_overflow, increment_rule_length, add_column_width):
8975 New functions.
8976 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8977 (<SC_BRACED_CODE>"}"):
8978 Use increment_rule_length rather than incrementing it by hand.
8979 (adjust_location, handle_syncline): Diagnose overflow.
8980 (handle_action_dollar, handle_action_at):
8981 Fix bug with monstrosities like $-2147483648.
8982 Remove now-unnecessary checks.
8983 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8984 (convert_ucn_to_byte): Verify assumptions.
8985 (handle_syncline): New arg LOC. All callers changed.
8986 Don't store through a value derived from char const * pointer.
8987
8988 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8989 GCC warnings.
8990
e3233bf6
PE
89912005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8992
8993 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8994 Remove unnecessary forward static decls.
8995
8f3596a6
AD
89962005-12-27 Akim Demaille <akim@epita.fr>
8997
8998 * src/reader.c (grammar_current_rule_check): Also check that $$
8999 is used.
9000 Take the rule to check as argument, hence rename as...
9001 (grammar_rule_check): this.
9002 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9003 Rename as...
9004 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9005 (grammar_midrule_action, grammar_symbol_append): Now static.
9006 * tests/torture.at (input): Don't rely on the default action
9007 being always performed.
9008 * tests/calc.at: "Set" $$ even when the action is "cut" with
9009 YYERROR or other.
9010 * tests/actions.at (Exotic Dollars): Instead of using unused
9011 values, check that the warning is issued.
9012
721be13c
PE
90132005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9014
9015 * NEWS: Improve wording for unused-value warnings.
9016
a0af42fc
AD
90172005-12-22 Akim Demaille <akim@epita.fr>
9018
9019 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9020 (b4_yysymprint_generate): Rename as...
9021 (b4_yy_symbol_print_generate): this.
9022 Generate yy_symbol_print instead of yysymprint.
9023 Generate also yy_symbol_value_print, and use it.
9024
affac613
AD
90252005-12-22 Akim Demaille <akim@epita.fr>
9026
721be13c 9027 * NEWS: Warn about unused values.
affac613
AD
9028 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9029 a `used' member.
9030 (symbol_list_n_get, symbol_list_n_used_set): New.
9031 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9032 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9033 * src/reader.c (grammar_current_rule_check): Check that values are
9034 used.
9035 * src/symtab.c (symbol_print): Accept 0.
9036 * tests/existing.at: Remove the type information.
9037 Empty the actions.
9038 Remove useless actions (beware of mid-rule actions: perl -000
9039 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9040 * tests/actions.at (Exotic Dollars): Use unused values.
9041 * tests/calc.at: Likewise.
9042 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9043 Likewise.
9044
9045 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9046 rule_useful_p.
9047
9d9b8b70
PE
90482005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9049
8bb4c753
PE
9050 Undo 2005-12-01 tentative license wording change. The wording is
9051 still being reviewed by the lawyers, and we don't want to wait for
9052 them before publishing a test release. For now, revert to the
9053 previous wording.
9054 * NEWS: Undo 2005-12-01 change.
9055 * data/glr.c: Revert to previous license wording.
9056 * data/glr.cc: Likewise.
9057 * data/lalr1.cc: Likewise.
9058 * data/location.cc: Likewise.
9059 * data/yacc.c: Likewise.
9060
9d9b8b70
PE
9061 * NEWS: Reword %destructor vs YYABORT etc.
9062 * data/glr.c: Use American spacing, for consistency.
9063 * data/glr.cc: Likewise.
9064 * data/lalr1.cc: Likewise.
9065 * data/yacc.c: Likewise.
9066 * data/yacc.c: Reformat comments slightly.
9067 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9068 for consistency. Fix some spelling errors and reword recently-included
9069 text slightly.
9070 * tests/cxx-type.at: Cast results of malloc, for C++.
9071
2c3b392a
AD
90722005-12-21 Joel E. Denny <address@hidden>
9073
9074 * tests/cxx-type.at: Construct a tree, count the parents of shared
9075 nodes, and free each node once and only once. Previously, the memory
9076 for semantic values was leaked instead.
9077
d6cff4dc
AD
90782005-12-21 Joel E. Denny <address@hidden>
9079
9080 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9081 (yylval, yylloc): If pure, #define to yystackp->yyval and
9082 yystackp->yyloc similar to yychar and yynerrs.
9083 (yyparse): If pure, remove local yylval and yylloc. Add local
9084 yystackp to accommodate pure definitions of yylval and yylloc.
9085 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9086 yylvalp and yyllocp to &yylval and &yylloc.
9087 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9088 namespace. Previously, nerrs and char were missing, but lval and lloc
9089 weren't necessary.
9090 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9091 yylvalp and yyllocp parameters since, if pure, these are now always
9092 accessible through yystackp. If not pure, they are still accessible
9093 globally.
9094 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9095 `if (YYID (N))' to pacify lint.
9096
a85284cf
AD
90972005-12-21 Akim Demaille <akim@epita.fr>
9098
9099 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9100 destroy the RHS symbols of a rule.
9101 * data/yacc.c (yylen): Initialize to 0.
9102 Keep its value to the number of items to possibly shift.
9103 In particular, a regular successful parse that ends on YYFINAL by
9104 a (internal) YYACCEPT must not have yylen != 0.
9105 (yyerrorlab, yyreturn): Pop the RHS.
9106 Reorder a bit to emphasize the `shifting' bits of code.
9107 (YYPOPSTACK): Now accept a number of items to pop.
9108 * data/lalr1.cc: Likewise.
9109 * data/glr.c: Formatting changes.
9110 Use goto instead of fall through.
9111 * doc/bison.texinfo (Destructor Decl): Complete.
9112
d508c281
JMG
91132005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9114
9115 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9116 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9117 * djgpp/config.bat: Replace every occurence of the file name
9118 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9119 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9120 * djgpp/config.sed: Replace every occurence of the file name
9121 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9122 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9123 * djgpp/djunpack.bat: DJGPP specific file.
9124 * djgpp/fnchange.lst: DJGPP specific file.
9125 * djgpp/README.in: Add new information about how to unpack the bison
9126 source on MSDOS and other systems which have 8.3 file name restrictions
9127 using djunpack.bat and fnchange.lst.
9128
3e7a2cd9
PE
91292005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9130
9131 * bootstrap (build_cvs_prefix): Remove; unused.
9132 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9133 when getting gnulib.
9134
91352005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9136
9137 * data/glr.c: Reorder typedef declarations for structs to match order
9138 of struct declarations.
9139 Rename yystack everywhere to yystackp except in yyparse where it's not
9140 a pointer.
9141 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9142 consistency.
9143 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9144 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9145 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9146 lint.
9147
877519f8
PE
91482005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9149
0eca5a39
PE
9150 * tests/sets.at (Accept): Fix typos in regular expression used to
9151 sed out the final state number.
9152
2cec9080
PE
9153 Work around portability problem on Solaris 10: flex-generated
9154 files include <stdio.h> before <config.h>, which messes up
9155 because the latter defines __EXTENSIONS__. Address the problem
9156 by creating two new little files that include <config.h> first,
9157 then include the flex-generated files. Rewrite everyone else
9158 to include <config.h> first, as well.
9159 * lib/timevar.c: Always include "config.h".
9160 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9161 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9162 (EXTRA_bison_SOURCES): New macro.
9163 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9164 * src/system.h: Don't include config.h.
9165 * src/LR0.c: Include <config.h> first.
9166 * src/assoc.c: Likewise.
9167 * src/closure.c: Likewise.
9168 * src/complain.c: Likewise.
9169 * src/conflicts.c: Likewise.
9170 * src/derives.c: Likewise.
9171 * src/files.c: Likewise.
9172 * src/getargs.c: Likewise.
9173 * src/gram.c: Likewise.
9174 * src/lalr.c: Likewise.
9175 * src/location.c: Likewise.
9176 * src/main.c: Likewise.
9177 * src/muscle_tab.c: Likewise.
9178 * src/nullable.c: Likewise.
9179 * src/output.c: Likewise.
9180 * src/parse-gram.y: Likewise.
9181 * src/print.c: Likewise.
9182 * src/print_graph.c: Likewise.
9183 * src/reader.c: Likewise.
9184 * src/reduce.c: Likewise.
9185 * src/relation.c: Likewise.
9186 * src/state.c: Likewise.
9187 * src/symlist.c: Likewise.
9188 * src/symtab.c: Likewise.
9189 * src/tables.c: Likewise.
9190 * src/uniqstr.c: Likewise.
9191 * src/vcg.c: Likewise.
9192
877519f8
PE
9193 * src/parse-gram.y: Fix minor problems uncovered by lint.
9194 (current_lhs, current_lhs_location): Now static.
9195 (current_assoc): Remove unused variable.
9196
9197 Cleanups so that Bison-generated parsers have less lint.
9198 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9199 Prepend /*ARGSUSED*/, for lint's sake.
9200 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9201 definition if 'lint' is defined.
9202 (YYID): New macro (or function, if lint).
9203 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9204 * data/yacc.c: Likewise.
9205 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9206 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9207 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9208 is C++ only.
9209 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9210 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9211 Use YYID(0) rather than 0, for lint.
9212 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9213 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9214
f5228370
PE
92152005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9216
9217 * tests/glr-regression.at
9218 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9219 Close memory leak reported by twlevo.
9220
69ce078b
PE
92212005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9222
6ff99711
PE
9223 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9224 all stacks.
9225 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
9226 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9227 New test case.
9228 (Duplicated user destructor for lookahead): This test now is expected
9229 to succeed.
9230
af3412cd
PE
92312005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9232
32b5b719 9233 * NEWS: Document the following change.
af3412cd
PE
9234 * data/yacc.c: Say "parser skeleton" rather than "file", since
9235 it's no longer just a file.
9236 * data/glr.c: Grant a special exception for C GLR parsers, that
9237 reads like the already-existing exception for C LALR(1) parsers.
9238 * data/glr.cc: Likewise.
9239 * data/lalr1.cc: Likewise.
9240 * data/location.cc: Likewise.
9241 * data/yacc.c: Reword the "written by" statement to clarify that
9242 it was the parser skeleton, not the entire output file.
9243 * data/glr.c: Written by Paul Hilfinger.
9244 * data/glr.cc: Written by Akim Demaille.
9245 * data/lalr1.cc: Likewise.
9246
035aa4a0
PE
92472005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9248
d9963c85
PE
9249 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9250 Fix typos in previous change that broke 'make check'.
9251 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9252 supported in C.
9253 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9254 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9255 We can revert this once things settle down.
9256
035aa4a0
PE
9257 * src/conflicts.c (conflicts_print): Don't print file name twice
9258 when %expect fails because there were no conflicts.
9259 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9260 change.
9261 * tests/conflicts.at (%expect not enough, %expect too much):
9262 (%expect with reduce conflicts): Adjust to new behavior.
9263
92642005-11-18 Akim Demaille <akim@epita.fr>
9265
9266 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9267 errors.
9268 * NEWS: Document this.
9269 * doc/bison.texinfo (Expect Decl): Likewise.
9270
d1ff7a7c
AD
92712005-11-16 Akim Demaille <akim@epita.fr>
9272
9273 Generalize the display of semantic values and locations in traces.
9274 * data/glr.c (yy_reduce_print): Fix indices (again).
9275 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9276 literal integers.
9277 * data/lalr1.cc (yyreduce_print): Rename as...
9278 (yy_reduce_print): this.
9279 Display values and locations.
9280 * data/yacc.c (yy_reduce_print): Likewise.
9281 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9282 (yysymprint): Move higher to be visible from yy_reduce_print).
9283 (yyparse): Adjust.
9284 * tests/calc.at: Adjust the expected length of the traces.
9285
6de5398d
AD
92862005-11-14 Akim Demaille <akim@epita.fr>
9287
9288 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9289 from 1 to N, while values and location start at 0.
9290 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9291
a1373f55
AD
92922005-11-14 Akim Demaille <akim@epita.fr>
9293
9294 * data/glr.c (yy_reduce_print): Fix the $ number.
9295
613d8952
AD
92962005-11-14 Akim Demaille <akim@epita.fr>
9297
9298 "Use" parse parameters.
9299 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9300 * data/glr.c, data/glr.cc: Use them.
9301 * data/glr.c (YYUSE): Have a C++ definition that supports
9302 non-pointer types.
9303
b2741627
AD
93042005-11-14 Akim Demaille <akim@epita.fr>
9305
9306 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9307
5059b5c8
AD
93082005-11-14 Akim Demaille <akim@epita.fr>
9309
42249483
AD
9310 * data/glr.cc: New.
9311 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 9312
4626a15d
AD
93132005-11-12 Akim Demaille <akim@epita.fr>
9314
9315 Let position and location be PODs.
9316 * data/location.cc (position::initialize, location::initialize): New.
9317 (position::position, location::location): Define only if
9318 b4_location_constructors is defined.
9319 * data/lalr1.cc (b4_location_constructors): Define it for backward
9320 compatibility.
9321 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9322
93232005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
9324
9325 * data/lalr1.cc: Move the body of the ctor and dtor into the
9326 parser file (instead of the header).
9327 Wrap the implementations in a "namespace yy".
9328
93292005-11-12 Akim Demaille <akim@epita.fr>
9330
9331 Have glr.c include its header file when created.
9332 * data/glr.c (b4_shared_declarations): New.
9333 Output them verbatim in the parser if !%defines, otherwise
9334 output then in the header file, and include it instead.
9335
1989d947
AD
93362005-11-11 Akim Demaille <akim@epita.fr>
9337
9338 * data/glr.c: Comment changes.
9339
93402005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
9341
9342 When yydebug, report semantic and location values for reductions.
9343 * data/glr.c (yy_reduce_print): Report the semantic values and the
9344 locations.
9345 (YY_REDUCE_PRINT): Adjust.
9346 (yyglrReduce): Use them.
9347 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9348 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9349 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9350 traces.
9351
02998094
AD
93522005-11-10 Akim Demaille <akim@epita.fr>
9353
9354 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9355 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9356 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9357
5210672f
PE
93582005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9359
9360 * m4/cxx.m4, examples/Makefile.am: Don't build
9361 examples/calc++ if no C++ compiler is available. (trivial change)
9362
a8991a1d
AD
93632005-11-09 Akim Demaille <akim@epita.fr>
9364
9365 * src/scan-skel.l: Use a couple of asserts.
9366
36b5e963
AD
93672005-11-03 Akim Demaille <akim@epita.fr>
9368
9369 In some (weird) cases, the final state number is incorrect.
9370 Reported by Alexandre Duret-Lutz.
9371 * src/LR0.c (state_list_append): Remove the computation of
9372 final_state.
9373 (save_reductions): Do it here.
9374 (get_state): Alpha conversion.
9375 (generate_states): Use a for loop.
9376 * src/gram.h (item_number_is_rule_number)
9377 (item_number_is_symbol_number): New.
9378 * src/state.c: Use assert.
9379 * src/system.h: Include assert.h.
9380 * tests/sets.at (Accept): New.
9381
44e7ead1
PH
93822005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9383
9384 * data/glr.c (yyfill): Adjust comment.
36b5e963 9385 (yyresolveAction): Initialize default location properly
44e7ead1
PH
9386 for empty right-hand sides.
9387 (yydoAction): Ditto.
9388 Add comment explaining apparently dead code.
36b5e963
AD
9389 * tests/glr-regression.at
9390 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 9391 New test.
36b5e963 9392
e10a80ee
PE
93932005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9394
9395 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9396 gnulib when interrupted. This fixes some race conditions and
9397 works around some portability problems (one noted by Paul
9398 Hilfinger).
9399
067b32ee
AD
94002005-10-22 Akim <akim@epita.fr>
9401
9402 * Makefile.cfg: Adjust to config -> build-aux.
9403 Reported by twledo.
9404
4b367315
AD
94052005-10-21 Akim Demaille <akim@epita.fr>
9406
9407 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9408 the %parse-params.
9409 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9410 * data/yacc.c (b4_Pure_if): Rename as...
9411 (b4_yacc_pure_if): this.
9412 (YY_SYMBOL_PRINT, yyparse): Adjust.
9413 * doc/bison.texinfo: Formatting changes.
9414
24cc23d9
AD
94152005-10-21 Akim Demaille <akim@epita.fr>
9416
9417 Finish the transition config -> build-aux.
9418 * configure.ac, Makefile.am: Use build-aux.
9419 * config/prev-version, config/announce-gen, config/Makefile.am:
9420 Move to...
9421 * build-aux/prev-version, build-aux/announce-gen,
9422 * build-aux/Makefile.am: here.
9423
d4476375
AD
94242005-10-14 Akim Demaille <akim@epita.fr>
9425
9426 * examples/calc++/test: Use set -x only when VERBOSE.
9427
302c0aee
PE
94282005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9429
9430 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9431 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9432
7625ec2c
AD
94332005-10-13 Akim Demaille <akim@epita.fr>
9434
9435 * src/scan-skel.l: Output the base name parts of the parser and
9436 header file names.
302c0aee 9437 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
9438 additional checks.
9439 Use this to exercise C++ outputs in subdirs.
9440 Reported by Oleg Smolsky.
9441
ba0fe3c7
PE
94422005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9443
9444 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9445 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9446 Problem reported by John P. Hartmann.
9447 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9448 already defined it.
9449
9b8a5ce0
AD
94502005-10-12 Akim Demaille <akim@epita.fr>
9451
9452 * src/parse-gram.y (version_check): Exit 63 to please missing
9453 (stands for "version mismatch).
9454 * tests/input.at, doc/bison.texinfo: Adjust.
9455
4f6e011e
PE
94562005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9457
9458 Work around portability problems with Visual Age C compiler
9459 (xlc and xlC_r) reported by John P. Hartmann.
9460 * data/location.cc (initial_column, initial_line): Remove.
9461 All uses replaced by 0 and 1.
9462 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9463 that xlc complains about.
9464 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 9465 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 9466 as __STDC__.
4d7aa45e
PE
9467 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9468 __STDC_VERSION__. Use it everywhere instead of looking at
9469 __STDC__ and __cplusplus.
4f6e011e 9470
a1b3bf8c
AD
94712005-10-10 Akim Demaille <akim@epita.fr>
9472
9473 * examples/calc++/test: Be quiet unless VERBOSE.
9474
412e44aa
PE
94752005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9476
2a4647a3
PE
9477 * data/c.m4 (yydestruct, yysymprint):
9478 Use YYUSE instead of casting to void.
9479 * data/glr.c (YYUSE): New macro.
9480 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9481 Use it instead of rolling our own.
9482 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9483 (YYCHK1):
9484 Use /*CONSTCOND*/ to suppress lint warnings.
9485 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9486 (YY_STACK_PRINT): Use 'false' not '0'.
9487 (YYUSE): New macro.
9488 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9489 * data/yacc.c (YYUSE): New macro.
9490 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9491 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9492 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9493
9494
412e44aa
PE
9495 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9496 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9497
88c6637f
PE
94982005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9499
2f4f028d
PE
9500 Undo the parts of the unlocked-I/O change that substituted
9501 putc or puts for printf. This might hurt performance a bit,
9502 but some people prefer the printf style.
9503 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9504 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9505 All uses replaced by YYFPRINTF and YYDPRINTF.
9506 * data/yacc.c: Likewise.
9507 * lib/bitset.c (bitset_print): Likewise.
9508 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9509 putc and puts.
9510 * lib/lbitset.c (debug_lbitset): Likewise.
9511 * src/closure.c (print_firsts, print_fderives): Likewise.
9512 * src/gram.c (grammar_dump): Likewise.
9513 * src/lalr.c (look_ahead_tokens_print): Likewise.
9514 * src/output.c (escaped_output): Likewise.
9515 (user_actions_output): Break apart two printfs.
9516 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9517 * src/reduce.c (reduce_print): Likewise.
9518 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9519 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9520
88c6637f
PE
9521 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9522 Use assignments rather than casts-to-void to suppress
9523 unused-variable warnings. This pacifies 'lint'.
9524 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9525 unused-variable warnings.
9526
fb32e373
JMG
95272005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9528
9529 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9530
edb8f44f
PE
95312005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9532
fb9c0b33
PE
9533 Use unlocked I/O for a minor performance improvement on hosts like
9534 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9535 is to use the gnlib unlocked-io module, and to prefer putc and
9536 puts to printf when either will work (since the latter doesn't
9537 come in an unlocked flavor).
9538 * bootstrap (gnulib_modules): Add unlocked-io.
9539 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9540 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9541 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9542 and similarly for puts and putc and printf.
9543 * data/yacc.c: Likewise.
9544 * lib/bitset.c (bitset_print): Likewise.
9545 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9546 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9547 to printf.
9548 * lib/lbitset.c (debug_lbitset): Likewise.
9549 * src/closure.c (print_firsts, print_fderives): Likewise.
9550 * src/gram.c (grammar_dump): Likewise.
9551 * src/lalr.c (look_ahead_tokens_print): Likewise.
9552 * src/output.c (escaped_output): Likewise.
9553 (user_actions_output): Coalesce two printfs.
2f4f028d 9554 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
9555 * src/reduce.c (reduce_print): Likewise.
9556 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 9557 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 9558
edb8f44f
PE
9559 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9560 this confuses xgettext.
9561
b50d2359
AD
95622005-10-02 Akim Demaille <akim@epita.fr>
9563
9564 * bootstrap (gnulib_modules): Add strverscmp.
9565 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9566 * m4/.cvsignore: Add strverscmp.m4.
9567 * src/parse-gram.y (%require): New token, new rule.
9568 (version_check): New.
9569 * src/scan-gram.l (%require): Adjust.
9570 * tests/input.at (AT_REQUIRE): New.
9571 Use it.
9572 * doc/bison.texinfo (Require Decl): New.
9573 (Calc++ Parser): Use %require.
9574
21667f64
AD
95752005-10-02 Akim Demaille <akim@epita.fr>
9576
9577 * data/location.cc: New.
9578
2b81e969
AD
95792005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9580 Akim Demaille <akim@epita.fr>
9581
9582 Make sure -odir/foo.cc creates dir/location.hh etc.
9583 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9584 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9585 (spec_defines_file): Now const.
9586 (dir_prefix): New.
9587 (short_base_name): Remove.
9588 * src/files.c: Adjust.
9589 (dirname.h): Include.
9590 (base_name): Don't prototype it.
9591 (finput): Remove, duplicates gram_in.
9592 (full_base_name, short_base_name): Replace by...
9593 (all_but_ext, all_but_tab_ext): these.
9594 (compute_base_names): Rename as...
9595 (compute_file_name_parts): this.
9596 Update to compute the new variables, including dir_prefix.
9597 Adjust dependencies.
9598 * src/output.c (prepare): Output them.
9599 * src/reader.c: Adjust to use gram_in, not finput.
9600 * src/scan-skel.l (@dir_prefix@): New.
9601
ad6a9b97
JMG
96022005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9603
9604 * lib/subpipe.c: New function end_of_output_subpipe() added
9605 to allow support for non-posix systems. This is a no-op function
9606 for posix systems.
9607
9608 * lib/subpipe.h: New function end_of_output_subpipe() added
9609 to allow support for non-posix systems. This is a no-op function
9610 for posix systems.
9611
9612 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9613 handle the lack of pipe/fork functionality on non-posix systems.
9614
9615 * djgpp/Makefile.maint: DJGPP specific file.
9616
9617 * djgpp/README.in: DJGPP specific file.
9618
9619 * djgpp/config.bat: DJGPP specific configuration file.
9620
9621 * djgpp/config.sed: DJGPP specific configuration file.
9622
9623 * djgpp/config.site: DJGPP specific configuration file.
9624
9625 * djgpp/config_h.sed: DJGPP specific configuration file.
9626
9627 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9628
9629 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9630
fc695704
AD
96312005-10-02 Akim Demaille <akim@epita.fr>
9632
9633 * data/location.cc: New, extract from...
9634 * data/lalr1.cc: here.
9635 (location.hh): Include it after the user prologue, in case the
9636 filename type is defined by the user.
9637 Forward declation location and position before the pre-prologue.
9638 (yyresult_): Rename as...
9639 (yyresult): this, it's a local variable, not an attribute.
9640 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9641
96422005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
9643
9644 * examples/extexi: Restore the #line generation.
9645
fb9712a9
AD
96462005-09-30 Akim Demaille <akim@epita.fr>,
9647 Alexandre Duret-Lutz <adl@gnu.org>
9648
9649 Move the token type and YYSTYPE in the parser class.
9650 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9651 (parser::token): New, from the moved free definition of tokens.
9652 (parser::semantic_value): Now a full definition instead of an
9653 indirection to YYSTYPE.
9654 (b4_post_prologue): No longer included in the header file, but
9655 in the implementation file.
9656 * doc/bison.texi (C+ Language Interface): Update.
9657 * src/parse-gram.y: Support unary %define.
9658 * tests/actions.at: Define global_tokens_and_yystype for backward
9659 compatibility until we update the tests.
9660 * tests/calc.at: Idem.
9661 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9662 to simplify the code.
9663
55f0c7b1
PE
96642005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9665
9666 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9667 Ah, the good old days! Problem reported by Peter Klein.
9668 * bootstrap (gnulib_modules): Add strerror, strtoul.
9669 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9670 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9671
fb9712a9 96722005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
9673
9674 * data/c.m4 (b4_error_verbose_if): New.
9675 * data/lalr1.cc: Use it.
9676 (YYERROR_VERBOSE_IF): Remove.
9677 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9678 parser members, replaced by...
9679 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9680 local variables.
9681 (yysyntax_error_): Takes the state number as argument.
9682 (yyreduce_print_): Use the argument yyrule, not the former
9683 attribute yyn_.
9684
8a6f72f3
PE
96852005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9686
9687 * bootstrap (gnulib_modules): Add verify.
9688 * lib/.cvsignore: Add verify.h.
9689 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9690 * src/system.h (verify): Remove.
9691 Include verify.h instead.
9692 * src/tables.c (tables_generate): Use new API for 'verify'.
9693
0d50976f
PE
96942005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9695
ebc3737e
PE
9696 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9697 local variables whose names begin with 'yy'.
9698 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9699 Trivial changes from Joel E. Denny.
9700
0d50976f
PE
9701 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9702 it itself.
9703 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9704 don't use alloca any more.
9705
9706 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9707 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 9708 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
9709 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9710 to match yacc.c, to test more hosts.
9711
a05b79df
PE
97122005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9713
55289366
PE
9714 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9715 doesn't affect behavior.
9716 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9717 Solaris, AIX, MSC.
9718 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9719 This works a bit better with glibc, if user code has already included
9720 stdlib.h.
9721 * doc/bison.texinfo (Bison Parser): Document that users can't
9722 arbitrarily use malloc and free for other purposes. Document
9723 that <alloca.h> and <malloc.h> might be included.
9724 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9725 user must declare alloca.
9726
a05b79df
PE
9727 * HACKING (release): Forwarn the Translation Project about
9728 stable releses.
9729
3ab2ca22
AD
97302005-09-20 Akim Demaille <akim@epita.fr>
9731
9732 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9733
a9739e7c
PE
97342005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9735
a702593e
PE
9736 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9737 (YYSTACK_ALLOC_MAXIMUM): Use it.
9738 (yysyntax_error): New function.
9739 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9740 multiple syntax errors are reported, and alloca is being used.
9741 Instead, reallocate buffers twice as big each time, so that
9742 we waste at most half the allocated memory. Start with a small
9743 (128-byte) buffer that will suffice in most cases anyway.
9744 Use yysyntax_error to do most of the work.
9745
9746 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9747 yynerrs is the number of errors reported, not the number of
9748 errors encountered.
9749
a9739e7c
PE
9750 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9751 Mark it as expected to fail.
9752 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9753 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9754 Don't start user-code symbols with "yy", to avoid name space problems.
9755
f479c6c6
AD
97562005-09-19 Akim Demaille <akim@epita.fr>
9757
9758 Remove the traits, failed experiment.
9759 It never proved useful, and anyway because of the current
9760 definition, it was not possible to have several specialization of
9761 this traits, making it useless.
9762 * data/lalr1.cc (yy:traits): Remove.
9763 Inline its definitions in the parser class.
9764
e2586f82
AD
97652005-09-19 Akim Demaille <akim@epita.fr>
9766
9767 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9768 least Mac OSX with a /usr/local install of gettext.
9769
2e8cf949
AD
97702005-09-19 Akim Demaille <akim@epita.fr>
9771
9772 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9773 and yytoken for similarity with the other skeletons.
9774
c7fb0b90
AD
97752005-09-19 Akim Demaille <akim@epita.fr>
9776
4e26c69e 9777 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 9778
1bd0deda
PE
97792005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9780
9781 * NEWS: Version 2.1.
9782
9783 * NEWS: Remove notice of yytname change, since it was never in an
9784 official release.
9785 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9786 diagnostic.
9787 * src/output.c (prepare): Likewise.
9788 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9789 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9790 is not defined. This is an awful hack, but it's enough for now.
9791 All callers changed.
9792 * tests/glr-regression-at (make_value): Args are const pointers now,
9793 to avoid GCC warning.
9794 (Duplicated user destructor for lookahead): New test. Currently
9795 skipped. It fails on my host but I'm not sure it'll always fail.
9796
97972005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
9798
9799 * src/symtab.h (struct symbol): Declare the printer and destructor
9800 as const, to avoid accidental calls to free.
9801 (symbol_destructor_set, symbol_printer_set): Adjust.
9802 * src/symtab.c: Adjust.
9803
1bd0deda 98042005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
9805
9806 * data/c.m4 (b4_token_enums): New.
9807 (b4_token_defines): Rename as...
9808 (b4_token_enums_defines): this.
9809 (b4_token_defines): New, output only the #defines.
9810 * data/yacc.c, data/glr.c: Adjust.
9811 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9812 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9813 as default values.
9814
dbcdae2d
AD
98152005-09-16 Akim Demaille <akim@epita.fr>
9816
9817 * data/lalr1.cc (yylex_): Remove, inline its code.
9818 (yyreport_syntax_error_): Remove, replaced by...
9819 (yysyntax_error_): this which returns a string and leaves to the
9820 caller the call to the users' error function.
9821 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9822 Move from members of the parser object...
9823 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9824 to local variables of the parse function.
9825
70d8f291
AD
98262005-09-16 Akim Demaille <akim@epita.fr>
9827
9828 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9829 since it's in Bison's name space.
9830
b47dbebe
PE
98312005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9832
ae199bf1
PE
9833 * data/glr.c (yyresolveValue): Add default case to pacify
9834 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9835
b47dbebe
PE
9836 * NEWS: Document when yyparse started to return 2.
9837 * doc/bison.texinfo (Parser Function): Document when yyparse
9838 returns 2.
9839
9840 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9841 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9842 changed.
9843 (class position): file_name -> filename (reverting). All uses changed.
9844
98452005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9846
9847 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9848 do anything if $@ exists. This reverts part of the 2005-07-07
9849 patch.
9850
00292f66
PE
98512005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9852
9853 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9854 contains obsolete information and isn't worth distributing as a
9855 separate file anyway.
9856 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9857 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9858 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9859 (yyparse): Abort if user code uses longjmp to throw an unexpected
9860 value.
9861
a420f962
PE
98622005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9863
00292f66
PE
9864 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9865 Suggested by twlevo@xs4all.nl.
9866
127287e9
PE
9867 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9868 This avoids a diagnostic from gcc -Wswitch-enum.
9869 Problem reported by twlevo@xs4all.nl.
9870
a420f962
PE
9871 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9872 standards. Use "file name" or "file" or "name", depending on
9873 the context.
9874 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9875 not to hack/foo.tab.c.
9876 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
9877 * data/glr.c: b4_filename -> b4_file_name.
9878 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9879 All uses changed.
9880 (class position): filename -> file_name. All uses changed.
9881 * data/yacc.c: b4_filename -> b4_file_name.
9882 * lib/bitset.h: filename -> file_name in local vars.
9883 * lib/bitset_stats.c: Likewise.
9884 * src/files.c: Likewise.
9885 * src/scan-skel.l ("@output ".*\n): Likewise.
9886 * src/files.c (file_name_split): Renamed from filename_split.
9887 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
9888
98892005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9890
9891 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9892 to accommodate latest gnulib.
9893
9894 * tests/glr-regression.at (Duplicate representation of merged trees):
9895 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9896
9897 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9898 needed.
9899
42a6501d
PE
99002005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9901
9902 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9903 All uses changed. Invoke user destructor after an error during a
9904 split parse (trivial change from Joel E. Denny).
9905
9906 * tests/glr-regression.at
9907 (User destructor after an error during a split parse): New test case.
9908 Problem reported by Joel E. Denny in:
9909 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9910
ef9a1faf
PE
99112005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9912
5b4aaf78
PE
9913 * README-cvs: Give URLs for recommended tools.
9914 Mention Gzip version problem, and bootstrapping issues.
9915 Remove troubleshooting section, as it's somewhat obsolete.
9916
b5240ba5
PE
9917 * bootstrap (no_cache): New var, to accommodate different wget
9918 variants. Use it instead of '-C off'. Problem reported by
9919 twlevo@xs4all.nl.
9920
ef9a1faf
PE
9921 * data/glr.c (yydestroyStackItem): New function.
9922 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9923 debugging information. Problem reported by Joel E. Denny.
9924
e6efa9da
AD
99252005-08-25 Akim Demaille <akim@epita.fr>
9926
9927 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9928
adc90f13
PE
99292005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9930
9931 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9932 Don't invoke destructor on unresolved entries.
9933 * tests/glr-regression.at
9934 (User destructor for unresolved GLR semantic value): New test case.
9935 Problem reported by Joel E. Denny in:
9936 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9937
f9315de5
PE
99382005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9939
15d29c1f
PE
9940 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9941 Add strnlen.c.
9942 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9943 lib-prefix.m4, po.m4.
9944
dd5f2af2
PE
9945 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9946 in yydestruct diagnostic, since it might not be an error.
9947 Problem reported by Joel Denny near end of
9948 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 9949 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
9950 * data/yacc.c (yyreturn): Likewise.
9951 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9952
9953 * src/files.c: Remove obsolete FIXME comment.
9954
9955 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9956 with the other templates, and to fix bogus run-on messages such
9957 as the one reported at the end of
9958 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9959 All callers changed to avoid the newline.
9960 (yyprocessOneStack): Output two lines rather than one, to accommodate
9961 the above change. This changes the debug output format slightly.
9962
f9315de5
PE
9963 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9964 reported by Joel E. Denny in
9965 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9966 (trivial change).
9967 * tests/glr-regression.at (Duplicate representation of merged trees):
9968 New test, from Joel E. Denny in:
9969 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9970 * THANKS: Add Joel E. Denny.
9971
9972 * configure.ac (AC_INIT): Bump to 2.0c.
9973
04098407
PE
99742005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9975
9976 * NEWS: Version 2.0b.
9977
ca5d2013
PE
9978 * Makefile.am (SUBDIRS): Put examples before tests, so that
9979 "make check" doesn't finish with "All 1 tests passed".
9980
3d54b576
PE
9981 * tests/regression.at (Token definitions): Don't rely on
9982 AT_PARSER_CHECK for data that contains backslashes. It currently
9983 uses 'echo', and 'echo' isn't portable if its argument contains
9984 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9985 that the byte '\0xff' is not printable in the C locale; it is,
9986 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9987 not printable, so use '\0x81' to test.
9988
d53ae497
PE
9989 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9990 version of GCC, since the macro is used with non-GCC compilers.
9991
fc01665e
PE
9992 Fix core dump reported by Pablo De Napoli in
9993 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9994 * tests/regression.at (Invalid inputs with {}): New test.
9995 * src/parse-gram.y (token_name): Translate type before using
9996 it as an index.
9997
04098407
PE
9998 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9999 the user's name space. All uses changed to __attribute__
10000 ((__unused__)).
10001 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10002 Add __attribute__ ((__noreturn__)).
10003
10004 * etc/clcommit: Remove. We weren't using it, and it failed
10005 "make maintainer-distcheck".
10006 * Makefile.maint: Merge from coreutils.
10007 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10008 (syntax-check-rules): Change list of rules as described below.
10009 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10010 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10011 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10012 (sc_trailing_space): New rules.
10013 (sc_xalloc_h_in_src): Remove.
10014 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10015 (sc_space_tab, sc_error_exit_success, sc_changelog):
10016 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10017 (makefile-check, po-check, author_mark_check):
10018 (makefile_path_separator_check, copyright-check):
10019 Use grep -n, to make it easier to find violations.
10020 Use CVS_LIST and CVS_LIST_EXCEPT.
10021 (header_regexp, h_re): Remove.
10022 (dd_c): New macro.
10023 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10024 (my-distcheck): Use more-modern GCC flags.
10025 (signatures, %.asc): Remove.
10026 (rel-files, announcement): Remove signatures.
10027 Restore old updating code, even though we don't use it, so
10028 that we're the same as coreutils.
10029 (alpha, beta, major): Depend on news-date-check.
10030 Make the upload commands.
10031
10032 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10033 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10034 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10035 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10036 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10037 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10038 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10039 * tests/sets.at: Likewise.
10040
10041 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10042 we comment out the Autoconf version number.
10043 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10044 it's error-prone and "make maintainer-distcheck" rejects it.
10045
10046 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10047 Indent calls to "error" to pacify "make maintainer-distcheck",
10048 when the calls are not intended to be translated.
10049 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10050
10051 * src/Makefile.am (DEFS): Use +=, to pacify
10052 "make maintainer-distcheck".
10053 (bison_SOURCES): Add scan-skel.h.
10054 (sc_tight_scope): New rule, from coreutils.
10055
10056 * src/files.c (src_extension, header_extension):
10057 Now static, not extern.
10058 * src/getargs.c (short_options): Likewise.
10059 * src/muscle_tab.c (muscle_table): Likewise.
10060 * src/parse-gram.y (current_class, current_type, current_prec):
10061 Likewise.
10062 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10063 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10064 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10065 void, to avoid warning when NLS is disabled.
10066 * src/output.c: Include scan-skel.h.
10067 (scan_skel): Remove decl, since scan-skel.h does this.
10068 (output_skeleton):
10069 Indent calls to "error" to pacify "make maintainer-distcheck".
10070 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10071 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10072 "make maintainer-distcheck".
10073 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10074 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10075 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10076 (skel_lex_destroy, scan_skel): Move these decls to...
10077 * src/scan-skel.h: New file.
10078 * src/uniqstr.c (uniqstr_assert):
10079 Indent calls to "error" to pacify "make maintainer-distcheck".
10080
10081 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10082 not @VAR@.
10083
10084 * tests/torture.at: Revamp to avoid misuse of atoi that
10085 "make maintainer-distcheck" complained about.
10086
10087 * examples/extexi (message): Don't print a message more than once,
10088 and omit line-number decoration that makes Emacs compile think
10089 that informative messages are worth worrying about.
10090
100912005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10092
10093 * configure.ac: Update version number.
10094
10095 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10096 accidentally.
10097 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10098 autogenerated by the maintainer.
10099 * examples/calc++/.cvsignore: Add *.yy.
10100
10101 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10102 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10103 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10104
10105 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10106
10107 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10108 from maintainer-distcheck about casting the argument of 'free'.
10109
10110 * NEWS: Mention recent yytname changes.
10111 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10112
10113 * bootstrap: For translations that have not yet been upgraded to
10114 the new runtime-po domain, prime the pump by extracting the
10115 relevant strings from the obsolete translations. This code can be
10116 removed once the bison-runtime domain has been translated by each
10117 team.
10118
10119 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10120 now that token names are already quoted.
10121
10122 Fix problem reported by Anthony Heading.
10123 * data/glr.c (YYTOKEN_TABLE): New macro.
10124 (yytname): Define if YYTOKEN_TABLE.
10125 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10126 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10127 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10128 * src/output.c (prepare_symbols): Output token_table_flag.
10129
0ffda363
PE
101302005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10131
10132 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10133 again if the first call fails.
10134
10135 * data/glr.c (yytnamerr): New function.
10136 (yyreportSyntaxError): Use it to dequote most string literals.
10137 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10138 with other skeletons. All uses changed.
10139 (yytnameerr_): New function.
10140 (yyreport_syntax_error): Use it to dequote most string literals.
10141 * data/yacc.c (yytnamerr): New function.
10142 (yyerrlab): Use it to decode most string literals.
10143 * doc/bison.texinfo (Decl Summary, Calling Convention):
10144 Clarify quoting convention of yytname.
10145 * src/output.c (prepare_symbols): Quote all names. This undoes
10146 the 2005-04-17 change, which is now accomplished (mostly) via
10147 changes in the parsers as described above.
10148 * tests/regression.at (Token definitions, Web2c Actions):
10149 Undo most 2005-04-17 change here, too.
10150
101512005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10152
10153 Fix more problems reported by twlevo@xs4all.nl.
10154 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10155 remove trailing spaces. This loses the exit status of ./types,
10156 and isn't needed since ./types shouldn't be emitting trailing
10157 spaces.
10158 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10159 as the stack isn't valid in that case.
10160
10161 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10162 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10163 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10164 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10165 is used.
10166 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10167 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10168 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10169 Likewise.
10170
10171 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10172 overly-picky compilers that reject 'char *foo = "bar";'.
10173
10174 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10175 to FILE * parameter, not to stderr. This fixes a typo introduced
10176 in the 2005-07-12 change.
10177
10178 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10179 warnings from GCC 4.
10180
10181 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10182 (yyglrShiftDefer, yysplitStack):
10183 Remove unused parameters b4_pure_formals. All uses changed.
10184 (yyglrShift): Remove unused parameters b4_user_formals.
10185 All uses changed.
10186 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10187
6100a9aa
PE
101882005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10189
258b75ca
PE
10190 Destructor cleanups and regularization among the three skeletons.
10191 * NEWS: Document the behavior changes.
10192 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10193 stack before failing, as the cleanup code will do it for us now.
10194 * data/lalr1.cc (yyerrlab): Likewise.
10195 * data/glr.c (yyparse): Pop everything off the stack before
10196 freeing it, so that destructors get called properly.
10197 * data/lalr1.cc (yyreturn): Likewise.
10198 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10199 This is more consistent.
10200 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10201 why destructors might be called. 1.875 -> 2.1.
10202 (Destructor Decl, Decl Summary, Table of Symbols):
10203 Some English-language cleanups for %destructor.
10204 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10205 Add output line for destructor of start symbol.
10206 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10207 because of that same extra output line.
10208
1a059451
PE
10209 * NEWS: Document minor wording changes in diagnostics of
10210 Bison-generated parsers.
10211 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10212 Remove unused formals. All uses changed.
10213 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10214 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10215 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10216 Rename yyoverflowab to yyexhaustedlab.
10217 When memory exhaustion occurs during syntax-error reporting,
10218 report it separately rather than in a single diagnostic; this
10219 eases translation.
10220 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10221 (Memory Exhausted): Renamed from Parser Stack Overflow.
10222 Revamp wording slightly to prefer "memory exhaustion".
10223 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10224
97460c78
PE
10225 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10226
30757c8c
PE
10227 Add i18n support to the GLR skeleton. Partially fix the C++
10228 skeleton; a C++ expert needs to finish this. Remove debugging
10229 msgids; there's little point to having them translated, since they
10230 can be understood only by someone who can read the
10231 (English-language) source code.
10232
10233 Generate runtime-po/bison-runtime.pot automatically, so that we
10234 don't have to worry about garbage getting in that file. We'll
10235 make sure after the next official release that old msgids don't
10236 get lost. See
10237 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10238
10239 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10240 Now auto-generated.
10241 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10242 Fix typos in explanations of the runtime file.
10243 * bootstrap: Change gettext keyword from YYI18N to YY_.
10244 Use standard Makefile.in.in in runtime-po, since we'll arrange
10245 for backward-compatible bison-runtime.po files in a different way.
10246 * data/glr.c (YY_): New macro, from yacc.c.
10247 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10248 Translate messages intended for users.
10249 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10250 the wording in the other skeletons. We don't know that the memory
10251 is virtual.
10252 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10253 Use same method that yacc.c uses.
10254 Don't translate debugging messages.
10255 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10256 it doesn't work (yet), and requires C++ expertise to fix.
10257 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10258 Move defn to a more logical place, to be consistent with other
10259 skeletons.
10260 Don't translate debugging messages.
10261 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10262 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10263 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10264 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10265
ac8c5689
PE
10266 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10267 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10268 void, not int.
10269 * tests/glr-regression.at (Badly Collapsed GLR States):
10270 Likewise.
10271 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10272 yylex should return 0 at EOF rather than aborting.
10273
6100a9aa
PE
10274 Improve tests for stack overflow in GLR parser.
10275 Problem reported by twlevo@xs4all.nl.
10276 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10277 All uses removed.
10278 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10279 can handle the problem.
10280 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10281 (yyparse): New local variable yyresult to record the result.
10282 Use result of setjmp to set it, rather than storing itinto
10283 struct.
10284 (yyDone): Remove label.
10285 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10286 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10287 if YYABORT is used).
10288 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10289 yyparse status; put status > 1 into diagnostic.
10290 Check that status==2 works.
10291 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10292 Use exit status 3 for failure to open (which shouldn't happen).
10293
15f40952
PE
102942005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10295
67fd79c4
PE
10296 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10297 1 on syntax error; just let yyparse do its thing.
10298 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10299 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10300 (Exploding the Stack Size with Alloca):
10301 (Exploding the Stack Size with Malloc):
10302 Expect exit status 2, not 1, since the parser is supposed to blow
10303 its stack. Problem reported by twlevo@xs4all.nl.
10304
15f40952
PE
10305 * data/glr.c (yyparse): Don't assume that the initial calls
10306 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10307 Print a stack-overflow message and fail instead.
10308 Initialize the line-number information before creating the stack,
10309 so that the stack-overflow message can report line zero safely.
10310
f32c66b5
PE
103112005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10312
a22ff96f 10313 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
10314 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10315 (yyuserMerge): Provide a default case if b4_mergers is empty.
10316 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10317 * tests/glr-regression.at
10318 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 10319 Add casts to pacify C++ compilers.
1beb0b24
PE
10320 * tests/glr-regression.at (Improper merging of GLR delayed action
10321 sets): Declare yylex before using it.
f32c66b5 10322 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
10323 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10324 test for valgrind; valgrind is independent of g++.
10325 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10326 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10327 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10328 Use a destructor, so that we can expand the stack. Change
10329 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 10330
d741bd1b
PE
103312005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10332
10333 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10334 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10335
0410a6e0
PE
103362005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10337
10338 * PACKAGING: New file, suggested by Bruno Haible and taken from
10339 similar wording in gettext's PACKAGING file.
10340 * NEWS: Mention PACKAGING.
10341 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10342
f7ab6a50
PE
103432005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10344
baf785db 10345 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
10346 * bootstrap: Get runtime translations into runtime-po.
10347 Create runtime-po files automatically, if possible.
10348 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10349 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10350 does not infringe on the user's name space.
10351 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10352 * doc/bison.texinfo (Internationalization): Revamp the English
10353 and Texinfo syntax a bit, to try to make it clearer.
10354 (Bison Options, Option Cross Key): Mention --print-localedir.
10355 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10356 YYENABLE_NLS. Quote a bit more.
10357 * runtime-po/.cvsignore: New file.
10358 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10359 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10360 * runtime-po/quot.sed: Likewise.
10361 * runtime-po/boldquot.sed: Likewise.
10362 * runtime-po/en@quot.header: Likewise.
10363 * runtime-po/en@boldquot.header: Likewise.
10364 * runtime-po/insert-header.sin: Likewise.
10365 * runtime-po/remove-potcdate.sin: Likewise.
10366 * runtime-po/Makevars: Likewise.
10367 * runtime-po/LINGUAS: Likewise.
10368 * runtime-po/de.po: Likewise; we will rely on the translation project
10369 to maintain this, so "bootstrap" should get it.
0410a6e0 10370 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
10371 its value.
10372 * src/main.c (main): Bind the bison-runtime domain, too.
10373
103742005-07-12 Bruno Haible <bruno@clisp.org>
10375
10376 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10377 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10378 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10379 * runtime-po: New directory.
10380 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10381 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10382 * runtime-po/Rules-quot: New file, copied from po/.
10383 * runtime-po/quot.sed: Likewise.
10384 * runtime-po/boldquot.sed: Likewise.
10385 * runtime-po/en@quot.header: Likewise.
10386 * runtime-po/en@boldquot.header: Likewise.
10387 * runtime-po/insert-header.sin: Likewise.
10388 * runtime-po/remove-potcdate.sin: Likewise.
10389 * runtime-po/Makevars: New file.
10390 * runtime-po/POTFILES.in: New file.
10391 * runtime-po/LINGUAS: New file.
10392 * runtime-po/bison-runtime.pot: New file.
10393 * runtime-po/de.po: New file.
10394 * m4/bison.m4: New file.
10395 * Makefile.am (SUBDIRS): Add runtime-po.
10396 (aclocaldir, aclocal_DATA): New variables.
10397 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10398 Define aclocaldir.
10399 * src/getargs.c (usage): Document --print-localedir option.
10400 (PRINT_LOCALEDIR_OPTION): New enum item.
10401 (long_options): Add --print-localedir option.
10402 (getargs): Handle --print-localedir option.
10403 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10404 (Internationalization): New section.
10405
22dda0f0
AD
104062005-07-12 Akim Demaille <akim@epita.fr>
10407
10408 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10409 for consistency with the rest of the code.
10410 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10411 Add separators.
10412
82b248ad
AD
104132005-07-12 Akim Demaille <akim@epita.fr>
10414
10415 * src/parse-gram.y: Use %printer instead of YYPRINT.
10416
fa0e9314
AD
104172005-07-12 Akim Demaille <akim@epita.fr>
10418
867a3e00
AD
10419 * src/symtab.h, src/symtab.c (symbol_print): New.
10420 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10421 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10422
104232005-07-12 Akim Demaille <akim@epita.fr>
10424
10425 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
10426 b4_at_dollar and b4_dollar_dollar.
10427
e054b190
PE
104282005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10429
10430 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10431 and Pennello's paper.
10432
34160ec4
PE
104332005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10434
407d4a75
PE
10435 * data/yacc.c (yyparse): Undo previous patch. Instead,
10436 set yylsp[0] and yyvsp[0] only if the initial action
10437 sets yylloc and yylval, respectively.
10438
34160ec4
PE
10439 * data/yacc.c (yyparse): In the initial action, set
10440 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10441 This avoids the use of undefined variables if the initial
10442 action does not set yylloc and/or yylval.
10443
c3d5a4a7
PE
104442005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10445
b34d96c1
PE
10446 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10447 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10448 Remove from CVS. These files are automatically generated.
10449 * examples/extexi: Clarify that this file is now part of Bison,
10450 not GNU M4, and that it works with any POSIX-compatible Awk.
10451 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10452 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10453 so that we also get calc++-parser.yy. Geneate it.
10454 Use $(AWK), not gawk, since any conforming Awk will do.
10455 Put comment before action, since older 'make' can't handle comment
10456 in action.
10457 $(BUILT_SOURCES): List all built sources, not just some of them.
10458 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10459 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10460 $($(calc_sources_generated)): Remove unnecessary test for existence
10461 of target. (This had a shell syntax error anyway; a stray "x".)
10462 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10463 calc++-parser.yy.
10464 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10465
c3d5a4a7
PE
10466 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10467 implied by the other modules.
10468
828c373b
AD
104692005-07-06 Akim Demaille <akim@epita.fr>
10470
10471 Bind examples/calc++ to the package.
10472 * examples/calc++/Makefile: Remove, replaced by...
10473 * examples/calc++/Makefile.am: ... this new file.
10474 * examples/calc++/test: Remove input.
10475 * examples/calc++/compile: Remove.
10476 * examples/Makefile.am: New.
10477 * configure.ac, Makefile.am: Adjust.
10478 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10479
63cb01d6
PE
104802005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10481
fd2df2ed
PE
10482 * data/glr.c (yyFail): Drastically simplify; since the format argument
10483 never had any % directives, we can simply pass it to yyerror.
10484 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10485 be modified later, as that is the usual style in glr.c.
10486 Problems reported by Paul Hilfinger.
10487
63cb01d6
PE
10488 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10489 and size overflow errors.
10490 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10491 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10492 (YYSIZEMAX): New macro.
10493 (yystpcpy): New function, taken from yacc.c.
10494 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10495 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10496 so that we don't have to maintain their signatures.
10497 (yyFail): Check for buffer overflow, by using vsnprintf rather
10498 than vsprintf. Allocate a bigger buffer if possible.
10499 Report an error if buffer allocation fails.
10500 (yyStackOverflow): New function.
10501 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10502 the initialization was successful. It might fail if storage was
10503 exhausted.
10504 (yyexpandGLRStack): Add more checks for storage allocation failure.
10505 Use yyStackOverflow to report failures.
10506 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10507 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10508 Don't assume stack number fits in int.
10509 (yysplitStack): Check for storage allocation failure.
10510 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10511 can print diagnostics on storage allocation failure. All callers
10512 changed.
10513 (yyresolveValue): Use yybool for boolean.
10514 (yyreportSyntaxError): Check for size-calculation overflow.
10515 This code is taken from yacc.c.
10516 (yyparse): Check for storage allocation errors when allocating
10517 the initial stack.
10518
1c59e0a1
AD
105192005-07-05 Akim Demaille <akim@epita.fr>
10520
10521 Extract calc++ from the documentation.
10522 * doc/bison.texinfo (Calc++): Add the extraction marks.
10523 * examples/extexi: New, from the aborted GNU Programming 2E.
10524 Separate the different paragraph of a file with empty lines.
10525 * examples/Makefile: Use it to extract the whole calc++ example.
10526
8a0adb01
AD
105272005-06-24 Akim Demaille <akim@epita.fr>
10528
10529 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10530 class typedefs.
10531
12545799
AD
105322005-06-22 Akim Demaille <akim@epita.fr>
10533
10534 * doc/bison.texinfo (C++ Language Interface): First stab.
10535 (C++ Parsers): Remove.
10536
99be0235
AD
105372005-06-22 Akim Demaille <akim@epita.fr>
10538
10539 * data/lalr1.cc (yylex_): Honor %lex-param.
10540
0ffd4fd1
AD
105412005-06-22 Akim Demaille <akim@epita.fr>
10542
10543 Start a set of simple examples.
10544 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10545 * examples/calc++/calc++-driver.hh,
10546 * examples/calc++/calc++-parser.yy,
10547 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10548 * examples/calc++/compile, examples/calc++/test: New.
10549
0925ebb4
PE
105502005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10551
10552 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10553 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10554 which stems from the 2005-05-27 patch.
10555
43d3b664
PH
105562005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10557
10558 * data/glr.c: Modify treatment of unused parameters to permit use
10559 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10560
3062864d
PE
105612005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10562
10563 Fix infringement on user name space reported by Janos Zoltan Szabo.
10564 * data/yacc.c (yyparse): strlen -> yystrlen.
10565
989b5b8e
AD
105662005-05-30 Akim Demaille <akim@epita.fr>
10567
10568 * data/lalr1.cc (_): New.
10569 Translate the various messages.
10570
bedf57f5
PE
105712005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10572
10573 Fix infringement on user name space reported by Bruno Haible.
10574 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10575 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10576 the user's name space.
10577 (alloca): Include <stdlib.h> to get it, if it's not built in.
10578 (YYMALLOC, YYFREE): Define only if needed.
10579 (malloc, free): Declare, but only if needed, as this infringes on
10580 the user name space.
10581
4d1801f1
PE
105822005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10583
10584 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10585 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10586 with %d format.
10587 * lib/ebitset.c (min, max): Undef before defining.
10588 * lib/vbitset.c (min, max): Likewise.
10589 * lib/subpipe.c (create_subpipe): Save local variables in case
10590 vfork clobbers them.
10591
105922005-05-24 Bruno Haible <bruno@clisp.org>
10593
10594 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10595 error message syntax used by gcc-4.0.
10596
b94a9e1e
PE
105972005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10598
85ac3861
PE
10599 * README: Mention m4 1.4.3. Remove obsolete advice about
10600 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10601
b94a9e1e
PE
10602 * bootstrap: Remove workaround for problem I encountered with
10603 gettext 0.14.1; it seems to be fixed now.
10604
51c30d21
PE
106052005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10606
009ce67d
PE
10607 * NEWS: Version 2.0a.
10608
f2a97c62
PE
10609 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10610 the previous change.
10611
c8775f93
PE
10612 Various maintainer cleanups.
10613 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10614 conftest*, for benefit of CVS commands run at the same time as
10615 "configure". Add build-aux, since "bootstrap" now creates it and
10616 its subfiles.
10617 * Makefile.cfg (move_if_change): Remove.
10618 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10619 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10620 (po_repo, do-po-update, po-update, wget_files, get-targets):
10621 (config.guess-url_prefix, config.sub-url_prefix):
10622 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10623 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10624 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10625 Remove.
10626 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10627 this is now the recommended name.
10628 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10629 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10630 ylwrap. These files now go into build-aux.
10631 * config/move-if-change: Remove.
10632 * config/prev-version.txt: Bump from 1.75 to 2.0.
10633
3ea5f0ec
PE
10634 * bootstrap: Add stdio-safer, unistd-safer modules.
10635 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10636 we don't need it).
10637 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10638 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10639 * lib/subpipe.c: Include "unistd-safer.h".
10640 (create_subpipe): Make sure all the newly-created
10641 file descriptors are > 2, so that diagnostics don't
10642 get sent down them (which might cause Bison to hang, in theory).
10643 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10644 * src/files.c (xfopen): Use fopen_safer, not fopen.
10645
51c30d21
PE
10646 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10647 yesterday's yacc.c fix.
10648
cea1469d
PE
106492005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10650
3ea5f0ec
PE
10651 * data/glr.c, data/lalr1.cc: Update copyright date.
10652
cea1469d
PE
10653 Fix a destructor bug reported by Wolfgang Spraul in
10654 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10655 * data/yacc.c (yyabortlab): Don't call destructor, and
10656 don't set yychar to EMPTY.
10657 (yyoverflowlab): Don't call destructor.
10658 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10659 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10660 since we no longer output the message "discarding lookahead token
10661 end of input ()".
10662
5e6f62f2
PH
106632005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10664
10665 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10666 fix a small glitch in debugging output.
10667 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10668 after YY_SYMBOL_PRINT where needed.
10669
10670 (struct yyGLRState): Add some comments.
10671 (struct yySemanticOption): Add some comments.
10672 (union yyGLRStackItem): Add comment.
10673
10674 (yymergeOptionSets): Correct this to properly perform the union,
10675 avoiding infinite reported by Michael Rosien.
10676 Update comment.
10677
10678 * tests/glr-regression.at: Add test for GLR merging error reported
10679 by M. Rosien.
cea1469d 10680
0fb669f9
PE
106812005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10682
10683 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10684 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10685 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10686 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10687 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10688 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10689 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10690 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10691 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10692 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10693 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10694 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10695 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10696 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10697 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10698 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10699 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10700 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10701 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10702 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10703 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10704 src/output.h, src/parse-gram.c, src/parse-gram.h,
10705 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10706 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10707 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10708 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10709 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10710 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10711 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10712 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10713 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10714 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10715 tests/reduce.at, tests/regression.at, tests/sets.at,
10716 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10717 Update FSF postal mail address.
10718
51f4735e
PE
107192005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10720
10721 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10722 Problem reported by Ralf Menzel.
10723
80ce3401
PE
107242005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10725
10726 * tests/actions.at: Test that stack overflow invokes destructors.
10727 From Marcus Holland-Moritz.
10728 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10729 from here....
10730 (yyreturn): to here. That way, destructors are called properly
10731 even if the stack overflows, or the user calls YYACCEPT or
10732 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10733 (yyoverflowlab): Destroy the lookahead.
10734
107352005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10736
10737 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10738
72f000b0
PE
107392005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10740
10741 * NEWS: Bison-generated C parsers no longer quote literal strings
10742 associated with tokens.
10743 * src/output.c (prepare_symbols): Don't escape strings,
10744 since users don't want to see C escapes.
10745 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10746 in diagnostics.
c19683bb 10747 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
10748 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10749
1094323f
PE
107502005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10751
10752 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10753 the data size is known to be too small and we can't increase it.
10754 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10755
ca407bdf
PE
107562005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10757
10758 * src/parse-gram.y: Include quotearg.h.
10759 (string_as_id): Quote $1 before using it as a key, since the
10760 lexer no longer quotes it for us.
10761 (string_content): Don't strip quotes, since lexer no longer
10762 quotes it for us.
10763 * src/scan-gram.l: Include quotearg.h.
10764 ("\""): Omit quote.
10765 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10766 a key, since the rest of the lexer doesn't quote it.
10767 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10768 * tests/regression.at (Token definitions): Check for backslashes
10769 in token strings.
10770
10771 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10772 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10773 (yyparse): Revamp code to generate long syntax error message, to
10774 make it easier to translate, and to avoid problems with arithmetic
10775 overflow. Change "virtual memory" to "memory" in diagnostic, since
10776 we don't know whether the memory is virtual.
10777
1ce59070
PE
107782005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10779
10780 * NEWS: Bison-generated C parsers now use the _ macro to
10781 translate strings.
10782 * data/yacc.c (_) [!defined _]: New macro.
10783 All English strings wrapped inside this macro.
10784 * doc/bison.texinfo (Bison Parser): Document _.
10785 * po/POTFILES.in: Include src/parse-gram.c, since it now
10786 includes translateable strings that parse-gram.y doesn't.
10787
a749a695
PE
107882005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10789
10790 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10791 reverting the 2004-10-11 change to this function.
10792 (symbol_check_alias_consistency): Don't call symbol_type_set
10793 if the type name is already correct.
10794 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10795
8fb1053b
PE
107962005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10797
10798 * tests/regression.at (Token definitions): Don't use a token named
10799 c, as that generates a "#define c ..." that runs afoul of buggy
10800 stdlib.h that uses the identifier c as a member of struct
10801 drand48_data. Problem reported by Horst Wente.
10802
ff498c4a
PE
108032005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10804
10805 * bootstrap: Change translation URL from
10806 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10807 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10808 redirection glitches. Problem reported by twlevo@xs4all.nl.
10809
65211d70
PE
108102005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10811
10812 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10813 after operands; POSIX says this isn't portable for the c99 command.
10814
9577fb1f
PE
108152005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10816
10817 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10818 immediately if a data overrun has occurred; this may help us track
10819 down what may be a spurious failure on MacOS.
10820
78b178f7
PE
108212005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10822
a2599d0f
PE
10823 Respond to problems reported by twlevo@xs4all.nl.
10824
10825 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10826
78b178f7
PE
10827 * src/vcg.h: Comment fix.
10828 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10829 (G_CMAX): Change to -1 instead of INT_MAX.
10830
10831 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 10832
7296e729
PE
108332005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10834
10835 * src/tables.c (state_number_to_vector_number): Put it inside an
10836 "#if 0", since it's not currently used. Problem reported by
10837 Roland McGrath.
10838
05ac60f3
PE
108392005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10840
10841 * src/output.c (escaped_output): Renamed from
10842 escaped_file_name_output, since we now use it for symbol tags as
10843 well. All uses changed.
10844 (symbol_destructors_output, symbol_printers_output):
10845 Escape symbol tags too.
10846 Problem reported by Matyas Forstner in
10847 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10848
10849 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10850 not needed.
10851 * src/output.c (user_actions_output, token_definitions_output,
10852 symbol_destructors_output, symbol_printers_output): Likewise.
10853 * src/reader.c (prologue_augment): Likewise.
10854 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10855
10856 * src/vcg.c (output_edge): Don't quote linestyle arg.
10857 Problem reported by twlevo@xs4all.nl.
10858
7eb453ac
PE
108592005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10860
10861 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10862 example, reported by Derek M Jones. Also, make the example even
10863 more outrageous, to better illustrate how bad the problem is.
10864
4c04c52a
PE
108652005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10866
10867 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10868 putsym. Typo reported by Sebastian Piping.
10869
a61e1620
PE
108702005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10871
10872 * doc/bison.texinfo (Language and Grammar): some -> same
10873 (Epilogue): int he -> in the
10874 Typos reported by Sebastian Piping via Justin Pence.
10875
9ec93868
PE
108762005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10877
10878 * tests/glr-regression.at (Improper handling of embedded actions
10879 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10880 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10881 with dollar signs in test names.
10882 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10883 for a similar reason.
10884
73ce7e7e
PE
108852005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10886
10887 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10888 wants to redefine G_VIEW.
10889
2e72b98e
PE
108902005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10891
10892 * src/vcg.c (get_view_str): Remove case for normal_view.
10893 Problem reported by twlevo@xs4all.nl.
10894
e0d634e5
PE
108952005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10896
ccf830a4
PE
10897 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10898 Problem reported by twlevo@xs4all.nl.
10899
e0d634e5
PE
10900 * doc/bison.texinfo: Change @dircategory from "GNU programming
10901 tools" to "Software development". Requested by Richard Stallman
10902 via Karl Berry.
10903
7bbc8cb0
PE
109042005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10905
10906 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10907 Problem reported by twlevo@xs4all.nl.
10908
08b770bc
PE
109092005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10910
10911 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10912 keyword; it's not needed with modern compilers, and it doesn't
10913 affect correctness with older compilers. Suggested by
10914 twlevo@xs4all.nl.
10915
95f22ad2
PE
109162005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10917
10918 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10919 gcc -Wswitch-default.
10920 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10921 * data/yacc.c (yyparse): Likewise.
10922
d229d15c
PE
109232005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10924
10925 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10926 already. Let config.h define any nonstandard values.
10927
ecadd90f
PE
109282005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10929
10930 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10931 for the benefit of slower hosts. Problem reported by
10932 Nelson H. F. Beebe.
10933
213744b5
PE
109342005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10935
10936 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10937 being defined and not used.
10938 * data/lalr1.cc (yyparse): Likewise.
10939 Use "if (false)" rather than "if (0)".
10940
249d3236
PE
109412005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10942
10943 * TODO: Mention that we should allow NUL bytes in tokens.
10944
987cc1fb
PE
109452005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10946
10947 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10948 Problem reported by Hans Aberg.
10949
08fe02d9
PE
109502005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10951
10952 * src/getargs.c (version): Happy new year; update overall
10953 program copyright date from 2004 to 2005.
10954
10955 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10956 Problem reported by Hans Aberg.
10957 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10958 (Output file names.): Add a test for the case when standard output
10959 is closed.
10960
010c0266
PE
109612004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10962
10963 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10964 to fix an oversight in the Bison 2.0 manual.
10965
da12206a
PE
109662004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10967
10968 * NEWS: Version 2.0. Reformat the existing news items since
10969 1.875, so that related items are grouped together.
3a4734aa 10970 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
10971 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10972
c935d934
PE
10973 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10974 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10975 otherwise, we're not testing alloca. Unfortunately there's no
10976 simple way to consult HAVE_ALLOCA here.
10977
da12206a
PE
10978 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10979 for yymsg, too.
10980
10981 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10982 hand. This avoids a warning about comparing int to size_t when
10983 GCC warnings are enabled.
10984
0a2c5137
PE
109852004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10986
d7e14fc0
PE
10987 * NEWS: Bison-generated parsers no longer default to using the
10988 alloca function (when available) to extend the parser stack, due
10989 to widespread problems in unchecked stack-overflow detection.
10990 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10991 responsibility to set it to a positive value. This lets the user
10992 specify a value that is not a preprocessor constant.
10993 * data/yacc.c (YYMAXDEPTH): Likewise.
10994 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10995 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10996 to be a compile-time constant. However, explain the constraints on it.
10997 Also, explain the constraints on YYINITDEPTH.
10998 (Table of Symbols): Explain that alloca is no longer the default.
10999 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11000 to 1.
11001
0a2c5137
PE
11002 * doc/bison.texinfo (Location Default Action): Mention that n must
11003 be zero when k is zero. Suggested by Frank Heckenbach.
11004
e019c247
AD
110052004-12-22 Akim Demaille <akim@epita.fr>
11006
11007 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11008 (parser::state_type, parser::semantic_type, parser::location_type):
11009 Private, not public.
11010 (parser::parse): Return ints, not bool.
11011 Returning a bool introduces a problem: 0 corresponds to false, and
11012 it seems weird to return false on success. Returning true changes
11013 the conventions for yyparse.
11014 Alternatively we could return void and send an exception.
11015 There is no clear consensus (yet?).
11016 (state_stack, semantic_stack, location_stack): Rename as...
11017 (state_stack_type, semantic_stack_type, location_stack_type): these.
11018 Private, not public.
11019 * tests/c++.at: New.
11020 * tests/testsuite.at, tests/Makefile.am: Adjust.
11021
72731bb7
AD
110222004-12-21 Akim Demaille <akim@epita.fr>
11023
11024 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11025
9a0d8bec
AD
110262004-12-21 Akim Demaille <akim@epita.fr>
11027
11028 Don't impose std::string for filenames.
11029
11030 * data/lalr1.cc (b4_filename_type): New.
11031 (position::filename): Use it.
11032 (parser.hh): Move the inclusion of stack.hh and location.hh below
11033 the user code, so that needed headers for the filename type can be
11034 included first.
72731bb7
AD
11035 Forward declare them before the user code.
11036 * tests/Makefile.am (check-local, installcheck-local): Pass
11037 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 11038
99880de5
AD
110392004-12-20 Akim Demaille <akim@epita.fr>
11040
11041 Use more STL like names: my_class instead of MyClass.
11042
11043 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11044 (SemanticStack, SemanticType, StateStack, StateType)
11045 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11046 (Parser::value): Rename as...
11047 (location_stack, location_type, rhs_number_type, semantic_stack)
11048 (semantic_type, state_stack, state_type, token_number_type, stack)
11049 (slice, traits, parser::yylloc, parser::yylval): these.
11050
11051 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11052
9bec482e
PE
110532004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11054
11055 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11056 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11057
f6fbd3da
PE
110582004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11059
11060 Remove uses of 'short int' and 'unsigned short int'. This raises
11061 some arbitrary limits. It uses more memory but nowadays that's
11062 not much of an issue.
11063
11064 This change does not affect the generated parsers; that's a different
11065 task, as some users will want to conserve memory there.
11066
11067 Ideally we should use size_t to represent all object counts, and
11068 something like ptrdiff_t to represent signed differences of object
11069 counts; but that will require more code-cleanup than I have the
11070 time to do right now.
11071
11072 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11073 Use size_t, not int or short int, to count objects.
11074 * src/closure.c (nritemset, closure): Likewise.
11075 * src/closure.h (nritemset, closure): Likewise.
11076 * src/nullable.c (nullable_compute): Likewise.
11077 * src/print.c (print_core): Likewise.
11078 * src/print_graph.c (print_core): Likewise.
11079 * src/state.c (state_compare, state_hash): Likewise.
11080 * src/state.h (struct state): Likewise.
11081 * src/tables.c (default_goto, goto_actions): Likewise.
11082
11083 * src/gram.h (rule_number, rule): Use int, not short int.
11084 * src/output.c (prepare_rules): Likewise.
11085 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11086 errs, reductions): Likewise.
11087 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11088 Likewise.
11089 * src/tables.c (vector_number, tally, action_number,
11090 ACTION_NUMBER_MINIMUM): Likewise.
11091 * src/output.c (muscle_insert_short_int_table): Remove.
11092
efeed023
AD
110932004-12-17 Akim Demaille <akim@epita.fr>
11094
11095 * data/lalr1.cc: Extensive Doxygenation.
11096 (error_): Rename as...
11097 (error): this, since it is visible to the user.
11098 Adjust callers.
11099 (Parser::message): Now an automatic variable from...
11100 (Parser::yyreport_syntax_error_): here.
11101 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11102 Parser::error.
11103 * tests/input.at: Escape $.
11104
bc82c5a5
PE
111052004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11106
11107 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11108 Parenthesize rhs to avoid obscure problems with mistakes like
11109 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11110 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11111 b4_rhs_location): Likewise.
11112 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11113 b4_rhs_location): Likewise.
11114
fd19f271
AD
111152004-12-16 Akim Demaille <akim@epita.fr>
11116
11117 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11118 yacc.c: be sure to stay within yycheck_.
11119 * tests/actions.at: Re-enable C++ tests.
11120
10454ea4
AD
111212004-12-16 Akim Demaille <akim@epita.fr>
11122
11123 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11124 real.
11125
c5b95ccf
AD
111262004-12-16 Akim Demaille <akim@epita.fr>
11127
11128 Use #define to handle the %name-prefix.
11129
11130 * data/glr.c, data/yacc.c: Comment changes.
11131 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11132 so that one can refer to yylex in the parser file, and have it
11133 renamed, as is the case with other skeletons.
11134
617a8f12
AD
111352004-12-16 Akim Demaille <akim@epita.fr>
11136
11137 Move lalr1.cc internals into yy*.
11138
11139 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11140 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11141 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11142 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11143 (empty_, final_, terror_, errcode_, ntokens_)
11144 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11145 (looka_, ilooka_, error_range_, nerrs_):
11146 Rename as...
11147 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11148 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11149 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11150 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11151 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11152 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11153 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11154 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11155 these.
11156
1e547e6e
PE
111572004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11158
11159 Fix some problems reported by twlevo at xs4all.
11160 * src/symtab.c (symbol_new): Report an error if the input grammar
11161 contains too many symbols. This is better than calling abort() later.
11162 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11163 (struct node, struct graph):
11164 Rename member expand to stretch. All uses changed.
11165 (struct graph): Remove member layoutalgorithm. All uses removed.
11166 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11167 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11168 All uses changed.
11169 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11170
735d6bd4
AD
111712004-12-15 Akim Demaille <akim@epita.fr>
11172
11173 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11174 Add more Doxygen comments.
11175 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11176 (report_syntax_error_, translate_): Rename as...
11177 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11178 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11179
2e1f5829
AD
111802004-12-15 Akim Demaille <akim@epita.fr>
11181
11182 * data/lalr1.cc (lex_): Rename as...
11183 (yylex_): this.
11184 Move the trace here.
11185 Take the %name-prefix into account.
11186 Reported by Alexandre Duret-Lutz.
11187
a3cb6248
AD
111882004-12-15 Akim Demaille <akim@epita.fr>
11189
11190 Simplify the C++ parser constructor.
11191
11192 * data/lalr1.cc (debug_): Rename as...
11193 (yydebug_): so that the parser's internals are always in the yy*
11194 pseudo namespace.
11195 Adjust uses.
11196 (b4_parse_param_decl): Remove the leading comma as it is now only
11197 called as unique argument list.
11198 (Parser::Parser): Remove the constructor accepting a location and
11199 an initial debugging level.
11200 Remove from the other ctor the argument for the debugging level.
11201 (debug_level_type, debug_level, set_debug_level): New.
11202
11203 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11204 constructor calls.
11205
07fed891
AD
112062004-12-15 Akim Demaille <akim@epita.fr>
11207
11208 Remove b4_root related material: failure experiment
a3cb6248 11209 (which goal was to allow to derive from a class).
07fed891
AD
11210
11211 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11212 definitions and uses.
11213
e603eaa5
PE
112142004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11215
11216 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11217 not 2, since it's not portable to subtract 1 from the start of an
11218 array. The new item 0 is never set or used. All uses changed.
11219
11220 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11221 the default definition of YYLLOC_DEFAULT. Problem reported
11222 by Frank Heckenbach.
11223
fafb007d
PE
112242004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11225
11226 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11227 the normal case and one for the error case. Just use the
11228 first one uniformly. Problem reported by Frank Heckenbach.
11229 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11230 use exactly the same macro in both places.
11231 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11232 so that the normal-case YYRHSLOC works for the error case too.
11233 All uses changed.
11234 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11235 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11236 * doc/bison.texinfo (Location Default Action): Don't claim that
11237 we have an array of locations. Use the same macro for both glr
11238 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11239 the index is 0.
11240
48814dcd
PE
112412004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11242
a4e1a53b
PE
11243 * HACKING: Update email addresses to send announcements to.
11244
48814dcd
PE
11245 * configure.ac (AC_INIT): Bump version to 1.875f.
11246
337116ba
PE
112472004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11248
11249 * NEWS: Version 1.875e.
11250 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11251
11252 * src/scan-skel.l: Include "complain.h", for "fatal".
11253
11254 * src/relation.h (relation_print, relation_digraph):
11255 Relation sizes are of type relation_node, not size_t (this is
11256 merely a doc fix, since the two types are equivalent).
11257 (relation_transpose): Relation sizes are of type relation_node,
11258 not int.
11259 * src/relation.c: Likewise.
11260 (top, infinity): Now of type relation_node, not int.
11261 (traverse, relation_transpose): Use relation_node, not int.
11262
11263 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11264 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11265 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11266
11267 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 11268 specifying whether the test should be skipped. Use it tp
337116ba 11269 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 11270 fail on some hosts, and should be skipped.
337116ba 11271
da2a7671
PE
112722004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11273
11274 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11275 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11276 unless otherwise specified below.
11277
11278 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11279 to allocate kernel_base, kernel_items, kernel_size, since
11280 they needn't be initialized to 0.
11281 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11282 * src/closure.c (new_closure): Likewise, for itemset.
11283 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11284 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11285 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11286 (build_relations): Likewise for edge, states1, includes.
11287 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11288 * src/reader.c (packgram): Likewise, for ritem, rules.
11289 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11290 * src/relation.c (relation_digraph): Likewise for VERTICES.
11291 (relation_transpose): Likewise for new_R, end_R.
11292 * src/symtab.c (symbols_token_translations_init): Likewise for
11293 token_translations.
11294 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11295 (token_actions): Likewise for yydefact, actrow, conflrow,
11296 conflict_list.
11297 (save_column): Likewise for froms[symno], tos[symno].
11298 (goto_actions): Likewise for state_count.
11299 (pack_table): Likewise for base, pos, check.
11300 (tables_generate): Likewise for width.
11301
11302 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11303 for initial core. Just have a separate core, so we needn't worry
11304 about whether kernel_size and kernel_base are initialized.
11305
11306 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11307 kernel_size, kernel_items): Remove unnecessary initialization.
11308 * src/conflicts.c (conflicts): Likewise.
11309 * src/derives.c (derives): Likewise.
11310 * src/muscle_tablc (muscle_insert): Likewise.
11311 * src/relation.c (relation_digraph): Likewise.
11312 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11313 conflrow, conflict_table, conflict_list, table, check):
11314 Likewise.
11315
11316 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11317 This is because all callers pass unsigned int.
11318 * src/closure.h (new_closure): Likewise.
11319
11320 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11321 (build_relations): Initialize includes[i] in all cases.
11322 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11323 and rules[ruleno].precsym. Initialize members in order.
11324 * src/relation.c (relation_transpose): Always initialize new_R[i]
11325 and end_R[i].
11326 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11327
11328 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11329 conflict_list[0] was always 0, but now it isn't initialized.
11330
11331 * src/table.c (table_grow): When conflict_table grew, the grown
11332 area wasn't cleared. Fix this.
11333
11334 * lib/.cvsignore: Add strdup.c, strdup.h.
11335 * m4/.cvsignore: Add strdup.m4.
11336
00baeeac
PE
113372004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11338
11339 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11340 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11341 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11342 ngotos + 1 without checking for overflow.
11343 (build_relations): Use END_NODE, not -1, to denote end of edges.
11344 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11345 build_relations): Use goto_number, not int, for goto numbers.
11346 * src/tables.c (save_column, default_goto): Likewise.
11347
be3d9d42
AD
113482004-11-23 Akim Demaille <akim@epita.fr>
11349
11350 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11351 of #defining from yystype.
11352 Don't typedef yystype, C++ does not need it.
11353 This lets it possible to forward declare it as union.
11354
78e526d5
PE
113552004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11356
11357 * bootstrap (gnulib_modules): Add extensions.
11358 Problem reported by Jim Meyering.
11359
afbb696d
PE
113602004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11361
11362 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11363 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11364 src/system.h, src/tables.c: XFREE -> free, to accommodate
11365 recent change to gnulib xalloc.h.
78e526d5 11366 Problem reported by Jim Meyering.
afbb696d 11367
c1f8f16a
AD
113682004-11-17 Akim Demaille <akim@epita.fr>
11369
11370 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11371
db7e5eb5 113722004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
11373 Alexandre Duret-Lutz <adl@gnu.org>
11374
11375 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11376 changes.
11377 (YYCDEBUG): Adjust.
11378 Use it instead of cdebug_.
11379 (Parser::debug_stream, Parser::set_debug_stream): New.
11380 (Parser::symprint_): Define cdebug_ for temporary backward
11381 compatibility.
11382 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11383 debug_stream ().
11384
68e11668
AD
113852004-11-17 Akim Demaille <akim@epita.fr>
11386
11387 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11388 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11389 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11390 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11391
97cbc73e
PE
113922004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11393
11394 * data/glr.c (yyloc_default): Remove; not used.
11395 Problem reported by Frank Heckenbach.
11396
e342c3be
AD
113972004-10-25 Akim Demaille <akim@epita.fr>
11398
11399 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11400 Introduce another definition to address simple location arrays.
11401 (yyGLRStack): New member: yyerror_range.
11402 (yyrecoverSyntaxError, yyparse): Update it.
11403 (yyrecoverSyntaxError): Use it when shifting the error token to
11404 have an accurate range, equivalent to the one computed by both
11405 yacc.c and lalr1.cc.
11406 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11407 that column numbers start at column 0, as per GNU Coding
11408 Standards, the others tests, and the doc.
11409 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11410 Adjust to the above change (first column is 0).
11411 And adjust the location of the "<error>", now covering the whole
11412 line.
11413
93602feb 114142004-10-22 Akim Demaille <akim@epita.fr>
04098407 11415 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
11416
11417 Remove some arbitrary limits on goto numbers and relations.
11418 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11419 initial values, since they're never used.
11420 (set_goto_map): ngotos is now unsigned, so test for overflow
11421 by seeing whether it wraps around to zero.
11422 * src/lalr.h (goto_number): Now size_t, not short int.
11423 (GOTO_NUMBER_MAXIMUM): Remove.
11424 * src/relation.c (relation_print, traverse, relation_transpose):
11425 Check for END_NODE rather than looking at sign.
11426 * src/relation.h (END_NODE): New macro.
11427 (relation_node): Now size_t, not short int.
11428
dba08b04
PE
114292004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11430
11431 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11432 keyword, not an identifier. Problem reported by Baron Schwartz in
11433 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11434
df09ef2e
AD
114352004-10-11 Akim Demaille <akim@epita.fr>
11436
11437 * src/symtab.c (symbol_check_alias_consistency): Also check
11438 type names, destructors, and printers.
11439 Reported by Alexandre Duret-Lutz.
11440 Recode the handling of associativity and precedence in terms
11441 of symbol_precedence_set.
11442 Accept no redeclaration at all, not even equal to the previous
11443 value.
11444 (redeclaration): New.
11445 Use it to factor redeclaration complaints.
11446 (symbol_make_alias): Don't set the type of the alias, let
11447 symbol_check_alias_consistency do it as for other features.
11448 * src/symtab.h (symbol): Add new member prec_location, and
11449 type_location.
11450 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11451 * tests/input.at (Incompatible Aliases): New.
11452
146bc99d
PE
114532004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11454
11455 .cvsignore fixes to accommodate gnulib changes,
11456 and the practice of naming build directories "_build".
11457 * .cvsignore: Add "_*". Sort.
11458 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11459 * m4/.cvsignore: Add "*_gl.m4".
11460
e503aa60
AD
114612004-10-06 Akim Demaille <akim@epita.fr>
11462
11463 * src/parse-gram.y (add_param): Fix the truncation of trailing
11464 spaces.
11465
b4a20338
AD
114662004-10-05 Akim Demaille <akim@epita.fr>
11467
11468 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11469 whether the reducion was empty or not. This leaves room to
11470 improve the use of YYLLOC_DEFAULT in such a case.
11471 lalr1.cc is still experimental, so changing this is acceptable.
11472 And finally, there are probably not many users who changed the
11473 handling of locations in GLR, so changing is admissible too.
11474
11475 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11476 empty reduction, set @$ to an empty location ending the previously
11477 stacked symbol.
11478 Adjust uses to make sure the code is triggered on empty
11479 reductions.
11480 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11481 expected output: empty reductions have empty locations.
11482
f85a5e6f
AD
114832004-09-29 Akim Demaille <akim@epita.fr>
11484
11485 * data/lalr1.cc: Move towards a more standard C++ coding style
11486 for templates: Class < T > -> Class<T>.
11487
b203fc2c
AD
114882004-09-29 Akim Demaille <akim@epita.fr>
11489
11490 * data/lalr1.cc: Reinstall the former ctor, for sake of
11491 compatibility, but warn it will be removed.
11492 Move towards a more standard C++ coding style (i.e., type *var ->
11493 type* var).
11494
5b7e1e73
PE
114952004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11496
3fee967f
PE
11497 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11498 since it's less likely to work if NULs are involved in the future.
5b7e1e73 11499
0dcca5c2
AD
115002004-09-27 Akim Demaille <akim@epita.fr>
11501
11502 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11503
6dde1c82
AD
115042004-09-27 Akim Demaille <akim@epita.fr>
11505
11506 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 11507 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
11508 and argument names.
11509 (b4_cc_constructor_call): Likewise.
11510
b233d555
AD
115112004-09-24 Akim Demaille <akim@epita.fr>
11512
11513 * src/parse-gram.y (add_param): Strip the leading and trailing
11514 blanks from a formal argument declaration.
11515 (YY_LOCATION_PRINT): New.
11516
619404e3
AD
115172004-09-24 Akim Demaille <akim@epita.fr>
11518
11519 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11520 after the location.
11521
dd8d9022
AD
115222004-09-24 Akim Demaille <akim@epita.fr>
11523
11524 * doc/bison.texinfo (Table of Symbols): Sort.
11525
0092f063
AD
115262004-09-21 Akim Demaille <akim@epita.fr>
11527
11528 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11529 the useless parentheses.
11530 Suggested by Paul Eggert.
11531
451364ed
AD
115322004-09-20 Akim Demaille <akim@epita.fr>
11533
11534 Let the initial-action act on the look-ahead, and use it for the
11535 "initial push" (corresponding to an hypothetical beginning-of-file).
11536 And let lalr1.cc honor %initial-action.
11537
11538 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11539 example.
11540 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11541 (Parser::Parser): Remove the ctor that used to initialize it.
11542 (Parser::parse): Like in the other skeletons, issue the "starting
11543 parse" message before any action.
11544 Honor %initial-action.
11545 Initialize the stacks with the lookahead.
11546 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11547 look-ahead.
11548 Push them in the stacks.
11549 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11550
18d192f0
AD
115512004-09-20 Akim Demaille <akim@epita.fr>
11552
11553 * doc/bison.texinfo (Initial Action Decl): New.
11554
b8458aa5
AD
115552004-09-20 Akim Demaille <akim@epita.fr>
11556
11557 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11558 clearer criterion to define it.
11559 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11560 When reducing on an empty RHS, use the latest stacked location as
11561 location.
11562 yylloc is not always available.
11563 * data/glr.c: Likewise.
11564 Also, honor initial-actions.
11565
3fc16193
AD
115662004-09-20 Akim Demaille <akim@epita.fr>
11567
11568 * data/yacc.c (YY_LOCATION_PRINT): New.
11569 Define when we know YYLTYPE's structure, i.e., when the default
11570 YYLLOC_DEFAULT is used.
11571 * data/c.m4 (b4_yysymprint_generate): Use it.
11572 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11573 value of the result.
11574 (error_start_): Replace with...
11575 (error_range_): this location array.
11576 This allows to replace code relying on the implementation of
11577 locations by portable code.
11578 * data/yacc.c (yylerrsp): Replace with...
11579 (yyerror_range): this.
11580 Every time a token is popped, update yyerror_range[0], to have an
11581 accurate location for the error token.
11582 * data/glr.c (YY_LOCATION_PRINT): New.
11583 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11584 deference a pointer.
11585 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11586 report the location in %printers.
11587
11588 * src/scan-skel.l: Instead of abort, report error messages to ease
11589 understanding skeleton scanning failures.
11590
ecfe33e7
AD
115912004-09-16 Akim Demaille <akim@epita.fr>
11592
11593 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11594 (iterator, const_iterator): these, to be more in the C++ spirit.
11595 Also, return reverse iterators so that when displaying the stack
11596 we display its bottom first.
11597 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11598 from yacc.c.
11599 We should probably use vector here though.
11600
1576d44d
AD
116012004-09-16 Akim Demaille <akim@epita.fr>
11602
11603 Have more complete shift traces.
11604
11605 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11606 to report Shifts instead of ad hoc YYDPRINTF invocations,
11607 including for the error token.
11608 * data/lalr1.cc (symprint_): Output the location.
11609 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11610 output the location within the %printer.
11611 Activate GLR tests, at least to make sure they compile properly.
11612 They still don't pass though.
11613 * tests/calc.at: Adjust expect verbose output, since now "Entering
11614 state..." is on a different line than the "Shifting" message.
11615
9c66f418
AD
116162004-09-08 Akim Demaille <akim@epita.fr>
11617
11618 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11619 Bison directive from the Bison file to the invocation of this
11620 macro, so that these directives are passed to
11621 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11622 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11623 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11624 the extra Bison directives instead of the whole series.
11625 Change the grammar so that there are recoverable errors, and
11626 unrecoverable errors. Now we can have the parser give up before
11627 consuming the whole input. As a result we now can observe that
11628 the lookahead is freed when needed.
11629 Change the parser source to parse argv[1] instead of a hard coded
11630 string.
11631 Simplify yylex, and give a value and location to EOF.
11632 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11633 passed directives already coded in the file.
11634 Add some tests to check the location of "error".
11635 For some tests, the C++ parser is correct, and not yacc.c.
11636 For other tests, they provide different, but unsatisfying, values,
11637 so keep the C++ value so that at least one parser is "correct"
11638 according to the test suite.
11639 (Actions after errors): Remove, this is subsumed by the
11640 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11641
52d5733f
AD
116422004-09-06 Akim Demaille <akim@epita.fr>
11643
11644 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 11645 (Parser::pop): New.
52d5733f
AD
11646 Use it.
11647
a0e68930
AD
116482004-09-06 Akim Demaille <akim@epita.fr>
11649
11650 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11651 argument, an informative message.
11652 Call YY_SYMBOL_PRINT.
11653 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11654 * data/lalr1.cc (destruct_): Likewise.
11655 In addition, no longer depend on b4_yysymprint_generate and
11656 b4_yydestruct_generate to generate these functions, do it "by
11657 hand".
11658
e757bb10
AD
116592004-09-03 Akim Demaille <akim@epita.fr>
11660
11661 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11662 invoked, yydestruct the lookahead.
11663 * tests/calc.at (Calculator $1): Update the expected lengths of
11664 traces: there is an added line for the discarded lookahead.
11665 * doc/bison.texinfo (Destructor Decl): Some rewording.
11666 Define "discarded" symbols.
11667
0fe1f06d
AD
116682004-09-02 Akim Demaille <akim@epita.fr>
11669
11670 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11671
284acc8b
AD
116722004-09-02 Akim Demaille <akim@epita.fr>
11673
11674 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11675 (YYDSYMPRINTF): Rename as...
11676 (YY_SYMBOL_PRINT): this.
11677 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11678 two.
11679 Use it instead of direct symprint_ calls.
11680 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11681 one.
11682
a5eb1ed2
AD
116832004-09-02 Akim Demaille <akim@epita.fr>
11684
b7c72fe1
AD
11685 * data/lalr1.cc (b4_yysymprint_generate): New.
11686 (symprint_): New member function, defined when YYDEBUG.
11687 Use it consistently instead of token/nterm debugging output by
11688 hand.
a5eb1ed2
AD
11689 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11690 %printer calls to use cdebug_ when using lalr1.cc.
11691
417141dd
AD
116922004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11693
11694 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11695 with #ifdef YYDEBUG.
11696
2fa09258
AD
116972004-08-26 Akim Demaille <akim@epita.fr>
11698
11699 * doc/bison.texinfo (Implementing Loops): Rename as...
11700 (Implementing Gotos/Loops): this.
11701
9378b508
PE
117022004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11703
11704 Adjust to latest gnulib.
11705 * bootstrap (gnulib_modules): Add xalloc-die.
11706 Set LC_ALL=C so that file names sort consistently.
11707 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11708 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11709 uintmax_t.m4, ulonglong.m4.
11710 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11711 po.m4 since we are now using _gl.m4 instead.
11712
87a8ad5c
PE
117132004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11714
11715 * src/scan-action.l: Remove. Scanning of semantic actions is
11716 handled in scan-gram.l.
11717
dca81a78
PE
117182004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11719
11720 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11721
11722 * src/location.h (struct): The file member is a uniqstr.
11723 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11724
c9cbf7c5
PE
117252004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11726
11727 Fix bug with non-%union parsers that have printers or destructors,
11728 which led to a Bison core dump. Reported by Peter Fales in
11729 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 11730
c9cbf7c5
PE
11731 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11732 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11733 not to our own type.
11734 * src/output.c (symbol_destructors_output, symbol_printers_output):
11735 Don't assume %union.
11736 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11737 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11738 UNION-FLAG. All callers changed.
11739 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11740 Use type char, not unsigned int, when declaring an array of char;
11741 this lets us remove a cast.
11742 (Printers and Destructors): Add non-%union test cases.
11743
fa7e68c3
PE
117442004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11745
11746 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11747 GLR writeups. E.g., avoid frenchspacing and the future tense,
11748 change "lookahead" to "look-ahead", and change "wrt" to "with
11749 respect to".
2fa09258 11750
fa7e68c3
PE
117512004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11752
11753 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11754 New sections, split off from the GLR Parsers section. Put the new
11755 Simple GLR Parser near the start of the GLR section, for clarity.
11756 Rewrite connective text.
11757
99a9344e
PE
117582004-06-21 Frank Heckenbach <frank@g-n-u.de>
11759
11760 * doc/bison.texinfo (Simple GLR Parsers): New section.
11761
8dd162d3
PE
117622004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11763
11764 * NEWS, TODO, doc/bison.texinfo:
11765 Use "look-ahead" instead of "lookahead", to be consistent.
11766 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11767 while we're fixing "look-ahead".
11768 * src/conflicts.c (shift_set): Renamed from shiftset.
11769 (look_ahead_set): Renamed from lookaheadset.
11770 * src/print.c: Likewise.
11771 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11772 name for "lookahead".
11773 (report_types, usage): Likewise.
11774 * src/getargs.h (report_look_ahead_tokens): Renamed from
11775 report_lookaheads.
11776 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11777 compute_lookaheads.
11778 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11779 (look_ahead_tokens_print): Renamed from lookaheads_print.
11780 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11781 state_rule_lookaheads_print.
11782 * src/state.h: Likewise.
11783 (reductions.look_ahead_tokens): Renamed from lookaheads.
11784 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11785 AT_DATA_LOOKAHEADS_GRAMMAR.
11786
57a90331
PE
117872004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11788
11789 * README: Update location of patched M4 distribution.
11790
8ed3234a
PE
117912004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11792
11793 Don't assume the C++ compiler takes the same arguments as the C compiler
11794 (trivial change).
11795 * configure.ac (O0CXXFLAGS): New var.
11796 * tests/atlocal.in (CXXFLAGS): Use it.
11797
07971983
PE
117982004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11799
11800 Fix some "make check" problems with C++ reported by
11801 Albert Chin-A-Young for Tru64 C++ in this thread:
11802 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11803
11804 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11805 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11806 Output to a .cc file for C++, not to a .c file.
11807 * tests/calc.at (AT_CHECK_CALC): Likewise.
11808 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11809 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11810
29058652
PE
118112004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11812
11813 * tests/calc.at, tests/actions.at: Workaround for SGI
11814 C++ compiler. (trivial change)
11815
62cb8a99
PE
118162004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11817
fd418816
PE
11818 Spent a few hours checking out which prerequisite versions the
11819 current sources actually require. I went all the way back to
11820 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11821 a seemingly endless set of combinations of versions more recent
11822 than that. The bottom line is that the current sources require
11823 fairly recent versions of the build tools, and it'll be some work
11824 to change this.
11825 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11826 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11827 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11828 Add comments explaining why those particular versions are
11829 currently needed.
2fa09258 11830
62cb8a99
PE
11831 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11832 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 11833 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
11834
11835 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11836 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11837
caa52c10
PE
118382004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11839
11840 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11841 0.11.5. Suggested by Bruno Haible.
11842 * bootstrap: Remove gettext version checking.
11843
11844 * doc/bison.texinfo (Decl Summary): Also mention that %union
11845 can depend on prerequisite types. Problem reported by Tim
11846 Van Holder.
11847
4bfd5e4e
PE
118482004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11849
2cef3017
PE
11850 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11851 * README-alpha: Don't tell people not to package this.
11852
b9c85d5c
PE
11853 * bootstrap: Don't assume $(...) works; use `...` instead.
11854 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11855 gettext better.
11856
4bfd5e4e
PE
11857 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11858 put into the -d output file, and mention what to do if YYSTYPE is
11859 defined as a macro.
11860
6a36ff94
PE
118612004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11862
6712933e
PE
11863 Undo change made earlier today: it caused autopoint to not bring
11864 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11865 autopoint's.
11866
11867 * bootstrap: Check that gettext version matches what's in
11868 configure.ac. Warn users to ignore robots.txt ERROR 404.
11869 * bootstrap: Undo today's earlier change (logged below).
11870 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 11871
6a36ff94
PE
11872 The gettext version checking is causing more trouble than it's
11873 curing; remove it. Problem reported by Paul Hilfinger.
11874
11875 * bootstrap: Issue a warning that one can expect a message
11876 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11877 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11878
209ea708
PE
118792004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11880
11881 Ensure that the C++ compiler used for testing actually works on a
11882 simple test program; if not, skip the C++-related tests. Problem
11883 reported by Vin Shelton in:
161a71f3 11884 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
11885
11886 * m4/cxx.m4: New file.
11887 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11888 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11889 * tests/local.at (AT_COMPILE_CXX): Use it.
11890
41ca2549
PE
118912004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11892
383e69dc
PE
11893 * data/glr.c (yylloc): Output this macro even if locations are not
11894 being generated, as the GLR parser needs it even in that case.
11895 Problem reported by Troy A. Johnson
11896 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11897
41ca2549
PE
11898 * configure.ac (AC_INIT): Update to 1.875e.
11899
e476c87d
PE
119002004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11901
11902 * NEWS: Version 1.875d.
11903 * configure.ac (AC_INIT): Likewise.
11904 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11905
11906 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11907 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11908 lalr1.cc runs afoul of the first, and the last two are no longer
11909 supported by GCC 3.4.0.
11910 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11911 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11912
233a88ad
PE
119132004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11914
11915 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11916 unsigned int, for compatibility with latest gnulib hash module.
11917 * src/state.c (state_hash, state_hasher): Likewise.
11918 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11919 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 11920
12ffdd28
PE
119212004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11922
11923 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11924
11925 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11926 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11927 character and string literals.
11928 (unexpected_end): New function.
11929 (unexpected_eof): Use it.
11930 (unexpected_newline): New function.
11931 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11932 actions.
e476c87d 11933
12ffdd28
PE
11934 * NEWS: Document %expect-rr.
11935
11936 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11937 Fix typo by replacing $1 with $option.
11938 Remove more 'intl'-related files.
9668e2be 11939 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
11940
11941 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11942 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11943 strtoul.c.
11944 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11945 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11946 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11947 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11948 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11949 * src/.cvsignore: Add *.output.
11950
11951 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11952 gets copied to the output file.
e476c87d 11953
1f65350a
PE
119542004-04-28 Paul Eggert <eggert@twinsun.com>
11955
11956 Get files from the gnulib and po repositories, instead of relying
11957 on them being in our CVS. Upgrade to latest versions of gnulib
11958 and Automake.
11959
11960 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11961 * bootstrap: Bootstrap from gnulib and po repositories.
11962 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11963 * README-cvs: Document these changes. Remove version numbers from
11964 mentions of build tools, since they change so often. Mention Flex.
11965
11966 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11967 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
11968 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11969 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 11970 does this for us.
12ffdd28
PE
11971 (AC_ISC_POSIX): Remove; we no longer support this
11972 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
11973 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11974 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11975 Do not check for C89 headers, except for locale.h which is used
11976 by the Yacc library and must port to K&R hosts.
11977 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11978 Do not check for C89 functions, except for setlocale which is
11979 used by the Yacc library.
11980 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11981 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11982 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11983 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11984 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11985 AM_GNU_GETTEXT): Remove; now done by:
11986 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11987 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11988 for us.
11989
11990 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11991 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11992 Define to empty, as gnulib.mk will do the rest for us.
11993 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11994 for us.
11995 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11996 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11997
11998 * src/files.c: Include gnulib's xstrndup.h.
11999
12000 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12001 (REALLOC): Use xnrealloc, for likewise.
12002 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12003 (strnlen, memrchr): Remove decls; functions no longer used.
12004 Include <stpcpy.h>.
12005
12006 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12007 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12008 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12009 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12010 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12011 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12012 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12013 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12014 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12015 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12016 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12017 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12018 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12019 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12020 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12021 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12022 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12023 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12024 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12025 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12026 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12027 Remove, as these files are now generated automatically
12028 by bootstrap or automake.
12029
12030 * po/ChangeLog: Remove: all but one entry was a duplicate
12031 of this file, and I moved that 2000-11-02 entry here.
12032
12033 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12034 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12035 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12036 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12037 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12038 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12039 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12040 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12041 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12042 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12043 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12044 xstrndup.h.
12045 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12046 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12047 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12048 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12049 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12050 * src/.cvsignore: Remove *_.c.
12051
12052
12053 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12054 support it. (The latest stable gzip doesn't.)
12055
120562004-04-27 Paul Eggert <eggert@twinsun.com>
12057
12058 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12059 case, as stos_ is now used by destructors due to the 2004-02-09
12060 change.
12061
12062 Remove more K&R C support.
12063 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12064 * lib/subpipe.c (errno): Remove decl.
12065 Include <stdlib.h> unconditionally.
12066 (EXIT_FAILURE): Remove macro.
12067 * src/complain.c (vfprintf, strerror): Remove.
12068 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12069 unconditionally.
12070 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12071 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12072 (strchr, strspn, memchr): Remove decls.
12073 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12074 unconditionally. Do not declare perror.
12075 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12076 unconditionally.
12077
12078 * src/complain.c (_): Remove useless defn, as system.h defines this.
12079
12080 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12081 with latest obstack.h.
12082 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12083 to procedure types, as obstack.h now does that for us.
12084 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12085
12086 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12087 so that this include file can stand alone.
12088 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12089 does this now. Include subpipe.h first after config.h, to
12090 test whether it can stand alone.
12091
12092 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12093 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12094 unused declaration.
12095
12096 * tests/synclines.at (%union synch line): Put a dummy member in
12097 the union, because empty unions aren't allowed in C. Caught
12098 by GCC 3.4.0.
12099
4f16766c
PE
121002004-04-13 Jim Meyering <jim@meyering.net>
12101
12102 * src/conflicts.c (conflicts_print): Correct format string typo:
12103 use `%%' to produce literal `%'. (trivial change)
12104
779e7ceb
PE
121052004-03-30 Paul Eggert <eggert@twinsun.com>
12106
12107 * src/getargs.c (version): Update copyright year to 2004.
12108
12109 * data/c.m4 (b4_int_type): Use 'short int' rather than
12110 'short', and similarly for 'long', 'unsigned', etc.
12111 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12112 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12113 yy_yypstack, yydumpstack): Likewise.
12114 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12115 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12116 Likewise.
12117 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12118 yy_stack_print, yyparse): Likewise.
12119 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12120 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12121 * lib/bitset.c (bitset_print): Likewise.
12122 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12123 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12124 * lib/bitsetv.c (bitsetv_dump): Likewise.
12125 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12126 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12127 Likewise.
12128 * src/LR0.c (allocate_itemsets): Likewise.
12129 * src/gram.h (rule_number, rule): Likewise.
12130 * src/lalr.h (goto_number): Likewise.
12131 * src/nullable.c (nullable_compute): Likewise.
12132 * src/output.c (prepare_rules): Likewise.
12133 * src/relation.c (relation_print, relation_digraph): Likewise.
12134 * src/relation.h (relation_node): Likewise.
12135 * src/state.h (state_number, transitions, errs, reductions,
12136 struct state): Likewise.
12137 * src/symtab.h (symbol_number, struct symbol): Likewise.
12138 * src/tables.c (vector_number, tally, action_number,
12139 default_goto, goto_actions): Likewise.
12140 * tests/existing.at (GNU Cim Grammar): Likewise.
12141 * tests/regression.at (Web2c Actions): Likewise.
12142
12143 * src/output.c (muscle_insert_short_int_table): Renamed from
12144 muscle_insert_short_table. All uses changed.
12145
d6328241
PH
121462004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12147
12148 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12149 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12150 Add %expect-rr rule.
4f16766c 12151
d6328241
PH
12152 * src/scan-gram.l: Recognize %expect-rr.
12153
4f16766c 12154 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 12155 expected_conflicts.
4f16766c 12156 (expected_rr_conflicts): Declare.
d6328241
PH
12157
12158 * src/conflicts.c (expected_sr_conflicts): Rename from
12159 expected_conflicts.
12160 (expected_rr_conflicts): Define.
12161 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12162 for GLR parsers.
12163 Use expected_sr_conflicts in place of expected_conflicts.
12164 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 12165
d6328241 12166 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 12167
1452af69
PE
121682004-03-08 Paul Eggert <eggert@gnu.org>
12169
12170 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 12171 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
12172
12173 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12174 in lalr1.cc.
12175 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12176 * src/scan-gram.l (scan_integer): New function.
12177 ({int}): Use it.
12178 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12179 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12180 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12181 Say "long int", not "long", for uniformity with GNU style.
12182
006d217d
PE
121832004-02-25 Paul Eggert <eggert@twinsun.com>
12184
12185 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12186 compilers. This fixes a problem with Intel's C++ compiler being
12187 chatty, reported by Guido Trentalancia in
161a71f3 12188 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 12189
c2729758
ADL
121902004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12191
12192 Support %destructor and merge error locations in lalr1.cc.
12193
12194 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12195 (Parser::stos_): Define unconditionally.
12196 (Parser::destruct_): New method. Generate its body with
12197 b4_yydestruct_generate.
12198 (Parser::error_start_): New attribute.
12199 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12200 token which are discarded.
12201 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12202 error_start_ when erroneous token are discarded.
12203 (Parser::parse) <yyerrlab1>: Compute the location of the error
12204 token so that it covers all the discarded tokens.
12205 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12206 it can be called with `%skeleton "lalr1.cc"', and do that.
12207
dd0e0635
PE
122082004-02-02 Paul Eggert <eggert@twinsun.com>
12209
12210 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12211 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12212 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12213 There's no need to mention top_builddir since Automake does that
12214 for us.
12215 (INCLUDES): Remove, as Automake says it's obsolescent.
12216 Contents migrated into AM_CPPFLAGS as described above.
12217 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12218
122192004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12220
12221 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12222 (yyreportSyntaxError): Handle case where lookahead token is
12223 YYEMPTY.
12224
be16239b
PH
122252004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12226
12227 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12228 resulting parsers are compilable with C++.
12229
5fa90832
PE
122302003-12-23 Paul Eggert <eggert@twinsun.com>
12231
12232 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12233 * src/output.c (output_skeleton): Rename local var.
12234 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12235 Bison tokens, as this runs afoul of the 2003-10-07 change that
12236 disallowed NUL bytes in character constants or string literals.
12237
12238 * tests/local.at: Require Autoconf 2.59's Autotest.
12239 * tests/testsuite.at: Don't include local.at, since we now assume
12240 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12241 including it.
12242 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12243 multiple inclusion warnings.
dd0e0635 12244
b165c324
AD
122452003-12-02 Akim Demaille <akim@epita.fr>
12246
12247 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12248 conditions.
12249 From Bruno Haible.
12250
26e06a21
ADL
122512003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12252
12253 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12254
92ac3705
PE
122552003-10-07 Paul Eggert <eggert@twinsun.com>
12256
6a5ecb38
PE
12257 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12258 if testsuite doesn't exist.
12259
92ac3705
PE
12260 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12261 literals, unfortunately.
12262 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12263 Complain about NUL bytes in character constants or string literals.
12264
91d2c560
PE
122652003-10-05 Paul Eggert <eggert@twinsun.com>
12266
12267 * NEWS: Don't document %no-default-prec, as it's still
12268 too experimental.
12269 * doc/bison.texinfo: Document %no-default-prec only if
12270 the defaultprec flag is set. Normally it's not.
12271
0cc3da3a
PE
122722003-10-04 Paul Eggert <eggert@twinsun.com>
12273
12274 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12275 non-modifiable lvalue, instead of a modifiable one.
12276 * doc/bison.texinfo (Actions): Document that $$ can
12277 be assigned to. Do not claim that $$ and $N are
12278 array element references: user code should not rely on this.
12279
22fccf95
PE
122802003-10-01 Paul Eggert <eggert@twinsun.com>
12281
12282 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12283 (grammar_declaration): Use it.
12284 * src/scan-gram.l: New token %no-default-prec.
12285 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12286 * NEWS, doc/bison.texinfo: Document the above.
12287
fc8f2965
AD
122882003-10-01 Akim Demaille <akim@epita.fr>
12289
12290 VCG no longer supports long_straight_phase.
12291
12292 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12293 * src/print_graph.c (print_graph): Adjust.
12294
39a06c25
PE
122952003-09-30 Frank Heckenbach <frank@g-n-u.de>
12296 and Paul Eggert <eggert@twinsun.com>
12297
12298 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12299 Table of Symbols): Document %default-prec.
12300 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12301 (grammar_declaration): Set default_prec on %default-prec.
12302 * src/scan-gram.l (%default-prec): New token.
12303 * src/reader.h (default_prec): New flag.
12304 * src/reader.c: Likewise.
12305 (packgram): Handle it.
12306 * tests/conflicts.at (%default-prec without %prec,
12307 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 12308
39a06c25
PE
123092003-09-30 Paul Eggert <eggert@twinsun.com>
12310
12311 * tests/testsuite.at: Include local.at, not input.at, fixing
12312 a typo in the 2003-08-25 patch.
12313
62b6aef9
AD
123142003-08-27 Akim Demaille <akim@epita.fr>
12315
12316 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12317 GCC warnings.
12318
89e1cc61
AD
123192003-08-26 Akim Demaille <akim@epita.fr>
12320
12321 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12322 "<\#" to avoid magic from Gnus when posting parts of this script.
12323
a08460b0
AD
123242003-08-26 Akim Demaille <akim@epita.fr>
12325
12326 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12327 (Parser::parse): here.
12328 Adjust: nerrs and errstatus is now replaced by...
12329 (Parser::nerrs_, Parser::errstatus_): New.
12330
603f1cfd
AD
123312003-08-25 Akim Demaille <akim@epita.fr>
12332
12333 * config/announce-gen, Makefile.cfg: New.
12334 * Makefile.am: Adjust.
12335 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12336 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12337
cd3684cf
AD
123382003-08-25 Akim Demaille <akim@epita.fr>
12339
12340 When reducing initial empty rules, Bison parser read an initial
12341 location that is not defined. This results in garbage, and that
12342 affects Bison's own parser. Therefore we need (i) to extend Bison
12343 to support a means to initialize this location, and (ii) to use
12344 this CVS Bison to fix CVS Bison's parser.
12345
12346 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12347 with...
12348 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12349 * src/parse-gram.y: Adjust.
12350 (%initial-action): New.
12351 (%error-verbose): Since we require CVS Bison, there is no reason
12352 not to use it.
12353 * src/scan-gram.l: Adjust.
12354 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12355 * data/yacc.c (yyparse): Use b4_initial_action.
12356
4e03e201
AD
123572003-08-25 Akim Demaille <akim@epita.fr>
12358
12359 * doc/bison.texinfo: Don't promote stdout for error messages.
12360
8c182d05
AD
123612003-08-25 Akim Demaille <akim@epita.fr>
12362
12363 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12364 From Alexandre Duret-Lutz.
12365
6a60c4cf
PE
123662003-08-25 Akim Demaille <akim@epita.fr>
12367
12368 Version 1.875c.
12369
25f66e1a
AD
123702003-08-25 Akim Demaille <akim@epita.fr>
12371
12372 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12373 Use them.
12374
5348bfbe
AD
123752003-08-25 Akim Demaille <akim@epita.fr>
12376
12377 * data/lalr1.cc (Parser::reduce_print_): New.
12378 Use it.
12379
47301314
AD
123802003-08-25 Akim Demaille <akim@epita.fr>
12381
12382 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12383 error recovery loops. This patch is based on
161a71f3 12384 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
12385 Also, augment the similarity between lalr1.cc and yacc.c.
12386 Note: the locations of error recovery rules are not correct yet.
12387
12388 * data/lalr1.cc: Comment changes to augment the similarity between
12389 lalr1.cc and yacc.c.
12390 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12391 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12392 yyerrlab), when hitting EOF, pop the whole stack here instead of
12393 merely falling thru the default error handling mechanism.
12394 (yyerrorlab): New label, with the old contents of YYERROR,
12395 plus the following change: pop the stack of rhs corresponding
12396 to the production that invoked YYERROR. That is how Yacc
12397 behaves (required by POSIX).
12398 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12399 fail.
12400
1f7a61ff
AD
124012003-08-25 Akim Demaille <akim@epita.fr>
12402
12403 Tune local.at so that people can "autom4te -l autotest calc.at -o
12404 calc" for instance, to extract a sub test suite.
12405
12406 * tests/testsuite.at: Move the initialization, Autotest version
12407 requirement, and AT_TESTED invocation into...
12408 * tests/local.at: here.
12409 * tests/testsuite.at: Include it for compatibility with Autoconf
12410 2.57.
12411 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12412 be ignore.
12413
327b5b56
PE
124142003-08-04 Paul Eggert <eggert@twinsun.com>
12415
12416 Rework code slightly to avoid gcc -Wtraditional warnings.
12417 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12418 The returned value is now stored in *YY0. All callers changed.
12419 * src/output.c (merge_output): Adjust to the above change.
12420
0051e3ed
PE
124212003-07-26 Paul Eggert <eggert@twinsun.com>
12422
12423 * data/glr.c (YYASSERT): New macro.
12424 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12425 yyresolveStates, yyprocessOneStack):
12426 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12427 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 12428
137437c6
PE
124292003-07-25 Paul Eggert <eggert@twinsun.com>
12430
5b620e06
PE
12431 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12432 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 12433 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
12434 by Frank Heckenbach, though I have omitted the structure-initialization
12435 part of his glr-knr.diff patch since I recall that the Portable
12436 C Compiler didn't require that change.
12437
137437c6
PE
12438 Let the user specify how to allocate and free memory.
12439 Derived from a suggestion by Frank Heckenbach in
161a71f3 12440 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
12441 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12442 All uses of free, malloc, realloc changed to use these macros,
12443 and unnecessary casts removed.
12444 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12445
ddb85ca5
PE
124462003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12447
12448 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12449 use s.empty() rather than s == "" to test for empty string; see
161a71f3 12450 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
12451 (trivial change)
12452
39910e09
AD
124532003-06-25 Akim Demaille <akim@epita.fr>
12454
12455 * config/depcomp, config/install-sh: Update from masters.
12456
0ae99356
PE
124572003-06-20 Paul Eggert <eggert@twinsun.com>
12458
12459 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12460 and return properly parenthesized result.
12461 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12462 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12463 Remove unnecessary parentheses from uses.
12464 * doc/bison.texinfo (Location Default Action): Describe the
12465 conventions for parentheses.
12466
cd05d13c
PE
124672003-06-19 Paul Eggert <eggert@twinsun.com>
12468
81fd08ca
PE
12469 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12470 yyreportTree): Do not assume that size_t is the same width as int,
12471 when printing sizes. Print sizes using an unsigned format.
12472 Problem reported by Frank Heckenbach in
161a71f3 12473 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 12474
cd05d13c
PE
12475 Port to Forte Developer 7 C compiler.
12476 * data/glr.c (struct YYLTYPE): If locations are not being used,
12477 declare a single dummy member, as empty structs do not conform
12478 to the C standard.
12479 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12480 the Forte Developer 7 C compiler complains that end-of-loop
12481 code is not reached.
12482
4dcf140b
PE
124832003-06-17 Paul Eggert <eggert@twinsun.com>
12484
12485 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12486 avoid warnings from picky compilers about redefinition of PARAMS.
12487
8dd76bee
PE
124882003-06-17 Paul Eggert <eggert@twinsun.com>
12489
12490 Version 1.875b.
12491
12492 * NEWS: Document 1.875b.
12493
12494 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12495 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12496 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12497 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12498 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12499 per recent gettext manual's suggestion.
12500 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12501 Use prototypes, not old-style definitions.
12502 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12503 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12504 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12505 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12506 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12507 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12508 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12509 vbitset_or_and_cmp, vbitset_copy): Likewise.
12510
12511 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12512 Do not include <stdlib.h>.
12513 (PARAMS): Define unconditionally for C89.
12514 (ATTRIBUTE_NORETURN): Remove.
12515 (ATTRIBUTE_UNUSED): Define unconditionally.
12516
12517 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 12518 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
12519 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12520 * lib/vbitset.c, lib/vbitset.h: New files.
12521 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12522 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12523 from libbitset.
12524
12525 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12526 `How Can I Reset @code{yyparse}', since texinfo does not allow
12527 arbitrary @ in node names.
12528
12529 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12530 shouldn't be needed according to the gettext 0.12.1 documentation
12531 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 12532 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 12533 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 12534 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 12535
8dd76bee
PE
12536 * lib/.cvsignore: Add stdbool.h.
12537 * m4/.cvsignore: Add nls.m4, po.m4.
12538
12539 Upgrade to CVS gnulib.
12540 * stdbool_.h: File renamed from stdbool.h.in.
12541 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12542 AC_HEADER_STDBOOL.
12543 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12544 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12545 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12546 (MOSTLYCLEANFILES): New var.
12547 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12548 (stdbool.h): New rule.
12549 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12550 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12551 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12552 m4/quote.m4: Upgrade to today's gnulib.
12553
12554 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12555 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12556 the tests right now.
12557 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12558 yyerror are declared before use; C99 requires this.
12559
25005f6a
PH
125602003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12561
12562 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12563 first.
12564 (yyrecoverSyntaxError): Correct the logic for setting and testing
12565 yyerrState.
12566 Correct comment on handling EOF.
12567 Allow states with only a default reduction, rather than failing
8dd76bee 12568 (I can't quite reconstruct why these were not allowed before).
25005f6a 12569
137437c6 12570 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 12571 buffer overruns, corrupting state.
8dd76bee
PE
12572
12573 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
12574 definition.
12575 * src/reader.h (max_left_semantic_context): New variable declaration.
12576 * src/scan-gram.l (max_left_semantic_context): Define.
12577 (handle_action_dollar): Update max_left_semantic_context.
12578 * data/glr.c (YYMAXLEFT): New definition.
12579 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12580 (yyresolveAction): Ditto.
12581
12582 Fixes to problems with location handling in GLR parsers reported by
12583 Frank Heckenbach (2003/06/05).
12584
12585 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12586 (YYRHSLOC): Add parentheses, and define only if locations used.
12587 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12588 locations not used.
12589 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12590 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 12591
25005f6a
PH
12592 * tests/cxx-type.at: Exercise location information; update tests
12593 to differentiate output with and without locations.
8dd76bee 12594 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
12595 because default YYLTYPE not yet defined.
12596 Change semantic actions to compute strings, rather than printing
12597 them directly (to test proper passing of semantics values). Change
12598 output to prefix notation and update test data and expected results.
12599 (yylex): Track locations.
12600 (stmtMerge): Return value rather than printing, and include arguments
12601 in value.
8dd76bee 12602
711f40b7
PE
126032003-06-03 Paul Eggert <eggert@twinsun.com>
12604
12605 Avoid warnings generated by GCC 2.95.4 when Bison is
12606 configured with --enable-gcc-warnings.
12607 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12608 yy::]b4_parser_class_name[::translate_,
12609 yy::Stack::operator[] (unsigned),
12610 yy::Stack::operator[] (unsigned) const,
12611 yy::Slice::operator[] (unsigned),
12612 yy::Slice::operator[] (unsigned) const):
12613 Rename local vars to avoid warnings.
12614 * tests/glr-regression.at (Improper handling of embedded actions
12615 and $-N in GLR parsers): Remove unused local variable from yylex.
12616 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12617 (void) as arg when not pure, since we now assume C89 when building
12618 Bison. Pacify GCC by using parameter.
12619
ac695f7d
PE
126202003-06-02 Paul Eggert <eggert@twinsun.com>
12621
12622 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12623 yy::Location::lines, yy::Location::columns): Rename arguments
12624 to avoid shadowing; this removes a warning generated by GCC 3.3.
12625
26ec81e0
PE
126262003-06-01 Paul Eggert <eggert@twinsun.com>
12627
12628 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12629 to g++, as GCC 3.3 complains if you do it.
12630 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12631 everything that WARNING_CFLAGS has, except omit warnings
12632 not suitable for C++.
12633 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12634 * tests/atlocal.in (CXXFLAGS): New var.
12635 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12636
12637 Fix a GLR parser bug I reported in February; see
161a71f3 12638 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
12639 The problem was that GLR parsers did not conform to the C standard,
12640 because actions like { $1 = $2 + $3; } expanded to expressions
12641 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12642 to a local variable. The C standard says that expressions
12643 like (var = f ()) + (var = f ()) have undefined behavior.
12644 Another problem was that GCC sometimes issues warnings that
12645 yyfill and its parameters are unused.
12646
12647 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12648 as possibly unused.
12649 (yyfill): New function.
12650 (YYFILL): Use it.
12651 (yyuserAction): Change type of yynormal to bool, so that it matches
12652 the new yyfill signature. Mark it as possibly unused.
12653
12654
12655 Follow up on a bug I reported in February, where a Bison-generated
12656 parser can loop. Provide a test case and a fix for yacc.c. I
12657 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12658 The original bug report is in:
161a71f3 12659 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
12660
12661 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12662 macro's size was becoming unwieldy.
12663 (yyerrlab): Do not discard an empty lookahead symbol, as this
12664 might destroy garbage.
12665 (yyerrorlab): New label, with the old contents of YYERROR,
12666 plus the following change: pop the stack of rhs corresponding
12667 to the production that invoked YYERROR. That is how Yacc
12668 behaves, and POSIX requires this behavior.
12669 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12670 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12671 Define 'alarm' to do nothing if unistd.h is not available.
12672 Add a new rule "exp: '-' error;" to test the above change to
12673 data/yacc.c. Use 'alarm' to abort any test taking longer than
12674 10 seconds, as it's probably looping.
12675 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12676 Also, the new yacc.c generates two fewer diagnostics for an
12677 existing test.
12678
d0829076
PE
126792003-05-24 Paul Eggert <eggert@twinsun.com>
12680
c6ae27df
PE
12681 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12682 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12683 This fixes a problem reported by John Bowman when the Compaq/HP
12684 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12685 -ansi -Wall -gall).
12686 * data/yacc.c (union yyalloc): Likewise.
12687 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 12688
d0829076
PE
12689 Switch from 'int' to 'bool' where that makes sense.
12690
12691 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12692 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12693 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12694 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12695 Return or accept bool, not int. All callers changed.
12696 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12697 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12698 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12699 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12700 bitset_or_and_cmp_): Likewise.
12701 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12702 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12703 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12704 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12705 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12706 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12707 bitset_stats_or_and_cmp): Likewise.
12708 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12709 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12710 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12711 ebitset_xor_cmp): Likewise.
12712 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12713 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12714 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12715 lbitset_xor_cmp): Likewise.
12716 * lib/bbitset.h: Include <stdbool.h>.
12717 (struct bitset_vtable): The following members now return bool, not
12718 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12719 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12720 or_and_cmp).
12721 * src/conflicts.c (count_rr_conflicts): Likewise.
12722 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12723 All uses changed.
12724 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12725 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12726 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12727 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12728 graph_flag): Likewise.
12729 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12730 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12731 graph_flag): Likewise.
12732 * src/output.c (error_verbose): Likewise.
12733 * src/output.h (error_verbose): Likewise.
12734 * src/reader.c (start_flag, typed): Likewise.
12735 * src/reader.h (typed): Likewise.
12736 * src/getargs.c (LOCATIONS_OPTION): New constant.
12737 (long_options, getargs): Use it.
12738 * src/lalr.c (build_relations): Use bool, not int.
12739 * src/nullable.c (nullable_compute): Likewise.
12740 * src/print.c (print_reductions): Likewise.
12741 * src/tables.c (action_row, pack_vector): Likewise.
12742 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12743 * src/output.c (prepare): Use it.
12744 * src/output.c (token_definitions_output,
12745 symbol_destructors_output, symbol_destructors_output): Use string,
12746 not boolean integer, to keep track of whether to output separator.
12747 * src/print_graph.c (print_core): Likewise.
12748 * src/state.c (state_rule_lookaheads_print): Likewise.
12749
12750 * config/install-sh: Sync from automake 1.7.5.
12751
6b2584b7
PE
127522003-05-14 Paul Eggert <eggert@twinsun.com>
12753
12754 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12755 semicolon after a grammar declaration, in the interest of possible
12756 future changes to the Bison input language.
12757 Do not allow a stray semicolon at the start of the grammar.
12758 (rhses.1): Allow one or more semicolons after any rule, including
12759 just before "|" as required by POSIX.
12760 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12761 grammar.
12762
caf37a36
ADL
127632003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12764
12765 %parse-param support for lalr1.cc.
12766
12767 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12768 b4_cc_constructor_calls, b4_cc_constructor_call,
12769 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12770 definitions.
12771 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12772 parse-param arguments.
12773 (yy::b4_parser_class_name): Declare instance variables to
12774 hold parse-param arguments.
12775 * tests/calc.at: s/value/semantic_value/ because value clashes
12776 with a member of yy::b4_parser_class_name. Adjust C++ code
12777 to handle %parse-param. Enable %parse-param test in C++.
12778
3ab37077
PE
127792003-05-12 Paul Eggert <eggert@twinsun.com>
12780
12781 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12782 English a bit. Fix fclose typo. Change "const char" to "char
12783 const", and use ANSI C rather than K&R for "main". Suggest
12784 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12785 and suggest yy_switch_to_buffer.
12786
127872003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
12788
12789 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12790 C89. This avoids a diagnostic on compilers that define __STDC__
12791 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 12792 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 12793
e743727f
PE
127942003-05-03 Paul Eggert <eggert@twinsun.com>
12795
12796 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12797 Do not overrun array bounds.
12798 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 12799 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 12800
916708d5
AD
128012003-04-29 Akim Demaille <akim@epita.fr>
12802
12803 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12804 * src/getargs.c, src/getargs.h: here, as bool, not int.
12805 (nondeterministic_parser): New.
12806 * src/parse-gram.y, src/scan-gram.l: Support
12807 %nondeterministic-parser.
12808 * src/output.c (prepare): Use nondeterministic_parser instead
12809 of glr_parser where appropriate.
12810 * src/tables.c (conflict_row, action_row, save_row)
12811 (token_actions, token_actions, pack_vector): Ditto.
12812
a06ea4aa
AD
128132003-04-29 Akim Demaille <akim@epita.fr>
12814
12815 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12816
211074ca
AD
128172003-04-29 Akim Demaille <akim@epita.fr>
12818
12819 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12820 with %pure-parser and %locations to exercise the patch from Yakov
12821 Markovitch below.
12822
6175ffe3
PE
128232003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12824
12825 * data/yacc.c: (b4_lex_param): Corrected for the case where
12826 %lex-param is provided and %pure-parser isn't.
12827
b1e95857
PE
128282003-04-27 Paul Eggert <eggert@twinsun.com>
12829
12830 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 12831 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
12832 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12833 if it is not defined.
12834 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12835
acda9df6
PE
128362003-04-26 Paul Eggert <eggert@twinsun.com>
12837
3470c57b
PE
12838 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12839 Declare to be of type suitable for the ninf value itself, not of
12840 type suitable for the corresponding table, since the latter might
12841 be unsigned but the ninf value might be negative. This fixes a
12842 bug reported by Alexandre Duret-Lutz in
161a71f3 12843 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 12844
acda9df6
PE
12845 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12846 invokes it. We shouldn't invoke it twice because it will attempt
12847 to put error.o in the archive twice. This fixes a glitch reported
12848 by Martin Mokrejs in
161a71f3 12849 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 12850
b5250f26
PE
128512003-04-21 Paul Eggert <eggert@twinsun.com>
12852
12853 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12854 to gnulib.
12855
089ac0f1
PE
128562003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12857
12858 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12859 Fix obvious typo that results in uncompilable GLR parsers
12860 when both %pure-parser and %locations are used. (trivial change)
12861
5ededac6
PE
128622003-04-17 Paul Eggert <eggert@twinsun.com>
12863
1b8f2fff
PE
12864 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12865 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12866 Do not insert the expected token via unput, as this runs afoul
12867 of a POSIX-compatibility bug in flex 2.5.31.
12868 All uses changed to BEGIN the parent state,
12869 since we no longer insert the expected token via unput.
12870 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12871 that is no longer emitted after the above change.
12872
5ededac6
PE
12873 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12874 the first one. This change is from Paul Hilfinger, and it fixes
12875 regression reported by Werner Lemberg in
161a71f3 12876 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
12877
12878 (resolve_sr_conflict): Don't invoke state_errs_set
12879 unless one or more tokens have been explicitly made errors.
12880 Otherwise, the above change causes Bison to abort.
12881
12882 * tests/existing.at (GNU pic Grammar): New test case, taken from
12883 Lemberg's email.
12884
b8be9132
AD
128852003-03-31 Akim Demaille <akim@epita.fr>
12886
12887 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12888
d423d460
AD
128892003-03-31 Akim Demaille <akim@epita.fr>
12890
12891 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12892 output.
12893
c7e441b4
AD
128942003-03-31 Akim Demaille <akim@epita.fr>
12895
12896 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12897 From Paul Hilfinger.
12898
231897ad
AD
128992003-03-29 Akim Demaille <akim@epita.fr>
12900
12901 * m4/error.m4: Do not put under dynamic conditions some code which
12902 expansion is under static control.
12903
5b066063
AD
129042003-03-29 Akim Demaille <akim@epita.fr>
12905
12906 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12907
22a74fec
AD
129082003-03-29 Akim Demaille <akim@epita.fr>
12909
12910 * doc/bison.texinfo (Strings are Destroyed): New.
12911
0eee27e7
PE
129122003-03-13 Paul Eggert <eggert@twinsun.com>
12913
12914 * .cvsignore: Add configure.lineno.
12915 * src/.cvsignore: Add yacc.
12916 * tests/.cvsignore: Add testsuite.log.
12917 * doc/fdl.texi: Sync with latest FSF version.
12918
f61aad93
PE
129192003-03-12 Paul Eggert <eggert@twinsun.com>
12920
537636c7
PE
12921 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12922 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12923 cursor, instead of leaving it undefined. This fixes a bug
12924 reported by Tim Van Holder in
161a71f3 12925 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
12926 * tests/input.at (Torturing the Scanner): Test the scanner on
12927 an empty input file, which was Tim Van Holder's test case.
12928
12929 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12930 <sys/resource.h> can be included, include sys/time.h and
12931 sys/times.h first, if available. This works around the SunOS
12932 4.1.4 porting bug reported by Bruce Becker in
161a71f3 12933 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
12934
12935 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12936 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12937 AC_HEADER_SYS_WAIT.
12938
f61aad93
PE
12939 Merge changes from gnulib. This was prompted because the CVS
12940 snapshot didn't build on Solaris 7 due to strnlen problems.
12941
12942 These changes need to be merged back into gnulib:
12943 * lib/hash.c: Include <stdbool.h> unconditionally.
12944 * m4/onceonly.m4 (m4_quote): New macro.
12945 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12946 Quote AC_FOREACH variable-expansions properly.
12947 The 2003-01-03 obstack.h change also needs merging.
12948 {end of changes requiring merging}
5b066063 12949
f61aad93
PE
12950 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12951 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12952 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12953 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12954 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12955 New files, imported from gnulib.
12956 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12957 above.
12958
12959 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12960 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12961 gnulib sources.
12962
12963 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12964 Add.
12965 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12966 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12967 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12968 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12969 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12970 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12971 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12972 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12973 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12974 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12975 (jm_PREREQ_ARGMATCH): Remove.
12976 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12977 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12978
12979 * src/system.h: Include <stdbool.h> unconditionally.
12980
12981 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12982 assuming at least C89 in the bitset code for some time now.
12983
d2ffe116
AD
129842003-03-03 Akim Demaille <akim@epita.fr>
12985
12986 * ro.po: New.
12987
052826fd
AD
129882003-03-02 Akim Demaille <akim@epita.fr>
12989
12990 * doc/bison.texinfo (Table of Symbols): Reactivate the
12991 documentation for %lex-param, and %parse-param.
12992
c4749565
AD
129932003-03-02 Akim Demaille <akim@epita.fr>
12994
12995 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12996 generate verbose error messages.
12997 Use the number of tokens as an upper bound in yytname, as it
12998 cannot be a non terminal.
12999
d5286af1
AD
130002003-03-02 Akim Demaille <akim@epita.fr>
13001
13002 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13003 message.
13004
22e304a6
AD
130052003-03-02 Akim Demaille <akim@epita.fr>
13006
22e304a6
AD
13007 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13008 Use them to exercise yycheck overrun.
13009 Based on Andrew Suffield's grammar.
13010
67a25fed
AD
130112003-03-02 Akim Demaille <akim@epita.fr>
13012
13013 Create tests/local.at for Bison generic testing macros.
13014
13015 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13016 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13017 This new file.
13018 * tests/calc.at (AT_CHECK_CALC): Adjust.
13019 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13020 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13021 * tests/local.at: here.
13022 (AT_COMPILE_CXX): Tags the tests using it as c++.
13023 Ignore the test if CXX is not functional.
13024
9c2b381f
PE
130252003-03-01 Paul Eggert <eggert@twinsun.com>
13026
13027 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13028 not loc->end, since loc->end might contain garbage and this leads
13029 to undefined behavior on some platforms.
13030 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13031 depend on *loc, so that the reader doesn't give the the false
13032 impression that *loc is initialized.
13033 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13034 does not survive the return.
13035
0433ba88
AD
130362003-03-01 Akim Demaille <akim@epita.fr>
13037
13038 * src/scan-gram.l (code_start): Always initialize it when entering
13039 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13040 yylex invocation. An alternative would be making it static, but
13041 then it starts with the second %%'s beginning, instead of its end.
13042
b305ea69
PE
130432003-02-28 Paul Eggert <eggert@twinsun.com>
13044
13045 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13046 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 13047 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 13048
c3d25e01
PE
130492003-02-26 Paul Eggert <eggert@twinsun.com>
13050
13051 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13052 Remove Sequent/Pyramid discussion (nobody uses them any more).
13053 Merge VMS and MS-DOS discussion; these ports may well be dead
13054 but let's keep mentioning them for now. Put <> around email
13055 addresses. Add copyright notice.
13056
c267ffbc
PE
130572003-02-24 Paul Eggert <eggert@twinsun.com>
13058
13059 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13060 to avoid collision with flex use of yylineno.
13061 Problem reported by Bruce Lilly in
161a71f3 13062 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
13063 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13064 * data/yacc.c (yy_reduce_print): Likewise.
13065
13066 * config/depcomp: Sync with Automake 1.7.3.
13067
f939fc12
AD
130682003-02-21 Akim Demaille <akim@epita.fr>
13069
13070 * data/lalr1.cc: Use temporary variables instead of casts to
13071 change integer types.
13072 Suggested by Paul Eggert.
13073
95923bd6
AD
130742003-02-21 Akim Demaille <akim@epita.fr>
13075
13076 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13077 to avoid confusions with lalr1.cc's notion of Position.
13078 Suggested by Paul Eggert.
13079
2cdc240e
AD
130802003-02-20 Akim Demaille <akim@epita.fr>
13081
13082 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13083 before initial_columns.
13084 (location.hh): Use consistent variable names when defining the
13085 operator<<.
13086 Use "last" so that we subtract from Positions, not from unsigned.
13087
5d003116
AD
130882003-02-20 Akim Demaille <akim@epita.fr>
13089
13090 * data/lalr1.cc (position.hh): New subfile, including the extended
13091 and Doxygen'ed documentation of class Position.
13092 (location.hh): Use it.
13093 Document a` la Doxygen.
ba1ecc07 13094 With the help of Benoit Perrot.
5d003116 13095
d02b25f9
AD
130962003-02-20 Akim Demaille <akim@epita.fr>
13097
13098 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13099 AT_YACC_IF.
13100 Redefine AT_YYERROR_SEES_LOC_IF using it.
13101 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13102 not defined.
13103 Don't use the location in yy::Parser::error_ and
13104 yy::Parser::print_ when not %locations.
13105 Activate more lalr1.cc tests.
13106
0d1c3a04
AD
131072003-02-19 Akim Demaille <akim@epita.fr>
13108
13109 * data/lalr1.cc: When displaying a line number, be sure to make it
13110 an int.
13111
60a777aa
AD
131122003-02-19 Akim Demaille <akim@epita.fr>
13113
13114 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13115 Remove, useless.
13116 (YYABORT, YYACCEPT, YYERROR): New.
13117 * tests/calc.at: Renable the lalr1.cc test.
13118
0b86fc41
AD
131192003-02-19 Akim Demaille <akim@epita.fr>
13120
13121 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13122 error recovery, mixing with/without pops and discarding of the
13123 lookahead.
13124 Exercise YYERROR.
13125 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13126
da99a5dc
PE
131272003-02-17 Paul Eggert <eggert@twinsun.com>
13128
13129 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13130 * tests/testsuite.at (AT_COMPILE): Use them.
13131 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 13132 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 13133
93b8c255
PE
131342003-02-12 Paul Eggert <eggert@twinsun.com>
13135
13136 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13137 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 13138 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
13139 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13140 Check for malloc failure, for consistency with yacc.c.
13141 (yytname_size): Remove, for consistency with yacc.c.
13142
13143 The bug still remains in data/lalr1.cc, as I didn't have time
13144 to fix it there.
13145
7548fed2
AD
131462003-02-06 Akim Demaille <akim@epita.fr>
13147
13148 * configure.ac (GXX): Rename as...
13149 (CXX): this, to keep the original Autoconf semantics.
13150 Require 2.57.
13151 * data/lalr1.cc: Fix b4_copyright invocations.
13152 If YYDEBUG is not defined, don't depend upon name_ being defined.
13153 (location.hh): Include string and iostream.
13154 (Position::filename): New member.
13155 (Position::Position ()): New.
13156 (operator<< (Position)): New.
13157 (operator- (Position, int)): New.
13158 (Location::first, Location::last): Rename as...
13159 (Location::begin, Location::end): these, to mock the conventional
13160 iterator names.
13161 (operator<< (Location)): New.
13162 * tests/atlocal.in (CXX): New.
13163 * tests/testsuite.at (AT_COMPILE_CXX): New.
13164 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13165 locations in a more synthetic way.
13166 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13167 lalr1.cc is used.
13168 Adjust the C locations to match those from Emacs: first column is
13169 column 0.
13170 Change all the expected results.
13171 Conform to the GCS: simplify the locations when applicable.
13172 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13173 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13174 these CPP macros with the m4 macros new defined by...
13175 (AT_CHECK_PUSHDEFS): this, i.e.:
13176 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 13177 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
13178 New macros.
13179 (AT_CHECK_POPDEFS): Undefine them.
13180 (AT_CHECK_CALC_LALR1_CC): New.
13181 Use it for the first lalr1.cc test.
13182
43a176ef
AD
131832003-02-04 Akim Demaille <akim@epita.fr>
13184
13185 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13186 Location as is defined.
13187
fc049e9c
AD
131882003-02-04 Akim Demaille <akim@epita.fr>
13189
13190 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13191 name_ being defined.
13192
a737b216
PE
131932003-02-03 Paul Eggert <eggert@twinsun.com>
13194
13195 * src/gram.h (start_symbol): Remove unused decl.
13196
13197 Use more-consistent naming conventions for local vars.
13198
13199 * src/derives.c (derives_compute): Change type of local var from
13200 int to rule_number.
13201 * src/gram.c (grammar_rules_partial_print): Likewise.
13202 * src/print.c (print_core): Likewise.
13203 * src/reduce.c (reduce_grammar_tables): Likewise.
13204
13205 * src/gram.c (grammar_dump): Change name of item_number *
13206 local var from r to rp.
13207 * src/nullable.c (nullable_compute): Likewise.
13208
13209 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13210
13211 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13212 for symbol or symbol_number var.
13213 * src/reader.c (grammar_start_symbol_set): Likewise.
13214 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13215 Likewise.
13216 * src/state.c (transitions_to): Likewise.
13217 * src/state.h: Likewise.
13218 * src/tables.c (symbol_number_to_vector_number): Likewise.
13219
13220 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13221 char * var.
13222
13223 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13224 var.
13225
13226 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13227 var.
13228
13229 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13230 Use str, not s, for char * var. Use ch, not c, for character var.
13231 Use size for size var.
13232
13233 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13234 char * var.
13235 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13236 uniqstr var.
13237 * src/uniqstr.h: Likewise.
13238
13239 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13240 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13241 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13242 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13243 param to have same name as that of enum, so that we don't use
13244 "s" to stand for a non-state.
13245
68e93ad5
AD
132462003-02-02 Akim Demaille <akim@epita.fr>
13247
13248 * src/scan-skel.l: Scan more than one inert character per yylex
13249 invocation.
13250
92898986
PE
132512003-02-01 Paul Eggert <eggert@twinsun.com>
13252
13253 Version 1.875a.
13254
1d9d5d71
PE
13255 * po/LINGUAS: Add ms.
13256
0435d061
AD
132572003-01-30 Akim Demaille <akim@epita.fr>
13258
13259 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13260
6029a57f
PH
132612003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13262
13263 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13264 of $1.
0435d061
AD
13265
13266 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 13267 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 13268 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 13269
6029a57f
PH
13270 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13271 (b4_rhs_location): Ditto.
0435d061 13272 (yyfill): New function to copy from stack tree into array
6029a57f 13273 incrementally.
0435d061
AD
13274 (yyuserAction): Modify to allow incremental move of semantic values
13275 to rhs array when in GLR mode.
13276 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
13277 as needed.
13278 Remove dummy use of yystack, as there is now a guaranteed use.
13279 (yydoAction): Modify to allow incremental move of semantic values
13280 to rhs array when in GLR mode.
13281 (yyresolveAction): Ditto.
13282 (yyglrShiftDefer): Update comment.
0435d061 13283 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
13284 (yyglrReduce): Ditto.
13285 (yydoAction): Ditto
0435d061 13286
6029a57f
PH
13287 * tests/glr-regr1.at: Rename to ...
13288 * tests/glr-regression.at: Add new regression test for the problems
13289 described above (adapted from S. Eken).
13290 Update copyright notice.
13291 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13292 * tests/Makefile.am: Ditto.
13293
6cee6297
PE
132942003-01-28 Paul Eggert <eggert@twinsun.com>
13295
13296 * data/lalr1.cc: Do not use @output_header_name@ unless
13297 b4_defines_flag is set. This fixes two bugs reported by
13298 Tim Van Holder in
161a71f3
PE
13299 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13300 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 13301
b2a836b5
PE
133022003-01-21 Paul Eggert <eggert@twinsun.com>
13303
13304 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13305 we don't need to worry about yyerrlab1 being reported as an
13306 "unused label" by non-GCC C compilers. The downside is that if
13307 locations are used then a couple of statements are duplicated each
13308 time YYERROR is invoked, but the upside is that the warnings
13309 should vanish.
13310 (yyerrlab1): Move code to YERROR.
13311 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13312 This reverts some of the 2002-12-27 change.
13313
4196b931
PE
133142003-01-17 Paul Eggert <eggert@twinsun.com>
13315
13316 * src/output.c (symbol_printers_output): Fix typo that led
13317 to core dump. Problem reported by Antonio Rus in
161a71f3 13318 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 13319
3ae831b4
AD
133202003-01-13 Akim Demaille <akim@epita.fr>,
13321 Quoc Peyrot <chojin@lrde.epita.fr>,
13322 Robert Anisko <anisko_r@lrde.epita.fr>
13323
13324 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13325 when the stacks contain one element, as the loop would otherwise
13326 free the last state, and then use the top state (the one we just
13327 popped). This means that the initial elements will not be freed
13328 explicitly, as is the case in yacc.c; it is not a problem, as
13329 these elements have fake values.
13330
e3aa65c5
PE
133312003-01-11 Paul Eggert <eggert@twinsun.com>
13332
13333 * NEWS: %expect-violations are now just warnings, reverting
13334 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13335 bootstrapping problem reported by Matthias Klose; see
161a71f3 13336 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
13337 * src/conflicts.c (conflicts_print): Likewise.
13338 * tests/conflicts.at (%expect not enough, %expect too much,
13339 %expect with reduce conflicts): Likewise.
13340 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13341 that the warning is enabled if the number of conflicts changes
13342 (not necessarily increases).
13343
13344 * src/getargs.c (version): Update copyright year.
13345
f0057011
AD
133462003-01-09 Akim Demaille <akim@epita.fr>
13347
13348 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13349
1ee6d2a0
PE
133502003-01-08 Paul Eggert <eggert@twinsun.com>
13351
13352 * Makefile.maint (WGETFLAGS):
13353 New macro, containing "-C off" to disable proxy caches.
13354 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13355 (rel-check): Use $(WGET) instead of wget.
13356
d4fd77c4
PE
133572003-01-06 Paul Eggert <eggert@twinsun.com>
13358
13359 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13360 the GLR paper of Scott, Johnstone and Hussain.
13361
464c6927
PE
133622003-01-04 Paul Eggert <eggert@twinsun.com>
13363
d600ee67
PE
13364 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13365 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13366 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13367 (EXTRA_LIBRARIES): New var, for liby.a.
13368 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13369 (EXTRA_SCRIPTS): New var, for yacc.
13370
464c6927
PE
13371 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13372 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13373 Problem reported by Nelson H. F. Beebe.
13374
133752003-01-03 Paul Eggert <eggert@twinsun.com>
13376
13377 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13378 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13379 when compiling Bison 1.875's `bitset bset = obstack_alloc
13380 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13381
13382 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13383 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13384 grow to a huge size with typical invocation.
d600ee67 13385
464c6927
PE
13386 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13387 Use the pattern recommended by Autoconf 2.57, except also protect
13388 against double-definition.
13389 * src/system.h: Likewise.
13390 Portability issues reported by Nelson H. F. Beebe.
d600ee67 13391
464c6927
PE
13392 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13393 All uses changed. Provide a definition in both C and C++.
13394 (yytrue, yyfalse): Define even if defined (__cplusplus).
13395
13396 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13397 Reported by Nelson H. F. Beebe.
d600ee67 13398
464c6927
PE
13399 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13400
0f42c7d5
PE
134012003-01-02 Paul Eggert <eggert@twinsun.com>
13402
13403 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13404 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13405 Bug reported by Nelson H. F. Beebe.
13406
dc546b0f
PE
134072003-01-01 Paul Eggert <eggert@twinsun.com>
13408
13409 * Version 1.875.
13410
2c09b6a7
PE
134112002-12-30 Paul Eggert <eggert@twinsun.com>
13412
13413 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13414 Moved here from...
13415 (<INITIAL>","): Here. This causes stray "," to be treated
13416 more uniformly.
13417
dc546b0f 13418 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
13419 last brace in braced code when not in Yacc mode, for compatibility
13420 with Bison 1.35. This resurrects the 2001-12-15 patch to
13421 src/reader.c.
13422
13423 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13424 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13425
535c0f63
PE
134262002-12-28 Paul Eggert <eggert@twinsun.com>
13427
13428 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13429 that of SYM's type. This fixes Debian bug 168069, reported by
13430 Thomas Olsson.
d600ee67 13431
963fcc17
PE
134322002-12-28 Paul Eggert <eggert@twinsun.com>
13433
13434 Version 1.75f.
13435
13436 Switch back to the Yacc style of conflict reports, undoing some
13437 of the 2002-07-30 change.
13438 * doc/bison.texinfo (Understanding): Use Yacc style for
13439 conflict reports. Also, use new way of locating rules.
13440 * src/conflicts.c (conflict_report):
13441 Renamed from conflict_report_yacc, removing the old
13442 'conflict_report'. Translate the entire conflict report at once,
13443 so that we don't assume that "," has the same interpretation in
13444 all languages.
13445 (conflicts_output): Use Yacc-style conflict report for each state,
13446 instead of our more-complicated style.
13447 (conflicts_print): Use Yacc-style conflict report, except print
13448 the input file name when not emulating Yacc.
13449 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13450 Conflicted Reduction, %expect not enough, %expect too much,
13451 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13452 * tests/existing.at (GNU Cim Grammar): Likewise.
13453 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13454
13455 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13456 fatal): Don't invoke fflush; it's not needed and it might even be
13457 harmful for stdout, as stdout might not be open.
13458 * src/reduce.c (reduce_print): Likewise.
13459
b1efe548
PE
134602002-12-27 Paul Eggert <eggert@twinsun.com>
13461
13462 Fix a bug where error locations were not being recorded correctly.
13463 This problem was originally reported by Paul Hilfinger in
161a71f3 13464 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
13465
13466 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13467 top of the location stack's error locations.
13468 (yyerrlab): Set it. When discarding a token, push its location
13469 onto yylerrsp so that we don't lose track of the error's end.
13470 (yyerrlab1): Now is only the target of YYERROR, so that we can
13471 properly record the location of the action that failed. For GCC
13472 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13473 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13474 (yyerrlab2): New label, which yyerrlab now falls through to.
13475 Compute the error's location by applying YYLLOC_DEFAULT to
13476 the locations of all the symbols that went into the error.
13477 * doc/bison.texinfo (Location Default Action): Mention that
13478 YYLLOC_DEFAULT is also invoked for syntax errors.
13479 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13480 Error locations include the locations of all the tokens that were
13481 discarded, not just the last token.
d600ee67 13482
983c5c2c
PE
134832002-12-26 Paul Eggert <eggert@twinsun.com>
13484
b1efe548
PE
13485 * src/files.c: Include quote.h.
13486 (compute_output_file_names): Warn if we detect conflicting
13487 outputs to the same file. This should catch the misunderstanding
13488 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13489
13490 * src/conflicts.c (conflicts_print): If the user specifies
13491 "%expect N", report an error if there are any reduce/reduce
13492 conflicts. This is what the manual says should happen.
13493 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13494 * tests/conflicts.at (%expect with reduce conflicts): New test.
13495
983c5c2c
PE
13496 Don't use m4_include on relative file names, as it doesn't work as
13497 desired if there happens to be a file with that name under ".".
d600ee67 13498
983c5c2c
PE
13499 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13500 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13501 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13502 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13503 * src/output.c (output_skeleton): Use full path names when
13504 specifying a file to include; don't rely on include path, as
13505 it's unreliable when the working file contains a file with
13506 that name.
d600ee67 13507
983c5c2c
PE
135082002-12-25 Paul Eggert <eggert@twinsun.com>
13509
13510 Remove obsolete references to bison.simple and bison.hairy.
13511 Problem mentioned by Aubin Mahe in
161a71f3 13512 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
13513 * data/glr.c: Comment fix.
13514 * doc/bison.1: Remove references. Also, mention "yacc".
13515
13516 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13517 with -g option.
13518
13519 * src/parse-gram.y (declaration): Use enum "report_states" rather
13520 than its numeric value 1.
13521
13522 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13523 opening a new one. This fixes Debian bug 165349, reported by
13524 Bruce Stephens.
13525
23f2d9dc
PE
135262002-12-24 Paul Eggert <eggert@twinsun.com>
13527
13528 Version 1.75e.
13529
13530 * Makefile.maint (cvs-update): Don't assume that the shell
13531 supports $(...), as Solaris sh doesn't.
13532
13533 * src/parse-gram.y (lloc_default): Remove test for empty
13534 nonterminals at the end, since it didn't change the result.
13535
135362002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
13537
13538 If the user does not define YYSTYPE as a macro, Bison now declares it
13539 using typedef instead of defining it as a macro. POSIX requires this.
13540 For consistency, YYLTYPE is also declared instead of defined.
13541
13542 %union directives can now have a tag before the `{', e.g., the
13543 directive `%union foo {...}' now generates the C code
13544 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13545 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13546 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13547 instead of `yyltype'.
13548
13549 `yystype' and `yyltype' are now obsolescent macros instead of being
13550 typedefs or tags; they are no longer documented and will be
13551 withdrawn in a future release.
13552
13553 * data/glr.c (b4_location_type): Remove.
13554 (YYSTYPE): Renamed from yystype.
13555 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13556 (struct YYLTYPE): Renamed from struct yyltype.
13557 (YYLTYPE): Renamed from yyltype.
13558 (yyltype, yystype): New (and obsolescent) macros,
13559 for backward compatibility.
13560 * data/yacc.c: Likewise.
13561
13562 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13563 does not specify a union tag. This is for compatibility with
13564 Solaris 9 yacc.
13565
13566 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13567 const *, since it is now modified by stripping surrounding { }.
13568 (current_braced_code): Remove.
13569 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13570 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13571 trailing " {...}". Now of type <chars>.
13572 (grammar_declaration): Adjust to bundled tokens.
13573 (code_content): Remove; stripping is now done by add_param.
13574 (print_token_value): Print contents of bundled tokens.
13575 (token_name): New function.
13576
13577 * src/reader.h (braced_code, current_braced_code): Remove.
13578 (token_name): New decl.
13579
13580 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13581 token_type, not braced_code code_kind. All uses changed.
13582 (SC_PRE_CODE): New state, for scanning after a keyword that
13583 has (or usually has) an immediately-following braced code.
13584 (token_type): New local var, to keep track of which token type
13585 to return when scanning braced code.
13586 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 13587 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
13588 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13589 instead of returning a token type immediately.
13590 (<INITIAL>"{"): Set token type.
13591 (<SC_BRACED_CODE>"}"): Use it.
13592 (handle_action_dollar, handle_action_at): Now returns bool
13593 indicating success. Fail if ! current_rule; this prevents a core dump.
13594 (handle_symbol_code_dollar, handle_symbol_code_at):
13595 Remove; merge body into caller.
13596 (handle_dollar, handle_at): Complain in invalid contexts.
13597
13598 * NEWS, doc/bison.texinfo: Document the above.
13599 * NEWS: Fix years and program names in copyright notice.
13600
879ca4f8
PE
136012002-12-17 Paul Eggert <eggert@twinsun.com>
13602
13603 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13604 Reporting, Table of Symbols): Omit mentions of %lex-param and
13605 %parse-param from the documentation for now.
13606
1c5fe69d
PE
136072002-12-15 Paul Eggert <eggert@twinsun.com>
13608
13609 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13610 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13611 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
13612 disagreed with the Bison documentation. Bug
13613 reported by Andrew Walrond.
d600ee67 13614
1c5fe69d
PE
13615 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13616 as the caller now does that.
13617 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13618 (YYEMPTY): Parenthesize right hand side, since others use it.
13619 (yyparse): Don't assume that our generated code is the only code
13620 that sets yychar.
13621
d1de5372
PE
136222002-12-13 Paul Eggert <eggert@twinsun.com>
13623
13624 Version 1.75d.
13625
13626 POSIX requires a "yacc" command.
13627 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13628 (MOSTLYCLEANFILES): Add yacc.
13629 (yacc): New rule.
1c5fe69d 13630 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
13631 as an alias for bison y.
13632
13633 * po/LINGUAS: Add da.
d600ee67 13634
d1de5372
PE
13635 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13636 problem with latest <getopt.h>.
13637 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13638
13639 * doc/fdl.texi: Upgrade to 1.2.
13640 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13641 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13642 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13643 gnulib.
13644 * config/install-sh: Sync with autotools.
13645
13646 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 13647 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
13648 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13649 locations are requested.
13650 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13651 locations are requested.
13652
d0f3fe23
PE
136532002-12-12 Paul Eggert <eggert@twinsun.com>
13654
13655 Remove unportable casts and storage allocation tricks.
13656 While we're at it, remove almost all casts, since they
13657 usually aren't needed and are a sign of trouble.
13658
13659 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13660
13661 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13662 the pointer DSET returned by malloc; this isn't portable.
13663 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13664 Similarly for DERIVES.
13665 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13666 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13667 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13668
13669 * src/derives.c (derives_compute): Do not bother invoking
13670 int_of_rule_number, since rule numbers are integers.
13671
13672 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13673 rather than XMALLOC (char, N).
13674
13675 * src/files.c (filename_split): Rewrite to avoid cast.
13676
13677 * src/gram.h (symbol_number_as_item_number,
13678 item_number_as_symbol_number, rule_number_as_item_number,
13679 item_number_as_rule_number):
13680 Now inline functions rather than macros, to avoid casts.
13681 * src/state.h (state_number_as_int): Likewise.
13682 * src/tables.c (state_number_to_vector_number,
13683 symbol_number_to_vector_number): Likewise.
13684
13685 * src/gram.h (int_of_rule_number): Remove; no longer used.
13686
13687 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13688 since the resulting storage is always stored into.
13689
13690 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13691 where it's needed.
13692
13693 * src/muscle_tab.c (muscle_m4_output):
13694 Now inline. Return bool, not int.
13695 * src/state.c (state_compare): Likewise.
13696 * src/symtab.c (symbol_check_defined,
13697 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13698 hash_compare_symbol, hash_symbol):
13699 Likewise.
13700 * src/uniqstr.c (uniqstr_print): Likewise.
13701 * src/muscle_tab.c (muscle_m4_output_processor):
13702 New function, to avoid casts.
13703 * src/state.c (state_comparator, stage_hasher): Likewise.
13704 * src/symtab.c (symbol_check_defined_processor,
13705 symbol_check_alias_consistency_processor, symbol_pack_processor,
13706 symbol_translation_processor, hash_symbol_comparator,
13707 hash_symbol_hasher): Likewise.
13708 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13709 * src/muscle_tab.c (muscles_m4_output):
13710 Use new functions instead of casting old functions unportably.
13711 * src/state.c (state_hash_new): Likewise.
13712 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13713 symbols_token_translations_init):
13714 Likewise.
13715 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13716
13717 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13718 var instead of casting to long, to avoid casts.
13719 (prepare_states): Use MALLOC rather than alloca, so that we don't
13720 have to worry about alloca.
13721 * src/state.c (state_hash_lookup): Likewise.
13722
13723 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13724 local var instead of casting to unsigned char, to avoid casts.
13725
13726 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13727 STATE_ALLOC): Remove.
13728 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13729 rather than calloc, and use offsetof to avoid allocating slightly
13730 too much storage.
13731 (state_new): Initialize all members.
13732
13733 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13734
13735 * src/symtab.c (symbol_free): Remove; unused.
13736 (symbol_get): Remove cast in lhs of assignment.
13737 (symbols_do): Now static. Accept generic arguments, not
13738 hashing-related ones.
13739
13740 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13741 (symbol_processor): Remove.
13742 (symbols_do): Remove decl; now static.
13743
13744 * src/system.h (alloca): Remove; decl no longer needed.
13745 (<stddef.h>): Include, for offsetof.
13746 (<inttypes.>, <stdint.h>): Include if available.
13747 (uintptr_t): New type, if system lacks it.
13748 (CALLOC, MALLOC, REALLOC): New macros.
13749 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13750 new macros.
13751
13752 * src/tables.c (table_size): Now int, to pacify GCC.
13753 (table_grow, table_ninf_remap): Use signed table size.
13754 (save_row): Don't bother initializing locals when not needed.
13755 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13756 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13757
13758 * src/vcg.h: Correct misspellings.
13759
13760 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13761
13762
13763 * src/getargs.c (getargs): Don't assume EOF == -1.
13764
26b4a969
PE
137652002-12-09 Paul Eggert <eggert@twinsun.com>
13766
13767 Change identifier spellings to avoid collisions with names
13768 that are reserved by POSIX.
13769
13770 Don't use names ending in _t, since POSIX reserves them.
13771 For consistency, remove _e and _s endings -- they're weren't
13772 needed to remove ambiguity. All uses changed.
13773 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13774 turn was just renamed from struniq_t.
13775 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13776 which in turn was just renamed from struniq_processor_t.
13777 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13778 in turn was renamed from hash_compare_struniq_t.
13779 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13780 (state_list): Renamed from state_list_t.
13781 * src/assoc.h (assoc): Renamed from assoc_t.
13782 * src/conflicts.c (enum conflict_resolution): Renamed from
13783 enum conflict_resolution_e.
13784 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13785 (rule_list): Renamed from rule_list_t.
13786 * src/getargs.h (enum trace): Renamed from enum trace_e.
13787 (enum report): Renamed from enum report_e.
13788 * src/gram.h (item_number): Renamed from item_number_t.
13789 (rule_number): Renamed from rule_number_t.
13790 (struct rule_s): Remove the "rule_s" part; not used.
13791 (rule): Renamed from rule_t.
13792 (rule_filter): Renamed from rule_filter_t.
13793 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13794 (goto_list): Renamed from goto_list_t.
13795 * src/lalr.h (goto_number): Renamed from goto_number_t.
13796 * src/location.h (location): Renamed from location_t.
13797 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13798 and moved here from:
13799 * src/muscle_tab.h (muscle_entry_t): here.
13800 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13801 (rule_list): Renamed from rule_list_t.
13802 * src/print_graph.c (static_graph): Renamed from graph.
13803 * src/reader.h (braced_code): Renamed from braced_code_t.
13804 Remove brace_code_e tag.
13805 * src/relation.h (relation_node): Renamed from relation_node_t.
13806 (relation_nodes): Renamed from relation_nodes_t.
13807 (relation): Renamed from relation_t.
13808 * src/state.h (state_number): Renamed from state_number_t.
13809 (struct state): Renamed from struct state_s.
13810 (state): Renamed from state_t.
13811 (transitions): Renamed from transitions_t. Unused (and
13812 misspelled) transtion_s tag removed.
13813 (errs): Renamed from errs_t. Unused errs_s tag removed.
13814 (reductions): Renamed from reductions_t. Unused tag
13815 reductions_s removed.
13816 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13817 (struct symbol_list): Renamed from struct symbol_list_s.
13818 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13819 (struct symbol): Renamed from struct symbol_s.
13820 (symbol): Renamed from symbol_t.
13821 * src/tables.c (vector_number): Renamed from vector_number_t.
13822 (action_number): Renamed from action_t.
13823 * src/tables.h (base_number): Renamed from base_t.
13824 * src/vcg.h (enum color): Renamed from enum color_e.
13825 (enum textmode): Renamed from enum textmode_e.
13826 (enum shape): Renamed from enum shape_e.
13827 (struct colorentry): Renamed from struct colorentry_s.
13828 (struct classname): Renamed from struct classname_s.
13829 (struct infoname): Renamed from struct infoname_s.
13830 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13831 (enum decision): Renamed from enum decision_e.
13832 (enum orientation): Renamed from enum orientation_e.
13833 (enum alignment): Renamed from enum alignment_e.
13834 (enum arrow_mode): Renamed from enum arrow_mode_e.
13835 (enum crossing_type): Renamed from enum crossing_type_e.
13836 (enum view): Renamed from enum view_e.
13837 (struct node): Renamed from struct node_s.
13838 (node): Renamed from node_t.
13839 (enum linestyle): Renamed from enum linestyle_e.
13840 (enum arrowstyle): Renamed from enum arrowstyle_e.
13841 (struct edge): Renamed from struct edge.
13842 (edge): Renamed from edge_t.
13843 (struct graph): Renamed from struct graph_s.
13844 (graph): Renamed from graph_t.
13845 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13846 Rename value_t -> value.
13847 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13848 value_t_as_yystype -> value_as_yystype.
13849
13850 Don't include <errno.h> in the mainstream code, since it
13851 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13852 * lib/get-errno.c, lib/get-errno.h: New files.
13853 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13854 get-errno.c.
13855 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13856 * src/output.c (output_skeleton): Likewise.
13857 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13858 instead of errno.
13859 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13860 Likewise.
13861 (handle_action_dollar, handle_action_at): Likewise.
13862 * src/system.h: Do not include <errno.h>.
13863 (TAB_EXT): Renamed from EXT_TAB.
13864 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13865
13866 Avoid str[a-z]*, since <string.h> reserves that name space.
13867 Change all instances of "struniq" in names to "uniqstr", and
13868 likewise for "STRUNIQ" and "UNIQSTR".
13869 * src/uniqstr.c: Renamed from src/struniq.c.
13870 * src/uniqstr.h: Renamed from src/struniq.h.
13871 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13872 * src/files.c (strsuffix): Remove; unused.
13873 (concat2): Renamed from stringappend. Now static.
13874 * src/files.h (strsuffix, stringappend): Remove; unused.
13875 * src/parse-gram.y (<chars>): Renamed from <string>.
13876 (<uniqstr>): Renamed from <struniq>.
13877 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13878 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13879 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13880 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13881 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13882 (N_EXPAND): Renamed from N_STRETCH.
13883
13884 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13885 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13886 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13887 Remove; unused.
13888 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13889 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13890 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13891 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13892 (BASE_MAXIMUM): Renamed from BASE_MAX.
13893 (BASE_MINIMUM): Renamed from BASE_MIN.
13894 (ACTION_MAX): Remove; unused.
13895 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13896 Unnecessary casts removed from above defines.
13897
13898
13899 Fix misspelling in names.
13900 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13901 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13902 G_NODE_ALIGNEMENT.
13903
13904
13905 * lib/timevar.c (timevar_report): Renamed from time_report,
13906 for consistency with other names.
13907 * lib/timevar.h (timevar_report): New decl.
13908 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13909
13910
13911 Sort include-file uses.
13912
13913 Reorder all include files under src to be in the order "system.h".
13914 then the ../lib include files in angle brackets (alphabetized),
13915 then the . include files in double-quotes (alphabetized). Fix
13916 dependency breakages encountered in this process, as follows:
13917 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13918 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13919 * src/state.h: Include "symtab.h".
13920
996b1c7e
PE
139212002-12-08 Paul Eggert <eggert@twinsun.com>
13922
13923 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13924 since this causes problems when __file__ contains character
13925 sequences like "@" that are treated specially by src/scan-skel.l.
13926 Instead, just use the file's basename. This fixes the bug
13927 reported by Martin Mokrejs in
161a71f3 13928 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 13929
e19c4e5d
PE
139302002-12-06 Paul Eggert <eggert@twinsun.com>
13931
13932 Add support for rules that do not have trailing semicolons, as
13933 POSIX requires. Improve the quality of locations in Bison
13934 diagnostics.
26b4a969 13935
e19c4e5d
PE
13936 * src/location.c: Include <quotearg.h>.
13937 (empty_location): Now const.
13938 (location_print): New function. Follow the recommendation of the
13939 GNU Coding Standards for locations that span file boundaries.
13940 * src/location.h: Do not include <quotearg.h>; no longer needed.
13941 (boundary): New type.
13942 (location_t): Use it. This allows locations to span file boundaries.
13943 All member uses changed: file -> start.file or end.file (as needed),
13944 first_line -> start.line, first_column -> start.column,
13945 last_line -> end.line, last_column -> end.column.
13946 (equal_boundaries): New function.
13947 (LOCATION_RESET, LOCATION_STEP): Remove.
13948 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13949 (empty_location): Now const.
13950 (location_print): New decl.
13951 * src/parse-gram.y (lloc_default): New function, which handles
13952 empty locations more accurately.
13953 (YYLLOC_DEFAULT): Use it.
13954 (%token COLON): Remove.
13955 (%token ID_COLON): New token.
26b4a969 13956 (rules): Use it.
e19c4e5d
PE
13957 (declarations, rules): Remove trailing semicolon.
13958 (declaration, rules_or_grammar_declaration):
13959 Allow empty (";") declaration.
13960 (symbol_def): Remove empty actions; no longer needed.
13961 (rules_or_grammar_declaration): Remove trailing semicolon.
13962 (semi_colon.opt): Remove.
13963 * src/reader.h: Include location.h.
13964 (scanner_cursor): New decl.
13965 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13966 rolling our own.
13967 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13968 of *loc.
13969 (STEP): Remove. No longer needed, now that adjust_location does
13970 the work. All uses removed.
13971 (scanner_cursor): New var.
13972 (adjust_location): Renamed from extend_location. It now sets
13973 *loc and adjusts the scanner cursor. All uses changed.
13974 Don't bother testing for CR.
13975 (handle_syncline): Remove location arg; now updates scanner cursor.
13976 All callers changed.
13977 (unexpected_end_of_file): Now accepts start boundary of token or
13978 comment, not location. All callers changed. Update scanner cursor,
13979 not the location.
13980 (SC_AFTER_IDENTIFIER): New state.
13981 (context_state): Renamed from c_context. All uses changed.
13982 (id_loc, code_start, token_start): New local vars.
13983 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13984 processing of Yacc white space and equivalents here.
13985 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13986 instead of returning ID immediately, since we need to search for
13987 a subsequent colon.
13988 (<INITIAL>"'", "\""): Save token_start.
13989 (<INITIAL>"%{", "{", "%%"): Save code_start.
13990 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13991 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13992 BEGIN context_state at end, not INITIAL.
13993 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13994 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13995 Return correct token start.
13996 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13997 the start of a character, string or multiline comment is found.
13998 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13999 Reduction): Adjust reported locations to match the more-precise
14000 results now expected.
14001 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14002 * tests/reduce.at (Useless Rules, Reduced Automaton,
14003 Underivable Rules): Likewise.
14004 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14005 or "|"' now that so many other tokens are allowed by the new grammar.
14006
14007 * src/complain.h (current_file): Remove duplicate decl;
14008 current_file is now owned by files.h.
14009 * src/complain.c, src/scan-gram.l: Include files.h.
14010
140112002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 14012
e19c4e5d
PE
14013 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14014 promotes to int; it might be unsigned int.
14015 * data/yacc.c (yy_reduce_print): Likewise.
14016
14017 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14018 be #defined in the prologue, not in the Bison declarations.
14019 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 14020
b64755e3
PE
140212002-12-02 Paul Eggert <eggert@twinsun.com>
14022
14023 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14024 * lib/strtoul.c: New file, from gnulib.
14025 This fixes a porting bug reported by Peter Klein in
161a71f3 14026 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 14027
6e746484
PE
140282002-11-30 Paul Eggert <eggert@twinsun.com>
14029
b64755e3
PE
14030 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14031 and put only a forward declaration in the prologue. This is for
14032 consistency with the other scanner helper functions.
14033
6ba55592
PE
14034 Type clashes now generate warnings, not errors, since it
14035 appears that POSIX may allow some grammars with type clashes.
14036 * src/reader.c (grammar_current_rule_check): Warn about
14037 type clashes instead of complaining.
14038 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14039
6e746484
PE
14040 Add Yacc library, since POSIX requires it.
14041 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14042 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14043 * lib/main.c, lib/yyerror.c: New files.
14044
14045 gram_error can be static; it need not be extern.
14046 * src/reader.h (gram_error): Remove decl.
14047 * src/parse-gram.y (gram_error): Now static. Add static decl.
14048 (print_token_value): Omit parameter names from forward decl,
14049 for consistency.
14050
88510f9c
PE
140512002-11-29 Paul Eggert <eggert@twinsun.com>
14052
6e746484
PE
14053 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14054 be declared before being used. E.g., one should typically
14055 declare them in the prologue. Use GNU coding style in examples.
14056 Put "const" consistently after the type it modifies. Mention
14057 that C99 supports "inline". Mention that yyerror traditionally
14058 returns "int".
14059
88510f9c
PE
14060 %parse-param and %lex-param now take just one argument, the
14061 declaration; the argument name is deduced from the declaration.
14062
14063 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14064 Reporting, Table of Symbols): Document this.
14065 * src/parse-gram.y (add_param): New function.
14066 (COMMA): Remove.
14067 (declaration): Implement new rule for %parse-param and %lex-param.
14068 * src/scan-gram.l: "," now elicits a warning, rather than being
14069 a token; this is more compatible with byacc.
14070 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14071
bb92250c
PE
140722002-11-27 Paul Eggert <eggert@twinsun.com>
14073
14074 Rename identifiers to avoid real and potential collisions.
14075
14076 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14077 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 14078 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
14079 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14080 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14081 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14082 All uses changed.
14083 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14084 The name "yycontrol" violates the name space rules, and this stuff
14085 wasn't being used anyway.
14086 (input): Remove action; this stuff wasn't being used.
14087 (gram_error): Rename local variable yylloc -> loc.
14088 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14089 (YY_DECL): Don't use "yy" at start of local variables.
14090 All uses changed, e.g., yylloc -> loc.
14091 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14092 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14093 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14094 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14095
14096 * src/parse-gram.y (gram_error): loc is now const *.
14097 * src/reader.h (gram_error): Likewise.
14098
3af4feb2
PE
140992002-11-24 Paul Eggert <eggert@twinsun.com>
14100
14101 Version 1.75c.
14102
14103 * tests/actions.at (Actions after errors): Use an output format
14104 more similar to that of the Printers and Destructors test.
14105 Test the position of the ';' token too.
14106 (Printers and Destructors): Likewise.
14107 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14108 unnecessarily alarming people when the test fails.
14109
14110 * data/yacc.c (yyerrlab1): Move this label down, so that the
14111 parser does not discard the lookahead token if the user code
14112 invokes YYERROR. This change is required for POSIX conformance.
14113
14114 * lib/error.c: Sync with gnulib.
14115
141162002-11-22 Paul Eggert <eggert@twinsun.com>
14117
14118 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14119 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14120 * lib/xmalloc.c: Likewise.
26b4a969 14121
58004308
PE
141222002-11-20 Paul Eggert <eggert@twinsun.com>
14123
14124 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14125
141262002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 14127
58004308
PE
14128 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14129 should use `if (! x) abort ();' rather than `assert (x);', and
14130 anyway it's one less thing to worry about configuring.
14131
14132 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14133 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14134 and replace all instances of assert with abort.
14135 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14136 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14137
14138 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14139 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14140 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14141 hash_find_entry, hash_rehash, hash_insert): Likewise.
14142 * src/conflicts.c (resolve_sr_conflict): Likewise.
14143 * src/lalr.c (set_goto_map, map_goto): Likewise.
14144 * src/nullable.c (nullable_compute): Likewise.
14145 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14146 * src/reader.c (packgram, reader): Likewise.
14147 * src/state.c (state_new, state_free, state_transitions_set,
14148 state_reduction_find): Likewise.
14149 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14150 symbol_pack): Likewise.
14151 * src/tables.c (conflict_row, pack_vector): Likewise.
14152 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14153 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14154 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14155 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14156
14157 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14158 (ARGMATCH_CONSTRAINT): New macro.
14159 (ARGMATCH_ASSERT): Use it.
14160
14161 * src/system.h (verify): New macro.
14162 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14163 rather than assert.
14164 * src/tables.c (tables_generate): Likewise.
14165
14166 * src/struniq.c (struniq_assert): Now returns void, and aborts
14167 if the assertion is false.
14168 (struniq_assert_p): Remove.
14169 * src/struniq.h: Likewise.
14170
76ae8198
PE
141712002-11-18 Paul Eggert <eggert@twinsun.com>
14172
14173 * data/glr.c (yygetLRActions): Replace `yyindex' with
14174 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14175 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 14176 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 14177
d3c4e709
AD
141782002-11-18 Akim Demaille <akim@epita.fr>
14179
14180 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14181 space.
14182 From Tim Van Holder.
14183
8d8a7238
PE
141842002-11-17 Paul Eggert <eggert@twinsun.com>
14185
14186 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14187 to "SyntaxError" for consistency with my 2002-11-15 change.
14188
14189 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14190 not define to {}, since this breaks the common use of `YYDPRINTF
14191 ((...));' if a single statement is desired (e.g. before `else').
14192 Work around GCC warnings by surrounding corresponding calls with
14193 {} if needed.
14194 (yyhasResolvedValue): Remove unused function.
14195 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14196 loop body.
14197 (yyreportSyntaxError): Renamed from yyreportParseError.
14198 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14199 All uses changed.
14200 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14201 extern when possible. Remove unused initializations.
14202
b0937b22
AD
142032002-11-16 Akim Demaille <akim@epita.fr>
14204
14205 Augment the similarity between GLR and LALR traces.
14206
14207 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14208 (YY_REDUCE_PRINT): New.
14209 (yyparse): Use them.
14210 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14211 YYDPRINT here.
14212 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14213 state reached after the reduction/recovery, since...
14214 (yyparse, yyprocessOneStack): Report the state we are entering in.
14215
c5e3e510
AD
142162002-11-16 Akim Demaille <akim@epita.fr>
14217
14218 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14219 Add support for --trace=skeleton.
14220 * src/scan-skel.l: %option debug.
14221 Scan strings of non-@ or \n instead of character by character.
14222 (scan_skel): Handle trace_skeleton.
14223 (QPUTS): New.
14224 (@output_parser_name@, @output_header_name@): ``Restore'' their
14225 support (used to be M4 macros).
14226 * data/yacc.c: Quote larger chunks, a la glr.c.
14227 * data/lalr1.cc: Likewise.
14228 The header guards are no longer available, so use some other
14229 string than `YYLSP_NEEDED'.
14230
4c6cc1db
AD
142312002-11-16 Akim Demaille <akim@epita.fr>
14232
14233 Make the ``Printers and Destructors'' test more verbose, taking
14234 `yacc.c''s behavior as (possibly wrong) reference.
14235
14236 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14237 instead of fprint on stdout.
14238 Set and report the last_line of the symbols.
14239 Consistently display values and locations.
14240
6d9e8019
PE
142412002-11-16 Paul Eggert <eggert@twinsun.com>
14242
14243 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14244
6e649e65
PE
142452002-11-15 Paul Eggert <eggert@twinsun.com>
14246
b25d88f6
PE
14247 * tests/actions.at (Actions after errors): New test case.
14248
6e649e65
PE
14249 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14250 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14251 tests/action.at, tests/calc.at, tests/conflicts.at,
14252 tests/cxx-type.at, tests/regression.at:
14253 "parse error" -> "syntax error" for POSIX compatibility.
14254 "parsing stack overflow..." -> "parser stack overflow" so
14255 that code matches Bison documentation.
14256
0f39aab9
AD
142572002-11-15 Akim Demaille <akim@epita.fr>
14258
14259 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14260 take two BRACED_CODE, not two string_content.
14261 Free the scanner's obstack when we are done.
14262 (code_content): New.
14263 * tests/calc.at: Adjust.
14264 * doc/bison.texinfo: Adjust.
14265 Also, make sure to include the `,' for these declarations.
14266
761c1926
AD
142672002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14268
14269 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14270 definition; avoids potential autoreconf problems.
14271
b0f98b10
AD
142722002-11-15 Akim Demaille <akim@epita.fr>
14273
14274 Always check the value returned by yyparse.
14275
14276 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14277 returned by yyparse.
14278 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14279 Adjust calls.
14280 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14281 returned by yyparse.
14282
970785f1
PH
142832002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14284
14285 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14286 on input.at test.
14287
8fcc7db1
PE
142882002-11-14 Paul Eggert <eggert@twinsun.com>
14289
7ec1b48e
PE
14290 * src/output.c (output_skeleton): Call xfopen instead of
14291 duplicating xfopen's body.
14292
cfff7583 14293 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 14294 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 14295
8fcc7db1
PE
14296 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14297 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14298 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14299 file twice in the grammar, as an extra check.
14300
14301 * tests/input.at (Torturing the Scanner): Surround the
14302 backslash-newline tests with "#if 0", to make it less likely that
14303 we'll run into compiler bugs. Bring back solitary \ inside
14304 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 14305 test backslash-newline in C character constant.
8fcc7db1 14306
4e8d992c
AD
143072002-11-14 Akim Demaille <akim@epita.fr>
14308
14309 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14310 status of the compiler.
f32b346d 14311 Calling `exit 1' is no longer needed.
4e8d992c
AD
14312 Reported by Nelson H. F. Beebe.
14313
9501dc6e
AD
143142002-11-14 Akim Demaille <akim@epita.fr>
14315
14316 * tests/atlocal.in (CPPFLAGS): We have config.h.
14317 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14318 New.
14319 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14320 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14321 * tests/regression.at, tests/torture.at: Use them for all the
14322 grammars that are to be compiled.
14323 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14324 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14325 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14326
18b519c0
AD
143272002-11-14 Akim Demaille <akim@epita.fr>
14328
14329 * doc/bison.texinfo: Various formatting changes (alignments in
14330 samples, additional @group/@end group, GCS in samples.
14331 Use @deffn instead of simple @table to define the directives,
14332 macros, variables etc.
14333
9a86cdb9
PE
143342002-11-13 Paul Eggert <eggert@twinsun.com>
14335
daa33def 14336 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 14337 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 14338
daa33def 14339 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 14340 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
14341 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14342 * tests/headers.at (export YYLTYPE): Likewise.
14343
14344 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 14345 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 14346
9a86cdb9
PE
14347 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14348 comments, since they're not portable. Use GNU coding style.
14349
9c1e26bd
AD
143502002-11-13 Akim Demaille <akim@epita.fr>
14351
14352 * data/yacc.c: Leave bigger chunks of quoted text.
14353 (YYDSYMPRINTF): New.
14354 Use it to report symbol activities.
14355 * data/glr.c (YYDSYMPRINTF): New.
14356 Use it.
14357
87f721cc
PE
143582002-11-12 Paul Eggert <eggert@twinsun.com>
14359
14360 Version 1.75b.
14361
14362 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14363 (yyglrReduce): Return yyok, not 0.
14364 This should avoid the enumerated-type warnings reported
464c6927 14365 by Nelson H. F. Beebe in
161a71f3 14366 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
14367
14368 * lib/bbitset.h (BITSET_INLINE): Remove.
14369 * lib/bitset.h [! BITSET_INLINE]: Remove.
14370 (bitset_set, bitset_reset, bitset_test): Rename local vars
14371 to avoid shadowing warnings by GCC.
14372
14373 * data/glr.c (inline): Remove #define. It's the user's
14374 responsibility to #define it away, just like 'const'.
464c6927 14375 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 14376 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 14377
87f721cc
PE
14378 * Makefile.maint (po-check): Scan .l and .y files instead of the
14379 .c and the .h files that they generate. This fixes the bug
14380 reported by Tim Van Holder in:
161a71f3 14381 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
14382 Look for N_ as well as for _. Try to avoid matching #define for
14383 N_ and _.
14384 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14385 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14386 * src/scan-gram.l: Revamp regular expressions so that " and '
14387 do not confuse xgettext.
14388
14389 * src/struniq.h (struniq_new): Do not declare the return type
14390 to be 'const'; this violates the C standard.
14391 * src/struniq.c (struniq_new): Likewise.
14392
be14ade5
AD
143932002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14394
14395 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14396 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14397 linker.
14398
05291fbc
AD
143992002-11-12 Akim Demaille <akim@epita.fr>
14400
14401 * Makefile.maint: Sync with Autoconf:
14402 (local_updates): New.
14403
1f5fd52e
AD
144042002-11-12 Akim Demaille <akim@epita.fr>
14405
14406 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14407
283f1e64
AD
144082002-11-12 Akim Demaille <akim@epita.fr>
14409
14410 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14411 locations.
14412
886b69d1
AD
144132002-11-12 Akim Demaille <akim@epita.fr>
14414
14415 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14416 not yyvalue.
14417
3df37415
AD
144182002-11-12 Akim Demaille <akim@epita.fr>
14419
14420 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14421 Use it to test the GLR parser.
14422
7bd6c77e
AD
144232002-11-12 Akim Demaille <akim@epita.fr>
14424
14425 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14426 defines it.
14427 * data/glr.c (yystos): New.
14428 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14429 (YYDSYMPRINT): New.
14430 (yyval): Don't define it, it is handled via M4.
14431 (yyrecoverParseError): Free verbosely the discarded symbols.
14432 * data/yacc.c (yysymprint): Remove, rather...
14433 (b4_yysymprint_generate): invoke.
14434 * data/c.m4 (b4_yysymprint_generate): New.
14435 Accept pointers as arguments, as opposed to the version from
14436 yacc.c.
14437 (b4_yydestruct_generate): Likewise.
14438 * tests/cations.at (Printers and Destructors): Use Bison directives
14439 instead of CPP macros.
14440 Don't rely on internal details.
14441
b0400cc6
AD
144422002-11-12 Akim Demaille <akim@epita.fr>
14443
14444 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14445 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14446 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14447 it against YYEMPTY and so forth), work on yytoken (i.e., set
14448 it to YYEMPTY etc.).
14449 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14450 (b4_symbol_actions): Remove.
14451 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14452 for 0, end-of-input.
14453
72f889cc
AD
144542002-11-12 Akim Demaille <akim@epita.fr>
14455
14456 * doc/bison.texinfo (Destructor Decl): New.
14457
b1ae9233
AD
144582002-11-12 Akim Demaille <akim@epita.fr>
14459
14460 * src/tables.c (tables_generate): Use free for pointers that
14461 cannot be NULL, not XFREE.
14462 (pack_vector): Use assert, not fatal, for bound violations.
14463 * src/state.c (state_new): Likewise.
14464 * src/reader.c (reader): Likewise.
14465 * src/lalr.c (set_goto_map): Likewise.
72f889cc 14466 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
14467 the file name.
14468
7ec2d4cd
AD
144692002-11-12 Akim Demaille <akim@epita.fr>
14470
14471 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14472 Restore.
14473 * src/scan-gram.l (last_string): Is global to the file, not to
14474 yylex.
14475 * src/parse-gram.y (input): Don't append the epilogue here,
14476 (epilogue.opt): do it here, and free the scanner's obstack.
14477 * src/reader.c (epilogue_set): Rename as...
14478 (epilogue_augment): this.
14479 * data/c.m4 (b4_epilogue): Defaults to empty.
14480
573a6cd3
AD
144812002-11-12 Akim Demaille <akim@epita.fr>
14482
14483 * src/getargs.c (long_options): Remove duplicates.
14484 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14485 Remove.
14486 * doc/bison.rnh: Remove.
14487 * doc/bison.texinfo (VMS Invocation): Remove.
14488
95612cfa
AD
144892002-11-12 Akim Demaille <akim@epita.fr>
14490
14491 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14492 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14493
14494 Use struniq for symbols.
14495
14496 * src/symtab.h (symbol_t): The tag member is a struniq.
14497 (symbol_type_set): Adjust.
14498 * src/symtab.c (symbol_new): Takes a struniq.
14499 (symbol_free): Don't free the tag member.
14500 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14501 (hash_compare_symbol, hash_symbol): these.
14502 Use the fact that tags as struniqs.
14503 (symbol_get): Use struniq_new.
14504 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14505 Returns a strniq.
14506 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14507 and type members are struniqs.
14508 * src/reader.c (get_merge_function)
14509 (grammar_current_rule_merge_set): Adjust.
14510 (TYPE, current_type): Are struniq.
14511
14512 Use struniq for file names.
14513
14514 * src/files.h, src/files.c (infile): Split into...
14515 (grammar_file, current_file): these.
14516 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14517 * src/reduce.c (reduce_print): Likewise.
14518 * src/getargs.c (getargs): Likewise.
14519 * src/complain.h, src/complain.c: Likewise.
14520 * src/main.c (main): Call struniqs_new early enough to use it for
14521 file names.
14522 Don't free the input file name.
14523
3e6656f9
AD
145242002-11-12 Akim Demaille <akim@epita.fr>
14525
14526 * src/symtab.c (symbol_free): Remove dead deactivated code:
14527 type_name are properly removed.
14528 Don't use XFREE to free items that cannot be NULL.
14529 * src/struniq.h, src/struniq.c: New.
14530 * src/main.c (main): Initialize/free struniqs.
14531 * src/parse-gram.y (%union): Add astruniq member.
14532 (yyprint): Adjust.
14533 * src/scan-gram.l (<{tag}>): Return a struniq.
14534 Free the obstack bit that used to store it.
14535 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14536
7672019c
PE
145372002-11-11 Paul Eggert <eggert@twinsun.com>
14538
14539 Revamp to fix many (but not all) of the C- and M4-related quoting
14540 problems. Among other things, this fixes the Bison bug reported
14541 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 14542 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
14543
14544 Use new @ escapes consistently. Represent brackets with @{ and @}
14545 rather than @<:@ and @:>@, since this works a bit better with dumb
14546 editors like vi. Represent @ with @@, since @ is now consistently
14547 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14548 __ofile__, to avoid unexpected expansions. Similarly, use @output
14549 rather than #output.
14550
14551 * data/c.m4 (b4_copyright): Omit file name from comment, since
14552 the file name could contain "*/".
14553 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14554 be quoted. All uses changed.
14555
14556 * data/glr.c: Use new @ escapes consistently.
14557 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14558 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14559 Remove, since they couldn't handle arbitrary characters in file
14560 names.
14561 * data/lalr1.cc: Likewise.
14562 * data/yacc.c: Likewise.
14563
14564 * src/files.c (output_infix): Remove; all uses removed.
14565 * src/files.h: Likewise.
14566
14567 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14568 mishandled funny characters in file names, and anyway it isn't
14569 needed any more.
14570 * data/yacc.c: Likewise.
14571 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14572
14573 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14574 * data/yacc.c: Likewise.
14575
14576 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14577 strings now.
14578 (muscle_init): Quote filename as a C string.
14579 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14580 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14581 * src/output.c (escaped_file_name_output): New function.
14582 (prepare_symbols): Quote tokens for M4.
14583 (prepare): Don't insert output_infix, output_prefix,
14584 output_parser_name, output_header_name; this is now down by scan-skel.
14585 Insert skeleton as a C string.
14586
14587 * src/output.c (user_actions_output, symbol_destructors_output,
14588 symbol_printers_output): Quote filenames for C and M4.
14589 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14590
14591 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14592 escapes other than \\ and \'; this simplifies the code.
14593 (<SC_STRING>): Likewise, for \\ and \".
14594 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14595 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14596 Use new escapes @{ and @} for [ and ].
14597
14598 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14599 them with auto vars.
14600 Switch to new escape scheme, where @ is the escape character uniformly.
14601 Abort if a stray escape character is found. Avoid unbounded input
14602 buffer when parsing non-escaped text.
14603
14604 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14605 __oline__, #output, $@, and @{ do not have unintended meanings.
14606
acea4f3b
PE
146072002-11-09 Paul Eggert <eggert@twinsun.com>
14608
14609 Fix the test failure due to GCC warnings described in
161a71f3 14610 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
14611 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14612 evaluate to 0 if it's impossible for NINF to be in the respective
14613 table.
14614 (yygetLRActions, yyrecoverParseError): Use them.
14615
14616 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14617 counted in the token inserted at end of file. Now takes
14618 location_t *, not location_t, so that the location can be
14619 adjusted. All uses changed.
14620
14621 * tests/regression.at (Invalid inputs): Adjust wording in
14622 diagnostic to match the new behavior.
14623
14624 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14625 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14626 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14627 abort ();'. This reduces the runtime of the "Many lookaheads"
14628 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14629 GCC 3.2.
14630
20ef1ad5
PE
146312002-11-07 Paul Eggert <eggert@twinsun.com>
14632
14633 * src/parse-gram.y (CHARACTER): Remove unused token.
14634 All uses removed.
14635
14636 * src/scan-gram.l: Remove stack option. We no longer use the
14637 stack, since the stack was never deeper than 1; instead, use the
14638 new auto var c_context to record the stacked value.
14639
14640 Remove nounput option. At an unexpected end of file, we now unput
14641 the minimal input necessary to end cleanly; this simplifies the
14642 code.
14643
14644 Avoid unbounded token sizes where this is easy.
14645
14646 (unexpected_end_of_file): New function.
14647 Use it to systematize the error message on unexpected EOF.
14648 (last-string): Now auto, not static.
14649 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14650 (scanner_last_string_free): Remove; not used.
14651 (percent_percent_count): Move decl to just before use.
14652 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14653 not the (never otherwised-used) CHARACTER.
14654
93724f13
AD
146552002-11-07 Akim Demaille <akim@epita.fr>
14656
14657 Let yyerror always receive the msg as last argument, so that
14658 yyerror can be variadic.
14659
14660 * data/yacc.c (b4_yyerror_args): New.
14661 Use it when calling yyerror.
14662 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14663 Use it when calling yyerror.
14664 * doc/bison.texinfo (Error Reporting): Adjust.
14665 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14666 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14667
6e40b4eb
AD
146682002-11-06 Akim Demaille <akim@epita.fr>
14669
14670 #line should have quoted strings.
14671 Ideally, this should be done by m4_quotearg.
14672
14673 * src/scan-skel.l: Include quotearg.h.
14674 Quote __ofile__.
14675 * src/output.c (symbol_printers_output)
14676 (symbol_destructors_output): Quote the file name.
14677
2dfbfc12
AD
146782002-11-06 Akim Demaille <akim@epita.fr>
14679
14680 * tests/regression.at (Invalid inputs): Adjust to the recent
14681 messages.
14682
437c2d80
AD
146832002-11-06 Akim Demaille <akim@epita.fr>
14684
14685 Restore --no-lines.
14686 Reported by Jim Kent.
14687
14688 * data/c.m4 (b4_syncline): New.
14689 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14690 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14691 * src/output.c (user_actions_output): Likewise.
14692 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 14693 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 14694
900c5db5
AD
146952002-11-06 Akim Demaille <akim@epita.fr>
14696
14697 * src/main.c (main): Free `infile'.
14698 * src/scan-gram.l (handle_syncline): New.
14699 Recognize `#line'.
14700 * src/output.c (user_actions_output, symbol_destructors_output)
14701 (symbol_printers_output): Use the location's file name, not
14702 infile.
14703 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14704
e183b123 147052002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 14706
e183b123 14707 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 14708 either has GLR conflict entries.
e183b123 14709
193eb6b7
PE
147102002-11-05 Paul Eggert <eggert@twinsun.com>
14711
e183b123
PE
14712 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14713 "integer out of range" rather than "invalid value".
14714 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14715 accordingly.
14716
193eb6b7
PE
14717 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14718 Also, remove one static variable in the scanner.
14719
14720 * src/scan-gram.l (braces_level): Now auto, not static.
14721 Initialize to zero if the compiler is being picky.
14722 (INITIAL): Clear braces_level instead of incrementing it.
14723 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14724 as POSIX 1003.1-2001 requires.
14725 * src/system.h (IF_LINT): New macro, taken from coreutils.
14726 * configure.ac: Define "lint" if --enable-gcc-warnings.
14727
29c01725
AD
147282002-11-05 Akim Demaille <akim@epita.fr>
14729
14730 * src/scan-gram.l: When it starts with `%', complain about the
14731 whole directive, not just that `invalid character: %'.
14732
8aeac3ca
AD
147332002-11-04 Akim Demaille <akim@epita.fr>
14734
14735 * Makefile.maint: Update from Autoconf.
14736 (update, cvs-update, po-update, do-po-update): New.
14737
793a58bb
AD
147382002-11-04 Akim Demaille <akim@epita.fr>
14739
14740 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14741 and yyerror.
14742 Have yyerror `use' its arguments.
14743 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14744 returns true when location & yacc & pure & parse-param.
14745 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14746
c4d720cd
AD
147472002-11-04 Akim Demaille <akim@epita.fr>
14748
14749 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14750 clashes.
14751 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14752 font-lock-mode.
14753 Use complain_at.
14754 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14755 slot 0.
14756
613a0dc5
PE
147572002-11-03 Paul Eggert <eggert@twinsun.com>
14758
14759 * src/reader.c (get_merge_function, grammar_current_rule_check):
14760 Use consistent diagnostics for reporting type name clashes.
14761 Quote the types with <>, for consistency with Yacc.
14762 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14763
2a8d363a
AD
147642002-11-03 Akim Demaille <akim@epita.fr>
14765
14766 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14767 New.
14768 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14769 (b4_parse_param): Remove.
14770 Use b4_identification.
14771 Propagate b4_pure_args where needed to pass them to yyerror.
14772 * data/glr.m4 (b4_parse_param): Remove.
14773 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14774 (b4_lpure_formals): New.
14775 Use b4_identification.
14776 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14777 b4_user_formals and b4_user_args.
14778 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14779 (yyreportAmbiguity): When using a pure parser, also need
14780 the location, and the parse-params.
14781 Adjust callers.
14782 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14783 When using a pure parser, also need the parse-params.
14784 Adjust callers.
14785 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14786 (%pure-parser + %parse-param) LALR and GLR parsers.
14787 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14788 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14789 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14790 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14791 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14792 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14793 * doc/bison.texinfo: Untabify the whole file.
14794 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14795 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14796 (Error Reporting): Adjust to these new directives.
14797 Document %error-verbose, deprecate YYERROR_VERBOSE.
14798
9e32add8
AD
147992002-11-03 Akim Demaille <akim@epita.fr>
14800
14801 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14802 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14803 command line options.
14804 * tests/cxx-type.at: Formatting changes.
14805
b02d90a5
PE
148062002-11-03 Paul Eggert <eggert@twinsun.com>
14807
14808 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14809 to count columns correctly, and to check for invalid inputs.
9e32add8 14810
b02d90a5
PE
14811 Use mbsnwidth to count columns correctly. Account for tabs, too.
14812 Include mbswidth.h.
14813 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14814 (extend_location): New function.
14815 (YY_LINES): Remove.
14816
14817 Handle CRLF in C code rather than in Lex code.
14818 (YY_INPUT): New macro.
14819 (no_cr_read): New function.
14820
14821 Scan UCNs, even though we don't fully handle them yet.
14822 (convert_ucn_to_byte): New function.
14823
14824 Handle backslash-newline correctly in C code.
14825 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14826 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14827 all uses changed.
14828 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14829 Use {splice} wherever C allows backslash-newline.
14830 YY_STEP after space, newline, vertical-tab.
14831 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 14832
b02d90a5
PE
14833 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14834
14835 ({int}, handle_action_dollar, handle_action_at): Check for integer
14836 overflow.
9e32add8 14837
b02d90a5
PE
14838 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14839
14840 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14841 as well as \000. Check for UCHAR_MAX, not 255.
14842 Allow \x with an arbitrary positive number of digits, as in C.
14843 Check for overflow here.
14844 Allow \? and UCNs, for compatibility with C.
14845
14846 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14847 with quote slot used by complain_at.
14848
14849 * tests/input.at: Add tests for backslash-newline, m4 quotes
14850 in symbols, long literals, and funny escapes in strings.
14851
14852 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14853 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14854 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14855 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14856 * m4/mbswidth.m4: New file, from GNU coreutils.
14857
14858 * doc/bison.texinfo (Grammar Outline): Document // comments.
14859 (Symbols): Document that trigraphs have no special meaning in Bison,
14860 nor is backslash-newline allowed.
14861 (Actions): Document that trigraphs have no special meaning.
14862
14863 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14864 no longer used.
14865
148662002-11-02 Paul Eggert <eggert@twinsun.com>
14867
14868 * src/reader.c: Don't include quote.h; not needed.
14869 (get_merge_function): Reword warning to be consistent with
14870 type clash diagnostic in grammar_current_rule_check.
14871
14872 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14873 bug in trigraph handling.
14874
14875 * src/output.c (prepare_symbols): When printing token names,
14876 escape "[" as "@<:@" and likewise for "]".
14877
14878 * src/system.h (errno): Remove declaration, as we are now
14879 assuming C89 or better, and C89 guarantees errno.
14880
762b212b
PE
148812002-10-30 Paul Eggert <eggert@twinsun.com>
14882
14883 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14884 Check for close failures.
14885 * src/files.h (xfclose): Return void, not int, since it always
14886 returned zero.
14887 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14888 indicates one.
14889 * src/output.c (output_skeleton): Use xfclose rather than fclose
14890 and ferror. xfclose now checks ferror.
14891
14892 * data/glr.c (YYLEFTMOST_STATE): Remove.
14893 (yyreportTree): Use a stack-based leftmost state. This avoids
14894 our continuing battles with bogus warnings about initializers.
14895
56100c60
AD
148962002-10-30 Akim Demaille <akim@epita.fr>
14897
14898 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14899 #if.
14900
51b4a04c
PH
149012002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14902
14903 * tests/glr-regr1.at: New test for reported regressions.
14904 * tests/testsuite.at: Add glr-regr1.at test.
14905 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 14906
bf1ebda2
PE
149072002-10-24 Paul Eggert <eggert@twinsun.com>
14908
5c16c6b1
PE
14909 Version 1.75a.
14910
bf1ebda2
PE
14911 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14912 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14913 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14914 Don't assume strdup exists; POSIX says its an XSI extension.
14915 Check for buffer overflow on input.
14916
b526ee61
AD
149172002-10-24 Akim Demaille <akim@epita.fr>
14918
14919 * src/output.c (output_skeleton): Don't disable M4sugar comments
14920 too soon: it results in comments being expanded.
14921 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14922 first output.
14923
f1886bb2
AD
149242002-10-24 Akim Demaille <akim@epita.fr>
14925
14926 * data/yacc.c (m4_int_type): New.
14927 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14928 char' as only yacc.c wants K&R portability.
14929 * data/glr.c (yysigned_char): Remove.
14930 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14931 Reported by Quoc Peyrot.
14932
c5576256
PE
149332002-10-23 Paul Eggert <eggert@twinsun.com>
14934
14935 * src/main.c (main): With --trace=time, report times even if a
14936 non-fatal error occurs. Formerly, the times were reported in some
14937 such cases but not in others.
14938 * src/reader.c (reader): Just return if a complaint has been issued,
14939 instead of exiting, so that 'main' can report times.
14940
27b0ffea
AD
149412002-10-22 Akim Demaille <akim@epita.fr>
14942
14943 * src/system.h: Include sys/types.
14944 Reported by Bert Deknuydt.
14945
223a7883
PE
149462002-10-23 Paul Eggert <eggert@twinsun.com>
14947
14948 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14949 Suggested by Art Haas.
14950
149512002-10-22 Paul Eggert <eggert@twinsun.com>
14952
14953 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14954 decl; not needed any more.
14955 * src/main.c (main): Use return to exit, undoing yesterday's change.
14956 The last OS that we could find where this wouldn't work is
14957 SunOS 3.5, and that's too old to worry about now.
14958
14959 * data/glr.c (struct yyltype): Define members even when not
14960 doing locations. This is more consistent with yacc.c, and it
14961 works around the following bug reports:
161a71f3
PE
14962 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14963 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 14964
223a7883
PE
14965 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14966 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14967 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14968
8b76775a
AD
149692002-10-22 Akim Demaille <akim@epita.fr>
14970
14971 * data/README: New.
14972
6db10d14
PE
149732002-10-21 Paul Eggert <eggert@twinsun.com>
14974
14975 Be consistent about 'bool'; the old code used an enum in one
14976 module and an int in another, and this violates the C standard.
14977 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14978 * configure.ac (AC_HEADER_STDBOOL): Add.
14979 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14980 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14981 * src/symtab.c (hash_compare_symbol_t): Likewise.
14982 * src/system.h (bool, false, true): Use a definition consistent
14983 with ../lib/hash.c. All uses changed.
14984
14985 * src/complain.c (warning_issued): Renamed from warn_message_count,
14986 so that we needn't worry about integer overflow (!).
14987 Now of type bool. All uses changed.
14988 (complaint_issued): Renamed from complain_message_count; likewise.
14989
14990 * src/main.c (main): Use exit to exit with failure.
27b0ffea 14991
6db10d14
PE
14992 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14993 rather than 1 and 0.
14994 * src/main.c (main): Likewise.
14995 * src/getargs.c (getargs): Likewise.
14996 * src/reader.c (reader): Likewise.
14997
14998 * src/getarg.c (getargs): Remove duplicate code for
14999 "Try `bison --help'".
15000
15001 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15002 What was that "2" for?
15003
15004 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15005 * src/getargs.c (usage): Likewise.
15006
15007 * src/getargs.c (getargs): When there are too few operands, report
15008 the last one. When there are too many, report the first extra
15009 one. This is how diffutils does it.
15010
92a060fd
PE
150112002-10-20 Paul Eggert <eggert@twinsun.com>
15012
15013 Remove K&R vestiges.
15014 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15015 * src/complain.c (VA_START): Remove. Assume prototypes.
15016 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15017 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15018 fatal): Assume prototypes.
15019 * src/complain.h: Assume prototypes.
15020 * src/system.h (PARAMS): Remove.
15021 Include <limits.h> unconditionally, since it's guaranteeed even
15022 for a freestanding C89 compiler.
15023 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15024 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 15025
e7cb57c0
AD
150262002-10-20 Akim Demaille <akim@epita.fr>
15027
15028 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15029 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15030 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15031 (yyresolveStates, yyresolveAction, yyresolveStack)
15032 (yyprocessOneStack): Use them.
15033 (yy_reduce_print): New.
15034 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15035
0245f82d
AD
150362002-10-20 Akim Demaille <akim@epita.fr>
15037
15038 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15039 arguments and output `void'.
15040 (b4_c_function): Rename as...
15041 (b4_c_function_def): this.
15042 (b4_c_function_decl, b4_c_ansi_function_def)
15043 (b4_c_ansi_function_decl): New.
15044 Change the interpretation of the arguments: before `int, foo', now
15045 `int foo, foo'.
15046 * data/yacc.c (yyparse): Prototype and define thanks to these.
15047 Adjust b4_c_function_def uses.
15048 * data/glr.c (yyparse): Likewise, but ANSI only.
15049
39912f52
AD
150502002-10-20 Akim Demaille <akim@epita.fr>
15051
15052 * src/output.c (prepare): Move the definition of `tokens_number',
15053 `nterms_number', `undef_token_number', `user_token_number_max'
15054 to...
15055 (prepare_tokens): Here.
15056 (prepare_tokens): Rename as...
15057 (prepare_symbols): this.
15058 (prepare): Move the definition of `rules_number' to...
15059 (prepare_rules): here.
15060 (prepare): Move the definition of `last', `final_state_number',
15061 `states_number' to...
15062 (prepare_states): here.
15063 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15064
20c1e2ad
AD
150652002-10-20 Akim Demaille <akim@epita.fr>
15066
15067 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15068
21964f43
AD
150692002-10-20 Akim Demaille <akim@epita.fr>
15070
15071 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15072 * data/c.m4: here.
15073
66d30cd4
AD
150742002-10-20 Akim Demaille <akim@epita.fr>
15075
15076 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15077 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15078 `pair'.
15079 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15080 `name' to...
15081 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15082 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15083 These.
15084
95f2c9fe
PE
150852002-10-19 Paul Eggert <eggert@twinsun.com>
15086
15087 Do not create a temporary file, as that involves security and
15088 cleanup headaches. Instead, use a pair of pipes.
15089 Derived from a suggestion by Florian Krohm.
15090 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15091 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15092 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15093 (BISON_PREREQ_SUBPIPE): Add.
15094 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15095 Add subpipe.h, subpipe.c.
15096 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15097 * po/POTFILES.in: Add lib/subpipe.c.
15098 * src/output.c: Include "subpipe.h".
15099 (m4_invoke): Remove decl.
15100 (scan_skel): New decl.
15101 (output_skeleton): Use pipe rather than temporary file for m4 input.
15102 Check that m4sugar.m4 is readable, to avoid deadlock.
15103 Check for pipe I/O error.
15104 * src/scan-skel.l (readpipe): Remove decl.
15105 (scan_skel): New function, to be used in place of m4_invoke.
15106 Read from stream rather than file.
66d30cd4 15107
95f2c9fe
PE
15108 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15109 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15110 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15111 this generates a more-accurate value anyway.
15112
15113 * lib/timevar.c (timervar_accumulate): Rename locals to
15114 avoid confusion with similarly-named more-global.
15115 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15116
15117 * src/output.c (prepare): Use xstrdup to convert char const *
15118 to char *, to avoid GCC warning.
15119
c19988b7
AD
151202002-10-19 Akim Demaille <akim@epita.fr>
15121
15122 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15123 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15124 Use them to have `calc.y' ready for %pure-parser.
15125 * data/yacc.c (YYLEX): Pass a yylex return type to
15126 b4_c_function_call.
15127
ae7453f2
AD
151282002-10-19 Akim Demaille <akim@epita.fr>
15129
15130 Prototype support of %lex-param and %parse-param.
15131
15132 * src/parse-gram.y: Add the definition of the %lex-param and
15133 %parse-param tokens, plus their rules.
15134 Drop the `_' version of %glr-parser.
15135 Add the "," token.
15136 * src/scan-gram.l (INITIAL): Scan them.
15137 * src/muscle_tab.c: Comment changes.
15138 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15139 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15140 (muscle_entry_s): The `value' member is no longer const.
15141 Adjust all dependencies.
15142 * src/muscle_tab.c (muscle_init): Adjust: use
15143 MUSCLE_INSERT_STRING.
15144 Initialize the obstack earlier.
15145 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15146 (muscle_pair_list_grow): New.
15147 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15148 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15149 * tests/calc.at: Use %locations, not --locations.
15150 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15151
0e575721
AD
151522002-10-19 Akim Demaille <akim@epita.fr>
15153
15154 * src/getargs.c (usage): Take status as argument and exit
15155 accordingly.
15156 Report the traditional `Try ... --help' message when status != 0.
15157 (usage, version): Don't take a FILE * as arg, it is pointless.
15158 (getargs): When there is an incorrect number of arguments, make it
15159 an error, and report it GNUlically thanks to `usage ()'.
15160
724ce7f5
PE
151612002-10-18 Paul Eggert <eggert@twinsun.com>
15162
3a781eb2
PE
15163 * data/glr.c (yyreportParseError): Don't assume that sprintf
15164 yields the length of the printed string, as this is not true
15165 on SunOS 4.1.4. Reported by Peter Klein.
15166
724ce7f5
PE
15167 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15168 * tests/conflicts.at (%nonassoc and eof): Likewise.
15169 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15170
473d0a75
AD
151712002-10-17 Akim Demaille <akim@epita.fr>
15172
15173 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15174 * src/getargs.c (trace_types, trace_args): Adjust.
15175 * src/reader.c (grammar_current_rule_prec_set)
15176 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15177 Standardize error messages.
15178 And s/@prec/%prec/!
15179 (reader): Use trace_flag to enable scanner/parser debugging,
15180 instead of an adhoc scheme.
15181 * src/scan-gram.l: Remove trailing debugging code.
15182
e76d2469
PE
151832002-10-16 Paul Eggert <eggert@twinsun.com>
15184
93e2236a
PE
15185 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15186 MUSCLE_TAB_H.
15187
e76d2469
PE
15188 * NEWS: Officially drop support for building Bison with K&R C,
15189 since it didn't work anyway and it's not worth worrying about.
15190 * Makefile.maint (wget_files): Remove ansi2knr.c.
15191 (ansi2knr.c-url_prefix): Remove.
15192 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15193 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15194 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15195
5bd1c419
PE
151962002-10-15 Paul Eggert <eggert@twinsun.com>
15197
15198 Stop using the "enum_" trick for K&R-style function definitions;
15199 it confused me, and I was the author! Instead, assume that people
15200 who want to use K&R C compilers (when using these modules in GCC,
15201 perhaps?) will run ansi2knr.
15202
15203 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15204 All uses of "enum_" changed to "enum ".
15205 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15206 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 15207
5bd1c419
PE
15208 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15209 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15210 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15211 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15212 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15213 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15214 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15215 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15216 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15217 Use function prototypes; this removes the need for declaring
15218 static functions simply to provide their prototypes.
15219 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15220 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15221 bitset_count_, bitset_create, bitset_dump, bitset_first,
15222 bitset_free, bitset_init, bitset_last, bitset_next,
15223 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15224 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15225 bitset_print, bitset_release_memory, bitset_toggle_,
15226 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15227 debug_bitset): Likewise.
15228 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15229 * lib/bitset_stats.c (bitset_log_histogram_print,
15230 bitset_percent_histogram_print, bitset_stats_and,
15231 bitset_stats_and_cmp, bitset_stats_and_or,
15232 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15233 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15234 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15235 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15236 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15237 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15238 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15239 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15240 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15241 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15242 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15243 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15244 bitset_stats_zero): Likewise.
15245 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15246 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15247 bitsetv_dump, debug_bitsetv): Likewise.
15248 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15249 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15250 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15251 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15252 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15253 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15254 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15255 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15256 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15257 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15258 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15259 Likewise.
15260 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15261 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15262 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15263 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15264 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15265 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15266 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15267 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15268 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15269 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15270 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 15271
ae26e1f0
AD
152722002-10-14 Akim Demaille <akim@epita.fr>
15273
15274 Version 1.75.
15275
d43baf71
AD
152762002-10-14 Akim Demaille <akim@epita.fr>
15277
15278 * tests/Makefile.am (maintainer-check-posix): New.
15279
7ebc83e3
AD
152802002-10-14 Akim Demaille <akim@epita.fr>
15281
15282 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15283 member.
15284
05846dae
AD
152852002-10-14 Akim Demaille <akim@epita.fr>
15286
15287 * src/tables.c (table_ninf_remap): base -> tab.
15288 Reported by Matt Rosing.
15289
1318e37d
PE
152902002-10-14 Paul Eggert <eggert@twinsun.com>
15291
447fbb17
PE
15292 * tests/action.at, tests/calc.at, tests/conflicts.at,
15293 tests/cxx-type.at, tests/headers.at, tests/input.at,
15294 tests/regression.at, tests/synclines.at, tests/torture.at:
15295 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15296 so that the tests still work even if POSIXLY_CORRECT is set.
15297 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 15298
1318e37d
PE
15299 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15300 for portability to K&R hosts. Fix typo: signed char is guaranteed
15301 only to 127, not to 128.
15302 * data/glr.c (yysigned_char): New type.
15303 * data/yacc.c (yysigned_char): Likewise.
15304 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15305
cc0f0794
PE
153062002-10-13 Paul Eggert <eggert@twinsun.com>
15307
5038f418
PE
15308 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15309 true due to limited range of data type" warning from GCC.
15310
cc0f0794
PE
15311 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15312 by wrapping enum yytokentype's definition inside #ifndef
15313 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15314
6fed0802
AD
153152002-10-13 Akim Demaille <akim@epita.fr>
15316
15317 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15318 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15319
32f0598d
AD
153202002-10-13 Akim Demaille <akim@epita.fr>
15321
15322 * Makefile.maint: Update from Autoconf 2.54.
15323 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15324
7ea9a33f
AD
153252002-10-13 Akim Demaille <akim@epita.fr>
15326
15327 * src/print.c (print_state): Separate the list of solved conflicts
15328 from the other items.
15329 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15330
ea99527d
AD
153312002-10-13 Akim Demaille <akim@epita.fr>
15332
15333 Let nondeterministic skeletons be usable with deterministic
15334 tables.
15335
15336 With the patch, GAWK compiled by GCC without -O2 passes its test
15337 suite using a GLR parser driven by LALR tables. It fails with -O2
15338 because `struct stat' gives two different answers on my machine:
15339 88 (definition of an auto var) and later 96 (memset on this var).
15340 Hence the stack is badly corrumpted. The headers inclusion is to
15341 blame: if I move the awk.h inclusion before GLR's system header
15342 inclusion, the two struct stat have the same size.
15343
15344 * src/tables.c (pack_table): Always create conflict_table.
15345 (token_actions): Always create conflict_list.
15346 * data/glr.c (YYFLAG): Remove, unused.
15347
f377f69f
AD
153482002-10-13 Akim Demaille <akim@epita.fr>
15349
15350 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15351 (O0FLAGS): New.
15352 (VALGRIND, GXX): New.
15353 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15354 * tests/bison.in: Run $PREBISON a pre-command.
15355 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15356 (maintainer-check-g++): New.
15357 * Makefile.am (maintainer-check): New.
15358
2a1fe6ed
AD
153592002-10-13 Akim Demaille <akim@epita.fr>
15360
15361 * data/glr.c: Formatting changes.
15362 Tweak some trace messages to match yacc.c's.
15363
f50adbbd
AD
153642002-10-13 Akim Demaille <akim@epita.fr>
15365
15366 GLR parsers sometimes raise parse errors instead of performing the
15367 default reduction.
15368 Reported by Charles-Henry de Boysson.
15369
15370 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 15371 check the length of the traces when %glr.
f50adbbd
AD
15372 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15373 GLR's traces.
15374 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15375 Test GLR parsers.
15376 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15377 (yyltype): Remove the yy prefix from the member names.
15378 (yytable): Complete its comment.
15379 (yygetLRActions): Map error action number from YYTABLE from
15380 YYTABLE_NINF to 0.
15381 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15382 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15383 not satisfying as we could compare an YYACTION computed from
15384 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15385 only value for error actions.
15386 (yyreportParseError): In verbose parse error messages, don't issue
15387 `error' in the list of expected tokens.
15388 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15389 next action to perform to match glr.c's decoding.
15390 (yytable): Complete its comment.
15391
bcbad5b9
PE
153922002-10-13 Paul Eggert <eggert@twinsun.com>
15393
15394 Fix problem reported by Henrik Grubbstroem in
161a71f3 15395 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
15396 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15397 because the Bison parser reads the second action before reducing
15398 the first one.
15399 * src/scan-gram.l (rule_length): New static var.
15400 Use it to keep track of the rule length in the scanner, since
15401 we can't expect the parser to be in lock-step sync with the scanner.
15402 (handle_action_dollar, handle_action_at): Use this var.
15403 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 15404
14904b89
PE
154052002-10-12 Paul Eggert <eggert@twinsun.com>
15406
1fe611e5
PE
15407 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15408 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15409 Include <sys/time.h> when checking for clock_t and struct tms.
15410 Use same include order as source.
15411 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 15412 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 15413
1fe611e5
PE
15414 * lib/timevar.c: Update copyright date and clarify comments.
15415 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 15416
1fe611e5
PE
15417 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15418 GCC version as of today, then merge Bison's changes.
15419 Change "GCC" to "Bison" in copyright notice. timevar.def's
15420 author is Akim, so change that too.
15421
98194095
PE
15422 * src/reader.c (grammar_current_rule_check):
15423 Don't worry about the default action if $$ is untyped.
15424 Prevents bogus warnings reported by Jim Gifford in
161a71f3 15425 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 15426
14904b89
PE
15427 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15428 * data/glr.c, data/lalr1.cc, data/yacc.c:
15429 Output token definitions before the first part of user declarations.
15430 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 15431 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 15432
ff6dca18
PE
154332002-10-11 Paul Eggert <eggert@twinsun.com>
15434
15435 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15436 (yyparse): here. This undoes some of the 2002-07-25 change.
15437 Compatibility problem reported by Ralf S. Engelschall with
15438 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15439
eb714592
AD
154402002-10-11 Akim Demaille <akim@epita.fr>
15441
15442 * tests/regression.at Characters Escapes): New.
15443 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15444 characters.
15445 Reported by Jan Nieuwenhuizen.
15446
b7195100
AD
154472002-10-11 Akim Demaille <akim@epita.fr>
15448
15449 * po/id.po: New.
15450
f28a0f2d
PE
154512002-10-10 Paul Eggert <eggert@twinsun.com>
15452
15453 Portability fixes for bitsets; this also avoids several GCC
15454 warnings.
15455
15456 * lib/abitset.c: Include <stddef.h>, for offsetof.
15457 * lib/lbitset.c: Likewise.
15458
15459 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15460 properly for vectors of objects. Do not assume that adding a
15461 header size to a multiple of a word size yields a value that is
15462 properly aligned for the whole union.
15463 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15464
15465 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15466 unique names for structures.
15467 * lib/ebitset.c (ebitset_bytes): Likewise.
15468 * lib/lbitset.c (lbitset_bytes): Likewise.
15469
15470 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15471 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15472 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15473 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15474 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15475 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15476 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15477 to improve the type-checking that GCC can do.
15478 * lib/bitset.c (bitset_op4_cmp): Likewise.
15479 * lib/bitset_stats.c (bitset_stats_count,
15480 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15481 bitset_stats_copy, bitset_stats_disjoint_p,
15482 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15483 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15484 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15485 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15486 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15487 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15488 bitset_stats_or_and_cmp): Likewise.
15489 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15490 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15491 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15492 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15493
15494 * lib/abitset.h: Include bitset.h, not bbitset.h.
15495 * lib/ebitset.h: Likewise.
15496 * lib/lbitset.h: Likewise.
15497
15498 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15499 All instances of parameters of type enum bitset_opts are now of
15500 type enum_bitset_opts, to conform to the C Standard, and similarly
15501 for enum_bitset_type.
15502 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15503 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15504
15505 Do not use "struct bitset_struct" to mean different things in
15506 different modules. Not only is this confusing, it violates
15507 the C Standard, which requires that structure types in different
15508 modules must be compatible if one is to be passed to the other.
15509 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15510 All instances of "struct bitset_struct *" replaced with "bitset".
15511 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15512 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15513 struct lbitset_struct, struct bitset_stats_struct): New types.
15514 All uses of struct bitset_struct changed to union bitset_union,
15515 etc.
ba0fe3c7 15516 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
15517 struct bitset_struct): Remove.
15518 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15519 struct bitset_struct): Remove.
15520 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15521 bitset_struct): Remove.
15522 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15523 Likewise.
15524
15525 Do not call a function of type T using a call that assumes the
15526 function is of a different type U. Standard C requires that a
15527 function must be called with a type that is compatible with its
15528 definition.
15529 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15530 New decls.
15531 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15532 New functions.
15533 * lib/ebitset.c (PFV): Remove.
15534 * lib/lbitset.c (PFV): Likewise.
15535 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15536 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15537 decls.
15538 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15539 (ebitset_vtable): Use them.
15540 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15541 lbitset_xor): New functions.
15542 (lbitset_vtable): Use them.
15543
15544 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15545 Declare.
15546
15547 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15548 GCC warning.
15549 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15550 Use offsetof, for simplicity.
15551
6fbe4984
PE
155522002-10-06 Paul Eggert <eggert@twinsun.com>
15553
15554 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15555 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 15556 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
15557 which was inadvertently undone by the 2002-09-30 patch.
15558 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15559 the same width as int.
15560
420f93c8
PE
155612002-10-04 Paul Eggert <eggert@twinsun.com>
15562
15563 Version 1.50.
15564
15565 * configure.ac (AC_INIT), NEWS: Increment version number.
15566
15567 * doc/bison.texinfo: Minor spelling, grammar, and white space
15568 fixes.
15569 (Symbols): Mention that any negative value returned from yylex
15570 signifies end-of-input. Warn about negative chars. Mention
15571 the portable Standard C character set.
15572
15573 The GNU coding standard says CFLAGS and YFLAGS are reserved
15574 for the installer to set.
15575 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15576 * src/Makefile.am (AM_CFLAGS): Likewise.
15577 (AM_YFLAGS): Renamed from YFLAGS.
15578
15579 Fix some MAX and MIN problems.
15580 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15581 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15582 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15583 * src/reader.c (reader): Use it.
15584
15585 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15586 POSIX 1003.1-2001 has removed fgrep.
15587
155882002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15589
15590 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15591 interpreted as signed.
15592 * lib/ebitset.c (ebitset_list): Fix bug.
15593
ff68026d
PE
155942002-10-01 Paul Eggert <eggert@twinsun.com>
15595
15596 More fixes for 64-bit hosts and large bitsets.
15597
15598 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15599 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15600 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15601 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15602 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15603 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15604 bitset_count_): Likewise.
15605 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15606 bitset_first, bitset_last): Likewise.
15607 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15608 bitset_stats_list_reverse, bitset_stats_size,
15609 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15610 Likewise.
15611 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15612 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15613 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15614 bitsetv_reflexive_transitive_closure): Likewise.
15615 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15616 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15617 Likewise.
15618 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15619 Likewise.
420f93c8 15620
ff68026d
PE
15621 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15622 Use size_t, not unsigned int, to count bytes.
15623 * lib/abitset.h (abitset_bytes): Likewise.
15624 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15625 Likewise.
15626 * lib/bitset.h (bitset_bytes): Likewise.
15627 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15628 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15629 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15630 * lib/ebitset.c (ebitset_bytes): Likewise.
15631 * lib/ebitset.h (ebitset_bytes): Likewise.
15632 * lib/lbitset.c (lbitset_bytes): Likewise.
15633 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 15634
ff68026d
PE
15635 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15636 abitset_subset_p, abitset_disjoint_p, abitset_and,
15637 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15638 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15639 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15640 abitset_or_and, abitset_or_and_cmp):
15641 Use bitset_windex instead of unsigned int.
15642 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15643 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15644 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15645 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15646 Likewise.
15647 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 15648
ff68026d
PE
15649 * lib/bitset.c (bitset_print):
15650 Use proper printf formats for widths of integer types.
15651 * lib/bitset_stats.c (bitset_percent_histogram_print,
15652 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15653 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15654 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15655 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 15656
ff68026d
PE
15657 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15658 BITSET_SIZE_MAX): New macros.
15659 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15660 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15661 to BITSET_WINDEX_MAX.
15662
15663 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15664 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15665 since we now return the bitset_bindex type (not int).
15666
15667 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15668 when computing sizes.
15669 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15670
15671 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15672 and avoid cast to unsigned.
15673
6aa452a6
AD
156742002-09-30 Akim Demaille <akim@epita.fr>
15675
15676 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15677 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15678 Updates from Michael Hayes.
15679
927f7817
AD
156802002-09-30 Art Haas <ahaas@neosoft.com>
15681
15682 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15683 invocations.
15684 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15685 defined.
15686
9738f41e
AD
156872002-09-27 Akim Demaille <akim@epita.fr>
15688
15689 Version 1.49c.
15690
a5c75d7f
AD
156912002-09-27 Akim Demaille <akim@epita.fr>
15692
15693 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15694 (Because of AC_LIBSOURCE).
15695
8280e179
AD
156962002-09-27 Akim Demaille <akim@epita.fr>
15697
15698 Playing with Autoscan.
15699
15700 * configure.ac: Remove the old LIBOBJ tweaks.
15701 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15702 * lib/strrchr.c: New.
15703 * lib/strtol.c: New, from the Coreutils 4.5.1.
15704
ae64af35
AD
157052002-09-27 Akim Demaille <akim@epita.fr>
15706
15707 Playing with Autoscan.
15708
15709 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15710 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15711 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15712 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15713 Coreutils 4.5.1.
15714
d1a1114f
AD
157152002-09-24 Akim Demaille <akim@epita.fr>
15716
15717 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15718 (Frequently Asked Questions, Parser Stack Overflow): New.
15719
b906441c
AD
157202002-09-13 Akim Demaille <akim@epita.fr>
15721
15722 Playing with autoscan.
15723
15724 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15725 * src/files.c (skeleton_find): Remove, unused.
15726 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15727 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15728
bd701811
AD
157292002-09-13 Akim Demaille <akim@epita.fr>
15730
15731 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15732 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15733
e0a13e7b
AD
157342002-09-13 Akim Demaille <akim@epita.fr>
15735
15736 * configure.ac: Require 2.54.
15737 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15738 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15739 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15740 Remove, provided by Autoconf macros.
15741
c97011bf
AD
157422002-09-12 Akim Demaille <akim@epita.fr>
15743
15744 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15745
d862b1be
AD
157462002-09-12 Akim Demaille <akim@epita.fr>
15747
15748 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15749 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15750 Reported by Martin Mokrejs.
15751
3d38c03a
AD
157522002-09-10 Akim Demaille <akim@epita.fr>
15753
15754 * src/parse-gram.y: Associate a human readable string to each
15755 token type.
15756 * tests/regression.at (Invalid inputs): Adjust.
15757
b6347355
AD
157582002-09-10 Gary V. Vaughan <gary@gnu.org>
15759
15760 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15761 with an Autoconf-2.5x style configure.ac.
15762
09ba4ab2
PE
157632002-09-06 Paul Eggert <eggert@twinsun.com>
15764
15765 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15766 exception applies only to yacc.c. This is a modification of a
15767 patch originally suggested by Akim Demaille.
15768
21846f69
AD
157692002-09-06 Akim Demaille <akim@epita.fr>
15770
09ba4ab2
PE
15771 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15772 here to...
15773 * data/yacc.c: here.
15774
21846f69
AD
15775 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15776 LocationType.
15777 (b4_ltype): Default to yy::Location from location.hh.
15778
c0ad8bf3
AD
157792002-09-04 Jim Meyering <jim@meyering.net>
15780
15781 * data/yacc.c: Guard the declaration of yytoknum also with
15782 `#ifdef YYPRINT', so it is declared only when used.
15783
3a93251e
AD
157842002-09-04 Akim Demaille <akim@epita.fr>
15785
15786 * configure.in: Rename as...
15787 * configure.ac: this.
15788 Bump to 1.49c.
15789
427c0dda
AD
157902002-09-04 Akim Demaille <akim@epita.fr>
15791
15792 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15793 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15794 translate maintainer only messages.
15795
6a254321
PE
157962002-08-12 Paul Eggert <eggert@twinsun.com>
15797
645e30d1
PE
15798 Version 1.49b.
15799
6a254321
PE
15800 * Makefile.am (SUBDIRS): Remove intl.
15801 (DISTCLEANFILES): Remove.
15802 * NEWS: Mention that GNU M4 is now required. Clarify what is
15803 meant by "larger grammars". Mention the pt_BR translation.
15804 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15805 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15806 Bump version from 0.11.2 to 0.11.5.
15807 (BISON_PREREQ_STAGE): Remove.
15808 (AM_GNU_GETTEXT): Use external gettext.
15809 (AC_OUTPUT): Remove intl/Makefile.
15810
15811 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15812
15813 * data/glr.c: Include string.h, for strlen.
15814 (yyreportParseError): Use size_t for yysize.
15815 (yy_yypstack): No longer nested inside yypstates, as nested
15816 functions are not portable. Do not assume size_t is the
15817 same width as int.
15818 (yypstates): Do not assume that ptrdiff_t is the same width
15819 as int, and similarly for yyposn and YYINDEX.
15820
15821 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15822
15823 * lib/Makefile.am (INCLUDES): Do not include from the intl
15824 directory, which has been removed.
15825 * src/Makefile.am (INCLUDES): Likewise.
15826
15827 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15828 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15829 New vars.
15830
15831 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15832 * tests/Makefile.am (EXTRA_DIST): Likewise.
15833
15834 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15835 Do not assume that bitset_windex is the same width as unsigned.
15836
15837 * lib/abitset.c (abitset_unused_clear): Do not assume that
15838 bitset_word is the same width as int.
15839 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15840 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15841 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15842 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15843 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15844
15845 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15846 portability to one's complement hosts!).
15847 * lib/ebitset.c (ebitset_op1): Likewise.
15848 * lib/lbitset.c (lbitset_op1): Likewise.
15849
15850 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15851 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15852 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15853 Sync with fileutils.
15854 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15855 lib/gettext.h: Sync with diffutils.
15856
15857 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15858 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15859
15860 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15861 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15862 check for void *.
15863
15864 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15865 size_t; the old version tried to do this but casted improperly.
15866 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15867 (bitset_test): Now returns int, not unsigned long.
15868
15869 * lib/bitset_stats.c: Include "gettext.h".
15870 (_): New macro.
15871 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15872 name locals "index", as it generates unnecessary warnings on some
15873 hosts that have an "index" function.
15874
15875 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15876 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15877 they need translation.
15878 * src/LR0.c (state_list_append, new_itemsets, get_state,
15879 append_states, generate_states): Likewise.
15880 * src/assoc.c (assoc_to_string): Likewise.
15881 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15882 * src/gram.c (grammar_dump): Likewise.
15883 * src/injections.c (injections_compute): Likewise.
15884 * src/lalr.c (lookaheads_print): Likewise.
15885 * src/relation.c (relation_transpose): Likewise.
15886 * src/scan-gram.l: Likewise.
15887 * src/tables.c (table_grow, pack_vector): Likewise.
15888
15889 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15890 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15891 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15892 * m4/mbstate_t.m4: Sync with fileutils.
15893 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15894
15895 * po/LINGUAS: Add pt_BR.
15896 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15897 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15898 lib/timevar.c.
15899 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15900 manual recommends.
15901 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15902
15903 * src/complain.c (strerror_r): Remove decl; not needed.
15904 (strerror): Use same pattern as ../lib/error.c.
15905
15906 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15907
15908 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15909
15910 * src/main.c (main): Cast result of bindtextdomain and textdomain
15911 to void, to avoid a GCC warning when --disable-nls is in effect.
15912
15913 * src/scan-gram.l: Use strings rather than escapes when possible,
15914 to minimize the number of warnings from xgettext.
15915 (handle_action_dollar, handle_action_at): Don't use isdigit,
15916 as it mishandles negative chars and it may not work as expected
15917 outside the C locale.
15918
15919 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15920 this is a GCC extension and is not portable to other compilers.
15921
15922 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15923 Do not include <ctype.h>; no longer needed.
15924 Do not include <malloc.h>; no longer needed (and generates
15925 warnings on OpenBSD 3.0).
15926
15927 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15928 it's not portable.
15929
15930 * tests/regression.at: Do not use 'cc -c input.c -o input';
15931 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15932
15933 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15934 exit status as failure, not just exit status 1. Sun C exits
15935 with status 2 sometimes.
15936
15937 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15938 Use it for the two large tests.
15939
c8f002c7
AD
159402002-08-02 Akim Demaille <akim@epita.fr>
15941
15942 * src/conflicts.c (conflicts_output): Don't output rules never
15943 reduced here, since anyway that computation doesn't work.
15944 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15945 (rule_useless_p, rule_never_reduced_p): New.
15946 (grammar_rules_partial_print): Use a filter instead of a range.
15947 Display the title only if needed.
15948 (grammar_rules_print): Adjust.
15949 (grammar_rules_never_reduced_report): New.
15950 * src/tables.c (action_row): Move the computation of rules never
15951 reduced to...
15952 (token_actions): here.
15953 * src/main.c (main): Make the parser before making the report, so
15954 that rules never reduced are computed.
15955 Call grammar_rules_never_reduced_report.
15956 * src/print.c (print_results): Report rules never reduced.
15957 * tests/conflicts.at, tests/reduce.at: Adjust.
15958
cd08e51e
AD
159592002-08-01 Akim Demaille <akim@epita.fr>
15960
15961 Instead of attaching lookaheads and duplicating the rules being
15962 reduced by a state, attach the lookaheads to the reductions.
15963
15964 * src/state.h (state_t): Remove the `lookaheads',
15965 `lookaheads_rule' member.
15966 (reductions_t): Add a `lookaheads' member.
15967 Use a regular array for the `rules'.
15968 * src/state.c (reductions_new): Initialize the lookaheads member
15969 to 0.
15970 (state_rule_lookaheads_print): Adjust.
15971 * src/state.h, src/state.c (state_reductions_find): New.
15972 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15973 (count_rr_conflicts): Adjust.
15974 * src/lalr.c (LArule): Remove.
15975 (add_lookback_edge): Adjust.
15976 (state_lookaheads_count): New.
15977 (states_lookaheads_initialize): Merge into...
15978 (initialize_LA): this.
15979 (lalr_free): Adjust.
15980 * src/main.c (main): Don't free nullable and derives too early: it
15981 is used by --verbose.
15982 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15983
bb0027a9
AD
159842002-08-01 Akim Demaille <akim@epita.fr>
15985
15986 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15987 `rule_number_t**'.
15988 (set_derives, free_derives): Rename as...
15989 (derives_compute, derives_free): this.
15990 Adjust all dependencies.
15991 * src/nullable.c (set_nullable, free_nullable): Rename as...
15992 (nullable_compute, nullable_free): these.
15993 (rule_list_t): Store rule_t *, not rule_number_t.
15994 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15995 pointers, instead of their numbers.
15996 * src/main.c (main): Call nullable_free, and derives_free earlier,
15997 as they were lo longer used.
15998
3325ddc4
AD
159992002-08-01 Akim Demaille <akim@epita.fr>
16000
16001 * lib/timevar.c (get_time): Include children time.
16002 * src/lalr.h (LA, LArule): Don't export them: used with the
16003 state_t.
16004 * src/lalr.c (LA, LArule): Static.
16005 * src/lalr.h, src/lalr.c (lalr_free): New.
16006 * src/main.c (main): Call it.
16007 * src/tables.c (pack_vector): Check whether loc is >= to the
16008 table_size, not >.
16009 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16010 (tables_generate): do it, since that's also it which allocates
16011 them.
16012 Don't free LA and LArule, main does.
16013
c6f1a33c
AD
160142002-07-31 Akim Demaille <akim@epita.fr>
16015
16016 Separate parser tables computation and output.
16017
16018 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16019 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16020 (yydefgoto, yydefact, high): Move to...
16021 * src/tables.h, src/tables.c: here.
16022 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16023 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16024 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16025 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16026 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16027 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16028 (action_row, save_row, token_actions, save_column, default_goto)
16029 (goto_actions, sort_actions, matching_state, pack_vector)
16030 (table_ninf_remap, pack_table, prepare_actions): Move to...
16031 * src/tables.c: here.
16032 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16033 * src/output.c (token_actions, output_base, output_conflicts)
16034 (output_check): Merge into...
16035 (prepare_actions): this.
16036 (actions_output): Rename as...
16037 (user_actions_output): this.
16038 * src/main.c (main): Call tables_generate and tables_free.
16039
1509d42f
AD
160402002-07-31 Akim Demaille <akim@epita.fr>
16041
16042 Steal GCC's --time-report support.
16043
16044 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16045 stolen/adjusted from GCC.
16046 * m4/stage.m4: Remove time related checks.
16047 * m4/timevar.m4: New.
16048 * configure.in: Adjust.
16049 * src/system.h: Adjust to using timevar.h.
16050 * src/getargs.h, src/getargs.c: Support trace_time for
16051 --trace=time.
16052 * src/main.c (stage): Remove.
16053 (main): Replace `stage' invocations with timevar calls.
16054 * src/output.c: Insert pertinent timevar calls.
16055
273a74fa
AD
160562002-07-31 Akim Demaille <akim@epita.fr>
16057
16058 Let --trace have arguments.
16059
16060 * src/getargs.h (enum trace_e): New.
16061 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16062 (long_options, short_options): --trace/-T takes an optional
16063 argument.
16064 Change all the uses of trace_flag to reflect the new flags.
16065 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16066
16067 Strengthen `stage' portability.
16068
16069 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16070 * configure.in: Use it.
16071 Don't check for malloc.h and sys/times.h.
16072 * src/system.h: Include them when appropriate.
16073 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16074 times and struct tms are available.
16075
217598da
AD
160762002-07-30 Akim Demaille <akim@epita.fr>
16077
16078 In verbose parse error message, don't report `error' as an
16079 expected token.
16080 * tests/actions.at (Printers and Destructors): Adjust.
16081 * tests/calc.at (Calculator $1): Adjust.
16082 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16083 error message, do not report the parser accepts the error token in
16084 that state.
16085
52489d44
AD
160862002-07-30 Akim Demaille <akim@epita.fr>
16087
16088 Normalize conflict related messages.
16089
16090 * src/complain.h, src/complain.c (warn, complain): New.
16091 * src/conflicts.c (conflicts_print): Use them.
16092 (conflict_report_yacc): New, extracted from...
16093 (conflicts_print): here.
16094 * tests/conflicts.at, tests/existing.at: Adjust.
16095
e8832397
AD
160962002-07-30 Akim Demaille <akim@epita.fr>
16097
16098 Report rules which are never reduced by the parser: those hidden
16099 by conflicts.
16100
16101 * src/LR0.c (save_reductions): Don't make the final state too
16102 different: save its reduction (accept) instead of having a state
16103 without any action (no shift or goto, no reduce).
16104 Note: the final state is now a ``regular'' state, i.e., the
16105 parsers now contain `reduce 0' as default reduction.
16106 Nevertheless, since they decide to `accept' when yystate =
16107 final_state, they still will not reduce rule 0.
16108 * src/print.c (print_actions, print_reduction): Adjust.
16109 * src/output.c (action_row): Track reduced rules.
16110 (token_actions): Report rules never reduced.
16111 * tests/conflicts.at, tests/regression.at: Adjust.
16112
caf23d24
AD
161132002-07-30 Akim Demaille <akim@epita.fr>
16114
16115 `stage' was accidently included in a previous patch.
16116 Initiate its autoconfiscation.
16117
16118 * configure.in: Look for malloc.h and sys/times.h.
16119 * src/main.c (stage): Adjust.
16120 Report only when trace_flag.
16121
640748ee
AD
161222002-07-29 Akim Demaille <akim@epita.fr>
16123
16124 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16125 state_number_t.
16126 (errs_t): symbol_t*, not symbol_number_t.
16127 (reductions_t): rule_t*, not rule_number_t.
16128 (FOR_EACH_SHIFT): New.
16129 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16130 * src/print.c, src/print_graph.c: Adjust.
16131
88bce5a2
AD
161322002-07-29 Akim Demaille <akim@epita.fr>
16133
16134 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16135
16136 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16137 (endtoken, accept): these.
16138 * src/reader.c (reader): Set endtoken's default tag to "$end".
16139 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16140 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16141 Adjust.
16142
1bfb97db
AD
161432002-07-29 Akim Demaille <akim@epita.fr>
16144
16145 * src/reduce.c (reduce_grammar): When the language is empty,
16146 complain about the start symbol, not the axiom.
16147 Use its location.
16148 * tests/reduce.at (Empty Language): New.
16149
fc5734fe
AD
161502002-07-26 Akim Demaille <akim@epita.fr>
16151
16152 * src/reader.h, src/reader.c (gram_error): ... can't get
16153 yycontrol without making too strong assumptions on the parser
16154 itself.
16155 * src/output.c (prepare_tokens): Use the real 0th value of
16156 token_translations instead of `0'.
16157 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16158 visible here.
16159 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16160 for the time being: %locations ought to provide it to yyerror.
16161
3650b4b8
AD
161622002-07-25 Akim Demaille <akim@epita.fr>
16163
16164 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16165 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16166 * tests/regression.at (Web2c Actions): Adjust.
16167
4b3d3a8e
AD
161682002-07-25 Akim Demaille <akim@epita.fr>
16169
16170 Stop storing rules from 1 to nrules + 1.
16171
16172 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16173 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16174 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16175 Iterate from 0 to nrules.
16176 Use rule_number_as_item_number and item_number_as_rule_number.
16177 Adjust to `derive' now containing possibly 0.
16178 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16179 Handle the `- 1' part in rule numbers from/to item numbers.
16180 * src/conflicts.c (log_resolution): Fix the message which reversed
16181 shift and reduce.
16182 * src/output.c (action_row): Initialize default_rule to -1.
16183 (token_actions): Adjust.
16184 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16185 expected output.
16186 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16187
4a2a22f4
AD
161882002-07-25 Akim Demaille <akim@epita.fr>
16189
16190 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16191 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16192 (b4_c_knr_arg_decl): New.
16193 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16194 yyreport_parse_error.
16195
b8df3223
AD
161962002-07-25 Akim Demaille <akim@epita.fr>
16197
16198 * data/yacc.c (yyreport_parse_error): New, extracted from...
16199 (yyparse): here.
16200 (yydestruct, yysymprint): Move above yyparse.
16201 Be K&R compliant.
16202
a762e609
AD
162032002-07-25 Akim Demaille <akim@epita.fr>
16204
16205 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16206 replace...
16207 (b4_sint_type, b4_uint_type): these.
16208 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16209 * tests/regression.at (Web2c Actions): Adjust.
16210
12b0043a
AD
162112002-07-25 Akim Demaille <akim@epita.fr>
16212
16213 * src/gram.h (TIEM_NUMBER_MAX): New.
16214 (item_number_of_rule_number, rule_number_of_item_number): Rename
16215 as...
16216 (rule_number_as_item_number, item_number_as_rule_number): these.
16217 Adjust dependencies.
16218 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16219 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16220 (symbol_number_to_vector_number): New.
16221 (order): Of vector_number_t* type.
16222 (base_t, BASE_MAX, BASE_MIN): New.
16223 (froms, tos, width, pos, check): Of base_t type.
16224 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16225 (actrow): Of action_number_t type.
16226 (conflrow): Of unsigned int type.
16227 (table_ninf, base_ninf): New.
16228 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16229 (muscle_insert_int_table, muscle_insert_base_table)
16230 (muscle_insert_rule_number_table): New.
16231 (prepare_tokens): Output `toknum' as int_table.
16232 (action_row): Returns a rule_number_t.
16233 Use ACTION_MIN, not SHRT_MIN.
16234 (token_actions): yydefact is rule_number_t*.
16235 (table_ninf_remap): New.
16236 (pack_table): Use it for `base' and `table'.
16237 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16238 replaced with...
16239 (YYPACT_NINF, YYTABLE_NINF): these.
16240 (yypact, yytable): Compute their types instead of hard-coded
16241 `short'.
16242 * tests/regression.at (Web2c Actions): Adjust.
16243
5dde258a
AD
162442002-07-19 Akim Demaille <akim@epita.fr>
16245
16246 * src/scan-gram.l (id): Can start with an underscore.
16247
a945ec39
AD
162482002-07-16 Akim Demaille <akim@epita.fr>
16249
16250 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16251 Adjust all former `associativity' dependencies.
16252 * src/symtab.c (symbol_new): Default associativity is `undef', not
16253 `right'.
16254 (symbol_check_alias_consistence): Adjust.
16255
fae437e8
AD
162562002-07-09 Akim Demaille <akim@epita.fr>
16257
16258 * doc/bison.texinfo: Properly set the ``header'' part.
16259 Use @dircategory ``GNU programming tools'' as per Texinfo's
16260 documentation.
16261 Use @copying.
16262
1a715ef2
AD
162632002-07-09 Akim Demaille <akim@epita.fr>
16264
16265 * lib/quotearg.h: Protect against multiple inclusions.
16266 * src/location.h (location_t): Add a `file' member.
16267 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16268 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16269 `error_one_per_line' support.
16270
a5d50994
AD
162712002-07-09 Akim Demaille <akim@epita.fr>
16272
16273 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16274 * src/reader.c (lineno): Remove.
16275 Adjust all dependencies.
16276 (get_merge_function): Take a location and use complain_at.
16277 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16278 * tests/regression.at (Invalid inputs, Mixing %token styles):
16279 Adjust.
16280
b275314e
AD
162812002-07-09 Akim Demaille <akim@epita.fr>
16282
16283 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16284 recovery rule, and forbid extensions when --yacc.
16285 (gram_error): Use complain_at.
16286 * src/reader.c (reader): Exit if there were parse errors.
16287
865b9df1
AD
162882002-07-09 Akim Demaille <akim@epita.fr>
16289
16290 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16291 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16292 Reported by R Blake <blakers@mac.com>.
16293
c76e14da
AD
162942002-07-09 Akim Demaille <akim@epita.fr>
16295
16296 * data/yacc.c: Output the copyright notive in the header.
16297
7db2ed2d
AD
162982002-07-03 Akim Demaille <akim@epita.fr>
16299
16300 * src/output.c (froms, tos): Are state_number_t.
16301 (save_column): sp, sp1, and sp2 are state_number_t.
16302 (prepare): Rename `final' as `final_state_number', `nnts' as
16303 `nterms_number', `nrules' as `rules_number', `nstates' as
16304 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16305 unused.
16306 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16307 * data/lalr1.cc (nsym_): Remove, unused.
16308
e68e0410
AD
163092002-07-03 Akim Demaille <akim@epita.fr>
16310
16311 * src/lalr.h, src/lalr.c (goto_number_t): New.
16312 * src/lalr.c (goto_list_t): New.
16313 Propagate them.
16314 * src/nullable.c (rule_list_t): New.
16315 Propagate.
16316 * src/types.h: Remove.
16317
e1a4f3a4
AD
163182002-07-03 Akim Demaille <akim@epita.fr>
16319
16320 * src/closure.c (print_fderives): Use rule_rhs_print.
16321 * src/derives.c (print_derives): Use rule_rhs_print.
16322 (rule_list_t): New, replaces `shorts'.
16323 (set_derives): Add comments.
16324 * tests/sets.at (Nullable, Firsts): Adjust.
16325
536545f3
AD
163262002-07-03 Akim Demaille <akim@epita.fr>
16327
16328 * src/output.c (prepare_actions): Free `tally' and `width'.
16329 (prepare_actions): Allocate and free `order'.
16330 * src/symtab.c (symbols_free): Free `symbols'.
16331 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16332 * src/output.c (m4_invoke): Move to...
16333 * src/scan-skel.l: here.
16334 (<<EOF>>): Close yyout, and free its name.
16335
8b752b00
AD
163362002-07-03 Akim Demaille <akim@epita.fr>
16337
16338 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16339
16340 * src/LR0.c (new_state): Merge into...
16341 (state_list_append): this.
16342 (new_states): Merge into...
16343 (generate_states): here.
16344 (set_states): Don't ensure a proper `errs' state member here, do it...
16345 * src/conflicts.c (conflicts_solve): here.
16346 * src/state.h, src/state.c: Comment changes.
16347 (state_t): Rename member `shifts' as `transitions'.
16348 Adjust all dependencies.
16349 (errs_new): For consistency, also take the values as argument.
16350 (errs_dup): Remove.
16351 (state_errs_set): New.
16352 (state_reductions_set, state_transitions_set): Assert that no
16353 previous value was assigned.
16354 (state_free): New.
16355 (states_free): Use it.
16356 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16357 temporary storage: use `errs' and `nerrs' as elsewhere.
16358 (set_conflicts): Allocate and free this `errs'.
16359
613f5e1a
AD
163602002-07-02 Akim Demaille <akim@epita.fr>
16361
16362 * lib/libiberty.h: New.
16363 * lib: Update the bitset implementation from upstream.
16364 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16365 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16366 * src/main.c: Adjust bitset stats calls.
16367
26e0cadc
PE
163682002-07-01 Paul Eggert <eggert@twinsun.com>
16369
16370 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16371 char, so that negative chars don't collide with $.
16372
1154cced
AD
163732002-06-30 Akim Demaille <akim@epita.fr>
16374
16375 Have the GLR tests be `warning' checked, and fix the warnings.
16376
16377 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16378 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16379 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16380 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16381 (yyaddDeferredAction): static.
16382 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16383 (yyreportParseError): yyprefix is const.
16384 yytokenp is used only when verbose.
16385 (yy__GNUC__): Replace with __GNUC__.
16386 (yypdumpstack): yyi is size_t.
16387 (yypreference): Un-yy local variables and arguments, to avoid
16388 clashes with `yyr1'. Anyway, we are not in the user name space.
16389 (yytname_size): be an int, as is compared with ints.
16390 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16391 Use them.
16392 * tests/cxx-gram.at: Use quotation to protect $1.
16393 Use AT_COMPILE to enable warnings hunts.
16394 Prototype yylex and yyerror.
16395 `Use' argc.
16396 Include `string.h', not `strings.h'.
16397 Produce and prototype stmtMerge only when used.
16398 yylex takes a location.
16399
97650f4e
AD
164002002-06-30 Akim Demaille <akim@epita.fr>
16401
16402 We spend a lot of time in quotearg, in particular when --verbose.
16403
16404 * src/symtab.c (symbol_get): Store a quoted version of the key.
16405 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16406 Adjust all callers.
16407
d2576365
AD
164082002-06-30 Akim Demaille <akim@epita.fr>
16409
16410 * src/state.h (reductions_t): Rename member `nreds' as num.
16411 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16412 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16413
ccaf65bc
AD
164142002-06-30 Akim Demaille <akim@epita.fr>
16415
16416 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16417 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16418 (shifts_to): Rename as...
16419 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16420 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16421 (TRANSITION_IS_DISABLED, transitions_to): these.
16422
87675353
AD
164232002-06-30 Akim Demaille <akim@epita.fr>
16424
16425 * src/print.c (print_shifts, print_gotos): Merge into...
16426 (print_transitions): this.
16427 (print_transitions, print_errs, print_reductions): Align the
16428 lookaheads columns.
16429 (print_core, print_transitions, print_errs, print_state,
16430 print_grammar): Output empty lines separator before, not after.
16431 (state_default_rule_compute): Rename as...
16432 (state_default_rule): this.
16433 * tests/conflicts.at (Defaulted Conflicted Reduction),
16434 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16435 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16436
ce4ccb4b
AD
164372002-06-30 Akim Demaille <akim@epita.fr>
16438
16439 Display items as we display rules.
16440
16441 * src/gram.h, src/gram.c (rule_lhs_print): New.
16442 * src/gram.c (grammar_rules_partial_print): Use it.
16443 * src/print.c (print_core): Likewise.
16444 * tests/conflicts.at (Defaulted Conflicted Reduction),
16445 (Unresolved SR Conflicts): Adjust.
16446 (Unresolved SR Conflicts): Adjust and rename as...
16447 (Resolved SR Conflicts): this, as was meant.
16448 * tests/regression.at (Web2c Report): Adjust.
16449
bc933ef1
AD
164502002-06-30 Akim Demaille <akim@epita.fr>
16451
16452 * src/print.c (state_default_rule_compute): New, extracted from...
16453 (print_reductions): here.
16454 Pessimize, but clarify the code.
16455 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16456
53d4308d
AD
164572002-06-30 Akim Demaille <akim@epita.fr>
16458
16459 * src/output.c (action_row): Let default_rule be always a rule
16460 number.
16461
574fb2d5
AD
164622002-06-30 Akim Demaille <akim@epita.fr>
16463
16464 * src/closure.c (print_firsts, print_fderives, closure):
16465 Use BITSET_EXECUTE.
16466 * src/lalr.c (lookaheads_print): Likewise.
16467 * src/state.c (state_rule_lookaheads_print): Likewise.
16468 * src/print_graph.c (print_core): Likewise.
16469 * src/print.c (print_reductions): Likewise.
16470 * src/output.c (action_row): Likewise.
16471 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16472
05811fd7
AD
164732002-06-30 Akim Demaille <akim@epita.fr>
16474
16475 * src/print_graph.c: Use report_flag.
16476
0e4d5753
AD
164772002-06-30 Akim Demaille <akim@epita.fr>
16478
16479 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16480 to...
16481 * src/relation.h, src/relation.c (traverse, relation_digraph)
16482 (relation_print, relation_transpose): New.
16483
24c7d800
AD
164842002-06-30 Akim Demaille <akim@epita.fr>
16485
16486 * src/state.h, src/state.c (shifts_to): New.
16487 * src/lalr.c (build_relations): Use it.
16488
9222837b
AD
164892002-06-30 Akim Demaille <akim@epita.fr>
16490
16491 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16492 (item_number_of_rule_number, rule_number_of_item_number): New.
16493 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16494 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16495 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16496 Propagate their use.
16497 Much remains to be done, in particular wrt `shorts' from types.h.
16498
260008e5
AD
164992002-06-30 Akim Demaille <akim@epita.fr>
16500
16501 * src/symtab.c (symbol_new): Initialize the `printer' member.
16502
8a731ca8
AD
165032002-06-30 Akim Demaille <akim@epita.fr>
16504
16505 * src/LR0.c (save_reductions): Remove, replaced by...
16506 * src/state.h, src/state.c (state_reductions_set): New.
16507 (reductions, errs): Rename as...
16508 (reductions_t, errs_t): these.
16509 Adjust all dependencies.
16510
32e1e0a4
AD
165112002-06-30 Akim Demaille <akim@epita.fr>
16512
16513 * src/LR0.c (state_list_t, state_list_append): New.
16514 (first_state, last_state): Now symbol_list_t.
16515 (this_state): Remove.
16516 (new_itemsets, append_states, save_reductions): Take a state_t as
16517 argument.
16518 (set_states, generate_states): Adjust.
16519 (save_shifts): Remove, replaced by...
16520 * src/state.h, src/state.c (state_shifts_set): New.
16521 (shifts): Rename as...
16522 (shifts_t): this.
16523 Adjust all dependencies.
16524 * src/state.h (state_t): Remove the `next' member.
16525
e5fb6710
AD
165262002-06-30 Akim Demaille <akim@epita.fr>
16527
16528 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16529 escaped in slot 0.
16530
c7ca99d4
AD
165312002-06-30 Akim Demaille <akim@epita.fr>
16532
16533 Use hash.h for the state hash table.
16534
16535 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16536 (allocate_storage): Use state_hash_new.
16537 (free_storage): Use state_hash_free.
16538 (new_state, get_state): Adjust.
16539 * src/lalr.h, src/lalr.c (states): Move to...
16540 * src/states.h (state_t): Remove the `link' member, no longer
16541 used.
16542 * src/states.h, src/states.c: here.
16543 (state_hash_new, state_hash_free, state_hash_lookup)
16544 (state_hash_insert, states_free): New.
16545 * src/states.c (state_table, state_compare, state_hash): New.
16546 * src/output.c (output_actions): Do not free states now, since we
16547 still need to know the final_state number in `prepare', called
16548 afterwards. Do it...
16549 * src/main.c (main): here: call states_free after `output'.
16550
df0e7316
AD
165512002-06-30 Akim Demaille <akim@epita.fr>
16552
16553 * src/state.h, src/state.c (state_new): New, extracted from...
16554 * src/LR0.c (new_state): here.
16555 * src/state.h (STATE_ALLOC): Move to...
16556 * src/state.c: here.
16557 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16558 * src/state.h, src/state.c: here.
16559
39f41916
AD
165602002-06-30 Akim Demaille <akim@epita.fr>
16561
16562 * src/reader.c (gensym): Rename as...
16563 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16564 (getsym): Rename as...
16565 (symbol_get): this.
16566
d57650a5
AD
165672002-06-30 Akim Demaille <akim@epita.fr>
16568
16569 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16570 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16571 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16572 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16573
5a08f1ce
AD
165742002-06-30 Akim Demaille <akim@epita.fr>
16575
16576 Make the test suite pass with warnings checked.
16577
16578 * tests/actions.at (Printers and Destructors): Improve.
16579 Avoid unsigned vs. signed issues.
16580 * tests/calc.at: Don't exercise the scanner here, do it...
16581 * tests/input.at (Torturing the Scanner): here.
16582
720623af
PH
165832002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16584
88e7e941 16585 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
16586 reorganize first lines parallel to yacc.c.
16587
fb8135fa
AD
165882002-06-28 Akim Demaille <akim@epita.fr>
16589
16590 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16591 (b4_token_enum, b4_token_defines): New, factored from...
16592 * data/lalr1.cc, data/yacc.c, glr.c: here.
16593
41442480
AD
165942002-06-28 Akim Demaille <akim@epita.fr>
16595
16596 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16597 unused variables.
16598 * src/output.c (merger_output): static.
16599
e0e5bf84
AD
166002002-06-28 Akim Demaille <akim@epita.fr>
16601
ba0fe3c7 16602 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
16603 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16604 pacify GCC.
16605 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 16606
676385e2
PH
166072002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16608
16609 Accumulated changelog for new GLR parsing features.
16610
6a254321 16611 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
16612 conflicts_total_count.
16613 * src/conflicts.h: Ditto.
16614 * src/output.c (token_actions): Use the new name.
16615 (output_conflicts): Change conflp => conflict_list_heads, and
16616 confl => conflict_list for better readability.
16617 * data/glr.c: Use the new names.
16618 * NEWS: Add self to GLR announcement.
e0e5bf84 16619
676385e2
PH
16620 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16621
16622 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16623 Akim Demaille.
16624
16625 * data/bison.glr: Change name to glr.c
16626 * data/glr.c: Renamed from bison.glr.
16627 * data/Makefile.am: Add glr.c
e0e5bf84
AD
16628
16629 * src/getargs.c:
16630
676385e2 16631 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 16632 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 16633
676385e2
PH
16634 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16635
16636 * data/bison.glr: Be sure to restore the
16637 current #line when returning to the skeleton contents after having
16638 exposed the input file's #line.
16639
16640 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16641
16642 * data/bison.glr: Bring up to date with changes to bison.simple.
16643
16644 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16645
16646 * data/bison.glr: Correct definitions that use b4_prefix.
16647 Various reformatting.
16648 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16649 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16650 yytokenp argument; now part of stack.
16651 (yychar): Define to behave as documented.
16652 (yyclearin): Ditto.
e0e5bf84 16653
676385e2
PH
16654 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16655
16656 * src/reader.h: Add declaration for free_merger_functions.
16657
16658 * src/reader.c (merge_functions): New variable.
16659 (get_merge_function): New function.
16660 (free_merger_functions): New function.
16661 (readgram): Check for %prec that is not followed by a symbol.
16662 Handle %dprec and %merge declarations.
16663 (packgram): Initialize dprec and merger fields in rules array.
16664
16665 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16666 conflict_list_cnt, conflict_list_free): New variables.
16667 (table_grow): Also grow conflict_table.
e0e5bf84 16668 (prepare_rules): Output dprec and merger tables.
676385e2 16669 (conflict_row): New function.
e0e5bf84 16670 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
16671 default reduction in conflicted states for GLR parser so that there
16672 are spaces for the conflict lists.
16673 (save_row): Also save conflict information.
16674 (token_actions): Allocate conflict list.
16675 (merger_output): New function.
16676 (pack_vector): Pack conflict table, too.
16677 (output_conflicts): New function to output yyconflp and yyconfl.
16678 (output_check): Allocate conflict_tos.
16679 (output_actions): Output conflict tables, also.
16680 (output_skeleton): Output b4_mergers definition.
16681 (prepare): Output b4_max_rhs_length definition.
16682 Use 'bison.glr' as default skeleton for GLR parsers.
16683
16684 * src/gram.c (glr_parser): New flag.
16685 (grammar_free): Call free_merger_functions.
16686
16687 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16688 all pairs of conflicting reductions, rather than just all tokens
16689 causing conflicts. Needed to size conflict tables.
e0e5bf84 16690 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
16691 interface.
16692 (conflicts_print): Ditto.
16693 (count_total_conflicts): New function.
16694
16695 * src/reader.h (merger_list): New type.
16696 (merge_functions): New variable.
16697
16698 * src/lex.h (tok_dprec, tok_merge): New token types.
16699
16700 * src/gram.h (rule_s): Add dprec and merger fields.
16701 (glr_parser): New flag.
16702
16703 * src/conflicts.h (count_total_conflicts): New function.
16704
16705 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16706
16707 * doc/bison.texinfo (Generalized LR Parsing): New section.
16708 (GLR Parsers): New section.
16709 (Language and Grammar): Mention GLR parsing.
16710 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16711 Correct typo ("tge" -> "the").
16712
16713 * data/bison.glr: New skeleton for GLR parsing.
16714
16715 * tests/cxx-gram.at: New tests for GLR parsing.
16716
16717 * tests/testsuite.at: Include cxx-gram.at.
16718
16719 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 16720
676385e2
PH
16721 * src/parse-gram.y:
16722
16723 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16724
16725 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 16726
b5480d74 167272002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
16728
16729 * src/options.h, src/options.c: Remove.
16730 * src/getargs.c (short_options, long_options): New.
16731
60491a94
AD
167322002-06-27 Akim Demaille <akim@epita.fr>
16733
16734 * data/bison.simple, data/bison.c++: Rename as...
16735 * data/yacc.c, data/lalr1.cc: these.
16736 * doc/bison.texinfo (Environment Variables): Remove.
16737
9be0c25b
AD
167382002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16739
16740 * src/getargs.c (report_argmatch): Initialize strtok().
16741
1ae72863
AD
167422002-06-20 Akim Demaille <akim@epita.fr>
16743
16744 * data/bison.simple (b4_symbol_actions): New, replaces...
16745 (b4_symbol_destructor, b4_symbol_printer): these.
16746 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16747 user token numbers.
16748
87542d29
AD
167492002-06-20 Akim Demaille <akim@epita.fr>
16750
16751 * data/bison.simple (yydestructor): Rename as...
16752 (yydestruct): this.
16753
1a31ed21
AD
167542002-06-20 Akim Demaille <akim@epita.fr>
16755
16756 * src/symtab.h, src/symtab.c (symbol_type_set)
16757 (symbol_destructor_set, symbol_precedence_set): The location is
16758 the last argument.
16759 Adjust all callers.
16760
e776192e
AD
167612002-06-20 Akim Demaille <akim@epita.fr>
16762
16763 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16764 internals.
16765 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16766 Takes a location.
16767 * src/symtab.h, src/symtab.c (symbol_class_set)
16768 (symbol_user_token_number_set): Likewise.
16769 Adjust all callers.
16770 Promote complain_at.
16771 * tests/input.at (Type Clashes): Adjust.
16772
5c1180b3
AD
167732002-06-20 Akim Demaille <akim@epita.fr>
16774
16775 * data/bison.simple (YYLEX): Fix the declaration when
16776 %pure-parser.
16777
e3170060
AD
167782002-06-20 Akim Demaille <akim@epita.fr>
16779
16780 * data/bison.simple (yysymprint): Don't print the token number,
16781 just its name.
16782 * tests/actions.at (Destructors): Rename as...
16783 (Printers and Destructors): this.
16784 Also exercise %printer.
16785
253862fd
AD
167862002-06-20 Akim Demaille <akim@epita.fr>
16787
16788 * data/bison.simple (YYDSYMPRINT): New.
16789 Use it to remove many of the #if YYDEBUG/if (yydebug).
16790
366eea36
AD
167912002-06-20 Akim Demaille <akim@epita.fr>
16792
16793 * src/symtab.h, src/symtab.c (symbol_t): printer and
16794 printer_location are new members.
16795 (symbol_printer_set): New.
16796 * src/parse-gram.y (PERCENT_PRINTER): New token.
16797 Handle its associated rule.
16798 * src/scan-gram.l: Adjust.
16799 (handle_destructor_at, handle_destructor_dollar): Rename as...
16800 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16801 * src/output.c (symbol_printers_output): New.
16802 (output_skeleton): Call it.
16803 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16804 since there are already many grammar files with a user `yyprint'.
16805 Replace the calls to YYPRINT to calls to yysymprint.
16806 * tests/calc.at: Adjust.
16807 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16808 taking advantage of parser very internal details (stack size!).
16809
4f25ebb0
AD
168102002-06-20 Akim Demaille <akim@epita.fr>
16811
16812 * src/scan-gram.l: Complete the scanner with the missing patterns
16813 to pacify Flex.
16814 Use `quote' and `symbol_tag_get' where appropriate.
16815
93b68a0e
AD
168162002-06-19 Akim Demaille <akim@epita.fr>
16817
16818 * tests/actions.at (Destructors): Augment to test locations.
16819 * data/bison.simple (yydestructor): Pass it the current location
16820 if locations are enabled.
16821 Prototype only when __STDC__ or C++.
16822 Change the argument names to move into the yy name space: there is
16823 user code here.
16824
58612f1d
AD
168252002-06-19 Akim Demaille <akim@epita.fr>
16826
74310291
AD
16827 * data/bison.simple (b4_pure_if): New.
16828 Use it instead of #ifdef YYPURE.
16829
168302002-06-19 Akim Demaille <akim@epita.fr>
16831
16832 * data/bison.simple (b4_location_if): New.
58612f1d
AD
16833 Use it instead of #ifdef YYLSP_NEEDED.
16834
f25bfb75
AD
168352002-06-19 Akim Demaille <akim@epita.fr>
16836
16837 Prepare @$ in %destructor, but currently don't bind it in the
16838 skeleton, as %location use is not cleaned up yet.
16839
16840 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16841 (handle_action_at): New.
16842 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16843 a braced_code_t and a location as additional arguments.
16844 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16845 unquote one when outputting `b4_dollar_dollar'.
16846 Adjust callers.
16847 * data/bison.simple (b4_eval): Remove.
16848 (b4_symbol_destructor): Adjust.
16849 * tests/input.at (Invalid @n): Adjust.
16850
c732d2c6
AD
168512002-06-19 Zack Weinberg <zack@codesourcery.com>
16852
16853 * doc/bison.texinfo: Document ability to have multiple
16854 prologue sections.
16855
8c165d89
AD
168562002-06-18 Akim Demaille <akim@epita.fr>
16857
16858 * src/files.c (compute_base_names): When computing the output file
16859 names from the input file name, strip the directory part.
16860
ca98bf57
AD
168612002-06-18 Akim Demaille <akim@epita.fr>
16862
16863 * data/bison.simple.new: Comment changes.
16864 Reported by Andreas Schwab.
16865
0bfb02ff
AD
168662002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16867
16868 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16869 there are no `label `yyoverflowlab' defined but not used' warnings
16870 when yyoverflow is defined.
16871
24c0aad7
AD
168722002-06-18 Akim Demaille <akim@epita.fr>
16873
16874 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16875 new member.
16876 (symbol_destructor_set): Adjust.
16877 * src/output.c (symbol_destructors_output): Output the destructor
16878 locations.
16879 Output the symbol name.
16880 * data/bison.simple (b4_symbol_destructor): Adjust.
16881
5719c109
AD
168822002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16883 and Akim Demaille <akim@epita.fr>
16884
16885 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16886 what's left on the stack when the error recovery hits EOF.
16887 * tests/actions.at (Destructors): Complete to exercise this case.
16888
9280d3ef
AD
168892002-06-17 Akim Demaille <akim@epita.fr>
16890
16891 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16892 arguments is really empty, not only equal to `[]'.
16893 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16894 member.
16895 (symbol_destructor_set): New.
16896 * src/output.c (symbol_destructors_output): New.
16897 * src/reader.h (brace_code_t, current_braced_code): New.
16898 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16899 (handle_dollar): Rename as...
16900 (handle_action_dollar): this.
16901 (handle_destructor_dollar): New.
16902 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16903 (grammar_declaration): Use it.
16904 * data/bison.simple (yystos): Is always defined.
16905 (yydestructor): New.
16906 * tests/actions.at (Destructors): New.
16907 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16908
dafdc66f
AD
169092002-06-17 Akim Demaille <akim@epita.fr>
16910
16911 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16912 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16913 rule_length only when needed.
16914 * src/output.c (actions_output, token_definitions_output): Output
16915 the full M4 block.
16916 * src/symtab.c: Don't access directly to the symbol tag, use
16917 symbol_tag_get.
16918 * src/parse-gram.y: Use symbol_list_free.
16919
56c47203
AD
169202002-06-17 Akim Demaille <akim@epita.fr>
16921
16922 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16923 (symbol_list_prepend, get_type_name): Move to...
16924 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16925 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16926 Adjust all callers.
16927 (symbol_list_free): New.
16928 * src/scan-gram.l (handle_dollar): Takes a location.
16929 * tests/input.at (Invalid $n): Adjust.
16930
1e0bab92
AD
169312002-06-17 Akim Demaille <akim@epita.fr>
16932
16933 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16934 (symbol_list_prepend): New.
16935 * src/parse-gram.y (%union): `list' is a new member.
16936 (symbols.1): New, replaces...
16937 (terms_to_prec.1, nterms_to_type.1): these.
16938 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16939 Take a location as additional argument.
16940 Adjust all callers.
16941
04e60654
AD
169422002-06-15 Akim Demaille <akim@epita.fr>
16943
16944 * src/parse-gram.y: Move %token in the declaration section so that
16945 we don't depend upon CVS Bison.
16946
10e5b8bd
AD
169472002-06-15 Akim Demaille <akim@epita.fr>
16948
16949 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16950 * src/print.c (print_core): Use it.
16951
9801d40c
AD
169522002-06-15 Akim Demaille <akim@epita.fr>
16953
16954 * src/conflicts.c (log_resolution): Accept the rule involved in
16955 the sr conflicts instead of the lookahead number that points to
16956 that rule.
16957 (flush_reduce): Accept the current lookahead vector as argument,
16958 instead of the index in LA.
16959 (resolve_sr_conflict): Accept the current number of lookahead
16960 bitset to consider for the STATE, instead of the index in LA.
16961 (set_conflicts): Adjust.
16962 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16963
c0263492
AD
169642002-06-15 Akim Demaille <akim@epita.fr>
16965
16966 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16967 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16968 Adjust all dependencies.
16969 * src/lalr.c (initialize_lookaheads): Split into...
16970 (states_lookaheads_count, states_lookaheads_initialize): these.
16971 (lalr): Adjust.
16972
9757c359
AD
169732002-06-15 Akim Demaille <akim@epita.fr>
16974
16975 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16976 out of...
16977 (grammar_rules_print): here.
16978 * src/reduce.c (reduce_output): Use it.
16979 * tests/reduce.at (Useless Rules, Reduced Automaton)
16980 (Underivable Rules): Adjust.
16981
6b98e4b5
AD
169822002-06-15 Akim Demaille <akim@epita.fr>
16983
16984 Copy BYacc's nice way to report the grammar.
16985
16986 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16987 New.
16988 Don't print the rules' location, it is confusing and useless.
16989 (rule_print): Use grammar_rhs_print.
16990 * src/print.c (print_grammar): Use grammar_rules_print.
16991
6b98e4b5
AD
169922002-06-15 Akim Demaille <akim@epita.fr>
16993
16994 Complete and rationalize `useless thing' warnings.
16995
16996 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16997 (symbol_tag_print): New.
16998 Use them everywhere in place of accessing directly the tag member.
16999 * src/gram.h, src/gram.c (rule_print): New.
17000 Use it where a rule used to be printed `by hand'.
17001 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17002 (reduce_grammar_tables): Report the useless rules.
17003 (reduce_print): Useless things are a warning, not an error.
17004 Report it as such.
17005 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17006 (Reduced Automaton, Underivable Rules): Adjust.
17007 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17008 * tests/conflicts.at (Unresolved SR Conflicts)
17009 (Solved SR Conflicts): Adjust.
17010
ee000ba4
AD
170112002-06-15 Akim Demaille <akim@epita.fr>
17012
17013 Let symbols have a location.
17014
17015 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17016 (getsym): Adjust.
17017 Adjust all callers.
17018 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17019 Use location_t, not int.
17020 * src/symtab.c (symbol_check_defined): Take advantage of the
17021 location.
17022 * tests/regression.at (Invalid inputs): Adjust.
17023
8efe435c
AD
170242002-06-15 Akim Demaille <akim@epita.fr>
17025
17026 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17027 (input): Don't try to initialize yylloc here, do it in the
17028 scanner.
17029 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17030 * src/gram.h (rule_t): Change line and action_line into location
17031 and action_location, of location_t type.
17032 Adjust all dependencies.
17033 * src/location.h, src/location.c (empty_location): New.
17034 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17035 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17036 (grammar_current_rule_symbol_append)
17037 (grammar_current_rule_action_append): Expect a location as argument.
17038 * src/reader.c (grammar_midrule_action): Adjust to attach an
17039 action's location as dummy symbol location.
17040 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17041 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17042 the line numbers.
17043
1921f1d7
AD
170442002-06-14 Akim Demaille <akim@epita.fr>
17045
17046 Grammar declarations may be found in the grammar section.
17047
17048 * src/parse-gram.y (rules_or_grammar_declaration): New.
17049 (declarations): Each declaration may end with a semicolon, not
17050 just...
17051 (grammar_declaration): `"%union"'.
17052 (grammar): Branch to rules_or_grammar_declaration.
17053
4515534c
AD
170542002-06-14 Akim Demaille <akim@epita.fr>
17055
17056 * src/main.c (main): Invoke scanner_free.
17057
f958596b
AD
170582002-06-14 Akim Demaille <akim@epita.fr>
17059
17060 * src/output.c (m4_invoke): Extracted from...
17061 (output_skeleton): here.
17062 Free tempfile.
17063
2c569025
AD
170642002-06-14 Akim Demaille <akim@epita.fr>
17065
17066 * src/parse-gram.y (directives, directive, gram)
17067 (grammar_directives, precedence_directives, precedence_directive):
17068 Rename as...
17069 (declarations, declaration, grammar, grammar_declaration)
17070 (precedence_declaration, precedence_declarator): these.
17071 (symbol_declaration): New.
17072
592e8d4d
AD
170732002-06-14 Akim Demaille <akim@epita.fr>
17074
17075 * src/files.c (action_obstack): Remove, unused.
17076 (output_obstack): Remove it, and all its dependencies, as it is no
17077 longer needed.
17078 * src/reader.c (epilogue_set): Build the epilogue in the
17079 muscle_obstack.
17080 * src/output.h, src/output.c (muscle_obstack): Move to...
17081 * src/muscle_tab.h, src/muscle_tab.h: here.
17082 (muscle_init): Initialize muscle_obstack.
17083 (muscle_free): New.
17084 * src/main.c (main): Call it.
17085
0c15323d
AD
170862002-06-14 Akim Demaille <akim@epita.fr>
17087
17088 * src/location.h: New, extracted from...
17089 * src/reader.h: here.
17090 * src/Makefile.am (noinst_HEADERS): Merge into
17091 (bison_SOURCES): this.
17092 Add location.h.
17093 * src/parse-gram.y: Use location_t instead of Bison's.
17094 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17095 Use location_t instead of ints.
17096
e96c9728
AD
170972002-06-14 Akim Demaille <akim@epita.fr>
17098
17099 * data/bison.simple, data/bison.c++: Be sure to restore the
17100 current #line when returning to the skeleton contents after having
17101 exposed the input file's #line.
17102
75d1fe16
AD
171032002-06-12 Akim Demaille <akim@epita.fr>
17104
17105 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17106 eager.
17107 * tests/actions.at (Exotic Dollars): New.
17108
6c35d22c
AD
171092002-06-12 Akim Demaille <akim@epita.fr>
17110
17111 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17112 ['"/] too eagerly.
17113 * tests/input.at (Torturing the Scanner): New.
17114
1d6412ad
AD
171152002-06-11 Akim Demaille <akim@epita.fr>
17116
17117 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17118 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17119 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17120 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17121 * src/reader.c (reader): Use it.
17122
4cdb01db
AD
171232002-06-11 Akim Demaille <akim@epita.fr>
17124
17125 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17126 Adjust all callers.
17127 (scanner_last_string_free): New.
17128
44995b2e
AD
171292002-06-11 Akim Demaille <akim@epita.fr>
17130
17131 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17132 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17133 (last_string, YY_OBS_FREE): New.
17134 Use them when returning an ID.
17135
e9955c83
AD
171362002-06-11 Akim Demaille <akim@epita.fr>
17137
17138 Have Bison grammars parsed by a Bison grammar.
17139
17140 * src/reader.c, src/reader.h (prologue_augment): New.
17141 * src/reader.c (copy_definition): Remove.
17142
17143 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17144 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17145 (grammar_current_rule_prec_set, grammar_current_rule_check)
17146 (grammar_current_rule_symbol_append)
17147 (grammar_current_rule_action_append): Export.
17148 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17149 (symbol_list_action_append): Remove.
17150 Hook the routines from reader.
17151 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17152 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17153
17154 * src/reader.c (read_declarations): Remove, unused.
17155
17156 * src/parse-gram.y: Handle the epilogue.
17157 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17158 (grammar_start_symbol_set): this.
17159 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17160 * src/reader.c (readgram): Remove, unused.
17161 (reader): Adjust to insert eoftoken and axiom where appropriate.
17162
17163 * src/reader.c (copy_dollar): Replace with...
17164 * src/scan-gram.h (handle_dollar): this.
17165 * src/parse-gram.y: Remove `%thong'.
17166
17167 * src/reader.c (copy_at): Replace with...
17168 * src/scan-gram.h (handle_at): this.
17169
17170 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17171 New.
17172
17173 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17174 time being.
17175
17176 * src/reader.h, src/reader.c (grammar_rule_end): New.
17177
17178 * src/parse.y (current_type, current_class): New.
17179 Implement `%nterm', `%token' support.
17180 Merge `%term' into `%token'.
17181 (string_as_id): New.
17182 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17183 type name.
17184
17185 * src/parse-gram.y: Be sure to handle properly the beginning of
17186 rules.
17187
17188 * src/parse-gram.y: Handle %type.
17189 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17190
17191 * src/parse-gram.y: More directives support.
17192 * src/options.c: No longer handle source directives.
17193
17194 * src/parse-gram.y: Fix %output.
17195
17196 * src/parse-gram.y: Handle %union.
17197 Use the prologue locations.
17198 * src/reader.c (parse_union_decl): Remove.
17199
17200 * src/reader.h, src/reader.c (epilogue_set): New.
17201 * src/parse-gram.y: Use it.
17202
17203 * data/bison.simple, data/bison.c++: b4_stype is now either not
17204 defined, then default to int, or to the contents of %union,
17205 without `union' itself.
17206 Adjust.
17207 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17208
17209 * src/output.c (actions_output): Don't output braces, as they are
17210 already handled by the scanner.
17211
17212 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17213 characters to themselves.
17214
17215 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17216 that the epilogue has a proper #line.
17217
17218 * src/parse-gram.y: Handle precedence/associativity.
17219
17220 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17221 a terminal.
17222 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17223 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17224 at all to define terminals that cannot be emitted.
17225
17226 * src/scan-gram.l: Escape M4 characters.
17227
17228 * src/scan-gram.l: Working properly with escapes in user
17229 strings/characters.
17230
17231 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17232 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17233 grammar.
17234 Use more modest sizes, as for the time being the parser does not
17235 release memory, and therefore the process swallows a huge amount
17236 of memory.
17237
17238 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17239 stricter %token grammar.
17240
17241 * src/symtab.h (associativity): Add `undef_assoc'.
17242 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17243 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17244
17245 * tests/regression.at (Invalid %directive): Remove, as it is now
17246 meaningless.
17247 (Invalid inputs): Adjust to the new error messages.
17248 (Token definitions): The new grammar doesn't allow too many
17249 eccentricities.
17250
17251 * src/lex.h, src/lex.c: Remove.
17252 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17253 (copy_character, copy_string2, copy_string, copy_identifier)
17254 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17255 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17256 (parse_action): Remove.
17257 * po/POTFILES.in: Adjust.
17258
2e047461
AD
172592002-06-11 Akim Demaille <akim@epita.fr>
17260
cd05d13c 17261 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
17262 rule's action member: return the action as a string.
17263 Don't require `rule_length' as an argument: compute it.
17264 (grammar_current_rule_symbol_append)
17265 (grammar_current_rule_action_append): New, eved out from
17266 (readgram): here.
17267 Remove `action_flag', `rulelength', unused now.
17268
9af3fbce
AD
172692002-06-11 Akim Demaille <akim@epita.fr>
17270
17271 * src/reader.c (grammar_current_rule_prec_set).
17272 (grammar_current_rule_check): New, eved out from...
17273 (readgram): here.
17274 Remove `xaction', `first_rhs': useless.
17275 * tests/input.at (Type clashes): New.
17276 * tests/existing.at (GNU Cim Grammar): Adjust.
17277
1485e106
AD
172782002-06-11 Akim Demaille <akim@epita.fr>
17279
17280 * src/reader.c (grammar_midrule_action): New, Eved out from
17281 (readgram): here.
17282
da4160c3
AD
172832002-06-11 Akim Demaille <akim@epita.fr>
17284
17285 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17286 New.
17287 (readgram): Use them as replacement of inlined code, crule and
17288 crule1.
17289
f6d0f937
AD
172902002-06-11 Akim Demaille <akim@epita.fr>
17291
17292 * src/reader.c (grammar_end, grammar_symbol_append): New.
17293 (readgram): Use them.
17294 Make the use of `p' as local as possible.
17295
69078d4b
AD
172962002-06-10 Akim Demaille <akim@epita.fr>
17297
17298 GCJ's parser requires the tokens to be defined before the prologue.
17299
17300 * data/bison.simple: Output the token definition before the user's
17301 prologue.
17302 * tests/regression.at (Braces parsing, Duplicate string)
17303 (Mixing %token styles): Check the output from bison.
17304 (Early token definitions): New.
17305
5e424082
AD
173062002-06-10 Akim Demaille <akim@epita.fr>
17307
17308 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17309 assigning twice the same user number to a token, so that we can
17310 use it in...
17311 * src/lex.c (lex): here.
17312 Also use `symbol_class_set' instead of hand written code.
17313 * src/reader.c (parse_assoc_decl): Likewise.
17314
44536b35
AD
173152002-06-10 Akim Demaille <akim@epita.fr>
17316
17317 * src/symtab.c, src/symtab.c (symbol_class_set)
17318 (symbol_user_token_number_set): New.
17319 * src/reader.c (parse_token_decl): Use them.
17320 Use a switch instead of ifs.
17321 Use a single argument.
17322
8b9f2372
AD
173232002-06-10 Akim Demaille <akim@epita.fr>
17324
17325 Remove `%thong' support as it is undocumented, unused, duplicates
17326 `%token's job, and creates useless e-mail traffic with people who
17327 want to know what it is, why it is undocumented, unused, and
17328 duplicates `%token's job.
17329
17330 * src/reader.c (parse_thong_decl): Remove.
17331 * src/options.c (option_table): Remove "thong".
17332 * src/lex.h (tok_thong): Remove.
17333
3ae2b51f
AD
173342002-06-10 Akim Demaille <akim@epita.fr>
17335
17336 * src/symtab.c, src/symtab.c (symbol_type_set)
17337 (symbol_precedence_set): New.
17338 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17339 (value_components_used): Remove, unused.
17340
2f1afb73
AD
173412002-06-09 Akim Demaille <akim@epita.fr>
17342
17343 Move symbols handling code out of the reader.
17344
17345 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17346 (axiom): Move to...
17347 * src/symtab.h, src/symtab.c: here.
17348
17349 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17350 * src/reader.c (startval): Rename as...
17351 * src/symtab.h, src/symtab.c (startsymbol): this.
17352 * src/reader.c: Adjust.
17353
17354 * src/reader.c (symbol_check_defined, symbol_make_alias)
17355 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17356 (token_translations_init)
17357 Move to...
17358 * src/symtab.c: here.
17359 * src/reader.c (packsymbols): Move to...
17360 * src/symtab.h, src/symtab.c (symbols_pack): here.
17361 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17362 argument.
17363
e9bca3ad
AD
173642002-06-03 Akim Demaille <akim@epita.fr>
17365
17366 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17367 then statements.
17368
86eff183
AD
173692002-06-03 Akim Demaille <akim@epita.fr>
17370
17371 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17372 structs with non literals.
17373 * src/scan-skel.l: never-interactive.
17374 * src/conflicts.c (enum conflict_resolution_e): No trailing
17375 comma.
17376 * src/getargs.c (usage): Split long literal strings.
17377 Reported by Hans Aberg.
17378
717be197
AD
173792002-05-28 Akim Demaille <akim@epita.fr>
17380
17381 * data/bison.c++: Use C++ ostreams.
17382 (cdebug_): New member.
17383
670ddffd
AD
173842002-05-28 Akim Demaille <akim@epita.fr>
17385
17386 * src/output.c (output_skeleton): Be sure to allocate enough room
17387 for `/' _and_ for `\0' in full_skeleton.
17388
769b430f
AD
173892002-05-28 Akim Demaille <akim@epita.fr>
17390
17391 * data/bison.c++: Catch up with bison.simple:
17392 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17393 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17394 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17395 and popping traces.
17396
7067cb36
PH
173972002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17398
17399 * src/output.c (output_skeleton): Put an explicit path in front of
17400 the skeleton file name, rather than relying on the -I directory,
17401 to partially alleviate effects of having a skeleton file lying around
17402 in the current directory.
769b430f 17403
4a713ec2
PH
174042002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17405
769b430f 17406 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
17407 obstack_printf should be obstack_fgrow1.
17408
b408954b
AD
174092002-05-26 Akim Demaille <akim@epita.fr>
17410
17411 * src/state.h (state_t): `solved_conflicts' is a new member.
17412 * src/LR0.c (new_state): Set it to 0.
17413 * src/conflicts.h, src/conflicts.c (print_conflicts)
17414 (free_conflicts, solve_conflicts): Rename as...
17415 (conflicts_print, conflicts_free, conflicts_solve): these.
17416 Adjust callers.
17417 * src/conflicts.c (enum conflict_resolution_e)
17418 (solved_conflicts_obstack): New, used by...
17419 (log_resolution): this.
17420 Adjust to attach the conflict resolution to each state.
17421 Complete the description with the precedence/associativity
17422 information.
17423 (resolve_sr_conflict): Adjust.
17424 * src/print.c (print_state): Output its solved_conflicts.
17425 * tests/conflicts.at (Unresolved SR Conflicts)
17426 (Solved SR Conflicts): Exercise --report=all.
17427
a49aecd5
AD
174282002-05-26 Akim Demaille <akim@epita.fr>
17429
17430 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17431 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17432 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17433 (token_number_t, item_number_as_token_number)
17434 (token_number_as_item_number, muscle_insert_token_number_table):
17435 Rename as...
17436 (symbol_number_t, item_number_as_symbol_number)
17437 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17438 these, since it is more appropriate.
17439
5504898e
AD
174402002-05-26 Akim Demaille <akim@epita.fr>
17441
17442 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17443 `Error:' lines.
17444 * data/bison.simple (yystos) [YYDEBUG]: New.
17445 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17446 error recovery.
17447 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17448
ec3bc396
AD
174492002-05-25 Akim Demaille <akim@epita.fr>
17450
17451 * doc/bison.texinfo (Debugging): Split into...
17452 (Tracing): this new section, its former contents, and...
17453 (Understanding): this new section.
17454 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17455 by...
17456 (report_flag): this.
17457 Adjust all dependencies.
17458 (report_args, report_types, report_argmatch): New.
17459 (usage, getargs): Report/support -r, --report.
17460 * src/options.h
17461 (struct option_table_struct): Rename as..,
17462 (struct option_table_s): this.
17463 Rename the `set_flag' member to `flag' to match with getopt_long's
17464 struct.
17465 * src/options.c (option_table): Split verbose into an entry for
17466 %verbose, and another for --verbose.
17467 Support --report/-r, so remove -r from the obsolete --raw.
17468 * src/print.c: Attach full item sets and lookaheads reports to
17469 report_flag instead of trace_flag.
17470 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17471
78df8250
PE
174722002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17473 and Paul Eggert <eggert@twinsun.com>
769b430f 17474
78df8250
PE
17475 * data/bison.simple (yyparse): Correct error handling to conform to
17476 POSIX and yacc. Specifically, after syntax error is discovered,
17477 do not reduce further before shifting the error token.
17478 Clean up the code a bit by removing the labels yyerrdefault,
17479 yyerrhandle, yyerrpop.
17480 * NEWS: Document the above.
17481
c0c9ea05
PH
174822002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17483
17484 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17485 type; it isn't always big enough, since it doesn't necessarily
17486 include non-terminals.
769b430f 17487 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
17488 the latter can be removed.
17489 (yy_token_number_type): Remove, only one use.
17490 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17491 don't use TokenNumberType as element type.
769b430f 17492
c0c9ea05
PH
17493 * tests/regression.at: Modify expected output to agree with change
17494 to yyr1 and yytranslate.
769b430f 17495
6390a83f
FK
174962002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17497
17498 * src/reader.c (parse_action): Use copy_character instead of
17499 obstack_1grow.
17500
db7c8e9a
AD
175012002-05-13 Akim Demaille <akim@epita.fr>
17502
17503 * tests/regression.at (Token definitions): Prototype yylex and
17504 yyerror.
17505
fcc61800
PH
175062002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17507
158c687b 17508 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
17509 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17510 32-bit arithmetic.
17511 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17512
5683e9b2
AD
175132002-05-07 Akim Demaille <akim@epita.fr>
17514
17515 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17516 avoid GCC warnings.
17517
0c2d3f4c
AD
175182002-05-07 Akim Demaille <akim@epita.fr>
17519
17520 Kill GCC warnings.
17521
17522 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17523 over the RHS of each rule.
17524 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17525 * src/state.h (state_t): Member `nitems' is unsigned short.
17526 * src/LR0.c (get_state): Adjust.
17527 * src/reader.c (packgram): Likewise.
17528 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17529 `Type'.
17530 (muscle_insert_int_table): Remove, unused.
17531 (prepare_rules): Remove `max'.
17532
1565b720
AD
175332002-05-06 Akim Demaille <akim@epita.fr>
17534
17535 * src/closure.c (print_firsts): Display of the symbol tags.
17536 (bitmatrix_print): Move to...
17537 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17538 here.
17539 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17540
cfaee611
AD
175412002-05-06 Akim Demaille <akim@epita.fr>
17542
17543 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17544 hash_do_for_each.
17545
458be8e0
AD
175462002-05-06 Akim Demaille <akim@epita.fr>
17547
17548 * src/LR0.c (new_state, get_state): Instead of using the global
17549 `kernel_size' and `kernel_base', have two new arguments:
17550 `core_size' and `core'.
17551 Adjust callers.
17552
a900a624
AD
175532002-05-06 Akim Demaille <akim@epita.fr>
17554
17555 * src/reader.c (packgram): No longer end `ritem' with a 0
17556 sentinel: it is not used.
17557
d4e7d3a1
AD
175582002-05-05 Akim Demaille <akim@epita.fr>
17559
17560 New experimental feature: display the lookaheads in the report and
17561 graph.
17562
17563 * src/print (print_core): When --trace-flag, display the rules
17564 lookaheads.
17565 * src/print_graph.c (print_core): Likewise.
17566 Swap the arguments.
17567 Adjust caller.
17568
39ceb25b
AD
175692002-05-05 Akim Demaille <akim@epita.fr>
17570
17571 * tests/torture.at (Many lookaheads): New test.
17572
5372019f
AD
175732002-05-05 Akim Demaille <akim@epita.fr>
17574
17575 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17576 (GENERATE_MUSCLE_INSERT_TABLE): this.
17577 (output_int_table, output_unsigned_int_table, output_short_table)
17578 (output_token_number_table, output_item_number_table): Replace with...
17579 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17580 (muscle_insert_short_table, muscle_insert_token_number_table)
17581 (muscle_insert_item_number_table): these.
17582 Adjust all callers.
17583 (prepare_tokens): Don't free `translations', since...
17584 * src/reader.h, src/reader.c (grammar_free): do it.
17585 Move to...
17586 * src/gram.h, src/gram.c (grammar_free): here.
17587 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17588 b4_translate_max.
17589
5df5f6d5
AD
175902002-05-05 Akim Demaille <akim@epita.fr>
17591
17592 * src/output.c (output_unsigned_int_table): New.
17593 (prepare_rules): `i' is unsigned.
17594 `prhs', `rline', `r2' are unsigned int.
17595 Rename muscle `rhs_number_max' as `rhs_max'.
17596 Output muscles `prhs_max', `rline_max', and `r2_max'.
17597 Free rline and r1.
17598 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17599 to compute types instead of constant types.
17600 * tests/regression.at (Web2c Actions): Adjust.
17601
b87f8b21
AD
176022002-05-04 Akim Demaille <akim@epita.fr>
17603
17604 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17605 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17606 Adjust dependencies.
17607 * src/output.c (token_definitions_output): Be sure not to output a
17608 `#define 'a'' when fed with `%token 'a' "a"'.
17609 * tests/regression.at (Token definitions): New.
17610
8bb936e4
PE
176112002-05-03 Paul Eggert <eggert@twinsun.com>
17612
17613 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17614 for K&R C.
17615
176162002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17617
17618 * Makefile.am (SUBDIRS): Remove intl.
17619 (EXTRA_DIST): Add config/config.rpath.
17620
53c71a12
AD
176212002-05-03 Akim Demaille <akim@epita.fr>
17622
17623 * data/bison.simple (m4_if): Don't output empty enums.
17624 And actually, output valid enum definitions :(.
17625
289dd0cf
AD
176262002-05-03 Akim Demaille <akim@epita.fr>
17627
17628 * configure.bat: Remove, completely obsolete.
17629 * Makefile.am (EXTRA_DIST): Adjust.
17630 Don't distribute config.rpath...
17631 * config/Makefile.am (EXTRA_DIST): Do it.
17632
db85e524
AD
176332002-05-03 Akim Demaille <akim@epita.fr>
17634
17635 * configure.in (GETTEXT_VERSION): New.
17636 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17637
83ccf991
AD
176382002-05-03 Akim Demaille <akim@epita.fr>
17639
17640 * data/bison.simple (b4_token_enum): New.
17641 (b4_token_defines): Use it to output tokens both as #define and
17642 enums.
17643 Suggested by Paul Eggert.
17644 * src/output.c (token_definitions_output): Don't output spurious
17645 white spaces.
17646
1f418995
AD
176472002-05-03 Akim Demaille <akim@epita.fr>
17648
17649 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17650
45119f04
RA
176512002-05-02 Robert Anisko <robert@lrde.epita.fr>
17652
17653 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17654 Update the stack class, give a try to deque as the default container.
17655
b2d52318
AD
176562002-05-02 Akim Demaille <akim@epita.fr>
17657
17658 * data/bison.simple (yyparse): Do not implement @$ = @1.
17659 (YYLLOC_DEFAULT): Adjust to do it.
17660 * doc/bison.texinfo (Location Default Action): Fix.
17661
3a8b4109
AD
176622002-05-02 Akim Demaille <akim@epita.fr>
17663
17664 * src/reader.c (parse_braces): Merge into...
17665 (parse_action): this.
17666
84614e13
AD
176672002-05-02 Akim Demaille <akim@epita.fr>
17668
17669 * configure.in (ALL_LINGUAS): Remove.
17670 * po/LINGUAS, hr.po: New.
17671
fdbcd8e2
AD
176722002-05-02 Akim Demaille <akim@epita.fr>
17673
17674 Remove the so called hairy (semantic) parsers.
17675
17676 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17677 * src/gram.h, src/gram.c (semantic_parser): Remove.
17678 (rule_t): Remove the guard and guard_line members.
17679 * src/lex.h (token_t): remove tok_guard.
17680 * src/options.c (option_table): Remove %guard and %semantic_parser
17681 support.
17682 * src/output.c, src/output.h (guards_output): Remove.
17683 (prepare): Adjust.
17684 (token_definitions_output): Don't output the `T'
17685 tokens (???).
17686 (output_skeleton): Don't output the guards.
17687 * src/files.c, src/files.c (attrsfile): Remove.
17688 * src/reader.c (symbol_list): Remove the guard and guard_line
17689 members.
17690 Adjust dependencies.
17691 (parse_guard): Remove.
17692 * data/bison.hairy: Remove.
17693 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17694 BISON_HAIRY.
17695
82b6cb3f
AD
176962002-05-02 Akim Demaille <akim@epita.fr>
17697
17698 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17699 (parse_guard): Rename the formal argument `stack_offset' as
17700 `rule_length', which is more readable.
17701 Adjust callers.
17702 (copy_at, copy_dollar): Instead of outputting the hard coded
17703 values of $$, $n and so forth, output invocation to b4_lhs_value,
17704 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
17705 Note: this patch partially drops `semantic-parser' support: it
17706 always does `rule_length - n', where semantic parsers ought to
17707 always use `-n'.
82b6cb3f
AD
17708 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17709 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17710
6cbfbcc5
AD
177112002-05-02 Akim Demaille <akim@epita.fr>
17712
17713 * configure.in (AC_INIT): Bump to 1.49b.
17714 (AM_INIT_AUTOMAKE): Short invocation.
17715
b8548114
AD
177162002-05-02 Akim Demaille <akim@epita.fr>
17717
17718 Version 1.49a.
17719
c20cd1fa
AD
177202002-05-01 Akim Demaille <akim@epita.fr>
17721
17722 * src/skeleton.h: Remove.
17723
8a9566d4
AD
177242002-05-01 Akim Demaille <akim@epita.fr>
17725
17726 * src/skeleton.h: Fix the #endif.
17727 Reported by Magnus Fromreide.
17728
8c6d399a
PE
177292002-04-26 Paul Eggert <eggert@twinsun.com>
17730
17731 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17732 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 17733 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 17734
2b7ed18a
RA
177352002-04-25 Robert Anisko <robert@lrde.epita.fr>
17736
17737 * src/scan-skel.l: Postprocess quadrigraphs.
17738
17739 * src/reader.c (copy_character): New function, used to output
17740 single characters while replacing `[' and `]' with quadrigraphs, to
17741 avoid troubles with M4 quotes.
17742 (copy_comment): Output characters with copy_character.
17743 (read_additionnal_code): Likewise.
17744 (copy_string2): Likewise.
17745 (copy_definition): Likewise.
17746
17747 * tests/calc.at: Exercise M4 quoting.
17748
34a89c50
AD
177492002-04-25 Akim Demaille <akim@epita.fr>
17750
17751 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17752 between `!' and the command.
17753 Reported by Paul Eggert.
17754
0dd1580a
RA
177552002-04-24 Robert Anisko <robert@lrde.epita.fr>
17756
17757 * tests/calc.at: Exercise prologue splitting.
17758
17759 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17760 `b4_post_prologue' instead of `b4_prologue'.
17761
17762 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17763 muscles.
17764 (output): Free pre_prologue_obstack and post_prologue_obstack.
17765 * src/files.h, src/files.c (attrs_obstack): Remove.
17766 (pre_prologue_obstack, post_prologue_obstack): New.
17767 * src/reader.c (copy_definition): Add a parameter to specify the
17768 obstack to fill, instead of using attrs_obstack unconditionally.
17769 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17770 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17771
83c1796f
PE
177722002-04-23 Paul Eggert <eggert@twinsun.com>
17773
17774 * data/bison.simple: Remove unnecessary commentary and white
17775 space differences from 1_29-branch.
17776 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17777
17778 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17779 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17780 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17781 constructors or destructors.
17782
17783 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17784
1207eeac
AD
177852002-04-23 Akim Demaille <akim@epita.fr>
17786
17787 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17788 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17789 location with columns.
17790 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17791 All reported by Paul Eggert.
17792
78ab8f67
AD
177932002-04-22 Akim Demaille <akim@epita.fr>
17794
17795 * src/reduce.c (dump_grammar): Move to...
17796 * src/gram.h, src/gram.c (grammar_dump): here.
17797 Be sure to separate long item numbers.
17798 Don't read the members of a rule's prec if its nil.
17799
133c20e2
AD
178002002-04-22 Akim Demaille <akim@epita.fr>
17801
17802 * src/output.c (table_size, table_grow): New.
17803 (MAXTABLE): Remove, replace uses with table_size.
17804 (pack_vector): Instead of dying when the table is too big, grow it.
17805
9515e8a7
AD
178062002-04-22 Akim Demaille <akim@epita.fr>
17807
17808 * data/bison.simple (yyr1): Its type is that of a token number.
17809 * data/bison.c++ (r1_): Likewise.
17810 * tests/regression.at (Web2c Actions): Adjust.
17811
23c5a174
AD
178122002-04-22 Akim Demaille <akim@epita.fr>
17813
17814 * src/reader.c (token_translations_init): 256 is now the default
17815 value for the error token, i.e., it will be assigned another
17816 number if the user assigned 256 to one of her tokens.
17817 (reader): Don't force 256 to error.
17818 * doc/bison.texinfo (Symbols): Adjust.
17819 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17820 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17821 etc. instead of 10, 20, 30 (which was used to `jump' over error
17822 (256) and undefined (2)).
17823
5fbb0954
AD
178242002-04-22 Akim Demaille <akim@epita.fr>
17825
17826 Propagate more token_number_t.
17827
17828 * src/gram.h (token_number_as_item_number)
17829 (item_number_as_token_number): New.
17830 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17831 Use it to create output_item_number_table and
17832 output_token_number_table.
17833 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17834 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17835 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17836 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17837
4f940944
AD
178382002-04-22 Akim Demaille <akim@epita.fr>
17839
17840 * src/output.h, src/output.c (get_lines_number): Remove.
17841
3ded9a63
AD
178422002-04-19 Akim Demaille <akim@epita.fr>
17843
17844 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17845 as Lex/Flex'.
17846 (Debugging): More details about enabling the debugging features.
17847 (Table of Symbols): Describe $$, $n, @$, and @n.
17848 Suggested by Tim Josling.
17849
e0c471a9
AD
178502002-04-19 Akim Demaille <akim@epita.fr>
17851
17852 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17853
fecc10cd
AD
178542002-04-10 Akim Demaille <akim@epita.fr>
17855
17856 * src/system.h: Rely on HAVE_LIMITS_H.
17857 Suggested by Paul Eggert.
17858
51dec47b
AD
178592002-04-09 Akim Demaille <akim@epita.fr>
17860
17861 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17862 full stderr, and strip it according to the bison options, instead
17863 of composing the error message from different bits.
17864 This makes it easier to check for several error messages.
17865 Adjust all the invocations.
17866 Add an invocation exercising the error token.
17867 Add an invocation demonstrating a stupid error message.
17868 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17869 Adjust the tests.
17870 Error message are for stderr, not stdout.
17871
007a50a4
AD
178722002-04-09 Akim Demaille <akim@epita.fr>
17873
17874 * src/gram.h, src/gram.c (error_token_number): Remove, use
17875 errtoken->number.
17876 * src/reader.c (reader): Don't specify the user token number (2)
17877 for $undefined, as it uselessly prevents using it.
17878 * src/gram.h (token_number_t): Move to...
17879 * src/symtab.h: here.
17880 (state_t.number): Is a token_number_t.
17881 * src/print.c, src/reader.c: Use undeftoken->number instead of
17882 hard coded 2.
17883 (Even though this 2 is not the same as above: the number of the
17884 undeftoken remains being 2, it is its user token number which
17885 might not be 2).
17886 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17887 `user_token_number_max'.
17888 Output `undef_token_number'.
17889 * data/bison.simple, data/bison.c++: Use them.
17890 Be sure to map invalid yylex return values to
17891 `undef_token_number'. This saves us from gratuitous SEGV.
17892
17893 * tests/conflicts.at (Solved SR Conflicts)
17894 (Unresolved SR Conflicts): Adjust.
17895 * tests/regression.at (Web2c Actions): Adjust.
17896
06446ccf
AD
178972002-04-08 Akim Demaille <akim@epita.fr>
17898
17899 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17900 Adding #line.
17901 Remove the duplicate `typedefs'.
17902 (RhsNumberType): Fix the declaration and various other typos.
17903 Use __ofile__.
17904 * data/bison.simple: Use __ofile__.
17905 * src/scan-skel.l: Handle __ofile__.
17906
62a3e4f0
AD
179072002-04-08 Akim Demaille <akim@epita.fr>
17908
17909 * src/gram.h (item_number_t): New, the type of item numbers in
17910 RITEM. Note that it must be able to code symbol numbers as
17911 positive number, and the negation of rule numbers as negative
17912 numbers.
17913 Adjust all dependencies (pretty many).
17914 * src/reduce.c (rule): Remove this `short *' pointer: use
17915 item_number_t.
17916 * src/system.h (MINSHORT, MAXSHORT): Remove.
17917 Include `limits.h'.
17918 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17919 (shortcpy): Remove.
17920 (MAXTABLE): Move to...
17921 * src/output.c (MAXTABLE): here.
17922 (prepare_rules): Use output_int_table to output rhs.
17923 * data/bison.simple, data/bison.c++: Adjust.
17924 * tests/torture.at (Big triangle): Move the limit from 254 to
17925 500.
17926 * tests/regression.at (Web2c Actions): Ajust.
17927
17928 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17929 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17930 passes, but produces negative #line number, once fixed, GCC is
17931 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17932 C), it passes.
17933 * src/state.h (state_h): Code input lines on ints, not shorts.
17934
bb88b0fc
AD
179352002-04-08 Akim Demaille <akim@epita.fr>
17936
17937 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17938 and then the grammar.
17939
9a636f47
AD
179402002-04-08 Akim Demaille <akim@epita.fr>
17941
17942 * src/system.h: No longer using strndup.
17943
680e8701
AD
179442002-04-07 Akim Demaille <akim@epita.fr>
17945
17946 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17947 * src/output.c (output_table_data): Return the longest number.
17948 (prepare_tokens): Output `token_number_max').
17949 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17950 New.
17951 Use them to define yy_token_number_type/TokenNumberType.
17952 Use this type for yytranslate.
17953 * tests/torture.at (Big triangle): Push the limit from 124 to
17954 253.
17955 * tests/regression.at (Web2c Actions): Adjust.
17956
817e9f41
AD
179572002-04-07 Akim Demaille <akim@epita.fr>
17958
17959 * tests/torture.at (Big triangle): New.
17960 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17961 * tests/existing.at: here.
17962
5123689b
AD
179632002-04-07 Akim Demaille <akim@epita.fr>
17964
17965 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17966 nritems.
17967 Adjust dependencies.
17968
f3849179
AD
179692002-04-07 Akim Demaille <akim@epita.fr>
17970
17971 * src/reader.c: Normalize increments to prefix form.
17972
bd02036a
AD
179732002-04-07 Akim Demaille <akim@epita.fr>
17974
17975 * src/reader.c, symtab.c: Remove debugging code.
17976
db8837cb
AD
179772002-04-07 Akim Demaille <akim@epita.fr>
17978
17979 Rename all the `bucket's as `symbol_t'.
17980
17981 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17982 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17983 * src/symtab.c, src/symtab.h (bucket): Rename as...
17984 (symbol_t): this.
17985 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17986 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17987 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17988 (buckets_new, buckets_free, buckets_do): Rename as...
17989 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17990 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17991 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17992 (symbols_new, symbols_free, symbols_do): these.
17993
72a23c97
AD
179942002-04-07 Akim Demaille <akim@epita.fr>
17995
17996 Use lib/hash for the symbol table.
17997
17998 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17999 EOF.
18000 * src/lex.c (lex): Set the `number' member of new terminals.
18001 * src/reader.c (bucket_check_defined, bucket_make_alias)
18002 (bucket_check_alias_consistence, bucket_translation): New.
18003 (reader, grammar_free, readgram, token_translations_init)
18004 (packsymbols): Adjust.
18005 (reader): Number the predefined tokens.
18006 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18007 for predefined tokens.
18008 * src/symtab.h (bucket): Remove all the hash table related
18009 members.
18010 * src/symtab.c (symtab): Replace by...
18011 (bucket_table): this.
18012 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18013 (buckets_new, buckets_do): New.
18014
280a38c3
AD
180152002-04-07 Akim Demaille <akim@epita.fr>
18016
18017 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18018 (start_symbol, max_user_token_number, semantic_parser)
18019 (error_token_number): Initialize.
18020 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18021 Initialize.
18022 (reader): Don't.
18023 (errtoken, eoftoken, undeftoken, axiom): Extern.
18024
03b31c0c
AD
180252002-04-07 Akim Demaille <akim@epita.fr>
18026
18027 * src/gram.h (rule_s): prec and precsym are now pointers
18028 to the bucket giving the priority/associativity.
18029 Member `associativity' removed: useless.
18030 * src/reduce.c, src/conflicts.c: Adjust.
18031
8b3df748
AD
180322002-04-07 Akim Demaille <akim@epita.fr>
18033
18034 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18035 Properly escape the symbols' TAG when outputting them.
18036
e601aa1d
AD
180372002-04-07 Akim Demaille <akim@epita.fr>
18038
18039 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18040
b0299a2e
AD
180412002-04-07 Akim Demaille <akim@epita.fr>
18042
18043 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18044 (LArule): this, which is an array to rule_t*.
18045 * src/print.c, src/conflicts.c: Adjust.
18046
d7e1f00c
AD
180472002-04-07 Akim Demaille <akim@epita.fr>
18048
18049 * src/gram.h (rule_t): Rename `number' as `user_number'.
18050 `number' is a new member.
18051 Adjust dependencies.
18052 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18053
cc9305dd
AD
180542002-04-07 Akim Demaille <akim@epita.fr>
18055
18056 As a result of the previous patch, it is no longer needed
18057 to reorder ritem itself.
18058
18059 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18060
b0940840
AD
180612002-04-07 Akim Demaille <akim@epita.fr>
18062
18063 Be sure never to walk through RITEMS, but use only data related to
18064 the rules themselves. RITEMS should be banished.
18065
18066 * src/output.c (output_token_translations): Rename as...
18067 (prepare_tokens): this.
18068 In addition to `translate', prepare the muscles `tname' and
18069 `toknum', which were handled by...
18070 (output_rule_data): this.
18071 Remove, and move the remainder of its outputs into...
18072 (prepare_rules): this new routines, which also merges content from
18073 (output_gram): this.
18074 (prepare_rules): Be sure never to walk through RITEMS.
18075 (output_stos): Rename as...
18076 (prepare_stos): this.
18077 (output): Always invoke prepare_states, after all, just don't use it
18078 in the output if you don't need it.
18079
643a5994
AD
180802002-04-07 Akim Demaille <akim@epita.fr>
18081
18082 * src/LR0.c (new_state): Display `nstates' as the name of the
18083 newly created state.
18084 Adjust to initialize first_state and last_state if needed.
18085 Be sure to distinguish the initial from the final state.
18086 (new_states): Create the itemset of the initial state, and use
18087 new_state.
18088 * src/closure.c (closure): Now that the initial state has its
18089 items properly set, there is no need for a special case when
18090 creating `ruleset'.
18091
18092 As a result, now the rule 0, reducing to $axiom, is visible in the
18093 outputs. Adjust the test suite.
18094
18095 * tests/conflicts.at (Solved SR Conflicts)
18096 (Unresolved SR Conflicts): Adjust.
18097 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18098 * tests/conflicts.at (S/R in initial): New.
18099
b4c4ccc2
AD
181002002-04-07 Akim Demaille <akim@epita.fr>
18101
18102 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18103 the RHS of the rules.
18104 * src/output.c (output_gram): Likewise.
18105
bba97eb2
AD
181062002-04-07 Akim Demaille <akim@epita.fr>
18107
18108 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18109 bucket.
18110 Adjust all dependencies.
18111 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18112 `number' of the buckets too.
18113 * src/gram.h: Include `symtab.h'.
18114 (associativity): Move to...
18115 * src/symtab.h: here.
18116 No longer include `gram.h'.
18117
c3b407f4
AD
181182002-04-07 Akim Demaille <akim@epita.fr>
18119
18120 * src/gram.h, src/gram.c (rules_rhs_length): New.
18121 (ritem_longest_rhs): Use it.
18122 * src/gram.h (rule_t): `number' is a new member.
18123 * src/reader.c (packgram): Set it.
18124 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18125 the end of `rules', and count them out of `nrules'.
18126 (reduce_output, dump_grammar): Adjust.
18127 * src/print.c (print_grammar): It is no longer needed to check for
18128 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18129 * tests/reduce.at (Reduced Automaton): New test.
18130
11652ab3
AD
181312002-04-07 Akim Demaille <akim@epita.fr>
18132
18133 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18134 lacking `+ 1' to nrules, Bison reported as useless a token if it
18135 was used solely to set the precedence of the last rule...
18136
26b23c1a
AD
181372002-04-07 Akim Demaille <akim@epita.fr>
18138
18139 * data/bison.c++, data/bison.simple: Don't output the current file
18140 name in #line, to avoid useless diffs between two identical
18141 outputs under different names.
18142
18bcecb0
AD
181432002-04-07 Akim Demaille <akim@epita.fr>
18144
18145 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18146 Normalize loops to using `< nrules + 1', not `<= nrules'.
18147
fa770c86
AD
181482002-04-07 Akim Demaille <akim@epita.fr>
18149
18150 * TODO: Update.
18151
d9b739c3
AD
181522002-04-07 Akim Demaille <akim@epita.fr>
18153
18154 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18155 bucket.value as bucket.number.
18156
99013900
AD
181572002-04-07 Akim Demaille <akim@epita.fr>
18158
18159 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18160 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18161 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18162 RHS, instead of being an index in RITEMS.
18163
e966383b
PE
181642002-04-04 Paul Eggert <eggert@twinsun.com>
18165
18166 * doc/bison.texinfo: Update copyright date.
18167 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18168 (Symbols): Warn about running Bison in one character set,
18169 but compiling and/or running in an incompatible one.
18170 Warn about character code 256, too.
18171
181722002-04-03 Paul Eggert <eggert@twinsun.com>
18173
18174 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18175 YYERROR_VERBOSE is nonzero, not whether it is defined.
18176
18177 Merge changes from bison-1_29-branch.
c307773e 18178
8d6c48b9
PE
181792002-03-20 Paul Eggert <eggert@twinsun.com>
18180
18181 Merge fixes from Debian bison_1.34-1.diff.
18182
18183 * configure.in (AC_PREREQ): 2.53.
18184
e53c6322
AD
181852002-03-20 Akim Demaille <akim@epita.fr>
18186
18187 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18188
9ffbeca7
PE
181892002-03-19 Paul Eggert <eggert@twinsun.com>
18190
21db0b2a
PE
18191 * src/bison.simple (YYCOPY): New macro.
18192 (YYSTACK_RELOCATE): Use it.
18193 Remove Type arg; no longer needed. All callers changed.
18194 (yymemcpy): Remove; no longer needed.
18195
9ffbeca7
PE
18196 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18197 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18198
642cb8f8
AD
181992002-03-19 Akim Demaille <akim@epita.fr>
18200
18201 Test and fix the #line outputs.
18202
18203 * tests/atlocal.at (GCC): New.
18204 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 18205 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
18206 (Action synch line, Epilogue synch line): New tests.
18207 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18208 * data/bison.simple, data/bison.c++: Use it.
18209
3c31a486
AD
182102002-03-19 Akim Demaille <akim@epita.fr>
18211
18212 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18213 (Solved SR Conflicts, %expect not enough, %expect right)
18214 (%expect too much): Move to...
18215 * tests/conflicts.at: this new file.
18216
0d8bed56
AD
182172002-03-19 Akim Demaille <akim@epita.fr>
18218
18219 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18220 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18221 that we can move to enums for instance.
18222 * src/output.c (token_definitions_output): Output a list of
18223 `token-name, token-number' instead of the #define.
18224 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18225
9208d17f
AD
182262002-03-14 Akim Demaille <akim@epita.fr>
18227
18228 Use Gettext 0.11.1.
18229
af27eacb
RA
182302002-03-09 Robert Anisko <robert@lrde.epita.fr>
18231
18232 * data/bison.c++: Make the user able to add members to the generated
18233 parser by subclassing.
18234
9101a310
RA
182352002-03-05 Robert Anisko <robert@lrde.epita.fr>
18236
18237 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18238 a character.
18239 Reported by Nicolas Tisserand and Nicolas Burrus.
18240
fff9bf0b
RA
182412002-03-04 Robert Anisko <robert@lrde.epita.fr>
18242
18243 * src/reader.c: Warn about lacking semi-colons, do not complain.
18244
64dba31e
RA
182452002-03-04 Robert Anisko <robert@lrde.epita.fr>
18246
18247 * data/bison.c++: Remove a debug line.
18248
374f5a14
RA
182492002-03-04 Robert Anisko <robert@lrde.epita.fr>
18250
18251 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18252 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18253 provide a default implementation.
18254
bfcf1f3a
AD
182552002-03-04 Akim Demaille <akim@epita.fr>
18256
18257 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18258 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18259 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18260 * tests/semantic.at (Parsing Guards): Similarly.
18261 * src/reader.at (readgram): Complain if the last rule is not ended
18262 with a semi-colon.
18263
65ccf9fc
AD
182642002-03-04 Akim Demaille <akim@epita.fr>
18265
18266 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18267 * src/closure.c: here.
18268 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18269 RTC.
18270 * src/warshall.h, src/warshall.c: Remove.
18271 * tests/sets.at (Broken Closure): Adjust.
18272
d0039cbc
AD
182732002-03-04 Akim Demaille <akim@epita.fr>
18274
18275 * src/output.c (output_skeleton): tempdir is const.
18276 bytes_read is unused.
18277
345cea78
AD
182782002-03-04 Akim Demaille <akim@epita.fr>
18279
18280 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18281 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18282 Update.
18283 From Michael Hayes.
18284
564801f7
AD
182852002-03-04 Akim Demaille <akim@epita.fr>
18286
18287 * src/closure.c (closure): `r' is unused.
18288
e5352bc7
AD
182892002-03-04 Akim Demaille <akim@epita.fr>
18290
18291 * tests/sets.at (Broken Closure): Add the ending `;'.
18292 * src/reader.at (readgram): Complain if a rule is not ended with a
18293 semi-colon.
18294
914feea9
AD
182952002-03-04 Akim Demaille <akim@epita.fr>
18296
18297 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18298 (count_sr_conflicts): Use bitset_count.
18299 * src/reduce.c (inaccessable_symbols): Ditto.
18300 (bits_size): Remove.
18301 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18302
f0250de6
AD
183032002-03-04 Akim Demaille <akim@epita.fr>
18304
18305 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18306 * src/reduce.c: Remove the `bitset_zero's following the
18307 `bitset_create's, as now it is performed by the latter.
18308
ef017502
AD
183092002-03-04 Akim Demaille <akim@epita.fr>
18310
18311 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18312 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18313 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18314 latest sources from Michael.
18315
76514394
AD
183162002-03-04 Akim Demaille <akim@epita.fr>
18317
18318 * src/output.c (output): Don't free the grammar.
18319 * src/reader.c (grammar_free): New.
18320 * src/main.c (main): Call it and don't free symtab here.
18321
55024580
AD
183222002-03-04 Akim Demaille <akim@epita.fr>
18323
18324 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18325 before returning.
18326 Reported by Benoit Perrot.
18327
f9abaa2c
AD
183282002-03-04 Akim Demaille <akim@epita.fr>
18329
18330 Use bitset operations when possible, not loops over bits.
18331
18332 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18333 bitset_or.
18334 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18335 * src/reduce.c (useless_nonterminals): Formatting changes.
18336 * src/warshall.c (TC): Use bitset_or.
18337
0e721e75
AD
183382002-03-04 Akim Demaille <akim@epita.fr>
18339
18340 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18341 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18342 Ditto.
18343
0fb1ffb1
AD
183442002-03-04 Akim Demaille <akim@epita.fr>
18345
18346 * src/lalr.c (F): Now a bitset*.
18347 Adjust all dependencies.
18348
b86796bf
AD
183492002-03-04 Akim Demaille <akim@epita.fr>
18350
18351 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18352 Adjust all dependencies.
18353
602bbf31
AD
183542002-03-04 Akim Demaille <akim@epita.fr>
18355
18356 * src/L0.c, src/LR0.h (nstates): Be size_t.
18357 Adjust comparisons (signed vs unsigned).
18358 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18359 bitset*.
18360 Adjust all dependencies.
18361
d8a0245c
AD
183622002-03-04 Akim Demaille <akim@epita.fr>
18363
18364 * src/closure.c (firsts): Now, also a bitset.
18365 Adjust all dependencies.
18366 (varsetsize): Remove, now unused.
18367 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18368
34ba9743
AD
183692002-03-04 Akim Demaille <akim@epita.fr>
18370
18371 * src/print.c: Convert to use bitset.h, not hand coded iterations
18372 over ints.
18373
ed86e78c
AD
183742002-03-04 Akim Demaille <akim@epita.fr>
18375
18376 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18377
dfdb1797
AD
183782002-03-04 Akim Demaille <akim@epita.fr>
18379
18380 * src/closure.c (ruleset): Be a bitset.
18381 (rulesetsize): Remove.
18382
7086e707
AD
183832002-03-04 Akim Demaille <akim@epita.fr>
18384
18385 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18386 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18387 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18388 * src/closure.c (fderives): Be an array of bitsets.
18389
98254360
RA
183902002-02-28 Robert Anisko <robert@lrde.epita.fr>
18391
18392 * data/bison.c++: Merge the two generated headers. Insert a copyright
18393 notice in each output file.
18394
a75c057f
AD
183952002-02-28 Akim Demaille <akim@epita.fr>
18396
18397 * data/bison.c++: Copy the prologue of bison.simple to fetch
18398 useful M4 definitions, such as b4_header_guard.
18399
06b00abc
AD
184002002-02-25 Akim Demaille <akim@epita.fr>
18401
18402 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
18403 translator friendly scheme for the bgr
18404 copyright notice.
06b00abc 18405
70e7d534
AD
184062002-02-25 Akim Demaille <akim@epita.fr>
18407
18408 * src/output.c (header_output): Remove, now handled completely via
18409 M4.
18410
abe017f6
AD
184112002-02-25 Akim Demaille <akim@epita.fr>
18412
18413 * m4/m4.m4: New, from CVS Autoconf.
18414 * configure.in: Invoke it.
18415 * src/output.c (output_skeleton): Use its result instead of the
18416 hard coded name.
18417
381fb12e
AD
184182002-02-25 Akim Demaille <akim@epita.fr>
18419
18420 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18421 Fileutils 4.1.5.
18422 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18423 * src/output.c (output_skeleton): Use mkstemp to create a real
18424 temporary file.
18425 Move the filling of `skeleton' and its muscle to...
18426 (prepare): here.
18427 (output): Move the definition of the prologue muscle to...
18428 (prepare): here.
18429 * src/system.h (DEFAULT_TMPDIR): New.
18430
6f38107f
PE
184312002-02-14 Paul Eggert <eggert@twinsun.com>
18432
18433 Remove the support for C++ namespace cleanliness; it was
18434 causing more problems than it was curing, since it didn't work
18435 properly on some nonstandard C++ compilers. This can wait
18436 for a proper C++ parser.
18437
18438 * NEWS: Document this.
18439 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18440 of C++, as it's treated like C now.
18441 * src/bison.simple (YYSTD): Remove.
18442 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18443 Treat C++ just like Standard C instead of trying to support
18444 namespace cleanliness.
18445
80cce3da
AD
184462002-02-14 Akim Demaille <akim@epita.fr>
18447
18448 * tests/regression.at (else): Adjust to Andreas' change.
18449
842e8679
AD
184502002-02-14 Akim Demaille <akim@epita.fr>
18451
18452 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18453
4bda3f10
AD
184542002-02-13 Andreas Schwab <schwab@suse.de>
18455
18456 * src/output.c (output_rule_data): Don't output NULL, it might
18457 not be defined yet.
18458
4162fa07 184592002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 18460
4162fa07
RA
18461 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18462 (Copyright notice): Update.
b418ecd8 18463
bd16a5dc
AD
184642002-02-11 Akim Demaille <akim@epita.fr>
18465
18466 * tests/regression.at (%nonassoc and eof): Don't include
18467 nonportable headers.
18468
8d69a1a3
RA
184692002-02-08 Robert Anisko <robert@lrde.epita.fr>
18470
18471 * data/bison.c++: Correct error recovery. Make the user able to
18472 initialize the starting location.
18473
9b2d0677
AD
184742002-02-07 Akim Demaille <akim@epita.fr>
18475
18476 * tests/input.at: New.
18477
69e2658b
RA
184782002-02-07 Robert Anisko <robert@lrde.epita.fr>
18479
18480 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 18481 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
18482 directives around tables only needed for debugging.
18483
4aacc3a7
RA
184842002-02-07 Robert Anisko <robert@lrde.epita.fr>
18485
18486 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18487 C++ parsers.
18488 (yy::b4_name::parse): Use print_.
18489
762a801e
RA
184902002-02-07 Robert Anisko <robert@lrde.epita.fr>
18491
18492 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18493
4bb2bc3f
RA
184942002-02-07 Robert Anisko <robert@lrde.epita.fr>
18495
18496 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18497 C++ parsers.
18498 (yy::b4_name::parse): Build verbose error messages, and use error_.
18499
6b45a3ca
RA
185002002-02-06 Robert Anisko <robert@lrde.epita.fr>
18501
18502 * data/bison.c++: Fix m4 quoting in comments.
18503
50997c6e
RA
185042002-02-06 Robert Anisko <robert@lrde.epita.fr>
18505
18506 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18507 not expanded by m4.
18508
3f3eed27
AD
185092002-02-05 Akim Demaille <akim@epita.fr>
18510
18511 * data/bison.c++: Adjust to the M4 back end.
18512 More is certainly needed.
18513
be2a1a68
AD
185142002-02-05 Akim Demaille <akim@epita.fr>
18515
18516 Give a try to M4 as a back end.
18517
18518 * lib/readpipe.c: New, from wdiff.
18519 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18520 BISON_HAIRY.
18521 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18522 specific values. Now it is m4 that performs the lookup.
18523 * src/parse-skel.y: Remove.
18524 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18525 * src/output.c (actions_output, guards_output)
18526 (token_definitions_output): No longer keeps track of the output
18527 line number, hence remove the second argument.
18528 (guards_output): Check against the guard member of a rule, not the
18529 action member.
18530 Adjust callers.
18531 (output_skeleton): Don't look for the skeleton location, let m4 do
18532 that.
18533 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18534 file will be used.
18535 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18536 (prepare): Given that for the time being changesyntax is not
18537 usable in M4, rename the muscles using `-' to `_'.
18538 Define `defines_flag', `output_parser_name' and `output_header_name'.
18539 * src/output.h (actions_output, guards_output)
18540 (token_definitions_output): Adjust prototypes.
18541 * src/scan-skel.l: Instead of scanning the skeletons, it now
18542 processes the output of m4: `__oline__' and `#output'.
18543 * data/bison.simple: Adjust to be used by M4(sugar).
18544 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18545 to date.
18546 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18547 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18548 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18549 shamelessly stolen from CVS Autoconf.
18550
beda758b
AD
185512002-02-05 Akim Demaille <akim@epita.fr>
18552
18553 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18554 * configure.in: Check for the declarations of free and malloc.
18555 * src/muscle_tab.c: Adjust.
18556
5ece6d43
AD
185572002-02-05 Akim Demaille <akim@epita.fr>
18558
18559 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18560 which have no values.
18561
5bb18f9a
AD
185622002-02-05 Akim Demaille <akim@epita.fr>
18563
18564 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18565 * data/: here.
18566
894dd62e
PE
185672002-01-29 Paul Eggert <eggert@twinsun.com>
18568
18569 * src/bison.simple (YYSIZE_T): Do not define merely because
18570 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18571 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18572
82841af7
AD
185732002-01-27 Akim Demaille <akim@epita.fr>
18574
18575 Fix `%nonassoc and eof'.
18576
18577 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18578 which were not properly copied! Replace
18579 memcpy (res->errs, src->errs, src->nerrs);
18580 with
18581 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18582 !!!
18583 * tests/regression.at (%nonassoc and eof): Adjust to newest
18584 Autotest: `.' is not in the PATH.
18585
318b76e9
AD
185862002-01-27 Akim Demaille <akim@epita.fr>
18587
18588 * tests/sets.at (AT_EXTRACT_SETS): New.
18589 (Nullable): Use it.
18590 (Firsts): New.
18591
30d2f3d5
AD
185922002-01-26 Akim Demaille <akim@epita.fr>
18593
18594 * tests/actions.at, tests/calc.at, tests/headers.at,
18595 * tests/torture.at: Adjust to the newest Autotest which no longer
18596 forces `.' in the PATH.
18597
30f8c395
AD
185982002-01-25 Akim Demaille <akim@epita.fr>
18599
18600 * tests/regression.at (%nonassoc and eof): New.
18601 Suggested by Robert Anisko.
18602
29ae55f1
AD
186032002-01-24 Akim Demaille <akim@epita.fr>
18604
18605 Bison dumps core when trying to complain about broken input files.
18606 Reported by Cris van Pelt.
18607
18608 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18609 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18610 into...
18611 (Invalid inputs): Strengthen: exercise parse_percent_token.
18612
2b548aa6
RA
186132002-01-24 Robert Anisko <robert.anisko@epita.fr>
18614
18615 * src/Makefile.am: Add bison.c++.
18616 * src/bison.c++: New skeleton.
18617
bb0146c2
AD
186182002-01-21 Paolo Bonzini <bonzini@gnu.org>
18619
18620 * po/it.po: New.
18621
bec30531
AD
186222002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18623
18624 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18625
fc6edc45
MA
186262002-01-20 Marc Autret <marc@gnu.org>
18627
18628 * src/files.c (compute_output_file_names): Fix
18629
5e5d5415
MA
186302002-01-20 Marc Autret <marc@gnu.org>
18631
18632 * tests/output.at: New test.
18633 * src/files.c (compute_base_names): Don't map extensions when
18634 the YACC flag is set, use defaults.
18635 Reported by Evgeny Stambulchik.
18636
44ea3fbd
MA
186372002-01-20 Marc Autret <marc@gnu.org>
18638
ba0fe3c7
PE
18639 * src/system.h: Need to define __attribute__ away for non-GCC
18640 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
18641 Suggested by Albert Chin-A-Young.
18642
338963d1
TVH
186432002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18644
18645 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18646 canonical definition.
18647 * src/system.h: Use the canonical definition for PARAMS (avoids
18648 a conflict with the macro from lib/hash.h).
18649
c57b2479
AD
186502002-01-11 Akim Demaille <akim@epita.fr>
18651
18652 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 18653 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 18654
b85810ae
AD
186552002-01-09 Akim Demaille <akim@epita.fr>
18656
18657 * src/files.c, src/files.h (output_infix): New.
18658 (tab_extension): Remove.
18659 (compute_base_names): Compute the former, drop the latter.
18660 * src/output.c (prepare): Insert the muscles `output-infix', and
18661 `output-suffix'.
18662 * src/parse-skel.y (string, string.1): New.
18663 (section.header): Use it.
18664 (section.yacc): Remove.
18665 (prefix): Remove too.
18666 * src/scan-skel.l: Adjust.
18667 * src/bison.simple, src/bison.hairy: Adjust.
18668
cae60122
AD
186692002-01-09 Akim Demaille <akim@epita.fr>
18670
18671 * configure.in (WERROR_CFLAGS): Compute it.
18672 * src/Makefile.am (CFLAGS): Pass it.
18673 * tests/atlocal.in (CFLAGS): Idem.
18674 * src/files.c: Fix a few warnings.
18675 (get_extension_index): Remove, unused.
18676
ae404801
AD
186772002-01-08 Akim Demaille <akim@epita.fr>
18678
18679 * src/getargs.c (AS_FILE_NAME): New.
18680 (getargs): Use it to convert DOSish file names.
18681 * src/files.c (base_name): Rename as full_base_name to avoid
18682 clashes with `base_name ()'.
18683 (filename_split): New.
18684 (compute_base_names): N-th rewrite, using filename_split.
18685
22312b71
AD
186862002-01-08 Akim Demaille <akim@epita.fr>
18687
18688 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18689 New, stolen from the Fileutils 4.1.
18690 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18691 * configure.in: Check for the presence of memrchr, and of its
18692 prototype.
18693
a67cef01
TVH
186942002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18695
18696 * lib/hash.h (__P): Added definition for this macro.
18697 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18698 BUILT_SOURCES, to ensure they are generated first.
18699 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18700 %error-verbose to allow bootstrapping with bison 1.30x.
18701
2b25d624
AD
187022002-01-06 Akim Demaille <akim@epita.fr>
18703
18704 * src/reader.c (parse_braces): Don't fetch the next char, the
18705 convention is to fetch on entry.
18706 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18707 'switch' without a following semicolon.
18708 * tests/regression.at (braces parsing): New.
18709
3460813b
AD
187102002-01-06 Akim Demaille <akim@epita.fr>
18711
18712 Bison is dead wrong in its RR conflict reports.
18713
18714 * tests/torture.at (GNU Cim Grammar): New.
18715 * src/conflicts.c (count_rr_conflicts): Fix.
18716
73784c64
AD
187172002-01-06 Akim Demaille <akim@epita.fr>
18718
18719 Creating package.m4 from configure.ac causes too many problems.
18720
18721 * tests/Makefile.am (package.m4): Create it by hand,
18722 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18723
25d81090
AD
187242002-01-06 Akim Demaille <akim@epita.fr>
18725
18726 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18727 skeleton.h.
18728
a9b8959e
PE
187292002-01-04 Paul Eggert <eggert@twinsun.com>
18730
18731 * doc/bison.texinfo (Debugging):
18732 Remove YYSTDERR; it's no longer defined or used.
18733 Also, s/cstdio.h/cstdio/.
18734
25d81090
AD
187352002-01-03 Akim Demaille <akim@epita.fr>
18736
18737 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18738
1109455c
AD
187392002-01-03 Akim Demaille <akim@epita.fr>
18740
18741 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18742 tracing code to --trace, wait for a better --trace option, with
18743 args.
18744
7ea5e977
AD
187452002-01-03 Akim Demaille <akim@epita.fr>
18746
18747 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18748 The ISO C++ standard is extremely clear about it: stderr is
18749 considered a macro, not a regular symbol (see table 94 `Header
18750 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18751 Therefore std:: does not apply to it. It still does with fprintf.
18752 Also, s/cstdio.h/cstdio/.
18753
fab5b110
AD
187542002-01-03 Akim Demaille <akim@epita.fr>
18755
18756 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18757 for non system headers.
18758
aed7fd9b
AD
187592002-01-02 Akim Demaille <akim@epita.fr>
18760
18761 Equip the skeleton chain with location tracking, runtime trace,
18762 pure parser and scanner.
18763
18764 * src/parse-skel.y: Request a pure parser, locations, and prefix
18765 renaming.
18766 (%union): Having several members with the same type does not help
18767 type mismatches, simplify.
18768 (YYPRINT, yyprint): New.
18769 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18770 (skel_error): this.
18771 Handle locations.
18772 * src/scan-skel.l: Adjust to these changes.
18773 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18774 (LOCATION_PRINT, skel_control_t): New.
18775
24fad99e
AD
187762001-12-30 Akim Demaille <akim@epita.fr>
18777
18778 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18779 replace `gb' with BLANKS.
18780 * src/scan-skel.l: Adjust.
18781
a4b36db4
AD
187822001-12-30 Akim Demaille <akim@epita.fr>
18783
18784 * src/system.h: We don't need nor want bcopy.
18785 Throw away MS-DOS crap: we don't need getpid.
18786 * configure.in: We don't need strndup. It was even causing
18787 problems: because Flex includes the headers *before* us,
18788 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18789 not visible.
18790 * lib/xstrndup.c: New.
18791 * src/scan-skel.l: Use it.
18792 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18793 * src/parse-skel.y: Use %directives instead of #defines.
18794
1239777d
AD
187952001-12-30 Akim Demaille <akim@epita.fr>
18796
18797 * src/skeleton.h: New.
18798 * src/output.c (output_parser, output_master_parser): Remove, dead
18799 code.
18800 * src/output.h (get_lines_number, actions_output, guards_output)
18801 (token_definitions_output): Prototype them.
18802 * src/parse-skel.y: Add the license notice.
18803 Include output.h and skeleton.h.
18804 (process_skeleton): Returns void, and takes a single parameter.
18805 * src/scan-skel.l: Add the license notice.
18806 Include skeleton.h.
18807 Don't use %option yylineno: it seems that then Flex imagines
18808 REJECT has been used, and therefore it won't reallocate its
18809 buffers (which makes no other sense to me than a bug). It results
18810 in warnings for `unused: yy_flex_realloc'.
18811
9b3add5b
RA
188122001-12-30 Robert Anisko <robert.anisko@epita.fr>
18813
18814 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18815 (MUSCLE_INSERT_PREFIX): ...to there.
18816 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18817 (MUSCLE_INSERT_PREFIX): Move from here...
18818
18819 * src/bison.hairy: Add a section directive. Put braces around muscle
18820 names. This parser skeleton is still broken, but Bison should not
18821 choke on a bad muscle 'syntax'.
18822 * src/bison.simple: Add a section directive. Put braces around muscle
18823 names.
18824
18825 * src/files.h (strsuffix, stringappend): Add declarations.
18826 (tab_extension): Add declaration.
18827 (short_base_name): Add declaration.
18828
18829 * src/files.c (strsuffix, stringappend): No longer static. These
18830 functions are used in the skeleton parser.
18831 (tab_extension): New.
18832 (compute_base_names): Use the computations done in this function
fab5b110 18833 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
18834 names.
18835 (short_base_name): No longer static.
18836
18837 * src/output.c (output_skeleton): New.
18838 (output): Disable call to output_master_parser, and give a try to
18839 a new skeleton handling system.
18840 (guards_output, actions_output): No longer static.
18841 (token_definitions_output, get_lines_number): No longer static.
18842
18843 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18844
fab5b110 18845 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
18846 parse-skel.y.
18847
18848 * src/parse-skel.y: New file.
18849 * src/scan-skel.l: New file.
18850
b5b61c61
AD
188512001-12-29 Akim Demaille <akim@epita.fr>
18852
18853 %name-prefix is broken.
18854
18855 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18856 Adjust all dependencies.
18857 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18858 %name-prefix.
18859
18860 Renaming yylval but not yylloc is not consistent. Now we do.
18861
18862 * src/bison.simple: Prefix yylloc if used.
18863 * doc/bison.texinfo (Decl Summary): Document that.
18864
8c9a50be
AD
188652001-12-29 Akim Demaille <akim@epita.fr>
18866
18867 * doc/bison.texinfo: Promote `%long-directive' over
18868 `%long_directive'.
18869 Remove all references to fixed-output-files, yacc is enough.
18870
d99361e6
AD
188712001-12-29 Akim Demaille <akim@epita.fr>
18872
18873 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18874 user prologue. These are defaults.
18875 * tests/actions.at (Mid-rule actions): Make sure the user can
18876 define YYDEBUG and YYERROR_VERBOSE.
18877
b9cecb91
AD
188782001-12-29 Akim Demaille <akim@epita.fr>
18879
18880 * src/output.c (header_output): Don't forget to export YYLTYPE and
18881 yylloc.
18882 * tests/headers.at (export YYLTYPE): New, make sure it does.
18883 * tests/regression.at (%union and --defines, Invalid CPP headers):
18884 Move to...
18885 * tests/headers.at: here.
18886
aea13e97
AD
188872001-12-29 Akim Demaille <akim@epita.fr>
18888
18889 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18890
931394cb
AD
188912001-12-29 Akim Demaille <akim@epita.fr>
18892
18893 * tests/actions.at (Mid-rule actions): Output on a single line
18894 instead of several.
18895
704a47c4
AD
188962001-12-29 Akim Demaille <akim@epita.fr>
18897
18898 * doc/bison.texinfo: Formatting changes.
18899
091e20bb
AD
189002001-12-29 Akim Demaille <akim@epita.fr>
18901
18902 Don't store the token defs in a muscle, just be ready to output it
18903 on command. Now possible via `symbols'. Fixes a memory leak.
18904
18905 * src/output.c (token_definitions_output): New.
18906 (output_parser, header_output): Use it.
18907 * src/reader.c (symbols_save): Remove.
18908
cce71710
AD
189092001-12-29 Akim Demaille <akim@epita.fr>
18910
18911 * src/bison.simple: Do not provide a default for YYSTYPE and
18912 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18913 default.
18914
82c035a8
AD
189152001-12-29 Akim Demaille <akim@epita.fr>
18916
18917 Mid-rule actions are simply... ignored!
18918
18919 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18920 the empty-rule associated to the dummy symbol, not to the host
18921 rule.
18922 * tests/actions.at (Mid-rule actions): New.
18923
8419d367
AD
189242001-12-29 Akim Demaille <akim@epita.fr>
18925
18926 Memory leak.
18927
18928 * src/reader.c (reader): Free grammar.
18929
375d5806
AD
189302001-12-29 Akim Demaille <akim@epita.fr>
18931
18932 Memory leak.
18933
18934 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18935 since it allocates it for each state, although only one is needed.
18936 (allocate_storage): Do it here.
18937
f51cb8ff
AD
189382001-12-29 Akim Demaille <akim@epita.fr>
18939
18940 * src/options.h, src/options.c (create_long_option_table): Rename
18941 as...
18942 (long_option_table_new): this, with a clearer prototype.
18943 (percent_table): Remove, unused,
18944 * src/getargs.c (getargs): Adjust.
18945
29e88316
AD
189462001-12-29 Akim Demaille <akim@epita.fr>
18947
18948 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18949 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18950 as states.
18951
b9f71f19
AD
189522001-12-29 Akim Demaille <akim@epita.fr>
18953
18954 * src/lalr.c (build_relations): Rename `states' as `states1'.
18955 Sorry, I don't understand exactly what it is, no better name...
18956
1a2b5d37
AD
189572001-12-29 Akim Demaille <akim@epita.fr>
18958
18959 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18960 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18961 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18962 as rules.
18963
1cca533e
AD
189642001-12-29 Akim Demaille <akim@epita.fr>
18965
18966 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18967 ago.
18968
c03ae966
AD
189692001-12-29 Akim Demaille <akim@epita.fr>
18970
18971 * src/reader.c, src/reader.h (user_toknums): Remove.
18972 Adjust all users to use symbols[i]->user_token_number.
18973
5a670b1e
AD
189742001-12-29 Akim Demaille <akim@epita.fr>
18975
18976 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18977 Adjust all users to use symbols[i]->prec or ->assoc.
18978
ad949da9
AD
189792001-12-29 Akim Demaille <akim@epita.fr>
18980
18981 * src/reader.c, src/reader.h (tags): Remove.
18982 Adjust all users to use symbols[i]->tag.
18983
0e78e603
AD
189842001-12-29 Akim Demaille <akim@epita.fr>
18985
18986 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18987 and rule_table.
18988 * src/reader.c (packsymbols): Fill this table.
18989 Drop sprec.
18990 * src/conflicts.c (resolve_sr_conflict): Adjust.
18991 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18992 single table.
18993 Use symbols[i]->tag instead of tags[i].
18994
213e640e
AD
189952001-12-29 Akim Demaille <akim@epita.fr>
18996
18997 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18998 In addition, put a comment in there, to replace...
18999 * tests/regression.at (%union and C comments): Remove.
19000
e7b8bef1
AD
190012001-12-29 Akim Demaille <akim@epita.fr>
19002
19003 * tests/regression.at (Web2c Actions): Blindly move the actual
19004 output as expected output. The contents *seem* right to me, but I
19005 can't pretend reading perfectly parser tables... Nonetheless, all
19006 the other tests pass correctly, the table look OK, even though the
19007 presence of `$axiom' is to be noted: AFAICS it is useless (but
19008 harmless).
19009
b68e7744
AD
190102001-12-29 Akim Demaille <akim@epita.fr>
19011
19012 * src/reader.c (readgram): Don't add the rule 0 if there were no
19013 rules read. In other words, add it _after_ having performed
19014 grammar sanity checks.
19015 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19016
78d5bae9
AD
190172001-12-29 Akim Demaille <akim@epita.fr>
19018
19019 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19020 visible, and some states have now a different number.
19021
ff442794
AD
190222001-12-29 Akim Demaille <akim@epita.fr>
19023
19024 * src/reader.c (readgram): Bind the initial rule's lineno to that
19025 of the first rule.
19026 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19027 (Solved SR Conflicts): Adjust rule 0's line number.
19028
610ab194
AD
190292001-12-29 Akim Demaille <akim@epita.fr>
19030
19031 Fix the `GAWK Grammar' failure.
19032
19033 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19034 the reductions of the first state which was mistakenly confused
19035 with the final state because precisely final_state was initialized
19036 to 0.
19037 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19038 now noticed by Bison.
19039 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19040 have a reduction on $default.
19041
29d29c8f
AD
190422001-12-29 Akim Demaille <akim@epita.fr>
19043
19044 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19045 rule line numbers.
19046 * src/closure.c (print_closure): Likewise.
19047 * src/derives.c (print_derives): Likewise.
19048 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19049 now.
19050
7c6b64d0
AD
190512001-12-29 Akim Demaille <akim@epita.fr>
19052
19053 * src/lalr.c (lookaheads_print): New.
19054 (lalr): Call it when --trace-flag.
19055 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19056 are dumped.
19057
3d4daee3
AD
190582001-12-29 Akim Demaille <akim@epita.fr>
19059
19060 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19061 when walking through ritem, even via rule->rhs.
19062 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19063 (useful_production, useless_nonterminals): Likewise.
19064 (reduce_grammar_tables): Likewise, plus update nritems.
19065 * src/nullable.c (set_nullable): Likewise.
19066 * src/lalr.c (build_relations): Likewise.
19067 * tests/sets.at (Nullable): Adjust.
19068 Fortunately, now, the $axiom is no longer nullable.
19069
9e7f6bbd
AD
190702001-12-29 Akim Demaille <akim@epita.fr>
19071
19072 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19073 the 0-sentinel.
19074 * src/gram.c (ritem_longest_rhs): Likewise.
19075 * src/reduce.c (nonterminals_reduce): Likewise.
19076 * src/print_graph.c (print_graph): Likewise.
19077 * src/output.c (output_rule_data): Likewise.
19078 * src/nullable.c (set_nullable): Likewise.
19079
255ef638
AD
190802001-12-29 Akim Demaille <akim@epita.fr>
19081
19082 * src/output.c: Comment changes.
19083
0d8a7363
AD
190842001-12-27 Paul Eggert <eggert@twinsun.com>
19085
19086 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19087 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19088 Sparc, as they were causing more porting problems than the
19089 (minor) performance improvement was worth.
19090
19091 Also, catch up with 1.31's YYSTD.
19092
3db472b9
AD
190932001-12-27 Akim Demaille <akim@epita.fr>
19094
19095 * src/output.c (output_gram): Rely on nritems, not the
19096 0-sentinel. See below.
19097 Use -1 as separator, not 0.
19098 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19099 Rely on -1 as separator in yyrhs, instead of 0.
19100 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19101 twice `Now at end of input', therefore there are two lines less to
19102 expect.
19103
b365aa05
AD
191042001-12-27 Akim Demaille <akim@epita.fr>
19105
19106 * tests/regression.at (Unresolved SR Conflicts):
19107 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19108 below.
19109
30171f79
AD
191102001-12-27 Akim Demaille <akim@epita.fr>
19111
19112 * src/LR0.c (new_state): Recognize the final state by the fact it
19113 is reached by eoftoken.
19114 (insert_start_shifting_state, insert_eof_shifting_state)
19115 (insert_accepting_state, augment_automaton): Remove, since now
19116 these states are automatically computed from the initial state.
19117 (generate_states): Adjust.
19118 * src/print.c: When reporting a rule number to the user, substract
19119 1, so that the axiom rule is rule 0, and the first user rule is 1.
19120 * src/reduce.c: Likewise.
19121 * src/print_graph.c (print_core): For the time being, just as for
19122 the report, depend upon --trace-flags to dump the full set of
19123 items.
19124 * src/reader.c (readgram): Once the grammar read, insert the rule
19125 0: `$axiom: START-SYMBOL $'.
19126 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19127 number of the states has changed (the final state is no longer
19128 necessarily the last), catch up.
19129
75142d45
AD
191302001-12-27 Akim Demaille <akim@epita.fr>
19131
19132 Try to make the use of the eoftoken valid. Given that its value
19133 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19134 is used instead of > 0 where appropriate, (ii), depend upon nritems
19135 instead of the 0-sentinel.
19136
19137 * src/gram.h, src/gram.c (nritems): New.
19138 Expected to be duplication of nitems, but for the time being...
19139 * src/reader.c (packgram): Assert nritems and nitems are equal.
19140 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19141 * src/closure.c (print_closure, print_fderives): Likewise.
19142 * src/gram.c (ritem_print): Likewise.
19143 * src/print.c (print_core, print_grammar): Likewise.
19144 * src/print_graph.c: Likewise.
19145
b7c49edf
AD
191462001-12-27 Akim Demaille <akim@epita.fr>
19147
19148 * src/main.c (main): If there are complains after grammar
19149 reductions, then output the report anyway if requested, then die.
19150 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19151 * src/reader.c (eoftoken): New.
19152 (parse_token_decl): If the token being defined has value `0', it
19153 is the eoftoken.
19154 (packsymbols): No longer hack `tags' to insert `$' by hand.
19155 Be sure to preserve the value of the eoftoken.
19156 (reader): Make sure eoftoken is defined.
19157 Initialize nsyms to 0: now eoftoken is created just like the others.
19158 * src/print.c (print_grammar): Don't special case the eof token.
19159 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19160 lie anyway, albeit pleasant.
19161 * tests/calc.at: Exercise error messages with eoftoken.
19162 Change the grammar so that empty input is invalid.
19163 Adjust expectations.
19164 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19165
ec2da99f
AD
191662001-12-27 Akim Demaille <akim@epita.fr>
19167
19168 * configure.in: Check the protos of strchr ans strspn.
19169 Replace strchr if needed.
19170 * src/system.h: Provide the protos of strchr, strspn and memchr if
19171 missing.
19172 * lib/strchr.c: New.
19173 * src/reader.c (symbols_save): Use strchr.
19174
8adfa272
AD
191752001-12-27 Akim Demaille <akim@epita.fr>
19176
19177 * src/print.c, src/print_graph.c (escape): New.
19178 Use it to quote the TAGS outputs.
19179 * src/print_graph.c (print_state): Now errors are in red, and
19180 reductions in green.
19181 Prefer high to wide: output the state number on a line of its own.
19182
80dac38c
AD
191832001-12-27 Akim Demaille <akim@epita.fr>
19184
19185 * src/state.h, src/state.c (reductions_new): New.
19186 * src/LR0.c (set_state_table): Let all the states have a
19187 `reductions', even if reduced to 0.
19188 (save_reductions): Adjust.
19189 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19190 * src/print.c (print_reductions, print_actions): Adjust.
19191 * src/output.c (action_row): Adjust.
19192
2cec70b9
AD
191932001-12-27 Akim Demaille <akim@epita.fr>
19194
19195 * src/state.h, src/state.c (errs_new, errs_dup): New.
19196 * src/LR0.c (set_state_table): Let all the states have an errs,
19197 even if reduced to 0.
19198 * src/print.c (print_errs, print_reductions): Adjust.
19199 * src/output.c (output_actions, action_row): Adjust.
19200 * src/conflicts.c (resolve_sr_conflict): Adjust.
19201
13ca549a
AD
192022001-12-27 Akim Demaille <akim@epita.fr>
19203
19204 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19205
5092aba5
AD
192062001-12-27 Akim Demaille <akim@epita.fr>
19207
19208 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19209 * src/print.c: here.
19210 (lookaheadset, shiftset): New, used as additional storage by
19211 print_reductions.
19212 (print_results): Adjust.
19213 (print_shifts, print_gotos, print_errs): New, extracted from...
19214 (print_actions): here.
19215 * src/print_graph.c (print_actions): Remove dead code.
19216
11e2beca
AD
192172001-12-27 Akim Demaille <akim@epita.fr>
19218
19219 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19220 `$n' and `@n'.
19221
dac3c910
AD
192222001-12-27 Akim Demaille <akim@epita.fr>
19223
19224 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19225 (build_relations): Adjust.
19226
d0b0fefa
AD
192272001-12-27 Akim Demaille <akim@epita.fr>
19228
19229 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19230 duplication.
19231
adc8c848
AD
192322001-12-27 Akim Demaille <akim@epita.fr>
19233
19234 * src/reader.c (packgram): Catch nitems overflows.
19235
14d293ac
AD
192362001-12-27 Akim Demaille <akim@epita.fr>
19237
19238 * src/files.c, src/files.h (guard_obstack): Remove.
19239 * src/output.c (output): Adjust.
19240 * src/reader.c (parse_braces): New, factoring...
19241 (copy_action, copy_guard): these two which are renamed as...
19242 (parse_action, parse_guard): these.
19243 As a voluntary consequence, using braces around guards is now
19244 mandatory.
19245
f499b062
AD
192462001-12-27 Akim Demaille <akim@epita.fr>
19247
19248 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19249 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19250 members.
19251 (symbol_list_new): Adjust.
19252 (copy_action): action_line is the first line, not the last.
19253 (copy_guard): Just as for actions, store the `action' only, not
19254 the switch/case/break flesh.
19255 Don't parse the user action that might follow the guard, let...
19256 (readgram): do it, i.e., now, there can be an action after a
19257 guard.
19258 In other words the guard is just explicitly optional.
19259 (packgram): Adjust.
19260 * src/output.c (guards_output): New.
19261 (output_parser): Call it when needed.
19262 (output): Also free the guard and attrs obstacks.
19263 * src/files.c, src/files.h (obstack_save): Remove.
19264 (output_files): Remove.
19265 As a result, if one needs the former `.act' file, using an
19266 appropriate skeleton which requires actions and guards is now
19267 required.
19268 * src/main.c (main): Adjust.
19269 * tests/semantic.at: New.
19270 * tests/regression.at: Use `input.y' as input file name.
19271 Avoid 8+3 problems by requiring input.c when the test needs the
19272 parser.
19273
d945f5cd
AD
192742001-12-27 Akim Demaille <akim@epita.fr>
19275
19276 * src/reader.c (symbol_list_new): Be sure to initialize all the
19277 fields.
19278
d200e455
AD
192792001-12-27 Akim Demaille <akim@epita.fr>
19280
19281 All the hacks using a final pseudo state are now useless.
19282
19283 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19284 * src/lalr.c (nLA): New.
19285 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19286 instead of lookaheadsp from the pseudo state (nstate + 1).
19287
f9507c28
AD
192882001-12-27 Akim Demaille <akim@epita.fr>
19289
19290 * src/output.c (action_row, token_actions): Use a state_t instead
19291 of a integer, and nlookaheads instead of the following state's
19292 lookaheadsp.
19293
065fbd27
AD
192942001-12-27 Akim Demaille <akim@epita.fr>
19295
19296 * src/conflicts.c (log_resolution, flush_shift)
19297 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19298 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19299 (conflicts_print, print_reductions): Use a state_t instead of an
19300 integer when referring to a state.
19301 As much as possible, depend upon nlookaheads, instead of the
19302 `lookaheadsp' member of the following state (since lookaheads of
19303 successive states are successive, the difference between state n + 1
19304 and n served as the number of lookaheads for state n).
19305 * src/lalr.c (add_lookback_edge): Likewise.
19306 * src/print.c (print_core, print_actions, print_state)
19307 (print_results): Likewise.
19308 * src/print_graph.c (print_core, print_actions, print_state)
19309 (print_graph): Likewise.
19310 * src/conflicts.h: Adjust.
19311
1b177bd7
AD
193122001-12-27 Akim Demaille <akim@epita.fr>
19313
19314 * src/bison.hairy: Formatting/comment changes.
19315 ANSIfy.
19316 Remove `register' indications.
19317 Add plenty of `static'.
19318
7742ddeb
AD
193192001-12-27 Akim Demaille <akim@epita.fr>
19320
19321 * src/output.c (prepare): Drop the muscle `ntbase' which
19322 duplicates ntokens.
19323 * src/bison.simple: Formatting/comment changes.
19324 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19325 is an undocumented synonym.
19326
1fa14068
AD
193272001-12-22 Akim Demaille <akim@epita.fr>
19328
19329 * src/output.c (output_table_data): Change the prototype to use
19330 `int' for array ranges: some invocations do pass an int, not a
19331 short.
19332 Reported by Wayne Green.
19333
b9752825
AD
193342001-12-22 Akim Demaille <akim@epita.fr>
19335
19336 Some actions of web2c.y are improperly triggered.
19337 Reported by Mike Castle.
19338
19339 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19340 * tests/regression.at (Web2c): Rename as...
19341 (Web2c Report): this.
19342 (Web2c Actions): New.
19343
776209d6
AD
193442001-12-22 Akim Demaille <akim@epita.fr>
19345
19346 Reductions in web2c.y are improperly reported.
19347 Reported by Mike Castle.
19348
19349 * src/conflicts.c (print_reductions): Fix.
19350 * tests/regression.at (Web2c): New.
19351
275fc3ad
AD
193522001-12-18 Akim Demaille <akim@epita.fr>
19353
19354 Some host fail on `assert (!"foo")', which expands to
19355 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19356 Reported by Nelson Beebee.
19357
19358 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19359 `#define it_succeeded 0' and `assert (it_succeeded)'.
19360
897668ee
MA
193612001-12-17 Marc Autret <autret_m@epita.fr>
19362
19363 * src/bison.simple: Don't hard code the skeleton line and filename.
19364 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19365 New line counter 'skeleton_line' (skeleton-line muscle).
19366
ab3399e0
PE
193672001-12-17 Paul Eggert <eggert@twinsun.com>
19368
19369 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19370 YYDEBUG must be defined to a nonzero value.
19371
19372 * src/bison.simple (yytname): Do not assume that the user defines
19373 YYDEBUG to a properly parenthesized expression.
19374
3877f72b
AD
193752001-12-17 Akim Demaille <akim@epita.fr>
19376
19377 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19378 nlookaheads is a new member.
19379 Adjust all users.
19380 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19381 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19382 state.
776209d6 19383
331dbc1b
AD
193842001-12-17 Akim Demaille <akim@epita.fr>
19385
19386 * src/files.h, src/files.c (open_files, close_files): Remove.
19387 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19388 let...
19389 * src/reader.c (reader): Do it.
776209d6 19390
be750e4c
AD
193912001-12-17 Akim Demaille <akim@epita.fr>
19392
19393 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 19394
709ae8c6
AD
193952001-12-17 Akim Demaille <akim@epita.fr>
19396
19397 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19398 (flush_reduce): New.
19399 (resolve_sr_conflict): Adjust.
776209d6 19400
f87685c3
AD
194012001-12-17 Akim Demaille <akim@epita.fr>
19402
19403 * src/output.c (output_obstack): Be static and rename as...
19404 (format_obstack): this, to avoid any confusion with files.c's
19405 output_obstack.
19406 * src/reader.h (muscle_obstack): Move to...
19407 * src/output.h: here, since it's defined in output.c.
19408
837491d8
AD
194092001-12-17 Akim Demaille <akim@epita.fr>
19410
19411 * src/output.c (action_row, save_column, default_goto)
19412 (sort_actions, matching_state, pack_vector): Better variable
19413 locality.
19414
796d61fb
AD
194152001-12-17 Akim Demaille <akim@epita.fr>
19416
19417 * src/output.c: Various formatting changes.
776209d6 19418
64d15509
AD
194192001-12-17 Akim Demaille <akim@epita.fr>
19420
19421 * src/files.c (output_files): Free the output_obstack.
19422 * src/main.c (main): Call print and print_graph conditionally.
19423 * src/print.c (print): Work unconditionally.
19424 * src/print_graph.c (print_graph): Work unconditionally.
19425 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19426
fbc8ecb7
MA
194272001-12-16 Marc Autret <autret_m@epita.fr>
19428
19429 * src/output.c (actions_output): Fix. When we use %no-lines,
19430 there is one less line per action.
19431
f0440388
MA
194322001-12-16 Marc Autret <autret_m@epita.fr>
19433
19434 * src/bison.simple: Remove a useless #line directive.
19435 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19436 * src/output.c (get_lines_number): New.
776209d6 19437 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
19438 output muscles.
19439 Fix line numbering.
19440 (actions_output): Computes the number of lines taken by actions.
19441 (output_master_parser): Insert new skeleton which is the name of
19442 the output parser file name.
19443
a79986b8
MA
194442001-12-15 Marc Autret <autret_m@epita.fr>
19445
19446 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19447
4ec8e00f
MA
194482001-12-15 Marc Autret <autret_m@epita.fr>
19449
19450 * src/output.c (output_gram): Keep track of the hairy one.
19451
1a4648ff
AD
194522001-12-15 Akim Demaille <akim@epita.fr>
19453
19454 Make `make distcheck' work.
19455
19456 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19457 system.h which uses libgettext.h.
19458
9c2c67e6
AD
194592001-12-15 Akim Demaille <akim@epita.fr>
19460
19461 * src/nullable.c (set_nullable): Useless rules must be skipped,
19462 otherwise, since we range over their symbols, we might look at a
19463 nonterminal which no longer ``exists'', i.e., it is not counted in
19464 `nvars', hence we overflow our arrays.
19465
93ede233
AD
194662001-12-15 Akim Demaille <akim@epita.fr>
19467
19468 The header can also be produced directly, without any obstack!
19469 Yahoo!
19470
19471 * src/files.c, src/files.h (defines_obstack): Remove.
19472 (compute_header_macro): Global.
19473 (defines_obstack_save): Remove.
19474 * src/reader.c (parse_union_decl): No longer output to
19475 defines_obstack: its content can be found in the `stype' muscle
19476 anyway.
19477 (output_token_translations): Merge into...
19478 (symbols_output): this.
19479 Rename as...
19480 (symbols_save): this.
19481 (reader): Adjust.
19482 * src/output.c (header_output): New.
19483 (output): Call it.
19484
2666f928
AD
194852001-12-15 Akim Demaille <akim@epita.fr>
19486
19487 * src/reader.c (parse_union_decl): Instead of handling two obstack
19488 simultaneously, use one to define the `stype' muscle, and use the
19489 value of the latter to fill defines_obstack.
19490 (copy_comment): Remove.
19491 (copy_comment2): Work for a single obstack.
19492 Rename as...
19493 (copy_comment): this.
19494
428046f8
AD
194952001-12-15 Akim Demaille <akim@epita.fr>
19496
19497 * src/lex.c, src/lex.h (xgetc): No longer static.
19498 * src/reader.c (parse_union_decl): Revamp.
19499
ea52d706
AD
195002001-12-15 Akim Demaille <akim@epita.fr>
19501
19502 Still making progress in separating Bison into (i) input, (ii)
19503 process, (iii) output: now we can directly output the parser file
19504 without using table_obstack at all.
19505
19506 * src/files.c, src/files.h (table_obstack): Bye bye.
19507 (parser_file_name): New.
19508 * src/files.c (compute_output_file_names): Compute it.
19509 * src/output.c (actions_output, output_parser)
19510 (output_master_parser): To a file instead of an obstack.
19511
3f96f4dc
AD
195122001-12-15 Akim Demaille <akim@epita.fr>
19513
19514 Attach actions to rules, instead of pre-outputting them to
19515 actions_obstack.
19516
19517 * src/gram.h (rule_t): action and action_line are new members.
19518 * src/reader.c (symbol_list): Likewise.
19519 (copy_action): Save the actions within the rule.
19520 (packgram): Save them in rule_table.
19521 * src/output.c (actions_output): New.
19522 (output_parser): Use it on `%%actions'.
19523 (output_rule_data): Don't free rule_table.
19524 (output): Do it.
19525 (prepare): Don't save the `action' muscle.
19526 * src/bison.simple: s/%%action/%%actions/.
19527
51576fb3
AD
195282001-12-15 Akim Demaille <akim@epita.fr>
19529
19530 * src/reader.c (copy_action): When --yacc, don't append a `;'
19531 to the user action: let it fail if lacking.
dee049eb 19532 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 19533
2648a72d
AD
195342001-12-14 Akim Demaille <akim@epita.fr>
19535
19536 * src/lex.c (literalchar): Simply return the char you decoded, non
19537 longer mess around with obstacks and int pointers.
19538 Adjust all callers.
19539
92790e5b
AD
195402001-12-14 Akim Demaille <akim@epita.fr>
19541
19542 * src/lex.c (literalchar): Don't escape the special characters,
19543 just decode them, and keep them as char (before, eol was output as
19544 the 2 char string `\n' etc.).
19545 * src/output.c (output_rule_data): Use quotearg to output the
19546 token strings.
19547
927c1557
PE
195482001-12-13 Paul Eggert <eggert@twinsun.com>
19549
19550 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19551 Do not infringe on the global user namespace when using C++.
19552 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19553 All uses of `fprintf' and `stderr' changed.
19554
19555 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19556
ed8e1f68
AD
195572001-12-13 Akim Demaille <akim@epita.fr>
19558
19559 The computation of nullable is broken: it doesn't handle empty
19560 RHS's properly.
19561
19562 * tests/torture.at (GNU AWK Grammar): New.
19563 * tests/sets.at (Nullable): New.
19564 * src/nullable.c (set_nullable): Instead of blindly looping over
19565 `ritems', loop over the rules, and then over their rhs's.
19566
19567 Work around Autotest bugs.
19568
19569 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19570 frame, because Autotest understand lines starting with a `+' as
19571 traces from the shell. Then, they are not processed properly.
19572 Admittedly an Autotest bug, but we don't have time to wait for
19573 Autotest to catch up.
19574 * tests/regression.at (Broken Closure): Adjust to the new table
19575 frames.
19576 Move to...
19577 * tests/sets.at: here.
19578
cb581495
AD
195792001-12-13 Akim Demaille <akim@epita.fr>
19580
19581 * src/closure.c (closure): Use nrules instead of playing tricks
19582 with BITS_PER_WORD.
19583
2e729273
AD
195842001-12-13 Akim Demaille <akim@epita.fr>
19585
19586 * src/print.c (print_actions): Output the handling of `$' as the
19587 traces do: shifting the token EOF. Before EOF was treated as a
19588 nonterminal.
19589 * tests/regression.at: Adjust some tests.
19590 * src/print_graph.c (print_core): Complete the set of items via
19591 closure. The next-to-final and final states are still unsatisfying,
19592 but that's to be addressed elsewhere.
19593 No longer output the rule numbers, but do output the state number.
19594 A single loop for the shifts + gotos is enough, but picked a
19595 distinct color for each.
19596 (print_graph): Initialize and finalize closure.
19597
107f7dfb
AD
195982001-12-13 Akim Demaille <akim@epita.fr>
19599
19600 * src/reader.c (readgram): Remove dead code, an strip useless
19601 braces.
19602 (get_type): Remove, unused.
19603
9b53a24f
AD
196042001-12-12 Akim Demaille <akim@epita.fr>
19605
19606 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19607 on that of lib/error.c.
19608
dbfb6dcd
AD
196092001-12-12 Akim Demaille <akim@epita.fr>
19610
19611 Some hosts don't like `/' in includes.
19612
19613 * src/system.h: Include libgettext.h without qualifying the path.
19614 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19615 $(top_srcdir).
19616
c25fb648
MA
196172001-12-11 Marc Autret <autret_m@epita.fr>
19618
19619 * src/output.c (output_parser): Remove useless muscle.
19620
710ddc4f
MA
196212001-12-11 Marc Autret <autret_m@epita.fr>
19622
19623 * src/bison.simple: Remove #line just before %%epilogue. It
19624 is now handled in ...
19625 * src/reader.c (read_additionnal_code): Add the output of a
19626 #line for the epilogue.
19627
e83d80b8
MA
196282001-12-10 Marc Autret <autret_m@epita.fr>
19629
927c1557 19630 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
19631 replace precedent remove.
19632 * src/bison.simple: Remove #line before %%prologue because
19633 %%input-line is wrong at this time.
19634
971d5158
MA
196352001-12-10 Marc Autret <autret_m@epita.fr>
19636
19637 * src/reader.c (symbols_output): Clean up.
927c1557 19638 * src/output.c (output_gram, output): Clean up.
971d5158 19639
5edafffd
AD
196402001-12-10 Akim Demaille <akim@epita.fr>
19641
19642 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19643 * src/LR0.c (set_state_table): here.
19644 * src/lalr.c (lalr): Call it.
19645
0279f8e9
AD
196462001-12-10 Akim Demaille <akim@epita.fr>
19647
19648 * src/state.h (shifts): Remove the `number' member: shifts are
19649 attached to state, hence no longer need to be labelled with a
19650 state number.
19651
190c4f5f
AD
196522001-12-10 Akim Demaille <akim@epita.fr>
19653
19654 Now that states have a complete set of members, the linked list of
19655 shifts is useless: just fill directly the state's shifts member.
19656
19657 * src/state.h (shifts): Remove the `next' member.
19658 * src/LR0.c (first_state, last_state): Remove.
19659 Adjust the callers.
19660 (augment_automaton): Don't look for the shifts that must be added
19661 a shift on EOF: it is those of the state we looked for! But now,
19662 since shifts are attached, it is no longer needed to looking
19663 merely by its id: its number.
19664
2a73b93d
AD
196652001-12-10 Akim Demaille <akim@epita.fr>
19666
19667 * src/LR0.c (augment_automaton): Better variable locality.
19668 Remove an impossible branch: if there is a state corresponding to
19669 the start symbol being shifted, then there is shift for the start
19670 symbol from the initial state.
19671
74392f6a
AD
196722001-12-10 Akim Demaille <akim@epita.fr>
19673
19674 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19675 only when appropriate: when insert_start_shifting_state' is not
19676 invoked.
19677 * tests/regression.at (Rule Line Numbers): Adjust.
19678
37c82725
AD
196792001-12-10 Akim Demaille <akim@epita.fr>
19680
19681 * src/LR0.c (augment_automaton): Now that all states have shifts,
19682 merge the two cases addition shifts to the initial state.
19683
6a164e0c
AD
196842001-12-10 Akim Demaille <akim@epita.fr>
19685
19686 * src/lalr.c (set_state_table): Move to...
19687 * src/LR0.c: here.
19688 * src/lalr.c (lalr): Don't call it...
19689 * src/LR0.c (generate_states): do it.
19690 * src/LR0.h (first_state): Remove, only the table is used.
19691
7215de24
AD
196922001-12-10 Akim Demaille <akim@epita.fr>
19693
19694 * src/LR0.h (first_shift, first_reduction): Remove.
19695 * src/lalr.c: Don't use first_shift: find shifts through the
19696 states.
19697
80e25d4d
AD
196982001-12-10 Akim Demaille <akim@epita.fr>
19699
19700 * src/LR0.c: Attach shifts to states as soon as they are
19701 computed.
19702 * src/lalr.c (set_state_table): Instead of assigning shifts to
19703 state, just assert that the mapping was properly done.
19704
0ab3728b
AD
197052001-12-10 Akim Demaille <akim@epita.fr>
19706
19707 * src/LR0.c (insert_start_shift): Rename as...
19708 (insert_start_shifting_state): this.
19709 (insert_eof_shifting_state, insert_accepting_state): New.
19710 (augment_automaton): Adjust.
19711 Better locality of the variables.
19712 When looking if the start_symbol is shifted from the initial
19713 state, using `while (... symbol != start_symbol ...)' sounds
19714 better than `while (... symbol < start_symbol ...)': If fail
19715 to see how the order between symbols could be relevant!
19716
78af9bbc
AD
197172001-12-10 Akim Demaille <akim@epita.fr>
19718
19719 * src/getargs.h: Don't declare `spec_name_prefix' and
19720 `spec_file_prefix', declared by src/files.h.
19721 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19722 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19723 * src/output.c (prepare): Adjust.
19724 * src/reader.c (symbols_output): Likewise.
19725 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19726
bdef2a41
AD
197272001-12-10 Akim Demaille <akim@epita.fr>
19728
19729 * src/muscle_tab.c (muscle_init): NULL is a better default than
19730 `"0"'.
19731
3735969c
AD
197322001-12-10 Akim Demaille <akim@epita.fr>
19733
19734 * src/reader.c (reader): Calling symbols_output once is enough.
19735
49701457
AD
197362001-12-10 Akim Demaille <akim@epita.fr>
19737
19738 Now that states have a complete set of members, the linked list of
19739 reductions is useless: just fill directly the state's reductions
19740 member.
19741
19742 * src/state.h (struct reductions): Remove member `number' and
19743 `next'.
19744 * src/LR0.c (first_reduction, last_reduction): Remove.
19745 (save_reductions): Don't link the new reductions, store them in
19746 this_state.
19747 * src/lalr.c (set_state_table): No need to attach reductions to
19748 states, it's already done.
19749 * src/output.c (output_actions): No longer free the shifts, then
19750 the reductions, then the states: free all the states and their
19751 members.
19752
0edad749
AD
197532001-12-10 Akim Demaille <akim@epita.fr>
19754
19755 * src/options.c (OPTN, DRTV, BOTH): New.
19756 (option_table): Use them.
19757
0edad749
AD
19758 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19759 the job of system.h.
19760 * src/options.c: Don't include stdio.h and xalloc.h for the same
19761 reasons.
19762
5449dd0f
AD
197632001-12-10 Akim Demaille <akim@epita.fr>
19764
19765 * src/output.c (output, prepare): Make sure the values of the
19766 muscles `action' and `prologue' are 0-terminated.
19767
a870c567
AD
197682001-12-10 Akim Demaille <akim@epita.fr>
19769
19770 Clean up GCC warnings.
19771
19772 * src/reader.c (copy_action): `buf' is not used.
19773 (parse_skel_decl): Be static.
19774 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19775 * src/options.h (create_long_option_table): Have a real prototype.
19776 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19777 (hash_delete_at): Return const void *.
19778 Adjust casts to preserve the const.
19779
80df8768
AD
197802001-12-10 Akim Demaille <akim@epita.fr>
19781
19782 * configure.in: Require 2.52g.
19783 M4 is not needed, but AUTOM4TE is.
19784 * m4/m4.m4: Remove.
19785 * tests/Makefile.am: Adjust.
19786
f693ad14
AD
197872001-12-10 Akim Demaille <akim@epita.fr>
19788
19789 One structure for states is enough, even though theoretically
19790 there are LR(0) states and LALR(1) states.
19791
19792 * src/lalr.h (state_t): Remove.
19793 (state_table): Be state_t **, not state_t *.
19794 * src/state.h (core, CORE_ALLOC): Rename as...
19795 (state_t, STATE_ALLOC): this.
19796 Add the LALR(1) members: shifts, reductions, errs.
19797 * src/LR0.c (state_table): Rename as...
19798 (state_hash): this, to avoid name clashes with the global
19799 `state_table'.
19800 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19801 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19802
74ffbcb6
AD
198032001-12-10 Akim Demaille <akim@epita.fr>
19804
19805 Bison dumps core on bash.y.
19806 Reported by Pascal Bart.
19807
19808 * src/warshall.c (bitmatrix_print): New.
19809 (TC): Use it.
ba0fe3c7 19810 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
19811 j must be the outer loop.
19812 * tests/regression.at (Broken Closure): New.
19813
07708e19
AD
198142001-12-05 Akim Demaille <akim@epita.fr>
19815
19816 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19817 its argument.
ba1ecc07 19818 Reported by Peter Hamorsky.
07708e19 19819
92b16366
AD
198202001-12-05 Akim Demaille <akim@epita.fr>
19821
19822 * src/conflicts.c (err_table): Remove.
19823 (resolve_sr_conflict): Adjust.
19824 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19825 Rename as...
19826 (state_t.reductions, state_t.shifts): this.
19827
076ab033
AD
198282001-12-05 Akim Demaille <akim@epita.fr>
19829
19830 * src/reduce.c (reduce_grammar_tables): No longer disable the
19831 removal of useless rules via CPP but via `if (0)', so that the
19832 compiler still check the code is valid.
19833 For instance, it should have noticed `rline' no longer exists: use
19834 the `line' member of rule_t.
19835 * src/gram.c (dummy, rline): Remove, unused.
19836
3843c413
AD
198372001-12-05 Akim Demaille <akim@epita.fr>
19838
19839 * src/output.c (pack_vector): Use assert, not berror.
19840 * src/main.c (berror): Remove, unused.
19841
43168960
AD
198422001-12-05 Akim Demaille <akim@epita.fr>
19843
19844 New experimental feature: if --verbose --trace output all the
19845 items of a state, not only its kernel.
19846
19847 * src/print.c (print_core): If `trace_flag', then invoke closure
19848 before outputting the items of the state (print_core is no longer
19849 a correct name them).
19850 (print_results): Invoke new_closure/free_closure if needed.
19851
b2872512
AD
198522001-12-05 Akim Demaille <akim@epita.fr>
19853
19854 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19855 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19856 (nitemset): for consistency with the rest of the project.
19857
23cbcc6c
AD
198582001-12-05 Akim Demaille <akim@epita.fr>
19859
19860 * src/closure.c (print_closure): Improve.
19861 (closure): Use it for printing input and output.
19862
03ec521c
AD
198632001-12-05 Akim Demaille <akim@epita.fr>
19864
19865 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19866 indexed by nonterminals.
19867
3a7456dd
AD
198682001-12-05 Akim Demaille <akim@epita.fr>
19869
19870 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19871 what it was!).
19872 * src/warshall.h: Remove accidental duplication of the content.
19873
1cbcf2e7
AD
198742001-12-05 Akim Demaille <akim@epita.fr>
19875
19876 * src/closure.c (set_fderives): De-obfuscate.
19877
84182270
AD
198782001-12-05 Akim Demaille <akim@epita.fr>
19879
19880 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19881
3f6f053c
AD
198822001-12-05 Akim Demaille <akim@epita.fr>
19883
19884 * src/closure.c (set_firsts): De-obfuscate.
19885
7a5350ba
AD
198862001-12-05 Akim Demaille <akim@epita.fr>
19887
19888 * src/output.c (action_row): De-obfuscate
19889 using the good o' techniques: arrays not pointers, variable
19890 locality, BITISSET, RESETBIT etc.
19891
d954473d
AD
198922001-12-05 Akim Demaille <akim@epita.fr>
19893
19894 Pessimize the code to simplify it: from now on, all the states
19895 have a valid SHIFTS, which NSHIFTS is possibly 0.
19896
19897 * src/LR0.c (shifts_new): Be global and move to..
19898 * src/state.c, src/state.h: here.
19899 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19900 * src/print_graph: Adjust.
19901
9839bbe5
AD
199022001-12-05 Akim Demaille <akim@epita.fr>
19903
19904 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19905 * src/conflicts.c: Use it.
19906 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19907 incorrectly ``simplified''.
19908
9f136c07
AD
199092001-12-05 Akim Demaille <akim@epita.fr>
19910
19911 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19912 using the good o' techniques: arrays not pointers, variable
19913 locality, BITISSET, RESETBIT etc.
19914
b608206e
AD
199152001-12-05 Akim Demaille <akim@epita.fr>
19916
19917 * src/state.h (SHIFT_SYMBOL): New.
19918 * src/conflicts.c: Use it to deobfuscate.
19919
52afa962
AD
199202001-12-05 Akim Demaille <akim@epita.fr>
19921
19922 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19923 (print_reductions): De-obfuscate using the good o' techniques:
19924 arrays not pointers, variable locality, BITISSET.
19925
e74dc321
AD
199262001-12-05 Akim Demaille <akim@epita.fr>
19927
19928 * src/conflicts.c (print_reductions): Arrays, not pointers.
19929 Use BITISSET.
19930
768fca83
AD
199312001-12-05 Akim Demaille <akim@epita.fr>
19932
19933 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19934
a17e599f
AD
199352001-12-05 Akim Demaille <akim@epita.fr>
19936
19937 * src/conflicts.c (print_reductions): Improve variable locality.
19938
a04bc341
AD
199392001-12-05 Akim Demaille <akim@epita.fr>
19940
19941 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19942
c8ea038e
AD
199432001-12-05 Akim Demaille <akim@epita.fr>
19944
19945 * src/conflicts.c (print_reductions): Improve variable locality.
19946
aa2aab3c
AD
199472001-12-05 Akim Demaille <akim@epita.fr>
19948
19949 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19950 * src/lalr.c: Use them.
19951
b178c8cc
AD
199522001-12-05 Akim Demaille <akim@epita.fr>
19953
19954 * src/LR0.c (augment_automaton): Formatting changes.
19955 Better variable locality.
19956
f67d13aa
AD
199572001-12-05 Akim Demaille <akim@epita.fr>
19958
19959 * src/lalr.c (matrix_print): New.
19960 (transpose): Use it.
19961 Use arrays instead of pointers.
19962
c2713865
AD
199632001-12-05 Akim Demaille <akim@epita.fr>
19964
19965 * src/lalr.c (maxrhs): Move to...
19966 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19967 * src/lalr.c (build_relations): Adjust.
19968
9887c18a
AD
199692001-12-05 Akim Demaille <akim@epita.fr>
19970
19971 * src/lalr.c (transpose): Free the memory allocated to the
19972 argument, as it is replaced by the results by the unique caller.
19973 (build_relations): Merely invoke transpose: it handles the memory
19974 deallocation.
19975 Improve variable locality.
19976 Avoid variables used as mere abbreviations.
19977 (compute_lookaheads): Use arrays instead of pointers.
19978
4d4f699c
AD
199792001-12-05 Akim Demaille <akim@epita.fr>
19980
19981 * src/lalr.c (initialize_F): Improve variable locality.
19982 Avoid variables used as mere abbreviations.
19983
80a69750
AD
199842001-12-05 Akim Demaille <akim@epita.fr>
19985
19986 * src/derives.c (print_derives): Display the ruleno.
19987 * src/lalr.c (initialize_F, transpose): Better variable locality
19988 to improve readability.
19989 Avoid variables used as mere abbreviations.
19990
fe961097
AD
199912001-12-05 Akim Demaille <akim@epita.fr>
19992
19993 * src/lalr.c (traverse): Use arrays instead of pointers.
19994
e3e4e814
AD
199952001-12-05 Akim Demaille <akim@epita.fr>
19996
19997 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19998 the handling of squeue.
19999 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20000
630e182b
AD
200012001-12-05 Akim Demaille <akim@epita.fr>
20002
20003 Because useless nonterminals are now kept alive (instead of being
20004 `destroyed'), we now sometimes examine them, and store information
20005 related to them. Hence we need to know their number, and adjust
20006 memory allocations.
20007
20008 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20009 static.
20010 * src/LR0.c (allocate_itemsets): The memory allocated to
20011 `symbol_count' was used for two different purpose: once to count
20012 the number of occurrences of each symbol, and later reassigned to
20013 `shift_symbol', containing the symbol that can be shifted from a
20014 given state.
20015 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20016 only, and...
20017 (new_itemsets): Allocate `shift_symbol' here.
20018 (allocate_itemsets): symbol_count includes useless nonterminals.
20019 Make room for them.
20020 (free_storage): Use `free', not `XFREE', for pointers that cannot
20021 be null.
20022
81b51460
AD
200232001-12-05 Akim Demaille <akim@epita.fr>
20024
20025 * src/nullable.c (set_nullable): Deobfuscate the handling of
20026 ritem.
20027 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20028
3067fbef
AD
200292001-12-05 Akim Demaille <akim@epita.fr>
20030
20031 * src/gram.c, src/gram.h (ritem_print): New.
20032 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20033 (This useless function was defined only to work around VMS linkers
20034 that can't handle compilation units with variables only).
20035 * src/reduce.c (dump_grammar): Use it to trace the construction of
20036 ritem.
20037
c2bea5f9
PE
200382001-12-04 Paul Eggert <eggert@twinsun.com>
20039
7d27c823
PE
20040 * src/bison.simple (union yyalloc): Change member names
20041 to be the same as the stack names.
20042 (yyparse): yyptr is now union yyalloc *, not char *.
20043 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20044 and may generate better code on some machines.
c2bea5f9
PE
20045 (yystpcpy): Use prototype if __STDC__ is defined, not just
20046 if __cplusplus is defined.
35687a9d 20047
2c8a9dfa
AD
200482001-11-30 Akim Demaille <akim@epita.fr>
20049
20050 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20051 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20052 Gettext doesn't compile cleanly, and dies with -Werror.
20053 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20054 Include WARNING_CFLAGS here.
20055 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20056 before being defined.
20057
f4e421e6
AD
200582001-11-27 Paul Eggert <eggert@twinsun.com>
20059
20060 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20061 First arg is int, not unsigned.
20062 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20063 (SIZE_MAX, UINT_MAX): New macros.
20064 (quotearg_n_options): Abort if N is negative.
20065 Avoid overflow check on hosts where size_t is 64 bits and int
20066 is 32 bits, as overflow is impossible there.
20067 Fix off-by-one typo that caused unnecessary reallocation.
20068
7093d0f5
AD
200692001-11-29 Paul Eggert <eggert@twinsun.com>
20070
20071 Name space cleanup in generated parser.
20072
20073 * doc/bison.texinfo (Bison Parser): Discuss system headers
20074 and their effect on the user name space.
20075
20076 * src/bison.simple:
20077 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20078 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20079 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20080
20081 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20082 on user names when possible.
20083
20084 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20085 Simplify test for whather <alloca.h> exists.
20086
20087 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20088
20089 (<stdio.h>): Include if YYDEBUG.
20090
20091 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20092 ! defined (yyoverflow) && ! defined (yymemcpy).
20093
20094 (yymemcpy, yyparse): Rename local variables as needed so that
20095 they all begin with 'yy'.
20096
20097 (yystrlen, yystpcpy): New functions.
20098
20099 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20100 All uses changed.
20101
20102 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20103 instead of relying on string.h functions. Use YYSTACK_ALLOC
20104 and YYSTACK_FREE instead of malloc and free.
20105
fd51e5ff
AD
201062001-11-30 Akim Demaille <akim@epita.fr>
20107
20108 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20109 before their first uses.
20110 (YYBISON, YYPURE): Move to the top of the output.
20111
7d13ff5f
AD
201122001-11-30 Akim Demaille <akim@epita.fr>
20113
20114 * tests/reduce.at (Useless Nonterminals): Fix.
20115
892a3995
AD
201162001-11-30 Akim Demaille <akim@epita.fr>
20117
20118 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20119 if body instead of `;' to pacify GCC's warnings.
20120
68f1e3ed
AD
201212001-11-30 Akim Demaille <akim@epita.fr>
20122
20123 Instead of mapping the LHS of unused rules to -1, keep the LHS
20124 valid, but flag the rules as invalid.
20125
20126 * src/gram.h (rule_t): `useful' is a new member.
20127 * src/print.c (print_grammar): Adjust.
20128 * src/derives.c (set_derives): Likewise.
20129 * src/reader.c (packgram, reduce_output): Likewise.
20130 * src/reduce.c (reduce_grammar_tables): Likewise.
20131 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20132
d2d1b42b
AD
201332001-11-30 Akim Demaille <akim@epita.fr>
20134
20135 * src/reduce.c (reduce_output): Formatting changes.
20136 * src/print.c (print_results, print_grammar): Likewise.
20137 * tests/regression.at (Rule Line Numbers)
20138 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20139
760b53a8
AD
201402001-11-30 Akim Demaille <akim@epita.fr>
20141
20142 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20143 useless nonterminals, move them at the end of the symbol arrays.
20144 (reduce_output): Adjust.
20145 * tests/reduce.at (Useless Nonterminals): Adjust.
20146
00238958
AD
201472001-11-30 Akim Demaille <akim@epita.fr>
20148
20149 * src/reduce.c: Various comment/formatting changes.
20150 (nonterminals_reduce): New, extracted from...
20151 (reduce_grammar_tables): here.
20152 (reduce_grammar): Call nonterminals_reduce.
20153
396452de
PE
201542001-11-29 Paul Eggert <eggert@twinsun.com>
20155
20156 * src/bison.simple (YYSTACK_REALLOC): Remove.
20157 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20158 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20159 New macros.
20160 (union yyalloc): New type.
20161 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20162 an arbitrary restriction on hosts where size_t is wider than int.
20163
20164 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20165 a parser stack overflow. Allocate just one block of memory for all
20166 three stacks, instead of allocating three blocks; this typically is
20167 faster and reduces fragmentation.
20168
20169 Do not limit the number of items in the stack to a value that fits
20170 in 'int', as this is an arbitrary limit on hosts with 64-bit
20171 size_t and 32-bit int.
20172
147e184c
MA
201732001-11-29 Marc Autret <autret_m@epita.fr>
20174
20175 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20176 of defining YYERROR_VERBOSE.
20177 [AT_DATA]: $4 is now out of C declarations in the prologue.
20178
426cf563
MA
201792001-11-28 Marc Autret <autret_m@epita.fr>
20180
20181 * src/reader.c (parse_dquoted_param): New.
20182 (parse_skel_decl): Use it.
20183 * src/lex.h: Add its prototype.
20184 * src/lex.c (literalchar): Become not static.
20185
c7925b99
MA
201862001-11-28 Marc Autret <autret_m@epita.fr>
20187
20188 * src/output.h: And put its extern declaration here.
20189 * src/output.c (error_verbose): Define here.
20190 (prepare): Echo name modification.
20191 * src/getargs.h: Clean its extern declaration.
20192 * src/getargs.c (error_verbose_flag): Remove.
20193 (getargs): Remove case 'e'.
20194 * src/options.c (option_table): 'error-verbose' is now seen as simple
20195 percent option.
20196 Include output.h.
20197
20198 * src/reader.c (read_declarations): Remove case tok_include.
20199 (parse_include_decl): Remove.
20200 * src/lex.h (token_t): Remove tok_include.
20201 * src/options.c (option_table): 'include' is now a simple command line
20202 option.
20203
5b5d1929
MA
202042001-11-28 Marc Autret <autret_m@epita.fr>
20205
20206 * src/bison.simple: Adjust muscle names.
20207 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20208 * src/output.c (prepare): s/_/-/ for the muscles names.
20209 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20210
8850be4b
MA
202112001-11-28 Marc Autret <autret_m@epita.fr>
20212
20213 * src/bison.simple: Fix debug.
20214 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20215
4a38e613
AD
202162001-11-28 Akim Demaille <akim@epita.fr>
20217
20218 * src/LR0.c (shifts_new): New.
20219 (save_shifts, insert_start_shift, augment_automaton): Use it.
20220
4b35e1c1
AD
202212001-11-28 Akim Demaille <akim@epita.fr>
20222
20223 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20224 keep ruleno only.
20225
d2b04478
AD
202262001-11-28 Akim Demaille <akim@epita.fr>
20227
20228 * src/closure.c (closure): Instead of looping over word in array
20229 then bits in words, loop over bits in array.
20230
2c4c30aa
AD
202312001-11-28 Akim Demaille <akim@epita.fr>
20232
20233 * src/closure.c (closure): No longer optimize the special case
20234 where all the bits of `ruleset[r]' are set to 0, to make the code
20235 clearer.
20236
576890b7
AD
202372001-11-28 Akim Demaille <akim@epita.fr>
20238
20239 * src/closure.c (closure): `r' and `c' are new variables, used to
20240 de-obfuscate accesses to RULESET and CORE.
20241
cb487d7d
AD
202422001-11-28 Akim Demaille <akim@epita.fr>
20243
20244 * src/reduce.c (reduce_print): Use ngettext.
20245 (dump_grammar): Improve the trace accuracy.
20246
6013d43f
AD
202472001-11-28 Akim Demaille <akim@epita.fr>
20248
20249 * src/reduce.c (dump_grammar): Don't translate trace messages.
20250
cb4956ee
AD
202512001-11-28 Akim Demaille <akim@epita.fr>
20252
20253 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20254 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20255 as all tags are free'ed afterwards.
20256 From Enrico Scholz.
20257
648185ab
PE
202582001-11-27 Paul Eggert <eggert@twinsun.com>
20259
20260 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20261 use alloca when we didn't want to, and vice versa.
20262
68254a03
MA
202632001-11-27 Marc Autret <autret_m@epita.fr>
20264
9113b58f
AD
20265 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20266 initialization.
68254a03
MA
20267 * src/output.c (prepare): Remove its update.
20268
04d843a2
MA
202692001-11-27 Marc Autret <autret_m@epita.fr>
20270
20271 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20272 Use %error-verbose.
20273
d2079671 202742001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
20275
20276 * src/bison.simple: Remove YYERROR_VERBOSE using.
20277 Use %%error_verbose.
20278 (yyparse): Likewise.
20279 * src/output.c (prepare): Give its final value.
20280 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20281 * src/getargs.h: Add its extern declaration.
20282 * src/getargs.c (error_verbose_flag): New int.
20283 (getargs): Update to catch new case.
20284 * src/options.c (option_table): 'error-verbose' is a new option.
20285 (shortopts): Update.
20286
e0327bc8
AD
202872001-11-27 Akim Demaille <akim@epita.fr>
20288
20289 * src/system.h: Use intl/libgettext.h.
20290 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20291
000f1a3c
AD
202922001-11-27 Akim Demaille <akim@epita.fr>
20293
20294 * tests/torture.at (Exploding the Stack Size with Malloc):
20295 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20296
26cfe0be
AD
202972001-11-27 Akim Demaille <akim@epita.fr>
20298
20299 * src/files.c: Include error.h.
20300 Reported by Hans Aberg.
20301
f6bd5427
MA
203022001-11-26 Marc Autret <autret_m@epita.fr>
20303
d2079671 20304 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
20305 (read_declarations): Add case tok_include.
20306 * src/getargs.h (include): Add its extern definition.
20307 * src/getargs.c (include): New const char *.
20308 (getargs): Add case '-I'.
20309 * src/options.c (option_table): Add include as command line and
20310 percent option.
20311 * src/lex.h (token_t): Add tok_include.
20312
2ca209c1
AD
203132001-11-26 Akim Demaille <akim@epita.fr>
20314
20315 * src/reader.c (readgram): Make sure rules for mid-rule actions
20316 have a lineno equal to that of their host rule.
20317 Reported by Hans Aberg.
20318 * tests/regression.at (Rule Line Numbers): New.
20319
0e41b407
AD
203202001-11-26 Akim Demaille <akim@epita.fr>
20321
20322 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20323 size_ts.
20324
203252001-11-26 Akim Demaille <akim@epita.fr>
20326
20327 * src/complain.c, src/complain.h (error): Remove, provided by
20328 lib/error.[ch].
20329
e0c40012
AD
203302001-11-26 Akim Demaille <akim@epita.fr>
20331
20332 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20333 issue an error message.
20334 * tests/regression.at (Invalid %directive): New.
20335 Reported by Hans Aberg.
20336
5e147124
AD
203372001-11-26 Akim Demaille <akim@epita.fr>
20338
20339 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20340 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20341
a034c8b8
AD
203422001-11-26 Akim Demaille <akim@epita.fr>
20343
20344 * src/conflicts.c (conflicts_print): Don't complain at all when
20345 there are no reduce/reduce conflicts, and as many shift/reduce
20346 conflicts as expected.
20347 * tests/regression.at (%expect right): Adjust.
20348
c64a20f3
AD
203492001-11-23 Akim Demaille <akim@epita.fr>
20350
20351 * lib/alloca.c: Update, from fileutils.
20352
5b0d29bb
AD
203532001-11-23 Akim Demaille <akim@epita.fr>
20354
20355 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20356
722c4bfe
AD
203572001-11-23 Akim Demaille <akim@epita.fr>
20358
20359 * src/system.h: Include alloca.h.
20360 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20361
6255b435
AD
203622001-11-23 Akim Demaille <akim@epita.fr>
20363
20364 * src/print_graph.c (print_actions): Remove `rule', unused.
20365 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20366 pacify GCC's signed < unsigned warnings.
20367 * src/closure.c (itemsetsize): Likewise.
20368 * src/reader.c (symbol_list_new): Static.
20369
b29b2ed5
AD
203702001-11-23 Akim Demaille <akim@epita.fr>
20371
20372 Attaching lineno to buckets is stupid, since only one copy of each
20373 symbol is kept, only the line of the first occurrence is kept too.
20374
20375 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20376 * src/reader.c (rline_allocated): Remove, unused.
20377 (symbol_list): Have a `line' member.
20378 (symbol_list_new): New.
20379 (readgram): Use it.
20380 * src/print.c (print_grammar): Output the rule line numbers.
20381 * tests/regression.at (Solved SR Conflicts)
20382 (Unresolved SR Conflicts): Adjust.
20383 Reported by Hans Aberg.
20384
a81b1d4a
MA
203852001-11-22 Marc Autret <autret_m@epita.fr>
20386
20387 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20388
c1ecb3c1
MA
203892001-11-22 Marc Autret <autret_m@epita.fr>
20390
20391 * src/muscle_tab.c (muscle_init): Remove initialization of
20392 skeleton muscle.
20393 * src/output.c (output_master_parser): Do it here.
20394
fbe01355
AD
203952001-11-20 Akim Demaille <akim@epita.fr>
20396
20397 * po/sv.po: New.
20398 * configure.in (ALL_LINGUAS): Adjust.
20399 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20400 longer contains strings to translate.
20401
81e895c0
AD
204022001-11-19 Akim Demaille <akim@epita.fr>
20403
20404 * src/conflicts.c (conflicts_print): Add a missing \n.
20405
6bb1878b
AD
204062001-11-19 Akim Demaille <akim@epita.fr>
20407
20408 * src/nullable.c (nullable_print): New.
20409 (set_nullable): Call it when tracing.
20410 Better locality of variables.
20411
d9ec2d07
AD
204122001-11-19 Akim Demaille <akim@epita.fr>
20413
20414 * src/print.c (print_actions): Better locality of variables.
20415
720e5c1b
AD
204162001-11-19 Akim Demaille <akim@epita.fr>
20417
20418 * src/derives.c (print_derives): Fix and enrich.
20419 * src/closure.c (print_fderives): Likewise.
20420
fb908786
AD
204212001-11-19 Akim Demaille <akim@epita.fr>
20422
20423 * src/closure.c (itemsetend): Remove, replaced with...
20424 (itemsetsize): new.
20425
125ecb56
AD
204262001-11-19 Akim Demaille <akim@epita.fr>
20427
20428 * src/LR0.c (kernel_end): Remove, replaced with...
20429 (kernel_size): new.
20430
d8cf039f
AD
204312001-11-19 Akim Demaille <akim@epita.fr>
20432
20433 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20434 to clarify.
20435
7bec0760
AD
204362001-11-19 Akim Demaille <akim@epita.fr>
20437
20438 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20439
c87d4863
AD
204402001-11-19 Akim Demaille <akim@epita.fr>
20441
20442 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20443 trace messages.
20444 * src/LR0.c: Likewise.
20445 (allocate_itemsets): Use arrays instead of pointers to clarify.
20446
9bfe901c
AD
204472001-11-19 Akim Demaille <akim@epita.fr>
20448
20449 * src/getargs.c (statistics_flag): Replace with...
20450 (trace_flag): New.
20451 (longopts): Accept --trace instead of --statistics.
20452 * src/getargs.h, src/options.c: Adjust.
20453 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20454 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20455
97db7bd4
AD
204562001-11-19 Akim Demaille <akim@epita.fr>
20457
cc72668c 20458 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
20459 pointers to clarify the code.
20460 (save_reductions, save_shifts): Factor common parts of alternatives.
20461
2c5f66ed
AD
204622001-11-19 Akim Demaille <akim@epita.fr>
20463
20464 * src/LR0.c (new_state, get_state): Complete TRACE code.
20465 * src/closure.c: Include `reader.h' to get `tags', needed by the
20466 trace code.
20467 Rename the conditional DEBUG as TRACE.
20468 Output consistently TRACEs to stderr, not stdout.
20469 * src/derives.c: Likewise.
20470 * src/reduce.c: (inaccessable_symbols): Using if is better style
20471 than goto.
20472 Use `#if TRACE' instead of `#if 0' for tracing code.
20473
300f275f
AD
204742001-11-19 Akim Demaille <akim@epita.fr>
20475
20476 * src/system.h (LIST_FREE, shortcpy): New.
20477 * src/LR0.c: Use them.
20478 * src/output.c (free_itemsets, free_reductions, free_shifts):
20479 Remove, replaced by LIST_FREE.
20480
f59c437a
AD
204812001-11-19 Akim Demaille <akim@epita.fr>
20482
20483 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20484 (REDUCTIONS_ALLOC): New.
20485 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20486 allocation.
20487
6986fd9e
AD
204882001-11-19 Akim Demaille <akim@epita.fr>
20489
20490 * src/LR0.c (new_state): Complete trace code.
20491 * src/nullable.c (set_nullable): Don't translate traces.
20492
4bc30f78
AD
204932001-11-19 Akim Demaille <akim@epita.fr>
20494
20495 * src/print_graph.c (print_core): Better locality of variables.
20496 * src/print.c (print_core): Likewise.
20497
08a946e0
AD
204982001-11-19 Akim Demaille <akim@epita.fr>
20499
20500 * src/vcg.c: You do the output, so you are responsible of the
20501 handling of VCG syntax, in particular: use quotearg.
20502 * src/print_graph.c: Don't.
20503 (print_actions): Don't output the actions as part of the nodes,
20504 since that's the job of the edges.
20505 (print_state): Don't output by hand: fill the node description,
9bfe901c 20506 and ask for its output.
08a946e0 20507
f0473484
AD
205082001-11-19 Akim Demaille <akim@epita.fr>
20509
cc72668c
AD
20510 * src/bison.simple (yyparse): When verbosely reporting an error,
20511 no longer put additional quotes around token names.
f0473484
AD
20512 * tests/calc.at: Adjust.
20513
e41dc700
AD
205142001-11-19 Akim Demaille <akim@epita.fr>
20515
20516 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20517 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20518 * src/output.c: Adjust.
20519
652a871c
AD
205202001-11-19 Akim Demaille <akim@epita.fr>
20521
20522 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20523 (rule_t): this.
20524 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20525
b2ed6e58
AD
205262001-11-19 Akim Demaille <akim@epita.fr>
20527
20528 * src/gram.h (rule_t): New.
20529 (rule_table): New.
20530 (rrhs, rlhs): Remove, part of state_t.
20531 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20532 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20533 * src/reader.c, src/reduce.c: Adjust.
20534
edad7067
AD
205352001-11-19 Akim Demaille <akim@epita.fr>
20536
20537 * src/reader.c (symbols_output): New, extracted from...
20538 (packsymbols): Here.
20539 (reader): Call it.
20540
3feec034
AD
205412001-11-19 Akim Demaille <akim@epita.fr>
20542
20543 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20544 (maxrhs): this new function.
20545
ddcd5fdf
AD
205462001-11-19 Akim Demaille <akim@epita.fr>
20547
cc72668c 20548 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
20549 Adjust.
20550
bb527fc2
AD
205512001-11-19 Akim Demaille <akim@epita.fr>
20552
cc72668c 20553 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
20554 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20555 * src/lalr.c: Adjust.
20556
a845a697
AD
205572001-11-19 Akim Demaille <akim@epita.fr>
20558
20559 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20560 (set_state_table): handle the `lookaheads' members.
20561
f004bf6a
AD
205622001-11-19 Akim Demaille <akim@epita.fr>
20563
cc72668c
AD
20564 * src/lalr.h (lookaheads): Removed array, whose contents is now
20565 a member of...
f004bf6a
AD
20566 (state_t): this structure.
20567 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20568 Adjust.
20569
de326cc0
AD
205702001-11-19 Akim Demaille <akim@epita.fr>
20571
cc72668c
AD
20572 * src/lalr.h (consistent): Removed array, whose contents is now
20573 a member of...
de326cc0
AD
20574 (state_t): this structure.
20575 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20576 Adjust.
20577
90b4416b
AD
205782001-11-19 Akim Demaille <akim@epita.fr>
20579
cc72668c
AD
20580 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20581 contents are now members of...
90b4416b
AD
20582 (state_t): this structure.
20583 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20584 Adjust.
20585
9703cc49
AD
205862001-11-19 Akim Demaille <akim@epita.fr>
20587
20588 * src/lalr.h (state_t): New.
20589 (state_table): Be a state_t * instead of a core **.
20590 (accessing_symbol): Remove, part of state_t.
20591 * src/lalr.c: Adjust.
20592 (set_accessing_symbol): Merge into...
20593 (set_state_table): this.
20594 * src/print_graph.c, src/conflicts.c: Adjust.
20595
d803322e
AD
205962001-11-14 Akim Demaille <akim@epita.fr>
20597
20598 * tests/calc.at, tests/output.at, tests/regression.at,
20599 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20600 now the tests are run in private dirs, therefore AC_CLEANUP and
20601 family can be simplified to 0-ary.
20602 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20603 use abs. path to find config.h.
20604 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20605 stderr, there can be way too much random noise.
20606 Instead pass -Werror to GCC and rely on the exit status.
20607 Reported by Wolfram Wagner.
20608
3d76b07d
AD
206092001-11-14 Akim Demaille <akim@epita.fr>
20610
20611 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20612 defined only if yyoverflow is defined, to avoid `warning: unused
20613 variable `yyvs1''.
20614 Reported by The Test Suite.
20615
09b503c8
AD
206162001-11-14 Akim Demaille <akim@epita.fr>
20617
20618 * src/print.c: Include reduce.h.
20619 Reported by Hans Aberg.
20620
206212001-11-14 Akim Demaille <akim@epita.fr>
20622
20623 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20624 Revert a previous patch: these are really const.
20625 * src/conflicts.c (conflict_report): Additional useless pair of
20626 braces to pacify GCC's warnings for `if () if () {} else {}'.
20627 * src/lex.c (parse_percent_token): Replace equal_offset with
20628 arg_offset.
20629 arg is const.
20630 Be sure to strdup `arg' when used, since there is no reason for
20631 token_buffer not to change.
20632
0f37a994
AD
206332001-11-14 Akim Demaille <akim@epita.fr>
20634
20635 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20636 definition.
20637 * src/main.c (main): Use them.
20638 Suggested by Hans Aberg.
20639
d39d93b8
AD
206402001-11-12 Akim Demaille <akim@epita.fr>
20641
20642 * src/system.h (ngettext): Now that we use ngettext, be sure to
20643 provide a default definition when NLS are not used.
20644
9edcd895
AD
206452001-11-12 Akim Demaille <akim@epita.fr>
20646
20647 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20648 Use @kbd to denote user input.
20649 (Language and Grammar): ANSIfy the example.
20650 Adjust its layout for info/notinfo.
20651 (Location Tracking Calc): Output error messages to stderr.
20652 Output locations in a more GNUtically correct way.
20653 Fix a couple of Englishos.
20654 Adjust @group/@end group pairs.
20655
7da99ede
AD
206562001-11-12 Akim Demaille <akim@epita.fr>
20657
e3aa65c5 20658 %expect was not functioning at all.
7da99ede
AD
20659
20660 * src/conflicts.c (expected_conflicts): Set to -1.
20661 (conflict_report): Use ngettext.
20662 (conflicts_print): Check %expect and make its violation an error.
20663 * doc/bison.texinfo (Expect Decl): Adjust.
20664 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20665 * tests/regression.at (%expect not enough, %expect right)
20666 (%expect too much): New.
20667
ba9dda1a
AD
206682001-11-12 Akim Demaille <akim@epita.fr>
20669
20670 * tests/regression.at (Conflicts): Rename as...
20671 (Unresolved SR Conflicts): this.
20672 (Solved SR Conflicts): New.
20673
337c5bd1
AD
206742001-11-12 Akim Demaille <akim@epita.fr>
20675
20676 * src/reduce.c (print_results): Rename as...
20677 (reduce_output): This.
20678 Output to OUT, passed as argument, instead of output_obstack.
20679 (dump_grammar): Likewise.
20680 (reduce_free): New.
20681 Also free V1.
20682 (reduce_grammar): No longer call reduce_output, since...
20683 * src/print.c (print_results): do it.
20684 * src/main.c (main): Call reduce_free;
20685
c73a41af
AD
206862001-11-12 Akim Demaille <akim@epita.fr>
20687
20688 * src/conflicts.c (print_reductions): Accept OUT as argument.
20689 Output to it, not to output_obstack.
20690 * src/print.c (print_actions): Adjust.
20691
0df87bb6
AD
206922001-11-12 Akim Demaille <akim@epita.fr>
20693
20694 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20695 the result instead of using...
20696 (src_total, rrc_total, src_count, rrc_count): Remove.
20697 (any_conflicts): Remove.
20698 (print_conflicts): Split into...
20699 (conflicts_print, conflicts_output): New.
20700 * src/conflicts.h: Adjust.
20701 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 20702 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
20703 * tests/regression.at (Conflicts): New.
20704 Reported by Tom Lane.
20705
e4d3d4de
AD
207062001-11-12 Akim Demaille <akim@epita.fr>
20707
20708 * tests/regression.at (Invalid input): Remove, duplicate with
20709 ``Invalid input: 1''.
20710
6d7d248e
AD
207112001-11-12 Akim Demaille <akim@epita.fr>
20712
20713 * tests/torture.at (AT_DATA_STACK_TORTURE)
20714 (Exploding the Stack Size with Alloca)
20715 (Exploding the Stack Size with Malloc): New.
20716
e9e4c321
AD
207172001-11-12 Akim Demaille <akim@epita.fr>
20718
20719 * src/bison.simple (YYSTACK_REALLOC): New.
20720 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 20721 Reported by Per Allansson.
e9e4c321 20722
5f7e0832
AD
207232001-11-12 Pascal Bart <pascal.bart@epita.fr>
20724
20725 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20726 define CPP macro, which substitute YYSTYPE by yystype.
20727 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20728 with yyltype/YYLTYPE. This allows inclusion of the generated
20729 header within the parser if the compiler, such as GGC, accepts
20730 multiple equivalent #defines.
20731 From Akim.
20732
e3f1699f
AD
207332001-11-05 Akim Demaille <akim@epita.fr>
20734
20735 * src/reader.c (symbols_output): New, extracted from...
20736 (packsymbols): here.
20737 (reader): Adjust.
20738
65be0866
AD
207392001-11-05 Akim Demaille <akim@epita.fr>
20740
20741 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20742
e4d910bf
AD
207432001-11-05 Akim Demaille <akim@epita.fr>
20744
20745 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20746 pattern.
20747
951366c1
AD
207482001-11-05 Akim Demaille <akim@epita.fr>
20749
20750 * src/options.h (struct option_table_struct): set_flags is void*.
20751 * src/options.c (longopts): Support `--output' and `%output'.
20752 (usage): Adjust.
20753 * src/lex.h (tok_setopt): Remove, replaced with...
20754 (tok_intopt, tok_stropt): these new guys.
20755 * src/lex.c (getopt.h): Not needed.
20756 (token_buffer, unlexed_token_buffer): Not const.
20757 (percent_table): Promote `-' over `_' in directive names.
20758 Active `%name-prefix', `file-prefix', and `output'.
20759 (parse_percent_token): Accept possible arguments to directives.
20760 Promote `-' over `_' in directive names.
20761
d8988b2f
AD
207622001-11-04 Akim Demaille <akim@epita.fr>
20763
20764 * doc/bison.texinfo (Decl Summary): Split the list into
20765 `directives for grammars' and `directives for bison'.
20766 Sort'em.
20767 Add description of `%name-prefix', `file-prefix', and `output'.
20768 Promote `-' over `_' in directive names.
20769 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20770 Simplify the description of `--name-prefix'.
20771 Promote `-' over `_' in directive names.
20772 Promote `--output' over `--output-file'.
20773 Fix the description of `--defines'.
20774 * tests/output.at: Exercise %file-prefix and %output.
20775
6468d18e
AD
207762001-11-02 Akim Demaille <akim@epita.fr>
20777
20778 * doc/refcard.tex: Update.
20779
6b7e85b9
AD
207802001-11-02 Akim Demaille <akim@epita.fr>
20781
20782 * src/symtab.h (SUNDEF): New.
20783 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20784 stand for `uninitialized', instead of 0.
20785 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20786 * src/lex.c (lex): Adjust.
20787
20788 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20789 Number it 0.
20790 Let yylex return it instead of a plain 0.
20791 Reported by Dick Streefland.
20792
cd5aafcf
AD
207932001-11-02 Akim Demaille <akim@epita.fr>
20794
20795 * tests/regression.at (Mixing %token styles): New test.
20796
037ca2f1
AD
207972001-11-02 Akim Demaille <akim@epita.fr>
20798
20799 * src/reader.c (parse_thong_decl): Formatting changes.
20800 (token_translations_init): New, extracted from...
20801 (packsymbols): Here.
20802 Adjust.
20803
270a173c
AD
208042001-11-01 Akim Demaille <akim@epita.fr>
20805
20806 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20807 Check that `9foo.y' produces correct cpp guards.
20808 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20809 guards.
20810 Reported by Wwp.
20811
561f9a30
AD
208122001-11-01 Akim Demaille <akim@epita.fr>
20813
20814 * tests/regression.at (Invalid input: 2): New.
20815 * src/lex.c (unlexed_token_buffer): New.
20816 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20817 too.
20818 Reported by Wwp.
20819
f987e9d2
AD
208202001-11-01 Akim Demaille <akim@epita.fr>
20821
20822 * tests/calc.at: Catch up with 1.30.
20823 * configure.in: Bump to 1.49a.
20824 Adjust to newer Autotest.
20825
0846f581
PB
208262001-10-19 Pascal Bart <pascal.bart@epita.fr>
20827
20828 * src/conflicts.c: Move global variables rrc_total and src_total ...
20829 (print_conflicts): here.
20830 * src/output.c (output): Free global variable user_toknums.
20831 * src/lex.c (token_obstack): Become static.
20832
3c1a79b3
AD
208332001-10-18 Akim Demaille <akim@epita.fr>
20834
20835 * tests/atlocal.in (GCC): Add.
20836 * tests/calc.at: s/m4_match/m4_bmatch/.
20837 s/m4_patsubst/m4_bpatsubst/.
20838 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20839 * configure.in: AC_SUBST(GCC).
20840
5d52e7d0
MA
208412001-10-14 Marc Autret <autret_m@epita.fr>
20842
20843 * src/options.c (create_long_option_table): Fix.
20844
631aa1d3
AD
208452001-10-10 Akim Demaille <akim@epita.fr>
20846
20847 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20848
f6ec6d13
AD
208492001-10-04 Akim Demaille <akim@epita.fr>
20850
20851 * src/reader.c (parse_union_decl): Push the caracters in
20852 union_obstack, not attrs_obstack.
20853
342b8b6e
AD
208542001-10-04 Akim Demaille <akim@epita.fr>
20855
20856 Merge in the branch 1.29.
20857
20858 * src/reader.c (packsymbols): Use a temporary obstack for
20859 `%%tokendef', since output_stack is already used elsewhere.
20860
20861 2001-10-02 Akim Demaille <akim@epita.fr>
20862
20863 Bump 1.29d.
20864
20865 2001-10-02 Akim Demaille <akim@epita.fr>
20866
20867 Version 1.29c.
20868
20869 2001-10-02 Akim Demaille <akim@epita.fr>
20870
20871 * tests/regression.at (Invalid CPP headers): New.
20872 From Alexander Belopolsky.
20873 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20874
20875 2001-10-02 Akim Demaille <akim@epita.fr>
20876
20877 * tests/regression.at (Invalid input): New.
20878 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20879 Reported by Shura.
20880
20881 2001-10-02 Akim Demaille <akim@epita.fr>
20882
20883 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20884
20885 2001-10-02 Akim Demaille <akim@epita.fr>
20886
20887 * src/output.c (output_parser): Assert `skeleton'.
20888 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20889 systems.
20890 From Shura.
20891
20892 2001-10-01 Marc Autret <autret_m@epita.fr>
20893
20894 * src/lex.h: Echo modifications.
20895 * src/lex.c (unlex): Parameter is now token_t.
20896 From Hans Aberg.
20897
20898 2001-10-01 Marc Autret <autret_m@epita.fr>
20899
20900 * src/main.c: Include lex.h.
20901 From Hans Aberg.
20902
20903 2001-09-29 Akim Demaille <akim@epita.fr>
20904
20905 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20906
20907 2001-09-28 Akim Demaille <akim@epita.fr>
20908
20909 * tests/testsuite.at: Update to newer Autotest.
20910 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20911
20912 2001-09-27 Akim Demaille <akim@epita.fr>
20913
20914 Position independent wrapper.
20915
20916 * tests/bison: Remove.
20917 * tests/bison.in: New.
20918 * configure.in: Adjust.
20919
20920 2001-09-27 Paul Eggert <eggert@twinsun.com>
20921
20922 Port quotearg fixes from tar 1.13.24.
20923
20924 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20925 tm to be declared.
20926 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20927 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20928
20929 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20930 * m4/mbrtowc.m4: New file.
20931 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20932 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20933
20934 2001-09-27 Akim Demaille <akim@epita.fr>
20935
20936 Bump to 1.29c.
20937
20938 2001-09-27 Akim Demaille <akim@epita.fr>
20939
20940 Version 1.29b.
20941
20942 2001-09-25 Akim Demaille <akim@epita.fr>
20943
20944 * src/system.h: Include `xalloc.h'.
20945 Remove it from the C files.
20946 * src/files.c (output_files): Free the obstacks.
20947 * src/lex.c (init_lex): Rename as...
20948 (lex_init): this.
20949 (lex_free): New.
20950 * src/main.c (main): Use it.
20951
20952 2001-09-24 Marc Autret <autret_m@epita.fr>
20953
20954 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20955 to output informations in fout (FILE*).
20956 (open_graph, close_graph): Likewise.
20957 (output_graph, output_edge, output_node): Likewise.
20958 * src/vcg.h: Update function prototypes.
20959 * src/print_graph.c (print_graph): Open output graph file.
20960 (print_actions): Adjust.
20961 * src/files.h: Remove extern declaration.
20962 * src/files.c: Remove graph_obstack declaration.
20963 (open_files): Remove graph_obstack initialization.
20964 (output_files): Remove graph_obstack saving.
20965
20966 2001-09-24 Marc Autret <autret_m@epita.fr>
20967
20968 * src/files.c (compute_output_file_names): Fix.
20969
20970 2001-09-24 Marc Autret <autret_m@epita.fr>,
20971 Akim Demaille <akim@epita.fr>
20972
20973 * src/reader.c (reader): Remove call to free_symtab ().
20974 * src/main.c (main): Call it here.
20975 Include symtab.h.
20976 * src/conflicts.c (initialize_conflicts): Rename as...
20977 (solve_conflicts): this.
20978 * src/print.c (print_core, print_actions, print_state)
20979 (print_grammar): Dump to a file instead a `output_obstack'.
20980 (print_results): Dump `output_obstack', and then proceed with the
20981 FILE *.
20982 * src/files.c (compute_output_file_names, close_files): New.
20983 (output_files): Adjust.
20984 * src/main.c (main): Adjust.
20985
20986 2001-09-23 Marc Autret <autret_m@epita.fr>
20987
20988 * src/files.c (compute_header_macro): Computes header macro name
20989 from spec_defines_file when given.
20990
20991 2001-09-23 Marc Autret <autret_m@epita.fr>
20992
20993 * src/files.c (output_files): Add default extensions.
20994
20995 2001-09-22 Akim Demaille <akim@epita.fr>
20996
20997 * src/conflicts.c (finalize_conflicts): Rename as...
20998 (free_conflicts): this.
20999
21000 2001-09-22 Akim Demaille <akim@epita.fr>
21001
21002 * src/gram.c (gram_free): Rename back as...
21003 (dummy): this.
21004 (output_token_translations): Free `token_translations'.
21005 * src/symtab.c (free_symtab): Free the tag field.
21006
21007 2001-09-22 Akim Demaille <akim@epita.fr>
21008
21009 Remove `translations' as it is always set to true.
21010
21011 * src/gram.h: Adjust.
21012 * src/reader.c (packsymbols, parse_token_decl): Adjust
21013 * src/print.c (print_grammar): Adjust.
21014 * src/output.c (output_token_translations): Adjust.
21015 * src/lex.c (lex): Adjust.
21016 * src/gram.c: Be sure the set pointers to NULL.
21017 (dummy): Rename as...
21018 (gram_free): this.
21019
21020 2001-09-22 Akim Demaille <akim@epita.fr>
21021
21022 * configure.in: Invoke AM_LIB_DMALLOC.
21023 * src/system.h: Use dmalloc.
21024 * src/LR0.c: Be sure to have pointers initialized to NULL.
21025 (allocate_itemsets): Allocate kernel_items only if needed.
21026
21027 2001-09-22 Akim Demaille <akim@epita.fr>
21028
21029 * configure.in: Bump to 1.29b.
21030 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21031 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21032 need xmalloc.c in calc.y.
21033 From Pascal Bart.
21034
21035 2001-09-21 Akim Demaille <akim@epita.fr>
21036
21037 Version 1.29a.
21038 * Makefile.maint, config/config.guess, config/config.sub,
21039 * config/missing: Update from masters.
21040 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21041 upon package.m4.
21042 * configure.in (ALL_LINGUAS): Add `tr'.
21043
21044 2001-09-21 Akim Demaille <akim@epita.fr>
21045
21046 * tests/Makefile.am (package.m4): Move to...
21047 ($(srcdir)/$(TESTSUITE)): here.
21048
21049 2001-09-20 Akim Demaille <akim@epita.fr>
21050
21051 * src/complain.c: No longer try to be standalone: use system.h.
21052 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21053 * src/complain.h: Likewise.
21054 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21055 Remove the unused variable `n'.
21056 From Albert Chin-A-Young.
21057
21058 2001-09-18 Marc Autret <autret_m@epita.fr>
21059
21060 * doc/bison.1: Update.
21061 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21062 descriptions.
21063 (Option Cross Key): Update.
21064 Add --graph.
21065
21066 2001-09-18 Marc Autret <autret_m@epita.fr>
21067
21068 * tests/regression.at: New test (comment in %union).
21069
21070 2001-09-18 Marc Autret <autret_m@epita.fr>
21071
21072 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21073 do that.
21074 Reported by Keith Browne.
21075
21076 2001-09-18 Marc Autret <autret_m@epita.fr>
21077
21078 * tests/output.at: Add tests for --defines and --graph.
21079
21080 2001-09-18 Marc Autret <autret_m@epita.fr>
21081
21082 * tests/output.at: Removes tests of %{header,src}_extension features.
21083
21084 2001-09-18 Akim Demaille <akim@epita.fr>
21085
21086 * tests/Makefile.am (package.m4): New.
21087 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21088 (_AT_CHECK_CALC_ERROR): Likewise.
21089 Factor the `, ' part of verbose error messages.
21090
21091 2001-09-18 Marc Autret <autret_m@epita.fr>
21092
21093 * src/getargs.c (longopts): Declare --defines and --graph as options
21094 with optional arguments.
21095 * src/files.h: Add extern declarations.
21096 * src/files.c (spec_graph_file, spec_defines_file): New.
21097 (output_files): Update.
21098 Remove CPP-outed code.
21099
21100 2001-09-18 Marc Autret <autret_m@epita.fr>
21101
21102 Turn off %{source,header}_extension feature.
21103
21104 * src/files.c (compute_exts_from_gf): Update.
21105 (compute_exts_from_src): Update.
21106 (output_files): CPP-out useless code.
21107 * src/files.h: Remove {header,source}_extension extern declarations.
21108 * src/reader.c (parse_dquoted_param): CPP-out.
21109 (parse_header_extension_decl): Remove.
21110 (parse_source_extension_decl): Remove.
21111 (read_declarations): Remove cases tok_{hdrext,srcext}.
21112 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21113 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21114
21115 2001-09-10 Akim Demaille <akim@epita.fr>
21116
21117 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21118 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21119 (AT_CHECK_OUTPUT): this.
21120 Merely check ls' exit status, its output is useless.
21121
21122 2001-09-10 Akim Demaille <akim@epita.fr>
21123
21124 * tests/calc.at: Use m4_match.
21125 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21126
21127 2001-09-10 Marc Autret <autret_m@epita.fr>,
21128 Akim Demaille <akim@epita.fr>
21129
21130 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21131 enum color_e.
21132 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21133 to `normal'.
21134 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21135 * src/lex.h: Adjust prototype.
21136 (token_t): Add `tok_undef'.
21137 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21138 (parse_percent_token): Now returns token_t.
21139 Add default statement in switch.
21140 (lex): Separate `c' as an input variable, from the token_t result
21141 part.
21142 (unlexed): Is a token_t.
21143
21144 2001-09-10 Akim Demaille <akim@epita.fr>
21145
21146 * configure.in: Bump to 1.29a.
21147
21148 2001-09-07 Akim Demaille <akim@epita.fr>
21149
21150 Version 1.29.
21151
21152 2001-08-30 Akim Demaille <akim@epita.fr>
21153
21154 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21155 * m4/atconfig.m4: Remove.
21156 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21157 * tests/bison: New.
21158 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21159 m4_if, m4_patsubst, and m4_regexp.
21160 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21161 `input' file instead of echo.
21162
21163 2001-08-29 Akim Demaille <akim@epita.fr>
21164
21165 Bump to 1.28e.
21166
21167 2001-08-29 Akim Demaille <akim@epita.fr>
21168
21169 Version 1.28d.
21170
21171 2001-08-29 Paul Eggert <eggert@twinsun.com>
21172
21173 * src/bison.simple (yyparse): Don't take the address of an
21174 item before the start of an array, as that doesn't conform to
21175 the C Standard.
21176
21177 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21178
21179 * doc/bison.texinfo (Location Tracking Calc): New node.
21180
21181 2001-08-29 Paul Eggert <eggert@twinsun.com>
21182
21183 * src/output.c (output): Do not define const, as this now
21184 causes more problems than it cures.
21185
21186 2001-08-29 Akim Demaille <akim@epita.fr>
21187
21188 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21189 the nodes.
21190 Be sure to tag the `detailmenu'.
21191
21192 2001-08-29 Akim Demaille <akim@epita.fr>
21193
21194 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21195 download in a tmp dir.
21196
21197 2001-08-28 Marc Autret <autret_m@epita.fr>
21198
21199 * config/depcomp: New file.
21200
21201 2001-08-28 Marc Autret <autret_m@epita.fr>
21202
21203 * doc/bison.1 (mandoc): Adjust.
21204 From Juan Manuel Guerrero.
21205
21206 2001-08-28 Marc Autret <autret_m@epita.fr>
21207
21208 * src/print_graph.c (print_state): Fix.
21209
21210 2001-08-27 Marc Autret <autret_m@epita.fr>
21211
21212 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21213 char * members.
21214 Echo modifications to the functions prototypes.
21215 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21216
21217 2001-08-27 Marc Autret <autret_m@epita.fr>
21218
21219 * src/vcg.c: Include `xalloc.h'.
21220 (add_colorentry): New.
21221 (add_classname): New.
21222 (add_infoname): New.
21223 * src/vcg.h: Add new prototypes.
21224
21225 2001-08-27 Akim Demaille <akim@epita.fr>
21226
21227 * Makefile.maint: Sync. again with CVS Autoconf.
21228
21229 2001-08-27 Akim Demaille <akim@epita.fr>
21230
21231 * Makefile.maint: Formatting changes.
21232 (po-update, cvs-update, update): New targets.
21233 (AMTAR): Remove.
21234
21235 2001-08-27 Akim Demaille <akim@epita.fr>
21236
21237 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21238 * Makefile.maint: Sync. with CVS Autoconf.
21239
21240 2001-08-27 Marc Autret <autret_m@epita.fr>
21241
21242 * src/vcg.h (struct infoname_s): New.
21243 (struct colorentry_s): New.
21244 (graph_s): New fields {vertical,horizontal}_order in structure.
21245 Add `infoname' field.
21246 Add `colorentry' field;
21247 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21248 (G_HORIZONTAL_ORDER): New.
21249 (G_INFONAME): New.
21250 (G_COLORENTRY): New.
21251 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21252 Add output of `infoname'.
21253 Add output of `colorentry'.
21254
21255 2001-08-27 Marc Autret <autret_m@epita.fr>
21256
21257 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21258 This one shadowed a global parameter.
21259
21260 2001-08-24 Marc Autret <autret_m@epita.fr>
21261
21262 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21263 instead of `unsigned'.
21264 (print_state): Do not call obstack_object_size () in obstack_grow ()
21265 to avoid macro variables shadowing.
21266
21267 2001-08-23 Marc Autret <autret_m@epita.fr>
21268
21269 * src/lex.c (percent_table): Typo: s/naem/name/.
21270 Add graph option.
21271 Normalize new options declarations.
21272
21273 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21274
21275 * tests/suite.at: Exercise %header_extension and %source_extension.
21276
21277 2001-08-16 Marc Autret <autret_m@epita.fr>
21278
21279 * src/reader.c (parse_dquoted_param): New.
21280 (parse_header_extension_decl): Use it.
21281 (parse_source_extension_decl): Likewise.
21282
21283 2001-08-16 Marc Autret <autret_m@epita.fr>
21284
21285 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21286 (get_xxxx_str): Use assert () instead of complain ().
21287 Remove return invokations in default cases.
21288 (get_decision_str): Modify default behaviour. Remove second argument.
21289 Echo modifications on calls.
21290 (output_graph): Fix.
21291
21292 2001-08-16 Marc Autret <autret_m@epita.fr>
21293
21294 * src/getargs.c (usage): Update with ``-g, --graph''.
21295
21296 2001-08-16 Marc Autret <autret_m@epita.fr>
21297
21298 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21299 (Option Cross Key): Likewise.
21300 * doc/bison.1: Update.
21301
1c8c2190
PB
213022001-09-25 Pascal Bart <pascal.bart@epita.fr>
21303
21304 * src/output.c (output_master_parser): Don't finish action_obstack.
21305 (output_parser): Don't care about the muscle action, here.
21306 (prepare): Copy the action_obstack in the action muscle.
21307 (output): Free action_obstack.
21308
180d45ba
PB
213092001-09-23 Pascal Bart <pascal.bart@epita.fr>
21310
21311 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21312 will contain `%union' declaration.
21313 (parse_union_decl): Delete #line directive output.
21314 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21315 informations about %union.
21316 (parse_union_decl): Copy the union_obstack in the muscle stype.
21317 * src/bison.simple: Add new #line directive.
21318 Add typdef %%stype YYSTYPE.
21319
c51d1a19
PB
213202001-09-23 Pascal Bart <pascal.bart@epita.fr>
21321
21322 * src/bison.simple: Add new `#line' directive.
21323
6f9344da
PB
213242001-09-22 Pascal Bart <pascal.bart@epita.fr>
21325
21326 * src/bison.simple: New `#line' directive.
21327 * src/output.c (output_parser): Support new dynamic muscle input_line.
21328
652def80
MA
213292001-09-22 Marc Autret <autret_m@epita.fr>
21330
21331 * src/output.c (output_master_parser): New.
21332 (output_parser): Be more re-entrant.
21333
25b222fa
MA
213342001-09-21 Marc Autret <autret_m@epita.fr>
21335
21336 * src/reader.c (copy_definition, parse_union_decl): Update and use
21337 `linef' muscle.
21338 (copy_action): Likewise.
21339 Use obstack_1grow ().
21340 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21341
6bc35ae5
MA
213422001-09-21 Marc Autret <autret_m@epita.fr>
21343
21344 * src/options.c (option_table): Adjust.
21345 * src/lex.c (parse_percent_token): Fix.
21346
c0629aa1
PB
213472001-09-20 Pascal Bart <pascal.bart@epita.fr>
21348
21349 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 21350
82b6d266
PB
213512001-09-20 Pascal Bart <pascal.bart@epita.fr>
21352
21353 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21354 is now an option_table_struct*.
21355 (option_strcmp): New function option_strcmp.
21356 (parse_percent_token): Call option_strcmp.
21357 * src/getargs.c (xalloc.h, options.h): Include it.
21358 (getargs): Call create_long_option_table.
21359 (getargs): Free longopts at the end of the function.
21360 (shortopts): Move in options.c.
21361 * src/options.c (create_long_option_table): New function. Convert
21362 information from option_table to option structure.
21363 * src/reader.c (options.h): Include it.
21364
21365 * src/Makefile.am: Adjust.
21366 * src/options.c (option_table): Create from longopts and percent_table.
21367 * src/getargs.c (longopts): Delete.
21368 * src/lex.c (struct percent_table_struct): Delete.
21369 (percent_table): Delete.
21370 (options.h): Include it.
21371 * src/options.c: Create.
21372 * src/options.h: Create.
21373 Declare enum opt_access_e.
21374 Define struct option_table_struct.
21375
75f5aaea
MA
213762001-09-20 Marc Autret <autret_m@epita.fr>
21377
21378 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21379 sections of Bison.
21380
f508cb0a
PB
213812001-09-19 Pascal Bart <pascal.bart@epita.fr>
21382
21383 * src/bison.simple: s/%%filename/%%skeleton.
21384 * src/muscle_tab.c (getargs.h): Include it.
21385 (muscle_init): Insert new muscle skeleton.
21386
13105fc1
PB
213872001-09-18 Pascal Bart <pascal.bart@epita.fr>
21388
21389 * src/output.c (output_parser): Delete unused variable actions_dumped.
21390
b0c4483e
PB
213912001-09-07 Pascal Bart <pascal.bart@epita.fr>
21392
21393 * src/output.c (output): Delete call to reader_output_yylsp.
21394 * src/reader.c (reader): Likewise.
ba0fe3c7 21395 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 21396
11d82f03
MA
213972001-09-02 Marc Autret <autret_m@epita.fr>
21398
21399 * src/reader.c: Include muscle_tab.h.
21400 (parse_union_decl): Update.
21401 (parse_macro_decl): Rename parse_muscle_decl.
21402 Update to use renamed functions and variable.
21403 (read_declarations, copy_action, read_additionnal_code, : Updated
21404 with correct variables and functions names.
21405 (packsymbols, reader): Likewise.
342b8b6e 21406
11d82f03 21407 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 21408
11d82f03
MA
21409 * src/output.c: Include muscle_tab.h
21410 In all functions using macro_insert, change by using muscle_insert ().
21411 (macro_obstack): Rename muscle_obstack.
21412 Echo modifications in the whole file.
21413 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21414 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21415 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21416
21417 * src/muscle_tab.h: Update double inclusion macros.
21418 (macro_entry_s): Rename muscle_entry_s.
21419 Update prototypes.
342b8b6e 21420
11d82f03
MA
21421 * src/muscle_tab.c: Include muscle_tab.h.
21422 Rename macro_tabble to muscle_table.
21423 (mhash1, mhash2, mcmp): Use muscle_entry.
21424 (macro_init): Rename muscle_init. Update.
21425 (macro_insert): Rename muscle_insert. Update.
21426 (macro_find): Rename muscle_find. Update.
21427
21428 * src/main.c: Include muscle_tab.h.
21429 (main): Call muscle_init ().
21430 * src/Makefile.am (bison_SOURCES): Echo modifications.
21431
93a37297
MA
214322001-09-02 Marc Autret <autret_m@epita.fr>
21433
f753cd62 21434 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 21435
f753cd62
MA
21436 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21437
214382001-09-02 Marc Autret <autret_m@epita.fr>
21439
21440 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 21441
682d48cd
PB
214422001-09-01 Pascal Bart <pascal.bart@epita.fr>
21443
342b8b6e 21444 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
21445 filename.
21446
087c8fda
MA
214472001-09-01 Marc Autret <autret_m@epita.fr>
21448
21449 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21450 to an explicit value to activate the feature. We do it here.
21451
dda680cb
PB
214522001-08-31 Pascal Bart <pascal.bart@epita.fr>
21453
21454 * src/output.c (prepare): Delete the `filename' muscule insertion.
21455 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21456 (parse_union_decl): Likewise.
21457 * src/macrotab.c (macro_init): Initialize filename by infile.
21458
9e644e64
MA
214592001-08-31 Marc Autret <autret_m@epita.fr>
21460
21461 * src/bison.simple (YYLSP_NEEDED): New definition.
21462 * src/output.c (prepare): Add macro insertion of `locations_flag'
21463
17da6427
PB
214642001-08-31 Pascal Bart <pascal.bart@epita.fr>
21465
21466 * src/output.c (prepare): Delete insertion of previous muscles,
21467 and insert the `prefix' muscles.
21468 * src/macrotab.c (macro_init): Likewise.
21469 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 21470 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
21471 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21472 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 21473 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
21474 name_prefix.
21475
e8cb70b9
PB
214762001-08-31 Pascal Bart <pascal.bart@epita.fr>
21477
21478 * src/main.c (main): Standardize.
21479 * src/output.c (output_table_data, output_parser): Likewise.
21480 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21481
63c2d5de
MA
214822001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21483
342b8b6e 21484 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
21485 %%epilogue.
21486 * src/output.c (output): Rename %%declarations to %%prologue.
21487 * src/bison.simple: Echo modifications.
342b8b6e 21488
d8cb5183
MA
214892001-08-31 Marc Autret <autret_m@epita.fr>
21490
21491 * src/reader.c (readgram): CleanUp.
21492 (output_token_defines): Likewise.
21493 (packsymbols): Likewise.
21494 (reader): Likewise.
21495 * src/output.c (output): CPP-out useless code.
21496
6c686258
PB
214972001-08-31 Pascal Bart <pascal.bart@epita.fr>
21498
342b8b6e 21499 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
21500 output_trailers and output_headers.
21501 * src/output.h: Remove obsolete functions prototypes of output_headers
21502 and output_trailers.
21503
8f451ef7
PB
215042001-08-30 Pascal Bart <pascal.bart@epita.fr>
21505
21506 * src/main.c: Include macrotab.h.
342b8b6e 21507 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
21508 Adjust functions prototypes.
21509 * src/macrotab.c (macro_insert): Constify key and value.
21510 (macro_find): Constify key.
21511 (macro_insert): Include 'xalloc.h'
21512 (macro_insert): Use XMALLOC.
21513 (macro_find): Constify return value.
21514 * src/output.c (output_table_data): Rename table to table_data.
21515 (output_parser): Constify macro_key, macro_value.
21516
997b6fd0 215172001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
21518
21519 * src/reader.c (parse_skel_decl): New.
342b8b6e 21520 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
21521 * src/lex.h (token_t): New token `tok_skel'.
21522 * src/lex.c (percent_table): Add skeleton option entry.
21523 Standardize.
21524
ff48177d
MA
215252001-08-29 Marc Autret <autret_m@epita.fr>
21526
21527 * src/bison.simple: Add %%user_code directive at the end.
21528 * src/reader.c (read_additionnal_code): New.
21529 (reader): Use it.
21530 * src/output.c (output_program): Remove.
21531 (output): Update.
21532
b33160bf
MA
215332001-08-28 Marc Autret <autret_m@epita.fr>
21534
21535 * src/output.c (output_actions): Clean up.
4e5caae2 21536 (output_gram): CPP-out useless code.
b33160bf
MA
21537 * src/reader.c (reader): Clean up, CPP-out useless code.
21538
d1a2daf7
PB
215392001-08-28 Pascal Bart <pascal.bart@epita.fr>
21540
342b8b6e 21541 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 21542 directive.
d1a2daf7
PB
21543 * src/bison.simple: Add `%%definitions'.
21544
2b763dfe
MA
215452001-08-28 Marc Autret <autret_m@epita.fr>
21546
21547 * config/depcomp: New file.
21548
f1a87ef6
PE
215492001-08-27 Paul Eggert <eggert@twinsun.com>
21550
21551 * src/bison.simple (yyparse): Don't take the address of an
21552 item before the start of an array, as that doesn't conform to
21553 the C Standard.
21554
82e236e2
RA
215552001-08-27 Robert Anisko <robert.anisko@epita.fr>
21556
f1a87ef6 21557 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
21558 obstack. It was done too late here.
21559
21560 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21561 completely wrong.
21562 (reader): Initialize the macro obstack here, since we need it to grow
21563 '%define' directives.
21564
21565 * src/reader.h: Declare the macro obstack as extern.
21566
b0cfa28a
RA
215672001-08-27 Robert Anisko <robert.anisko@epita.fr>
21568
21569 * src/output.c (output_parser): Fix. Store single '%' characters in
21570 the output obstack instead of throwing them away.
21571
6fc74234
AD
215722001-08-27 Akim Demaille <akim@epita.fr>
21573
21574 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21575
9c76d118
RA
215762001-08-25 Robert Anisko <robert.anisko@epita.fr>
21577
21578 * lib/Makefile.am: Adjust.
21579
a8289c62
RA
215802001-08-25 Robert Anisko <robert.anisko@epita.fr>
21581
21582 * src/bison.simple: Update and add '%%' directives.
21583
b6610515
RA
215842001-08-25 Robert Anisko <robert.anisko@epita.fr>
21585
21586 * src/reader.c (reader): Remove calls to 'output_headers' and
21587 'output_trailers'. Remove some C output.
21588 (readgram): Disable a piece of code that was writing a default
21589 definition for 'YYSTYPE'.
21590 (reader_output_yylsp): Remove.
21591 (packsymbols): Output token defintions to a macro.
21592 (copy_definition): Disable C output.
6fc74234 21593
b6610515
RA
21594 * src/reader.c (parse_macro_decl): New function used to parse macro
21595 declarations.
21596 (copy_string2): Put the body of copy_string into this new function.
21597 Add a parameter to let the caller choose whether he wants to copy the
21598 string delimiters or not.
21599 (copy_string): Be a simple call to copy_string2 with the last argument
21600 bound to true.
21601 (read_declarations): Add case for macro definition.
21602 (copy_identifier): New.
6fc74234 21603 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
21604 rather than lex.
21605
26f609ff
RA
216062001-08-25 Robert Anisko <robert.anisko@epita.fr>
21607
21608 * src/output.c (prepare): Add prefixed names.
21609 (output_parser): Output semantic actions.
21610 (output_parser): Fix bug on '%%line' directives.
6fc74234 21611
26f609ff
RA
21612 * src/output.c (output_headers): Remove. The C code printed by this
21613 function should now be in the skeletons.
21614 (output_trailers): Remove.
21615 (output): Disable call to 'reader_output_yylsp'.
21616 (output_rule_data): Do not output tables to the table obstack.
21617
21618 * src/output.c: Remove some C dedicated output.
21619 Improve the use of macro and output obstacks.
21620 (output_defines): Remove.
6fc74234 21621
26f609ff
RA
21622 * src/output.c (output_token_translations): Associate 'translate'
21623 table with a macro. No output to the table obstack.
21624 (output_gram): Same for 'rhs' and 'prhs'.
21625 (output_stos): Same for 'stos'.
21626 (output_rule_data): Same for 'r1' and 'r2'.
21627 (token_actions): Same for 'defact'.
21628 (goto_actions): Same for 'defgoto'.
21629 (output_base): Same for 'pact' and 'pgoto'.
21630 (output_table): Same for 'table'.
21631 (output_check): Same for 'check'.
6fc74234 21632
26f609ff
RA
21633 * src/output.c (output_table_data): New function.
21634 (output_short_table): Remove.
21635 (output_short_or_char_table): Remove.
6fc74234 21636
26f609ff
RA
21637 * src/output.c (output_parser): Replace most of the skeleton copy code
21638 with something new. Skeletons are now processed character by character
21639 rather than line by line, and Bison looks for '%%' macros. This is the
21640 first step in making Bison's output process (a lot) more flexible.
21641 (output_parser): Use the macro table.
21642
6f43b113
RA
216432001-08-25 Robert Anisko <robert.anisko@epita.fr>
21644
21645 * src/main.c (main): Initialize the macro table.
21646
dd3127cf
RA
216472001-08-25 Robert Anisko <robert.anisko@epita.fr>
21648
21649 * src/lex.c (percent_table): Add tok_define.
21650 * src/lex.h: Add tok_define.
21651
aa321494
RA
216522001-08-25 Robert Anisko <robert.anisko@epita.fr>
21653
21654 * src/macrotab.c: New file.
21655 * src/macrotab.h: New file.
21656 * src/Makefile.am: Update.
21657
68bd3b6b
RA
216582001-08-25 Robert Anisko <robert.anisko@epita.fr>
21659
21660 * lib/hash.c: New file.
21661 * lib/hash.h: New file.
21662 * lib/Makefile.am: Update.
21663
45f8dd1e
AD
216642001-08-15 Akim Demaille <akim@epita.fr>
21665
21666 Version 1.28c.
21667
40a64a7a 216682001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
21669
21670 * src/reader.c (readgram): Indent output macro YYSTYPE.
21671 (packsymbols): Likewise.
21672 (output_token_defines): Likewise.
21673 * src/files.c: Standardize.
21674 (compute_header_macro): New.
21675 (defines_obstack_save): New. Use compute_header_macro.
21676 (output_files): Update. Use defines_obstack_save.
21677
f9a8293a
AD
216782001-08-15 Akim Demaille <akim@epita.fr>
21679
21680 * doc/bison.texinfo (Table of Symbols): Document
21681 YYSTACK_USE_ALLOCA.
21682
150ca7a7
AD
216832001-08-15 Akim Demaille <akim@epita.fr>
21684
21685 * missing: Update from CVS Automake.
21686 * config/config.guess, config/config.sub, config/texinfo.tex:
21687 Update from gnu.org.
21688
69b5cec4
AD
216892001-08-15 Akim Demaille <akim@epita.fr>
21690
21691 * Makefile.maint: Sync with CVS Autoconf.
21692
f2b5126e
PB
216932001-08-14 Pascal Bart <pascal.bart@epita.fr>
21694
69b5cec4 21695 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
21696 `fdl.texi'.
21697 * doc/fdl.texi: Add to package.
21698
4ecbf796
MA
216992001-08-14 Marc Autret <autret_m@epita.fr>
21700
21701 Turn on %{source,header}_extension features.
21702
69b5cec4 21703 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
21704 source_extension.
21705 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 21706 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
21707 between options.
21708
95fb5662
MA
217092001-08-14 Marc Autret <autret_m@epita.fr>
21710
21711 * src/files.c (compute_base_names): Add extensions computing when
21712 `--file-prefix' used.
21713 Standardize function calls.
21714
78d09da9
MA
217152001-08-13 Marc Autret <autret_m@epita.fr>
21716
69b5cec4 21717 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
21718 defining it (defined but null disables alloca).
21719
5a009f2c
MA
217202001-08-13 Marc Autret <autret_m@epita.fr>
21721
21722 * src/bison.simple (_yy_memcpy): CPP reformat.
21723
1e41465a
PB
217242001-08-13 Pascal Bart <pascal.bart@epita.fr>
21725
21726 * tests/atconfig.in (CPPFLAGS): Fix.
21727
c67a198d
PB
217282001-08-10 Pascal Bart <pascal.bart@epita.fr>
21729
79282c6c 21730 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
21731 `gpl.texi'.
21732 * doc/gpl.texi: Add to package.
21733
09a6de7e
MA
217342001-08-10 Marc Autret <autret_m@epita.fr>
21735
21736 * src/print_graph.h: Fix.
21737 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21738
b77b9ee0
AD
217392001-08-10 Akim Demaille <akim@epita.fr>
21740
21741 * src/system.h: Provide default declarations for stpcpy, strndup,
21742 and strnlen.
21743
3e259915
MA
217442001-08-10 Robert Anisko <anisko_r@epita.fr>
21745
21746 * doc/bison.texinfo (Locations): Update @$ stuff.
21747
ca96bc2d
MA
217482001-08-09 Robert Anisko <anisko_r@epita.fr>
21749
21750 * src/bison.simple (YYLLOC_DEFAULT): Update.
21751 (yyparse): Adjust.
21752
fdc6758b
MA
217532001-08-08 Marc Autret <autret_m@epita.fr>
21754
b77b9ee0 21755 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
21756 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21757 Reported by Fabrice Bauzac.
957d4dbf 21758
600cad3b
MA
217592001-08-08 Marc Autret <autret_m@epita.fr>
21760
21761 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21762 * src/vcg.c (output_node): Fix.
21763 * src/vcg.h: Cleanup.
21764 * src/print_graph.c: Add comments.
b77b9ee0 21765 (node_output_size): New global variable. Simplify the formatting of
600cad3b 21766 the VCG graph output.
b77b9ee0 21767 (print_actions): Unused code is now used. It notifies the final state
600cad3b 21768 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 21769 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
21770 blue.
21771 Get the current node name and node_obstack by argument.
21772 (node_obstack): New variable.
21773 (print_state): Manage node_obstack.
21774 (print_core): Use node_obstack given by argument.
21775 A node is not only computed here but in print_actions also.
21776 (print_graph): CPP out useless code instead of commenting it.
21777
976e528f
AD
217782001-08-07 Pascal Bart <pascal.bart@epita.fr>
21779
21780 * tests/atconfig.in (CPPFLAGS): Fix.
21781
20e8e5ca
AD
217822001-08-07 Akim Demaille <akim@epita.fr>
21783
21784 * src/print_graph.c (quote): New.
21785 (print_core): Use it.
21786
957d4dbf 217872001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 21788
3e3da797
AD
21789 * src/vcg.c (complain.h): Include it.
21790 Unepitaize `return' invocations.
c4b66126 21791 [NDEBUG] (main): Remove.
79282c6c 21792 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
21793 * src/files.c (open_files): Initialize graph_obstack.
21794 * src/print_graph.c (print_actions): CPP out useless code.
21795 (print_core): Don't output the last `\n' in labels.
21796 Use `quote'.
21797 * src/files.c (output_files): Output the VCG file.
21798 * src/main.c (main): Invoke print_graph ();
3e3da797 21799
957d4dbf 218002001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
21801
21802 Automaton VCG graph output.
21803 Using option ``-g'' or long option ``--graph'', you can generate
21804 a gram_filename.vcg file containing a VCG description of the LALR (1)
21805 automaton of your grammar.
21806
21807 * src/main.c: Call to print_graph() function.
21808 * src/getargs.h: Update.
21809 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21810 (graph_flag): New flag.
21811 (longopts): Update.
21812 (getargs): Add case `g'.
21813 * src/files.c (graph_obstack): New obstack struct.
21814 (open_files): Initialize new obstack.
21815 (output_files): Saves graph_obstack if required.
21816 * src/files.h (graph_obstack): New extern declaration.
21817 * src/Makefile.am: Add new source files.
21818
927c1557 218192001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
21820
21821 * src/print_graph.c, src/print_graph.h (graph): New.
21822 * src/vcg.h: New file.
21823 * src/vcg.c: New file, VCG graph handling.
21824
7333d403
AD
218252001-08-06 Marc Autret <autret_m@epita.fr>
21826
21827 Add of %source_extension and %header_extension which specify
21828 the source or/and the header output file extension.
21829
21830 * src/files.c (compute_base_names): Remove initialisation of
21831 src_extension and header_extension.
21832 (compute_exts_from_gf): Update.
21833 (compute_exts_from_src): Update.
21834 (output_files): Update.
21835 * src/reader.c (parse_header_extension_decl): New.
21836 (parse_source_extension_decl): New.
21837 (read_declarations): New case statements for the new tokens.
21838 * src/lex.c (percent_table): Add entries for %source_extension
21839 and %header_extension.
21840 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21841
84163231
AD
218422001-08-06 Marc Autret <autret_m@epita.fr>
21843
21844 * configure.in: Bump to 1.28c.
21845 * doc/bison.texinfo: Texinfo thingies.
21846
8303fc42
AD
218472001-08-04 Pascal Bart <pascal.bart@epita.fr>
21848
21849 * tests/atconfig.in (CPPFLAGS): Add.
21850 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21851
70a84437
AD
218522001-08-03 Akim Demaille <akim@epita.fr>
21853
21854 Version 1.28b.
21855
2ce10144
AD
218562001-08-03 Akim Demaille <akim@epita.fr>
21857
21858 * tests/Makefile.am (check-local): Ship testsuite.
21859 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21860 Include `string.h'.
21861
1e3e4bc1
AD
218622001-08-03 Akim Demaille <akim@epita.fr>
21863
21864 * configure.in: Try using -Wformat when compiling.
21865
42b45b7f
AD
218662001-08-03 Akim Demaille <akim@epita.fr>
21867
21868 * configure.in: Bump to 1.28b.
21869
8f13fe33
AD
218702001-08-03 Akim Demaille <akim@epita.fr>
21871
21872 * src/complain.c: Adjust strerror_r portability issues.
21873
b37ba92c
AD
218742001-08-03 Akim Demaille <akim@epita.fr>
21875
21876 Version 1.28a.
21877
b0ce6046
AD
218782001-08-03 Akim Demaille <akim@epita.fr>
21879
21880 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21881 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21882 * src/getargs.c: Include complain.h.
21883 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21884 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21885
d01c415b
AD
218862001-08-03 Akim Demaille <akim@epita.fr>
21887
21888 * src/reader.c (readgram): Display hidden chars in error messages.
21889
459dd1a6
AD
218902001-08-03 Akim Demaille <akim@epita.fr>
21891
21892 Update to gettext 0.10.39.
21893
53b74c0c
AD
218942001-08-03 Akim Demaille <akim@epita.fr>
21895
21896 * lib/strspn.c: New.
21897
234a3be3
AD
218982001-08-01 Marc Autret <autret_m@epita.fr>
21899
21900 * doc/bison.texinfo: Update.
21901 * doc/bison.1 (mandoc): Update.
21902 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21903 * src/files.c: Support output files extensions computing.
21904 (src_extension): New static variable.
21905 (header_extension): New static variable.
21906 (tr): New function.
21907 (get_extension_index): New function, gets the index of an extension
21908 filename in a string.
21909 (compute_exts_from_gf): New function, computes extensions from the
21910 grammar file extension.
21911 (compute_exts_from_src): New functions, computes extensions from the
21912 C source file extension, file given by ``-o'' option.
21913 (compute_base_names): Update.
21914 (output_files): Update.
21915
847bf1f5
AD
219162001-08-01 Robert Anisko <anisko_r@epita.fr>
21917
d995fee7 21918 * doc/bison.texi: Document @$.
847bf1f5
AD
21919 (Locations): New section.
21920
d074a105
AD
219212001-07-18 Akim Demaille <akim@epita.fr>
21922
21923 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21924 * config/prev-version.txt, config/move-if-change: New.
21925 * Makefile.am: Adjust.
21926
3419715d
AD
219272001-07-08 Pascal Bart <pascal.bart@epita.fr>
21928
21929 * src/bison.simple (yyparse): Suppress warning `comparaison
21930 between signed and unsigned'.
21931
62ab6972
AD
219322001-07-05 Pascal Bart <pascal.bart@epita.fr>
21933
21934 * src/getargs.h (raw_flag): Remove.
21935 * src/getargs.c: Die on `-r'/`--raw'.
21936 * src/lex.c (parse_percent_token): Die on `%raw'.
21937 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21938 * tests/calc.at: Suppress test with option `--raw'.
21939
1e24cc5b
AD
219402001-07-14 Akim Demaille <akim@epita.fr>
21941
21942 * config/: New.
21943 * configure.in: Require Autoconf 2.50.
21944 Update to gettext 0.10.38.
21945
32dfccf8
AD
219462001-03-16 Akim Demaille <akim@epita.fr>
21947
21948 * doc/bison.texinfo: ANSIfy the examples.
21949
cd5bd6ac
AD
219502001-03-16 Akim Demaille <akim@epita.fr>
21951
21952 * getargs.c (skeleton): New variable.
21953 (longopts): --skeleton is a new option.
21954 (shortopts, getargs): -S is a new option.
21955 * getargs.h: Declare skeleton.
21956 * output.c (output_parser): Use it.
21957
5141b016
AD
219582001-03-16 Akim Demaille <akim@epita.fr>
21959
21960 * m4/strerror_r.m4: New.
21961 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21962 * lib/error.h, lib/error.c: Update.
21963
447992b9
AD
219642001-03-16 Akim Demaille <akim@epita.fr>
21965
21966 * src/getargs.c (longopts): Clean up.
21967
274d42ce
AD
219682001-02-21 Akim Demaille <akim@epita.fr>
21969
21970 * src/reader.c (gensym): `gensym_count' is your own.
21971 Use a static buf to create the symbol name, as token_buffer is no
21972 longer a buffer.
21973
22c821f3
AD
219742001-02-08 Akim Demaille <akim@epita.fr>
21975
21976 * src/conflicts.c (conflict_report): Be sure not to append to res
21977 between two calls, which could happen if both first sprintf were
21978 skipped, but not the first cp += strlen.
21979
18569462
AD
219802001-02-08 Akim Demaille <akim@epita.fr>
21981
21982 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21983 New, from fileutils 4.0.37.
21984 * configure.in: Require Autoconf 2.49c. I took some time before
21985 making this decision. This is the only way out for portability
21986 issues in Bison, it would mean way too much duplicate effort to
21987 import in Bison features implemented in 2.49c since 2.13.
21988 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21989
0d8f3c8a
AD
219902001-02-02 Akim Demaille <akim@epita.fr>
21991
21992 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 21993 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 21994
f17bcd1f
AD
219952001-01-19 Akim Demaille <akim@epita.fr>
21996
21997 Get rid of the ad hoc handling of token_buffer in the scanner: use
21998 the obstacks.
21999
22000 * src/lex.c (token_obstack): New.
22001 (init_lex): Initialize it. No longer call...
22002 (grow_token_buffer): this. Remove it.
22003 Adjust all the places which used it to use the obstack.
22004
511e79b3
AD
220052001-01-19 Akim Demaille <akim@epita.fr>
22006
22007 * src/lex.h: Rename all the tokens:
22008 s/\bENDFILE\b/tok_eof/g;
22009 s/\bIDENTIFIER\b/tok_identifier/g;
22010 etc.
22011 Let them be enums, not #define, to ease debugging.
22012 Adjust all the code.
22013
0d6508ef
AD
220142001-01-18 Akim Demaille <akim@epita.fr>
22015
22016 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22017 * src/lex.c (maxtoken, grow_token_buffer): Static.
22018
6deb4447
AD
220192001-01-18 Akim Demaille <akim@epita.fr>
22020
22021 Since we now use obstacks, more % directives can be enabled.
22022
22023 * src/lex.c (percent_table): Also accept `%yacc',
22024 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22025 `%debug'.
22026 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22027 instead of returning a token.
22028 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22029 * src/reader.c (read_declarations): Adjust.
22030 * src/files.c (open_files): Don't call `compute_base_names', don't
22031 compute `attrsfile' since they depend upon data which might be
22032 *in* the input file now.
22033 (output_files): Do it here.
22034 * src/output.c (output_headers): Document the fact that this patch
22035 introduces a guaranteed SEGV for semantic parsers.
22036 * doc/bison.texinfo: Document them.
22037 * tests/suite.at: Exercise these %options.
22038
ff4423cc
AD
220392000-12-20 Akim Demaille <akim@epita.fr>
22040
22041 Also handle the output file (--verbose) with obstacks.
22042
22043 * files.c (foutput): Remove.
22044 (output_obstack): New.
22045 Adjust all dependencies.
22046 * src/conflicts.c: Return a string.
22047 * src/system.h (obstack_grow_string): Rename as...
22048 (obstack_sgrow): this. Be ready to work with non literals.
22049 (obstack_fgrow4): New.
22050
956dba3a
AD
220512000-12-20 Akim Demaille <akim@epita.fr>
22052
22053 * src/files.c (open_files): Fix the computation of short_base_name
22054 in the case of `-o foo.tab.c'.
22055
337bab46
AD
220562000-12-20 Akim Demaille <akim@epita.fr>
22057
22058 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22059 (copy_dollar): Now that everything uses obstacks, get rid of the
22060 FILE * parameters.
22061
5d3214b8
AD
220622000-12-20 Akim Demaille <akim@epita.fr>
22063
22064 * src/files.c (open_files): Actually the `.output' file is based
22065 on the short_base_name, not base_name.
22066 * tests/suite.at (Checking output file names): Adjust.
22067
29092a57
AD
220682000-12-20 Akim Demaille <akim@epita.fr>
22069
22070 * src/bison.s1: Remove, we now use directly...
22071 * src/bison.simple: this.
22072 * src/Makefile.am: Use pkgdata instead of data.
22073
ea5607fd
AD
220742000-12-20 Akim Demaille <akim@epita.fr>
22075
22076 * src/files.c (guard_obstack): New.
22077 (open_files): Initialize it.
22078 (output_files): Dump it...
22079 * src/files.h: Export it.
22080 * src/reader.c (copy_guard): Use it.
22081
27110317
AD
220822000-12-19 Akim Demaille <akim@epita.fr>
22083
22084 * src/files.c (outfile, defsfile, actfile): Removed as global
22085 vars.
22086 (open_files): Don't compute them.
22087 (output_files): Adjust.
22088 (base_name, short_base_name): Be global.
22089 Adjust dependencies.
22090
19c50364
AD
220912000-12-19 Akim Demaille <akim@epita.fr>
22092
22093 * src/files.c (strsuffix): New.
22094 (stringappend): Be just like strcat but allocate.
22095 (base_names): Eve out from open_files.
22096 Try to simplify the rather hairy computation of base_name and
22097 short_base_name.
22098 (open_files): Use it.
22099 * tests/suite.at (Checking output file names): New test.
22100
573c1d9f
AD
221012000-12-19 Akim Demaille <akim@epita.fr>
22102
22103 * src/system.h (obstack_grow_literal_string): Rename as...
22104 (obstack_grow_string): this.
22105 * src/output.c (output_parser): Recognize `%% actions' instead of
22106 `$'.
22107 * src/bison.s1: s/$/%% actions/.
22108 * src/bison.hairy: Likewise.
22109
ef7ddedd
AD
221102000-12-19 Akim Demaille <akim@epita.fr>
22111
22112 * src/output.c (output_parser): Compute the `#line' lines when
22113 there are.
22114 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22115 Suggested by Hans Aberg.
22116
ff61dabd
AD
221172000-12-19 Akim Demaille <akim@epita.fr>
22118
22119 Let the handling of the skeleton files be local to the procedures
22120 that use it.
22121
22122 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22123 longer static.
22124 (fparser, open_extra_files): Remove.
22125 (open_files, output_files): Don't take care of fparser.
22126 * src/files.h: Adjust.
22127 * src/output.c (output_parser): Open and close the file to the
22128 skeleton.
22129 * src/reader.c (read_declarations): When %semantic_parser, open
22130 fguard.
22131
55b96341
AD
221322000-12-19 Akim Demaille <akim@epita.fr>
22133
22134 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22135 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22136
358c15b7
AD
221372000-12-19 Akim Demaille <akim@epita.fr>
22138
22139 * src/files.c (open_files): Yipee! We no longer need all the code
22140 looking for `/tmp' since we have no tmp file.
22141
7de3329e
AD
221422000-12-19 Akim Demaille <akim@epita.fr>
22143
22144 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22145 New macros.
22146 * src/files.c (open_files): Less dependency on MSDOS etc.
22147
3abcd459
AD
221482000-12-14 Akim Demaille <akim@epita.fr>
22149
22150 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22151 Provide a default definition.
22152 Use it when executing the default @ action.
22153 * src/reader.c (reader_output_yylsp): No longer include
22154 `timestamp' and `text' in the default YYLTYPE.
22155
2a91a95e
AD
221562000-12-12 Akim Demaille <akim@epita.fr>
22157
22158 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22159 (copy_guard): Quote the file names.
22160 Reported by Laurent Mascherpa.
22161
14d3eb9b
AD
221622000-12-12 Akim Demaille <akim@epita.fr>
22163
22164 * src/output.c (output_headers, output_program, output): Be sure
22165 to escape special characters when outputting filenames.
22166 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22167 (output_headers): Don't depend on them, Use ACTSTR.
22168
d7045ec6
AD
221692000-11-17 Akim Demaille <akim@epita.fr>
22170
22171 * lib/obstack.h: Formatting changes.
22172 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22173 prevents type checking.
22174 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22175 cast the value to (void *): assigning a `foo *' to a `void *'
22176 variable is valid.
22177 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22178 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22179 append characters.
22180
6fd54b73
AD
221812000-11-17 Akim Demaille <akim@epita.fr>
22182
22183 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22184 as...
22185 (suite.m4, regression.m4, calc.m4): these.
22186 * tests/atgeneral.m4: Update from CVS Autoconf.
22187
4c50eae6
AD
221882000-11-17 Akim Demaille <akim@epita.fr>
22189
22190 * tests/regression.m4 (%union and --defines): New test,
22191 demonstrating a current bug in the obstack implementation.
22192
a35f64ea
AD
221932000-11-17 Akim Demaille <akim@epita.fr>
22194
22195 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22196 macros.
22197 Use them to declare the variables which are global or local to
22198 `yyparse'.
22199
7de23534
AD
222002000-11-17 Akim Demaille <akim@epita.fr>
22201
22202 * acconfig.h: Remove, no longer used.
22203
aa7815f5
AD
222042000-11-07 Akim Demaille <akim@epita.fr>
22205
22206 * src: s/Copyright (C)/Copyright/g.
22207
5af1f549
AD
222082000-11-07 Akim Demaille <akim@epita.fr>
22209
22210 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22211 defining.
22212 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22213
553e2b22
AD
222142000-11-07 Akim Demaille <akim@epita.fr>
22215
22216 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22217 Merge in a single CPP if/else.
22218
8a4f41d6
AD
222192000-11-07 Akim Demaille <akim@epita.fr>
22220
22221 * src/output.c (output): Remove useless variables.
22222 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22223 argument `data' for consistency with the prototypes.
22224 Qualify it `const'.
22225 (obstack_copy, obstack_copy0): Rename the second argument as
22226 `address' for consistency. Qualify it `const'.
22227 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22228 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22229 `const' their input argument (`data' or `address').
22230 Adjust the corresponding macros to include `const' in casts.
22231
095a3fb5
AD
222322000-11-03 Akim Demaille <akim@epita.fr>
22233
22234 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22235 s/PFILE1/BISON_HAIRY/.
22236 Adjust dependencies.
22237
d1cdce7c
AD
222382000-11-03 Akim Demaille <akim@epita.fr>
22239
090c5ebf 22240 For some reason, this was not applied.
d1cdce7c
AD
22241
22242 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22243 `unlink': it's no longer used.
22244
9311529b
AD
222452000-11-03 Akim Demaille <akim@epita.fr>
22246
22247 * src/files.c (skeleton_find): New function, eved out of...
22248 (open_files, open_extra_files): here.
22249
d8880f69
AD
222502000-11-03 Akim Demaille <akim@epita.fr>
22251
22252 Don't use `atexit'.
22253
22254 * src/files.c (obstack_save): New function.
22255 (done): Rename as...
22256 (output_files): this.
22257 Use `obstack_save'.
22258 * src/main.c (main): Don't use `atexit' to register `done', since
22259 it no longer has to remove tmp files, just call `output_files'
22260 when there are no errors.
22261
0dbb648e
AD
222622000-11-02 Akim Demaille <akim@epita.fr>
22263
22264 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22265 `unlink': it's no longer used.
22266 * src/files.h: Formatting changes.
22267
896fe5c1
AD
222682000-11-02 Akim Demaille <akim@epita.fr>
22269
22270 Remove the last uses of mktemp and unlink/delete.
22271
22272 * src/files.c (fdefines, ftable): Removed.
22273 (defines_ostack, table_obstack): New.
22274 Adjust dependencies of the former into uses of the latter.
22275 * src/output.c (output_short_or_char_table, output_short_table):
22276 Convert to using obstacks.
22277 * src/reader.c (copy_comment2): Accept one FILE * and two
22278 obstacks.
22279 (output_token_defines, reader_output_yylsp): Use obstacks.
22280 * src/system.h (obstack_fgrow3): New.
1f65350a 22281 * po/POTFILES.in: Adjust.
896fe5c1 22282
dd60faec
AD
222832000-11-01 Akim Demaille <akim@epita.fr>
22284
22285 Change each use of `fattrs' into a use of `attrs_obstack'.
22286
22287 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22288 * src/files.c (fattrs): Remove.
22289 (attrs_obstack): New.
22290 Adjust all dependencies.
22291 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22292
8c7ebe49
AD
222932000-11-01 Akim Demaille <akim@epita.fr>
22294
22295 Introduce obstacks.
22296 Change each use of `faction' into a use of `action_obstack'.
22297
22298 * lib/obstack.h, lib/obstack.c: New files.
22299 * src/files.c (faction): Remove.
22300 (action_obstack): New.
22301 Adjust all dependencies.
22302
77aee789
AD
223032000-10-20 Akim Demaille <akim@epita.fr>
22304
22305 * lib/quote.h (PARAMS): New macro. Use it.
22306
43591cec
AD
223072000-10-16 Akim Demaille <akim@epita.fr>
22308
22309 * src/output.c (output_short_or_char_table): New function.
22310 (output_short_table, output_token_translations): Use it.
22311 (goto_actions): Use output_short_table.
22312
1e9798d5
AD
223132000-10-16 Akim Demaille <akim@epita.fr>
22314
22315 * src/symtab.c (bucket_new): New function.
22316 (getsym): Use it.
22317
22318 * src/output.c (output_short_table): New argument to display the
22319 comment associated with the table.
22320 Adjust dependencies.
22321 (output_gram): Use it.
22322 (output_rule_data): Nicer output layout for YYTNAME.
22323
f282676b
AD
223242000-10-16 Akim Demaille <akim@epita.fr>
22325
22326 * src/lex.c (read_typename): New function.
22327 (lex): Use it.
22328 * src/reader.c (copy_dollar): Likewise.
22329
550a72a3
AD
223302000-10-16 Akim Demaille <akim@epita.fr>
22331
22332 * src/reader.c (copy_comment2): Expect the input stream to be on
22333 the `/' which is suspected to open a comment, instead of being
22334 called after `//' or `/*' was read.
22335 (copy_comment, copy_definition, parse_union_decl, copy_action)
22336 (copy_guard): Adjust.
22337
131e2fef
AD
223382000-10-16 Akim Demaille <akim@epita.fr>
22339
22340 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22341 `read_signed_integer'.
22342
79282c5a
AD
223432000-10-16 Akim Demaille <akim@epita.fr>
22344
22345 * src/reader.c (copy_dollar): New function.
22346 (copy_guard, copy_action): Use it.
22347
ff4a34be
AD
223482000-10-16 Akim Demaille <akim@epita.fr>
22349
22350 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22351 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22352 New files, from Fileutils 4.0.27.
22353 * src/main.c (printable_version): Remove.
22354 * src/lex.c, src/reader.c: Use `quote'.
22355
223562000-10-04 Akim Demaille <akim@epita.fr>
22357
22358 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22359
14ded682
AD
223602000-10-04 Akim Demaille <akim@epita.fr>
22361
22362 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22363
8e03724b
AD
223642000-10-04 Akim Demaille <akim@epita.fr>
22365
22366 When a literal string is used to define two different tokens,
22367 `bison -v' segfaults.
22368 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22369
22370 * tests/regression.m4: New file.
22371 Include the core of the sample provided by Piotr Gackiewicz.
22372 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22373 properly.
22374
a9e64249
AD
223752000-10-04 Akim Demaille <akim@epita.fr>
22376
22377 * src/reader.c (parse_expect_decl): Keep `count' within the size
22378 of `buffer'.
22379 From Neil Booth.
22380
da9abf43
AD
223812000-10-02 Paul Eggert <eggert@twinsun.com>
22382
22383 * bison.s1 (yyparse): Assign the default value
22384 unconditionally, to avoid a GCC warning and make the parser a
22385 tad smaller.
22386
c33638bb
AD
223872000-10-02 Akim Demaille <akim@epita.fr>
22388
22389 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22390 options.
22391
444c570a
AD
223922000-10-02 Akim Demaille <akim@epita.fr>
22393
22394 * src/derives.c, src/print.c, src/reduce.c: To ease the
22395 translation, move some `\n' out of the translated strings.
22396
89cab50d
AD
223972000-10-02 Akim Demaille <akim@epita.fr>
22398
22399 The location tracking mechanism is precious for parse error
22400 messages. Nevertheless, it is enabled only when `@n' is used in
22401 the grammar, which is a different issue (you can use it in error
22402 message, but not in the grammar per se). Therefore, there should
22403 be another means to enable it.
22404
22405 * src/getargs.c (getargs): Support `--locations'.
22406 (usage): Report it.
22407 * src/getargs.h (locationsflag): Export it.
22408 * src/lex.c (percent_table): Support `%locations'.
22409 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22410 with `locationsflag'.
22411 * doc/bison.texinfo: Document `--locations' and `%locations'.
22412 Sort the options.
22413 * tests/calc.m4: Test it.
22414
22415 For regularity of the names, replace each
22416 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22417 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22418 In addition replace each `flag' with `_flag'.
22419
d6c2cba0
AD
224202000-10-02 Akim Demaille <akim@epita.fr>
22421
22422 Also test parse error messages, including with YYERROR_VERBOSE.
22423
22424 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22425 associative).
22426 Use it to check the computations.
22427 Use it to check `nonassoc' is honored.
22428 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22429 `--yyerror-verbose'.
22430 (_AT_CHECK_CALC): Adjust to this option.
22431 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22432
5a35a6cb
AD
224332000-10-02 Akim Demaille <akim@epita.fr>
22434
22435 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22436 the latter demonstrates a flaw in the handling of non debugging
22437 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22438 was used in order to simplify:
22439
22440 #if YYDEBUG
22441 if (yydebug)
22442 {
22443 ...
22444 }
22445 #endif
22446
22447 into
22448
22449 if (yydebug)
22450 {
22451 ...
22452 }
22453
22454 unfortunately this leads to a CPP conflict when
22455 `--name-prefix=foo' is used since it produces `#define yydebug
22456 foodebug'.
22457
22458 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22459 (YYDPRINTF): New macro.
22460 Spread its use.
22461 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22462 the bison options.
22463 Also test `--verbose', `--defines' and `--name-prefix'.
22464
71da9eea
AD
224652000-10-02 Akim Demaille <akim@epita.fr>
22466
22467 Improve the readability of the produced parsers.
22468
22469 * src/bison.s1: Formatting changes.
22470 Improve the comment related to the `$' mark.
22471 (yydefault): Don't fall through to `yyresume': `goto' there.
22472 * src/output.c (output_parser): When the `$' is met, skip the end
22473 of its line.
22474 New variable, `number_of_dollar_signs', to check there's exactly
22475 one `$' in the parser skeleton.
22476
95e36146
AD
224772000-10-02 Akim Demaille <akim@epita.fr>
22478
22479 * lib/xstrdup.c: New file, from the fileutils.
22480 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22481 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22482 instead of strlen + xmalloc + strcpy.
22483 * src/symtab.c (copys): Remove, use xstrdup instead.
22484
d7020c20
AD
224852000-10-02 Akim Demaille <akim@epita.fr>
22486
22487 * src/gram.h (associativity): New enum type which replaces the
22488 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22489 `right_assoc', `left_assoc' and `non_assoc'.
22490 Adjust all dependencies.
22491 * src/reader.c: Formatting changes.
22492 (LTYPESTR): Don't define it, use it as a literal in
22493 `reader_output_yylsp'.
22494 * src/symtab.h (symbol_class): New enum type which replaces the
22495 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22496 `sunknown', `stoken and `snterm'.
22497
1916f98e
AD
224982000-10-02 Akim Demaille <akim@epita.fr>
22499
22500 * src/getargs.c (fixed_outfiles): Rename as...
22501 (yaccflag): for consistency and accuracy.
22502 Adjust dependencies.
22503
d7913476
AD
225042000-10-02 Akim Demaille <akim@epita.fr>
22505
22506 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22507 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22508 difficult and introduced a lot of core dump. It turns out that
22509 Bison used an implementation of `xmalloc' based on `calloc', and
22510 at various places it does depend upon the initialization to 0. I
22511 have not tried to isolate the pertinent places, and all the former
22512 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22513 someone should address this issue.
22514
22515 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22516 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22517 files.
22518 Adjust dependencies.
22519 * src/warshall.h: New file.
22520 Propagate.
22521
340ef489
AD
225222000-10-02 Akim Demaille <akim@epita.fr>
22523
22524 Various anti-`extern in *.c' changes.
22525
22526 * src/system.h: Include `assert.h'.
22527
b2ca4022
AD
225282000-10-02 Akim Demaille <akim@epita.fr>
22529
22530 * src/state.h (nstates, final_state, first_state, first_shift)
22531 (first_reduction): Move their exportation from here...
22532 * src/LR0.h: to here.
22533 Adjust dependencies.
22534 * src/getargs.c (statisticsflag): New variable.
22535 Add support for `--statistics'.
22536 Adjust dependencies.
22537
22538 Remove a lot of now useless `extern' statements in most files.
22539
403b315b
AD
225402000-10-02 Akim Demaille <akim@epita.fr>
22541
22542 * src/LR0.h: New file.
22543 Propagate its use.
22544
07a58c13
AD
225452000-10-02 Akim Demaille <akim@epita.fr>
22546
22547 * src/print.h: New file.
22548 Propagate its use.
22549 * src/print.c: Formatting and ordering changes.
22550 (verbose, terse): Replace with...
22551 (print_results): this new function.
22552 Adjust dependencies.
22553
0619caf0
AD
225542000-10-02 Akim Demaille <akim@epita.fr>
22555
22556 * src/conflicts.c (conflict_report): New function.
22557 (conflict_log, verbose_conflict_log): Replace with...
22558 (print_conflicts): this function.
22559 Adjust dependencies.
22560 * src/conflicts.h: New file.
22561 Propagate its inclusion.
22562
3519ec76
AD
225632000-10-02 Akim Demaille <akim@epita.fr>
22564
22565 * src/nullable.h: New file.
22566 Propagate its inclusion.
22567 * src/nullable.c: Formatting changes.
22568
015acc48
AD
225692000-10-02 Akim Demaille <akim@epita.fr>
22570
22571 * src/reduce.h: New file.
22572 Propagate its inclusion.
22573 * src/reduce.c: Topological sort and other formatting changes.
22574 (bool, TRUE, FALSE): Move their definition to...
22575 * src/system.h: here.
22576
8963a27b
AD
225772000-10-02 Akim Demaille <akim@epita.fr>
22578
22579 * src/files.c: Formatting changes.
22580 (tryopen, tryclose, openfiles): Rename as...
22581 (xfopen, xfclose, open_files): this.
22582 (stringappend): static.
22583 * src/files.h: Complete the list of exported symbols.
22584 Propagate its use.
22585
a70083a3
AD
225862000-10-02 Akim Demaille <akim@epita.fr>
22587
22588 * src/reader.h: New file.
22589 Propagate its use instead of tedious list of `extern' and
22590 prototypes.
22591 * src/reader.c: Formatting changes, topological sort,
22592 s/register//.
22593
abadc117
AD
225942000-10-02 Akim Demaille <akim@epita.fr>
22595
22596 * src/lex.h: Prototype `lex.c' exported functions.
22597 * src/reader.c: Adjust.
22598 * src/lex.c: Formatting changes.
22599 (safegetc): Rename as...
22600 (xgetc): this.
22601
720d742f
AD
226022000-10-02 Akim Demaille <akim@epita.fr>
22603
22604 * src/lalr.h: New file.
22605 Propagate its inclusion instead of prototypes and `extern'.
22606 * src/lalr.c: Formatting changes, topological sorting etc.
22607
f2acea59
AD
226082000-10-02 Akim Demaille <akim@epita.fr>
22609
22610 * src/output.c (token_actions): Introduce a temporary array,
22611 YYDEFACT, that makes it possible for this function to use
22612 output_short_table.
22613
d019d655
AD
226142000-10-02 Akim Demaille <akim@epita.fr>
22615
22616 `user_toknums' is output as a `short[]' in `output.c', while it is
22617 defined as a `int[]' in `reader.c'. For consistency with the
22618 other output tables, `user_toknums' is now defined as a table of
22619 shorts.
22620
22621 * src/reader.c (user_toknums): Be a short table instead of an int
22622 table.
22623 Adjust dependencies.
22624
22625 Factor the short table outputs.
22626
22627 * src/output.c (output_short_table): New function.
22628 * src/output.c (output_gram, output_stos, output_rule_data)
22629 (output_base, output_table, output_check): Use it.
22630
6c89f1c1
AD
226312000-10-02 Akim Demaille <akim@epita.fr>
22632
22633 * src/output.c (output): Topological sort of the functions, in
22634 order to get rid of the `static' prototypes.
22635 No longer use `register'.
22636 * src/output.h: New file.
22637 Propagate its inclusion in files explicitly prototyping functions
22638 from output.c.
22639
d9efd181
AD
226402000-09-21 Akim Demaille <akim@epita.fr>
22641
22642 * src/atgeneral.m4: Update from Autoconf.
22643
c29240e7 226442000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
22645
22646 * src/closure.h: New file.
22647 * src/closure.c: Formatting changes, topological sort over the
22648 functions, use of closure.h.
22649 (initialize_closure, finalize_closure): Rename as...
22650 (new_closure, free_closure): these. Adjust dependencies.
22651 * src/LR0.c: Formatting changes, topological sort, use of
22652 cloture.h.
22653 (initialize_states): Rename as...
22654 (new_states): this.
22655 * src/Makefile.am (noinst_HEADERS): Adjust.
22656
499daa50
AD
226572000-09-20 Akim Demaille <akim@epita.fr>
22658
22659 * src/acconfig.h: Don't protect config.h against multiple
22660 inclusion.
22661 Don't define PARAMS.
22662 * src/system.h: Define PARAMS.
22663 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22664 purpose of config.h. system.h must not try to fix wrong
22665 definitions in config.h.
22666
cc84fd5d
AD
226672000-09-20 Akim Demaille <akim@epita.fr>
22668
22669 * src/derives.h: New file.
22670 * src/main.c, src/derives.h: Use it.
22671 Formatting changes.
22672 * src/Makefile.am (noinst_HEADERS): Adjust.
22673
db5b3a89
AD
226742000-09-20 Akim Demaille <akim@epita.fr>
22675
22676 * tests/atgeneral.m4: Update from Autoconf.
22677 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22678 (AT_CHECK_CALC): New macros.
22679 Use these macros to test bison with options `', `--raw',
22680 `--debug', `--yacc', `--yacc --debug'.
22681
ceed8467
AD
226822000-09-19 Akim Demaille <akim@epita.fr>
22683
22684 * src/output.c: Formatting changes.
22685 * src/machine.h: Remove, leaving its contents in...
22686 * src/system.h: here.
22687 Include stdio.h.
22688 Adjust all dependencies on stdio.h and machine.h.
22689 * src/getargs.h: New file.
22690 Let all `extern' declarations about getargs.c be replaced with
22691 inclusion of `getargs.h'.
22692 * src/Makefile.am (noinst_HEADERS): Adjust.
22693
22694 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22695 scope.
22696 (yyerror): Returns void, not int.
22697 * doc/bison.texinfo: Formatting changes.
22698
05a1d24b
AD
226992000-09-19 Akim Demaille <akim@epita.fr>
22700
22701 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22702 portable.
22703
cbd25751
AD
227042000-09-18 Akim Demaille <akim@epita.fr>
22705
22706 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22707 * src/Makefile.am (INCLUDES): Don't.
22708 Be ready to fetch headers in lib/.
22709
13863333
AD
227102000-09-18 Akim Demaille <akim@epita.fr>
22711
22712 * doc/bison.texinfo: Update the copyright.
22713 ANSIfy and GNUify the examples.
22714 Remove the old menu.
22715
0d533154
AD
227162000-09-18 Akim Demaille <akim@epita.fr>
22717
22718 First set of tests: use the `calc' example from the documentation.
22719
22720 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22721 is defined only when YYDEBUG is.
22722 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22723 * src/files.c (tryopen, tryclose): Formatting changes.
22724 Move to the top and be static.
22725 * src/reader.c (read_signed_integer): Likewise.
22726 * tests/calc.m4: New file.
22727 * Makefile.am, suite.m4: Adjust.
22728 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22729
e79137ac
AD
227302000-09-18 Akim Demaille <akim@epita.fr>
22731
22732 Add support for an Autotest test suite for Bison.
22733
22734 * m4/m4.m4, m4/atconfig.m4: New files.
22735 * m4/Makefile.am (EXTRA_DIST): Adjust.
22736 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22737 files.
22738 * src/getargs.c: Display a more standard --version message.
22739 * src/reader.c (reader): Formatting changes.
22740 No longer depend upon VERSION_STRING.
22741 * configure.in: No longer use `dnl'.
22742 Set up the test suite and the new directory `tests/.
22743 (VERSION_STRING): Remove.
22744
27821bff
AD
227452000-04-14 Akim Demaille <akim@epita.fr>
22746
22747 * src/reader.c (copy_comment2): New function, same as former
22748 `copy_comment', but outputs into two FILE *.
22749 (copy_comment): Use it.
22750 (parse_union_decl): Use it.
22751 (get_type, parse_start_decl): Use the same `invalid' message.
22752 (parse_start_decl, parse_union_decl): Use the same `multiple'
22753 message.
22754 (parse_union_decl, copy_guard, copy_action): Use the same
22755 `unmatched' message.
22756 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22757
cfe5fbc0
AD
227582000-03-31 Akim Demaille <akim@epita.fr>
22759
22760 * src/files.c (tryopen, tryclose): Move to the top.
22761 Be static.
22762
cb7db13e
AD
227632000-03-31 Akim Demaille <akim@epita.fr>
22764
22765 * src/main.c (main): Don't call `done', exit does it.
22766
a0f6b076
AD
227672000-03-31 Akim Demaille <akim@epita.fr>
22768
36281465
AD
22769 * allocate.c: s/return (foo)/return foo/.
22770 * lalr.c: Likewise.
22771 * LR0.c: Likewise.
22772 * output.c: Likewise.
22773 * reader.c: Likewise.
22774 * symtab.c: Likewise.
22775 * vmsgetargs.c: Likewise.
22776
227772000-03-31 Akim Demaille <akim@epita.fr>
22778
22779 Clean up the error reporting functions.
a0f6b076
AD
22780
22781 * src/report.c: New file.
22782 * src/report.h: Likewise.
22783 * src/Makefile.am: Adjust.
22784 * m4/error.m4: New file.
22785 * m4/Makefile.am: Adjust.
22786 * configure.in (jm_PREREQ_ERROR): Call it.
22787 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22788 Remove.
22789 (fatal, fatals): Remove. All callers use complain.c::fatal.
22790 (warn, warni, warns, warnss, warnss): Remove. All callers use
22791 complain.c::complain.
22792 (toomany): Remove, use fatal instead.
22793 * src/files.c (done): No argument, use complain_message_count.
22794 * src/main.c (main): Register `done' to `atexit'.
22795
22796 * src/getargs.c (usage): More `fputs', less `fprintf'.
22797
18539825
AD
227982000-03-28 Akim Demaille <akim@epita.fr>
22799
22800 * lib/: New directory.
22801 * Makefile.am (SUBDIRS): Adjust.
22802 * configure.in: Adjust.
22803 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22804 useless.
22805 * src/alloca.c: Moved to lib/.
22806 * src/getopt.c: Likewise.
22807 * src/getopt1.c: Likewise.
22808 * src/getopt.h: Likewise.
22809 * src/ansi2knr.c: Likewise.
22810 * src/ansi2knr.1: Likewise.
22811 * src/Makefile.am: Adjust.
22812 * lib/Makefile.am: New file.
22813
9f306f2a
AD
228142000-03-28 Akim Demaille <akim@epita.fr>
22815
22816 * src/getargs.c (usage): Refresh the help message.
22817
0ba347b6
AD
228182000-03-17 Akim Demaille <akim@epita.fr>
22819
22820 * src/getopt1.c: Updated from textutils 2.0e
22821 * src/getopt.c: Likewise.
22822 * src/getopt.h: Likewise.
22823
dbe7f271
AD
228242000-03-17 Akim Demaille <akim@epita.fr>
22825
22826 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22827 the file name, not the whole `#line LINE FILE'.
22828
75bbe78d
AD
228292000-03-17 Akim Demaille <akim@epita.fr>
22830
22831 On syntax errors, report the token on which we choked.
22832
aa5fd0ee
AD
22833 * src/bison.s1 (yyparse): In the label yyerrlab, when
22834 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 22835
7b306f52
AD
228362000-03-17 Akim Demaille <akim@epita.fr>
22837
aa5fd0ee 22838 * src/reader.c (copy_at): New function.
7b306f52
AD
22839 (copy_guard): Use it.
22840 (copy_action): Use it.
22841
e87b5700
AD
228422000-03-17 Akim Demaille <akim@epita.fr>
22843
22844 Be kind to translators, save some useless translations.
22845
aa5fd0ee 22846 * src/main.c (banner): New function.
e87b5700
AD
22847 (fatal_banner): Use it.
22848 (warn_banner): Use it.
22849
ae3c3164
AD
228502000-03-17 Akim Demaille <akim@epita.fr>
22851
aa5fd0ee
AD
22852 * src/reader.c (copy_definition): Use copy_string and
22853 copy_comment. Removed now unused `match', `ended',
22854 `cplus_comment'.
ae3c3164
AD
22855 (copy_comment, copy_string): Moved, to be visible from
22856 copy_definition.
22857
4dc58e7c
AD
228582000-03-17 Akim Demaille <akim@epita.fr>
22859
aa5fd0ee
AD
22860 * src/reader.c (copy_string): Declare `static inline'. No
22861 problems with inline, since it is checked by configure.
4dc58e7c
AD
22862 (copy_comment): Likewise.
22863
0a6384c4
AD
228642000-03-17 Akim Demaille <akim@epita.fr>
22865
aa5fd0ee 22866 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 22867
3cef001a
AD
228682000-03-17 Akim Demaille <akim@epita.fr>
22869
aa5fd0ee 22870 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
22871 (copy_action): Use it. Removed now unused `match', `ended',
22872 `cplus_comment'.
22873 (copy_guard): Likewise.
22874
ca36d2ef
AD
228752000-03-17 Akim Demaille <akim@epita.fr>
22876
aa5fd0ee 22877 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
22878 (copy_action): Use it.
22879 (copy_guard): Likewise.
22880
6666f98f
AD
228812000-03-17 Akim Demaille <akim@epita.fr>
22882
22883 Change the handling of @s so that they behave exactly like $s.
22884 There is now a pseudo variable @$ (readble and writable), location
22885 of the lhs of the rule (by default ranging from the location of
22886 the first symbol of the rhs, to the location of the last symbol,
22887 or, if the rhs is empty, YYLLOC).
22888
22889 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22890 yyval.
22891 (yyparse): When providing a default semantic action, provide a
22892 default location action.
22893 (after the $): No longer change `*YYLSP', just stack YYLOC the
22894 same way you stack YYVAL.
22895 * src/reader.c (read_declarations): Use warns.
22896 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22897 (copy_action, case '@'): Likewise.
22898 Use a standard error message, to save useless work from
22899 translators.
22900
41aca2e0
AD
229012000-03-17 Akim Demaille <akim@epita.fr>
22902
aa5fd0ee
AD
22903 * src/bison.s1: Formatting and cosmetics changes.
22904 * src/reader.c: Likewise.
41aca2e0
AD
22905 Update the Copyright notice.
22906
dc08c1d5
AD
229072000-03-17 Akim Demaille <akim@epita.fr>
22908
aa5fd0ee
AD
22909 * src/bison.s1 (#line): All set to `#line' only, since the
22910 Makefile now handles them.
dc08c1d5 22911
9ee3c97b
AD
229122000-03-16 Akim Demaille <akim@epita.fr>
22913
22914 * src/output.c (output_rule_data): Output the documentation of
22915 some of the tables.
22916 (Copyright notice): Update.
22917 Formatting changes.
22918
0de741ca
AD
229192000-03-16 Akim Demaille <akim@epita.fr>
22920
22921 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22922 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22923 One `#if YYDEBUG' remains, since it uses variables which are
22924 defined only if `YYDEBUG != 0'.
22925
bb10be54
AD
229262000-03-16 Akim Demaille <akim@epita.fr>
22927
22928 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22929 and related variables so that the similarities are highlighted.
22930
b07b484a
AD
229312000-03-16 Akim Demaille <akim@epita.fr>
22932
22933 * src/bison.s1: Properly indent CPP directives.
22934
361f60b3
AD
229352000-03-16 Akim Demaille <akim@epita.fr>
22936
22937 * src/bison.s1: Properly indent the `alloca' CPP section.
22938
8c44d3ec
AD
229392000-03-16 Akim Demaille <akim@epita.fr>
22940
22941 Do not hard code values of directories in `configure.in'.
22942 Update the `configure' tool chain.
22943
22944 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22945 src/makefile.am.
22946 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22947 (AC_OUTPUT): Add m4/Makefile.
22948 Bump to bison 1.28a, 1.29 has never been released.
22949 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22950 handled via src/Makefile.am.
22951 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22952 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22953 autoheader.
22954 * Makefile.am (SUBDIRS): Add m4.
22955 (ACLOCAL_AM_FLAGS): New variable.
22956 (AUTOMAKE_OPTIONS): Add check-news.
22957 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22958 the proper line number and file name.
22959 (DEFS): Propagate the location of bison library files and of the
22960 locale files.
22961 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22962 builddir.
22963 * acinclude.m4: Remove, replaced by the directory m4.
22964 * m4/Makefile.am (EXTRA_DIST): New variable.
22965 * m4/gettext.m4: New file, from the fileutils.
22966 * m4/lcmessage.m4: Likewise
22967 * m4/progtest.m4: Likewise.
22968 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22969
f95997e7
AD
229702000-03-10 Akim Demaille <akim@epita.fr>
22971
22972 * src/closure.c:
22973 Formatting changes of various comments.
22974 Respect the GNU coding standards at various places.
22975 Don't use `_()' when no translation is needed.
22976
229771999-12-13 Jesse Thilo <jthilo@gnu.org>
22978
22979 * src/files.c:
22980 OS/2 honors TMPDIR environment variable.
22981
229821999-12-13 Jesse Thilo <jthilo@gnu.org>
22983
22984 * doc/bison.texinfo: Tweaked spelling and grammar.
22985 Updated ISBN.
22986 Removed reference to price of printed copy.
22987 Mention BISON_SIMPLE and BISON_HAIRY.
22988
229891999-12-13 Jesse Thilo <jthilo@gnu.org>
22990
22991 * configure.in, NEWS:
22992 Bison 1.29 released.
22993
229941999-10-27 Jesse Thilo <jthilo@gnu.org>
22995
22996 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22997 Added reference card.
22998
229991999-07-26 Jesse Thilo <jthilo@gnu.org>
23000
23001 * po/ru.po: Added Russian translation.
23002
230031999-07-26 Jesse Thilo <jthilo@gnu.org>
23004
23005 * configure.in: Added Russian translation.
23006
230071999-07-06 Jesse Thilo <jthilo@gnu.org>
23008
23009 * configure.in, NEWS, README:
23010 Released version 1.28.
23011
230121999-06-14 Jesse Thilo <jthilo@gnu.org>
23013
23014 * src/system.h:
23015 Squashed redefinition warning on some systems.
23016
23017 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23018 Have configure build version string instead of relying on ANSI string
23019 concatentation.
23020
230211999-06-14 Jesse Thilo <jthilo@gnu.org>
23022
23023 * po/POTFILES.in: Got rid of version.c.
23024
230251999-06-14 Jesse Thilo <jthilo@gnu.org>
23026
23027 * acconfig.h, configure.in:
23028 Have configure build version string instead of relying on ANSI string
23029 concatentation.
23030
230311999-06-08 Jesse Thilo <jthilo@gnu.org>
23032
23033 * doc/bison.1:
23034 Dropped mention of `+' for long-named options.
23035
230361999-05-30 Jesse Thilo <jthilo@gnu.org>
23037
23038 * src/files.c: Added <unistd.h> for unlink().
23039
23040 * src/Makefile.am, src/system.h:
23041 I18n fixes.
23042
230431999-05-30 Jesse Thilo <jthilo@gnu.org>
23044
23045 * README: Added a FAQ list.
23046
23047 * configure.in, acconfig.h:
23048 I18n fixes.
23049
230501999-05-30 Jesse Thilo <jthilo@gnu.org>
23051
23052 * doc/FAQ, doc/Makefile.am:
23053 Added a FAQ list.
23054
230551999-05-19 Jesse Thilo <jthilo@gnu.org>
23056
23057 * src/alloc.h, src/symtab.h, src/version.c:
23058 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23059
230601999-04-18 Jesse Thilo <jthilo@gnu.org>
23061
23062 * src/.cvsignore, src/Makefile.am:
23063 Reorganized: sources in `src', documentation in `doc'.
23064
23065 * src/lex.c (literalchar):
23066 fixed the code for escaping double quotes (thanks
23067 Jonathan Czisny.)
23068
230691999-04-18 Jesse Thilo <jthilo@gnu.org>
23070
23071 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23072 Adjusted paths to reflect directory reorganization.
23073
230741999-04-18 Jesse Thilo <jthilo@gnu.org>
23075
23076 * doc/.cvsignore, doc/Makefile.am:
23077 Reorganized: sources in `src', documentation in `doc'.
23078
230791999-04-18 Jesse Thilo <jthilo@gnu.org>
23080
23081 * configure.in:
23082 Updated AC_INIT file to reflect directory reorganization.
23083
23084 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23085 Reorganized: sources in `src', documentation in `doc'.
23086
230871999-04-13 Jesse Thilo <jthilo@gnu.org>
23088
23089 * src/allocate.c:
23090 Don't declare calloc() and realloc() if not necessary.
23091
230921999-04-13 Jesse Thilo <jthilo@gnu.org>
23093
23094 * configure.in, acconfig.h, acinclude.m4:
23095 Don't declare calloc() and realloc() if not necessary.
23096
230971999-03-23 Jesse Thilo <jthilo@gnu.org>
23098
23099 * po/.cvsignore: Added i18n support.
23100
231011999-03-23 Jesse Thilo <jthilo@gnu.org>
23102
23103 * acconfig.h, configure.in, Makefile.am:
23104 Added i18n support.
23105
231061999-03-22 Jesse Thilo <jthilo@gnu.org>
23107
23108 * src/bison.s1: Fixed #line numbers.
23109
231101999-03-15 Jesse Thilo <jthilo@gnu.org>
23111
23112 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23113 Added PO files from Translation Project.
23114
231151999-03-03 Jesse Thilo <jthilo@gnu.org>
23116
23117 * Makefile.am:
23118 Added support for non-ANSI compilers (ansi2knr).
23119
231201999-02-16 Jesse Thilo <jthilo@gnu.org>
23121
23122 * configure.in: Bumped version number to 1.27.
23123
23124 * Makefile.am:
23125 Added `bison.simple' to list of files removed by `make distclean'.
23126
231271999-02-12 Jesse Thilo <jthilo@gnu.org>
23128
23129 * src/files.c, src/files.h:
23130 Defined locations of parser files in config.h instead of Makefile.
23131
231321999-02-12 Jesse Thilo <jthilo@gnu.org>
23133
23134 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23135 Defined locations of parser files in config.h instead of Makefile.
23136
231371999-02-09 Jesse Thilo <jthilo@gnu.org>
23138
23139 * Makefile.am:
23140 Removed inappropriate use of $< macro.
23141
231421999-02-05 Jesse Thilo <jthilo@gnu.org>
23143
23144 * po/Makefile.in.in, po/POTFILES.in:
23145 Add `po' directory skeleton.
23146
231471999-01-27 Jesse Thilo <jthilo@gnu.org>
23148
23149 * README: Document help-bison list.
23150
23151 * configure.in: Add check for mkstemp().
23152
231531999-01-20 Jesse Thilo <jthilo@gnu.org>
23154
23155 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23156 Hush a few compiler warnings.
23157
23158 * src/files.c:
23159 Add tryclose(), which verifies that fclose was successful.
23160 Hush a couple of compiler warnings.
23161
231621999-01-20 Jesse Thilo <jthilo@gnu.org>
23163
23164 * Makefile.am, OChangeLog:
23165 ChangeLog is now automatically generated. Include the old version as
23166 OChangeLog.
23167
231681999-01-14 Jesse Thilo <jthilo@gnu.org>
23169
23170 * 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:
23171 Update FSF address.
23172
231731999-01-14 Jesse Thilo <jthilo@gnu.org>
23174
23175 * doc/bison.texinfo: Fix formatting glitch.
23176
23177 * doc/bison.texinfo: Update FSF address.
23178
231791999-01-14 Jesse Thilo <jthilo@gnu.org>
23180
23181 * acconfig.h: Update FSF address.
23182
231831999-01-08 Jesse Thilo <jthilo@gnu.org>
23184
23185 * src/system.h:
23186 Don't define PACKAGE here, since config.h defines it.
23187
231881998-12-30 Jesse Thilo <jthilo@gnu.org>
23189
23190 * src/reader.c: Update copyright date.
23191
23192 * src/main.c:
23193 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23194 favor of output directly to stderr (avoids buffer overruns).
23195
23196 * src/reader.c: Some checks for premature EOF.
23197
23198 * 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:
23199 Use prototypes if the compiler understands them.
23200
23201 * src/files.c: Honor TMPDIR on Unix hosts.
23202 Use prototypes if the compiler understands them.
23203
23204 * src/reader.c:
23205 Fix a couple of buffer overrun bugs.
23206 Use prototypes if the compiler understands them.
23207
23208 * src/system.h: Include unistd.h and ctype.h.
23209 Use #ifdef instead of #if for NLS symbols.
23210
232111998-12-30 Jesse Thilo <jthilo@gnu.org>
23212
23213 * doc/bison.texinfo:
23214 Delete comment "consider using @set for edition number, etc..." since
23215 we now are doing so.
23216
232171998-12-30 Jesse Thilo <jthilo@gnu.org>
23218
23219 * configure.in:
23220 Use prototypes if the compiler understands them.
23221
23222 * NEWS: Document 1.26 highlights.
23223
23224 * Makefile.am: Require Automake 1.3 or later.
23225
23226 * acconfig.h:
23227 Use prototypes if the compiler understands them.
23228
232291998-12-29 Jesse Thilo <jthilo@gnu.org>
23230
23231 * src/version.c:
23232 Use VERSION symbol from automake for version number.
23233
232341998-12-29 Jesse Thilo <jthilo@gnu.org>
23235
23236 * acconfig.h, configure.in, version.cin:
23237 Use VERSION symbol from automake for version number.
23238
232391998-11-28 Jesse Thilo <jthilo@gnu.org>
23240
23241 * Makefile.am:
23242 Distribute original version of simple parser (bison.s1), not built
23243 version (bison.simple).
23244
232451998-11-28 Jesse Thilo <jthilo@gnu.org>
23246
23247 * doc/bison.texinfo: Add info dir entry.
23248
23249 * doc/bison.texinfo:
23250 Let automake put version number into documentation.
23251
232521998-11-26 Jesse Thilo <jthilo@gnu.org>
23253
23254 * src/bison.cld, src/build.com, src/vmshlp.mar:
23255 Add non-RCS files from /gd/gnu/bison.
23256
232571998-11-26 Jesse Thilo <jthilo@gnu.org>
23258
23259 * doc/bison.1:
23260 Document the BISON_HAIRY and BISON_SIMPLE variables.
23261
232621998-11-25 Jesse Thilo <jthilo@gnu.org>
23263
23264 * src/version.c: Build version.c automatically.
23265
23266 * src/reader.c:
23267 Fix token numbering (used to start at 258, not 257).
23268
23269 * src/system.h: Include config.h.
23270
23271 * src/getargs.c: Update bug report address.
23272
23273 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23274 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23275
232761998-11-25 Jesse Thilo <jthilo@gnu.org>
23277
23278 * Makefile.am:
23279 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23280
23281 * configure.in, version.cin:
23282 Build version.c automatically.
23283
23284 * AUTHORS: Add AUTHORS file.
23285
23286 * README: Update bug report address.
23287
23288 * bison.simple:
23289 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23290
23291 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23292 Add automake stuff.
23293
232941998-11-25 Jesse Thilo <jthilo@gnu.org>
23295
23296 * doc/bison.texinfo: Clean up some formatting.
23297
232981998-05-05 Richard Stallman <rms@gnu.org>
23299
23300 * doc/bison.texinfo:
23301 Explain better why to make a pure parser.
23302
233031998-01-05 Richard Stallman <rms@gnu.org>
23304
23305 * src/files.c (openfiles):
23306 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23307 find a temporary directory, if possible. Do not unlink files while
23308 they are open.
23309
233101997-08-25 Richard Stallman <rms@gnu.org>
23311
23312 * src/reader.c (stack_offset;):
23313 Change some warni to warns.
23314
23315 * src/lex.c (literalchar): Use warns, not warni.
23316
233171997-06-28 Richard Stallman <rms@gnu.org>
23318
23319 * src/bison.s1: Add a Bison version comment.
23320
23321 * src/main.c (fatal, warn, berror):
23322 Use program_name.
23323
233241997-06-28 Richard Stallman <rms@gnu.org>
23325
23326 * Makefile.in (bison_version): New variable.
23327 (dist): Use that variable.
23328 (bison.s1): Substitute the Bison version into bison.simple.
23329
23330 * bison.simple: Add a Bison version comment.
23331
233321997-06-18 Richard Stallman <rms@gnu.org>
23333
23334 * src/main.c (fatal, warn, berror):
23335 Make error messages standard.
23336 (toomany): Improve error message text.
23337
23338 * 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:
23339 new.h renamed to alloc.h.
23340
233411997-06-18 Richard Stallman <rms@gnu.org>
23342
23343 * Makefile.in: new.h renamed to alloc.h.
23344
233451997-05-24 Richard Stallman <rms@gnu.org>
23346
23347 * src/lex.c (literalchar):
23348 Fix the code for escaping \, " and '.
23349
23350 (lex): Avoid trouble when there are many chars
23351 to discard in a char literal with just several chars in it.
23352
233531997-05-17 Richard Stallman <rms@gnu.org>
23354
23355 * src/bison.s1:
23356 Use malloc, if using alloca is troublesome.
23357 (YYSTACK_USE_ALLOCA): New flag macro.
23358 Define it for some systems and compilers.
23359 (YYSTACK_ALLOC): New macro.
23360 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23361 If it was malloc'd, free it.
23362
233631997-05-17 Richard Stallman <rms@gnu.org>
23364
23365 * bison.simple:
23366 Use malloc, if using alloca is troublesome.
23367 (YYSTACK_USE_ALLOCA): New flag macro.
23368 Define it for some systems and compilers.
23369 (YYSTACK_ALLOC): New macro.
23370 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23371 If it was malloc'd, free it.
23372
233731997-04-23 Richard Stallman <rms@gnu.org>
23374
23375 * src/bison.s1:
23376 (alloca) [__hpux]: Always define as __builtin_alloca.
23377
233781997-04-23 Richard Stallman <rms@gnu.org>
23379
23380 * bison.simple:
23381 (alloca) [__hpux]: Always define as __builtin_alloca.
23382
233831997-04-22 Richard Stallman <rms@gnu.org>
23384
23385 * src/bison.s1:
23386 [__hpux]: Include alloca.h (right for HPUX 10)
23387 instead of declaring alloca (right for HPUX 9).
23388
23389 * src/bison.s1 (__yy_memcpy):
23390 Declare arg `count' as unsigned int.
23391 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23392
233931997-04-22 Richard Stallman <rms@gnu.org>
23394
23395 * bison.simple:
23396 [__hpux]: Include alloca.h (right for HPUX 10)
23397 instead of declaring alloca (right for HPUX 9).
23398
23399 * bison.simple (__yy_memcpy):
23400 Declare arg `count' as unsigned int.
23401 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23402
234031997-01-03 Richard Stallman <rms@gnu.org>
23404
23405 * src/allocate.c: [__STDC__ or _MSC_VER]:
23406 Declare calloc and realloc to return void *.
23407
234081997-01-02 Richard Stallman <rms@gnu.org>
23409
23410 * src/system.h:
23411 [_MSC_VER]: Include stdlib.h and process.h.
23412 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23413
23414 * src/main.c (main): Return FAILURE as a value.
23415 (printable_version): Declare arg as int, not char.
23416
234171997-01-02 Richard Stallman <rms@gnu.org>
23418
23419 * Makefile.in (dist):
23420 Explicitly check for symlinks, and copy them.
23421
234221996-12-19 Richard Stallman <rms@gnu.org>
23423
23424 * src/files.c:
23425 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23426
234271996-12-18 Paul Eggert <eggert@gnu.org>
23428
23429 * src/bison.s1 (yyparse):
23430 If __GNUC__ and YYPARSE_PARAM are both defined,
23431 declare yyparse to have a void * argument.
23432
234331996-12-18 Paul Eggert <eggert@gnu.org>
23434
23435 * bison.simple (yyparse):
23436 If __GNUC__ and YYPARSE_PARAM are both defined,
23437 declare yyparse to have a void * argument.
23438
234391996-12-17 Richard Stallman <rms@gnu.org>
23440
23441 * src/reduce.c (nbits): Add some casts.
23442
234431996-08-12 Richard Stallman <rms@gnu.org>
23444
23445 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23446
234471996-08-12 Richard Stallman <rms@gnu.org>
23448
23449 * bison.simple: Test _MSDOS as well as _MSDOS_.
23450
234511996-07-31 Richard Stallman <rms@gnu.org>
23452
23453 * src/bison.s1:
23454 [__sun && __i386]: Include alloca.h.
23455
234561996-07-31 Richard Stallman <rms@gnu.org>
23457
23458 * bison.simple:
23459 [__sun && __i386]: Include alloca.h.
23460
234611996-07-30 Richard Stallman <rms@gnu.org>
23462
23463 * src/bison.s1: Comment change.
23464
23465 * src/bison.s1: Test _MSDOS_, not MSDOS.
23466
234671996-07-30 Richard Stallman <rms@gnu.org>
23468
23469 * bison.simple: Comment change.
23470
23471 * bison.simple: Test _MSDOS_, not MSDOS.
23472
234731996-06-01 Richard Stallman <rms@gnu.org>
23474
23475 * 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:
23476 Insert `_' macro around many string constants.
23477
23478 * src/main.c:
23479 Insert `_' macro around many string constants.
23480
23481 (main): Call setlocale, bindtextdomain and textdomain.
23482
23483 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23484 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23485 [ENABLE_NLS]: Include libintl.h.
23486 [ENABLE_NLS] (gettext): Define.
23487 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23488 (N_, PACKAGE, LOCALEDIR): New macros.
23489
234901996-06-01 Richard Stallman <rms@gnu.org>
23491
23492 * POTFILES.in: New file.
23493
23494 * Makefile.in (allocate.o):
23495 Define target explicitly.
23496
23497 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23498 (LDFLAGS): Set to @LDFLAGS@.
23499 (configure): Run autoconf only if preceding `cd' succeeds.
23500 (bison.s1): Redirect output to temporary file then move the
23501 temporary to the target, rather than redirecting directly to bison.s1.
23502 (clean): Remove config.status and config.log.
23503 (distclean): Don't remove config.status here.
23504
235051996-05-12 Richard Stallman <rms@gnu.org>
23506
23507 * src/bison.s1:
23508 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23509
235101996-05-12 Richard Stallman <rms@gnu.org>
23511
23512 * bison.simple:
23513 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23514
235151996-05-11 Richard Stallman <rms@gnu.org>
23516
23517 * src/bison.s1 (__yy_memcpy):
23518 Really reorder the args, as was supposedly done on Feb 14 1995.
23519 (yyparse): Calls changed accordingly.
23520
235211996-05-11 Richard Stallman <rms@gnu.org>
23522
23523 * Makefile.in (dist): Don't use $(srcdir).
23524
23525 * bison.simple (__yy_memcpy):
23526 Really reorder the args, as was supposedly done on Feb 14 1995.
23527 (yyparse): Calls changed accordingly.
23528
235291996-01-27 Richard Stallman <rms@gnu.org>
23530
23531 * src/output.c (output_rule_data):
23532 Test YYERROR_VERBOSE in the conditional
23533 around the definition of ttyname.
23534
235351995-12-29 Richard Stallman <rms@gnu.org>
23536
23537 * src/bison.s1:
23538 Fix line numbers in #line commands.
23539
235401995-12-29 Richard Stallman <rms@gnu.org>
23541
23542 * bison.simple:
23543 Fix line numbers in #line commands.
23544
235451995-12-27 Richard Stallman <rms@gnu.org>
23546
23547 * src/bison.s1 (YYPARSE_PARAM_DECL):
23548 In C++, make it always null.
23549 (YYPARSE_PARAM_ARG): New macro.
23550 (yyparse): Use YYPARSE_PARAM_ARG.
23551
235521995-12-27 Richard Stallman <rms@gnu.org>
23553
23554 * bison.simple (YYPARSE_PARAM_DECL):
23555 In C++, make it always null.
23556 (YYPARSE_PARAM_ARG): New macro.
23557 (yyparse): Use YYPARSE_PARAM_ARG.
23558
235591995-11-29 Richard Stallman <rms@gnu.org>
23560
23561 * doc/bison.texinfo:
23562 Describe literal string tokens, %raw, %no_lines, %token_table.
23563
235641995-11-29 Daniel Hagerty <hag@gnu.org>
23565
23566 * doc/bison.texinfo: Fixed update date
23567
235681995-10-16 Richard Stallman <rms@gnu.org>
23569
23570 * src/version.c: Version 1.25.
23571
235721995-10-16 Richard Stallman <rms@gnu.org>
23573
23574 * NEWS: *** empty log message ***
23575
235761995-10-16 Richard Stallman <rms@gnu.org>
23577
23578 * doc/bison.1, doc/bison.rnh:
23579 Add new options.
23580
235811995-10-15 Richard Stallman <rms@gnu.org>
23582
23583 * src/vmsgetargs.c, src/getargs.c:
23584 Added -n, -k, and -raw switches.
23585 (noparserflag, toknumflag, rawtoknumflag): New variables.
23586
23587 * src/symtab.h (SALIAS):
23588 New #define for adding aliases to %token.
23589 (struct bucket): Added `alias' field.
23590
23591 * src/reduce.c (reduce_grammar):
23592 Revise error message.
23593 (print_notices): Remove final `.' from error message.
23594
23595 * src/reader.c (reader_output_yylsp):
23596 New function.
23597 (readgram): Use `#if 0' around code that accepted %command
23598 inside grammar rules: The documentation doesn't allow it,
23599 and it will fail since the %command processors scan for the next %.
23600 (parse_token_decl): Extended the %token
23601 declaration to allow a multi-character symbol as an alias.
23602 (parse_thong_decl): New function.
23603 (read_declarations): Added %thong declarations.
23604 (read_declarations): Handle NOOP to deal with allowing
23605 % declarations as another means to specify the flags.
23606 (readgram): Allow %prec prior to semantics embedded in a rule.
23607 (skip_to_char, read_declarations, copy_definition)
23608 (parse_token_decl, parse_start_decl, parse_type_decl)
23609 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23610 (get_type_name, copy_guard, copy_action, readgram)
23611 (get_type, packsymbols): Revised most error messages.
23612 Changed `fatal' to `warnxxx' to avoid aborting for error.
23613 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23614 (read_declarations): Improve the error message for
23615 an invalid character. Do not abort.
23616 (read_declarations, copy_guard, copy_action): Use
23617 printable_version to avoid unprintable characters in printed output.
23618 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23619 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23620 Allow the type of a non-terminal can be given
23621 more than once, as long as all specifications give the same type.
23622
23623 * src/output.c:
23624 (output_headers, output_trailers, output, output_gram)
23625 (output_rule_data): Implement noparserflag variable.
23626 Implement toknumflag variable.
23627 (output): Call reader_output_yylsp to output LTYPESTR.
23628
23629 * src/main.c (main):
23630 If reader sees an error, don't process the grammar.
23631 (fatals): Updated to not use VARARGS1.
23632 (printable_version, int_to_string, warn, warni, warns, warnss)
23633 (warnsss): New error reporting functions. Avoid abort for error.
23634
23635 * src/lex.h:
23636 Added THONG and NOOP for alias processing.
23637 Added SETOPT for the new code that allows setting options with %flags.
23638
23639 * src/lex.c:
23640 Include getopt.h. Add some extern decls.
23641 (safegetc): New function to deal with EOF gracefully.
23642 (literalchar); new function to deal with reading \ escapes.
23643 (lex): Use literalchar.
23644 (lex): Implemented "..." tokens.
23645 (literalchar, lex, parse_percent_token): Made tokenbuffer
23646 always contain the token. This includes growing the token
23647 buffer while reading an integer.
23648 (parse_percent_token): Replaced if-else statement with percent_table.
23649 (parse_percent_token): Added % declarations as another
23650 way to specify the flags -n, -l, and -r. Also added hooks for
23651 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23652 major changes to files.c.
23653 (lex) Retain in the incoming stream a character following
23654 an incorrect '/'.
23655 (skip_white_space, lex): Revised most error messages
23656 and changed fatal to warn to avoid aborting.
23657 (percent_table): Added %thong declarations.
23658
23659 * src/gram.h: Comment changes.
23660
23661 * src/files.c (openfiles, open_extra_files, done):
23662 Add faction flag
23663 and actfile file. Handle noparserflag. Both for -n switch.
23664
23665 * src/conflicts.c (resolve_sr_conflict):
23666 Remove use of alloca.
23667
236681995-06-01 Jim Meyering <meyering@gnu.org>
23669
23670 * doc/bison.texinfo: *** empty log message ***
23671
236721995-05-06 Richard Stallman <rms@gnu.org>
23673
23674 * src/bison.s1: Comment change.
23675
236761995-05-06 Richard Stallman <rms@gnu.org>
23677
23678 * bison.simple: Comment change.
23679
236801995-05-03 Richard Stallman <rms@gnu.org>
23681
23682 * src/version.c: Version now 1.24.
23683
23684 * src/bison.s1: Change distribution terms.
23685
23686 * src/version.c: Version now 1.23.
23687
236881995-05-03 Richard Stallman <rms@gnu.org>
23689
23690 * doc/bison.texinfo:
23691 Rewrite "Conditions for Using Bison".
23692 Update version to 1.24.
23693
236941995-05-03 Richard Stallman <rms@gnu.org>
23695
23696 * bison.simple: Change distribution terms.
23697
236981995-02-23 Richard Stallman <rms@gnu.org>
23699
23700 * src/files.c: Test __VMS_POSIX as well as VMS.
23701
237021995-02-14 Jim Meyering <meyering@gnu.org>
23703
23704 * src/bison.s1 (__yy_memcpy):
23705 Renamed from __yy_bcopy to avoid
23706 confusion. Reverse FROM and TO arguments to be consistent with
23707 those of memcpy.
23708
237091995-02-14 Jim Meyering <meyering@gnu.org>
23710
23711 * bison.simple (__yy_memcpy):
23712 Renamed from __yy_bcopy to avoid
23713 confusion. Reverse FROM and TO arguments to be consistent with
23714 those of memcpy.
23715
237161994-11-10 David J. MacKenzie <djm@gnu.org>
23717
23718 * NEWS: reformat
23719
23720 * NEWS: New file.
23721
23722 * Makefile.in (DISTFILES): Include NEWS.
23723
23724 * Makefile.in (DISTFILES):
23725 Include install-sh, not install.sh.
23726
23727 * configure.in: Update to Autoconf v2 macro names.
23728
237291994-10-05 David J. MacKenzie <djm@gnu.org>
23730
23731 * Makefile.in: fix typo
23732
23733 * Makefile.in (prefix, exec_prefix):
23734 Let configure set them.
23735
237361994-09-28 David J. MacKenzie <djm@gnu.org>
23737
23738 * Makefile.in: Set datadir to $(prefix)/share.
23739
237401994-09-15 Richard Stallman <rms@gnu.org>
23741
23742 * src/bison.s1:
23743 Update copyright notice and GPL version.
23744
237451994-09-15 Richard Stallman <rms@gnu.org>
23746
23747 * bison.simple:
23748 Update copyright notice and GPL version.
23749
237501994-07-12 Richard Stallman <rms@gnu.org>
23751
23752 * src/reduce.c, src/reader.c:
23753 entered into RCS
23754
237551994-05-05 David J. MacKenzie <djm@gnu.org>
23756
23757 * Makefile.in: entered into RCS
23758
237591994-03-26 Richard Stallman <rms@gnu.org>
23760
23761 * src/bison.s1: entered into RCS
23762
237631994-03-26 Richard Stallman <rms@gnu.org>
23764
23765 * bison.simple: entered into RCS
23766
237671994-03-25 Richard Stallman <rms@gnu.org>
23768
23769 * src/main.c: entered into RCS
23770
237711994-03-24 Richard Stallman <rms@gnu.org>
23772
23773 * src/conflicts.c: entered into RCS
23774
237751994-01-02 Richard Stallman <rms@gnu.org>
23776
23777 * Makefile.in: *** empty log message ***
23778
237791993-11-21 Richard Stallman <rms@gnu.org>
23780
23781 * src/bison.s1: *** empty log message ***
23782
237831993-11-21 Richard Stallman <rms@gnu.org>
23784
23785 * doc/bison.texinfo: entered into RCS
23786
23787 * doc/bison.texinfo: *** empty log message ***
23788
237891993-11-21 Richard Stallman <rms@gnu.org>
23790
23791 * bison.simple: *** empty log message ***
23792
237931993-10-25 David J. MacKenzie <djm@gnu.org>
23794
23795 * doc/bison.texinfo: *** empty log message ***
23796
237971993-10-19 Richard Stallman <rms@gnu.org>
23798
23799 * src/bison.s1: *** empty log message ***
23800
238011993-10-19 Richard Stallman <rms@gnu.org>
23802
23803 * bison.simple: *** empty log message ***
23804
238051993-10-14 Richard Stallman <rms@gnu.org>
23806
23807 * src/bison.s1: *** empty log message ***
23808
238091993-10-14 Richard Stallman <rms@gnu.org>
23810
23811 * bison.simple: *** empty log message ***
23812
238131993-09-14 David J. MacKenzie <djm@gnu.org>
23814
23815 * doc/bison.texinfo: *** empty log message ***
23816
238171993-09-13 Noah Friedman <friedman@gnu.org>
23818
23819 * Makefile.in: *** empty log message ***
23820
238211993-09-10 Richard Stallman <rms@gnu.org>
23822
23823 * src/conflicts.c: *** empty log message ***
23824
23825 * src/system.h: entered into RCS
23826
238271993-09-10 Richard Stallman <rms@gnu.org>
23828
23829 * doc/bison.1: entered into RCS
23830
238311993-09-06 Noah Friedman <friedman@gnu.org>
23832
23833 * src/version.c: entered into RCS
23834
238351993-09-06 Noah Friedman <friedman@gnu.org>
23836
23837 * Makefile.in: *** empty log message ***
23838
238391993-07-30 David J. MacKenzie <djm@gnu.org>
23840
23841 * Makefile.in: *** empty log message ***
23842
238431993-07-24 Richard Stallman <rms@gnu.org>
23844
23845 * src/bison.s1: *** empty log message ***
23846
238471993-07-24 Richard Stallman <rms@gnu.org>
23848
23849 * bison.simple: *** empty log message ***
23850
238511993-07-08 David J. MacKenzie <djm@gnu.org>
23852
23853 * Makefile.in: *** empty log message ***
23854
238551993-07-04 Richard Stallman <rms@gnu.org>
23856
23857 * src/bison.s1: *** empty log message ***
23858
238591993-07-04 Richard Stallman <rms@gnu.org>
23860
23861 * bison.simple: *** empty log message ***
23862
238631993-06-26 David J. MacKenzie <djm@gnu.org>
23864
23865 * src/getargs.c: entered into RCS
23866
238671993-06-26 David J. MacKenzie <djm@gnu.org>
23868
23869 * doc/bison.texinfo: *** empty log message ***
23870
23871 * doc/bison.1: New file.
23872
238731993-06-25 Richard Stallman <rms@gnu.org>
23874
23875 * src/getargs.c: New file.
23876
238771993-06-16 Richard Stallman <rms@gnu.org>
23878
23879 * src/bison.s1: *** empty log message ***
23880
238811993-06-16 Richard Stallman <rms@gnu.org>
23882
23883 * bison.simple: *** empty log message ***
23884
238851993-06-03 Richard Stallman <rms@gnu.org>
23886
23887 * src/bison.s1: New file.
23888
238891993-06-03 Richard Stallman <rms@gnu.org>
23890
23891 * doc/bison.texinfo: *** empty log message ***
23892
238931993-06-03 Richard Stallman <rms@gnu.org>
23894
23895 * bison.simple: New file.
23896
238971993-05-19 Richard Stallman <rms@gnu.org>
23898
23899 * doc/bison.texinfo: New file.
23900
239011993-05-07 Noah Friedman <friedman@gnu.org>
23902
23903 * Makefile.in: *** empty log message ***
23904
239051993-04-28 Noah Friedman <friedman@gnu.org>
23906
23907 * src/reader.c: *** empty log message ***
23908
239091993-04-23 Noah Friedman <friedman@gnu.org>
23910
23911 * src/alloc.h: entered into RCS
23912
239131993-04-20 David J. MacKenzie <djm@gnu.org>
23914
23915 * src/version.c: *** empty log message ***
23916
23917 * src/files.c, src/allocate.c:
23918 entered into RCS
23919
23920 * src/reader.c: *** empty log message ***
23921
23922 * src/lex.c: entered into RCS
23923
23924 * src/conflicts.c: New file.
23925
23926 * src/symtab.c: entered into RCS
23927
23928 * src/alloc.h: New file.
23929
23930 * src/LR0.c: entered into RCS
23931
239321993-04-18 Noah Friedman <friedman@gnu.org>
23933
23934 * src/reader.c: New file.
23935
23936 * src/version.c: *** empty log message ***
23937
239381993-04-18 Noah Friedman <friedman@gnu.org>
23939
23940 * Makefile.in: *** empty log message ***
23941
239421993-04-17 Noah Friedman <friedman@gnu.org>
23943
23944 * Makefile.in: *** empty log message ***
23945
239461993-04-15 Richard Stallman <rms@gnu.org>
23947
23948 * src/main.c, src/files.c:
23949 New file.
23950
239511993-04-15 Noah Friedman <friedman@gnu.org>
23952
23953 * configure.in: entered into RCS
23954
23955 * configure.in: *** empty log message ***
23956
23957 * configure.in: New file.
23958
239591993-04-14 Richard Stallman <rms@gnu.org>
23960
23961 * Makefile.in: New file.
23962
239631993-04-13 Richard Stallman <rms@gnu.org>
23964
23965 * src/version.c: New file.
23966
239671993-03-25 Richard Stallman <rms@gnu.org>
23968
23969 * src/output.c: entered into RCS
23970
239711992-09-25 Richard Stallman <rms@gnu.org>
23972
23973 * configure.bat: entered into RCS
23974
239751992-06-22 Richard Stallman <rms@gnu.org>
23976
23977 * src/vmsgetargs.c: entered into RCS
23978
239791992-06-22 Richard Stallman <rms@gnu.org>
23980
23981 * doc/bison.rnh: entered into RCS
23982
239831992-04-20 David J. MacKenzie <djm@gnu.org>
23984
23985 * README: entered into RCS
23986
239871992-01-22 Richard Stallman <rms@gnu.org>
23988
23989 * src/machine.h: entered into RCS
23990
239911991-12-21 Richard Stallman <rms@gnu.org>
23992
23993 * src/lalr.c, src/closure.c:
23994 entered into RCS
23995
239961991-12-20 Richard Stallman <rms@gnu.org>
23997
23998 * src/state.h: entered into RCS
23999
240001991-12-18 Richard Stallman <rms@gnu.org>
24001
24002 * src/print.c, src/nullable.c, src/derives.c:
24003 entered into RCS
24004
240051991-11-03 David J. MacKenzie <djm@gnu.org>
24006
24007 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24008 entered into RCS
24009
240101988-09-09 Richard Stallman <rms@gnu.org>
24011
24012 * src/bison.hairy: entered into RCS
24013
240141987-12-16 Richard Stallman <rms@gnu.org>
24015
24016 * REFERENCES: entered into RCS
dc546b0f 24017
f294a2c2 24018
04098407 24019 -----
f294a2c2 24020
ea0a7676
JD
24021 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
24022 Inc.
f294a2c2 24023
04098407
PE
24024 Copying and distribution of this file, with or without
24025 modification, are permitted provided the copyright notice and this
24026 notice are preserved.