]> git.saurik.com Git - bison.git/blame - ChangeLog
* src/parse-gram.c, src/parse-gram.h: Regenerate.
[bison.git] / ChangeLog
CommitLineData
49e8e901
JD
12011-03-13 Joel E. Denny <joeldenny@joeldenny.org>
2
3 * src/parse-gram.c, src/parse-gram.h: Regenerate.
4
8f462efe
AD
52011-03-09 Akim Demaille <akim@lrde.epita.fr>
6
7 named references: fix double free.
8 In `rhs[name]: "a" | "b"', do not free "name" twice.
9 Reported by Tys Lefering.
10 <http://lists.gnu.org/archive/html/bug-bison/2010-06/msg00002.html>
11 * src/named-ref.h, src/named-ref.c (named_ref_copy): New.
12 * src/parse-gram.y (current_lhs): Rename as...
13 (current_lhs_symbol): this.
14 (current_lhs): New function. Use it to free the current lhs
15 named reference.
16 * src/reader.c: Bind lhs to a copy of the current named reference.
17 * src/symlist.c: Rely on free (0) being valid.
18 * tests/named-refs.at: Test this.
19
686e83e3
AD
202011-03-09 Akim Demaille <akim@lrde.epita.fr>
21
22 tests: style changes.
23 * tests/named-refs.at (Redundant words in LHS brackets)
24 (Unresolved references): here.
25
f0e2c228
JD
262011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
27
28 java: fix parser tracing bug.
29 * NEWS (2.5): Document.
30 * data/lalr1.java (YYParser::YYStack::print): Don't skip top
31 element.
32
4c2a6e42
JD
332011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
34
35 java: finish fixing parser stack popping bug.
36 * NEWS (2.5): Document.
37 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
38 in clearing the location stack. Also fix pop function that
39 accepts no arguments.
40
6f75992b
AB
412011-03-06 Angelo Borsotti <angelo.borsotti@gmail.com> (tiny change)
42
43 java: fix parser stack popping bug.
44 Reported at
45 <http://lists.gnu.org/archive/html/bug-bison/2011-02/msg00005.html>.
46 * THANKS (Angelo Borsotti): Add.
47 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
48 in clearing the value stack. Previously, the top element of the
49 stack wasn't cleared and so the value was not garbage collected.
50
121c4982
JD
512011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
52
53 doc: cite publication for LAC.
54 * doc/bison.texinfo (LAC): Here.
55
5da0355a
JD
562011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
57
58 doc: clean up terminology for mysterious conflicts.
59 * doc/bison.texinfo (Mystery Conflicts): Rename node to...
60 (Mysterious Conflicts): ... this, which is already the section
61 title and the name used in the index. Update all cross-references
62 to this node. Also, don't imply that R/R conflicts are the only
63 kind of mysterious conflict.
64
d815ec4a
JD
652011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
66
67 lr.default-reductions: rename "all" value to "full".
68 States that shift the error token do not have default reductions,
69 and GLR disables some default reductions, so "all" was a misnomer.
70 * doc/bison.texinfo (%define Summary): Update.
71 (Default Reductions): Update.
72 * src/print.c (print_reductions): Update.
73 * src/reader.c (prepare_percent_define_front_end_variables):
74 Update.
75 * src/tables.c (action_row): Update.
76 * tests/input.at (%define enum variables): Update.
77 * tests/reduce.at (%define lr.default-reductions): Update.
78
6f04ee6c
JD
792011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
80
81 doc: create a new Tuning LR section in the manual.
82 And clean up all other documentation of the features described
83 there.
84 * NEWS (2.5): Tweak wording of lr.type and parse.lac entries a
85 bit, update the cross-references to the manual, and point out that
86 LAC has caveats. Don't be so adamant that IELR+LAC=canonical LR.
87 That is, as the referenced section in the manual documents, LAC
88 does not fix infinite parsing loops on syntax errors.
89 * doc/bison.texinfo: Consistently drop the "(1)" suffix from LALR,
90 IELR, and LR in @cindex.
91 (%define Summary): Condense the entries for lr.default-reductions,
92 lr.keep-unreachable-states, lr.type, and parse.lac into brief
93 summaries, and cross-reference the appropriate subsections of
94 Tuning LR. For parse.lac, mention that it's only implemented for
95 deterministic parsers in C.
96 (Error Reporting): When mentioning %error-verbose, mention LAC,
97 and add cross-reference to the LAC section.
98 (Tuning LR): New section with an extended version of the
99 documentation removed from %define Summary. Change all
100 cross-references in the manual to point here instead of there.
101 (Calc++ Parser): When mentioning %error-verbose, mention LAC, and
102 add cross-reference to the LAC section.
103 (Table of Symbols): In %error-verbose and YYERROR_VERBOSE entries,
104 add cross-references to Error Reporting.
105 (Glossary): Capitalize entry titles consistently. Add definitions
106 for "defaulted state" and "unreachable state". Expand IELR
107 acronym in IELR's entry.
108
71caec06
JD
1092011-02-20 Joel E. Denny <joeldenny@joeldenny.org>
110
111 doc: add bibliography to manual.
112 * doc/bison.texinfo (Mystery Conflicts): Cross-reference
113 bibliography instead of citing publications directly.
114 (Generalized LR Parsing): Likewise.
115 (Bibliography): New section. Not all entries are cross-referenced
116 yet, but that will come in future patches.
117
77768165
JD
1182011-02-19 Joel E. Denny <joeldenny@joeldenny.org>
119
120 java: test and document previous bug fix.
121 * NEWS (2.5): Document it.
122 * tests/java.at (_AT_DATA_JAVA_CALC_Y): To one of the yyerror
123 invocations, pass a location that spans multiple tokens. Change
124 yyerror to report all of a location rather than just the begin
125 position. Extend yylex and Position to count tokens on a line.
126 Remove getHashCode as it's unused. Update all expected output.
127
8db68289
BK
1282011-02-19 Bernd Kiefer <kiefer@dfki.de> (tiny change)
129
130 java: fix location handling bug.
131 Reported at
132 <http://lists.gnu.org/archive/html/bison-patches/2011-02/msg00005.html>.
133 * data/lalr1.java (YYParser::yylloc): For non-empty RHS, fix
134 reversed access to location stack.
135 * THANKS (Bernd Kiefer): Add.
136
f3103c5b
AD
1372010-05-11 Akim Demaille <demaille@gostai.com>
138
139 doc: please Emacs.
140 * doc/bison.texinfo (Local Variables): Move this after the
141 LocalWords, since the latter are looked for in the whole document,
142 while the former are looked for only at its end.
143 Require american spell checking.
144
406dec82
JD
1452011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
146
147 doc: clean up new subsections in manual.
148 * doc/bison.texinfo (%define Summary): Reword so it reads well as
149 a separate section. For example, add an intro, and move most of
150 the text outside of the @deffn so it is not indented so far.
151 (%code Summary): Likewise.
152 (Table of Symbols): Reword %code entry to match the %code entry in
153 Decl Summary.
154
2f4518a1
JD
1552011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
156
157 doc: finish splitting apart the manual's Decl Summary section.
158 Suggested by Akim Demaille at
159 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
160 * doc/bison.texinfo (Decl Summary): Extract most of the %define
161 entry into...
162 (%define Summary): ... this new subsection, and update all
163 cross-references. For readability of the patches, rewriting of
164 the text so it makes sense as a separate subsection will come in a
165 later patch. Moreover, the majority of the text describing the
166 various new LR features should likely move to another new section
167 somewhere.
168
8e6f2266
JD
1692011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
170
171 doc: begin to split apart the manual's Decl Summary section.
172 Discussed in thread starting at
173 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
174 * doc/bison.texinfo (Decl Summary): Extract most of the %code
175 entry into...
176 (%code Summary): ... this new subsection, and update all
177 cross-references. For readability of the patches, rewriting of
178 the text so it makes sense as a separate subsection will come in a
179 later patch.
180
9913d6e4
JD
1812011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
182
183 doc: clean up naming of various Bison files.
184 The Bison manual's names for various files associated with a Bison
185 parser has devolved into inconsistency. This patch makes the
186 naming consistent for the most important files. First, it chooses
187 "grammar file" over "input file". The former appears to be more
188 traditional in the Bison manual, and Bison has other input
189 files (skeletons). Second, it chooses "parser implementation
190 file" over names like "parser file", "parser source file", "parser
191 source code file", and "parser output file". The new name makes
192 it clearer where Bison generates the main parser implementation,
193 and it is easily distinguishable from "parser header file".
194 * doc/bison.texinfo: Implement throughout.
195
840341d6
JD
1962011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
197
198 doc: give credit to more of Bison's developers.
199 * doc/bison.texinfo (Introduction): Don't imply that only Robert
200 Corbett, Richard Stallman, and Wilfred Hansen have contributed to
201 Bison. However, I don't have time to write a full history, so
202 just point readers to THANKS and ChangeLog.
203
d89e48b3
JD
2042011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
205
206 doc: document experimental features better.
207 * doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
208 LR(1) are experimental. Mention Java. Normally experimental
209 features probably shouldn't be mentioned in the introduction.
210 However, if Bison's limitations to LALR(1), C, and C++ are so
211 important that they should be mentioned here, then it's important
212 to point out that Bison is beginning to escape those limitations.
213 Moreover, these particular experimental features have very little
214 chance of being removed.
215 * src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
216 experimental.
217
eb8c66bb
JD
2182011-01-29 Joel E. Denny <joeldenny@joeldenny.org>
219
220 Do not allow identifiers that start with a dash.
221 This cleans up our previous fixes for a bug whereby Bison
222 discarded `.field' in `$-1.field'. The previous fixes were less
223 restrictive about where a dash could appear in an identifier, but
224 the restrictions were hard to explain. That bug was reported and
225 this final fix was originally suggested by Paul Hilfinger. This
226 also fixes a remaining bug reported by Paul Eggert whereby Bison
227 parses `%token ID -123' as `%token ID - 123' and handles `-' as an
228 identifier. Now, `-' cannot be an identifier. Discussed in
229 threads beginning at
230 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
231 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
232 * NEWS (2.5): Update entry describing the dash extension to
233 grammar symbol names. Also, move that entry before the named
234 references entry because the latter mentions the former.
235 * doc/bison.texinfo (Symbol): Update documentation for symbol
236 names. As suggested by Paul Eggert, mention the effect of periods
237 and dashes on named references.
238 (Decl Summary): Update documentation for unquoted %define values,
239 which, as a side effect, can no longer start with dashes either.
240 * src/scan-code.l (id): Implement.
241 * src/scan-gram.l (id): Implement.
242 * tests/actions.at (Exotic Dollars): Extend test group to exercise
243 bug reported by Paul Hilfinger.
244 * tests/input.at (Symbols): Update test group, and extend to
245 exercise bug reported by Paul Eggert.
246 * tests/named-refs.at (Stray symbols in brackets): Update test
247 group.
248 ($ or @ followed by . or -): Likewise.
249 * tests/regression.at (Invalid inputs): Likewise.
250
448dc38b
JD
2512011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
252
253 * data/yacc.c: Fix last apostrophe warning from xgettext.
254
7e5ef706
PE
2552011-01-09 Paul Eggert <eggert@cs.ucla.edu>
256
257 Fix minor problems encountered by a fresh bootstrap.
258 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
259 as they confuse xgettext, which tries to parse them as C character
260 constants in a preprocessor directive.
261 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
262 that expression might not promote to int on some platforms.
263 * src/parse-gram.c, src/parse-gram.h: Regenerate.
264
8cbbf178
JD
2652011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
266
267 Improve error messages for `$' or `@' followed by `.' or `-'.
268 Previously, for this special case of an invalid reference, the
269 usual "symbol not found in production:" was printed. However,
270 because the symbol name was parsed as the empty string, that
271 message was followed immediately by a newline instead of a symbol
272 name. In reality, this is a syntax error, so the reference is
273 invalid regardless of the symbols actually appearing in the
274 production. Discussed at
275 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
276 * src/scan-code.l (parse_ref): Report the above case as a syntax
277 error. Other than that, continue to handle this case like any
278 other invalid reference that Bison manages to parse because
279 "possibly meant" messages can still be helpful to the user.
280 * tests/named-refs.at ($ or @ followed by . or -): New test group.
281
35430378
JD
2822011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
283
284 doc: don't use @acronym.
285 Lately, many GNU packages are dropping it. See
286 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
287 * doc/bison.texinfo: Remove all uses.
288
d236ad94
AR
2892011-01-05 Alex Rozenman <rozenman@gmail.com>
290
291 Do not allow identifiers that start with a negative number.
292 Reported by Paul Hilfinger as a side effect of named references
293 support at
294 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
295 Suggested by Paul Eggert.
296 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
297 * src/scan-gram.l ({letter}, {id}): Likewise.
298
9a4292e5
JD
2992011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
300
301 * ChangeLog (2011-01-02): improve description.
302
17300e83
JD
3032011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
304
305 maint: don't update copyright years in bootstrap.
306 * .x-update-copyright: Add entry for bootstrap.
307 * bootstrap: Remove 2011 from copyright years. The bootstrap
308 version we're currently using comes from an older version of
309 gnulib.
310 * bootstrap.conf (bootstrap_sync): Add comments explaining this
311 issue.
312
ea0a7676
JD
3132011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
314
315 maint: run "make update-copyright".
316
f52e1e5e
JD
3172011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
318
9a4292e5 319 maint: prepare to use year ranges in copyright notices.
f52e1e5e 320 * README (Copyright statements): New section explaining the range
9a4292e5
JD
321 notation. The GNU maintainers document requires this explanation:
322 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
323 I copied our explanation from coreutils.
f52e1e5e
JD
324 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
325 disabled Bison's automated use of ranges.
326 * cfg.mk (update-copyright-env): Likewise.
327
210c1eef
JD
3282011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
329
330 Correct my email address.
331 * ChangeLog: In all recent entries.
332 * THANKS (Joel E. Denny): Here.
333
3342010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
6ee881f6
JD
335
336 doc: cleanup.
337 * NEWS (2.5): Try to sort entries according to how interesting
338 users might find them.
339
210c1eef 3402010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
3b1977ea
JD
341
342 doc: cleanup.
343 * NEWS (2.5): Make some minor improvements to wording, and format
344 entries more consistently.
345 * doc/bison.texinfo (Language and Grammar): Point out that IELR
346 and canonical LR are experimental features.
347 (Decl Summary): In list of %define variables, make wording more
348 consistent. Improve discussion of using LALR for GLR.
349
210c1eef 3502010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
4c38b19e
JD
351
352 parse.lac: document.
353 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
354 other corrections to verbose syntax error messages.
355 * doc/bison.texinfo (Decl Summary): Rewrite entries for
356 lr.default-reductions and lr.type to be clearer, to mention
357 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
358 for parse.lac.
359 (Glossary): Add entry for LAC.
360
210c1eef 3612010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
723fe7d1
JD
362
363 parse.lac: implement exploratory stack reallocations.
364 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
365 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
366 with values of "failures" (default) or "full".
367 (b4_declare_parser_state_variables): Add yyesa, yyes, and
368 yyes_capacity variables.
369 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
370 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
371 LAC requested.
372 (YYCOPY_NEEDED): New cpp macro.
373 (YYCOPY): Define if LAC requested.
374 (yy_lac_stack_realloc): New function implementing stack
375 reallocations. Use YYMAXDEPTH for maximum stack size given that
376 the stack should never need to grow larger than the main state
377 stack needs to grow without LAC.
378 (YY_LAC_ESTABLISH): Update yy_lac invocation.
379 (yy_lac): Add arguments for exploratory stack memory data
380 recorded in the main parser. Invoke yy_lac_stack_realloc when
381 reallocation is necessary.
382 (yysyntax_error): Add the same new arguments and pass them to
383 yy_lac.
384 (yypstate_delete): Free yyes if necessary.
385 (yyesa, yyes, yyes_capacity): #define these to yypstate members
386 in the case of push parsing.
387 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
388 Update yysyntax_error invocations. At yyreturn, free yyes if
389 necessary.
390 * src/parse-gram.y: %define parse.lac full.
391 * tests/input.at (LAC: errors for %define): Extend for
392 parse.lac-memory-trace.
393 * tests/regression.at (LAC: Exploratory stack): Extend to check
394 that stack reallocs happen when expected.
395 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
396 parse.lac.es-capacity-initial.
397
210c1eef 3982010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
ea13bea8
JD
399
400 parse.lac: implement as %define variable.
401 LAC = lookahead correction. See discussion at
402 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
403 However, one point there must be corrected: because of %nonassoc,
404 LAC is *not* always redundant for lr.type=canonical-lr.
405 * data/yacc.c: Accept values of "none" (default) or "full" for
406 parse.lac. Accept %define parse.lac.es-capacity to specify
407 capacity of LAC's temporary exploratory stack. It defaults to 20
408 and, for now, will not grow dynamically.
409 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
410 parse.lac!=none.
411 (YYBACKUP): Invoke YY_LAC_DISCARD.
412 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
413 yy_lac and track when it needs to be invoked
414 (yy_lac): New function that, given the current stack, determines
415 whether a token can eventually be shifted. Return status mimics
416 yyparse return status.
417 (yysyntax_error): Change yystate argument to yyssp so stack top
418 can be passed to yy_lac. If LAC is requested, build expected
419 token list by invoking yy_lac for every token instead of just
420 checking the current state for lookaheads. Return 2 if yy_lac
421 exhausts memory.
422 (yyparse, yypush_parse): Use local variable yy_lac_established and
423 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
424 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
425 is requested.
426 * tests/conflicts.at (%nonassoc and eof): Extend to check the
427 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
428 (%error-verbose and consistent errors): Likewise.
429 (LAC: %nonassoc requires splitting canonical LR states): New test
430 group demonstrating how LAC can fix canonical LR.
431 * tests/input.at (LAC: Errors for %define): New test group.
432 * tests/regression.at (LAC: Exploratory stack): New test group.
433 (LAC: Memory exhaustion): New test group.
434
210c1eef 4352010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
dcd39f1d
JD
436
437 build: use gnulib's new bootstrap_sync option.
438 Now, whenever we update bison's copy of gnulib, bootstrap will
439 update itself the next time it's run.
440 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
441 * bootstrap.conf (bootstrap_sync): Set to true.
442 * gnulib: Update to latest so bootstrap is in sync now.
443
210c1eef 4442010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
3b837882
JD
445
446 yysyntax_error: adjust prior fixes for branch-2.5's lalr1.cc.
447 On master, there is no yychar in lalr1.cc, but there is on
448 branch-2.5, and the prior cherry-pick of "Fix handling of yychar
449 manipulation in user semantic actions" wasn't adjusted for that
450 difference.
451 * data/lalr1.cc (yy::parser::parse): Translate yychar before
452 every use of yytoken, and add comments explaining this approach.
453 * tests/conflicts.at (%error-verbose and consistent errors):
454 Extend to test yychar manipulation with lalr1.cc.
455
210c1eef 4562010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
095a1d11
JD
457
458 yysyntax_error: fix for consistent error with lookahead.
459 * NEWS (2.5): Document.
460 * data/yacc.c (yysyntax_error): In a verbose syntax error
461 message while in a consistent state with a default action (which
462 must be an error action given that yysyntax_error is being
463 invoked), continue to drop the expected token list, but don't
464 drop the unexpected token unless there actually is no lookahead.
465 Moreover, handle that internally instead of returning 1 to tell
466 the caller to do it. With that meaning of 1 gone, renumber
467 return codes more usefully.
468 (yyparse, yypush_parse): Update yysyntax_error usage. Most
469 importantly, set yytoken to YYEMPTY when there's no lookahead.
470 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
471 unexpected token unless there actually is no lookahead.
472 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
473 set yytoken to yyempty_ before invoking yysyntax_error_.
474 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
475 token unless there actually is no lookahead.
476 * data/lalr1.java (YYParser::parse): If there's no lookahead,
477 set yytoken to yyempty_ before invoking yysyntax_error.
478 (YYParser::yysyntax_error): Again, don't drop the unexpected
479 token unless there actually is no lookahead.
480 * tests/conflicts.at (%error-verbose and consistent
481 errors): Extend test group to further reveal how the previous
482 use of the simple "syntax error" message was too general. Test
483 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
484 failure.
485 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
486 to...
487 * tests/local.at: ... here.
488 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
489 (AT_BISON_OPTION_POPDEFS): Pop it.
490 (AT_FULL_COMPILE): Extend to handle Java.
491
210c1eef 4922010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
678094a2
JD
493
494 yysyntax_error: more preparation for readability of next patch.
495 There are no behavioral changes here.
496 * data/glr.c (yyreportSyntaxError): Reorganize.
497 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
498 * tests/conflicts.at (%error-verbose and consistent errors):
499 Reorganize.
500
210c1eef 5012010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
f953cb20
JD
502
503 yysyntax_error: prepare for readability of next patches.
504 These are purely whitespace changes that result in ugly code
505 but that make the next couple of patches much easier to read.
506 * data/glr.c (yyreportSyntaxError): Reindent.
507 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
508 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
509 * data/yacc.c (yysyntax_error): Reindent.
510
0e0f066b
JD
5112010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
512
513 yysyntax_error: improve invocation readability.
514 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
515 invocation, get rid of the while loop, which is misleading
516 because there are really at most two iterations.
517
5f1485d8
JD
5182010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
519
520 * ChangeLog: Correct some errors in previous entries.
521
2f3fd8f9
JD
5222010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
523
524 maint: re-anchor all .gitignore entries.
525 * bootstrap: Copy from gnulib's latest for the fix to
526 automatically anchor entries it constructs.
527 * gnulib: Update to latest just so it has the same bootstrap.
528 * .gitignore, build-aux/.gitignore, doc/.gitignore:
529 * lib/.gitignore, m4/.gitignore, po/.gitignore:
530 * runtime-po/.gitignore: Re-anchor all entries.
531
86996fca
PE
5322010-10-08 Paul Eggert <eggert@cs.ucla.edu>
533
ea6046b9
PE
534 Fix portability problem on OpenBSD 4.7.
535
536 Jim Meyering reported this in
537 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
538 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
539 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
540 for quite some time.
541 * src/parse-gram.c, src/parse-gram.h: Regenerate.
542 * tests/regression.at: Tamper with the renamed witness.
543
86996fca
PE
544 Adjust to recent changes to gnulib bootstrap.
545
546 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
547 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
548 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
549 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
550 anymore and don't know of anybody else who does. If someone needs
551 these files, they can resurrect them.
552 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
553 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
554 Omit leading '/', since bootstrap omits it.
555 Adjust file names to match current contents better.
556 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
557 installed just for us.
558 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
559 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
560 needed somehow. Don't have time to look into why.
561 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
562 the GNU malloc behavior, where malloc (0) != NULL unless we're
563 out of storage? If not, we can omit malloc-gnu; but for now I left
564 it in to be safe.
565 (vc_ignore): Remove.
566 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
567 uses that convention.
568
7527c744
JD
5692010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
570
571 Version 2.4.3.
572 * NEWS (2.4.3): Set date.
573
d034d520
JD
5742010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
575
576 maint: add gettext version to release announcements.
577 Suggested by Paul Hilfinger at
578 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
579 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
580 * cfg.mk (bootstrap-tools): Add gettext.
581
cf22447c
JD
5822010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
583
584 doc: fix -W and %expect documentation some.
585 * NEWS (2.4.3): Mention that there are documentation fixes.
586 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
587 turns conflicts into errors not warnings.
588 (Shift/Reduce): Likewise.
589 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
590
4631c34f
JD
5912010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
592
593 -Werror: fix for rules useless in parser after conflicts.
594 * NEWS (2.4.3): Document fix.
595 * src/complain.c (error_message): Extend to handle incomplete
596 error messages so warn and warn_at can be used in more cases.
597 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
598 -Werror is always obeyed.
599 * src/reduce.c (reduce_print): Use warn so that the "warnings
600 being treated as errors" message is printed consistently before
601 the first warning message. This makes testing easier.
602 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
603 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
604 --warnings=error when warnings appear in bison's stderr.
605
3e948170
JD
6062010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
607
608 maint: enable gnits only at stable releases.
609 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
610 version string should disable gnits. Explain in comments.
611
82df2d6d
JD
6122010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
613
614 i18n: update.
615 * po/POTFILES.in: Add src/graphviz.c.
616
6e0ecb9a
JD
6172010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
618
619 i18n: fix for gnulib.
620 * po/POTFILES.in: Add remaining gnulib files that have
621 translatable strings.
622
83e34842
JD
6232010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
624
625 maint: use announce-gen's new --mail-headers.
626 * HACKING (Announce): Update instructions.
627 * cfg.mk (announcement_Cc_): Define.
628 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
629 required by latest gnulib.
630 * gnulib: Update to latest.
631
0162a44c
JD
6322010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
633
634 tests: handle Valgrind that complains about >&-.
635 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
636 (Output files: -dv >&-): Skip test group if running
637 maintainer-check-valgrind.
638
241ac701
AD
6392010-06-17 Paul Eggert <eggert@cs.ucla.edu>
640
641 Update from GFDL GFDL 1.2 to 1.3.
642 * doc/bison.texinfo: Update GFDL version number.
643 * doc/fdl.texi: Update to version 1.3, taken from:
644 http://www.gnu.org/licenses/fdl.texi
645
6e30ede8
PE
6462010-06-17 Paul Eggert <eggert@cs.ucla.edu>
647
648 Do not use date ranges in copyright notices.
649 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
650
651 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
652 * TODO, bootstrap, bootstrap.conf:
653 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
654 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
655 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
656 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
657 * data/lalr1.java, data/location.cc:
658 * data/xslt/bison.xsl:
659 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
660 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
661 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
662 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
663 * djgpp/subpipe.c, djgpp/subpipe.h:
664 * djgpp/testsuite.sed, doc/bison.texinfo:
665 * doc/refcard.tex, etc/README, etc/bench.pl.in:
666 * examples/calc++/Makefile.am, examples/extexi:
667 * lib/abitset.c, lib/abitset.h:
668 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
669 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
670 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
671 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
672 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
673 * lib/libiberty.h, lib/main.c, lib/timevar.c:
674 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
675 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
676 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
677 * src/AnnotationList.c, src/AnnotationList.h:
678 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
679 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
680 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
681 * src/complain.h, src/conflicts.c, src/conflicts.h:
682 * src/derives.c, src/derives.h, src/files.c, src/files.h:
683 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
684 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
685 * src/ielr.h, src/lalr.c, src/lalr.h:
686 * src/location.c, src/location.h, src/main.c:
687 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
688 * src/named-ref.h, src/nullable.c, src/nullable.h:
689 * src/output.c, src/output.h, src/parse-gram.y:
690 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
691 * src/print_graph.c, src/print_graph.h, src/reader.c:
692 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
693 * src/relation.h, src/scan-code.h, src/scan-code.l:
694 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
695 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
696 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
697 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
698 * tests/actions.at, tests/atlocal.in, tests/c++.at:
699 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
700 * tests/existing.at, tests/glr-regression.at:
701 * tests/headers.at, tests/input.at, tests/java.at:
702 * tests/local.at, tests/named-refs.at:
703 * tests/output.at, tests/push.at, tests/reduce.at:
704 * tests/regression.at, tests/sets.at, tests/skeletons.at:
705 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
706 * data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
707 * tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
708 * etc/Makefile.am:
709 Don't use date ranges in copyright notices.
710
3d4a0cad
AD
7112010-05-11 Akim Demaille <demaille@gostai.com>
712
713 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
714 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
715 header file to the implementation file, after the user %code
716 sections.
717 * NEWS (2.5): Document this.
718
e7bab2df
AD
7192010-05-07 Akim Demaille <demaille@gostai.com>
720
721 c++: use YYRHSLOC.
722 * data/lalr1.cc (YYRHSLOC): New.
723 (YYLLOC_DEFAULT): Use it.
724 * data/glr.cc: If location_type was user defined, do not include
725 location.hh, and do not produce location.hh and position.hh.
726 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
727 Check that glr.cc supports user defined location_type.
728 * NEWS: Document this.
729
baacae49
AD
7302010-05-10 Akim Demaille <demaille@gostai.com>
731
732 doc: fix lalr1.cc documentation.
733 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
734 (C++ Bison Interface): Fix lalr1.cc skeleton name.
735 (C++ Parser Interface): Fix semantic_type and location_type names.
736 Document yy::parser::token.
737 Reported by Jerry Quinn.
738
95a2de56
AD
7392010-05-04 Akim Demaille <demaille@gostai.com>
740
741 lalr1.cc: don't generate location.hh when location_type is defined
742 * data/bison.m4 (b4_percent_define_use): New.
743 (b4_percent_define_get): Use it.
744 Accept a default value.
745 * data/c++.m4: Do not provide a default value for the %define
746 variable location_type, rather, use b4_percent_define_get with a
747 default argument where its value is needed.
748 * data/lalr1.cc: Do not load location.cc (which outputs both
749 location.hh and position.hh) if the user defined location_type.
750 Do not include location.hh either.
751 * data/glr.cc: Likewise.
752
0f404a0a
AD
7532010-05-04 Akim Demaille <demaille@gostai.com>
754
755 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
756 * tests/calc.at (Span): Instead of begin/end, as in the built-in
757 location class, use first and last.
758 Define YYLLOC_DEFAULT to adjust to these changes.
759 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
760 location_type changes.
761
bdc360ae
AD
7622010-05-04 Akim Demaille <demaille@gostai.com>
763
764 tests: enhance AT_SYNCLINES_COMPILE.
765 * tests/synclines.at (AT_TEST_SYNCLINE): Move GCC 4.5 protection
766 into...
767 (AT_SYNCLINES_COMPILE): here.
768 Add more distcc patterns.
769
ca7a59e8
JD
7702010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
771
772 tests: fix maintainer-xml-check.
773 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
774 Update output to include comments now produced by --graph.
775 (xsl:template match="automaton"): As for --graph, name the
776 digraph after the grammar file.
777 * src/print-xml.c (escape_bufs): Enlarge array.
778 (print_xml): Add bug-report and url attributes to
779 bison-xml-report element.
780
ad6f84e5
JD
7812010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
782
783 In DOT output, convert from "/*" comments to "//" comments.
784 This handles the possibility that a "*/" might appear in
785 variable portions of those comments at some point in the future.
786 * src/graphviz.c (start_graph): Implement.
787
43fdc9fd
JD
7882010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
789
790 Document that undefined %prec identifier warnings will remain.
791 * NEWS (2.4.3): Here.
792 (2.4.2): Here.
793
e02df72c
JD
7942010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
795
796 Revert 2009-12-30 change for undefined %prec token complaints.
797 That is, keep them as warnings because that should be sufficient
798 to satisfy POSIX without creating backward compatibility issues.
799 Suggested by Richard Stallman at
800 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
801 * NEWS (2.5): Remove mention of complaint.
21279295
JD
802 * src/reader.c (grammar_rule_check): Convert complaint back to
803 warning.
e02df72c
JD
804 * tests/input.at (%prec's token must be defined): Update.
805
ba3063f6
JD
8062010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
807
808 build: don't require src/bison during bootstrap.
809 Suggested by Eric Blake at
810 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
811 * bootstrap.conf (bootstrap_epilogue): New function to make sure
812 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
813
e0fda26c
JD
8142010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
815
816 i18n: fix untranslatable string.
817 Reported by Goran Uddeborg at
818 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
819 * src/muscle-tab.c (muscle_percent_define_insert): Here.
820
ecbca7db
AD
8212010-04-13 Akim Demaille <demaille@gostai.com>
822
823 tests: calc: minor refactoring.
824 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
825
ed228e60
AD
8262010-04-13 Akim Demaille <demaille@gostai.com>
827
828 tests: calc: simplify location management.
829 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
830 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
831 define the appropriate AT_LOC accessors.
832 * tests/calc.at: Use AT_LOC accessors.
833
cacfdef7
AD
8342010-04-13 Akim Demaille <demaille@gostai.com>
835
836 test location_type.
837 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
838 Define AT_LOCATION_TYPE_IF.
839 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
840 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
841 used, provide a user location type and use it.
842 (Simple LALR1 C++ Calculator): Add a test case for location_type.
843
2f61c4a2
AD
8442010-04-13 Akim Demaille <demaille@gostai.com>
845
846 tests: check fclose's return value.
847 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
848
16d9244d
AD
8492010-04-13 Akim Demaille <demaille@gostai.com>
850
851 tests: don't depend on the actual location type.
852 * tests/calc.at: Use yy::parser::location_type rather than
853 yy::location, since the former is always right, and might point to
854 another type than the latter.
855
3e4a253b
AD
8562010-04-13 Akim Demaille <demaille@gostai.com>
857
858 formatting changes.
859 * tests/calc.at: Formatting changes.
860
df5df58d
AD
8612010-04-13 Akim Demaille <demaille@gostai.com>
862
863 lalr1.cc: remove useless forward declaration.
864 * data/lalr1.cc: Include location.hh before stack.hh.
865 Remove the useless forward declarations of position and location.
866 Reported by Chris Morley.
867 * data/glr.cc: Likewise.
868
88bb35d6
JD
8692010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
870
871 * NEWS (2.4.3): Mention fix for Sun Studio C++.
872
585ef2eb
JD
8732010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
874
875 tests: fix for newer Sun Studio C++.
876 Reported by Dagobert Michelsen at
877 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
878 * THANKS (Dagobert Michelsen): Add.
879 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
880 Autoconf macro for handling the restrict keyword.
881 * gnulib: Update to latest, which no longer overrides that macro
882 from Autoconf.
883
a005dbcb
JD
8842010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
885
886 portability: fix pointer arithmetic to conform to C standard.
887 Reported by Tys Lefering at
888 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
889 This fix is already implemented in glr.c and does not apply to
890 lalr1.java.
891 * data/lalr1.cc (yy::parser::parse): Increase size of
892 yyerror_range and adjust subscripting so you don't have to
893 subtract one from the beginning of the array.
894 * data/yacc.c (b4_declare_parser_state_variables,
895 yyparse, yypush_parse): Likewise.
896
8a8b33e8
AD
8972010-04-05 Akim Demaille <demaille@gostai.com>
898
899 remove useless include.
900 * src/graphviz.h: Don't include stdbool.h.
901
a0279765
AD
9022010-04-05 Akim Demaille <demaille@gostai.com>
903
904 graph: sign the output file.
905 * src/graphviz.c (start_graph): Issue comments about Bison.
906 Suggested by Tys Lefering.
907
132247cd
JD
9082010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
909
910 portability: fix test suite for GCC 4.5's new #error message.
911 Reported by Tys Lefering at
912 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
913 * NEWS (2.4.3): Mention.
914 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
915
c0259969
AD
9162010-03-30 Akim Demaille <demaille@gostai.com>
917
918 fix comments.
919 * src/graphviz.h: Add missing license notice.
920 Document.
921
23761f42
AD
9222010-03-25 Akim Demaille <demaille@gostai.com>
923
924 tests: fix 250: parse.error=verbose overflow.
925 * tests/regression.at (parse.error=verbose overflow): Avoid the
926 double inclusion of stdlib.h as it triggers hard errors.
927
9097fda0
JD
9282010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
929
930 portability: fix for BSD make.
931 Reported by Johan van Selst at
932 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
933 * tests/Makefile.am ($(TESTSUITE)): Qualify package.m4 in
934 this dependency list as in package.m4's target rule.
935
7a9c3cb3
JD
9362010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
937
938 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
939 Reported by Johan van Selst at
940 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
941 * NEWS (2.4.3): New.
942 * THANKS (Johan van Selst): Add.
943 * gnulib: Update to latest.
944
5a3c69f1
JD
9452010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
946
947 maint: update for changes to gnulib's announce-gen.
948 * HACKING (Announce): RELEASE_TYPE=major must now be written
949 RELEASE_TYPE=stable.
950
ea66d039
JD
9512010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
952
953 Version 2.4.2.
954 * NEWS (2.4.2): Set version and date. For the recent test suite
955 portability fixes, don't be so optimistic about their success
956 given the lack of feedback on the affected platforms.
957
c50befe6
JD
9582010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
959
960 tests: fix maintainer-xml-check for recent changes.
961 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
962 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
963 output file whose name conflicts with a previous output file
964 is now never generated.
965
47fa5747
JD
9662010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
967
968 portability: fix several issues with M4 subprocess.
969
970 M4's output pipe was not being drained upon fatal errors during
971 scan_skel. As a result, broken-pipe messages from M4 were seen
972 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
973 failure in the test suite. The problem was that, on platforms
974 where the default disposition for SIGPIPE is ignore instead of
975 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
976 then reported it. However, there's some sort of race condition,
977 because the new test group occasionally succeeded.
978 Reported by Albert Chin at
979 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
980
981 There were also problems with the test suite livelocking on
982 Tru64 5.1b. Reported by Didier Godefroy at
983 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
984 Switching to create_pipe_bidi suggested by Akim Demaille.
985
986 To attempt to solve both of these problems, switch to gnulib's
987 create_pipe_bidi and register M4 process as a slave. Along the
988 way, clean up file name conflict handling, which was affected by
989 the broken-pipe problem before the switch.
990 * NEWS (2.4.2): Document.
991 * THANKS (Didier Godefroy): Add.
992 * bootstrap.conf (gnulib_modules): Add pipe.
993 * gnulib: Update to latest to make sure we have all the latest
994 fixes.
995 * lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
996 subpipe.c.
997 * po/POTFILES.in (lib/subpipe.c): Remove.
998 * src/files.c (compute_output_file_names): Update invocations
999 of output_file_name_check.
1000 (output_file_name_check): In the case that the grammar file
1001 would be overwritten, use complain instead of fatal, but replace
1002 the output file name with /dev/null. Use the /dev/null solution
1003 for the case of two conflicting output files as well because it
1004 seems safer in case Bison one day tries to open both files at
1005 the same time.
1006 * src/files.h (output_file_name_check): Update prototype.
1007 * src/output.c (output_skeleton): Use create_pipe_bidi and
1008 wait_subprocess. Assert that scan_skel completely drains the
1009 pipe.
1010 * src/scan-skel.l (at_directive_perform): Update
1011 output_file_name_check invocation.
1012 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
1013 grammar file actually isn't overwritten.
1014 (Conflicting output files: -o foo.y): Update expected output.
1015 * tests/skeletons.at (Fatal errors but M4 continues producing
1016 output): New test group.
1017
d67e37a7
JD
10182010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
1019
1020 Update POTFILES.
1021 * HACKING (Release Procedure): Add reminder about keeping
1022 POTFILES files up-to-date.
1023 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
1024
0ee1af2e
JD
10252010-02-01 Joel E. Denny <jdenny@clemson.edu>
1026
1027 Code cleanup.
1028 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
1029 which is already defined in atconfig.
1030
2655c7cd
JD
10312010-01-21 Joel E. Denny <jdenny@clemson.edu>
1032
1033 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
1034
8ebc7dca
JD
10352010-01-21 Joel E. Denny <jdenny@clemson.edu>
1036
1037 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
1038 * HACKING (Release Procedure): Update notes on copyright years.
1039 * Makefile.am (update-package-copyright-year): New target rule.
1040 * build-aux/update-package-copyright-year: New file.
1041 * cfg.mk (update-copyright): Add update-package-copyright-year
1042 as a dependency.
1043
f0a43dd1
JD
10442010-01-19 Joel E. Denny <jdenny@clemson.edu>
1045
1046 * bootstrap: Import improvements from latest gnulib.
1047
e4ca7a85
JD
10482010-01-19 Joel E. Denny <jdenny@clemson.edu>
1049
1050 build: require Automake 1.11.1 to avoid a security flaw.
1051 * HACKING (Release Procedure): Don't document Automake security
1052 flaw here.
1053 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
1054 why here.
1055
8d830047
JD
10562010-01-19 Joel E. Denny <jdenny@clemson.edu>
1057
1058 gnulib: update to latest.
1059
e5926647
JD
10602010-01-19 Joel E. Denny <jdenny@clemson.edu>
1061
1062 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
1063
5a2f6eb4
JD
10642010-01-15 Joel E. Denny <jdenny@clemson.edu>
1065
1066 Thank the developer of the initial push parser implementation.
1067 This unfortunate oversight is several years old.
1068 * THANKS (Odd Arild Olsen): Add.
1069
1c4ad777
JD
10702010-01-04 Joel E. Denny <jdenny@clemson.edu>
1071
1072 Fix some comments concerning LR(0) versus LALR(1).
1073
1074 Stop equating LR(0) with nondeterminism and LALR(1) with
1075 determinism. That is, if all states are consistent, then LR(0)
1076 tables are deterministic. On the other hand, LALR(1) tables
1077 might be nondeterministic before conflict resolution, and GLR
1078 permits LALR(1) tables to remain nondeterministic.
1079 * src/LR0.c, src/LR0.h: Here.
1080 * src/lalr.c, src/lalr.h: Here.
1081 * src/main.c (main): Here.
1082 * src/state.c, src/state.h: Here.
1083
1084 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
1085 parser tables.
1086
1462fcee
JD
10872010-01-04 Joel E. Denny <jdenny@clemson.edu>
1088
1089 maint: run "make update-copyright"
1090
510df951
JD
10912009-12-30 Joel E. Denny <jdenny@clemson.edu>
1092
1093 POSIX: complain if %prec's token was not defined.
1094 * NEWS (2.5): Document.
1095 * src/reader.c (grammar_rule_check): Convert warning to
1096 complaint.
1097 * tests/input.at (%prec's token must be defined): Update.
1098
2c203528
JD
10992009-12-30 Joel E. Denny <jdenny@clemson.edu>
1100
1101 POSIX: warn if %prec's token was not defined.
1102 Reported by Florian Krohm at
1103 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
1104 * NEWS (2.4.2): Document.
1105 * src/reader.c (grammar_rule_check): Implement.
1106 (grammar_current_rule_prec_set): Add comments explaining that we
1107 here assume a %prec identifier is a token, but we still manage
1108 to support POSIX.
1109 * tests/input.at (%prec's token must be defined): New test
1110 group.
1111
a93cdd3d
JD
11122009-12-31 Joel E. Denny <jdenny@clemson.edu>
1113
1114 * HACKING (Release Procedure): Recommend a secure automake.
1115
bb57985c
AD
11162008-12-11 Akim Demaille <demaille@gostai.com>
1117
1118 Propagate i18n changes into glr.c.
1119 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1120 building the error message format dynamically.
1121 * data/lalr1.java: Formatting changes.
1122
70afaf26
JD
11232009-12-22 Joel E. Denny <jdenny@clemson.edu>
1124
1125 Port small part of master's 11707b2b so future ports are easier.
1126 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
1127
8200219a
AD
11282008-12-11 Akim Demaille <demaille@gostai.com>
1129
1130 Simplify the i18n of the error messages.
1131 * data/lalr1.cc: Comment changes.
1132
39f6a8d1
AD
11332008-11-11 Akim Demaille <demaille@gostai.com>
1134
1135 Prefer M4 to CPP.
1136 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1137 YYERROR_VERBOSE.
1138
e657f369
AD
11392008-11-11 Akim Demaille <demaille@gostai.com>
1140
1141 Support i18n of the parse error messages.
1142 * TODO (lalr1.cc/I18n): Remove.
1143 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1144 error messages, as done in yacc.c.
1145 Stay within the yy* pseudo namespace.
1146
1e05521d
JD
11472009-12-22 Joel E. Denny <jdenny@clemson.edu>
1148
1149 Port small part of master's 8901f32e so future ports are easier.
1150 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
1151 argument, but name it in the function definition only when
1152 verbose error messages are enabled and it'll thus be used.
1153 (yy::parser::parse): Update use of yysyntax_error_.
1154
2728ac7e
JD
11552009-12-29 Joel E. Denny <jdenny@clemson.edu>
1156
1157 portability: `<' and `>' are not always defined on addresses.
1158 Specifically, don't sort objects by their memory addresses when
1159 they're not allocated in the same array or other object. Though
1160 I haven't found a test case where that fails on my platform, C
1161 says the behavior is undefined.
1162 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1163 FIXME. Use new id field of InadequacyList nodes rather than
1164 their memory addresses when sorting.
1165 (AnnotationList__compute_from_inadequacies): Add
1166 inadequacy_list_node_count argument to pass to
1167 InadequacyList__new_conflict.
1168 * src/AnnotationList.h
1169 (AnnotationList__compute_from_inadequacies): Update prototype
1170 and documentation for new argument.
1171 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1172 node_count argument and use it to assign a unique ID.
1173 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1174 (InadequacyList): Add id field.
1175 (InadequacyList__new_conflict): Update prototype and
1176 documentation for new argument.
1177 * src/ielr.c (ielr_compute_annotation_lists): Update
1178 AnnotationList__compute_from_inadequacies invocation.
1179
abcc7c03
JD
11802009-12-20 Joel E. Denny <jdenny@clemson.edu>
1181
1182 Fix handling of yychar manipulation in user semantic actions.
1183 The problem was that yacc.c didn't always update the yychar
1184 translation afterwards. However, other skeletons appear to be
1185 fine. glr.c appears to already translate yychar before every
1186 use. lalr1.cc does not define yychar and does not document its
1187 replacement, yyla, for users. It does provide yyclearin, but
1188 that does not manipulate yyla and thus requires no translation
1189 update. In lalr1.java, yychar is out of scope during semantic
1190 actions.
1191 * NEWS (2.5): Document.
1192 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1193 yytoken here.
1194 (yyparse, yypush_parse): Instead, translate before every use of
1195 yytoken, and add comments explaining this approach.
1196 * tests/actions.at (Destroying lookahead assigned by semantic
1197 action): New test group checking that translation happens before
1198 lookahead destructor calls at parser return. Previously,
1199 incorrect destructors were called.
1200 * tests/conflicts.at (%error-verbose and consistent
1201 errors): New test group checking that translation happens at
1202 syntax error detection before the associated verbose error
1203 message and the associated lookahead destructor calls. While
1204 the destructor call is fixed by this patch, the verbose error
1205 message is currently incorrect due to another bug (see
1206 comments in test group), so this is an expected failure for now.
1207
62efdd2a
JD
12082009-12-21 Joel E. Denny <jdenny@clemson.edu>
1209
1210 YYFAIL: warn about uses and remove from lalr1.java.
1211 * NEWS (2.5): Document.
5f1485d8 1212 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
62efdd2a
JD
1213 and make it private. Update all uses.
1214 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1215
41d35e54
JD
12162009-12-21 Joel E. Denny <jdenny@clemson.edu>
1217
1218 YYFAIL: deprecate.
1219 * NEWS (2.4.2): Document deprecation and the phase-out plan.
5f1485d8 1220 * data/lalr1.java (YYParser::YYFAIL): Add comment about
41d35e54
JD
1221 deprecation.
1222 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1223 YYFAIL from GCC cpp's -Wunused-macros.
1224 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1225 documentation.
1226 (LocalWords): Remove YYFAIL.
1227
692d04cb
JD
12282009-12-17 Joel E. Denny <jdenny@clemson.edu>
1229
1230 Code cleanup.
1231 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1232 function, which is no longer used.
1233
34731471
JD
12342009-12-16 Joel E. Denny <jdenny@clemson.edu>
1235
1236 Add gcc's -Wundef to test suite and fix another warning from it.
1237 * NEWS (2.4.2): Update description of -Wundef fix.
1238 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1239 (WARN_CFLAGS_TEST): New substitution.
1240 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1241 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1242 WARN_CFLAGS.
1243 (NO_WERROR_CFLAGS): Likewise.
1244 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1245
3bba2dad
JD
12462009-12-16 Joel E. Denny <jdenny@clemson.edu>
1247
1248 * data/yacc.c: Reformat m4 a little.
1249
af2ffe5c
JD
12502009-12-16 Joel E. Denny <jdenny@clemson.edu>
1251
1252 Document gcc -Wundef fix.
1253 * NEWS (2.4.2): Here.
1254 * THANKS (Jonathan Nieder): Add.
1255
874ac415
JN
12562009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1257
1258 Simplify y.tab.c when location tracking is disabled.
1259 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1260 tracking is not enabled. Instead, unconditionally define
1261 YY_LOCATION_PRINT as a no-op for backward compatibility.
1262
06caf0e1
JN
12632009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1264
1265 Avoid warnings from gcc -Wundef y.tab.c.
1266 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1267 defined before using them.
1268 * data/lalr1.cc: Likewise.
1269 * data/yacc.c: Likewise.
1270
687f011a
JD
12712009-12-15 Joel E. Denny <jdenny@clemson.edu>
1272
1273 autoconf: update to latest for fix of M4 detection.
1274 Reported by Eric Blake.
1275 * submodules/autoconf: Update.
1276
fb9a3976
JD
12772009-12-15 Joel E. Denny <jdenny@clemson.edu>
1278
1279 portability: use -DGNULIB_POSIXCHECK.
1280 Reported by Eric Blake. See discussions at
1281 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1282 and
1283 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1284 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1285 * bootstrap.conf (gnulib_modules): Add all the printf modules
1286 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1287 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1288 (excluded_files): Remove m4/printf-posix.m4.
1289 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1290 lib/libbison.a so gnulib libraries can be linked.
1291
f1fb412c
JD
12922009-12-14 Joel E. Denny <jdenny@clemson.edu>
1293
1294 Enable assertion output and --disable-assert for configure.
1295 * bootstrap.conf (gnulib_modules): Add assert module.
1296 * src/system.h (aver): Define as assert, and summarize the
1297 discussion on this issue.
1298
51c7ca01
JD
12992009-12-14 Joel E. Denny <jdenny@clemson.edu>
1300
1301 Expand GLR acronym in summary of Bison.
1302 Based on discussion with Akim Demaille starting at
1303 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1304 * doc/bison.texinfo (Introduction): Here.
1305 * src/getargs.c (usage): Here.
1306
1f68dca5
AR
13072009-10-03 Alex Rozenman <rozenman@gmail.com>
1308
1309 Document named references.
1310 * doc/bison.texinfo (Actions): Add new example and xref to
1311 Using Named References node.
1312 (Using Named References): New node.
1313
aa01d193
JD
13142009-10-16 Joel E. Denny <jdenny@clemson.edu>
1315
1316 cleanup.
1317 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1318 of char*.
1319 (Sbitset__isEmpty): Use Sbitset instead of char*.
1320 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1321 instead of char. This helps to avoid casting errors.
1322 (Sbitset__or): Use Sbitset instead of char*.
1323
61747047
JD
13242009-10-16 Joel E. Denny <jdenny@clemson.edu>
1325
1326 portability: don't assume 8-bit bytes.
1327 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1328 * src/Sbitset.h (Sbitset__nbytes): Here.
1329 (Sbitset__byteAddress): Here.
1330 (Sbitset__bit_mask): Here.
1331 (Sbitset__last_byte_mask): Here.
1332 (Sbitset__ones): Here.
1333 (SBITSET__FOR_EACH): Here.
1334
a70596de
JD
13352009-10-11 Joel E. Denny <jdenny@clemson.edu>
1336
1337 portability: use va_start and va_end in the same function.
1338 * src/complain.c (error_message): Move va_end from here...
1339 (ERROR_MESSAGE): ... to here.
1340
51f255a5
JD
13412009-10-08 Joel E. Denny <jdenny@clemson.edu>
1342
1343 * data/bison.m4: Update comments for rename to muscle-tab.h.
1344
23ec25b7
JD
13452009-10-08 Joel E. Denny <jdenny@clemson.edu>
1346
1347 Rename muscle_tab.* to muscle-tab.* for consistency with master.
1348 * src/Makefile.am (bison_SOURCES): Update.
1349 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
1350 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
1351 src/tables.c: Update include.
1352 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
1353 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
1354 include.
1355
0ab402b4
JD
13562009-10-07 Joel E. Denny <jdenny@clemson.edu>
1357
1358 Minor code cleanup.
1359 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1360 replace all uses with UNIQSTR_CONCAT.
1361 * src/uniqstr.c (uniqstr_vsprintf): New function.
1362 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1363 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1364 macros.
1365
42ec0ae1
JD
13662009-10-04 Joel E. Denny <jdenny@clemson.edu>
1367
1368 Minor code cleanup.
1369 * src/parse-gram.y: Clean up sorting of declarations.
1370 Use types to simplify %printer declarations where possible.
1371 Provide %printer for BRACKETED_ID and symbol.prec.
1372 * src/symtab.c: Whitespace change.
1373
9637e0ed
JD
13742009-10-04 Joel E. Denny <jdenny@clemson.edu>
1375
1376 tests: skip tests of file names that platform does not support.
1377 Reported by Michael Raskin at
1378 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1379 * THANKS (Michael Raskin): Add.
1380 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1381 to fail at least for file names containing ":" or "\".
1382
69a2ab11
JD
13832009-09-23 Joel E. Denny <jdenny@clemson.edu>
1384
1385 yysyntax_error: avoid duplicate lookahead collection.
1386 Except when memory reallocation is required, this change
1387 eliminates the need to invoke yysyntax_error twice and thus to
1388 repeat the collection of lookaheads. It also prepares for
1389 future extensions that will make those repetitions more
1390 expensive and that will require additional memory management in
1391 yysyntax_error. Finally, it fixes an obscure bug already
1392 exercised in the test suite.
1393 * data/yacc.c (yysyntax_error): Add arguments for message
1394 buffer variables stored in the parser. Instead of size, return
1395 status similar to yyparse status but indicating success of
1396 message creation. Other than the actual reallocation of the
1397 message buffer, import and clean up memory management code
1398 from...
1399 (yyparse, yypush_parse): ... here.
1400 * tests/regression.at (%error-verbose overflow): No longer an
1401 expected failure.
1402
d88cf117
JD
14032009-09-23 Joel E. Denny <jdenny@clemson.edu>
1404
1405 yysyntax_error: test memory management more.
1406 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1407 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
1408 New test group.
1409 (%error-verbose overflow): New test group that reveals an
1410 obscure bug. Expected fail for now.
1411
9da640ea
AD
14122008-12-11 Akim Demaille <demaille@gostai.com>
1413
1414 Pass the token type to yysyntax_error.
1415 * data/yacc.c (yysyntax_error): Take the transated token instead
1416 of the raw number.
1417 Adjust callers.
1418
d3d3628b
AD
14192008-12-11 Akim Demaille <demaille@gostai.com>
1420
1421 Simplify the i18n of the error messages.
1422 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
1423 of building dynamically the format string.
1424
4c6b13f3
JD
14252009-10-03 Joel E. Denny <jdenny@clemson.edu>
1426
1427 Remove dead code.
1428 * src/symtab.c (symbol_pack): Here because every symbol's number
1429 is always defined by this time.
1430
f840c05a
AR
14312009-10-03 Alex Rozenman <rozenman@gmail.com>
1432
1433 Add additional space after periods in NEWS.
1434 * NEWS (2.5): here.
1435
17a407dc
JD
14362009-09-29 Joel E. Denny <jdenny@clemson.edu>
1437
1438 Use the correct conversion specifier for size_t.
1439 Reported by Jim Meyering.
1440 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1441 because Sbitset__Index is size_t.
1442 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1443
4b7a4c1b
JD
14442009-09-27 Joel E. Denny <jdenny@clemson.edu>
1445
1446 tests: don't abuse AT_BISON_CHECK.
1447 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1448 additional shell commands outside of AT_BISON_CHECK.
1449
873ac263
JD
14502009-09-26 Joel E. Denny <jdenny@clemson.edu>
1451
1452 tests: check that parse-gram.y's IELR and LALR are identical.
1453 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1454 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1455 group.
1456
232be91a
AD
14572009-09-16 Akim Demaille <demaille@gostai.com>
1458
1459 doc: comment changes.
1460 * doc/bison.texinfo: Comment changes.
1461
c781580d
AD
14622009-09-16 Akim Demaille <demaille@gostai.com>
1463
1464 doc: spell checking.
1465 * doc/bison.texinfo: here.
1466
348f5608
AR
14672009-09-19 Alex Rozenman <rozenman@gmail.com>
1468
1469 Keep sub-messages aligned. Fix strings for translation.
f840c05a
AR
1470 * src/location.h (location_print): Add return value.
1471 * src/location.c (location_print): Return number of printed
348f5608 1472 characters.
f840c05a
AR
1473 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1474 new functions.
1475 * src/complain.cpp (indent_ptr): New static variable.
1476 (error_message, complain_at_indent, warn_at_indent): Implement
1477 the alignment mechanism.
1478 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1479 for translations. Use new alignment mechanism.
1480 * tests/named-ref.at: Adjust test-cases.
348f5608
AR
1481 * NEWS (2.5): Add an announcement about named references.
1482
d93b5f50
JD
14832009-09-13 Joel E. Denny <jdenny@clemson.edu>
1484
1485 tests: clean up push.at test group titles.
1486 * tests/push.at: Remove "Push Parsing: " from test group titles
1487 because these are already under the banner "Push Parsing Tests".
1488
4c56b131
AR
14892009-09-12 Alex Rozenman <rozenman@gmail.com>
1490
1491 Provide an additional sub-message for clarity.
1492 Add "symbol not found in production" error message when
1493 an "invalid reference" is detected in named references
1494 resolution.
1495 * src/scan-code.l: Update "invalid reference" case.
1496 * tests/named-ref.at: Adjust test-cases.
1497
93d0103d
JD
14982009-09-10 Joel E. Denny <jdenny@clemson.edu>
1499
1500 Clean up yacc.c a little.
1501 * data/yacc.c: Clean up M4 for readability, and make output
1502 whitespace more consistent. For the main parse function
1503 comment, instead of saying "yyparse or yypush_parse", say either
1504 "yyparse" or "yypush_parse" depending on which it actually is.
1505
628be6c9
JD
15062009-09-03 Joel E. Denny <jdenny@clemson.edu>
1507
1508 Complain about unused %define variables and %code qualifiers.
1509 * NEWS (2.5): Document.
1510 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1511 * doc/bison.texinfo (Decl Summary): Document complaint, and
1512 improve %define documentation a little otherwise.
1513 * tests/input.at (Reject unused %code qualifiers): Update.
1514 (%define errors): Update.
1515 (%define, --define, --force-define): Update.
1516 (%define backward compatibility): Update.
1517 (Unused %define api.pure): Update.
1518 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1519
c842365a
JD
15202009-09-03 Joel E. Denny <jdenny@clemson.edu>
1521
1522 Use aver not assert.
1523 * src/output.c: Don't include assert.h.
1524 (output_skeleton): Use aver not assert.
1525 * src/system.h (aver): In documentation of why, add links to
1526 Paul Eggert's explanations in the mailing lists.
1527
14e568d7
AR
15282009-09-05 Alex Rozenman <rozenman@gmail.com>
1529
1530 Use "Unresolved reference" error message when no symbols were found
1531 in a symbolic reference resolution. Remove .expr and -expr from
1532 the shown reference when the reference is unresolved.
1533 * src/scan-code.l: Change the error message, adjust location columns,
1534 rename variable "exact_mode" to "explicit_bracketing".
1535 * tests/named-ref.at: Adjust existing tests and add a new one.
1536
dac8cc0d
AD
15372009-09-03 Akim Demaille <demaille@gostai.com>
1538
1539 * NEWS (2.4.2): Add "Internationalization" item.
1540
3710dd02
AD
15412009-09-03 Akim Demaille <demaille@gostai.com>
1542
1543 bootstrap: fix/improve find_tool.
1544 * bootstrap (find_tool): Improve error messages.
1545 Fix typo about find_tool_names.
1546
9852b61c
JD
15472009-08-29 Joel E. Denny <jdenny@clemson.edu>
1548
1549 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1550 See
1551 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1552 * src/scan-code.h (code_props_rule_action_init): Rename
1553 named_ref arg to name so it doesn't shadow named_ref type. This
1554 makes it consistent with the function definition in scan-code.l
1555 anyway.
1556
f37495f6
JD
15572009-08-28 Joel E. Denny <jdenny@clemson.edu>
1558
1559 %define: accept unquoted values.
1560 * NEWS (2.5): Group all %define changes together, and document
1561 this one. Remove quotes in IELR and canonical LR entry.
1562 * doc/bison.texinfo: Remove quotes in most examples throughout.
1563 (Decl Summary): Update %define documentation.
1564 (Table of Symbols): Likewise.
1565 * src/ielr.c (LrType): Update documentation.
1566 * src/parse-gram.y (content.opt): Add production for ID.
5bf2bf7a 1567 * tests/calc.at: Remove quotes in most tests.
f37495f6
JD
1568 * tests/existing.at: Likewise.
1569 * tests/input.at: Likewise.
1570 * tests/local.at: Likewise.
1571 * tests/push.at: Likewise.
1572 * tests/reduce.at: Likewise.
1573 * tests/torture.at: Likewise.
1574
3a414bbf
JD
15752009-08-28 Joel E. Denny <jdenny@clemson.edu>
1576
1577 %define lr.type: make values lowercase IDs.
1578 That is, "LALR" => "lalr", "IELR" => "ielr", and
1579 "canonical LR" => "canonical-lr".
1580 * NEWS (2.5): Update documentation.
1581 * doc/bison.texinfo (Decl Summary): Likewise.
1582 * src/ielr.c (ielr): Use new values.
1583 * src/ielr.h (ielr): Update documentation.
1584 * src/reader.c (prepare_percent_define_front_end_variables): Use
1585 and validate new values.
1586 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1587 grammars.
1588 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1589
4bb975e1
EB
15902009-08-27 Eric Blake <ebb9@byu.net>
1591
1592 scan-gram: avoid portability trap with ctype usage.
1593 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1594 Avoid compiler warning.
1595
74baf5c9
JD
15962009-08-27 Joel E. Denny <jdenny@clemson.edu>
1597
1598 tests: use perl for printing special sequences to files.
1599 And skip tests if perl is not available. This is better than
1600 playing tricks with shell portability. Suggested by Akim
1601 Demaille.
1602 * tests/input.at (Bad character literals): Use it here for
1603 omitting final newlines.
1604 (Bad escapes in literals): Use it here for special characters.
1605
d63e1279
JD
16062009-08-26 Joel E. Denny <jdenny@clemson.edu>
1607
1608 tests: show a use of %define lr.default-reductions "consistent"
1609 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1610 prevents the omission of expected tokens for %error-verbose.
1611
833d1720
AD
16122009-08-26 Akim Demaille <demaille@gostai.com>
1613
1614 tests: portability fix.
1615 * tests/input.at (Bad escapes in literals): Don't expect "echo
1616 '\0'" to output \ then 0.
1617
e4bcae3c
JD
16182009-08-26 Joel E. Denny <jdenny@clemson.edu>
1619
1620 Actually handle the yytable zero value correctly this time.
1621 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
1622 mention zero values in the YYTABLE comments.
1623 * data/glr.c (yytable_value_is_error): Don't check for zero
1624 value.
1625 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1626 * data/yacc.c (yytable_value_is_error): Likewise.
1627 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1628 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1629 * src/tables.h: In header comments, explain why it's useless to
1630 check for a zero value in yytable.
1631
d5eb0826
JD
16322009-08-25 Joel E. Denny <jdenny@clemson.edu>
1633
1634 More fixes related to last two patches.
1635 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1636 defined.
1637 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
1638 yytable comments: zero indicates syntax error not default
1639 action.
1640 * data/glr.c (yyis_pact_ninf): Rename to...
1641 (yypact_value_is_default): ... this.
1642 (yyisDefaultedState): Update for rename.
1643 (yyis_table_ninf): Rename to...
1644 (yytable_value_is_error): ... this, and check for value zero
1645 besides just YYTABLE_NINF.
1646 (yygetLRActions): Check for default value from yypact. It
1647 appears that this check is always performed before this function
1648 is invoked, and so adding the check here is probably redundant.
1649 However, the code may evolve after this subtlety is forgotten.
1650 Also, update for rename to yytable_value_is_error. Because that
1651 macro now checks for zero, a different but equivalent branch of
1652 the if-then-else here is evaluated.
1653 (yyreportSyntaxError): Update for rename to
1654 yytable_value_is_error. The zero condition was mishandled
1655 before.
1656 (yyrecoverSyntaxError): Update for renames. No behavioral
1657 changes.
1658 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1659 New function.
1660 (yy_table_value_is_error_): New function.
1661 (parse): Use new functions where possible. No behavioral
1662 changes.
1663 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1664 The zero condition was mishandled before.
1665 * data/yacc.c (yyis_pact_ninf): Rename to...
1666 (yypact_value_is_default): ... this.
1667 (yyis_table_ninf): Rename to...
1668 (yytable_value_is_error): ... this, and check for value zero
1669 besides just YYTABLE_NINF.
1670 (yysyntax_error): Update for rename to yytable_value_is_error.
1671 The zero condition was mishandled before.
1672 (yyparse): Update for renames. No behavioral changes.
1673 * src/tables.h: Improve comments about yypact, yytable, etc.
1674 more. Most importantly, say yytable value of zero means syntax
1675 error not default action.
1676
1fa30307
JD
16772009-08-25 Joel E. Denny <jdenny@clemson.edu>
1678
1679 Fix %error-verbose for conflicts resolved by %nonassoc.
1680 * NEWS (2.5): Document.
1681 * data/glr.c (yyreportSyntaxError): Fix this by checking
1682 yyis_table_ninf.
1683 * data/yacc.c (yysyntax_error): Likewise.
1684 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1685 yytable_ninf_.
1686 * data/lalr1.java (yysyntax_error): Likewise.
1687 * tests/conflicts.at (%nonassoc and eof): Update expected output
1688 and remove FIXME.
1689
77373efa
JD
16902009-08-25 Joel E. Denny <jdenny@clemson.edu>
1691
1692 Some code and documentation improvements.
1693 * data/c.m4 (b4_table_value_equals): New macro to capture
1694 some repeated code.
1695 * data/glr.c (yyis_pact_ninf): Use it here.
1696 (yyis_table_ninf): Likewise.
1697 (yyreportSyntaxError): Improve internal comments.
1698 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1699 Use it everywhere possible.
1700 (yyis_table_ninf): Likewise.
1701 (yysyntax_error): Improve internal comments.
1702 * data/lalr1.cc (yysyntax_error_): Likewise.
1703 * data/lalr1.java (yysyntax_error): Likewise.
1704 * src/tables.h: Improve comments about yypact, yytable, etc.
1705
890ab17c
JD
17062009-08-21 Joel E. Denny <jdenny@clemson.edu>
1707
1708 Use locale when quoting.
1709 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1710 quote rather than implementing quoting here.
1711
c5196098
EB
17122009-08-20 Eric Blake <ebb9@byu.net>
1713
aa50ba7b
EB
1714 Make previous patch more robust.
1715 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1716 argmatch.h.
1717 (output_skeleton): Use it.
1718 Suggested by Akim Demaille.
1719
c5196098
EB
1720 Import latest m4/m4.m4.
1721 * submodules/autoconf: Update to autoconf 2.64.
1722 * configure.ac (M4_GNU_OPTION): New define.
1723 * src/output.c (output_skeleton): Use it to resolve FIXME.
1724 * NEWS: Mention this.
1725
39fb7e62
JD
17262009-08-19 Joel E. Denny <jdenny@clemson.edu>
1727
1728 Fix complaints about escape sequences.
1729 Discussed starting at
1730 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1731 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1732 For a \0 and similar escape sequences meaning the null
1733 character, report an invalid escape sequence instead of an
1734 invalid null character because the latter does not actually
1735 appear in the user's input.
1736 In all escape sequence complaints, don't escape the initial
1737 backslash, and don't quote when the sequence appears at the end
1738 of the complaint line unless there's whitespace that quotearg
1739 won't escape.
1740 Consistently say "invalid" not "unrecognized".
1741 Consistently prefer "empty character literal" over "extra
1742 characters in character literal" warning for invalid escape
1743 sequences; that is, consistently discard those sequences.
1744 * tests/input.at (Bad escapes in literals): New.
1745
c33bc800
AD
17462009-08-19 Akim Demaille <demaille@gostai.com>
1747
1748 doc: fixes.
1749 * doc/bison.texinfo: Fix minor Texinfo errors.
1750
8fbbeba2
AD
17512009-08-19 Akim Demaille <demaille@gostai.com>
1752
1753 doc: %initial-action to initialize yylloc.
1754 Reported by Bill Allombert.
1755 * doc/bison.texinfo: Set fill-column to 76.
1756 (Location Type): Document the use of %initial-action to initialize
1757 yylloc.
1758
1874a474
JD
17592009-08-18 Joel E. Denny <jdenny@clemson.edu>
1760
1761 maint: update for gnulib's recent update-copyright changes
1762 * gnulib: Update.
1763 * .x-update-copyright (COPYING): Add as it's no longer implied
1764 when .x-update-copyright is present.
1765 * cfg.mk (update-copyright-local): Remove, now ignored.
1766 (update-copyright): Declare update-b4-copyright as a dependency.
1767
f4bfd5a9
AD
17682009-08-17 Akim Demaille <demaille@gostai.com>
1769
1770 build: require gettext 0.17.
1771
1772 Suggested by Bruno Haible.
1773 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1774 * configure.ac: require gettext 0.17 to ensure compatibility with
1775 gnulib.
1776
2509eba6
AD
17772009-08-17 Akim Demaille <demaille@gostai.com>
1778
1779 build: lower gettext requirements.
1780
1781 Bison was uselessly requiring the formatstring macros from
1782 gettext, which resulted in mo files not being installed on systems
1783 that perfectly supported Bison mo files. Lower the requirement.
1784 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1785
aa50ba7b
EB
1786 * configure.ac: Require need-ngettext instead of
1787 need-formatstring-macros.
1788 Reported by Martin Jabocs.
1789 Suggested by Bruno Haible.
1790 * INSTALL: Restructure.
1791 (Internationalization): New.
2509eba6 1792
314542f9
JD
17932009-08-14 Joel E. Denny <jdenny@clemson.edu>
1794
1795 maint: fix use of copyright year intervals.
1796 * gnulib: Update.
1797 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1798 as now recommended in gnulib/NEWS.
1799 * build-aux/update-b4-copyright: Fix.
1800 * cfg.mk (update-copyright-env): Configure update-copyright.
1801
24985964
JD
18022009-08-13 Joel E. Denny <jdenny@clemson.edu>
1803
1804 Make it easier to write deterministic tests.
1805 Continues Akim's work from his 2009-06-10 commits.
1806 * src/reader.c (check_and_convert_grammar): Don't add any
1807 symbols after the first symbols_do invocation.
1808 * src/symtab.c (symbols_sorted): New static global.
1809 (user_token_number_redeclaration): Update comments.
1810 (symbol_from_uniqstr): If a new symbol is being created, assert
1811 that symbols_sorted hasn't been allocated yet.
1812 (symbols_free): Free symbols_sorted.
1813 (symbols_cmp, symbols_cmp_qsort): New functions.
1814 (symbols_do): Sort symbol_table into symbols_sorted on first
1815 invocation.
1816 * tests/input.at (Numbered tokens): Recombine tests now that the
1817 output should be deterministic across multiple numbers.
1818
47076da5
AD
18192009-08-12 Akim Demaille <demaille@gostai.com>
1820
1821 distcheck: fix.
1822
aa50ba7b 1823 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
47076da5 1824
36dfe466
JD
18252009-08-10 Joel E. Denny <jdenny@clemson.edu>
1826
1827 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
1828
07c0db18
JD
18292009-08-10 Joel E. Denny <jdenny@clemson.edu>
1830
1831 Miscellaneous code readability improvements.
1832
1833 * src/reader.c (reader): Move %define front-end variable
1834 defaults and checking into...
1835 (prepare_percent_define_front_end_variables): ... this new
1836 function.
1837
1838 * src/scan-gram.l (INITIAL): For consistency with string
1839 literals, don't store open quote on character literal. It's
1840 discarded before returning anyway.
1841 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1842 Make length test more readable, and make the character stored
1843 for an empty literal more obvious while consistent with the
1844 previous behavior.
1845
1846 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1847 USER_NUMBER_HAS_STRING_ALIAS throughout.
1848 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1849 that is repeated in symtab.h. Improve argument names to make it
1850 clear which side of the symbol-string alias pair is which.
1851 (symbol_check_alias_consistency): Improve local variable names
1852 for the same purpose.
1853 * src/symtab.h (struct symbol): Make comments about aliases
1854 clearer.
1855 (symbol_make_alias): Improve comments and argument name.
1856 * src/output.c (token_definitions_output): Update for rename to
1857 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1858
1a323c2f
AR
18592009-08-08 Alex Rozenman <rozenman@gmail.com>
1860
1861 Convert "misleading reference" messages to warnings.
1862 * src/scan-code.l: New function 'show_sub_messages', more
1863 factoring.
1864 * tests/named-ref.at: Adjust tests.
1865
38609c34
JD
18662009-08-06 Joel E. Denny <jdenny@clemson.edu>
1867
1868 maint: run "make update-copyright"
1869
642f240e
JD
18702009-08-06 Joel E. Denny <jdenny@clemson.edu>
1871
1872 maint: make update-b4-copyright easier to use
1873 * build-aux/update-b4-copyright: In warnings, report line
1874 numbers rather than character positions.
1875 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1876 that update-copyright runs it.
1877 * gnulib: Update.
1878
d0caad01
JD
18792009-08-05 Joel E. Denny <jdenny@clemson.edu>
1880
1881 maint: clean up update-b4-copyright code
1882 * build-aux/update-b4-copyright: Do not accept 2-digit
1883 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1884 Don't accept a `[' in a b4_copyright argument.
1885 Format code more consistently.
1886 Don't assume b4*copyright never occurs.
1887
ac2def56
JD
18882009-08-04 Joel E. Denny <jdenny@clemson.edu>
1889
1890 maint: automate b4_copyright updates.
1891 * Makefile.am (update-b4-copyright): New target rule.
1892 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
1893 * build-aux/update-b4-copyright: New.
1894 * data/yacc.c: Remove stray characters around b4_copyright
1895 invocations.
1896
dbbb64f0
JD
18972009-08-04 Joel E. Denny <jdenny@clemson.edu>
1898
1899 maint: automate annual package-wide copyright-year update.
1900 * .x-update-copyright: New.
1901 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1902 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1903 update-copyright. Remove gnumakefile, which is implied by
1904 maintainer-makefile.
1905 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1906 * gnulib: Update.
1907 * maint.mk: Remove, now copied from gnulib.
1908 * examples/extexi: Add missing "(C)" in copyright statement so
1909 update-copyright can recognize it.
1910 * src/LR0.h: Likewise.
1911 * src/print.h: Likewise.
1912 * src/print_graph.h: Likewise.
1913 * src/gram.c: Add missing comma in copyright statement.
1914 * src/gram.h: Likewise.
1915
bfa018d4
JD
19162009-08-04 Joel E. Denny <jdenny@clemson.edu>
1917
1918 Fix "make distcheck".
1919 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1920 of just calc.stamp.
1921
4521fcdf
JD
19222009-08-01 Joel E. Denny <jdenny@clemson.edu>
1923
1924 Pacify "gcc -Wunused" for the input function from Flex.
1925 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1926 and later.
1927 * src/scan-code.l: Add "%option noinput", which I cannot find in
1928 the Flex manual, but which Flex has supported since at least as
1929 far back as 2.5.4. However, if any of our developers still use
1930 Flex 2.5.4, they'll need to stop configuring with
1931 --enable-gcc-warnings because "%option noinput" didn't work
1932 correctly until Flex 2.5.6.
1933 * src/scan-gram.l: Likewise.
1934 * src/scan-skel.l: Likewise.
1935
992e874a
AR
19362009-07-31 Alex Rozenman <rozenman@gmail.com>
1937
1938 Fix --enable-gcc-warnings problems.
1939 * src/reader.c: Adjust variable names.
1940 * src/scan-code.l: Fix prototypes and adjust names.
1941 * src/named-ref.c: Remove redundant "if".
1942
a1ed2b71
JD
19432009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1944
1945 Fix a --enable-gcc-warnings problem.
1946 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1947 variable.
1948
cbc6a70e 19492009-07-24 Alex Rozenman <rozenman@gmail.com>
1e20ad11
AR
1950
1951 Fix some memory leaks.
1952 * src/named-ref.c: Add a pointer check (named_ref_free).
1953 * src/scan-code.l: New function (variant_table_free). Called in
1954 code_scanner_free.
1955 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1956
ac9b0e95
JD
19572009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1958
1959 Warn about character literals not of length one.
1960 * NEWS (2.5): Document.
1961 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1962 the length.
1963 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1964 * tests/input.at (Bad character literals): New test group.
1965
2de160e1
JD
19662009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1967
1968 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1969
cba97506
JD
19702009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1971
1972 Some M4 cleanup in the testsuite.
1973 Suggested by Eric Blake at
1974 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1975 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1976 complicate the code by distinguishing between a missing value
1977 and an empty string value for an optional argument. This fix is
1978 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1979 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1980 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1981 arguments are not needed because of the following changes.
1982 Fix stale comments.
1983 Bison developers should use GNU M4 and should not use
1984 POSIXLY_CORRECT when building the test suite, so do not
1985 complicate the code by avoiding $10 and above.
1986 Do not quote an empty string value for an optional argument, and
1987 do not distinguish between a missing value and an empty string
1988 value.
1989
62eb2d1b
JD
19902009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
1991
1992 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
1993
620b2e36
JD
19942009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1995
1996 Revert unnecessary column realignment in --help output.
1997 Reported by Akim Demaille at
1998 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1999 * src/getargs.c (usage): Here.
2000
cbc6a70e 20012009-07-04 Alex Rozenman <rozenman@gmail.com>
dad6544d
AR
2002
2003 Alphabetical order in src/Makefile.am.
2004 * src/Makefile.am: Adjust.
2005
cbc6a70e 20062009-07-04 Alex Rozenman <rozenman@gmail.com>
d5e8574b
AR
2007
2008 Style changes and factoring.
2009 * src/named-ref.h: Add comments.
2010 * src/parse-gram.y: Readability and style changes.
2011 * src/reader.c: Factoring: assign_named_ref function.
2012 * src/scan-code.l: Factoring and style changes. Rename
2013 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2014 Use "unsigned" type for variant index. Improve readablity.
2015 * src/scan-gram.l: Change error messages and add comments.
2016 * src/symlist.h: symbol_list_null: New function decl.
2017 * src/symlist.c: symbol_list_null: Implement here.
2018 * tests/named-refs.at: Adjust for new error messages.
2019
ae09ec85
EB
20202009-06-29 Eric Blake <ebb9@byu.net>
2021
2022 scan-code: avoid compiler warnings
2023 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2024
80d653fd
AD
20252009-06-29 Akim Demaille <demaille@gostai.com>
2026
2027 build: avoid concurrent extraction of calc++.
2028 * examples/calc++/Makefile.am (calc.stamp): New.
2029 Depend on it to create the sources of calc++ so that concurrent
2030 builds don't launch several "extexi" in parallel.
2031 Not only this is inefficient, this also builds incorrect sources
2032 with several extractions mixed together.
2033
7685e2f7
AR
20342009-06-27 Alex Rozenman <rozenman@gmail.com>
2035
2036 Implement support for named symbol references.
2037 * src/parse-gram.y: Add new syntax (named_ref.opt).
2038 * src/reader.c: Store named refs in symbol lists.
2039 * src/reader.h: New argument for symbol_append and
2040 action_append functions.
2041 * src/scan-code.h: Add new field (named_ref) into
2042 code_props data structure. Keeps named ref of midrule
2043 actions.
2044 * src/scan-code.l: Support for named refs in semantic
2045 action code. New function 'parse_named_ref'.
2046 * src/scan-gram.l: Support bracketed id.
2047 * src/symlist.c: Store named refs in symbol lists.
2048 * src/symlist.h: New field in symbol list: named_ref.
2049 * src/named-ref.h: New file, a struct for named_ref.
2050 * src/named-ref.cp: New file, named_ref_new function.
2051 * src/local.mk: Add two new files.
2052 * tests/testsuite.at: Include new test group:
2053 * tests/named-refs.at: this new file.
2054
67f8cf51
AD
20552009-06-25 Akim Demaille <demaille@gostai.com>
2056
2057 hash: check insertion for memory exhaustion.
2058 * src/uniqstr.c (uniqstr_new): New.
2059
83b66ddd
AD
20602009-06-11 Akim Demaille <demaille@gostai.com>
2061
2062 style changes.
2063 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2064 * src/print-xml.c: Style changes.
2065 * tests/conflicts.at: Comment changes.
2066
517cb0ad
AD
20672009-06-11 Akim Demaille <demaille@gostai.com>
2068
2069 xml: beware of user strings used to give a %prec to rules.
2070 * tests/conflicts.at (%prec with user strings): New.
2071 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2072 XML output.
2073
75c7a52a
AD
20742009-06-11 Akim Demaille <demaille@gostai.com>
2075
2076 hash: check insertion for memory exhaustion.
2077 * src/muscle-tab.c (muscle_insert, muscle_grow)
2078 * src/state.c (state_hash_insert): Check the return value of
2079 hash_insert.
2080
66ed9753
AD
20812009-06-10 Akim Demaille <demaille@gostai.com>
2082
2083 deterministic test suite.
2084 Some consistency checks on symbols are performed after all the
2085 symbols were read, by an iteration over the symbol table. This
2086 traversal is nondeterministic, which can be a problem for test
2087 cases.
2088 Avoid this.
2089 Addresses another form of nondeterminism reported by Joel E. Denny.
2090 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2091
2092 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2093 test in two.
2094 Use different file names for the three tests to make the
2095 maintenance easier.
2096
ed15d907
AD
20972009-06-10 Akim Demaille <demaille@gostai.com>
2098
95d176ff
AD
2099 deterministic user-token-number redeclaration errors.
2100 Address nondeterminism reported by Joel E. Denny.
2101 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2102
2103 * src/uniqstr.h: Comment changes.
2104 * src/location.h (boundary_cmp, location_cmp): New.
2105 * src/symtab.c (user_token_number_redeclaration): New.
2106 (symbol_translation): Use it.
2107 * tests/input.at (Numbered tokens): Adjust the expected output.
2108
21092009-05-25 Akim Demaille <demaille@gostai.com>
2110
ed15d907 2111 gnulib: update.
aa50ba7b
EB
2112 * gnulib: Update to latest.
2113 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2114 * m4/.gitignore: Regen.
2115 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2116 Call xalloc_die on hash_insert failures.
2117 Requested by the new __warn_unused_result__ attribute of
2118 hash_insert.
ed15d907 2119
e3a33f7c
JD
21202009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2121
2122 Convert multiple variable definition warnings to complaints.
2123 * NEWS (2.5): Add a new entry for that change.
2124 * doc/bison.texinfo (Decl Summary): Update %define entry.
2125 (Bison Options): Update -D/--define/-F/--force-define entry.
2126 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
2127 * src/muscle_tab.h (muscle_percent_define_insert): Update
2128 comments.
2129 * tests/input.at (`%define errors'): Update.
2130 (`%define, --define, --force-define'): Update.
2131
34d41938
JD
21322009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2133
2134 -F/--force-define and relative %define/-D/--define priorities.
2135 * NEWS (2.5): Add documentation to -D/--define entry.
2136 * build-aux/cross-options.pl: Hard-code association of
2137 --force-define with %define.
2138 * doc/bison.texinfo (Decl Summary): In %define entry,
2139 cross-reference command-line options.
2140 (Bison Options): Add documentation to -D/--define entry.
2141 (Option Cross Key): Widen column for --force-define row.
2142 * src/getargs.c (usage): Document -F/--force-define. Realign
2143 options in output.
2144 (short_options, long_options, getargs): Parse -F/--force-define,
2145 and update muscle_percent_define_insert invocation.
2146 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
2147 (muscle_percent_define_insert): Add argument with that type.
2148 * src/muscle_tab.c (muscle_percent_define_insert): Implement
2149 -F/--force-define behavior and priorities.
2150 * src/parse-gram.y (prologue_declaration): Update
2151 muscle_percent_define_insert invocations.
2152 * tests/input.at (`%define, --define'): Rename to...
2153 (`%define, --define, --force-define'): ... this and extend.
2154
246c4efa
JD
21552009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2156
2157 Update some comments to make sense for -D.
2158 * data/bison.m4 (b4_check_user_names): In header comments, say
2159 "user occurrence" instead of "grammar occurrence".
2160 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
2161 (muscle_percent_code_grow): Likewise just for consistency.
2162
531683e7
JD
21632009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2164
2165 * data/c++.m4: Update copyright year.
2166
e7bfa8b7
JD
21672009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2168
2169 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2170
8c221795
JD
21712009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2172
2173 Handle a trailing `:' in a user-supplied C++ namespace better.
2174 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2175 among the closing braces here. This fix might make the
2176 generated code easier to debug, but otherwise it should be
2177 insignificant because a trailing `:' is a C++ error already.
2178
c8bf65f0
AD
21792009-05-19 Akim Demaille <demaille@gostai.com>
2180
2181 remove useless variable.
2182 * src/getargs.c (skeleton_arg): Remove now useless variable.
2183 Should help the compiler see that this printf-like call is sane.
2184
7ac45a46
AD
21852009-05-11 Akim Demaille <demaille@gostai.com>
2186
2187 doc: use C++ headers.
2188 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2189 headers.
2190
601bdfab
AD
21912009-05-05 Akim Demaille <demaille@gostai.com>
2192
2193 fix hexadecimal token number support.
2194 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
2195
d19123e6
AD
21962009-05-05 Akim Demaille <demaille@gostai.com>
2197
2198 tests: check token numbers.
2199 * tests/input.at (Numbered tokens): New.
2200
ecdfea9a
AD
22012009-05-04 Akim Demaille <demaille@gostai.com>
2202
2203 bison: catch bad symbol names.
2204 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2205 * tests/input.at: Adjust.
2206
43e6aea5
AD
22072009-05-04 Akim Demaille <demaille@gostai.com>
2208
2209 space changes.
2210 * src/scan-gram.l: Untabify to be robust to zealous editors.
2211
c046698e
AD
22122009-05-04 Akim Demaille <demaille@gostai.com>
2213
2214 identifiers: dashes are letters.
2215 Dashes can now start identifiers (symbols and directives).
b10dd689 2216
c046698e
AD
2217 * src/scan-gram.l ({letter}): Add dash.
2218 ({id}): Remove it.
2219 * tests/input.at (Symbols): Adjust.
2220 Remove stray comment.
2221 * tests/regression.at (Invalid inputs): Adjust error message.
2222 * doc/bison.texinfo (Symbols): Update.
2223
966aba65
JD
22242009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2225
2226 Declare %code to be a permanent feature.
2227 * NEWS (2.4.2): Here.
2228 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2229 experimental.
2230 (Decl Summary): Likewise.
2231
812775a0
JD
22322009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2233
2234 Convert underscores to dashes in some %define variable names.
2235 For now, just api.push-pull and lr.keep-unreachable-states.
2236 Maintain old names for backward compatibility.
2237 * NEWS (2.5): Document.
2238 * data/c.m4 (b4_identification): Update comment.
2239 * data/yacc.c: Update access.
2240 * doc/bison.texinfo: Update.
2241 * etc/bench.pl.in (bench_grammar): Update use.
2242 * src/files.c (tr): Move to...
2243 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2244 think of a better place to expose it. My logic is that, for all
2245 uses of tr so far, command-line arguments can be involved, and
2246 getargs.h is already included.
2247 * src/main.c (main): Update access.
2248 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2249 variable names to new variable names before assigning value.
2250 * src/reader.c (reader): Update setting default.
2251 * tests/calc.at: Update uses.
2252 * tests/conflicts.at (Unreachable States After Conflict
2253 Resolution): Update use.
2254 * tests/input.at (%define enum variables): Update use.
2255 (%define backward compatibility): New test group.
2256 * tests/push.at: Update uses.
2257 * tests/reduce.at: Update uses.
2258 * tests/torture.at: Update uses.
2259
1c4aa81d
JD
22602009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2261
2262 Set all front-end %define defaults in one place.
2263 * src/main.c (main): Move lr.keep_unreachable_states default...
2264 * src/reader.c (reader): ... to here.
2265
1d0f55cc
JD
22662009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2267
2268 Rename lr.default_reductions to lr.default-reductions.
2269 * NEWS (2.5): Here.
2270 * doc/bison.texinfo: Here.
2271 * src/lalr.c (initialize_LA): Here.
2272 * src/print.c (print_reductions): Here.
2273 * src/reader.c (reader): Here.
2274 * src/tables.c (action_row): Here.
2275 * tests/input.at (%define enum variables): Here.
2276 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2277
0b593457
JD
22782009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2279
2280 Pacify ./configure --enable-gcc-warnings.
2281 * tests/input.at (Symbols): Prototype yyerror and yylex.
2282
0939aa2d
AD
22832009-04-21 Akim Demaille <demaille@gostai.com>
2284
2285 tests: check the use of dashes and periods in symbols.
2286 * tests/input.at (Symbol): New test group.
2287
0b593457 22882009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
ae618dcc
JD
2289
2290 Document how `%define "var" "value"' is not M4-friendly.
2291 * src/parse-gram.y (variable): In comments here.
2292
0b593457 22932009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
6789b8bd
JD
2294
2295 Add copyright updates missed during previous cherry pick.
2296 * src/output.c: Here.
2297 * src/parse-gram.y: Here.
2298 * src/scan-gram.l: Here.
2299
663ce7bb
AD
23002009-04-20 Akim Demaille <demaille@gostai.com>
2301
2302 variables: accept dashes.
2303 * src/scan-gram.l ({id}): Also accept dashes after the initial
2304 letter.
2305 ({directive}): Use {id}.
2306 * src/parse-gram.y: Comment and formatting changes.
2307 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2308 symbols.
2309 * src/complain.h, src/complain.c (yacc_at): New.
2310 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2311 symbol names.
2312 * src/output.c (token_definitions_output): Do not #define token
2313 names with dashes.
2314
379261b3
JD
23152009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2316
2317 Clean up recent patches a little.
2318 Reported by Akim Demaille.
2319 * doc/bison.texinfo (Understanding): Fix typos.
2320 * src/print.c (print_reductions): Don't use negated variable.
2321
25029e16
JD
23222009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2323
2324 List accepted values for a %define enum variable with an invalid value.
2325 Suggested by Akim Demaille at
2326 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2327 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2328 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
2329 * tests/input.at (%define lr.default_reductions invalid values): Merge
2330 into...
2331 (%define enum variables): ... here, and update output.
2332
620b5727
JD
23332009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2334
2335 Rename "default rule" to "default reduction".
2336 This includes changing variable names in code, changing
2337 comments, and renaming %define lr.default_rules to %define
2338 lr.default_reductions.
2339 * NEWS (2.5): Update IELR documentation.
2340 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
2341 Adjust YYDEFACT and yydefact_ documentation.
2342 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2343 and lr.type documentation. Make some other wording
2344 improvements.
2345 (Glossary): Adjust cross-references and Default Reduction
2346 definition.
2347 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2348 Remove a confusing comment pointed out by Akim Demaille.
2349 (initialize_LA): Adjust code.
2350 * src/print-xml.c (print_reductions): Adjust code.
2351 * src/print.c (print_reductions): Adjust code.
2352 * src/reader.c (reader): Adjust code.
2353 * src/tables.c (action_row): Adjust code.
2354 (token_actions): Adjust code.
2355 * src/tables.h: Adjust YYDEFACT documentation.
2356 * tests/input.at (%define lr.default_rules invalid values):
2357 Rename test group to...
2358 (%define lr.default_reductions invalid values): ... this, and
2359 update grammar file and expected output.
2360 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2361 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2362
34a6c2d1
JD
23632009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2364
2365 Document %define lr.type and lr.default_rules.
2366 * NEWS (2.5): Add an entry.
2367 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2368 besides just LALR(1) and GLR(1).
2369 * doc/bison.texinfo (Introduction): Likewise.
2370 (Language and Grammar): Bison is no longer limited to LALR(1)
2371 restrictions.
2372 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2373 when trying to distinguish from GLR. Talk about LR(1) grammars
2374 rather than LALR(1) grammars.
2375 (Decl Summary): In %define api.push_pull entry, say it applies
2376 to deterministic parsers in C rather than LALR(1) parsers in C.
2377 Add lr.default_rules entry.
2378 Add lr.type entry.
2379 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2380 restrictions.
2381 (Generalized LR Parsing): Same changes as for the previous GLR
2382 section.
2383 (Memory Management): Say deterministic rather than LALR(1).
2384 (Understanding): Correct some bison output.
2385 Index discussion of "accepting state".
2386 Say deterministic rather than LALR(1).
2387 (Bison Options): In --yacc entry, say deterministic rather than
2388 LALR(1).
2389 In --report, --graph, and --xml entries, just don't mention
2390 LALR(1).
2391 (C++ Parsers): Say deterministic rather than LALR(1).
2392 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2393 (Glossary): Add Accepting State, Consistent State, Default Rule,
2394 and IELR(1) definitions.
2395 In Generalized LR (GLR) definition, make same changes as in
2396 previous GLR sections.
2397 In LALR(1) definition, say Bison uses LALR(1) by default rather
2398 than implying Bison is limited to LALR(1).
2399 (LocalWords): Add IELR.
2400
f805dfcb
JD
24012009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2402
2403 Finish implementing %define lr.type.
2404 Its value can be "LALR", "IELR", or "canonical LR".
2405 * lib/timevar.def (TV_IELR_PHASE1): New var.
2406 (TV_IELR_PHASE2): New var.
2407 (TV_IELR_PHASE3): New var.
2408 (TV_IELR_PHASE4): New var.
2409 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2410 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2411 Sbitset.h, ielr.h, and ielr.c.
2412 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2413 trace_types): Add trace_ielr.
2414 * src/lalr.h, src/lalr.c (ngotos): Export it.
2415 (F): Rename to...
2416 (goto_follows): ... this, update all uses, and export it.
2417 (set_goto_map): Export it.
2418 (map_goto): Export it.
2419 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2420 handled in ielr.
2421 (initialize_LA): Export it. Move lookback allocation to...
2422 (lalr): ... here because, for canonical LR, initialize_LA must
2423 be invoked but lookback and much of the rest of LALR isn't
2424 needed.
2425 * main.c (main): Instead of lalr, invoke ielr, which invokes
2426 lalr.
2427 * src/reader.c (reader): Default lr.type to "LALR".
2428 Default lr.default_rules to "accepting" if lr.type is "canonical
2429 LR". Leave the default as "all" otherwise.
2430 Check for a valid lr.type value.
2431 * src/state.h, src/state.c (struct state_list): Add state_list
2432 member.
2433 (state_new): Initialize state_list member to NULL.
2434 (state_new_isocore): New function, exported.
2435 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2436 exercises all values of lr.type.
2437 (GNU AWK Grammar): Rename test group to...
2438 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2439 AT_TEST_EXISTING_GRAMMAR.
2440 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2441 (GNU pic Grammar): Rename test group to...
2442 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2443 AT_TEST_EXISTING_GRAMMAR.
2444 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2445 all values of lr.type.
2446 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2447 (Lane Split): Likewise.
2448 (Complex Lane Split): Likewise.
2449 (Split During Added Lookahead Propagation): Likewise.
2450
166366b2
JD
24512009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2452
2453 Add new files for IELR and canonical LR implementation.
2454 * src/AnnotationList.c: New.
2455 * src/AnnotationList.h: New.
2456 * src/InadequacyList.c: New.
2457 * src/InadequacyList.h: New.
2458 * src/Sbitset.c: New.
2459 * src/Sbitset.h: New.
2460 * src/ielr.c: New.
2461 * src/ielr.h: New.
2462
03c07b03
JD
24632009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2464
2465 Implement %define lr.default_rules.
2466 Its value describes the states that are permitted to contain
2467 default rules: "all", "consistent", or "accepting".
2468 * src/reader.c (reader): Default lr.default_rules to "all".
2469 Check for a valid lr.default_rules value.
2470 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2471 is "accepting", then only mark the accepting state as
2472 consistent.
2473 (initialize_LA): Tell state_lookahead_tokens_count whether
2474 lr.default_rules is "accepting".
2475 * src/tables.c (action_row): If lr.default_rules is not "all",
2476 then disable default rules in inconsistent states.
2477 * src/print.c (print_reductions): Use this opportunity to
2478 perform some assertions about whether lr.default_rules was
2479 obeyed correctly.
2480 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2481 helps with checking the parser tables for a grammar.
2482 * tests/input.at (%define lr.default_rules invalid values): New
2483 test group.
2484 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2485 AT_TEST_TABLES_AND_PARSE.
2486 (`no %define lr.default_rules'): New test group generated by
2487 AT_TEST_LR_DEFAULT_RULES.
2488 (`%define lr.default_rules "all"'): Likewise.
2489 (`%define lr.default_rules "consistent"'): Likewise.
2490 (`%define lr.default_rules "accepting"'): Likewise.
2491
44c124a3
AD
24922009-04-20 Akim Demaille <demaille@gostai.com>
2493
2494 Consistently refer to Yacc, not YACC.
2495 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2496
42660736
JD
24972009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2498
2499 Pacify make maintainer-check-posix.
2500 * tests/input.at (%define, --define): Move bison command-line
2501 options before grammar file name.
2502
a2d05674
JD
25032009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2504
2505 Document semicolon warnings.
2506 * NEWS (2.5): Here.
2507
c4fae1ef
AD
25082008-12-08 Akim Demaille <demaille@gostai.com>
2509
2510 Fix portability issue in the test suite.
2511 * tests/local.at (AT_MATCHES_CHECK): New.
2512 Based on Perl instead of Sed. Sed has too many portability
2513 pitfalls, not ever Sed is GNU Sed.
2514 * tests/actions.at (Fix user actions without a trailing semicolon):
2515 Use it.
2516
42f4393a
DJ
25172008-12-07 Di-an Jan <dianj@freeshell.org>
2518
2519 Implement the FIXME that ends an user action with a semicolon
2520 if it seems necessary.
2521 * src/scan-code.l (flex rules section): Flag cpp directive from
2522 any `#' to the first unescaped end-of-line. Semicolon is not
2523 needed after `;', `{', '}', or cpp directives and is needed after
2524 any other token (whitespaces and comments have no effect).
2525 * tests/actions.at (Fix user actions without a trailing semicolon):
2526 New test.
2527 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2528 to make user actions complete statements.
2529 Adjust column numbers in error messages.
2530 * tests/regression.at (Fix user actions without a trailing semicolon):
2531 Remove. Covered by new test.
2532
bd5df716
AD
25332009-04-14 Akim Demaille <demaille@gostai.com>
2534
2535 doc: minor fixes.
2536 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2537 (Table of Symbols): Remove duplicate entry for %debug.
2538
7ba0d59d
EB
25392009-04-10 Eric Blake <ebb9@byu.net>
2540
2541 submodules: update to latest
2542 * submodules/autoconf: Use latest upstream Autoconf.
2543
b4d71a96
EB
25442009-04-06 Eric Blake <ebb9@byu.net>
2545
2546 Work around autoconf 2.63b bug in testsuite.
2547 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2548 autoconf bug related to # in test.
2549
4ecd3681
JD
25502009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2551
2552 * NEWS (2.5): Describe new -D/--define feature.
2553
c65e5292
AD
25542008-11-10 Akim Demaille <demaille@gostai.com>
2555
2556 --trace=muscles
2557 * src/getargs.h, src/getargs.c (trace_muscle): New.
2558 (trace_types, trace_args): Support it.
2559 * src/output.c (output_skeleton): Use it.
2560
96002de2
AD
25612008-11-10 Akim Demaille <demaille@gostai.com>
2562
2563 muscles_output.
2564 * src/output.c (muscles_output): New, extracted from...
2565 (output_skeleton): here.
2566 Adjust.
2567
fadb13b5
AD
25682008-11-21 Akim Demaille <demaille@gostai.com>
2569
2570 Display the changes in cross-options.texi.
2571 * build-aux/cross-options.pl ($sep): New, to separate items.
2572 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
2573 the changes.
2574
72183df4
DJ
25752008-11-20 Di-an Jan <dianj@freeshell.org>
2576
2577 Improves options in the manual.
2578 * doc/bison.texinfo (-g, -x): Add space before argument.
2579 (Option Cross Key): Implement FIXME: listing directives also.
2580 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2581 (Short Option): Special case -d. Put arguments inside @option.
fadb13b5 2582 (Bison Directive): Add column, automatically extracted from
72183df4
DJ
2583 src/scan-gram.l (actual name passed as the first argument)
2584 with special case for %define.
2585 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
2586 to build-aux/cross-options.pl.
2587 * src/getargs.c (usage): Document limitations of cross-options.pl.
2588 * src/scan-gram.l: Likewise.
2589
e80b068c
AD
25902009-02-25 Akim Demaille <demaille@gostai.com>
2591
2592 Copyright years.
2593 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2594
e3ee30b8
AD
25952008-12-08 Akim Demaille <demaille@gostai.com>
2596
2597 Install autoconf as a submodule to get m4sugar.
2598 * .gitmodules: Add submodules/autoconf.
2599 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2600 submodules/autoconf.
2601
c4eb1e84
JD
26022008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2603
2604 Simplify last patch slightly.
2605 * src/getargs.c (getargs): Here.
2606
10fa0146
JD
26072008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2608
2609 Fix last warning from --enable-gcc-warnings.
2610 * src/getargs.c (getargs): Don't assign const address to non-const
2611 pointer.
2612
6f5be1ab
DJ
26132008-11-17 Di-an Jan <dianj@freeshell.org>
2614
2615 Handle --enable-gcc-warnings.
2616 * src/getargs.c (command_line_location): Set parameters to void.
2617
11c4e57d
AD
26182008-11-11 Akim Demaille <demaille@gostai.com>
2619
2620 AT_FULL_COMPILE.
2621 * tests/actions.at, tests/regression.at: Use it.
2622
e186a284
AD
26232008-11-07 Akim Demaille <demaille@gostai.com>
2624
2625 Pass command line location to skeleton_arg and language_argmatch.
2626 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2627 The location argument is now mandatory.
2628 Adjust all dependencies.
2629 (getargs): Use command_line_location.
2630
e14c6831
AD
26312008-11-07 Akim Demaille <demaille@gostai.com>
2632
2633 -D, --define.
2634 * src/getargs.c (usage): Document -D.
2635 Fix help string for --locations.
2636 (command_line_location): New.
2637 (short_options, long_options, getargs): Support -D, --define.
2638 (getargs): Move -d support at the right place.
2639 * doc/bison.texinfo (Bison Options): Update.
2640 * tests/input.at (%define, --define): New.
2641
75c21b61
AD
26422008-11-07 Akim Demaille <demaille@gostai.com>
2643
2644 Initialize the muscle table before parsing the command line.
2645 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2646 (getargs): Define file_name.
2647 * src/main.c (main): Initialize muscle_tab before calling
2648 getargs.
2649 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2650 its value is not available yet.
2651
33d2a860
AD
26522008-11-09 Akim Demaille <demaille@gostai.com>
2653
2654 Require the generation of parse-gram.output.
2655 * src/Makefile.am (YACC): Pass --report=all.
2656
006faedf
JD
26572009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2658
2659 * NEWS (2.5): New stub.
2660
ecd1b61c
JD
26612009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2662
2663 Fix options documentation.
2664 * build-aux/cross-options.pl: As in --help output, write optional
2665 arguments as [=ARG] not =[ARG].
2666 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2667
f67c4037
AD
26682008-11-07 Akim Demaille <demaille@gostai.com>
2669
2670 Fix --help.
2671 * src/getargs.c (usage): Fix help string for -W.
2672
0213d651
AD
26732008-11-07 Akim Demaille <demaille@gostai.com>
2674
2675 Handle more general types of option arguments.
2676 * build-aux/cross-options.pl: The argument ends at the first
2677 space, not the first non-symbol character.
2678 Use @var for each word appearing the argument description.
2679
c19178bf
JD
26802009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2681
2682 Remove spurious initial empty lines.
2683 * data/location.cc: End the @output lines with an @.
2684
0d2b2ab0
AD
26852008-11-04 Akim Demaille <demaille@gostai.com>
2686
2687 Remove spurious initial empty lines.
2688 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2689 * data/yacc.c: End the @output lines with an @.
2690
8ba62e3e
JD
26912009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2692
2693 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2694 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2695 requirements for a correct m4 are stricter.
2696 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
2697 * configure.ac: Update to use AC_PROG_GNU_M4.
2698 Reported by Eric Blake.
2699
5bc993d9
JD
27002009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2701
2702 Help with updating web manual.
2703 * HACKING: Incorporate instructions from gnulib/doc/README.
2704 * bootstrap.conf (gnulib_modules): Add gendocs.
2705
580c075d
JD
27062009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2707
2708 Fix strange %define locations for default values.
2709 Reported by Akim Demaille at
2710 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2711 and discussed again starting at
2712 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2713 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2714 because location information is bogus.
2715 Use angle brackets to delimit fake file name because square brackets
2716 look like underexpanded m4. Choose a better fake file name.
2717 Use negative line numbers.
2718 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2719 * src/location.c (location_print): If line for a boundary is negative,
2720 only print that boundary's file name.
2721 * src/location.h: Document that.
2722 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2723 defaults): Update output.
2724
5d3a1ecb
AD
27252008-11-07 Akim Demaille <demaille@gostai.com>
2726
2727 Locations without columns for command line arguments.
2728 * src/location.c (location_print): Don't display negative columns.
2729 * src/location.h: Document this.
2730
015e86a7
JD
27312009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2732
2733 Add reminder about uploading public key to keys.gnupg.net.
2734 * HACKING (Release Procedure): Here.
2735
c1455bab
AD
27362009-03-31 Akim Demaille <demaille@gostai.com>
2737
2738 bootstrap: --help to stdout.
2739 * bootstrap (usage): Don't send --help to stderr.
2740 Use a here doc instead of a long string.
2741
2075a82a
AD
27422009-03-31 Akim Demaille <demaille@gostai.com>
2743
2744 bootstrap: README-hacking no longer exists
2745 * bootstrap (checkout_only_file): Set to HACKING.
2746
26fccd4d
AD
27472009-03-26 Akim Demaille <demaille@gostai.com>
2748
2749 doc: merge HACKING and README-hacking.
2750 Two files is confusing.
2751 Reported by Alexandre Duret-Lutz.
5bc993d9 2752
26fccd4d
AD
2753 * README-hacking: Merge into...
2754 * HACKING (Working from the repository): here.
2755
6469c4d7
AD
27562009-03-26 Akim Demaille <demaille@gostai.com>
2757
2758 doc: update README-hacking.
2759 * README-hacking: We now use git and git submodules.
2760 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2761
b328890a
AD
27622009-03-26 Akim Demaille <demaille@gostai.com>
2763
2764 lalr1.cc: avoid GCC 4.3 warnings.
2765 GCC 4.3 now warns about "a || b && c" and asks for explicit
2766 parentheses.
2767 Reported by Alexandre Duret-Lutz.
2768 * data/location.cc: Update copyright years.
2769 (Position::operator==): Use parens to make precedence explicit.
2770 Compare lines and columns first, as they are more likely to be
2771 different, and they are faster to compare.
2772
f3079439
AD
27732009-03-26 Akim Demaille <demaille@gostai.com>
2774
2775 gnulib: update.
2776 * gnulib: Update to latest.
2777 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
2778 use +=.
2779
8defe11b
AD
27802009-01-08 Akim Demaille <demaille@gostai.com>
2781
2782 Fix grep portability issues.
2783 Grep on Solaris does not support -q.
2784 Reported by Summum Bonum.
5bc993d9 2785
8defe11b
AD
2786 * NEWS: Add a stub for 2.4.2.
2787 * THANKS: Add Summum Bonum.
2788 * tests/atlocal.in (EGREP): New.
2789 (CC, CXX, XSLTPROC): Make it possible to override them via
2790 envvars.
2791 * tests/java.at: Use $EGREP instead of egrep.
2792 Use AT_CHECK's ignore instead of grep's -q.
2793
41930e7a
JD
27942008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2795
2796 Version 2.4.1.
2797 * NEWS: Set version and date.
2798 * lib/Makefile.am: Update copyright year.
2799 * tests/atlocal.in: Update copyright year.
2800
d07932ef
JD
28012008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2802
2803 Semicolon feature removal is not about future language support.
2804 * NEWS: The semicolon feature is no longer active for newer languages,
2805 so don't claim that it causes trouble for them.
2806
0364b334
JD
28072008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2808
2809 * gnulib: Update submodule to HEAD.
2810
876fd835
AD
28112008-12-09 Akim Demaille <demaille@gostai.com>
2812
2813 Update data/README.
2814 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2815
bee1df15
EB
28162008-12-05 Eric Blake <ebb9@byu.net>
2817
2818 Build testsuite with newer autoconf.
2819 * tests/output.at (m4_expand): Don't override in newer autoconf,
2820 where the underlying implementation changed.
2821 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2822 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2823 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2824 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2825 since some of them contain unbalanced ')'.
2826
7e6d1e22
JD
28272008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2828
2829 * NEWS: Clarify a little.
2830
a957d06c
JD
28312008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2832
2833 * NEWS: Update for recent changes.
2834
462503f8
JD
28352008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2836
2837 Fix unexpanded macros in GLR defines file.
2838 Reported by Csaba Raduly at
2839 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2840 * THANKS (Csaba Raduly): Add.
2841 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2842 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2843 lexer in a separate module that includes the defines file.
2844 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
2845 source.
2846 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2847 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2848 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2849 (AT_DATA_SOURCE_PROLOGUE): New.
2850 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2851 (AT_DATA_SOURCE): New.
2852 (AT_FULL_COMPILE): New, copied from master branch and extended to
2853 support an additional source file.
2854
bf151b75
JD
28552008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2856
2857 Don't let maintainer-*-check targets force a version update.
2858 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2859 handled.
2860
f56274a8
DJ
28612008-11-17 Di-an Jan <dianj@freeshell.org>
2862
2863 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2864 Align menus. Adjust word wrapping. Use node names for menu names.
2865 (Examples): Don't abbreviate node names.
2866 (LocalWords): Remove abbreviations.
2867 (Copying): Make description a sentence.
bf151b75 2868 (Java Action Features): Remove period to match the rest of menu.
f56274a8 2869
b5775a81
PB
28702008-11-11 Paolo Bonzini <bonzini@gnu.org>
2871
2872 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2873 * configure.ac: Adjust usage.
2874 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2875 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2876 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2877
7ed73f82
JD
28782008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2879
2880 Don't add a semicolon to actions for %skeleton or %language.
2881 It breaks Java test cases as reported by Akim Demaille.
2882 * src/scan-code.l: Implement.
2883
4b1ebc49
JD
28842008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2885
2886 Clean up %skeleton and %language priority implementation.
2887 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2888 remove static qualifier because others will soon need to see it.
2889 (language_prio): Likewise.
2890 (getargs): Use command_line_prio rather than 0.
2891 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2892 enum fields.
2893 (skeleton_prio): Extern it.
2894 (language_prio): Extern it.
2895 * src/parse-gram.y: Use grammar_prio rather than 1.
2896
738cde3e
AD
28972008-11-04 Akim Demaille <demaille@gostai.com>
2898
2899 * NEWS: Mention the trailing semicolon in action.
2900
d6fb461d
AD
29012008-11-04 Akim Demaille <demaille@gostai.com>
2902
2903 Reformat NEWS.
2904 * NEWS: Use more outline-mode markup.
2905 Suggested by Jim Meyering.
2906
14da0cdd
JD
29072008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2908
2909 Fix user actions without a trailing semicolon.
2910 Reported by Sergei Steshenko at
2911 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2912 * THANKS (Sergei Steshenko): Add.
2913 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2914 * tests/regression.at (Fix user actions without a trailing semicolon):
2915 New test case.
2916
c9ba9e59
JD
29172008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2918
2919 Initiate further development.
2920 * NEWS: Create an empty section for new entries.
2921 * gnulib: Update submodule to HEAD.
2922
bfb40910
JD
29232008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2924
2925 * NEWS: Version 2.4.
2926
241fda7a
JD
29272008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2928
2929 Prepare for next release.
2930 * NEWS: Briefly mention changes since 2.3b.
2931 * README: Say GNU m4 1.4.6, which we've been requiring in release
2932 announcements already, not 1.4.3, which breaks the build.
2933
ed4d67dc
JD
29342008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2935
2936 Say %language is experimental.
2937 We're thinking of extending it's effect on output file naming. See the
2938 thread at
2939 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2940 * NEWS: Say it's experimental.
2941 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2942 recommend it over %skeleton for now.
2943 (Bison Options): Likewise.
2944 (C++ Bison Interface): Use %skeleton not %language.
2945 (Calc++ Parser): Use %skeleton not %language.
2946 * src/getargs.c (usage): Say it's experimental.
2947
e254a580
DJ
29482008-11-01 Di-an Jan <dianj@freeshell.org>
2949 Paolo Bonzini <bonzini@gnu.org>
2950
2951 Support all Java parser class modifiers.
2952 * data/java.m4 (b4_percent_define_get3): New.
2953 (b4_final_if, b4_strictfp_if): New.
2954 * data/lalr1.java (final, strictfp, extends, implements): Support.
2955 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2956 documentation.
2957 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2958 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2959 (AT_CHECK_JAVA_GREP): New.
2960 (Java parser class modifiers): New test.
2961 (Java parser class extends and implements): New test.
2962
2963 Model exception propagation better with throws and lex_throws.
2964 * data/java.m4 (b4_list2): New.
2965 (throws): Change default.
2966 * data/lalr1.java (yyaction): Add throws.
2967 (parse): Add lex_throws in addition to throws.
2968 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2969 * tests/java.at (Java throws specifications): New test.
2970
2971 Improve documentation for Java parsers.
2972 * doc/bison.texinfo (Java Parsers): Add subsections.
2973 Don't quote first argument of %define.
2974 (Java Bison Interface): Document output files. Move documentation
2975 of parser class and merge into Java Parser Interface. Document
2976 features that error out. Document directives with no effect.
2977 Move note about Javadoc higher.
2978 (Java Semantic Values): Explicitly mention stype.
2979 Document that generic types cannot be used.
2980 (Java Location Values): Use @deftypeivar. Document constructors.
2981 Correct return value for toString.
2982 (Java Parser Interface): List undocumented constants/fields.
2983 Move documentation of fields added by %parse-param closer to list
2984 of members. Document that token names are added as fields.
2985 Document constructors accurately. Remove error method.
2986 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2987 Interface. Describe %code lexer and yylex accutately.
2988 Remove documentation that does not match the code.
2989 (Java Action Features): New.
2990 (Java Differences): Add reference. Add item on semantic values.
2991 Add note about @{ ... @}. Clarify %% epilogue placement.
2992 (Java Declarations Summary): New.
2993
2994 Fix Java skeleton.
2995 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2996 (b4_remove_comma): Quote test argument.
2997 (b4_identification): Remove "bison" field.
2998 * tests/java.at (Java parser class and package names): New test.
2999 (Java %parse-param and %lex-param): New test.
3000 (Java stype, position_class and location_class): New test.
3001
f259e4e6
PB
30022008-10-31 Di-an Jan <dianj@freeshell.org>
3003
3004 * data/lalr1.jave: Update copyright years.
3005 (YYParser): Correct name of "generated from" file in Javadoc:
3006 use b4_file_name instead of @ofile@.
3007 (Location constructor): Correct Javadoc parameter name.
3008 (yylloc): Add missing opening m4 quote after b4_location_if.
3009 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3010 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3011 (YYParser constructor): Correct Javadoc parameter name.
3012
cae5057f
JD
30132008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3014
3015 Always put auxiliary code files in the same dir as other output files.
3016 * src/files.c (compute_file_name_parts): When the user specifies
3017 --output but not --file-prefix, extract the directory prefix from the
3018 file prefix not from the grammar file name. This affects the location
3019 of files like location.hh generated by the C++ skeleton. The includes
3020 in the other output files require this fix.
3021 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3022 for expected output files.
3023 (Output files): Add a test for the above.
3024
4af432ba
JD
30252008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3026
3027 * gnulib: Update submodule to HEAD.
3028
e26d4e43
JD
30292008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3030
3031 Update copyright year.
3032 * src/files.c: Here.
3033
c0ee9e21
DJ
30342008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3035
3036 Don't overwrite the input file.
3037 * src/files.c (output_file_name_check): Fatal error if using input file
3038 for output.
3039 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3040 argument.
3041 (Conflicting output files): Add test.
3042
482dc52f
AD
30432008-10-28 Akim Demaille <demaille@gostai.com>
3044
3045 Space changes.
3046 * data/lalr1.cc: Formatting changes.
3047
52cbbe84
AD
30482008-10-28 Akim Demaille <demaille@gostai.com>
3049
3050 Don't define debugging functions when !YYDEBUG.
3051 * data/lalr1.cc (debug_stream, set_debug_stream)
3052 (debug_level_type, debug_level, set_debug_level): Don't
3053 declare them when YYDEBUG is not defined.
3054 The implementation are already YYDEBUG-aware.
3055
0925d5bf
AD
30562008-10-28 Akim Demaille <demaille@gostai.com>
3057
3058 Prefer "continue" for empty loop bodies.
3059 * etc/bench.pl.in: Use "continue" instead of {}.
3060
cf98343c
AD
30612008-10-28 Akim Demaille <demaille@gostai.com>
3062
3063 Space and comments changes.
3064 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3065 * data/c.m4, data/lalr1.cc: Space changes.
3066
9f467b7d
AD
30672008-10-28 Akim Demaille <demaille@gostai.com>
3068
3069 Make gnulib a submodule.
3070 * gnulib: New.
3071 * .gitmodules (gnulib): New.
3072
0f0e1ace
JD
30732008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3074
3075 Fix yyerror_range for user-defined location type in C++. Reported by
3076 Georg Sauthoff at
3077 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3078 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3079 * THANKS (Georg Sauthoff): Add.
3080
548e2104
JD
30812008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3082
3083 Update several administrative files mainly to facilitate releasing.
3084 * HACKING (Administrivia): Make the git-merge-changelog notes more
3085 helpful.
3086 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3087 (Release Procedure): Update for git and add numerous details that were
3088 previously missing.
3089 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3090 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3091 that announcements don't claim we bootstrapped with whatever bison
3092 happened to be in PATH. Add flex as a bootstrap tool.
3093 * Makefile.maint: Remove, previously replaced by maint.mk.
3094 * Makefile.cfg: Remove, and migrate settings to...
3095 * cfg.mk: ... here for the sake of `make announcement'.
3096 * bootstrap.conf (gnulib_modules): Add announce-gen.
3097 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3098 Berry.
3099
ddf17a6e
PB
31002008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3101
3102 Small but important bugfixes for the Java skeleton.
3103 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3104 (yy_symbol_print): Call toString on yyvaluep.
3105
e1145ad8
AD
31062008-08-29 Akim Demaille <demaille@gostai.com>
3107
3108 Clarify UPDATED use.
bee1df15 3109 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 3110 not to the release date of Bison.
bee1df15 3111 Reported by Joel E. Denny.
e1145ad8 3112
0df72d78
AD
31132008-08-29 Akim Demaille <demaille@gostai.com>
3114
3115 * README: Update FAQ pointer.
3116 Reported by Joel E. Denny.
3117
9a90b6bb
EB
31182008-08-27 Eric Blake <ebb9@byu.net>
3119
3120 Resync m4sugar from autoconf.
3121 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3122 (m4_init): Adjust to latest m4.git changes.
3123 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3124 effects.
3125 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3126 (_m4_list_cmp): Reduce side effects.
3127
65015668
AD
31282008-08-27 Akim Demaille <demaille@gostai.com>
3129
3130 Check yyerrok in calc.at.
bee1df15
EB
3131 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3132 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3133 expected.
65015668 3134
98e26a92
AD
31352008-08-27 Akim Demaille <demaille@gostai.com>
3136
3137 Support yyerrok in lalr1.cc.
3138 YYBACKUP is still to import back into lalr1.cc.
bee1df15 3139 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 3140
86c0e784
JD
31412008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3142
3143 For maintainer-check*, don't recompile for a $(VERSION) update.
3144 * cfg.mk: New file.
3145 (_is-dist-target): Override the one in GNUmakefile.
3146 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3147
88511166
JD
31482008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3149
3150 Update for recent change to gnulib.
3151 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3152 string.h now.
3153
6bbb2ed5
EB
31542008-08-15 Eric Blake <ebb9@byu.net>
3155
d67c52e8
EB
3156 Remaining m4sugar merge from autoconf.
3157 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3158 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3159 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3160 * src/output.c (output_skeleton): Tell m4 how to find it.
3161
6bbb2ed5
EB
3162 Partial m4sugar merge from autoconf: m4_map.
3163 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3164 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3165 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3166 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3167 for empty list.
3168 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3169 Likewise.
3170 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3171 declares it.
3172
8dce3875
JD
31732008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3174
3175 Keep .version and PACKAGE_VERSION in sync.
3176 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3177 dependency, and add comments justifying this in more detail. Discussed
3178 starting at
3179 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3180
882a1fbf
EB
31812008-08-06 Eric Blake <ebb9@byu.net>
3182
a3764451
EB
3183 Partial m4sugar merge from autoconf: m4_shiftn.
3184 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3185 (m4_shift2, m4_shift3): New macros.
3186 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3187 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3188 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3189 * data/java.m4 (b4_remove_comma): Likewise.
3190
882a1fbf
EB
3191 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3192 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3193 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3194 (m4_init): Consolidate wrapped text into single m4_wrap.
3195 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3196 in wrapped text.
3197
a30e920d
EB
31982008-08-05 Eric Blake <ebb9@byu.net>
3199
dfcc5959
EB
3200 Partial m4sugar merge from autoconf: builtins, version.m4.
3201 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3202 (m4_prepend): Remove, as it is unused and inherently quadratic,
3203 whereas m4_append is linear in newer m4.
3204 (m4_mkstemp): New builtin.
3205 (m4_symbols): Make rename conditional.
3206 (m4_version_prereq): Ensure fatal error if used in bison, which
3207 intentionally lacks version.m4.
3208
a30e920d
EB
3209 Fix comments in m4sugar.
3210 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3211
445b7470
JD
32122008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3213
3214 Update for recent .gitignore fix in Gnulib.
3215 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3216 anchored .gitignore entries.
3217
a1e50014
JD
32182008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3219
3220 Set gnu or gnits strictness.
3221 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3222 development and gnits strictness for releases. Based on Eric Blake's
3223 suggestion at
3224 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3225
d43f77e7
PB
32262008-07-31 Paolo Bonzini <bonzini@gnu.org>
3227
3228 * NEWS: Clarify documentation of %language.
3229
fee2ed87
PB
32302008-07-31 Paolo Bonzini <bonzini@gnu.org>
3231
3232 Support usage of git-merge-changelog.
3233 * .gitattributes: New.
3234 * HACKING: Document usage of git-merge-changelog.
3235 * bootstrap: Install git-merge-changelog entries in .git/config
3236 if appropriate.
3237
78029cd5
JD
32382008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3239
3240 Remove remaining dependence on CVS Id keyword.
3241 * ChangeLog: For the sake of people still using CVS, don't use dollars
3242 when mentioning Id.
3243 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3244 unusual anyway.
3245 * data/xslt/xml2dot.xsl: Likewise.
3246 * data/xslt/xml2text.xsl: Likewise.
3247 * data/xslt/xml2xhtml.xsl: Likewise.
3248 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3249 * doc/Makefile.am (neutralize): Remove, no longer needed.
3250 (.x.1): Don't use neutralize.
3251 (edit): Don't substitute for ID.
3252 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3253
c53d18b1
JD
32542008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3255
3256 Fix dependence on computed configure variables.
3257 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3258 $(top_srcdir)/configure.ac so that changes to computed variables, such
3259 as PACKAGE_VERSION, are seen.
3260 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3261
5523ac79
JD
32622008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3263
3264 Update copyright dates for recent changes.
3265 * Makefile.am: Here.
3266 * src/Makefile.am: Here.
3267 * src/reduce.c: Here.
3268 * tests/reduce.at: Here.
3269
8fa36911
JD
32702008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3271
3272 Use git-version-gen for version names between releases.
3273 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3274 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3275 * .prev-version: New.
3276 * .version.in: Remove.
78029cd5 3277 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
3278 revision.
3279 * GNUmakefile: Remove, now copied from Gnulib.
3280 * Makefile.am: Add code suggested by comments in
3281 build-aux/git-version-gen.
3282 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3283 .prev-version, and .version.
3284 * NEWS (2.3b+): Rename to...
3285 (?.?): ... this because we're dropping the "+" version naming scheme,
3286 but, in general, we still can't be sure of our next release name.
3287 * bootstrap: Add a quick hack to remove from .gitignore the
3288 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3289 entry. This should really be fixed in gnulib instead.
3290 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3291 * configure.ac (AC_INIT): Set version name by invoking
3292 build-aux/git-version-gen.
3293 (AC_CONFIG_FILES): Remove .version, now generated by
3294 build-aux/git-version-gen.
3295 * maint.mk: New, copied from coreutils.
3296 * doc/.cvsignore (bison.1): Add.
3297 * doc/.gitignore (/bison.1): Add.
3298 * doc/bison.1: Remove, generated.
3299 * src/.cvsignore (revision.c): Remove.
3300 * src/.gitignore (/revision.c): Remove.
3301 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3302 (BUILT_SOURCES): Remove revision.c.
3303 (revision.c): Remove.
3304 * src/getargs.c (version): Don't print revision after the VERSION.
3305 * src/revision.h: Remove.
3306
bcf07cb7
JD
33072008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3308
3309 Fix untranslatable composition of sentences. Reported by Goran
3310 Uddeborg at
3311 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3312 * THANKS (Goran Uddeborg): Add.
3313 * src/reduce.c (reduce_print): Report the number of nonterminals and
3314 rules useless in the grammar in separate sentences.
3315 * tests/reduce.at (Useless Rules): Update output.
3316 (Reduced Automaton): Likewise.
3317 (Underivable Rules): Likewise.
3318 (Empty Language): Likewise.
3319
9aacab9a
JD
33202008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3321
3322 Fix some .gitignore and .cvsignore problems.
3323 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3324 (insert_vc_ignore): ... this new function, which prepends `/' to all
3325 .gitignore entries before passing them to insert_sorted_if_absent.
3326 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3327 .cvsignore files are maintained even though Bison developers run
3328 bootstrap while using Git.
3329 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3330 unneeded by Bison.
3331 (gnulib): Add.
3332 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3333 unneeded. Reported by Eric Blake.
3334 * lib/.gitignore (/*~): Add.
3335 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3336 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3337 Blake.
3338 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3339
a9fc7990
JD
33402008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3341
3342 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3343 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3344 * bootstrap.conf (gnulib_modules): Add unsetenv.
3345 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3346 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3347 (/setenv.m4): Add.
3348 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3349 the first argument because it may become position-dependent, and unset
3350 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3351 Add comments explaining these issues in more detail.
3352
0f1d6f10
JD
33532008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3354
3355 Add .gitignore everywhere based on .cvsignore.
3356 * .gitignore: New.
3357 * build-aux/.gitignore: New.
3358 * data/.gitignore: New.
3359 * doc/.gitignore: New.
3360 * etc/.gitignore: New.
3361 * examples/.gitignore: New.
3362 * examples/calc++/.gitignore: New.
3363 * lib/.gitignore: New.
3364 * m4/.gitignore: New.
3365 * po/.gitignore: New.
3366 * runtime-po/.gitignore: New.
3367 * src/.gitignore: New.
3368 * tests/.gitignore: New.
3369
7bd1665a
JD
33702008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3371
3372 * NEWS (2.3b+): New section, empty for now.
3373 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3374
72c5b982
JD
33752008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3376
3377 * NEWS (2.3b): Update release date since there has been a delay in
3378 getting the announcements and tarballs out.
3379
bd02cd5d
JD
33802008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3381
3382 * NEWS: Version 2.3b.
3383 * configure.ac (AC_INIT): Likewise.
3384 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3385
9126263e
JD
33862008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3387
3388 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3389 been doing it for years.
3390 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3391 (Release Procedure): Add FIXME about make alpha being unmaintained.
3392
fa6aa7b3
JD
33932008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3394
3395 * data/yacc.c: Reformat m4 a little for readability.
3396 * src/lalr.c (build_relations): Correct comment.
3397
d30b312d
JMG
33982008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3399
3400 DJGPP specific issue.
3401 * djgpp/config.sed: Fixes required to run configure scripts generated
3402 by autoconf 2.62.
3403
138d4cd9
JD
34042008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3405
3406 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3407 coordinator@translationproject.org.
3408
8f7e2e1f
JD
34092008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3410
3411 * THANKS: Add Eric Blake.
3412
f55efa38
JD
34132008-04-23 Eric Blake <ebb9@byu.net>
3414
3415 Revert prior patch, by working around autoconf regression.
3416 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3417 ("Output file name: ("): Uncomment test.
3418 ("Output file name: )"): Likewise.
3419 Based on an idea from Noah Misch.
3420
096c9f9d
JD
34212008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3422
3423 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3424 2.61. Reported by Juan Manuel Guerrero at
3425 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3426 * tests/output.at ("Output file name: ("): Comment out test case for
3427 now.
3428 ("Output file name: )"): Likewise.
3429
0f664b89
JD
34302008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3431
3432 * GNUmakefile: Update git-version-gen invocation so make dist
3433 succeeds.
3434
1cfe6375
JD
34352008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3436
3437 Update to the current gnulib CVS repository, and fix trigraph handling
3438 in Bison.
3439 * bootstrap: Update gnulib CVS repository URL.
3440 (symlink_to_dir): Encapsulate the code that guarantees the destination
3441 directory exists into...
3442 (check_dst_dir): ... this new function, and...
3443 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3444 fail when copying files into lib/uniwidth/.
3445 * src/output.c (prepare_symbols): When writing yytname muscles, where
3446 symbol names will be encoded in C-string literals, tell quotearg to
3447 escape trigraphs. This used to be the default in gnulib.
3448 * tests/regression.at (Token definitions): Because of the change in
3449 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3450 escapes trigraphs in symbol names. Thus, yytname no longer has
3451 trigraphs unnecessarily doubly escaped. Update test case output.
3452 Extend test case to be sure Bison's own error messages will no longer
3453 have trigraphs in symbol names unnecessarily escaped once.
3454
74c52fc8
JD
34552008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3456
3457 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3458 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3459 * .cvsignore: Add .version.
3460 * .version.in: New.
3461 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3462 * configure.ac (AC_CONFIG_FILES): Add .version.
3463 * build-aux/.cvsignore: Add git-version-gen.
3464
8e55b3aa
JD
34652008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3466
3467 * NEWS (2.3a+): Mention that -g now takes an argument.
3468 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3469 consistency. Update the -g and -x entries now that they take
3470 arguments. Use brackets to indicate optional arguments.
3471 * src/getargs.c (usage): Explain the relationship between arguments of
3472 long and short options more completely. Document --defines and -d
3473 separately since the former takes an argument but, for POSIX Yacc, the
3474 latter does not.
3475 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 3476 (getargs): Sort cases.
8e55b3aa 3477
59c5ac72
AD
34782008-02-28 Akim Demaille <demaille@gostai.com>
3479
3480 * doc/bison.texinfo: Fix a few typos.
3481
118d4978
AD
34822008-02-28 Akim Demaille <akim@epita.fr>
3483
3484 * doc/bison.texinfo (Bison Options): Document -W.
3485 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3486
7020f1e9
AD
34872008-02-28 Akim Demaille <akim@epita.fr>
3488
3489 * src/getargs.c (short_options): Split and sort for readability.
3490 -g and -x take optional arguments, just like their long options.
3491 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3492 understand.
3493 Fix the handling of $opt which resulted in all the argument to be
3494 considered as optional.
3495
59da312b
JD
34962008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3497
3498 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3499 say its interface is experimental.
3500 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3501 Java.
3502 (Bison Options): In the -L and --language entry, mention Java.
3503 (Java Bison Interface): Say the interface is experimental.
3504 * src/getargs.c (usage): Mention -L and --language.
3505
3506 * NEWS (2.3a+): Say the push parsing interface is experimental.
3507 * doc/bison.texinfo (Push Decl): Likewise.
3508 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3509 (Push Parser Function): Likewise.
3510 (Pull Parser Function): Likewise.
3511 (Parser Create Function): Likewise.
3512 (Parser Delete Function): Likewise.
3513 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3514 yypull_parse, and yypush_parse entries.
3515
3516 * NEWS (2.3a+): Mention XML support, and say the schema is
3517 experimental.
3518 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3519 * src/getargs.c (usage): Say the XML schema is experimental.
3520
3521 * NEWS (2.3a+): Say option instead of flag.
3522
2bb3ebec
WP
35232008-02-21 Wojciech Polak <polak@gnu.org>
3524
3525 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3526 text.
3527
333e670c
JD
35282008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3529
3530 Fix impure push parser compile error reported by Bob Rossi at
3531 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3532 * data/yacc.c: Clean up whitespace in the output a little.
3533 (yypstate_allocated): Define for impure push parsers regardless of
3534 whether the pull interface is also requested.
3535 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3536 check impure push parsers without the pull interface.
3537
3538 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3539 yyerror takes arguments specified by %parse-param while yypstate_new
3540 does not.
3541 * doc/bison.texinfo (Parser Create Function): Document that
3542 yypstate_new returns 0 for multiple impure parser instances.
3543 * tests/push.at (Push Parsing: Multiple impure instances): Update
3544 expected stderr output.
3545
798096e1
JD
35462008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3547
3548 * runtime-po/POTFILES.in (push.c): Remove.
3549
9ca7f077
JD
35502008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3551
3552 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3553 * data/push.c: Rename to...
3554 * data/yacc.c: ... this, overwriting it.
3555 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3556 `%push-pull-parser' -> `%define api.push_pull "both"'.
3557 Remove old yacc.c tests, and update push.c tests to yacc.c.
3558
42ee26bb
JD
35592008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3560
3561 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3562 `"%code top" blocks' instead of `%code "top" blocks'.
3563 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3564 Clean up whitespace in the output a little.
3565
b1cc23c4
JD
35662008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3567
3568 Fix documentation problems reported by Tim Josling at
3569 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3570 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3571 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3572 integers. Explain the effect of literal string aliases on error
3573 messages. Copy token 0 documentation from the C++ skeleton
3574 documentation.
3575
ab7f29f8
JD
35762008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3577
3578 Accept a token number in a %left, %right, or %nonassoc for POSIX
3579 conformance. Reported by Tim Josling at
3580 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3581 * NEWS (2.3a+): Mention.
3582 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3583 and code numbers are treated by precedence declarations.
3584 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3585 of symbols.1.
3586 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3587 of symbol.
3588 (symbol.prec): New, just like symbol but allows INT.
3589 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3590 longer holds.
3591 * tests/regression.at (Token number in precedence declaration): New
3592 test case.
3593
a924ef36
JMG
35942008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3595
3596 DJGPP specific issues.
3597 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3598 be changed. Copyright timestamp adjusted.
3599 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3600 be changed. Copyright timestamp adjusted.
3601 * djgpp/config.site: Copyright timestamp adjusted.
3602 * djgpp/config_h.sed: Copyright timestamp adjusted.
3603 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3604 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3605 filename translation list.
3606 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3607 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3608 files shall be created. Before trying to use the temp dir where the
3609 environment variable points to check that the dir really exists. If
3610 not default to the cwd as temp dir. Copyright timestamp adjusted.
3611 * djgpp/subpipe.h: Copyright timestamp adjusted.
3612 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3613
389c8cfd
PE
36142008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3615
3616 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3617
5d1cfef4
PE
36182008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3619
3620 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3621 Problem reported by Claudio Saavedra in
3622 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3623
e2dcf996
WP
36242008-01-05 Wojciech Polak <polak@gnu.org>
3625
3626 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3627 document's title with the input grammar file name.
3628
da730230
JD
36292007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3630
3631 Automate regression testing of the XML/XSLT implementation. Discussed
3632 starting at
3633 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3634 * configure.ac (XSLTPROC): New substitution.
3635 * Makefile.am (maintainer-xml-check): New phony target invoking...
3636 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3637 invoking make maintainer-check with BISON_TEST_XML=1.
3638 * tests/atlocal.in (XSLTPROC): New.
3639 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3640 not to report reachable memory when Bison is expected to have a
3641 non-zero exit status and (2) to compare XML/XSLT output with --graph
3642 and --report=all output for every working grammar when
3643 BISON_TEST_XML=1.
3644 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3645 (AT_BISON_CHECK_XML): New.
3646 (AT_QUELL_VALGRIND): New.
3647 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3648 (AT_CHECK): ... don't redefine this since this was the old way to
3649 quell Valgrind.
3650 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3651 AT_BISON_CHECK invocations.
3652 * tests/c++.at: Likewise.
3653 * tests/calc.at: Likewise.
3654 * tests/conflicts.at: Likewise.
3655 * tests/cxx-type.at: Likewise.
3656 * tests/existing.at: Likewise.
3657 * tests/glr-regression.at: Likewise.
3658 * tests/headers.at: Likewise.
3659 * tests/input.at: Likewise.
3660 * tests/java.at: Likewise.
3661 * tests/output.at: Likewise.
3662 * tests/push.at: Likewise.
3663 * tests/reduce.at: Likewise.
3664 * tests/regression.at: Likewise.
3665 * tests/sets.at: Likewise.
3666 * tests/skeletons.at: Likewise.
3667 * tests/synclines.at: Likewise.
3668 * tests/torture.at: Likewise.
3669 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3670 tends to hang xsltproc.
3671 (Big horizontal): Likewise.
3672
408476bc
JD
36732007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3674
3675 In XML output, remove redundant class attribute on symbol element.
3676 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3677 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3678 look up a symbol to determine whether it's a nonterminal or terminal.
3679 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3680 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3681
3682 Add prec/assoc information to XML output.
3683 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3684 %prec, add a percent_prec attribute.
3685 * src/print-xml.c (print_grammar): For each terminal that has a
3686 precedence or associativity, add a prec or assoc attribute.
3687 (xml_indent): New.
3688 (xml_puts): Use xml_indent.
3689 (xml_printf): Use xml_indent.
3690 * src/print-xml.h (xml_indent): Prototype.
3691
3692 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3693 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3694
d4a26c48
JD
36952007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3696
3697 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3698 (bison:ruleByNumber): ... this for clarity.
3699 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3700 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3701 (xsl:template match="reduction"): Update.
3702 (xsl:template match="item"): Update.
3703 (xsl:template match="reduction"): Update.
3704
3705 In the XML output, don't print the list of rules where symbols appear.
3706 Compute it in XSLT instead. Discussed at
3707 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3708 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3709 (bison:ruleByRhs): New.
3710 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3711 bison:ruleByRhs.
3712 (xsl:template match="terminal/rule"): Remove.
3713 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3714 bison:ruleByRhs.
3715 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3716 Remove.
3717 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3718 bison:ruleByRhs and mode="number-link" for rule template.
3719 (xsl:template match="terminal/rule"): Remove.
3720 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3721 bison:ruleByRhs and mode="number-link" for rule template.
3722 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3723 Rewrite as...
3724 (xsl:template match="rule" mode="number-link"): ... this.
3725 * src/print-xml.c (print_grammar): Don't print the list of rules.
3726
ef1b4273
JD
37272007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3728
3729 Don't let --report affect XML output; always print all information.
3730 Discussed at
3731 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3732 * src/conflicts.c (log_resolution): Implement.
3733 * src/print-xml.c (print_core): Implement.
3734 (print_state): Implement.
3735 (print_xml): Implement.
3736
3737 * NEWS (2.3a+): Fix quotes.
3738 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3739 don't let %verbose clear the list specified by --report.
3740
0f6cd9e3
AD
37412007-11-26 Akim Demaille <akim@epita.fr>
3742
3743 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3744
d80fb37a
JD
37452007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3746
3747 In the XML output, list useless and unused symbols and rules with the
3748 useful ones and add a "usefulness" attribute. Discussed starting at
3749 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3750 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3751 (grammar_rules_print_xml): Print all rules instead of just those
3752 useful in the grammar, and add a "usefulness" attribute.
3753 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3754 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3755 (print_grammar): Print all nonterminals instead of just useful ones,
3756 and add a "usefulness" attribute to nonterminals and terminals.
3757 (print_xml): Don't print a separate "reductions" or
3758 "rules-useless-in-parser" element.
3759 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3760 (reduce_xml): Remove.
3761 (reduce_token_unused_in_grammar): New.
3762 (reduce_nonterminal_useless_in_grammar): New.
3763 * src/reduce.h (reduce_xml): Remove prototype.
3764 (reduce_token_unused_in_grammar): Add prototype.
3765 (reduce_nonterminal_useless_in_grammar): Add prototype.
3766 * data/xslt/xml2text.xsl: Update for XML changes.
3767 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3768 * tests/reduce.at (Useless Terminals): Update output.
3769 (Useless Rules): Update output.
3770 (Reduced Automaton): Update output.
3771
3772 Say "Terminals unused in grammar" instead of "Unused terminals".
3773 * NEWS (2.3a+): Update.
3774 * doc/bison.texinfo (Understanding): Update example output.
3775 * src/reduce.c (reduce_output): Implement.
3776 * data/xslt/xml2text.xsl: Implement.
3777 * data/xslt/xml2xhtml.xsl: Implement.
3778
1bb2bd75
JD
37792007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3780
3781 Accept --report-file=FILE to override the default `.output' filename.
3782 * NEWS (2.3a+): Mention.
3783 * doc/bison.texinfo (Bison Options): Add an entry.
3784 * src/files.c (compute_output_file_names): Don't override
3785 spec_verbose_file if already set.
3786 * src/getargs.c (usage): Document --report-file.
3787 (REPORT_FILE_OPTION): New anonymous enum member.
3788 (long_options): Add entry for it.
3789 (getargs): Add case for it setting spec_verbose_file.
3790
3791 * build-aux/cross-options.pl: Don't record a short option just because
3792 there's an arg.
3793 * doc/.cvsignore: Add yacc.1.
3794
a005a9c4
AD
37952007-11-14 Akim Demaille <akim@epita.fr>
3796
3797 * doc/yacc.1.in: New.
3798 * configure.ac, doc/Makefile.am: Adjust.
3799 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3800 config.h symbol.
3801 Use AC_SUBST for assignments too.
3802 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3803
cff03fb2
JD
38042007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3805
3806 * src/gram.c: Remove comments that duplicate comments in gram.h.
3807
3808 When reporting useless rules and nonterminals, say "useless in grammar"
3809 instead of "useless", and say "useless in parser" instead of "never
3810 reduced". Discussed starting at
3811 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3812 * NEWS (2.3a+): Mention this change.
3813 * data/xslt/xml2text.xsl: Update output text and expected input XML
3814 element names to match changes below.
3815 * data/xslt/xml2xhtml.xsl: Likewise.
3816 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3817 Contents: "Rules useless in parser due to conflicts".
3818 * doc/bison.texinfo (Decl Summary): Reword a little.
3819 (Understanding): Update example output for changes below.
3820 * src/gram.c: (rule_useful_p): Rename to...
3821 (rule_useful_in_grammar_p): ... this.
3822 (rule_useless_p): Rename to...
3823 (rule_useless_in_grammar_p): ... this.
3824 (rule_never_reduced_p): Rename to...
3825 (rule_useless_in_parser_p): ... this.
3826 (grammar_rules_print): Update for renames.
3827 (grammar_rules_print_xml): Update for renames.
3828 (grammar_rules_never_reduced_report): Rename to...
3829 (grammar_rules_useless_report): ... this since it is used for either
3830 kind of useless rule.
3831 * src/gram.h: Reword comments and update function names in prototypes.
3832 * src/main.c (main): Say "rule useless in parser due to conflicts".
3833 * src/print-xml.c (print_rules_never_reduced): Rename to...
3834 (print_rules_useless_in_parser): ... this, and rename output XML
3835 element "rules-never-reduced" to "rules-useless-in-parser".
3836 (print_xml): Update for rename.
3837 * src/print.c (print_results): Say "Rules useless in parser due to
3838 conflicts".
3839 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3840 (nonterminals_reduce): Say "nonterminal useless in grammar".
3841 (reduce_output): Say "Nonterminals useless in grammar".
3842 Say "Rules useless in grammar".
3843 (reduce_xml): Rename output XML element "useless" to
3844 "useless-in-grammar".
3845 (reduce_print): Don't report the count of grammatically useless rules
3846 as "rules never reduced" just because %yacc is specified.
3847 In the correct report of this count, say nonterminal(s) and rule(s)
3848 "useless in grammar".
3849 * tests/conflicts.at (S/R in initial): Update expected output.
3850 (Defaulted Conflicted Reduction): Likewise.
3851 (Unreachable States After Conflict Resolution): Likewise.
3852 * tests/existing.at (GNU pic Grammar): Likewise.
3853 * tests/reduce.at (Useless Nonterminals): Likewise.
3854 (Useless Rules): Likewise.
3855 (Reduced Automaton): Likewise.
3856 (Underivable Rules): Likewise.
3857 (Empty Language): Likewise.
3858
66f0441d
JD
38592007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3860
3861 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3862 here document and before the EOF so that BSD's implementation of Bourne
3863 shell doesn't parse the delimiter as part of the here document.
3864 * doc/.cvsignore: Add cross-options.texi.
3865 * src/getargs.c (usage): Add a blank line after the warning categories.
3866
d0ee4105
PB
38672007-11-08 Paolo Bonzini <bonzini@gnu.org>
3868
3869 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3870
e8b1fb9b
AD
38712007-11-05 Akim Demaille <akim@epita.fr>
3872
3873 Remove Id: from bison.1.
3874 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3875 (perl -0777 -pi -e 's/\.PP\nId): New.
3876 (.x.1): Use it to ignore the version control revision.
3877
2f7a96b5
AD
38782007-11-05 Akim Demaille <demaille@gostai.com>
3879
3880 * build-aux/Makefile.am: Ship cross-options.pl.
3881 * doc/Makefile.am: Always refer to cross-options.texi with
3882 $(srcdir).
3883 (MAINTAINERCLEANFILES): Add it.
3884
f4101aa6
AD
38852007-11-04 Akim Demaille <demaille@gostai.com>
3886
3887 Generate the long/short option cross-table.
3888 * build-aux/cross-options.pl: New.
3889 * doc/Makefile.am (cross-options.texi): New.
3890 * doc/bison.texinfo: Use it.
3891
727a1401
AD
38922007-11-04 Akim Demaille <demaille@gostai.com>
3893
3894 Generate bison.1 using help2man.
3895 * doc/common.x, doc/bison.x: New.
3896 * doc/Makefile.am (bison.1, .x.1): New.
3897 The code is taken from autoconf-2.61/man/Makefile.am.
3898 * configure.ac: Look for help2man.
3899
6aeb9c57
AD
39002007-11-04 Akim Demaille <demaille@gostai.com>
3901
3902 Complete --help.
3903 * src/getargs.c (usage): Document -W, make it clear that -d,
3904 -g and -x have optional arguments.
3905
d7be4085
AD
39062007-11-04 Akim Demaille <demaille@gostai.com>
3907
3908 Find sha1sum when named gsha1sum.
3909 * bootstrap (find_tool): New.
3910 ($SHA1SUM): New.
3911
d9df47b6
JD
39122007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3913
3914 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3915 at
3916 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3917 * NEWS (2.3a+): Mention.
3918 * data/bison.m4 (b4_pure_if): Don't define it here.
3919 * data/c.m4 (b4_identification): Depend on individual skeletons to
3920 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3921 values of the %define variables api.pure or api.push_pull. Define
3922 YYPURE, YYPUSH, and YYPULL accordingly.
3923 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3924 glr.cc has already defined b4_pure_flag.
3925 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3926 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 3927 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
3928 * doc/bison.texinfo (Pure Decl): Update.
3929 (Push Decl): Update.
3930 (Decl Summary): Add api.pure to %define entry.
3931 In %pure-parser entry, say it's deprecated and reference %define.
3932 (Pure Calling): Update.
3933 (Error Reporting): Update.
3934 (C++ Scanner Interface): Update.
3935 (How Can I Reset the Parser): Update.
3936 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3937 reference %define.
3938 * src/getargs.c (pure_parser): Remove global variable.
3939 * src/getargs.h (pure_parser): Remove extern.
3940 * src/output.c (prepare): Don't define pure_flag muscle.
3941 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3942 wrapper around `%define api.pure'.
3943 * tests/calc.at (Simple LALR Calculator): Update.
3944 (Simple GLR Calculator): Update.
3945 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3946 Update.
3947 (GLR: Resolve ambiguity, pure, locations): Update.
3948 (GLR: Merge conflicting parses, pure, no locations): Update.
3949 (GLR: Merge conflicting parses, pure, locations): Update.
3950 * tests/glr-regression.at (Uninitialized location when reporting
3951 ambiguity): Update
3952 * tests/input.at (Unused %define api.pure): New test case.
3953 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3954 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3955 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3956
c373bf8b
JD
39572007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3958
3959 %define push_pull -> %define api.push_pull. Discussed starting at
3960 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3961 * data/push.c: Expect the new name.
3962 * data/yacc.c: Likewise.
3963 * doc/bison.texinfo (Push Decl): Update.
3964 (Decl Summary): Update %define entry.
3965 (Push Parser Function): Update.
3966 (Pull Parser Function): Update.
3967 (Parser Create Function): Update.
3968 (Parser Delete Function): Update.
3969 * tests/calc.at (Simple LALR Calculator): Update.
3970 * tests/input.at (%define enum variables): Update.
3971 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3972 (Push Parsing: Multiple impure instances): Update.
3973 (Push Parsing: Unsupported Skeletons): Update.
3974 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3975 (Exploding the Stack Size with Malloc): Update.
3976
3977 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3978 other entries some.
3979
32f19b6b
JD
39802007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3981
3982 For the XML output's terminal element, rename @number to @token-number,
3983 and add @symbol-number. In the nonterminal element, rename @number to
3984 @symbol-number. Discussed starting at
3985 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3986 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3987 renames.
3988 (xsl:template match="nonterminal"): Likewise.
3989 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3990 (xsl:template match="nonterminal"): Likewise.
3991 * src/print-xml.c (print_grammar): Implement.
3992
255a6b90
JD
39932007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3994
3995 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3996 2007-10-11 change, the child elements here are items not rules.
408476bc 3997 (xsl:template match="item"): New.
255a6b90
JD
3998 (xsl:template match="rule"): Update for new reduced itemset.
3999 (xsl:template match="point"): Remove.
4000 (xsl:template match="empty"): For consistency with --graph, don't
4001 output "/* empty */".
4002 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4003 line-wrap, don't pass a negative value as first-line-length since this
4004 won't work with the following changes.
4005 (xsl:template name="line-wrap"): Simplify slightly.
4006 (xsl:template name="ws-search"): Eliminate recursion.
4007 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4008 set next to an item whose dot is not at the end of the RHS even if it
4009 happens to be associated with the same rule.
4010
88c78747
JD
40112007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4012
31984206
JD
4013 Add %define lr.keep_unreachable_states.
4014 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4015 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4016 * src/main.c (main): Implement it.
4017 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4018 Extend to test it, and fix a typo.
4019
40202007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4021
4022 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
4023 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4024 the example .output text.
4025 * tests/regression.at (Extra lookahead sets in report): Improve wording
4026 of comments.
4027
b7a70162
WP
40282007-10-17 Wojciech Polak <polak@gnu.org>
4029
4030 * src/print-xml.c (print_grammar): Renamed
4031 <terminal> and <nonterminal> attributes:
4032 "type" to "number" and "symbol" to "name".
4033 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4034 Use new attribute names.
4035 (xsl:template match="nonterminal"): Likewise.
4036 * data/xslt/xml2xhtml.xsl: Likewise.
4037
a0de5091
JD
40382007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4039
4040 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4041 (Option Cross Key): Likewise.
4042
4043 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4044 next to an item whose dot is not at the end of the RHS even if it
4045 happens to be associated with the same rule.
4046 * src/print.c (print_core): Likewise.
4047 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4048 (Resolved SR Conflicts): Update output.
4049 * tests/regression.at (Extra lookahead sets in report): New test case.
4050
4c20d18d
WP
40512007-10-11 Wojciech Polak <polak@gnu.org>
4052
4053 * src/print-xml.c (print_core): Remove item set
4054 redundancy.
4055 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4056 Improve processing time. Suggested by Joel E. Denny.
4057 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4058 Write xsl:param "required" attribute as comment.
4059 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4060 (xsl:template match="rule"): Support new reduced itemset.
4061 (xsl:template match="point"): Remove.
4062 * data/xslt/xml2xhtml.xsl: Likewise.
4063
f506ad1c
JD
40642007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4065
4066 * src/getargs.c (version): Update copyright year.
4067
21f1b063
JD
40682007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4069
4070 Make xml2dot.xsl and --graph produce the same output.
4071 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4072 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4073 escaped later.
4074 (xsl:template name="output-node"): Use the new escape template instead
4075 of the string-replace template directly.
4076 (xsl:template name="output-edge"): Likewise.
4077 (xsl:template name="escape"): New, escapes backslashes and newlines in
4078 addition to quotation marks.
4079 * src/graphviz.c (start_graph, output_node, output_edge): Add
4080 whitespace to output for legibility.
4081
4082 Make xml2text.xsl and --report produce the same output, and remove the
4083 XML "conflicts" element since a conflict summary is easily extracted
4084 from the automaton.
4085 * data/xslt/bison.xsl: New.
4086 (xsl:template match="state" mode="bison:count-conflicts): New.
4087 * data/xslt/xml2text.xsl: Import bison.xsl.
4088 (xsl:template match="bison-xml-report"): Instead of styling the
4089 "conflicts" element, style the "automaton" element with mode
4090 "conflicts". Unlike the former, the latter lists S/R and R/R
4091 conflicts for a state on the same line.
4092 (xsl:template match="conflicts"): Remove.
4093 (xsl:template match="conflict"): Remove.
4094 (xsl:template match="terminal"): Line-wrap the list of rules in which
4095 the terminal is used.
4096 (xsl:template match="nonterminal"): Likewise for nonterminals.
4097 (xsl:template match="automaton" mode="conflicts"): New.
4098 (xsl:template match="state" mode="conflicts"): New.
4099 (xsl:template name="line-wrap"): New.
4100 (xsl:template name="ws-search"): New.
4101 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4102 (xsl:template match="bison-xml-report"): Instead of styling the
4103 "conflicts" element, style the "automaton" element with mode
4104 "conflicts."
4105 (xsl:template match="conflicts"): Remove.
4106 (xsl:template match="conflict"): Remove.
4107 (xsl:template match="automaton" mode="conflicts"): New.
4108 (xsl:template match="state" mode="conflicts): New.
4109 * src/conflicts.c (conflicts_output_xml): Remove.
4110 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4111 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4112 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4113 the corresponding XSLT is easier. Also, never wrap between a word and
4114 the comma that follows it.
4115
793fbca5
JD
41162007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4117
4118 Improve C++ namespace support. Discussed starting at
4119 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4120 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4121 b4_namespace_close): New macros that interpret the %define variable
4122 "namespace" so its value can contain "::" to indicate nested
4123 namespaces.
4124 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4125 the above macros.
4126 * data/lalr1.cc (b4_namespace): Likewise.
4127 * data/location.cc (b4_namespace): Likewise.
4128 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4129 inside a new table in the general %define entry. Document `%define
4130 namespace' there as well. Point the %name-prefix entry to it since it
4131 explains it more completely in the case of C++.
4132 (C++ Bison Interface): Mention `%define namespace' instead of
4133 %name-prefix.
4134 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4135 entry suffices.
4136 * tests/c++.at (Relative namespace references): New test case.
4137 (Absolute namespace references): New test case.
4138 (Syntactically invalid namespace references): New test case.
4139 * tests/input.at (C++ namespace reference errors): New test case.
4140
35b8730d
JD
41412007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4142
4143 Add syncline support and location accessor to internal %define
4144 interfaces.
4145 * data/bison.m4 (b4_percent_define_get_loc): New.
4146 (b4_percent_define_get_syncline): New.
4147 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4148 (b4_percent_define_default): Record defining location as line 1 rather
4149 than 0 for the sake of synchronizing #line's, and define
4150 b4_percent_define_syncline(VARIABLE).
4151 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4152 * src/muscle_tab.c (muscle_syncline_grow): New.
4153 (muscle_code_grow): Use muscle_syncline_grow.
4154 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4155 define b4_percent_define_syncline(VARIABLE).
4156 (muscle_percent_define_get_loc): New.
4157 (muscle_percent_define_get_syncline): New.
4158 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4159 remove some unused variables.
4160 (muscle_percent_define_default): Record defining location as line 1
4161 rather than 0 for the sake of synchronizing #line's, and define
4162 b4_percent_define_syncline(VARIABLE).
4163 (muscle_percent_define_check_values): Use
4164 muscle_percent_define_get_loc.
4165 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4166 (muscle_percent_define_get_syncline): Prototype.
4167 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4168 defaults): Update output for location change.
4169 (Complaining during macro argument expansion): Extend to test
4170 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4171
7dc4a694
JD
41722007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4173
4174 Fix some error-reporting macro bugs.
4175 * data/bison.m4 (b4_cat): New.
4176 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4177 to stdout so they don't become arguments to other macros. Update
4178 comments and add examples.
4179 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4180 add examples.
4181 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4182 after printing the error directive so that M4 doesn't report subsequent
4183 problems that are induced by this problem.
4184 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4185 instead of just in them. Recognize @\n in both places. Both expand to
4186 the empty string. Needed by b4_cat.
4187 * tests/skeletons.at (Complaining during macro argument expansion):
4188 New test case.
4189 (Fatal errors make M4 exit immediately): New test case.
4190
d4bd2295
JD
41912007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4192
4193 Implement --print-datadir.
4194 * src/getargs.c (usage): Mention.
4195 (PRINT_DATADIR_OPTION): New anonymous enum member.
4196 (long_options): Add entry for it.
4197 (getargs): Add case for it calling compute_pkgdatadir.
4198 * src/output.c (output_skeleton): Encapsulate data directory
4199 computation from here...
4200 (prepare): ... and from here...
4201 (compute_pkgdatadir): ... into this new function.
4202 * src/output.h (compute_pkgdatadir): Prototype.
4203
34cdeddf
JD
42042007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4205
4206 * src/print-xml.c (escape_bufs): New static global variable
4207 replacing...
4208 (xml_escape_n): ... the static local variable buf here.
4209 (print_xml): Free memory for escape_bufs.
4210 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4211
d782395d
JD
42122007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4213
4214 Replace `%push-parser' and `%push-pull-parser' with
4215 `%define push_pull "push"' and `%define push_pull "both"'.
4216 `%define push_pull "pull"' is the default.
4217 * doc/bison.texinfo (Push Decl, Push Parser Function,
4218 Pull Parser Function, Parser Create Function, Parser Delete Function):
4219 Update declarations.
4220 (Decl Summary, Table of Symbols): Replace %push-parser and
4221 %push-pull-parser entries with a %define push_pull entry.
4222 * data/bison.m4 (b4_percent_define_check_values): New macro.
4223 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4224 definitions...
4225 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4226 definitions...
4227 * data/push.c: ... to here and compute them from the value of the
4228 %define variable push_pull.
4229 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4230 parsing requests here...
4231 * data/yacc.c: ... hack this to switch to push.c any time
4232 b4_use_push_pull_flag or the %define variable push_pull is set. This
4233 will go away when we mv push.c yacc.c.
4234 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4235 push parsing is not supported since unused %define variables are
4236 reported anyway.
4237 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4238 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4239 comments for consistency with b4_percent_define_check_values.
4240 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4241 muscles.
4242 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4243 Remove.
4244 (prologue_declaration): Remove %push-parser and %push-pull-parser
4245 rules.
4246 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4247 * tests/calc.at: Update declarations.
4248 * tests/input.at (%define enum variables): New test case.
4249 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4250 declaration.
4251 (Push Parsing: Multiple impure instances): Update declaration.
4252 (Push Parsing: Unsupported Skeletons): New test case.
4253 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4254 declaration.
4255 (Exploding the Stack Size with Malloc): Update declaration.
4256
3f999f78
WP
42572007-09-24 Wojciech Polak <polak@gnu.org>
4258
4259 Add XSLT transformations.
4260
4261 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4262 * data/xslt/xml2text.xsl: Transform XML into plain text.
4263 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4264 * data/Makefile.am (xsltdir): New variable.
4265 (dist_xslt_DATA): Add xslt/*.xsl files.
4266
a4f75309
PE
42672007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4268
4269 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4270 Problem reported by Wojciech Polak.
4271 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4272 (xml_printf): Undo change I made on 21 September; that is,
4273 indent 2 spaces, not 1.
4274
ad5feac4
JD
42752007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4276
4277 Pacify ./configure --enable-gcc-warnings.
4278 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4279 `char const *' instead of `char *'.
4280 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4281 local variable `sep'.
4282
41d7a5f2
PE
42832007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4284
4285 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4286 elsewhere.
4287 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4288 (xml_printf): Indent just 1 space for level.
4289 (e_char, xlate_char): Remove.
4290 (xml_escape_string): Rewrite to avoid undefined behavior (used
4291 storage that was freed from the stack).
4292 (xml_escape_n): Don't bother checking for subscript error.
4293
3f999f78
WP
42942007-09-21 Wojciech Polak <polak@gnu.org>
4295
4296 Add Bison XML Automaton Report.
41d7a5f2
PE
4297
4298 Add support for an -x option to generate an XML report.
4299 It is not documented yet.
4300 * src/print-xml.c: New file.
4301 * src/print-xml.h: Likewise.
4302 * lib/timevar.def (TV_XML): New var.
4303 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4304 * src/conflicts.c: Include print-xml.h.
4305 (solved_conflicts_xml_obstack): New var.
4306 (log_resolution, conflicts_solve, conflicts_free):
4307 Add support for XML report.
4308 (conflicts_output_val): New function.
4309 * src/conflicts.h (conflicts_output_val): New decl.
4310 * src/files.c (spec_xml_file): New var.
4311 (compute_output_file_names, output_file_names_free): Add XML support.
4312 * src/files.h (spec_xml_file): New decl.
4313 * src/getargs.c (xml_flag): New var.
4314 (usage, short_options, long_options, getargs): Add XML support.
4315 * src/getargs.h (xml_flag): New decl.
4316 * src/gram.c: Include print-xml.h.
4317 (rule_lhs_print_xml, rule_rhs_print_xml):
4318 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4319 New functions.
4320 * src/gram.h: Declare external ones.
4321 * src/main.c: Include print-xml.h.
4322 (main): Add XML support.
4323 * src/reduce.c: Include print-xml.h.
4324 (reduce_xml): New function.
4325 * src/reduce.h: Declare it.
4326 * src/state.c: Include print-xml.h.
4327 (state_new): Add XML support.
4328 (state_rule_lookahead_tokens_print_xml): New function.
4329 * src/state.h: Declare it.
4330 (struct state): New member solved_conflicts_xml.
4331 * src/symtab.c (symbol_class_get_string): New function.
4332 * src/symtab.h: Declare it.
4333
6d8e724d
PE
43342007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4335
4336 * GNUmakefile: Switch to coreutils's version.
4337 * bootstrap: Likewise.
4338 * Makefile.cfg: Adjust to new GNUmakefile.
4339 * README-hacking: Likewise.
4340
4341 Import from gnulib:
4342
4343 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4344 Bruno Haible <bruno@clisp.org>
4345
4346 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4347 and is a script that invokes bison. Tighten the code. Add comments.
4348
922bdd7f
JD
43492007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4350
4351 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4352 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4353 * doc/bison.texinfo (Decl Summary): Fix.
4354 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4355 * tests/input.at (Boolean %define variables): Update output.
4356 * tests/skeletons.at (%define boolean variables: invalid skeleton
4357 defaults): Rename to...
4358 (%define Boolean variables: invalid skeleton defaults): ... this and
4359 update output.
4360
1b17b01d
JD
43612007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4362
4363 In impure push mode, don't allow more than one yypstate to be allocated
4364 since multiple impure parsers would corrupt yynerrs.
4365 * data/push.c (yypstate_allocated): New static global variable
4366 initialized to 0.
4367 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4368 exhaustion if yypstate_allocated is 1, but still return 2.
4369 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4370 already 1. Otherwise, set it to 1.
4371 (yypstate_delete): Set it to 0.
4372 * tests/push.at (Push Parsing: Multiple impure instances): New test
4373 case.
4374
9987d1b3
JD
43752007-08-17 Bob Rossi <bob@brasko.net>
4376
4377 * doc/bison.texinfo (Push Decl): Document the push parser.
4378 (Table of Symbols): Ditto.
4379 (Pure Decl): Ditto.
4380 (Decl Summary): Ditto.
4381 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4382 Parser Create Function, Parser Delete Function):
4383 Add new push parser symbols.
4384 (Table of Symbols): Document push-parser, push-pull-parser,
4385 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4386
f16b0819
PE
43872007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4388
4389 Update to GPLv3.
4390 * doc/gpl-3.0.texi: New file.
4391 * doc/gpl.texi: Remove.
4392 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4393 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4394 * README-hacking, TODO, bootstrap, bootstrap.conf:
4395 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4396 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4397 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4398 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4399 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4400 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4401 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4402 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4403 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4404 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4405 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4406 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4407 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4408 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4409 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4410 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4411 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4412 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4413 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4414 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4415 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4416 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4417 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4418 * src/complain.c, src/complain.h, src/conflicts.c:
4419 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4420 * src/files.h, src/flex-scanner.h, src/getargs.c:
4421 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4422 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4423 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4424 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4425 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4426 * src/print.c, src/print.h, src/print_graph.c:
4427 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4428 * src/reduce.h, src/relation.c, src/relation.h:
4429 * src/revision.h, src/scan-code.h, src/scan-code.l:
4430 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4431 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4432 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4433 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4434 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4435 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4436 * tests/existing.at, tests/glr-regression.at:
4437 * tests/headers.at, tests/input.at, tests/java.at:
4438 * tests/local.at, tests/output.at, tests/push.at:
4439 * tests/reduce.at, tests/regression.at, tests/sets.at:
4440 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4441 * tests/torture.at:
4442 Update to GPLv3.
4443
728c4be2
JD
44442007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4445
4446 Get rid of broken %no-parser, -n, and --no-parser implementation and
4447 documentation.
4448 * TODO: Don't mention them.
4449 * doc/bison.1: Likewise.
4450 * doc/bison.texinfo (Decl Summary): Likewise.
4451 (Bison Options): Likewise.
4452 (Option Cross Key): Likewise.
4453 * src/getargs.c (no_parser_flag): Remove global variable.
4454 (usage): Don't print description of -n and --no-parser.
4455 (long_options): Remove --no-parser entry here.
4456 (getargs): Remove -n case in the switch here.
4457 * src/getargs.h (no_parser_flag): Remove extern.
4458 * tests/regression.at (Web2c Actions): Remove comment that mentions
4459 --no-parser.
4460
5d31a216
JD
44612007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4462
4463 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4464 name user variables starting with `yy'. Just pass NULL instead of a
4465 dummy local &yylval to yypush_parse.
4466 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4467 starting with `yy'.
4468
a2ea208d
JD
44692007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4470
4471 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4472 true since it's then always used regardless of whether yyoverflow is
4473 defined. Reported by Christian Burger at
4474 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4475 * THANKS: Add Christian Burger.
4476
91661ebb
JD
4477 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4478 node names: say "Decl Summary" not "Bison Declaration Summary".
4479
cbd50549
JD
44802007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4481
4482 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4483 determine whether this function has already complained about an invalid
4484 value for a %define boolean variable, don't check whether Bison has
4485 ever examined the value. As written, the check was a tautology.
4486 Instead, record and check for this complaint using a separate muscle.
4487
eb1b0740
JD
44882007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4489
4490 Fix push parsing memory leak reported by Brandon Lucia at
4491 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4492 * THANKS: Add Brandon Lucia.
4493 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4494 but the parse never completed and thus freed it.
4495 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4496 * tests/testsuite.at: Include push.at.
4497 * test/push.at: New.
4498 (Push Parsing: Memory Leak for Early Deletion): New test case.
4499
9d774aff
JD
45002007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4501
4502 Improve handling of multiple S/R conflicts in the same state and of S/R
4503 conflicts involving multiple reductions.
4504 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4505 set for a state here or Bison will abort if it is reassigned on a
4506 later conflicted reduction in the same state.
4507 Similarly, don't finalize and assign the solved conflicts report here
4508 or it will be lost if it is reassigned on a later conflicted reduction
4509 in the same state.
4510 (set_conflicts): Instead, assign them both here after all S/R conflicts
4511 in the state have been fully examined.
4512 * src/print.c (shift_set): Rename to...
4513 (no_reduce_set): ... this.
4514 (print_reductions): Update for rename, and add %nonassoc error action
4515 tokens to no_reduce_set so that, when printing the first remaining
4516 reduction on an error action token, the reduction is enclosed in
4517 brackets.
4518 (print_results): Update for rename.
4519 * tests/conflicts.at (Solved conflicts report for multiple reductions
4520 in a state): New test case.
4521 (%nonassoc error actions for multiple reductions in a state): New test
4522 case.
4523
4524 * src/main.c (main): Don't depend on C99 features.
4525
10159d2a
JD
45262007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4527
4528 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
4529 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4530 uniwidth.
10159d2a 4531
953b3935
JD
45322007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4533
4534 * bootstrap (slurp): Create target directories that don't exist.
4535 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4536
6ce2d93a
JD
45372007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4538
4539 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4540 than item number.
4541 * closure.c (closure): Likewise.
4542 * state.h (reductions): Comment sorting of rules.
4543 (state): Comment sorting of items.
4544
ce3448d5
JD
45452007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4546
4547 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4548 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4549 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4550 definition in order to avoid Gnulib headers since we don't use config.h
4551 here.
4552 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4553 rather than AT_DATA so that config.h is included.
4554
8a86eef0
JD
45552007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4556
4557 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4558 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4559 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4560 and so that YYFPRINTF is guaranteed to be defined here.
4561
b1a81613
JD
45622007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4563
4564 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4565 with...
4566 (muscle_percent_define_check_values): ... this more helpful function.
4567 Again, it's not used yet, but it will be.
4568 * src/muscle_tab.h: Likewise.
4569
71b61d4d
JD
4570 Improve some comments in parser table construction.
4571 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4572 (generate_states): Don't mention ruleset, which is internal to closure.
4573 * src/closure.c (closure): Explain sorting of core and itemset, which
4574 is required for this function to behave correctly.
4575 * src/closure.h (closure): Mention sorting.
4576
2a6b783d
JD
45772007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4578
4579 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4580 move the check for disabled transitions to an aver since conflict
4581 resolution hasn't happened yet.
4582
4583 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4584 labels a state as inconsistent just because it has error transitions.
4585 The original form of this check appeared in revision 1.1 of lalr.c,
4586 which was committed on 1991-12-21. Now (at least), changing the
4587 consistency label on such a state appears to have no useful effect in
4588 any of the places it is examined, which I enumerate below. The key
4589 point to understanding each item in this enumeration is that a state
4590 with an error transition is labelled consistent in the first place only
4591 if it has no rules, so the check cannot matter for states that have
4592 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4593 to try to identify its conflicts, and a state must have *rules* to have
4594 conflicts. (2) Labelling a state as inconsistent will affect how
4595 action_row sets the default *rule* for the state. (3) Labelling a
4596 state as inconsistent will cause build_relations to add lookback edges
4597 to *rules* in that state.
4598 * src/state.h (struct state): Word the comment for member consistent
4599 more carefully.
4600
14462c2b
JD
46012007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4602
4603 Don't depend on C99 features.
4604 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4605 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4606 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4607 * src/state.c (state_mark_reachable_states): Fix for-loop.
4608 (state_remove_unreachable_states): Fix for-loop.
4609
4610 Don't widen struct state with member reachable just to temporarily
4611 record reachability. Instead, use a local bitset.
4612 * src/state.h (struct state): Remove member.
4613 * src/state.c (state_new): Don't initialize it.
4614 (state_mark_reachable_states): Rename to...
4615 (state_record_reachable_states): ... this, and use bitset.
4616 (state_remove_unreachable_states): Use bitset.
4617
5a43d418
JD
46182007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4619
4620 * src/Makefile.am (yacc): Quote target action commands properly so
4621 that the yacc script isn't corrupt. Reported by Hans Aberg at
4622 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4623
0c650a20
JD
4624 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4625 the case of pure parsers. Reported by Frans Englich at
4626 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4627 * THANKS: Add Frans Englich.
4628
61fee93e
JD
4629 * NEWS (2.3a+): In the %code entry, reference section `Bison
4630 Declaration Summary' from the manual now since the %code summary has
4631 moved there.
4632 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4633 in the rules section must be terminated by semicolons.
4634
f124d423
JD
46352007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4636
4637 Extend the front-end API for %define variables to more completely
4638 mirror the back-end. This will be useful in the future.
4639 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4640 Update comments to mention the new front-end counterparts of these
4641 macros.
4642 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4643 for muscle_string_decode and muscle_location_decode.
4644 (muscle_string_decode): New static function.
4645 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4646 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4647 functions.
4648 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4649 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4650 implementation more closely.
4651 (muscle_percent_define_invalid_value): New function.
4652 * src/muscle_tab.h (muscle_percent_define_get,
4653 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4654 Prototype.
4655
75ad86ee
JD
46562007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4657
4658 * NEWS (2.3a+): Mention yesterday's state-removal change.
4659 (2.3a): Remove the %language entry, which was added after 2.3a.
4660 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4661 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4662 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4663 tests/existing.at: Update copyright date.
4664
5967f0cf
JD
46652007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4666
4667 If conflict resolution makes states unreachable, remove those states,
4668 report rules that are then unused, and don't report conflicts in those
4669 states.
4670 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4671 New global function.
4672 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4673 function.
4674 * src/main.c (main): After conflict resolution, remove the unreachable
4675 states and update all data structures that reference states by number.
4676 * src/state.c (state_new): Initialize each state's reachable member to
4677 false.
4678 (state_mark_reachable_states): New static function.
4679 (state_remove_unreachable_states): New global function.
4680 * src/state.h (struct state): Add member bool reachable.
4681 (state_remove_unreachable_states): Prototype.
4682 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4683 New test case.
4684 * tests/existing.at (GNU pic Grammar): Update test case output now that
4685 an unused rule is discovered.
4686
b09f4f48
JD
46872007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4688
4689 Minor code cleanup in parser table construction.
4690 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4691 (new_itemsets, save_reductions): Update for rename to nitemset.
4692 * src/closure.c (nritemset): Rename to...
4693 (nitemset): ... this since the "r" appears to meaningless and isn't
4694 used in the comments.
4695 (closure): Update for rename.
4696 * src/closure.h (nritemset): Update extern to...
4697 (nitemset): ... this.
4698 * src/lalr.c (LA): Fix a typo in comments.
4699 * src/print.c (print_core): Update for rename to nitemset.
4700 * src/print_graph.c (print_graph): Likewise.
4701 * src/state.h: Fix some typos in header comments.
4702
bbb44d83
PE
47032007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4704
9b33de72
PE
4705 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4706 still sticks to ASCII. Sorry!
4707
bbb44d83
PE
4708 * README-hacking: New file, taken mostly from coreutils, with changes
4709 for Bison. Contains much of the contents of:
4710 * README-cvs: Remove.
4711 * bootstrap: Sync from gnulib.
4712 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4713 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4714
29553547
JD
47152007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4716
4717 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4718 Setzer.
4719 (Java Differences): Fix some typos.
4720 * THANKS: Add Sebastian Setzer.
4721
01b477c6
PB
47222007-03-07 Paolo Bonzini <bonzini@gnu.org>
4723
730739e4
AD
4724 * data/java.m4 (b4_single_class_if): Remove.
4725 (b4_abstract_if): Look at "%define abstract".
4726 (b4_lexer_if): New.
4727 (b4_union_name): Rename...
4728 (b4_yystype): ... to this. Map to "%define stype".
4729 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4730 b4_maybe_throws): Fix quoting.
4731 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4732 * data/lalr1.java (Lexer interface): Always define.
4733 (Lexer interface within parser class): Remove.
4734 (YYLexer class): New, used when "%code lexer" is present.
4735 (constructor): When "%code lexer" is used, pass %lex-param
4736 to the lexer constructor.
4737 (yylex, yyparse): Remove %lex-param from method invocations
4738 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4739
4740 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4741 abstract". Rename "%define union_name" to "%define stype".
4742 Rename method names according to previous patch.
4743 (Java Scanner Interface): Describe "%code lexer" instead of
4744 "%pure-parser" and "%define single_class".
4745 (Java Differences): Mention "%code lexer".
4746
4747 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4748 Include scanner here, using macros from tests/local.at.
4749 (AT_DATA_CALC_Y): Remove final argument.
4750 (_AT_CHECK_JAVA_CALC): Likewise.
4751 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4752 of %locations and %error-verbose.
4753 (main): Test with and without %lex-param.
4754 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4755 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 4756
122bea3a
JMG
47572007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4758
4759 DJGPP spefic issue. Inhibit the use of disallowed characters for
4760 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4761 and concern testsuite case 46.
4762 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4763 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4764 * djgpp/config.bat: Inhibit the use of disallowed characters.
4765
9611cfa2
JD
47662007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4767
4768 Miscellaneous %define and %code cleanup.
4769 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4770 values are interpreted.
4771 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4772 documentation a little more.
4773 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4774 muscle_percent_define_insert, muscle_percent_code_grow): New
4775 functions/macros.
4776 * src/muscle_tab.h (muscle_percent_define_insert,
4777 muscle_percent_code_grow): Prototype.
4778 * src/parse-gram.y (prologue_declaration): Use
4779 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4780 %define and %code directives.
4781
4782 Make it easy to share %define boolean variables between the front-end
4783 and back-end. Though not used yet, this will be useful in the future.
4784 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4785 Bison uses of names rather than just skeleton uses of names.
4786 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4787 b4_percent_define_skeleton_variables(VARIABLE) to
4788 b4_percent_define_bison_variables(VARIABLE).
4789 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4790 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4791 b4_percent_code_bison_qualifiers(QUALIFIER).
4792 (b4_check_user_names_wrap): Update for renames.
4793 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4794 muscle_percent_define_default): New functions mimicking
4795 b4_percent_define_flag_if and b4_percent_define_default.
4796
4797 For %define variables, report locations for invalid values and
bbb44d83 4798 redefinitions.
9611cfa2
JD
4799 * data/bison.m4 (b4_percent_define_flag_if): Read
4800 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4801 value for VARIABLE.
4802 (b4_percent_define_default): Save a special location in
4803 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4804 must later be reported as invalid.
4805 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4806 functions.
4807 (muscle_percent_define_insert): Record the location of VARIABLE in
4808 muscle percent_define_loc(VARIABLE), and use it to report the previous
4809 location for a redefinition.
4810 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4811 (muscle_percent_define_default): Update like b4_percent_define_default.
4812 (muscle_grow_user_name_list): Rename to...
4813 (muscle_user_name_list_grow): ... this for consistency and use
4814 muscle_location_grow.
4815 * src/muscle_tab.h (muscle_location_grow): Prototype.
4816 * tests/input.at (%define errors): Update expected output.
4817 * tests/skeletons.at (%define boolean variables: invalid skeleton
4818 defaults): New test case.
4819
0bf92491
JD
48202007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4821
4822 * src/print.c (lookahead_set, state_default_rule): Remove.
4823 (print_reductions): Replace state_default_rule invocation with
4824 equivalent use of yydefact, which was computed in token_actions in
4825 tables.c.
4826 (print_results): Don't allocate lookahead_set.
4827
d3b12988
PB
48282007-02-27 Paolo Bonzini <bonzini@gnu.org>
4829
4830 * data/lalr1.java: Prefix all private members with yy.
4831
f57a7536
JD
48322007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4833
4834 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 4835 Sebastien Fricker at
f57a7536 4836 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 4837 * THANKS: Add Sebastien Fricker.
f57a7536
JD
4838 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4839 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4840 accept a variable number of arguments.
4841
6404a5bf
JD
48422007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4843
4844 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4845
e4e09639
JMG
48462007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4847
4848 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4849 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4850 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4851
d7e0a1a7
PE
48522007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4853
4854 Undo my 2007-02-07 change, switching back to the c-strcase module
4855 introduced in the 2007-02-03 change. Bruno Haible reported that
4856 the 2007-02-07 change would be dangerous in Turkish if we add a
4857 language whose name contains "i", since "i" is not lowercase "I"
4858 in Turkish.
4859 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4860 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4861 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4862 * m4/.cvsignore: Remove strcase.m4.
4863 * src/getargs.c: Revert 2007-02-07 change, as follows.
4864 Include c-strcase.h.
4865 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4866
deee93a1
JD
48672007-02-11 Bruno Haible <bruno@clisp.org>
4868
4869 Enable the Java related testsuite tests when the only Java compiler
4870 found is a gcj < 4.3. Discussed at
4871 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4872 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4873
574add85
JD
48742007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4875
4876 * data/Makefile.am: Update copyright date.
4877 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4878 yypstate_new returns NULL.
4879 (yypstate_new): Return NULL if malloc does.
4880 * src/reader.c (packgram): Move translation of rule actions from the
4881 beginning of packgram to...
4882 (check_and_convert_grammar): ... here right before packgram is invoked
4883 so it's easier to write more complete comments, and remove redundant
4884 code.
4885
e785ccf7
JD
48862007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4887
4888 As in semantic actions, make @$ in %initial-action, %destructor, and
4889 %printer imply %locations.
4890 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4891 scanning @$.
4892 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4893 (@$ in %initial-action implies %locations,
4894 @$ in %destructor implies %locations,
4895 @$ in %printer implies %locations): ... these new test cases.
4896
1cfe1ed7
PE
48972007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4898
4899 Undo most of the 2007-02-03 change, switching to the strcase module
4900 now that gnulib strcase has been fixed.
4901 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4902 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4903 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4904 * m4/.cvsignore: Add strcase.m4.
4905 * src/getargs.c: Revert 2007-02-03 change, as follows.
4906 Don't include c-strcase.h.
4907 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4908 strcasecmp has "unspecified behavior" outside the POSIX locale,
4909 but it works fine in practice if at least one argument is ASCII,
4910 as is the case in Bison.
4911
0049ec86
PB
49122007-02-07 Paolo Bonzini <bonzini@gnu.org>
4913
4914 * tests/java.at: Skip tests if only one of javac/java is present.
4915 Reported by Joel E. Denny.
4916 * tests/atlocal.in: Adjust copyright years.
4917
49182007-02-05 Paolo Bonzini <bonzini@gnu.org>
4919
4920 * data/lalr1.java (Stack): Work around old verifiers that disallow
4921 access to the private fields of an inner class, from the outer class.
4922 We can make Stack's fields public because user code doesn't have access
4923 to the instance of Stack used by parse(). Reported by Paul Eggert.
4924
2c2b7220
PE
49252007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4926
4927 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4928 the right spot for these files?
4929 * bootstrap.conf (gnulib_modules): Add c-strcase.
4930 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4931 c-strncasecmp.c.
4932 * src/getargs.c: Include c-strcase.h.
4933 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4934 to avoid unspecified behavior.
4935
b2b81dae
JD
49362007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4937
4938 * doc/bison.texinfo (Decl Summary): Correct typo.
4939
c1d19e10
PB
49402007-01-30 Paolo Bonzini <bonzini@gnu.org>
4941
4942 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4943 Complain if the value does not match empty, "true" or "false".
4944 * data/c++.m4: Adjust default definitions of %define variables.
4945 * data/java.m4: Adjust default definitions of %define variables.
4946 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4947 to above behavior.
4948 * tests/input.at (Boolean %define variables): Test new behavior.
4949
8405b70c
PB
49502007-01-29 Paolo Bonzini <bonzini@gnu.org>
4951
4952 * NEWS: Mention java.
4953 * TODO: Remove things that are done.
4954 * bootstrap.conf: Add javacomp-script and javaexec-script.
4955 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4956
4957 * data/Makefile.am: Add new files.
4958 * data/java-skel.m4: New.
4959 * data/java.m4: New.
4960 * data/lalr1.java: New.
4961
4962 * doc/bison.texinfo: Put "A Complete C++ Example" under
4963 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4964 under Other Languages.
4965
4966 * src/getargs.c (valid_languages): Add Java.
4967 * src/getargs.h (struct bison_language): Update size of string fields.
4968
4969 * tests/Makefile.am: Add java.at.
4970 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4971 * tests/java.at: New.
4972 * tests/testsuite.at: Include it.
4973
3eb82471
JD
49742007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4975
4976 Clean up.
4977 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4978 at_directive_argv arguments so these no longer have to be global
4979 variables. Also, update the implementation for the following changes.
4980 (fail_for_at_directive_too_many_args,
4981 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4982 (at_directive_name): Remove as at_directive_argv[0] will be used for
4983 this now.
4984 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4985 for the directive name.
4986 (at_directive_argc, at_directive_argv): Make these local within
4987 skel_lex instead of global.
4988 (INITIAL): Update directive start action for above changes.
4989 (SC_AT_DIRECTIVE_ARG): Rename to...
4990 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4991 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4992 (scan_skel): Move yylex_destroy to...
4993 (skel_scanner_free): ... here.
4994 * tests/skeletons.at (installed skeleton file name): Rename to...
4995 (installed skeleton file names): ... this.
4996
148d66d8
JD
49972007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4998
4999 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5000 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5001 Summary" not "Directives".
5002 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5003 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5004 since the former is now the more complete one.
5005 (Prologue Alternatives): Likewise and do the same for %defines.
5006 (Table of Symbols): Add summary of %code, add summary of %define, and
5007 move full %code documentation to...
5008 (Decl Summary): ... here for consistency with other entries in these
5009 sections.
5010 Move %define entry in order to keep this list alphabetized.
5011 Reword %define entry a little to put less emphasis on the skeleton
5012 concept, which most users shouldn't have to think about.
5013
665f0c24
PE
50142007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5015
5016 Adjust to recent gnulib changes.
5017 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5018 Add string.h, string_.h, unistd_.h, wchar_.h.
5019 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5020 * src/system.h: Don't include <stpcpy.h>; this is now done by
5021 <string.h>.
5022
592d0b1e
PB
50232007-01-23 Paolo Bonzini <bonzini@gnu.org>
5024
5025 Simplify implementation of unqualified %code, implement macros for
5026 uniform treatment of boolean %define flags. Document %define.
5027 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5028 b4_percent_code_ifdef): New.
5029 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5030 * data/c++.m4: Define default value for global_tokens_and_yystype.
5031 * data/glr.cc: Likewise.
5032 * data/location.cc: Use b4_percent_define_flag_if.
5033
148d66d8 5034 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
5035
5036 * src/parse-gram.y (Unqualified %code): Change muscle name to
5037 b4_percent_code().
5038 (content.opt): Default to empty.
5039
a7867f53
JD
50402007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5041
5042 Implement support for relative and absolute skeleton file names.
5043 Discussed starting at
5044 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5045 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5046 (Bison Options): Document in --skeleton entry.
5047 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5048 full_skeleton can't necessarily hold all of pkgdatadir.
5049 If the specified skeleton file name contains a `/', don't prepend
5050 pkgdatadir.
5051 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5052 file name contains a `/', prepend the grammar file directory.
5053 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5054 * skeletons.at: New file.
5055 (relative skeleton file names): New test case.
5056 (installed skeleton file names): New test case.
5057 * tests/testsuite.at: Include skeletons.at.
5058
5059 * bootstrap: Update copyright to 2007.
5060
830c9b18
PB
50612007-01-17 Paolo Bonzini <bonzini@gnu.org>
5062
5063 * bootstrap: Remove occurrences of .#bootmp from the files.
5064
a8c2e813
AD
50652007-01-17 Akim Demaille <akim@epita.fr>
5066
5067 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5068 nonterminals.
5069 Use per-type %printer.
5070
279cabb6
JD
50712007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5072
5073 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5074 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5075 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5076 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5077 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5078 tests/glr-regression.at, tests/input.at, tests/local.at,
5079 tests/output.at, tests/torture.at: Update copyright to 2007.
5080
bb32f4f2
AD
50812007-01-16 Akim Demaille <akim@epita.fr>
5082
5083 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5084 error code.
5085 (Calc++ Scanner): Exit with failure if we can't open the input
5086 file.
5087 Accept "-" standing for stdin.
5088 (Calc++ Top Level): Print the result only if the parsing was
5089 successful.
5090
7cff04b5
AD
50912007-01-16 Akim Demaille <akim@epita.fr>
5092
5093 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5094
a4e25e1d
JD
50952007-01-15 Paolo Bonzini <bonzini@gnu.org>
5096 and Joel E. Denny <jdenny@ces.clemson.edu>
5097
5098 Clean up %define and %code implementation in M4 some. Most
5099 importantly, rename all related macros to be in the b4_percent_define
5100 and b4_percent_code namespaces. Also, complete support for `.' in
5101 %define variable names and %code qualifiers.
5102 * data/bison.m4 (b4_check_user_names): Check for special
5103 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5104 m4_foreach loops.
5105 (b4_get_percent_define, b4_get_percent_code): Rename to...
5106 (b4_percent_define_get, b4_percent_code_get): ... these.
5107 Extend documentation with examples.
5108 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5109 b4_percent_define_skeleton_variables and
5110 b4_percent_code_skeleton_qualifiers.
5111 Expect any value for the %define variable `foo' to be stored in the
5112 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5113 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5114 expect any unqualified %code blocks to be stored in a macro named
5115 `b4_percent_code_unqualified'.
5116 Use m4_indir so that %define variable names and %code qualifiers can
5117 contain `.', which is allowed by the grammar parser.
5118 (b4_percent_define_default): New macro to set a default value for a
5119 %define variable.
5120 (m4_wrap): Update wrapped code, and fix some underquoting.
5121 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5122 Expect grammar uses of %define variables and %code qualifiers to be
5123 defined in b4_percent_define_user_variables and
5124 b4_percent_code_user_qualifiers.
5125 * data/c++.m4: Use b4_percent_define_default rather than
5126 m4_define_default. Fix some underquoting. Skeleton usage of %define
5127 variable define_location_comparison now implies skeleton usage of
5128 %define variable filename_type.
5129 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5130 data/push.c, data/yacc.c: Update macro names.
5131 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5132 muscle names.
5133
e37c665c
JMG
51342007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5135
5136 DJGPP specific issues.
5137
5138 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5139 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5140
7d2d521f
JD
51412007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5142
5143 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5144 run parsers in all tests so that Valgrind is invoked during
5145 maintainer-check-valgrind.
5146 (Duplicate representation of merged trees): Free all semantic values.
5147 (Duplicated user destructor for lookahead): Likewise.
5148
e0ac9b4b
JD
51492007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5150
5151 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5152 command-line prefix.
5153 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5154 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5155 miss Valgrind messages.
5156 (Exploding the Stack Size with Malloc): Likewise.
5157
78143faa
JD
51582007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5159
5160 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5161 locals. Reported by Juan Manuel Guerrero at
5162 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5163 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5164 Fix some indentation also.
5165 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5166 explaining this issue.
5167
7ecec4dd
JD
51682007-01-09 Paolo Bonzini <bonzini@gnu.org>
5169 and Joel E. Denny <jdenny@ces.clemson.edu>
5170
5171 Simplify union and prologue handling, and escape union and lex/parse
5172 params with digraphs.
5173 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5174 values to the empty string since these are no longer guaranteed
5175 initialized by the front-end.
5176 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5177 braces around b4_user_stype since this is no longer done by the
5178 front-end.
5179 * src/files.c, src/files.h (pre_prologue_obstack,
5180 post_prologue_obstack): Remove.
5181 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5182 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5183 with digraphs. This fixes lex params and parse params.
5184 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5185 * src/output.c (prepare): Remove muscle insertion of the prologues.
5186 (output): Remove freeing of pre_prologue_obstack and
5187 post_prologue_obstack.
5188 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5189 than prologue_augment for prologue parsing so you don't need prologue
5190 obstacks.
5c80250c
JD
5191 (grammar_declaration): For %union RHS, use `braceless' instead of
5192 "{...}" so that braces are already stripped and code is escaped with
5193 digraphs.
7ecec4dd
JD
5194 * src/reader.c (prologue_augment): Remove.
5195 (reader): Remove initialization of pre_prologue_obstack and
5196 post_prologue_obstack.
5197 * src/reader.h (prologue_augment): Remove.
5198
5199 * data/c.m4: Remove stray parenthesis.
5200
16dc6a9e
JD
52012007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5202
5203 Remove quotes from variables names in %define directives and from
5204 qualifiers in %code directives, and restrict the characters that are
5205 allowed in them to M4-friendly ones. For %define, continue to support
5206 the quoted form as a deprecated feature. Discussed starting at
5207 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5208 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5209 %code.
5210 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
5211 (Decl Summary): In %defines entry, update mention of `%code requires'
5212 and `%code provides'.
16dc6a9e
JD
5213 (C++ Location Values): Update %define uses.
5214 (Calc++ Parser Interface): Likewise.
5215 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 5216 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
5217 * src/parse-gram.y (prologue_declaration): For %define variables, use
5218 `variable' instead of `STRING'.
5219 (grammar_declaration): For %code qualifiers, use `ID' instead of
5220 `STRING'.
5221 (variable): New nonterminal that takes an `ID' or a `STRING'.
5222 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5223 and %define uses.
5224 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5225 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5226 (%define errors): Update %define uses.
5227
e9813cd4
JD
52282007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5229
5230 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5231 instead of muscle_insert for %define values so that M4-special
5232 characters are replaced with digraphs.
5233 * tests/input.at (%define errors): Extend to check weird values.
5234
6afc30cc
JD
52352007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5236
5237 Instead of having skeletons declare all valid %define variables and
5238 %code qualifiers, provide macros that retrieve the associated values
5239 and build these lists automatically. Thus Bison will now warn when a
5240 variable or qualifier is not used by the skeleton in the current
5241 invocation regardless of whether it might sometimes be used by that
5242 skeleton in other invocations. Also, move all %define value macros to
5243 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5244 form, which is replaced by %code.
5245 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5246 (b4_check_user_names): ... this, and change the series of valid name
5247 arguments to a single list argument for names used in the skeleton
5248 similar to the existing list argument for names used in the grammar.
5249 Warn instead of complaining.
5250 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5251 values and %code code, to format %code code properly, and to build
5252 lists of all %define variables and %code qualifiers used in the
5253 skeleton: b4_skeleton_percent_define_variables and
5254 b4_skeleton_percent_code_qualifiers.
5255 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5256 Remove, and...
5257 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5258 the skeleton names lists can finish building first. In place of
5259 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5260 expect the lists b4_user_percent_define_variables and
5261 b4_user_percent_code_qualifiers.
5262 * data/c++.m4: Where setting default values for b4_parser_class_name,
5263 b4_location_type, b4_filename_type, b4_namespace, and
5264 b4_define_location_comparison, update their names to the
5265 b4_percent_define_ namespace.
5266 * data/glr.c: Don't use b4_check_percent_define_variables and
5267 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5268 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5269 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 5270 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
5271 * data/location.cc: Use b4_get_percent_define.
5272 * data/push.c: Don't use b4_check_percent_define_variables and
5273 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5274 * data/yacc.c: Likewise, and don't call m4_exit in
5275 b4_use_push_for_pull_if or m4_wrap code will never execute.
5276 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5277 Rename to...
5278 (muscle_grow_user_name_list): ... this for consistency with the
5279 terminology used in bison.m4.
5280 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5281 %define variable names, and rename muscle used_percent_define_variables
5282 to user_percent_define_variables.
5283 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5284 user_percent_code_qualifiers.
5285 (content): Remove.
5286 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5287 {CODE} form is no longer accepted.
5288 * tests/input.at (Reject bad %code qualifiers): Rename to...
5289 (Reject unused %code qualifiers): ... this, and update test output.
5290 (%define error): Update test output.
5291
7eb8a0bc
JD
52922007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5293
5294 Check for unrecognized %define variables similar to checking for
5295 unrecognized %code qualifiers. Check for redefined %define variables.
5296 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5297 generalizes...
5298 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5299 (b4_check_percent_define_variables): New, also wraps it.
5300 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5301 variables using b4_check_percent_define_variables.
5302 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5303 all those exercised in the test suite and all those listed in the
5304 `Default values' section of c++.m4. Are there others?
5305 * data/push.c, data/yacc.c: Declare no valid %define variables.
5306 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5307 similar to muscle_find, but it works even when the muscle stores a
5308 const value.
5309 (muscle_grow_used_name_list): New function for constructing the used
5310 name list muscles that b4_check_for_unrecognized_names requires.
5311 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5312 %define'd more than once. Define the b4_used_percent_define_variables
5313 muscle with muscle_grow_used_name_list.
5314 (grammar_declaration): Abbreviate %code code with
5315 muscle_grow_used_name_list.
5316 * tests/input.at (%define errors): New.
5317
3fc65ead
JD
53182007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5319
5320 Provide warn_at, complain_at, and fatal_at function callbacks to the
5321 skeletons, and use this for %code qualifier complaints.
5322 * data/bison.m4 (b4_error_at): New, invoked by...
5323 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5324 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5325 @fatal_at(...@) directives.
5326 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5327 qualifiers in b4_used_percent_code_qualifiers and to use
5328 b4_complain_at.
5329 * src/location.c, src/location.h (boundary_set_from_string): New global
5330 function.
5331 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5332 function.
5333 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5334 to b4_used_percent_code_qualifiers.
5335 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5336 function.
5337 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5338 (lineno): Rename to...
5339 (out_lineno): ... this so I don't misunderstand it again.
5340 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5341 here; these newlines are in the input but not the output file.
5342 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5343 (at_directive_perform): ... this new static function, and add handling
5344 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5345 directives.
5346 * tests/input.at (Reject bad %code qualifiers): Update test output with
5347 locations and extend.
5348
5349 * tests/output.at (Output file name: [, Output file name: ]): Remove
5350 bogus comment about these tests failing.
5351
1c7b7e1d
JD
53522007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5353
5354 Clean up b4_check_percent_code_qualifiers a little.
5355 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5356 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5357 documentation and add examples.
5358 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5359 qualifiers here.
5360
08af01c2
JD
53612007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5362
5363 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5364 unreliable -- especially when they're hidden inside another macro.
5365 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5366 data/c.m4: Remove m4_divert(-1).
5367 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5368 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5369 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 5370 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
5371 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5372 pushed and popped by m4sugar, should be first on the stack.
5373
5374 Provide warn, complain, and fatal function callbacks to the skeletons.
5375 This provides more flexibility than m4_fatal, improves the error
5376 message format, and captures messages for translation. Discussed
5377 starting at
5378 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5379 * data/bison.m4 (b4_error): New, invoked by...
5380 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5381 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5382 directives. Because these M4 macros might be called when the current
5383 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5384 the previous removal of uses of m4_divert, which caused trouble.
5385 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5386 m4_fatal to report unrecognized %code qualifiers.
5387 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5388 push parser requests.
5389 * data/glr.c: Use b4_complain instead of m4_fatal to report
5390 non-deterministic push parser requests.
5391 Update @output usage to @output(...@) form.
5392 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5393 report missing %defines. Update @output usage to @output(...@) form.
5394 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5395 @output(...@) form.
5396 * src/main.c (main): Invoke skel_scanner_free.
5397 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5398 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5399 obstack_for_string from flex-scanner.h.
5400 (YY_DECL): Use to declare skel_lex static.
5401 (decode_at_digraphs): Remove; now handled in the new
5402 SC_AT_DIRECTIVE_ARG start condition.
5403 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5404 functions.
5405 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5406 at_directive_argv): New static globals.
5407 (INITIAL): Use fail_for_invalid_at.
5408 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5409 recognize the start of a generalized `@directive(...@)' form and
5410 start...
5411 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5412 directive args (using the new obstack_for_string), to decode the
5413 contained @ diagraphs, and to perform the directive. It recognizes
5414 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5415 @output(...@).
5416 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5417 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5418 `@,'.
5419 (scan_skel): Initialize obstack_for_string on the first call.
5420 (skel_scanner_free): New function to free obstack_for_string.
5421 * tests/input.at (Reject bad %code qualifiers): Update test output.
5422
8e0a5e9e
JD
54232007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5424
5425 Consolidate the 4 prologue alternative directives (%code, %requires,
5426 %provides, and %code-top) into a single %code directive with an
5427 optional qualifier field. Discussed at
5428 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5429 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5430 alternatives.
5431 * doc/bison.texinfo (Prologue Alternatives): Update.
5432 (Decl Summary): Update to %code "requires" and %code "provides".
5433 (Calc++ Parser): Update to %code "requires".
148d66d8 5434 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
5435 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5436 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5437 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5438 which are skeleton-specific.
5439 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5440 declare what %code qualifiers it supports and to complain if any other
5441 qualifiers were used in the grammar.
5442 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5443 and b4_user_code([b4_percent_code_provides]) in place of
5444 b4_user_requires and b4_user_provides.
5445 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5446 Add b4_user_code([b4_percent_code_top]) and
5447 b4_user_code([b4_percent_code]).
5448 Invoke b4_check_percent_code_qualifiers.
5449 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5450 PERCENT_REQUIRES): Remove.
5451 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5452 %requires. Rewrite the %code RHS as the unqualified form defining the
5453 muscle b4_percent_code. Add another RHS for the qualified %code form,
5454 which defines muscles of the form b4_percent_code_QUALIFIER and the
5455 b4_used_percent_code_qualifiers muscle.
5456 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5457 PERCENT_REQUIRES): Remove.
5458 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5459 %code "requires" and %code "provides".
5460 * tests/input.at (Reject bad %code qualifiers): New.
5461
95021767
JD
54622007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5463
5464 Use the new code_props interface for destructors and printers.
5465 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5466 printer_location members, and change the type of the destructor and
5467 printer members to code_props.
5468 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5469 symbol_printer_get, semantic_type_destructor_set,
5470 semantic_type_printer_set, default_tagged_destructor_set,
5471 default_tagless_destructor_set, default_tagged_printer_set,
5472 default_tagless_printer_set): Use code_props in arguments and return
5473 types in place of char const * and location.
5474 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5475 since the locations are now contained in the return of
5476 symbol_destructor_get and symbol_printer_get.
5477 * src/output.c (symbol_destructors_output, symbol_printers_output):
5478 Replace with...
5479 (symbol_code_props_output): ... this to eliminate duplicate code.
5480 (output_skeleton): Update to use symbol_code_props_output.
5481 * src/reader.c (symbol_should_be_used): Update use of
5482 symbol_destructor_get.
5483 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5484 Update uses of the various _destructor_set and _printer_set functions.
5485 * src/symtab.c: (default_tagged_destructor_location,
5486 default_tagless_destructor_location, default_tagged_printer_location,
5487 default_tagless_printer_location): Remove since we...
5488 (default_tagged_destructor, default_tagless_destructor,
5489 default_tagged_printer, default_tagless_printer): ... change the type
5490 of these to code_props.
5491 (symbol_new, semantic_type_new, symbol_destructor_set,
5492 semantic_type_destructor_set, symbol_destructor_get,
5493 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5494 symbol_check_alias_consistency, default_tagged_destructor_set,
5495 default_tagless_destructor_set, default_tagged_printer_set,
5496 default_tagless_printer_set): Update.
5497 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5498 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5499 code_props members.
5500 (symbol_print): Use SYMBOL_CODE_PRINT.
5501
f6857bbf
JD
55022007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5503
5504 Use the new code_props interface for rule actions.
5505 * src/symlist.h (symbol_list): Replace action, action_location, and
5506 used members with a code_props action_props member.
5507 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5508 grammar_midrule_action, grammar_current_rule_merge_set,
5509 grammar_current_rule_symbol_append, packgram): Update.
5510 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5511 * src/scan-code.l (handle_action_dollar): Update.
5512 (translate_rule_action): Remove, no longer used.
5513 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5514
7c0c6181
JD
55152007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5516
5517 Use the new code_props interface in parse-gram.y.
5518 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5519 Update all uses of translate_* functions to use the new code_props
5520 interface and to use gram_scanner_last_string_free and
5521 code_scanner_last_string_free where possible.
5522 (grammar_declaration): symbol_list_destructor_set and
5523 symbol_list_printer_set now perform the translation, so don't do it
5524 here. Use gram_scanner_last_string_free where possible.
5525 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5526 translate_code): Remove, no longer used.
5527 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5528 symbol_list_printer_set): Perform code translation here rather than
5529 depending on the caller to do so.
5530
5531 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5532 * src/scan-gram.h (gram_last_string): Remove declaration.
5533 * src/scan-gram.l (last_string): Declare it static.
5534
28e52c0d
JD
55352007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5536
5537 Encapsulate code properties and related functionality for the various
5538 destructors, printers, and actions into a code_props structure and
5539 interface. This patch merely implements code_props in scan-code.h and
5540 scan-code.l. Future patches will rewrite other modules to use it.
5541 Discussed starting at
5542 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5543 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5544 consistently initialize const structs that have an empty location
5545 field.
5546 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5547 to ensure consistency.
5548 * src/scan-code.h (code_props): New structure.
5549 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5550 function, macro, and const global variable for initializing a
5551 code_props with no code.
5552 (code_props_plain_init, code_props_symbol_action_init,
5553 code_props_rule_action_init, code_props_translate_code): The rest of
5554 the new code_props functional interface. Among other things, the init
5555 functions set the code_props kind field so that
5556 code_props_translate_code will know whether to behave like
5557 translate_symbol_action, translate_rule_action, or translate_code.
5558 These old translate functions must remain until all other modules are
5559 updated to use the new code_props interface.
5560 (code_scanner_last_string_free): New function similar to
5561 gram_scanner_last_string_free.
5562 (code_scanner_free): Add documentation.
5563 * src/scan-code.l: Implement the new interface.
5564 (code_lex): Make it static, add a code_props* argument, and remove the
5565 rule argument.
5566 (last_string): New static global similar to the one in scan-gram.l.
5567 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5568 instead of rule.
5569 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5570 code_props since Bison may one day use this information for destructors
5571 and printers.
5572 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5573 (handle_action_dollar): Use symbol_list_n_get and set used flag
5574 directly since symbol_list_n_used_set is removed.
5575 (translate_action): Add a code_props* argument and remove the rule,
5576 action, and location arguments. Pass the code_props* on to code_lex.
5577 (translate_rule_action, translate_symbol_action, translate_code):
5578 Rewrite as wrappers around the new code_props interface.
5579 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5580 it would eventually need to break the encapsulation of code_props.
5581
96034983
JD
55822007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5583
5584 * etc/.cvsignore: New.
5585
945e396c
JD
55862007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5587
5588 Add maintainer-push-check to run maintainer-check using push parsing in
5589 place of pull parsing where available.
5590 * Makefile.am (maintainer-push-check): New.
5591 * data/bison.m4 (b4_use_push_for_pull_if): New.
5592 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5593 appropriately based on their existing values.
5594 (yypush_parse): Don't print push-parser-specific diagnostics if push
5595 parsing is being used in place of pull parsing.
5596 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5597 push.c.
5598 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5599 variable, and insert b4_use_push_for_pull_flag into muscles.
5600 * tests/Makefile.am (maintainer-push-check): New.
5601
7d596384
JD
56022006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5603
5604 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5605 (whether successful or failed) so that yypush_parse can be invoked
5606 again to start a new parse using the same yypstate.
5607 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5608 check multiple yypull_parse invocations on the same yypstate. For pull
5609 mode, extend to check multiple yyparse invocations.
5610 (Exploding the Stack Size with Alloca): Extend to try with
5611 %push-pull-parser.
5612 (Exploding the Stack Size with Malloc): Likewise.
5613
5614 * tests/calc.at (Simple LALR Calculator): Don't specify
5615 %skeleton "push.c" since %push-pull-parser implies that now.
5616 * tests/headers.at (export YYLTYPE): Don't check for the push
5617 declarations. Otherwise, this test case can't be used to see if push
5618 mode can truly emulate pull mode.
5619 * tests/input.at (Torturing the Scanner): Likewise.
5620 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5621 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5622 AT_YACC_IF, which now includes the case of push mode since %skeleton
5623 need not be used for push mode. This will be more intuitive once
5624 push.c is renamed to yacc.c.
5625
7172e23e
JD
56262006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5627
5628 For push mode, convert yyparse from a macro to a function, invoke yylex
5629 instead of passing a yylexp argument to yypull_parse, and don't
5630 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5631 Discussed starting at
5632 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5633 * data/bison.m4 (b4_pull_if): New.
5634 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5635 * data/push.c: Improve M4 quoting a little.
5636 (b4_generate_macro_args, b4_parenthesize): Remove.
5637 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5638 any time a pull parser is requested.
5639 Don't #define this as a wrapper around yypull_parse. Instead, when
5640 both push and pull are requested, make it a function that does that
5641 same thing.
5642 (yypull_parse): If there's a b4_prefix, #define this to
5643 b4_prefix[pull_parse] when both push and pull are requested.
5644 Don't define this as a function unless both push and pull are
5645 requested.
5646 Remove the yylexp argument and hard-code yylex invocation instead.
5647 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5648 %push-parser.
5649 * src/getargs.c (pull_parser): New global initialized to true.
5650 * getargs.h (pull_parser): extern it.
5651 * src/output.c (prepare): Insert pull_flag muscle.
5652 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5653 (prologue_declaration): Set both push_parser and pull_parser = true for
5654 %push-pull-parser. Set push_parser = true and pull_parser = false for
5655 %push-parser.
5656 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5657 %push-parser since there's no backward-compatibility concern here.
5658 Scan %push-pull-parser.
5659 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5660 instead of %push-parser.
5661 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5662 prototype it in the module that calls yyparse.
5663 * tests/input.at (Torturing the Scanner): Likewise.
5664 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5665
2e7944cb
JD
56662006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5667
5668 Update etc/bench.pl. Optimize push mode a little (the yyn change
5669 deserves most of the credit).
5670 * Makefile.am (SUBDIRS): Add etc subdirectory.
5671 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5672 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5673 yytoken, yyval, and yyloc declarations to...
5674 (yyparse or yypush_parse): ... here to improve performance. For
5675 yypush_parse invocations after the first, be sure to assign yyn its old
5676 value again.
5677 (yypstate_new): Don't bother initializing the yyresult field since the
5678 initial value isn't used.
5679 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5680 remove the #define that, in push mode, set it to yyps->NAME.
5681 * etc/Makefile.am: New.
5682 * etc/bench.pl: Remove and build it instead from...
5683 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5684 "tests/bison" from the build directory by default rather than just
5685 invoking "bison" from $PATH.
5686 (calc_grammar): Update push parser code: don't declare yylval globally,
5687 don't define yyparse_wrapper, and don't #define yyparse.
5688 (bench_grammar): Update to check all working combinations of yacc.c,
5689 push.c, impure, pure, pull, and push.
5690
c3d50342
JD
56912006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5692
5693 For push mode, add pull wrappers around yypush_parse.
5694 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5695 (yypull_parse): New function wrapping yypush_parse.
5696 (yyparse): New #define wrapping yypull_parse.
5697 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5698 is declared.
5699 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5700 prototype yylex in the module that calls yyparse, and don't prototype
5701 yyparse there. Otherwise, the yyparse expansion won't compile.
5702 * tests/input.at (Torturing the Scanner): Likewise.
5703
94ebeba5
JD
57042006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5705
5706 Enable push parsers to operate in impure mode. Thus, %push-parser no
5707 longer implies %pure-parser. The point of this change is to move
5708 towards being able to test the push parser code by running the entire
5709 test suite as if %push-parser had been declared.
5710 * data/push.c (yypush_parse): For impure mode, remove the
5711 yypushed_char, yypushed_val, and yypushed_loc arguments.
5712 Instead, declare these as local variables initialized to the global
5713 yychar, yylval, and yylloc.
5714 For the first yypush_parse invocation only, restore the initial values
5715 of these global variables when it's time to read a token since they
5716 have been overwritten.
5717 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5718 %push-parser.
5719 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5720 %pure-parser along with %push-parser since this test case was designed
5721 for pure push parsers.
5722 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5723 (AT_YACC_OR_PUSH_IF): New.
5724 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5725 add a note that it's still wrong for some cases (as it has been for a
5726 while).
5727 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5728 %push-parser no longer implies %pure-parser.
5729
a0633178
JD
57302006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5731
5732 Remove some unnecessary differences between the pull parser code and
5733 the push parser code. This patch enables yynerrs in push mode.
5734 * data/push.c: Reformat M4 a little.
5735 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5736 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5737 because push mode is on. Instead, if pure mode is on, move yynerrs
5738 to...
5739 (b4_declare_parser_state_variables): ... here.
5740 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5741 to yyps->NAME so it can be used in yypush_parse.
5742 (yypush_parse): Don't omit uses of yynerrs in push mode.
5743
8646b6a3
JD
57442006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5745
5746 Fix bug such that the first pushed token's value and location are
5747 sometimes overwritten (sometimes by %initial-action) before being used.
5748 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5749 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5750 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5751 more closely mimic the pull parser logic.
5752 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5753 time to read a token, which is after any initialization of yylval and
5754 yylloc.
5755 (gottoken): Rename label to...
5756 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5757 user namespace.
5758
9baf4d74
JD
57592006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5760
5761 Rearrange initialization of the parser state variables so that the
5762 skeleton doesn't have to have a copy for pull mode and another for push
5763 mode. This patch also fixes at least a bug such that yylloc was not
5764 initialized (with b4_location_initial_line and
5765 b4_location_initial_column) upon calling yypush_parse. However, that
5766 initialization now overwrites the first token's location;
5767 %initial-action assigning @$ already did the same thing, and both bugs
5768 will be fixed in a later patch.
5769 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5770 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5771 yyss, yyvs, yyls, and yystacksize.
5772 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5773 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5774 yylsp.
5775 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5776 yyps->NAME so it can be used in yypush_parse.
5777 (yyparse or yypush_parse): For yypush_parse, don't print the
5778 "Starting parse" diagnostic for invocations after the first.
5779 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5780 yypush_parse, only do it for the first invocation.
5781 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5782 initialization to occur in yypush_parse but only on the first
5783 invocation.
5784
23522164
JD
57852006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5786
5787 * data/push.c: Add CPP guards around push parser declarations in both
5788 the header and the code file.
5789 In the code file, move the push parser declarations to the same place
5790 they appear in the header file.
5791 Clean up the M4 some, especially the inconsistent underquoting in
5792 some b4_c_function_def and b4_c_function_decl uses.
5793
bb010fe5
JD
57942006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5795
5796 Encapsulate the push parser state variables into an M4 macro so the
5797 push skeleton doesn't have to list them again for pull mode's yyparse.
5798 For push mode, remove yypush_parse's local equivalents of these
5799 variables to eliminate unnecessary copying between the two sets at
5800 run-time. This patch also fixes at least a bug related to multiple
5801 %initial-action invocations in push mode.
5802 * data/push.c (b4_declare_parser_variables): Rename to...
5803 (b4_declare_scanner_communication_variables): ... this for clarity and
5804 update both uses.
5805 (b4_declare_yyparse_variables): Remove and move its contents to the one
5806 spot where it was invoked.
5807 (b4_declare_parser_state_variables): New macro containing the parser
5808 state variables required by push mode.
5809 (struct yypstate): Replace all fields but yynew with
5810 b4_declare_parser_state_variables.
5811 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5812 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5813 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5814 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5815 parser state variable declarations with
5816 b4_declare_parser_state_variables.
5817 Don't initialize parser state variables when calling yypush_parse since
5818 yypstate_new already does that.
5819 Invoke the user's initial action only upon the first yypush_parse
5820 invocation.
5821 Remove all code that copies between the local parser state variables
5822 and the yypstate.
5823
2d212f8c
JD
58242006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5825
5826 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5827 prevent a name collision in a future patch where these names will
5828 sometimes be #define'd.
5829 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5830 since it no longer has the same name as the existing argument.
5831 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5832
e6e704dc
JD
58332006-12-19 Paolo Bonzini <bonzini@gnu.org>
5834 and Joel E. Denny <jdenny@ces.clemson.edu>
5835
5836 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5837 that the argument is case-insensitive, and there's no `=' here.
5838 For the %skeleton entry, mention that %language is better.
5839 (Bison Options): Likewise for --language and --skeleton. Move the
5840 --skeleton entry so that the `Tuning the parser' section is sorted
5841 alphabetically on long options.
5842 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5843 %language directive in detail here; cross-reference the %language
5844 documentation instead.
5845 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5846 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 5847 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
5848 * examples/extexi (normalize): Instead of replacing every %require
5849 argument with the current Bison version, just substitute for
5850 `@value{VERSION}'. This guarantees that we're testing what actually
5851 appears in the documentation.
5852 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5853 rather than `@VERSION@'.
5854
0e021770
PE
58552006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5856
fd575f05
PE
5857 * NEWS: Reword the %language news a bit, and put it earlier.
5858
0e021770
PE
5859 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5860 Rewrite to simplify the logic.
5861 (language_argmatch): Likewise.
fd575f05
PE
5862 (program_name): We now own this var.
5863 * src/getargs.h (struct bison_language): Use char[] rather than
5864 const char *.
0e021770
PE
5865
5866 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5867 Java is supported.
5868 * src/complain.c (program_name): Remove decl; no longer needed.
5869 * src/main.c (program_name): Remove; now belongs to getargs.
5870
58712006-12-18 Paolo Bonzini <bonzini@gnu.org>
5872
5873 * NEWS: Document %language.
5874
5875 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5876
5877 * data/c-skel.m4, data/c++-skel.m4: New files.
5878 * data/glr.c: Complain on push parsers.
5879
5880 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5881 over %skeleton.
148d66d8 5882 (Decl Summary): Document %language and %skeleton.
0e021770
PE
5883 (Command line): Document -L.
5884
5885 * examples/extexi: Rewrite %require directive.
5886 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5887
5888 * src/files.c (compute_exts_from_gc): Look in language structure
5889 for .y extension.
5890 (compute_file_name_parts): Check whether .tab should be added.
5891 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5892 (language, skeleton_arg, language_argmatch): New.
5893 (long_options): Add --language.
5894 (getargs): Use skeleton_arg, add -L/--language.
5895 * src/getargs.h: Include location.h.
5896 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5897 * src/output.c (prepare): Pick default skeleton from struct language.
5898 Don't dispatch C skeletons here.
5899 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5900 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5901 * src/scan-gram.l ("%language"): New rule.
5902
5903 * tests/calc.at: Test %skeleton and %language.
5904 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5905 (AT_GLR_IF): Look for %skeleton "glr.cc".
5906 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5907 (AT_YACC_IF): Reject %language.
5908
5691bf57
PE
59092006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5910
db06f0ce
PE
5911 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5912 since it wasn't used; only the typedef name 'semantic_type' is needed.
5913 Also, omit trailing white space.
5914
5691bf57
PE
5915 * bootstrap: Sync from coreutils.
5916 (gnulib_extra_files): Add build-aux/announce.gen.
5917 (slurp): Adjust .gitignore files like .cvsignore files.
5918 * build-aux/announce-gen: Remove from CVS, since bootstrap
5919 now creates this.
5920
791934e4
JD
59212006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5922
5923 Make %push-parser imply %pure-parser. This fixes several bugs; see
5924 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5925 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5926 pure_parser = true.
5927 * data/push.c: Don't bother testing b4_push_if when deciding whether
5928 to expand b4_declare_parser_variables globally.
5929 (yypush_parse): Likewise in here.
5930
5931 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5932 (yy_reduce_print): Reformat M4 for readability.
5933
ee5abb37
JD
59342006-12-15 Bob Rossi <bob@brasko.net>
5935 and Joel Denny <jdenny@ces.clemson.edu>
5936
5937 * data/push.c (yypstate): Add typedef, and update all uses of
5938 struct yypstate to just yypstate.
5939 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5940
16ca01f9
JD
59412006-12-14 Bob Rossi <bob@brasko.net>
5942
5943 * data/push.c (yypush_parse): Declare prototype regardless of
5944 %locations option.
5945
ab8e7e1a
JD
59462006-12-14 Bob Rossi <bob@brasko.net>
5947
5948 * data/push.c (yyparse): Remove the prototype and the #define when in
5949 push-parser mode.
5950
9bf32be3
JD
59512006-12-13 Bob Rossi <bob@brasko.net>
5952
5953 * data/push.c (yypstate_init): Rename to...
5954 (yypstate_new): ... this and use b4_c_function_def.
5955 (yypstate_delete): New.
5956 (yypush_parse): Change parameters yynval and yynlloc to be const.
5957 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5958 yypstate_delete functions.
5959
f02e2948
JD
59602006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5961
5962 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5963 strange test case titles. Reported by Bob Rossi.
5964
38eb7751
PE
59652006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5966
5967 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5968 of potential ambiguities in GLR grammers.
5969
bd9d212b
JD
59702006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5971
5972 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5973 `bison ', use m4_index instead of m4_substr since chopping up a string
5974 containing M4-special characters causes problems here.
5975
5976 Fix a couple of bugs related to special characters in user-specified
5977 file names, and make it easier for skeletons to compute output file
5978 names with the same file name prefix as Bison-computed output file
5979 names.
5980 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5981 b4_parser_file_name and b4_spec_defines_file instead of
5982 @output_parser_name@ and @output_header_name@, which are now redundant.
5983 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5984 b4_parser_file_name, b4_spec_defines_file, and the new
5985 @basename(FILENAME@) instead of @output_parser_name@ and
5986 @output_header_name@, which inappropriately escaped the file names as
5987 C string literals.
5988 * src/files.c (all_but_ext): Remove static qualifier.
5989 (compute_output_file_names): Move `free (all_but_ext)' to...
5990 (output_file_names_free): ... here since all_but_ext is needed later.
5991 * src/files.h (all_but_ext): Extern.
5992 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5993 exactly what MUSCLE_INSERT_STRING used to do.
5994 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5995 characters are escaped properly.
5996 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5997 all_but_ext.
5998 For pkgdatadir muscle, maintain previous functionality by using
5999 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6000 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6001 digraphs would never be expanded. Hopefully no one has M4-special
6002 characters in his Bison installation path.
6003 * src/scan-skel.l: Don't parse @output_header_name@ and
6004 @output_parser_name@ anymore since they're now redundant.
6005 In @output, use decode_at_digraphs.
6006 Parse a new @basename command that invokes last_component.
6007 (decode_at_digraphs): New.
6008 (BASE_QPUTS): Remove unused.
6009 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6010 (Output file name): New tests.
6011
3f7ca628
JD
60122006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6013
6014 Warn about output files that are generated by the skeletons and that
6015 conflict with other output files.
6016 * data/glr.c: Don't generate the header file here when glr.cc does.
6017 * src/files.c (file_names, file_names_count): New static globals.
6018 (compute_output_file_names): Invoke output_file_name_check for files
6019 not generated by the skeletons and remove existing checks.
6020 (output_file_name_check): New function that warns about conflicting
6021 output file names.
6022 (output_file_names_free): Free file_names.
6023 * src/files.h (output_file_name_check): Declare.
6024 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6025 the skeletons.
6026 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6027 (Conflicting output files): New tests.
6028
178e123e
PE
60292006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6030
6031 * doc/bison.texinfo: Fix a couple of typos.
6032
60332006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
6034
6035 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6036 Rename to...
6037 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6038 update all uses.
6039 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6040 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6041 local pv.
6042 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6043 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6044
ea17f233
JD
60452006-12-07 Bob Rossi <bob@brasko.net>
6046 and Joel Denny <jdenny@ces.clemson.edu>
6047
6048 * data/push.c (yypvarsinit): Change return type from void* to struct
6049 yypvars*. No longer cast to void* on return.
6050 (struct yypvars): Remove yylen since it need not be remembered between
6051 yypushparse invocations.
6052 (yypushparse): Don't copy between yylen and pv->yylen.
6053
55a30bda
JD
60542006-12-05 Bob Rossi <bob@brasko.net>
6055
6056 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6057 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6058 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6059 (struct yypvars): Remove b4_declare_parser_variables.
6060 (yypvarsinit): Remove init code for removed variables.
6061 (global scope): Do not declare b4_declare_parser_variables if
6062 push or pure mode.
6063 (yypushparse): Add b4_declare_parser_variables.
6064 Init new local variables, and remove init code for removed
6065 yypvars variables.
6066 (yyparse): Delete.
6067 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6068 and yyparse for other modes.
6069 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6070 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6071 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6072 (AT_PURE_LEX_IF): True if pure or push parser.
6073
85894313
JD
60742006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6075
6076 Document Yacc prologue alternatives and default %destructor's and
6077 %printer's as experimental. Don't mention Java yet. Discussed at
6078 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6079 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6080 (2.3a): Annotate this entry to say the old forms of these features were
6081 also experimental.
6082 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 6083 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
6084 of Java (we'll want this back eventually).
6085
02975b9a
JD
60862006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6087
6088 Support a file name argument to %defines. Deprecate `=' in
6089 %file-prefix, %name-prefix, and %output. Discussed at
6090 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6091 * NEWS (2.3a+): Mention.
148d66d8 6092 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
6093 form of %defines, and remove `=' from entries for %file-prefix,
6094 %name-prefix, and %output.
6095 * src/parse-gram.y (prologue_declaration): Implement.
6096 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6097 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6098 all but one occurrence of %name-prefix.
6099 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6100 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6101 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6102 occurrence of each of %file-prefix and %output. Add check for %defines
6103 with argument.
6104 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6105 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6106 Remove the `=' from %output.
6107
287b314e
JD
61082006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6109
6110 Don't escape $ in test case titles since Autoconf 2.61 now does that
6111 correctly.
6112 * tests/actions.at (Default %printer and %destructor are not for error
6113 or $undefined): Here.
6114 (Default %printer and %destructor are not for $accept): Here.
6115 * tests/input.at (Invalid $n and @n): Here.
6116
3ebecc24
JD
61172006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6118
6119 Rename <!> to <>. Discussed starting at
6120 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6121 * NEWS (2.3a+): Update.
148d66d8 6122 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
6123 Update.
6124 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6125 * src/scan-gram.l (INITIAL): Implement.
6126 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6127 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6128 comment.
6129 * tests/actions.at (Default tagless %printer and %destructor,
6130 Default tagged and per-type %printer and %destructor,
6131 Default %printer and %destructor are not for error or $undefined,
6132 Default %printer and %destructor are not for $accept,
6133 Default %printer and %destructor for mid-rule values): Update.
6134 * tests/input.at (Default %printer and %destructor redeclared,
6135 Unused values with default %destructor): Update.
6136
26b8a438
JD
61372006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6138
6139 Don't let %prec take a nonterminal.
6140 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6141 token.
6142 * tests/input.at (%prec takes a token): New test checking that %prec
6143 won't take a nonterminal.
6144
07c39ae9
JD
61452006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6146
405d53b7
JD
6147 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6148 it was double-quoted.
07c39ae9
JD
6149 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6150 grammar is maintained with Bison's highest standards.
6151 * src/getargs.c: Fix some typos in Doxygen comments.
6152
580b8926
JD
61532006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6154
6155 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6156 later. Reported by Paul Eggert in
6157 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6158 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6159 * src/scan-code.l (translate_action): Don't bother invoking
6160 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6161 (code_scanner_free): Instead of invoking
6162 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6163 which frees more.
6164 * src/scan-gram.l (gram_scanner_free): Likewise.
6165 * src/scan-skel.l (scan_skel): Likewise.
6166
4502eadc
JD
61672006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6168
6169 * src/files.c (tr): Change return type to void.
6170 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6171 has been called previously for the same key.
6172 (muscle_find): Return storage instead of value so that
6173 --enable-gcc-warnings doesn't produce warnings that the return discards
6174 const. aver that the value and storage are the same since storage
6175 could potentially be NULL when value is not.
6176 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6177 same as 0.
6178
7746c8f6
PE
61792006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6180
6181 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6182 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6183 us a slightly cleaner distribution, and also works.
6184 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6185 gnulib changes.
6186
eb095650
PE
61872006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6188 and Paul Eggert <eggert@cs.ucla.edu>
6189
6190 Don't let Bison leak memory except when it complains.
6191 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6192 (spec_defines_file, dir_prefix): Now char *, not const char *,
6193 since they are freed.
6194 * src/files.c: Likewise.
6195 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6196 Likewise.
6197 (tr): Now operates in-place. All uses changed.
6198 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6199 values.
6200 (compute_file_name_parts, compute_output_file_names): Don't store
6201 read-only data in variables that will be freed.
6202 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6203 src_extension, and header_extension.
6204 (output_file_names_free): New public function to free
6205 spec_verbose_file, spec_graph_file, spec_defines_file,
6206 parser_file_name, and dir_prefix.
6207 * src/getargs.c (getargs): Don't store read-only data in variables that
6208 will be freed.
6209 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6210 (which previously existed but was unused), and quotearg_free.
6211 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6212 * src/muscle_tab.c: Likewise.
6213 (muscle_entry): Make the value char const *,
6214 and add a new storage member that is char * and can be freed.
6215 (muscle_entry_free): New private function.
6216 (muscle_init): Use it instead of free.
6217 (muscle_insert, muscle_grow): Update and use new storage member.
6218 (muscle_code_grow): Free the string passed to muscle_grow
6219 since it's not needed anymore.
6220 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6221 add a new `char *code' member.
6222 ("{...}"): Declare semantic type as code.
6223 * src/scan-code.h (translate_rule_action):
6224 (translate_symbol_action, translate_code, translate_action): Return
6225 `char const *' rather than `char *' since external code should not free
6226 these strings.
6227 * src/scan-code.l: Likewise.
6228 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6229 which is "{...}" in the parser.
6230 * tests/Makefile.am (maintainer-check-valgrind): Set
6231 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6232 Valgrind.
6233 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6234 complain.
6235 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6236 expecting a non-zero exit status sets --leak-check=summary and
6237 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6238 this case, and we don't want to hear about it.
6239
ac564be4
PE
62402006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6241
6242 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6243 instead of from the template, to simplify configuration a bit.
6244 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6245 and m4/wint_t.m4, as they are needed with the latest gnulib.
6246
17bd8a73
JD
62472006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6248
6249 Disable unset/unused mid-rule value warnings by default, and recognize
6250 --warnings=midrule-values to enable them. Discussed starting at
6251 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6252 * NEWS (2.3a+): Mention.
6253 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6254 warnings): Add entry for midrule-values subargument.
6255 * src/reader.c (symbol_should_be_used): Don't return true just because
6256 the value is a set/used mid-rule value unless
6257 --warnings=midrule-values was specified.
6258 * tests/input.at (Unused values, Unused values before symbol
6259 declarations): Run tests with and without --warnings=midrule-values.
6260
6261 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6262 than LIST_FREE directly.
6263
89eb3c76
JD
62642006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6265
6266 Finish implementing --warnings=error, which should not be implied by
6267 --warnings=all (or by its synonyms -W and --warnings without
6268 subarguments).
6269 * src/complain.c (set_warning_issued): New function to report that
6270 warnings are being treated as errors and to record an error if so.
6271 Invoke...
6272 (warn_at, warn): ... here.
6273 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6274 "error - warnings are errors" does not appear above "all - all of the
6275 above".
6276 (getargs): For -W and --warnings without subarguments, don't let
6277 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6278 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6279
ba7560e2
JD
62802006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6281
6282 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6283 empty subargument list. For example: `bison --warnings= parser.y'.
6284
31283fc3
JD
62852006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6286
6287 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6288 the parser header file so that gcc doesn't warn.
6289
12e35840
JD
62902006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6291
6292 Split the default %destructor/%printer into two kinds: <*> and <!>.
6293 Discussed starting at
6294 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6295 * NEWS (2.3a+): Mention.
6296 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6297 previous change today related to mid-rules.
148d66d8 6298 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 6299 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
6300 (TYPE_TAG_ANY): Add as <*>.
6301 (TYPE_TAG_NONE): Add as <!>.
6302 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6303 for <*> and <!>.
6304 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6305 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6306 * src/symlist.c (symbol_list_default_new): Split into tagged and
6307 tagless versions.
6308 (symbol_list_destructor_set, symbol_list_printer_set): Split
6309 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6310 SYMLIST_DEFAULT_TAGLESS.
6311 * src/symlist.h: Update symbol_list_default*_new prototypes.
6312 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6313 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6314 * src/symtab.c (default_destructor, default_destructor_location,
6315 default_printer, default_printer_location): Split each into tagged and
6316 tagless versions.
6317 (symbol_destructor_get, symbol_destructor_location_get,
6318 symbol_printer_get, symbol_printer_location_get): Implement tagged
6319 default and tagless default cases.
6320 (default_destructor_set, default_printer_set): Split each into tagged
6321 and tagless versions.
6322 * src/symtab.h: Update prototypes.
6323 * tests/actions.at (Default %printer and %destructor): Rename to...
6324 (Default tagless %printer and %destructor): ... this, and extend.
6325 (Per-type %printer and %destructor): Rename to...
6326 (Default tagged and per-type %printer and %destructor): ... this, and
6327 extend.
6328 (Default %printer and %destructor for user-defined end token): Extend.
6329 (Default %printer and %destructor are not for error or $undefined):
6330 Update.
6331 (Default %printer and %destructor are not for $accept): Update.
6332 (Default %printer and %destructor for mid-rule values): Extend.
6333 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6334 (Unused values with default %destructor): Extend.
6335
f91b1629
JD
63362006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6337
6338 Don't apply the default %destructor/%printer to an unreferenced midrule
6339 value. Mentioned at
6340 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6341 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6342 like $@n instead of just @n so that the default %destructor/%printer
6343 logic doesn't see them as user-defined symbols.
6344 (symbol_is_dummy): Check for both forms of the name.
6345 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6346 name for which the midrule value is referenced in any action.
6347 * tests/actions.at (Default %printer and %destructor for mid-rule
6348 values): New test.
6349 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6350 for change to dummy symbol names.
6351
519d0004
JD
63522006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6353
6354 Warn about unset midrule $$ if the corresponding $n is used.
6355 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6356 $n usage.
6357 (packgram): Before invoking grammar_rule_check on any rule, make sure
6358 all actions have already been scanned in order to set `used' flags.
6359 Otherwise, checking that a midrule's $$ is set will not always work
6360 properly because the midrule check must forward-reference the midrule's
6361 parent rule.
6362 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6363 warning.
6364
a501eca9
JD
63652006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6366
6367 More improvements to the documentation of the prologue alternatives:
6368 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6369 Bison manual.
6370 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6371 some text to clarify the relative importance of the new directives and
6372 to show how these directives may be viewed as code labels.
6373
2cbe6b7f
JD
63742006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6375
6376 Similar to the recently removed %before-header, add %code-top as the
6377 alternative to the pre-prologue. Mentioned at
6378 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6379 Also, let the prologue alternatives appear in the grammar section.
6380 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6381 (prologue_declaration): Move the existing prologue alternatives to...
6382 (grammar_declaration): ... here and add %code-top.
6383 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6384
6385 Clean up and extend documentation for the prologue alternatives.
6386 * NEWS (2.3a+): Describe prologue alternatives.
6387 * doc/bison.texinfo (Prologue): Move discussion of prologue
6388 alternatives to...
6389 (Prologue Alternatives): ... this new section, and extend it to discuss
6390 all 4 directives in detail.
148d66d8
JD
6391 (Table of Symbols): Clean up discussion of prologue alternatives and
6392 add %code-top.
2cbe6b7f 6393
e557d3ea
JMG
63942006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6395
6396 DJGPP specific issues.
6397
6398 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6399 config.bat accordingly.
6400 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6401 * djgpp/config.site: Likewise.
6402
136a0f76
PB
64032006-10-16 Paolo Bonzini <bonzini@gnu.org>
6404
27bd5d67
PB
6405 Replace %*-header with %provides, %requires, %code. See discussion at
6406 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6407
136a0f76
PB
6408 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6409 (b4_user_start_header): Remove.
6410 * data/glr.c: Use new macros instead of b4_*start_header
6411 and b4_*end_header.
6412 * data/glr.cc: Likewise.
6413 * data/lalr1.cc: Likewise.
6414 * data/push.c: Likewise.
6415 * data/yacc.c: Likewise.
6416
6417 * doc/bison.texinfo: Remove %before-header, rename
6418 %{start,end,after}-header to %requires, %provides, %code.
6419
6420 * src/parse-gram.y: Likewise (also rename token names accordingly).
6421 * src/scan-gram.l: Likewise.
6422 * tests/actions.at: Likewise.
6423
10f429ef
PE
64242006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6425
6426 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6427 Problem reported by Joel E. Denny.
6428
64292006-10-14 Jim Meyering <jim@meyering.net>
6430
6431 (Sync from coreutils.)
6432 Work also when the working directory (with e.g. coreutils sources)
6433 is version controlled with git, rather than CVS.
6434 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6435 rather than CVS.
6436 In messages and comments, say e.g., "checked-out sources",
6437 rather than "CVS sources".
6438 (version_controlled_file): New function. Work for git as well as
6439 for CVS. Don't use grep's -q option.
6440 (slurp): Call it here, in place of CVS-specific code.
6441
c4bd5bf7
JD
64422006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6443
6444 Fix testsuite for ./configure --enable-gcc-warnings:
6445 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6446 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6447 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6448 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6449 * test/regression.at (Diagnostic that expects two alternatives):
6450 Likewise.
6451
46356ea4
PE
64522006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6453
231ed89a
PE
6454 * bootstrap.conf (gnulib_modules): Add config-h.
6455 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6456 worry about HAVE_CONFIG_H.
6457 * lib/abitset.c: Likewise.
6458 * lib/bitset.c: Likewise.
6459 * lib/bitset_stats.c: Likewise.
6460 * lib/bitsetv-print.c: Likewise.
6461 * lib/bitsetv.c: Likewise.
6462 * lib/ebitset.c: Likewise.
6463 * lib/get-errno.c: Likewise.
6464 * lib/lbitset.c: Likewise.
6465 * lib/subpipe.c: Likewise.
6466 * lib/timevar.c: Likewise.
6467 * lib/vbitset.c: Likewise.
6468 * lib/bitset.c: Include "bitset.h" first, to test interface.
6469 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6470 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6471 * lib/bitsetv.c: Include "bitsetv.h" first.
6472 * lib/get-errno.c: Include "get-errno.h" first.
6473 * m4/.cvsignore: Add config-h.m4.
6474 * tests/actions.at (Default %printer and %destructor for ...):
6475 Adjust expected line numbers in output to reflect removal of #if
6476 HAVE_CONFIG_H lines.
6477 * tests/glr-regression.at (Missed %merge type warnings when ...):
6478 Likewise.
6479 * tests/regression.at (Braced code in declaration in rules section):
6480 Likewise.
6481 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6482 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6483 Include <config.h> unconditionally.
6484
46356ea4
PE
6485 * bootstrap: Sync from coreutils, as follows:
6486
6487 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6488
6489 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6490 variable was sometimes used without being initialized. This
6491 messed up the installation of the INSTALL file in some cases.
6492
6493 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6494
6495 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6496 --copy. Inspired by a suggestion from Bruno Haible.
6497
6498 2006-10-03 Jim Meyering <jim@meyering.net>
6499
6500 * bootstrap: Undo last change to this file, since now gnulib-tool
6501 sticks with the automake default in generating dependencies.
6502
dd4bf078
PE
65032006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6504
cf2a5f7c
PE
6505 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6506 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6507
6508 * doc/bison.1: Add copyright notice.
6509
6510 * data/glr.c: Don't include <stdarg.h>; not used.
6511
35fe0834
PE
6512 * NEWS: The -g and --graph options now output graphs in Graphviz
6513 DOT format, not VCG format.
6514 * doc/bison.1: Likewise.
6515 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
6516 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6517 of this change in
6518 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
6519 * TODO: Remove Graphviz entry.
6520 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6521 remove vcg.c, vcg.h, vcg_defaults.h.
6522 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6523 * src/graphviz.c, src/graphviz.h: New files.
6524 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6525 * src/files.h: Make comment more generic.
6526 * src/main.c (main): Likewise.
6527 * src/print_graph.h: Likewise.
6528 * src/getargs.c (usage): Make usage description more generic.
6529 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6530 (static_graph, fgraph): Remove. All uses changed to pass
6531 arguments instead of sharing a static var.
6532 (print_core, print_actions, print_state, print_graph):
6533 Output graphviz format rather than VCG format.
6534 * tests/.cvsignore: Remove *.vcg; add *.dot.
6535 * tests/output.at: Expect *.dot files, not *.vcg files.
6536
dd4bf078
PE
6537 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6538 accommodates the 2006-10-08 change.
6539
efdd7421
PE
65402006-10-11 Bob Rossi <bob@brasko.net>
6541
6542 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6543 (b4_yyssa, b4_yyerror_range): New macros.
6544 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6545 (yypvarsinit): Remove init of removed fields.
6546 (yypushparse): Remove use of removed fields; use new macros instead.
6547
96a1981a
PE
65482006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6549
6550 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6551 in a push parser. Reindent slightly to match yacc.c better.
6552
65532006-10-11 Bob Rossi <bob@brasko.net>
6554
46356ea4
PE
6555 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6556 yymsg_alloc fields.
6557 (yypvarsinit, yypushparse): Remove init of removed fields.
6558 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 6559
c1630a8b
PE
65602006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6561
6562 * THANKS: Add Paolo Bonzini and Bob Rossi.
6563
90b9908d
PB
65642006-10-08 Paolo Bonzini <bonzini@gnu.org>
6565
6566 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6567 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6568 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6569 b4_define_user_cde and uses): Remove.
6570 (b4_comment, b4_prefix, b4_sync_start): New.
6571 * data/bison.m4: New file, with most of the content removed from c.m4.
6572 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6573 * src/output.c (output_skeleton): Pass bison.m4.
6574 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6575 only if specified.
6576
cf806753
PE
65772006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6578
6579 Fix test failure reported by Tom Lane in
6580 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6581 and try to make such failures easier to catch in the future.
6582 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6583 that's now the caller's responsibility.
6584 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6585 Set yychar = YYEOF if it's negative.
6586 * tests/actions.at (yylex): Abort if asked to read past EOF.
6587 * tests/conflicts.at (yylex): Likewise.
6588 * tests/cxx-type.at (yylex): Likewise.
6589 * tests/glr-regression.at (yylex): Likewise.
6590 * tests/input.at (yylex): Likewise.
6591 * tests/regression.at (yylex): Likewise.
6592 * tests/torture.at (yylex): Likewise.
6593
0e2f006a
PE
65942006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6595
6596 Fix problems with translating English-language diagnostics.
6597 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6598 respect to bison-runtime pot generation. The YY_ stuff
6599 wasn't being captured.
6600 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6601 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6602 * runtime-po/POTFILES.in: Add data/push.c.
6603
e3ddc1e3
PE
66042006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6605
6606 Merge bootstrap changes from coreutils.
6607
6608 2006-09-28 Jim Meyering <jim@meyering.net>
6609
6610 Automatically generated dependencies are important even
6611 when all of the sources in a directory come from gnulib.
6612 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6613 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6614
6615 2006-09-23 Jim Meyering <jim@meyering.net>
6616
6617 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6618
6619 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6620
6621 * bootstrap: Add support for --force.
6622 (usage): New function. Describe usage less tersely.
6623 (CVS_only_file): New var.
6624
01e972b3
PE
66252006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6626
6627 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6628 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6629 Adjust white space and comments to match GNU style better.
6630
c63d3e90
PE
66312006-09-20 Bob Rossi <bob@brasko.net>
6632
6633 * data/push.c (yyresult_get): Remove function.
6634 (YYPUSH_MORE): Add #define.
6635 (yypushparse): Modify return value.
6636
e70f46d1
PE
66372006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6638
6639 * stamp-h.in: Remove; no longer needed.
6640 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6641 Remove config.h, config.hin, intl (no longer created).
6642 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6643 stamp-h1.
6644
6645 Sync bootstrap from coreutils, as follows:
6646
6647 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6648
6649 * bootstrap (symlink_to_gnulib): New function.
6650 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6651 to copies-of-gnulib.
6652 (cp_mark_as_generated, slurp, gnulib_files):
6653 Avoid making a copy if it's the same as the old version.
6654 (gnulib_files): Add support for this variable (used by Bison).
6655
a92be413
PE
66562006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6657
6658 * src/getargs.c (usage): Rework to use conventions similar to
6659 coreutils, to make translation a bit easier and the code a bit
6660 smaller. Problem reported by Tim Van Holder.
6661
4f82b42a
PE
66622006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6663
3b2942e6
PE
6664 Use some of gnulib's new modules, taken from coreutils.
6665
6666 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6667 * bootstrap.conf: New file.
6668 (gnulib_modules): Add configmake, inttypes, unistd.
6669 (XGETTEXT_OPTIONS): Add complain, complain_at,
6670 fatal, fatal_at, warn, warn_at, unexpected_end.
6671 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6672 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6673 (gl_EARLY): Add.
6674 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6675 (gl_INIT): Add
6676 (GNULIB_AUTOCONF_SNIPPET): Remove.
6677 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6678 the pickiest.
6679 * lib/.cvsignore: Add inttypes_.h.
6680 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6681 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6682 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6683 no-longer-necessary initializations.
6684 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6685 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6686 use the unistd module.
6687 * src/system.h: Likewise.
6688 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6689 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6690 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6691 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6692 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6693 * src/system.h: Include inttypes.h unconditionally, now that we
6694 use the inttypes module. Don't bother to include stdint.h, since
6695 inttypes.h now does that for us.
6696 (LOCALEDIR): Remove, now that we use the configmake module.
6697 * src/getargs.c: Include configmake.h.
6698 * src/main.c: Likewise.
6699 * src/output.c: Likewise.
6700 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6701 not from $abs_top_builddir, since config.h moved.
6702
6703
4f82b42a
PE
6704 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6705 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6706
6707 * src/parse-gram.y (symbol_declaration): Don't put statements
6708 before declarations; it's not portable to C89.
6709 * src/scan-code.l (handle_action_at): Likewise.
6710
6711 * src/scan-code.l: Always initialize braces_level; the old code
6712 left it uninitialized and therefore had undefined behavior.
6713
6714 Don't attempt to redefine 'assert', since it runs afoul of
6715 systems where standard headers (mistakenly) include <assert.h>.
6716 Instead, define and use our own alternative, called 'aver'.
6717 * src/reader.c: Don't include assert.h, since we no longer
6718 use assert.
6719 * src/scan-code.l: Likewise.
6720 * src/system.h (assert): Remove, replacing with....
6721 (aver): New function, taking a bool arg. All uses changed.
6722 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6723 not merely an integer.
6724
31c10e38
PE
67252006-09-15 Bob Rossi <bob@brasko.net>
6726
e5926647
JD
6727 Add support for push parsing. Based on the original work of
6728 Odd Arild Olsen <oao@fibula.no>.
31c10e38
PE
6729 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6730 * data/c.m4 (YYPUSH): New.
6731 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
e5926647 6732 * data/push.c: New file.
31c10e38
PE
6733 * src/getargs.c (push_parser): New var.
6734 * src/getargs.h (push_parser): New declaration.
6735 * src/output.c (prepare): Add macro insertion of `push_flag'.
6736 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6737 (prologue_declaration): Parse %push-parser.
6738 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6739 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6740 list of removed lines from the traces observed.
6741 (AT_CHECK_CALC_LALR): Added push parser tests.
6742
fa7b79c0
PE
67432006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6744
21fe08ca
PE
6745 * NEWS: Version 2.3a.
6746 * configure.ac (AC_INIT): Likewise.
6747
e8ec4d9b
PE
6748 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6749 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6750 due to header ordering dependencies. I don't know why the #define
6751 was there.
6752
fa7b79c0
PE
6753 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6754 runtime cost when YYDEBUG is not defined, and so that some tests
6755 that used to fail now work. Problem and initial suggestion by
6756 Paolo Bonzini.
6757 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6758 * data/glr.cc (b4_parser_class_name):
6759 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6760 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6761 (yydebug_) [YYDEBUG]: New member.
6762 (yycdebug_): Now defined only if YYDEBUG.
6763 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6764 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6765 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6766 if YYYDEBUG.
6767 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6768 Define only if YYDEBUG.
6769 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6770 set_debug_level.
6771 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6772 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6773 AT_CHECK_CALC_GLR_CC that are working now.
6774
4ec13d60
PE
67752006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6776
6777 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6778 We don't need them in glr.cc, and glr.c defines them.
6779 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6780 assumes that defining it to anything is the same as defining
6781 it to 1. Problem reported by Paolo Bonzini.
6782
8e1687ae
PE
67832006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6784
6785 * data/c.m4 (b4_null, b4_case): Define.
6786 * src/output.c (prepare_symbols): Use b4_null.
6787 (user_actions_output): Use b4_case.
6788
3dc5e96b
PE
67892006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6790
aef3da86
PE
6791 * data/glr.c (b4_shared_declarations): Put start-header first,
6792 before any #includes that we generate, so that feature-test
6793 macros work. Problem reported by Michael Deutschmann in
6794 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6795 * data/lalr1.cc: Likewise.
6796 * doc/bison.texinfo (Prologue): Document that feature-test macros
6797 should be defined before any Bison declarations.
6798 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6799 that depend on location.hh after, not before, Bison decls, since
6800 we now include location.hh after the first user prologue.
6801
3dc5e96b
PE
6802 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6803 Sander Brandenburg in
6804 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6805 Also, fix minor white space and comment issues.
aef3da86
PE
6806 (Prologue): Mention that it's better to define feature-test macros
6807 before Bison declarations. Problem reported by Michael Deutschmann.
6808
6809 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6810 by Jim Meyering.
6811 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6812 This adjusts to recent gnulib changes.
3dc5e96b 6813
b2a0b7ca
JD
68142006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6815
6816 Finish implementation of per-type %destructor/%printer. Discussed
6817 starting at
6818 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6819 and
6820 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6821 * NEWS (2.3+): Add a description of this feature to the default
6822 %destructor/%printer description.
6823 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6824 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6825 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6826 list node contains a semantic type.
6827 * src/symtab.c, src/symtab.h: Extend with a table that associates
6828 semantic types with their %destructor's and %printer's.
6829 (semantic_type_from_uniqstr, semantic_type_get,
6830 semantic_type_destructor_set, semantic_type_printer_set): New functions
6831 composing the public interface of that table.
6832 (symbol_destructor_get, symbol_destructor_location_get,
6833 symbol_printer_get, symbol_printer_location_get): If there's no
6834 per-symbol %destructor/%printer, look up the per-type before trying
6835 the default.
6836 * tests/actions.at (Per-type %printer and %destructor): New test case.
6837 * tests/input.at (Default %printer and %destructor redeclared):
6838 Extend to check that multiple occurrences of %symbol-default in a
6839 single %destructor/%printer declaration is an error.
6840 (Per-type %printer and %destructor redeclared, Unused values with
6841 per-type %destructor): New test cases.
6842
3be03b13
JD
68432006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6844
6845 Require default %destructor/%printer to be declared using
6846 %symbol-default instead of an empty symbol list, and start working on
6847 new per-type %destructor/%printer. Discussed at
6848 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6849 * NEWS (2.3+): Add %symbol-default to example.
6850 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 6851 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
6852 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6853 (generic_symlist, generic_symlist_item): New nonterminals for creating
6854 a list in which each item is a symbol, semantic type, or
6855 %symbol-default.
6856 (grammar_declaration): Use generic_symlist in %destructor and %printer
6857 declarations instead of symbols.1 or an empty list.
6858 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6859 for changes to symbol_list.
6860 * src/reader.c: Update for changes to symbol_list.
6861 * src/scan-code.l: Likewise.
6862 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6863 * src/symlist.c, src/symlist.h: Extend such that a list node may
6864 represent a semantic type or a %symbol-default in addition to just an
6865 ordinary symbol. Add switched functions for setting %destructor's and
6866 %printer's.
6867 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6868 %destructor/%printer declarations.
6869
3508ce36
JD
68702006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6871
6872 Whether the default %destructor/%printer applies to a particular symbol
6873 isn't a question of whether the user *declares* that symbol (in %token,
6874 for example). It's a question of whether the user by any means
6875 *defines* the symbol at all (by simply using a char token, for
6876 example). $end is defined by Bison whereas any other token with token
6877 number 0 is defined by the user. The error token is always defined by
6878 Bison regardless of whether the user declares it with %token, but we
6879 may one day let the user define error as a nonterminal instead.
6880 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6881 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6882 the meaning of "user-defined".
6883 * tests/actions.at (Default %printer and %destructor for user-declared
6884 end token): Rename to...
6885 (Default %printer and %destructor for user-defined end token): ...
6886 this.
6887
6888 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6889 computation of whether to apply the default, don't maintain a list of
6890 every Bison-defined symbol. Instead, just check for a first character
6891 of '$', which a user symbol cannot have, and check for the error token.
6892
9350499c
JD
68932006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6894
6895 Don't apply the default %destructor or %printer to the error token,
6896 $undefined, or $accept. This change fits the general rule that the
6897 default %destructor and %printer are only for user-declared symbols,
6898 and it solves several difficulties that are described in the new test
6899 cases listed below.
6900 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6901 * tests/actions.at (Default %printer and %destructor are not for error
6902 or $undefined, Default %printer and %destructor are not for $accept):
6903 New test cases.
6904
4d7370cb
JD
69052006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6906
6907 Allow %start after the first rule.
6908 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6909 when parsing the first rule.
6910 (check_and_convert_grammar): Search for it here after all grammar
6911 declarations have been parsed. Skip midrules, which have dummy LHS
6912 nonterminals.
6913 * src/symtab.c (symbol_is_dummy): New function.
6914 * src/symtab.h (symbol_is_dummy): Declare it.
6915 * tests/input.at (%start after first rule): New test.
6916
6d0ef4ec
JD
69172006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6918
6919 Redo some of the previous commit: add back the ability to use
6920 non-aliased/undeclared string literals since it might be useful to
6921 those declaring %token-table.
6922 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6923 commit: don't worry about complaints from symbols_pack.
6924 * src/symtab.c (symbol_new, symbol_class_set,
6925 symbol_check_alias_consistency): Undo changes in previous commit: count
6926 each string literal as a new symbol and token, assign it a symbol
6927 number, and don't complain about non-aliased string literals.
6928 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6929 and token counts but does still set aliased tokens to the same number,
6930 symbol_pack_processor now leaves empty slots in the symbols array.
6931 Remove those slots.
6932 * tests/regression.at (Undeclared string literal): Remove test case
6933 added in previous commit since non-aliased string literals are allowed
6934 again.
6935 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6936 remove unnecessary string literal declarations.
6937 * tests/sets.at (Firsts): Likewise.
6938
965537bc
JD
69392006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6940
6941 Don't allow an undeclared string literal, but allow a string literal to
6942 be used before its declaration.
6943 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6944 symbols_pack complained.
6945 * src/symtab.c (symbol_new): Don't count a string literal as a new
6946 symbol.
6947 (symbol_class_set): Don't count a string literal as a new token, and
6948 don't assign it a symbol number since symbol_make_alias does that.
6949 (symbol_make_alias): It's not necessary to decrement the symbol and
6950 token counts anymore. Don't assume that an alias declaration occurs
6951 before any uses of the identifier or string, and thus don't assert that
6952 one of them has the highest symbol number so far.
6953 (symbol_check_alias_consistency): Complain if there's a string literal
6954 that wasn't declared as an alias.
6955 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6956 symbol_pack asserts that every token has been assigned a symbol number
6957 although undeclared string literals have not.
6958 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 6959 string literal): New test cases.
965537bc
JD
6960 (Characters Escapes, Web2c Actions): Declare string literals as
6961 aliases.
6962 * tests/sets.at (Firsts): Likewise.
6963
47aee066
JD
69642006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6965
6966 In the grammar scanner, STRING_FINISH unclosed constructs and return
6967 them to the parser in order to improve error messages.
6968 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6969 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6970 * tests/input.at (Unclosed constructs): New test case.
6971 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6972 seen.
6973
6974 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6975 unused global.
6976
1f6b3679
JD
69772006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6978
6979 Handle string aliases for character tokens correctly.
6980 * src/symtab.c (symbol_user_token_number_set): If the token has an
6981 alias, check and set its alias's user token number instead of its own,
6982 which is set to indicate the alias. Previously, every occurrence of
6983 the character token in the grammar overwrote that alias indicator with
6984 the character code.
6985 * tests/input.at (String aliases for character tokens): New test.
6986
219741d8
JD
69872006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6988
6989 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6990
11daa4e7
PE
69912006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6992
6993 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6994 to prevent failures when building on older platforms.
6995 Check for autopoint failure.
6996 Set XGETTEXT_OPTIONS to values that check for C format strings,
6997 so that translators are warned about them (this also helps
6998 prevent core dumps).
6999
7000 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7001 function, since it simplifies our code a bit.
7002
7003 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7004 rather than -W, so we don't get bogus warnings about sign comparisons.
7005 Add -Wpointer-arith, since that warning is useful (it reports code
7006 that does not conform to C89 and that some compilers reject).
7007 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7008 since it's no longer needed.
7009
f9bfc42a
JD
70102006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7011
7012 Clean up scanners a bit.
7013 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7014 definitions so gcc won't warn when obstack_for_string is unused.
7015 * src/scan-code.l: config.h and system.h are already #include'd by
7016 scan-code-c.c, so get rid of them here.
7017 * src/scan-gram.l: Likewise.
7018 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7019 definitions rather than duplicating the rest of it.
7020 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7021
06e8700a
JD
70222006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7023
7024 Suppress signed/unsigned comparison warnings for yycheck.
7025 * data/c.m4 (b4_safest_int_type): New macro.
7026 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7027 a signed int type, cast it to b4_safest_int_type first.
7028 * data/yacc.c: Likewise.
7029 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7030 also overwritten.
7031
9c437126
PE
70322006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7033
7034 * doc/bison.texinfo: Fix some typos.
7035
284d8a13
PE
70362006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7037
7038 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7039 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7040
7041 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7042 the latest gnulib does this a different way.
7043 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7044 translation was patched, so stop omitting it.
7045
ec5479ce
JD
70462006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7047
7048 Enable declaration of default %printer/%destructor. Make the parser
7049 use these for all user-declared grammar symbols for which the user does
7050 not declare a specific %printer/%destructor. Thus, the parser uses it
7051 for token 0 if the user declares it but not if Bison generates it as
7052 $end. Discussed starting at
7053 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7054 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7055 and
7056 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7057 * NEWS (2.3+): Mention.
7058 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7059 declare a %destructor for a mid-rule's semantic value. It's just
7060 impossible to declare one specific to it.
7061 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7062 code. Describe default %destructor form.
7063 * src/parse-gram.y (grammar_declaration): Parse default
7064 %printer/%destructor declarations.
7065 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7066 and symbol_destructor_location_get rather than accessing the destructor
7067 and destructor_location members of struct symbol.
7068 (symbol_printers_output): Likewise but for %printer's.
7069 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7070 again.
7071 * src/symtab.c (default_destructor, default_destructor_location,
7072 default_printer, default_printer_location): New static global
7073 variables to record the default %destructor and %printer.
7074 (symbol_destructor_get, symbol_destructor_location_get,
7075 symbol_printer_get, symbol_printer_location_get): New functions to
7076 compute the appropriate %destructor and %printer for a symbol.
7077 (default_destructor_set, default_printer_set): New functions to set the
7078 default %destructor and %printer.
7079 * src/symtab.h: Prototype all those new functions.
7080 * tests/actions.at (Default %printer and %destructor): New test to
7081 check that the right %printer and %destructor are called, that they're
7082 not called for $end, and that $$ and @$ work correctly.
7083 (Default %printer and %destructor for user-declared end token): New
7084 test to check that the default %printer and %destructor are called for
7085 a user-declared end token.
7086 * tests/input.at (Default %printer and %destructor redeclared, Unused
7087 values with default %destructor): New tests to check related grammar
7088 warnings and errors.
7089
868d2d96
JD
70902006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7091
7092 Clean up handling of %destructor for the end token (token 0).
7093 Discussed starting at
7094 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7095 and
7096 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7097
7098 Make the skeletons consistent in how they pop the end token and invoke
7099 its %destructor.
7100 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7101 state, which has token number 0, since this would invoke the
7102 %destructor for the end token.
7103 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7104 until after shifting the end token, or else it won't be popped.
7105 * data/yacc.c (yyparse): Likewise.
7106
7107 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7108 it's the end token. Upon termination, destroy an unshifted lookahead
7109 even when it's the end token.
7110 * data/lalr1.cc (yy::parser::parse): Likewise.
7111 * data/yacc.c (yyparse): Likewise.
7112
7113 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7114 value warnings for the end token when the user gives the end token a
7115 %destructor.
7116
7117 * tests/actions.at (Printers and Destructors): Test all the above.
7118
62a9592d
PE
71192006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7120
7121 Update to latest gnulib and gettext versions.
7122 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7123 Add fopen-safer.
7124 (gnulib_files): Add m4/warning.m4. Don't worry about files
7125 overwritten by autopoint.
7126 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7127 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7128 rejects them.
7129 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7130 so that we can remove the intl files at a better time.
7131 (intl_files_to_remove): Remove aclocal.m4, since it gets
7132 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7133 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7134 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7135 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7136 Remove datarootdir hack; no longer needed.
7137 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7138 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7139 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7140 strdup.h.
7141 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7142 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7143
10d6970f
PE
71442006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7145
7146 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7147 it with --assume-autoconf='latest-stable'.
7148
50a33993
JD
71492006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7150
7151 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7152 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7153 YYSTYPE' and `{'.
7154 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7155 those from muscle_tab.c since the old ones are misleading.
7156
2ce4ed68
AD
71572006-07-13 Akim Demaille <akim@epita.fr>
7158
7159 Support %define "KEY" {VALUE}.
7160 * src/scan-code.h, src/scan-code.l (translate_action)
7161 (translate_rule_action, translate_symbol_action, translate_code):
7162 Return char *, not const char *.
7163 * src/parse-gram.y (declaration): Rename as...
7164 (prologue_declaration): this.
7165 (string_content): Remove this nonterminal, use STRING.
7166 (braceless, content, content.opt): New nonterminal.
7167 Use them.
7168 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7169 as value.
7170 * src/scan-gram.l (getargs.h): Don't include it.
7171
db7e5eb5
PE
71722006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7173
7174 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7175 rather than a for-loop that declares a local bool variable. This
7176 should work around a compatibility problem with a Cray x1e C++
7177 compiler reported by Hung Nguyen in
7178 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7179 The for-loop was introduced in the 2004-11-17 change but I don't
7180 know why it was needed.
7181
a5d80ba5
AD
71822006-07-12 Akim Demaille <akim@epita.fr>
7183
7184 * data/c.m4: Comment changes.
7185
23eb2a69
AD
71862006-07-10 Akim Demaille <akim@lrde.epita.fr>
7187
7188 * src/complain.c (error_message, ERROR_MESSAGE): New.
7189 To factor...
7190 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7191 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7192
ddc8ede1
PE
71932006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7194
7195 * NEWS: Instead of %union, you can define and use your own union type
7196 YYSTYPE if your grammar contains at least one <type> tag.
7197 Your YYSTYPE need not be a macro; it can be a typedef.
7198 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7199 (Union Decl, Decl Summary): Document this.
7200 * data/glr.c (YYSTYPE): Implement this.
7201 * data/glr.cc (YYSTYPE): Likewise.
7202 * data/lalr1.cc (YYSTYPE): Likewise.
7203 * data/yacc.c (YYSTYPE): Likewise.
7204 * src/output.c (prepare): Output tag_seen_flag.
7205 * src/parse-gram.y (declaration, grammar_declaration):
7206 Use 'union_seen' rather than 'typed' to determine whether
7207 %union has been seen, since grammars can now be typed without
7208 %union.
7209 (symbol_declaration, type.opt, symbol_def):
7210 Keep track of whether a tag has been seen.
7211 * src/reader.c (union_seen, tag_seen): New vars.
7212 (typed): remove.
7213 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7214 * src/scan-code.l (untyped_var_seen): New variable.
7215 (handle_action_dollar): Adjust to above changes.
7216 (handle_action_dollar, handle_action_at):
7217 Improve overflow checking for outlandish numbers.
7218 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7219 avoid new diagnostics generated by above changes.
7220 * tests/regression.at (YYSTYPE typedef): Add test to check
7221 for type tags without %union.
7222
7223 * src/symlist.c (symbol_list_length): Return int, not unsigned
7224 int, since callers expect int. This may need to get revisited
7225 once we have proper integer overflow checking.
7226
7227 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7228 object is now static.
7229
7230 * src/getargs.c (flags_argmatch): Return void, not int,
7231 to pacify ./configure --enable-gcc-warnings.
7232
7233 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7234 since last_string is already defined to FLEX_PREFIX (last_string).
7235
7b42569e
AD
72362006-07-09 Akim Demaille <akim@lrde.epita.fr>
7237
7238 Implement --warnings/-W.
7239 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7240 replaced by...
7241 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7242 Adjust callers.
7243 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7244 (warnings_args, warnings_types): New.
7245 (getargs, short_options, long_options): Accept -W/--warnings.
7246 Sort the options by alphabetical order, upper case letter right
7247 before its lower case.
7248
3b452f4e
JD
72492006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7250
7251 Change %merge result type clash warnings to errors. Discussed at
7252 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7253 * src/reader.c (record_merge_function_type): Use complain_at.
7254 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7255 declared later): Update test case results.
7256
b8a41559
AD
72572006-07-09 Akim Demaille <akim@lrde.epita.fr>
7258
7259 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7260 to be in alphabetical order.
7261 (trace_args): Spelling fixes.
7262
cd9e1ba2
PE
72632006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7264
7265 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7266 so they don't collide with user-defined macros.
7267 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7268 this was never guaranteed, and now that we're using gnulib stdint,
7269 which defines int_fast16_t to long int, the problem is exposed.
7270
cb48f191
PE
72712006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7272
b8445a15
PE
7273 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7274 need the full POSIX semantics (and weren't implementing them
7275 anyway).
7276
cb48f191
PE
7277 Adjust to Autoconf 2.60 and today's gnulib.
7278 * bootstrap (gnulib_modules): Add stdint.
7279 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7280 no longer copies it.
7281 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7282 since stdint needs the former and wcwidth (which is now required
7283 by mbswidth) needs the latter.
7284 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7285 work around a compatibility glitch between gettext 0.14.6 and
7286 Autoconf 2.60.
7287 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7288 Do not check for uintptr_t, since new stdint module does the right
7289 thing.
7290 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7291 Add stdint.h, stdint_.h, wcwidth.h.
7292 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7293 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7294 stdint.m4, wchar_t.m4, wcwidth.m4.
7295 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7296 usual order for ../lib/*.h files.
7297 (file_name_split): Use last_component, not base_name, to adjust
7298 to gnulib changes.
7299 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7300 for ../lib/*.h files.
7301 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7302 Define unconditionally, since we now assume the stdint module.
7303 * src/scan-skel.l: Include <dirname.h>.
7304 (BASE_QPUTS): Use last_component, not base_name.
7305 * src/system.h: Include <unlocked-io.h> in the usual order
7306 for ../lib/*.h files. Include <stdint.h> unconditionally,
7307 since we now use the stdint module.
7308 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7309 HAVE_UINTPTR_T, since we now use the stdint module.
7310 (base_name): Remove decl, since files now include <dirname.h>
7311 to get the decl.
7312
cd48d21d
AD
73132006-07-08 Akim Demaille <akim@lrde.epita.fr>
7314
7315 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7316 New, default to 1.
7317 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7318 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7319 default.
7320 * tests/calc.at: Adjust.
7321
8ec0a172
AD
73222006-07-08 Akim Demaille <akim@lrde.epita.fr>
7323
b8445a15 7324 * data/c.m4 (b4_basename): New.
8ec0a172
AD
7325 (b4_syncline): Also output the location of its invocation (from
7326 the skeleton).
7327 (b4_user_action, b4_define_user_action, b4_user_actions)
7328 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7329 (b4_user_stype): New.
7330 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7331
4a678af8
JD
73322006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7333
7334 In the grammar file, the first column is 1 not 0 on the first line as
7335 on every other line.
7336 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7337 * tests/input.at (Torturing the Scanner): Update output.
7338
7339 * src/scan-gram.l (scanner_cursor): Declare it static.
7340
dd60572a
JD
73412006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7342
7343 In warnings, say "previous declaration" rather than "first
7344 declaration".
7345 * src/symtab.c (redeclaration): Do that here.
7346 * src/reader.c (record_merge_function_type): In the case of a result
7347 type clash, report the previous declaration rather than the very first
7348 one in the grammar file.
7349 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7350 declared later): Add a third declaration to check this behavior.
7351 * tests/input.at (Incompatible Aliases): Update output.
7352
2073e1b6
AD
73532006-06-27 Akim Demaille <akim@epita.fr>
7354
7355 * doc/Doxyfile.in: New.
7356 * doc/Makefile.am: Use it.
7357 * src/lalr.h, src/symtab.h: Initial doxygenation.
7358
8ee5b538
JD
73592006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7360
7361 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
7362 declared after the %merge. This continues the effort of the previous
7363 patch.
8ee5b538
JD
7364 * src/reader.c (get_merge_function): Don't set the merger type yet.
7365 (record_merge_function_type): New function for setting the merger type
7366 and checking for clashes.
7367 (grammar_current_rule_merge_set): Set the location of the %merge for
7368 the current rule.
7369 (packgram): Invoke record_merge_function_type for each rule now that
7370 all symbol type declarations have been parsed.
7371 * src/reader.h (merger_list.type_declaration_location): New member
7372 storing the location of the first %merge from which the type for this
7373 merging function was derived.
7374 * src/symlist.h (symbol_list.merger_declaration_location): New member
7375 storing the location of a rule's %merge, if any.
7376 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7377 declared later): New test to catch the error fixed by the above patch.
7378
ffa4ba3a
JD
73792006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7380
7381 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
7382 declarations appear after the rules. Discussed at
7383 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7384 and
7385 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7386 Don't mistake the type of $$ in a midrule to be that of its parent
7387 rule's $$.
ffa4ba3a
JD
7388 * src/reader.c (grammar_current_rule_end): Don't invoke
7389 grammar_rule_check yet since not all symbol declarations may have been
7390 parsed yet.
7391 (grammar_midrule_action): Likewise.
7392 Don't record whether the midrule's $$ has been used yet since actions
7393 haven't been translated yet.
7394 Record the midrule's parent rule and its RHS index within the parent
7395 rule.
7396 (grammar_current_rule_action_append): Don't translate the action yet
7397 since not all symbol declarations may have been parsed yet and, thus,
7398 warnings about types for $$, $n, @$, and @n can't be reported yet.
7399 (packgram): Translate the action and invoke grammar_rule_check now that
7400 all symbol declarations have been parsed.
7401 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7402 after parsing the entire grammar file, the symbol list here in the case
7403 of a midrule is actually the midrule's empty RHS, so reference its
7404 parent rule's RHS where necessary.
7405 On the other hand, now that you can already know it's a midrule, you
7406 aren't forced to think $$ has the same type as its parent rule's $$.
7407 (handle_action_at): In the case of a midrule, reference the parent rule
7408 where necessary.
7409 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7410 members.
7411 (symbol_list_length): Now that this is invoked after all rules have
7412 been parsed, a NULL symbol (rather than a NULL symbol list node)
7413 terminates a rule. symbol_list_print already does this correctly.
7414 * src/symlist.h (symbol_list.midrule_parent_rule,
7415 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7416 remember their relationships with their parents.
7417 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7418 fixed by the above patch.
7419 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7420 implementing...
7421 (Unused values): ... this old test case and...
7422 (Unused values before symbol declarations): ... this new test case.
7423 This one is the same as `Unused values' except that all symbol
7424 declarations appear after the rules in order to catch the rest of the
7425 errors fixed by the above patch.
7426
e256e17f
JD
74272006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7428
300a1930
JD
7429 More cleanup.
7430 * src/reader.c (current_rule): Declare it static since it's no longer
7431 used outside this file.
7432 (grammar_current_rule_action_append): Remove redundant arguments from
7433 translate_rule_action invocation.
7434 * src/reader.h (current_rule): Remove this unused extern.
7435 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7436 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 7437
381ecb06
JD
74382006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7439
7440 Clean up yesterday's patch.
7441 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7442 to...
7443 * src/reader.c (grammar_current_rule_action_append): ... here for
7444 consistency with grammar_current_rule_symbol_append.
7445 * tests/regression.at (Braced code in declaration in rules section):
7446 Make yyerror and yylex static as usual.
7447
4210cd0b
JD
74482006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7449
7450 Fix bug that mistakes braced code in a declaration in the rules section
7451 to be a rule action. Mentioned at
7452 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7453 * src/scan-gram.l: Move midrule action detection from the start of the
7454 scanning of any braced code to...
7455 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7456 action. For readability, use $2 and @2 rather than the equivalent
7457 global variables.
7458 * tests/regression.at (Braced code in declaration in rules section):
7459 New test to catch the error fixed by the above patch.
7460
7461 Work on code readability some.
7462 * src/scan-code.l (current_rule): Get rid of this misleading and
7463 redundant declaration: it's actually extern'ed in reader.h.
7464 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7465 translate_action): Add a rule argument and use it instead of the global
7466 current_rule.
7467 (translate_rule_action): This already receives current_rule through an
7468 argument, so pass it on to translate_action instead of assigning
7469 current_rule to current_rule.
7470 (translate_symbol_action, translate_code): Pass rule = NULL to
7471 translate_action.
7472
34f98f46
JD
74732006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7474
7475 Rename %before-definitions to %start-header and %after-definitions to
7476 %end-header. Don't use these declarations to separate pre-prologue
7477 blocks from post-prologue blocks. Add new order-independent
7478 declarations %before-header and %after-header as alternatives to the
7479 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7480 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7481 * NEWS (2.3+): Update for these changes.
7482 * data/glr.c (b4_before_definitions): Update to...
7483 (b4_start_header): ... this.
7484 (b4_after_definitions): Update to...
7485 (b4_end_header): ... this.
7486 * data/glr.cc: Likewise.
7487 * data/lalr1.cc: Likewise.
7488 * data/yacc.c: Likewise.
7489 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7490 prologue blocks with %*-header declarations.
7491 (Calc++ Parser): Likewise.
91661ebb 7492 (Decl Summary): Update names.
148d66d8 7493 (Table of Symbols): Update description.
34f98f46
JD
7494 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7495 (PERCENT_END_HEADER): ... this.
7496 (PERCENT_BEFORE_DEFINITIONS): Update to...
7497 (PERCENT_START_HEADER): ... this.
7498 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7499 (declaration): Update token names and m4 macro names.
7500 When parsing %end-header and %start-header, invoke translate_code
7501 before muscle_code_grow, and no longer set global booleans to remember
7502 whether these declarations have been seen.
7503 Parse new %after-header and %before-header.
7504 * src/reader.c (before_definitions, after_definitions): Remove.
7505 (prologue_augment): Accept a new bool argument to specify whether to
7506 augment the pre-prologue or post-prologue.
7507 * src/reader.h (before_definitions, after_definitions): Remove these
7508 extern's.
7509 (prologue_augment): Add new bool argument.
7510 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7511 (PERCENT_END_HEADER): ... this.
7512 (PERCENT_BEFORE_DEFINITIONS): Update to...
7513 (PERCENT_START_HEADER): ... this.
7514 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7515 * tests/actions.at (Printers and Destructors): Update names.
7516
31b2b07e
JD
75172006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7518
7519 Add comparison operators for C++ location classes. Discussed at
7520 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7521 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7522 declaration indicating whether filename_type has an operator==. If
7523 filename_type is `std::string', it defaults to `1', `0' otherwise.
7524 * data/location.cc: Iff b4_define_location_comparison is `1', add
7525 operator== and operator!= for class position and for class location.
7526
7527 Some minor fixes.
7528 * src/scan-action.l: Remove unused file.
7529 * src/symtab.c (symbol_printer_set): Use printer_location not
7530 destructor_location.
7531 * src/symtab.h (struct symbol): Replace incorrect source comment for
7532 printer members.
7533 * tests/input.at (Incompatible Aliases): Update output with correct
7534 printer location.
7535
9bc0dd67
JD
75362006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7537
7538 Don't put the pre-prologue in the header file. For the yacc.c code
7539 file and the glr.c header and code files, move the pre-prologue before
7540 the token definitions. Add new %before-definitions and
7541 %after-definitions to declare code that will go in both the header file
7542 and code file. Discussed at
7543 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7544 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7545 and
7546 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7547 * NEWS (2.3+): Describe these changes.
7548 * data/glr.c (b4_pre_prologue): Move from within to before...
7549 (b4_shared_declarations): ... this.
7550 Add new b4_before_definitions before b4_token_enums.
7551 Add new b4_after_definitions at the end.
7552 * data/glr.cc (b4_pre_prologue): Replace with...
7553 (b4_before_definitions): ... this in the header file.
7554 (b4_after_definitions): New near the end of the header file.
7555 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7556 code file right before including the header file.
7557 (b4_before_definitions): New in the previous position of
7558 b4_pre_prologue in the header file.
7559 (b4_after_definitions): New near the end of the header file.
7560 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7561 (b4_token_enums_defines): In the code file, move to right before
7562 YYSTYPE for consistency with the header file.
7563 (b4_before_definitions): New right before b4_token_enums_defines in
7564 both the header and code file.
7565 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7566 header and code file.
7567 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7568 of prologues for %union dependencies.
91661ebb
JD
7569 (Decl Summary): In %defines description, mention the effect of
7570 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
7571 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7572 than in the pre-prologue so that make check succeeds.
148d66d8 7573 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
7574 %after-definitions.
7575 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7576 %before-definitions.
7577 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7578 (declaration): Parse those declarations and append to
7579 b4_before_definitions and b4_after_definitions, respectively.
7580 * src/reader.c (before_definitions, after_definitions): New bools to
7581 track whether those declarations have been seen.
7582 (prologue_augment): Add to the post-prologue if %union,
7583 %before-definitions, or %after-definitions has been seen.
7584 * src/reader.h (before_definitions, after_definitions): New extern's.
7585 * src/scan-gram.l: Scan the new declarations.
7586 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7587 prologue block in a %before-definitions or a %after-definitions based
7588 on whether the %union is declared.
7589 * tests/regression.at (Early token definitions with --yacc, Early token
7590 definitions without --yacc): Move tests for token definitions into the
7591 post-prologue since token names are no longer defined in the
7592 pre-prologue.
7593
203b9274
AD
75942006-06-20 Akim Demaille <akim@epita.fr>
7595
7596 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7597 (symbol_get): Use it.
7598 * src/parse-gram.y: Use it.
7599
a7ee59cf
JD
76002006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7601
7602 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7603 build succeeds when configured with --enable-gcc-warnings.
7604
5a2baae7
PE
76052006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7606
33ad1a9c
PE
7607 * src/parse-gram.y (char_name): New function.
7608 (CHAR, STRING, string_content): For %printer, properly escape.
7609 (ID): Prefer fputs to fprintf.
7610 (id): Reindent to be consistent with other rules.
7611 Properly quote char.
7612
5a2baae7
PE
7613 The Translation Project changed its way of publishing translations
7614 to maintainers. I haven't received any responses to my request
7615 for supporting the old way, or for documenting the new way. I
7616 have modified 'bootstrap' to use screen scraping
7617 (in this case, HTML scraping). This is unreliable and inelegant,
7618 but I don't see any better way. Yuck.
7619 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7620 (get_translations): New function, which uses HTML scraping to
7621 deduce locations of latest translations.
7622 Use this function to grab both bison and bison-runtime .po files.
7623 Don't bother priming the pump for the runtime-po domain any more,
7624 as it's now translated better than bison is.
7625
58d7a1a1
AD
76262006-06-19 Akim Demaille <akim@epita.fr>
7627
7628 * src/scan-gram.l: No longer "parse" things after `%union' until
7629 `{'. Rather, return a single "%union" token.
7630 No longer make symbols: return strings, and leave the conversion
7631 to symbols to the parser.
7632 (SC_PRE_CODE, token_type): Remove.
7633 * src/parse-gram.y (%union): New field `character'.
7634 Sort tokens.
7635 (CHAR): New token.
7636 (ID, ID_COLON): Now that the scanner no longer makes them
7637 identifiers, adjust all uses to invoke symbol_get.
7638 (id_colon): New, wraps the conversion from string to symbol.
7639 (%union): Accept a possible union_name.
7640 (symbol): Now can be a char.
7641 * data/c.m4 (b4_union_name): Leave a default value.
7642 * data/glr.c, data/yacc.c: Use it.
7643
b931235e
JD
76442006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7645
7646 For associating token numbers with token names for "yacc.c", don't use
7647 #define statements unless `--yacc' is specified; always use enum
7648 yytokentype. Most important discussions start at:
7649 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7650 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7651 and
7652 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7653 * NEWS (2.3+): Mention.
7654 * data/c.m4 (b4_yacc_if): New.
7655 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7656 token #define's.
7657 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7658 on token name definitions.
7659 * src/getargs.c (usage): Capitalize `Yacc' in English.
7660 * src/output.c (prepare): Define b4_yacc_flag.
7661 * tests/regression.at (Early token definitions): Test that tokens names
7662 are defined before the pre-prologue not just before the post-prologue.
7663 Remove this test case and copy to...
7664 (Early token definitions with --yacc): ... this to test #define's.
7665 (Early token definitions without --yacc): ... and this to test enums.
7666
9e6e7ed2
PE
76672006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7668
7669 * NEWS: Reword the post-2.3 change to not be so optimistic about
7670 removing the old "look-ahead" spelling.
7671 Update previous look-ahead/lookahead change reports.
7672 * REFERENCES: look-ahead -> lookahead (since that's
7673 what he actually wrote).
7674 * doc/refcard.tex: look ahead -> lookahead,
7675 look-ahead -> lookahead
7676
742e4900
JD
76772006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7678
7679 For consistency, use `lookahead' instead of `look-ahead' or
7680 `look_ahead'. Discussed starting at
7681 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7682 and then at
7683 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7684 * NEWS: For the next release, note the change to `--report'.
7685 * TODO, doc/bison.1: Update English.
7686 * doc/bison.texinfo: Update English.
7687 (Understanding Your Parser, Bison Options): Document as
7688 `--report=lookahead' rather than `--report=look-ahead'.
7689 * src/conflicts.c: Update English in comments.
7690 (lookahead_set): Rename from look_ahead_set.
7691 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7692 (resolve_sr_conflict): Rename local look_ahead_tokens to
7693 lookahead_tokens, and update other uses.
7694 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7695 count_rr_conflicts, conflicts_free): Update uses.
7696 * src/getargs.c (report_args): Move "lookahead" before alternate
7697 spellings.
7698 (report_types): Update uses.
7699 (usage): For `--report' usage description, state `lookahead' spelling
7700 rather than `look-ahead'.
7701 * src/getargs.h (report.report_lookahead_tokens): Rename from
7702 report_look_ahead_tokens.
7703 * src/lalr.c: Update English in comments.
7704 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7705 (state_lookahead_tokens_count): Rename from
7706 state_look_ahead_tokens_count.
7707 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7708 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7709 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7710 Update other uses.
7711 Update English in output.
7712 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7713 * src/print.c: Update English in comments.
7714 (lookahead_set): Rename from look_ahead_set.
7715 (print_reduction): Rename argument lookahead_token from
7716 look_ahead_token.
7717 (print_core, state_default_rule, print_reductions, print_results):
7718 Update uses.
7719 * src/print_graph.c: Update English in comments.
7720 (print_core): Update uses.
7721 * src/state.c: Update English in comments.
7722 (reductions_new): Update uses.
7723 (state_rule_lookahead_tokens_print): Rename from
7724 state_rule_look_ahead_tokens_print, and update other uses.
7725 * src/state.h: Update English in comments.
7726 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7727 (state_rule_lookahead_tokens_print): Rename from
7728 state_rule_look_ahead_tokens_print.
7729 * src/tables.c: Update English in comments.
7730 (conflict_row, action_row): Update uses.
7731 * tests/glr-regression.at
7732 (Incorrect lookahead during deterministic GLR,
7733 Incorrect lookahead during nondeterministic GLR): Rename
7734 print_look_ahead to print_lookahead.
7735 * tests/torture.at: Update English in comments.
7736 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7737 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7738 (Many lookahead tokens): Update uses.
7739 * data/glr.c: Update English in comments.
7740 * lalr1.cc: Likewise.
7741 * yacc.c: Likewise.
7742 * src/conflicts.h: Likewise.
7743 * src/lalr.h: Likewise.
7744 * src/main.c: Likewise.
7745 * src/output.c: Likewise.
7746 * src/parse-gram.c: Likewise.
7747 * src/tables.h: Likewise.
7748 * tests/calc.at: Likewise.
7749
3c40d0b5
JD
77502006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7751
7752 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7753
5d278082
PE
77542006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7755
7756 * TODO: Add request from Nelson H. F. Beebe to be able to install
7757 Bison without installing the yacc script.
7758
9e668899
JD
77592006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7760
7761 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7762 and yytext if they're already #define'd.
7763 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7764 * src/scan-code-c.c: ... here.
7765 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7766 <config.h>.
7767
0c8e079f
JD
77682006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7769
7770 Get Bison to build again when configured with --enable-gcc-warnings.
7771 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7772 missing #include's.
7773 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7774 loc argument as it shadows a global.
7775 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7776 invocation.
7777
7778 * src/.cvsignore: Add scan-code.c.
7779
2346344a
AD
77802006-06-07 Akim Demaille <akim@epita.fr>
7781
7782 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7783 to...
7784 * src/scan-code.l: here.
7785 * tests/input.at (Torturing the Scanner): Fix another location
7786 error.
7787
4862bdfd
AD
77882006-06-07 Akim Demaille <akim@epita.fr>
7789
7790 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7791
e9071366
AD
77922006-06-06 Akim Demaille <akim@epita.fr>
7793
7794 Extract the parsing of user actions from the grammar scanner.
7795 As a consequence, the relation between the grammar scanner and
7796 parser is much simpler. We can also split "composite tokens" back
7797 into simple tokens.
7798 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7799 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7800 rename as...
7801 * src/location.h, src/location.c (add_column_width)
7802 (location_compute): these.
7803 Fix the column count: the initial column is 0.
7804 (location_print): Be robust to ending column being 0.
7805 * src/location.h (boundary_set): New.
7806 * src/main.c: Adjust to scanner_free being renamed as
7807 gram_scanner_free.
7808 * src/output.c: Include scan-code.h.
7809 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7810 Use boundary_set.
7811 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7812 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7813 which is now, again, a separate token.
7814 Adjust all dependencies.
7815 Whereever actions with $ and @ are used, use translate_code.
7816 (action): Remove this nonterminal which is now useless.
7817 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7818 (grammar_current_rule_action_append): Use translate_code.
7819 (packgram): Bound check ruleno, itemno, and rule_length.
7820 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7821 (last_string, last_braced_code_loc, max_left_semantic_context)
7822 (scanner_initialize, scanner_free, scanner_last_string_free)
7823 (gram_out, gram_lineno, YY_DECL_): Move to...
7824 * src/scan-gram.h: this new file.
7825 (YY_DECL): Rename as...
7826 (GRAM_DECL): this.
7827 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7828 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7829 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7830 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7831 Move these declarations, and...
7832 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7833 these to...
7834 * src/flex-scanner.h: this new file.
7835 * src/scan-gram.l (rule_length, rule_length_overflow)
7836 (increment_rule_length): Remove.
7837 (last_braced_code_loc): Rename as...
7838 (gram_last_braced_code_loc): this.
7839 Adjust to the changes of the parser.
7840 Move all the handling of $ and @ into...
7841 * src/scan-code.l: here.
7842 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7843 (handle_action_dollar, handle_action_at): Move to...
7844 * src/scan-code.l: here.
7845 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7846 scan-code.h, scan-code-c.c, scan-gram.h.
7847 (EXTRA_bison_SOURCES): Add scan-code.l.
7848 (BUILT_SOURCES): Add scan-code.c.
7849 (yacc): Be robust to white spaces.
7850
7851 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7852 * tests/regression.at: Adjust the column numbers.
7853 * tests/regression.at: Adjust the error message.
7891a7c4 7854
184e42f0
JD
78552006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7856
7857 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7858 Use Akim's wording from
7859 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7860
7891a7c4
JD
78612006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7862
7863 Between Bison releases, manually append `+' to the previous Bison
7864 release number, and use that as a signal to automatically print the
7865 ChangeLog's CVS Id keyword from --version. Discussed starting at
7866 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7867 * ChangeLog: Add Id header.
7868 * configure.ac (AC_INIT): Append `+' to `2.3'.
7869 * src/.cvsignore: Add revision.c.
7870 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7871 (BUILT_SOURCES): Add revision.c.
7872 (revision.c): New target rule. This file defines a new global variable
7873 named revision. It initializes it with either the Id from ChangeLog
7874 or, if VERSION doesn't contain `+', with the empty string.
7875 * src/getargs.c (version): Print the value of revision.
7876 * src/revision.h: Extern revision.
7877
4ad3ed84
PE
78782006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7879
7880 * NEWS: Version 2.3.
7881 * configure.ac (AC_INIT): Likewise.
7882
02103984
PE
78832006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7884
7885 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7886 with no arguments, not as an object-like macro. This is for
7887 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7888 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7889 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7890 Document this.
7891
2c08afa5
JD
78922006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7893
7894 * src/getargs.c (usage): Back out yesterday's modification of the
7895 --help output so that we don't have to wait for translation before
7896 releasing 2.3.
7897
6077da58
PE
78982006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7899
7900 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7901 Problem reported by Akim Demaille.
7902
2a26b6c2
JD
79032006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7904
7905 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7906
aefef0d6
PE
79072006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7908
7909 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7910 generated source code. Problem reported by Frans Englich in
7911 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7912
fcd8e201
PE
79132006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7914
7915 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7916 shell, not within 'make', so that 'make' by an ordinary builder
7917 (using GNU make) does not worry about configuring gzip. This also
7918 works around a bug reported independently by Keith Thompson and by
7919 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7920 stderr rather than stdout, messing up the build logs.
7921
7b5cdcbd
JD
79222006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7923
7924 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7925 to make sure that YYID will never be unused. This fixes a 'make
7926 maintainer-check' failure caused by the recent changes to the 'Trivial
7927 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7928 not used.
7929 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7930
5ad0a449
JD
79312006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7932
7933 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7934 state before an empty RHS is always resolved here. Only the location
7935 of that state is guaranteed to be resolved, and that's enough. This
7936 fixes the remaining bug reported by Derek M. Jones in
7937 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7938 * tests/glr-regression.at (Uninitialized location when reporting
7939 ambiguity): Test the above case.
7940 Also, the embedded comments in this test case claim it checks the case
7941 of an empty RHS that has inherited the initial location. However, the
7942 corresponding LHS was already resolved, so yyresolveLocations didn't
7943 actually have reason to modify it. Fix this by forcing
7944 nondeterministic operation at the beginning of the parse.
7945
50cce58e
PE
79462006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7947
7948 * data/c.m4 (b4_yy_symbol_print_generate):
7949 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7950 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7951 of the bugs reported today by Derek M Jones in
7952 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7953 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7954 defined to be a type name without parens or brackets.
7955 (Location Type): Similarly for YYLTYPE.
7956 * tests/regression.at (Trivial grammars): Put in a test for this
7957 bug that will be caught by 'make maintainer-check' (though not,
7958 alas, by 'make check' unless your compiler is picky).
7959
ab8d9dc5
PE
79602006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7961
0d2c8934 7962 * NEWS: Version 2.2.
ab8d9dc5
PE
7963 * configure.ac (AC_INIT): Likewise.
7964
9138c575
JD
79652006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7966
7967 * data/glr.c (yyreportTree): Make room in yystates for the state
7968 preceding the RHS. This fixes the segmentation fault reported by Derek
7969 M. Jones in
7970 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7971 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7972 to the user. Reported for yyreportTree by Derek M. Jones later in the
7973 same thread.
7974 * THANKS: Add Derek M. Jones.
7975 Update my email address.
7976 Fix typo in Steve Murphy's name.
7977
276f48df
PE
79782006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7979
d6645148
PE
7980 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7981 checking against YYLAST that caused the parser to miss a potential
7982 alternative in its diagnostic.
7983 Problem reported by Maria Jose Moron Fernandez in
7984 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7985 * data/lalr1.cc (yysyntax_error_): Likewise.
7986 * data/yacc.c (yysyntax_error): Likewise.
7987 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7988 tokens, in case we run into an older C compiler.
7989 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7990 Use them to check for the off-by-one error fixed above.
7991
276f48df
PE
7992 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7993 YYSIZE_T, not size_t.
7994 * tests/regression.at (Trivial grammars): New test, to catch
7995 the error fixed by the above patch.
7996
cd8b5791
AD
79972006-05-14 Akim Demaille <akim@lrde.epita.fr>
7998
7999 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8000 scheme.
8001 Reported by Steve Murphy.
8002
34376418
AD
80032006-05-14 Akim Demaille <akim@lrde.epita.fr>
8004
8005 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8006 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8007
327afc7c
AD
80082006-05-14 Akim Demaille <akim@lrde.epita.fr>
8009
8010 Implement --trace=m4.
8011 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8012 * src/output.c (output_skeleton): When set, pass -dV to m4.
8013
8014 Factor the handling of flags in m4.
8015 * src/output.c (prepare): Rename the muscle names debug, defines,
8016 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8017 * data/c.m4: Adjust.
8018 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8019 Use b4_define_flag_if to define other b4_FLAG_if macros.
8020 (b4_location_if): As a consequence, rename as...
8021 (b4_locations_if): this, for consistency.
8022 Adjust all the skeletons.
8023
ba9ecd19
AD
80242006-05-14 Akim Demaille <akim@lrde.epita.fr>
8025
8026 * etc/bench.pm: Shorten bench names.
8027
4e83ea15
AD
80282006-05-14 Akim Demaille <akim@lrde.epita.fr>
8029
8030 * src/output.h, src/output.c (error_verbose): Move to...
8031 * src/getargs.h, src/getargs.c: here.
8032 Sort the flags.
8033 Adjust dependencies.
8034
6e93d810
PE
80352006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8036
8037 * data/c.m4 (b4_copyright): Put the special exception for Bison
8038 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
8039 uses changed. Suggested by Akim Demaille. Also, wrap the
8040 copyright notice, in case it is longer than 80 columns. Replace
8041 comma by newline after title.
6e93d810 8042
eaea13f5
PE
80432006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8044
8045 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8046 incompatibility, not a bug. Mention that it wasn't fixed as of
8047 flex 2.5.33.
8048
3cf084ec
AD
80492006-05-11 Akim Demaille <akim@lrde.epita.fr>
8050
8051 * examples/extexi: Enforce the precedence of concatenation over
8052 >>.
0a9f1c7d 8053 Reported by Tommy Nordgren.
3cf084ec 8054
32c96bd7
AD
80552006-05-11 Akim Demaille <akim@lrde.epita.fr>
8056
8057 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8058 with the member "token".
f94705b2 8059 Reported by Martin Nylin.
32c96bd7 8060
eaea13f5
PE
80612006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8062
8063 * data/glr.c: Switch to Bison 2.2 special-exception language in
8064 the copyright notice. Use more-regular format for titles and
8065 copyright notices.
8066 * data/glr.cc: Likewise.
8067 * data/location.cc: Likewise.
8068 * data/yacc.cc: Likewise.
8069 * doc/bison.texinfo (Conditions): Document this.
8070 * NEWS: likewise. Upgrade version to 2.2.
8071
6e2d1146
AD
80722006-04-27 Akim Demaille <akim@lrde.epita.fr>
8073
8074 * data/glr.cc: Remove dead code.
8075
47671055
PE
80762006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8077
8078 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8079 that variable and the line breaks the bootstrap. Problem reported
8080 by Juan M. Guerrero.
8081
ed2e6384
AD
80822006-04-24 Akim Demaille <akim@lrde.epita.fr>
8083
8084 * doc/bison.texinfo (Multiple start-symbols): New.
8085
3cedc2dc
AD
80862006-04-24 Akim Demaille <akim@lrde.epita.fr>
8087
8088 * etc/README, etc/bench.pl: New.
8089
b2ddc3f3
AD
80902006-04-03 Akim Demaille <akim@lrde.epita.fr>
8091
8092 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8093 rule.
8094 Reported by Mickael Labau.
8095 * tests/input.at (Torturing the Scanner): Test it.
8096
91e3ac9a
PE
80972006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8098
8099 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8100 Problem reported by Bob Rossi.
8101
81022006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8103
8104 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8105 and didn't really work.
8106 For the index, use @ifnotinfo, not @iftex.
8107 Minor cleanups of spacing and terminology.
8108
5cf61e93
AD
81092006-03-12 Akim Demaille <akim@lrde.epita.fr>
8110
8111 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8112 of AT_NAME_PREFIX when %name-prefix is not used.
8113
aa08666d
AD
81142006-03-12 Akim Demaille <akim@lrde.epita.fr>
8115
8116 Apply --prefix to C++ skeletons too: they change the namespace.
8117 The test suite already exercize these cases.
8118 * data/c++.m4 (b4_namespace): New.
8119 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8120 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8121 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8122 * doc/bison.texinfo: Document it.
8123 (Option Cross Key): Use @multitable in all formats. It looks
8124 nicer, even in TeX outputs.
8125 (Rules): Use the same code whatever the output type is.
8126 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8127 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8128 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 8129
45567173
AD
81302006-03-10 Akim Demaille <akim@lrde.epita.fr>
8131
8132 * TODO: Remove dead items.
8133
e9d8f881 81342006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
8135
8136 * doc/FAQ: Remove, merged into...
8137 * doc/bison.texinfo (FAQ): this.
8138 * doc/Makefile.am (EXTRA_DIST): Adjust.
8139
c095d689
AD
81402006-03-10 Akim Demaille <akim@lrde.epita.fr>
8141
8142 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8143 even if empty.
8144 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8145 * doc/bison.texinfo (Calc++ Scanner): Use it.
8146
6e0f8287
PE
81472006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8148
8149 Fix two nits reported by twlevo, plus one more that I discovered.
8150
8151 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8152 this is the usual Bison style.
8153 * src/location.h (location_print): Likewise.
8154
8155 * src/reader.h (token_name): Likewise.
8156
d6b771c3
PE
81572006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8158
8159 Fix some nits reported by twlevo.
8160 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8161 and "POSIX". Use more-modern syntax for URLs. Mention C++
8162 and ask for Java. Don't hardwire OS version numbers. Add
8163 copyright notice.
8164 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8165 * src/conflicts.c (solved_conflicts_obstack): Now static.
8166
1e137b71
JD
81672006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8168
8169 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8170 page. Say "you can use it" not "you may use it" as on the web page;
8171 we're describing capabilities not granting permission.
8172
73f2e47e
PE
81732006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8174
6d05403d
PE
8175 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8176 shadowing warnings. Use usual patter for iterating through RHS.
8177 * tests/glr-regression.at
8178 (Uninitialized location when reporting ambiguity):
8179 Modify yylex so that it uses its argument, rather than trying
8180 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8181 const char -> char const.
8182
73f2e47e
PE
8183 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8184 Don't use tabs inside commands; it messes up 'ps'.
8185 Problem reported by twlevo.
8186
8710fc41
JD
81872006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8188
8189 * tests/glr-regression.at (Uninitialized location when reporting
8190 ambiguity): New test case.
8191 * data/glr.c (yyresolveLocations): New function, which uses
8192 YYLLOC_DEFAULT.
8193 (yyresolveValue): Invoke yyresolveLocations before reporting an
8194 ambiguity.
8195 * doc/bison.texinfo (Default Action for Locations): Note
8196 YYLLOC_DEFAULT's usage for ambiguity locations.
8197 (GLR Semantic Actions): Cross-reference those notes.
8198
ae952af2
JD
81992006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8200
8201 * tests/glr-regression.at (Leaked semantic values when reporting
8202 ambiguity): Remove unnecessary union and type declarations.
8203 (Leaked lookahead after nondeterministic parse syntax error): New test
8204 case.
8205 * data/glr.c (yyparse): Check for zero stacks remaining before
8206 attempting to shift the lookahead so that you don't lose it.
8207
35ee866a
JD
82082006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8209
8210 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8211 * tests/glr-regression.at (Leaked semantic values when reporting
8212 ambiguity): New test case.
8213 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8214 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8215 now unnecessary yystackp parameter.
8216 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8217 destructors can be called.
8218
8219 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8220 in existing testcases.
8221
520181ab
JD
82222006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8223
8224 Don't leak semantic values for parent RHS when a user action cuts the
8225 parser, and clean up related code a bit.
8226 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
8227 cuts parse): Rename to...
8228 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
8229 for leaked parent RHS values.
8230 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8231 between an unresolved state (non-empty chain of semantic options) and
8232 an incomplete one (signaled by an empty chain).
ae952af2 8233 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
8234 successfully or unsuccessfully resolved yyGLRState to...
8235 (yyresolveValue): ... here so that yyresolveValue always leaves a
8236 yyGLRState with consistent data and thus is easier to understand.
8237 Remove the yyvalp and yylocp parameters since they are always just
8238 taken from the yys parameter. When reporting a discarded merged value
8239 in debugging output, note that it is incompletely merged. Document the
8240 interface.
8241 (yyresolveAction): If resolving any of the RHS states fails, destroy
8242 them all rather than leaking them. Thus, as long as user actions are
8243 written to clean up the RHS correctly, yyresolveAction always cleans up
8244 the RHS of a semantic option. Document the interface.
8245
18d9185c
PE
82462006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8247
8248 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8249 led to a segmentation fault in GNU Pascal. Problem reported
8250 by Waldek Hebisch.
8251
841a7737
JD
82522006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8253
8254 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8255 mid-rule action inside a nonterminal symbol in order to declare a
8256 destructor for its semantic value.
8257
fc3f467f
PE
82582006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8259
8260 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8261 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8262 __cplusplus && ! defined _STDLIB_H && !
8263 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8264 defined free))]: Include <stdlib.h> rather than rolling our own
8265 declarations of malloc and free, to avoid problems with
8266 incompatible declarations (using 'throw') C++'s stdlib.h. This
8267 should fix Debian bug 340012
8268 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8269 reported by Guillaume Melquiond.
8270
a3af26dd
PE
82712006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8272
4d7bc38c
PE
8273 * NEWS: Clarify symbols versus types in unused-value warnings.
8274
a3af26dd
PE
8275 * configure.ac (AC_INIT): Bump version number.
8276
4e26c69e
PE
82772006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8278
8279 * NEWS: Version 2.1a.
8280 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8281 since C99 requires this.
8282
498e897c
PE
82832006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8284
8285 * m4/c-working.m4: New file.
8286 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8287
57bb17ca
PE
82882006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8289
8290 * Makefile.maint: Merge from coreutils.
8291
0be105dc
PE
82922006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8293
8294 More portability fixes for problems summarized by Nelson H. F. Beebe.
8295
8296 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8297 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8298 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8299 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8300 messes up because C++ code is compiled in 32-bit mode but linked
8301 in 64-bit mode.
8302
6fc0c024
PE
83032006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8304
8305 More portability fixes for problems summarized by Nelson H. F. Beebe.
8306
7870f699
PE
8307 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8308 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8309
6fc0c024
PE
8310 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8311 nodist_PROGRAMS, since we don't need to actually compile the
8312 example if we're just doing a plain 'make'. This avoids bothering
8313 the installer unnecessarily about problems due to weird C++
8314 compilers.
8315
fe6c2fde
PE
83162006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8317
8318 More portability fixes for problems summarized by Nelson H. F. Beebe.
8319
8320 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8321 than #include "...", and compile with -I'.'. The old method was
8322 not portable, according to Posix and the C standard, and it does
8323 not work with Sun C 5.7, where previous #line directives affect
8324 the working directory used in later #include "..." directives.
8325
927b425b
JMG
83262006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8327
8328 Various DJGGP specific issues in /djgpp
8329
d9735e9e
PE
83302006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8331
8332 More portability fixes for problems summarized by Nelson H. F. Beebe.
8333
8334 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8335 '#include <map>' works and that you can apply ++ to iterators.
8336
5a6755af
PE
83372006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8338
67a0dc4f
PE
8339 Work around portability problems summarized by Nelson H. F. Beebe in
8340 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8341
8c86f0ef
PE
8342 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8343 that '#include <string>' works.
8344
de35dd59
PE
8345 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8346 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8347 "warning: sorry: semantics of inline function static data `const
8348 unsigned char translate_table[262]' are wrong (you'll wind up with
8349 multiple copies)".
8350
67a0dc4f
PE
8351 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8352 or, xor to not_, and_, or_, and xor_, respectively. This works
8353 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8354 random system header somewhere that includes the equivalent of
8355 <iso646.h>.
8356
5a6755af
PE
8357 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8358 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 8359 Suite Version 2.0.
5a6755af 8360
3f001415
JD
83612006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8362
8363 During deterministic GLR operation, user actions should be able to
8364 influence the parse by changing yychar. To make this easier to fix and
8365 to make glr.c easier to evolve in general, don't maintain yytoken in
8366 parallel with yychar; just compute yytoken when needed.
8367 * tests/glr-regression.at (Incorrect lookahead during deterministic
8368 GLR): Check that setting yychar in a user action has the intended
8369 effect.
8370 * data/glr.c (yyGLRStack): Remove yytokenp member.
8371 (yyclearin): Don't set *yytokenp.
8372 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8373 yychar rather than *yytokenp to determine the current lookahead.
8374 Compute yytoken locally when needed.
8375 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8376 point to.
8377
8378 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8379 after `--report' documentation.
8380
e2a8c0f5
PE
83812006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8382
8383 * src/parse-gram.y (grammar_declaration): Location of printer
8384 symbol is @1, not list->location. Bug reported by twlevo.
8385 * tests/input.at (Incompatible Aliases): Adjust to above change.
8386
6b702268
PE
83872006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8388
27622431
PE
8389 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8390 all the test at once. This makes the output easier to read in the
8391 normal case.
8392
6b702268
PE
8393 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8394 got from <http://bro-ids.org/download.html>. The bug is that
8395 when two actions appeared in succession, the second one was
8396 scanned before the first one was added to the grammar rule
8397 as a midrule action. Bison then output the incorrect warning
8398 "parse.y:905.17-906.36: warning: unused value: $3".
8399 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8400 associated with a value.
8401 (rhs): Don't invoke grammar_current_rule_action_append.
8402 (action): Invoke it here instead.
8403 * src/reader.c (grammar_midrule_action): Now extern.
8404 (grammar_current_rule_action_append): Don't invoke
8405 grammar_midrule_action; that is now the scanner's job.
8406 * src/reader.h (last_string, last_braced_code_loc):
8407 (grammar_midrule_action): New decls.
8408 * src/scan-gram.l (last_string): Now extern, sigh.
8409 (last_braced_code_loc): New extern variable.
8410 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8411 rule already has an action.
8412 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8413 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8414 Add some tests to check that the above changes fixed the bug.
8415
d40ba6c2
PE
84162006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8417
8418 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8419 All used changed. Check whether the symbol has a destructor,
8420 not whether it is typed.
8421 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8422 that the values are still reported as unused. All line numbers
8423 adjusted.
8424
401aace6
PE
84252006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8426
8427 Work around a bug in bro 0.8, which underparenthesizes its
8428 definition of YYLLOC_DEFAULT.
8429 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8430 their arguments.
8431 * data/lalr1.cc: Likewise.
8432 * data/yacc.cc: Likewise.
8433
06f01bc4
PE
84342006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8435
401aace6
PE
8436 Work around a bug in Pike 7.0, and give the Pike folks a
8437 better way to override the usual int widths.
8438 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8439 user can override the types.
8440 (short): #undef, to work around a bug in Pike 7.0.
8441 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8442 (union yyalloc.yyss): Use yytype_int16 rather than short.
8443 All uses changed.
8444 (yysigned_char): Remove.
8445 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8446 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8447 * tests/regression.at (Web2c Actions): Adjust to above changes.
8448
8449 * src/reader.c (check_and_convert_grammar): New function.
8450 (reader): Close the input file even if something went wrong during
8451 parsing. Minor file descriptor leak reported by twlevo.
8452
06f01bc4
PE
8453 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8454 to pacify gcc -Wswitch-default.
8455 * src/scan-gram.l (adjust_location): Use a default: break; case
8456 to pacify gcc -Wswitch-default.
8457 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8458 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8459 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8460 Move these decls to scan-skel.l, since they don't need to be
8461 visible elsewhere.
8462 * src/scan-skel.l: Accept the above decls.
8463 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8464 is used.
8465
02650b7f
PE
84662006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8467
8468 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8469 since we don't want to insist on a version number at the start
8470 of the changelog every time.
8471 * Makefile.maint: Sync from coreutils a bit better.
8472 (sc_trailing_blank): Renamed from sc_trailing_space.
8473 All uses changed.
8474 (sc_no_if_have_config_h, sc_require_config_h):
8475 (sc_prohibit_assert_without_use): New rules.
8476 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8477 (sc_dd_max_sym_length): Fix leading spaces in rule.
8478 (sc_system_h_headers): Prefix with @.
8479 (sc_useless_cpp_parens, m4-check): Output line numbers.
8480 (changelog-check): Allow version only in head.
8481 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8482 satisfy new Makefile.maint rule.
8483 * data/glr.c: Likewise.
8484 * data/glr.cc: Likewise.
8485 * data/lalr1.cc: Likewise.
8486 * data/yacc.c: Likewise.
8487 * lib/ebitsetv.c: Likewise.
8488 * lib/lbitset.c: Likewise.
8489 * lib/subpipe.c: Likewise.
8490 * lib/timevar.c: Likewise.
8491 * src/system.h: Likewise.
8492 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8493 * djgpp/Makefile.maint: Add copyright notice.
8494 * djgpp/README.in: Likewise.
8495 * djgpp/config.bat: Likewise.
8496 * djgpp/config.site: Likewise.
8497 * djgpp/config_h.sed: Likewise.
8498 * djgpp/djunpack.bat: Likewise.
8499 * djgpp/config.sed: Fix copyright notice to match standard format.
8500 * djgpp/subpipe.h: Likewise.
8501 * lib/bitsetv-print.c: Likewise.
8502 * lib/bitsetv.c: Likewise.
8503 * lib/subpipe.h: Likewise.
8504 * lib/timevar.c: Likewise.
8505 * lib/timevar.h: Likewise.
8506 * djgpp/subpipe.c: Use standard recipe for config.h.
8507 * lib/abitset.c: Likewise.
8508 * lib/bitset.c: Likewise.
8509 * lib/bitset_stats.c: Likewise.
8510 * lib/bitsetv-print.c: Likewise.
8511 * lib/bitsetv.c: Likewise.
8512 * lib/ebitsetv.c: Likewise.
8513 * lib/get-errno.c: Likewise.
8514 * lib/lbitset.c: Likewise.
8515 * lib/subpipe.c: Likewise.
8516 * lib/timevar.c: Likewise.
8517 * lib/vbitset.c: Likewise.
8518 * tests/local.at: Likewise.
8519 * src/scan-gram.l: Don't include verify.h, since system.h does
8520 that for us.
8521 * .x-sc_require_config_h: New file.
8522 * .x-sc_unmarked_diagnostics: New file.
8523
287c78f6
PE
85242006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8525
287c78f6
PE
8526 Be a bit more systematic about using 'abort'.
8527 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8528 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8529 Put 'default: abort ();' before some other case, to satisfy older
8530 pedantic compilers.
8531 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8532 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8533 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8534 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
8535 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8536 (get_decision_str, get_orientation_str, get_node_alignment_str):
8537 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8538 (get_linestyle_str, get_arrowstyle_str): Likewise.
8539 * src/conflicts.c (resolve_sr_conflict):
8540 Use a default case rather than one for the one remaining enum
8541 value, to catch invalid enum values as well.
8542 * src/lalr.c (set_goto_map, map_goto):
8543 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8544 * src/nullable.c (nullable_compute, token_definitions_output):
8545 Likewise.
8546 * src/reader.c (packgram, reader): Likewise.
8547 * src/state.c (transitions_to, state_new, state_reduction_find):
8548 Likewise.
8549 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8550 (symbol_pack): Likewise.
8551 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
8552 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8553 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
8554 * src/system.h: Don't include <assert.h>.
8555 (assert): New macro.
8556
8557 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8558 (Destructor Decl, Parser Function, Pure Calling):
8559 Describe rules for braces inside C code more carefully.
287c78f6 8560
c66dfadd
PE
85612006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8562
c21493b8
PE
8563 Fix some porting glitches found by Nelson H. F. Beebe.
8564 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8565 compilers that don't understand that abort () does not return.
8566 * src/state.c (transitions_to): Likewise.
8567 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8568 that '#include <cstdlib>' works.
8569 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8570 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8571 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8572 for the benefit of some pre-C99 compilers.
8573
b6e3facf
PE
8574 * bootstrap: Undo changes to gnulib files that autoreconf made.
8575
c66dfadd
PE
8576 Minor fixups to get 'make maintainer-check' to work.
8577 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8578 with the new verify.h implementation.
8579 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8580 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8581 * data/yacc.c (YYUSE): Likewise.
8582 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8583 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8584 * src/parse-gram.y (declaration): Don't pass a string constant
8585 to a function that expects char *, since GCC might complain
8586 about the constant value.
8587 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8588 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8589 before #defining them.
8590 * tests/glr-regression.at
8591 (Incorrectly initialized location for empty right-hand side in GLR):
8592 In yyerror, use the msg arg.
8593 (Corrupted semantic options if user action cuts parse):
8594 (Incorrect lookahead during deterministic GLR):
8595 (Incorrect lookahead during nondeterministic GLR):
8596 Don't name a local var 'index'; it shadows string.h's 'index'.
8597
ed94ef2a
AD
85982006-01-19 Akim Demaille <akim@epita.fr>
8599
8600 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8601 location, not just parts of it.
8602
e9ad4aec
PE
86032006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8604
d6ca7905
PE
8605 * NEWS: Document the fact that multiple %unions are now allowed.
8606 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
8607 * TODO: This feature is now implemented, so remove it from
8608 the wishlist.
d6ca7905 8609
ef1b70e0
PE
8610 * Makefile.maint: Merge with coreutils Makefile.maint.
8611 (CVS_LIST): Use build-aux version if available.
8612 (VERSION_REGEXP): New macro.
8613 (syntax-check-rules): Add sc_no_if_have_config_h,
8614 sc_prohibit_assert_without_use, sc_require_config_h,
8615 sc_useless_cpp_parens.
8616 (sc_obsolete_symbols): Check for O_NDELAY.
8617 (sc_dd_max_sym_length): Track coreutils.
8618 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8619 (sc_useless_cpp_parens): New rule.
8620 (news-date-check): Look for version or today's date.
8621 (changelog-check): Don't require version number near head.
8622 (copyright-check): Use current year instead of hardwiring 2005.
8623 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8624 (announcement): Add --gpg-key-ID.
8625
8626 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8627 with "file system".
8628
2073ce56 8629 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
8630 array. Problem reported by twlevo.
8631 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8632 * src/lalr.c (build_relations): Rely on new sentinel.
8633 * src/gram.c (gram_free): Adjust to new sentinel.
8634
b7691f15
JD
86352006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8636
8637 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8638 yylookaheadNeeds. All uses updated.
8639 (yysplitStack): Rename local yynewLookaheadStatuses to
8640 yynewLookaheadNeeds.
8641 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8642 GLR): In comments, change `lookahead status' to `lookahead need'.
8643
ddee1b06
PH
86442006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8645
8646 * data/glr.c (yysplitStack): A little stylistic rewrite.
8647
12f4614d
PH
86482006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8649
8650 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8651
32c29292
JD
86522006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8653
8654 * doc/bison.texinfo: Fix some typos.
8655 (GLR Semantic Actions): New subsection discussing special
8656 considerations because GLR semantic actions might be deferred.
8657 (Actions): Mention look-ahead usage of yylval.
8658 (Actions and Locations): Mention look-ahead usage of yylloc.
8659 (Special Features for Use in Actions): Add YYEOF entry and mention it
8660 in the yychar entry.
8661 In the yychar entry, remove mention of the local yychar case (pure
8662 parser) since this is irrelevant information when writing semantic
148d66d8 8663 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
8664 yychar is otherwise described as an external variable.
8665 In the yychar entry, don't call it the `current' look-ahead since it
8666 isn't when semantic actions are deferred.
8667 In the yychar and yyclearin entries, add note about deferred semantic
8668 actions.
8669 Add yylloc and yylval entries discussing look-ahead usage.
8670 (Look-Ahead Tokens): When discussing yychar, don't call it the
8671 `current' look-ahead, and do mention yylval and yylloc.
8672 (Error Recovery): Cross-reference `Action Features' when mentioning
8673 yyclearin.
148d66d8 8674 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
8675 look-ahead.
8676 In the yylloc and yylval entries, mention look-ahead usage.
8677
de366a2f 86782006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
8679
8680 * tests/glr-regression.at: Update copyright year to 2006.
8681
bf70fa87
JD
86822006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8683
8684 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8685 use during nondeterministic operation to track which stacks have
8686 actually needed the current lookahead.
8687 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8688 Allocate, deallocate, resize, and otherwise shuffle space for
8689 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8690 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8691 appropriately during nondeterministic operation.
8692 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8693 members to store the current lookahead to be used by the deferred
8694 user action.
8695 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8696 from which the RHS is taken. Set the lookahead members of the new
8697 yySemanticOption according to the lookahead status for stack yyk.
8698 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8699 yyaddDeferredAction.
8700 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8701 members of yySemanticOption before invoking yyuserAction, and then set
8702 them back to their current values afterward.
8703 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8704 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8705 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8706 titles for consistency.
8707 (Leaked merged semantic value if user action cuts parse): In order to
8708 suppress lint warnings, use arguments in merge function, and assign
8709 char value < 128 in main.
8710 (Incorrect lookahead during deterministic GLR): New test case.
8711 (Incorrect lookahead during nondeterministic GLR): New test case.
8712
05449a2c
JD
87132006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8714
de366a2f 8715 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
8716 !yyvaluep as signal that no semantic value is available to print.
8717 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8718 to print a semantic value.
8719
4158e0a1 87202006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 8721
4158e0a1
JD
8722 * tests/glr-regression.at: For consistency with my newer test cases,
8723 don't thank myself.
8724
d659304d
JD
87252006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8726
8727 * data/glr.c (yyresolveValue): When merging semantic options, if at
8728 least one user action succeeds but a later one cuts the parse, then
8729 destroy the semantic value before returning rather than leaking it.
8730 (yyresolveStates): If a user action cuts the parse and thus
8731 yyresolveValue fails, ignore the (unset) semantic value rather than
8732 corrupting the yyGLRState, and empty the semantic options list since
8733 the user actions should have called all necessary destructors.
8734 Simplify code with YYCHK.
8735 * tests/glr-regression.at (Corrupted semantic options if user action
8736 cuts parse): New test case.
8737 (Undesirable destructors if user action cuts parse): New test case.
8738 Before applying any of this patch, this test case never actually failed
8739 for me... but only because the corrupted semantic options usually
8740 masked this bug.
8741 (Leaked merged semantic value if user action cuts parse): New test
8742 case.
8743
6ec2c0f2
AD
87442006-01-05 Akim Demaille <akim@epita.fr>
8745
8746 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8747
1b9c21fb
PE
87482006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8749
8750 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8751 _MSC_VER. Problem reported by Cenzato Marco.
8752 (b4_c_function_def): Use it.
8753 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8754 b4_c_modern.
8755 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8756 than rolling our own.
8757
84866159
AD
87582006-01-04 Akim Demaille <akim@epita.fr>
8759
8760 Also warn about non-used mid-rule values.
8761 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8762 member.
8763 (symbol_list_new): Adjust.
8764 * src/reader.c (symbol_typed_p): New.
8765 (grammar_rule_check): Use it.
8766 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8767 Check its rule.
8768 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8769 Use it.
8770 * tests/actions.at (Exotic Dollars): Adjust.
8771
378f4bd8
AD
87722006-01-04 Akim Demaille <akim@epita.fr>
8773
8774 * src/reader.c (grammar_midrule_action): If $$ is set in a
8775 mid-rule, move the `used' bit to its lhs.
8776 * tests/input.at (Unused values): New.
8777 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8778
e2a21b6f
PE
87792006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8780
54662697
PE
8781 * doc/bison.texinfo (Bison Options): Say more accurately what
8782 --yacc does.
8783 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8784 about declarations in the grammar when in Yacc mode, as POSIX does
8785 not require a diagnostic when the grammar uses extensions.
8786
8787 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8788
073f9288
PE
8789 Warn about dubious constructions like "%token T T".
8790 Reported by twlevo.
8791 * src/symtab.h (struct symbol.declared): New member.
8792 * src/symtab.c (symbol_new): Initialize it to false.
8793 (symbol_class_set): New arg DECLARING, specifying whether
8794 this is a declaration that we want to warn about, if there
8795 is more than one of them. All uses changed.
8796
1221b78a
PE
8797 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8798 Allow multiple %union directives, whose contents concatenate.
8799 * src/parse-gram.y (grammar_declaration): Likewise.
8800 Use muscle_code_grow, so that we don't need stype_line any more.
8801 All uses changed.
8802
8803 * src/muscle_tab.c (muscle_grow): Fix comment.
8804
e2a21b6f
PE
8805 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8806 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8807 Update copyright year to 2006.
8808
8f7e3cf9
AD
88092006-01-03 Akim Demaille <akim@epita.fr>
8810
8811 Have glr.cc pass (some of) the calc.at tests.
8812 * data/glr.cc (b4_parse_param_orig): New.
8813 (b4_parse_param): Improve its definition, and bound it more
8814 clearly in the skeleton.
8815 (b4_epilogue): Append, instead of prepending, in order to keep
8816 #line consistency.
8817 Simplify the generation of auxiliary functions: locations and
8818 purity are mandated.
8819 (b4_global_tokens_and_yystype): Honor it.
8820 * data/location.cc (c++.m4): Don't include it.
8821 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8822 and AT_SKEL_CC_IF.
8823 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8824 AT_LALR1_CC_IF.
8825 Be sure to initialize the first position's filename.
8826 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8827 mandated anyway.
8828 (AT_CHECK_CALC_GLR_CC): New.
8829 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8830
3953ed88
AD
88312006-01-02 Akim Demaille <akim@epita.fr>
8832
8833 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8834 c.m4.
0a96ba81 8835 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
8836 * data/glr.cc: Do not include stack.hh.
8837
9ecafbbf
AD
88382006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8839
8840 * data/glr.c: Reformat whitespace with tabs.
8841 (b4_lpure_formals): Remove this unused m4 macro.
8842 * tests/cxx-type.at: Reformat whitespace with tabs.
8843 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8844 since it's a member. Rename type to isNterm for clarity.
8845
c4d497a0
AD
88462005-12-29 Akim <akim@sulaco.local>
8847
8848 Let glr.cc catch up with symbol_value_print.
8849 * data/glr.cc (b4_yysymprint_generate): Replace by...
8850 (b4_yy_symbol_print_generate): this.
8851 (yy_symbol_print, yy_symbol_value_print): Declare them.
8852
4517da37
PE
88532005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8854
8855 * src/location.h (boundary): Note that a line or column equal
8856 to INT_MAX indicates an overflow.
8857 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8858 (rule_length_overflow, increment_rule_length, add_column_width):
8859 New functions.
8860 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8861 (<SC_BRACED_CODE>"}"):
8862 Use increment_rule_length rather than incrementing it by hand.
8863 (adjust_location, handle_syncline): Diagnose overflow.
8864 (handle_action_dollar, handle_action_at):
8865 Fix bug with monstrosities like $-2147483648.
8866 Remove now-unnecessary checks.
8867 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8868 (convert_ucn_to_byte): Verify assumptions.
8869 (handle_syncline): New arg LOC. All callers changed.
8870 Don't store through a value derived from char const * pointer.
8871
8872 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8873 GCC warnings.
8874
e3233bf6
PE
88752005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8876
8877 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8878 Remove unnecessary forward static decls.
8879
8f3596a6
AD
88802005-12-27 Akim Demaille <akim@epita.fr>
8881
8882 * src/reader.c (grammar_current_rule_check): Also check that $$
8883 is used.
8884 Take the rule to check as argument, hence rename as...
8885 (grammar_rule_check): this.
8886 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8887 Rename as...
8888 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8889 (grammar_midrule_action, grammar_symbol_append): Now static.
8890 * tests/torture.at (input): Don't rely on the default action
8891 being always performed.
8892 * tests/calc.at: "Set" $$ even when the action is "cut" with
8893 YYERROR or other.
8894 * tests/actions.at (Exotic Dollars): Instead of using unused
8895 values, check that the warning is issued.
8896
721be13c
PE
88972005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8898
8899 * NEWS: Improve wording for unused-value warnings.
8900
a0af42fc
AD
89012005-12-22 Akim Demaille <akim@epita.fr>
8902
8903 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8904 (b4_yysymprint_generate): Rename as...
8905 (b4_yy_symbol_print_generate): this.
8906 Generate yy_symbol_print instead of yysymprint.
8907 Generate also yy_symbol_value_print, and use it.
8908
affac613
AD
89092005-12-22 Akim Demaille <akim@epita.fr>
8910
721be13c 8911 * NEWS: Warn about unused values.
affac613
AD
8912 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8913 a `used' member.
8914 (symbol_list_n_get, symbol_list_n_used_set): New.
8915 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8916 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8917 * src/reader.c (grammar_current_rule_check): Check that values are
8918 used.
8919 * src/symtab.c (symbol_print): Accept 0.
8920 * tests/existing.at: Remove the type information.
8921 Empty the actions.
8922 Remove useless actions (beware of mid-rule actions: perl -000
8923 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8924 * tests/actions.at (Exotic Dollars): Use unused values.
8925 * tests/calc.at: Likewise.
8926 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8927 Likewise.
8928
8929 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8930 rule_useful_p.
8931
9d9b8b70
PE
89322005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8933
8bb4c753
PE
8934 Undo 2005-12-01 tentative license wording change. The wording is
8935 still being reviewed by the lawyers, and we don't want to wait for
8936 them before publishing a test release. For now, revert to the
8937 previous wording.
8938 * NEWS: Undo 2005-12-01 change.
8939 * data/glr.c: Revert to previous license wording.
8940 * data/glr.cc: Likewise.
8941 * data/lalr1.cc: Likewise.
8942 * data/location.cc: Likewise.
8943 * data/yacc.c: Likewise.
8944
9d9b8b70
PE
8945 * NEWS: Reword %destructor vs YYABORT etc.
8946 * data/glr.c: Use American spacing, for consistency.
8947 * data/glr.cc: Likewise.
8948 * data/lalr1.cc: Likewise.
8949 * data/yacc.c: Likewise.
8950 * data/yacc.c: Reformat comments slightly.
8951 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8952 for consistency. Fix some spelling errors and reword recently-included
8953 text slightly.
8954 * tests/cxx-type.at: Cast results of malloc, for C++.
8955
2c3b392a
AD
89562005-12-21 Joel E. Denny <address@hidden>
8957
8958 * tests/cxx-type.at: Construct a tree, count the parents of shared
8959 nodes, and free each node once and only once. Previously, the memory
8960 for semantic values was leaked instead.
8961
d6cff4dc
AD
89622005-12-21 Joel E. Denny <address@hidden>
8963
8964 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8965 (yylval, yylloc): If pure, #define to yystackp->yyval and
8966 yystackp->yyloc similar to yychar and yynerrs.
8967 (yyparse): If pure, remove local yylval and yylloc. Add local
8968 yystackp to accommodate pure definitions of yylval and yylloc.
8969 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8970 yylvalp and yyllocp to &yylval and &yylloc.
8971 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8972 namespace. Previously, nerrs and char were missing, but lval and lloc
8973 weren't necessary.
8974 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8975 yylvalp and yyllocp parameters since, if pure, these are now always
8976 accessible through yystackp. If not pure, they are still accessible
8977 globally.
8978 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8979 `if (YYID (N))' to pacify lint.
8980
a85284cf
AD
89812005-12-21 Akim Demaille <akim@epita.fr>
8982
8983 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8984 destroy the RHS symbols of a rule.
8985 * data/yacc.c (yylen): Initialize to 0.
8986 Keep its value to the number of items to possibly shift.
8987 In particular, a regular successful parse that ends on YYFINAL by
8988 a (internal) YYACCEPT must not have yylen != 0.
8989 (yyerrorlab, yyreturn): Pop the RHS.
8990 Reorder a bit to emphasize the `shifting' bits of code.
8991 (YYPOPSTACK): Now accept a number of items to pop.
8992 * data/lalr1.cc: Likewise.
8993 * data/glr.c: Formatting changes.
8994 Use goto instead of fall through.
8995 * doc/bison.texinfo (Destructor Decl): Complete.
8996
d508c281
JMG
89972005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8998
8999 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9000 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9001 * djgpp/config.bat: Replace every occurence of the file name
9002 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9003 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9004 * djgpp/config.sed: Replace every occurence of the file name
9005 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9006 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9007 * djgpp/djunpack.bat: DJGPP specific file.
9008 * djgpp/fnchange.lst: DJGPP specific file.
9009 * djgpp/README.in: Add new information about how to unpack the bison
9010 source on MSDOS and other systems which have 8.3 file name restrictions
9011 using djunpack.bat and fnchange.lst.
9012
3e7a2cd9
PE
90132005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9014
9015 * bootstrap (build_cvs_prefix): Remove; unused.
9016 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9017 when getting gnulib.
9018
90192005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9020
9021 * data/glr.c: Reorder typedef declarations for structs to match order
9022 of struct declarations.
9023 Rename yystack everywhere to yystackp except in yyparse where it's not
9024 a pointer.
9025 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9026 consistency.
9027 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9028 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9029 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9030 lint.
9031
877519f8
PE
90322005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9033
0eca5a39
PE
9034 * tests/sets.at (Accept): Fix typos in regular expression used to
9035 sed out the final state number.
9036
2cec9080
PE
9037 Work around portability problem on Solaris 10: flex-generated
9038 files include <stdio.h> before <config.h>, which messes up
9039 because the latter defines __EXTENSIONS__. Address the problem
9040 by creating two new little files that include <config.h> first,
9041 then include the flex-generated files. Rewrite everyone else
9042 to include <config.h> first, as well.
9043 * lib/timevar.c: Always include "config.h".
9044 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9045 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9046 (EXTRA_bison_SOURCES): New macro.
9047 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9048 * src/system.h: Don't include config.h.
9049 * src/LR0.c: Include <config.h> first.
9050 * src/assoc.c: Likewise.
9051 * src/closure.c: Likewise.
9052 * src/complain.c: Likewise.
9053 * src/conflicts.c: Likewise.
9054 * src/derives.c: Likewise.
9055 * src/files.c: Likewise.
9056 * src/getargs.c: Likewise.
9057 * src/gram.c: Likewise.
9058 * src/lalr.c: Likewise.
9059 * src/location.c: Likewise.
9060 * src/main.c: Likewise.
9061 * src/muscle_tab.c: Likewise.
9062 * src/nullable.c: Likewise.
9063 * src/output.c: Likewise.
9064 * src/parse-gram.y: Likewise.
9065 * src/print.c: Likewise.
9066 * src/print_graph.c: Likewise.
9067 * src/reader.c: Likewise.
9068 * src/reduce.c: Likewise.
9069 * src/relation.c: Likewise.
9070 * src/state.c: Likewise.
9071 * src/symlist.c: Likewise.
9072 * src/symtab.c: Likewise.
9073 * src/tables.c: Likewise.
9074 * src/uniqstr.c: Likewise.
9075 * src/vcg.c: Likewise.
9076
877519f8
PE
9077 * src/parse-gram.y: Fix minor problems uncovered by lint.
9078 (current_lhs, current_lhs_location): Now static.
9079 (current_assoc): Remove unused variable.
9080
9081 Cleanups so that Bison-generated parsers have less lint.
9082 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9083 Prepend /*ARGSUSED*/, for lint's sake.
9084 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9085 definition if 'lint' is defined.
9086 (YYID): New macro (or function, if lint).
9087 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9088 * data/yacc.c: Likewise.
9089 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9090 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9091 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9092 is C++ only.
9093 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9094 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9095 Use YYID(0) rather than 0, for lint.
9096 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9097 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9098
f5228370
PE
90992005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9100
9101 * tests/glr-regression.at
9102 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9103 Close memory leak reported by twlevo.
9104
69ce078b
PE
91052005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9106
6ff99711
PE
9107 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9108 all stacks.
9109 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
9110 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9111 New test case.
9112 (Duplicated user destructor for lookahead): This test now is expected
9113 to succeed.
9114
af3412cd
PE
91152005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9116
32b5b719 9117 * NEWS: Document the following change.
af3412cd
PE
9118 * data/yacc.c: Say "parser skeleton" rather than "file", since
9119 it's no longer just a file.
9120 * data/glr.c: Grant a special exception for C GLR parsers, that
9121 reads like the already-existing exception for C LALR(1) parsers.
9122 * data/glr.cc: Likewise.
9123 * data/lalr1.cc: Likewise.
9124 * data/location.cc: Likewise.
9125 * data/yacc.c: Reword the "written by" statement to clarify that
9126 it was the parser skeleton, not the entire output file.
9127 * data/glr.c: Written by Paul Hilfinger.
9128 * data/glr.cc: Written by Akim Demaille.
9129 * data/lalr1.cc: Likewise.
9130
035aa4a0
PE
91312005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9132
d9963c85
PE
9133 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9134 Fix typos in previous change that broke 'make check'.
9135 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9136 supported in C.
9137 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9138 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9139 We can revert this once things settle down.
9140
035aa4a0
PE
9141 * src/conflicts.c (conflicts_print): Don't print file name twice
9142 when %expect fails because there were no conflicts.
9143 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9144 change.
9145 * tests/conflicts.at (%expect not enough, %expect too much):
9146 (%expect with reduce conflicts): Adjust to new behavior.
9147
91482005-11-18 Akim Demaille <akim@epita.fr>
9149
9150 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9151 errors.
9152 * NEWS: Document this.
9153 * doc/bison.texinfo (Expect Decl): Likewise.
9154
d1ff7a7c
AD
91552005-11-16 Akim Demaille <akim@epita.fr>
9156
9157 Generalize the display of semantic values and locations in traces.
9158 * data/glr.c (yy_reduce_print): Fix indices (again).
9159 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9160 literal integers.
9161 * data/lalr1.cc (yyreduce_print): Rename as...
9162 (yy_reduce_print): this.
9163 Display values and locations.
9164 * data/yacc.c (yy_reduce_print): Likewise.
9165 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9166 (yysymprint): Move higher to be visible from yy_reduce_print).
9167 (yyparse): Adjust.
9168 * tests/calc.at: Adjust the expected length of the traces.
9169
6de5398d
AD
91702005-11-14 Akim Demaille <akim@epita.fr>
9171
9172 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9173 from 1 to N, while values and location start at 0.
9174 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9175
a1373f55
AD
91762005-11-14 Akim Demaille <akim@epita.fr>
9177
9178 * data/glr.c (yy_reduce_print): Fix the $ number.
9179
613d8952
AD
91802005-11-14 Akim Demaille <akim@epita.fr>
9181
9182 "Use" parse parameters.
9183 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9184 * data/glr.c, data/glr.cc: Use them.
9185 * data/glr.c (YYUSE): Have a C++ definition that supports
9186 non-pointer types.
9187
b2741627
AD
91882005-11-14 Akim Demaille <akim@epita.fr>
9189
9190 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9191
5059b5c8
AD
91922005-11-14 Akim Demaille <akim@epita.fr>
9193
42249483
AD
9194 * data/glr.cc: New.
9195 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 9196
4626a15d
AD
91972005-11-12 Akim Demaille <akim@epita.fr>
9198
9199 Let position and location be PODs.
9200 * data/location.cc (position::initialize, location::initialize): New.
9201 (position::position, location::location): Define only if
9202 b4_location_constructors is defined.
9203 * data/lalr1.cc (b4_location_constructors): Define it for backward
9204 compatibility.
9205 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9206
92072005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
9208
9209 * data/lalr1.cc: Move the body of the ctor and dtor into the
9210 parser file (instead of the header).
9211 Wrap the implementations in a "namespace yy".
9212
92132005-11-12 Akim Demaille <akim@epita.fr>
9214
9215 Have glr.c include its header file when created.
9216 * data/glr.c (b4_shared_declarations): New.
9217 Output them verbatim in the parser if !%defines, otherwise
9218 output then in the header file, and include it instead.
9219
1989d947
AD
92202005-11-11 Akim Demaille <akim@epita.fr>
9221
9222 * data/glr.c: Comment changes.
9223
92242005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
9225
9226 When yydebug, report semantic and location values for reductions.
9227 * data/glr.c (yy_reduce_print): Report the semantic values and the
9228 locations.
9229 (YY_REDUCE_PRINT): Adjust.
9230 (yyglrReduce): Use them.
9231 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9232 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9233 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9234 traces.
9235
02998094
AD
92362005-11-10 Akim Demaille <akim@epita.fr>
9237
9238 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9239 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9240 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9241
5210672f
PE
92422005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9243
9244 * m4/cxx.m4, examples/Makefile.am: Don't build
9245 examples/calc++ if no C++ compiler is available. (trivial change)
9246
a8991a1d
AD
92472005-11-09 Akim Demaille <akim@epita.fr>
9248
9249 * src/scan-skel.l: Use a couple of asserts.
9250
36b5e963
AD
92512005-11-03 Akim Demaille <akim@epita.fr>
9252
9253 In some (weird) cases, the final state number is incorrect.
9254 Reported by Alexandre Duret-Lutz.
9255 * src/LR0.c (state_list_append): Remove the computation of
9256 final_state.
9257 (save_reductions): Do it here.
9258 (get_state): Alpha conversion.
9259 (generate_states): Use a for loop.
9260 * src/gram.h (item_number_is_rule_number)
9261 (item_number_is_symbol_number): New.
9262 * src/state.c: Use assert.
9263 * src/system.h: Include assert.h.
9264 * tests/sets.at (Accept): New.
9265
44e7ead1
PH
92662005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9267
9268 * data/glr.c (yyfill): Adjust comment.
36b5e963 9269 (yyresolveAction): Initialize default location properly
44e7ead1
PH
9270 for empty right-hand sides.
9271 (yydoAction): Ditto.
9272 Add comment explaining apparently dead code.
36b5e963
AD
9273 * tests/glr-regression.at
9274 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 9275 New test.
36b5e963 9276
e10a80ee
PE
92772005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9278
9279 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9280 gnulib when interrupted. This fixes some race conditions and
9281 works around some portability problems (one noted by Paul
9282 Hilfinger).
9283
067b32ee
AD
92842005-10-22 Akim <akim@epita.fr>
9285
9286 * Makefile.cfg: Adjust to config -> build-aux.
9287 Reported by twledo.
9288
4b367315
AD
92892005-10-21 Akim Demaille <akim@epita.fr>
9290
9291 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9292 the %parse-params.
9293 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9294 * data/yacc.c (b4_Pure_if): Rename as...
9295 (b4_yacc_pure_if): this.
9296 (YY_SYMBOL_PRINT, yyparse): Adjust.
9297 * doc/bison.texinfo: Formatting changes.
9298
24cc23d9
AD
92992005-10-21 Akim Demaille <akim@epita.fr>
9300
9301 Finish the transition config -> build-aux.
9302 * configure.ac, Makefile.am: Use build-aux.
9303 * config/prev-version, config/announce-gen, config/Makefile.am:
9304 Move to...
9305 * build-aux/prev-version, build-aux/announce-gen,
9306 * build-aux/Makefile.am: here.
9307
d4476375
AD
93082005-10-14 Akim Demaille <akim@epita.fr>
9309
9310 * examples/calc++/test: Use set -x only when VERBOSE.
9311
302c0aee
PE
93122005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9313
9314 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9315 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9316
7625ec2c
AD
93172005-10-13 Akim Demaille <akim@epita.fr>
9318
9319 * src/scan-skel.l: Output the base name parts of the parser and
9320 header file names.
302c0aee 9321 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
9322 additional checks.
9323 Use this to exercise C++ outputs in subdirs.
9324 Reported by Oleg Smolsky.
9325
ba0fe3c7
PE
93262005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9327
9328 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9329 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9330 Problem reported by John P. Hartmann.
9331 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9332 already defined it.
9333
9b8a5ce0
AD
93342005-10-12 Akim Demaille <akim@epita.fr>
9335
9336 * src/parse-gram.y (version_check): Exit 63 to please missing
9337 (stands for "version mismatch).
9338 * tests/input.at, doc/bison.texinfo: Adjust.
9339
4f6e011e
PE
93402005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9341
9342 Work around portability problems with Visual Age C compiler
9343 (xlc and xlC_r) reported by John P. Hartmann.
9344 * data/location.cc (initial_column, initial_line): Remove.
9345 All uses replaced by 0 and 1.
9346 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9347 that xlc complains about.
9348 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 9349 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 9350 as __STDC__.
4d7aa45e
PE
9351 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9352 __STDC_VERSION__. Use it everywhere instead of looking at
9353 __STDC__ and __cplusplus.
4f6e011e 9354
a1b3bf8c
AD
93552005-10-10 Akim Demaille <akim@epita.fr>
9356
9357 * examples/calc++/test: Be quiet unless VERBOSE.
9358
412e44aa
PE
93592005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9360
2a4647a3
PE
9361 * data/c.m4 (yydestruct, yysymprint):
9362 Use YYUSE instead of casting to void.
9363 * data/glr.c (YYUSE): New macro.
9364 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9365 Use it instead of rolling our own.
9366 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9367 (YYCHK1):
9368 Use /*CONSTCOND*/ to suppress lint warnings.
9369 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9370 (YY_STACK_PRINT): Use 'false' not '0'.
9371 (YYUSE): New macro.
9372 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9373 * data/yacc.c (YYUSE): New macro.
9374 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9375 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9376 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9377
9378
412e44aa
PE
9379 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9380 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9381
88c6637f
PE
93822005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9383
2f4f028d
PE
9384 Undo the parts of the unlocked-I/O change that substituted
9385 putc or puts for printf. This might hurt performance a bit,
9386 but some people prefer the printf style.
9387 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9388 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9389 All uses replaced by YYFPRINTF and YYDPRINTF.
9390 * data/yacc.c: Likewise.
9391 * lib/bitset.c (bitset_print): Likewise.
9392 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9393 putc and puts.
9394 * lib/lbitset.c (debug_lbitset): Likewise.
9395 * src/closure.c (print_firsts, print_fderives): Likewise.
9396 * src/gram.c (grammar_dump): Likewise.
9397 * src/lalr.c (look_ahead_tokens_print): Likewise.
9398 * src/output.c (escaped_output): Likewise.
9399 (user_actions_output): Break apart two printfs.
9400 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9401 * src/reduce.c (reduce_print): Likewise.
9402 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9403 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9404
88c6637f
PE
9405 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9406 Use assignments rather than casts-to-void to suppress
9407 unused-variable warnings. This pacifies 'lint'.
9408 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9409 unused-variable warnings.
9410
fb32e373
JMG
94112005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9412
9413 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9414
edb8f44f
PE
94152005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9416
fb9c0b33
PE
9417 Use unlocked I/O for a minor performance improvement on hosts like
9418 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9419 is to use the gnlib unlocked-io module, and to prefer putc and
9420 puts to printf when either will work (since the latter doesn't
9421 come in an unlocked flavor).
9422 * bootstrap (gnulib_modules): Add unlocked-io.
9423 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9424 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9425 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9426 and similarly for puts and putc and printf.
9427 * data/yacc.c: Likewise.
9428 * lib/bitset.c (bitset_print): Likewise.
9429 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9430 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9431 to printf.
9432 * lib/lbitset.c (debug_lbitset): Likewise.
9433 * src/closure.c (print_firsts, print_fderives): Likewise.
9434 * src/gram.c (grammar_dump): Likewise.
9435 * src/lalr.c (look_ahead_tokens_print): Likewise.
9436 * src/output.c (escaped_output): Likewise.
9437 (user_actions_output): Coalesce two printfs.
2f4f028d 9438 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
9439 * src/reduce.c (reduce_print): Likewise.
9440 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 9441 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 9442
edb8f44f
PE
9443 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9444 this confuses xgettext.
9445
b50d2359
AD
94462005-10-02 Akim Demaille <akim@epita.fr>
9447
9448 * bootstrap (gnulib_modules): Add strverscmp.
9449 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9450 * m4/.cvsignore: Add strverscmp.m4.
9451 * src/parse-gram.y (%require): New token, new rule.
9452 (version_check): New.
9453 * src/scan-gram.l (%require): Adjust.
9454 * tests/input.at (AT_REQUIRE): New.
9455 Use it.
9456 * doc/bison.texinfo (Require Decl): New.
9457 (Calc++ Parser): Use %require.
9458
21667f64
AD
94592005-10-02 Akim Demaille <akim@epita.fr>
9460
9461 * data/location.cc: New.
9462
2b81e969
AD
94632005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9464 Akim Demaille <akim@epita.fr>
9465
9466 Make sure -odir/foo.cc creates dir/location.hh etc.
9467 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9468 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9469 (spec_defines_file): Now const.
9470 (dir_prefix): New.
9471 (short_base_name): Remove.
9472 * src/files.c: Adjust.
9473 (dirname.h): Include.
9474 (base_name): Don't prototype it.
9475 (finput): Remove, duplicates gram_in.
9476 (full_base_name, short_base_name): Replace by...
9477 (all_but_ext, all_but_tab_ext): these.
9478 (compute_base_names): Rename as...
9479 (compute_file_name_parts): this.
9480 Update to compute the new variables, including dir_prefix.
9481 Adjust dependencies.
9482 * src/output.c (prepare): Output them.
9483 * src/reader.c: Adjust to use gram_in, not finput.
9484 * src/scan-skel.l (@dir_prefix@): New.
9485
ad6a9b97
JMG
94862005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9487
9488 * lib/subpipe.c: New function end_of_output_subpipe() added
9489 to allow support for non-posix systems. This is a no-op function
9490 for posix systems.
9491
9492 * lib/subpipe.h: New function end_of_output_subpipe() added
9493 to allow support for non-posix systems. This is a no-op function
9494 for posix systems.
9495
9496 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9497 handle the lack of pipe/fork functionality on non-posix systems.
9498
9499 * djgpp/Makefile.maint: DJGPP specific file.
9500
9501 * djgpp/README.in: DJGPP specific file.
9502
9503 * djgpp/config.bat: DJGPP specific configuration file.
9504
9505 * djgpp/config.sed: DJGPP specific configuration file.
9506
9507 * djgpp/config.site: DJGPP specific configuration file.
9508
9509 * djgpp/config_h.sed: DJGPP specific configuration file.
9510
9511 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9512
9513 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9514
fc695704
AD
95152005-10-02 Akim Demaille <akim@epita.fr>
9516
9517 * data/location.cc: New, extract from...
9518 * data/lalr1.cc: here.
9519 (location.hh): Include it after the user prologue, in case the
9520 filename type is defined by the user.
9521 Forward declation location and position before the pre-prologue.
9522 (yyresult_): Rename as...
9523 (yyresult): this, it's a local variable, not an attribute.
9524 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9525
95262005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
9527
9528 * examples/extexi: Restore the #line generation.
9529
fb9712a9
AD
95302005-09-30 Akim Demaille <akim@epita.fr>,
9531 Alexandre Duret-Lutz <adl@gnu.org>
9532
9533 Move the token type and YYSTYPE in the parser class.
9534 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9535 (parser::token): New, from the moved free definition of tokens.
9536 (parser::semantic_value): Now a full definition instead of an
9537 indirection to YYSTYPE.
9538 (b4_post_prologue): No longer included in the header file, but
9539 in the implementation file.
9540 * doc/bison.texi (C+ Language Interface): Update.
9541 * src/parse-gram.y: Support unary %define.
9542 * tests/actions.at: Define global_tokens_and_yystype for backward
9543 compatibility until we update the tests.
9544 * tests/calc.at: Idem.
9545 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9546 to simplify the code.
9547
55f0c7b1
PE
95482005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9549
9550 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9551 Ah, the good old days! Problem reported by Peter Klein.
9552 * bootstrap (gnulib_modules): Add strerror, strtoul.
9553 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9554 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9555
fb9712a9 95562005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
9557
9558 * data/c.m4 (b4_error_verbose_if): New.
9559 * data/lalr1.cc: Use it.
9560 (YYERROR_VERBOSE_IF): Remove.
9561 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9562 parser members, replaced by...
9563 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9564 local variables.
9565 (yysyntax_error_): Takes the state number as argument.
9566 (yyreduce_print_): Use the argument yyrule, not the former
9567 attribute yyn_.
9568
8a6f72f3
PE
95692005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9570
9571 * bootstrap (gnulib_modules): Add verify.
9572 * lib/.cvsignore: Add verify.h.
9573 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9574 * src/system.h (verify): Remove.
9575 Include verify.h instead.
9576 * src/tables.c (tables_generate): Use new API for 'verify'.
9577
0d50976f
PE
95782005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9579
ebc3737e
PE
9580 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9581 local variables whose names begin with 'yy'.
9582 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9583 Trivial changes from Joel E. Denny.
9584
0d50976f
PE
9585 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9586 it itself.
9587 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9588 don't use alloca any more.
9589
9590 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9591 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 9592 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
9593 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9594 to match yacc.c, to test more hosts.
9595
a05b79df
PE
95962005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9597
55289366
PE
9598 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9599 doesn't affect behavior.
9600 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9601 Solaris, AIX, MSC.
9602 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9603 This works a bit better with glibc, if user code has already included
9604 stdlib.h.
9605 * doc/bison.texinfo (Bison Parser): Document that users can't
9606 arbitrarily use malloc and free for other purposes. Document
9607 that <alloca.h> and <malloc.h> might be included.
9608 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9609 user must declare alloca.
9610
a05b79df
PE
9611 * HACKING (release): Forwarn the Translation Project about
9612 stable releses.
9613
3ab2ca22
AD
96142005-09-20 Akim Demaille <akim@epita.fr>
9615
9616 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9617
a9739e7c
PE
96182005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9619
a702593e
PE
9620 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9621 (YYSTACK_ALLOC_MAXIMUM): Use it.
9622 (yysyntax_error): New function.
9623 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9624 multiple syntax errors are reported, and alloca is being used.
9625 Instead, reallocate buffers twice as big each time, so that
9626 we waste at most half the allocated memory. Start with a small
9627 (128-byte) buffer that will suffice in most cases anyway.
9628 Use yysyntax_error to do most of the work.
9629
9630 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9631 yynerrs is the number of errors reported, not the number of
9632 errors encountered.
9633
a9739e7c
PE
9634 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9635 Mark it as expected to fail.
9636 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9637 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9638 Don't start user-code symbols with "yy", to avoid name space problems.
9639
f479c6c6
AD
96402005-09-19 Akim Demaille <akim@epita.fr>
9641
9642 Remove the traits, failed experiment.
9643 It never proved useful, and anyway because of the current
9644 definition, it was not possible to have several specialization of
9645 this traits, making it useless.
9646 * data/lalr1.cc (yy:traits): Remove.
9647 Inline its definitions in the parser class.
9648
e2586f82
AD
96492005-09-19 Akim Demaille <akim@epita.fr>
9650
9651 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9652 least Mac OSX with a /usr/local install of gettext.
9653
2e8cf949
AD
96542005-09-19 Akim Demaille <akim@epita.fr>
9655
9656 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9657 and yytoken for similarity with the other skeletons.
9658
c7fb0b90
AD
96592005-09-19 Akim Demaille <akim@epita.fr>
9660
4e26c69e 9661 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 9662
1bd0deda
PE
96632005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9664
9665 * NEWS: Version 2.1.
9666
9667 * NEWS: Remove notice of yytname change, since it was never in an
9668 official release.
9669 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9670 diagnostic.
9671 * src/output.c (prepare): Likewise.
9672 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9673 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9674 is not defined. This is an awful hack, but it's enough for now.
9675 All callers changed.
9676 * tests/glr-regression-at (make_value): Args are const pointers now,
9677 to avoid GCC warning.
9678 (Duplicated user destructor for lookahead): New test. Currently
9679 skipped. It fails on my host but I'm not sure it'll always fail.
9680
96812005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
9682
9683 * src/symtab.h (struct symbol): Declare the printer and destructor
9684 as const, to avoid accidental calls to free.
9685 (symbol_destructor_set, symbol_printer_set): Adjust.
9686 * src/symtab.c: Adjust.
9687
1bd0deda 96882005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
9689
9690 * data/c.m4 (b4_token_enums): New.
9691 (b4_token_defines): Rename as...
9692 (b4_token_enums_defines): this.
9693 (b4_token_defines): New, output only the #defines.
9694 * data/yacc.c, data/glr.c: Adjust.
9695 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9696 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9697 as default values.
9698
dbcdae2d
AD
96992005-09-16 Akim Demaille <akim@epita.fr>
9700
9701 * data/lalr1.cc (yylex_): Remove, inline its code.
9702 (yyreport_syntax_error_): Remove, replaced by...
9703 (yysyntax_error_): this which returns a string and leaves to the
9704 caller the call to the users' error function.
9705 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9706 Move from members of the parser object...
9707 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9708 to local variables of the parse function.
9709
70d8f291
AD
97102005-09-16 Akim Demaille <akim@epita.fr>
9711
9712 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9713 since it's in Bison's name space.
9714
b47dbebe
PE
97152005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9716
ae199bf1
PE
9717 * data/glr.c (yyresolveValue): Add default case to pacify
9718 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9719
b47dbebe
PE
9720 * NEWS: Document when yyparse started to return 2.
9721 * doc/bison.texinfo (Parser Function): Document when yyparse
9722 returns 2.
9723
9724 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9725 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9726 changed.
9727 (class position): file_name -> filename (reverting). All uses changed.
9728
97292005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9730
9731 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9732 do anything if $@ exists. This reverts part of the 2005-07-07
9733 patch.
9734
00292f66
PE
97352005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9736
9737 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9738 contains obsolete information and isn't worth distributing as a
9739 separate file anyway.
9740 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9741 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9742 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9743 (yyparse): Abort if user code uses longjmp to throw an unexpected
9744 value.
9745
a420f962
PE
97462005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9747
00292f66
PE
9748 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9749 Suggested by twlevo@xs4all.nl.
9750
127287e9
PE
9751 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9752 This avoids a diagnostic from gcc -Wswitch-enum.
9753 Problem reported by twlevo@xs4all.nl.
9754
a420f962
PE
9755 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9756 standards. Use "file name" or "file" or "name", depending on
9757 the context.
9758 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9759 not to hack/foo.tab.c.
9760 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
9761 * data/glr.c: b4_filename -> b4_file_name.
9762 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9763 All uses changed.
9764 (class position): filename -> file_name. All uses changed.
9765 * data/yacc.c: b4_filename -> b4_file_name.
9766 * lib/bitset.h: filename -> file_name in local vars.
9767 * lib/bitset_stats.c: Likewise.
9768 * src/files.c: Likewise.
9769 * src/scan-skel.l ("@output ".*\n): Likewise.
9770 * src/files.c (file_name_split): Renamed from filename_split.
9771 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
9772
97732005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9774
9775 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9776 to accommodate latest gnulib.
9777
9778 * tests/glr-regression.at (Duplicate representation of merged trees):
9779 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9780
9781 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9782 needed.
9783
42a6501d
PE
97842005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9785
9786 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9787 All uses changed. Invoke user destructor after an error during a
9788 split parse (trivial change from Joel E. Denny).
9789
9790 * tests/glr-regression.at
9791 (User destructor after an error during a split parse): New test case.
9792 Problem reported by Joel E. Denny in:
9793 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9794
ef9a1faf
PE
97952005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9796
5b4aaf78
PE
9797 * README-cvs: Give URLs for recommended tools.
9798 Mention Gzip version problem, and bootstrapping issues.
9799 Remove troubleshooting section, as it's somewhat obsolete.
9800
b5240ba5
PE
9801 * bootstrap (no_cache): New var, to accommodate different wget
9802 variants. Use it instead of '-C off'. Problem reported by
9803 twlevo@xs4all.nl.
9804
ef9a1faf
PE
9805 * data/glr.c (yydestroyStackItem): New function.
9806 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9807 debugging information. Problem reported by Joel E. Denny.
9808
e6efa9da
AD
98092005-08-25 Akim Demaille <akim@epita.fr>
9810
9811 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9812
adc90f13
PE
98132005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9814
9815 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9816 Don't invoke destructor on unresolved entries.
9817 * tests/glr-regression.at
9818 (User destructor for unresolved GLR semantic value): New test case.
9819 Problem reported by Joel E. Denny in:
9820 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9821
f9315de5
PE
98222005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9823
15d29c1f
PE
9824 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9825 Add strnlen.c.
9826 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9827 lib-prefix.m4, po.m4.
9828
dd5f2af2
PE
9829 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9830 in yydestruct diagnostic, since it might not be an error.
9831 Problem reported by Joel Denny near end of
9832 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 9833 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
9834 * data/yacc.c (yyreturn): Likewise.
9835 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9836
9837 * src/files.c: Remove obsolete FIXME comment.
9838
9839 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9840 with the other templates, and to fix bogus run-on messages such
9841 as the one reported at the end of
9842 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9843 All callers changed to avoid the newline.
9844 (yyprocessOneStack): Output two lines rather than one, to accommodate
9845 the above change. This changes the debug output format slightly.
9846
f9315de5
PE
9847 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9848 reported by Joel E. Denny in
9849 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9850 (trivial change).
9851 * tests/glr-regression.at (Duplicate representation of merged trees):
9852 New test, from Joel E. Denny in:
9853 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9854 * THANKS: Add Joel E. Denny.
9855
9856 * configure.ac (AC_INIT): Bump to 2.0c.
9857
04098407
PE
98582005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9859
9860 * NEWS: Version 2.0b.
9861
ca5d2013
PE
9862 * Makefile.am (SUBDIRS): Put examples before tests, so that
9863 "make check" doesn't finish with "All 1 tests passed".
9864
3d54b576
PE
9865 * tests/regression.at (Token definitions): Don't rely on
9866 AT_PARSER_CHECK for data that contains backslashes. It currently
9867 uses 'echo', and 'echo' isn't portable if its argument contains
9868 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9869 that the byte '\0xff' is not printable in the C locale; it is,
9870 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9871 not printable, so use '\0x81' to test.
9872
d53ae497
PE
9873 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9874 version of GCC, since the macro is used with non-GCC compilers.
9875
fc01665e
PE
9876 Fix core dump reported by Pablo De Napoli in
9877 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9878 * tests/regression.at (Invalid inputs with {}): New test.
9879 * src/parse-gram.y (token_name): Translate type before using
9880 it as an index.
9881
04098407
PE
9882 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9883 the user's name space. All uses changed to __attribute__
9884 ((__unused__)).
9885 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9886 Add __attribute__ ((__noreturn__)).
9887
9888 * etc/clcommit: Remove. We weren't using it, and it failed
9889 "make maintainer-distcheck".
9890 * Makefile.maint: Merge from coreutils.
9891 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9892 (syntax-check-rules): Change list of rules as described below.
9893 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9894 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9895 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9896 (sc_trailing_space): New rules.
9897 (sc_xalloc_h_in_src): Remove.
9898 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9899 (sc_space_tab, sc_error_exit_success, sc_changelog):
9900 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9901 (makefile-check, po-check, author_mark_check):
9902 (makefile_path_separator_check, copyright-check):
9903 Use grep -n, to make it easier to find violations.
9904 Use CVS_LIST and CVS_LIST_EXCEPT.
9905 (header_regexp, h_re): Remove.
9906 (dd_c): New macro.
9907 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9908 (my-distcheck): Use more-modern GCC flags.
9909 (signatures, %.asc): Remove.
9910 (rel-files, announcement): Remove signatures.
9911 Restore old updating code, even though we don't use it, so
9912 that we're the same as coreutils.
9913 (alpha, beta, major): Depend on news-date-check.
9914 Make the upload commands.
9915
9916 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9917 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9918 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9919 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9920 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9921 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9922 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9923 * tests/sets.at: Likewise.
9924
9925 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9926 we comment out the Autoconf version number.
9927 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9928 it's error-prone and "make maintainer-distcheck" rejects it.
9929
9930 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9931 Indent calls to "error" to pacify "make maintainer-distcheck",
9932 when the calls are not intended to be translated.
9933 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9934
9935 * src/Makefile.am (DEFS): Use +=, to pacify
9936 "make maintainer-distcheck".
9937 (bison_SOURCES): Add scan-skel.h.
9938 (sc_tight_scope): New rule, from coreutils.
9939
9940 * src/files.c (src_extension, header_extension):
9941 Now static, not extern.
9942 * src/getargs.c (short_options): Likewise.
9943 * src/muscle_tab.c (muscle_table): Likewise.
9944 * src/parse-gram.y (current_class, current_type, current_prec):
9945 Likewise.
9946 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9947 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9948 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9949 void, to avoid warning when NLS is disabled.
9950 * src/output.c: Include scan-skel.h.
9951 (scan_skel): Remove decl, since scan-skel.h does this.
9952 (output_skeleton):
9953 Indent calls to "error" to pacify "make maintainer-distcheck".
9954 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9955 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9956 "make maintainer-distcheck".
9957 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9958 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9959 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9960 (skel_lex_destroy, scan_skel): Move these decls to...
9961 * src/scan-skel.h: New file.
9962 * src/uniqstr.c (uniqstr_assert):
9963 Indent calls to "error" to pacify "make maintainer-distcheck".
9964
9965 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9966 not @VAR@.
9967
9968 * tests/torture.at: Revamp to avoid misuse of atoi that
9969 "make maintainer-distcheck" complained about.
9970
9971 * examples/extexi (message): Don't print a message more than once,
9972 and omit line-number decoration that makes Emacs compile think
9973 that informative messages are worth worrying about.
9974
99752005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9976
9977 * configure.ac: Update version number.
9978
9979 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9980 accidentally.
9981 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9982 autogenerated by the maintainer.
9983 * examples/calc++/.cvsignore: Add *.yy.
9984
9985 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9986 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9987 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9988
9989 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9990
9991 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9992 from maintainer-distcheck about casting the argument of 'free'.
9993
9994 * NEWS: Mention recent yytname changes.
9995 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9996
9997 * bootstrap: For translations that have not yet been upgraded to
9998 the new runtime-po domain, prime the pump by extracting the
9999 relevant strings from the obsolete translations. This code can be
10000 removed once the bison-runtime domain has been translated by each
10001 team.
10002
10003 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10004 now that token names are already quoted.
10005
10006 Fix problem reported by Anthony Heading.
10007 * data/glr.c (YYTOKEN_TABLE): New macro.
10008 (yytname): Define if YYTOKEN_TABLE.
10009 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10010 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10011 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10012 * src/output.c (prepare_symbols): Output token_table_flag.
10013
0ffda363
PE
100142005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10015
10016 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10017 again if the first call fails.
10018
10019 * data/glr.c (yytnamerr): New function.
10020 (yyreportSyntaxError): Use it to dequote most string literals.
10021 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10022 with other skeletons. All uses changed.
10023 (yytnameerr_): New function.
10024 (yyreport_syntax_error): Use it to dequote most string literals.
10025 * data/yacc.c (yytnamerr): New function.
10026 (yyerrlab): Use it to decode most string literals.
10027 * doc/bison.texinfo (Decl Summary, Calling Convention):
10028 Clarify quoting convention of yytname.
10029 * src/output.c (prepare_symbols): Quote all names. This undoes
10030 the 2005-04-17 change, which is now accomplished (mostly) via
10031 changes in the parsers as described above.
10032 * tests/regression.at (Token definitions, Web2c Actions):
10033 Undo most 2005-04-17 change here, too.
10034
100352005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10036
10037 Fix more problems reported by twlevo@xs4all.nl.
10038 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10039 remove trailing spaces. This loses the exit status of ./types,
10040 and isn't needed since ./types shouldn't be emitting trailing
10041 spaces.
10042 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10043 as the stack isn't valid in that case.
10044
10045 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10046 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10047 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10048 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10049 is used.
10050 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10051 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10052 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10053 Likewise.
10054
10055 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10056 overly-picky compilers that reject 'char *foo = "bar";'.
10057
10058 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10059 to FILE * parameter, not to stderr. This fixes a typo introduced
10060 in the 2005-07-12 change.
10061
10062 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10063 warnings from GCC 4.
10064
10065 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10066 (yyglrShiftDefer, yysplitStack):
10067 Remove unused parameters b4_pure_formals. All uses changed.
10068 (yyglrShift): Remove unused parameters b4_user_formals.
10069 All uses changed.
10070 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10071
6100a9aa
PE
100722005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10073
258b75ca
PE
10074 Destructor cleanups and regularization among the three skeletons.
10075 * NEWS: Document the behavior changes.
10076 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10077 stack before failing, as the cleanup code will do it for us now.
10078 * data/lalr1.cc (yyerrlab): Likewise.
10079 * data/glr.c (yyparse): Pop everything off the stack before
10080 freeing it, so that destructors get called properly.
10081 * data/lalr1.cc (yyreturn): Likewise.
10082 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10083 This is more consistent.
10084 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10085 why destructors might be called. 1.875 -> 2.1.
10086 (Destructor Decl, Decl Summary, Table of Symbols):
10087 Some English-language cleanups for %destructor.
10088 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10089 Add output line for destructor of start symbol.
10090 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10091 because of that same extra output line.
10092
1a059451
PE
10093 * NEWS: Document minor wording changes in diagnostics of
10094 Bison-generated parsers.
10095 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10096 Remove unused formals. All uses changed.
10097 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10098 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10099 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10100 Rename yyoverflowab to yyexhaustedlab.
10101 When memory exhaustion occurs during syntax-error reporting,
10102 report it separately rather than in a single diagnostic; this
10103 eases translation.
10104 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10105 (Memory Exhausted): Renamed from Parser Stack Overflow.
10106 Revamp wording slightly to prefer "memory exhaustion".
10107 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10108
97460c78
PE
10109 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10110
30757c8c
PE
10111 Add i18n support to the GLR skeleton. Partially fix the C++
10112 skeleton; a C++ expert needs to finish this. Remove debugging
10113 msgids; there's little point to having them translated, since they
10114 can be understood only by someone who can read the
10115 (English-language) source code.
10116
10117 Generate runtime-po/bison-runtime.pot automatically, so that we
10118 don't have to worry about garbage getting in that file. We'll
10119 make sure after the next official release that old msgids don't
10120 get lost. See
10121 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10122
10123 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10124 Now auto-generated.
10125 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10126 Fix typos in explanations of the runtime file.
10127 * bootstrap: Change gettext keyword from YYI18N to YY_.
10128 Use standard Makefile.in.in in runtime-po, since we'll arrange
10129 for backward-compatible bison-runtime.po files in a different way.
10130 * data/glr.c (YY_): New macro, from yacc.c.
10131 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10132 Translate messages intended for users.
10133 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10134 the wording in the other skeletons. We don't know that the memory
10135 is virtual.
10136 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10137 Use same method that yacc.c uses.
10138 Don't translate debugging messages.
10139 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10140 it doesn't work (yet), and requires C++ expertise to fix.
10141 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10142 Move defn to a more logical place, to be consistent with other
10143 skeletons.
10144 Don't translate debugging messages.
10145 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10146 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10147 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10148 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10149
ac8c5689
PE
10150 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10151 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10152 void, not int.
10153 * tests/glr-regression.at (Badly Collapsed GLR States):
10154 Likewise.
10155 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10156 yylex should return 0 at EOF rather than aborting.
10157
6100a9aa
PE
10158 Improve tests for stack overflow in GLR parser.
10159 Problem reported by twlevo@xs4all.nl.
10160 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10161 All uses removed.
10162 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10163 can handle the problem.
10164 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10165 (yyparse): New local variable yyresult to record the result.
10166 Use result of setjmp to set it, rather than storing itinto
10167 struct.
10168 (yyDone): Remove label.
10169 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10170 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10171 if YYABORT is used).
10172 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10173 yyparse status; put status > 1 into diagnostic.
10174 Check that status==2 works.
10175 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10176 Use exit status 3 for failure to open (which shouldn't happen).
10177
15f40952
PE
101782005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10179
67fd79c4
PE
10180 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10181 1 on syntax error; just let yyparse do its thing.
10182 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10183 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10184 (Exploding the Stack Size with Alloca):
10185 (Exploding the Stack Size with Malloc):
10186 Expect exit status 2, not 1, since the parser is supposed to blow
10187 its stack. Problem reported by twlevo@xs4all.nl.
10188
15f40952
PE
10189 * data/glr.c (yyparse): Don't assume that the initial calls
10190 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10191 Print a stack-overflow message and fail instead.
10192 Initialize the line-number information before creating the stack,
10193 so that the stack-overflow message can report line zero safely.
10194
f32c66b5
PE
101952005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10196
a22ff96f 10197 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
10198 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10199 (yyuserMerge): Provide a default case if b4_mergers is empty.
10200 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10201 * tests/glr-regression.at
10202 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 10203 Add casts to pacify C++ compilers.
1beb0b24
PE
10204 * tests/glr-regression.at (Improper merging of GLR delayed action
10205 sets): Declare yylex before using it.
f32c66b5 10206 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
10207 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10208 test for valgrind; valgrind is independent of g++.
10209 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10210 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10211 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10212 Use a destructor, so that we can expand the stack. Change
10213 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 10214
d741bd1b
PE
102152005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10216
10217 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10218 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10219
0410a6e0
PE
102202005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10221
10222 * PACKAGING: New file, suggested by Bruno Haible and taken from
10223 similar wording in gettext's PACKAGING file.
10224 * NEWS: Mention PACKAGING.
10225 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10226
f7ab6a50
PE
102272005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10228
baf785db 10229 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
10230 * bootstrap: Get runtime translations into runtime-po.
10231 Create runtime-po files automatically, if possible.
10232 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10233 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10234 does not infringe on the user's name space.
10235 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10236 * doc/bison.texinfo (Internationalization): Revamp the English
10237 and Texinfo syntax a bit, to try to make it clearer.
10238 (Bison Options, Option Cross Key): Mention --print-localedir.
10239 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10240 YYENABLE_NLS. Quote a bit more.
10241 * runtime-po/.cvsignore: New file.
10242 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10243 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10244 * runtime-po/quot.sed: Likewise.
10245 * runtime-po/boldquot.sed: Likewise.
10246 * runtime-po/en@quot.header: Likewise.
10247 * runtime-po/en@boldquot.header: Likewise.
10248 * runtime-po/insert-header.sin: Likewise.
10249 * runtime-po/remove-potcdate.sin: Likewise.
10250 * runtime-po/Makevars: Likewise.
10251 * runtime-po/LINGUAS: Likewise.
10252 * runtime-po/de.po: Likewise; we will rely on the translation project
10253 to maintain this, so "bootstrap" should get it.
0410a6e0 10254 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
10255 its value.
10256 * src/main.c (main): Bind the bison-runtime domain, too.
10257
102582005-07-12 Bruno Haible <bruno@clisp.org>
10259
10260 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10261 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10262 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10263 * runtime-po: New directory.
10264 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10265 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10266 * runtime-po/Rules-quot: New file, copied from po/.
10267 * runtime-po/quot.sed: Likewise.
10268 * runtime-po/boldquot.sed: Likewise.
10269 * runtime-po/en@quot.header: Likewise.
10270 * runtime-po/en@boldquot.header: Likewise.
10271 * runtime-po/insert-header.sin: Likewise.
10272 * runtime-po/remove-potcdate.sin: Likewise.
10273 * runtime-po/Makevars: New file.
10274 * runtime-po/POTFILES.in: New file.
10275 * runtime-po/LINGUAS: New file.
10276 * runtime-po/bison-runtime.pot: New file.
10277 * runtime-po/de.po: New file.
10278 * m4/bison.m4: New file.
10279 * Makefile.am (SUBDIRS): Add runtime-po.
10280 (aclocaldir, aclocal_DATA): New variables.
10281 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10282 Define aclocaldir.
10283 * src/getargs.c (usage): Document --print-localedir option.
10284 (PRINT_LOCALEDIR_OPTION): New enum item.
10285 (long_options): Add --print-localedir option.
10286 (getargs): Handle --print-localedir option.
10287 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10288 (Internationalization): New section.
10289
22dda0f0
AD
102902005-07-12 Akim Demaille <akim@epita.fr>
10291
10292 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10293 for consistency with the rest of the code.
10294 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10295 Add separators.
10296
82b248ad
AD
102972005-07-12 Akim Demaille <akim@epita.fr>
10298
10299 * src/parse-gram.y: Use %printer instead of YYPRINT.
10300
fa0e9314
AD
103012005-07-12 Akim Demaille <akim@epita.fr>
10302
867a3e00
AD
10303 * src/symtab.h, src/symtab.c (symbol_print): New.
10304 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10305 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10306
103072005-07-12 Akim Demaille <akim@epita.fr>
10308
10309 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
10310 b4_at_dollar and b4_dollar_dollar.
10311
e054b190
PE
103122005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10313
10314 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10315 and Pennello's paper.
10316
34160ec4
PE
103172005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10318
407d4a75
PE
10319 * data/yacc.c (yyparse): Undo previous patch. Instead,
10320 set yylsp[0] and yyvsp[0] only if the initial action
10321 sets yylloc and yylval, respectively.
10322
34160ec4
PE
10323 * data/yacc.c (yyparse): In the initial action, set
10324 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10325 This avoids the use of undefined variables if the initial
10326 action does not set yylloc and/or yylval.
10327
c3d5a4a7
PE
103282005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10329
b34d96c1
PE
10330 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10331 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10332 Remove from CVS. These files are automatically generated.
10333 * examples/extexi: Clarify that this file is now part of Bison,
10334 not GNU M4, and that it works with any POSIX-compatible Awk.
10335 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10336 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10337 so that we also get calc++-parser.yy. Geneate it.
10338 Use $(AWK), not gawk, since any conforming Awk will do.
10339 Put comment before action, since older 'make' can't handle comment
10340 in action.
10341 $(BUILT_SOURCES): List all built sources, not just some of them.
10342 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10343 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10344 $($(calc_sources_generated)): Remove unnecessary test for existence
10345 of target. (This had a shell syntax error anyway; a stray "x".)
10346 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10347 calc++-parser.yy.
10348 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10349
c3d5a4a7
PE
10350 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10351 implied by the other modules.
10352
828c373b
AD
103532005-07-06 Akim Demaille <akim@epita.fr>
10354
10355 Bind examples/calc++ to the package.
10356 * examples/calc++/Makefile: Remove, replaced by...
10357 * examples/calc++/Makefile.am: ... this new file.
10358 * examples/calc++/test: Remove input.
10359 * examples/calc++/compile: Remove.
10360 * examples/Makefile.am: New.
10361 * configure.ac, Makefile.am: Adjust.
10362 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10363
63cb01d6
PE
103642005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10365
fd2df2ed
PE
10366 * data/glr.c (yyFail): Drastically simplify; since the format argument
10367 never had any % directives, we can simply pass it to yyerror.
10368 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10369 be modified later, as that is the usual style in glr.c.
10370 Problems reported by Paul Hilfinger.
10371
63cb01d6
PE
10372 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10373 and size overflow errors.
10374 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10375 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10376 (YYSIZEMAX): New macro.
10377 (yystpcpy): New function, taken from yacc.c.
10378 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10379 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10380 so that we don't have to maintain their signatures.
10381 (yyFail): Check for buffer overflow, by using vsnprintf rather
10382 than vsprintf. Allocate a bigger buffer if possible.
10383 Report an error if buffer allocation fails.
10384 (yyStackOverflow): New function.
10385 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10386 the initialization was successful. It might fail if storage was
10387 exhausted.
10388 (yyexpandGLRStack): Add more checks for storage allocation failure.
10389 Use yyStackOverflow to report failures.
10390 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10391 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10392 Don't assume stack number fits in int.
10393 (yysplitStack): Check for storage allocation failure.
10394 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10395 can print diagnostics on storage allocation failure. All callers
10396 changed.
10397 (yyresolveValue): Use yybool for boolean.
10398 (yyreportSyntaxError): Check for size-calculation overflow.
10399 This code is taken from yacc.c.
10400 (yyparse): Check for storage allocation errors when allocating
10401 the initial stack.
10402
1c59e0a1
AD
104032005-07-05 Akim Demaille <akim@epita.fr>
10404
10405 Extract calc++ from the documentation.
10406 * doc/bison.texinfo (Calc++): Add the extraction marks.
10407 * examples/extexi: New, from the aborted GNU Programming 2E.
10408 Separate the different paragraph of a file with empty lines.
10409 * examples/Makefile: Use it to extract the whole calc++ example.
10410
8a0adb01
AD
104112005-06-24 Akim Demaille <akim@epita.fr>
10412
10413 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10414 class typedefs.
10415
12545799
AD
104162005-06-22 Akim Demaille <akim@epita.fr>
10417
10418 * doc/bison.texinfo (C++ Language Interface): First stab.
10419 (C++ Parsers): Remove.
10420
99be0235
AD
104212005-06-22 Akim Demaille <akim@epita.fr>
10422
10423 * data/lalr1.cc (yylex_): Honor %lex-param.
10424
0ffd4fd1
AD
104252005-06-22 Akim Demaille <akim@epita.fr>
10426
10427 Start a set of simple examples.
10428 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10429 * examples/calc++/calc++-driver.hh,
10430 * examples/calc++/calc++-parser.yy,
10431 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10432 * examples/calc++/compile, examples/calc++/test: New.
10433
0925ebb4
PE
104342005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10435
10436 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10437 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10438 which stems from the 2005-05-27 patch.
10439
43d3b664
PH
104402005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10441
10442 * data/glr.c: Modify treatment of unused parameters to permit use
10443 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10444
3062864d
PE
104452005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10446
10447 Fix infringement on user name space reported by Janos Zoltan Szabo.
10448 * data/yacc.c (yyparse): strlen -> yystrlen.
10449
989b5b8e
AD
104502005-05-30 Akim Demaille <akim@epita.fr>
10451
10452 * data/lalr1.cc (_): New.
10453 Translate the various messages.
10454
bedf57f5
PE
104552005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10456
10457 Fix infringement on user name space reported by Bruno Haible.
10458 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10459 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10460 the user's name space.
10461 (alloca): Include <stdlib.h> to get it, if it's not built in.
10462 (YYMALLOC, YYFREE): Define only if needed.
10463 (malloc, free): Declare, but only if needed, as this infringes on
10464 the user name space.
10465
4d1801f1
PE
104662005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10467
10468 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10469 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10470 with %d format.
10471 * lib/ebitset.c (min, max): Undef before defining.
10472 * lib/vbitset.c (min, max): Likewise.
10473 * lib/subpipe.c (create_subpipe): Save local variables in case
10474 vfork clobbers them.
10475
104762005-05-24 Bruno Haible <bruno@clisp.org>
10477
10478 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10479 error message syntax used by gcc-4.0.
10480
b94a9e1e
PE
104812005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10482
85ac3861
PE
10483 * README: Mention m4 1.4.3. Remove obsolete advice about
10484 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10485
b94a9e1e
PE
10486 * bootstrap: Remove workaround for problem I encountered with
10487 gettext 0.14.1; it seems to be fixed now.
10488
51c30d21
PE
104892005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10490
009ce67d
PE
10491 * NEWS: Version 2.0a.
10492
f2a97c62
PE
10493 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10494 the previous change.
10495
c8775f93
PE
10496 Various maintainer cleanups.
10497 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10498 conftest*, for benefit of CVS commands run at the same time as
10499 "configure". Add build-aux, since "bootstrap" now creates it and
10500 its subfiles.
10501 * Makefile.cfg (move_if_change): Remove.
10502 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10503 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10504 (po_repo, do-po-update, po-update, wget_files, get-targets):
10505 (config.guess-url_prefix, config.sub-url_prefix):
10506 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10507 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10508 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10509 Remove.
10510 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10511 this is now the recommended name.
10512 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10513 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10514 ylwrap. These files now go into build-aux.
10515 * config/move-if-change: Remove.
10516 * config/prev-version.txt: Bump from 1.75 to 2.0.
10517
3ea5f0ec
PE
10518 * bootstrap: Add stdio-safer, unistd-safer modules.
10519 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10520 we don't need it).
10521 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10522 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10523 * lib/subpipe.c: Include "unistd-safer.h".
10524 (create_subpipe): Make sure all the newly-created
10525 file descriptors are > 2, so that diagnostics don't
10526 get sent down them (which might cause Bison to hang, in theory).
10527 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10528 * src/files.c (xfopen): Use fopen_safer, not fopen.
10529
51c30d21
PE
10530 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10531 yesterday's yacc.c fix.
10532
cea1469d
PE
105332005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10534
3ea5f0ec
PE
10535 * data/glr.c, data/lalr1.cc: Update copyright date.
10536
cea1469d
PE
10537 Fix a destructor bug reported by Wolfgang Spraul in
10538 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10539 * data/yacc.c (yyabortlab): Don't call destructor, and
10540 don't set yychar to EMPTY.
10541 (yyoverflowlab): Don't call destructor.
10542 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10543 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10544 since we no longer output the message "discarding lookahead token
10545 end of input ()".
10546
5e6f62f2
PH
105472005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10548
10549 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10550 fix a small glitch in debugging output.
10551 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10552 after YY_SYMBOL_PRINT where needed.
10553
10554 (struct yyGLRState): Add some comments.
10555 (struct yySemanticOption): Add some comments.
10556 (union yyGLRStackItem): Add comment.
10557
10558 (yymergeOptionSets): Correct this to properly perform the union,
10559 avoiding infinite reported by Michael Rosien.
10560 Update comment.
10561
10562 * tests/glr-regression.at: Add test for GLR merging error reported
10563 by M. Rosien.
cea1469d 10564
0fb669f9
PE
105652005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10566
10567 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10568 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10569 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10570 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10571 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10572 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10573 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10574 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10575 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10576 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10577 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10578 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10579 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10580 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10581 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10582 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10583 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10584 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10585 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10586 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10587 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10588 src/output.h, src/parse-gram.c, src/parse-gram.h,
10589 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10590 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10591 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10592 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10593 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10594 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10595 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10596 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10597 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10598 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10599 tests/reduce.at, tests/regression.at, tests/sets.at,
10600 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10601 Update FSF postal mail address.
10602
51f4735e
PE
106032005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10604
10605 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10606 Problem reported by Ralf Menzel.
10607
80ce3401
PE
106082005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10609
10610 * tests/actions.at: Test that stack overflow invokes destructors.
10611 From Marcus Holland-Moritz.
10612 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10613 from here....
10614 (yyreturn): to here. That way, destructors are called properly
10615 even if the stack overflows, or the user calls YYACCEPT or
10616 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10617 (yyoverflowlab): Destroy the lookahead.
10618
106192005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10620
10621 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10622
72f000b0
PE
106232005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10624
10625 * NEWS: Bison-generated C parsers no longer quote literal strings
10626 associated with tokens.
10627 * src/output.c (prepare_symbols): Don't escape strings,
10628 since users don't want to see C escapes.
10629 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10630 in diagnostics.
c19683bb 10631 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
10632 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10633
1094323f
PE
106342005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10635
10636 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10637 the data size is known to be too small and we can't increase it.
10638 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10639
ca407bdf
PE
106402005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10641
10642 * src/parse-gram.y: Include quotearg.h.
10643 (string_as_id): Quote $1 before using it as a key, since the
10644 lexer no longer quotes it for us.
10645 (string_content): Don't strip quotes, since lexer no longer
10646 quotes it for us.
10647 * src/scan-gram.l: Include quotearg.h.
10648 ("\""): Omit quote.
10649 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10650 a key, since the rest of the lexer doesn't quote it.
10651 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10652 * tests/regression.at (Token definitions): Check for backslashes
10653 in token strings.
10654
10655 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10656 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10657 (yyparse): Revamp code to generate long syntax error message, to
10658 make it easier to translate, and to avoid problems with arithmetic
10659 overflow. Change "virtual memory" to "memory" in diagnostic, since
10660 we don't know whether the memory is virtual.
10661
1ce59070
PE
106622005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10663
10664 * NEWS: Bison-generated C parsers now use the _ macro to
10665 translate strings.
10666 * data/yacc.c (_) [!defined _]: New macro.
10667 All English strings wrapped inside this macro.
10668 * doc/bison.texinfo (Bison Parser): Document _.
10669 * po/POTFILES.in: Include src/parse-gram.c, since it now
10670 includes translateable strings that parse-gram.y doesn't.
10671
a749a695
PE
106722005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10673
10674 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10675 reverting the 2004-10-11 change to this function.
10676 (symbol_check_alias_consistency): Don't call symbol_type_set
10677 if the type name is already correct.
10678 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10679
8fb1053b
PE
106802005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10681
10682 * tests/regression.at (Token definitions): Don't use a token named
10683 c, as that generates a "#define c ..." that runs afoul of buggy
10684 stdlib.h that uses the identifier c as a member of struct
10685 drand48_data. Problem reported by Horst Wente.
10686
ff498c4a
PE
106872005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10688
10689 * bootstrap: Change translation URL from
10690 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10691 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10692 redirection glitches. Problem reported by twlevo@xs4all.nl.
10693
65211d70
PE
106942005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10695
10696 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10697 after operands; POSIX says this isn't portable for the c99 command.
10698
9577fb1f
PE
106992005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10700
10701 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10702 immediately if a data overrun has occurred; this may help us track
10703 down what may be a spurious failure on MacOS.
10704
78b178f7
PE
107052005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10706
a2599d0f
PE
10707 Respond to problems reported by twlevo@xs4all.nl.
10708
10709 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10710
78b178f7
PE
10711 * src/vcg.h: Comment fix.
10712 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10713 (G_CMAX): Change to -1 instead of INT_MAX.
10714
10715 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 10716
7296e729
PE
107172005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10718
10719 * src/tables.c (state_number_to_vector_number): Put it inside an
10720 "#if 0", since it's not currently used. Problem reported by
10721 Roland McGrath.
10722
05ac60f3
PE
107232005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10724
10725 * src/output.c (escaped_output): Renamed from
10726 escaped_file_name_output, since we now use it for symbol tags as
10727 well. All uses changed.
10728 (symbol_destructors_output, symbol_printers_output):
10729 Escape symbol tags too.
10730 Problem reported by Matyas Forstner in
10731 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10732
10733 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10734 not needed.
10735 * src/output.c (user_actions_output, token_definitions_output,
10736 symbol_destructors_output, symbol_printers_output): Likewise.
10737 * src/reader.c (prologue_augment): Likewise.
10738 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10739
10740 * src/vcg.c (output_edge): Don't quote linestyle arg.
10741 Problem reported by twlevo@xs4all.nl.
10742
7eb453ac
PE
107432005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10744
10745 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10746 example, reported by Derek M Jones. Also, make the example even
10747 more outrageous, to better illustrate how bad the problem is.
10748
4c04c52a
PE
107492005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10750
10751 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10752 putsym. Typo reported by Sebastian Piping.
10753
a61e1620
PE
107542005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10755
10756 * doc/bison.texinfo (Language and Grammar): some -> same
10757 (Epilogue): int he -> in the
10758 Typos reported by Sebastian Piping via Justin Pence.
10759
9ec93868
PE
107602005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10761
10762 * tests/glr-regression.at (Improper handling of embedded actions
10763 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10764 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10765 with dollar signs in test names.
10766 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10767 for a similar reason.
10768
73ce7e7e
PE
107692005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10770
10771 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10772 wants to redefine G_VIEW.
10773
2e72b98e
PE
107742005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10775
10776 * src/vcg.c (get_view_str): Remove case for normal_view.
10777 Problem reported by twlevo@xs4all.nl.
10778
e0d634e5
PE
107792005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10780
ccf830a4
PE
10781 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10782 Problem reported by twlevo@xs4all.nl.
10783
e0d634e5
PE
10784 * doc/bison.texinfo: Change @dircategory from "GNU programming
10785 tools" to "Software development". Requested by Richard Stallman
10786 via Karl Berry.
10787
7bbc8cb0
PE
107882005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10789
10790 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10791 Problem reported by twlevo@xs4all.nl.
10792
08b770bc
PE
107932005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10794
10795 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10796 keyword; it's not needed with modern compilers, and it doesn't
10797 affect correctness with older compilers. Suggested by
10798 twlevo@xs4all.nl.
10799
95f22ad2
PE
108002005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10801
10802 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10803 gcc -Wswitch-default.
10804 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10805 * data/yacc.c (yyparse): Likewise.
10806
d229d15c
PE
108072005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10808
10809 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10810 already. Let config.h define any nonstandard values.
10811
ecadd90f
PE
108122005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10813
10814 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10815 for the benefit of slower hosts. Problem reported by
10816 Nelson H. F. Beebe.
10817
213744b5
PE
108182005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10819
10820 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10821 being defined and not used.
10822 * data/lalr1.cc (yyparse): Likewise.
10823 Use "if (false)" rather than "if (0)".
10824
249d3236
PE
108252005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10826
10827 * TODO: Mention that we should allow NUL bytes in tokens.
10828
987cc1fb
PE
108292005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10830
10831 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10832 Problem reported by Hans Aberg.
10833
08fe02d9
PE
108342005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10835
10836 * src/getargs.c (version): Happy new year; update overall
10837 program copyright date from 2004 to 2005.
10838
10839 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10840 Problem reported by Hans Aberg.
10841 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10842 (Output file names.): Add a test for the case when standard output
10843 is closed.
10844
010c0266
PE
108452004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10846
10847 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10848 to fix an oversight in the Bison 2.0 manual.
10849
da12206a
PE
108502004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10851
10852 * NEWS: Version 2.0. Reformat the existing news items since
10853 1.875, so that related items are grouped together.
3a4734aa 10854 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
10855 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10856
c935d934
PE
10857 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10858 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10859 otherwise, we're not testing alloca. Unfortunately there's no
10860 simple way to consult HAVE_ALLOCA here.
10861
da12206a
PE
10862 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10863 for yymsg, too.
10864
10865 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10866 hand. This avoids a warning about comparing int to size_t when
10867 GCC warnings are enabled.
10868
0a2c5137
PE
108692004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10870
d7e14fc0
PE
10871 * NEWS: Bison-generated parsers no longer default to using the
10872 alloca function (when available) to extend the parser stack, due
10873 to widespread problems in unchecked stack-overflow detection.
10874 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10875 responsibility to set it to a positive value. This lets the user
10876 specify a value that is not a preprocessor constant.
10877 * data/yacc.c (YYMAXDEPTH): Likewise.
10878 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10879 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10880 to be a compile-time constant. However, explain the constraints on it.
10881 Also, explain the constraints on YYINITDEPTH.
10882 (Table of Symbols): Explain that alloca is no longer the default.
10883 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10884 to 1.
10885
0a2c5137
PE
10886 * doc/bison.texinfo (Location Default Action): Mention that n must
10887 be zero when k is zero. Suggested by Frank Heckenbach.
10888
e019c247
AD
108892004-12-22 Akim Demaille <akim@epita.fr>
10890
10891 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10892 (parser::state_type, parser::semantic_type, parser::location_type):
10893 Private, not public.
10894 (parser::parse): Return ints, not bool.
10895 Returning a bool introduces a problem: 0 corresponds to false, and
10896 it seems weird to return false on success. Returning true changes
10897 the conventions for yyparse.
10898 Alternatively we could return void and send an exception.
10899 There is no clear consensus (yet?).
10900 (state_stack, semantic_stack, location_stack): Rename as...
10901 (state_stack_type, semantic_stack_type, location_stack_type): these.
10902 Private, not public.
10903 * tests/c++.at: New.
10904 * tests/testsuite.at, tests/Makefile.am: Adjust.
10905
72731bb7
AD
109062004-12-21 Akim Demaille <akim@epita.fr>
10907
10908 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10909
9a0d8bec
AD
109102004-12-21 Akim Demaille <akim@epita.fr>
10911
10912 Don't impose std::string for filenames.
10913
10914 * data/lalr1.cc (b4_filename_type): New.
10915 (position::filename): Use it.
10916 (parser.hh): Move the inclusion of stack.hh and location.hh below
10917 the user code, so that needed headers for the filename type can be
10918 included first.
72731bb7
AD
10919 Forward declare them before the user code.
10920 * tests/Makefile.am (check-local, installcheck-local): Pass
10921 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 10922
99880de5
AD
109232004-12-20 Akim Demaille <akim@epita.fr>
10924
10925 Use more STL like names: my_class instead of MyClass.
10926
10927 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10928 (SemanticStack, SemanticType, StateStack, StateType)
10929 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10930 (Parser::value): Rename as...
10931 (location_stack, location_type, rhs_number_type, semantic_stack)
10932 (semantic_type, state_stack, state_type, token_number_type, stack)
10933 (slice, traits, parser::yylloc, parser::yylval): these.
10934
10935 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10936
9bec482e
PE
109372004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10938
10939 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10940 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10941
f6fbd3da
PE
109422004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10943
10944 Remove uses of 'short int' and 'unsigned short int'. This raises
10945 some arbitrary limits. It uses more memory but nowadays that's
10946 not much of an issue.
10947
10948 This change does not affect the generated parsers; that's a different
10949 task, as some users will want to conserve memory there.
10950
10951 Ideally we should use size_t to represent all object counts, and
10952 something like ptrdiff_t to represent signed differences of object
10953 counts; but that will require more code-cleanup than I have the
10954 time to do right now.
10955
10956 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10957 Use size_t, not int or short int, to count objects.
10958 * src/closure.c (nritemset, closure): Likewise.
10959 * src/closure.h (nritemset, closure): Likewise.
10960 * src/nullable.c (nullable_compute): Likewise.
10961 * src/print.c (print_core): Likewise.
10962 * src/print_graph.c (print_core): Likewise.
10963 * src/state.c (state_compare, state_hash): Likewise.
10964 * src/state.h (struct state): Likewise.
10965 * src/tables.c (default_goto, goto_actions): Likewise.
10966
10967 * src/gram.h (rule_number, rule): Use int, not short int.
10968 * src/output.c (prepare_rules): Likewise.
10969 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10970 errs, reductions): Likewise.
10971 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10972 Likewise.
10973 * src/tables.c (vector_number, tally, action_number,
10974 ACTION_NUMBER_MINIMUM): Likewise.
10975 * src/output.c (muscle_insert_short_int_table): Remove.
10976
efeed023
AD
109772004-12-17 Akim Demaille <akim@epita.fr>
10978
10979 * data/lalr1.cc: Extensive Doxygenation.
10980 (error_): Rename as...
10981 (error): this, since it is visible to the user.
10982 Adjust callers.
10983 (Parser::message): Now an automatic variable from...
10984 (Parser::yyreport_syntax_error_): here.
10985 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10986 Parser::error.
10987 * tests/input.at: Escape $.
10988
bc82c5a5
PE
109892004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10990
10991 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10992 Parenthesize rhs to avoid obscure problems with mistakes like
10993 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10994 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10995 b4_rhs_location): Likewise.
10996 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10997 b4_rhs_location): Likewise.
10998
fd19f271
AD
109992004-12-16 Akim Demaille <akim@epita.fr>
11000
11001 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11002 yacc.c: be sure to stay within yycheck_.
11003 * tests/actions.at: Re-enable C++ tests.
11004
10454ea4
AD
110052004-12-16 Akim Demaille <akim@epita.fr>
11006
11007 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11008 real.
11009
c5b95ccf
AD
110102004-12-16 Akim Demaille <akim@epita.fr>
11011
11012 Use #define to handle the %name-prefix.
11013
11014 * data/glr.c, data/yacc.c: Comment changes.
11015 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11016 so that one can refer to yylex in the parser file, and have it
11017 renamed, as is the case with other skeletons.
11018
617a8f12
AD
110192004-12-16 Akim Demaille <akim@epita.fr>
11020
11021 Move lalr1.cc internals into yy*.
11022
11023 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11024 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11025 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11026 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11027 (empty_, final_, terror_, errcode_, ntokens_)
11028 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11029 (looka_, ilooka_, error_range_, nerrs_):
11030 Rename as...
11031 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11032 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11033 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11034 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11035 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11036 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11037 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11038 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11039 these.
11040
1e547e6e
PE
110412004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11042
11043 Fix some problems reported by twlevo at xs4all.
11044 * src/symtab.c (symbol_new): Report an error if the input grammar
11045 contains too many symbols. This is better than calling abort() later.
11046 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11047 (struct node, struct graph):
11048 Rename member expand to stretch. All uses changed.
11049 (struct graph): Remove member layoutalgorithm. All uses removed.
11050 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11051 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11052 All uses changed.
11053 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11054
735d6bd4
AD
110552004-12-15 Akim Demaille <akim@epita.fr>
11056
11057 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11058 Add more Doxygen comments.
11059 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11060 (report_syntax_error_, translate_): Rename as...
11061 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11062 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11063
2e1f5829
AD
110642004-12-15 Akim Demaille <akim@epita.fr>
11065
11066 * data/lalr1.cc (lex_): Rename as...
11067 (yylex_): this.
11068 Move the trace here.
11069 Take the %name-prefix into account.
11070 Reported by Alexandre Duret-Lutz.
11071
a3cb6248
AD
110722004-12-15 Akim Demaille <akim@epita.fr>
11073
11074 Simplify the C++ parser constructor.
11075
11076 * data/lalr1.cc (debug_): Rename as...
11077 (yydebug_): so that the parser's internals are always in the yy*
11078 pseudo namespace.
11079 Adjust uses.
11080 (b4_parse_param_decl): Remove the leading comma as it is now only
11081 called as unique argument list.
11082 (Parser::Parser): Remove the constructor accepting a location and
11083 an initial debugging level.
11084 Remove from the other ctor the argument for the debugging level.
11085 (debug_level_type, debug_level, set_debug_level): New.
11086
11087 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11088 constructor calls.
11089
07fed891
AD
110902004-12-15 Akim Demaille <akim@epita.fr>
11091
11092 Remove b4_root related material: failure experiment
a3cb6248 11093 (which goal was to allow to derive from a class).
07fed891
AD
11094
11095 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11096 definitions and uses.
11097
e603eaa5
PE
110982004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11099
11100 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11101 not 2, since it's not portable to subtract 1 from the start of an
11102 array. The new item 0 is never set or used. All uses changed.
11103
11104 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11105 the default definition of YYLLOC_DEFAULT. Problem reported
11106 by Frank Heckenbach.
11107
fafb007d
PE
111082004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11109
11110 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11111 the normal case and one for the error case. Just use the
11112 first one uniformly. Problem reported by Frank Heckenbach.
11113 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11114 use exactly the same macro in both places.
11115 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11116 so that the normal-case YYRHSLOC works for the error case too.
11117 All uses changed.
11118 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11119 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11120 * doc/bison.texinfo (Location Default Action): Don't claim that
11121 we have an array of locations. Use the same macro for both glr
11122 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11123 the index is 0.
11124
48814dcd
PE
111252004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11126
a4e1a53b
PE
11127 * HACKING: Update email addresses to send announcements to.
11128
48814dcd
PE
11129 * configure.ac (AC_INIT): Bump version to 1.875f.
11130
337116ba
PE
111312004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11132
11133 * NEWS: Version 1.875e.
11134 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11135
11136 * src/scan-skel.l: Include "complain.h", for "fatal".
11137
11138 * src/relation.h (relation_print, relation_digraph):
11139 Relation sizes are of type relation_node, not size_t (this is
11140 merely a doc fix, since the two types are equivalent).
11141 (relation_transpose): Relation sizes are of type relation_node,
11142 not int.
11143 * src/relation.c: Likewise.
11144 (top, infinity): Now of type relation_node, not int.
11145 (traverse, relation_transpose): Use relation_node, not int.
11146
11147 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11148 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11149 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11150
11151 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 11152 specifying whether the test should be skipped. Use it tp
337116ba 11153 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 11154 fail on some hosts, and should be skipped.
337116ba 11155
da2a7671
PE
111562004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11157
11158 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11159 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11160 unless otherwise specified below.
11161
11162 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11163 to allocate kernel_base, kernel_items, kernel_size, since
11164 they needn't be initialized to 0.
11165 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11166 * src/closure.c (new_closure): Likewise, for itemset.
11167 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11168 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11169 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11170 (build_relations): Likewise for edge, states1, includes.
11171 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11172 * src/reader.c (packgram): Likewise, for ritem, rules.
11173 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11174 * src/relation.c (relation_digraph): Likewise for VERTICES.
11175 (relation_transpose): Likewise for new_R, end_R.
11176 * src/symtab.c (symbols_token_translations_init): Likewise for
11177 token_translations.
11178 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11179 (token_actions): Likewise for yydefact, actrow, conflrow,
11180 conflict_list.
11181 (save_column): Likewise for froms[symno], tos[symno].
11182 (goto_actions): Likewise for state_count.
11183 (pack_table): Likewise for base, pos, check.
11184 (tables_generate): Likewise for width.
11185
11186 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11187 for initial core. Just have a separate core, so we needn't worry
11188 about whether kernel_size and kernel_base are initialized.
11189
11190 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11191 kernel_size, kernel_items): Remove unnecessary initialization.
11192 * src/conflicts.c (conflicts): Likewise.
11193 * src/derives.c (derives): Likewise.
11194 * src/muscle_tablc (muscle_insert): Likewise.
11195 * src/relation.c (relation_digraph): Likewise.
11196 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11197 conflrow, conflict_table, conflict_list, table, check):
11198 Likewise.
11199
11200 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11201 This is because all callers pass unsigned int.
11202 * src/closure.h (new_closure): Likewise.
11203
11204 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11205 (build_relations): Initialize includes[i] in all cases.
11206 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11207 and rules[ruleno].precsym. Initialize members in order.
11208 * src/relation.c (relation_transpose): Always initialize new_R[i]
11209 and end_R[i].
11210 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11211
11212 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11213 conflict_list[0] was always 0, but now it isn't initialized.
11214
11215 * src/table.c (table_grow): When conflict_table grew, the grown
11216 area wasn't cleared. Fix this.
11217
11218 * lib/.cvsignore: Add strdup.c, strdup.h.
11219 * m4/.cvsignore: Add strdup.m4.
11220
00baeeac
PE
112212004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11222
11223 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11224 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11225 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11226 ngotos + 1 without checking for overflow.
11227 (build_relations): Use END_NODE, not -1, to denote end of edges.
11228 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11229 build_relations): Use goto_number, not int, for goto numbers.
11230 * src/tables.c (save_column, default_goto): Likewise.
11231
be3d9d42
AD
112322004-11-23 Akim Demaille <akim@epita.fr>
11233
11234 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11235 of #defining from yystype.
11236 Don't typedef yystype, C++ does not need it.
11237 This lets it possible to forward declare it as union.
11238
78e526d5
PE
112392004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11240
11241 * bootstrap (gnulib_modules): Add extensions.
11242 Problem reported by Jim Meyering.
11243
afbb696d
PE
112442004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11245
11246 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11247 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11248 src/system.h, src/tables.c: XFREE -> free, to accommodate
11249 recent change to gnulib xalloc.h.
78e526d5 11250 Problem reported by Jim Meyering.
afbb696d 11251
c1f8f16a
AD
112522004-11-17 Akim Demaille <akim@epita.fr>
11253
11254 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11255
db7e5eb5 112562004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
11257 Alexandre Duret-Lutz <adl@gnu.org>
11258
11259 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11260 changes.
11261 (YYCDEBUG): Adjust.
11262 Use it instead of cdebug_.
11263 (Parser::debug_stream, Parser::set_debug_stream): New.
11264 (Parser::symprint_): Define cdebug_ for temporary backward
11265 compatibility.
11266 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11267 debug_stream ().
11268
68e11668
AD
112692004-11-17 Akim Demaille <akim@epita.fr>
11270
11271 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11272 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11273 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11274 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11275
97cbc73e
PE
112762004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11277
11278 * data/glr.c (yyloc_default): Remove; not used.
11279 Problem reported by Frank Heckenbach.
11280
e342c3be
AD
112812004-10-25 Akim Demaille <akim@epita.fr>
11282
11283 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11284 Introduce another definition to address simple location arrays.
11285 (yyGLRStack): New member: yyerror_range.
11286 (yyrecoverSyntaxError, yyparse): Update it.
11287 (yyrecoverSyntaxError): Use it when shifting the error token to
11288 have an accurate range, equivalent to the one computed by both
11289 yacc.c and lalr1.cc.
11290 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11291 that column numbers start at column 0, as per GNU Coding
11292 Standards, the others tests, and the doc.
11293 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11294 Adjust to the above change (first column is 0).
11295 And adjust the location of the "<error>", now covering the whole
11296 line.
11297
93602feb 112982004-10-22 Akim Demaille <akim@epita.fr>
04098407 11299 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
11300
11301 Remove some arbitrary limits on goto numbers and relations.
11302 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11303 initial values, since they're never used.
11304 (set_goto_map): ngotos is now unsigned, so test for overflow
11305 by seeing whether it wraps around to zero.
11306 * src/lalr.h (goto_number): Now size_t, not short int.
11307 (GOTO_NUMBER_MAXIMUM): Remove.
11308 * src/relation.c (relation_print, traverse, relation_transpose):
11309 Check for END_NODE rather than looking at sign.
11310 * src/relation.h (END_NODE): New macro.
11311 (relation_node): Now size_t, not short int.
11312
dba08b04
PE
113132004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11314
11315 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11316 keyword, not an identifier. Problem reported by Baron Schwartz in
11317 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11318
df09ef2e
AD
113192004-10-11 Akim Demaille <akim@epita.fr>
11320
11321 * src/symtab.c (symbol_check_alias_consistency): Also check
11322 type names, destructors, and printers.
11323 Reported by Alexandre Duret-Lutz.
11324 Recode the handling of associativity and precedence in terms
11325 of symbol_precedence_set.
11326 Accept no redeclaration at all, not even equal to the previous
11327 value.
11328 (redeclaration): New.
11329 Use it to factor redeclaration complaints.
11330 (symbol_make_alias): Don't set the type of the alias, let
11331 symbol_check_alias_consistency do it as for other features.
11332 * src/symtab.h (symbol): Add new member prec_location, and
11333 type_location.
11334 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11335 * tests/input.at (Incompatible Aliases): New.
11336
146bc99d
PE
113372004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11338
11339 .cvsignore fixes to accommodate gnulib changes,
11340 and the practice of naming build directories "_build".
11341 * .cvsignore: Add "_*". Sort.
11342 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11343 * m4/.cvsignore: Add "*_gl.m4".
11344
e503aa60
AD
113452004-10-06 Akim Demaille <akim@epita.fr>
11346
11347 * src/parse-gram.y (add_param): Fix the truncation of trailing
11348 spaces.
11349
b4a20338
AD
113502004-10-05 Akim Demaille <akim@epita.fr>
11351
11352 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11353 whether the reducion was empty or not. This leaves room to
11354 improve the use of YYLLOC_DEFAULT in such a case.
11355 lalr1.cc is still experimental, so changing this is acceptable.
11356 And finally, there are probably not many users who changed the
11357 handling of locations in GLR, so changing is admissible too.
11358
11359 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11360 empty reduction, set @$ to an empty location ending the previously
11361 stacked symbol.
11362 Adjust uses to make sure the code is triggered on empty
11363 reductions.
11364 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11365 expected output: empty reductions have empty locations.
11366
f85a5e6f
AD
113672004-09-29 Akim Demaille <akim@epita.fr>
11368
11369 * data/lalr1.cc: Move towards a more standard C++ coding style
11370 for templates: Class < T > -> Class<T>.
11371
b203fc2c
AD
113722004-09-29 Akim Demaille <akim@epita.fr>
11373
11374 * data/lalr1.cc: Reinstall the former ctor, for sake of
11375 compatibility, but warn it will be removed.
11376 Move towards a more standard C++ coding style (i.e., type *var ->
11377 type* var).
11378
5b7e1e73
PE
113792004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11380
3fee967f
PE
11381 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11382 since it's less likely to work if NULs are involved in the future.
5b7e1e73 11383
0dcca5c2
AD
113842004-09-27 Akim Demaille <akim@epita.fr>
11385
11386 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11387
6dde1c82
AD
113882004-09-27 Akim Demaille <akim@epita.fr>
11389
11390 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 11391 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
11392 and argument names.
11393 (b4_cc_constructor_call): Likewise.
11394
b233d555
AD
113952004-09-24 Akim Demaille <akim@epita.fr>
11396
11397 * src/parse-gram.y (add_param): Strip the leading and trailing
11398 blanks from a formal argument declaration.
11399 (YY_LOCATION_PRINT): New.
11400
619404e3
AD
114012004-09-24 Akim Demaille <akim@epita.fr>
11402
11403 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11404 after the location.
11405
dd8d9022
AD
114062004-09-24 Akim Demaille <akim@epita.fr>
11407
11408 * doc/bison.texinfo (Table of Symbols): Sort.
11409
0092f063
AD
114102004-09-21 Akim Demaille <akim@epita.fr>
11411
11412 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11413 the useless parentheses.
11414 Suggested by Paul Eggert.
11415
451364ed
AD
114162004-09-20 Akim Demaille <akim@epita.fr>
11417
11418 Let the initial-action act on the look-ahead, and use it for the
11419 "initial push" (corresponding to an hypothetical beginning-of-file).
11420 And let lalr1.cc honor %initial-action.
11421
11422 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11423 example.
11424 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11425 (Parser::Parser): Remove the ctor that used to initialize it.
11426 (Parser::parse): Like in the other skeletons, issue the "starting
11427 parse" message before any action.
11428 Honor %initial-action.
11429 Initialize the stacks with the lookahead.
11430 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11431 look-ahead.
11432 Push them in the stacks.
11433 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11434
18d192f0
AD
114352004-09-20 Akim Demaille <akim@epita.fr>
11436
11437 * doc/bison.texinfo (Initial Action Decl): New.
11438
b8458aa5
AD
114392004-09-20 Akim Demaille <akim@epita.fr>
11440
11441 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11442 clearer criterion to define it.
11443 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11444 When reducing on an empty RHS, use the latest stacked location as
11445 location.
11446 yylloc is not always available.
11447 * data/glr.c: Likewise.
11448 Also, honor initial-actions.
11449
3fc16193
AD
114502004-09-20 Akim Demaille <akim@epita.fr>
11451
11452 * data/yacc.c (YY_LOCATION_PRINT): New.
11453 Define when we know YYLTYPE's structure, i.e., when the default
11454 YYLLOC_DEFAULT is used.
11455 * data/c.m4 (b4_yysymprint_generate): Use it.
11456 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11457 value of the result.
11458 (error_start_): Replace with...
11459 (error_range_): this location array.
11460 This allows to replace code relying on the implementation of
11461 locations by portable code.
11462 * data/yacc.c (yylerrsp): Replace with...
11463 (yyerror_range): this.
11464 Every time a token is popped, update yyerror_range[0], to have an
11465 accurate location for the error token.
11466 * data/glr.c (YY_LOCATION_PRINT): New.
11467 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11468 deference a pointer.
11469 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11470 report the location in %printers.
11471
11472 * src/scan-skel.l: Instead of abort, report error messages to ease
11473 understanding skeleton scanning failures.
11474
ecfe33e7
AD
114752004-09-16 Akim Demaille <akim@epita.fr>
11476
11477 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11478 (iterator, const_iterator): these, to be more in the C++ spirit.
11479 Also, return reverse iterators so that when displaying the stack
11480 we display its bottom first.
11481 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11482 from yacc.c.
11483 We should probably use vector here though.
11484
1576d44d
AD
114852004-09-16 Akim Demaille <akim@epita.fr>
11486
11487 Have more complete shift traces.
11488
11489 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11490 to report Shifts instead of ad hoc YYDPRINTF invocations,
11491 including for the error token.
11492 * data/lalr1.cc (symprint_): Output the location.
11493 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11494 output the location within the %printer.
11495 Activate GLR tests, at least to make sure they compile properly.
11496 They still don't pass though.
11497 * tests/calc.at: Adjust expect verbose output, since now "Entering
11498 state..." is on a different line than the "Shifting" message.
11499
9c66f418
AD
115002004-09-08 Akim Demaille <akim@epita.fr>
11501
11502 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11503 Bison directive from the Bison file to the invocation of this
11504 macro, so that these directives are passed to
11505 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11506 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11507 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11508 the extra Bison directives instead of the whole series.
11509 Change the grammar so that there are recoverable errors, and
11510 unrecoverable errors. Now we can have the parser give up before
11511 consuming the whole input. As a result we now can observe that
11512 the lookahead is freed when needed.
11513 Change the parser source to parse argv[1] instead of a hard coded
11514 string.
11515 Simplify yylex, and give a value and location to EOF.
11516 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11517 passed directives already coded in the file.
11518 Add some tests to check the location of "error".
11519 For some tests, the C++ parser is correct, and not yacc.c.
11520 For other tests, they provide different, but unsatisfying, values,
11521 so keep the C++ value so that at least one parser is "correct"
11522 according to the test suite.
11523 (Actions after errors): Remove, this is subsumed by the
11524 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11525
52d5733f
AD
115262004-09-06 Akim Demaille <akim@epita.fr>
11527
11528 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 11529 (Parser::pop): New.
52d5733f
AD
11530 Use it.
11531
a0e68930
AD
115322004-09-06 Akim Demaille <akim@epita.fr>
11533
11534 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11535 argument, an informative message.
11536 Call YY_SYMBOL_PRINT.
11537 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11538 * data/lalr1.cc (destruct_): Likewise.
11539 In addition, no longer depend on b4_yysymprint_generate and
11540 b4_yydestruct_generate to generate these functions, do it "by
11541 hand".
11542
e757bb10
AD
115432004-09-03 Akim Demaille <akim@epita.fr>
11544
11545 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11546 invoked, yydestruct the lookahead.
11547 * tests/calc.at (Calculator $1): Update the expected lengths of
11548 traces: there is an added line for the discarded lookahead.
11549 * doc/bison.texinfo (Destructor Decl): Some rewording.
11550 Define "discarded" symbols.
11551
0fe1f06d
AD
115522004-09-02 Akim Demaille <akim@epita.fr>
11553
11554 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11555
284acc8b
AD
115562004-09-02 Akim Demaille <akim@epita.fr>
11557
11558 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11559 (YYDSYMPRINTF): Rename as...
11560 (YY_SYMBOL_PRINT): this.
11561 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11562 two.
11563 Use it instead of direct symprint_ calls.
11564 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11565 one.
11566
a5eb1ed2
AD
115672004-09-02 Akim Demaille <akim@epita.fr>
11568
b7c72fe1
AD
11569 * data/lalr1.cc (b4_yysymprint_generate): New.
11570 (symprint_): New member function, defined when YYDEBUG.
11571 Use it consistently instead of token/nterm debugging output by
11572 hand.
a5eb1ed2
AD
11573 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11574 %printer calls to use cdebug_ when using lalr1.cc.
11575
417141dd
AD
115762004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11577
11578 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11579 with #ifdef YYDEBUG.
11580
2fa09258
AD
115812004-08-26 Akim Demaille <akim@epita.fr>
11582
11583 * doc/bison.texinfo (Implementing Loops): Rename as...
11584 (Implementing Gotos/Loops): this.
11585
9378b508
PE
115862004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11587
11588 Adjust to latest gnulib.
11589 * bootstrap (gnulib_modules): Add xalloc-die.
11590 Set LC_ALL=C so that file names sort consistently.
11591 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11592 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11593 uintmax_t.m4, ulonglong.m4.
11594 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11595 po.m4 since we are now using _gl.m4 instead.
11596
87a8ad5c
PE
115972004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11598
11599 * src/scan-action.l: Remove. Scanning of semantic actions is
11600 handled in scan-gram.l.
11601
dca81a78
PE
116022004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11603
11604 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11605
11606 * src/location.h (struct): The file member is a uniqstr.
11607 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11608
c9cbf7c5
PE
116092004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11610
11611 Fix bug with non-%union parsers that have printers or destructors,
11612 which led to a Bison core dump. Reported by Peter Fales in
11613 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 11614
c9cbf7c5
PE
11615 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11616 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11617 not to our own type.
11618 * src/output.c (symbol_destructors_output, symbol_printers_output):
11619 Don't assume %union.
11620 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11621 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11622 UNION-FLAG. All callers changed.
11623 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11624 Use type char, not unsigned int, when declaring an array of char;
11625 this lets us remove a cast.
11626 (Printers and Destructors): Add non-%union test cases.
11627
fa7e68c3
PE
116282004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11629
11630 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11631 GLR writeups. E.g., avoid frenchspacing and the future tense,
11632 change "lookahead" to "look-ahead", and change "wrt" to "with
11633 respect to".
2fa09258 11634
fa7e68c3
PE
116352004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11636
11637 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11638 New sections, split off from the GLR Parsers section. Put the new
11639 Simple GLR Parser near the start of the GLR section, for clarity.
11640 Rewrite connective text.
11641
99a9344e
PE
116422004-06-21 Frank Heckenbach <frank@g-n-u.de>
11643
11644 * doc/bison.texinfo (Simple GLR Parsers): New section.
11645
8dd162d3
PE
116462004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11647
11648 * NEWS, TODO, doc/bison.texinfo:
11649 Use "look-ahead" instead of "lookahead", to be consistent.
11650 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11651 while we're fixing "look-ahead".
11652 * src/conflicts.c (shift_set): Renamed from shiftset.
11653 (look_ahead_set): Renamed from lookaheadset.
11654 * src/print.c: Likewise.
11655 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11656 name for "lookahead".
11657 (report_types, usage): Likewise.
11658 * src/getargs.h (report_look_ahead_tokens): Renamed from
11659 report_lookaheads.
11660 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11661 compute_lookaheads.
11662 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11663 (look_ahead_tokens_print): Renamed from lookaheads_print.
11664 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11665 state_rule_lookaheads_print.
11666 * src/state.h: Likewise.
11667 (reductions.look_ahead_tokens): Renamed from lookaheads.
11668 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11669 AT_DATA_LOOKAHEADS_GRAMMAR.
11670
57a90331
PE
116712004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11672
11673 * README: Update location of patched M4 distribution.
11674
8ed3234a
PE
116752004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11676
11677 Don't assume the C++ compiler takes the same arguments as the C compiler
11678 (trivial change).
11679 * configure.ac (O0CXXFLAGS): New var.
11680 * tests/atlocal.in (CXXFLAGS): Use it.
11681
07971983
PE
116822004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11683
11684 Fix some "make check" problems with C++ reported by
11685 Albert Chin-A-Young for Tru64 C++ in this thread:
11686 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11687
11688 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11689 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11690 Output to a .cc file for C++, not to a .c file.
11691 * tests/calc.at (AT_CHECK_CALC): Likewise.
11692 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11693 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11694
29058652
PE
116952004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11696
11697 * tests/calc.at, tests/actions.at: Workaround for SGI
11698 C++ compiler. (trivial change)
11699
62cb8a99
PE
117002004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11701
fd418816
PE
11702 Spent a few hours checking out which prerequisite versions the
11703 current sources actually require. I went all the way back to
11704 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11705 a seemingly endless set of combinations of versions more recent
11706 than that. The bottom line is that the current sources require
11707 fairly recent versions of the build tools, and it'll be some work
11708 to change this.
11709 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11710 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11711 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11712 Add comments explaining why those particular versions are
11713 currently needed.
2fa09258 11714
62cb8a99
PE
11715 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11716 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 11717 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
11718
11719 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11720 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11721
caa52c10
PE
117222004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11723
11724 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11725 0.11.5. Suggested by Bruno Haible.
11726 * bootstrap: Remove gettext version checking.
11727
11728 * doc/bison.texinfo (Decl Summary): Also mention that %union
11729 can depend on prerequisite types. Problem reported by Tim
11730 Van Holder.
11731
4bfd5e4e
PE
117322004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11733
2cef3017
PE
11734 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11735 * README-alpha: Don't tell people not to package this.
11736
b9c85d5c
PE
11737 * bootstrap: Don't assume $(...) works; use `...` instead.
11738 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11739 gettext better.
11740
4bfd5e4e
PE
11741 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11742 put into the -d output file, and mention what to do if YYSTYPE is
11743 defined as a macro.
11744
6a36ff94
PE
117452004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11746
6712933e
PE
11747 Undo change made earlier today: it caused autopoint to not bring
11748 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11749 autopoint's.
11750
11751 * bootstrap: Check that gettext version matches what's in
11752 configure.ac. Warn users to ignore robots.txt ERROR 404.
11753 * bootstrap: Undo today's earlier change (logged below).
11754 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 11755
6a36ff94
PE
11756 The gettext version checking is causing more trouble than it's
11757 curing; remove it. Problem reported by Paul Hilfinger.
11758
11759 * bootstrap: Issue a warning that one can expect a message
11760 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11761 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11762
209ea708
PE
117632004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11764
11765 Ensure that the C++ compiler used for testing actually works on a
11766 simple test program; if not, skip the C++-related tests. Problem
11767 reported by Vin Shelton in:
161a71f3 11768 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
11769
11770 * m4/cxx.m4: New file.
11771 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11772 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11773 * tests/local.at (AT_COMPILE_CXX): Use it.
11774
41ca2549
PE
117752004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11776
383e69dc
PE
11777 * data/glr.c (yylloc): Output this macro even if locations are not
11778 being generated, as the GLR parser needs it even in that case.
11779 Problem reported by Troy A. Johnson
11780 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11781
41ca2549
PE
11782 * configure.ac (AC_INIT): Update to 1.875e.
11783
e476c87d
PE
117842004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11785
11786 * NEWS: Version 1.875d.
11787 * configure.ac (AC_INIT): Likewise.
11788 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11789
11790 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11791 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11792 lalr1.cc runs afoul of the first, and the last two are no longer
11793 supported by GCC 3.4.0.
11794 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11795 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11796
233a88ad
PE
117972004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11798
11799 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11800 unsigned int, for compatibility with latest gnulib hash module.
11801 * src/state.c (state_hash, state_hasher): Likewise.
11802 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11803 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 11804
12ffdd28
PE
118052004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11806
11807 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11808
11809 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11810 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11811 character and string literals.
11812 (unexpected_end): New function.
11813 (unexpected_eof): Use it.
11814 (unexpected_newline): New function.
11815 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11816 actions.
e476c87d 11817
12ffdd28
PE
11818 * NEWS: Document %expect-rr.
11819
11820 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11821 Fix typo by replacing $1 with $option.
11822 Remove more 'intl'-related files.
9668e2be 11823 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
11824
11825 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11826 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11827 strtoul.c.
11828 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11829 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11830 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11831 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11832 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11833 * src/.cvsignore: Add *.output.
11834
11835 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11836 gets copied to the output file.
e476c87d 11837
1f65350a
PE
118382004-04-28 Paul Eggert <eggert@twinsun.com>
11839
11840 Get files from the gnulib and po repositories, instead of relying
11841 on them being in our CVS. Upgrade to latest versions of gnulib
11842 and Automake.
11843
11844 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11845 * bootstrap: Bootstrap from gnulib and po repositories.
11846 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11847 * README-cvs: Document these changes. Remove version numbers from
11848 mentions of build tools, since they change so often. Mention Flex.
11849
11850 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11851 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
11852 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11853 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 11854 does this for us.
12ffdd28
PE
11855 (AC_ISC_POSIX): Remove; we no longer support this
11856 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
11857 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11858 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11859 Do not check for C89 headers, except for locale.h which is used
11860 by the Yacc library and must port to K&R hosts.
11861 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11862 Do not check for C89 functions, except for setlocale which is
11863 used by the Yacc library.
11864 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11865 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11866 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11867 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11868 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11869 AM_GNU_GETTEXT): Remove; now done by:
11870 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11871 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11872 for us.
11873
11874 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11875 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11876 Define to empty, as gnulib.mk will do the rest for us.
11877 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11878 for us.
11879 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11880 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11881
11882 * src/files.c: Include gnulib's xstrndup.h.
11883
11884 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11885 (REALLOC): Use xnrealloc, for likewise.
11886 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11887 (strnlen, memrchr): Remove decls; functions no longer used.
11888 Include <stpcpy.h>.
11889
11890 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11891 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11892 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11893 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11894 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11895 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11896 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11897 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11898 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11899 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11900 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11901 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11902 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11903 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11904 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11905 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11906 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11907 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11908 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11909 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11910 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11911 Remove, as these files are now generated automatically
11912 by bootstrap or automake.
11913
11914 * po/ChangeLog: Remove: all but one entry was a duplicate
11915 of this file, and I moved that 2000-11-02 entry here.
11916
11917 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11918 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11919 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11920 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11921 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11922 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11923 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11924 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11925 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11926 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11927 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11928 xstrndup.h.
11929 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11930 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11931 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11932 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11933 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11934 * src/.cvsignore: Remove *_.c.
11935
11936
11937 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11938 support it. (The latest stable gzip doesn't.)
11939
119402004-04-27 Paul Eggert <eggert@twinsun.com>
11941
11942 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11943 case, as stos_ is now used by destructors due to the 2004-02-09
11944 change.
11945
11946 Remove more K&R C support.
11947 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11948 * lib/subpipe.c (errno): Remove decl.
11949 Include <stdlib.h> unconditionally.
11950 (EXIT_FAILURE): Remove macro.
11951 * src/complain.c (vfprintf, strerror): Remove.
11952 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11953 unconditionally.
11954 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11955 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11956 (strchr, strspn, memchr): Remove decls.
11957 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11958 unconditionally. Do not declare perror.
11959 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11960 unconditionally.
11961
11962 * src/complain.c (_): Remove useless defn, as system.h defines this.
11963
11964 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11965 with latest obstack.h.
11966 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11967 to procedure types, as obstack.h now does that for us.
11968 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11969
11970 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11971 so that this include file can stand alone.
11972 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11973 does this now. Include subpipe.h first after config.h, to
11974 test whether it can stand alone.
11975
11976 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11977 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11978 unused declaration.
11979
11980 * tests/synclines.at (%union synch line): Put a dummy member in
11981 the union, because empty unions aren't allowed in C. Caught
11982 by GCC 3.4.0.
11983
4f16766c
PE
119842004-04-13 Jim Meyering <jim@meyering.net>
11985
11986 * src/conflicts.c (conflicts_print): Correct format string typo:
11987 use `%%' to produce literal `%'. (trivial change)
11988
779e7ceb
PE
119892004-03-30 Paul Eggert <eggert@twinsun.com>
11990
11991 * src/getargs.c (version): Update copyright year to 2004.
11992
11993 * data/c.m4 (b4_int_type): Use 'short int' rather than
11994 'short', and similarly for 'long', 'unsigned', etc.
11995 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11996 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11997 yy_yypstack, yydumpstack): Likewise.
11998 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11999 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12000 Likewise.
12001 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12002 yy_stack_print, yyparse): Likewise.
12003 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12004 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12005 * lib/bitset.c (bitset_print): Likewise.
12006 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12007 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12008 * lib/bitsetv.c (bitsetv_dump): Likewise.
12009 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12010 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12011 Likewise.
12012 * src/LR0.c (allocate_itemsets): Likewise.
12013 * src/gram.h (rule_number, rule): Likewise.
12014 * src/lalr.h (goto_number): Likewise.
12015 * src/nullable.c (nullable_compute): Likewise.
12016 * src/output.c (prepare_rules): Likewise.
12017 * src/relation.c (relation_print, relation_digraph): Likewise.
12018 * src/relation.h (relation_node): Likewise.
12019 * src/state.h (state_number, transitions, errs, reductions,
12020 struct state): Likewise.
12021 * src/symtab.h (symbol_number, struct symbol): Likewise.
12022 * src/tables.c (vector_number, tally, action_number,
12023 default_goto, goto_actions): Likewise.
12024 * tests/existing.at (GNU Cim Grammar): Likewise.
12025 * tests/regression.at (Web2c Actions): Likewise.
12026
12027 * src/output.c (muscle_insert_short_int_table): Renamed from
12028 muscle_insert_short_table. All uses changed.
12029
d6328241
PH
120302004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12031
12032 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12033 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12034 Add %expect-rr rule.
4f16766c 12035
d6328241
PH
12036 * src/scan-gram.l: Recognize %expect-rr.
12037
4f16766c 12038 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 12039 expected_conflicts.
4f16766c 12040 (expected_rr_conflicts): Declare.
d6328241
PH
12041
12042 * src/conflicts.c (expected_sr_conflicts): Rename from
12043 expected_conflicts.
12044 (expected_rr_conflicts): Define.
12045 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12046 for GLR parsers.
12047 Use expected_sr_conflicts in place of expected_conflicts.
12048 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 12049
d6328241 12050 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 12051
1452af69
PE
120522004-03-08 Paul Eggert <eggert@gnu.org>
12053
12054 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 12055 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
12056
12057 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12058 in lalr1.cc.
12059 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12060 * src/scan-gram.l (scan_integer): New function.
12061 ({int}): Use it.
12062 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12063 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12064 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12065 Say "long int", not "long", for uniformity with GNU style.
12066
006d217d
PE
120672004-02-25 Paul Eggert <eggert@twinsun.com>
12068
12069 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12070 compilers. This fixes a problem with Intel's C++ compiler being
12071 chatty, reported by Guido Trentalancia in
161a71f3 12072 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 12073
c2729758
ADL
120742004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12075
12076 Support %destructor and merge error locations in lalr1.cc.
12077
12078 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12079 (Parser::stos_): Define unconditionally.
12080 (Parser::destruct_): New method. Generate its body with
12081 b4_yydestruct_generate.
12082 (Parser::error_start_): New attribute.
12083 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12084 token which are discarded.
12085 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12086 error_start_ when erroneous token are discarded.
12087 (Parser::parse) <yyerrlab1>: Compute the location of the error
12088 token so that it covers all the discarded tokens.
12089 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12090 it can be called with `%skeleton "lalr1.cc"', and do that.
12091
dd0e0635
PE
120922004-02-02 Paul Eggert <eggert@twinsun.com>
12093
12094 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12095 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12096 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12097 There's no need to mention top_builddir since Automake does that
12098 for us.
12099 (INCLUDES): Remove, as Automake says it's obsolescent.
12100 Contents migrated into AM_CPPFLAGS as described above.
12101 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12102
121032004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12104
12105 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12106 (yyreportSyntaxError): Handle case where lookahead token is
12107 YYEMPTY.
12108
be16239b
PH
121092004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12110
12111 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12112 resulting parsers are compilable with C++.
12113
5fa90832
PE
121142003-12-23 Paul Eggert <eggert@twinsun.com>
12115
12116 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12117 * src/output.c (output_skeleton): Rename local var.
12118 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12119 Bison tokens, as this runs afoul of the 2003-10-07 change that
12120 disallowed NUL bytes in character constants or string literals.
12121
12122 * tests/local.at: Require Autoconf 2.59's Autotest.
12123 * tests/testsuite.at: Don't include local.at, since we now assume
12124 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12125 including it.
12126 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12127 multiple inclusion warnings.
dd0e0635 12128
b165c324
AD
121292003-12-02 Akim Demaille <akim@epita.fr>
12130
12131 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12132 conditions.
12133 From Bruno Haible.
12134
26e06a21
ADL
121352003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12136
12137 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12138
92ac3705
PE
121392003-10-07 Paul Eggert <eggert@twinsun.com>
12140
6a5ecb38
PE
12141 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12142 if testsuite doesn't exist.
12143
92ac3705
PE
12144 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12145 literals, unfortunately.
12146 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12147 Complain about NUL bytes in character constants or string literals.
12148
91d2c560
PE
121492003-10-05 Paul Eggert <eggert@twinsun.com>
12150
12151 * NEWS: Don't document %no-default-prec, as it's still
12152 too experimental.
12153 * doc/bison.texinfo: Document %no-default-prec only if
12154 the defaultprec flag is set. Normally it's not.
12155
0cc3da3a
PE
121562003-10-04 Paul Eggert <eggert@twinsun.com>
12157
12158 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12159 non-modifiable lvalue, instead of a modifiable one.
12160 * doc/bison.texinfo (Actions): Document that $$ can
12161 be assigned to. Do not claim that $$ and $N are
12162 array element references: user code should not rely on this.
12163
22fccf95
PE
121642003-10-01 Paul Eggert <eggert@twinsun.com>
12165
12166 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12167 (grammar_declaration): Use it.
12168 * src/scan-gram.l: New token %no-default-prec.
12169 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12170 * NEWS, doc/bison.texinfo: Document the above.
12171
fc8f2965
AD
121722003-10-01 Akim Demaille <akim@epita.fr>
12173
12174 VCG no longer supports long_straight_phase.
12175
12176 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12177 * src/print_graph.c (print_graph): Adjust.
12178
39a06c25
PE
121792003-09-30 Frank Heckenbach <frank@g-n-u.de>
12180 and Paul Eggert <eggert@twinsun.com>
12181
12182 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12183 Table of Symbols): Document %default-prec.
12184 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12185 (grammar_declaration): Set default_prec on %default-prec.
12186 * src/scan-gram.l (%default-prec): New token.
12187 * src/reader.h (default_prec): New flag.
12188 * src/reader.c: Likewise.
12189 (packgram): Handle it.
12190 * tests/conflicts.at (%default-prec without %prec,
12191 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 12192
39a06c25
PE
121932003-09-30 Paul Eggert <eggert@twinsun.com>
12194
12195 * tests/testsuite.at: Include local.at, not input.at, fixing
12196 a typo in the 2003-08-25 patch.
12197
62b6aef9
AD
121982003-08-27 Akim Demaille <akim@epita.fr>
12199
12200 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12201 GCC warnings.
12202
89e1cc61
AD
122032003-08-26 Akim Demaille <akim@epita.fr>
12204
12205 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12206 "<\#" to avoid magic from Gnus when posting parts of this script.
12207
a08460b0
AD
122082003-08-26 Akim Demaille <akim@epita.fr>
12209
12210 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12211 (Parser::parse): here.
12212 Adjust: nerrs and errstatus is now replaced by...
12213 (Parser::nerrs_, Parser::errstatus_): New.
12214
603f1cfd
AD
122152003-08-25 Akim Demaille <akim@epita.fr>
12216
12217 * config/announce-gen, Makefile.cfg: New.
12218 * Makefile.am: Adjust.
12219 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12220 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12221
cd3684cf
AD
122222003-08-25 Akim Demaille <akim@epita.fr>
12223
12224 When reducing initial empty rules, Bison parser read an initial
12225 location that is not defined. This results in garbage, and that
12226 affects Bison's own parser. Therefore we need (i) to extend Bison
12227 to support a means to initialize this location, and (ii) to use
12228 this CVS Bison to fix CVS Bison's parser.
12229
12230 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12231 with...
12232 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12233 * src/parse-gram.y: Adjust.
12234 (%initial-action): New.
12235 (%error-verbose): Since we require CVS Bison, there is no reason
12236 not to use it.
12237 * src/scan-gram.l: Adjust.
12238 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12239 * data/yacc.c (yyparse): Use b4_initial_action.
12240
4e03e201
AD
122412003-08-25 Akim Demaille <akim@epita.fr>
12242
12243 * doc/bison.texinfo: Don't promote stdout for error messages.
12244
8c182d05
AD
122452003-08-25 Akim Demaille <akim@epita.fr>
12246
12247 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12248 From Alexandre Duret-Lutz.
12249
6a60c4cf
PE
122502003-08-25 Akim Demaille <akim@epita.fr>
12251
12252 Version 1.875c.
12253
25f66e1a
AD
122542003-08-25 Akim Demaille <akim@epita.fr>
12255
12256 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12257 Use them.
12258
5348bfbe
AD
122592003-08-25 Akim Demaille <akim@epita.fr>
12260
12261 * data/lalr1.cc (Parser::reduce_print_): New.
12262 Use it.
12263
47301314
AD
122642003-08-25 Akim Demaille <akim@epita.fr>
12265
12266 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12267 error recovery loops. This patch is based on
161a71f3 12268 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
12269 Also, augment the similarity between lalr1.cc and yacc.c.
12270 Note: the locations of error recovery rules are not correct yet.
12271
12272 * data/lalr1.cc: Comment changes to augment the similarity between
12273 lalr1.cc and yacc.c.
12274 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12275 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12276 yyerrlab), when hitting EOF, pop the whole stack here instead of
12277 merely falling thru the default error handling mechanism.
12278 (yyerrorlab): New label, with the old contents of YYERROR,
12279 plus the following change: pop the stack of rhs corresponding
12280 to the production that invoked YYERROR. That is how Yacc
12281 behaves (required by POSIX).
12282 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12283 fail.
12284
1f7a61ff
AD
122852003-08-25 Akim Demaille <akim@epita.fr>
12286
12287 Tune local.at so that people can "autom4te -l autotest calc.at -o
12288 calc" for instance, to extract a sub test suite.
12289
12290 * tests/testsuite.at: Move the initialization, Autotest version
12291 requirement, and AT_TESTED invocation into...
12292 * tests/local.at: here.
12293 * tests/testsuite.at: Include it for compatibility with Autoconf
12294 2.57.
12295 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12296 be ignore.
12297
327b5b56
PE
122982003-08-04 Paul Eggert <eggert@twinsun.com>
12299
12300 Rework code slightly to avoid gcc -Wtraditional warnings.
12301 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12302 The returned value is now stored in *YY0. All callers changed.
12303 * src/output.c (merge_output): Adjust to the above change.
12304
0051e3ed
PE
123052003-07-26 Paul Eggert <eggert@twinsun.com>
12306
12307 * data/glr.c (YYASSERT): New macro.
12308 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12309 yyresolveStates, yyprocessOneStack):
12310 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12311 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 12312
137437c6
PE
123132003-07-25 Paul Eggert <eggert@twinsun.com>
12314
5b620e06
PE
12315 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12316 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 12317 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
12318 by Frank Heckenbach, though I have omitted the structure-initialization
12319 part of his glr-knr.diff patch since I recall that the Portable
12320 C Compiler didn't require that change.
12321
137437c6
PE
12322 Let the user specify how to allocate and free memory.
12323 Derived from a suggestion by Frank Heckenbach in
161a71f3 12324 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
12325 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12326 All uses of free, malloc, realloc changed to use these macros,
12327 and unnecessary casts removed.
12328 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12329
ddb85ca5
PE
123302003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12331
12332 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12333 use s.empty() rather than s == "" to test for empty string; see
161a71f3 12334 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
12335 (trivial change)
12336
39910e09
AD
123372003-06-25 Akim Demaille <akim@epita.fr>
12338
12339 * config/depcomp, config/install-sh: Update from masters.
12340
0ae99356
PE
123412003-06-20 Paul Eggert <eggert@twinsun.com>
12342
12343 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12344 and return properly parenthesized result.
12345 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12346 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12347 Remove unnecessary parentheses from uses.
12348 * doc/bison.texinfo (Location Default Action): Describe the
12349 conventions for parentheses.
12350
cd05d13c
PE
123512003-06-19 Paul Eggert <eggert@twinsun.com>
12352
81fd08ca
PE
12353 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12354 yyreportTree): Do not assume that size_t is the same width as int,
12355 when printing sizes. Print sizes using an unsigned format.
12356 Problem reported by Frank Heckenbach in
161a71f3 12357 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 12358
cd05d13c
PE
12359 Port to Forte Developer 7 C compiler.
12360 * data/glr.c (struct YYLTYPE): If locations are not being used,
12361 declare a single dummy member, as empty structs do not conform
12362 to the C standard.
12363 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12364 the Forte Developer 7 C compiler complains that end-of-loop
12365 code is not reached.
12366
4dcf140b
PE
123672003-06-17 Paul Eggert <eggert@twinsun.com>
12368
12369 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12370 avoid warnings from picky compilers about redefinition of PARAMS.
12371
8dd76bee
PE
123722003-06-17 Paul Eggert <eggert@twinsun.com>
12373
12374 Version 1.875b.
12375
12376 * NEWS: Document 1.875b.
12377
12378 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12379 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12380 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12381 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12382 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12383 per recent gettext manual's suggestion.
12384 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12385 Use prototypes, not old-style definitions.
12386 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12387 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12388 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12389 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12390 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12391 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12392 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12393 vbitset_or_and_cmp, vbitset_copy): Likewise.
12394
12395 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12396 Do not include <stdlib.h>.
12397 (PARAMS): Define unconditionally for C89.
12398 (ATTRIBUTE_NORETURN): Remove.
12399 (ATTRIBUTE_UNUSED): Define unconditionally.
12400
12401 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 12402 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
12403 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12404 * lib/vbitset.c, lib/vbitset.h: New files.
12405 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12406 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12407 from libbitset.
12408
12409 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12410 `How Can I Reset @code{yyparse}', since texinfo does not allow
12411 arbitrary @ in node names.
12412
12413 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12414 shouldn't be needed according to the gettext 0.12.1 documentation
12415 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 12416 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 12417 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 12418 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 12419
8dd76bee
PE
12420 * lib/.cvsignore: Add stdbool.h.
12421 * m4/.cvsignore: Add nls.m4, po.m4.
12422
12423 Upgrade to CVS gnulib.
12424 * stdbool_.h: File renamed from stdbool.h.in.
12425 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12426 AC_HEADER_STDBOOL.
12427 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12428 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12429 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12430 (MOSTLYCLEANFILES): New var.
12431 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12432 (stdbool.h): New rule.
12433 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12434 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12435 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12436 m4/quote.m4: Upgrade to today's gnulib.
12437
12438 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12439 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12440 the tests right now.
12441 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12442 yyerror are declared before use; C99 requires this.
12443
25005f6a
PH
124442003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12445
12446 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12447 first.
12448 (yyrecoverSyntaxError): Correct the logic for setting and testing
12449 yyerrState.
12450 Correct comment on handling EOF.
12451 Allow states with only a default reduction, rather than failing
8dd76bee 12452 (I can't quite reconstruct why these were not allowed before).
25005f6a 12453
137437c6 12454 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 12455 buffer overruns, corrupting state.
8dd76bee
PE
12456
12457 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
12458 definition.
12459 * src/reader.h (max_left_semantic_context): New variable declaration.
12460 * src/scan-gram.l (max_left_semantic_context): Define.
12461 (handle_action_dollar): Update max_left_semantic_context.
12462 * data/glr.c (YYMAXLEFT): New definition.
12463 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12464 (yyresolveAction): Ditto.
12465
12466 Fixes to problems with location handling in GLR parsers reported by
12467 Frank Heckenbach (2003/06/05).
12468
12469 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12470 (YYRHSLOC): Add parentheses, and define only if locations used.
12471 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12472 locations not used.
12473 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12474 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 12475
25005f6a
PH
12476 * tests/cxx-type.at: Exercise location information; update tests
12477 to differentiate output with and without locations.
8dd76bee 12478 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
12479 because default YYLTYPE not yet defined.
12480 Change semantic actions to compute strings, rather than printing
12481 them directly (to test proper passing of semantics values). Change
12482 output to prefix notation and update test data and expected results.
12483 (yylex): Track locations.
12484 (stmtMerge): Return value rather than printing, and include arguments
12485 in value.
8dd76bee 12486
711f40b7
PE
124872003-06-03 Paul Eggert <eggert@twinsun.com>
12488
12489 Avoid warnings generated by GCC 2.95.4 when Bison is
12490 configured with --enable-gcc-warnings.
12491 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12492 yy::]b4_parser_class_name[::translate_,
12493 yy::Stack::operator[] (unsigned),
12494 yy::Stack::operator[] (unsigned) const,
12495 yy::Slice::operator[] (unsigned),
12496 yy::Slice::operator[] (unsigned) const):
12497 Rename local vars to avoid warnings.
12498 * tests/glr-regression.at (Improper handling of embedded actions
12499 and $-N in GLR parsers): Remove unused local variable from yylex.
12500 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12501 (void) as arg when not pure, since we now assume C89 when building
12502 Bison. Pacify GCC by using parameter.
12503
ac695f7d
PE
125042003-06-02 Paul Eggert <eggert@twinsun.com>
12505
12506 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12507 yy::Location::lines, yy::Location::columns): Rename arguments
12508 to avoid shadowing; this removes a warning generated by GCC 3.3.
12509
26ec81e0
PE
125102003-06-01 Paul Eggert <eggert@twinsun.com>
12511
12512 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12513 to g++, as GCC 3.3 complains if you do it.
12514 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12515 everything that WARNING_CFLAGS has, except omit warnings
12516 not suitable for C++.
12517 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12518 * tests/atlocal.in (CXXFLAGS): New var.
12519 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12520
12521 Fix a GLR parser bug I reported in February; see
161a71f3 12522 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
12523 The problem was that GLR parsers did not conform to the C standard,
12524 because actions like { $1 = $2 + $3; } expanded to expressions
12525 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12526 to a local variable. The C standard says that expressions
12527 like (var = f ()) + (var = f ()) have undefined behavior.
12528 Another problem was that GCC sometimes issues warnings that
12529 yyfill and its parameters are unused.
12530
12531 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12532 as possibly unused.
12533 (yyfill): New function.
12534 (YYFILL): Use it.
12535 (yyuserAction): Change type of yynormal to bool, so that it matches
12536 the new yyfill signature. Mark it as possibly unused.
12537
12538
12539 Follow up on a bug I reported in February, where a Bison-generated
12540 parser can loop. Provide a test case and a fix for yacc.c. I
12541 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12542 The original bug report is in:
161a71f3 12543 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
12544
12545 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12546 macro's size was becoming unwieldy.
12547 (yyerrlab): Do not discard an empty lookahead symbol, as this
12548 might destroy garbage.
12549 (yyerrorlab): New label, with the old contents of YYERROR,
12550 plus the following change: pop the stack of rhs corresponding
12551 to the production that invoked YYERROR. That is how Yacc
12552 behaves, and POSIX requires this behavior.
12553 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12554 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12555 Define 'alarm' to do nothing if unistd.h is not available.
12556 Add a new rule "exp: '-' error;" to test the above change to
12557 data/yacc.c. Use 'alarm' to abort any test taking longer than
12558 10 seconds, as it's probably looping.
12559 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12560 Also, the new yacc.c generates two fewer diagnostics for an
12561 existing test.
12562
d0829076
PE
125632003-05-24 Paul Eggert <eggert@twinsun.com>
12564
c6ae27df
PE
12565 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12566 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12567 This fixes a problem reported by John Bowman when the Compaq/HP
12568 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12569 -ansi -Wall -gall).
12570 * data/yacc.c (union yyalloc): Likewise.
12571 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 12572
d0829076
PE
12573 Switch from 'int' to 'bool' where that makes sense.
12574
12575 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12576 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12577 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12578 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12579 Return or accept bool, not int. All callers changed.
12580 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12581 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12582 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12583 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12584 bitset_or_and_cmp_): Likewise.
12585 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12586 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12587 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12588 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12589 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12590 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12591 bitset_stats_or_and_cmp): Likewise.
12592 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12593 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12594 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12595 ebitset_xor_cmp): Likewise.
12596 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12597 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12598 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12599 lbitset_xor_cmp): Likewise.
12600 * lib/bbitset.h: Include <stdbool.h>.
12601 (struct bitset_vtable): The following members now return bool, not
12602 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12603 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12604 or_and_cmp).
12605 * src/conflicts.c (count_rr_conflicts): Likewise.
12606 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12607 All uses changed.
12608 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12609 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12610 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12611 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12612 graph_flag): Likewise.
12613 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12614 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12615 graph_flag): Likewise.
12616 * src/output.c (error_verbose): Likewise.
12617 * src/output.h (error_verbose): Likewise.
12618 * src/reader.c (start_flag, typed): Likewise.
12619 * src/reader.h (typed): Likewise.
12620 * src/getargs.c (LOCATIONS_OPTION): New constant.
12621 (long_options, getargs): Use it.
12622 * src/lalr.c (build_relations): Use bool, not int.
12623 * src/nullable.c (nullable_compute): Likewise.
12624 * src/print.c (print_reductions): Likewise.
12625 * src/tables.c (action_row, pack_vector): Likewise.
12626 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12627 * src/output.c (prepare): Use it.
12628 * src/output.c (token_definitions_output,
12629 symbol_destructors_output, symbol_destructors_output): Use string,
12630 not boolean integer, to keep track of whether to output separator.
12631 * src/print_graph.c (print_core): Likewise.
12632 * src/state.c (state_rule_lookaheads_print): Likewise.
12633
12634 * config/install-sh: Sync from automake 1.7.5.
12635
6b2584b7
PE
126362003-05-14 Paul Eggert <eggert@twinsun.com>
12637
12638 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12639 semicolon after a grammar declaration, in the interest of possible
12640 future changes to the Bison input language.
12641 Do not allow a stray semicolon at the start of the grammar.
12642 (rhses.1): Allow one or more semicolons after any rule, including
12643 just before "|" as required by POSIX.
12644 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12645 grammar.
12646
caf37a36
ADL
126472003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12648
12649 %parse-param support for lalr1.cc.
12650
12651 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12652 b4_cc_constructor_calls, b4_cc_constructor_call,
12653 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12654 definitions.
12655 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12656 parse-param arguments.
12657 (yy::b4_parser_class_name): Declare instance variables to
12658 hold parse-param arguments.
12659 * tests/calc.at: s/value/semantic_value/ because value clashes
12660 with a member of yy::b4_parser_class_name. Adjust C++ code
12661 to handle %parse-param. Enable %parse-param test in C++.
12662
3ab37077
PE
126632003-05-12 Paul Eggert <eggert@twinsun.com>
12664
12665 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12666 English a bit. Fix fclose typo. Change "const char" to "char
12667 const", and use ANSI C rather than K&R for "main". Suggest
12668 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12669 and suggest yy_switch_to_buffer.
12670
126712003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
12672
12673 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12674 C89. This avoids a diagnostic on compilers that define __STDC__
12675 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 12676 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 12677
e743727f
PE
126782003-05-03 Paul Eggert <eggert@twinsun.com>
12679
12680 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12681 Do not overrun array bounds.
12682 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 12683 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 12684
916708d5
AD
126852003-04-29 Akim Demaille <akim@epita.fr>
12686
12687 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12688 * src/getargs.c, src/getargs.h: here, as bool, not int.
12689 (nondeterministic_parser): New.
12690 * src/parse-gram.y, src/scan-gram.l: Support
12691 %nondeterministic-parser.
12692 * src/output.c (prepare): Use nondeterministic_parser instead
12693 of glr_parser where appropriate.
12694 * src/tables.c (conflict_row, action_row, save_row)
12695 (token_actions, token_actions, pack_vector): Ditto.
12696
a06ea4aa
AD
126972003-04-29 Akim Demaille <akim@epita.fr>
12698
12699 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12700
211074ca
AD
127012003-04-29 Akim Demaille <akim@epita.fr>
12702
12703 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12704 with %pure-parser and %locations to exercise the patch from Yakov
12705 Markovitch below.
12706
6175ffe3
PE
127072003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12708
12709 * data/yacc.c: (b4_lex_param): Corrected for the case where
12710 %lex-param is provided and %pure-parser isn't.
12711
b1e95857
PE
127122003-04-27 Paul Eggert <eggert@twinsun.com>
12713
12714 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 12715 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
12716 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12717 if it is not defined.
12718 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12719
acda9df6
PE
127202003-04-26 Paul Eggert <eggert@twinsun.com>
12721
3470c57b
PE
12722 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12723 Declare to be of type suitable for the ninf value itself, not of
12724 type suitable for the corresponding table, since the latter might
12725 be unsigned but the ninf value might be negative. This fixes a
12726 bug reported by Alexandre Duret-Lutz in
161a71f3 12727 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 12728
acda9df6
PE
12729 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12730 invokes it. We shouldn't invoke it twice because it will attempt
12731 to put error.o in the archive twice. This fixes a glitch reported
12732 by Martin Mokrejs in
161a71f3 12733 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 12734
b5250f26
PE
127352003-04-21 Paul Eggert <eggert@twinsun.com>
12736
12737 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12738 to gnulib.
12739
089ac0f1
PE
127402003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12741
12742 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12743 Fix obvious typo that results in uncompilable GLR parsers
12744 when both %pure-parser and %locations are used. (trivial change)
12745
5ededac6
PE
127462003-04-17 Paul Eggert <eggert@twinsun.com>
12747
1b8f2fff
PE
12748 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12749 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12750 Do not insert the expected token via unput, as this runs afoul
12751 of a POSIX-compatibility bug in flex 2.5.31.
12752 All uses changed to BEGIN the parent state,
12753 since we no longer insert the expected token via unput.
12754 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12755 that is no longer emitted after the above change.
12756
5ededac6
PE
12757 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12758 the first one. This change is from Paul Hilfinger, and it fixes
12759 regression reported by Werner Lemberg in
161a71f3 12760 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
12761
12762 (resolve_sr_conflict): Don't invoke state_errs_set
12763 unless one or more tokens have been explicitly made errors.
12764 Otherwise, the above change causes Bison to abort.
12765
12766 * tests/existing.at (GNU pic Grammar): New test case, taken from
12767 Lemberg's email.
12768
b8be9132
AD
127692003-03-31 Akim Demaille <akim@epita.fr>
12770
12771 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12772
d423d460
AD
127732003-03-31 Akim Demaille <akim@epita.fr>
12774
12775 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12776 output.
12777
c7e441b4
AD
127782003-03-31 Akim Demaille <akim@epita.fr>
12779
12780 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12781 From Paul Hilfinger.
12782
231897ad
AD
127832003-03-29 Akim Demaille <akim@epita.fr>
12784
12785 * m4/error.m4: Do not put under dynamic conditions some code which
12786 expansion is under static control.
12787
5b066063
AD
127882003-03-29 Akim Demaille <akim@epita.fr>
12789
12790 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12791
22a74fec
AD
127922003-03-29 Akim Demaille <akim@epita.fr>
12793
12794 * doc/bison.texinfo (Strings are Destroyed): New.
12795
0eee27e7
PE
127962003-03-13 Paul Eggert <eggert@twinsun.com>
12797
12798 * .cvsignore: Add configure.lineno.
12799 * src/.cvsignore: Add yacc.
12800 * tests/.cvsignore: Add testsuite.log.
12801 * doc/fdl.texi: Sync with latest FSF version.
12802
f61aad93
PE
128032003-03-12 Paul Eggert <eggert@twinsun.com>
12804
537636c7
PE
12805 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12806 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12807 cursor, instead of leaving it undefined. This fixes a bug
12808 reported by Tim Van Holder in
161a71f3 12809 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
12810 * tests/input.at (Torturing the Scanner): Test the scanner on
12811 an empty input file, which was Tim Van Holder's test case.
12812
12813 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12814 <sys/resource.h> can be included, include sys/time.h and
12815 sys/times.h first, if available. This works around the SunOS
12816 4.1.4 porting bug reported by Bruce Becker in
161a71f3 12817 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
12818
12819 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12820 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12821 AC_HEADER_SYS_WAIT.
12822
f61aad93
PE
12823 Merge changes from gnulib. This was prompted because the CVS
12824 snapshot didn't build on Solaris 7 due to strnlen problems.
12825
12826 These changes need to be merged back into gnulib:
12827 * lib/hash.c: Include <stdbool.h> unconditionally.
12828 * m4/onceonly.m4 (m4_quote): New macro.
12829 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12830 Quote AC_FOREACH variable-expansions properly.
12831 The 2003-01-03 obstack.h change also needs merging.
12832 {end of changes requiring merging}
5b066063 12833
f61aad93
PE
12834 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12835 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12836 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12837 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12838 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12839 New files, imported from gnulib.
12840 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12841 above.
12842
12843 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12844 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12845 gnulib sources.
12846
12847 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12848 Add.
12849 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12850 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12851 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12852 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12853 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12854 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12855 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12856 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12857 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12858 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12859 (jm_PREREQ_ARGMATCH): Remove.
12860 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12861 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12862
12863 * src/system.h: Include <stdbool.h> unconditionally.
12864
12865 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12866 assuming at least C89 in the bitset code for some time now.
12867
d2ffe116
AD
128682003-03-03 Akim Demaille <akim@epita.fr>
12869
12870 * ro.po: New.
12871
052826fd
AD
128722003-03-02 Akim Demaille <akim@epita.fr>
12873
12874 * doc/bison.texinfo (Table of Symbols): Reactivate the
12875 documentation for %lex-param, and %parse-param.
12876
c4749565
AD
128772003-03-02 Akim Demaille <akim@epita.fr>
12878
12879 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12880 generate verbose error messages.
12881 Use the number of tokens as an upper bound in yytname, as it
12882 cannot be a non terminal.
12883
d5286af1
AD
128842003-03-02 Akim Demaille <akim@epita.fr>
12885
12886 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12887 message.
12888
22e304a6
AD
128892003-03-02 Akim Demaille <akim@epita.fr>
12890
22e304a6
AD
12891 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12892 Use them to exercise yycheck overrun.
12893 Based on Andrew Suffield's grammar.
12894
67a25fed
AD
128952003-03-02 Akim Demaille <akim@epita.fr>
12896
12897 Create tests/local.at for Bison generic testing macros.
12898
12899 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12900 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12901 This new file.
12902 * tests/calc.at (AT_CHECK_CALC): Adjust.
12903 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12904 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12905 * tests/local.at: here.
12906 (AT_COMPILE_CXX): Tags the tests using it as c++.
12907 Ignore the test if CXX is not functional.
12908
9c2b381f
PE
129092003-03-01 Paul Eggert <eggert@twinsun.com>
12910
12911 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12912 not loc->end, since loc->end might contain garbage and this leads
12913 to undefined behavior on some platforms.
12914 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12915 depend on *loc, so that the reader doesn't give the the false
12916 impression that *loc is initialized.
12917 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12918 does not survive the return.
12919
0433ba88
AD
129202003-03-01 Akim Demaille <akim@epita.fr>
12921
12922 * src/scan-gram.l (code_start): Always initialize it when entering
12923 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12924 yylex invocation. An alternative would be making it static, but
12925 then it starts with the second %%'s beginning, instead of its end.
12926
b305ea69
PE
129272003-02-28 Paul Eggert <eggert@twinsun.com>
12928
12929 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12930 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 12931 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 12932
c3d25e01
PE
129332003-02-26 Paul Eggert <eggert@twinsun.com>
12934
12935 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12936 Remove Sequent/Pyramid discussion (nobody uses them any more).
12937 Merge VMS and MS-DOS discussion; these ports may well be dead
12938 but let's keep mentioning them for now. Put <> around email
12939 addresses. Add copyright notice.
12940
c267ffbc
PE
129412003-02-24 Paul Eggert <eggert@twinsun.com>
12942
12943 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12944 to avoid collision with flex use of yylineno.
12945 Problem reported by Bruce Lilly in
161a71f3 12946 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
12947 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12948 * data/yacc.c (yy_reduce_print): Likewise.
12949
12950 * config/depcomp: Sync with Automake 1.7.3.
12951
f939fc12
AD
129522003-02-21 Akim Demaille <akim@epita.fr>
12953
12954 * data/lalr1.cc: Use temporary variables instead of casts to
12955 change integer types.
12956 Suggested by Paul Eggert.
12957
95923bd6
AD
129582003-02-21 Akim Demaille <akim@epita.fr>
12959
12960 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12961 to avoid confusions with lalr1.cc's notion of Position.
12962 Suggested by Paul Eggert.
12963
2cdc240e
AD
129642003-02-20 Akim Demaille <akim@epita.fr>
12965
12966 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12967 before initial_columns.
12968 (location.hh): Use consistent variable names when defining the
12969 operator<<.
12970 Use "last" so that we subtract from Positions, not from unsigned.
12971
5d003116
AD
129722003-02-20 Akim Demaille <akim@epita.fr>
12973
12974 * data/lalr1.cc (position.hh): New subfile, including the extended
12975 and Doxygen'ed documentation of class Position.
12976 (location.hh): Use it.
12977 Document a` la Doxygen.
ba1ecc07 12978 With the help of Benoit Perrot.
5d003116 12979
d02b25f9
AD
129802003-02-20 Akim Demaille <akim@epita.fr>
12981
12982 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12983 AT_YACC_IF.
12984 Redefine AT_YYERROR_SEES_LOC_IF using it.
12985 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12986 not defined.
12987 Don't use the location in yy::Parser::error_ and
12988 yy::Parser::print_ when not %locations.
12989 Activate more lalr1.cc tests.
12990
0d1c3a04
AD
129912003-02-19 Akim Demaille <akim@epita.fr>
12992
12993 * data/lalr1.cc: When displaying a line number, be sure to make it
12994 an int.
12995
60a777aa
AD
129962003-02-19 Akim Demaille <akim@epita.fr>
12997
12998 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12999 Remove, useless.
13000 (YYABORT, YYACCEPT, YYERROR): New.
13001 * tests/calc.at: Renable the lalr1.cc test.
13002
0b86fc41
AD
130032003-02-19 Akim Demaille <akim@epita.fr>
13004
13005 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13006 error recovery, mixing with/without pops and discarding of the
13007 lookahead.
13008 Exercise YYERROR.
13009 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13010
da99a5dc
PE
130112003-02-17 Paul Eggert <eggert@twinsun.com>
13012
13013 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13014 * tests/testsuite.at (AT_COMPILE): Use them.
13015 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 13016 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 13017
93b8c255
PE
130182003-02-12 Paul Eggert <eggert@twinsun.com>
13019
13020 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13021 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 13022 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
13023 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13024 Check for malloc failure, for consistency with yacc.c.
13025 (yytname_size): Remove, for consistency with yacc.c.
13026
13027 The bug still remains in data/lalr1.cc, as I didn't have time
13028 to fix it there.
13029
7548fed2
AD
130302003-02-06 Akim Demaille <akim@epita.fr>
13031
13032 * configure.ac (GXX): Rename as...
13033 (CXX): this, to keep the original Autoconf semantics.
13034 Require 2.57.
13035 * data/lalr1.cc: Fix b4_copyright invocations.
13036 If YYDEBUG is not defined, don't depend upon name_ being defined.
13037 (location.hh): Include string and iostream.
13038 (Position::filename): New member.
13039 (Position::Position ()): New.
13040 (operator<< (Position)): New.
13041 (operator- (Position, int)): New.
13042 (Location::first, Location::last): Rename as...
13043 (Location::begin, Location::end): these, to mock the conventional
13044 iterator names.
13045 (operator<< (Location)): New.
13046 * tests/atlocal.in (CXX): New.
13047 * tests/testsuite.at (AT_COMPILE_CXX): New.
13048 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13049 locations in a more synthetic way.
13050 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13051 lalr1.cc is used.
13052 Adjust the C locations to match those from Emacs: first column is
13053 column 0.
13054 Change all the expected results.
13055 Conform to the GCS: simplify the locations when applicable.
13056 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13057 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13058 these CPP macros with the m4 macros new defined by...
13059 (AT_CHECK_PUSHDEFS): this, i.e.:
13060 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 13061 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
13062 New macros.
13063 (AT_CHECK_POPDEFS): Undefine them.
13064 (AT_CHECK_CALC_LALR1_CC): New.
13065 Use it for the first lalr1.cc test.
13066
43a176ef
AD
130672003-02-04 Akim Demaille <akim@epita.fr>
13068
13069 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13070 Location as is defined.
13071
fc049e9c
AD
130722003-02-04 Akim Demaille <akim@epita.fr>
13073
13074 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13075 name_ being defined.
13076
a737b216
PE
130772003-02-03 Paul Eggert <eggert@twinsun.com>
13078
13079 * src/gram.h (start_symbol): Remove unused decl.
13080
13081 Use more-consistent naming conventions for local vars.
13082
13083 * src/derives.c (derives_compute): Change type of local var from
13084 int to rule_number.
13085 * src/gram.c (grammar_rules_partial_print): Likewise.
13086 * src/print.c (print_core): Likewise.
13087 * src/reduce.c (reduce_grammar_tables): Likewise.
13088
13089 * src/gram.c (grammar_dump): Change name of item_number *
13090 local var from r to rp.
13091 * src/nullable.c (nullable_compute): Likewise.
13092
13093 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13094
13095 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13096 for symbol or symbol_number var.
13097 * src/reader.c (grammar_start_symbol_set): Likewise.
13098 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13099 Likewise.
13100 * src/state.c (transitions_to): Likewise.
13101 * src/state.h: Likewise.
13102 * src/tables.c (symbol_number_to_vector_number): Likewise.
13103
13104 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13105 char * var.
13106
13107 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13108 var.
13109
13110 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13111 var.
13112
13113 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13114 Use str, not s, for char * var. Use ch, not c, for character var.
13115 Use size for size var.
13116
13117 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13118 char * var.
13119 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13120 uniqstr var.
13121 * src/uniqstr.h: Likewise.
13122
13123 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13124 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13125 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13126 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13127 param to have same name as that of enum, so that we don't use
13128 "s" to stand for a non-state.
13129
68e93ad5
AD
131302003-02-02 Akim Demaille <akim@epita.fr>
13131
13132 * src/scan-skel.l: Scan more than one inert character per yylex
13133 invocation.
13134
92898986
PE
131352003-02-01 Paul Eggert <eggert@twinsun.com>
13136
13137 Version 1.875a.
13138
1d9d5d71
PE
13139 * po/LINGUAS: Add ms.
13140
0435d061
AD
131412003-01-30 Akim Demaille <akim@epita.fr>
13142
13143 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13144
6029a57f
PH
131452003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13146
13147 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13148 of $1.
0435d061
AD
13149
13150 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 13151 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 13152 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 13153
6029a57f
PH
13154 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13155 (b4_rhs_location): Ditto.
0435d061 13156 (yyfill): New function to copy from stack tree into array
6029a57f 13157 incrementally.
0435d061
AD
13158 (yyuserAction): Modify to allow incremental move of semantic values
13159 to rhs array when in GLR mode.
13160 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
13161 as needed.
13162 Remove dummy use of yystack, as there is now a guaranteed use.
13163 (yydoAction): Modify to allow incremental move of semantic values
13164 to rhs array when in GLR mode.
13165 (yyresolveAction): Ditto.
13166 (yyglrShiftDefer): Update comment.
0435d061 13167 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
13168 (yyglrReduce): Ditto.
13169 (yydoAction): Ditto
0435d061 13170
6029a57f
PH
13171 * tests/glr-regr1.at: Rename to ...
13172 * tests/glr-regression.at: Add new regression test for the problems
13173 described above (adapted from S. Eken).
13174 Update copyright notice.
13175 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13176 * tests/Makefile.am: Ditto.
13177
6cee6297
PE
131782003-01-28 Paul Eggert <eggert@twinsun.com>
13179
13180 * data/lalr1.cc: Do not use @output_header_name@ unless
13181 b4_defines_flag is set. This fixes two bugs reported by
13182 Tim Van Holder in
161a71f3
PE
13183 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13184 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 13185
b2a836b5
PE
131862003-01-21 Paul Eggert <eggert@twinsun.com>
13187
13188 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13189 we don't need to worry about yyerrlab1 being reported as an
13190 "unused label" by non-GCC C compilers. The downside is that if
13191 locations are used then a couple of statements are duplicated each
13192 time YYERROR is invoked, but the upside is that the warnings
13193 should vanish.
13194 (yyerrlab1): Move code to YERROR.
13195 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13196 This reverts some of the 2002-12-27 change.
13197
4196b931
PE
131982003-01-17 Paul Eggert <eggert@twinsun.com>
13199
13200 * src/output.c (symbol_printers_output): Fix typo that led
13201 to core dump. Problem reported by Antonio Rus in
161a71f3 13202 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 13203
3ae831b4
AD
132042003-01-13 Akim Demaille <akim@epita.fr>,
13205 Quoc Peyrot <chojin@lrde.epita.fr>,
13206 Robert Anisko <anisko_r@lrde.epita.fr>
13207
13208 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13209 when the stacks contain one element, as the loop would otherwise
13210 free the last state, and then use the top state (the one we just
13211 popped). This means that the initial elements will not be freed
13212 explicitly, as is the case in yacc.c; it is not a problem, as
13213 these elements have fake values.
13214
e3aa65c5
PE
132152003-01-11 Paul Eggert <eggert@twinsun.com>
13216
13217 * NEWS: %expect-violations are now just warnings, reverting
13218 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13219 bootstrapping problem reported by Matthias Klose; see
161a71f3 13220 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
13221 * src/conflicts.c (conflicts_print): Likewise.
13222 * tests/conflicts.at (%expect not enough, %expect too much,
13223 %expect with reduce conflicts): Likewise.
13224 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13225 that the warning is enabled if the number of conflicts changes
13226 (not necessarily increases).
13227
13228 * src/getargs.c (version): Update copyright year.
13229
f0057011
AD
132302003-01-09 Akim Demaille <akim@epita.fr>
13231
13232 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13233
1ee6d2a0
PE
132342003-01-08 Paul Eggert <eggert@twinsun.com>
13235
13236 * Makefile.maint (WGETFLAGS):
13237 New macro, containing "-C off" to disable proxy caches.
13238 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13239 (rel-check): Use $(WGET) instead of wget.
13240
d4fd77c4
PE
132412003-01-06 Paul Eggert <eggert@twinsun.com>
13242
13243 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13244 the GLR paper of Scott, Johnstone and Hussain.
13245
464c6927
PE
132462003-01-04 Paul Eggert <eggert@twinsun.com>
13247
d600ee67
PE
13248 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13249 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13250 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13251 (EXTRA_LIBRARIES): New var, for liby.a.
13252 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13253 (EXTRA_SCRIPTS): New var, for yacc.
13254
464c6927
PE
13255 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13256 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13257 Problem reported by Nelson H. F. Beebe.
13258
132592003-01-03 Paul Eggert <eggert@twinsun.com>
13260
13261 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13262 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13263 when compiling Bison 1.875's `bitset bset = obstack_alloc
13264 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13265
13266 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13267 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13268 grow to a huge size with typical invocation.
d600ee67 13269
464c6927
PE
13270 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13271 Use the pattern recommended by Autoconf 2.57, except also protect
13272 against double-definition.
13273 * src/system.h: Likewise.
13274 Portability issues reported by Nelson H. F. Beebe.
d600ee67 13275
464c6927
PE
13276 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13277 All uses changed. Provide a definition in both C and C++.
13278 (yytrue, yyfalse): Define even if defined (__cplusplus).
13279
13280 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13281 Reported by Nelson H. F. Beebe.
d600ee67 13282
464c6927
PE
13283 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13284
0f42c7d5
PE
132852003-01-02 Paul Eggert <eggert@twinsun.com>
13286
13287 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13288 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13289 Bug reported by Nelson H. F. Beebe.
13290
dc546b0f
PE
132912003-01-01 Paul Eggert <eggert@twinsun.com>
13292
13293 * Version 1.875.
13294
2c09b6a7
PE
132952002-12-30 Paul Eggert <eggert@twinsun.com>
13296
13297 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13298 Moved here from...
13299 (<INITIAL>","): Here. This causes stray "," to be treated
13300 more uniformly.
13301
dc546b0f 13302 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
13303 last brace in braced code when not in Yacc mode, for compatibility
13304 with Bison 1.35. This resurrects the 2001-12-15 patch to
13305 src/reader.c.
13306
13307 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13308 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13309
535c0f63
PE
133102002-12-28 Paul Eggert <eggert@twinsun.com>
13311
13312 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13313 that of SYM's type. This fixes Debian bug 168069, reported by
13314 Thomas Olsson.
d600ee67 13315
963fcc17
PE
133162002-12-28 Paul Eggert <eggert@twinsun.com>
13317
13318 Version 1.75f.
13319
13320 Switch back to the Yacc style of conflict reports, undoing some
13321 of the 2002-07-30 change.
13322 * doc/bison.texinfo (Understanding): Use Yacc style for
13323 conflict reports. Also, use new way of locating rules.
13324 * src/conflicts.c (conflict_report):
13325 Renamed from conflict_report_yacc, removing the old
13326 'conflict_report'. Translate the entire conflict report at once,
13327 so that we don't assume that "," has the same interpretation in
13328 all languages.
13329 (conflicts_output): Use Yacc-style conflict report for each state,
13330 instead of our more-complicated style.
13331 (conflicts_print): Use Yacc-style conflict report, except print
13332 the input file name when not emulating Yacc.
13333 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13334 Conflicted Reduction, %expect not enough, %expect too much,
13335 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13336 * tests/existing.at (GNU Cim Grammar): Likewise.
13337 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13338
13339 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13340 fatal): Don't invoke fflush; it's not needed and it might even be
13341 harmful for stdout, as stdout might not be open.
13342 * src/reduce.c (reduce_print): Likewise.
13343
b1efe548
PE
133442002-12-27 Paul Eggert <eggert@twinsun.com>
13345
13346 Fix a bug where error locations were not being recorded correctly.
13347 This problem was originally reported by Paul Hilfinger in
161a71f3 13348 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
13349
13350 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13351 top of the location stack's error locations.
13352 (yyerrlab): Set it. When discarding a token, push its location
13353 onto yylerrsp so that we don't lose track of the error's end.
13354 (yyerrlab1): Now is only the target of YYERROR, so that we can
13355 properly record the location of the action that failed. For GCC
13356 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13357 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13358 (yyerrlab2): New label, which yyerrlab now falls through to.
13359 Compute the error's location by applying YYLLOC_DEFAULT to
13360 the locations of all the symbols that went into the error.
13361 * doc/bison.texinfo (Location Default Action): Mention that
13362 YYLLOC_DEFAULT is also invoked for syntax errors.
13363 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13364 Error locations include the locations of all the tokens that were
13365 discarded, not just the last token.
d600ee67 13366
983c5c2c
PE
133672002-12-26 Paul Eggert <eggert@twinsun.com>
13368
b1efe548
PE
13369 * src/files.c: Include quote.h.
13370 (compute_output_file_names): Warn if we detect conflicting
13371 outputs to the same file. This should catch the misunderstanding
13372 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13373
13374 * src/conflicts.c (conflicts_print): If the user specifies
13375 "%expect N", report an error if there are any reduce/reduce
13376 conflicts. This is what the manual says should happen.
13377 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13378 * tests/conflicts.at (%expect with reduce conflicts): New test.
13379
983c5c2c
PE
13380 Don't use m4_include on relative file names, as it doesn't work as
13381 desired if there happens to be a file with that name under ".".
d600ee67 13382
983c5c2c
PE
13383 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13384 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13385 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13386 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13387 * src/output.c (output_skeleton): Use full path names when
13388 specifying a file to include; don't rely on include path, as
13389 it's unreliable when the working file contains a file with
13390 that name.
d600ee67 13391
983c5c2c
PE
133922002-12-25 Paul Eggert <eggert@twinsun.com>
13393
13394 Remove obsolete references to bison.simple and bison.hairy.
13395 Problem mentioned by Aubin Mahe in
161a71f3 13396 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
13397 * data/glr.c: Comment fix.
13398 * doc/bison.1: Remove references. Also, mention "yacc".
13399
13400 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13401 with -g option.
13402
13403 * src/parse-gram.y (declaration): Use enum "report_states" rather
13404 than its numeric value 1.
13405
13406 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13407 opening a new one. This fixes Debian bug 165349, reported by
13408 Bruce Stephens.
13409
23f2d9dc
PE
134102002-12-24 Paul Eggert <eggert@twinsun.com>
13411
13412 Version 1.75e.
13413
13414 * Makefile.maint (cvs-update): Don't assume that the shell
13415 supports $(...), as Solaris sh doesn't.
13416
13417 * src/parse-gram.y (lloc_default): Remove test for empty
13418 nonterminals at the end, since it didn't change the result.
13419
134202002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
13421
13422 If the user does not define YYSTYPE as a macro, Bison now declares it
13423 using typedef instead of defining it as a macro. POSIX requires this.
13424 For consistency, YYLTYPE is also declared instead of defined.
13425
13426 %union directives can now have a tag before the `{', e.g., the
13427 directive `%union foo {...}' now generates the C code
13428 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13429 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13430 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13431 instead of `yyltype'.
13432
13433 `yystype' and `yyltype' are now obsolescent macros instead of being
13434 typedefs or tags; they are no longer documented and will be
13435 withdrawn in a future release.
13436
13437 * data/glr.c (b4_location_type): Remove.
13438 (YYSTYPE): Renamed from yystype.
13439 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13440 (struct YYLTYPE): Renamed from struct yyltype.
13441 (YYLTYPE): Renamed from yyltype.
13442 (yyltype, yystype): New (and obsolescent) macros,
13443 for backward compatibility.
13444 * data/yacc.c: Likewise.
13445
13446 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13447 does not specify a union tag. This is for compatibility with
13448 Solaris 9 yacc.
13449
13450 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13451 const *, since it is now modified by stripping surrounding { }.
13452 (current_braced_code): Remove.
13453 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13454 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13455 trailing " {...}". Now of type <chars>.
13456 (grammar_declaration): Adjust to bundled tokens.
13457 (code_content): Remove; stripping is now done by add_param.
13458 (print_token_value): Print contents of bundled tokens.
13459 (token_name): New function.
13460
13461 * src/reader.h (braced_code, current_braced_code): Remove.
13462 (token_name): New decl.
13463
13464 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13465 token_type, not braced_code code_kind. All uses changed.
13466 (SC_PRE_CODE): New state, for scanning after a keyword that
13467 has (or usually has) an immediately-following braced code.
13468 (token_type): New local var, to keep track of which token type
13469 to return when scanning braced code.
13470 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 13471 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
13472 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13473 instead of returning a token type immediately.
13474 (<INITIAL>"{"): Set token type.
13475 (<SC_BRACED_CODE>"}"): Use it.
13476 (handle_action_dollar, handle_action_at): Now returns bool
13477 indicating success. Fail if ! current_rule; this prevents a core dump.
13478 (handle_symbol_code_dollar, handle_symbol_code_at):
13479 Remove; merge body into caller.
13480 (handle_dollar, handle_at): Complain in invalid contexts.
13481
13482 * NEWS, doc/bison.texinfo: Document the above.
13483 * NEWS: Fix years and program names in copyright notice.
13484
879ca4f8
PE
134852002-12-17 Paul Eggert <eggert@twinsun.com>
13486
13487 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13488 Reporting, Table of Symbols): Omit mentions of %lex-param and
13489 %parse-param from the documentation for now.
13490
1c5fe69d
PE
134912002-12-15 Paul Eggert <eggert@twinsun.com>
13492
13493 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13494 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13495 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
13496 disagreed with the Bison documentation. Bug
13497 reported by Andrew Walrond.
d600ee67 13498
1c5fe69d
PE
13499 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13500 as the caller now does that.
13501 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13502 (YYEMPTY): Parenthesize right hand side, since others use it.
13503 (yyparse): Don't assume that our generated code is the only code
13504 that sets yychar.
13505
d1de5372
PE
135062002-12-13 Paul Eggert <eggert@twinsun.com>
13507
13508 Version 1.75d.
13509
13510 POSIX requires a "yacc" command.
13511 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13512 (MOSTLYCLEANFILES): Add yacc.
13513 (yacc): New rule.
1c5fe69d 13514 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
13515 as an alias for bison y.
13516
13517 * po/LINGUAS: Add da.
d600ee67 13518
d1de5372
PE
13519 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13520 problem with latest <getopt.h>.
13521 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13522
13523 * doc/fdl.texi: Upgrade to 1.2.
13524 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13525 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13526 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13527 gnulib.
13528 * config/install-sh: Sync with autotools.
13529
13530 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 13531 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
13532 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13533 locations are requested.
13534 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13535 locations are requested.
13536
d0f3fe23
PE
135372002-12-12 Paul Eggert <eggert@twinsun.com>
13538
13539 Remove unportable casts and storage allocation tricks.
13540 While we're at it, remove almost all casts, since they
13541 usually aren't needed and are a sign of trouble.
13542
13543 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13544
13545 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13546 the pointer DSET returned by malloc; this isn't portable.
13547 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13548 Similarly for DERIVES.
13549 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13550 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13551 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13552
13553 * src/derives.c (derives_compute): Do not bother invoking
13554 int_of_rule_number, since rule numbers are integers.
13555
13556 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13557 rather than XMALLOC (char, N).
13558
13559 * src/files.c (filename_split): Rewrite to avoid cast.
13560
13561 * src/gram.h (symbol_number_as_item_number,
13562 item_number_as_symbol_number, rule_number_as_item_number,
13563 item_number_as_rule_number):
13564 Now inline functions rather than macros, to avoid casts.
13565 * src/state.h (state_number_as_int): Likewise.
13566 * src/tables.c (state_number_to_vector_number,
13567 symbol_number_to_vector_number): Likewise.
13568
13569 * src/gram.h (int_of_rule_number): Remove; no longer used.
13570
13571 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13572 since the resulting storage is always stored into.
13573
13574 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13575 where it's needed.
13576
13577 * src/muscle_tab.c (muscle_m4_output):
13578 Now inline. Return bool, not int.
13579 * src/state.c (state_compare): Likewise.
13580 * src/symtab.c (symbol_check_defined,
13581 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13582 hash_compare_symbol, hash_symbol):
13583 Likewise.
13584 * src/uniqstr.c (uniqstr_print): Likewise.
13585 * src/muscle_tab.c (muscle_m4_output_processor):
13586 New function, to avoid casts.
13587 * src/state.c (state_comparator, stage_hasher): Likewise.
13588 * src/symtab.c (symbol_check_defined_processor,
13589 symbol_check_alias_consistency_processor, symbol_pack_processor,
13590 symbol_translation_processor, hash_symbol_comparator,
13591 hash_symbol_hasher): Likewise.
13592 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13593 * src/muscle_tab.c (muscles_m4_output):
13594 Use new functions instead of casting old functions unportably.
13595 * src/state.c (state_hash_new): Likewise.
13596 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13597 symbols_token_translations_init):
13598 Likewise.
13599 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13600
13601 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13602 var instead of casting to long, to avoid casts.
13603 (prepare_states): Use MALLOC rather than alloca, so that we don't
13604 have to worry about alloca.
13605 * src/state.c (state_hash_lookup): Likewise.
13606
13607 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13608 local var instead of casting to unsigned char, to avoid casts.
13609
13610 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13611 STATE_ALLOC): Remove.
13612 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13613 rather than calloc, and use offsetof to avoid allocating slightly
13614 too much storage.
13615 (state_new): Initialize all members.
13616
13617 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13618
13619 * src/symtab.c (symbol_free): Remove; unused.
13620 (symbol_get): Remove cast in lhs of assignment.
13621 (symbols_do): Now static. Accept generic arguments, not
13622 hashing-related ones.
13623
13624 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13625 (symbol_processor): Remove.
13626 (symbols_do): Remove decl; now static.
13627
13628 * src/system.h (alloca): Remove; decl no longer needed.
13629 (<stddef.h>): Include, for offsetof.
13630 (<inttypes.>, <stdint.h>): Include if available.
13631 (uintptr_t): New type, if system lacks it.
13632 (CALLOC, MALLOC, REALLOC): New macros.
13633 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13634 new macros.
13635
13636 * src/tables.c (table_size): Now int, to pacify GCC.
13637 (table_grow, table_ninf_remap): Use signed table size.
13638 (save_row): Don't bother initializing locals when not needed.
13639 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13640 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13641
13642 * src/vcg.h: Correct misspellings.
13643
13644 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13645
13646
13647 * src/getargs.c (getargs): Don't assume EOF == -1.
13648
26b4a969
PE
136492002-12-09 Paul Eggert <eggert@twinsun.com>
13650
13651 Change identifier spellings to avoid collisions with names
13652 that are reserved by POSIX.
13653
13654 Don't use names ending in _t, since POSIX reserves them.
13655 For consistency, remove _e and _s endings -- they're weren't
13656 needed to remove ambiguity. All uses changed.
13657 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13658 turn was just renamed from struniq_t.
13659 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13660 which in turn was just renamed from struniq_processor_t.
13661 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13662 in turn was renamed from hash_compare_struniq_t.
13663 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13664 (state_list): Renamed from state_list_t.
13665 * src/assoc.h (assoc): Renamed from assoc_t.
13666 * src/conflicts.c (enum conflict_resolution): Renamed from
13667 enum conflict_resolution_e.
13668 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13669 (rule_list): Renamed from rule_list_t.
13670 * src/getargs.h (enum trace): Renamed from enum trace_e.
13671 (enum report): Renamed from enum report_e.
13672 * src/gram.h (item_number): Renamed from item_number_t.
13673 (rule_number): Renamed from rule_number_t.
13674 (struct rule_s): Remove the "rule_s" part; not used.
13675 (rule): Renamed from rule_t.
13676 (rule_filter): Renamed from rule_filter_t.
13677 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13678 (goto_list): Renamed from goto_list_t.
13679 * src/lalr.h (goto_number): Renamed from goto_number_t.
13680 * src/location.h (location): Renamed from location_t.
13681 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13682 and moved here from:
13683 * src/muscle_tab.h (muscle_entry_t): here.
13684 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13685 (rule_list): Renamed from rule_list_t.
13686 * src/print_graph.c (static_graph): Renamed from graph.
13687 * src/reader.h (braced_code): Renamed from braced_code_t.
13688 Remove brace_code_e tag.
13689 * src/relation.h (relation_node): Renamed from relation_node_t.
13690 (relation_nodes): Renamed from relation_nodes_t.
13691 (relation): Renamed from relation_t.
13692 * src/state.h (state_number): Renamed from state_number_t.
13693 (struct state): Renamed from struct state_s.
13694 (state): Renamed from state_t.
13695 (transitions): Renamed from transitions_t. Unused (and
13696 misspelled) transtion_s tag removed.
13697 (errs): Renamed from errs_t. Unused errs_s tag removed.
13698 (reductions): Renamed from reductions_t. Unused tag
13699 reductions_s removed.
13700 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13701 (struct symbol_list): Renamed from struct symbol_list_s.
13702 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13703 (struct symbol): Renamed from struct symbol_s.
13704 (symbol): Renamed from symbol_t.
13705 * src/tables.c (vector_number): Renamed from vector_number_t.
13706 (action_number): Renamed from action_t.
13707 * src/tables.h (base_number): Renamed from base_t.
13708 * src/vcg.h (enum color): Renamed from enum color_e.
13709 (enum textmode): Renamed from enum textmode_e.
13710 (enum shape): Renamed from enum shape_e.
13711 (struct colorentry): Renamed from struct colorentry_s.
13712 (struct classname): Renamed from struct classname_s.
13713 (struct infoname): Renamed from struct infoname_s.
13714 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13715 (enum decision): Renamed from enum decision_e.
13716 (enum orientation): Renamed from enum orientation_e.
13717 (enum alignment): Renamed from enum alignment_e.
13718 (enum arrow_mode): Renamed from enum arrow_mode_e.
13719 (enum crossing_type): Renamed from enum crossing_type_e.
13720 (enum view): Renamed from enum view_e.
13721 (struct node): Renamed from struct node_s.
13722 (node): Renamed from node_t.
13723 (enum linestyle): Renamed from enum linestyle_e.
13724 (enum arrowstyle): Renamed from enum arrowstyle_e.
13725 (struct edge): Renamed from struct edge.
13726 (edge): Renamed from edge_t.
13727 (struct graph): Renamed from struct graph_s.
13728 (graph): Renamed from graph_t.
13729 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13730 Rename value_t -> value.
13731 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13732 value_t_as_yystype -> value_as_yystype.
13733
13734 Don't include <errno.h> in the mainstream code, since it
13735 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13736 * lib/get-errno.c, lib/get-errno.h: New files.
13737 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13738 get-errno.c.
13739 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13740 * src/output.c (output_skeleton): Likewise.
13741 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13742 instead of errno.
13743 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13744 Likewise.
13745 (handle_action_dollar, handle_action_at): Likewise.
13746 * src/system.h: Do not include <errno.h>.
13747 (TAB_EXT): Renamed from EXT_TAB.
13748 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13749
13750 Avoid str[a-z]*, since <string.h> reserves that name space.
13751 Change all instances of "struniq" in names to "uniqstr", and
13752 likewise for "STRUNIQ" and "UNIQSTR".
13753 * src/uniqstr.c: Renamed from src/struniq.c.
13754 * src/uniqstr.h: Renamed from src/struniq.h.
13755 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13756 * src/files.c (strsuffix): Remove; unused.
13757 (concat2): Renamed from stringappend. Now static.
13758 * src/files.h (strsuffix, stringappend): Remove; unused.
13759 * src/parse-gram.y (<chars>): Renamed from <string>.
13760 (<uniqstr>): Renamed from <struniq>.
13761 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13762 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13763 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13764 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13765 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13766 (N_EXPAND): Renamed from N_STRETCH.
13767
13768 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13769 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13770 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13771 Remove; unused.
13772 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13773 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13774 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13775 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13776 (BASE_MAXIMUM): Renamed from BASE_MAX.
13777 (BASE_MINIMUM): Renamed from BASE_MIN.
13778 (ACTION_MAX): Remove; unused.
13779 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13780 Unnecessary casts removed from above defines.
13781
13782
13783 Fix misspelling in names.
13784 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13785 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13786 G_NODE_ALIGNEMENT.
13787
13788
13789 * lib/timevar.c (timevar_report): Renamed from time_report,
13790 for consistency with other names.
13791 * lib/timevar.h (timevar_report): New decl.
13792 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13793
13794
13795 Sort include-file uses.
13796
13797 Reorder all include files under src to be in the order "system.h".
13798 then the ../lib include files in angle brackets (alphabetized),
13799 then the . include files in double-quotes (alphabetized). Fix
13800 dependency breakages encountered in this process, as follows:
13801 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13802 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13803 * src/state.h: Include "symtab.h".
13804
996b1c7e
PE
138052002-12-08 Paul Eggert <eggert@twinsun.com>
13806
13807 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13808 since this causes problems when __file__ contains character
13809 sequences like "@" that are treated specially by src/scan-skel.l.
13810 Instead, just use the file's basename. This fixes the bug
13811 reported by Martin Mokrejs in
161a71f3 13812 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 13813
e19c4e5d
PE
138142002-12-06 Paul Eggert <eggert@twinsun.com>
13815
13816 Add support for rules that do not have trailing semicolons, as
13817 POSIX requires. Improve the quality of locations in Bison
13818 diagnostics.
26b4a969 13819
e19c4e5d
PE
13820 * src/location.c: Include <quotearg.h>.
13821 (empty_location): Now const.
13822 (location_print): New function. Follow the recommendation of the
13823 GNU Coding Standards for locations that span file boundaries.
13824 * src/location.h: Do not include <quotearg.h>; no longer needed.
13825 (boundary): New type.
13826 (location_t): Use it. This allows locations to span file boundaries.
13827 All member uses changed: file -> start.file or end.file (as needed),
13828 first_line -> start.line, first_column -> start.column,
13829 last_line -> end.line, last_column -> end.column.
13830 (equal_boundaries): New function.
13831 (LOCATION_RESET, LOCATION_STEP): Remove.
13832 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13833 (empty_location): Now const.
13834 (location_print): New decl.
13835 * src/parse-gram.y (lloc_default): New function, which handles
13836 empty locations more accurately.
13837 (YYLLOC_DEFAULT): Use it.
13838 (%token COLON): Remove.
13839 (%token ID_COLON): New token.
26b4a969 13840 (rules): Use it.
e19c4e5d
PE
13841 (declarations, rules): Remove trailing semicolon.
13842 (declaration, rules_or_grammar_declaration):
13843 Allow empty (";") declaration.
13844 (symbol_def): Remove empty actions; no longer needed.
13845 (rules_or_grammar_declaration): Remove trailing semicolon.
13846 (semi_colon.opt): Remove.
13847 * src/reader.h: Include location.h.
13848 (scanner_cursor): New decl.
13849 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13850 rolling our own.
13851 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13852 of *loc.
13853 (STEP): Remove. No longer needed, now that adjust_location does
13854 the work. All uses removed.
13855 (scanner_cursor): New var.
13856 (adjust_location): Renamed from extend_location. It now sets
13857 *loc and adjusts the scanner cursor. All uses changed.
13858 Don't bother testing for CR.
13859 (handle_syncline): Remove location arg; now updates scanner cursor.
13860 All callers changed.
13861 (unexpected_end_of_file): Now accepts start boundary of token or
13862 comment, not location. All callers changed. Update scanner cursor,
13863 not the location.
13864 (SC_AFTER_IDENTIFIER): New state.
13865 (context_state): Renamed from c_context. All uses changed.
13866 (id_loc, code_start, token_start): New local vars.
13867 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13868 processing of Yacc white space and equivalents here.
13869 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13870 instead of returning ID immediately, since we need to search for
13871 a subsequent colon.
13872 (<INITIAL>"'", "\""): Save token_start.
13873 (<INITIAL>"%{", "{", "%%"): Save code_start.
13874 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13875 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13876 BEGIN context_state at end, not INITIAL.
13877 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13878 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13879 Return correct token start.
13880 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13881 the start of a character, string or multiline comment is found.
13882 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13883 Reduction): Adjust reported locations to match the more-precise
13884 results now expected.
13885 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13886 * tests/reduce.at (Useless Rules, Reduced Automaton,
13887 Underivable Rules): Likewise.
13888 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13889 or "|"' now that so many other tokens are allowed by the new grammar.
13890
13891 * src/complain.h (current_file): Remove duplicate decl;
13892 current_file is now owned by files.h.
13893 * src/complain.c, src/scan-gram.l: Include files.h.
13894
138952002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 13896
e19c4e5d
PE
13897 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13898 promotes to int; it might be unsigned int.
13899 * data/yacc.c (yy_reduce_print): Likewise.
13900
13901 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13902 be #defined in the prologue, not in the Bison declarations.
13903 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 13904
b64755e3
PE
139052002-12-02 Paul Eggert <eggert@twinsun.com>
13906
13907 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13908 * lib/strtoul.c: New file, from gnulib.
13909 This fixes a porting bug reported by Peter Klein in
161a71f3 13910 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 13911
6e746484
PE
139122002-11-30 Paul Eggert <eggert@twinsun.com>
13913
b64755e3
PE
13914 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13915 and put only a forward declaration in the prologue. This is for
13916 consistency with the other scanner helper functions.
13917
6ba55592
PE
13918 Type clashes now generate warnings, not errors, since it
13919 appears that POSIX may allow some grammars with type clashes.
13920 * src/reader.c (grammar_current_rule_check): Warn about
13921 type clashes instead of complaining.
13922 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13923
6e746484
PE
13924 Add Yacc library, since POSIX requires it.
13925 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13926 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13927 * lib/main.c, lib/yyerror.c: New files.
13928
13929 gram_error can be static; it need not be extern.
13930 * src/reader.h (gram_error): Remove decl.
13931 * src/parse-gram.y (gram_error): Now static. Add static decl.
13932 (print_token_value): Omit parameter names from forward decl,
13933 for consistency.
13934
88510f9c
PE
139352002-11-29 Paul Eggert <eggert@twinsun.com>
13936
6e746484
PE
13937 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13938 be declared before being used. E.g., one should typically
13939 declare them in the prologue. Use GNU coding style in examples.
13940 Put "const" consistently after the type it modifies. Mention
13941 that C99 supports "inline". Mention that yyerror traditionally
13942 returns "int".
13943
88510f9c
PE
13944 %parse-param and %lex-param now take just one argument, the
13945 declaration; the argument name is deduced from the declaration.
13946
13947 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13948 Reporting, Table of Symbols): Document this.
13949 * src/parse-gram.y (add_param): New function.
13950 (COMMA): Remove.
13951 (declaration): Implement new rule for %parse-param and %lex-param.
13952 * src/scan-gram.l: "," now elicits a warning, rather than being
13953 a token; this is more compatible with byacc.
13954 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13955
bb92250c
PE
139562002-11-27 Paul Eggert <eggert@twinsun.com>
13957
13958 Rename identifiers to avoid real and potential collisions.
13959
13960 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13961 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 13962 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
13963 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13964 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13965 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13966 All uses changed.
13967 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13968 The name "yycontrol" violates the name space rules, and this stuff
13969 wasn't being used anyway.
13970 (input): Remove action; this stuff wasn't being used.
13971 (gram_error): Rename local variable yylloc -> loc.
13972 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13973 (YY_DECL): Don't use "yy" at start of local variables.
13974 All uses changed, e.g., yylloc -> loc.
13975 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13976 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13977 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13978 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13979
13980 * src/parse-gram.y (gram_error): loc is now const *.
13981 * src/reader.h (gram_error): Likewise.
13982
3af4feb2
PE
139832002-11-24 Paul Eggert <eggert@twinsun.com>
13984
13985 Version 1.75c.
13986
13987 * tests/actions.at (Actions after errors): Use an output format
13988 more similar to that of the Printers and Destructors test.
13989 Test the position of the ';' token too.
13990 (Printers and Destructors): Likewise.
13991 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13992 unnecessarily alarming people when the test fails.
13993
13994 * data/yacc.c (yyerrlab1): Move this label down, so that the
13995 parser does not discard the lookahead token if the user code
13996 invokes YYERROR. This change is required for POSIX conformance.
13997
13998 * lib/error.c: Sync with gnulib.
13999
140002002-11-22 Paul Eggert <eggert@twinsun.com>
14001
14002 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14003 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14004 * lib/xmalloc.c: Likewise.
26b4a969 14005
58004308
PE
140062002-11-20 Paul Eggert <eggert@twinsun.com>
14007
14008 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14009
140102002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 14011
58004308
PE
14012 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14013 should use `if (! x) abort ();' rather than `assert (x);', and
14014 anyway it's one less thing to worry about configuring.
14015
14016 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14017 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14018 and replace all instances of assert with abort.
14019 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14020 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14021
14022 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14023 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14024 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14025 hash_find_entry, hash_rehash, hash_insert): Likewise.
14026 * src/conflicts.c (resolve_sr_conflict): Likewise.
14027 * src/lalr.c (set_goto_map, map_goto): Likewise.
14028 * src/nullable.c (nullable_compute): Likewise.
14029 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14030 * src/reader.c (packgram, reader): Likewise.
14031 * src/state.c (state_new, state_free, state_transitions_set,
14032 state_reduction_find): Likewise.
14033 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14034 symbol_pack): Likewise.
14035 * src/tables.c (conflict_row, pack_vector): Likewise.
14036 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14037 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14038 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14039 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14040
14041 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14042 (ARGMATCH_CONSTRAINT): New macro.
14043 (ARGMATCH_ASSERT): Use it.
14044
14045 * src/system.h (verify): New macro.
14046 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14047 rather than assert.
14048 * src/tables.c (tables_generate): Likewise.
14049
14050 * src/struniq.c (struniq_assert): Now returns void, and aborts
14051 if the assertion is false.
14052 (struniq_assert_p): Remove.
14053 * src/struniq.h: Likewise.
14054
76ae8198
PE
140552002-11-18 Paul Eggert <eggert@twinsun.com>
14056
14057 * data/glr.c (yygetLRActions): Replace `yyindex' with
14058 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14059 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 14060 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 14061
d3c4e709
AD
140622002-11-18 Akim Demaille <akim@epita.fr>
14063
14064 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14065 space.
14066 From Tim Van Holder.
14067
8d8a7238
PE
140682002-11-17 Paul Eggert <eggert@twinsun.com>
14069
14070 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14071 to "SyntaxError" for consistency with my 2002-11-15 change.
14072
14073 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14074 not define to {}, since this breaks the common use of `YYDPRINTF
14075 ((...));' if a single statement is desired (e.g. before `else').
14076 Work around GCC warnings by surrounding corresponding calls with
14077 {} if needed.
14078 (yyhasResolvedValue): Remove unused function.
14079 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14080 loop body.
14081 (yyreportSyntaxError): Renamed from yyreportParseError.
14082 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14083 All uses changed.
14084 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14085 extern when possible. Remove unused initializations.
14086
b0937b22
AD
140872002-11-16 Akim Demaille <akim@epita.fr>
14088
14089 Augment the similarity between GLR and LALR traces.
14090
14091 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14092 (YY_REDUCE_PRINT): New.
14093 (yyparse): Use them.
14094 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14095 YYDPRINT here.
14096 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14097 state reached after the reduction/recovery, since...
14098 (yyparse, yyprocessOneStack): Report the state we are entering in.
14099
c5e3e510
AD
141002002-11-16 Akim Demaille <akim@epita.fr>
14101
14102 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14103 Add support for --trace=skeleton.
14104 * src/scan-skel.l: %option debug.
14105 Scan strings of non-@ or \n instead of character by character.
14106 (scan_skel): Handle trace_skeleton.
14107 (QPUTS): New.
14108 (@output_parser_name@, @output_header_name@): ``Restore'' their
14109 support (used to be M4 macros).
14110 * data/yacc.c: Quote larger chunks, a la glr.c.
14111 * data/lalr1.cc: Likewise.
14112 The header guards are no longer available, so use some other
14113 string than `YYLSP_NEEDED'.
14114
4c6cc1db
AD
141152002-11-16 Akim Demaille <akim@epita.fr>
14116
14117 Make the ``Printers and Destructors'' test more verbose, taking
14118 `yacc.c''s behavior as (possibly wrong) reference.
14119
14120 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14121 instead of fprint on stdout.
14122 Set and report the last_line of the symbols.
14123 Consistently display values and locations.
14124
6d9e8019
PE
141252002-11-16 Paul Eggert <eggert@twinsun.com>
14126
14127 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14128
6e649e65
PE
141292002-11-15 Paul Eggert <eggert@twinsun.com>
14130
b25d88f6
PE
14131 * tests/actions.at (Actions after errors): New test case.
14132
6e649e65
PE
14133 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14134 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14135 tests/action.at, tests/calc.at, tests/conflicts.at,
14136 tests/cxx-type.at, tests/regression.at:
14137 "parse error" -> "syntax error" for POSIX compatibility.
14138 "parsing stack overflow..." -> "parser stack overflow" so
14139 that code matches Bison documentation.
14140
0f39aab9
AD
141412002-11-15 Akim Demaille <akim@epita.fr>
14142
14143 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14144 take two BRACED_CODE, not two string_content.
14145 Free the scanner's obstack when we are done.
14146 (code_content): New.
14147 * tests/calc.at: Adjust.
14148 * doc/bison.texinfo: Adjust.
14149 Also, make sure to include the `,' for these declarations.
14150
761c1926
AD
141512002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14152
14153 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14154 definition; avoids potential autoreconf problems.
14155
b0f98b10
AD
141562002-11-15 Akim Demaille <akim@epita.fr>
14157
14158 Always check the value returned by yyparse.
14159
14160 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14161 returned by yyparse.
14162 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14163 Adjust calls.
14164 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14165 returned by yyparse.
14166
970785f1
PH
141672002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14168
14169 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14170 on input.at test.
14171
8fcc7db1
PE
141722002-11-14 Paul Eggert <eggert@twinsun.com>
14173
7ec1b48e
PE
14174 * src/output.c (output_skeleton): Call xfopen instead of
14175 duplicating xfopen's body.
14176
cfff7583 14177 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 14178 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 14179
8fcc7db1
PE
14180 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14181 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14182 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14183 file twice in the grammar, as an extra check.
14184
14185 * tests/input.at (Torturing the Scanner): Surround the
14186 backslash-newline tests with "#if 0", to make it less likely that
14187 we'll run into compiler bugs. Bring back solitary \ inside
14188 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 14189 test backslash-newline in C character constant.
8fcc7db1 14190
4e8d992c
AD
141912002-11-14 Akim Demaille <akim@epita.fr>
14192
14193 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14194 status of the compiler.
f32b346d 14195 Calling `exit 1' is no longer needed.
4e8d992c
AD
14196 Reported by Nelson H. F. Beebe.
14197
9501dc6e
AD
141982002-11-14 Akim Demaille <akim@epita.fr>
14199
14200 * tests/atlocal.in (CPPFLAGS): We have config.h.
14201 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14202 New.
14203 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14204 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14205 * tests/regression.at, tests/torture.at: Use them for all the
14206 grammars that are to be compiled.
14207 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14208 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14209 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14210
18b519c0
AD
142112002-11-14 Akim Demaille <akim@epita.fr>
14212
14213 * doc/bison.texinfo: Various formatting changes (alignments in
14214 samples, additional @group/@end group, GCS in samples.
14215 Use @deffn instead of simple @table to define the directives,
14216 macros, variables etc.
14217
9a86cdb9
PE
142182002-11-13 Paul Eggert <eggert@twinsun.com>
14219
daa33def 14220 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 14221 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 14222
daa33def 14223 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 14224 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
14225 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14226 * tests/headers.at (export YYLTYPE): Likewise.
14227
14228 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 14229 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 14230
9a86cdb9
PE
14231 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14232 comments, since they're not portable. Use GNU coding style.
14233
9c1e26bd
AD
142342002-11-13 Akim Demaille <akim@epita.fr>
14235
14236 * data/yacc.c: Leave bigger chunks of quoted text.
14237 (YYDSYMPRINTF): New.
14238 Use it to report symbol activities.
14239 * data/glr.c (YYDSYMPRINTF): New.
14240 Use it.
14241
87f721cc
PE
142422002-11-12 Paul Eggert <eggert@twinsun.com>
14243
14244 Version 1.75b.
14245
14246 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14247 (yyglrReduce): Return yyok, not 0.
14248 This should avoid the enumerated-type warnings reported
464c6927 14249 by Nelson H. F. Beebe in
161a71f3 14250 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
14251
14252 * lib/bbitset.h (BITSET_INLINE): Remove.
14253 * lib/bitset.h [! BITSET_INLINE]: Remove.
14254 (bitset_set, bitset_reset, bitset_test): Rename local vars
14255 to avoid shadowing warnings by GCC.
14256
14257 * data/glr.c (inline): Remove #define. It's the user's
14258 responsibility to #define it away, just like 'const'.
464c6927 14259 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 14260 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 14261
87f721cc
PE
14262 * Makefile.maint (po-check): Scan .l and .y files instead of the
14263 .c and the .h files that they generate. This fixes the bug
14264 reported by Tim Van Holder in:
161a71f3 14265 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
14266 Look for N_ as well as for _. Try to avoid matching #define for
14267 N_ and _.
14268 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14269 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14270 * src/scan-gram.l: Revamp regular expressions so that " and '
14271 do not confuse xgettext.
14272
14273 * src/struniq.h (struniq_new): Do not declare the return type
14274 to be 'const'; this violates the C standard.
14275 * src/struniq.c (struniq_new): Likewise.
14276
be14ade5
AD
142772002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14278
14279 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14280 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14281 linker.
14282
05291fbc
AD
142832002-11-12 Akim Demaille <akim@epita.fr>
14284
14285 * Makefile.maint: Sync with Autoconf:
14286 (local_updates): New.
14287
1f5fd52e
AD
142882002-11-12 Akim Demaille <akim@epita.fr>
14289
14290 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14291
283f1e64
AD
142922002-11-12 Akim Demaille <akim@epita.fr>
14293
14294 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14295 locations.
14296
886b69d1
AD
142972002-11-12 Akim Demaille <akim@epita.fr>
14298
14299 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14300 not yyvalue.
14301
3df37415
AD
143022002-11-12 Akim Demaille <akim@epita.fr>
14303
14304 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14305 Use it to test the GLR parser.
14306
7bd6c77e
AD
143072002-11-12 Akim Demaille <akim@epita.fr>
14308
14309 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14310 defines it.
14311 * data/glr.c (yystos): New.
14312 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14313 (YYDSYMPRINT): New.
14314 (yyval): Don't define it, it is handled via M4.
14315 (yyrecoverParseError): Free verbosely the discarded symbols.
14316 * data/yacc.c (yysymprint): Remove, rather...
14317 (b4_yysymprint_generate): invoke.
14318 * data/c.m4 (b4_yysymprint_generate): New.
14319 Accept pointers as arguments, as opposed to the version from
14320 yacc.c.
14321 (b4_yydestruct_generate): Likewise.
14322 * tests/cations.at (Printers and Destructors): Use Bison directives
14323 instead of CPP macros.
14324 Don't rely on internal details.
14325
b0400cc6
AD
143262002-11-12 Akim Demaille <akim@epita.fr>
14327
14328 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14329 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14330 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14331 it against YYEMPTY and so forth), work on yytoken (i.e., set
14332 it to YYEMPTY etc.).
14333 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14334 (b4_symbol_actions): Remove.
14335 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14336 for 0, end-of-input.
14337
72f889cc
AD
143382002-11-12 Akim Demaille <akim@epita.fr>
14339
14340 * doc/bison.texinfo (Destructor Decl): New.
14341
b1ae9233
AD
143422002-11-12 Akim Demaille <akim@epita.fr>
14343
14344 * src/tables.c (tables_generate): Use free for pointers that
14345 cannot be NULL, not XFREE.
14346 (pack_vector): Use assert, not fatal, for bound violations.
14347 * src/state.c (state_new): Likewise.
14348 * src/reader.c (reader): Likewise.
14349 * src/lalr.c (set_goto_map): Likewise.
72f889cc 14350 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
14351 the file name.
14352
7ec2d4cd
AD
143532002-11-12 Akim Demaille <akim@epita.fr>
14354
14355 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14356 Restore.
14357 * src/scan-gram.l (last_string): Is global to the file, not to
14358 yylex.
14359 * src/parse-gram.y (input): Don't append the epilogue here,
14360 (epilogue.opt): do it here, and free the scanner's obstack.
14361 * src/reader.c (epilogue_set): Rename as...
14362 (epilogue_augment): this.
14363 * data/c.m4 (b4_epilogue): Defaults to empty.
14364
573a6cd3
AD
143652002-11-12 Akim Demaille <akim@epita.fr>
14366
14367 * src/getargs.c (long_options): Remove duplicates.
14368 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14369 Remove.
14370 * doc/bison.rnh: Remove.
14371 * doc/bison.texinfo (VMS Invocation): Remove.
14372
95612cfa
AD
143732002-11-12 Akim Demaille <akim@epita.fr>
14374
14375 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14376 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14377
14378 Use struniq for symbols.
14379
14380 * src/symtab.h (symbol_t): The tag member is a struniq.
14381 (symbol_type_set): Adjust.
14382 * src/symtab.c (symbol_new): Takes a struniq.
14383 (symbol_free): Don't free the tag member.
14384 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14385 (hash_compare_symbol, hash_symbol): these.
14386 Use the fact that tags as struniqs.
14387 (symbol_get): Use struniq_new.
14388 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14389 Returns a strniq.
14390 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14391 and type members are struniqs.
14392 * src/reader.c (get_merge_function)
14393 (grammar_current_rule_merge_set): Adjust.
14394 (TYPE, current_type): Are struniq.
14395
14396 Use struniq for file names.
14397
14398 * src/files.h, src/files.c (infile): Split into...
14399 (grammar_file, current_file): these.
14400 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14401 * src/reduce.c (reduce_print): Likewise.
14402 * src/getargs.c (getargs): Likewise.
14403 * src/complain.h, src/complain.c: Likewise.
14404 * src/main.c (main): Call struniqs_new early enough to use it for
14405 file names.
14406 Don't free the input file name.
14407
3e6656f9
AD
144082002-11-12 Akim Demaille <akim@epita.fr>
14409
14410 * src/symtab.c (symbol_free): Remove dead deactivated code:
14411 type_name are properly removed.
14412 Don't use XFREE to free items that cannot be NULL.
14413 * src/struniq.h, src/struniq.c: New.
14414 * src/main.c (main): Initialize/free struniqs.
14415 * src/parse-gram.y (%union): Add astruniq member.
14416 (yyprint): Adjust.
14417 * src/scan-gram.l (<{tag}>): Return a struniq.
14418 Free the obstack bit that used to store it.
14419 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14420
7672019c
PE
144212002-11-11 Paul Eggert <eggert@twinsun.com>
14422
14423 Revamp to fix many (but not all) of the C- and M4-related quoting
14424 problems. Among other things, this fixes the Bison bug reported
14425 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 14426 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
14427
14428 Use new @ escapes consistently. Represent brackets with @{ and @}
14429 rather than @<:@ and @:>@, since this works a bit better with dumb
14430 editors like vi. Represent @ with @@, since @ is now consistently
14431 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14432 __ofile__, to avoid unexpected expansions. Similarly, use @output
14433 rather than #output.
14434
14435 * data/c.m4 (b4_copyright): Omit file name from comment, since
14436 the file name could contain "*/".
14437 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14438 be quoted. All uses changed.
14439
14440 * data/glr.c: Use new @ escapes consistently.
14441 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14442 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14443 Remove, since they couldn't handle arbitrary characters in file
14444 names.
14445 * data/lalr1.cc: Likewise.
14446 * data/yacc.c: Likewise.
14447
14448 * src/files.c (output_infix): Remove; all uses removed.
14449 * src/files.h: Likewise.
14450
14451 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14452 mishandled funny characters in file names, and anyway it isn't
14453 needed any more.
14454 * data/yacc.c: Likewise.
14455 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14456
14457 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14458 * data/yacc.c: Likewise.
14459
14460 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14461 strings now.
14462 (muscle_init): Quote filename as a C string.
14463 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14464 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14465 * src/output.c (escaped_file_name_output): New function.
14466 (prepare_symbols): Quote tokens for M4.
14467 (prepare): Don't insert output_infix, output_prefix,
14468 output_parser_name, output_header_name; this is now down by scan-skel.
14469 Insert skeleton as a C string.
14470
14471 * src/output.c (user_actions_output, symbol_destructors_output,
14472 symbol_printers_output): Quote filenames for C and M4.
14473 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14474
14475 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14476 escapes other than \\ and \'; this simplifies the code.
14477 (<SC_STRING>): Likewise, for \\ and \".
14478 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14479 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14480 Use new escapes @{ and @} for [ and ].
14481
14482 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14483 them with auto vars.
14484 Switch to new escape scheme, where @ is the escape character uniformly.
14485 Abort if a stray escape character is found. Avoid unbounded input
14486 buffer when parsing non-escaped text.
14487
14488 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14489 __oline__, #output, $@, and @{ do not have unintended meanings.
14490
acea4f3b
PE
144912002-11-09 Paul Eggert <eggert@twinsun.com>
14492
14493 Fix the test failure due to GCC warnings described in
161a71f3 14494 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
14495 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14496 evaluate to 0 if it's impossible for NINF to be in the respective
14497 table.
14498 (yygetLRActions, yyrecoverParseError): Use them.
14499
14500 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14501 counted in the token inserted at end of file. Now takes
14502 location_t *, not location_t, so that the location can be
14503 adjusted. All uses changed.
14504
14505 * tests/regression.at (Invalid inputs): Adjust wording in
14506 diagnostic to match the new behavior.
14507
14508 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14509 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14510 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14511 abort ();'. This reduces the runtime of the "Many lookaheads"
14512 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14513 GCC 3.2.
14514
20ef1ad5
PE
145152002-11-07 Paul Eggert <eggert@twinsun.com>
14516
14517 * src/parse-gram.y (CHARACTER): Remove unused token.
14518 All uses removed.
14519
14520 * src/scan-gram.l: Remove stack option. We no longer use the
14521 stack, since the stack was never deeper than 1; instead, use the
14522 new auto var c_context to record the stacked value.
14523
14524 Remove nounput option. At an unexpected end of file, we now unput
14525 the minimal input necessary to end cleanly; this simplifies the
14526 code.
14527
14528 Avoid unbounded token sizes where this is easy.
14529
14530 (unexpected_end_of_file): New function.
14531 Use it to systematize the error message on unexpected EOF.
14532 (last-string): Now auto, not static.
14533 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14534 (scanner_last_string_free): Remove; not used.
14535 (percent_percent_count): Move decl to just before use.
14536 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14537 not the (never otherwised-used) CHARACTER.
14538
93724f13
AD
145392002-11-07 Akim Demaille <akim@epita.fr>
14540
14541 Let yyerror always receive the msg as last argument, so that
14542 yyerror can be variadic.
14543
14544 * data/yacc.c (b4_yyerror_args): New.
14545 Use it when calling yyerror.
14546 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14547 Use it when calling yyerror.
14548 * doc/bison.texinfo (Error Reporting): Adjust.
14549 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14550 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14551
6e40b4eb
AD
145522002-11-06 Akim Demaille <akim@epita.fr>
14553
14554 #line should have quoted strings.
14555 Ideally, this should be done by m4_quotearg.
14556
14557 * src/scan-skel.l: Include quotearg.h.
14558 Quote __ofile__.
14559 * src/output.c (symbol_printers_output)
14560 (symbol_destructors_output): Quote the file name.
14561
2dfbfc12
AD
145622002-11-06 Akim Demaille <akim@epita.fr>
14563
14564 * tests/regression.at (Invalid inputs): Adjust to the recent
14565 messages.
14566
437c2d80
AD
145672002-11-06 Akim Demaille <akim@epita.fr>
14568
14569 Restore --no-lines.
14570 Reported by Jim Kent.
14571
14572 * data/c.m4 (b4_syncline): New.
14573 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14574 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14575 * src/output.c (user_actions_output): Likewise.
14576 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 14577 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 14578
900c5db5
AD
145792002-11-06 Akim Demaille <akim@epita.fr>
14580
14581 * src/main.c (main): Free `infile'.
14582 * src/scan-gram.l (handle_syncline): New.
14583 Recognize `#line'.
14584 * src/output.c (user_actions_output, symbol_destructors_output)
14585 (symbol_printers_output): Use the location's file name, not
14586 infile.
14587 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14588
e183b123 145892002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 14590
e183b123 14591 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 14592 either has GLR conflict entries.
e183b123 14593
193eb6b7
PE
145942002-11-05 Paul Eggert <eggert@twinsun.com>
14595
e183b123
PE
14596 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14597 "integer out of range" rather than "invalid value".
14598 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14599 accordingly.
14600
193eb6b7
PE
14601 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14602 Also, remove one static variable in the scanner.
14603
14604 * src/scan-gram.l (braces_level): Now auto, not static.
14605 Initialize to zero if the compiler is being picky.
14606 (INITIAL): Clear braces_level instead of incrementing it.
14607 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14608 as POSIX 1003.1-2001 requires.
14609 * src/system.h (IF_LINT): New macro, taken from coreutils.
14610 * configure.ac: Define "lint" if --enable-gcc-warnings.
14611
29c01725
AD
146122002-11-05 Akim Demaille <akim@epita.fr>
14613
14614 * src/scan-gram.l: When it starts with `%', complain about the
14615 whole directive, not just that `invalid character: %'.
14616
8aeac3ca
AD
146172002-11-04 Akim Demaille <akim@epita.fr>
14618
14619 * Makefile.maint: Update from Autoconf.
14620 (update, cvs-update, po-update, do-po-update): New.
14621
793a58bb
AD
146222002-11-04 Akim Demaille <akim@epita.fr>
14623
14624 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14625 and yyerror.
14626 Have yyerror `use' its arguments.
14627 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14628 returns true when location & yacc & pure & parse-param.
14629 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14630
c4d720cd
AD
146312002-11-04 Akim Demaille <akim@epita.fr>
14632
14633 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14634 clashes.
14635 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14636 font-lock-mode.
14637 Use complain_at.
14638 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14639 slot 0.
14640
613a0dc5
PE
146412002-11-03 Paul Eggert <eggert@twinsun.com>
14642
14643 * src/reader.c (get_merge_function, grammar_current_rule_check):
14644 Use consistent diagnostics for reporting type name clashes.
14645 Quote the types with <>, for consistency with Yacc.
14646 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14647
2a8d363a
AD
146482002-11-03 Akim Demaille <akim@epita.fr>
14649
14650 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14651 New.
14652 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14653 (b4_parse_param): Remove.
14654 Use b4_identification.
14655 Propagate b4_pure_args where needed to pass them to yyerror.
14656 * data/glr.m4 (b4_parse_param): Remove.
14657 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14658 (b4_lpure_formals): New.
14659 Use b4_identification.
14660 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14661 b4_user_formals and b4_user_args.
14662 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14663 (yyreportAmbiguity): When using a pure parser, also need
14664 the location, and the parse-params.
14665 Adjust callers.
14666 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14667 When using a pure parser, also need the parse-params.
14668 Adjust callers.
14669 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14670 (%pure-parser + %parse-param) LALR and GLR parsers.
14671 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14672 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14673 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14674 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14675 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14676 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14677 * doc/bison.texinfo: Untabify the whole file.
14678 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14679 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14680 (Error Reporting): Adjust to these new directives.
14681 Document %error-verbose, deprecate YYERROR_VERBOSE.
14682
9e32add8
AD
146832002-11-03 Akim Demaille <akim@epita.fr>
14684
14685 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14686 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14687 command line options.
14688 * tests/cxx-type.at: Formatting changes.
14689
b02d90a5
PE
146902002-11-03 Paul Eggert <eggert@twinsun.com>
14691
14692 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14693 to count columns correctly, and to check for invalid inputs.
9e32add8 14694
b02d90a5
PE
14695 Use mbsnwidth to count columns correctly. Account for tabs, too.
14696 Include mbswidth.h.
14697 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14698 (extend_location): New function.
14699 (YY_LINES): Remove.
14700
14701 Handle CRLF in C code rather than in Lex code.
14702 (YY_INPUT): New macro.
14703 (no_cr_read): New function.
14704
14705 Scan UCNs, even though we don't fully handle them yet.
14706 (convert_ucn_to_byte): New function.
14707
14708 Handle backslash-newline correctly in C code.
14709 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14710 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14711 all uses changed.
14712 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14713 Use {splice} wherever C allows backslash-newline.
14714 YY_STEP after space, newline, vertical-tab.
14715 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 14716
b02d90a5
PE
14717 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14718
14719 ({int}, handle_action_dollar, handle_action_at): Check for integer
14720 overflow.
9e32add8 14721
b02d90a5
PE
14722 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14723
14724 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14725 as well as \000. Check for UCHAR_MAX, not 255.
14726 Allow \x with an arbitrary positive number of digits, as in C.
14727 Check for overflow here.
14728 Allow \? and UCNs, for compatibility with C.
14729
14730 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14731 with quote slot used by complain_at.
14732
14733 * tests/input.at: Add tests for backslash-newline, m4 quotes
14734 in symbols, long literals, and funny escapes in strings.
14735
14736 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14737 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14738 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14739 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14740 * m4/mbswidth.m4: New file, from GNU coreutils.
14741
14742 * doc/bison.texinfo (Grammar Outline): Document // comments.
14743 (Symbols): Document that trigraphs have no special meaning in Bison,
14744 nor is backslash-newline allowed.
14745 (Actions): Document that trigraphs have no special meaning.
14746
14747 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14748 no longer used.
14749
147502002-11-02 Paul Eggert <eggert@twinsun.com>
14751
14752 * src/reader.c: Don't include quote.h; not needed.
14753 (get_merge_function): Reword warning to be consistent with
14754 type clash diagnostic in grammar_current_rule_check.
14755
14756 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14757 bug in trigraph handling.
14758
14759 * src/output.c (prepare_symbols): When printing token names,
14760 escape "[" as "@<:@" and likewise for "]".
14761
14762 * src/system.h (errno): Remove declaration, as we are now
14763 assuming C89 or better, and C89 guarantees errno.
14764
762b212b
PE
147652002-10-30 Paul Eggert <eggert@twinsun.com>
14766
14767 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14768 Check for close failures.
14769 * src/files.h (xfclose): Return void, not int, since it always
14770 returned zero.
14771 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14772 indicates one.
14773 * src/output.c (output_skeleton): Use xfclose rather than fclose
14774 and ferror. xfclose now checks ferror.
14775
14776 * data/glr.c (YYLEFTMOST_STATE): Remove.
14777 (yyreportTree): Use a stack-based leftmost state. This avoids
14778 our continuing battles with bogus warnings about initializers.
14779
56100c60
AD
147802002-10-30 Akim Demaille <akim@epita.fr>
14781
14782 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14783 #if.
14784
51b4a04c
PH
147852002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14786
14787 * tests/glr-regr1.at: New test for reported regressions.
14788 * tests/testsuite.at: Add glr-regr1.at test.
14789 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 14790
bf1ebda2
PE
147912002-10-24 Paul Eggert <eggert@twinsun.com>
14792
5c16c6b1
PE
14793 Version 1.75a.
14794
bf1ebda2
PE
14795 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14796 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14797 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14798 Don't assume strdup exists; POSIX says its an XSI extension.
14799 Check for buffer overflow on input.
14800
b526ee61
AD
148012002-10-24 Akim Demaille <akim@epita.fr>
14802
14803 * src/output.c (output_skeleton): Don't disable M4sugar comments
14804 too soon: it results in comments being expanded.
14805 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14806 first output.
14807
f1886bb2
AD
148082002-10-24 Akim Demaille <akim@epita.fr>
14809
14810 * data/yacc.c (m4_int_type): New.
14811 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14812 char' as only yacc.c wants K&R portability.
14813 * data/glr.c (yysigned_char): Remove.
14814 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14815 Reported by Quoc Peyrot.
14816
c5576256
PE
148172002-10-23 Paul Eggert <eggert@twinsun.com>
14818
14819 * src/main.c (main): With --trace=time, report times even if a
14820 non-fatal error occurs. Formerly, the times were reported in some
14821 such cases but not in others.
14822 * src/reader.c (reader): Just return if a complaint has been issued,
14823 instead of exiting, so that 'main' can report times.
14824
27b0ffea
AD
148252002-10-22 Akim Demaille <akim@epita.fr>
14826
14827 * src/system.h: Include sys/types.
14828 Reported by Bert Deknuydt.
14829
223a7883
PE
148302002-10-23 Paul Eggert <eggert@twinsun.com>
14831
14832 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14833 Suggested by Art Haas.
14834
148352002-10-22 Paul Eggert <eggert@twinsun.com>
14836
14837 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14838 decl; not needed any more.
14839 * src/main.c (main): Use return to exit, undoing yesterday's change.
14840 The last OS that we could find where this wouldn't work is
14841 SunOS 3.5, and that's too old to worry about now.
14842
14843 * data/glr.c (struct yyltype): Define members even when not
14844 doing locations. This is more consistent with yacc.c, and it
14845 works around the following bug reports:
161a71f3
PE
14846 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14847 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 14848
223a7883
PE
14849 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14850 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14851 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14852
8b76775a
AD
148532002-10-22 Akim Demaille <akim@epita.fr>
14854
14855 * data/README: New.
14856
6db10d14
PE
148572002-10-21 Paul Eggert <eggert@twinsun.com>
14858
14859 Be consistent about 'bool'; the old code used an enum in one
14860 module and an int in another, and this violates the C standard.
14861 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14862 * configure.ac (AC_HEADER_STDBOOL): Add.
14863 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14864 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14865 * src/symtab.c (hash_compare_symbol_t): Likewise.
14866 * src/system.h (bool, false, true): Use a definition consistent
14867 with ../lib/hash.c. All uses changed.
14868
14869 * src/complain.c (warning_issued): Renamed from warn_message_count,
14870 so that we needn't worry about integer overflow (!).
14871 Now of type bool. All uses changed.
14872 (complaint_issued): Renamed from complain_message_count; likewise.
14873
14874 * src/main.c (main): Use exit to exit with failure.
27b0ffea 14875
6db10d14
PE
14876 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14877 rather than 1 and 0.
14878 * src/main.c (main): Likewise.
14879 * src/getargs.c (getargs): Likewise.
14880 * src/reader.c (reader): Likewise.
14881
14882 * src/getarg.c (getargs): Remove duplicate code for
14883 "Try `bison --help'".
14884
14885 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14886 What was that "2" for?
14887
14888 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14889 * src/getargs.c (usage): Likewise.
14890
14891 * src/getargs.c (getargs): When there are too few operands, report
14892 the last one. When there are too many, report the first extra
14893 one. This is how diffutils does it.
14894
92a060fd
PE
148952002-10-20 Paul Eggert <eggert@twinsun.com>
14896
14897 Remove K&R vestiges.
14898 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14899 * src/complain.c (VA_START): Remove. Assume prototypes.
14900 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14901 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14902 fatal): Assume prototypes.
14903 * src/complain.h: Assume prototypes.
14904 * src/system.h (PARAMS): Remove.
14905 Include <limits.h> unconditionally, since it's guaranteeed even
14906 for a freestanding C89 compiler.
14907 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14908 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 14909
e7cb57c0
AD
149102002-10-20 Akim Demaille <akim@epita.fr>
14911
14912 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14913 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14914 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14915 (yyresolveStates, yyresolveAction, yyresolveStack)
14916 (yyprocessOneStack): Use them.
14917 (yy_reduce_print): New.
14918 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14919
0245f82d
AD
149202002-10-20 Akim Demaille <akim@epita.fr>
14921
14922 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14923 arguments and output `void'.
14924 (b4_c_function): Rename as...
14925 (b4_c_function_def): this.
14926 (b4_c_function_decl, b4_c_ansi_function_def)
14927 (b4_c_ansi_function_decl): New.
14928 Change the interpretation of the arguments: before `int, foo', now
14929 `int foo, foo'.
14930 * data/yacc.c (yyparse): Prototype and define thanks to these.
14931 Adjust b4_c_function_def uses.
14932 * data/glr.c (yyparse): Likewise, but ANSI only.
14933
39912f52
AD
149342002-10-20 Akim Demaille <akim@epita.fr>
14935
14936 * src/output.c (prepare): Move the definition of `tokens_number',
14937 `nterms_number', `undef_token_number', `user_token_number_max'
14938 to...
14939 (prepare_tokens): Here.
14940 (prepare_tokens): Rename as...
14941 (prepare_symbols): this.
14942 (prepare): Move the definition of `rules_number' to...
14943 (prepare_rules): here.
14944 (prepare): Move the definition of `last', `final_state_number',
14945 `states_number' to...
14946 (prepare_states): here.
14947 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14948
20c1e2ad
AD
149492002-10-20 Akim Demaille <akim@epita.fr>
14950
14951 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14952
21964f43
AD
149532002-10-20 Akim Demaille <akim@epita.fr>
14954
14955 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14956 * data/c.m4: here.
14957
66d30cd4
AD
149582002-10-20 Akim Demaille <akim@epita.fr>
14959
14960 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14961 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14962 `pair'.
14963 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14964 `name' to...
14965 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14966 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14967 These.
14968
95f2c9fe
PE
149692002-10-19 Paul Eggert <eggert@twinsun.com>
14970
14971 Do not create a temporary file, as that involves security and
14972 cleanup headaches. Instead, use a pair of pipes.
14973 Derived from a suggestion by Florian Krohm.
14974 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14975 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14976 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14977 (BISON_PREREQ_SUBPIPE): Add.
14978 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14979 Add subpipe.h, subpipe.c.
14980 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14981 * po/POTFILES.in: Add lib/subpipe.c.
14982 * src/output.c: Include "subpipe.h".
14983 (m4_invoke): Remove decl.
14984 (scan_skel): New decl.
14985 (output_skeleton): Use pipe rather than temporary file for m4 input.
14986 Check that m4sugar.m4 is readable, to avoid deadlock.
14987 Check for pipe I/O error.
14988 * src/scan-skel.l (readpipe): Remove decl.
14989 (scan_skel): New function, to be used in place of m4_invoke.
14990 Read from stream rather than file.
66d30cd4 14991
95f2c9fe
PE
14992 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14993 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14994 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14995 this generates a more-accurate value anyway.
14996
14997 * lib/timevar.c (timervar_accumulate): Rename locals to
14998 avoid confusion with similarly-named more-global.
14999 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15000
15001 * src/output.c (prepare): Use xstrdup to convert char const *
15002 to char *, to avoid GCC warning.
15003
c19988b7
AD
150042002-10-19 Akim Demaille <akim@epita.fr>
15005
15006 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15007 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15008 Use them to have `calc.y' ready for %pure-parser.
15009 * data/yacc.c (YYLEX): Pass a yylex return type to
15010 b4_c_function_call.
15011
ae7453f2
AD
150122002-10-19 Akim Demaille <akim@epita.fr>
15013
15014 Prototype support of %lex-param and %parse-param.
15015
15016 * src/parse-gram.y: Add the definition of the %lex-param and
15017 %parse-param tokens, plus their rules.
15018 Drop the `_' version of %glr-parser.
15019 Add the "," token.
15020 * src/scan-gram.l (INITIAL): Scan them.
15021 * src/muscle_tab.c: Comment changes.
15022 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15023 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15024 (muscle_entry_s): The `value' member is no longer const.
15025 Adjust all dependencies.
15026 * src/muscle_tab.c (muscle_init): Adjust: use
15027 MUSCLE_INSERT_STRING.
15028 Initialize the obstack earlier.
15029 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15030 (muscle_pair_list_grow): New.
15031 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15032 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15033 * tests/calc.at: Use %locations, not --locations.
15034 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15035
0e575721
AD
150362002-10-19 Akim Demaille <akim@epita.fr>
15037
15038 * src/getargs.c (usage): Take status as argument and exit
15039 accordingly.
15040 Report the traditional `Try ... --help' message when status != 0.
15041 (usage, version): Don't take a FILE * as arg, it is pointless.
15042 (getargs): When there is an incorrect number of arguments, make it
15043 an error, and report it GNUlically thanks to `usage ()'.
15044
724ce7f5
PE
150452002-10-18 Paul Eggert <eggert@twinsun.com>
15046
3a781eb2
PE
15047 * data/glr.c (yyreportParseError): Don't assume that sprintf
15048 yields the length of the printed string, as this is not true
15049 on SunOS 4.1.4. Reported by Peter Klein.
15050
724ce7f5
PE
15051 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15052 * tests/conflicts.at (%nonassoc and eof): Likewise.
15053 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15054
473d0a75
AD
150552002-10-17 Akim Demaille <akim@epita.fr>
15056
15057 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15058 * src/getargs.c (trace_types, trace_args): Adjust.
15059 * src/reader.c (grammar_current_rule_prec_set)
15060 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15061 Standardize error messages.
15062 And s/@prec/%prec/!
15063 (reader): Use trace_flag to enable scanner/parser debugging,
15064 instead of an adhoc scheme.
15065 * src/scan-gram.l: Remove trailing debugging code.
15066
e76d2469
PE
150672002-10-16 Paul Eggert <eggert@twinsun.com>
15068
93e2236a
PE
15069 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15070 MUSCLE_TAB_H.
15071
e76d2469
PE
15072 * NEWS: Officially drop support for building Bison with K&R C,
15073 since it didn't work anyway and it's not worth worrying about.
15074 * Makefile.maint (wget_files): Remove ansi2knr.c.
15075 (ansi2knr.c-url_prefix): Remove.
15076 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15077 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15078 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15079
5bd1c419
PE
150802002-10-15 Paul Eggert <eggert@twinsun.com>
15081
15082 Stop using the "enum_" trick for K&R-style function definitions;
15083 it confused me, and I was the author! Instead, assume that people
15084 who want to use K&R C compilers (when using these modules in GCC,
15085 perhaps?) will run ansi2knr.
15086
15087 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15088 All uses of "enum_" changed to "enum ".
15089 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15090 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 15091
5bd1c419
PE
15092 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15093 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15094 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15095 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15096 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15097 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15098 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15099 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15100 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15101 Use function prototypes; this removes the need for declaring
15102 static functions simply to provide their prototypes.
15103 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15104 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15105 bitset_count_, bitset_create, bitset_dump, bitset_first,
15106 bitset_free, bitset_init, bitset_last, bitset_next,
15107 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15108 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15109 bitset_print, bitset_release_memory, bitset_toggle_,
15110 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15111 debug_bitset): Likewise.
15112 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15113 * lib/bitset_stats.c (bitset_log_histogram_print,
15114 bitset_percent_histogram_print, bitset_stats_and,
15115 bitset_stats_and_cmp, bitset_stats_and_or,
15116 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15117 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15118 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15119 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15120 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15121 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15122 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15123 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15124 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15125 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15126 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15127 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15128 bitset_stats_zero): Likewise.
15129 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15130 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15131 bitsetv_dump, debug_bitsetv): Likewise.
15132 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15133 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15134 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15135 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15136 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15137 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15138 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15139 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15140 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15141 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15142 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15143 Likewise.
15144 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15145 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15146 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15147 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15148 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15149 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15150 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15151 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15152 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15153 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15154 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 15155
ae26e1f0
AD
151562002-10-14 Akim Demaille <akim@epita.fr>
15157
15158 Version 1.75.
15159
d43baf71
AD
151602002-10-14 Akim Demaille <akim@epita.fr>
15161
15162 * tests/Makefile.am (maintainer-check-posix): New.
15163
7ebc83e3
AD
151642002-10-14 Akim Demaille <akim@epita.fr>
15165
15166 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15167 member.
15168
05846dae
AD
151692002-10-14 Akim Demaille <akim@epita.fr>
15170
15171 * src/tables.c (table_ninf_remap): base -> tab.
15172 Reported by Matt Rosing.
15173
1318e37d
PE
151742002-10-14 Paul Eggert <eggert@twinsun.com>
15175
447fbb17
PE
15176 * tests/action.at, tests/calc.at, tests/conflicts.at,
15177 tests/cxx-type.at, tests/headers.at, tests/input.at,
15178 tests/regression.at, tests/synclines.at, tests/torture.at:
15179 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15180 so that the tests still work even if POSIXLY_CORRECT is set.
15181 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 15182
1318e37d
PE
15183 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15184 for portability to K&R hosts. Fix typo: signed char is guaranteed
15185 only to 127, not to 128.
15186 * data/glr.c (yysigned_char): New type.
15187 * data/yacc.c (yysigned_char): Likewise.
15188 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15189
cc0f0794
PE
151902002-10-13 Paul Eggert <eggert@twinsun.com>
15191
5038f418
PE
15192 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15193 true due to limited range of data type" warning from GCC.
15194
cc0f0794
PE
15195 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15196 by wrapping enum yytokentype's definition inside #ifndef
15197 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15198
6fed0802
AD
151992002-10-13 Akim Demaille <akim@epita.fr>
15200
15201 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15202 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15203
32f0598d
AD
152042002-10-13 Akim Demaille <akim@epita.fr>
15205
15206 * Makefile.maint: Update from Autoconf 2.54.
15207 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15208
7ea9a33f
AD
152092002-10-13 Akim Demaille <akim@epita.fr>
15210
15211 * src/print.c (print_state): Separate the list of solved conflicts
15212 from the other items.
15213 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15214
ea99527d
AD
152152002-10-13 Akim Demaille <akim@epita.fr>
15216
15217 Let nondeterministic skeletons be usable with deterministic
15218 tables.
15219
15220 With the patch, GAWK compiled by GCC without -O2 passes its test
15221 suite using a GLR parser driven by LALR tables. It fails with -O2
15222 because `struct stat' gives two different answers on my machine:
15223 88 (definition of an auto var) and later 96 (memset on this var).
15224 Hence the stack is badly corrumpted. The headers inclusion is to
15225 blame: if I move the awk.h inclusion before GLR's system header
15226 inclusion, the two struct stat have the same size.
15227
15228 * src/tables.c (pack_table): Always create conflict_table.
15229 (token_actions): Always create conflict_list.
15230 * data/glr.c (YYFLAG): Remove, unused.
15231
f377f69f
AD
152322002-10-13 Akim Demaille <akim@epita.fr>
15233
15234 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15235 (O0FLAGS): New.
15236 (VALGRIND, GXX): New.
15237 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15238 * tests/bison.in: Run $PREBISON a pre-command.
15239 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15240 (maintainer-check-g++): New.
15241 * Makefile.am (maintainer-check): New.
15242
2a1fe6ed
AD
152432002-10-13 Akim Demaille <akim@epita.fr>
15244
15245 * data/glr.c: Formatting changes.
15246 Tweak some trace messages to match yacc.c's.
15247
f50adbbd
AD
152482002-10-13 Akim Demaille <akim@epita.fr>
15249
15250 GLR parsers sometimes raise parse errors instead of performing the
15251 default reduction.
15252 Reported by Charles-Henry de Boysson.
15253
15254 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 15255 check the length of the traces when %glr.
f50adbbd
AD
15256 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15257 GLR's traces.
15258 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15259 Test GLR parsers.
15260 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15261 (yyltype): Remove the yy prefix from the member names.
15262 (yytable): Complete its comment.
15263 (yygetLRActions): Map error action number from YYTABLE from
15264 YYTABLE_NINF to 0.
15265 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15266 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15267 not satisfying as we could compare an YYACTION computed from
15268 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15269 only value for error actions.
15270 (yyreportParseError): In verbose parse error messages, don't issue
15271 `error' in the list of expected tokens.
15272 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15273 next action to perform to match glr.c's decoding.
15274 (yytable): Complete its comment.
15275
bcbad5b9
PE
152762002-10-13 Paul Eggert <eggert@twinsun.com>
15277
15278 Fix problem reported by Henrik Grubbstroem in
161a71f3 15279 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
15280 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15281 because the Bison parser reads the second action before reducing
15282 the first one.
15283 * src/scan-gram.l (rule_length): New static var.
15284 Use it to keep track of the rule length in the scanner, since
15285 we can't expect the parser to be in lock-step sync with the scanner.
15286 (handle_action_dollar, handle_action_at): Use this var.
15287 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 15288
14904b89
PE
152892002-10-12 Paul Eggert <eggert@twinsun.com>
15290
1fe611e5
PE
15291 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15292 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15293 Include <sys/time.h> when checking for clock_t and struct tms.
15294 Use same include order as source.
15295 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 15296 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 15297
1fe611e5
PE
15298 * lib/timevar.c: Update copyright date and clarify comments.
15299 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 15300
1fe611e5
PE
15301 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15302 GCC version as of today, then merge Bison's changes.
15303 Change "GCC" to "Bison" in copyright notice. timevar.def's
15304 author is Akim, so change that too.
15305
98194095
PE
15306 * src/reader.c (grammar_current_rule_check):
15307 Don't worry about the default action if $$ is untyped.
15308 Prevents bogus warnings reported by Jim Gifford in
161a71f3 15309 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 15310
14904b89
PE
15311 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15312 * data/glr.c, data/lalr1.cc, data/yacc.c:
15313 Output token definitions before the first part of user declarations.
15314 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 15315 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 15316
ff6dca18
PE
153172002-10-11 Paul Eggert <eggert@twinsun.com>
15318
15319 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15320 (yyparse): here. This undoes some of the 2002-07-25 change.
15321 Compatibility problem reported by Ralf S. Engelschall with
15322 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15323
eb714592
AD
153242002-10-11 Akim Demaille <akim@epita.fr>
15325
15326 * tests/regression.at Characters Escapes): New.
15327 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15328 characters.
15329 Reported by Jan Nieuwenhuizen.
15330
b7195100
AD
153312002-10-11 Akim Demaille <akim@epita.fr>
15332
15333 * po/id.po: New.
15334
f28a0f2d
PE
153352002-10-10 Paul Eggert <eggert@twinsun.com>
15336
15337 Portability fixes for bitsets; this also avoids several GCC
15338 warnings.
15339
15340 * lib/abitset.c: Include <stddef.h>, for offsetof.
15341 * lib/lbitset.c: Likewise.
15342
15343 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15344 properly for vectors of objects. Do not assume that adding a
15345 header size to a multiple of a word size yields a value that is
15346 properly aligned for the whole union.
15347 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15348
15349 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15350 unique names for structures.
15351 * lib/ebitset.c (ebitset_bytes): Likewise.
15352 * lib/lbitset.c (lbitset_bytes): Likewise.
15353
15354 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15355 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15356 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15357 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15358 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15359 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15360 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15361 to improve the type-checking that GCC can do.
15362 * lib/bitset.c (bitset_op4_cmp): Likewise.
15363 * lib/bitset_stats.c (bitset_stats_count,
15364 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15365 bitset_stats_copy, bitset_stats_disjoint_p,
15366 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15367 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15368 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15369 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15370 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15371 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15372 bitset_stats_or_and_cmp): Likewise.
15373 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15374 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15375 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15376 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15377
15378 * lib/abitset.h: Include bitset.h, not bbitset.h.
15379 * lib/ebitset.h: Likewise.
15380 * lib/lbitset.h: Likewise.
15381
15382 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15383 All instances of parameters of type enum bitset_opts are now of
15384 type enum_bitset_opts, to conform to the C Standard, and similarly
15385 for enum_bitset_type.
15386 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15387 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15388
15389 Do not use "struct bitset_struct" to mean different things in
15390 different modules. Not only is this confusing, it violates
15391 the C Standard, which requires that structure types in different
15392 modules must be compatible if one is to be passed to the other.
15393 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15394 All instances of "struct bitset_struct *" replaced with "bitset".
15395 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15396 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15397 struct lbitset_struct, struct bitset_stats_struct): New types.
15398 All uses of struct bitset_struct changed to union bitset_union,
15399 etc.
ba0fe3c7 15400 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
15401 struct bitset_struct): Remove.
15402 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15403 struct bitset_struct): Remove.
15404 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15405 bitset_struct): Remove.
15406 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15407 Likewise.
15408
15409 Do not call a function of type T using a call that assumes the
15410 function is of a different type U. Standard C requires that a
15411 function must be called with a type that is compatible with its
15412 definition.
15413 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15414 New decls.
15415 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15416 New functions.
15417 * lib/ebitset.c (PFV): Remove.
15418 * lib/lbitset.c (PFV): Likewise.
15419 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15420 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15421 decls.
15422 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15423 (ebitset_vtable): Use them.
15424 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15425 lbitset_xor): New functions.
15426 (lbitset_vtable): Use them.
15427
15428 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15429 Declare.
15430
15431 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15432 GCC warning.
15433 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15434 Use offsetof, for simplicity.
15435
6fbe4984
PE
154362002-10-06 Paul Eggert <eggert@twinsun.com>
15437
15438 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15439 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 15440 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
15441 which was inadvertently undone by the 2002-09-30 patch.
15442 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15443 the same width as int.
15444
420f93c8
PE
154452002-10-04 Paul Eggert <eggert@twinsun.com>
15446
15447 Version 1.50.
15448
15449 * configure.ac (AC_INIT), NEWS: Increment version number.
15450
15451 * doc/bison.texinfo: Minor spelling, grammar, and white space
15452 fixes.
15453 (Symbols): Mention that any negative value returned from yylex
15454 signifies end-of-input. Warn about negative chars. Mention
15455 the portable Standard C character set.
15456
15457 The GNU coding standard says CFLAGS and YFLAGS are reserved
15458 for the installer to set.
15459 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15460 * src/Makefile.am (AM_CFLAGS): Likewise.
15461 (AM_YFLAGS): Renamed from YFLAGS.
15462
15463 Fix some MAX and MIN problems.
15464 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15465 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15466 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15467 * src/reader.c (reader): Use it.
15468
15469 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15470 POSIX 1003.1-2001 has removed fgrep.
15471
154722002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15473
15474 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15475 interpreted as signed.
15476 * lib/ebitset.c (ebitset_list): Fix bug.
15477
ff68026d
PE
154782002-10-01 Paul Eggert <eggert@twinsun.com>
15479
15480 More fixes for 64-bit hosts and large bitsets.
15481
15482 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15483 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15484 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15485 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15486 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15487 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15488 bitset_count_): Likewise.
15489 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15490 bitset_first, bitset_last): Likewise.
15491 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15492 bitset_stats_list_reverse, bitset_stats_size,
15493 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15494 Likewise.
15495 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15496 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15497 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15498 bitsetv_reflexive_transitive_closure): Likewise.
15499 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15500 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15501 Likewise.
15502 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15503 Likewise.
420f93c8 15504
ff68026d
PE
15505 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15506 Use size_t, not unsigned int, to count bytes.
15507 * lib/abitset.h (abitset_bytes): Likewise.
15508 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15509 Likewise.
15510 * lib/bitset.h (bitset_bytes): Likewise.
15511 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15512 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15513 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15514 * lib/ebitset.c (ebitset_bytes): Likewise.
15515 * lib/ebitset.h (ebitset_bytes): Likewise.
15516 * lib/lbitset.c (lbitset_bytes): Likewise.
15517 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 15518
ff68026d
PE
15519 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15520 abitset_subset_p, abitset_disjoint_p, abitset_and,
15521 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15522 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15523 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15524 abitset_or_and, abitset_or_and_cmp):
15525 Use bitset_windex instead of unsigned int.
15526 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15527 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15528 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15529 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15530 Likewise.
15531 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 15532
ff68026d
PE
15533 * lib/bitset.c (bitset_print):
15534 Use proper printf formats for widths of integer types.
15535 * lib/bitset_stats.c (bitset_percent_histogram_print,
15536 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15537 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15538 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15539 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 15540
ff68026d
PE
15541 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15542 BITSET_SIZE_MAX): New macros.
15543 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15544 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15545 to BITSET_WINDEX_MAX.
15546
15547 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15548 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15549 since we now return the bitset_bindex type (not int).
15550
15551 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15552 when computing sizes.
15553 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15554
15555 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15556 and avoid cast to unsigned.
15557
6aa452a6
AD
155582002-09-30 Akim Demaille <akim@epita.fr>
15559
15560 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15561 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15562 Updates from Michael Hayes.
15563
927f7817
AD
155642002-09-30 Art Haas <ahaas@neosoft.com>
15565
15566 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15567 invocations.
15568 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15569 defined.
15570
9738f41e
AD
155712002-09-27 Akim Demaille <akim@epita.fr>
15572
15573 Version 1.49c.
15574
a5c75d7f
AD
155752002-09-27 Akim Demaille <akim@epita.fr>
15576
15577 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15578 (Because of AC_LIBSOURCE).
15579
8280e179
AD
155802002-09-27 Akim Demaille <akim@epita.fr>
15581
15582 Playing with Autoscan.
15583
15584 * configure.ac: Remove the old LIBOBJ tweaks.
15585 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15586 * lib/strrchr.c: New.
15587 * lib/strtol.c: New, from the Coreutils 4.5.1.
15588
ae64af35
AD
155892002-09-27 Akim Demaille <akim@epita.fr>
15590
15591 Playing with Autoscan.
15592
15593 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15594 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15595 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15596 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15597 Coreutils 4.5.1.
15598
d1a1114f
AD
155992002-09-24 Akim Demaille <akim@epita.fr>
15600
15601 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15602 (Frequently Asked Questions, Parser Stack Overflow): New.
15603
b906441c
AD
156042002-09-13 Akim Demaille <akim@epita.fr>
15605
15606 Playing with autoscan.
15607
15608 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15609 * src/files.c (skeleton_find): Remove, unused.
15610 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15611 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15612
bd701811
AD
156132002-09-13 Akim Demaille <akim@epita.fr>
15614
15615 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15616 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15617
e0a13e7b
AD
156182002-09-13 Akim Demaille <akim@epita.fr>
15619
15620 * configure.ac: Require 2.54.
15621 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15622 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15623 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15624 Remove, provided by Autoconf macros.
15625
c97011bf
AD
156262002-09-12 Akim Demaille <akim@epita.fr>
15627
15628 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15629
d862b1be
AD
156302002-09-12 Akim Demaille <akim@epita.fr>
15631
15632 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15633 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15634 Reported by Martin Mokrejs.
15635
3d38c03a
AD
156362002-09-10 Akim Demaille <akim@epita.fr>
15637
15638 * src/parse-gram.y: Associate a human readable string to each
15639 token type.
15640 * tests/regression.at (Invalid inputs): Adjust.
15641
b6347355
AD
156422002-09-10 Gary V. Vaughan <gary@gnu.org>
15643
15644 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15645 with an Autoconf-2.5x style configure.ac.
15646
09ba4ab2
PE
156472002-09-06 Paul Eggert <eggert@twinsun.com>
15648
15649 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15650 exception applies only to yacc.c. This is a modification of a
15651 patch originally suggested by Akim Demaille.
15652
21846f69
AD
156532002-09-06 Akim Demaille <akim@epita.fr>
15654
09ba4ab2
PE
15655 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15656 here to...
15657 * data/yacc.c: here.
15658
21846f69
AD
15659 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15660 LocationType.
15661 (b4_ltype): Default to yy::Location from location.hh.
15662
c0ad8bf3
AD
156632002-09-04 Jim Meyering <jim@meyering.net>
15664
15665 * data/yacc.c: Guard the declaration of yytoknum also with
15666 `#ifdef YYPRINT', so it is declared only when used.
15667
3a93251e
AD
156682002-09-04 Akim Demaille <akim@epita.fr>
15669
15670 * configure.in: Rename as...
15671 * configure.ac: this.
15672 Bump to 1.49c.
15673
427c0dda
AD
156742002-09-04 Akim Demaille <akim@epita.fr>
15675
15676 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15677 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15678 translate maintainer only messages.
15679
6a254321
PE
156802002-08-12 Paul Eggert <eggert@twinsun.com>
15681
645e30d1
PE
15682 Version 1.49b.
15683
6a254321
PE
15684 * Makefile.am (SUBDIRS): Remove intl.
15685 (DISTCLEANFILES): Remove.
15686 * NEWS: Mention that GNU M4 is now required. Clarify what is
15687 meant by "larger grammars". Mention the pt_BR translation.
15688 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15689 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15690 Bump version from 0.11.2 to 0.11.5.
15691 (BISON_PREREQ_STAGE): Remove.
15692 (AM_GNU_GETTEXT): Use external gettext.
15693 (AC_OUTPUT): Remove intl/Makefile.
15694
15695 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15696
15697 * data/glr.c: Include string.h, for strlen.
15698 (yyreportParseError): Use size_t for yysize.
15699 (yy_yypstack): No longer nested inside yypstates, as nested
15700 functions are not portable. Do not assume size_t is the
15701 same width as int.
15702 (yypstates): Do not assume that ptrdiff_t is the same width
15703 as int, and similarly for yyposn and YYINDEX.
15704
15705 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15706
15707 * lib/Makefile.am (INCLUDES): Do not include from the intl
15708 directory, which has been removed.
15709 * src/Makefile.am (INCLUDES): Likewise.
15710
15711 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15712 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15713 New vars.
15714
15715 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15716 * tests/Makefile.am (EXTRA_DIST): Likewise.
15717
15718 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15719 Do not assume that bitset_windex is the same width as unsigned.
15720
15721 * lib/abitset.c (abitset_unused_clear): Do not assume that
15722 bitset_word is the same width as int.
15723 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15724 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15725 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15726 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15727 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15728
15729 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15730 portability to one's complement hosts!).
15731 * lib/ebitset.c (ebitset_op1): Likewise.
15732 * lib/lbitset.c (lbitset_op1): Likewise.
15733
15734 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15735 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15736 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15737 Sync with fileutils.
15738 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15739 lib/gettext.h: Sync with diffutils.
15740
15741 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15742 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15743
15744 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15745 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15746 check for void *.
15747
15748 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15749 size_t; the old version tried to do this but casted improperly.
15750 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15751 (bitset_test): Now returns int, not unsigned long.
15752
15753 * lib/bitset_stats.c: Include "gettext.h".
15754 (_): New macro.
15755 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15756 name locals "index", as it generates unnecessary warnings on some
15757 hosts that have an "index" function.
15758
15759 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15760 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15761 they need translation.
15762 * src/LR0.c (state_list_append, new_itemsets, get_state,
15763 append_states, generate_states): Likewise.
15764 * src/assoc.c (assoc_to_string): Likewise.
15765 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15766 * src/gram.c (grammar_dump): Likewise.
15767 * src/injections.c (injections_compute): Likewise.
15768 * src/lalr.c (lookaheads_print): Likewise.
15769 * src/relation.c (relation_transpose): Likewise.
15770 * src/scan-gram.l: Likewise.
15771 * src/tables.c (table_grow, pack_vector): Likewise.
15772
15773 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15774 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15775 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15776 * m4/mbstate_t.m4: Sync with fileutils.
15777 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15778
15779 * po/LINGUAS: Add pt_BR.
15780 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15781 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15782 lib/timevar.c.
15783 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15784 manual recommends.
15785 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15786
15787 * src/complain.c (strerror_r): Remove decl; not needed.
15788 (strerror): Use same pattern as ../lib/error.c.
15789
15790 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15791
15792 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15793
15794 * src/main.c (main): Cast result of bindtextdomain and textdomain
15795 to void, to avoid a GCC warning when --disable-nls is in effect.
15796
15797 * src/scan-gram.l: Use strings rather than escapes when possible,
15798 to minimize the number of warnings from xgettext.
15799 (handle_action_dollar, handle_action_at): Don't use isdigit,
15800 as it mishandles negative chars and it may not work as expected
15801 outside the C locale.
15802
15803 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15804 this is a GCC extension and is not portable to other compilers.
15805
15806 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15807 Do not include <ctype.h>; no longer needed.
15808 Do not include <malloc.h>; no longer needed (and generates
15809 warnings on OpenBSD 3.0).
15810
15811 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15812 it's not portable.
15813
15814 * tests/regression.at: Do not use 'cc -c input.c -o input';
15815 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15816
15817 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15818 exit status as failure, not just exit status 1. Sun C exits
15819 with status 2 sometimes.
15820
15821 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15822 Use it for the two large tests.
15823
c8f002c7
AD
158242002-08-02 Akim Demaille <akim@epita.fr>
15825
15826 * src/conflicts.c (conflicts_output): Don't output rules never
15827 reduced here, since anyway that computation doesn't work.
15828 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15829 (rule_useless_p, rule_never_reduced_p): New.
15830 (grammar_rules_partial_print): Use a filter instead of a range.
15831 Display the title only if needed.
15832 (grammar_rules_print): Adjust.
15833 (grammar_rules_never_reduced_report): New.
15834 * src/tables.c (action_row): Move the computation of rules never
15835 reduced to...
15836 (token_actions): here.
15837 * src/main.c (main): Make the parser before making the report, so
15838 that rules never reduced are computed.
15839 Call grammar_rules_never_reduced_report.
15840 * src/print.c (print_results): Report rules never reduced.
15841 * tests/conflicts.at, tests/reduce.at: Adjust.
15842
cd08e51e
AD
158432002-08-01 Akim Demaille <akim@epita.fr>
15844
15845 Instead of attaching lookaheads and duplicating the rules being
15846 reduced by a state, attach the lookaheads to the reductions.
15847
15848 * src/state.h (state_t): Remove the `lookaheads',
15849 `lookaheads_rule' member.
15850 (reductions_t): Add a `lookaheads' member.
15851 Use a regular array for the `rules'.
15852 * src/state.c (reductions_new): Initialize the lookaheads member
15853 to 0.
15854 (state_rule_lookaheads_print): Adjust.
15855 * src/state.h, src/state.c (state_reductions_find): New.
15856 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15857 (count_rr_conflicts): Adjust.
15858 * src/lalr.c (LArule): Remove.
15859 (add_lookback_edge): Adjust.
15860 (state_lookaheads_count): New.
15861 (states_lookaheads_initialize): Merge into...
15862 (initialize_LA): this.
15863 (lalr_free): Adjust.
15864 * src/main.c (main): Don't free nullable and derives too early: it
15865 is used by --verbose.
15866 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15867
bb0027a9
AD
158682002-08-01 Akim Demaille <akim@epita.fr>
15869
15870 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15871 `rule_number_t**'.
15872 (set_derives, free_derives): Rename as...
15873 (derives_compute, derives_free): this.
15874 Adjust all dependencies.
15875 * src/nullable.c (set_nullable, free_nullable): Rename as...
15876 (nullable_compute, nullable_free): these.
15877 (rule_list_t): Store rule_t *, not rule_number_t.
15878 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15879 pointers, instead of their numbers.
15880 * src/main.c (main): Call nullable_free, and derives_free earlier,
15881 as they were lo longer used.
15882
3325ddc4
AD
158832002-08-01 Akim Demaille <akim@epita.fr>
15884
15885 * lib/timevar.c (get_time): Include children time.
15886 * src/lalr.h (LA, LArule): Don't export them: used with the
15887 state_t.
15888 * src/lalr.c (LA, LArule): Static.
15889 * src/lalr.h, src/lalr.c (lalr_free): New.
15890 * src/main.c (main): Call it.
15891 * src/tables.c (pack_vector): Check whether loc is >= to the
15892 table_size, not >.
15893 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15894 (tables_generate): do it, since that's also it which allocates
15895 them.
15896 Don't free LA and LArule, main does.
15897
c6f1a33c
AD
158982002-07-31 Akim Demaille <akim@epita.fr>
15899
15900 Separate parser tables computation and output.
15901
15902 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15903 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15904 (yydefgoto, yydefact, high): Move to...
15905 * src/tables.h, src/tables.c: here.
15906 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15907 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15908 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15909 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15910 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15911 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15912 (action_row, save_row, token_actions, save_column, default_goto)
15913 (goto_actions, sort_actions, matching_state, pack_vector)
15914 (table_ninf_remap, pack_table, prepare_actions): Move to...
15915 * src/tables.c: here.
15916 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15917 * src/output.c (token_actions, output_base, output_conflicts)
15918 (output_check): Merge into...
15919 (prepare_actions): this.
15920 (actions_output): Rename as...
15921 (user_actions_output): this.
15922 * src/main.c (main): Call tables_generate and tables_free.
15923
1509d42f
AD
159242002-07-31 Akim Demaille <akim@epita.fr>
15925
15926 Steal GCC's --time-report support.
15927
15928 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15929 stolen/adjusted from GCC.
15930 * m4/stage.m4: Remove time related checks.
15931 * m4/timevar.m4: New.
15932 * configure.in: Adjust.
15933 * src/system.h: Adjust to using timevar.h.
15934 * src/getargs.h, src/getargs.c: Support trace_time for
15935 --trace=time.
15936 * src/main.c (stage): Remove.
15937 (main): Replace `stage' invocations with timevar calls.
15938 * src/output.c: Insert pertinent timevar calls.
15939
273a74fa
AD
159402002-07-31 Akim Demaille <akim@epita.fr>
15941
15942 Let --trace have arguments.
15943
15944 * src/getargs.h (enum trace_e): New.
15945 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15946 (long_options, short_options): --trace/-T takes an optional
15947 argument.
15948 Change all the uses of trace_flag to reflect the new flags.
15949 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15950
15951 Strengthen `stage' portability.
15952
15953 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15954 * configure.in: Use it.
15955 Don't check for malloc.h and sys/times.h.
15956 * src/system.h: Include them when appropriate.
15957 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15958 times and struct tms are available.
15959
217598da
AD
159602002-07-30 Akim Demaille <akim@epita.fr>
15961
15962 In verbose parse error message, don't report `error' as an
15963 expected token.
15964 * tests/actions.at (Printers and Destructors): Adjust.
15965 * tests/calc.at (Calculator $1): Adjust.
15966 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15967 error message, do not report the parser accepts the error token in
15968 that state.
15969
52489d44
AD
159702002-07-30 Akim Demaille <akim@epita.fr>
15971
15972 Normalize conflict related messages.
15973
15974 * src/complain.h, src/complain.c (warn, complain): New.
15975 * src/conflicts.c (conflicts_print): Use them.
15976 (conflict_report_yacc): New, extracted from...
15977 (conflicts_print): here.
15978 * tests/conflicts.at, tests/existing.at: Adjust.
15979
e8832397
AD
159802002-07-30 Akim Demaille <akim@epita.fr>
15981
15982 Report rules which are never reduced by the parser: those hidden
15983 by conflicts.
15984
15985 * src/LR0.c (save_reductions): Don't make the final state too
15986 different: save its reduction (accept) instead of having a state
15987 without any action (no shift or goto, no reduce).
15988 Note: the final state is now a ``regular'' state, i.e., the
15989 parsers now contain `reduce 0' as default reduction.
15990 Nevertheless, since they decide to `accept' when yystate =
15991 final_state, they still will not reduce rule 0.
15992 * src/print.c (print_actions, print_reduction): Adjust.
15993 * src/output.c (action_row): Track reduced rules.
15994 (token_actions): Report rules never reduced.
15995 * tests/conflicts.at, tests/regression.at: Adjust.
15996
caf23d24
AD
159972002-07-30 Akim Demaille <akim@epita.fr>
15998
15999 `stage' was accidently included in a previous patch.
16000 Initiate its autoconfiscation.
16001
16002 * configure.in: Look for malloc.h and sys/times.h.
16003 * src/main.c (stage): Adjust.
16004 Report only when trace_flag.
16005
640748ee
AD
160062002-07-29 Akim Demaille <akim@epita.fr>
16007
16008 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16009 state_number_t.
16010 (errs_t): symbol_t*, not symbol_number_t.
16011 (reductions_t): rule_t*, not rule_number_t.
16012 (FOR_EACH_SHIFT): New.
16013 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16014 * src/print.c, src/print_graph.c: Adjust.
16015
88bce5a2
AD
160162002-07-29 Akim Demaille <akim@epita.fr>
16017
16018 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16019
16020 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16021 (endtoken, accept): these.
16022 * src/reader.c (reader): Set endtoken's default tag to "$end".
16023 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16024 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16025 Adjust.
16026
1bfb97db
AD
160272002-07-29 Akim Demaille <akim@epita.fr>
16028
16029 * src/reduce.c (reduce_grammar): When the language is empty,
16030 complain about the start symbol, not the axiom.
16031 Use its location.
16032 * tests/reduce.at (Empty Language): New.
16033
fc5734fe
AD
160342002-07-26 Akim Demaille <akim@epita.fr>
16035
16036 * src/reader.h, src/reader.c (gram_error): ... can't get
16037 yycontrol without making too strong assumptions on the parser
16038 itself.
16039 * src/output.c (prepare_tokens): Use the real 0th value of
16040 token_translations instead of `0'.
16041 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16042 visible here.
16043 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16044 for the time being: %locations ought to provide it to yyerror.
16045
3650b4b8
AD
160462002-07-25 Akim Demaille <akim@epita.fr>
16047
16048 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16049 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16050 * tests/regression.at (Web2c Actions): Adjust.
16051
4b3d3a8e
AD
160522002-07-25 Akim Demaille <akim@epita.fr>
16053
16054 Stop storing rules from 1 to nrules + 1.
16055
16056 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16057 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16058 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16059 Iterate from 0 to nrules.
16060 Use rule_number_as_item_number and item_number_as_rule_number.
16061 Adjust to `derive' now containing possibly 0.
16062 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16063 Handle the `- 1' part in rule numbers from/to item numbers.
16064 * src/conflicts.c (log_resolution): Fix the message which reversed
16065 shift and reduce.
16066 * src/output.c (action_row): Initialize default_rule to -1.
16067 (token_actions): Adjust.
16068 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16069 expected output.
16070 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16071
4a2a22f4
AD
160722002-07-25 Akim Demaille <akim@epita.fr>
16073
16074 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16075 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16076 (b4_c_knr_arg_decl): New.
16077 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16078 yyreport_parse_error.
16079
b8df3223
AD
160802002-07-25 Akim Demaille <akim@epita.fr>
16081
16082 * data/yacc.c (yyreport_parse_error): New, extracted from...
16083 (yyparse): here.
16084 (yydestruct, yysymprint): Move above yyparse.
16085 Be K&R compliant.
16086
a762e609
AD
160872002-07-25 Akim Demaille <akim@epita.fr>
16088
16089 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16090 replace...
16091 (b4_sint_type, b4_uint_type): these.
16092 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16093 * tests/regression.at (Web2c Actions): Adjust.
16094
12b0043a
AD
160952002-07-25 Akim Demaille <akim@epita.fr>
16096
16097 * src/gram.h (TIEM_NUMBER_MAX): New.
16098 (item_number_of_rule_number, rule_number_of_item_number): Rename
16099 as...
16100 (rule_number_as_item_number, item_number_as_rule_number): these.
16101 Adjust dependencies.
16102 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16103 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16104 (symbol_number_to_vector_number): New.
16105 (order): Of vector_number_t* type.
16106 (base_t, BASE_MAX, BASE_MIN): New.
16107 (froms, tos, width, pos, check): Of base_t type.
16108 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16109 (actrow): Of action_number_t type.
16110 (conflrow): Of unsigned int type.
16111 (table_ninf, base_ninf): New.
16112 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16113 (muscle_insert_int_table, muscle_insert_base_table)
16114 (muscle_insert_rule_number_table): New.
16115 (prepare_tokens): Output `toknum' as int_table.
16116 (action_row): Returns a rule_number_t.
16117 Use ACTION_MIN, not SHRT_MIN.
16118 (token_actions): yydefact is rule_number_t*.
16119 (table_ninf_remap): New.
16120 (pack_table): Use it for `base' and `table'.
16121 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16122 replaced with...
16123 (YYPACT_NINF, YYTABLE_NINF): these.
16124 (yypact, yytable): Compute their types instead of hard-coded
16125 `short'.
16126 * tests/regression.at (Web2c Actions): Adjust.
16127
5dde258a
AD
161282002-07-19 Akim Demaille <akim@epita.fr>
16129
16130 * src/scan-gram.l (id): Can start with an underscore.
16131
a945ec39
AD
161322002-07-16 Akim Demaille <akim@epita.fr>
16133
16134 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16135 Adjust all former `associativity' dependencies.
16136 * src/symtab.c (symbol_new): Default associativity is `undef', not
16137 `right'.
16138 (symbol_check_alias_consistence): Adjust.
16139
fae437e8
AD
161402002-07-09 Akim Demaille <akim@epita.fr>
16141
16142 * doc/bison.texinfo: Properly set the ``header'' part.
16143 Use @dircategory ``GNU programming tools'' as per Texinfo's
16144 documentation.
16145 Use @copying.
16146
1a715ef2
AD
161472002-07-09 Akim Demaille <akim@epita.fr>
16148
16149 * lib/quotearg.h: Protect against multiple inclusions.
16150 * src/location.h (location_t): Add a `file' member.
16151 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16152 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16153 `error_one_per_line' support.
16154
a5d50994
AD
161552002-07-09 Akim Demaille <akim@epita.fr>
16156
16157 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16158 * src/reader.c (lineno): Remove.
16159 Adjust all dependencies.
16160 (get_merge_function): Take a location and use complain_at.
16161 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16162 * tests/regression.at (Invalid inputs, Mixing %token styles):
16163 Adjust.
16164
b275314e
AD
161652002-07-09 Akim Demaille <akim@epita.fr>
16166
16167 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16168 recovery rule, and forbid extensions when --yacc.
16169 (gram_error): Use complain_at.
16170 * src/reader.c (reader): Exit if there were parse errors.
16171
865b9df1
AD
161722002-07-09 Akim Demaille <akim@epita.fr>
16173
16174 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16175 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16176 Reported by R Blake <blakers@mac.com>.
16177
c76e14da
AD
161782002-07-09 Akim Demaille <akim@epita.fr>
16179
16180 * data/yacc.c: Output the copyright notive in the header.
16181
7db2ed2d
AD
161822002-07-03 Akim Demaille <akim@epita.fr>
16183
16184 * src/output.c (froms, tos): Are state_number_t.
16185 (save_column): sp, sp1, and sp2 are state_number_t.
16186 (prepare): Rename `final' as `final_state_number', `nnts' as
16187 `nterms_number', `nrules' as `rules_number', `nstates' as
16188 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16189 unused.
16190 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16191 * data/lalr1.cc (nsym_): Remove, unused.
16192
e68e0410
AD
161932002-07-03 Akim Demaille <akim@epita.fr>
16194
16195 * src/lalr.h, src/lalr.c (goto_number_t): New.
16196 * src/lalr.c (goto_list_t): New.
16197 Propagate them.
16198 * src/nullable.c (rule_list_t): New.
16199 Propagate.
16200 * src/types.h: Remove.
16201
e1a4f3a4
AD
162022002-07-03 Akim Demaille <akim@epita.fr>
16203
16204 * src/closure.c (print_fderives): Use rule_rhs_print.
16205 * src/derives.c (print_derives): Use rule_rhs_print.
16206 (rule_list_t): New, replaces `shorts'.
16207 (set_derives): Add comments.
16208 * tests/sets.at (Nullable, Firsts): Adjust.
16209
536545f3
AD
162102002-07-03 Akim Demaille <akim@epita.fr>
16211
16212 * src/output.c (prepare_actions): Free `tally' and `width'.
16213 (prepare_actions): Allocate and free `order'.
16214 * src/symtab.c (symbols_free): Free `symbols'.
16215 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16216 * src/output.c (m4_invoke): Move to...
16217 * src/scan-skel.l: here.
16218 (<<EOF>>): Close yyout, and free its name.
16219
8b752b00
AD
162202002-07-03 Akim Demaille <akim@epita.fr>
16221
16222 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16223
16224 * src/LR0.c (new_state): Merge into...
16225 (state_list_append): this.
16226 (new_states): Merge into...
16227 (generate_states): here.
16228 (set_states): Don't ensure a proper `errs' state member here, do it...
16229 * src/conflicts.c (conflicts_solve): here.
16230 * src/state.h, src/state.c: Comment changes.
16231 (state_t): Rename member `shifts' as `transitions'.
16232 Adjust all dependencies.
16233 (errs_new): For consistency, also take the values as argument.
16234 (errs_dup): Remove.
16235 (state_errs_set): New.
16236 (state_reductions_set, state_transitions_set): Assert that no
16237 previous value was assigned.
16238 (state_free): New.
16239 (states_free): Use it.
16240 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16241 temporary storage: use `errs' and `nerrs' as elsewhere.
16242 (set_conflicts): Allocate and free this `errs'.
16243
613f5e1a
AD
162442002-07-02 Akim Demaille <akim@epita.fr>
16245
16246 * lib/libiberty.h: New.
16247 * lib: Update the bitset implementation from upstream.
16248 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16249 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16250 * src/main.c: Adjust bitset stats calls.
16251
26e0cadc
PE
162522002-07-01 Paul Eggert <eggert@twinsun.com>
16253
16254 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16255 char, so that negative chars don't collide with $.
16256
1154cced
AD
162572002-06-30 Akim Demaille <akim@epita.fr>
16258
16259 Have the GLR tests be `warning' checked, and fix the warnings.
16260
16261 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16262 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16263 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16264 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16265 (yyaddDeferredAction): static.
16266 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16267 (yyreportParseError): yyprefix is const.
16268 yytokenp is used only when verbose.
16269 (yy__GNUC__): Replace with __GNUC__.
16270 (yypdumpstack): yyi is size_t.
16271 (yypreference): Un-yy local variables and arguments, to avoid
16272 clashes with `yyr1'. Anyway, we are not in the user name space.
16273 (yytname_size): be an int, as is compared with ints.
16274 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16275 Use them.
16276 * tests/cxx-gram.at: Use quotation to protect $1.
16277 Use AT_COMPILE to enable warnings hunts.
16278 Prototype yylex and yyerror.
16279 `Use' argc.
16280 Include `string.h', not `strings.h'.
16281 Produce and prototype stmtMerge only when used.
16282 yylex takes a location.
16283
97650f4e
AD
162842002-06-30 Akim Demaille <akim@epita.fr>
16285
16286 We spend a lot of time in quotearg, in particular when --verbose.
16287
16288 * src/symtab.c (symbol_get): Store a quoted version of the key.
16289 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16290 Adjust all callers.
16291
d2576365
AD
162922002-06-30 Akim Demaille <akim@epita.fr>
16293
16294 * src/state.h (reductions_t): Rename member `nreds' as num.
16295 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16296 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16297
ccaf65bc
AD
162982002-06-30 Akim Demaille <akim@epita.fr>
16299
16300 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16301 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16302 (shifts_to): Rename as...
16303 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16304 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16305 (TRANSITION_IS_DISABLED, transitions_to): these.
16306
87675353
AD
163072002-06-30 Akim Demaille <akim@epita.fr>
16308
16309 * src/print.c (print_shifts, print_gotos): Merge into...
16310 (print_transitions): this.
16311 (print_transitions, print_errs, print_reductions): Align the
16312 lookaheads columns.
16313 (print_core, print_transitions, print_errs, print_state,
16314 print_grammar): Output empty lines separator before, not after.
16315 (state_default_rule_compute): Rename as...
16316 (state_default_rule): this.
16317 * tests/conflicts.at (Defaulted Conflicted Reduction),
16318 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16319 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16320
ce4ccb4b
AD
163212002-06-30 Akim Demaille <akim@epita.fr>
16322
16323 Display items as we display rules.
16324
16325 * src/gram.h, src/gram.c (rule_lhs_print): New.
16326 * src/gram.c (grammar_rules_partial_print): Use it.
16327 * src/print.c (print_core): Likewise.
16328 * tests/conflicts.at (Defaulted Conflicted Reduction),
16329 (Unresolved SR Conflicts): Adjust.
16330 (Unresolved SR Conflicts): Adjust and rename as...
16331 (Resolved SR Conflicts): this, as was meant.
16332 * tests/regression.at (Web2c Report): Adjust.
16333
bc933ef1
AD
163342002-06-30 Akim Demaille <akim@epita.fr>
16335
16336 * src/print.c (state_default_rule_compute): New, extracted from...
16337 (print_reductions): here.
16338 Pessimize, but clarify the code.
16339 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16340
53d4308d
AD
163412002-06-30 Akim Demaille <akim@epita.fr>
16342
16343 * src/output.c (action_row): Let default_rule be always a rule
16344 number.
16345
574fb2d5
AD
163462002-06-30 Akim Demaille <akim@epita.fr>
16347
16348 * src/closure.c (print_firsts, print_fderives, closure):
16349 Use BITSET_EXECUTE.
16350 * src/lalr.c (lookaheads_print): Likewise.
16351 * src/state.c (state_rule_lookaheads_print): Likewise.
16352 * src/print_graph.c (print_core): Likewise.
16353 * src/print.c (print_reductions): Likewise.
16354 * src/output.c (action_row): Likewise.
16355 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16356
05811fd7
AD
163572002-06-30 Akim Demaille <akim@epita.fr>
16358
16359 * src/print_graph.c: Use report_flag.
16360
0e4d5753
AD
163612002-06-30 Akim Demaille <akim@epita.fr>
16362
16363 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16364 to...
16365 * src/relation.h, src/relation.c (traverse, relation_digraph)
16366 (relation_print, relation_transpose): New.
16367
24c7d800
AD
163682002-06-30 Akim Demaille <akim@epita.fr>
16369
16370 * src/state.h, src/state.c (shifts_to): New.
16371 * src/lalr.c (build_relations): Use it.
16372
9222837b
AD
163732002-06-30 Akim Demaille <akim@epita.fr>
16374
16375 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16376 (item_number_of_rule_number, rule_number_of_item_number): New.
16377 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16378 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16379 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16380 Propagate their use.
16381 Much remains to be done, in particular wrt `shorts' from types.h.
16382
260008e5
AD
163832002-06-30 Akim Demaille <akim@epita.fr>
16384
16385 * src/symtab.c (symbol_new): Initialize the `printer' member.
16386
8a731ca8
AD
163872002-06-30 Akim Demaille <akim@epita.fr>
16388
16389 * src/LR0.c (save_reductions): Remove, replaced by...
16390 * src/state.h, src/state.c (state_reductions_set): New.
16391 (reductions, errs): Rename as...
16392 (reductions_t, errs_t): these.
16393 Adjust all dependencies.
16394
32e1e0a4
AD
163952002-06-30 Akim Demaille <akim@epita.fr>
16396
16397 * src/LR0.c (state_list_t, state_list_append): New.
16398 (first_state, last_state): Now symbol_list_t.
16399 (this_state): Remove.
16400 (new_itemsets, append_states, save_reductions): Take a state_t as
16401 argument.
16402 (set_states, generate_states): Adjust.
16403 (save_shifts): Remove, replaced by...
16404 * src/state.h, src/state.c (state_shifts_set): New.
16405 (shifts): Rename as...
16406 (shifts_t): this.
16407 Adjust all dependencies.
16408 * src/state.h (state_t): Remove the `next' member.
16409
e5fb6710
AD
164102002-06-30 Akim Demaille <akim@epita.fr>
16411
16412 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16413 escaped in slot 0.
16414
c7ca99d4
AD
164152002-06-30 Akim Demaille <akim@epita.fr>
16416
16417 Use hash.h for the state hash table.
16418
16419 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16420 (allocate_storage): Use state_hash_new.
16421 (free_storage): Use state_hash_free.
16422 (new_state, get_state): Adjust.
16423 * src/lalr.h, src/lalr.c (states): Move to...
16424 * src/states.h (state_t): Remove the `link' member, no longer
16425 used.
16426 * src/states.h, src/states.c: here.
16427 (state_hash_new, state_hash_free, state_hash_lookup)
16428 (state_hash_insert, states_free): New.
16429 * src/states.c (state_table, state_compare, state_hash): New.
16430 * src/output.c (output_actions): Do not free states now, since we
16431 still need to know the final_state number in `prepare', called
16432 afterwards. Do it...
16433 * src/main.c (main): here: call states_free after `output'.
16434
df0e7316
AD
164352002-06-30 Akim Demaille <akim@epita.fr>
16436
16437 * src/state.h, src/state.c (state_new): New, extracted from...
16438 * src/LR0.c (new_state): here.
16439 * src/state.h (STATE_ALLOC): Move to...
16440 * src/state.c: here.
16441 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16442 * src/state.h, src/state.c: here.
16443
39f41916
AD
164442002-06-30 Akim Demaille <akim@epita.fr>
16445
16446 * src/reader.c (gensym): Rename as...
16447 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16448 (getsym): Rename as...
16449 (symbol_get): this.
16450
d57650a5
AD
164512002-06-30 Akim Demaille <akim@epita.fr>
16452
16453 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16454 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16455 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16456 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16457
5a08f1ce
AD
164582002-06-30 Akim Demaille <akim@epita.fr>
16459
16460 Make the test suite pass with warnings checked.
16461
16462 * tests/actions.at (Printers and Destructors): Improve.
16463 Avoid unsigned vs. signed issues.
16464 * tests/calc.at: Don't exercise the scanner here, do it...
16465 * tests/input.at (Torturing the Scanner): here.
16466
720623af
PH
164672002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16468
88e7e941 16469 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
16470 reorganize first lines parallel to yacc.c.
16471
fb8135fa
AD
164722002-06-28 Akim Demaille <akim@epita.fr>
16473
16474 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16475 (b4_token_enum, b4_token_defines): New, factored from...
16476 * data/lalr1.cc, data/yacc.c, glr.c: here.
16477
41442480
AD
164782002-06-28 Akim Demaille <akim@epita.fr>
16479
16480 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16481 unused variables.
16482 * src/output.c (merger_output): static.
16483
e0e5bf84
AD
164842002-06-28 Akim Demaille <akim@epita.fr>
16485
ba0fe3c7 16486 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
16487 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16488 pacify GCC.
16489 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 16490
676385e2
PH
164912002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16492
16493 Accumulated changelog for new GLR parsing features.
16494
6a254321 16495 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
16496 conflicts_total_count.
16497 * src/conflicts.h: Ditto.
16498 * src/output.c (token_actions): Use the new name.
16499 (output_conflicts): Change conflp => conflict_list_heads, and
16500 confl => conflict_list for better readability.
16501 * data/glr.c: Use the new names.
16502 * NEWS: Add self to GLR announcement.
e0e5bf84 16503
676385e2
PH
16504 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16505
16506 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16507 Akim Demaille.
16508
16509 * data/bison.glr: Change name to glr.c
16510 * data/glr.c: Renamed from bison.glr.
16511 * data/Makefile.am: Add glr.c
e0e5bf84
AD
16512
16513 * src/getargs.c:
16514
676385e2 16515 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 16516 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 16517
676385e2
PH
16518 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16519
16520 * data/bison.glr: Be sure to restore the
16521 current #line when returning to the skeleton contents after having
16522 exposed the input file's #line.
16523
16524 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16525
16526 * data/bison.glr: Bring up to date with changes to bison.simple.
16527
16528 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16529
16530 * data/bison.glr: Correct definitions that use b4_prefix.
16531 Various reformatting.
16532 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16533 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16534 yytokenp argument; now part of stack.
16535 (yychar): Define to behave as documented.
16536 (yyclearin): Ditto.
e0e5bf84 16537
676385e2
PH
16538 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16539
16540 * src/reader.h: Add declaration for free_merger_functions.
16541
16542 * src/reader.c (merge_functions): New variable.
16543 (get_merge_function): New function.
16544 (free_merger_functions): New function.
16545 (readgram): Check for %prec that is not followed by a symbol.
16546 Handle %dprec and %merge declarations.
16547 (packgram): Initialize dprec and merger fields in rules array.
16548
16549 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16550 conflict_list_cnt, conflict_list_free): New variables.
16551 (table_grow): Also grow conflict_table.
e0e5bf84 16552 (prepare_rules): Output dprec and merger tables.
676385e2 16553 (conflict_row): New function.
e0e5bf84 16554 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
16555 default reduction in conflicted states for GLR parser so that there
16556 are spaces for the conflict lists.
16557 (save_row): Also save conflict information.
16558 (token_actions): Allocate conflict list.
16559 (merger_output): New function.
16560 (pack_vector): Pack conflict table, too.
16561 (output_conflicts): New function to output yyconflp and yyconfl.
16562 (output_check): Allocate conflict_tos.
16563 (output_actions): Output conflict tables, also.
16564 (output_skeleton): Output b4_mergers definition.
16565 (prepare): Output b4_max_rhs_length definition.
16566 Use 'bison.glr' as default skeleton for GLR parsers.
16567
16568 * src/gram.c (glr_parser): New flag.
16569 (grammar_free): Call free_merger_functions.
16570
16571 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16572 all pairs of conflicting reductions, rather than just all tokens
16573 causing conflicts. Needed to size conflict tables.
e0e5bf84 16574 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
16575 interface.
16576 (conflicts_print): Ditto.
16577 (count_total_conflicts): New function.
16578
16579 * src/reader.h (merger_list): New type.
16580 (merge_functions): New variable.
16581
16582 * src/lex.h (tok_dprec, tok_merge): New token types.
16583
16584 * src/gram.h (rule_s): Add dprec and merger fields.
16585 (glr_parser): New flag.
16586
16587 * src/conflicts.h (count_total_conflicts): New function.
16588
16589 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16590
16591 * doc/bison.texinfo (Generalized LR Parsing): New section.
16592 (GLR Parsers): New section.
16593 (Language and Grammar): Mention GLR parsing.
16594 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16595 Correct typo ("tge" -> "the").
16596
16597 * data/bison.glr: New skeleton for GLR parsing.
16598
16599 * tests/cxx-gram.at: New tests for GLR parsing.
16600
16601 * tests/testsuite.at: Include cxx-gram.at.
16602
16603 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 16604
676385e2
PH
16605 * src/parse-gram.y:
16606
16607 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16608
16609 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 16610
b5480d74 166112002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
16612
16613 * src/options.h, src/options.c: Remove.
16614 * src/getargs.c (short_options, long_options): New.
16615
60491a94
AD
166162002-06-27 Akim Demaille <akim@epita.fr>
16617
16618 * data/bison.simple, data/bison.c++: Rename as...
16619 * data/yacc.c, data/lalr1.cc: these.
16620 * doc/bison.texinfo (Environment Variables): Remove.
16621
9be0c25b
AD
166222002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16623
16624 * src/getargs.c (report_argmatch): Initialize strtok().
16625
1ae72863
AD
166262002-06-20 Akim Demaille <akim@epita.fr>
16627
16628 * data/bison.simple (b4_symbol_actions): New, replaces...
16629 (b4_symbol_destructor, b4_symbol_printer): these.
16630 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16631 user token numbers.
16632
87542d29
AD
166332002-06-20 Akim Demaille <akim@epita.fr>
16634
16635 * data/bison.simple (yydestructor): Rename as...
16636 (yydestruct): this.
16637
1a31ed21
AD
166382002-06-20 Akim Demaille <akim@epita.fr>
16639
16640 * src/symtab.h, src/symtab.c (symbol_type_set)
16641 (symbol_destructor_set, symbol_precedence_set): The location is
16642 the last argument.
16643 Adjust all callers.
16644
e776192e
AD
166452002-06-20 Akim Demaille <akim@epita.fr>
16646
16647 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16648 internals.
16649 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16650 Takes a location.
16651 * src/symtab.h, src/symtab.c (symbol_class_set)
16652 (symbol_user_token_number_set): Likewise.
16653 Adjust all callers.
16654 Promote complain_at.
16655 * tests/input.at (Type Clashes): Adjust.
16656
5c1180b3
AD
166572002-06-20 Akim Demaille <akim@epita.fr>
16658
16659 * data/bison.simple (YYLEX): Fix the declaration when
16660 %pure-parser.
16661
e3170060
AD
166622002-06-20 Akim Demaille <akim@epita.fr>
16663
16664 * data/bison.simple (yysymprint): Don't print the token number,
16665 just its name.
16666 * tests/actions.at (Destructors): Rename as...
16667 (Printers and Destructors): this.
16668 Also exercise %printer.
16669
253862fd
AD
166702002-06-20 Akim Demaille <akim@epita.fr>
16671
16672 * data/bison.simple (YYDSYMPRINT): New.
16673 Use it to remove many of the #if YYDEBUG/if (yydebug).
16674
366eea36
AD
166752002-06-20 Akim Demaille <akim@epita.fr>
16676
16677 * src/symtab.h, src/symtab.c (symbol_t): printer and
16678 printer_location are new members.
16679 (symbol_printer_set): New.
16680 * src/parse-gram.y (PERCENT_PRINTER): New token.
16681 Handle its associated rule.
16682 * src/scan-gram.l: Adjust.
16683 (handle_destructor_at, handle_destructor_dollar): Rename as...
16684 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16685 * src/output.c (symbol_printers_output): New.
16686 (output_skeleton): Call it.
16687 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16688 since there are already many grammar files with a user `yyprint'.
16689 Replace the calls to YYPRINT to calls to yysymprint.
16690 * tests/calc.at: Adjust.
16691 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16692 taking advantage of parser very internal details (stack size!).
16693
4f25ebb0
AD
166942002-06-20 Akim Demaille <akim@epita.fr>
16695
16696 * src/scan-gram.l: Complete the scanner with the missing patterns
16697 to pacify Flex.
16698 Use `quote' and `symbol_tag_get' where appropriate.
16699
93b68a0e
AD
167002002-06-19 Akim Demaille <akim@epita.fr>
16701
16702 * tests/actions.at (Destructors): Augment to test locations.
16703 * data/bison.simple (yydestructor): Pass it the current location
16704 if locations are enabled.
16705 Prototype only when __STDC__ or C++.
16706 Change the argument names to move into the yy name space: there is
16707 user code here.
16708
58612f1d
AD
167092002-06-19 Akim Demaille <akim@epita.fr>
16710
74310291
AD
16711 * data/bison.simple (b4_pure_if): New.
16712 Use it instead of #ifdef YYPURE.
16713
167142002-06-19 Akim Demaille <akim@epita.fr>
16715
16716 * data/bison.simple (b4_location_if): New.
58612f1d
AD
16717 Use it instead of #ifdef YYLSP_NEEDED.
16718
f25bfb75
AD
167192002-06-19 Akim Demaille <akim@epita.fr>
16720
16721 Prepare @$ in %destructor, but currently don't bind it in the
16722 skeleton, as %location use is not cleaned up yet.
16723
16724 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16725 (handle_action_at): New.
16726 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16727 a braced_code_t and a location as additional arguments.
16728 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16729 unquote one when outputting `b4_dollar_dollar'.
16730 Adjust callers.
16731 * data/bison.simple (b4_eval): Remove.
16732 (b4_symbol_destructor): Adjust.
16733 * tests/input.at (Invalid @n): Adjust.
16734
c732d2c6
AD
167352002-06-19 Zack Weinberg <zack@codesourcery.com>
16736
16737 * doc/bison.texinfo: Document ability to have multiple
16738 prologue sections.
16739
8c165d89
AD
167402002-06-18 Akim Demaille <akim@epita.fr>
16741
16742 * src/files.c (compute_base_names): When computing the output file
16743 names from the input file name, strip the directory part.
16744
ca98bf57
AD
167452002-06-18 Akim Demaille <akim@epita.fr>
16746
16747 * data/bison.simple.new: Comment changes.
16748 Reported by Andreas Schwab.
16749
0bfb02ff
AD
167502002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16751
16752 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16753 there are no `label `yyoverflowlab' defined but not used' warnings
16754 when yyoverflow is defined.
16755
24c0aad7
AD
167562002-06-18 Akim Demaille <akim@epita.fr>
16757
16758 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16759 new member.
16760 (symbol_destructor_set): Adjust.
16761 * src/output.c (symbol_destructors_output): Output the destructor
16762 locations.
16763 Output the symbol name.
16764 * data/bison.simple (b4_symbol_destructor): Adjust.
16765
5719c109
AD
167662002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16767 and Akim Demaille <akim@epita.fr>
16768
16769 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16770 what's left on the stack when the error recovery hits EOF.
16771 * tests/actions.at (Destructors): Complete to exercise this case.
16772
9280d3ef
AD
167732002-06-17 Akim Demaille <akim@epita.fr>
16774
16775 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16776 arguments is really empty, not only equal to `[]'.
16777 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16778 member.
16779 (symbol_destructor_set): New.
16780 * src/output.c (symbol_destructors_output): New.
16781 * src/reader.h (brace_code_t, current_braced_code): New.
16782 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16783 (handle_dollar): Rename as...
16784 (handle_action_dollar): this.
16785 (handle_destructor_dollar): New.
16786 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16787 (grammar_declaration): Use it.
16788 * data/bison.simple (yystos): Is always defined.
16789 (yydestructor): New.
16790 * tests/actions.at (Destructors): New.
16791 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16792
dafdc66f
AD
167932002-06-17 Akim Demaille <akim@epita.fr>
16794
16795 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16796 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16797 rule_length only when needed.
16798 * src/output.c (actions_output, token_definitions_output): Output
16799 the full M4 block.
16800 * src/symtab.c: Don't access directly to the symbol tag, use
16801 symbol_tag_get.
16802 * src/parse-gram.y: Use symbol_list_free.
16803
56c47203
AD
168042002-06-17 Akim Demaille <akim@epita.fr>
16805
16806 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16807 (symbol_list_prepend, get_type_name): Move to...
16808 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16809 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16810 Adjust all callers.
16811 (symbol_list_free): New.
16812 * src/scan-gram.l (handle_dollar): Takes a location.
16813 * tests/input.at (Invalid $n): Adjust.
16814
1e0bab92
AD
168152002-06-17 Akim Demaille <akim@epita.fr>
16816
16817 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16818 (symbol_list_prepend): New.
16819 * src/parse-gram.y (%union): `list' is a new member.
16820 (symbols.1): New, replaces...
16821 (terms_to_prec.1, nterms_to_type.1): these.
16822 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16823 Take a location as additional argument.
16824 Adjust all callers.
16825
04e60654
AD
168262002-06-15 Akim Demaille <akim@epita.fr>
16827
16828 * src/parse-gram.y: Move %token in the declaration section so that
16829 we don't depend upon CVS Bison.
16830
10e5b8bd
AD
168312002-06-15 Akim Demaille <akim@epita.fr>
16832
16833 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16834 * src/print.c (print_core): Use it.
16835
9801d40c
AD
168362002-06-15 Akim Demaille <akim@epita.fr>
16837
16838 * src/conflicts.c (log_resolution): Accept the rule involved in
16839 the sr conflicts instead of the lookahead number that points to
16840 that rule.
16841 (flush_reduce): Accept the current lookahead vector as argument,
16842 instead of the index in LA.
16843 (resolve_sr_conflict): Accept the current number of lookahead
16844 bitset to consider for the STATE, instead of the index in LA.
16845 (set_conflicts): Adjust.
16846 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16847
c0263492
AD
168482002-06-15 Akim Demaille <akim@epita.fr>
16849
16850 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16851 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16852 Adjust all dependencies.
16853 * src/lalr.c (initialize_lookaheads): Split into...
16854 (states_lookaheads_count, states_lookaheads_initialize): these.
16855 (lalr): Adjust.
16856
9757c359
AD
168572002-06-15 Akim Demaille <akim@epita.fr>
16858
16859 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16860 out of...
16861 (grammar_rules_print): here.
16862 * src/reduce.c (reduce_output): Use it.
16863 * tests/reduce.at (Useless Rules, Reduced Automaton)
16864 (Underivable Rules): Adjust.
16865
6b98e4b5
AD
168662002-06-15 Akim Demaille <akim@epita.fr>
16867
16868 Copy BYacc's nice way to report the grammar.
16869
16870 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16871 New.
16872 Don't print the rules' location, it is confusing and useless.
16873 (rule_print): Use grammar_rhs_print.
16874 * src/print.c (print_grammar): Use grammar_rules_print.
16875
6b98e4b5
AD
168762002-06-15 Akim Demaille <akim@epita.fr>
16877
16878 Complete and rationalize `useless thing' warnings.
16879
16880 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16881 (symbol_tag_print): New.
16882 Use them everywhere in place of accessing directly the tag member.
16883 * src/gram.h, src/gram.c (rule_print): New.
16884 Use it where a rule used to be printed `by hand'.
16885 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16886 (reduce_grammar_tables): Report the useless rules.
16887 (reduce_print): Useless things are a warning, not an error.
16888 Report it as such.
16889 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16890 (Reduced Automaton, Underivable Rules): Adjust.
16891 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16892 * tests/conflicts.at (Unresolved SR Conflicts)
16893 (Solved SR Conflicts): Adjust.
16894
ee000ba4
AD
168952002-06-15 Akim Demaille <akim@epita.fr>
16896
16897 Let symbols have a location.
16898
16899 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16900 (getsym): Adjust.
16901 Adjust all callers.
16902 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16903 Use location_t, not int.
16904 * src/symtab.c (symbol_check_defined): Take advantage of the
16905 location.
16906 * tests/regression.at (Invalid inputs): Adjust.
16907
8efe435c
AD
169082002-06-15 Akim Demaille <akim@epita.fr>
16909
16910 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16911 (input): Don't try to initialize yylloc here, do it in the
16912 scanner.
16913 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16914 * src/gram.h (rule_t): Change line and action_line into location
16915 and action_location, of location_t type.
16916 Adjust all dependencies.
16917 * src/location.h, src/location.c (empty_location): New.
16918 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16919 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16920 (grammar_current_rule_symbol_append)
16921 (grammar_current_rule_action_append): Expect a location as argument.
16922 * src/reader.c (grammar_midrule_action): Adjust to attach an
16923 action's location as dummy symbol location.
16924 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16925 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16926 the line numbers.
16927
1921f1d7
AD
169282002-06-14 Akim Demaille <akim@epita.fr>
16929
16930 Grammar declarations may be found in the grammar section.
16931
16932 * src/parse-gram.y (rules_or_grammar_declaration): New.
16933 (declarations): Each declaration may end with a semicolon, not
16934 just...
16935 (grammar_declaration): `"%union"'.
16936 (grammar): Branch to rules_or_grammar_declaration.
16937
4515534c
AD
169382002-06-14 Akim Demaille <akim@epita.fr>
16939
16940 * src/main.c (main): Invoke scanner_free.
16941
f958596b
AD
169422002-06-14 Akim Demaille <akim@epita.fr>
16943
16944 * src/output.c (m4_invoke): Extracted from...
16945 (output_skeleton): here.
16946 Free tempfile.
16947
2c569025
AD
169482002-06-14 Akim Demaille <akim@epita.fr>
16949
16950 * src/parse-gram.y (directives, directive, gram)
16951 (grammar_directives, precedence_directives, precedence_directive):
16952 Rename as...
16953 (declarations, declaration, grammar, grammar_declaration)
16954 (precedence_declaration, precedence_declarator): these.
16955 (symbol_declaration): New.
16956
592e8d4d
AD
169572002-06-14 Akim Demaille <akim@epita.fr>
16958
16959 * src/files.c (action_obstack): Remove, unused.
16960 (output_obstack): Remove it, and all its dependencies, as it is no
16961 longer needed.
16962 * src/reader.c (epilogue_set): Build the epilogue in the
16963 muscle_obstack.
16964 * src/output.h, src/output.c (muscle_obstack): Move to...
16965 * src/muscle_tab.h, src/muscle_tab.h: here.
16966 (muscle_init): Initialize muscle_obstack.
16967 (muscle_free): New.
16968 * src/main.c (main): Call it.
16969
0c15323d
AD
169702002-06-14 Akim Demaille <akim@epita.fr>
16971
16972 * src/location.h: New, extracted from...
16973 * src/reader.h: here.
16974 * src/Makefile.am (noinst_HEADERS): Merge into
16975 (bison_SOURCES): this.
16976 Add location.h.
16977 * src/parse-gram.y: Use location_t instead of Bison's.
16978 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16979 Use location_t instead of ints.
16980
e96c9728
AD
169812002-06-14 Akim Demaille <akim@epita.fr>
16982
16983 * data/bison.simple, data/bison.c++: Be sure to restore the
16984 current #line when returning to the skeleton contents after having
16985 exposed the input file's #line.
16986
75d1fe16
AD
169872002-06-12 Akim Demaille <akim@epita.fr>
16988
16989 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16990 eager.
16991 * tests/actions.at (Exotic Dollars): New.
16992
6c35d22c
AD
169932002-06-12 Akim Demaille <akim@epita.fr>
16994
16995 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16996 ['"/] too eagerly.
16997 * tests/input.at (Torturing the Scanner): New.
16998
1d6412ad
AD
169992002-06-11 Akim Demaille <akim@epita.fr>
17000
17001 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17002 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17003 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17004 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17005 * src/reader.c (reader): Use it.
17006
4cdb01db
AD
170072002-06-11 Akim Demaille <akim@epita.fr>
17008
17009 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17010 Adjust all callers.
17011 (scanner_last_string_free): New.
17012
44995b2e
AD
170132002-06-11 Akim Demaille <akim@epita.fr>
17014
17015 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17016 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17017 (last_string, YY_OBS_FREE): New.
17018 Use them when returning an ID.
17019
e9955c83
AD
170202002-06-11 Akim Demaille <akim@epita.fr>
17021
17022 Have Bison grammars parsed by a Bison grammar.
17023
17024 * src/reader.c, src/reader.h (prologue_augment): New.
17025 * src/reader.c (copy_definition): Remove.
17026
17027 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17028 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17029 (grammar_current_rule_prec_set, grammar_current_rule_check)
17030 (grammar_current_rule_symbol_append)
17031 (grammar_current_rule_action_append): Export.
17032 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17033 (symbol_list_action_append): Remove.
17034 Hook the routines from reader.
17035 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17036 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17037
17038 * src/reader.c (read_declarations): Remove, unused.
17039
17040 * src/parse-gram.y: Handle the epilogue.
17041 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17042 (grammar_start_symbol_set): this.
17043 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17044 * src/reader.c (readgram): Remove, unused.
17045 (reader): Adjust to insert eoftoken and axiom where appropriate.
17046
17047 * src/reader.c (copy_dollar): Replace with...
17048 * src/scan-gram.h (handle_dollar): this.
17049 * src/parse-gram.y: Remove `%thong'.
17050
17051 * src/reader.c (copy_at): Replace with...
17052 * src/scan-gram.h (handle_at): this.
17053
17054 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17055 New.
17056
17057 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17058 time being.
17059
17060 * src/reader.h, src/reader.c (grammar_rule_end): New.
17061
17062 * src/parse.y (current_type, current_class): New.
17063 Implement `%nterm', `%token' support.
17064 Merge `%term' into `%token'.
17065 (string_as_id): New.
17066 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17067 type name.
17068
17069 * src/parse-gram.y: Be sure to handle properly the beginning of
17070 rules.
17071
17072 * src/parse-gram.y: Handle %type.
17073 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17074
17075 * src/parse-gram.y: More directives support.
17076 * src/options.c: No longer handle source directives.
17077
17078 * src/parse-gram.y: Fix %output.
17079
17080 * src/parse-gram.y: Handle %union.
17081 Use the prologue locations.
17082 * src/reader.c (parse_union_decl): Remove.
17083
17084 * src/reader.h, src/reader.c (epilogue_set): New.
17085 * src/parse-gram.y: Use it.
17086
17087 * data/bison.simple, data/bison.c++: b4_stype is now either not
17088 defined, then default to int, or to the contents of %union,
17089 without `union' itself.
17090 Adjust.
17091 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17092
17093 * src/output.c (actions_output): Don't output braces, as they are
17094 already handled by the scanner.
17095
17096 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17097 characters to themselves.
17098
17099 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17100 that the epilogue has a proper #line.
17101
17102 * src/parse-gram.y: Handle precedence/associativity.
17103
17104 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17105 a terminal.
17106 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17107 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17108 at all to define terminals that cannot be emitted.
17109
17110 * src/scan-gram.l: Escape M4 characters.
17111
17112 * src/scan-gram.l: Working properly with escapes in user
17113 strings/characters.
17114
17115 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17116 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17117 grammar.
17118 Use more modest sizes, as for the time being the parser does not
17119 release memory, and therefore the process swallows a huge amount
17120 of memory.
17121
17122 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17123 stricter %token grammar.
17124
17125 * src/symtab.h (associativity): Add `undef_assoc'.
17126 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17127 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17128
17129 * tests/regression.at (Invalid %directive): Remove, as it is now
17130 meaningless.
17131 (Invalid inputs): Adjust to the new error messages.
17132 (Token definitions): The new grammar doesn't allow too many
17133 eccentricities.
17134
17135 * src/lex.h, src/lex.c: Remove.
17136 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17137 (copy_character, copy_string2, copy_string, copy_identifier)
17138 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17139 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17140 (parse_action): Remove.
17141 * po/POTFILES.in: Adjust.
17142
2e047461
AD
171432002-06-11 Akim Demaille <akim@epita.fr>
17144
cd05d13c 17145 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
17146 rule's action member: return the action as a string.
17147 Don't require `rule_length' as an argument: compute it.
17148 (grammar_current_rule_symbol_append)
17149 (grammar_current_rule_action_append): New, eved out from
17150 (readgram): here.
17151 Remove `action_flag', `rulelength', unused now.
17152
9af3fbce
AD
171532002-06-11 Akim Demaille <akim@epita.fr>
17154
17155 * src/reader.c (grammar_current_rule_prec_set).
17156 (grammar_current_rule_check): New, eved out from...
17157 (readgram): here.
17158 Remove `xaction', `first_rhs': useless.
17159 * tests/input.at (Type clashes): New.
17160 * tests/existing.at (GNU Cim Grammar): Adjust.
17161
1485e106
AD
171622002-06-11 Akim Demaille <akim@epita.fr>
17163
17164 * src/reader.c (grammar_midrule_action): New, Eved out from
17165 (readgram): here.
17166
da4160c3
AD
171672002-06-11 Akim Demaille <akim@epita.fr>
17168
17169 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17170 New.
17171 (readgram): Use them as replacement of inlined code, crule and
17172 crule1.
17173
f6d0f937
AD
171742002-06-11 Akim Demaille <akim@epita.fr>
17175
17176 * src/reader.c (grammar_end, grammar_symbol_append): New.
17177 (readgram): Use them.
17178 Make the use of `p' as local as possible.
17179
69078d4b
AD
171802002-06-10 Akim Demaille <akim@epita.fr>
17181
17182 GCJ's parser requires the tokens to be defined before the prologue.
17183
17184 * data/bison.simple: Output the token definition before the user's
17185 prologue.
17186 * tests/regression.at (Braces parsing, Duplicate string)
17187 (Mixing %token styles): Check the output from bison.
17188 (Early token definitions): New.
17189
5e424082
AD
171902002-06-10 Akim Demaille <akim@epita.fr>
17191
17192 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17193 assigning twice the same user number to a token, so that we can
17194 use it in...
17195 * src/lex.c (lex): here.
17196 Also use `symbol_class_set' instead of hand written code.
17197 * src/reader.c (parse_assoc_decl): Likewise.
17198
44536b35
AD
171992002-06-10 Akim Demaille <akim@epita.fr>
17200
17201 * src/symtab.c, src/symtab.c (symbol_class_set)
17202 (symbol_user_token_number_set): New.
17203 * src/reader.c (parse_token_decl): Use them.
17204 Use a switch instead of ifs.
17205 Use a single argument.
17206
8b9f2372
AD
172072002-06-10 Akim Demaille <akim@epita.fr>
17208
17209 Remove `%thong' support as it is undocumented, unused, duplicates
17210 `%token's job, and creates useless e-mail traffic with people who
17211 want to know what it is, why it is undocumented, unused, and
17212 duplicates `%token's job.
17213
17214 * src/reader.c (parse_thong_decl): Remove.
17215 * src/options.c (option_table): Remove "thong".
17216 * src/lex.h (tok_thong): Remove.
17217
3ae2b51f
AD
172182002-06-10 Akim Demaille <akim@epita.fr>
17219
17220 * src/symtab.c, src/symtab.c (symbol_type_set)
17221 (symbol_precedence_set): New.
17222 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17223 (value_components_used): Remove, unused.
17224
2f1afb73
AD
172252002-06-09 Akim Demaille <akim@epita.fr>
17226
17227 Move symbols handling code out of the reader.
17228
17229 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17230 (axiom): Move to...
17231 * src/symtab.h, src/symtab.c: here.
17232
17233 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17234 * src/reader.c (startval): Rename as...
17235 * src/symtab.h, src/symtab.c (startsymbol): this.
17236 * src/reader.c: Adjust.
17237
17238 * src/reader.c (symbol_check_defined, symbol_make_alias)
17239 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17240 (token_translations_init)
17241 Move to...
17242 * src/symtab.c: here.
17243 * src/reader.c (packsymbols): Move to...
17244 * src/symtab.h, src/symtab.c (symbols_pack): here.
17245 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17246 argument.
17247
e9bca3ad
AD
172482002-06-03 Akim Demaille <akim@epita.fr>
17249
17250 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17251 then statements.
17252
86eff183
AD
172532002-06-03 Akim Demaille <akim@epita.fr>
17254
17255 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17256 structs with non literals.
17257 * src/scan-skel.l: never-interactive.
17258 * src/conflicts.c (enum conflict_resolution_e): No trailing
17259 comma.
17260 * src/getargs.c (usage): Split long literal strings.
17261 Reported by Hans Aberg.
17262
717be197
AD
172632002-05-28 Akim Demaille <akim@epita.fr>
17264
17265 * data/bison.c++: Use C++ ostreams.
17266 (cdebug_): New member.
17267
670ddffd
AD
172682002-05-28 Akim Demaille <akim@epita.fr>
17269
17270 * src/output.c (output_skeleton): Be sure to allocate enough room
17271 for `/' _and_ for `\0' in full_skeleton.
17272
769b430f
AD
172732002-05-28 Akim Demaille <akim@epita.fr>
17274
17275 * data/bison.c++: Catch up with bison.simple:
17276 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17277 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17278 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17279 and popping traces.
17280
7067cb36
PH
172812002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17282
17283 * src/output.c (output_skeleton): Put an explicit path in front of
17284 the skeleton file name, rather than relying on the -I directory,
17285 to partially alleviate effects of having a skeleton file lying around
17286 in the current directory.
769b430f 17287
4a713ec2
PH
172882002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17289
769b430f 17290 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
17291 obstack_printf should be obstack_fgrow1.
17292
b408954b
AD
172932002-05-26 Akim Demaille <akim@epita.fr>
17294
17295 * src/state.h (state_t): `solved_conflicts' is a new member.
17296 * src/LR0.c (new_state): Set it to 0.
17297 * src/conflicts.h, src/conflicts.c (print_conflicts)
17298 (free_conflicts, solve_conflicts): Rename as...
17299 (conflicts_print, conflicts_free, conflicts_solve): these.
17300 Adjust callers.
17301 * src/conflicts.c (enum conflict_resolution_e)
17302 (solved_conflicts_obstack): New, used by...
17303 (log_resolution): this.
17304 Adjust to attach the conflict resolution to each state.
17305 Complete the description with the precedence/associativity
17306 information.
17307 (resolve_sr_conflict): Adjust.
17308 * src/print.c (print_state): Output its solved_conflicts.
17309 * tests/conflicts.at (Unresolved SR Conflicts)
17310 (Solved SR Conflicts): Exercise --report=all.
17311
a49aecd5
AD
173122002-05-26 Akim Demaille <akim@epita.fr>
17313
17314 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17315 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17316 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17317 (token_number_t, item_number_as_token_number)
17318 (token_number_as_item_number, muscle_insert_token_number_table):
17319 Rename as...
17320 (symbol_number_t, item_number_as_symbol_number)
17321 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17322 these, since it is more appropriate.
17323
5504898e
AD
173242002-05-26 Akim Demaille <akim@epita.fr>
17325
17326 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17327 `Error:' lines.
17328 * data/bison.simple (yystos) [YYDEBUG]: New.
17329 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17330 error recovery.
17331 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17332
ec3bc396
AD
173332002-05-25 Akim Demaille <akim@epita.fr>
17334
17335 * doc/bison.texinfo (Debugging): Split into...
17336 (Tracing): this new section, its former contents, and...
17337 (Understanding): this new section.
17338 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17339 by...
17340 (report_flag): this.
17341 Adjust all dependencies.
17342 (report_args, report_types, report_argmatch): New.
17343 (usage, getargs): Report/support -r, --report.
17344 * src/options.h
17345 (struct option_table_struct): Rename as..,
17346 (struct option_table_s): this.
17347 Rename the `set_flag' member to `flag' to match with getopt_long's
17348 struct.
17349 * src/options.c (option_table): Split verbose into an entry for
17350 %verbose, and another for --verbose.
17351 Support --report/-r, so remove -r from the obsolete --raw.
17352 * src/print.c: Attach full item sets and lookaheads reports to
17353 report_flag instead of trace_flag.
17354 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17355
78df8250
PE
173562002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17357 and Paul Eggert <eggert@twinsun.com>
769b430f 17358
78df8250
PE
17359 * data/bison.simple (yyparse): Correct error handling to conform to
17360 POSIX and yacc. Specifically, after syntax error is discovered,
17361 do not reduce further before shifting the error token.
17362 Clean up the code a bit by removing the labels yyerrdefault,
17363 yyerrhandle, yyerrpop.
17364 * NEWS: Document the above.
17365
c0c9ea05
PH
173662002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17367
17368 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17369 type; it isn't always big enough, since it doesn't necessarily
17370 include non-terminals.
769b430f 17371 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
17372 the latter can be removed.
17373 (yy_token_number_type): Remove, only one use.
17374 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17375 don't use TokenNumberType as element type.
769b430f 17376
c0c9ea05
PH
17377 * tests/regression.at: Modify expected output to agree with change
17378 to yyr1 and yytranslate.
769b430f 17379
6390a83f
FK
173802002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17381
17382 * src/reader.c (parse_action): Use copy_character instead of
17383 obstack_1grow.
17384
db7c8e9a
AD
173852002-05-13 Akim Demaille <akim@epita.fr>
17386
17387 * tests/regression.at (Token definitions): Prototype yylex and
17388 yyerror.
17389
fcc61800
PH
173902002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17391
158c687b 17392 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
17393 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17394 32-bit arithmetic.
17395 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17396
5683e9b2
AD
173972002-05-07 Akim Demaille <akim@epita.fr>
17398
17399 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17400 avoid GCC warnings.
17401
0c2d3f4c
AD
174022002-05-07 Akim Demaille <akim@epita.fr>
17403
17404 Kill GCC warnings.
17405
17406 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17407 over the RHS of each rule.
17408 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17409 * src/state.h (state_t): Member `nitems' is unsigned short.
17410 * src/LR0.c (get_state): Adjust.
17411 * src/reader.c (packgram): Likewise.
17412 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17413 `Type'.
17414 (muscle_insert_int_table): Remove, unused.
17415 (prepare_rules): Remove `max'.
17416
1565b720
AD
174172002-05-06 Akim Demaille <akim@epita.fr>
17418
17419 * src/closure.c (print_firsts): Display of the symbol tags.
17420 (bitmatrix_print): Move to...
17421 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17422 here.
17423 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17424
cfaee611
AD
174252002-05-06 Akim Demaille <akim@epita.fr>
17426
17427 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17428 hash_do_for_each.
17429
458be8e0
AD
174302002-05-06 Akim Demaille <akim@epita.fr>
17431
17432 * src/LR0.c (new_state, get_state): Instead of using the global
17433 `kernel_size' and `kernel_base', have two new arguments:
17434 `core_size' and `core'.
17435 Adjust callers.
17436
a900a624
AD
174372002-05-06 Akim Demaille <akim@epita.fr>
17438
17439 * src/reader.c (packgram): No longer end `ritem' with a 0
17440 sentinel: it is not used.
17441
d4e7d3a1
AD
174422002-05-05 Akim Demaille <akim@epita.fr>
17443
17444 New experimental feature: display the lookaheads in the report and
17445 graph.
17446
17447 * src/print (print_core): When --trace-flag, display the rules
17448 lookaheads.
17449 * src/print_graph.c (print_core): Likewise.
17450 Swap the arguments.
17451 Adjust caller.
17452
39ceb25b
AD
174532002-05-05 Akim Demaille <akim@epita.fr>
17454
17455 * tests/torture.at (Many lookaheads): New test.
17456
5372019f
AD
174572002-05-05 Akim Demaille <akim@epita.fr>
17458
17459 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17460 (GENERATE_MUSCLE_INSERT_TABLE): this.
17461 (output_int_table, output_unsigned_int_table, output_short_table)
17462 (output_token_number_table, output_item_number_table): Replace with...
17463 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17464 (muscle_insert_short_table, muscle_insert_token_number_table)
17465 (muscle_insert_item_number_table): these.
17466 Adjust all callers.
17467 (prepare_tokens): Don't free `translations', since...
17468 * src/reader.h, src/reader.c (grammar_free): do it.
17469 Move to...
17470 * src/gram.h, src/gram.c (grammar_free): here.
17471 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17472 b4_translate_max.
17473
5df5f6d5
AD
174742002-05-05 Akim Demaille <akim@epita.fr>
17475
17476 * src/output.c (output_unsigned_int_table): New.
17477 (prepare_rules): `i' is unsigned.
17478 `prhs', `rline', `r2' are unsigned int.
17479 Rename muscle `rhs_number_max' as `rhs_max'.
17480 Output muscles `prhs_max', `rline_max', and `r2_max'.
17481 Free rline and r1.
17482 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17483 to compute types instead of constant types.
17484 * tests/regression.at (Web2c Actions): Adjust.
17485
b87f8b21
AD
174862002-05-04 Akim Demaille <akim@epita.fr>
17487
17488 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17489 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17490 Adjust dependencies.
17491 * src/output.c (token_definitions_output): Be sure not to output a
17492 `#define 'a'' when fed with `%token 'a' "a"'.
17493 * tests/regression.at (Token definitions): New.
17494
8bb936e4
PE
174952002-05-03 Paul Eggert <eggert@twinsun.com>
17496
17497 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17498 for K&R C.
17499
175002002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17501
17502 * Makefile.am (SUBDIRS): Remove intl.
17503 (EXTRA_DIST): Add config/config.rpath.
17504
53c71a12
AD
175052002-05-03 Akim Demaille <akim@epita.fr>
17506
17507 * data/bison.simple (m4_if): Don't output empty enums.
17508 And actually, output valid enum definitions :(.
17509
289dd0cf
AD
175102002-05-03 Akim Demaille <akim@epita.fr>
17511
17512 * configure.bat: Remove, completely obsolete.
17513 * Makefile.am (EXTRA_DIST): Adjust.
17514 Don't distribute config.rpath...
17515 * config/Makefile.am (EXTRA_DIST): Do it.
17516
db85e524
AD
175172002-05-03 Akim Demaille <akim@epita.fr>
17518
17519 * configure.in (GETTEXT_VERSION): New.
17520 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17521
83ccf991
AD
175222002-05-03 Akim Demaille <akim@epita.fr>
17523
17524 * data/bison.simple (b4_token_enum): New.
17525 (b4_token_defines): Use it to output tokens both as #define and
17526 enums.
17527 Suggested by Paul Eggert.
17528 * src/output.c (token_definitions_output): Don't output spurious
17529 white spaces.
17530
1f418995
AD
175312002-05-03 Akim Demaille <akim@epita.fr>
17532
17533 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17534
45119f04
RA
175352002-05-02 Robert Anisko <robert@lrde.epita.fr>
17536
17537 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17538 Update the stack class, give a try to deque as the default container.
17539
b2d52318
AD
175402002-05-02 Akim Demaille <akim@epita.fr>
17541
17542 * data/bison.simple (yyparse): Do not implement @$ = @1.
17543 (YYLLOC_DEFAULT): Adjust to do it.
17544 * doc/bison.texinfo (Location Default Action): Fix.
17545
3a8b4109
AD
175462002-05-02 Akim Demaille <akim@epita.fr>
17547
17548 * src/reader.c (parse_braces): Merge into...
17549 (parse_action): this.
17550
84614e13
AD
175512002-05-02 Akim Demaille <akim@epita.fr>
17552
17553 * configure.in (ALL_LINGUAS): Remove.
17554 * po/LINGUAS, hr.po: New.
17555
fdbcd8e2
AD
175562002-05-02 Akim Demaille <akim@epita.fr>
17557
17558 Remove the so called hairy (semantic) parsers.
17559
17560 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17561 * src/gram.h, src/gram.c (semantic_parser): Remove.
17562 (rule_t): Remove the guard and guard_line members.
17563 * src/lex.h (token_t): remove tok_guard.
17564 * src/options.c (option_table): Remove %guard and %semantic_parser
17565 support.
17566 * src/output.c, src/output.h (guards_output): Remove.
17567 (prepare): Adjust.
17568 (token_definitions_output): Don't output the `T'
17569 tokens (???).
17570 (output_skeleton): Don't output the guards.
17571 * src/files.c, src/files.c (attrsfile): Remove.
17572 * src/reader.c (symbol_list): Remove the guard and guard_line
17573 members.
17574 Adjust dependencies.
17575 (parse_guard): Remove.
17576 * data/bison.hairy: Remove.
17577 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17578 BISON_HAIRY.
17579
82b6cb3f
AD
175802002-05-02 Akim Demaille <akim@epita.fr>
17581
17582 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17583 (parse_guard): Rename the formal argument `stack_offset' as
17584 `rule_length', which is more readable.
17585 Adjust callers.
17586 (copy_at, copy_dollar): Instead of outputting the hard coded
17587 values of $$, $n and so forth, output invocation to b4_lhs_value,
17588 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
17589 Note: this patch partially drops `semantic-parser' support: it
17590 always does `rule_length - n', where semantic parsers ought to
17591 always use `-n'.
82b6cb3f
AD
17592 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17593 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17594
6cbfbcc5
AD
175952002-05-02 Akim Demaille <akim@epita.fr>
17596
17597 * configure.in (AC_INIT): Bump to 1.49b.
17598 (AM_INIT_AUTOMAKE): Short invocation.
17599
b8548114
AD
176002002-05-02 Akim Demaille <akim@epita.fr>
17601
17602 Version 1.49a.
17603
c20cd1fa
AD
176042002-05-01 Akim Demaille <akim@epita.fr>
17605
17606 * src/skeleton.h: Remove.
17607
8a9566d4
AD
176082002-05-01 Akim Demaille <akim@epita.fr>
17609
17610 * src/skeleton.h: Fix the #endif.
17611 Reported by Magnus Fromreide.
17612
8c6d399a
PE
176132002-04-26 Paul Eggert <eggert@twinsun.com>
17614
17615 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17616 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 17617 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 17618
2b7ed18a
RA
176192002-04-25 Robert Anisko <robert@lrde.epita.fr>
17620
17621 * src/scan-skel.l: Postprocess quadrigraphs.
17622
17623 * src/reader.c (copy_character): New function, used to output
17624 single characters while replacing `[' and `]' with quadrigraphs, to
17625 avoid troubles with M4 quotes.
17626 (copy_comment): Output characters with copy_character.
17627 (read_additionnal_code): Likewise.
17628 (copy_string2): Likewise.
17629 (copy_definition): Likewise.
17630
17631 * tests/calc.at: Exercise M4 quoting.
17632
34a89c50
AD
176332002-04-25 Akim Demaille <akim@epita.fr>
17634
17635 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17636 between `!' and the command.
17637 Reported by Paul Eggert.
17638
0dd1580a
RA
176392002-04-24 Robert Anisko <robert@lrde.epita.fr>
17640
17641 * tests/calc.at: Exercise prologue splitting.
17642
17643 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17644 `b4_post_prologue' instead of `b4_prologue'.
17645
17646 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17647 muscles.
17648 (output): Free pre_prologue_obstack and post_prologue_obstack.
17649 * src/files.h, src/files.c (attrs_obstack): Remove.
17650 (pre_prologue_obstack, post_prologue_obstack): New.
17651 * src/reader.c (copy_definition): Add a parameter to specify the
17652 obstack to fill, instead of using attrs_obstack unconditionally.
17653 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17654 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17655
83c1796f
PE
176562002-04-23 Paul Eggert <eggert@twinsun.com>
17657
17658 * data/bison.simple: Remove unnecessary commentary and white
17659 space differences from 1_29-branch.
17660 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17661
17662 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17663 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17664 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17665 constructors or destructors.
17666
17667 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17668
1207eeac
AD
176692002-04-23 Akim Demaille <akim@epita.fr>
17670
17671 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17672 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17673 location with columns.
17674 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17675 All reported by Paul Eggert.
17676
78ab8f67
AD
176772002-04-22 Akim Demaille <akim@epita.fr>
17678
17679 * src/reduce.c (dump_grammar): Move to...
17680 * src/gram.h, src/gram.c (grammar_dump): here.
17681 Be sure to separate long item numbers.
17682 Don't read the members of a rule's prec if its nil.
17683
133c20e2
AD
176842002-04-22 Akim Demaille <akim@epita.fr>
17685
17686 * src/output.c (table_size, table_grow): New.
17687 (MAXTABLE): Remove, replace uses with table_size.
17688 (pack_vector): Instead of dying when the table is too big, grow it.
17689
9515e8a7
AD
176902002-04-22 Akim Demaille <akim@epita.fr>
17691
17692 * data/bison.simple (yyr1): Its type is that of a token number.
17693 * data/bison.c++ (r1_): Likewise.
17694 * tests/regression.at (Web2c Actions): Adjust.
17695
23c5a174
AD
176962002-04-22 Akim Demaille <akim@epita.fr>
17697
17698 * src/reader.c (token_translations_init): 256 is now the default
17699 value for the error token, i.e., it will be assigned another
17700 number if the user assigned 256 to one of her tokens.
17701 (reader): Don't force 256 to error.
17702 * doc/bison.texinfo (Symbols): Adjust.
17703 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17704 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17705 etc. instead of 10, 20, 30 (which was used to `jump' over error
17706 (256) and undefined (2)).
17707
5fbb0954
AD
177082002-04-22 Akim Demaille <akim@epita.fr>
17709
17710 Propagate more token_number_t.
17711
17712 * src/gram.h (token_number_as_item_number)
17713 (item_number_as_token_number): New.
17714 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17715 Use it to create output_item_number_table and
17716 output_token_number_table.
17717 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17718 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17719 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17720 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17721
4f940944
AD
177222002-04-22 Akim Demaille <akim@epita.fr>
17723
17724 * src/output.h, src/output.c (get_lines_number): Remove.
17725
3ded9a63
AD
177262002-04-19 Akim Demaille <akim@epita.fr>
17727
17728 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17729 as Lex/Flex'.
17730 (Debugging): More details about enabling the debugging features.
17731 (Table of Symbols): Describe $$, $n, @$, and @n.
17732 Suggested by Tim Josling.
17733
e0c471a9
AD
177342002-04-19 Akim Demaille <akim@epita.fr>
17735
17736 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17737
fecc10cd
AD
177382002-04-10 Akim Demaille <akim@epita.fr>
17739
17740 * src/system.h: Rely on HAVE_LIMITS_H.
17741 Suggested by Paul Eggert.
17742
51dec47b
AD
177432002-04-09 Akim Demaille <akim@epita.fr>
17744
17745 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17746 full stderr, and strip it according to the bison options, instead
17747 of composing the error message from different bits.
17748 This makes it easier to check for several error messages.
17749 Adjust all the invocations.
17750 Add an invocation exercising the error token.
17751 Add an invocation demonstrating a stupid error message.
17752 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17753 Adjust the tests.
17754 Error message are for stderr, not stdout.
17755
007a50a4
AD
177562002-04-09 Akim Demaille <akim@epita.fr>
17757
17758 * src/gram.h, src/gram.c (error_token_number): Remove, use
17759 errtoken->number.
17760 * src/reader.c (reader): Don't specify the user token number (2)
17761 for $undefined, as it uselessly prevents using it.
17762 * src/gram.h (token_number_t): Move to...
17763 * src/symtab.h: here.
17764 (state_t.number): Is a token_number_t.
17765 * src/print.c, src/reader.c: Use undeftoken->number instead of
17766 hard coded 2.
17767 (Even though this 2 is not the same as above: the number of the
17768 undeftoken remains being 2, it is its user token number which
17769 might not be 2).
17770 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17771 `user_token_number_max'.
17772 Output `undef_token_number'.
17773 * data/bison.simple, data/bison.c++: Use them.
17774 Be sure to map invalid yylex return values to
17775 `undef_token_number'. This saves us from gratuitous SEGV.
17776
17777 * tests/conflicts.at (Solved SR Conflicts)
17778 (Unresolved SR Conflicts): Adjust.
17779 * tests/regression.at (Web2c Actions): Adjust.
17780
06446ccf
AD
177812002-04-08 Akim Demaille <akim@epita.fr>
17782
17783 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17784 Adding #line.
17785 Remove the duplicate `typedefs'.
17786 (RhsNumberType): Fix the declaration and various other typos.
17787 Use __ofile__.
17788 * data/bison.simple: Use __ofile__.
17789 * src/scan-skel.l: Handle __ofile__.
17790
62a3e4f0
AD
177912002-04-08 Akim Demaille <akim@epita.fr>
17792
17793 * src/gram.h (item_number_t): New, the type of item numbers in
17794 RITEM. Note that it must be able to code symbol numbers as
17795 positive number, and the negation of rule numbers as negative
17796 numbers.
17797 Adjust all dependencies (pretty many).
17798 * src/reduce.c (rule): Remove this `short *' pointer: use
17799 item_number_t.
17800 * src/system.h (MINSHORT, MAXSHORT): Remove.
17801 Include `limits.h'.
17802 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17803 (shortcpy): Remove.
17804 (MAXTABLE): Move to...
17805 * src/output.c (MAXTABLE): here.
17806 (prepare_rules): Use output_int_table to output rhs.
17807 * data/bison.simple, data/bison.c++: Adjust.
17808 * tests/torture.at (Big triangle): Move the limit from 254 to
17809 500.
17810 * tests/regression.at (Web2c Actions): Ajust.
17811
17812 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17813 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17814 passes, but produces negative #line number, once fixed, GCC is
17815 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17816 C), it passes.
17817 * src/state.h (state_h): Code input lines on ints, not shorts.
17818
bb88b0fc
AD
178192002-04-08 Akim Demaille <akim@epita.fr>
17820
17821 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17822 and then the grammar.
17823
9a636f47
AD
178242002-04-08 Akim Demaille <akim@epita.fr>
17825
17826 * src/system.h: No longer using strndup.
17827
680e8701
AD
178282002-04-07 Akim Demaille <akim@epita.fr>
17829
17830 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17831 * src/output.c (output_table_data): Return the longest number.
17832 (prepare_tokens): Output `token_number_max').
17833 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17834 New.
17835 Use them to define yy_token_number_type/TokenNumberType.
17836 Use this type for yytranslate.
17837 * tests/torture.at (Big triangle): Push the limit from 124 to
17838 253.
17839 * tests/regression.at (Web2c Actions): Adjust.
17840
817e9f41
AD
178412002-04-07 Akim Demaille <akim@epita.fr>
17842
17843 * tests/torture.at (Big triangle): New.
17844 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17845 * tests/existing.at: here.
17846
5123689b
AD
178472002-04-07 Akim Demaille <akim@epita.fr>
17848
17849 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17850 nritems.
17851 Adjust dependencies.
17852
f3849179
AD
178532002-04-07 Akim Demaille <akim@epita.fr>
17854
17855 * src/reader.c: Normalize increments to prefix form.
17856
bd02036a
AD
178572002-04-07 Akim Demaille <akim@epita.fr>
17858
17859 * src/reader.c, symtab.c: Remove debugging code.
17860
db8837cb
AD
178612002-04-07 Akim Demaille <akim@epita.fr>
17862
17863 Rename all the `bucket's as `symbol_t'.
17864
17865 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17866 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17867 * src/symtab.c, src/symtab.h (bucket): Rename as...
17868 (symbol_t): this.
17869 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17870 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17871 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17872 (buckets_new, buckets_free, buckets_do): Rename as...
17873 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17874 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17875 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17876 (symbols_new, symbols_free, symbols_do): these.
17877
72a23c97
AD
178782002-04-07 Akim Demaille <akim@epita.fr>
17879
17880 Use lib/hash for the symbol table.
17881
17882 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17883 EOF.
17884 * src/lex.c (lex): Set the `number' member of new terminals.
17885 * src/reader.c (bucket_check_defined, bucket_make_alias)
17886 (bucket_check_alias_consistence, bucket_translation): New.
17887 (reader, grammar_free, readgram, token_translations_init)
17888 (packsymbols): Adjust.
17889 (reader): Number the predefined tokens.
17890 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17891 for predefined tokens.
17892 * src/symtab.h (bucket): Remove all the hash table related
17893 members.
17894 * src/symtab.c (symtab): Replace by...
17895 (bucket_table): this.
17896 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17897 (buckets_new, buckets_do): New.
17898
280a38c3
AD
178992002-04-07 Akim Demaille <akim@epita.fr>
17900
17901 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17902 (start_symbol, max_user_token_number, semantic_parser)
17903 (error_token_number): Initialize.
17904 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17905 Initialize.
17906 (reader): Don't.
17907 (errtoken, eoftoken, undeftoken, axiom): Extern.
17908
03b31c0c
AD
179092002-04-07 Akim Demaille <akim@epita.fr>
17910
17911 * src/gram.h (rule_s): prec and precsym are now pointers
17912 to the bucket giving the priority/associativity.
17913 Member `associativity' removed: useless.
17914 * src/reduce.c, src/conflicts.c: Adjust.
17915
8b3df748
AD
179162002-04-07 Akim Demaille <akim@epita.fr>
17917
17918 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17919 Properly escape the symbols' TAG when outputting them.
17920
e601aa1d
AD
179212002-04-07 Akim Demaille <akim@epita.fr>
17922
17923 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17924
b0299a2e
AD
179252002-04-07 Akim Demaille <akim@epita.fr>
17926
17927 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17928 (LArule): this, which is an array to rule_t*.
17929 * src/print.c, src/conflicts.c: Adjust.
17930
d7e1f00c
AD
179312002-04-07 Akim Demaille <akim@epita.fr>
17932
17933 * src/gram.h (rule_t): Rename `number' as `user_number'.
17934 `number' is a new member.
17935 Adjust dependencies.
17936 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17937
cc9305dd
AD
179382002-04-07 Akim Demaille <akim@epita.fr>
17939
17940 As a result of the previous patch, it is no longer needed
17941 to reorder ritem itself.
17942
17943 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17944
b0940840
AD
179452002-04-07 Akim Demaille <akim@epita.fr>
17946
17947 Be sure never to walk through RITEMS, but use only data related to
17948 the rules themselves. RITEMS should be banished.
17949
17950 * src/output.c (output_token_translations): Rename as...
17951 (prepare_tokens): this.
17952 In addition to `translate', prepare the muscles `tname' and
17953 `toknum', which were handled by...
17954 (output_rule_data): this.
17955 Remove, and move the remainder of its outputs into...
17956 (prepare_rules): this new routines, which also merges content from
17957 (output_gram): this.
17958 (prepare_rules): Be sure never to walk through RITEMS.
17959 (output_stos): Rename as...
17960 (prepare_stos): this.
17961 (output): Always invoke prepare_states, after all, just don't use it
17962 in the output if you don't need it.
17963
643a5994
AD
179642002-04-07 Akim Demaille <akim@epita.fr>
17965
17966 * src/LR0.c (new_state): Display `nstates' as the name of the
17967 newly created state.
17968 Adjust to initialize first_state and last_state if needed.
17969 Be sure to distinguish the initial from the final state.
17970 (new_states): Create the itemset of the initial state, and use
17971 new_state.
17972 * src/closure.c (closure): Now that the initial state has its
17973 items properly set, there is no need for a special case when
17974 creating `ruleset'.
17975
17976 As a result, now the rule 0, reducing to $axiom, is visible in the
17977 outputs. Adjust the test suite.
17978
17979 * tests/conflicts.at (Solved SR Conflicts)
17980 (Unresolved SR Conflicts): Adjust.
17981 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17982 * tests/conflicts.at (S/R in initial): New.
17983
b4c4ccc2
AD
179842002-04-07 Akim Demaille <akim@epita.fr>
17985
17986 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17987 the RHS of the rules.
17988 * src/output.c (output_gram): Likewise.
17989
bba97eb2
AD
179902002-04-07 Akim Demaille <akim@epita.fr>
17991
17992 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17993 bucket.
17994 Adjust all dependencies.
17995 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17996 `number' of the buckets too.
17997 * src/gram.h: Include `symtab.h'.
17998 (associativity): Move to...
17999 * src/symtab.h: here.
18000 No longer include `gram.h'.
18001
c3b407f4
AD
180022002-04-07 Akim Demaille <akim@epita.fr>
18003
18004 * src/gram.h, src/gram.c (rules_rhs_length): New.
18005 (ritem_longest_rhs): Use it.
18006 * src/gram.h (rule_t): `number' is a new member.
18007 * src/reader.c (packgram): Set it.
18008 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18009 the end of `rules', and count them out of `nrules'.
18010 (reduce_output, dump_grammar): Adjust.
18011 * src/print.c (print_grammar): It is no longer needed to check for
18012 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18013 * tests/reduce.at (Reduced Automaton): New test.
18014
11652ab3
AD
180152002-04-07 Akim Demaille <akim@epita.fr>
18016
18017 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18018 lacking `+ 1' to nrules, Bison reported as useless a token if it
18019 was used solely to set the precedence of the last rule...
18020
26b23c1a
AD
180212002-04-07 Akim Demaille <akim@epita.fr>
18022
18023 * data/bison.c++, data/bison.simple: Don't output the current file
18024 name in #line, to avoid useless diffs between two identical
18025 outputs under different names.
18026
18bcecb0
AD
180272002-04-07 Akim Demaille <akim@epita.fr>
18028
18029 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18030 Normalize loops to using `< nrules + 1', not `<= nrules'.
18031
fa770c86
AD
180322002-04-07 Akim Demaille <akim@epita.fr>
18033
18034 * TODO: Update.
18035
d9b739c3
AD
180362002-04-07 Akim Demaille <akim@epita.fr>
18037
18038 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18039 bucket.value as bucket.number.
18040
99013900
AD
180412002-04-07 Akim Demaille <akim@epita.fr>
18042
18043 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18044 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18045 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18046 RHS, instead of being an index in RITEMS.
18047
e966383b
PE
180482002-04-04 Paul Eggert <eggert@twinsun.com>
18049
18050 * doc/bison.texinfo: Update copyright date.
18051 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18052 (Symbols): Warn about running Bison in one character set,
18053 but compiling and/or running in an incompatible one.
18054 Warn about character code 256, too.
18055
180562002-04-03 Paul Eggert <eggert@twinsun.com>
18057
18058 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18059 YYERROR_VERBOSE is nonzero, not whether it is defined.
18060
18061 Merge changes from bison-1_29-branch.
c307773e 18062
8d6c48b9
PE
180632002-03-20 Paul Eggert <eggert@twinsun.com>
18064
18065 Merge fixes from Debian bison_1.34-1.diff.
18066
18067 * configure.in (AC_PREREQ): 2.53.
18068
e53c6322
AD
180692002-03-20 Akim Demaille <akim@epita.fr>
18070
18071 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18072
9ffbeca7
PE
180732002-03-19 Paul Eggert <eggert@twinsun.com>
18074
21db0b2a
PE
18075 * src/bison.simple (YYCOPY): New macro.
18076 (YYSTACK_RELOCATE): Use it.
18077 Remove Type arg; no longer needed. All callers changed.
18078 (yymemcpy): Remove; no longer needed.
18079
9ffbeca7
PE
18080 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18081 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18082
642cb8f8
AD
180832002-03-19 Akim Demaille <akim@epita.fr>
18084
18085 Test and fix the #line outputs.
18086
18087 * tests/atlocal.at (GCC): New.
18088 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 18089 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
18090 (Action synch line, Epilogue synch line): New tests.
18091 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18092 * data/bison.simple, data/bison.c++: Use it.
18093
3c31a486
AD
180942002-03-19 Akim Demaille <akim@epita.fr>
18095
18096 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18097 (Solved SR Conflicts, %expect not enough, %expect right)
18098 (%expect too much): Move to...
18099 * tests/conflicts.at: this new file.
18100
0d8bed56
AD
181012002-03-19 Akim Demaille <akim@epita.fr>
18102
18103 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18104 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18105 that we can move to enums for instance.
18106 * src/output.c (token_definitions_output): Output a list of
18107 `token-name, token-number' instead of the #define.
18108 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18109
9208d17f
AD
181102002-03-14 Akim Demaille <akim@epita.fr>
18111
18112 Use Gettext 0.11.1.
18113
af27eacb
RA
181142002-03-09 Robert Anisko <robert@lrde.epita.fr>
18115
18116 * data/bison.c++: Make the user able to add members to the generated
18117 parser by subclassing.
18118
9101a310
RA
181192002-03-05 Robert Anisko <robert@lrde.epita.fr>
18120
18121 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18122 a character.
18123 Reported by Nicolas Tisserand and Nicolas Burrus.
18124
fff9bf0b
RA
181252002-03-04 Robert Anisko <robert@lrde.epita.fr>
18126
18127 * src/reader.c: Warn about lacking semi-colons, do not complain.
18128
64dba31e
RA
181292002-03-04 Robert Anisko <robert@lrde.epita.fr>
18130
18131 * data/bison.c++: Remove a debug line.
18132
374f5a14
RA
181332002-03-04 Robert Anisko <robert@lrde.epita.fr>
18134
18135 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18136 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18137 provide a default implementation.
18138
bfcf1f3a
AD
181392002-03-04 Akim Demaille <akim@epita.fr>
18140
18141 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18142 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18143 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18144 * tests/semantic.at (Parsing Guards): Similarly.
18145 * src/reader.at (readgram): Complain if the last rule is not ended
18146 with a semi-colon.
18147
65ccf9fc
AD
181482002-03-04 Akim Demaille <akim@epita.fr>
18149
18150 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18151 * src/closure.c: here.
18152 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18153 RTC.
18154 * src/warshall.h, src/warshall.c: Remove.
18155 * tests/sets.at (Broken Closure): Adjust.
18156
d0039cbc
AD
181572002-03-04 Akim Demaille <akim@epita.fr>
18158
18159 * src/output.c (output_skeleton): tempdir is const.
18160 bytes_read is unused.
18161
345cea78
AD
181622002-03-04 Akim Demaille <akim@epita.fr>
18163
18164 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18165 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18166 Update.
18167 From Michael Hayes.
18168
564801f7
AD
181692002-03-04 Akim Demaille <akim@epita.fr>
18170
18171 * src/closure.c (closure): `r' is unused.
18172
e5352bc7
AD
181732002-03-04 Akim Demaille <akim@epita.fr>
18174
18175 * tests/sets.at (Broken Closure): Add the ending `;'.
18176 * src/reader.at (readgram): Complain if a rule is not ended with a
18177 semi-colon.
18178
914feea9
AD
181792002-03-04 Akim Demaille <akim@epita.fr>
18180
18181 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18182 (count_sr_conflicts): Use bitset_count.
18183 * src/reduce.c (inaccessable_symbols): Ditto.
18184 (bits_size): Remove.
18185 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18186
f0250de6
AD
181872002-03-04 Akim Demaille <akim@epita.fr>
18188
18189 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18190 * src/reduce.c: Remove the `bitset_zero's following the
18191 `bitset_create's, as now it is performed by the latter.
18192
ef017502
AD
181932002-03-04 Akim Demaille <akim@epita.fr>
18194
18195 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18196 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18197 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18198 latest sources from Michael.
18199
76514394
AD
182002002-03-04 Akim Demaille <akim@epita.fr>
18201
18202 * src/output.c (output): Don't free the grammar.
18203 * src/reader.c (grammar_free): New.
18204 * src/main.c (main): Call it and don't free symtab here.
18205
55024580
AD
182062002-03-04 Akim Demaille <akim@epita.fr>
18207
18208 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18209 before returning.
18210 Reported by Benoit Perrot.
18211
f9abaa2c
AD
182122002-03-04 Akim Demaille <akim@epita.fr>
18213
18214 Use bitset operations when possible, not loops over bits.
18215
18216 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18217 bitset_or.
18218 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18219 * src/reduce.c (useless_nonterminals): Formatting changes.
18220 * src/warshall.c (TC): Use bitset_or.
18221
0e721e75
AD
182222002-03-04 Akim Demaille <akim@epita.fr>
18223
18224 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18225 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18226 Ditto.
18227
0fb1ffb1
AD
182282002-03-04 Akim Demaille <akim@epita.fr>
18229
18230 * src/lalr.c (F): Now a bitset*.
18231 Adjust all dependencies.
18232
b86796bf
AD
182332002-03-04 Akim Demaille <akim@epita.fr>
18234
18235 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18236 Adjust all dependencies.
18237
602bbf31
AD
182382002-03-04 Akim Demaille <akim@epita.fr>
18239
18240 * src/L0.c, src/LR0.h (nstates): Be size_t.
18241 Adjust comparisons (signed vs unsigned).
18242 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18243 bitset*.
18244 Adjust all dependencies.
18245
d8a0245c
AD
182462002-03-04 Akim Demaille <akim@epita.fr>
18247
18248 * src/closure.c (firsts): Now, also a bitset.
18249 Adjust all dependencies.
18250 (varsetsize): Remove, now unused.
18251 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18252
34ba9743
AD
182532002-03-04 Akim Demaille <akim@epita.fr>
18254
18255 * src/print.c: Convert to use bitset.h, not hand coded iterations
18256 over ints.
18257
ed86e78c
AD
182582002-03-04 Akim Demaille <akim@epita.fr>
18259
18260 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18261
dfdb1797
AD
182622002-03-04 Akim Demaille <akim@epita.fr>
18263
18264 * src/closure.c (ruleset): Be a bitset.
18265 (rulesetsize): Remove.
18266
7086e707
AD
182672002-03-04 Akim Demaille <akim@epita.fr>
18268
18269 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18270 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18271 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18272 * src/closure.c (fderives): Be an array of bitsets.
18273
98254360
RA
182742002-02-28 Robert Anisko <robert@lrde.epita.fr>
18275
18276 * data/bison.c++: Merge the two generated headers. Insert a copyright
18277 notice in each output file.
18278
a75c057f
AD
182792002-02-28 Akim Demaille <akim@epita.fr>
18280
18281 * data/bison.c++: Copy the prologue of bison.simple to fetch
18282 useful M4 definitions, such as b4_header_guard.
18283
06b00abc
AD
182842002-02-25 Akim Demaille <akim@epita.fr>
18285
18286 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
18287 translator friendly scheme for the bgr
18288 copyright notice.
06b00abc 18289
70e7d534
AD
182902002-02-25 Akim Demaille <akim@epita.fr>
18291
18292 * src/output.c (header_output): Remove, now handled completely via
18293 M4.
18294
abe017f6
AD
182952002-02-25 Akim Demaille <akim@epita.fr>
18296
18297 * m4/m4.m4: New, from CVS Autoconf.
18298 * configure.in: Invoke it.
18299 * src/output.c (output_skeleton): Use its result instead of the
18300 hard coded name.
18301
381fb12e
AD
183022002-02-25 Akim Demaille <akim@epita.fr>
18303
18304 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18305 Fileutils 4.1.5.
18306 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18307 * src/output.c (output_skeleton): Use mkstemp to create a real
18308 temporary file.
18309 Move the filling of `skeleton' and its muscle to...
18310 (prepare): here.
18311 (output): Move the definition of the prologue muscle to...
18312 (prepare): here.
18313 * src/system.h (DEFAULT_TMPDIR): New.
18314
6f38107f
PE
183152002-02-14 Paul Eggert <eggert@twinsun.com>
18316
18317 Remove the support for C++ namespace cleanliness; it was
18318 causing more problems than it was curing, since it didn't work
18319 properly on some nonstandard C++ compilers. This can wait
18320 for a proper C++ parser.
18321
18322 * NEWS: Document this.
18323 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18324 of C++, as it's treated like C now.
18325 * src/bison.simple (YYSTD): Remove.
18326 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18327 Treat C++ just like Standard C instead of trying to support
18328 namespace cleanliness.
18329
80cce3da
AD
183302002-02-14 Akim Demaille <akim@epita.fr>
18331
18332 * tests/regression.at (else): Adjust to Andreas' change.
18333
842e8679
AD
183342002-02-14 Akim Demaille <akim@epita.fr>
18335
18336 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18337
4bda3f10
AD
183382002-02-13 Andreas Schwab <schwab@suse.de>
18339
18340 * src/output.c (output_rule_data): Don't output NULL, it might
18341 not be defined yet.
18342
4162fa07 183432002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 18344
4162fa07
RA
18345 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18346 (Copyright notice): Update.
b418ecd8 18347
bd16a5dc
AD
183482002-02-11 Akim Demaille <akim@epita.fr>
18349
18350 * tests/regression.at (%nonassoc and eof): Don't include
18351 nonportable headers.
18352
8d69a1a3
RA
183532002-02-08 Robert Anisko <robert@lrde.epita.fr>
18354
18355 * data/bison.c++: Correct error recovery. Make the user able to
18356 initialize the starting location.
18357
9b2d0677
AD
183582002-02-07 Akim Demaille <akim@epita.fr>
18359
18360 * tests/input.at: New.
18361
69e2658b
RA
183622002-02-07 Robert Anisko <robert@lrde.epita.fr>
18363
18364 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 18365 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
18366 directives around tables only needed for debugging.
18367
4aacc3a7
RA
183682002-02-07 Robert Anisko <robert@lrde.epita.fr>
18369
18370 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18371 C++ parsers.
18372 (yy::b4_name::parse): Use print_.
18373
762a801e
RA
183742002-02-07 Robert Anisko <robert@lrde.epita.fr>
18375
18376 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18377
4bb2bc3f
RA
183782002-02-07 Robert Anisko <robert@lrde.epita.fr>
18379
18380 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18381 C++ parsers.
18382 (yy::b4_name::parse): Build verbose error messages, and use error_.
18383
6b45a3ca
RA
183842002-02-06 Robert Anisko <robert@lrde.epita.fr>
18385
18386 * data/bison.c++: Fix m4 quoting in comments.
18387
50997c6e
RA
183882002-02-06 Robert Anisko <robert@lrde.epita.fr>
18389
18390 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18391 not expanded by m4.
18392
3f3eed27
AD
183932002-02-05 Akim Demaille <akim@epita.fr>
18394
18395 * data/bison.c++: Adjust to the M4 back end.
18396 More is certainly needed.
18397
be2a1a68
AD
183982002-02-05 Akim Demaille <akim@epita.fr>
18399
18400 Give a try to M4 as a back end.
18401
18402 * lib/readpipe.c: New, from wdiff.
18403 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18404 BISON_HAIRY.
18405 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18406 specific values. Now it is m4 that performs the lookup.
18407 * src/parse-skel.y: Remove.
18408 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18409 * src/output.c (actions_output, guards_output)
18410 (token_definitions_output): No longer keeps track of the output
18411 line number, hence remove the second argument.
18412 (guards_output): Check against the guard member of a rule, not the
18413 action member.
18414 Adjust callers.
18415 (output_skeleton): Don't look for the skeleton location, let m4 do
18416 that.
18417 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18418 file will be used.
18419 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18420 (prepare): Given that for the time being changesyntax is not
18421 usable in M4, rename the muscles using `-' to `_'.
18422 Define `defines_flag', `output_parser_name' and `output_header_name'.
18423 * src/output.h (actions_output, guards_output)
18424 (token_definitions_output): Adjust prototypes.
18425 * src/scan-skel.l: Instead of scanning the skeletons, it now
18426 processes the output of m4: `__oline__' and `#output'.
18427 * data/bison.simple: Adjust to be used by M4(sugar).
18428 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18429 to date.
18430 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18431 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18432 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18433 shamelessly stolen from CVS Autoconf.
18434
beda758b
AD
184352002-02-05 Akim Demaille <akim@epita.fr>
18436
18437 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18438 * configure.in: Check for the declarations of free and malloc.
18439 * src/muscle_tab.c: Adjust.
18440
5ece6d43
AD
184412002-02-05 Akim Demaille <akim@epita.fr>
18442
18443 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18444 which have no values.
18445
5bb18f9a
AD
184462002-02-05 Akim Demaille <akim@epita.fr>
18447
18448 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18449 * data/: here.
18450
894dd62e
PE
184512002-01-29 Paul Eggert <eggert@twinsun.com>
18452
18453 * src/bison.simple (YYSIZE_T): Do not define merely because
18454 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18455 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18456
82841af7
AD
184572002-01-27 Akim Demaille <akim@epita.fr>
18458
18459 Fix `%nonassoc and eof'.
18460
18461 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18462 which were not properly copied! Replace
18463 memcpy (res->errs, src->errs, src->nerrs);
18464 with
18465 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18466 !!!
18467 * tests/regression.at (%nonassoc and eof): Adjust to newest
18468 Autotest: `.' is not in the PATH.
18469
318b76e9
AD
184702002-01-27 Akim Demaille <akim@epita.fr>
18471
18472 * tests/sets.at (AT_EXTRACT_SETS): New.
18473 (Nullable): Use it.
18474 (Firsts): New.
18475
30d2f3d5
AD
184762002-01-26 Akim Demaille <akim@epita.fr>
18477
18478 * tests/actions.at, tests/calc.at, tests/headers.at,
18479 * tests/torture.at: Adjust to the newest Autotest which no longer
18480 forces `.' in the PATH.
18481
30f8c395
AD
184822002-01-25 Akim Demaille <akim@epita.fr>
18483
18484 * tests/regression.at (%nonassoc and eof): New.
18485 Suggested by Robert Anisko.
18486
29ae55f1
AD
184872002-01-24 Akim Demaille <akim@epita.fr>
18488
18489 Bison dumps core when trying to complain about broken input files.
18490 Reported by Cris van Pelt.
18491
18492 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18493 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18494 into...
18495 (Invalid inputs): Strengthen: exercise parse_percent_token.
18496
2b548aa6
RA
184972002-01-24 Robert Anisko <robert.anisko@epita.fr>
18498
18499 * src/Makefile.am: Add bison.c++.
18500 * src/bison.c++: New skeleton.
18501
bb0146c2
AD
185022002-01-21 Paolo Bonzini <bonzini@gnu.org>
18503
18504 * po/it.po: New.
18505
bec30531
AD
185062002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18507
18508 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18509
fc6edc45
MA
185102002-01-20 Marc Autret <marc@gnu.org>
18511
18512 * src/files.c (compute_output_file_names): Fix
18513
5e5d5415
MA
185142002-01-20 Marc Autret <marc@gnu.org>
18515
18516 * tests/output.at: New test.
18517 * src/files.c (compute_base_names): Don't map extensions when
18518 the YACC flag is set, use defaults.
18519 Reported by Evgeny Stambulchik.
18520
44ea3fbd
MA
185212002-01-20 Marc Autret <marc@gnu.org>
18522
ba0fe3c7
PE
18523 * src/system.h: Need to define __attribute__ away for non-GCC
18524 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
18525 Suggested by Albert Chin-A-Young.
18526
338963d1
TVH
185272002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18528
18529 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18530 canonical definition.
18531 * src/system.h: Use the canonical definition for PARAMS (avoids
18532 a conflict with the macro from lib/hash.h).
18533
c57b2479
AD
185342002-01-11 Akim Demaille <akim@epita.fr>
18535
18536 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 18537 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 18538
b85810ae
AD
185392002-01-09 Akim Demaille <akim@epita.fr>
18540
18541 * src/files.c, src/files.h (output_infix): New.
18542 (tab_extension): Remove.
18543 (compute_base_names): Compute the former, drop the latter.
18544 * src/output.c (prepare): Insert the muscles `output-infix', and
18545 `output-suffix'.
18546 * src/parse-skel.y (string, string.1): New.
18547 (section.header): Use it.
18548 (section.yacc): Remove.
18549 (prefix): Remove too.
18550 * src/scan-skel.l: Adjust.
18551 * src/bison.simple, src/bison.hairy: Adjust.
18552
cae60122
AD
185532002-01-09 Akim Demaille <akim@epita.fr>
18554
18555 * configure.in (WERROR_CFLAGS): Compute it.
18556 * src/Makefile.am (CFLAGS): Pass it.
18557 * tests/atlocal.in (CFLAGS): Idem.
18558 * src/files.c: Fix a few warnings.
18559 (get_extension_index): Remove, unused.
18560
ae404801
AD
185612002-01-08 Akim Demaille <akim@epita.fr>
18562
18563 * src/getargs.c (AS_FILE_NAME): New.
18564 (getargs): Use it to convert DOSish file names.
18565 * src/files.c (base_name): Rename as full_base_name to avoid
18566 clashes with `base_name ()'.
18567 (filename_split): New.
18568 (compute_base_names): N-th rewrite, using filename_split.
18569
22312b71
AD
185702002-01-08 Akim Demaille <akim@epita.fr>
18571
18572 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18573 New, stolen from the Fileutils 4.1.
18574 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18575 * configure.in: Check for the presence of memrchr, and of its
18576 prototype.
18577
a67cef01
TVH
185782002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18579
18580 * lib/hash.h (__P): Added definition for this macro.
18581 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18582 BUILT_SOURCES, to ensure they are generated first.
18583 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18584 %error-verbose to allow bootstrapping with bison 1.30x.
18585
2b25d624
AD
185862002-01-06 Akim Demaille <akim@epita.fr>
18587
18588 * src/reader.c (parse_braces): Don't fetch the next char, the
18589 convention is to fetch on entry.
18590 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18591 'switch' without a following semicolon.
18592 * tests/regression.at (braces parsing): New.
18593
3460813b
AD
185942002-01-06 Akim Demaille <akim@epita.fr>
18595
18596 Bison is dead wrong in its RR conflict reports.
18597
18598 * tests/torture.at (GNU Cim Grammar): New.
18599 * src/conflicts.c (count_rr_conflicts): Fix.
18600
73784c64
AD
186012002-01-06 Akim Demaille <akim@epita.fr>
18602
18603 Creating package.m4 from configure.ac causes too many problems.
18604
18605 * tests/Makefile.am (package.m4): Create it by hand,
18606 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18607
25d81090
AD
186082002-01-06 Akim Demaille <akim@epita.fr>
18609
18610 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18611 skeleton.h.
18612
a9b8959e
PE
186132002-01-04 Paul Eggert <eggert@twinsun.com>
18614
18615 * doc/bison.texinfo (Debugging):
18616 Remove YYSTDERR; it's no longer defined or used.
18617 Also, s/cstdio.h/cstdio/.
18618
25d81090
AD
186192002-01-03 Akim Demaille <akim@epita.fr>
18620
18621 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18622
1109455c
AD
186232002-01-03 Akim Demaille <akim@epita.fr>
18624
18625 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18626 tracing code to --trace, wait for a better --trace option, with
18627 args.
18628
7ea5e977
AD
186292002-01-03 Akim Demaille <akim@epita.fr>
18630
18631 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18632 The ISO C++ standard is extremely clear about it: stderr is
18633 considered a macro, not a regular symbol (see table 94 `Header
18634 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18635 Therefore std:: does not apply to it. It still does with fprintf.
18636 Also, s/cstdio.h/cstdio/.
18637
fab5b110
AD
186382002-01-03 Akim Demaille <akim@epita.fr>
18639
18640 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18641 for non system headers.
18642
aed7fd9b
AD
186432002-01-02 Akim Demaille <akim@epita.fr>
18644
18645 Equip the skeleton chain with location tracking, runtime trace,
18646 pure parser and scanner.
18647
18648 * src/parse-skel.y: Request a pure parser, locations, and prefix
18649 renaming.
18650 (%union): Having several members with the same type does not help
18651 type mismatches, simplify.
18652 (YYPRINT, yyprint): New.
18653 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18654 (skel_error): this.
18655 Handle locations.
18656 * src/scan-skel.l: Adjust to these changes.
18657 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18658 (LOCATION_PRINT, skel_control_t): New.
18659
24fad99e
AD
186602001-12-30 Akim Demaille <akim@epita.fr>
18661
18662 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18663 replace `gb' with BLANKS.
18664 * src/scan-skel.l: Adjust.
18665
a4b36db4
AD
186662001-12-30 Akim Demaille <akim@epita.fr>
18667
18668 * src/system.h: We don't need nor want bcopy.
18669 Throw away MS-DOS crap: we don't need getpid.
18670 * configure.in: We don't need strndup. It was even causing
18671 problems: because Flex includes the headers *before* us,
18672 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18673 not visible.
18674 * lib/xstrndup.c: New.
18675 * src/scan-skel.l: Use it.
18676 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18677 * src/parse-skel.y: Use %directives instead of #defines.
18678
1239777d
AD
186792001-12-30 Akim Demaille <akim@epita.fr>
18680
18681 * src/skeleton.h: New.
18682 * src/output.c (output_parser, output_master_parser): Remove, dead
18683 code.
18684 * src/output.h (get_lines_number, actions_output, guards_output)
18685 (token_definitions_output): Prototype them.
18686 * src/parse-skel.y: Add the license notice.
18687 Include output.h and skeleton.h.
18688 (process_skeleton): Returns void, and takes a single parameter.
18689 * src/scan-skel.l: Add the license notice.
18690 Include skeleton.h.
18691 Don't use %option yylineno: it seems that then Flex imagines
18692 REJECT has been used, and therefore it won't reallocate its
18693 buffers (which makes no other sense to me than a bug). It results
18694 in warnings for `unused: yy_flex_realloc'.
18695
9b3add5b
RA
186962001-12-30 Robert Anisko <robert.anisko@epita.fr>
18697
18698 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18699 (MUSCLE_INSERT_PREFIX): ...to there.
18700 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18701 (MUSCLE_INSERT_PREFIX): Move from here...
18702
18703 * src/bison.hairy: Add a section directive. Put braces around muscle
18704 names. This parser skeleton is still broken, but Bison should not
18705 choke on a bad muscle 'syntax'.
18706 * src/bison.simple: Add a section directive. Put braces around muscle
18707 names.
18708
18709 * src/files.h (strsuffix, stringappend): Add declarations.
18710 (tab_extension): Add declaration.
18711 (short_base_name): Add declaration.
18712
18713 * src/files.c (strsuffix, stringappend): No longer static. These
18714 functions are used in the skeleton parser.
18715 (tab_extension): New.
18716 (compute_base_names): Use the computations done in this function
fab5b110 18717 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
18718 names.
18719 (short_base_name): No longer static.
18720
18721 * src/output.c (output_skeleton): New.
18722 (output): Disable call to output_master_parser, and give a try to
18723 a new skeleton handling system.
18724 (guards_output, actions_output): No longer static.
18725 (token_definitions_output, get_lines_number): No longer static.
18726
18727 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18728
fab5b110 18729 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
18730 parse-skel.y.
18731
18732 * src/parse-skel.y: New file.
18733 * src/scan-skel.l: New file.
18734
b5b61c61
AD
187352001-12-29 Akim Demaille <akim@epita.fr>
18736
18737 %name-prefix is broken.
18738
18739 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18740 Adjust all dependencies.
18741 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18742 %name-prefix.
18743
18744 Renaming yylval but not yylloc is not consistent. Now we do.
18745
18746 * src/bison.simple: Prefix yylloc if used.
18747 * doc/bison.texinfo (Decl Summary): Document that.
18748
8c9a50be
AD
187492001-12-29 Akim Demaille <akim@epita.fr>
18750
18751 * doc/bison.texinfo: Promote `%long-directive' over
18752 `%long_directive'.
18753 Remove all references to fixed-output-files, yacc is enough.
18754
d99361e6
AD
187552001-12-29 Akim Demaille <akim@epita.fr>
18756
18757 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18758 user prologue. These are defaults.
18759 * tests/actions.at (Mid-rule actions): Make sure the user can
18760 define YYDEBUG and YYERROR_VERBOSE.
18761
b9cecb91
AD
187622001-12-29 Akim Demaille <akim@epita.fr>
18763
18764 * src/output.c (header_output): Don't forget to export YYLTYPE and
18765 yylloc.
18766 * tests/headers.at (export YYLTYPE): New, make sure it does.
18767 * tests/regression.at (%union and --defines, Invalid CPP headers):
18768 Move to...
18769 * tests/headers.at: here.
18770
aea13e97
AD
187712001-12-29 Akim Demaille <akim@epita.fr>
18772
18773 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18774
931394cb
AD
187752001-12-29 Akim Demaille <akim@epita.fr>
18776
18777 * tests/actions.at (Mid-rule actions): Output on a single line
18778 instead of several.
18779
704a47c4
AD
187802001-12-29 Akim Demaille <akim@epita.fr>
18781
18782 * doc/bison.texinfo: Formatting changes.
18783
091e20bb
AD
187842001-12-29 Akim Demaille <akim@epita.fr>
18785
18786 Don't store the token defs in a muscle, just be ready to output it
18787 on command. Now possible via `symbols'. Fixes a memory leak.
18788
18789 * src/output.c (token_definitions_output): New.
18790 (output_parser, header_output): Use it.
18791 * src/reader.c (symbols_save): Remove.
18792
cce71710
AD
187932001-12-29 Akim Demaille <akim@epita.fr>
18794
18795 * src/bison.simple: Do not provide a default for YYSTYPE and
18796 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18797 default.
18798
82c035a8
AD
187992001-12-29 Akim Demaille <akim@epita.fr>
18800
18801 Mid-rule actions are simply... ignored!
18802
18803 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18804 the empty-rule associated to the dummy symbol, not to the host
18805 rule.
18806 * tests/actions.at (Mid-rule actions): New.
18807
8419d367
AD
188082001-12-29 Akim Demaille <akim@epita.fr>
18809
18810 Memory leak.
18811
18812 * src/reader.c (reader): Free grammar.
18813
375d5806
AD
188142001-12-29 Akim Demaille <akim@epita.fr>
18815
18816 Memory leak.
18817
18818 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18819 since it allocates it for each state, although only one is needed.
18820 (allocate_storage): Do it here.
18821
f51cb8ff
AD
188222001-12-29 Akim Demaille <akim@epita.fr>
18823
18824 * src/options.h, src/options.c (create_long_option_table): Rename
18825 as...
18826 (long_option_table_new): this, with a clearer prototype.
18827 (percent_table): Remove, unused,
18828 * src/getargs.c (getargs): Adjust.
18829
29e88316
AD
188302001-12-29 Akim Demaille <akim@epita.fr>
18831
18832 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18833 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18834 as states.
18835
b9f71f19
AD
188362001-12-29 Akim Demaille <akim@epita.fr>
18837
18838 * src/lalr.c (build_relations): Rename `states' as `states1'.
18839 Sorry, I don't understand exactly what it is, no better name...
18840
1a2b5d37
AD
188412001-12-29 Akim Demaille <akim@epita.fr>
18842
18843 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18844 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18845 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18846 as rules.
18847
1cca533e
AD
188482001-12-29 Akim Demaille <akim@epita.fr>
18849
18850 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18851 ago.
18852
c03ae966
AD
188532001-12-29 Akim Demaille <akim@epita.fr>
18854
18855 * src/reader.c, src/reader.h (user_toknums): Remove.
18856 Adjust all users to use symbols[i]->user_token_number.
18857
5a670b1e
AD
188582001-12-29 Akim Demaille <akim@epita.fr>
18859
18860 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18861 Adjust all users to use symbols[i]->prec or ->assoc.
18862
ad949da9
AD
188632001-12-29 Akim Demaille <akim@epita.fr>
18864
18865 * src/reader.c, src/reader.h (tags): Remove.
18866 Adjust all users to use symbols[i]->tag.
18867
0e78e603
AD
188682001-12-29 Akim Demaille <akim@epita.fr>
18869
18870 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18871 and rule_table.
18872 * src/reader.c (packsymbols): Fill this table.
18873 Drop sprec.
18874 * src/conflicts.c (resolve_sr_conflict): Adjust.
18875 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18876 single table.
18877 Use symbols[i]->tag instead of tags[i].
18878
213e640e
AD
188792001-12-29 Akim Demaille <akim@epita.fr>
18880
18881 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18882 In addition, put a comment in there, to replace...
18883 * tests/regression.at (%union and C comments): Remove.
18884
e7b8bef1
AD
188852001-12-29 Akim Demaille <akim@epita.fr>
18886
18887 * tests/regression.at (Web2c Actions): Blindly move the actual
18888 output as expected output. The contents *seem* right to me, but I
18889 can't pretend reading perfectly parser tables... Nonetheless, all
18890 the other tests pass correctly, the table look OK, even though the
18891 presence of `$axiom' is to be noted: AFAICS it is useless (but
18892 harmless).
18893
b68e7744
AD
188942001-12-29 Akim Demaille <akim@epita.fr>
18895
18896 * src/reader.c (readgram): Don't add the rule 0 if there were no
18897 rules read. In other words, add it _after_ having performed
18898 grammar sanity checks.
18899 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18900
78d5bae9
AD
189012001-12-29 Akim Demaille <akim@epita.fr>
18902
18903 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18904 visible, and some states have now a different number.
18905
ff442794
AD
189062001-12-29 Akim Demaille <akim@epita.fr>
18907
18908 * src/reader.c (readgram): Bind the initial rule's lineno to that
18909 of the first rule.
18910 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18911 (Solved SR Conflicts): Adjust rule 0's line number.
18912
610ab194
AD
189132001-12-29 Akim Demaille <akim@epita.fr>
18914
18915 Fix the `GAWK Grammar' failure.
18916
18917 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18918 the reductions of the first state which was mistakenly confused
18919 with the final state because precisely final_state was initialized
18920 to 0.
18921 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18922 now noticed by Bison.
18923 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18924 have a reduction on $default.
18925
29d29c8f
AD
189262001-12-29 Akim Demaille <akim@epita.fr>
18927
18928 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18929 rule line numbers.
18930 * src/closure.c (print_closure): Likewise.
18931 * src/derives.c (print_derives): Likewise.
18932 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18933 now.
18934
7c6b64d0
AD
189352001-12-29 Akim Demaille <akim@epita.fr>
18936
18937 * src/lalr.c (lookaheads_print): New.
18938 (lalr): Call it when --trace-flag.
18939 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18940 are dumped.
18941
3d4daee3
AD
189422001-12-29 Akim Demaille <akim@epita.fr>
18943
18944 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18945 when walking through ritem, even via rule->rhs.
18946 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18947 (useful_production, useless_nonterminals): Likewise.
18948 (reduce_grammar_tables): Likewise, plus update nritems.
18949 * src/nullable.c (set_nullable): Likewise.
18950 * src/lalr.c (build_relations): Likewise.
18951 * tests/sets.at (Nullable): Adjust.
18952 Fortunately, now, the $axiom is no longer nullable.
18953
9e7f6bbd
AD
189542001-12-29 Akim Demaille <akim@epita.fr>
18955
18956 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18957 the 0-sentinel.
18958 * src/gram.c (ritem_longest_rhs): Likewise.
18959 * src/reduce.c (nonterminals_reduce): Likewise.
18960 * src/print_graph.c (print_graph): Likewise.
18961 * src/output.c (output_rule_data): Likewise.
18962 * src/nullable.c (set_nullable): Likewise.
18963
255ef638
AD
189642001-12-29 Akim Demaille <akim@epita.fr>
18965
18966 * src/output.c: Comment changes.
18967
0d8a7363
AD
189682001-12-27 Paul Eggert <eggert@twinsun.com>
18969
18970 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18971 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18972 Sparc, as they were causing more porting problems than the
18973 (minor) performance improvement was worth.
18974
18975 Also, catch up with 1.31's YYSTD.
18976
3db472b9
AD
189772001-12-27 Akim Demaille <akim@epita.fr>
18978
18979 * src/output.c (output_gram): Rely on nritems, not the
18980 0-sentinel. See below.
18981 Use -1 as separator, not 0.
18982 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18983 Rely on -1 as separator in yyrhs, instead of 0.
18984 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18985 twice `Now at end of input', therefore there are two lines less to
18986 expect.
18987
b365aa05
AD
189882001-12-27 Akim Demaille <akim@epita.fr>
18989
18990 * tests/regression.at (Unresolved SR Conflicts):
18991 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18992 below.
18993
30171f79
AD
189942001-12-27 Akim Demaille <akim@epita.fr>
18995
18996 * src/LR0.c (new_state): Recognize the final state by the fact it
18997 is reached by eoftoken.
18998 (insert_start_shifting_state, insert_eof_shifting_state)
18999 (insert_accepting_state, augment_automaton): Remove, since now
19000 these states are automatically computed from the initial state.
19001 (generate_states): Adjust.
19002 * src/print.c: When reporting a rule number to the user, substract
19003 1, so that the axiom rule is rule 0, and the first user rule is 1.
19004 * src/reduce.c: Likewise.
19005 * src/print_graph.c (print_core): For the time being, just as for
19006 the report, depend upon --trace-flags to dump the full set of
19007 items.
19008 * src/reader.c (readgram): Once the grammar read, insert the rule
19009 0: `$axiom: START-SYMBOL $'.
19010 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19011 number of the states has changed (the final state is no longer
19012 necessarily the last), catch up.
19013
75142d45
AD
190142001-12-27 Akim Demaille <akim@epita.fr>
19015
19016 Try to make the use of the eoftoken valid. Given that its value
19017 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19018 is used instead of > 0 where appropriate, (ii), depend upon nritems
19019 instead of the 0-sentinel.
19020
19021 * src/gram.h, src/gram.c (nritems): New.
19022 Expected to be duplication of nitems, but for the time being...
19023 * src/reader.c (packgram): Assert nritems and nitems are equal.
19024 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19025 * src/closure.c (print_closure, print_fderives): Likewise.
19026 * src/gram.c (ritem_print): Likewise.
19027 * src/print.c (print_core, print_grammar): Likewise.
19028 * src/print_graph.c: Likewise.
19029
b7c49edf
AD
190302001-12-27 Akim Demaille <akim@epita.fr>
19031
19032 * src/main.c (main): If there are complains after grammar
19033 reductions, then output the report anyway if requested, then die.
19034 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19035 * src/reader.c (eoftoken): New.
19036 (parse_token_decl): If the token being defined has value `0', it
19037 is the eoftoken.
19038 (packsymbols): No longer hack `tags' to insert `$' by hand.
19039 Be sure to preserve the value of the eoftoken.
19040 (reader): Make sure eoftoken is defined.
19041 Initialize nsyms to 0: now eoftoken is created just like the others.
19042 * src/print.c (print_grammar): Don't special case the eof token.
19043 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19044 lie anyway, albeit pleasant.
19045 * tests/calc.at: Exercise error messages with eoftoken.
19046 Change the grammar so that empty input is invalid.
19047 Adjust expectations.
19048 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19049
ec2da99f
AD
190502001-12-27 Akim Demaille <akim@epita.fr>
19051
19052 * configure.in: Check the protos of strchr ans strspn.
19053 Replace strchr if needed.
19054 * src/system.h: Provide the protos of strchr, strspn and memchr if
19055 missing.
19056 * lib/strchr.c: New.
19057 * src/reader.c (symbols_save): Use strchr.
19058
8adfa272
AD
190592001-12-27 Akim Demaille <akim@epita.fr>
19060
19061 * src/print.c, src/print_graph.c (escape): New.
19062 Use it to quote the TAGS outputs.
19063 * src/print_graph.c (print_state): Now errors are in red, and
19064 reductions in green.
19065 Prefer high to wide: output the state number on a line of its own.
19066
80dac38c
AD
190672001-12-27 Akim Demaille <akim@epita.fr>
19068
19069 * src/state.h, src/state.c (reductions_new): New.
19070 * src/LR0.c (set_state_table): Let all the states have a
19071 `reductions', even if reduced to 0.
19072 (save_reductions): Adjust.
19073 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19074 * src/print.c (print_reductions, print_actions): Adjust.
19075 * src/output.c (action_row): Adjust.
19076
2cec70b9
AD
190772001-12-27 Akim Demaille <akim@epita.fr>
19078
19079 * src/state.h, src/state.c (errs_new, errs_dup): New.
19080 * src/LR0.c (set_state_table): Let all the states have an errs,
19081 even if reduced to 0.
19082 * src/print.c (print_errs, print_reductions): Adjust.
19083 * src/output.c (output_actions, action_row): Adjust.
19084 * src/conflicts.c (resolve_sr_conflict): Adjust.
19085
13ca549a
AD
190862001-12-27 Akim Demaille <akim@epita.fr>
19087
19088 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19089
5092aba5
AD
190902001-12-27 Akim Demaille <akim@epita.fr>
19091
19092 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19093 * src/print.c: here.
19094 (lookaheadset, shiftset): New, used as additional storage by
19095 print_reductions.
19096 (print_results): Adjust.
19097 (print_shifts, print_gotos, print_errs): New, extracted from...
19098 (print_actions): here.
19099 * src/print_graph.c (print_actions): Remove dead code.
19100
11e2beca
AD
191012001-12-27 Akim Demaille <akim@epita.fr>
19102
19103 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19104 `$n' and `@n'.
19105
dac3c910
AD
191062001-12-27 Akim Demaille <akim@epita.fr>
19107
19108 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19109 (build_relations): Adjust.
19110
d0b0fefa
AD
191112001-12-27 Akim Demaille <akim@epita.fr>
19112
19113 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19114 duplication.
19115
adc8c848
AD
191162001-12-27 Akim Demaille <akim@epita.fr>
19117
19118 * src/reader.c (packgram): Catch nitems overflows.
19119
14d293ac
AD
191202001-12-27 Akim Demaille <akim@epita.fr>
19121
19122 * src/files.c, src/files.h (guard_obstack): Remove.
19123 * src/output.c (output): Adjust.
19124 * src/reader.c (parse_braces): New, factoring...
19125 (copy_action, copy_guard): these two which are renamed as...
19126 (parse_action, parse_guard): these.
19127 As a voluntary consequence, using braces around guards is now
19128 mandatory.
19129
f499b062
AD
191302001-12-27 Akim Demaille <akim@epita.fr>
19131
19132 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19133 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19134 members.
19135 (symbol_list_new): Adjust.
19136 (copy_action): action_line is the first line, not the last.
19137 (copy_guard): Just as for actions, store the `action' only, not
19138 the switch/case/break flesh.
19139 Don't parse the user action that might follow the guard, let...
19140 (readgram): do it, i.e., now, there can be an action after a
19141 guard.
19142 In other words the guard is just explicitly optional.
19143 (packgram): Adjust.
19144 * src/output.c (guards_output): New.
19145 (output_parser): Call it when needed.
19146 (output): Also free the guard and attrs obstacks.
19147 * src/files.c, src/files.h (obstack_save): Remove.
19148 (output_files): Remove.
19149 As a result, if one needs the former `.act' file, using an
19150 appropriate skeleton which requires actions and guards is now
19151 required.
19152 * src/main.c (main): Adjust.
19153 * tests/semantic.at: New.
19154 * tests/regression.at: Use `input.y' as input file name.
19155 Avoid 8+3 problems by requiring input.c when the test needs the
19156 parser.
19157
d945f5cd
AD
191582001-12-27 Akim Demaille <akim@epita.fr>
19159
19160 * src/reader.c (symbol_list_new): Be sure to initialize all the
19161 fields.
19162
d200e455
AD
191632001-12-27 Akim Demaille <akim@epita.fr>
19164
19165 All the hacks using a final pseudo state are now useless.
19166
19167 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19168 * src/lalr.c (nLA): New.
19169 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19170 instead of lookaheadsp from the pseudo state (nstate + 1).
19171
f9507c28
AD
191722001-12-27 Akim Demaille <akim@epita.fr>
19173
19174 * src/output.c (action_row, token_actions): Use a state_t instead
19175 of a integer, and nlookaheads instead of the following state's
19176 lookaheadsp.
19177
065fbd27
AD
191782001-12-27 Akim Demaille <akim@epita.fr>
19179
19180 * src/conflicts.c (log_resolution, flush_shift)
19181 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19182 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19183 (conflicts_print, print_reductions): Use a state_t instead of an
19184 integer when referring to a state.
19185 As much as possible, depend upon nlookaheads, instead of the
19186 `lookaheadsp' member of the following state (since lookaheads of
19187 successive states are successive, the difference between state n + 1
19188 and n served as the number of lookaheads for state n).
19189 * src/lalr.c (add_lookback_edge): Likewise.
19190 * src/print.c (print_core, print_actions, print_state)
19191 (print_results): Likewise.
19192 * src/print_graph.c (print_core, print_actions, print_state)
19193 (print_graph): Likewise.
19194 * src/conflicts.h: Adjust.
19195
1b177bd7
AD
191962001-12-27 Akim Demaille <akim@epita.fr>
19197
19198 * src/bison.hairy: Formatting/comment changes.
19199 ANSIfy.
19200 Remove `register' indications.
19201 Add plenty of `static'.
19202
7742ddeb
AD
192032001-12-27 Akim Demaille <akim@epita.fr>
19204
19205 * src/output.c (prepare): Drop the muscle `ntbase' which
19206 duplicates ntokens.
19207 * src/bison.simple: Formatting/comment changes.
19208 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19209 is an undocumented synonym.
19210
1fa14068
AD
192112001-12-22 Akim Demaille <akim@epita.fr>
19212
19213 * src/output.c (output_table_data): Change the prototype to use
19214 `int' for array ranges: some invocations do pass an int, not a
19215 short.
19216 Reported by Wayne Green.
19217
b9752825
AD
192182001-12-22 Akim Demaille <akim@epita.fr>
19219
19220 Some actions of web2c.y are improperly triggered.
19221 Reported by Mike Castle.
19222
19223 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19224 * tests/regression.at (Web2c): Rename as...
19225 (Web2c Report): this.
19226 (Web2c Actions): New.
19227
776209d6
AD
192282001-12-22 Akim Demaille <akim@epita.fr>
19229
19230 Reductions in web2c.y are improperly reported.
19231 Reported by Mike Castle.
19232
19233 * src/conflicts.c (print_reductions): Fix.
19234 * tests/regression.at (Web2c): New.
19235
275fc3ad
AD
192362001-12-18 Akim Demaille <akim@epita.fr>
19237
19238 Some host fail on `assert (!"foo")', which expands to
19239 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19240 Reported by Nelson Beebee.
19241
19242 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19243 `#define it_succeeded 0' and `assert (it_succeeded)'.
19244
897668ee
MA
192452001-12-17 Marc Autret <autret_m@epita.fr>
19246
19247 * src/bison.simple: Don't hard code the skeleton line and filename.
19248 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19249 New line counter 'skeleton_line' (skeleton-line muscle).
19250
ab3399e0
PE
192512001-12-17 Paul Eggert <eggert@twinsun.com>
19252
19253 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19254 YYDEBUG must be defined to a nonzero value.
19255
19256 * src/bison.simple (yytname): Do not assume that the user defines
19257 YYDEBUG to a properly parenthesized expression.
19258
3877f72b
AD
192592001-12-17 Akim Demaille <akim@epita.fr>
19260
19261 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19262 nlookaheads is a new member.
19263 Adjust all users.
19264 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19265 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19266 state.
776209d6 19267
331dbc1b
AD
192682001-12-17 Akim Demaille <akim@epita.fr>
19269
19270 * src/files.h, src/files.c (open_files, close_files): Remove.
19271 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19272 let...
19273 * src/reader.c (reader): Do it.
776209d6 19274
be750e4c
AD
192752001-12-17 Akim Demaille <akim@epita.fr>
19276
19277 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 19278
709ae8c6
AD
192792001-12-17 Akim Demaille <akim@epita.fr>
19280
19281 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19282 (flush_reduce): New.
19283 (resolve_sr_conflict): Adjust.
776209d6 19284
f87685c3
AD
192852001-12-17 Akim Demaille <akim@epita.fr>
19286
19287 * src/output.c (output_obstack): Be static and rename as...
19288 (format_obstack): this, to avoid any confusion with files.c's
19289 output_obstack.
19290 * src/reader.h (muscle_obstack): Move to...
19291 * src/output.h: here, since it's defined in output.c.
19292
837491d8
AD
192932001-12-17 Akim Demaille <akim@epita.fr>
19294
19295 * src/output.c (action_row, save_column, default_goto)
19296 (sort_actions, matching_state, pack_vector): Better variable
19297 locality.
19298
796d61fb
AD
192992001-12-17 Akim Demaille <akim@epita.fr>
19300
19301 * src/output.c: Various formatting changes.
776209d6 19302
64d15509
AD
193032001-12-17 Akim Demaille <akim@epita.fr>
19304
19305 * src/files.c (output_files): Free the output_obstack.
19306 * src/main.c (main): Call print and print_graph conditionally.
19307 * src/print.c (print): Work unconditionally.
19308 * src/print_graph.c (print_graph): Work unconditionally.
19309 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19310
fbc8ecb7
MA
193112001-12-16 Marc Autret <autret_m@epita.fr>
19312
19313 * src/output.c (actions_output): Fix. When we use %no-lines,
19314 there is one less line per action.
19315
f0440388
MA
193162001-12-16 Marc Autret <autret_m@epita.fr>
19317
19318 * src/bison.simple: Remove a useless #line directive.
19319 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19320 * src/output.c (get_lines_number): New.
776209d6 19321 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
19322 output muscles.
19323 Fix line numbering.
19324 (actions_output): Computes the number of lines taken by actions.
19325 (output_master_parser): Insert new skeleton which is the name of
19326 the output parser file name.
19327
a79986b8
MA
193282001-12-15 Marc Autret <autret_m@epita.fr>
19329
19330 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19331
4ec8e00f
MA
193322001-12-15 Marc Autret <autret_m@epita.fr>
19333
19334 * src/output.c (output_gram): Keep track of the hairy one.
19335
1a4648ff
AD
193362001-12-15 Akim Demaille <akim@epita.fr>
19337
19338 Make `make distcheck' work.
19339
19340 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19341 system.h which uses libgettext.h.
19342
9c2c67e6
AD
193432001-12-15 Akim Demaille <akim@epita.fr>
19344
19345 * src/nullable.c (set_nullable): Useless rules must be skipped,
19346 otherwise, since we range over their symbols, we might look at a
19347 nonterminal which no longer ``exists'', i.e., it is not counted in
19348 `nvars', hence we overflow our arrays.
19349
93ede233
AD
193502001-12-15 Akim Demaille <akim@epita.fr>
19351
19352 The header can also be produced directly, without any obstack!
19353 Yahoo!
19354
19355 * src/files.c, src/files.h (defines_obstack): Remove.
19356 (compute_header_macro): Global.
19357 (defines_obstack_save): Remove.
19358 * src/reader.c (parse_union_decl): No longer output to
19359 defines_obstack: its content can be found in the `stype' muscle
19360 anyway.
19361 (output_token_translations): Merge into...
19362 (symbols_output): this.
19363 Rename as...
19364 (symbols_save): this.
19365 (reader): Adjust.
19366 * src/output.c (header_output): New.
19367 (output): Call it.
19368
2666f928
AD
193692001-12-15 Akim Demaille <akim@epita.fr>
19370
19371 * src/reader.c (parse_union_decl): Instead of handling two obstack
19372 simultaneously, use one to define the `stype' muscle, and use the
19373 value of the latter to fill defines_obstack.
19374 (copy_comment): Remove.
19375 (copy_comment2): Work for a single obstack.
19376 Rename as...
19377 (copy_comment): this.
19378
428046f8
AD
193792001-12-15 Akim Demaille <akim@epita.fr>
19380
19381 * src/lex.c, src/lex.h (xgetc): No longer static.
19382 * src/reader.c (parse_union_decl): Revamp.
19383
ea52d706
AD
193842001-12-15 Akim Demaille <akim@epita.fr>
19385
19386 Still making progress in separating Bison into (i) input, (ii)
19387 process, (iii) output: now we can directly output the parser file
19388 without using table_obstack at all.
19389
19390 * src/files.c, src/files.h (table_obstack): Bye bye.
19391 (parser_file_name): New.
19392 * src/files.c (compute_output_file_names): Compute it.
19393 * src/output.c (actions_output, output_parser)
19394 (output_master_parser): To a file instead of an obstack.
19395
3f96f4dc
AD
193962001-12-15 Akim Demaille <akim@epita.fr>
19397
19398 Attach actions to rules, instead of pre-outputting them to
19399 actions_obstack.
19400
19401 * src/gram.h (rule_t): action and action_line are new members.
19402 * src/reader.c (symbol_list): Likewise.
19403 (copy_action): Save the actions within the rule.
19404 (packgram): Save them in rule_table.
19405 * src/output.c (actions_output): New.
19406 (output_parser): Use it on `%%actions'.
19407 (output_rule_data): Don't free rule_table.
19408 (output): Do it.
19409 (prepare): Don't save the `action' muscle.
19410 * src/bison.simple: s/%%action/%%actions/.
19411
51576fb3
AD
194122001-12-15 Akim Demaille <akim@epita.fr>
19413
19414 * src/reader.c (copy_action): When --yacc, don't append a `;'
19415 to the user action: let it fail if lacking.
dee049eb 19416 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 19417
2648a72d
AD
194182001-12-14 Akim Demaille <akim@epita.fr>
19419
19420 * src/lex.c (literalchar): Simply return the char you decoded, non
19421 longer mess around with obstacks and int pointers.
19422 Adjust all callers.
19423
92790e5b
AD
194242001-12-14 Akim Demaille <akim@epita.fr>
19425
19426 * src/lex.c (literalchar): Don't escape the special characters,
19427 just decode them, and keep them as char (before, eol was output as
19428 the 2 char string `\n' etc.).
19429 * src/output.c (output_rule_data): Use quotearg to output the
19430 token strings.
19431
927c1557
PE
194322001-12-13 Paul Eggert <eggert@twinsun.com>
19433
19434 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19435 Do not infringe on the global user namespace when using C++.
19436 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19437 All uses of `fprintf' and `stderr' changed.
19438
19439 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19440
ed8e1f68
AD
194412001-12-13 Akim Demaille <akim@epita.fr>
19442
19443 The computation of nullable is broken: it doesn't handle empty
19444 RHS's properly.
19445
19446 * tests/torture.at (GNU AWK Grammar): New.
19447 * tests/sets.at (Nullable): New.
19448 * src/nullable.c (set_nullable): Instead of blindly looping over
19449 `ritems', loop over the rules, and then over their rhs's.
19450
19451 Work around Autotest bugs.
19452
19453 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19454 frame, because Autotest understand lines starting with a `+' as
19455 traces from the shell. Then, they are not processed properly.
19456 Admittedly an Autotest bug, but we don't have time to wait for
19457 Autotest to catch up.
19458 * tests/regression.at (Broken Closure): Adjust to the new table
19459 frames.
19460 Move to...
19461 * tests/sets.at: here.
19462
cb581495
AD
194632001-12-13 Akim Demaille <akim@epita.fr>
19464
19465 * src/closure.c (closure): Use nrules instead of playing tricks
19466 with BITS_PER_WORD.
19467
2e729273
AD
194682001-12-13 Akim Demaille <akim@epita.fr>
19469
19470 * src/print.c (print_actions): Output the handling of `$' as the
19471 traces do: shifting the token EOF. Before EOF was treated as a
19472 nonterminal.
19473 * tests/regression.at: Adjust some tests.
19474 * src/print_graph.c (print_core): Complete the set of items via
19475 closure. The next-to-final and final states are still unsatisfying,
19476 but that's to be addressed elsewhere.
19477 No longer output the rule numbers, but do output the state number.
19478 A single loop for the shifts + gotos is enough, but picked a
19479 distinct color for each.
19480 (print_graph): Initialize and finalize closure.
19481
107f7dfb
AD
194822001-12-13 Akim Demaille <akim@epita.fr>
19483
19484 * src/reader.c (readgram): Remove dead code, an strip useless
19485 braces.
19486 (get_type): Remove, unused.
19487
9b53a24f
AD
194882001-12-12 Akim Demaille <akim@epita.fr>
19489
19490 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19491 on that of lib/error.c.
19492
dbfb6dcd
AD
194932001-12-12 Akim Demaille <akim@epita.fr>
19494
19495 Some hosts don't like `/' in includes.
19496
19497 * src/system.h: Include libgettext.h without qualifying the path.
19498 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19499 $(top_srcdir).
19500
c25fb648
MA
195012001-12-11 Marc Autret <autret_m@epita.fr>
19502
19503 * src/output.c (output_parser): Remove useless muscle.
19504
710ddc4f
MA
195052001-12-11 Marc Autret <autret_m@epita.fr>
19506
19507 * src/bison.simple: Remove #line just before %%epilogue. It
19508 is now handled in ...
19509 * src/reader.c (read_additionnal_code): Add the output of a
19510 #line for the epilogue.
19511
e83d80b8
MA
195122001-12-10 Marc Autret <autret_m@epita.fr>
19513
927c1557 19514 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
19515 replace precedent remove.
19516 * src/bison.simple: Remove #line before %%prologue because
19517 %%input-line is wrong at this time.
19518
971d5158
MA
195192001-12-10 Marc Autret <autret_m@epita.fr>
19520
19521 * src/reader.c (symbols_output): Clean up.
927c1557 19522 * src/output.c (output_gram, output): Clean up.
971d5158 19523
5edafffd
AD
195242001-12-10 Akim Demaille <akim@epita.fr>
19525
19526 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19527 * src/LR0.c (set_state_table): here.
19528 * src/lalr.c (lalr): Call it.
19529
0279f8e9
AD
195302001-12-10 Akim Demaille <akim@epita.fr>
19531
19532 * src/state.h (shifts): Remove the `number' member: shifts are
19533 attached to state, hence no longer need to be labelled with a
19534 state number.
19535
190c4f5f
AD
195362001-12-10 Akim Demaille <akim@epita.fr>
19537
19538 Now that states have a complete set of members, the linked list of
19539 shifts is useless: just fill directly the state's shifts member.
19540
19541 * src/state.h (shifts): Remove the `next' member.
19542 * src/LR0.c (first_state, last_state): Remove.
19543 Adjust the callers.
19544 (augment_automaton): Don't look for the shifts that must be added
19545 a shift on EOF: it is those of the state we looked for! But now,
19546 since shifts are attached, it is no longer needed to looking
19547 merely by its id: its number.
19548
2a73b93d
AD
195492001-12-10 Akim Demaille <akim@epita.fr>
19550
19551 * src/LR0.c (augment_automaton): Better variable locality.
19552 Remove an impossible branch: if there is a state corresponding to
19553 the start symbol being shifted, then there is shift for the start
19554 symbol from the initial state.
19555
74392f6a
AD
195562001-12-10 Akim Demaille <akim@epita.fr>
19557
19558 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19559 only when appropriate: when insert_start_shifting_state' is not
19560 invoked.
19561 * tests/regression.at (Rule Line Numbers): Adjust.
19562
37c82725
AD
195632001-12-10 Akim Demaille <akim@epita.fr>
19564
19565 * src/LR0.c (augment_automaton): Now that all states have shifts,
19566 merge the two cases addition shifts to the initial state.
19567
6a164e0c
AD
195682001-12-10 Akim Demaille <akim@epita.fr>
19569
19570 * src/lalr.c (set_state_table): Move to...
19571 * src/LR0.c: here.
19572 * src/lalr.c (lalr): Don't call it...
19573 * src/LR0.c (generate_states): do it.
19574 * src/LR0.h (first_state): Remove, only the table is used.
19575
7215de24
AD
195762001-12-10 Akim Demaille <akim@epita.fr>
19577
19578 * src/LR0.h (first_shift, first_reduction): Remove.
19579 * src/lalr.c: Don't use first_shift: find shifts through the
19580 states.
19581
80e25d4d
AD
195822001-12-10 Akim Demaille <akim@epita.fr>
19583
19584 * src/LR0.c: Attach shifts to states as soon as they are
19585 computed.
19586 * src/lalr.c (set_state_table): Instead of assigning shifts to
19587 state, just assert that the mapping was properly done.
19588
0ab3728b
AD
195892001-12-10 Akim Demaille <akim@epita.fr>
19590
19591 * src/LR0.c (insert_start_shift): Rename as...
19592 (insert_start_shifting_state): this.
19593 (insert_eof_shifting_state, insert_accepting_state): New.
19594 (augment_automaton): Adjust.
19595 Better locality of the variables.
19596 When looking if the start_symbol is shifted from the initial
19597 state, using `while (... symbol != start_symbol ...)' sounds
19598 better than `while (... symbol < start_symbol ...)': If fail
19599 to see how the order between symbols could be relevant!
19600
78af9bbc
AD
196012001-12-10 Akim Demaille <akim@epita.fr>
19602
19603 * src/getargs.h: Don't declare `spec_name_prefix' and
19604 `spec_file_prefix', declared by src/files.h.
19605 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19606 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19607 * src/output.c (prepare): Adjust.
19608 * src/reader.c (symbols_output): Likewise.
19609 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19610
bdef2a41
AD
196112001-12-10 Akim Demaille <akim@epita.fr>
19612
19613 * src/muscle_tab.c (muscle_init): NULL is a better default than
19614 `"0"'.
19615
3735969c
AD
196162001-12-10 Akim Demaille <akim@epita.fr>
19617
19618 * src/reader.c (reader): Calling symbols_output once is enough.
19619
49701457
AD
196202001-12-10 Akim Demaille <akim@epita.fr>
19621
19622 Now that states have a complete set of members, the linked list of
19623 reductions is useless: just fill directly the state's reductions
19624 member.
19625
19626 * src/state.h (struct reductions): Remove member `number' and
19627 `next'.
19628 * src/LR0.c (first_reduction, last_reduction): Remove.
19629 (save_reductions): Don't link the new reductions, store them in
19630 this_state.
19631 * src/lalr.c (set_state_table): No need to attach reductions to
19632 states, it's already done.
19633 * src/output.c (output_actions): No longer free the shifts, then
19634 the reductions, then the states: free all the states and their
19635 members.
19636
0edad749
AD
196372001-12-10 Akim Demaille <akim@epita.fr>
19638
19639 * src/options.c (OPTN, DRTV, BOTH): New.
19640 (option_table): Use them.
19641
0edad749
AD
19642 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19643 the job of system.h.
19644 * src/options.c: Don't include stdio.h and xalloc.h for the same
19645 reasons.
19646
5449dd0f
AD
196472001-12-10 Akim Demaille <akim@epita.fr>
19648
19649 * src/output.c (output, prepare): Make sure the values of the
19650 muscles `action' and `prologue' are 0-terminated.
19651
a870c567
AD
196522001-12-10 Akim Demaille <akim@epita.fr>
19653
19654 Clean up GCC warnings.
19655
19656 * src/reader.c (copy_action): `buf' is not used.
19657 (parse_skel_decl): Be static.
19658 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19659 * src/options.h (create_long_option_table): Have a real prototype.
19660 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19661 (hash_delete_at): Return const void *.
19662 Adjust casts to preserve the const.
19663
80df8768
AD
196642001-12-10 Akim Demaille <akim@epita.fr>
19665
19666 * configure.in: Require 2.52g.
19667 M4 is not needed, but AUTOM4TE is.
19668 * m4/m4.m4: Remove.
19669 * tests/Makefile.am: Adjust.
19670
f693ad14
AD
196712001-12-10 Akim Demaille <akim@epita.fr>
19672
19673 One structure for states is enough, even though theoretically
19674 there are LR(0) states and LALR(1) states.
19675
19676 * src/lalr.h (state_t): Remove.
19677 (state_table): Be state_t **, not state_t *.
19678 * src/state.h (core, CORE_ALLOC): Rename as...
19679 (state_t, STATE_ALLOC): this.
19680 Add the LALR(1) members: shifts, reductions, errs.
19681 * src/LR0.c (state_table): Rename as...
19682 (state_hash): this, to avoid name clashes with the global
19683 `state_table'.
19684 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19685 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19686
74ffbcb6
AD
196872001-12-10 Akim Demaille <akim@epita.fr>
19688
19689 Bison dumps core on bash.y.
19690 Reported by Pascal Bart.
19691
19692 * src/warshall.c (bitmatrix_print): New.
19693 (TC): Use it.
ba0fe3c7 19694 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
19695 j must be the outer loop.
19696 * tests/regression.at (Broken Closure): New.
19697
07708e19
AD
196982001-12-05 Akim Demaille <akim@epita.fr>
19699
19700 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19701 its argument.
ba1ecc07 19702 Reported by Peter Hamorsky.
07708e19 19703
92b16366
AD
197042001-12-05 Akim Demaille <akim@epita.fr>
19705
19706 * src/conflicts.c (err_table): Remove.
19707 (resolve_sr_conflict): Adjust.
19708 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19709 Rename as...
19710 (state_t.reductions, state_t.shifts): this.
19711
076ab033
AD
197122001-12-05 Akim Demaille <akim@epita.fr>
19713
19714 * src/reduce.c (reduce_grammar_tables): No longer disable the
19715 removal of useless rules via CPP but via `if (0)', so that the
19716 compiler still check the code is valid.
19717 For instance, it should have noticed `rline' no longer exists: use
19718 the `line' member of rule_t.
19719 * src/gram.c (dummy, rline): Remove, unused.
19720
3843c413
AD
197212001-12-05 Akim Demaille <akim@epita.fr>
19722
19723 * src/output.c (pack_vector): Use assert, not berror.
19724 * src/main.c (berror): Remove, unused.
19725
43168960
AD
197262001-12-05 Akim Demaille <akim@epita.fr>
19727
19728 New experimental feature: if --verbose --trace output all the
19729 items of a state, not only its kernel.
19730
19731 * src/print.c (print_core): If `trace_flag', then invoke closure
19732 before outputting the items of the state (print_core is no longer
19733 a correct name them).
19734 (print_results): Invoke new_closure/free_closure if needed.
19735
b2872512
AD
197362001-12-05 Akim Demaille <akim@epita.fr>
19737
19738 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19739 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19740 (nitemset): for consistency with the rest of the project.
19741
23cbcc6c
AD
197422001-12-05 Akim Demaille <akim@epita.fr>
19743
19744 * src/closure.c (print_closure): Improve.
19745 (closure): Use it for printing input and output.
19746
03ec521c
AD
197472001-12-05 Akim Demaille <akim@epita.fr>
19748
19749 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19750 indexed by nonterminals.
19751
3a7456dd
AD
197522001-12-05 Akim Demaille <akim@epita.fr>
19753
19754 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19755 what it was!).
19756 * src/warshall.h: Remove accidental duplication of the content.
19757
1cbcf2e7
AD
197582001-12-05 Akim Demaille <akim@epita.fr>
19759
19760 * src/closure.c (set_fderives): De-obfuscate.
19761
84182270
AD
197622001-12-05 Akim Demaille <akim@epita.fr>
19763
19764 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19765
3f6f053c
AD
197662001-12-05 Akim Demaille <akim@epita.fr>
19767
19768 * src/closure.c (set_firsts): De-obfuscate.
19769
7a5350ba
AD
197702001-12-05 Akim Demaille <akim@epita.fr>
19771
19772 * src/output.c (action_row): De-obfuscate
19773 using the good o' techniques: arrays not pointers, variable
19774 locality, BITISSET, RESETBIT etc.
19775
d954473d
AD
197762001-12-05 Akim Demaille <akim@epita.fr>
19777
19778 Pessimize the code to simplify it: from now on, all the states
19779 have a valid SHIFTS, which NSHIFTS is possibly 0.
19780
19781 * src/LR0.c (shifts_new): Be global and move to..
19782 * src/state.c, src/state.h: here.
19783 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19784 * src/print_graph: Adjust.
19785
9839bbe5
AD
197862001-12-05 Akim Demaille <akim@epita.fr>
19787
19788 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19789 * src/conflicts.c: Use it.
19790 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19791 incorrectly ``simplified''.
19792
9f136c07
AD
197932001-12-05 Akim Demaille <akim@epita.fr>
19794
19795 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19796 using the good o' techniques: arrays not pointers, variable
19797 locality, BITISSET, RESETBIT etc.
19798
b608206e
AD
197992001-12-05 Akim Demaille <akim@epita.fr>
19800
19801 * src/state.h (SHIFT_SYMBOL): New.
19802 * src/conflicts.c: Use it to deobfuscate.
19803
52afa962
AD
198042001-12-05 Akim Demaille <akim@epita.fr>
19805
19806 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19807 (print_reductions): De-obfuscate using the good o' techniques:
19808 arrays not pointers, variable locality, BITISSET.
19809
e74dc321
AD
198102001-12-05 Akim Demaille <akim@epita.fr>
19811
19812 * src/conflicts.c (print_reductions): Arrays, not pointers.
19813 Use BITISSET.
19814
768fca83
AD
198152001-12-05 Akim Demaille <akim@epita.fr>
19816
19817 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19818
a17e599f
AD
198192001-12-05 Akim Demaille <akim@epita.fr>
19820
19821 * src/conflicts.c (print_reductions): Improve variable locality.
19822
a04bc341
AD
198232001-12-05 Akim Demaille <akim@epita.fr>
19824
19825 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19826
c8ea038e
AD
198272001-12-05 Akim Demaille <akim@epita.fr>
19828
19829 * src/conflicts.c (print_reductions): Improve variable locality.
19830
aa2aab3c
AD
198312001-12-05 Akim Demaille <akim@epita.fr>
19832
19833 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19834 * src/lalr.c: Use them.
19835
b178c8cc
AD
198362001-12-05 Akim Demaille <akim@epita.fr>
19837
19838 * src/LR0.c (augment_automaton): Formatting changes.
19839 Better variable locality.
19840
f67d13aa
AD
198412001-12-05 Akim Demaille <akim@epita.fr>
19842
19843 * src/lalr.c (matrix_print): New.
19844 (transpose): Use it.
19845 Use arrays instead of pointers.
19846
c2713865
AD
198472001-12-05 Akim Demaille <akim@epita.fr>
19848
19849 * src/lalr.c (maxrhs): Move to...
19850 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19851 * src/lalr.c (build_relations): Adjust.
19852
9887c18a
AD
198532001-12-05 Akim Demaille <akim@epita.fr>
19854
19855 * src/lalr.c (transpose): Free the memory allocated to the
19856 argument, as it is replaced by the results by the unique caller.
19857 (build_relations): Merely invoke transpose: it handles the memory
19858 deallocation.
19859 Improve variable locality.
19860 Avoid variables used as mere abbreviations.
19861 (compute_lookaheads): Use arrays instead of pointers.
19862
4d4f699c
AD
198632001-12-05 Akim Demaille <akim@epita.fr>
19864
19865 * src/lalr.c (initialize_F): Improve variable locality.
19866 Avoid variables used as mere abbreviations.
19867
80a69750
AD
198682001-12-05 Akim Demaille <akim@epita.fr>
19869
19870 * src/derives.c (print_derives): Display the ruleno.
19871 * src/lalr.c (initialize_F, transpose): Better variable locality
19872 to improve readability.
19873 Avoid variables used as mere abbreviations.
19874
fe961097
AD
198752001-12-05 Akim Demaille <akim@epita.fr>
19876
19877 * src/lalr.c (traverse): Use arrays instead of pointers.
19878
e3e4e814
AD
198792001-12-05 Akim Demaille <akim@epita.fr>
19880
19881 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19882 the handling of squeue.
19883 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19884
630e182b
AD
198852001-12-05 Akim Demaille <akim@epita.fr>
19886
19887 Because useless nonterminals are now kept alive (instead of being
19888 `destroyed'), we now sometimes examine them, and store information
19889 related to them. Hence we need to know their number, and adjust
19890 memory allocations.
19891
19892 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19893 static.
19894 * src/LR0.c (allocate_itemsets): The memory allocated to
19895 `symbol_count' was used for two different purpose: once to count
19896 the number of occurrences of each symbol, and later reassigned to
19897 `shift_symbol', containing the symbol that can be shifted from a
19898 given state.
19899 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19900 only, and...
19901 (new_itemsets): Allocate `shift_symbol' here.
19902 (allocate_itemsets): symbol_count includes useless nonterminals.
19903 Make room for them.
19904 (free_storage): Use `free', not `XFREE', for pointers that cannot
19905 be null.
19906
81b51460
AD
199072001-12-05 Akim Demaille <akim@epita.fr>
19908
19909 * src/nullable.c (set_nullable): Deobfuscate the handling of
19910 ritem.
19911 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19912
3067fbef
AD
199132001-12-05 Akim Demaille <akim@epita.fr>
19914
19915 * src/gram.c, src/gram.h (ritem_print): New.
19916 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19917 (This useless function was defined only to work around VMS linkers
19918 that can't handle compilation units with variables only).
19919 * src/reduce.c (dump_grammar): Use it to trace the construction of
19920 ritem.
19921
c2bea5f9
PE
199222001-12-04 Paul Eggert <eggert@twinsun.com>
19923
7d27c823
PE
19924 * src/bison.simple (union yyalloc): Change member names
19925 to be the same as the stack names.
19926 (yyparse): yyptr is now union yyalloc *, not char *.
19927 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19928 and may generate better code on some machines.
c2bea5f9
PE
19929 (yystpcpy): Use prototype if __STDC__ is defined, not just
19930 if __cplusplus is defined.
35687a9d 19931
2c8a9dfa
AD
199322001-11-30 Akim Demaille <akim@epita.fr>
19933
19934 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19935 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19936 Gettext doesn't compile cleanly, and dies with -Werror.
19937 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19938 Include WARNING_CFLAGS here.
19939 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19940 before being defined.
19941
f4e421e6
AD
199422001-11-27 Paul Eggert <eggert@twinsun.com>
19943
19944 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19945 First arg is int, not unsigned.
19946 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19947 (SIZE_MAX, UINT_MAX): New macros.
19948 (quotearg_n_options): Abort if N is negative.
19949 Avoid overflow check on hosts where size_t is 64 bits and int
19950 is 32 bits, as overflow is impossible there.
19951 Fix off-by-one typo that caused unnecessary reallocation.
19952
7093d0f5
AD
199532001-11-29 Paul Eggert <eggert@twinsun.com>
19954
19955 Name space cleanup in generated parser.
19956
19957 * doc/bison.texinfo (Bison Parser): Discuss system headers
19958 and their effect on the user name space.
19959
19960 * src/bison.simple:
19961 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19962 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19963 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19964
19965 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19966 on user names when possible.
19967
19968 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19969 Simplify test for whather <alloca.h> exists.
19970
19971 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19972
19973 (<stdio.h>): Include if YYDEBUG.
19974
19975 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19976 ! defined (yyoverflow) && ! defined (yymemcpy).
19977
19978 (yymemcpy, yyparse): Rename local variables as needed so that
19979 they all begin with 'yy'.
19980
19981 (yystrlen, yystpcpy): New functions.
19982
19983 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19984 All uses changed.
19985
19986 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19987 instead of relying on string.h functions. Use YYSTACK_ALLOC
19988 and YYSTACK_FREE instead of malloc and free.
19989
fd51e5ff
AD
199902001-11-30 Akim Demaille <akim@epita.fr>
19991
19992 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19993 before their first uses.
19994 (YYBISON, YYPURE): Move to the top of the output.
19995
7d13ff5f
AD
199962001-11-30 Akim Demaille <akim@epita.fr>
19997
19998 * tests/reduce.at (Useless Nonterminals): Fix.
19999
892a3995
AD
200002001-11-30 Akim Demaille <akim@epita.fr>
20001
20002 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20003 if body instead of `;' to pacify GCC's warnings.
20004
68f1e3ed
AD
200052001-11-30 Akim Demaille <akim@epita.fr>
20006
20007 Instead of mapping the LHS of unused rules to -1, keep the LHS
20008 valid, but flag the rules as invalid.
20009
20010 * src/gram.h (rule_t): `useful' is a new member.
20011 * src/print.c (print_grammar): Adjust.
20012 * src/derives.c (set_derives): Likewise.
20013 * src/reader.c (packgram, reduce_output): Likewise.
20014 * src/reduce.c (reduce_grammar_tables): Likewise.
20015 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20016
d2d1b42b
AD
200172001-11-30 Akim Demaille <akim@epita.fr>
20018
20019 * src/reduce.c (reduce_output): Formatting changes.
20020 * src/print.c (print_results, print_grammar): Likewise.
20021 * tests/regression.at (Rule Line Numbers)
20022 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20023
760b53a8
AD
200242001-11-30 Akim Demaille <akim@epita.fr>
20025
20026 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20027 useless nonterminals, move them at the end of the symbol arrays.
20028 (reduce_output): Adjust.
20029 * tests/reduce.at (Useless Nonterminals): Adjust.
20030
00238958
AD
200312001-11-30 Akim Demaille <akim@epita.fr>
20032
20033 * src/reduce.c: Various comment/formatting changes.
20034 (nonterminals_reduce): New, extracted from...
20035 (reduce_grammar_tables): here.
20036 (reduce_grammar): Call nonterminals_reduce.
20037
396452de
PE
200382001-11-29 Paul Eggert <eggert@twinsun.com>
20039
20040 * src/bison.simple (YYSTACK_REALLOC): Remove.
20041 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20042 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20043 New macros.
20044 (union yyalloc): New type.
20045 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20046 an arbitrary restriction on hosts where size_t is wider than int.
20047
20048 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20049 a parser stack overflow. Allocate just one block of memory for all
20050 three stacks, instead of allocating three blocks; this typically is
20051 faster and reduces fragmentation.
20052
20053 Do not limit the number of items in the stack to a value that fits
20054 in 'int', as this is an arbitrary limit on hosts with 64-bit
20055 size_t and 32-bit int.
20056
147e184c
MA
200572001-11-29 Marc Autret <autret_m@epita.fr>
20058
20059 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20060 of defining YYERROR_VERBOSE.
20061 [AT_DATA]: $4 is now out of C declarations in the prologue.
20062
426cf563
MA
200632001-11-28 Marc Autret <autret_m@epita.fr>
20064
20065 * src/reader.c (parse_dquoted_param): New.
20066 (parse_skel_decl): Use it.
20067 * src/lex.h: Add its prototype.
20068 * src/lex.c (literalchar): Become not static.
20069
c7925b99
MA
200702001-11-28 Marc Autret <autret_m@epita.fr>
20071
20072 * src/output.h: And put its extern declaration here.
20073 * src/output.c (error_verbose): Define here.
20074 (prepare): Echo name modification.
20075 * src/getargs.h: Clean its extern declaration.
20076 * src/getargs.c (error_verbose_flag): Remove.
20077 (getargs): Remove case 'e'.
20078 * src/options.c (option_table): 'error-verbose' is now seen as simple
20079 percent option.
20080 Include output.h.
20081
20082 * src/reader.c (read_declarations): Remove case tok_include.
20083 (parse_include_decl): Remove.
20084 * src/lex.h (token_t): Remove tok_include.
20085 * src/options.c (option_table): 'include' is now a simple command line
20086 option.
20087
5b5d1929
MA
200882001-11-28 Marc Autret <autret_m@epita.fr>
20089
20090 * src/bison.simple: Adjust muscle names.
20091 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20092 * src/output.c (prepare): s/_/-/ for the muscles names.
20093 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20094
8850be4b
MA
200952001-11-28 Marc Autret <autret_m@epita.fr>
20096
20097 * src/bison.simple: Fix debug.
20098 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20099
4a38e613
AD
201002001-11-28 Akim Demaille <akim@epita.fr>
20101
20102 * src/LR0.c (shifts_new): New.
20103 (save_shifts, insert_start_shift, augment_automaton): Use it.
20104
4b35e1c1
AD
201052001-11-28 Akim Demaille <akim@epita.fr>
20106
20107 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20108 keep ruleno only.
20109
d2b04478
AD
201102001-11-28 Akim Demaille <akim@epita.fr>
20111
20112 * src/closure.c (closure): Instead of looping over word in array
20113 then bits in words, loop over bits in array.
20114
2c4c30aa
AD
201152001-11-28 Akim Demaille <akim@epita.fr>
20116
20117 * src/closure.c (closure): No longer optimize the special case
20118 where all the bits of `ruleset[r]' are set to 0, to make the code
20119 clearer.
20120
576890b7
AD
201212001-11-28 Akim Demaille <akim@epita.fr>
20122
20123 * src/closure.c (closure): `r' and `c' are new variables, used to
20124 de-obfuscate accesses to RULESET and CORE.
20125
cb487d7d
AD
201262001-11-28 Akim Demaille <akim@epita.fr>
20127
20128 * src/reduce.c (reduce_print): Use ngettext.
20129 (dump_grammar): Improve the trace accuracy.
20130
6013d43f
AD
201312001-11-28 Akim Demaille <akim@epita.fr>
20132
20133 * src/reduce.c (dump_grammar): Don't translate trace messages.
20134
cb4956ee
AD
201352001-11-28 Akim Demaille <akim@epita.fr>
20136
20137 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20138 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20139 as all tags are free'ed afterwards.
20140 From Enrico Scholz.
20141
648185ab
PE
201422001-11-27 Paul Eggert <eggert@twinsun.com>
20143
20144 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20145 use alloca when we didn't want to, and vice versa.
20146
68254a03
MA
201472001-11-27 Marc Autret <autret_m@epita.fr>
20148
9113b58f
AD
20149 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20150 initialization.
68254a03
MA
20151 * src/output.c (prepare): Remove its update.
20152
04d843a2
MA
201532001-11-27 Marc Autret <autret_m@epita.fr>
20154
20155 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20156 Use %error-verbose.
20157
d2079671 201582001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
20159
20160 * src/bison.simple: Remove YYERROR_VERBOSE using.
20161 Use %%error_verbose.
20162 (yyparse): Likewise.
20163 * src/output.c (prepare): Give its final value.
20164 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20165 * src/getargs.h: Add its extern declaration.
20166 * src/getargs.c (error_verbose_flag): New int.
20167 (getargs): Update to catch new case.
20168 * src/options.c (option_table): 'error-verbose' is a new option.
20169 (shortopts): Update.
20170
e0327bc8
AD
201712001-11-27 Akim Demaille <akim@epita.fr>
20172
20173 * src/system.h: Use intl/libgettext.h.
20174 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20175
000f1a3c
AD
201762001-11-27 Akim Demaille <akim@epita.fr>
20177
20178 * tests/torture.at (Exploding the Stack Size with Malloc):
20179 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20180
26cfe0be
AD
201812001-11-27 Akim Demaille <akim@epita.fr>
20182
20183 * src/files.c: Include error.h.
20184 Reported by Hans Aberg.
20185
f6bd5427
MA
201862001-11-26 Marc Autret <autret_m@epita.fr>
20187
d2079671 20188 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
20189 (read_declarations): Add case tok_include.
20190 * src/getargs.h (include): Add its extern definition.
20191 * src/getargs.c (include): New const char *.
20192 (getargs): Add case '-I'.
20193 * src/options.c (option_table): Add include as command line and
20194 percent option.
20195 * src/lex.h (token_t): Add tok_include.
20196
2ca209c1
AD
201972001-11-26 Akim Demaille <akim@epita.fr>
20198
20199 * src/reader.c (readgram): Make sure rules for mid-rule actions
20200 have a lineno equal to that of their host rule.
20201 Reported by Hans Aberg.
20202 * tests/regression.at (Rule Line Numbers): New.
20203
0e41b407
AD
202042001-11-26 Akim Demaille <akim@epita.fr>
20205
20206 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20207 size_ts.
20208
202092001-11-26 Akim Demaille <akim@epita.fr>
20210
20211 * src/complain.c, src/complain.h (error): Remove, provided by
20212 lib/error.[ch].
20213
e0c40012
AD
202142001-11-26 Akim Demaille <akim@epita.fr>
20215
20216 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20217 issue an error message.
20218 * tests/regression.at (Invalid %directive): New.
20219 Reported by Hans Aberg.
20220
5e147124
AD
202212001-11-26 Akim Demaille <akim@epita.fr>
20222
20223 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20224 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20225
a034c8b8
AD
202262001-11-26 Akim Demaille <akim@epita.fr>
20227
20228 * src/conflicts.c (conflicts_print): Don't complain at all when
20229 there are no reduce/reduce conflicts, and as many shift/reduce
20230 conflicts as expected.
20231 * tests/regression.at (%expect right): Adjust.
20232
c64a20f3
AD
202332001-11-23 Akim Demaille <akim@epita.fr>
20234
20235 * lib/alloca.c: Update, from fileutils.
20236
5b0d29bb
AD
202372001-11-23 Akim Demaille <akim@epita.fr>
20238
20239 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20240
722c4bfe
AD
202412001-11-23 Akim Demaille <akim@epita.fr>
20242
20243 * src/system.h: Include alloca.h.
20244 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20245
6255b435
AD
202462001-11-23 Akim Demaille <akim@epita.fr>
20247
20248 * src/print_graph.c (print_actions): Remove `rule', unused.
20249 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20250 pacify GCC's signed < unsigned warnings.
20251 * src/closure.c (itemsetsize): Likewise.
20252 * src/reader.c (symbol_list_new): Static.
20253
b29b2ed5
AD
202542001-11-23 Akim Demaille <akim@epita.fr>
20255
20256 Attaching lineno to buckets is stupid, since only one copy of each
20257 symbol is kept, only the line of the first occurrence is kept too.
20258
20259 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20260 * src/reader.c (rline_allocated): Remove, unused.
20261 (symbol_list): Have a `line' member.
20262 (symbol_list_new): New.
20263 (readgram): Use it.
20264 * src/print.c (print_grammar): Output the rule line numbers.
20265 * tests/regression.at (Solved SR Conflicts)
20266 (Unresolved SR Conflicts): Adjust.
20267 Reported by Hans Aberg.
20268
a81b1d4a
MA
202692001-11-22 Marc Autret <autret_m@epita.fr>
20270
20271 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20272
c1ecb3c1
MA
202732001-11-22 Marc Autret <autret_m@epita.fr>
20274
20275 * src/muscle_tab.c (muscle_init): Remove initialization of
20276 skeleton muscle.
20277 * src/output.c (output_master_parser): Do it here.
20278
fbe01355
AD
202792001-11-20 Akim Demaille <akim@epita.fr>
20280
20281 * po/sv.po: New.
20282 * configure.in (ALL_LINGUAS): Adjust.
20283 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20284 longer contains strings to translate.
20285
81e895c0
AD
202862001-11-19 Akim Demaille <akim@epita.fr>
20287
20288 * src/conflicts.c (conflicts_print): Add a missing \n.
20289
6bb1878b
AD
202902001-11-19 Akim Demaille <akim@epita.fr>
20291
20292 * src/nullable.c (nullable_print): New.
20293 (set_nullable): Call it when tracing.
20294 Better locality of variables.
20295
d9ec2d07
AD
202962001-11-19 Akim Demaille <akim@epita.fr>
20297
20298 * src/print.c (print_actions): Better locality of variables.
20299
720e5c1b
AD
203002001-11-19 Akim Demaille <akim@epita.fr>
20301
20302 * src/derives.c (print_derives): Fix and enrich.
20303 * src/closure.c (print_fderives): Likewise.
20304
fb908786
AD
203052001-11-19 Akim Demaille <akim@epita.fr>
20306
20307 * src/closure.c (itemsetend): Remove, replaced with...
20308 (itemsetsize): new.
20309
125ecb56
AD
203102001-11-19 Akim Demaille <akim@epita.fr>
20311
20312 * src/LR0.c (kernel_end): Remove, replaced with...
20313 (kernel_size): new.
20314
d8cf039f
AD
203152001-11-19 Akim Demaille <akim@epita.fr>
20316
20317 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20318 to clarify.
20319
7bec0760
AD
203202001-11-19 Akim Demaille <akim@epita.fr>
20321
20322 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20323
c87d4863
AD
203242001-11-19 Akim Demaille <akim@epita.fr>
20325
20326 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20327 trace messages.
20328 * src/LR0.c: Likewise.
20329 (allocate_itemsets): Use arrays instead of pointers to clarify.
20330
9bfe901c
AD
203312001-11-19 Akim Demaille <akim@epita.fr>
20332
20333 * src/getargs.c (statistics_flag): Replace with...
20334 (trace_flag): New.
20335 (longopts): Accept --trace instead of --statistics.
20336 * src/getargs.h, src/options.c: Adjust.
20337 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20338 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20339
97db7bd4
AD
203402001-11-19 Akim Demaille <akim@epita.fr>
20341
cc72668c 20342 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
20343 pointers to clarify the code.
20344 (save_reductions, save_shifts): Factor common parts of alternatives.
20345
2c5f66ed
AD
203462001-11-19 Akim Demaille <akim@epita.fr>
20347
20348 * src/LR0.c (new_state, get_state): Complete TRACE code.
20349 * src/closure.c: Include `reader.h' to get `tags', needed by the
20350 trace code.
20351 Rename the conditional DEBUG as TRACE.
20352 Output consistently TRACEs to stderr, not stdout.
20353 * src/derives.c: Likewise.
20354 * src/reduce.c: (inaccessable_symbols): Using if is better style
20355 than goto.
20356 Use `#if TRACE' instead of `#if 0' for tracing code.
20357
300f275f
AD
203582001-11-19 Akim Demaille <akim@epita.fr>
20359
20360 * src/system.h (LIST_FREE, shortcpy): New.
20361 * src/LR0.c: Use them.
20362 * src/output.c (free_itemsets, free_reductions, free_shifts):
20363 Remove, replaced by LIST_FREE.
20364
f59c437a
AD
203652001-11-19 Akim Demaille <akim@epita.fr>
20366
20367 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20368 (REDUCTIONS_ALLOC): New.
20369 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20370 allocation.
20371
6986fd9e
AD
203722001-11-19 Akim Demaille <akim@epita.fr>
20373
20374 * src/LR0.c (new_state): Complete trace code.
20375 * src/nullable.c (set_nullable): Don't translate traces.
20376
4bc30f78
AD
203772001-11-19 Akim Demaille <akim@epita.fr>
20378
20379 * src/print_graph.c (print_core): Better locality of variables.
20380 * src/print.c (print_core): Likewise.
20381
08a946e0
AD
203822001-11-19 Akim Demaille <akim@epita.fr>
20383
20384 * src/vcg.c: You do the output, so you are responsible of the
20385 handling of VCG syntax, in particular: use quotearg.
20386 * src/print_graph.c: Don't.
20387 (print_actions): Don't output the actions as part of the nodes,
20388 since that's the job of the edges.
20389 (print_state): Don't output by hand: fill the node description,
9bfe901c 20390 and ask for its output.
08a946e0 20391
f0473484
AD
203922001-11-19 Akim Demaille <akim@epita.fr>
20393
cc72668c
AD
20394 * src/bison.simple (yyparse): When verbosely reporting an error,
20395 no longer put additional quotes around token names.
f0473484
AD
20396 * tests/calc.at: Adjust.
20397
e41dc700
AD
203982001-11-19 Akim Demaille <akim@epita.fr>
20399
20400 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20401 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20402 * src/output.c: Adjust.
20403
652a871c
AD
204042001-11-19 Akim Demaille <akim@epita.fr>
20405
20406 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20407 (rule_t): this.
20408 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20409
b2ed6e58
AD
204102001-11-19 Akim Demaille <akim@epita.fr>
20411
20412 * src/gram.h (rule_t): New.
20413 (rule_table): New.
20414 (rrhs, rlhs): Remove, part of state_t.
20415 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20416 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20417 * src/reader.c, src/reduce.c: Adjust.
20418
edad7067
AD
204192001-11-19 Akim Demaille <akim@epita.fr>
20420
20421 * src/reader.c (symbols_output): New, extracted from...
20422 (packsymbols): Here.
20423 (reader): Call it.
20424
3feec034
AD
204252001-11-19 Akim Demaille <akim@epita.fr>
20426
20427 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20428 (maxrhs): this new function.
20429
ddcd5fdf
AD
204302001-11-19 Akim Demaille <akim@epita.fr>
20431
cc72668c 20432 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
20433 Adjust.
20434
bb527fc2
AD
204352001-11-19 Akim Demaille <akim@epita.fr>
20436
cc72668c 20437 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
20438 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20439 * src/lalr.c: Adjust.
20440
a845a697
AD
204412001-11-19 Akim Demaille <akim@epita.fr>
20442
20443 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20444 (set_state_table): handle the `lookaheads' members.
20445
f004bf6a
AD
204462001-11-19 Akim Demaille <akim@epita.fr>
20447
cc72668c
AD
20448 * src/lalr.h (lookaheads): Removed array, whose contents is now
20449 a member of...
f004bf6a
AD
20450 (state_t): this structure.
20451 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20452 Adjust.
20453
de326cc0
AD
204542001-11-19 Akim Demaille <akim@epita.fr>
20455
cc72668c
AD
20456 * src/lalr.h (consistent): Removed array, whose contents is now
20457 a member of...
de326cc0
AD
20458 (state_t): this structure.
20459 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20460 Adjust.
20461
90b4416b
AD
204622001-11-19 Akim Demaille <akim@epita.fr>
20463
cc72668c
AD
20464 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20465 contents are now members of...
90b4416b
AD
20466 (state_t): this structure.
20467 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20468 Adjust.
20469
9703cc49
AD
204702001-11-19 Akim Demaille <akim@epita.fr>
20471
20472 * src/lalr.h (state_t): New.
20473 (state_table): Be a state_t * instead of a core **.
20474 (accessing_symbol): Remove, part of state_t.
20475 * src/lalr.c: Adjust.
20476 (set_accessing_symbol): Merge into...
20477 (set_state_table): this.
20478 * src/print_graph.c, src/conflicts.c: Adjust.
20479
d803322e
AD
204802001-11-14 Akim Demaille <akim@epita.fr>
20481
20482 * tests/calc.at, tests/output.at, tests/regression.at,
20483 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20484 now the tests are run in private dirs, therefore AC_CLEANUP and
20485 family can be simplified to 0-ary.
20486 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20487 use abs. path to find config.h.
20488 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20489 stderr, there can be way too much random noise.
20490 Instead pass -Werror to GCC and rely on the exit status.
20491 Reported by Wolfram Wagner.
20492
3d76b07d
AD
204932001-11-14 Akim Demaille <akim@epita.fr>
20494
20495 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20496 defined only if yyoverflow is defined, to avoid `warning: unused
20497 variable `yyvs1''.
20498 Reported by The Test Suite.
20499
09b503c8
AD
205002001-11-14 Akim Demaille <akim@epita.fr>
20501
20502 * src/print.c: Include reduce.h.
20503 Reported by Hans Aberg.
20504
205052001-11-14 Akim Demaille <akim@epita.fr>
20506
20507 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20508 Revert a previous patch: these are really const.
20509 * src/conflicts.c (conflict_report): Additional useless pair of
20510 braces to pacify GCC's warnings for `if () if () {} else {}'.
20511 * src/lex.c (parse_percent_token): Replace equal_offset with
20512 arg_offset.
20513 arg is const.
20514 Be sure to strdup `arg' when used, since there is no reason for
20515 token_buffer not to change.
20516
0f37a994
AD
205172001-11-14 Akim Demaille <akim@epita.fr>
20518
20519 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20520 definition.
20521 * src/main.c (main): Use them.
20522 Suggested by Hans Aberg.
20523
d39d93b8
AD
205242001-11-12 Akim Demaille <akim@epita.fr>
20525
20526 * src/system.h (ngettext): Now that we use ngettext, be sure to
20527 provide a default definition when NLS are not used.
20528
9edcd895
AD
205292001-11-12 Akim Demaille <akim@epita.fr>
20530
20531 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20532 Use @kbd to denote user input.
20533 (Language and Grammar): ANSIfy the example.
20534 Adjust its layout for info/notinfo.
20535 (Location Tracking Calc): Output error messages to stderr.
20536 Output locations in a more GNUtically correct way.
20537 Fix a couple of Englishos.
20538 Adjust @group/@end group pairs.
20539
7da99ede
AD
205402001-11-12 Akim Demaille <akim@epita.fr>
20541
e3aa65c5 20542 %expect was not functioning at all.
7da99ede
AD
20543
20544 * src/conflicts.c (expected_conflicts): Set to -1.
20545 (conflict_report): Use ngettext.
20546 (conflicts_print): Check %expect and make its violation an error.
20547 * doc/bison.texinfo (Expect Decl): Adjust.
20548 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20549 * tests/regression.at (%expect not enough, %expect right)
20550 (%expect too much): New.
20551
ba9dda1a
AD
205522001-11-12 Akim Demaille <akim@epita.fr>
20553
20554 * tests/regression.at (Conflicts): Rename as...
20555 (Unresolved SR Conflicts): this.
20556 (Solved SR Conflicts): New.
20557
337c5bd1
AD
205582001-11-12 Akim Demaille <akim@epita.fr>
20559
20560 * src/reduce.c (print_results): Rename as...
20561 (reduce_output): This.
20562 Output to OUT, passed as argument, instead of output_obstack.
20563 (dump_grammar): Likewise.
20564 (reduce_free): New.
20565 Also free V1.
20566 (reduce_grammar): No longer call reduce_output, since...
20567 * src/print.c (print_results): do it.
20568 * src/main.c (main): Call reduce_free;
20569
c73a41af
AD
205702001-11-12 Akim Demaille <akim@epita.fr>
20571
20572 * src/conflicts.c (print_reductions): Accept OUT as argument.
20573 Output to it, not to output_obstack.
20574 * src/print.c (print_actions): Adjust.
20575
0df87bb6
AD
205762001-11-12 Akim Demaille <akim@epita.fr>
20577
20578 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20579 the result instead of using...
20580 (src_total, rrc_total, src_count, rrc_count): Remove.
20581 (any_conflicts): Remove.
20582 (print_conflicts): Split into...
20583 (conflicts_print, conflicts_output): New.
20584 * src/conflicts.h: Adjust.
20585 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 20586 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
20587 * tests/regression.at (Conflicts): New.
20588 Reported by Tom Lane.
20589
e4d3d4de
AD
205902001-11-12 Akim Demaille <akim@epita.fr>
20591
20592 * tests/regression.at (Invalid input): Remove, duplicate with
20593 ``Invalid input: 1''.
20594
6d7d248e
AD
205952001-11-12 Akim Demaille <akim@epita.fr>
20596
20597 * tests/torture.at (AT_DATA_STACK_TORTURE)
20598 (Exploding the Stack Size with Alloca)
20599 (Exploding the Stack Size with Malloc): New.
20600
e9e4c321
AD
206012001-11-12 Akim Demaille <akim@epita.fr>
20602
20603 * src/bison.simple (YYSTACK_REALLOC): New.
20604 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 20605 Reported by Per Allansson.
e9e4c321 20606
5f7e0832
AD
206072001-11-12 Pascal Bart <pascal.bart@epita.fr>
20608
20609 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20610 define CPP macro, which substitute YYSTYPE by yystype.
20611 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20612 with yyltype/YYLTYPE. This allows inclusion of the generated
20613 header within the parser if the compiler, such as GGC, accepts
20614 multiple equivalent #defines.
20615 From Akim.
20616
e3f1699f
AD
206172001-11-05 Akim Demaille <akim@epita.fr>
20618
20619 * src/reader.c (symbols_output): New, extracted from...
20620 (packsymbols): here.
20621 (reader): Adjust.
20622
65be0866
AD
206232001-11-05 Akim Demaille <akim@epita.fr>
20624
20625 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20626
e4d910bf
AD
206272001-11-05 Akim Demaille <akim@epita.fr>
20628
20629 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20630 pattern.
20631
951366c1
AD
206322001-11-05 Akim Demaille <akim@epita.fr>
20633
20634 * src/options.h (struct option_table_struct): set_flags is void*.
20635 * src/options.c (longopts): Support `--output' and `%output'.
20636 (usage): Adjust.
20637 * src/lex.h (tok_setopt): Remove, replaced with...
20638 (tok_intopt, tok_stropt): these new guys.
20639 * src/lex.c (getopt.h): Not needed.
20640 (token_buffer, unlexed_token_buffer): Not const.
20641 (percent_table): Promote `-' over `_' in directive names.
20642 Active `%name-prefix', `file-prefix', and `output'.
20643 (parse_percent_token): Accept possible arguments to directives.
20644 Promote `-' over `_' in directive names.
20645
d8988b2f
AD
206462001-11-04 Akim Demaille <akim@epita.fr>
20647
20648 * doc/bison.texinfo (Decl Summary): Split the list into
20649 `directives for grammars' and `directives for bison'.
20650 Sort'em.
20651 Add description of `%name-prefix', `file-prefix', and `output'.
20652 Promote `-' over `_' in directive names.
20653 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20654 Simplify the description of `--name-prefix'.
20655 Promote `-' over `_' in directive names.
20656 Promote `--output' over `--output-file'.
20657 Fix the description of `--defines'.
20658 * tests/output.at: Exercise %file-prefix and %output.
20659
6468d18e
AD
206602001-11-02 Akim Demaille <akim@epita.fr>
20661
20662 * doc/refcard.tex: Update.
20663
6b7e85b9
AD
206642001-11-02 Akim Demaille <akim@epita.fr>
20665
20666 * src/symtab.h (SUNDEF): New.
20667 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20668 stand for `uninitialized', instead of 0.
20669 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20670 * src/lex.c (lex): Adjust.
20671
20672 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20673 Number it 0.
20674 Let yylex return it instead of a plain 0.
20675 Reported by Dick Streefland.
20676
cd5aafcf
AD
206772001-11-02 Akim Demaille <akim@epita.fr>
20678
20679 * tests/regression.at (Mixing %token styles): New test.
20680
037ca2f1
AD
206812001-11-02 Akim Demaille <akim@epita.fr>
20682
20683 * src/reader.c (parse_thong_decl): Formatting changes.
20684 (token_translations_init): New, extracted from...
20685 (packsymbols): Here.
20686 Adjust.
20687
270a173c
AD
206882001-11-01 Akim Demaille <akim@epita.fr>
20689
20690 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20691 Check that `9foo.y' produces correct cpp guards.
20692 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20693 guards.
20694 Reported by Wwp.
20695
561f9a30
AD
206962001-11-01 Akim Demaille <akim@epita.fr>
20697
20698 * tests/regression.at (Invalid input: 2): New.
20699 * src/lex.c (unlexed_token_buffer): New.
20700 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20701 too.
20702 Reported by Wwp.
20703
f987e9d2
AD
207042001-11-01 Akim Demaille <akim@epita.fr>
20705
20706 * tests/calc.at: Catch up with 1.30.
20707 * configure.in: Bump to 1.49a.
20708 Adjust to newer Autotest.
20709
0846f581
PB
207102001-10-19 Pascal Bart <pascal.bart@epita.fr>
20711
20712 * src/conflicts.c: Move global variables rrc_total and src_total ...
20713 (print_conflicts): here.
20714 * src/output.c (output): Free global variable user_toknums.
20715 * src/lex.c (token_obstack): Become static.
20716
3c1a79b3
AD
207172001-10-18 Akim Demaille <akim@epita.fr>
20718
20719 * tests/atlocal.in (GCC): Add.
20720 * tests/calc.at: s/m4_match/m4_bmatch/.
20721 s/m4_patsubst/m4_bpatsubst/.
20722 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20723 * configure.in: AC_SUBST(GCC).
20724
5d52e7d0
MA
207252001-10-14 Marc Autret <autret_m@epita.fr>
20726
20727 * src/options.c (create_long_option_table): Fix.
20728
631aa1d3
AD
207292001-10-10 Akim Demaille <akim@epita.fr>
20730
20731 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20732
f6ec6d13
AD
207332001-10-04 Akim Demaille <akim@epita.fr>
20734
20735 * src/reader.c (parse_union_decl): Push the caracters in
20736 union_obstack, not attrs_obstack.
20737
342b8b6e
AD
207382001-10-04 Akim Demaille <akim@epita.fr>
20739
20740 Merge in the branch 1.29.
20741
20742 * src/reader.c (packsymbols): Use a temporary obstack for
20743 `%%tokendef', since output_stack is already used elsewhere.
20744
20745 2001-10-02 Akim Demaille <akim@epita.fr>
20746
20747 Bump 1.29d.
20748
20749 2001-10-02 Akim Demaille <akim@epita.fr>
20750
20751 Version 1.29c.
20752
20753 2001-10-02 Akim Demaille <akim@epita.fr>
20754
20755 * tests/regression.at (Invalid CPP headers): New.
20756 From Alexander Belopolsky.
20757 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20758
20759 2001-10-02 Akim Demaille <akim@epita.fr>
20760
20761 * tests/regression.at (Invalid input): New.
20762 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20763 Reported by Shura.
20764
20765 2001-10-02 Akim Demaille <akim@epita.fr>
20766
20767 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20768
20769 2001-10-02 Akim Demaille <akim@epita.fr>
20770
20771 * src/output.c (output_parser): Assert `skeleton'.
20772 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20773 systems.
20774 From Shura.
20775
20776 2001-10-01 Marc Autret <autret_m@epita.fr>
20777
20778 * src/lex.h: Echo modifications.
20779 * src/lex.c (unlex): Parameter is now token_t.
20780 From Hans Aberg.
20781
20782 2001-10-01 Marc Autret <autret_m@epita.fr>
20783
20784 * src/main.c: Include lex.h.
20785 From Hans Aberg.
20786
20787 2001-09-29 Akim Demaille <akim@epita.fr>
20788
20789 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20790
20791 2001-09-28 Akim Demaille <akim@epita.fr>
20792
20793 * tests/testsuite.at: Update to newer Autotest.
20794 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20795
20796 2001-09-27 Akim Demaille <akim@epita.fr>
20797
20798 Position independent wrapper.
20799
20800 * tests/bison: Remove.
20801 * tests/bison.in: New.
20802 * configure.in: Adjust.
20803
20804 2001-09-27 Paul Eggert <eggert@twinsun.com>
20805
20806 Port quotearg fixes from tar 1.13.24.
20807
20808 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20809 tm to be declared.
20810 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20811 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20812
20813 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20814 * m4/mbrtowc.m4: New file.
20815 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20816 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20817
20818 2001-09-27 Akim Demaille <akim@epita.fr>
20819
20820 Bump to 1.29c.
20821
20822 2001-09-27 Akim Demaille <akim@epita.fr>
20823
20824 Version 1.29b.
20825
20826 2001-09-25 Akim Demaille <akim@epita.fr>
20827
20828 * src/system.h: Include `xalloc.h'.
20829 Remove it from the C files.
20830 * src/files.c (output_files): Free the obstacks.
20831 * src/lex.c (init_lex): Rename as...
20832 (lex_init): this.
20833 (lex_free): New.
20834 * src/main.c (main): Use it.
20835
20836 2001-09-24 Marc Autret <autret_m@epita.fr>
20837
20838 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20839 to output informations in fout (FILE*).
20840 (open_graph, close_graph): Likewise.
20841 (output_graph, output_edge, output_node): Likewise.
20842 * src/vcg.h: Update function prototypes.
20843 * src/print_graph.c (print_graph): Open output graph file.
20844 (print_actions): Adjust.
20845 * src/files.h: Remove extern declaration.
20846 * src/files.c: Remove graph_obstack declaration.
20847 (open_files): Remove graph_obstack initialization.
20848 (output_files): Remove graph_obstack saving.
20849
20850 2001-09-24 Marc Autret <autret_m@epita.fr>
20851
20852 * src/files.c (compute_output_file_names): Fix.
20853
20854 2001-09-24 Marc Autret <autret_m@epita.fr>,
20855 Akim Demaille <akim@epita.fr>
20856
20857 * src/reader.c (reader): Remove call to free_symtab ().
20858 * src/main.c (main): Call it here.
20859 Include symtab.h.
20860 * src/conflicts.c (initialize_conflicts): Rename as...
20861 (solve_conflicts): this.
20862 * src/print.c (print_core, print_actions, print_state)
20863 (print_grammar): Dump to a file instead a `output_obstack'.
20864 (print_results): Dump `output_obstack', and then proceed with the
20865 FILE *.
20866 * src/files.c (compute_output_file_names, close_files): New.
20867 (output_files): Adjust.
20868 * src/main.c (main): Adjust.
20869
20870 2001-09-23 Marc Autret <autret_m@epita.fr>
20871
20872 * src/files.c (compute_header_macro): Computes header macro name
20873 from spec_defines_file when given.
20874
20875 2001-09-23 Marc Autret <autret_m@epita.fr>
20876
20877 * src/files.c (output_files): Add default extensions.
20878
20879 2001-09-22 Akim Demaille <akim@epita.fr>
20880
20881 * src/conflicts.c (finalize_conflicts): Rename as...
20882 (free_conflicts): this.
20883
20884 2001-09-22 Akim Demaille <akim@epita.fr>
20885
20886 * src/gram.c (gram_free): Rename back as...
20887 (dummy): this.
20888 (output_token_translations): Free `token_translations'.
20889 * src/symtab.c (free_symtab): Free the tag field.
20890
20891 2001-09-22 Akim Demaille <akim@epita.fr>
20892
20893 Remove `translations' as it is always set to true.
20894
20895 * src/gram.h: Adjust.
20896 * src/reader.c (packsymbols, parse_token_decl): Adjust
20897 * src/print.c (print_grammar): Adjust.
20898 * src/output.c (output_token_translations): Adjust.
20899 * src/lex.c (lex): Adjust.
20900 * src/gram.c: Be sure the set pointers to NULL.
20901 (dummy): Rename as...
20902 (gram_free): this.
20903
20904 2001-09-22 Akim Demaille <akim@epita.fr>
20905
20906 * configure.in: Invoke AM_LIB_DMALLOC.
20907 * src/system.h: Use dmalloc.
20908 * src/LR0.c: Be sure to have pointers initialized to NULL.
20909 (allocate_itemsets): Allocate kernel_items only if needed.
20910
20911 2001-09-22 Akim Demaille <akim@epita.fr>
20912
20913 * configure.in: Bump to 1.29b.
20914 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20915 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20916 need xmalloc.c in calc.y.
20917 From Pascal Bart.
20918
20919 2001-09-21 Akim Demaille <akim@epita.fr>
20920
20921 Version 1.29a.
20922 * Makefile.maint, config/config.guess, config/config.sub,
20923 * config/missing: Update from masters.
20924 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20925 upon package.m4.
20926 * configure.in (ALL_LINGUAS): Add `tr'.
20927
20928 2001-09-21 Akim Demaille <akim@epita.fr>
20929
20930 * tests/Makefile.am (package.m4): Move to...
20931 ($(srcdir)/$(TESTSUITE)): here.
20932
20933 2001-09-20 Akim Demaille <akim@epita.fr>
20934
20935 * src/complain.c: No longer try to be standalone: use system.h.
20936 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20937 * src/complain.h: Likewise.
20938 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20939 Remove the unused variable `n'.
20940 From Albert Chin-A-Young.
20941
20942 2001-09-18 Marc Autret <autret_m@epita.fr>
20943
20944 * doc/bison.1: Update.
20945 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20946 descriptions.
20947 (Option Cross Key): Update.
20948 Add --graph.
20949
20950 2001-09-18 Marc Autret <autret_m@epita.fr>
20951
20952 * tests/regression.at: New test (comment in %union).
20953
20954 2001-09-18 Marc Autret <autret_m@epita.fr>
20955
20956 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20957 do that.
20958 Reported by Keith Browne.
20959
20960 2001-09-18 Marc Autret <autret_m@epita.fr>
20961
20962 * tests/output.at: Add tests for --defines and --graph.
20963
20964 2001-09-18 Marc Autret <autret_m@epita.fr>
20965
20966 * tests/output.at: Removes tests of %{header,src}_extension features.
20967
20968 2001-09-18 Akim Demaille <akim@epita.fr>
20969
20970 * tests/Makefile.am (package.m4): New.
20971 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20972 (_AT_CHECK_CALC_ERROR): Likewise.
20973 Factor the `, ' part of verbose error messages.
20974
20975 2001-09-18 Marc Autret <autret_m@epita.fr>
20976
20977 * src/getargs.c (longopts): Declare --defines and --graph as options
20978 with optional arguments.
20979 * src/files.h: Add extern declarations.
20980 * src/files.c (spec_graph_file, spec_defines_file): New.
20981 (output_files): Update.
20982 Remove CPP-outed code.
20983
20984 2001-09-18 Marc Autret <autret_m@epita.fr>
20985
20986 Turn off %{source,header}_extension feature.
20987
20988 * src/files.c (compute_exts_from_gf): Update.
20989 (compute_exts_from_src): Update.
20990 (output_files): CPP-out useless code.
20991 * src/files.h: Remove {header,source}_extension extern declarations.
20992 * src/reader.c (parse_dquoted_param): CPP-out.
20993 (parse_header_extension_decl): Remove.
20994 (parse_source_extension_decl): Remove.
20995 (read_declarations): Remove cases tok_{hdrext,srcext}.
20996 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20997 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20998
20999 2001-09-10 Akim Demaille <akim@epita.fr>
21000
21001 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21002 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21003 (AT_CHECK_OUTPUT): this.
21004 Merely check ls' exit status, its output is useless.
21005
21006 2001-09-10 Akim Demaille <akim@epita.fr>
21007
21008 * tests/calc.at: Use m4_match.
21009 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21010
21011 2001-09-10 Marc Autret <autret_m@epita.fr>,
21012 Akim Demaille <akim@epita.fr>
21013
21014 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21015 enum color_e.
21016 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21017 to `normal'.
21018 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21019 * src/lex.h: Adjust prototype.
21020 (token_t): Add `tok_undef'.
21021 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21022 (parse_percent_token): Now returns token_t.
21023 Add default statement in switch.
21024 (lex): Separate `c' as an input variable, from the token_t result
21025 part.
21026 (unlexed): Is a token_t.
21027
21028 2001-09-10 Akim Demaille <akim@epita.fr>
21029
21030 * configure.in: Bump to 1.29a.
21031
21032 2001-09-07 Akim Demaille <akim@epita.fr>
21033
21034 Version 1.29.
21035
21036 2001-08-30 Akim Demaille <akim@epita.fr>
21037
21038 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21039 * m4/atconfig.m4: Remove.
21040 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21041 * tests/bison: New.
21042 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21043 m4_if, m4_patsubst, and m4_regexp.
21044 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21045 `input' file instead of echo.
21046
21047 2001-08-29 Akim Demaille <akim@epita.fr>
21048
21049 Bump to 1.28e.
21050
21051 2001-08-29 Akim Demaille <akim@epita.fr>
21052
21053 Version 1.28d.
21054
21055 2001-08-29 Paul Eggert <eggert@twinsun.com>
21056
21057 * src/bison.simple (yyparse): Don't take the address of an
21058 item before the start of an array, as that doesn't conform to
21059 the C Standard.
21060
21061 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21062
21063 * doc/bison.texinfo (Location Tracking Calc): New node.
21064
21065 2001-08-29 Paul Eggert <eggert@twinsun.com>
21066
21067 * src/output.c (output): Do not define const, as this now
21068 causes more problems than it cures.
21069
21070 2001-08-29 Akim Demaille <akim@epita.fr>
21071
21072 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21073 the nodes.
21074 Be sure to tag the `detailmenu'.
21075
21076 2001-08-29 Akim Demaille <akim@epita.fr>
21077
21078 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21079 download in a tmp dir.
21080
21081 2001-08-28 Marc Autret <autret_m@epita.fr>
21082
21083 * config/depcomp: New file.
21084
21085 2001-08-28 Marc Autret <autret_m@epita.fr>
21086
21087 * doc/bison.1 (mandoc): Adjust.
21088 From Juan Manuel Guerrero.
21089
21090 2001-08-28 Marc Autret <autret_m@epita.fr>
21091
21092 * src/print_graph.c (print_state): Fix.
21093
21094 2001-08-27 Marc Autret <autret_m@epita.fr>
21095
21096 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21097 char * members.
21098 Echo modifications to the functions prototypes.
21099 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21100
21101 2001-08-27 Marc Autret <autret_m@epita.fr>
21102
21103 * src/vcg.c: Include `xalloc.h'.
21104 (add_colorentry): New.
21105 (add_classname): New.
21106 (add_infoname): New.
21107 * src/vcg.h: Add new prototypes.
21108
21109 2001-08-27 Akim Demaille <akim@epita.fr>
21110
21111 * Makefile.maint: Sync. again with CVS Autoconf.
21112
21113 2001-08-27 Akim Demaille <akim@epita.fr>
21114
21115 * Makefile.maint: Formatting changes.
21116 (po-update, cvs-update, update): New targets.
21117 (AMTAR): Remove.
21118
21119 2001-08-27 Akim Demaille <akim@epita.fr>
21120
21121 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21122 * Makefile.maint: Sync. with CVS Autoconf.
21123
21124 2001-08-27 Marc Autret <autret_m@epita.fr>
21125
21126 * src/vcg.h (struct infoname_s): New.
21127 (struct colorentry_s): New.
21128 (graph_s): New fields {vertical,horizontal}_order in structure.
21129 Add `infoname' field.
21130 Add `colorentry' field;
21131 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21132 (G_HORIZONTAL_ORDER): New.
21133 (G_INFONAME): New.
21134 (G_COLORENTRY): New.
21135 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21136 Add output of `infoname'.
21137 Add output of `colorentry'.
21138
21139 2001-08-27 Marc Autret <autret_m@epita.fr>
21140
21141 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21142 This one shadowed a global parameter.
21143
21144 2001-08-24 Marc Autret <autret_m@epita.fr>
21145
21146 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21147 instead of `unsigned'.
21148 (print_state): Do not call obstack_object_size () in obstack_grow ()
21149 to avoid macro variables shadowing.
21150
21151 2001-08-23 Marc Autret <autret_m@epita.fr>
21152
21153 * src/lex.c (percent_table): Typo: s/naem/name/.
21154 Add graph option.
21155 Normalize new options declarations.
21156
21157 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21158
21159 * tests/suite.at: Exercise %header_extension and %source_extension.
21160
21161 2001-08-16 Marc Autret <autret_m@epita.fr>
21162
21163 * src/reader.c (parse_dquoted_param): New.
21164 (parse_header_extension_decl): Use it.
21165 (parse_source_extension_decl): Likewise.
21166
21167 2001-08-16 Marc Autret <autret_m@epita.fr>
21168
21169 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21170 (get_xxxx_str): Use assert () instead of complain ().
21171 Remove return invokations in default cases.
21172 (get_decision_str): Modify default behaviour. Remove second argument.
21173 Echo modifications on calls.
21174 (output_graph): Fix.
21175
21176 2001-08-16 Marc Autret <autret_m@epita.fr>
21177
21178 * src/getargs.c (usage): Update with ``-g, --graph''.
21179
21180 2001-08-16 Marc Autret <autret_m@epita.fr>
21181
21182 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21183 (Option Cross Key): Likewise.
21184 * doc/bison.1: Update.
21185
1c8c2190
PB
211862001-09-25 Pascal Bart <pascal.bart@epita.fr>
21187
21188 * src/output.c (output_master_parser): Don't finish action_obstack.
21189 (output_parser): Don't care about the muscle action, here.
21190 (prepare): Copy the action_obstack in the action muscle.
21191 (output): Free action_obstack.
21192
180d45ba
PB
211932001-09-23 Pascal Bart <pascal.bart@epita.fr>
21194
21195 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21196 will contain `%union' declaration.
21197 (parse_union_decl): Delete #line directive output.
21198 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21199 informations about %union.
21200 (parse_union_decl): Copy the union_obstack in the muscle stype.
21201 * src/bison.simple: Add new #line directive.
21202 Add typdef %%stype YYSTYPE.
21203
c51d1a19
PB
212042001-09-23 Pascal Bart <pascal.bart@epita.fr>
21205
21206 * src/bison.simple: Add new `#line' directive.
21207
6f9344da
PB
212082001-09-22 Pascal Bart <pascal.bart@epita.fr>
21209
21210 * src/bison.simple: New `#line' directive.
21211 * src/output.c (output_parser): Support new dynamic muscle input_line.
21212
652def80
MA
212132001-09-22 Marc Autret <autret_m@epita.fr>
21214
21215 * src/output.c (output_master_parser): New.
21216 (output_parser): Be more re-entrant.
21217
25b222fa
MA
212182001-09-21 Marc Autret <autret_m@epita.fr>
21219
21220 * src/reader.c (copy_definition, parse_union_decl): Update and use
21221 `linef' muscle.
21222 (copy_action): Likewise.
21223 Use obstack_1grow ().
21224 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21225
6bc35ae5
MA
212262001-09-21 Marc Autret <autret_m@epita.fr>
21227
21228 * src/options.c (option_table): Adjust.
21229 * src/lex.c (parse_percent_token): Fix.
21230
c0629aa1
PB
212312001-09-20 Pascal Bart <pascal.bart@epita.fr>
21232
21233 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 21234
82b6d266
PB
212352001-09-20 Pascal Bart <pascal.bart@epita.fr>
21236
21237 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21238 is now an option_table_struct*.
21239 (option_strcmp): New function option_strcmp.
21240 (parse_percent_token): Call option_strcmp.
21241 * src/getargs.c (xalloc.h, options.h): Include it.
21242 (getargs): Call create_long_option_table.
21243 (getargs): Free longopts at the end of the function.
21244 (shortopts): Move in options.c.
21245 * src/options.c (create_long_option_table): New function. Convert
21246 information from option_table to option structure.
21247 * src/reader.c (options.h): Include it.
21248
21249 * src/Makefile.am: Adjust.
21250 * src/options.c (option_table): Create from longopts and percent_table.
21251 * src/getargs.c (longopts): Delete.
21252 * src/lex.c (struct percent_table_struct): Delete.
21253 (percent_table): Delete.
21254 (options.h): Include it.
21255 * src/options.c: Create.
21256 * src/options.h: Create.
21257 Declare enum opt_access_e.
21258 Define struct option_table_struct.
21259
75f5aaea
MA
212602001-09-20 Marc Autret <autret_m@epita.fr>
21261
21262 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21263 sections of Bison.
21264
f508cb0a
PB
212652001-09-19 Pascal Bart <pascal.bart@epita.fr>
21266
21267 * src/bison.simple: s/%%filename/%%skeleton.
21268 * src/muscle_tab.c (getargs.h): Include it.
21269 (muscle_init): Insert new muscle skeleton.
21270
13105fc1
PB
212712001-09-18 Pascal Bart <pascal.bart@epita.fr>
21272
21273 * src/output.c (output_parser): Delete unused variable actions_dumped.
21274
b0c4483e
PB
212752001-09-07 Pascal Bart <pascal.bart@epita.fr>
21276
21277 * src/output.c (output): Delete call to reader_output_yylsp.
21278 * src/reader.c (reader): Likewise.
ba0fe3c7 21279 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 21280
11d82f03
MA
212812001-09-02 Marc Autret <autret_m@epita.fr>
21282
21283 * src/reader.c: Include muscle_tab.h.
21284 (parse_union_decl): Update.
21285 (parse_macro_decl): Rename parse_muscle_decl.
21286 Update to use renamed functions and variable.
21287 (read_declarations, copy_action, read_additionnal_code, : Updated
21288 with correct variables and functions names.
21289 (packsymbols, reader): Likewise.
342b8b6e 21290
11d82f03 21291 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 21292
11d82f03
MA
21293 * src/output.c: Include muscle_tab.h
21294 In all functions using macro_insert, change by using muscle_insert ().
21295 (macro_obstack): Rename muscle_obstack.
21296 Echo modifications in the whole file.
21297 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21298 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21299 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21300
21301 * src/muscle_tab.h: Update double inclusion macros.
21302 (macro_entry_s): Rename muscle_entry_s.
21303 Update prototypes.
342b8b6e 21304
11d82f03
MA
21305 * src/muscle_tab.c: Include muscle_tab.h.
21306 Rename macro_tabble to muscle_table.
21307 (mhash1, mhash2, mcmp): Use muscle_entry.
21308 (macro_init): Rename muscle_init. Update.
21309 (macro_insert): Rename muscle_insert. Update.
21310 (macro_find): Rename muscle_find. Update.
21311
21312 * src/main.c: Include muscle_tab.h.
21313 (main): Call muscle_init ().
21314 * src/Makefile.am (bison_SOURCES): Echo modifications.
21315
93a37297
MA
213162001-09-02 Marc Autret <autret_m@epita.fr>
21317
f753cd62 21318 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 21319
f753cd62
MA
21320 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21321
213222001-09-02 Marc Autret <autret_m@epita.fr>
21323
21324 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 21325
682d48cd
PB
213262001-09-01 Pascal Bart <pascal.bart@epita.fr>
21327
342b8b6e 21328 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
21329 filename.
21330
087c8fda
MA
213312001-09-01 Marc Autret <autret_m@epita.fr>
21332
21333 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21334 to an explicit value to activate the feature. We do it here.
21335
dda680cb
PB
213362001-08-31 Pascal Bart <pascal.bart@epita.fr>
21337
21338 * src/output.c (prepare): Delete the `filename' muscule insertion.
21339 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21340 (parse_union_decl): Likewise.
21341 * src/macrotab.c (macro_init): Initialize filename by infile.
21342
9e644e64
MA
213432001-08-31 Marc Autret <autret_m@epita.fr>
21344
21345 * src/bison.simple (YYLSP_NEEDED): New definition.
21346 * src/output.c (prepare): Add macro insertion of `locations_flag'
21347
17da6427
PB
213482001-08-31 Pascal Bart <pascal.bart@epita.fr>
21349
21350 * src/output.c (prepare): Delete insertion of previous muscles,
21351 and insert the `prefix' muscles.
21352 * src/macrotab.c (macro_init): Likewise.
21353 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 21354 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
21355 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21356 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 21357 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
21358 name_prefix.
21359
e8cb70b9
PB
213602001-08-31 Pascal Bart <pascal.bart@epita.fr>
21361
21362 * src/main.c (main): Standardize.
21363 * src/output.c (output_table_data, output_parser): Likewise.
21364 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21365
63c2d5de
MA
213662001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21367
342b8b6e 21368 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
21369 %%epilogue.
21370 * src/output.c (output): Rename %%declarations to %%prologue.
21371 * src/bison.simple: Echo modifications.
342b8b6e 21372
d8cb5183
MA
213732001-08-31 Marc Autret <autret_m@epita.fr>
21374
21375 * src/reader.c (readgram): CleanUp.
21376 (output_token_defines): Likewise.
21377 (packsymbols): Likewise.
21378 (reader): Likewise.
21379 * src/output.c (output): CPP-out useless code.
21380
6c686258
PB
213812001-08-31 Pascal Bart <pascal.bart@epita.fr>
21382
342b8b6e 21383 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
21384 output_trailers and output_headers.
21385 * src/output.h: Remove obsolete functions prototypes of output_headers
21386 and output_trailers.
21387
8f451ef7
PB
213882001-08-30 Pascal Bart <pascal.bart@epita.fr>
21389
21390 * src/main.c: Include macrotab.h.
342b8b6e 21391 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
21392 Adjust functions prototypes.
21393 * src/macrotab.c (macro_insert): Constify key and value.
21394 (macro_find): Constify key.
21395 (macro_insert): Include 'xalloc.h'
21396 (macro_insert): Use XMALLOC.
21397 (macro_find): Constify return value.
21398 * src/output.c (output_table_data): Rename table to table_data.
21399 (output_parser): Constify macro_key, macro_value.
21400
997b6fd0 214012001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
21402
21403 * src/reader.c (parse_skel_decl): New.
342b8b6e 21404 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
21405 * src/lex.h (token_t): New token `tok_skel'.
21406 * src/lex.c (percent_table): Add skeleton option entry.
21407 Standardize.
21408
ff48177d
MA
214092001-08-29 Marc Autret <autret_m@epita.fr>
21410
21411 * src/bison.simple: Add %%user_code directive at the end.
21412 * src/reader.c (read_additionnal_code): New.
21413 (reader): Use it.
21414 * src/output.c (output_program): Remove.
21415 (output): Update.
21416
b33160bf
MA
214172001-08-28 Marc Autret <autret_m@epita.fr>
21418
21419 * src/output.c (output_actions): Clean up.
4e5caae2 21420 (output_gram): CPP-out useless code.
b33160bf
MA
21421 * src/reader.c (reader): Clean up, CPP-out useless code.
21422
d1a2daf7
PB
214232001-08-28 Pascal Bart <pascal.bart@epita.fr>
21424
342b8b6e 21425 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 21426 directive.
d1a2daf7
PB
21427 * src/bison.simple: Add `%%definitions'.
21428
2b763dfe
MA
214292001-08-28 Marc Autret <autret_m@epita.fr>
21430
21431 * config/depcomp: New file.
21432
f1a87ef6
PE
214332001-08-27 Paul Eggert <eggert@twinsun.com>
21434
21435 * src/bison.simple (yyparse): Don't take the address of an
21436 item before the start of an array, as that doesn't conform to
21437 the C Standard.
21438
82e236e2
RA
214392001-08-27 Robert Anisko <robert.anisko@epita.fr>
21440
f1a87ef6 21441 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
21442 obstack. It was done too late here.
21443
21444 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21445 completely wrong.
21446 (reader): Initialize the macro obstack here, since we need it to grow
21447 '%define' directives.
21448
21449 * src/reader.h: Declare the macro obstack as extern.
21450
b0cfa28a
RA
214512001-08-27 Robert Anisko <robert.anisko@epita.fr>
21452
21453 * src/output.c (output_parser): Fix. Store single '%' characters in
21454 the output obstack instead of throwing them away.
21455
6fc74234
AD
214562001-08-27 Akim Demaille <akim@epita.fr>
21457
21458 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21459
9c76d118
RA
214602001-08-25 Robert Anisko <robert.anisko@epita.fr>
21461
21462 * lib/Makefile.am: Adjust.
21463
a8289c62
RA
214642001-08-25 Robert Anisko <robert.anisko@epita.fr>
21465
21466 * src/bison.simple: Update and add '%%' directives.
21467
b6610515
RA
214682001-08-25 Robert Anisko <robert.anisko@epita.fr>
21469
21470 * src/reader.c (reader): Remove calls to 'output_headers' and
21471 'output_trailers'. Remove some C output.
21472 (readgram): Disable a piece of code that was writing a default
21473 definition for 'YYSTYPE'.
21474 (reader_output_yylsp): Remove.
21475 (packsymbols): Output token defintions to a macro.
21476 (copy_definition): Disable C output.
6fc74234 21477
b6610515
RA
21478 * src/reader.c (parse_macro_decl): New function used to parse macro
21479 declarations.
21480 (copy_string2): Put the body of copy_string into this new function.
21481 Add a parameter to let the caller choose whether he wants to copy the
21482 string delimiters or not.
21483 (copy_string): Be a simple call to copy_string2 with the last argument
21484 bound to true.
21485 (read_declarations): Add case for macro definition.
21486 (copy_identifier): New.
6fc74234 21487 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
21488 rather than lex.
21489
26f609ff
RA
214902001-08-25 Robert Anisko <robert.anisko@epita.fr>
21491
21492 * src/output.c (prepare): Add prefixed names.
21493 (output_parser): Output semantic actions.
21494 (output_parser): Fix bug on '%%line' directives.
6fc74234 21495
26f609ff
RA
21496 * src/output.c (output_headers): Remove. The C code printed by this
21497 function should now be in the skeletons.
21498 (output_trailers): Remove.
21499 (output): Disable call to 'reader_output_yylsp'.
21500 (output_rule_data): Do not output tables to the table obstack.
21501
21502 * src/output.c: Remove some C dedicated output.
21503 Improve the use of macro and output obstacks.
21504 (output_defines): Remove.
6fc74234 21505
26f609ff
RA
21506 * src/output.c (output_token_translations): Associate 'translate'
21507 table with a macro. No output to the table obstack.
21508 (output_gram): Same for 'rhs' and 'prhs'.
21509 (output_stos): Same for 'stos'.
21510 (output_rule_data): Same for 'r1' and 'r2'.
21511 (token_actions): Same for 'defact'.
21512 (goto_actions): Same for 'defgoto'.
21513 (output_base): Same for 'pact' and 'pgoto'.
21514 (output_table): Same for 'table'.
21515 (output_check): Same for 'check'.
6fc74234 21516
26f609ff
RA
21517 * src/output.c (output_table_data): New function.
21518 (output_short_table): Remove.
21519 (output_short_or_char_table): Remove.
6fc74234 21520
26f609ff
RA
21521 * src/output.c (output_parser): Replace most of the skeleton copy code
21522 with something new. Skeletons are now processed character by character
21523 rather than line by line, and Bison looks for '%%' macros. This is the
21524 first step in making Bison's output process (a lot) more flexible.
21525 (output_parser): Use the macro table.
21526
6f43b113
RA
215272001-08-25 Robert Anisko <robert.anisko@epita.fr>
21528
21529 * src/main.c (main): Initialize the macro table.
21530
dd3127cf
RA
215312001-08-25 Robert Anisko <robert.anisko@epita.fr>
21532
21533 * src/lex.c (percent_table): Add tok_define.
21534 * src/lex.h: Add tok_define.
21535
aa321494
RA
215362001-08-25 Robert Anisko <robert.anisko@epita.fr>
21537
21538 * src/macrotab.c: New file.
21539 * src/macrotab.h: New file.
21540 * src/Makefile.am: Update.
21541
68bd3b6b
RA
215422001-08-25 Robert Anisko <robert.anisko@epita.fr>
21543
21544 * lib/hash.c: New file.
21545 * lib/hash.h: New file.
21546 * lib/Makefile.am: Update.
21547
45f8dd1e
AD
215482001-08-15 Akim Demaille <akim@epita.fr>
21549
21550 Version 1.28c.
21551
40a64a7a 215522001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
21553
21554 * src/reader.c (readgram): Indent output macro YYSTYPE.
21555 (packsymbols): Likewise.
21556 (output_token_defines): Likewise.
21557 * src/files.c: Standardize.
21558 (compute_header_macro): New.
21559 (defines_obstack_save): New. Use compute_header_macro.
21560 (output_files): Update. Use defines_obstack_save.
21561
f9a8293a
AD
215622001-08-15 Akim Demaille <akim@epita.fr>
21563
21564 * doc/bison.texinfo (Table of Symbols): Document
21565 YYSTACK_USE_ALLOCA.
21566
150ca7a7
AD
215672001-08-15 Akim Demaille <akim@epita.fr>
21568
21569 * missing: Update from CVS Automake.
21570 * config/config.guess, config/config.sub, config/texinfo.tex:
21571 Update from gnu.org.
21572
69b5cec4
AD
215732001-08-15 Akim Demaille <akim@epita.fr>
21574
21575 * Makefile.maint: Sync with CVS Autoconf.
21576
f2b5126e
PB
215772001-08-14 Pascal Bart <pascal.bart@epita.fr>
21578
69b5cec4 21579 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
21580 `fdl.texi'.
21581 * doc/fdl.texi: Add to package.
21582
4ecbf796
MA
215832001-08-14 Marc Autret <autret_m@epita.fr>
21584
21585 Turn on %{source,header}_extension features.
21586
69b5cec4 21587 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
21588 source_extension.
21589 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 21590 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
21591 between options.
21592
95fb5662
MA
215932001-08-14 Marc Autret <autret_m@epita.fr>
21594
21595 * src/files.c (compute_base_names): Add extensions computing when
21596 `--file-prefix' used.
21597 Standardize function calls.
21598
78d09da9
MA
215992001-08-13 Marc Autret <autret_m@epita.fr>
21600
69b5cec4 21601 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
21602 defining it (defined but null disables alloca).
21603
5a009f2c
MA
216042001-08-13 Marc Autret <autret_m@epita.fr>
21605
21606 * src/bison.simple (_yy_memcpy): CPP reformat.
21607
1e41465a
PB
216082001-08-13 Pascal Bart <pascal.bart@epita.fr>
21609
21610 * tests/atconfig.in (CPPFLAGS): Fix.
21611
c67a198d
PB
216122001-08-10 Pascal Bart <pascal.bart@epita.fr>
21613
79282c6c 21614 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
21615 `gpl.texi'.
21616 * doc/gpl.texi: Add to package.
21617
09a6de7e
MA
216182001-08-10 Marc Autret <autret_m@epita.fr>
21619
21620 * src/print_graph.h: Fix.
21621 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21622
b77b9ee0
AD
216232001-08-10 Akim Demaille <akim@epita.fr>
21624
21625 * src/system.h: Provide default declarations for stpcpy, strndup,
21626 and strnlen.
21627
3e259915
MA
216282001-08-10 Robert Anisko <anisko_r@epita.fr>
21629
21630 * doc/bison.texinfo (Locations): Update @$ stuff.
21631
ca96bc2d
MA
216322001-08-09 Robert Anisko <anisko_r@epita.fr>
21633
21634 * src/bison.simple (YYLLOC_DEFAULT): Update.
21635 (yyparse): Adjust.
21636
fdc6758b
MA
216372001-08-08 Marc Autret <autret_m@epita.fr>
21638
b77b9ee0 21639 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
21640 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21641 Reported by Fabrice Bauzac.
957d4dbf 21642
600cad3b
MA
216432001-08-08 Marc Autret <autret_m@epita.fr>
21644
21645 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21646 * src/vcg.c (output_node): Fix.
21647 * src/vcg.h: Cleanup.
21648 * src/print_graph.c: Add comments.
b77b9ee0 21649 (node_output_size): New global variable. Simplify the formatting of
600cad3b 21650 the VCG graph output.
b77b9ee0 21651 (print_actions): Unused code is now used. It notifies the final state
600cad3b 21652 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 21653 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
21654 blue.
21655 Get the current node name and node_obstack by argument.
21656 (node_obstack): New variable.
21657 (print_state): Manage node_obstack.
21658 (print_core): Use node_obstack given by argument.
21659 A node is not only computed here but in print_actions also.
21660 (print_graph): CPP out useless code instead of commenting it.
21661
976e528f
AD
216622001-08-07 Pascal Bart <pascal.bart@epita.fr>
21663
21664 * tests/atconfig.in (CPPFLAGS): Fix.
21665
20e8e5ca
AD
216662001-08-07 Akim Demaille <akim@epita.fr>
21667
21668 * src/print_graph.c (quote): New.
21669 (print_core): Use it.
21670
957d4dbf 216712001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 21672
3e3da797
AD
21673 * src/vcg.c (complain.h): Include it.
21674 Unepitaize `return' invocations.
c4b66126 21675 [NDEBUG] (main): Remove.
79282c6c 21676 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
21677 * src/files.c (open_files): Initialize graph_obstack.
21678 * src/print_graph.c (print_actions): CPP out useless code.
21679 (print_core): Don't output the last `\n' in labels.
21680 Use `quote'.
21681 * src/files.c (output_files): Output the VCG file.
21682 * src/main.c (main): Invoke print_graph ();
3e3da797 21683
957d4dbf 216842001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
21685
21686 Automaton VCG graph output.
21687 Using option ``-g'' or long option ``--graph'', you can generate
21688 a gram_filename.vcg file containing a VCG description of the LALR (1)
21689 automaton of your grammar.
21690
21691 * src/main.c: Call to print_graph() function.
21692 * src/getargs.h: Update.
21693 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21694 (graph_flag): New flag.
21695 (longopts): Update.
21696 (getargs): Add case `g'.
21697 * src/files.c (graph_obstack): New obstack struct.
21698 (open_files): Initialize new obstack.
21699 (output_files): Saves graph_obstack if required.
21700 * src/files.h (graph_obstack): New extern declaration.
21701 * src/Makefile.am: Add new source files.
21702
927c1557 217032001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
21704
21705 * src/print_graph.c, src/print_graph.h (graph): New.
21706 * src/vcg.h: New file.
21707 * src/vcg.c: New file, VCG graph handling.
21708
7333d403
AD
217092001-08-06 Marc Autret <autret_m@epita.fr>
21710
21711 Add of %source_extension and %header_extension which specify
21712 the source or/and the header output file extension.
21713
21714 * src/files.c (compute_base_names): Remove initialisation of
21715 src_extension and header_extension.
21716 (compute_exts_from_gf): Update.
21717 (compute_exts_from_src): Update.
21718 (output_files): Update.
21719 * src/reader.c (parse_header_extension_decl): New.
21720 (parse_source_extension_decl): New.
21721 (read_declarations): New case statements for the new tokens.
21722 * src/lex.c (percent_table): Add entries for %source_extension
21723 and %header_extension.
21724 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21725
84163231
AD
217262001-08-06 Marc Autret <autret_m@epita.fr>
21727
21728 * configure.in: Bump to 1.28c.
21729 * doc/bison.texinfo: Texinfo thingies.
21730
8303fc42
AD
217312001-08-04 Pascal Bart <pascal.bart@epita.fr>
21732
21733 * tests/atconfig.in (CPPFLAGS): Add.
21734 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21735
70a84437
AD
217362001-08-03 Akim Demaille <akim@epita.fr>
21737
21738 Version 1.28b.
21739
2ce10144
AD
217402001-08-03 Akim Demaille <akim@epita.fr>
21741
21742 * tests/Makefile.am (check-local): Ship testsuite.
21743 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21744 Include `string.h'.
21745
1e3e4bc1
AD
217462001-08-03 Akim Demaille <akim@epita.fr>
21747
21748 * configure.in: Try using -Wformat when compiling.
21749
42b45b7f
AD
217502001-08-03 Akim Demaille <akim@epita.fr>
21751
21752 * configure.in: Bump to 1.28b.
21753
8f13fe33
AD
217542001-08-03 Akim Demaille <akim@epita.fr>
21755
21756 * src/complain.c: Adjust strerror_r portability issues.
21757
b37ba92c
AD
217582001-08-03 Akim Demaille <akim@epita.fr>
21759
21760 Version 1.28a.
21761
b0ce6046
AD
217622001-08-03 Akim Demaille <akim@epita.fr>
21763
21764 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21765 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21766 * src/getargs.c: Include complain.h.
21767 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21768 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21769
d01c415b
AD
217702001-08-03 Akim Demaille <akim@epita.fr>
21771
21772 * src/reader.c (readgram): Display hidden chars in error messages.
21773
459dd1a6
AD
217742001-08-03 Akim Demaille <akim@epita.fr>
21775
21776 Update to gettext 0.10.39.
21777
53b74c0c
AD
217782001-08-03 Akim Demaille <akim@epita.fr>
21779
21780 * lib/strspn.c: New.
21781
234a3be3
AD
217822001-08-01 Marc Autret <autret_m@epita.fr>
21783
21784 * doc/bison.texinfo: Update.
21785 * doc/bison.1 (mandoc): Update.
21786 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21787 * src/files.c: Support output files extensions computing.
21788 (src_extension): New static variable.
21789 (header_extension): New static variable.
21790 (tr): New function.
21791 (get_extension_index): New function, gets the index of an extension
21792 filename in a string.
21793 (compute_exts_from_gf): New function, computes extensions from the
21794 grammar file extension.
21795 (compute_exts_from_src): New functions, computes extensions from the
21796 C source file extension, file given by ``-o'' option.
21797 (compute_base_names): Update.
21798 (output_files): Update.
21799
847bf1f5
AD
218002001-08-01 Robert Anisko <anisko_r@epita.fr>
21801
d995fee7 21802 * doc/bison.texi: Document @$.
847bf1f5
AD
21803 (Locations): New section.
21804
d074a105
AD
218052001-07-18 Akim Demaille <akim@epita.fr>
21806
21807 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21808 * config/prev-version.txt, config/move-if-change: New.
21809 * Makefile.am: Adjust.
21810
3419715d
AD
218112001-07-08 Pascal Bart <pascal.bart@epita.fr>
21812
21813 * src/bison.simple (yyparse): Suppress warning `comparaison
21814 between signed and unsigned'.
21815
62ab6972
AD
218162001-07-05 Pascal Bart <pascal.bart@epita.fr>
21817
21818 * src/getargs.h (raw_flag): Remove.
21819 * src/getargs.c: Die on `-r'/`--raw'.
21820 * src/lex.c (parse_percent_token): Die on `%raw'.
21821 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21822 * tests/calc.at: Suppress test with option `--raw'.
21823
1e24cc5b
AD
218242001-07-14 Akim Demaille <akim@epita.fr>
21825
21826 * config/: New.
21827 * configure.in: Require Autoconf 2.50.
21828 Update to gettext 0.10.38.
21829
32dfccf8
AD
218302001-03-16 Akim Demaille <akim@epita.fr>
21831
21832 * doc/bison.texinfo: ANSIfy the examples.
21833
cd5bd6ac
AD
218342001-03-16 Akim Demaille <akim@epita.fr>
21835
21836 * getargs.c (skeleton): New variable.
21837 (longopts): --skeleton is a new option.
21838 (shortopts, getargs): -S is a new option.
21839 * getargs.h: Declare skeleton.
21840 * output.c (output_parser): Use it.
21841
5141b016
AD
218422001-03-16 Akim Demaille <akim@epita.fr>
21843
21844 * m4/strerror_r.m4: New.
21845 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21846 * lib/error.h, lib/error.c: Update.
21847
447992b9
AD
218482001-03-16 Akim Demaille <akim@epita.fr>
21849
21850 * src/getargs.c (longopts): Clean up.
21851
274d42ce
AD
218522001-02-21 Akim Demaille <akim@epita.fr>
21853
21854 * src/reader.c (gensym): `gensym_count' is your own.
21855 Use a static buf to create the symbol name, as token_buffer is no
21856 longer a buffer.
21857
22c821f3
AD
218582001-02-08 Akim Demaille <akim@epita.fr>
21859
21860 * src/conflicts.c (conflict_report): Be sure not to append to res
21861 between two calls, which could happen if both first sprintf were
21862 skipped, but not the first cp += strlen.
21863
18569462
AD
218642001-02-08 Akim Demaille <akim@epita.fr>
21865
21866 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21867 New, from fileutils 4.0.37.
21868 * configure.in: Require Autoconf 2.49c. I took some time before
21869 making this decision. This is the only way out for portability
21870 issues in Bison, it would mean way too much duplicate effort to
21871 import in Bison features implemented in 2.49c since 2.13.
21872 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21873
0d8f3c8a
AD
218742001-02-02 Akim Demaille <akim@epita.fr>
21875
21876 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 21877 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 21878
f17bcd1f
AD
218792001-01-19 Akim Demaille <akim@epita.fr>
21880
21881 Get rid of the ad hoc handling of token_buffer in the scanner: use
21882 the obstacks.
21883
21884 * src/lex.c (token_obstack): New.
21885 (init_lex): Initialize it. No longer call...
21886 (grow_token_buffer): this. Remove it.
21887 Adjust all the places which used it to use the obstack.
21888
511e79b3
AD
218892001-01-19 Akim Demaille <akim@epita.fr>
21890
21891 * src/lex.h: Rename all the tokens:
21892 s/\bENDFILE\b/tok_eof/g;
21893 s/\bIDENTIFIER\b/tok_identifier/g;
21894 etc.
21895 Let them be enums, not #define, to ease debugging.
21896 Adjust all the code.
21897
0d6508ef
AD
218982001-01-18 Akim Demaille <akim@epita.fr>
21899
21900 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21901 * src/lex.c (maxtoken, grow_token_buffer): Static.
21902
6deb4447
AD
219032001-01-18 Akim Demaille <akim@epita.fr>
21904
21905 Since we now use obstacks, more % directives can be enabled.
21906
21907 * src/lex.c (percent_table): Also accept `%yacc',
21908 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21909 `%debug'.
21910 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21911 instead of returning a token.
21912 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21913 * src/reader.c (read_declarations): Adjust.
21914 * src/files.c (open_files): Don't call `compute_base_names', don't
21915 compute `attrsfile' since they depend upon data which might be
21916 *in* the input file now.
21917 (output_files): Do it here.
21918 * src/output.c (output_headers): Document the fact that this patch
21919 introduces a guaranteed SEGV for semantic parsers.
21920 * doc/bison.texinfo: Document them.
21921 * tests/suite.at: Exercise these %options.
21922
ff4423cc
AD
219232000-12-20 Akim Demaille <akim@epita.fr>
21924
21925 Also handle the output file (--verbose) with obstacks.
21926
21927 * files.c (foutput): Remove.
21928 (output_obstack): New.
21929 Adjust all dependencies.
21930 * src/conflicts.c: Return a string.
21931 * src/system.h (obstack_grow_string): Rename as...
21932 (obstack_sgrow): this. Be ready to work with non literals.
21933 (obstack_fgrow4): New.
21934
956dba3a
AD
219352000-12-20 Akim Demaille <akim@epita.fr>
21936
21937 * src/files.c (open_files): Fix the computation of short_base_name
21938 in the case of `-o foo.tab.c'.
21939
337bab46
AD
219402000-12-20 Akim Demaille <akim@epita.fr>
21941
21942 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21943 (copy_dollar): Now that everything uses obstacks, get rid of the
21944 FILE * parameters.
21945
5d3214b8
AD
219462000-12-20 Akim Demaille <akim@epita.fr>
21947
21948 * src/files.c (open_files): Actually the `.output' file is based
21949 on the short_base_name, not base_name.
21950 * tests/suite.at (Checking output file names): Adjust.
21951
29092a57
AD
219522000-12-20 Akim Demaille <akim@epita.fr>
21953
21954 * src/bison.s1: Remove, we now use directly...
21955 * src/bison.simple: this.
21956 * src/Makefile.am: Use pkgdata instead of data.
21957
ea5607fd
AD
219582000-12-20 Akim Demaille <akim@epita.fr>
21959
21960 * src/files.c (guard_obstack): New.
21961 (open_files): Initialize it.
21962 (output_files): Dump it...
21963 * src/files.h: Export it.
21964 * src/reader.c (copy_guard): Use it.
21965
27110317
AD
219662000-12-19 Akim Demaille <akim@epita.fr>
21967
21968 * src/files.c (outfile, defsfile, actfile): Removed as global
21969 vars.
21970 (open_files): Don't compute them.
21971 (output_files): Adjust.
21972 (base_name, short_base_name): Be global.
21973 Adjust dependencies.
21974
19c50364
AD
219752000-12-19 Akim Demaille <akim@epita.fr>
21976
21977 * src/files.c (strsuffix): New.
21978 (stringappend): Be just like strcat but allocate.
21979 (base_names): Eve out from open_files.
21980 Try to simplify the rather hairy computation of base_name and
21981 short_base_name.
21982 (open_files): Use it.
21983 * tests/suite.at (Checking output file names): New test.
21984
573c1d9f
AD
219852000-12-19 Akim Demaille <akim@epita.fr>
21986
21987 * src/system.h (obstack_grow_literal_string): Rename as...
21988 (obstack_grow_string): this.
21989 * src/output.c (output_parser): Recognize `%% actions' instead of
21990 `$'.
21991 * src/bison.s1: s/$/%% actions/.
21992 * src/bison.hairy: Likewise.
21993
ef7ddedd
AD
219942000-12-19 Akim Demaille <akim@epita.fr>
21995
21996 * src/output.c (output_parser): Compute the `#line' lines when
21997 there are.
21998 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21999 Suggested by Hans Aberg.
22000
ff61dabd
AD
220012000-12-19 Akim Demaille <akim@epita.fr>
22002
22003 Let the handling of the skeleton files be local to the procedures
22004 that use it.
22005
22006 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22007 longer static.
22008 (fparser, open_extra_files): Remove.
22009 (open_files, output_files): Don't take care of fparser.
22010 * src/files.h: Adjust.
22011 * src/output.c (output_parser): Open and close the file to the
22012 skeleton.
22013 * src/reader.c (read_declarations): When %semantic_parser, open
22014 fguard.
22015
55b96341
AD
220162000-12-19 Akim Demaille <akim@epita.fr>
22017
22018 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22019 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22020
358c15b7
AD
220212000-12-19 Akim Demaille <akim@epita.fr>
22022
22023 * src/files.c (open_files): Yipee! We no longer need all the code
22024 looking for `/tmp' since we have no tmp file.
22025
7de3329e
AD
220262000-12-19 Akim Demaille <akim@epita.fr>
22027
22028 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22029 New macros.
22030 * src/files.c (open_files): Less dependency on MSDOS etc.
22031
3abcd459
AD
220322000-12-14 Akim Demaille <akim@epita.fr>
22033
22034 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22035 Provide a default definition.
22036 Use it when executing the default @ action.
22037 * src/reader.c (reader_output_yylsp): No longer include
22038 `timestamp' and `text' in the default YYLTYPE.
22039
2a91a95e
AD
220402000-12-12 Akim Demaille <akim@epita.fr>
22041
22042 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22043 (copy_guard): Quote the file names.
22044 Reported by Laurent Mascherpa.
22045
14d3eb9b
AD
220462000-12-12 Akim Demaille <akim@epita.fr>
22047
22048 * src/output.c (output_headers, output_program, output): Be sure
22049 to escape special characters when outputting filenames.
22050 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22051 (output_headers): Don't depend on them, Use ACTSTR.
22052
d7045ec6
AD
220532000-11-17 Akim Demaille <akim@epita.fr>
22054
22055 * lib/obstack.h: Formatting changes.
22056 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22057 prevents type checking.
22058 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22059 cast the value to (void *): assigning a `foo *' to a `void *'
22060 variable is valid.
22061 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22062 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22063 append characters.
22064
6fd54b73
AD
220652000-11-17 Akim Demaille <akim@epita.fr>
22066
22067 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22068 as...
22069 (suite.m4, regression.m4, calc.m4): these.
22070 * tests/atgeneral.m4: Update from CVS Autoconf.
22071
4c50eae6
AD
220722000-11-17 Akim Demaille <akim@epita.fr>
22073
22074 * tests/regression.m4 (%union and --defines): New test,
22075 demonstrating a current bug in the obstack implementation.
22076
a35f64ea
AD
220772000-11-17 Akim Demaille <akim@epita.fr>
22078
22079 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22080 macros.
22081 Use them to declare the variables which are global or local to
22082 `yyparse'.
22083
7de23534
AD
220842000-11-17 Akim Demaille <akim@epita.fr>
22085
22086 * acconfig.h: Remove, no longer used.
22087
aa7815f5
AD
220882000-11-07 Akim Demaille <akim@epita.fr>
22089
22090 * src: s/Copyright (C)/Copyright/g.
22091
5af1f549
AD
220922000-11-07 Akim Demaille <akim@epita.fr>
22093
22094 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22095 defining.
22096 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22097
553e2b22
AD
220982000-11-07 Akim Demaille <akim@epita.fr>
22099
22100 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22101 Merge in a single CPP if/else.
22102
8a4f41d6
AD
221032000-11-07 Akim Demaille <akim@epita.fr>
22104
22105 * src/output.c (output): Remove useless variables.
22106 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22107 argument `data' for consistency with the prototypes.
22108 Qualify it `const'.
22109 (obstack_copy, obstack_copy0): Rename the second argument as
22110 `address' for consistency. Qualify it `const'.
22111 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22112 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22113 `const' their input argument (`data' or `address').
22114 Adjust the corresponding macros to include `const' in casts.
22115
095a3fb5
AD
221162000-11-03 Akim Demaille <akim@epita.fr>
22117
22118 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22119 s/PFILE1/BISON_HAIRY/.
22120 Adjust dependencies.
22121
d1cdce7c
AD
221222000-11-03 Akim Demaille <akim@epita.fr>
22123
090c5ebf 22124 For some reason, this was not applied.
d1cdce7c
AD
22125
22126 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22127 `unlink': it's no longer used.
22128
9311529b
AD
221292000-11-03 Akim Demaille <akim@epita.fr>
22130
22131 * src/files.c (skeleton_find): New function, eved out of...
22132 (open_files, open_extra_files): here.
22133
d8880f69
AD
221342000-11-03 Akim Demaille <akim@epita.fr>
22135
22136 Don't use `atexit'.
22137
22138 * src/files.c (obstack_save): New function.
22139 (done): Rename as...
22140 (output_files): this.
22141 Use `obstack_save'.
22142 * src/main.c (main): Don't use `atexit' to register `done', since
22143 it no longer has to remove tmp files, just call `output_files'
22144 when there are no errors.
22145
0dbb648e
AD
221462000-11-02 Akim Demaille <akim@epita.fr>
22147
22148 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22149 `unlink': it's no longer used.
22150 * src/files.h: Formatting changes.
22151
896fe5c1
AD
221522000-11-02 Akim Demaille <akim@epita.fr>
22153
22154 Remove the last uses of mktemp and unlink/delete.
22155
22156 * src/files.c (fdefines, ftable): Removed.
22157 (defines_ostack, table_obstack): New.
22158 Adjust dependencies of the former into uses of the latter.
22159 * src/output.c (output_short_or_char_table, output_short_table):
22160 Convert to using obstacks.
22161 * src/reader.c (copy_comment2): Accept one FILE * and two
22162 obstacks.
22163 (output_token_defines, reader_output_yylsp): Use obstacks.
22164 * src/system.h (obstack_fgrow3): New.
1f65350a 22165 * po/POTFILES.in: Adjust.
896fe5c1 22166
dd60faec
AD
221672000-11-01 Akim Demaille <akim@epita.fr>
22168
22169 Change each use of `fattrs' into a use of `attrs_obstack'.
22170
22171 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22172 * src/files.c (fattrs): Remove.
22173 (attrs_obstack): New.
22174 Adjust all dependencies.
22175 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22176
8c7ebe49
AD
221772000-11-01 Akim Demaille <akim@epita.fr>
22178
22179 Introduce obstacks.
22180 Change each use of `faction' into a use of `action_obstack'.
22181
22182 * lib/obstack.h, lib/obstack.c: New files.
22183 * src/files.c (faction): Remove.
22184 (action_obstack): New.
22185 Adjust all dependencies.
22186
77aee789
AD
221872000-10-20 Akim Demaille <akim@epita.fr>
22188
22189 * lib/quote.h (PARAMS): New macro. Use it.
22190
43591cec
AD
221912000-10-16 Akim Demaille <akim@epita.fr>
22192
22193 * src/output.c (output_short_or_char_table): New function.
22194 (output_short_table, output_token_translations): Use it.
22195 (goto_actions): Use output_short_table.
22196
1e9798d5
AD
221972000-10-16 Akim Demaille <akim@epita.fr>
22198
22199 * src/symtab.c (bucket_new): New function.
22200 (getsym): Use it.
22201
22202 * src/output.c (output_short_table): New argument to display the
22203 comment associated with the table.
22204 Adjust dependencies.
22205 (output_gram): Use it.
22206 (output_rule_data): Nicer output layout for YYTNAME.
22207
f282676b
AD
222082000-10-16 Akim Demaille <akim@epita.fr>
22209
22210 * src/lex.c (read_typename): New function.
22211 (lex): Use it.
22212 * src/reader.c (copy_dollar): Likewise.
22213
550a72a3
AD
222142000-10-16 Akim Demaille <akim@epita.fr>
22215
22216 * src/reader.c (copy_comment2): Expect the input stream to be on
22217 the `/' which is suspected to open a comment, instead of being
22218 called after `//' or `/*' was read.
22219 (copy_comment, copy_definition, parse_union_decl, copy_action)
22220 (copy_guard): Adjust.
22221
131e2fef
AD
222222000-10-16 Akim Demaille <akim@epita.fr>
22223
22224 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22225 `read_signed_integer'.
22226
79282c5a
AD
222272000-10-16 Akim Demaille <akim@epita.fr>
22228
22229 * src/reader.c (copy_dollar): New function.
22230 (copy_guard, copy_action): Use it.
22231
ff4a34be
AD
222322000-10-16 Akim Demaille <akim@epita.fr>
22233
22234 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22235 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22236 New files, from Fileutils 4.0.27.
22237 * src/main.c (printable_version): Remove.
22238 * src/lex.c, src/reader.c: Use `quote'.
22239
222402000-10-04 Akim Demaille <akim@epita.fr>
22241
22242 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22243
14ded682
AD
222442000-10-04 Akim Demaille <akim@epita.fr>
22245
22246 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22247
8e03724b
AD
222482000-10-04 Akim Demaille <akim@epita.fr>
22249
22250 When a literal string is used to define two different tokens,
22251 `bison -v' segfaults.
22252 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22253
22254 * tests/regression.m4: New file.
22255 Include the core of the sample provided by Piotr Gackiewicz.
22256 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22257 properly.
22258
a9e64249
AD
222592000-10-04 Akim Demaille <akim@epita.fr>
22260
22261 * src/reader.c (parse_expect_decl): Keep `count' within the size
22262 of `buffer'.
22263 From Neil Booth.
22264
da9abf43
AD
222652000-10-02 Paul Eggert <eggert@twinsun.com>
22266
22267 * bison.s1 (yyparse): Assign the default value
22268 unconditionally, to avoid a GCC warning and make the parser a
22269 tad smaller.
22270
c33638bb
AD
222712000-10-02 Akim Demaille <akim@epita.fr>
22272
22273 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22274 options.
22275
444c570a
AD
222762000-10-02 Akim Demaille <akim@epita.fr>
22277
22278 * src/derives.c, src/print.c, src/reduce.c: To ease the
22279 translation, move some `\n' out of the translated strings.
22280
89cab50d
AD
222812000-10-02 Akim Demaille <akim@epita.fr>
22282
22283 The location tracking mechanism is precious for parse error
22284 messages. Nevertheless, it is enabled only when `@n' is used in
22285 the grammar, which is a different issue (you can use it in error
22286 message, but not in the grammar per se). Therefore, there should
22287 be another means to enable it.
22288
22289 * src/getargs.c (getargs): Support `--locations'.
22290 (usage): Report it.
22291 * src/getargs.h (locationsflag): Export it.
22292 * src/lex.c (percent_table): Support `%locations'.
22293 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22294 with `locationsflag'.
22295 * doc/bison.texinfo: Document `--locations' and `%locations'.
22296 Sort the options.
22297 * tests/calc.m4: Test it.
22298
22299 For regularity of the names, replace each
22300 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22301 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22302 In addition replace each `flag' with `_flag'.
22303
d6c2cba0
AD
223042000-10-02 Akim Demaille <akim@epita.fr>
22305
22306 Also test parse error messages, including with YYERROR_VERBOSE.
22307
22308 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22309 associative).
22310 Use it to check the computations.
22311 Use it to check `nonassoc' is honored.
22312 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22313 `--yyerror-verbose'.
22314 (_AT_CHECK_CALC): Adjust to this option.
22315 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22316
5a35a6cb
AD
223172000-10-02 Akim Demaille <akim@epita.fr>
22318
22319 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22320 the latter demonstrates a flaw in the handling of non debugging
22321 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22322 was used in order to simplify:
22323
22324 #if YYDEBUG
22325 if (yydebug)
22326 {
22327 ...
22328 }
22329 #endif
22330
22331 into
22332
22333 if (yydebug)
22334 {
22335 ...
22336 }
22337
22338 unfortunately this leads to a CPP conflict when
22339 `--name-prefix=foo' is used since it produces `#define yydebug
22340 foodebug'.
22341
22342 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22343 (YYDPRINTF): New macro.
22344 Spread its use.
22345 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22346 the bison options.
22347 Also test `--verbose', `--defines' and `--name-prefix'.
22348
71da9eea
AD
223492000-10-02 Akim Demaille <akim@epita.fr>
22350
22351 Improve the readability of the produced parsers.
22352
22353 * src/bison.s1: Formatting changes.
22354 Improve the comment related to the `$' mark.
22355 (yydefault): Don't fall through to `yyresume': `goto' there.
22356 * src/output.c (output_parser): When the `$' is met, skip the end
22357 of its line.
22358 New variable, `number_of_dollar_signs', to check there's exactly
22359 one `$' in the parser skeleton.
22360
95e36146
AD
223612000-10-02 Akim Demaille <akim@epita.fr>
22362
22363 * lib/xstrdup.c: New file, from the fileutils.
22364 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22365 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22366 instead of strlen + xmalloc + strcpy.
22367 * src/symtab.c (copys): Remove, use xstrdup instead.
22368
d7020c20
AD
223692000-10-02 Akim Demaille <akim@epita.fr>
22370
22371 * src/gram.h (associativity): New enum type which replaces the
22372 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22373 `right_assoc', `left_assoc' and `non_assoc'.
22374 Adjust all dependencies.
22375 * src/reader.c: Formatting changes.
22376 (LTYPESTR): Don't define it, use it as a literal in
22377 `reader_output_yylsp'.
22378 * src/symtab.h (symbol_class): New enum type which replaces the
22379 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22380 `sunknown', `stoken and `snterm'.
22381
1916f98e
AD
223822000-10-02 Akim Demaille <akim@epita.fr>
22383
22384 * src/getargs.c (fixed_outfiles): Rename as...
22385 (yaccflag): for consistency and accuracy.
22386 Adjust dependencies.
22387
d7913476
AD
223882000-10-02 Akim Demaille <akim@epita.fr>
22389
22390 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22391 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22392 difficult and introduced a lot of core dump. It turns out that
22393 Bison used an implementation of `xmalloc' based on `calloc', and
22394 at various places it does depend upon the initialization to 0. I
22395 have not tried to isolate the pertinent places, and all the former
22396 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22397 someone should address this issue.
22398
22399 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22400 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22401 files.
22402 Adjust dependencies.
22403 * src/warshall.h: New file.
22404 Propagate.
22405
340ef489
AD
224062000-10-02 Akim Demaille <akim@epita.fr>
22407
22408 Various anti-`extern in *.c' changes.
22409
22410 * src/system.h: Include `assert.h'.
22411
b2ca4022
AD
224122000-10-02 Akim Demaille <akim@epita.fr>
22413
22414 * src/state.h (nstates, final_state, first_state, first_shift)
22415 (first_reduction): Move their exportation from here...
22416 * src/LR0.h: to here.
22417 Adjust dependencies.
22418 * src/getargs.c (statisticsflag): New variable.
22419 Add support for `--statistics'.
22420 Adjust dependencies.
22421
22422 Remove a lot of now useless `extern' statements in most files.
22423
403b315b
AD
224242000-10-02 Akim Demaille <akim@epita.fr>
22425
22426 * src/LR0.h: New file.
22427 Propagate its use.
22428
07a58c13
AD
224292000-10-02 Akim Demaille <akim@epita.fr>
22430
22431 * src/print.h: New file.
22432 Propagate its use.
22433 * src/print.c: Formatting and ordering changes.
22434 (verbose, terse): Replace with...
22435 (print_results): this new function.
22436 Adjust dependencies.
22437
0619caf0
AD
224382000-10-02 Akim Demaille <akim@epita.fr>
22439
22440 * src/conflicts.c (conflict_report): New function.
22441 (conflict_log, verbose_conflict_log): Replace with...
22442 (print_conflicts): this function.
22443 Adjust dependencies.
22444 * src/conflicts.h: New file.
22445 Propagate its inclusion.
22446
3519ec76
AD
224472000-10-02 Akim Demaille <akim@epita.fr>
22448
22449 * src/nullable.h: New file.
22450 Propagate its inclusion.
22451 * src/nullable.c: Formatting changes.
22452
015acc48
AD
224532000-10-02 Akim Demaille <akim@epita.fr>
22454
22455 * src/reduce.h: New file.
22456 Propagate its inclusion.
22457 * src/reduce.c: Topological sort and other formatting changes.
22458 (bool, TRUE, FALSE): Move their definition to...
22459 * src/system.h: here.
22460
8963a27b
AD
224612000-10-02 Akim Demaille <akim@epita.fr>
22462
22463 * src/files.c: Formatting changes.
22464 (tryopen, tryclose, openfiles): Rename as...
22465 (xfopen, xfclose, open_files): this.
22466 (stringappend): static.
22467 * src/files.h: Complete the list of exported symbols.
22468 Propagate its use.
22469
a70083a3
AD
224702000-10-02 Akim Demaille <akim@epita.fr>
22471
22472 * src/reader.h: New file.
22473 Propagate its use instead of tedious list of `extern' and
22474 prototypes.
22475 * src/reader.c: Formatting changes, topological sort,
22476 s/register//.
22477
abadc117
AD
224782000-10-02 Akim Demaille <akim@epita.fr>
22479
22480 * src/lex.h: Prototype `lex.c' exported functions.
22481 * src/reader.c: Adjust.
22482 * src/lex.c: Formatting changes.
22483 (safegetc): Rename as...
22484 (xgetc): this.
22485
720d742f
AD
224862000-10-02 Akim Demaille <akim@epita.fr>
22487
22488 * src/lalr.h: New file.
22489 Propagate its inclusion instead of prototypes and `extern'.
22490 * src/lalr.c: Formatting changes, topological sorting etc.
22491
f2acea59
AD
224922000-10-02 Akim Demaille <akim@epita.fr>
22493
22494 * src/output.c (token_actions): Introduce a temporary array,
22495 YYDEFACT, that makes it possible for this function to use
22496 output_short_table.
22497
d019d655
AD
224982000-10-02 Akim Demaille <akim@epita.fr>
22499
22500 `user_toknums' is output as a `short[]' in `output.c', while it is
22501 defined as a `int[]' in `reader.c'. For consistency with the
22502 other output tables, `user_toknums' is now defined as a table of
22503 shorts.
22504
22505 * src/reader.c (user_toknums): Be a short table instead of an int
22506 table.
22507 Adjust dependencies.
22508
22509 Factor the short table outputs.
22510
22511 * src/output.c (output_short_table): New function.
22512 * src/output.c (output_gram, output_stos, output_rule_data)
22513 (output_base, output_table, output_check): Use it.
22514
6c89f1c1
AD
225152000-10-02 Akim Demaille <akim@epita.fr>
22516
22517 * src/output.c (output): Topological sort of the functions, in
22518 order to get rid of the `static' prototypes.
22519 No longer use `register'.
22520 * src/output.h: New file.
22521 Propagate its inclusion in files explicitly prototyping functions
22522 from output.c.
22523
d9efd181
AD
225242000-09-21 Akim Demaille <akim@epita.fr>
22525
22526 * src/atgeneral.m4: Update from Autoconf.
22527
c29240e7 225282000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
22529
22530 * src/closure.h: New file.
22531 * src/closure.c: Formatting changes, topological sort over the
22532 functions, use of closure.h.
22533 (initialize_closure, finalize_closure): Rename as...
22534 (new_closure, free_closure): these. Adjust dependencies.
22535 * src/LR0.c: Formatting changes, topological sort, use of
22536 cloture.h.
22537 (initialize_states): Rename as...
22538 (new_states): this.
22539 * src/Makefile.am (noinst_HEADERS): Adjust.
22540
499daa50
AD
225412000-09-20 Akim Demaille <akim@epita.fr>
22542
22543 * src/acconfig.h: Don't protect config.h against multiple
22544 inclusion.
22545 Don't define PARAMS.
22546 * src/system.h: Define PARAMS.
22547 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22548 purpose of config.h. system.h must not try to fix wrong
22549 definitions in config.h.
22550
cc84fd5d
AD
225512000-09-20 Akim Demaille <akim@epita.fr>
22552
22553 * src/derives.h: New file.
22554 * src/main.c, src/derives.h: Use it.
22555 Formatting changes.
22556 * src/Makefile.am (noinst_HEADERS): Adjust.
22557
db5b3a89
AD
225582000-09-20 Akim Demaille <akim@epita.fr>
22559
22560 * tests/atgeneral.m4: Update from Autoconf.
22561 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22562 (AT_CHECK_CALC): New macros.
22563 Use these macros to test bison with options `', `--raw',
22564 `--debug', `--yacc', `--yacc --debug'.
22565
ceed8467
AD
225662000-09-19 Akim Demaille <akim@epita.fr>
22567
22568 * src/output.c: Formatting changes.
22569 * src/machine.h: Remove, leaving its contents in...
22570 * src/system.h: here.
22571 Include stdio.h.
22572 Adjust all dependencies on stdio.h and machine.h.
22573 * src/getargs.h: New file.
22574 Let all `extern' declarations about getargs.c be replaced with
22575 inclusion of `getargs.h'.
22576 * src/Makefile.am (noinst_HEADERS): Adjust.
22577
22578 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22579 scope.
22580 (yyerror): Returns void, not int.
22581 * doc/bison.texinfo: Formatting changes.
22582
05a1d24b
AD
225832000-09-19 Akim Demaille <akim@epita.fr>
22584
22585 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22586 portable.
22587
cbd25751
AD
225882000-09-18 Akim Demaille <akim@epita.fr>
22589
22590 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22591 * src/Makefile.am (INCLUDES): Don't.
22592 Be ready to fetch headers in lib/.
22593
13863333
AD
225942000-09-18 Akim Demaille <akim@epita.fr>
22595
22596 * doc/bison.texinfo: Update the copyright.
22597 ANSIfy and GNUify the examples.
22598 Remove the old menu.
22599
0d533154
AD
226002000-09-18 Akim Demaille <akim@epita.fr>
22601
22602 First set of tests: use the `calc' example from the documentation.
22603
22604 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22605 is defined only when YYDEBUG is.
22606 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22607 * src/files.c (tryopen, tryclose): Formatting changes.
22608 Move to the top and be static.
22609 * src/reader.c (read_signed_integer): Likewise.
22610 * tests/calc.m4: New file.
22611 * Makefile.am, suite.m4: Adjust.
22612 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22613
e79137ac
AD
226142000-09-18 Akim Demaille <akim@epita.fr>
22615
22616 Add support for an Autotest test suite for Bison.
22617
22618 * m4/m4.m4, m4/atconfig.m4: New files.
22619 * m4/Makefile.am (EXTRA_DIST): Adjust.
22620 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22621 files.
22622 * src/getargs.c: Display a more standard --version message.
22623 * src/reader.c (reader): Formatting changes.
22624 No longer depend upon VERSION_STRING.
22625 * configure.in: No longer use `dnl'.
22626 Set up the test suite and the new directory `tests/.
22627 (VERSION_STRING): Remove.
22628
27821bff
AD
226292000-04-14 Akim Demaille <akim@epita.fr>
22630
22631 * src/reader.c (copy_comment2): New function, same as former
22632 `copy_comment', but outputs into two FILE *.
22633 (copy_comment): Use it.
22634 (parse_union_decl): Use it.
22635 (get_type, parse_start_decl): Use the same `invalid' message.
22636 (parse_start_decl, parse_union_decl): Use the same `multiple'
22637 message.
22638 (parse_union_decl, copy_guard, copy_action): Use the same
22639 `unmatched' message.
22640 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22641
cfe5fbc0
AD
226422000-03-31 Akim Demaille <akim@epita.fr>
22643
22644 * src/files.c (tryopen, tryclose): Move to the top.
22645 Be static.
22646
cb7db13e
AD
226472000-03-31 Akim Demaille <akim@epita.fr>
22648
22649 * src/main.c (main): Don't call `done', exit does it.
22650
a0f6b076
AD
226512000-03-31 Akim Demaille <akim@epita.fr>
22652
36281465
AD
22653 * allocate.c: s/return (foo)/return foo/.
22654 * lalr.c: Likewise.
22655 * LR0.c: Likewise.
22656 * output.c: Likewise.
22657 * reader.c: Likewise.
22658 * symtab.c: Likewise.
22659 * vmsgetargs.c: Likewise.
22660
226612000-03-31 Akim Demaille <akim@epita.fr>
22662
22663 Clean up the error reporting functions.
a0f6b076
AD
22664
22665 * src/report.c: New file.
22666 * src/report.h: Likewise.
22667 * src/Makefile.am: Adjust.
22668 * m4/error.m4: New file.
22669 * m4/Makefile.am: Adjust.
22670 * configure.in (jm_PREREQ_ERROR): Call it.
22671 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22672 Remove.
22673 (fatal, fatals): Remove. All callers use complain.c::fatal.
22674 (warn, warni, warns, warnss, warnss): Remove. All callers use
22675 complain.c::complain.
22676 (toomany): Remove, use fatal instead.
22677 * src/files.c (done): No argument, use complain_message_count.
22678 * src/main.c (main): Register `done' to `atexit'.
22679
22680 * src/getargs.c (usage): More `fputs', less `fprintf'.
22681
18539825
AD
226822000-03-28 Akim Demaille <akim@epita.fr>
22683
22684 * lib/: New directory.
22685 * Makefile.am (SUBDIRS): Adjust.
22686 * configure.in: Adjust.
22687 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22688 useless.
22689 * src/alloca.c: Moved to lib/.
22690 * src/getopt.c: Likewise.
22691 * src/getopt1.c: Likewise.
22692 * src/getopt.h: Likewise.
22693 * src/ansi2knr.c: Likewise.
22694 * src/ansi2knr.1: Likewise.
22695 * src/Makefile.am: Adjust.
22696 * lib/Makefile.am: New file.
22697
9f306f2a
AD
226982000-03-28 Akim Demaille <akim@epita.fr>
22699
22700 * src/getargs.c (usage): Refresh the help message.
22701
0ba347b6
AD
227022000-03-17 Akim Demaille <akim@epita.fr>
22703
22704 * src/getopt1.c: Updated from textutils 2.0e
22705 * src/getopt.c: Likewise.
22706 * src/getopt.h: Likewise.
22707
dbe7f271
AD
227082000-03-17 Akim Demaille <akim@epita.fr>
22709
22710 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22711 the file name, not the whole `#line LINE FILE'.
22712
75bbe78d
AD
227132000-03-17 Akim Demaille <akim@epita.fr>
22714
22715 On syntax errors, report the token on which we choked.
22716
aa5fd0ee
AD
22717 * src/bison.s1 (yyparse): In the label yyerrlab, when
22718 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 22719
7b306f52
AD
227202000-03-17 Akim Demaille <akim@epita.fr>
22721
aa5fd0ee 22722 * src/reader.c (copy_at): New function.
7b306f52
AD
22723 (copy_guard): Use it.
22724 (copy_action): Use it.
22725
e87b5700
AD
227262000-03-17 Akim Demaille <akim@epita.fr>
22727
22728 Be kind to translators, save some useless translations.
22729
aa5fd0ee 22730 * src/main.c (banner): New function.
e87b5700
AD
22731 (fatal_banner): Use it.
22732 (warn_banner): Use it.
22733
ae3c3164
AD
227342000-03-17 Akim Demaille <akim@epita.fr>
22735
aa5fd0ee
AD
22736 * src/reader.c (copy_definition): Use copy_string and
22737 copy_comment. Removed now unused `match', `ended',
22738 `cplus_comment'.
ae3c3164
AD
22739 (copy_comment, copy_string): Moved, to be visible from
22740 copy_definition.
22741
4dc58e7c
AD
227422000-03-17 Akim Demaille <akim@epita.fr>
22743
aa5fd0ee
AD
22744 * src/reader.c (copy_string): Declare `static inline'. No
22745 problems with inline, since it is checked by configure.
4dc58e7c
AD
22746 (copy_comment): Likewise.
22747
0a6384c4
AD
227482000-03-17 Akim Demaille <akim@epita.fr>
22749
aa5fd0ee 22750 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 22751
3cef001a
AD
227522000-03-17 Akim Demaille <akim@epita.fr>
22753
aa5fd0ee 22754 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
22755 (copy_action): Use it. Removed now unused `match', `ended',
22756 `cplus_comment'.
22757 (copy_guard): Likewise.
22758
ca36d2ef
AD
227592000-03-17 Akim Demaille <akim@epita.fr>
22760
aa5fd0ee 22761 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
22762 (copy_action): Use it.
22763 (copy_guard): Likewise.
22764
6666f98f
AD
227652000-03-17 Akim Demaille <akim@epita.fr>
22766
22767 Change the handling of @s so that they behave exactly like $s.
22768 There is now a pseudo variable @$ (readble and writable), location
22769 of the lhs of the rule (by default ranging from the location of
22770 the first symbol of the rhs, to the location of the last symbol,
22771 or, if the rhs is empty, YYLLOC).
22772
22773 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22774 yyval.
22775 (yyparse): When providing a default semantic action, provide a
22776 default location action.
22777 (after the $): No longer change `*YYLSP', just stack YYLOC the
22778 same way you stack YYVAL.
22779 * src/reader.c (read_declarations): Use warns.
22780 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22781 (copy_action, case '@'): Likewise.
22782 Use a standard error message, to save useless work from
22783 translators.
22784
41aca2e0
AD
227852000-03-17 Akim Demaille <akim@epita.fr>
22786
aa5fd0ee
AD
22787 * src/bison.s1: Formatting and cosmetics changes.
22788 * src/reader.c: Likewise.
41aca2e0
AD
22789 Update the Copyright notice.
22790
dc08c1d5
AD
227912000-03-17 Akim Demaille <akim@epita.fr>
22792
aa5fd0ee
AD
22793 * src/bison.s1 (#line): All set to `#line' only, since the
22794 Makefile now handles them.
dc08c1d5 22795
9ee3c97b
AD
227962000-03-16 Akim Demaille <akim@epita.fr>
22797
22798 * src/output.c (output_rule_data): Output the documentation of
22799 some of the tables.
22800 (Copyright notice): Update.
22801 Formatting changes.
22802
0de741ca
AD
228032000-03-16 Akim Demaille <akim@epita.fr>
22804
22805 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22806 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22807 One `#if YYDEBUG' remains, since it uses variables which are
22808 defined only if `YYDEBUG != 0'.
22809
bb10be54
AD
228102000-03-16 Akim Demaille <akim@epita.fr>
22811
22812 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22813 and related variables so that the similarities are highlighted.
22814
b07b484a
AD
228152000-03-16 Akim Demaille <akim@epita.fr>
22816
22817 * src/bison.s1: Properly indent CPP directives.
22818
361f60b3
AD
228192000-03-16 Akim Demaille <akim@epita.fr>
22820
22821 * src/bison.s1: Properly indent the `alloca' CPP section.
22822
8c44d3ec
AD
228232000-03-16 Akim Demaille <akim@epita.fr>
22824
22825 Do not hard code values of directories in `configure.in'.
22826 Update the `configure' tool chain.
22827
22828 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22829 src/makefile.am.
22830 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22831 (AC_OUTPUT): Add m4/Makefile.
22832 Bump to bison 1.28a, 1.29 has never been released.
22833 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22834 handled via src/Makefile.am.
22835 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22836 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22837 autoheader.
22838 * Makefile.am (SUBDIRS): Add m4.
22839 (ACLOCAL_AM_FLAGS): New variable.
22840 (AUTOMAKE_OPTIONS): Add check-news.
22841 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22842 the proper line number and file name.
22843 (DEFS): Propagate the location of bison library files and of the
22844 locale files.
22845 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22846 builddir.
22847 * acinclude.m4: Remove, replaced by the directory m4.
22848 * m4/Makefile.am (EXTRA_DIST): New variable.
22849 * m4/gettext.m4: New file, from the fileutils.
22850 * m4/lcmessage.m4: Likewise
22851 * m4/progtest.m4: Likewise.
22852 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22853
f95997e7
AD
228542000-03-10 Akim Demaille <akim@epita.fr>
22855
22856 * src/closure.c:
22857 Formatting changes of various comments.
22858 Respect the GNU coding standards at various places.
22859 Don't use `_()' when no translation is needed.
22860
228611999-12-13 Jesse Thilo <jthilo@gnu.org>
22862
22863 * src/files.c:
22864 OS/2 honors TMPDIR environment variable.
22865
228661999-12-13 Jesse Thilo <jthilo@gnu.org>
22867
22868 * doc/bison.texinfo: Tweaked spelling and grammar.
22869 Updated ISBN.
22870 Removed reference to price of printed copy.
22871 Mention BISON_SIMPLE and BISON_HAIRY.
22872
228731999-12-13 Jesse Thilo <jthilo@gnu.org>
22874
22875 * configure.in, NEWS:
22876 Bison 1.29 released.
22877
228781999-10-27 Jesse Thilo <jthilo@gnu.org>
22879
22880 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22881 Added reference card.
22882
228831999-07-26 Jesse Thilo <jthilo@gnu.org>
22884
22885 * po/ru.po: Added Russian translation.
22886
228871999-07-26 Jesse Thilo <jthilo@gnu.org>
22888
22889 * configure.in: Added Russian translation.
22890
228911999-07-06 Jesse Thilo <jthilo@gnu.org>
22892
22893 * configure.in, NEWS, README:
22894 Released version 1.28.
22895
228961999-06-14 Jesse Thilo <jthilo@gnu.org>
22897
22898 * src/system.h:
22899 Squashed redefinition warning on some systems.
22900
22901 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22902 Have configure build version string instead of relying on ANSI string
22903 concatentation.
22904
229051999-06-14 Jesse Thilo <jthilo@gnu.org>
22906
22907 * po/POTFILES.in: Got rid of version.c.
22908
229091999-06-14 Jesse Thilo <jthilo@gnu.org>
22910
22911 * acconfig.h, configure.in:
22912 Have configure build version string instead of relying on ANSI string
22913 concatentation.
22914
229151999-06-08 Jesse Thilo <jthilo@gnu.org>
22916
22917 * doc/bison.1:
22918 Dropped mention of `+' for long-named options.
22919
229201999-05-30 Jesse Thilo <jthilo@gnu.org>
22921
22922 * src/files.c: Added <unistd.h> for unlink().
22923
22924 * src/Makefile.am, src/system.h:
22925 I18n fixes.
22926
229271999-05-30 Jesse Thilo <jthilo@gnu.org>
22928
22929 * README: Added a FAQ list.
22930
22931 * configure.in, acconfig.h:
22932 I18n fixes.
22933
229341999-05-30 Jesse Thilo <jthilo@gnu.org>
22935
22936 * doc/FAQ, doc/Makefile.am:
22937 Added a FAQ list.
22938
229391999-05-19 Jesse Thilo <jthilo@gnu.org>
22940
22941 * src/alloc.h, src/symtab.h, src/version.c:
22942 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22943
229441999-04-18 Jesse Thilo <jthilo@gnu.org>
22945
22946 * src/.cvsignore, src/Makefile.am:
22947 Reorganized: sources in `src', documentation in `doc'.
22948
22949 * src/lex.c (literalchar):
22950 fixed the code for escaping double quotes (thanks
22951 Jonathan Czisny.)
22952
229531999-04-18 Jesse Thilo <jthilo@gnu.org>
22954
22955 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22956 Adjusted paths to reflect directory reorganization.
22957
229581999-04-18 Jesse Thilo <jthilo@gnu.org>
22959
22960 * doc/.cvsignore, doc/Makefile.am:
22961 Reorganized: sources in `src', documentation in `doc'.
22962
229631999-04-18 Jesse Thilo <jthilo@gnu.org>
22964
22965 * configure.in:
22966 Updated AC_INIT file to reflect directory reorganization.
22967
22968 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22969 Reorganized: sources in `src', documentation in `doc'.
22970
229711999-04-13 Jesse Thilo <jthilo@gnu.org>
22972
22973 * src/allocate.c:
22974 Don't declare calloc() and realloc() if not necessary.
22975
229761999-04-13 Jesse Thilo <jthilo@gnu.org>
22977
22978 * configure.in, acconfig.h, acinclude.m4:
22979 Don't declare calloc() and realloc() if not necessary.
22980
229811999-03-23 Jesse Thilo <jthilo@gnu.org>
22982
22983 * po/.cvsignore: Added i18n support.
22984
229851999-03-23 Jesse Thilo <jthilo@gnu.org>
22986
22987 * acconfig.h, configure.in, Makefile.am:
22988 Added i18n support.
22989
229901999-03-22 Jesse Thilo <jthilo@gnu.org>
22991
22992 * src/bison.s1: Fixed #line numbers.
22993
229941999-03-15 Jesse Thilo <jthilo@gnu.org>
22995
22996 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22997 Added PO files from Translation Project.
22998
229991999-03-03 Jesse Thilo <jthilo@gnu.org>
23000
23001 * Makefile.am:
23002 Added support for non-ANSI compilers (ansi2knr).
23003
230041999-02-16 Jesse Thilo <jthilo@gnu.org>
23005
23006 * configure.in: Bumped version number to 1.27.
23007
23008 * Makefile.am:
23009 Added `bison.simple' to list of files removed by `make distclean'.
23010
230111999-02-12 Jesse Thilo <jthilo@gnu.org>
23012
23013 * src/files.c, src/files.h:
23014 Defined locations of parser files in config.h instead of Makefile.
23015
230161999-02-12 Jesse Thilo <jthilo@gnu.org>
23017
23018 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23019 Defined locations of parser files in config.h instead of Makefile.
23020
230211999-02-09 Jesse Thilo <jthilo@gnu.org>
23022
23023 * Makefile.am:
23024 Removed inappropriate use of $< macro.
23025
230261999-02-05 Jesse Thilo <jthilo@gnu.org>
23027
23028 * po/Makefile.in.in, po/POTFILES.in:
23029 Add `po' directory skeleton.
23030
230311999-01-27 Jesse Thilo <jthilo@gnu.org>
23032
23033 * README: Document help-bison list.
23034
23035 * configure.in: Add check for mkstemp().
23036
230371999-01-20 Jesse Thilo <jthilo@gnu.org>
23038
23039 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23040 Hush a few compiler warnings.
23041
23042 * src/files.c:
23043 Add tryclose(), which verifies that fclose was successful.
23044 Hush a couple of compiler warnings.
23045
230461999-01-20 Jesse Thilo <jthilo@gnu.org>
23047
23048 * Makefile.am, OChangeLog:
23049 ChangeLog is now automatically generated. Include the old version as
23050 OChangeLog.
23051
230521999-01-14 Jesse Thilo <jthilo@gnu.org>
23053
23054 * 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:
23055 Update FSF address.
23056
230571999-01-14 Jesse Thilo <jthilo@gnu.org>
23058
23059 * doc/bison.texinfo: Fix formatting glitch.
23060
23061 * doc/bison.texinfo: Update FSF address.
23062
230631999-01-14 Jesse Thilo <jthilo@gnu.org>
23064
23065 * acconfig.h: Update FSF address.
23066
230671999-01-08 Jesse Thilo <jthilo@gnu.org>
23068
23069 * src/system.h:
23070 Don't define PACKAGE here, since config.h defines it.
23071
230721998-12-30 Jesse Thilo <jthilo@gnu.org>
23073
23074 * src/reader.c: Update copyright date.
23075
23076 * src/main.c:
23077 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23078 favor of output directly to stderr (avoids buffer overruns).
23079
23080 * src/reader.c: Some checks for premature EOF.
23081
23082 * 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:
23083 Use prototypes if the compiler understands them.
23084
23085 * src/files.c: Honor TMPDIR on Unix hosts.
23086 Use prototypes if the compiler understands them.
23087
23088 * src/reader.c:
23089 Fix a couple of buffer overrun bugs.
23090 Use prototypes if the compiler understands them.
23091
23092 * src/system.h: Include unistd.h and ctype.h.
23093 Use #ifdef instead of #if for NLS symbols.
23094
230951998-12-30 Jesse Thilo <jthilo@gnu.org>
23096
23097 * doc/bison.texinfo:
23098 Delete comment "consider using @set for edition number, etc..." since
23099 we now are doing so.
23100
231011998-12-30 Jesse Thilo <jthilo@gnu.org>
23102
23103 * configure.in:
23104 Use prototypes if the compiler understands them.
23105
23106 * NEWS: Document 1.26 highlights.
23107
23108 * Makefile.am: Require Automake 1.3 or later.
23109
23110 * acconfig.h:
23111 Use prototypes if the compiler understands them.
23112
231131998-12-29 Jesse Thilo <jthilo@gnu.org>
23114
23115 * src/version.c:
23116 Use VERSION symbol from automake for version number.
23117
231181998-12-29 Jesse Thilo <jthilo@gnu.org>
23119
23120 * acconfig.h, configure.in, version.cin:
23121 Use VERSION symbol from automake for version number.
23122
231231998-11-28 Jesse Thilo <jthilo@gnu.org>
23124
23125 * Makefile.am:
23126 Distribute original version of simple parser (bison.s1), not built
23127 version (bison.simple).
23128
231291998-11-28 Jesse Thilo <jthilo@gnu.org>
23130
23131 * doc/bison.texinfo: Add info dir entry.
23132
23133 * doc/bison.texinfo:
23134 Let automake put version number into documentation.
23135
231361998-11-26 Jesse Thilo <jthilo@gnu.org>
23137
23138 * src/bison.cld, src/build.com, src/vmshlp.mar:
23139 Add non-RCS files from /gd/gnu/bison.
23140
231411998-11-26 Jesse Thilo <jthilo@gnu.org>
23142
23143 * doc/bison.1:
23144 Document the BISON_HAIRY and BISON_SIMPLE variables.
23145
231461998-11-25 Jesse Thilo <jthilo@gnu.org>
23147
23148 * src/version.c: Build version.c automatically.
23149
23150 * src/reader.c:
23151 Fix token numbering (used to start at 258, not 257).
23152
23153 * src/system.h: Include config.h.
23154
23155 * src/getargs.c: Update bug report address.
23156
23157 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23158 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23159
231601998-11-25 Jesse Thilo <jthilo@gnu.org>
23161
23162 * Makefile.am:
23163 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23164
23165 * configure.in, version.cin:
23166 Build version.c automatically.
23167
23168 * AUTHORS: Add AUTHORS file.
23169
23170 * README: Update bug report address.
23171
23172 * bison.simple:
23173 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23174
23175 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23176 Add automake stuff.
23177
231781998-11-25 Jesse Thilo <jthilo@gnu.org>
23179
23180 * doc/bison.texinfo: Clean up some formatting.
23181
231821998-05-05 Richard Stallman <rms@gnu.org>
23183
23184 * doc/bison.texinfo:
23185 Explain better why to make a pure parser.
23186
231871998-01-05 Richard Stallman <rms@gnu.org>
23188
23189 * src/files.c (openfiles):
23190 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23191 find a temporary directory, if possible. Do not unlink files while
23192 they are open.
23193
231941997-08-25 Richard Stallman <rms@gnu.org>
23195
23196 * src/reader.c (stack_offset;):
23197 Change some warni to warns.
23198
23199 * src/lex.c (literalchar): Use warns, not warni.
23200
232011997-06-28 Richard Stallman <rms@gnu.org>
23202
23203 * src/bison.s1: Add a Bison version comment.
23204
23205 * src/main.c (fatal, warn, berror):
23206 Use program_name.
23207
232081997-06-28 Richard Stallman <rms@gnu.org>
23209
23210 * Makefile.in (bison_version): New variable.
23211 (dist): Use that variable.
23212 (bison.s1): Substitute the Bison version into bison.simple.
23213
23214 * bison.simple: Add a Bison version comment.
23215
232161997-06-18 Richard Stallman <rms@gnu.org>
23217
23218 * src/main.c (fatal, warn, berror):
23219 Make error messages standard.
23220 (toomany): Improve error message text.
23221
23222 * 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:
23223 new.h renamed to alloc.h.
23224
232251997-06-18 Richard Stallman <rms@gnu.org>
23226
23227 * Makefile.in: new.h renamed to alloc.h.
23228
232291997-05-24 Richard Stallman <rms@gnu.org>
23230
23231 * src/lex.c (literalchar):
23232 Fix the code for escaping \, " and '.
23233
23234 (lex): Avoid trouble when there are many chars
23235 to discard in a char literal with just several chars in it.
23236
232371997-05-17 Richard Stallman <rms@gnu.org>
23238
23239 * src/bison.s1:
23240 Use malloc, if using alloca is troublesome.
23241 (YYSTACK_USE_ALLOCA): New flag macro.
23242 Define it for some systems and compilers.
23243 (YYSTACK_ALLOC): New macro.
23244 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23245 If it was malloc'd, free it.
23246
232471997-05-17 Richard Stallman <rms@gnu.org>
23248
23249 * bison.simple:
23250 Use malloc, if using alloca is troublesome.
23251 (YYSTACK_USE_ALLOCA): New flag macro.
23252 Define it for some systems and compilers.
23253 (YYSTACK_ALLOC): New macro.
23254 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23255 If it was malloc'd, free it.
23256
232571997-04-23 Richard Stallman <rms@gnu.org>
23258
23259 * src/bison.s1:
23260 (alloca) [__hpux]: Always define as __builtin_alloca.
23261
232621997-04-23 Richard Stallman <rms@gnu.org>
23263
23264 * bison.simple:
23265 (alloca) [__hpux]: Always define as __builtin_alloca.
23266
232671997-04-22 Richard Stallman <rms@gnu.org>
23268
23269 * src/bison.s1:
23270 [__hpux]: Include alloca.h (right for HPUX 10)
23271 instead of declaring alloca (right for HPUX 9).
23272
23273 * src/bison.s1 (__yy_memcpy):
23274 Declare arg `count' as unsigned int.
23275 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23276
232771997-04-22 Richard Stallman <rms@gnu.org>
23278
23279 * bison.simple:
23280 [__hpux]: Include alloca.h (right for HPUX 10)
23281 instead of declaring alloca (right for HPUX 9).
23282
23283 * bison.simple (__yy_memcpy):
23284 Declare arg `count' as unsigned int.
23285 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23286
232871997-01-03 Richard Stallman <rms@gnu.org>
23288
23289 * src/allocate.c: [__STDC__ or _MSC_VER]:
23290 Declare calloc and realloc to return void *.
23291
232921997-01-02 Richard Stallman <rms@gnu.org>
23293
23294 * src/system.h:
23295 [_MSC_VER]: Include stdlib.h and process.h.
23296 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23297
23298 * src/main.c (main): Return FAILURE as a value.
23299 (printable_version): Declare arg as int, not char.
23300
233011997-01-02 Richard Stallman <rms@gnu.org>
23302
23303 * Makefile.in (dist):
23304 Explicitly check for symlinks, and copy them.
23305
233061996-12-19 Richard Stallman <rms@gnu.org>
23307
23308 * src/files.c:
23309 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23310
233111996-12-18 Paul Eggert <eggert@gnu.org>
23312
23313 * src/bison.s1 (yyparse):
23314 If __GNUC__ and YYPARSE_PARAM are both defined,
23315 declare yyparse to have a void * argument.
23316
233171996-12-18 Paul Eggert <eggert@gnu.org>
23318
23319 * bison.simple (yyparse):
23320 If __GNUC__ and YYPARSE_PARAM are both defined,
23321 declare yyparse to have a void * argument.
23322
233231996-12-17 Richard Stallman <rms@gnu.org>
23324
23325 * src/reduce.c (nbits): Add some casts.
23326
233271996-08-12 Richard Stallman <rms@gnu.org>
23328
23329 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23330
233311996-08-12 Richard Stallman <rms@gnu.org>
23332
23333 * bison.simple: Test _MSDOS as well as _MSDOS_.
23334
233351996-07-31 Richard Stallman <rms@gnu.org>
23336
23337 * src/bison.s1:
23338 [__sun && __i386]: Include alloca.h.
23339
233401996-07-31 Richard Stallman <rms@gnu.org>
23341
23342 * bison.simple:
23343 [__sun && __i386]: Include alloca.h.
23344
233451996-07-30 Richard Stallman <rms@gnu.org>
23346
23347 * src/bison.s1: Comment change.
23348
23349 * src/bison.s1: Test _MSDOS_, not MSDOS.
23350
233511996-07-30 Richard Stallman <rms@gnu.org>
23352
23353 * bison.simple: Comment change.
23354
23355 * bison.simple: Test _MSDOS_, not MSDOS.
23356
233571996-06-01 Richard Stallman <rms@gnu.org>
23358
23359 * 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:
23360 Insert `_' macro around many string constants.
23361
23362 * src/main.c:
23363 Insert `_' macro around many string constants.
23364
23365 (main): Call setlocale, bindtextdomain and textdomain.
23366
23367 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23368 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23369 [ENABLE_NLS]: Include libintl.h.
23370 [ENABLE_NLS] (gettext): Define.
23371 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23372 (N_, PACKAGE, LOCALEDIR): New macros.
23373
233741996-06-01 Richard Stallman <rms@gnu.org>
23375
23376 * POTFILES.in: New file.
23377
23378 * Makefile.in (allocate.o):
23379 Define target explicitly.
23380
23381 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23382 (LDFLAGS): Set to @LDFLAGS@.
23383 (configure): Run autoconf only if preceding `cd' succeeds.
23384 (bison.s1): Redirect output to temporary file then move the
23385 temporary to the target, rather than redirecting directly to bison.s1.
23386 (clean): Remove config.status and config.log.
23387 (distclean): Don't remove config.status here.
23388
233891996-05-12 Richard Stallman <rms@gnu.org>
23390
23391 * src/bison.s1:
23392 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23393
233941996-05-12 Richard Stallman <rms@gnu.org>
23395
23396 * bison.simple:
23397 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23398
233991996-05-11 Richard Stallman <rms@gnu.org>
23400
23401 * src/bison.s1 (__yy_memcpy):
23402 Really reorder the args, as was supposedly done on Feb 14 1995.
23403 (yyparse): Calls changed accordingly.
23404
234051996-05-11 Richard Stallman <rms@gnu.org>
23406
23407 * Makefile.in (dist): Don't use $(srcdir).
23408
23409 * bison.simple (__yy_memcpy):
23410 Really reorder the args, as was supposedly done on Feb 14 1995.
23411 (yyparse): Calls changed accordingly.
23412
234131996-01-27 Richard Stallman <rms@gnu.org>
23414
23415 * src/output.c (output_rule_data):
23416 Test YYERROR_VERBOSE in the conditional
23417 around the definition of ttyname.
23418
234191995-12-29 Richard Stallman <rms@gnu.org>
23420
23421 * src/bison.s1:
23422 Fix line numbers in #line commands.
23423
234241995-12-29 Richard Stallman <rms@gnu.org>
23425
23426 * bison.simple:
23427 Fix line numbers in #line commands.
23428
234291995-12-27 Richard Stallman <rms@gnu.org>
23430
23431 * src/bison.s1 (YYPARSE_PARAM_DECL):
23432 In C++, make it always null.
23433 (YYPARSE_PARAM_ARG): New macro.
23434 (yyparse): Use YYPARSE_PARAM_ARG.
23435
234361995-12-27 Richard Stallman <rms@gnu.org>
23437
23438 * bison.simple (YYPARSE_PARAM_DECL):
23439 In C++, make it always null.
23440 (YYPARSE_PARAM_ARG): New macro.
23441 (yyparse): Use YYPARSE_PARAM_ARG.
23442
234431995-11-29 Richard Stallman <rms@gnu.org>
23444
23445 * doc/bison.texinfo:
23446 Describe literal string tokens, %raw, %no_lines, %token_table.
23447
234481995-11-29 Daniel Hagerty <hag@gnu.org>
23449
23450 * doc/bison.texinfo: Fixed update date
23451
234521995-10-16 Richard Stallman <rms@gnu.org>
23453
23454 * src/version.c: Version 1.25.
23455
234561995-10-16 Richard Stallman <rms@gnu.org>
23457
23458 * NEWS: *** empty log message ***
23459
234601995-10-16 Richard Stallman <rms@gnu.org>
23461
23462 * doc/bison.1, doc/bison.rnh:
23463 Add new options.
23464
234651995-10-15 Richard Stallman <rms@gnu.org>
23466
23467 * src/vmsgetargs.c, src/getargs.c:
23468 Added -n, -k, and -raw switches.
23469 (noparserflag, toknumflag, rawtoknumflag): New variables.
23470
23471 * src/symtab.h (SALIAS):
23472 New #define for adding aliases to %token.
23473 (struct bucket): Added `alias' field.
23474
23475 * src/reduce.c (reduce_grammar):
23476 Revise error message.
23477 (print_notices): Remove final `.' from error message.
23478
23479 * src/reader.c (reader_output_yylsp):
23480 New function.
23481 (readgram): Use `#if 0' around code that accepted %command
23482 inside grammar rules: The documentation doesn't allow it,
23483 and it will fail since the %command processors scan for the next %.
23484 (parse_token_decl): Extended the %token
23485 declaration to allow a multi-character symbol as an alias.
23486 (parse_thong_decl): New function.
23487 (read_declarations): Added %thong declarations.
23488 (read_declarations): Handle NOOP to deal with allowing
23489 % declarations as another means to specify the flags.
23490 (readgram): Allow %prec prior to semantics embedded in a rule.
23491 (skip_to_char, read_declarations, copy_definition)
23492 (parse_token_decl, parse_start_decl, parse_type_decl)
23493 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23494 (get_type_name, copy_guard, copy_action, readgram)
23495 (get_type, packsymbols): Revised most error messages.
23496 Changed `fatal' to `warnxxx' to avoid aborting for error.
23497 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23498 (read_declarations): Improve the error message for
23499 an invalid character. Do not abort.
23500 (read_declarations, copy_guard, copy_action): Use
23501 printable_version to avoid unprintable characters in printed output.
23502 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23503 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23504 Allow the type of a non-terminal can be given
23505 more than once, as long as all specifications give the same type.
23506
23507 * src/output.c:
23508 (output_headers, output_trailers, output, output_gram)
23509 (output_rule_data): Implement noparserflag variable.
23510 Implement toknumflag variable.
23511 (output): Call reader_output_yylsp to output LTYPESTR.
23512
23513 * src/main.c (main):
23514 If reader sees an error, don't process the grammar.
23515 (fatals): Updated to not use VARARGS1.
23516 (printable_version, int_to_string, warn, warni, warns, warnss)
23517 (warnsss): New error reporting functions. Avoid abort for error.
23518
23519 * src/lex.h:
23520 Added THONG and NOOP for alias processing.
23521 Added SETOPT for the new code that allows setting options with %flags.
23522
23523 * src/lex.c:
23524 Include getopt.h. Add some extern decls.
23525 (safegetc): New function to deal with EOF gracefully.
23526 (literalchar); new function to deal with reading \ escapes.
23527 (lex): Use literalchar.
23528 (lex): Implemented "..." tokens.
23529 (literalchar, lex, parse_percent_token): Made tokenbuffer
23530 always contain the token. This includes growing the token
23531 buffer while reading an integer.
23532 (parse_percent_token): Replaced if-else statement with percent_table.
23533 (parse_percent_token): Added % declarations as another
23534 way to specify the flags -n, -l, and -r. Also added hooks for
23535 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23536 major changes to files.c.
23537 (lex) Retain in the incoming stream a character following
23538 an incorrect '/'.
23539 (skip_white_space, lex): Revised most error messages
23540 and changed fatal to warn to avoid aborting.
23541 (percent_table): Added %thong declarations.
23542
23543 * src/gram.h: Comment changes.
23544
23545 * src/files.c (openfiles, open_extra_files, done):
23546 Add faction flag
23547 and actfile file. Handle noparserflag. Both for -n switch.
23548
23549 * src/conflicts.c (resolve_sr_conflict):
23550 Remove use of alloca.
23551
235521995-06-01 Jim Meyering <meyering@gnu.org>
23553
23554 * doc/bison.texinfo: *** empty log message ***
23555
235561995-05-06 Richard Stallman <rms@gnu.org>
23557
23558 * src/bison.s1: Comment change.
23559
235601995-05-06 Richard Stallman <rms@gnu.org>
23561
23562 * bison.simple: Comment change.
23563
235641995-05-03 Richard Stallman <rms@gnu.org>
23565
23566 * src/version.c: Version now 1.24.
23567
23568 * src/bison.s1: Change distribution terms.
23569
23570 * src/version.c: Version now 1.23.
23571
235721995-05-03 Richard Stallman <rms@gnu.org>
23573
23574 * doc/bison.texinfo:
23575 Rewrite "Conditions for Using Bison".
23576 Update version to 1.24.
23577
235781995-05-03 Richard Stallman <rms@gnu.org>
23579
23580 * bison.simple: Change distribution terms.
23581
235821995-02-23 Richard Stallman <rms@gnu.org>
23583
23584 * src/files.c: Test __VMS_POSIX as well as VMS.
23585
235861995-02-14 Jim Meyering <meyering@gnu.org>
23587
23588 * src/bison.s1 (__yy_memcpy):
23589 Renamed from __yy_bcopy to avoid
23590 confusion. Reverse FROM and TO arguments to be consistent with
23591 those of memcpy.
23592
235931995-02-14 Jim Meyering <meyering@gnu.org>
23594
23595 * bison.simple (__yy_memcpy):
23596 Renamed from __yy_bcopy to avoid
23597 confusion. Reverse FROM and TO arguments to be consistent with
23598 those of memcpy.
23599
236001994-11-10 David J. MacKenzie <djm@gnu.org>
23601
23602 * NEWS: reformat
23603
23604 * NEWS: New file.
23605
23606 * Makefile.in (DISTFILES): Include NEWS.
23607
23608 * Makefile.in (DISTFILES):
23609 Include install-sh, not install.sh.
23610
23611 * configure.in: Update to Autoconf v2 macro names.
23612
236131994-10-05 David J. MacKenzie <djm@gnu.org>
23614
23615 * Makefile.in: fix typo
23616
23617 * Makefile.in (prefix, exec_prefix):
23618 Let configure set them.
23619
236201994-09-28 David J. MacKenzie <djm@gnu.org>
23621
23622 * Makefile.in: Set datadir to $(prefix)/share.
23623
236241994-09-15 Richard Stallman <rms@gnu.org>
23625
23626 * src/bison.s1:
23627 Update copyright notice and GPL version.
23628
236291994-09-15 Richard Stallman <rms@gnu.org>
23630
23631 * bison.simple:
23632 Update copyright notice and GPL version.
23633
236341994-07-12 Richard Stallman <rms@gnu.org>
23635
23636 * src/reduce.c, src/reader.c:
23637 entered into RCS
23638
236391994-05-05 David J. MacKenzie <djm@gnu.org>
23640
23641 * Makefile.in: entered into RCS
23642
236431994-03-26 Richard Stallman <rms@gnu.org>
23644
23645 * src/bison.s1: entered into RCS
23646
236471994-03-26 Richard Stallman <rms@gnu.org>
23648
23649 * bison.simple: entered into RCS
23650
236511994-03-25 Richard Stallman <rms@gnu.org>
23652
23653 * src/main.c: entered into RCS
23654
236551994-03-24 Richard Stallman <rms@gnu.org>
23656
23657 * src/conflicts.c: entered into RCS
23658
236591994-01-02 Richard Stallman <rms@gnu.org>
23660
23661 * Makefile.in: *** empty log message ***
23662
236631993-11-21 Richard Stallman <rms@gnu.org>
23664
23665 * src/bison.s1: *** empty log message ***
23666
236671993-11-21 Richard Stallman <rms@gnu.org>
23668
23669 * doc/bison.texinfo: entered into RCS
23670
23671 * doc/bison.texinfo: *** empty log message ***
23672
236731993-11-21 Richard Stallman <rms@gnu.org>
23674
23675 * bison.simple: *** empty log message ***
23676
236771993-10-25 David J. MacKenzie <djm@gnu.org>
23678
23679 * doc/bison.texinfo: *** empty log message ***
23680
236811993-10-19 Richard Stallman <rms@gnu.org>
23682
23683 * src/bison.s1: *** empty log message ***
23684
236851993-10-19 Richard Stallman <rms@gnu.org>
23686
23687 * bison.simple: *** empty log message ***
23688
236891993-10-14 Richard Stallman <rms@gnu.org>
23690
23691 * src/bison.s1: *** empty log message ***
23692
236931993-10-14 Richard Stallman <rms@gnu.org>
23694
23695 * bison.simple: *** empty log message ***
23696
236971993-09-14 David J. MacKenzie <djm@gnu.org>
23698
23699 * doc/bison.texinfo: *** empty log message ***
23700
237011993-09-13 Noah Friedman <friedman@gnu.org>
23702
23703 * Makefile.in: *** empty log message ***
23704
237051993-09-10 Richard Stallman <rms@gnu.org>
23706
23707 * src/conflicts.c: *** empty log message ***
23708
23709 * src/system.h: entered into RCS
23710
237111993-09-10 Richard Stallman <rms@gnu.org>
23712
23713 * doc/bison.1: entered into RCS
23714
237151993-09-06 Noah Friedman <friedman@gnu.org>
23716
23717 * src/version.c: entered into RCS
23718
237191993-09-06 Noah Friedman <friedman@gnu.org>
23720
23721 * Makefile.in: *** empty log message ***
23722
237231993-07-30 David J. MacKenzie <djm@gnu.org>
23724
23725 * Makefile.in: *** empty log message ***
23726
237271993-07-24 Richard Stallman <rms@gnu.org>
23728
23729 * src/bison.s1: *** empty log message ***
23730
237311993-07-24 Richard Stallman <rms@gnu.org>
23732
23733 * bison.simple: *** empty log message ***
23734
237351993-07-08 David J. MacKenzie <djm@gnu.org>
23736
23737 * Makefile.in: *** empty log message ***
23738
237391993-07-04 Richard Stallman <rms@gnu.org>
23740
23741 * src/bison.s1: *** empty log message ***
23742
237431993-07-04 Richard Stallman <rms@gnu.org>
23744
23745 * bison.simple: *** empty log message ***
23746
237471993-06-26 David J. MacKenzie <djm@gnu.org>
23748
23749 * src/getargs.c: entered into RCS
23750
237511993-06-26 David J. MacKenzie <djm@gnu.org>
23752
23753 * doc/bison.texinfo: *** empty log message ***
23754
23755 * doc/bison.1: New file.
23756
237571993-06-25 Richard Stallman <rms@gnu.org>
23758
23759 * src/getargs.c: New file.
23760
237611993-06-16 Richard Stallman <rms@gnu.org>
23762
23763 * src/bison.s1: *** empty log message ***
23764
237651993-06-16 Richard Stallman <rms@gnu.org>
23766
23767 * bison.simple: *** empty log message ***
23768
237691993-06-03 Richard Stallman <rms@gnu.org>
23770
23771 * src/bison.s1: New file.
23772
237731993-06-03 Richard Stallman <rms@gnu.org>
23774
23775 * doc/bison.texinfo: *** empty log message ***
23776
237771993-06-03 Richard Stallman <rms@gnu.org>
23778
23779 * bison.simple: New file.
23780
237811993-05-19 Richard Stallman <rms@gnu.org>
23782
23783 * doc/bison.texinfo: New file.
23784
237851993-05-07 Noah Friedman <friedman@gnu.org>
23786
23787 * Makefile.in: *** empty log message ***
23788
237891993-04-28 Noah Friedman <friedman@gnu.org>
23790
23791 * src/reader.c: *** empty log message ***
23792
237931993-04-23 Noah Friedman <friedman@gnu.org>
23794
23795 * src/alloc.h: entered into RCS
23796
237971993-04-20 David J. MacKenzie <djm@gnu.org>
23798
23799 * src/version.c: *** empty log message ***
23800
23801 * src/files.c, src/allocate.c:
23802 entered into RCS
23803
23804 * src/reader.c: *** empty log message ***
23805
23806 * src/lex.c: entered into RCS
23807
23808 * src/conflicts.c: New file.
23809
23810 * src/symtab.c: entered into RCS
23811
23812 * src/alloc.h: New file.
23813
23814 * src/LR0.c: entered into RCS
23815
238161993-04-18 Noah Friedman <friedman@gnu.org>
23817
23818 * src/reader.c: New file.
23819
23820 * src/version.c: *** empty log message ***
23821
238221993-04-18 Noah Friedman <friedman@gnu.org>
23823
23824 * Makefile.in: *** empty log message ***
23825
238261993-04-17 Noah Friedman <friedman@gnu.org>
23827
23828 * Makefile.in: *** empty log message ***
23829
238301993-04-15 Richard Stallman <rms@gnu.org>
23831
23832 * src/main.c, src/files.c:
23833 New file.
23834
238351993-04-15 Noah Friedman <friedman@gnu.org>
23836
23837 * configure.in: entered into RCS
23838
23839 * configure.in: *** empty log message ***
23840
23841 * configure.in: New file.
23842
238431993-04-14 Richard Stallman <rms@gnu.org>
23844
23845 * Makefile.in: New file.
23846
238471993-04-13 Richard Stallman <rms@gnu.org>
23848
23849 * src/version.c: New file.
23850
238511993-03-25 Richard Stallman <rms@gnu.org>
23852
23853 * src/output.c: entered into RCS
23854
238551992-09-25 Richard Stallman <rms@gnu.org>
23856
23857 * configure.bat: entered into RCS
23858
238591992-06-22 Richard Stallman <rms@gnu.org>
23860
23861 * src/vmsgetargs.c: entered into RCS
23862
238631992-06-22 Richard Stallman <rms@gnu.org>
23864
23865 * doc/bison.rnh: entered into RCS
23866
238671992-04-20 David J. MacKenzie <djm@gnu.org>
23868
23869 * README: entered into RCS
23870
238711992-01-22 Richard Stallman <rms@gnu.org>
23872
23873 * src/machine.h: entered into RCS
23874
238751991-12-21 Richard Stallman <rms@gnu.org>
23876
23877 * src/lalr.c, src/closure.c:
23878 entered into RCS
23879
238801991-12-20 Richard Stallman <rms@gnu.org>
23881
23882 * src/state.h: entered into RCS
23883
238841991-12-18 Richard Stallman <rms@gnu.org>
23885
23886 * src/print.c, src/nullable.c, src/derives.c:
23887 entered into RCS
23888
238891991-11-03 David J. MacKenzie <djm@gnu.org>
23890
23891 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23892 entered into RCS
23893
238941988-09-09 Richard Stallman <rms@gnu.org>
23895
23896 * src/bison.hairy: entered into RCS
23897
238981987-12-16 Richard Stallman <rms@gnu.org>
23899
23900 * REFERENCES: entered into RCS
dc546b0f 23901
f294a2c2 23902
04098407 23903 -----
f294a2c2 23904
ea0a7676
JD
23905 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
23906 Inc.
f294a2c2 23907
04098407
PE
23908 Copying and distribution of this file, with or without
23909 modification, are permitted provided the copyright notice and this
23910 notice are preserved.