1 2011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
3 lr.default-reductions: rename "full" value to "most".
4 Unlike "consistent" and "accepting", "full" doesn't answer the
5 question of "which states".
6 * doc/bison.texinfo (%define Summary): Update.
7 (Default Reductions): Update.
8 * src/print.c (print_reductions): Update.
9 * src/reader.c (prepare_percent_define_front_end_variables):
11 * src/tables.c (action_row): Update.
12 * tests/input.at (%define enum variables): Update.
13 * tests/reduce.at (%define lr.default-reductions): Update.
15 2011-03-13 Joel E. Denny <joeldenny@joeldenny.org>
17 * src/parse-gram.c, src/parse-gram.h: Regenerate.
19 2011-03-09 Akim Demaille <akim@lrde.epita.fr>
21 named references: fix double free.
22 In `rhs[name]: "a" | "b"', do not free "name" twice.
23 Reported by Tys Lefering.
24 <http://lists.gnu.org/archive/html/bug-bison/2010-06/msg00002.html>
25 * src/named-ref.h, src/named-ref.c (named_ref_copy): New.
26 * src/parse-gram.y (current_lhs): Rename as...
27 (current_lhs_symbol): this.
28 (current_lhs): New function. Use it to free the current lhs
30 * src/reader.c: Bind lhs to a copy of the current named reference.
31 * src/symlist.c: Rely on free (0) being valid.
32 * tests/named-refs.at: Test this.
34 2011-03-09 Akim Demaille <akim@lrde.epita.fr>
37 * tests/named-refs.at (Redundant words in LHS brackets)
38 (Unresolved references): here.
40 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
42 java: fix parser tracing bug.
43 * NEWS (2.5): Document.
44 * data/lalr1.java (YYParser::YYStack::print): Don't skip top
47 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
49 java: finish fixing parser stack popping bug.
50 * NEWS (2.5): Document.
51 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
52 in clearing the location stack. Also fix pop function that
55 2011-03-06 Angelo Borsotti <angelo.borsotti@gmail.com> (tiny change)
57 java: fix parser stack popping bug.
59 <http://lists.gnu.org/archive/html/bug-bison/2011-02/msg00005.html>.
60 * THANKS (Angelo Borsotti): Add.
61 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
62 in clearing the value stack. Previously, the top element of the
63 stack wasn't cleared and so the value was not garbage collected.
65 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
67 doc: cite publication for LAC.
68 * doc/bison.texinfo (LAC): Here.
70 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
72 doc: clean up terminology for mysterious conflicts.
73 * doc/bison.texinfo (Mystery Conflicts): Rename node to...
74 (Mysterious Conflicts): ... this, which is already the section
75 title and the name used in the index. Update all cross-references
76 to this node. Also, don't imply that R/R conflicts are the only
77 kind of mysterious conflict.
79 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
81 lr.default-reductions: rename "all" value to "full".
82 States that shift the error token do not have default reductions,
83 and GLR disables some default reductions, so "all" was a misnomer.
84 * doc/bison.texinfo (%define Summary): Update.
85 (Default Reductions): Update.
86 * src/print.c (print_reductions): Update.
87 * src/reader.c (prepare_percent_define_front_end_variables):
89 * src/tables.c (action_row): Update.
90 * tests/input.at (%define enum variables): Update.
91 * tests/reduce.at (%define lr.default-reductions): Update.
93 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
95 doc: create a new Tuning LR section in the manual.
96 And clean up all other documentation of the features described
98 * NEWS (2.5): Tweak wording of lr.type and parse.lac entries a
99 bit, update the cross-references to the manual, and point out that
100 LAC has caveats. Don't be so adamant that IELR+LAC=canonical LR.
101 That is, as the referenced section in the manual documents, LAC
102 does not fix infinite parsing loops on syntax errors.
103 * doc/bison.texinfo: Consistently drop the "(1)" suffix from LALR,
104 IELR, and LR in @cindex.
105 (%define Summary): Condense the entries for lr.default-reductions,
106 lr.keep-unreachable-states, lr.type, and parse.lac into brief
107 summaries, and cross-reference the appropriate subsections of
108 Tuning LR. For parse.lac, mention that it's only implemented for
109 deterministic parsers in C. In parse.error entry, mention LAC,
110 and add cross-reference to the LAC section.
111 (Error Reporting): When mentioning parse.error, mention LAC, and
112 add cross-reference to the LAC section.
113 (Tuning LR): New section with an extended version of the
114 documentation removed from %define Summary. Change all
115 cross-references in the manual to point here instead of there.
116 (Calc++ Parser): When mentioning parse.error, mention LAC, and add
117 cross-reference to the LAC section.
118 (Table of Symbols): In %error-verbose entry, add cross-reference
120 (Glossary): Capitalize entry titles consistently. Add definitions
121 for "defaulted state" and "unreachable state". Expand IELR
122 acronym in IELR's entry.
124 2011-02-20 Joel E. Denny <joeldenny@joeldenny.org>
126 doc: add bibliography to manual.
127 * doc/bison.texinfo (Mystery Conflicts): Cross-reference
128 bibliography instead of citing publications directly.
129 (Generalized LR Parsing): Likewise.
130 (Bibliography): New section. Not all entries are cross-referenced
131 yet, but that will come in future patches.
133 2011-02-19 Joel E. Denny <joeldenny@joeldenny.org>
135 java: test and document previous bug fix.
136 * NEWS (2.5): Document it.
137 * tests/java.at (_AT_DATA_JAVA_CALC_Y): To one of the yyerror
138 invocations, pass a location that spans multiple tokens. Change
139 yyerror to report all of a location rather than just the begin
140 position. Extend yylex and Position to count tokens on a line.
141 Remove getHashCode as it's unused. Update all expected output.
143 2011-02-19 Bernd Kiefer <kiefer@dfki.de> (tiny change)
145 java: fix location handling bug.
147 <http://lists.gnu.org/archive/html/bison-patches/2011-02/msg00005.html>.
148 * data/lalr1.java (YYParser::yylloc): For non-empty RHS, fix
149 reversed access to location stack.
150 * THANKS (Bernd Kiefer): Add.
152 2011-02-13 Joel E. Denny <joeldenny@joeldenny.org>
154 doc: fix some minor inconsistencies.
155 * doc/bison.texinfo (%define Summary): Fix mislabeled entry for
157 (%code Summary): For consistency with the variable list in the
158 %define Summary, enclose the list of %code qualifiers in a table
159 instead of an itemize.
161 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
163 doc: clean up new subsections in manual.
164 * doc/bison.texinfo (%define Summary): Reword so it reads well as
165 a separate section. For example, add an intro, and move most of
166 the text outside of the @deffn so it is not indented so far.
167 (%code Summary): Likewise.
168 (Table of Symbols): Reword %code entry to match the %code entry in
171 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
173 doc: finish splitting apart the manual's Decl Summary section.
174 Suggested by Akim Demaille at
175 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
176 * doc/bison.texinfo (Decl Summary): Extract most of the %define
178 (%define Summary): ... this new subsection, and update all
179 cross-references. For readability of the patches, rewriting of
180 the text so it makes sense as a separate subsection will come in a
181 later patch. Moreover, the majority of the text describing the
182 various new LR features should likely move to another new section
185 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
187 doc: begin to split apart the manual's Decl Summary section.
188 Discussed in thread starting at
189 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
190 * doc/bison.texinfo (Decl Summary): Extract most of the %code
192 (%code Summary): ... this new subsection, and update all
193 cross-references. For readability of the patches, rewriting of
194 the text so it makes sense as a separate subsection will come in a
197 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
199 doc: clean up naming of various Bison files.
200 The Bison manual's names for various files associated with a Bison
201 parser has devolved into inconsistency. This patch makes the
202 naming consistent for the most important files. First, it chooses
203 "grammar file" over "input file". The former appears to be more
204 traditional in the Bison manual, and Bison has other input
205 files (skeletons). Second, it chooses "parser implementation
206 file" over names like "parser file", "parser source file", "parser
207 source code file", and "parser output file". The new name makes
208 it clearer where Bison generates the main parser implementation,
209 and it is easily distinguishable from "parser header file".
210 * doc/bison.texinfo: Implement throughout.
212 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
214 doc: give credit to more of Bison's developers.
215 * doc/bison.texinfo (Introduction): Don't imply that only Robert
216 Corbett, Richard Stallman, and Wilfred Hansen have contributed to
217 Bison. However, I don't have time to write a full history, so
218 just point readers to THANKS and ChangeLog.
220 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
222 doc: document experimental features better.
223 * doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
224 LR(1) are experimental. Mention Java. Normally experimental
225 features probably shouldn't be mentioned in the introduction.
226 However, if Bison's limitations to LALR(1), C, and C++ are so
227 important that they should be mentioned here, then it's important
228 to point out that Bison is beginning to escape those limitations.
229 Moreover, these particular experimental features have very little
230 chance of being removed.
231 * src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
234 2011-01-29 Joel E. Denny <joeldenny@joeldenny.org>
236 Do not allow identifiers that start with a dash.
237 This cleans up our previous fixes for a bug whereby Bison
238 discarded `.field' in `$-1.field'. The previous fixes were less
239 restrictive about where a dash could appear in an identifier, but
240 the restrictions were hard to explain. That bug was reported and
241 this final fix was originally suggested by Paul Hilfinger. This
242 also fixes a remaining bug reported by Paul Eggert whereby Bison
243 parses `%token ID -123' as `%token ID - 123' and handles `-' as an
244 identifier. Now, `-' cannot be an identifier. Discussed in
246 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
247 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
248 * NEWS (2.5): Update entry describing the dash extension to
249 grammar symbol names. Also, move that entry before the named
250 references entry because the latter mentions the former.
251 * doc/bison.texinfo (Symbol): Update documentation for symbol
252 names. As suggested by Paul Eggert, mention the effect of periods
253 and dashes on named references.
254 (Decl Summary): Update documentation for unquoted %define values,
255 which, as a side effect, can no longer start with dashes either.
256 * src/scan-code.l (id): Implement.
257 * src/scan-gram.l (id): Implement.
258 * tests/actions.at (Exotic Dollars): Extend test group to exercise
259 bug reported by Paul Hilfinger.
260 * tests/input.at (Symbols): Update test group, and extend to
261 exercise bug reported by Paul Eggert.
262 * tests/named-refs.at (Stray symbols in brackets): Update test
264 ($ or @ followed by . or -): Likewise.
265 * tests/regression.at (Invalid inputs): Likewise.
267 2011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
269 * data/yacc.c: Fix last apostrophe warning from xgettext.
271 2011-01-09 Paul Eggert <eggert@cs.ucla.edu>
273 Fix minor problems encountered by a fresh bootstrap.
274 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
275 as they confuse xgettext, which tries to parse them as C character
276 constants in a preprocessor directive.
277 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
278 that expression might not promote to int on some platforms.
279 * src/parse-gram.c, src/parse-gram.h: Regenerate.
281 2011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
283 Improve error messages for `$' or `@' followed by `.' or `-'.
284 Previously, for this special case of an invalid reference, the
285 usual "symbol not found in production:" was printed. However,
286 because the symbol name was parsed as the empty string, that
287 message was followed immediately by a newline instead of a symbol
288 name. In reality, this is a syntax error, so the reference is
289 invalid regardless of the symbols actually appearing in the
290 production. Discussed at
291 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
292 * src/scan-code.l (parse_ref): Report the above case as a syntax
293 error. Other than that, continue to handle this case like any
294 other invalid reference that Bison manages to parse because
295 "possibly meant" messages can still be helpful to the user.
296 * tests/named-refs.at ($ or @ followed by . or -): New test group.
298 2011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
300 doc: don't use @acronym.
301 Lately, many GNU packages are dropping it. See
302 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
303 * doc/bison.texinfo: Remove all uses.
305 2011-01-05 Alex Rozenman <rozenman@gmail.com>
307 Do not allow identifiers that start with a negative number.
308 Reported by Paul Hilfinger as a side effect of named references
310 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
311 Suggested by Paul Eggert.
312 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
313 * src/scan-gram.l ({letter}, {id}): Likewise.
315 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
317 * ChangeLog (2011-01-02): improve description.
319 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
321 maint: don't update copyright years in bootstrap.
322 * .x-update-copyright: Add entry for bootstrap.
323 * bootstrap: Remove 2011 from copyright years. The bootstrap
324 version we're currently using comes from an older version of
326 * bootstrap.conf (bootstrap_sync): Add comments explaining this
329 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
331 maint: run "make update-copyright".
333 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
335 maint: prepare to use year ranges in copyright notices.
336 * README (Copyright statements): New section explaining the range
337 notation. The GNU maintainers document requires this explanation:
338 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
339 I copied our explanation from coreutils.
340 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
341 disabled Bison's automated use of ranges.
342 * cfg.mk (update-copyright-env): Likewise.
344 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
346 Correct my email address.
347 * ChangeLog: In all recent entries.
348 * THANKS (Joel E. Denny): Here.
350 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
353 * NEWS (2.5): Try to sort entries according to how interesting
354 users might find them.
356 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
359 * NEWS (2.5): Make some minor improvements to wording, and format
360 entries more consistently.
361 * doc/bison.texinfo (Language and Grammar): Point out that IELR
362 and canonical LR are experimental features.
363 (Decl Summary): In list of %define variables, make wording more
364 consistent. Improve discussion of using LALR for GLR.
366 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
369 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
370 other corrections to verbose syntax error messages.
371 * doc/bison.texinfo (Decl Summary): Rewrite entries for
372 lr.default-reductions and lr.type to be clearer, to mention
373 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
375 (Glossary): Add entry for LAC.
377 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
379 parse.lac: implement exploratory stack reallocations.
380 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
381 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
382 with values of "failures" (default) or "full".
383 (b4_declare_parser_state_variables): Add yyesa, yyes, and
384 yyes_capacity variables.
385 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
386 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
388 (YYCOPY_NEEDED): New cpp macro.
389 (YYCOPY): Define if LAC requested.
390 (yy_lac_stack_realloc): New function implementing stack
391 reallocations. Use YYMAXDEPTH for maximum stack size given that
392 the stack should never need to grow larger than the main state
393 stack needs to grow without LAC.
394 (YY_LAC_ESTABLISH): Update yy_lac invocation.
395 (yy_lac): Add arguments for exploratory stack memory data
396 recorded in the main parser. Invoke yy_lac_stack_realloc when
397 reallocation is necessary.
398 (yysyntax_error): Add the same new arguments and pass them to
400 (yypstate_delete): Free yyes if necessary.
401 (yyesa, yyes, yyes_capacity): #define these to yypstate members
402 in the case of push parsing.
403 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
404 Update yysyntax_error invocations. At yyreturn, free yyes if
406 * src/parse-gram.y: %define parse.lac full.
407 * tests/input.at (LAC: errors for %define): Extend for
408 parse.lac-memory-trace.
409 * tests/regression.at (LAC: Exploratory stack): Extend to check
410 that stack reallocs happen when expected.
411 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
412 parse.lac.es-capacity-initial.
414 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
416 parse.lac: implement as %define variable.
417 LAC = lookahead correction. See discussion at
418 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
419 However, one point there must be corrected: because of %nonassoc,
420 LAC is *not* always redundant for lr.type=canonical-lr.
421 * data/yacc.c: Accept values of "none" (default) or "full" for
422 parse.lac. Accept %define parse.lac.es-capacity to specify
423 capacity of LAC's temporary exploratory stack. It defaults to 20
424 and, for now, will not grow dynamically.
425 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
427 (YYBACKUP): Invoke YY_LAC_DISCARD.
428 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
429 yy_lac and track when it needs to be invoked
430 (yy_lac): New function that, given the current stack, determines
431 whether a token can eventually be shifted. Return status mimics
432 yyparse return status.
433 (yysyntax_error): Change yystate argument to yyssp so stack top
434 can be passed to yy_lac. If LAC is requested, build expected
435 token list by invoking yy_lac for every token instead of just
436 checking the current state for lookaheads. Return 2 if yy_lac
438 (yyparse, yypush_parse): Use local variable yy_lac_established and
439 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
440 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
442 * tests/conflicts.at (%nonassoc and eof): Extend to check the
443 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
444 (parse.error=verbose and consistent errors): Likewise.
445 (LAC: %nonassoc requires splitting canonical LR states): New test
446 group demonstrating how LAC can fix canonical LR.
447 * tests/input.at (LAC: Errors for %define): New test group.
448 * tests/regression.at (LAC: Exploratory stack): New test group.
449 (LAC: Memory exhaustion): New test group.
451 2010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
453 build: use gnulib's new bootstrap_sync option.
454 Now, whenever we update bison's copy of gnulib, bootstrap will
455 update itself the next time it's run.
456 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
457 * bootstrap.conf (bootstrap_sync): Set to true.
458 * gnulib: Update to latest so bootstrap is in sync now.
460 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
462 yysyntax_error: fix for consistent error with lookahead.
463 * NEWS (2.5): Document.
464 * data/yacc.c (yysyntax_error): In a verbose syntax error
465 message while in a consistent state with a default action (which
466 must be an error action given that yysyntax_error is being
467 invoked), continue to drop the expected token list, but don't
468 drop the unexpected token unless there actually is no lookahead.
469 Moreover, handle that internally instead of returning 1 to tell
470 the caller to do it. With that meaning of 1 gone, renumber
471 return codes more usefully.
472 (yyparse, yypush_parse): Update yysyntax_error usage. Most
473 importantly, set yytoken to YYEMPTY when there's no lookahead.
474 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
475 unexpected token unless there actually is no lookahead.
476 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
477 pass yyempty_ not yyla.type to yysyntax_error_.
478 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
479 token unless there actually is no lookahead.
480 * data/lalr1.java (YYParser::parse): If there's no lookahead,
481 set yytoken to yyempty_ before invoking yysyntax_error.
482 (YYParser::yysyntax_error): Again, don't drop the unexpected
483 token unless there actually is no lookahead.
484 * tests/conflicts.at (parse.error=verbose and consistent
485 errors): Extend test group to further reveal how the previous
486 use of the simple "syntax error" message was too general. Test
487 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
489 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
491 * tests/local.at: ... here.
492 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
493 (AT_BISON_OPTION_POPDEFS): Pop it.
494 (AT_FULL_COMPILE): Extend to handle Java.
496 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
498 yysyntax_error: more preparation for readability of next patch.
499 There are no behavioral changes here.
500 * data/glr.c (yyreportSyntaxError): Reorganize.
501 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
502 * tests/conflicts.at (parse.error=verbose and consistent errors):
505 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
507 yysyntax_error: prepare for readability of next patches.
508 These are purely whitespace changes that result in ugly code
509 but that make the next couple of patches much easier to read.
510 * data/glr.c (yyreportSyntaxError): Reindent.
511 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
512 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
513 * data/yacc.c (yysyntax_error): Reindent.
515 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
518 * src/output.c (prepare_rules): Free temporary array.
520 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
522 yysyntax_error: improve invocation readability.
523 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
524 invocation, get rid of the while loop, which is misleading
525 because there are really at most two iterations.
527 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
529 * ChangeLog: Correct some errors in previous entries.
531 2010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
533 maint: re-anchor all .gitignore entries.
534 * bootstrap: Copy from gnulib's latest for the fix to
535 automatically anchor entries it constructs.
536 * gnulib: Update to latest just so it has the same bootstrap.
537 * .gitignore, build-aux/.gitignore, doc/.gitignore:
538 * lib/.gitignore, m4/.gitignore, po/.gitignore:
539 * runtime-po/.gitignore: Re-anchor all entries.
541 2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
543 Fix portability problem on OpenBSD 4.7.
545 Jim Meyering reported this in
546 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
547 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
548 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
550 * src/parse-gram.c, src/parse-gram.h: Regenerate.
551 * tests/regression.at: Tamper with the renamed witness.
553 Adjust to recent changes to gnulib bootstrap.
555 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
556 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
557 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
558 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
559 anymore and don't know of anybody else who does. If someone needs
560 these files, they can resurrect them.
561 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
562 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
563 Omit leading '/', since bootstrap omits it.
564 Adjust file names to match current contents better.
565 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
566 installed just for us.
567 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
568 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
569 needed somehow. Don't have time to look into why.
570 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
571 the GNU malloc behavior, where malloc (0) != NULL unless we're
572 out of storage? If not, we can omit malloc-gnu; but for now I left
575 (gnulib_mk_hook): New function.
576 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
577 uses that convention.
579 2010-09-09 Paul Hilfinger <hilfinger@cs.berkeley.edu>
581 * data/glr.c (yySymbol): Define as int to avoid compiler warnings about
582 possible change of value.
584 2010-09-08 Paul Hilfinger <hilfinger@cs.berkeley.edu>
586 * data/glr.c (yy_reduce_print): Change yyrhsVals to yyvsp to remove
587 compiler errors when using %debug.
588 Add declaration of yylow when locations in use to avoid compilation
590 (yyglrReduce): Conditionalize message "Parse ... rejected by rule..."
591 on whether we are in split mode, for consistency with behavior of
594 2010-09-01 Akim Demaille <demaille@gostai.com>
596 Address GCC warnings about shadowed local variables (yyflag).
597 * data/glr.c (YYCHK): Rename yyflag as yychk_flag.
598 (yyprocessOneStack): Reduce the scope of yyaction, yyconflicts,
601 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
604 * NEWS (2.4.3): Set date.
606 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
608 maint: add gettext version to release announcements.
609 Suggested by Paul Hilfinger at
610 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
611 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
612 * cfg.mk (bootstrap-tools): Add gettext.
614 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
616 doc: fix -W and %expect documentation some.
617 * NEWS (2.4.3): Mention that there are documentation fixes.
618 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
619 turns conflicts into errors not warnings.
620 (Shift/Reduce): Likewise.
621 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
623 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
625 -Werror: fix for rules useless in parser after conflicts.
626 * NEWS (2.4.3): Document fix.
627 * src/complain.c (error_message): Extend to handle incomplete
628 error messages so warn and warn_at can be used in more cases.
629 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
630 -Werror is always obeyed.
631 * src/reduce.c (reduce_print): Use warn so that the "warnings
632 being treated as errors" message is printed consistently before
633 the first warning message. This makes testing easier.
634 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
635 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
636 --warnings=error when warnings appear in bison's stderr.
638 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
640 maint: enable gnits only at stable releases.
641 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
642 version string should disable gnits. Explain in comments.
644 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
647 * po/POTFILES.in: Add src/graphviz.c.
649 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
651 i18n: fix for gnulib.
652 * po/POTFILES.in: Add remaining gnulib files that have
653 translatable strings.
655 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
657 build: fix our adjustments for gnulib files in lib.
658 * configure.ac: For prepending lib/ to the values of config
659 variables, fix detection of empty values. Also, due to recent
660 gnulib changes, add LIBUNISTRING_UNITYPES_H and
661 LIBUNISTRING_UNIWIDTH_H to the list of those variables.
663 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
665 maint: use announce-gen's new --mail-headers.
666 * HACKING (Announce): Update instructions.
667 * cfg.mk (announcement_Cc_): Define.
668 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
669 required by latest gnulib.
670 * gnulib: Update to latest.
672 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
674 tests: handle Valgrind that complains about >&-.
675 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
676 (Output files: -dv >&-): Skip test group if running
677 maintainer-check-valgrind.
679 2010-07-23 Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
681 * NEWS: Describe new semantic-predicate feature.
682 * data/c.m4 (b4_predicate_case): New definition.
683 * data/java.m4 (b4_predicate_case): New definition.
684 * data/glr.c (yyimmediate): Add definition.
685 (yydoAction): Remove comment, now obsolete.
686 Do YY_REDUCE_PRINT here.
687 (yyglrReduce): Alter comment to indicate that semantic values
688 need not be deferred.
689 Remove YY_REDUCE_PRINT from here; done in yydoAction.
690 (yyprocessOneStack): Pass immediate flag.
691 Delete stacks rejected by predicates in newly split-off parsers.
692 Change handling of yyerr so that only current stack gets deleted
693 when semantic predicate fails.
694 (yyfillin): Don't crash if a semantic value is unresolved (as may
695 happen in predicate rules).
696 Copy lr state as well in debugging mode.
697 Update comment on setting of yysval to include yyloc as well.
698 (yy_reduce_print): Add yynormal argument. Perform fillin properly.
699 Report unresolved RHS values.
700 (yyimmediate): New table.
701 * src/gram.h (struct rule): Add is_predicate field.
702 * src/output.c (user_actions_output): Use b4_predicate_case for
704 (prepare_symbols): Output yyimmediate.
705 * src/scan-gram.l: Add %? token, SC_PREDICATE state.
706 * src/scan-code.l (code_props_rule_action_init): Add is_predicate
708 * src/scan-code.h (struct code_props): Add is_predicate field.
709 (code_props_rule_action_init): New interface.
710 * src/parse-gram.y (%?{...}): New token.
711 (rhs): Add %?{...} rule.
712 * src/parse-gram.c: Regenerate.
713 * src/parse-gram.h: Regenerate.
714 * src/reader.c (grammar_current_rule_action_append): Add
716 (grammar_midrule_action): Use new interface for
717 code_props_rule_action_init.
718 (grammar_current_rule_action_append): Ditto.
719 (packgram): Transfer is_predicate value.
720 * src/reader.h (grammar_current_rule_action_append): New interface.
721 * doc/bison.texinfo: Document semantic predicates (%?).
723 * data/glr.c (yylhsNonterm, yyisDefaultedState,yyDefaultAction)
724 (yygetLRActions,yynewGLRStackItem,yyaddDeferredAction,yyinitStateSet)
725 (yyinitGLRStack,yyexpandGLRStack,yyupdateSplit,yymarkStackDeleted)
726 (yyundeleteLastStack,yyglrShift,yyglrShiftDefer,yydoAction,yyglrReduce)
727 (yyidenticalOptions,yymergeOptionSets,yyresolveStates,yyresolveAction)
728 (yyresolveLocations,yyresolveValue,yyreducePrint): Update parameter
729 names in comments and mention all parameters.
730 (struct yyGLRState): Fix description of yyposn field.
731 (yyresolveLocations): Correct comment so as not to imply action when
734 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
736 Update from GFDL GFDL 1.2 to 1.3.
737 * doc/bison.texinfo: Update GFDL version number.
738 * doc/fdl.texi: Update to version 1.3, taken from:
739 http://www.gnu.org/licenses/fdl.texi
741 Do not use date ranges in copyright notices.
742 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
744 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
745 * TODO, bootstrap, bootstrap.conf:
746 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
747 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
748 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
749 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
750 * data/lalr1.java, data/local.mk, data/location.cc:
751 * data/stack.hh, data/variant.hh, data/xslt/bison.xsl:
752 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
753 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
754 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
755 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
756 * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h:
757 * djgpp/testsuite.sed, doc/bison.texinfo, doc/local.mk:
758 * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk:
759 * examples/calc++/Makefile.am, examples/extexi:
760 * examples/local.mk, lib/abitset.c, lib/abitset.h:
761 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
762 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
763 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
764 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
765 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
766 * lib/libiberty.h, lib/local.mk, lib/main.c, lib/timevar.c:
767 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
768 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
769 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
770 * src/AnnotationList.c, src/AnnotationList.h:
771 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
772 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
773 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
774 * src/complain.h, src/conflicts.c, src/conflicts.h:
775 * src/derives.c, src/derives.h, src/files.c, src/files.h:
776 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
777 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
778 * src/ielr.h, src/lalr.c, src/lalr.h, src/local.mk:
779 * src/location.c, src/location.h, src/main.c:
780 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
781 * src/named-ref.h, src/nullable.c, src/nullable.h:
782 * src/output.c, src/output.h, src/parse-gram.y:
783 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
784 * src/print_graph.c, src/print_graph.h, src/reader.c:
785 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
786 * src/relation.h, src/scan-code.h, src/scan-code.l:
787 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
788 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
789 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
790 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
791 * tests/actions.at, tests/atlocal.in, tests/c++.at:
792 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
793 * tests/existing.at, tests/glr-regression.at:
794 * tests/headers.at, tests/input.at, tests/java.at:
795 * tests/local.at, tests/local.mk, tests/named-refs.at:
796 * tests/output.at, tests/push.at, tests/reduce.at:
797 * tests/regression.at, tests/sets.at, tests/skeletons.at:
798 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
799 Don't use date ranges in copyright notices.
801 2010-05-11 Akim Demaille <demaille@gostai.com>
803 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
804 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
805 header file to the implementation file, after the user %code
807 * NEWS (2.5): Document this.
809 2010-05-11 Akim Demaille <demaille@gostai.com>
812 * doc/bison.texinfo (Local Variables): Move this after the
813 LocalWords, since the latter are looked for in the whole document,
814 while the former are looked for only at its end.
815 Require american spell checking.
817 2010-05-10 Akim Demaille <demaille@gostai.com>
819 doc: fix lalr1.cc documentation.
820 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
821 (C++ Bison Interface): Fix lalr1.cc skeleton name.
822 (C++ Parser Interface): Fix semantic_type and location_type names.
823 Document yy::parser::token.
824 Reported by Jerry Quinn.
826 2010-05-10 Akim Demaille <demaille@gostai.com>
829 * data/lalr1.cc (YYRHSLOC): New.
830 (YYLLOC_DEFAULT): Use it.
831 * data/glr.cc: If location_type was user defined, do not include
832 location.hh, and do not produce location.hh and position.hh.
833 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
834 Check that glr.cc supports user defined location_type.
835 * NEWS: Document this.
837 2010-05-07 Akim Demaille <demaille@gostai.com>
840 * tests/synclines.at: here.
842 2010-05-04 Akim Demaille <demaille@gostai.com>
844 tests: enhance AT_SYNCLINES_COMPILE.
845 * tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
846 (AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
847 taken care of in AT_SYNCLINES_COMPILE.
849 2010-05-04 Akim Demaille <demaille@gostai.com>
851 lalr1.cc: don't generate location.hh when location_type is defined
852 * data/bison.m4 (b4_percent_define_get): Accept a default value.
853 * data/c++.m4: Do not provide a default value for the %define
854 variable location_type, rather, use b4_percent_define_get with a
855 default argument where its value is needed.
856 * data/lalr1.cc: Do not load location.cc (which outputs both
857 location.hh and position.hh) if the user defined location_type.
858 Do not include location.hh either.
860 2010-05-04 Akim Demaille <demaille@gostai.com>
862 lalr1.cc: minor refactoring.
863 * data/lalr1.cc: Don't issue empty namespaces.
865 2010-05-04 Akim Demaille <demaille@gostai.com>
868 Currently, there is no check that %printer ... <foo> (nor
869 %destructor) is about an existing <foo> type. This C++ test had
870 it wrong (<::std::string> vs. <std::string>).
872 * tests/c++.at (AT_CHECK_VARIANTS): In list.yy, redefine the
873 pretty-printing of lists into something better for parser traces.
874 Update the expected output.
875 Fix correspondance between %type/%token and %printer.
877 2010-05-04 Akim Demaille <demaille@gostai.com>
879 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
880 * tests/calc.at (Span): Instead of begin/end, as in the built-in
881 location class, use first and last.
882 Define YYLLOC_DEFAULT to adjust to these changes.
883 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
884 location_type changes.
886 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
888 tests: fix maintainer-xml-check.
889 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
890 Update output to include comments now produced by --graph.
891 (xsl:template match="automaton"): As for --graph, name the
892 digraph after the grammar file.
893 * src/print-xml.c (escape_bufs): Enlarge array.
894 (print_xml): Add bug-report and url attributes to
895 bison-xml-report element.
897 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
899 In DOT output, convert from "/*" comments to "//" comments.
900 This handles the possibility that a "*/" might appear in
901 variable portions of those comments at some point in the future.
902 * src/graphviz.c (start_graph): Implement.
904 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
906 Document that undefined %prec identifier warnings will remain.
907 * NEWS (2.4.3): Here.
910 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
912 Revert 2009-12-30 change for undefined %prec token complaints.
913 That is, keep them as warnings because that should be sufficient
914 to satisfy POSIX without creating backward compatibility issues.
915 Suggested by Richard Stallman at
916 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
917 * NEWS (2.5): Remove mention of complaint.
918 * src/reader.c (grammar_rule_check): Convert complaint back to
920 * tests/input.at (%prec's token must be defined): Update.
922 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
924 build: don't require src/bison during bootstrap.
925 Suggested by Eric Blake at
926 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
927 * bootstrap.conf (bootstrap_epilogue): New function to make sure
928 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
930 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
932 i18n: fix untranslatable string.
933 Reported by Goran Uddeborg at
934 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
935 * src/muscle-tab.c (muscle_percent_define_insert): Here.
937 2010-04-13 Akim Demaille <demaille@gostai.com>
939 tests: calc: minor refactoring.
940 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
942 2010-04-13 Akim Demaille <demaille@gostai.com>
944 tests: calc: simplify location management.
945 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
946 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
947 define the appropriate AT_LOC accessors.
948 * tests/calc.at: Use AT_LOC accessors.
950 2010-04-13 Akim Demaille <demaille@gostai.com>
953 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
954 Define AT_LOCATION_TYPE_IF.
955 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
956 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
957 used, provide a user location type and use it.
958 (Simple LALR1 C++ Calculator): Add a test case for location_type.
960 2010-04-13 Akim Demaille <demaille@gostai.com>
962 tests: check fclose's return value.
963 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
965 2010-04-13 Akim Demaille <demaille@gostai.com>
967 tests: don't depend on the actual location type.
968 * tests/calc.at: Use yy::parser::location_type rather than
969 yy::location, since the former is always right, and might point to
970 another type than the latter.
972 2010-04-13 Akim Demaille <demaille@gostai.com>
975 * tests/calc.at: Formatting changes.
977 2010-04-13 Akim Demaille <demaille@gostai.com>
979 lalr1.cc: remove useless forward declaration.
980 * data/lalr1.cc: Include location.hh before stack.hh.
981 Remove the useless forward declarations of position and location.
982 Reported by Chris Morley.
983 * data/glr.cc: Likewise.
985 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
987 * NEWS (2.4.3): Mention fix for Sun Studio C++.
989 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
991 tests: fix for newer Sun Studio C++.
992 Reported by Dagobert Michelsen at
993 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
994 * THANKS (Dagobert Michelsen): Add.
995 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
996 Autoconf macro for handling the restrict keyword.
997 * gnulib: Update to latest, which no longer overrides that macro
1000 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1002 portability: fix pointer arithmetic to conform to C standard.
1003 Reported by Tys Lefering at
1004 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
1005 This fix is already implemented in glr.c and does not apply to
1007 * data/lalr1.cc (yy::parser::parse): Increase size of
1008 yyerror_range and adjust subscripting so you don't have to
1009 subtract one from the beginning of the array.
1010 * data/yacc.c (b4_declare_parser_state_variables,
1011 yyparse, yypush_parse): Likewise.
1013 2010-04-05 Akim Demaille <demaille@gostai.com>
1015 remove useless include.
1016 * src/graphviz.h: Don't include stdbool.h.
1018 2010-04-05 Akim Demaille <demaille@gostai.com>
1020 graph: sign the output file.
1021 * src/graphviz.c (start_graph): Issue comments about Bison.
1022 Suggested by Tys Lefering.
1024 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
1026 portability: fix test suite for GCC 4.5's new #error message.
1027 Reported by Tys Lefering at
1028 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
1029 * NEWS (2.4.3): Mention.
1030 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
1032 2010-03-30 Akim Demaille <demaille@gostai.com>
1035 * src/graphviz.h: Add missing license notice.
1038 2010-03-25 Akim Demaille <demaille@gostai.com>
1040 tests: fix 250: parse.error=verbose overflow.
1041 * tests/regression.at (parse.error=verbose overflow): Avoid the
1042 double inclusion of stdlib.h as it triggers hard errors.
1044 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1046 portability: fix for BSD make.
1047 Reported by Johan van Selst at
1048 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
1049 * tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
1050 this dependency list as in package.m4's target rule.
1052 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1054 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
1055 Reported by Johan van Selst at
1056 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
1057 * NEWS (2.4.3): New.
1058 * THANKS (Johan van Selst): Add.
1059 * etc/prefix-gnulib-mk (prefix): Adjust regex for makefile
1060 targets so that gnulib's new c++defs.h is matched.
1061 * gnulib: Update to latest.
1063 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1065 maint: update for changes to gnulib's announce-gen.
1066 * HACKING (Announce): RELEASE_TYPE=major must now be written
1067 RELEASE_TYPE=stable.
1069 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1072 * NEWS (2.4.2): Set version and date. For the recent test suite
1073 portability fixes, don't be so optimistic about their success
1074 given the lack of feedback on the affected platforms.
1076 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1078 tests: fix maintainer-xml-check for recent changes.
1079 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
1080 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
1081 output file whose name conflicts with a previous output file
1082 is now never generated.
1084 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1086 portability: fix several issues with M4 subprocess.
1088 M4's output pipe was not being drained upon fatal errors during
1089 scan_skel. As a result, broken-pipe messages from M4 were seen
1090 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
1091 failure in the test suite. The problem was that, on platforms
1092 where the default disposition for SIGPIPE is ignore instead of
1093 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
1094 then reported it. However, there's some sort of race condition,
1095 because the new test group occasionally succeeded.
1096 Reported by Albert Chin at
1097 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
1099 There were also problems with the test suite livelocking on
1100 Tru64 5.1b. Reported by Didier Godefroy at
1101 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
1102 Switching to create_pipe_bidi suggested by Akim Demaille.
1104 To attempt to solve both of these problems, switch to gnulib's
1105 create_pipe_bidi and register M4 process as a slave. Along the
1106 way, clean up file name conflict handling, which was affected by
1107 the broken-pipe problem before the switch.
1108 * NEWS (2.4.2): Document.
1109 * THANKS (Didier Godefroy): Add.
1110 * bootstrap.conf (gnulib_modules): Add pipe.
1111 * gnulib: Update to latest to make sure we have all the latest
1113 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
1115 * po/POTFILES.in (lib/subpipe.c): Remove.
1116 * src/files.c (compute_output_file_names): Update invocations
1117 of output_file_name_check.
1118 (output_file_name_check): In the case that the grammar file
1119 would be overwritten, use complain instead of fatal, but replace
1120 the output file name with /dev/null. Use the /dev/null solution
1121 for the case of two conflicting output files as well because it
1122 seems safer in case Bison one day tries to open both files at
1124 * src/files.h (output_file_name_check): Update prototype.
1125 * src/output.c (output_skeleton): Use create_pipe_bidi and
1126 wait_subprocess. Assert that scan_skel completely drains the
1128 * src/scan-skel.l (at_directive_perform): Update
1129 output_file_name_check invocation.
1130 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
1131 grammar file actually isn't overwritten.
1132 (Conflicting output files: -o foo.y): Update expected output.
1133 * tests/skeletons.at (Fatal errors but M4 continues producing
1134 output): New test group.
1136 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
1139 * HACKING (Release Procedure): Add reminder about keeping
1140 POTFILES files up-to-date.
1141 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
1143 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
1146 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
1147 which is already defined in atconfig.
1149 2010-01-22 Joel E. Denny <jdenny@clemson.edu>
1151 tests: fix missing include caught by g++ 4.4.1.
1152 Reported by Tys Lefering.
1153 * HACKING (Release checks): Add note about trying a recent GCC.
1154 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
1156 (_AT_DATA_EXPECT2_Y): Likewise.
1158 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
1160 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
1162 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
1164 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
1165 * HACKING (Release Procedure): Update notes on copyright years.
1166 * Makefile.am (update-package-copyright-year): New target rule.
1167 * build-aux/update-package-copyright-year: New file.
1168 * cfg.mk (update-copyright): Add update-package-copyright-year
1171 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1173 * bootstrap: Import improvements from latest gnulib.
1175 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1177 build: require Automake 1.11.1 to avoid a security flaw.
1178 * HACKING (Release Procedure): Don't document Automake security
1180 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
1183 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1185 gnulib: update to latest.
1187 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1189 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
1191 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
1193 Thank the developer of the initial push parser implementation.
1194 This unfortunate oversight is several years old.
1195 * THANKS (Odd Arild Olsen): Add.
1197 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
1199 Fix some comments concerning LR(0) versus LALR(1).
1201 Stop equating LR(0) with nondeterminism and LALR(1) with
1202 determinism. That is, if all states are consistent, then LR(0)
1203 tables are deterministic. On the other hand, LALR(1) tables
1204 might be nondeterministic before conflict resolution, and GLR
1205 permits LALR(1) tables to remain nondeterministic.
1206 * src/LR0.c, src/LR0.h: Here.
1207 * src/lalr.c, src/lalr.h: Here.
1208 * src/main.c (main): Here.
1209 * src/state.c, src/state.h: Here.
1211 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
1214 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
1216 maint: run "make update-copyright"
1218 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
1220 POSIX: complain if %prec's token was not defined.
1221 * NEWS (2.5): Document.
1222 * src/reader.c (grammar_rule_check): Convert warning to
1224 * tests/input.at (%prec's token must be defined): Update.
1226 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
1228 POSIX: warn if %prec's token was not defined.
1229 Reported by Florian Krohm at
1230 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
1231 * NEWS (2.4.2): Document.
1232 * src/reader.c (grammar_rule_check): Implement.
1233 (grammar_current_rule_prec_set): Add comments explaining that we
1234 here assume a %prec identifier is a token, but we still manage
1236 * tests/input.at (%prec's token must be defined): New test
1239 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
1241 * HACKING (Release Procedure): Recommend a secure automake.
1243 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
1245 portability: `<' and `>' are not always defined on addresses.
1246 Specifically, don't sort objects by their memory addresses when
1247 they're not allocated in the same array or other object. Though
1248 I haven't found a test case where that fails on my platform, C
1249 says the behavior is undefined.
1250 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1251 FIXME. Use new id field of InadequacyList nodes rather than
1252 their memory addresses when sorting.
1253 (AnnotationList__compute_from_inadequacies): Add
1254 inadequacy_list_node_count argument to pass to
1255 InadequacyList__new_conflict.
1256 * src/AnnotationList.h
1257 (AnnotationList__compute_from_inadequacies): Update prototype
1258 and documentation for new argument.
1259 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1260 node_count argument and use it to assign a unique ID.
1261 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1262 (InadequacyList): Add id field.
1263 (InadequacyList__new_conflict): Update prototype and
1264 documentation for new argument.
1265 * src/ielr.c (ielr_compute_annotation_lists): Update
1266 AnnotationList__compute_from_inadequacies invocation.
1268 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
1270 Fix handling of yychar manipulation in user semantic actions.
1271 The problem was that yacc.c didn't always update the yychar
1272 translation afterwards. However, other skeletons appear to be
1273 fine. glr.c appears to already translate yychar before every
1274 use. lalr1.cc does not define yychar and does not document its
1275 replacement, yyla, for users. It does provide yyclearin, but
1276 that does not manipulate yyla and thus requires no translation
1277 update. In lalr1.java, yychar is out of scope during semantic
1279 * NEWS (2.5): Document.
1280 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1282 (yyparse, yypush_parse): Instead, translate before every use of
1283 yytoken, and add comments explaining this approach.
1284 * tests/actions.at (Destroying lookahead assigned by semantic
1285 action): New test group checking that translation happens before
1286 lookahead destructor calls at parser return. Previously,
1287 incorrect destructors were called.
1288 * tests/conflicts.at (parse.error=verbose and consistent
1289 errors): New test group checking that translation happens at
1290 syntax error detection before the associated verbose error
1291 message and the associated lookahead destructor calls. While
1292 the destructor call is fixed by this patch, the verbose error
1293 message is currently incorrect due to another bug (see
1294 comments in test group), so this is an expected failure for now.
1296 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1298 YYFAIL: warn about uses and remove from lalr1.java.
1299 * NEWS (2.5): Document.
1300 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
1301 and make it private. Update all uses.
1302 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1304 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1307 * NEWS (2.4.2): Document deprecation and the phase-out plan.
1308 * data/lalr1.java (YYParser::YYFAIL): Add comment about
1310 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1311 YYFAIL from GCC cpp's -Wunused-macros.
1312 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1314 (LocalWords): Remove YYFAIL.
1316 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
1319 * tests/c++.at (Syntax error discarding no lookahead): Don't
1320 ignore stderr. Instead, eliminate remaining warnings.
1322 2009-12-18 Joel E. Denny <jdenny@clemson.edu>
1324 lalr1.cc: don't discard non-existent lookahead on syntax error.
1325 * data/lalr1.cc (yy::parser::parse): Check yyempty first.
1326 * tests/c++.at (Syntax error discarding no lookahead): New test
1329 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
1332 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1333 function, which is no longer used.
1335 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1337 Add gcc's -Wundef to test suite and fix another warning from it.
1338 * NEWS (2.4.2): Update description of -Wundef fix.
1339 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1340 (WARN_CFLAGS_TEST): New substitution.
1341 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1342 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1344 (NO_WERROR_CFLAGS): Likewise.
1345 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1347 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1349 * data/yacc.c: Reformat m4 a little.
1351 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1353 Document gcc -Wundef fix.
1354 * NEWS (2.4.2): Here.
1355 * THANKS (Jonathan Nieder): Add.
1357 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1359 Simplify y.tab.c when location tracking is disabled.
1360 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1361 tracking is not enabled. Instead, unconditionally define
1362 YY_LOCATION_PRINT as a no-op for backward compatibility.
1364 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1366 Avoid warnings from gcc -Wundef y.tab.c.
1367 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1368 defined before using them.
1369 * data/lalr1.cc: Likewise.
1370 * data/yacc.c: Likewise.
1372 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1374 autoconf: update to latest for fix of M4 detection.
1375 Reported by Eric Blake.
1376 * submodules/autoconf: Update.
1378 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1380 portability: use -DGNULIB_POSIXCHECK.
1381 Reported by Eric Blake. See discussions at
1382 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1384 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1385 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1386 * bootstrap.conf (gnulib_modules): Add all the printf modules
1387 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1388 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1389 (excluded_files): Remove m4/printf-posix.m4.
1390 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1391 lib/libbison.a so gnulib libraries can be linked.
1393 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1395 gnulib: update for fix of fprintf-posix, which we'll use soon.
1396 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
1397 targets so that gnulib's new arg-nonnull.h and link-warning.h
1401 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1403 Enable assertion output and --disable-assert for configure.
1404 * bootstrap.conf (gnulib_modules): Add assert module.
1405 * src/system.h (aver): Define as assert, and summarize the
1406 discussion on this issue.
1408 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1410 Expand GLR acronym in summary of Bison.
1411 Based on discussion with Akim Demaille starting at
1412 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1413 * doc/bison.texinfo (Introduction): Here.
1414 * src/getargs.c (usage): Here.
1416 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1418 Document named references.
1419 * doc/bison.texinfo (Actions): Add new example and xref to
1420 Using Named References node.
1421 (Using Named References): New node.
1423 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1426 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1428 (Sbitset__isEmpty): Use Sbitset instead of char*.
1429 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1430 instead of char. This helps to avoid casting errors.
1431 (Sbitset__or): Use Sbitset instead of char*.
1433 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1435 portability: don't assume 8-bit bytes.
1436 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1437 * src/Sbitset.h (Sbitset__nbytes): Here.
1438 (Sbitset__byteAddress): Here.
1439 (Sbitset__bit_mask): Here.
1440 (Sbitset__last_byte_mask): Here.
1441 (Sbitset__ones): Here.
1442 (SBITSET__FOR_EACH): Here.
1444 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
1446 portability: use va_start and va_end in the same function.
1447 * src/complain.c (error_message): Move va_end from here...
1448 (ERROR_MESSAGE): ... to here.
1450 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1452 * data/bison.m4: Update comments for rename to muscle-tab.h.
1454 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
1457 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1458 replace all uses with UNIQSTR_CONCAT.
1459 * src/uniqstr.c (uniqstr_vsprintf): New function.
1460 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1461 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1464 2009-10-06 Joel E. Denny <jdenny@clemson.edu>
1466 * TODO (Complaint submessage indentation): New.
1468 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1471 * src/parse-gram.y: Clean up sorting of declarations.
1472 Use types to simplify %printer declarations where possible.
1473 Provide %printer for BRACKETED_ID and symbol.prec.
1474 * src/symtab.c: Whitespace change.
1476 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1478 tests: skip tests of file names that platform does not support.
1479 Reported by Michael Raskin at
1480 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1481 * THANKS (Michael Raskin): Add.
1482 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1483 to fail at least for file names containing ":" or "\".
1485 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1487 yysyntax_error: avoid duplicate lookahead collection.
1488 Except when memory reallocation is required, this change
1489 eliminates the need to invoke yysyntax_error twice and thus to
1490 repeat the collection of lookaheads. It also prepares for
1491 future extensions that will make those repetitions more
1492 expensive and that will require additional memory management in
1493 yysyntax_error. Finally, it fixes an obscure bug already
1494 exercised in the test suite.
1495 * data/yacc.c (yysyntax_error): Add arguments for message
1496 buffer variables stored in the parser. Instead of size, return
1497 status similar to yyparse status but indicating success of
1498 message creation. Other than the actual reallocation of the
1499 message buffer, import and clean up memory management code
1501 (yyparse, yypush_parse): ... here.
1502 * tests/regression.at (parse.error=verbose overflow): No longer
1503 an expected failure.
1505 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1507 yysyntax_error: test memory management more.
1508 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1509 * tests/regression.at (parse.error=verbose and
1510 YYSTACK_USE_ALLOCA): New test group.
1511 (parse.error=verbose overflow): New test group that reveals an
1512 obscure bug. Expected fail for now.
1514 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1516 benchmarks: use %debug consistently among grammars.
1517 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
1518 %debug by default. It can affect the timings even if yydebug=0.
1519 (generate_grammar_calc): For consistency with other grammars,
1520 use YYDEBUG environment variable to set yydebug.
1522 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
1525 * src/symtab.c (symbol_pack): Here because every symbol's number
1526 is always defined by this time.
1528 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1530 Add additional space after periods in NEWS.
1533 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
1535 Use the correct conversion specifier for size_t.
1536 Reported by Jim Meyering.
1537 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1538 because Sbitset__Index is size_t.
1539 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1541 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
1543 tests: don't abuse AT_BISON_CHECK.
1544 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1545 additional shell commands outside of AT_BISON_CHECK.
1547 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
1549 tests: check that parse-gram.y's IELR and LALR are identical.
1550 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1551 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1554 2009-09-19 Alex Rozenman <rozenman@gmail.com>
1556 Keep sub-messages aligned. Fix strings for translation.
1557 * src/location.h (location_print): Add return value.
1558 * src/location.c (location_print): Return number of printed
1560 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1562 * src/complain.cpp (indent_ptr): New static variable.
1563 (error_message, complain_at_indent, warn_at_indent): Implement
1564 the alignment mechanism.
1565 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1566 for translations. Use new alignment mechanism.
1567 * tests/named-ref.at: Adjust test-cases.
1568 * NEWS (2.5): Add an announcement about named references.
1570 2009-09-17 Akim Demaille <demaille@gostai.com>
1573 * doc/bison.texinfo: here.
1574 Reported by Alex Rozenman.
1576 2009-09-16 Akim Demaille <demaille@gostai.com>
1578 doc: lalr1.cc and variants.
1579 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
1580 "variant" %define variables.
1581 (C++ Semantic Values): Split into...
1582 (C++ Unions, C++ Variants): these.
1584 (C++ Parser Interface): Fix type names.
1585 Document parser::syntax_error.
1586 Document the fact that locations are not mandatory.
1587 (C++ Scanner Interface): Split into...
1588 (Split Symbols, Complete Symbols): these.
1590 (Calc++ Parsing Driver): Use variants.
1593 (Calc++ Parser): Declare all the tokens, no
1594 longer accept raw characters.
1596 Adjust types and printers.
1598 (Calc++ Scanner): Use make_<SYMBOL> functions.
1599 Use strerror in error message.
1601 2009-09-16 Akim Demaille <demaille@gostai.com>
1603 doc: spell checking.
1604 * doc/bison.texinfo: here.
1606 2009-09-16 Akim Demaille <demaille@gostai.com>
1608 doc: comment changes.
1609 * doc/bison.texinfo: Comment changes.
1611 2009-09-16 Akim Demaille <demaille@gostai.com>
1613 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
1614 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
1615 constructor to take a token_type instead of the (internal) symbol
1618 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
1619 don't call yytranslate_ here.
1621 2009-09-16 Akim Demaille <demaille@gostai.com>
1624 * TODO (Figures): New.
1626 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
1628 tests: clean up push.at test group titles.
1629 * tests/push.at: Remove "Push Parsing: " from test group titles
1630 because these are already under the banner "Push Parsing Tests".
1632 2009-09-12 Alex Rozenman <rozenman@gmail.com>
1634 Provide an additional sub-message for clarity.
1635 Add "symbol not found in production" error message when
1636 an "invalid reference" is detected in named references
1638 * src/scan-code.l: Update "invalid reference" case.
1639 * tests/named-ref.at: Adjust test-cases.
1641 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1643 Clean up yacc.c a little.
1644 * data/yacc.c: Clean up M4 for readability, and make output
1645 whitespace more consistent. For the main parse function
1646 comment, instead of saying "yyparse or yypush_parse", say either
1647 "yyparse" or "yypush_parse" depending on which it actually is.
1649 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1651 Fix --enable-gcc-warnings.
1652 * src/parse-gram.y (%printer <param>): Handle param_none.
1654 2009-09-09 Akim Demaille <demaille@gostai.com>
1656 lalr1.cc: syntax_error as exceptions.
1657 It is common to use sort of factories in the user actions. These
1658 factories may check some "syntactic" constraints that are not
1659 enforced by the grammar itself. This is possible using YYERROR
1660 within the action itself. Provide the user with a means to throw
1661 a syntax_error exception.
1663 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
1664 Declare and define yy::parser::syntax_error.
1665 * data/lalr1.cc: Include stdexcept.
1666 (yy::parser::parse): Wrap the user action within a try/catch.
1667 * data/glr.cc: Include stdexcept.
1669 2009-09-09 Akim Demaille <demaille@gostai.com>
1671 lalr1.cc: add missing "inline".
1672 * data/c++.m4 (b4_public_types_define): Add missing inline to
1673 implementations provided in headers.
1675 2009-09-09 Akim Demaille <demaille@gostai.com>
1677 %param: documentation.
1678 * NEWS (2.6): Document %param, %lex-param, and %parse-param
1680 * doc/bison.texinfo: Document that %lex-param and %parse-param
1682 Changes some examples to demonstrate it.
1683 (Calc++ Parser): Use %param.
1685 2009-09-09 Akim Demaille <demaille@gostai.com>
1689 2009-09-09 Akim Demaille <demaille@gostai.com>
1692 * src/parse-gram.y (add_param): Scope changes.
1694 2009-09-09 Akim Demaille <demaille@gostai.com>
1696 %parse: support several arguments.
1697 * src/parse-gram.y (current_param): New.
1698 (param_type): Add param_none.
1699 (params): New nonterminal.
1702 2009-09-09 Akim Demaille <demaille@gostai.com>
1706 2009-09-09 Akim Demaille <demaille@gostai.com>
1709 Provide a means to factor lex-param and parse-param common
1712 * src/parse-gram.y (param_type): New.
1713 Define a %printer for it.
1714 (add_param): Use it.
1715 (%parse-param, %lex-param): Merge into...
1716 (%parse): this new token.
1717 Adjust the grammar to use it.
1718 * src/scan-gram.l (RETURN_VALUE): New.
1719 (RETURN_PERCENT_FLAG): Use it.
1720 (RETURN_PERCENT_PARAM): New.
1721 Use it to support %parse-param, %lex-param and %param.
1723 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1725 Use aver not assert.
1726 * src/output.c: Don't include assert.h.
1727 (output_skeleton): Use aver not assert.
1728 * src/system.h (aver): In documentation of why, add links to
1729 Paul Eggert's explanations in the mailing lists.
1731 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1733 Use "Unresolved reference" error message when no symbols were found
1734 in a symbolic reference resolution. Remove .expr and -expr from
1735 the shown reference when the reference is unresolved.
1736 * src/scan-code.l: Change the error message, adjust location columns,
1737 rename variable "exact_mode" to "explicit_bracketing".
1738 * tests/named-ref.at: Adjust existing tests and add a new one.
1740 2009-09-04 Akim Demaille <demaille@gostai.com>
1742 Adjust synclines in src/parse-gram.[ch].
1743 * tests/bison.in: Do some magic (including working around issues
1744 with ylwrap) when this wrapper is used to compile
1747 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1749 Complain about unused %define variables and %code qualifiers.
1750 * NEWS (2.5): Document.
1751 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1752 * doc/bison.texinfo (Decl Summary): Document complaint, and
1753 improve %define documentation a little otherwise.
1754 * tests/input.at (Reject unused %code qualifiers): Update.
1755 (%define errors): Update.
1756 (%define, --define, --force-define): Update.
1757 (%define backward compatibility): Update.
1758 (Unused %define api.pure): Update.
1759 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1761 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1763 Don't suppress warnings about unused parse.error.
1764 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
1765 %define variable parse.error unless b4_error_verbose_flag is
1766 actually expanded in a skeleton.
1768 2009-09-03 Akim Demaille <demaille@gostai.com>
1770 * NEWS (2.4.2): Add "Internationalization" item.
1772 2009-09-03 Akim Demaille <demaille@gostai.com>
1774 bootstrap: fix/improve find_tool.
1775 * bootstrap (find_tool): Improve error messages.
1776 Fix typo about find_tool_names.
1778 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1780 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1782 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1783 * src/scan-code.h (code_props_rule_action_init): Rename
1784 named_ref arg to name so it doesn't shadow named_ref type. This
1785 makes it consistent with the function definition in scan-code.l
1788 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1790 %define: accept unquoted values.
1791 * NEWS (2.5): Group all %define changes together, and document
1792 this one. Remove quotes in IELR and canonical LR entry.
1793 * doc/bison.texinfo: Remove quotes in most examples throughout.
1794 (Decl Summary): Update %define documentation.
1795 (Table of Symbols): Likewise.
1796 * src/ielr.c (LrType): Update documentation.
1797 * src/parse-gram.y (content.opt): Add production for ID.
1798 * tests/actions.at: Remove quotes in most tests.
1799 * tests/calc.at: Likewise.
1800 * tests/existing.at: Likewise.
1801 * tests/input.at: Likewise.
1802 * tests/local.at: Likewise.
1803 * tests/push.at: Likewise.
1804 * tests/reduce.at: Likewise.
1805 * tests/torture.at: Likewise.
1807 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1809 %define lr.type: make values lowercase IDs.
1810 That is, "LALR" => "lalr", "IELR" => "ielr", and
1811 "canonical LR" => "canonical-lr".
1812 * NEWS (2.5): Update documentation.
1813 * doc/bison.texinfo (Decl Summary): Likewise.
1814 * src/ielr.c (ielr): Use new values.
1815 * src/ielr.h (ielr): Update documentation.
1816 * src/reader.c (prepare_percent_define_front_end_variables): Use
1817 and validate new values.
1818 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1820 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1822 2009-08-27 Eric Blake <ebb9@byu.net>
1824 scan-gram: avoid portability trap with ctype usage.
1825 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1826 Avoid compiler warning.
1828 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1830 tests: use perl for printing special sequences to files.
1831 And skip tests if perl is not available. This is better than
1832 playing tricks with shell portability. Suggested by Akim
1834 * tests/input.at (Bad character literals): Use it here for
1835 omitting final newlines.
1836 (Bad escapes in literals): Use it here for special characters.
1838 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1840 tests: show a use of %define lr.default-reductions "consistent"
1841 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1842 prevents the omission of expected tokens for %error-verbose.
1844 2009-08-26 Akim Demaille <demaille@gostai.com>
1846 tests: portability fix.
1847 * tests/input.at (Bad escapes in literals): Don't expect "echo
1848 '\0'" to output \ then 0.
1850 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1852 Actually handle the yytable zero value correctly this time.
1853 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
1854 zero values in the YYTABLE comments.
1855 * data/glr.c (yytable_value_is_error): Don't check for zero
1857 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1858 * data/yacc.c (yytable_value_is_error): Likewise.
1859 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1860 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1861 * src/tables.h: In header comments, explain why it's useless to
1862 check for a zero value in yytable.
1864 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1866 More fixes related to last two patches.
1867 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
1868 comments: zero indicates syntax error not default action.
1869 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1871 * data/glr.c (yyis_pact_ninf): Rename to...
1872 (yypact_value_is_default): ... this.
1873 (yyisDefaultedState): Update for rename.
1874 (yyis_table_ninf): Rename to...
1875 (yytable_value_is_error): ... this, and check for value zero
1876 besides just YYTABLE_NINF.
1877 (yygetLRActions): Check for default value from yypact. It
1878 appears that this check is always performed before this function
1879 is invoked, and so adding the check here is probably redundant.
1880 However, the code may evolve after this subtlety is forgotten.
1881 Also, update for rename to yytable_value_is_error. Because that
1882 macro now checks for zero, a different but equivalent branch of
1883 the if-then-else here is evaluated.
1884 (yyreportSyntaxError): Update for rename to
1885 yytable_value_is_error. The zero condition was mishandled
1887 (yyrecoverSyntaxError): Update for renames. No behavioral
1889 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1891 (yy_table_value_is_error_): New function.
1892 (parse): Use new functions where possible. No behavioral
1894 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1895 The zero condition was mishandled before.
1896 * data/yacc.c (yyis_pact_ninf): Rename to...
1897 (yypact_value_is_default): ... this.
1898 (yyis_table_ninf): Rename to...
1899 (yytable_value_is_error): ... this, and check for value zero
1900 besides just YYTABLE_NINF.
1901 (yysyntax_error): Update for rename to yytable_value_is_error.
1902 The zero condition was mishandled before.
1903 (yyparse): Update for renames. No behavioral changes.
1904 * src/tables.h: Improve comments about yypact, yytable, etc.
1905 more. Most importantly, say yytable value of zero means syntax
1906 error not default action.
1908 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1910 Fix %error-verbose for conflicts resolved by %nonassoc.
1911 * NEWS (2.5): Document.
1912 * data/glr.c (yyreportSyntaxError): Fix this by checking
1914 * data/yacc.c (yysyntax_error): Likewise.
1915 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1917 * data/lalr1.java (yysyntax_error): Likewise.
1918 * tests/conflicts.at (%nonassoc and eof): Update expected output
1921 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1923 Some code and documentation improvements.
1924 * data/c.m4 (b4_table_value_equals): New macro to capture
1926 * data/glr.c (yyis_pact_ninf): Use it here.
1927 (yyis_table_ninf): Likewise.
1928 (yyreportSyntaxError): Improve internal comments.
1929 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1930 Use it everywhere possible.
1931 (yyis_table_ninf): Likewise.
1932 (yysyntax_error): Improve internal comments.
1933 * data/lalr1.cc (yysyntax_error_): Likewise.
1934 * data/lalr1.java (yysyntax_error): Likewise.
1935 * src/tables.h: Improve comments about yypact, yytable, etc.
1937 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
1939 Use locale when quoting.
1940 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1941 quote rather than implementing quoting here.
1943 2009-08-20 Eric Blake <ebb9@byu.net>
1945 Make previous patch more robust.
1946 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1948 (output_skeleton): Use it.
1949 Suggested by Akim Demaille.
1951 Import latest m4/m4.m4.
1952 * submodules/autoconf: Update to autoconf 2.64.
1953 * configure.ac (M4_GNU_OPTION): New define.
1954 * src/output.c (output_skeleton): Use it to resolve FIXME.
1955 * NEWS: Mention this.
1957 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
1959 Fix complaints about escape sequences.
1960 Discussed starting at
1961 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1962 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1963 For a \0 and similar escape sequences meaning the null
1964 character, report an invalid escape sequence instead of an
1965 invalid null character because the latter does not actually
1966 appear in the user's input.
1967 In all escape sequence complaints, don't escape the initial
1968 backslash, and don't quote when the sequence appears at the end
1969 of the complaint line unless there's whitespace that quotearg
1971 Consistently say "invalid" not "unrecognized".
1972 Consistently prefer "empty character literal" over "extra
1973 characters in character literal" warning for invalid escape
1974 sequences; that is, consistently discard those sequences.
1975 * tests/input.at (Bad escapes in literals): New.
1977 2009-08-19 Akim Demaille <demaille@gostai.com>
1980 * doc/bison.texinfo: Fix minor Texinfo errors.
1982 2009-08-19 Akim Demaille <demaille@gostai.com>
1984 tests: distcc compliance.
1985 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
1986 error messages from the output.
1988 2009-08-19 Akim Demaille <demaille@gostai.com>
1990 variables: simplify the upgrade of namespace into api.namespace.
1992 This patch simplifies "variables: rename namespace as
1993 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
1994 Suggested by Joel E. Denny in
1995 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
1997 * src/muscle-tab.c (muscle_percent_variable_update): New.
1998 (muscle_percent_define_insert): Use it in replacement of the
1999 previous tr invocation.
2000 Remove variable_tr, no longer needed.
2001 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
2003 * data/c++.m4: No longer handle namespace -> api.namespace.
2004 * tests/input.at (%define backward compatibility): Check that
2005 namespace is treated as api.namespace.
2007 2009-08-19 Akim Demaille <demaille@gostai.com>
2009 doc: %initial-action to initialize yylloc.
2010 Reported by Bill Allombert.
2011 * doc/bison.texinfo: Set fill-column to 76.
2012 (Location Type): Document the use of %initial-action to initialize
2015 2009-08-19 Akim Demaille <demaille@gostai.com>
2017 lalr1.cc: use state_type.
2018 * data/lalr1.cc (yysyntax_error_): Use state_type.
2019 Move argument names into yy*.
2021 2009-08-19 Akim Demaille <demaille@gostai.com>
2023 lalr1.cc: get rid of yyparse's yystate.
2024 yystate and yystack_[0].state are equal, keep only the latter.
2025 The former was also used as a temporary variable to compute the
2026 post-reduction state. Move this computation into an auxiliary
2029 * data/glr.c (yyLRgotoState): Fuse variable definition and first
2031 * data/lalr1.cc (yy_lr_goto_state_): New.
2033 Replace remaining uses of yystate by yystate_[0].state.
2036 2009-08-19 Akim Demaille <demaille@gostai.com>
2038 lalr1.cc: destroy $$ when YYERROR is called.
2039 * data/lalr1.cc (yyreduce): Compute the resulting state before
2040 running the user action so that yylhs is a valid symbol.
2041 (yyerrorlab): Since yylhs is complete (it knows its type), we can
2042 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
2043 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
2045 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
2047 maint: update for gnulib's recent update-copyright changes
2049 * .x-update-copyright (COPYING): Add as it's no longer implied
2050 when .x-update-copyright is present.
2051 * cfg.mk (update-copyright-local): Remove, now ignored.
2052 (update-copyright): Declare update-b4-copyright as a dependency.
2054 2009-08-17 Akim Demaille <demaille@gostai.com>
2056 build: require gettext 0.17.
2058 Suggested by Bruno Haible.
2059 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
2060 * configure.ac: require gettext 0.17 to ensure compatibility with
2063 2009-08-17 Akim Demaille <demaille@gostai.com>
2065 build: lower gettext requirements.
2067 Bison was uselessly requiring the formatstring macros from
2068 gettext, which resulted in mo files not being installed on systems
2069 that perfectly supported Bison mo files. Lower the requirement.
2070 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
2072 * configure.ac: Require need-ngettext instead of
2073 need-formatstring-macros.
2074 Reported by Martin Jabocs.
2075 Suggested by Bruno Haible.
2076 * INSTALL: Restructure.
2077 (Internationalization): New.
2079 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
2081 maint: fix use of copyright year intervals.
2083 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
2084 as now recommended in gnulib/NEWS.
2085 * build-aux/update-b4-copyright: Fix.
2086 * cfg.mk (update-copyright-env): Configure update-copyright.
2088 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
2090 Make it easier to write deterministic tests.
2091 Continues Akim's work from his 2009-06-10 commits.
2092 * src/reader.c (check_and_convert_grammar): Don't add any
2093 symbols after the first symbols_do invocation.
2094 * src/symtab.c (symbols_sorted): New static global.
2095 (user_token_number_redeclaration): Update comments.
2096 (symbol_from_uniqstr): If a new symbol is being created, assert
2097 that symbols_sorted hasn't been allocated yet.
2098 (symbols_free): Free symbols_sorted.
2099 (symbols_cmp, symbols_cmp_qsort): New functions.
2100 (symbols_do): Sort symbol_table into symbols_sorted on first
2102 * tests/input.at (Numbered tokens): Recombine tests now that the
2103 output should be deterministic across multiple numbers.
2105 2009-08-12 Akim Demaille <demaille@gostai.com>
2107 tests: GCC 4.5 compliance.
2108 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
2109 messages about #error.
2111 2009-08-12 Akim Demaille <demaille@gostai.com>
2113 build: fix the generation of the documentation.
2114 Some of our targets use "bison --help", but they can't depend on
2115 "bison" itself (to avoid additional requirements on the user), so
2116 they used to call "make src/bison" in the commands. Then
2117 concurrent builds may fail: one make might be aiming one of its
2118 jobs at compiling src/bison, and another job at generating the man
2119 page. If the latter is faster than the former, then we have two
2120 makes that concurrently try to compile src/bison.
2122 This might also be a more convincing explanation for the failure
2123 described in the patch "build: fix paths".
2125 * Makefile.am (SUFFIXES): Initialize.
2126 * build-aux/move-if-change: New, symlink to gnulib's.
2127 * build-aux/local.mk: Ship it.
2128 * doc/common.x: Remove, merged into...
2129 * doc/bison.x: here.
2130 * doc/local.mk (doc/bison.help): New.
2131 ($(CROSS_OPTIONS_TEXI)): Depend on it.
2133 (.x.1): Replace with...
2134 (doc/bison.1): this explicit, simpler, target.
2135 (common_dep): Remove, inlined where appropriate.
2136 (SUFFIXES, PREPATH): Remove, unused.
2138 2009-08-12 Akim Demaille <demaille@gostai.com>
2140 gnulib: improve prefixing.
2141 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
2142 change the value of...
2144 Adjust more variables.
2145 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
2147 (prefix): Also transform rules whose targets have slashes.
2148 Use $prefix liberally.
2149 Map @MKDIR_P@ to $(MKDIR_P).
2150 Prefix directories that are mkdir'd.
2152 2009-08-12 Akim Demaille <demaille@gostai.com>
2155 When using $(top_builddir) inconsistently, Make (including GNU
2156 Make) is sometimes confused. As a result it may want to build
2157 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
2158 file, different names) concurrently, which, amusingly enough,
2161 ranlib lib/libbison.a
2162 ranlib lib/libbison.a
2163 make[2]: *** [lib/libbison.a] Segmentation fault
2167 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
2170 2009-08-12 Akim Demaille <demaille@gostai.com>
2174 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
2176 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
2178 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
2180 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
2182 Miscellaneous code readability improvements.
2184 * src/reader.c (reader): Move %define front-end variable
2185 defaults and checking into...
2186 (prepare_percent_define_front_end_variables): ... this new
2189 * src/scan-gram.l (INITIAL): For consistency with string
2190 literals, don't store open quote on character literal. It's
2191 discarded before returning anyway.
2192 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
2193 Make length test more readable, and make the character stored
2194 for an empty literal more obvious while consistent with the
2197 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
2198 USER_NUMBER_HAS_STRING_ALIAS throughout.
2199 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
2200 that is repeated in symtab.h. Improve argument names to make it
2201 clear which side of the symbol-string alias pair is which.
2202 (symbol_check_alias_consistency): Improve local variable names
2203 for the same purpose.
2204 * src/symtab.h (struct symbol): Make comments about aliases
2206 (symbol_make_alias): Improve comments and argument name.
2207 * src/output.c (token_definitions_output): Update for rename to
2208 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
2210 2009-08-08 Alex Rozenman <rozenman@gmail.com>
2212 Convert "misleading reference" messages to warnings.
2213 * src/scan-code.l: New function 'show_sub_messages', more
2215 * tests/named-ref.at: Adjust tests.
2217 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
2219 maint: run "make update-copyright"
2221 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
2223 maint: make update-b4-copyright easier to use
2224 * build-aux/update-b4-copyright: In warnings, report line
2225 numbers rather than character positions.
2226 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
2227 that update-copyright runs it.
2230 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
2232 maint: clean up update-b4-copyright code
2233 * build-aux/update-b4-copyright: Do not accept 2-digit
2234 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
2235 Don't accept a `[' in a b4_copyright argument.
2236 Format code more consistently.
2237 Don't assume b4*copyright never occurs.
2239 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2241 maint: automate b4_copyright updates.
2242 * Makefile.am (update-b4-copyright): New target rule.
2243 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
2244 * build-aux/update-b4-copyright: New.
2245 * data/yacc.c: Remove stray characters around b4_copyright
2248 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2250 maint: automate annual package-wide copyright-year update.
2251 * .x-update-copyright: New.
2252 * Makefile.am (EXTRA_DIST): Remove maint.mk.
2253 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
2254 update-copyright. Remove gnumakefile, which is implied by
2255 maintainer-makefile.
2256 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
2258 * maint.mk: Remove, now copied from gnulib.
2259 * examples/extexi: Add missing "(C)" in copyright statement so
2260 update-copyright can recognize it.
2261 * src/LR0.h: Likewise.
2262 * src/print.h: Likewise.
2263 * src/print_graph.h: Likewise.
2264 * src/gram.c: Add missing comma in copyright statement.
2265 * src/gram.h: Likewise.
2267 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2269 Fix "make distcheck".
2270 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
2273 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
2275 Pacify "gcc -Wunused" for the input function from Flex.
2276 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
2278 * src/scan-code.l: Add "%option noinput", which I cannot find in
2279 the Flex manual, but which Flex has supported since at least as
2280 far back as 2.5.4. However, if any of our developers still use
2281 Flex 2.5.4, they'll need to stop configuring with
2282 --enable-gcc-warnings because "%option noinput" didn't work
2283 correctly until Flex 2.5.6.
2284 * src/scan-gram.l: Likewise.
2285 * src/scan-skel.l: Likewise.
2287 2009-07-31 Alex Rozenman <rozenman@gmail.com>
2289 Fix --enable-gcc-warnings problems.
2290 * src/reader.c: Adjust variable names.
2291 * src/scan-code.l: Fix prototypes and adjust names.
2292 * src/named-ref.c: Remove redundant "if".
2294 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2296 Fix a --enable-gcc-warnings problem.
2297 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
2300 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2302 Warn about character literals not of length one.
2303 * NEWS (2.5): Document.
2304 * src/scan-gram.l (INITIAL): Remove comment that we don't check
2306 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
2307 * tests/input.at (Bad character literals): New test group.
2309 2009-07-24 Alex Rozenman <rozenman@gmail.com>
2311 Fix some memory leaks.
2312 * src/named-ref.c: Add a pointer check (named_ref_free).
2313 * src/scan-code.l: New function (variant_table_free). Called in
2315 * src/symlist.c: Call to named_ref_free (symbol_list_free).
2317 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2319 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
2321 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
2323 Some M4 cleanup in the testsuite.
2324 Suggested by Eric Blake at
2325 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
2326 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
2327 complicate the code by distinguishing between a missing value
2328 and an empty string value for an optional argument. This fix is
2329 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
2330 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
2331 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
2332 arguments are not needed because of the following changes.
2334 Bison developers should use GNU M4 and should not use
2335 POSIXLY_CORRECT when building the test suite, so do not
2336 complicate the code by avoiding $10 and above.
2337 Do not quote an empty string value for an optional argument, and
2338 do not distinguish between a missing value and an empty string
2341 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2343 Revert unnecessary column realignment in --help output.
2344 Reported by Akim Demaille at
2345 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
2346 * src/getargs.c (usage): Here.
2348 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2350 Alphabetical order in src/local.mk.
2351 * src/local.mk: Adjust.
2353 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2355 Style changes and factoring.
2356 * src/named-ref.h: Add comments.
2357 * src/parse-gram.y: Readability and style changes.
2358 * src/reader.c: Factoring: assign_named_ref function.
2359 * src/scan-code.l: Factoring and style changes. Rename
2360 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2361 Use "unsigned" type for variant index. Improve readablity.
2362 * src/scan-gram.l: Change error messages and add comments.
2363 * src/symlist.h: symbol_list_null: New function decl.
2364 * src/symlist.c: symbol_list_null: Implement here.
2365 * tests/named-refs.at: Adjust for new error messages.
2367 2009-06-29 Eric Blake <ebb9@byu.net>
2369 scan-code: avoid compiler warnings
2370 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2372 2009-06-29 Akim Demaille <demaille@gostai.com>
2374 build: avoid concurrent extraction of calc++.
2375 * examples/calc++/Makefile.am (calc.stamp): New.
2376 Depend on it to create the sources of calc++ so that concurrent
2377 builds don't launch several "extexi" in parallel.
2378 Not only this is inefficient, this also builds incorrect sources
2379 with several extractions mixed together.
2381 2009-06-29 Akim Demaille <demaille@gostai.com>
2384 * data/bison.m4: Move code related to specific variables after the
2385 definition of the variable-maintaining macros so that we don't
2386 "invoke" b4_percent_define_check_values before it is defined.
2388 2009-06-29 Akim Demaille <demaille@gostai.com>
2390 variables: parse.error
2392 Implement, document, and test the replacement of %error-verbose
2393 by %define parse.error "verbose".
2394 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
2395 values of the parse.error variable.
2396 Make "simple" its default value.
2397 Check the valid values.
2398 * src/parse-gram.y: Use %define parse.error.
2399 (PERCENT_ERROR_VERBOSE): New token.
2401 * src/scan-gram.l: Support %error-verbose.
2403 * doc/bison.texinfo (Decl Summary): Replace the documentation of
2404 %define error-verbose by that of %define parse.error.
2405 * NEWS: Document it.
2407 * tests/actions.at, tests/calc.at: Use parse.error instead of
2410 2009-06-27 Alex Rozenman <rozenman@gmail.com>
2412 Implement support for named symbol references.
2413 * src/parse-gram.y: Add new syntax (named_ref.opt).
2414 * src/reader.c: Store named refs in symbol lists.
2415 * src/reader.h: New argument for symbol_append and
2416 action_append functions.
2417 * src/scan-code.h: Add new field (named_ref) into
2418 code_props data structure. Keeps named ref of midrule
2420 * src/scan-code.l: Support for named refs in semantic
2421 action code. New function 'parse_named_ref'.
2422 * src/scan-gram.l: Support bracketed id.
2423 * src/symlist.c: Store named refs in symbol lists.
2424 * src/symlist.h: New field in symbol list: named_ref.
2425 * src/named-ref.h: New file, a struct for named_ref.
2426 * src/named-ref.cp: New file, named_ref_new function.
2427 * src/local.mk: Add two new files.
2428 * tests/testsuite.at: Include new test group:
2429 * tests/named-refs.at: this new file.
2431 2009-06-25 Akim Demaille <demaille@gostai.com>
2433 hash: check insertion for memory exhaustion.
2434 * src/uniqstr.c (uniqstr_new): New.
2436 2009-06-24 Akim Demaille <demaille@gostai.com>
2438 variables: rename namespace as api.namespace.
2440 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
2442 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
2444 (b4_percent_define_use): New.
2445 Use it where applicable.
2446 * data/c++.m4: Replace uses of the variable "namespace" by
2448 Default the latter to the former.
2449 * doc/bison.texinfo (Decl Summary): Document "namespace" as
2451 Document api.namespace.
2452 Use @samp to document %define uses, keep @code for identifiers.
2454 * tests/c++.at, tests/input.at: Test api.namespace instead of
2455 namespace. (The tests passed with namespace.)
2457 2009-06-11 Akim Demaille <demaille@gostai.com>
2460 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2461 * src/print-xml.c: Style changes.
2462 * tests/conflicts.at: Comment changes.
2464 2009-06-11 Akim Demaille <demaille@gostai.com>
2466 xml: beware of user strings used to give a %prec to rules.
2467 * tests/conflicts.at (%prec with user strings): New.
2468 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2471 2009-06-11 Akim Demaille <demaille@gostai.com>
2473 hash: check insertion for memory exhaustion.
2474 * src/muscle-tab.c (muscle_insert, muscle_grow)
2475 * src/state.c (state_hash_insert): Check the return value of
2478 2009-06-11 Akim Demaille <demaille@gostai.com>
2480 tests: honor TESTSUITEFLAGS in every check target.
2481 * tests/local.mk (RUN_TESTSUITE): New.
2482 (check-local, installcheck-local, maintainer-check-g++)
2483 (maintainer-check-posix, maintainer-check-valgrind): Use it.
2485 2009-06-10 Akim Demaille <demaille@gostai.com>
2487 deterministic test suite.
2488 Some consistency checks on symbols are performed after all the
2489 symbols were read, by an iteration over the symbol table. This
2490 traversal is nondeterministic, which can be a problem for test
2493 Addresses another form of nondeterminism reported by Joel E. Denny.
2494 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2496 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2498 Use different file names for the three tests to make the
2501 2009-06-10 Akim Demaille <demaille@gostai.com>
2504 * gnulib: Update to latest.
2505 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2506 * m4/.gitignore: Regen.
2507 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2508 Call xalloc_die on hash_insert failures.
2509 Requested by the new __warn_unused_result__ attribute of
2512 2009-06-10 Akim Demaille <demaille@gostai.com>
2514 deterministic user-token-number redeclaration errors.
2515 Address nondeterminism reported by Joel E. Denny.
2516 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2518 * src/uniqstr.h: Comment changes.
2519 * src/location.h (boundary_cmp, location_cmp): New.
2520 * src/symtab.c (user_token_number_redeclaration): New.
2521 (symbol_translation): Use it.
2522 * tests/input.at (Numbered tokens): Adjust the expected output.
2524 2009-05-25 Akim Demaille <demaille@gostai.com>
2526 build: avoid ignored errors.
2527 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
2528 errors, they pollute the output.
2530 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2532 Convert multiple variable definition warnings to complaints.
2533 * NEWS (2.5): Add a new entry for that change.
2534 * doc/bison.texinfo (Decl Summary): Update %define entry.
2535 (Bison Options): Update -D/--define/-F/--force-define entry.
2536 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
2537 * src/muscle-tab.h (muscle_percent_define_insert): Update
2539 * tests/input.at (`%define errors'): Update.
2540 (`%define, --define, --force-define'): Update.
2542 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2544 -F/--force-define and relative %define/-D/--define priorities.
2545 * NEWS (2.5): Add documentation to -D/--define entry.
2546 * build-aux/cross-options.pl: Hard-code association of
2547 --force-define with %define.
2548 * doc/bison.texinfo (Decl Summary): In %define entry,
2549 cross-reference command-line options.
2550 (Bison Options): Add documentation to -D/--define entry.
2551 (Option Cross Key): Widen column for --force-define row.
2552 * src/getargs.c (usage): Document -F/--force-define. Realign
2554 (short_options, long_options, getargs): Parse -F/--force-define,
2555 and update muscle_percent_define_insert invocations.
2556 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
2557 (muscle_percent_define_insert): Add argument with that type.
2558 * src/muscle-tab.c (muscle_percent_define_insert): Implement
2559 -F/--force-define behavior and priorities.
2560 (muscle_percent_define_ensure): Update
2561 muscle_percent_define_insert invocation.
2562 * src/parse-gram.y (prologue_declaration): Update
2563 muscle_percent_define_insert invocations.
2564 * tests/input.at (`%define, --define'): Rename to...
2565 (`%define, --define, --force-define'): ... this and extend.
2567 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2569 Update some comments to make sense for -D.
2570 * data/bison.m4 (b4_check_user_names): In header comments, say
2571 "user occurrence" instead of "grammar occurrence".
2572 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
2573 (muscle_percent_code_grow): Likewise just for consistency.
2575 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2577 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2579 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2581 Handle a trailing `:' in a user-supplied C++ namespace better.
2582 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2583 among the closing braces here. This fix might make the
2584 generated code easier to debug, but otherwise it should be
2585 insignificant because a trailing `:' is a C++ error already.
2587 2009-05-19 Akim Demaille <demaille@gostai.com>
2589 remove useless variable.
2590 * src/getargs.c (skeleton_arg): Remove now useless variable.
2591 Should help the compiler see that this printf-like call is sane.
2593 2009-05-15 Akim Demaille <demaille@gostai.com>
2595 Rename token.prefix as api.tokens.prefix.
2597 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
2599 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
2600 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
2601 (token.prefix): Rename as...
2602 (api.tokens.prefix): this.
2604 2009-05-11 Akim Demaille <demaille@gostai.com>
2606 doc: use C++ headers.
2607 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2610 2009-05-11 Akim Demaille <demaille@gostai.com>
2613 * doc/bison.simple (Decl Summary): Document token.prefix.
2614 (Calc++ Parser): Various fixes.
2617 Introduce a macro TOKEN to shorten the code and make it more
2619 (Calc++ Scanner): Adjust.
2620 * NEWS (Variable token.prefix): New.
2622 2009-05-04 Akim Demaille <demaille@gostai.com>
2624 bison: catch bad symbol names.
2625 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2626 * tests/input.at: Adjust.
2628 2009-05-04 Akim Demaille <demaille@gostai.com>
2630 identifiers: dashes are letters.
2631 Dashes can now start identifiers (symbols and directives).
2633 * src/scan-gram.l ({letter}): Add dash.
2635 * tests/input.at (Symbols): Adjust.
2636 Remove stray comment.
2637 * tests/regression.at (Invalid inputs): Adjust error message.
2638 * doc/bison.texinfo (Symbols): Update.
2640 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2642 Declare %code to be a permanent feature.
2643 * NEWS (2.4.2): Here.
2644 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2646 (Decl Summary): Likewise.
2648 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2650 Convert underscores to dashes in some %define variable names.
2651 For now, just api.push-pull and lr.keep-unreachable-states.
2652 Maintain old names for backward compatibility.
2653 * NEWS (2.5): Document.
2654 * data/c.m4 (b4_identification): Update comment.
2655 * data/yacc.c: Update access.
2656 * doc/bison.texinfo: Update.
2657 * etc/bench.pl.in (bench_push_parser): Update use.
2658 * src/files.c (tr): Move to...
2659 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2660 think of a better place to expose it. My logic is that, for all
2661 uses of tr so far, command-line arguments can be involved, and
2662 getargs.h is already included.
2663 * src/main.c (main): Update access.
2664 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2665 variable names to new variable names before assigning value.
2666 * src/reader.c (reader): Update setting default.
2667 * tests/calc.at: Update uses.
2668 * tests/conflicts.at (Unreachable States After Conflict
2669 Resolution): Update use.
2670 * tests/input.at (%define enum variables): Update use.
2671 (%define backward compatibility): New test group.
2672 * tests/push.at: Update uses.
2673 * tests/reduce.at: Update uses.
2674 * tests/torture.at: Update uses.
2676 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2678 Set all front-end %define defaults in one place.
2679 * src/main.c (main): Move lr.keep_unreachable_states default...
2680 * src/reader.c (reader): ... to here.
2682 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2684 Rename lr.default_reductions to lr.default-reductions.
2686 * doc/bison.texinfo: Here.
2687 * src/lalr.c (initialize_LA): Here.
2688 * src/print.c (print_reductions): Here.
2689 * src/reader.c (reader): Here.
2690 * src/tables.c (action_row): Here.
2691 * tests/input.at (%define enum variables): Here.
2692 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2694 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2696 Pacify ./configure --enable-gcc-warnings.
2697 * tests/input.at (Symbols): Prototype yyerror and yylex.
2699 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2701 Document how `%define "var" "value"' is not M4-friendly.
2702 * src/parse-gram.y (variable): In comments here.
2704 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2706 Clean up recent patches a little.
2707 Reported by Akim Demaille.
2708 * doc/bison.texinfo (Understanding): Fix typos.
2709 * src/print.c (print_reductions): Don't use negated variable.
2711 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2713 List accepted values for a %define enum variable with an invalid value.
2714 Suggested by Akim Demaille at
2715 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2716 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2717 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
2718 * tests/input.at (%define lr.default_reductions invalid values): Merge
2720 (%define enum variables): ... here, and update output.
2722 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2724 Rename "default rule" to "default reduction".
2725 This includes changing variable names in code, changing
2726 comments, and renaming %define lr.default_rules to %define
2727 lr.default_reductions.
2728 * NEWS (2.5): Update IELR documentation.
2729 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
2731 * data/glr.c, data/lalr1.java: Sync copyright dates.
2732 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2733 and lr.type documentation. Make some other wording
2735 (Glossary): Adjust cross-references and Default Reduction
2737 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2738 Remove a confusing comment pointed out by Akim Demaille.
2739 (initialize_LA): Adjust code.
2740 * src/print-xml.c (print_reductions): Adjust code.
2741 * src/print.c (print_reductions): Adjust code.
2742 * src/reader.c (reader): Adjust code.
2743 * src/tables.c (action_row): Adjust code.
2744 (token_actions): Adjust code.
2745 * src/tables.h: Adjust YYDEFACT documentation.
2746 * tests/input.at (%define lr.default_rules invalid values):
2747 Rename test group to...
2748 (%define lr.default_reductions invalid values): ... this, and
2749 update grammar file and expected output.
2750 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2751 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2753 2009-04-21 Akim Demaille <demaille@gostai.com>
2755 tests: check the use of dashes and periods in symbols.
2756 * tests/input.at (Symbol): New test group.
2758 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2760 Document %define lr.type and lr.default_rules.
2761 * NEWS (2.5): Add an entry.
2762 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2763 besides just LALR(1) and GLR(1).
2764 * doc/bison.texinfo (Introduction): Likewise.
2765 (Language and Grammar): Bison is no longer limited to LALR(1)
2767 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2768 when trying to distinguish from GLR. Talk about LR(1) grammars
2769 rather than LALR(1) grammars.
2770 (Decl Summary): In %define api.push_pull entry, say it applies
2771 to deterministic parsers in C rather than LALR(1) parsers in C.
2772 Add lr.default_rules entry.
2774 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2776 (Generalized LR Parsing): Same changes as for the previous GLR
2778 (Memory Management): Say deterministic rather than LALR(1).
2779 (Understanding): Correct some bison output.
2780 Index discussion of "accepting state".
2781 Say deterministic rather than LALR(1).
2782 (Bison Options): In --yacc entry, say deterministic rather than
2784 In --report, --graph, and --xml entries, just don't mention
2786 (C++ Parsers): Say deterministic rather than LALR(1).
2787 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2788 (Glossary): Add Accepting State, Consistent State, Default Rule,
2789 and IELR(1) definitions.
2790 In Generalized LR (GLR) definition, make same changes as in
2791 previous GLR sections.
2792 In LALR(1) definition, say Bison uses LALR(1) by default rather
2793 than implying Bison is limited to LALR(1).
2794 (LocalWords): Add IELR.
2796 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2798 Finish implementing %define lr.type.
2799 Its value can be "LALR", "IELR", or "canonical LR".
2800 * lib/timevar.def (TV_IELR_PHASE1): New var.
2801 (TV_IELR_PHASE2): New var.
2802 (TV_IELR_PHASE3): New var.
2803 (TV_IELR_PHASE4): New var.
2804 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2805 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2806 Sbitset.h, ielr.h, and ielr.c.
2807 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2808 trace_types): Add trace_ielr.
2809 * src/lalr.h, src/lalr.c (ngotos): Export it.
2811 (goto_follows): ... this, update all uses, and export it.
2812 (set_goto_map): Export it.
2813 (map_goto): Export it.
2814 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2816 (initialize_LA): Export it. Move lookback allocation to...
2817 (lalr): ... here because, for canonical LR, initialize_LA must
2818 be invoked but lookback and much of the rest of LALR isn't
2820 * main.c (main): Instead of lalr, invoke ielr, which invokes
2822 * src/reader.c (reader): Default lr.type to "LALR".
2823 Default lr.default_rules to "accepting" if lr.type is "canonical
2824 LR". Leave the default as "all" otherwise.
2825 Check for a valid lr.type value.
2826 * src/state.h, src/state.c (struct state_list): Add state_list
2828 (state_new): Initialize state_list member to NULL.
2829 (state_new_isocore): New function, exported.
2830 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2831 exercises all values of lr.type.
2832 (GNU AWK Grammar): Rename test group to...
2833 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2834 AT_TEST_EXISTING_GRAMMAR.
2835 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2836 (GNU pic Grammar): Rename test group to...
2837 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2838 AT_TEST_EXISTING_GRAMMAR.
2839 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2840 all values of lr.type.
2841 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2842 (Lane Split): Likewise.
2843 (Complex Lane Split): Likewise.
2844 (Split During Added Lookahead Propagation): Likewise.
2846 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2848 Add new files for IELR and canonical LR implementation.
2849 * src/AnnotationList.c: New.
2850 * src/AnnotationList.h: New.
2851 * src/InadequacyList.c: New.
2852 * src/InadequacyList.h: New.
2853 * src/Sbitset.c: New.
2854 * src/Sbitset.h: New.
2858 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2860 Implement %define lr.default_rules.
2861 Its value describes the states that are permitted to contain
2862 default rules: "all", "consistent", or "accepting".
2863 * src/reader.c (reader): Default lr.default_rules to "all".
2864 Check for a valid lr.default_rules value.
2865 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2866 is "accepting", then only mark the accepting state as
2868 (initialize_LA): Tell state_lookahead_tokens_count whether
2869 lr.default_rules is "accepting".
2870 * src/tables.c (action_row): If lr.default_rules is not "all",
2871 then disable default rules in inconsistent states.
2872 * src/print.c (print_reductions): Use this opportunity to
2873 perform some assertions about whether lr.default_rules was
2875 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2876 helps with checking the parser tables for a grammar.
2877 * tests/input.at (%define lr.default_rules invalid values): New
2879 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2880 AT_TEST_TABLES_AND_PARSE.
2881 (`no %define lr.default_rules'): New test group generated by
2882 AT_TEST_LR_DEFAULT_RULES.
2883 (`%define lr.default_rules "all"'): Likewise.
2884 (`%define lr.default_rules "consistent"'): Likewise.
2885 (`%define lr.default_rules "accepting"'): Likewise.
2887 2009-04-20 Akim Demaille <demaille@gostai.com>
2891 2009-04-20 Akim Demaille <demaille@gostai.com>
2894 * src/output.c (token_definitions_output): Use symbol_id_get
2895 instead of duplicating its logic.
2896 * TODO (YYERRCODE): Extend.
2898 2009-04-20 Akim Demaille <demaille@gostai.com>
2900 variables: prefer error-verbose to error_verbose.
2901 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
2902 instead of error_verbose.
2903 * src/scan-gram.l (%error-verbose): Map to the error-verbose
2905 * doc/bison.texinfo: Promote %define error-verbose instead of
2907 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
2909 2009-04-15 Akim Demaille <demaille@gostai.com>
2911 variables: accept dashes.
2912 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
2914 * src/scan-gram.l ({id}): Also accept dashes after the initial
2916 ({directive}): Use {id}.
2917 * src/parse-gram.y: Comment and formatting changes.
2918 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2920 * src/complain.h, src/complain.c (yacc_at): New.
2921 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2923 * src/output.c (token_definitions_output): Do not #define token
2926 2009-04-20 Akim Demaille <demaille@gostai.com>
2928 Consistently refer to Yacc, not YACC.
2929 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2931 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2933 Pacify make maintainer-check-posix.
2934 * tests/input.at (%define, --define): Move bison command-line
2935 options before grammar file name.
2937 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2939 Document semicolon warnings.
2942 2009-04-14 Akim Demaille <demaille@gostai.com>
2944 variables: use `parse.assert' instead of `assert'.
2945 * TODO (assert): Remove.
2946 * data/bison.m4 (b4_assert_if): Replace with...
2947 (b4_parse_assert_if): this.
2948 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
2949 * doc/bison.texinfo (Decl Summary): Document parse.assert.
2951 2009-04-14 Akim Demaille <demaille@gostai.com>
2953 variables: use `parse.trace' instead of `debug'.
2954 * src/getargs.c (getargs): Map -t to %define trace.parse.
2955 * src/scan-gram.l (%debug): Map to %define trace.parse.
2956 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
2957 names to `_' in macro names.
2958 (b4_debug_if): Replace with...
2959 (b4_parse_trace_if): this.
2960 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2961 * data/yacc.c: Adjust.
2962 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
2963 Use @code to label the variable list.
2964 Document the variable parse.trace.
2965 (Tracing): Promote the parse.trace variable.
2966 * TODO: %printer is not documented.
2968 2009-04-14 Akim Demaille <demaille@gostai.com>
2971 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2972 (Table of Symbols): Remove duplicate entry for %debug.
2974 2009-04-10 Eric Blake <ebb9@byu.net>
2976 submodules: update to latest
2977 * submodules/autoconf: Use latest upstream Autoconf.
2979 2009-04-06 Eric Blake <ebb9@byu.net>
2981 Work around autoconf 2.63b bug in testsuite.
2982 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2983 autoconf bug related to # in test.
2985 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2987 * NEWS (2.5): New section. Describe new -D/--define feature.
2989 2009-04-06 Akim Demaille <demaille@gostai.com>
2992 * src/parse-gram.h, src/parse-gram.c: Regen.
2994 2009-04-06 Akim Demaille <demaille@gostai.com>
2996 rename muscle_tab.* as muscle-tab.* for consistency.
2997 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
2998 * src/muscle-tab.h, src/muscle-tab.c: these.
2999 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
3000 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
3002 2009-04-06 Akim Demaille <demaille@gostai.com>
3004 Makefile: introduce $(BISON).
3005 * src/local.mk (BISON): New.
3008 2009-04-06 Akim Demaille <demaille@gostai.com>
3010 parser: handle %locations as %define locations.
3011 * src/getargs.h, src/getargs.c (locations_flag): Remove.
3012 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
3013 to set "locations" to true.
3014 * src/output.c (prepare): Don't output "locations".
3015 * src/scan-gram.l (%locations): Handle it as a %<flag>.
3016 * src/parse-gram.y: It's no longer a token.
3018 * data/bison.m4 (b4_locations_if): Define it with
3019 b4_percent_define_if_define.
3020 * data/c.m4, data/glr.cc: Adjust.
3022 2009-04-06 Akim Demaille <demaille@gostai.com>
3025 * src/parse-gram.c: Regen.
3027 2009-04-06 Akim Demaille <demaille@gostai.com>
3029 muscle: factor the handling of obsolete of obsolete directives.
3030 Suggested by Joel E. Denny.
3032 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
3033 New, extracted from...
3034 * src/parse-gram.y (prologue_declaration: pure-parser): here.
3036 (prologue_declaration: "%<flag>"): Use
3037 muscle_percent_define_ensure.
3038 (%error-verbose, %pure-parser): No longer tokens.
3039 * src/scan-gram.l (pure-parser): Return as a %<flag>.
3041 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
3043 Fix options documentation.
3044 * build-aux/cross-options.pl: As in --help output, write optional
3045 arguments as [=ARG] not =[ARG].
3046 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
3048 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
3050 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
3051 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
3052 requirements for a correct m4 are stricter.
3053 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
3054 * configure.ac: Update to use AC_PROG_GNU_M4.
3055 Reported by Eric Blake.
3057 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3059 Help with updating web manual.
3060 * HACKING: Incorporate instructions from gnulib/doc/README.
3061 * bootstrap.conf (gnulib_modules): Add gendocs.
3063 2009-04-03 Akim Demaille <demaille@gostai.com>
3066 * src/parse-gram.h, src/parse-gram.c: Regen.
3068 2009-04-03 Akim Demaille <demaille@gostai.com>
3070 Factor %FLAG at scan level.
3071 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
3072 definitions and associated rules, replaced by....
3073 (PERCENT_FLAG): this new token type, and rule.
3074 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
3075 Use it for %debug and %error-verbose.
3077 2009-04-03 Akim Demaille <demaille@gostai.com>
3080 * src/parse-gram.h, src/parse-gram.c: Regen.
3082 2009-04-03 Akim Demaille <demaille@gostai.com>
3084 Treat %debug as %define debug.
3085 * data/bison.m4 (b4_debug_if): New.
3086 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
3087 * data/lalr1.java: Use it instead of b4_debug_flag.
3088 * src/getargs.h, src/getargs.c (debug_flag): Remove.
3089 * src/output.c (prepare): Don't output it.
3090 * src/parse-gram.y: Treat %debug as %define debug.
3092 2009-04-03 Akim Demaille <demaille@gostai.com>
3094 Treat %error-verbose as %define error_verbose.
3095 This allows to pass -Derror_verbose on the command line. Better
3096 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
3097 ERROR_VERBOSE being defined as false or true.
3098 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
3099 on b4_percent_define_ifdef, for does not check the defined value,
3100 but only whether the symbol is defined, rely on
3101 b4_percent_define_flag_if, so that a value of "false" is processed
3103 If not defined, define the flag to "false".
3104 (b4_error_verbose_if): New.
3105 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
3106 b4_error_verbose_flag.
3107 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
3108 * src/output.c (prepare): Don't output it.
3109 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
3111 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3113 Fix strange %define locations for default values.
3114 Reported by Akim Demaille at
3115 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
3116 and discussed again starting at
3117 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
3118 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
3119 because location information is bogus.
3120 Use angle brackets to delimit fake file name because square brackets
3121 look like underexpanded m4. Choose a better fake file name.
3122 Use negative line numbers.
3123 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
3124 * src/location.c (location_print): If line for a boundary is negative,
3125 only print that boundary's file name.
3126 * src/location.h: Document that.
3127 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3128 defaults): Update output.
3130 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3132 Pacify ./configure --enable-gcc-warnings.
3133 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
3134 in lib won't compile with it.
3135 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
3137 2009-03-31 Akim Demaille <demaille@gostai.com>
3139 bootstrap: --help to stdout.
3140 * bootstrap (usage): Don't send --help to stderr.
3141 Use a here doc instead of a long string.
3143 2009-03-31 Akim Demaille <demaille@gostai.com>
3145 bootstrap: README-hacking no longer exists
3146 * bootstrap (checkout_only_file): Set to HACKING.
3148 2009-03-26 Akim Demaille <demaille@gostai.com>
3150 doc: merge HACKING and README-hacking.
3151 Two files is confusing.
3152 Reported by Alexandre Duret-Lutz.
3154 * README-hacking: Merge into...
3155 * HACKING (Working from the repository): here.
3157 2009-03-26 Akim Demaille <demaille@gostai.com>
3159 doc: update README-hacking.
3160 * README-hacking: We now use git and git submodules.
3161 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
3163 2009-03-26 Akim Demaille <demaille@gostai.com>
3165 lalr1.cc: avoid GCC 4.3 warnings.
3166 GCC 4.3 now warns about "a || b && c" and asks for explicit
3168 Reported by Alexandre Duret-Lutz.
3169 * data/location.cc: Update copyright years.
3170 (Position::operator==): Use parens to make precedence explicit.
3171 Compare lines and columns first, as they are more likely to be
3172 different, and they are faster to compare.
3174 2009-03-26 Akim Demaille <demaille@gostai.com>
3177 * gnulib: Update to latest.
3178 * src/local.mk (AM_CFLAGS): Move to...
3179 * Makefile.am: here.
3180 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
3183 2009-03-02 Akim Demaille <demaille@gostai.com>
3187 2009-03-02 Akim Demaille <demaille@gostai.com>
3189 Share b4_yytranslate_define.
3190 * data/lalr1.cc (b4_yytranslate_define): Move to...
3191 * data/c++.m4: here.
3193 2009-03-02 Akim Demaille <demaille@gostai.com>
3195 Use locations in the variant example.
3196 Yes, this obfuscates the point of this example, variants only.
3197 But glr.cc cannot work (yet?) without locations. This change
3198 makes it easier to use this example with glr.cc.
3200 * examples/variant.yy (assert): %define it.
3201 (locations): Request them.
3202 (yylex): Bind the location to the stage.
3204 2009-03-02 Akim Demaille <demaille@gostai.com>
3206 Dub make_TOKEN as a public type interface.
3207 * data/c++.m4 (b4_symbol_constructor_declare)
3208 (b4_symbol_constructor_define): New empty stubs.
3209 (b4_public_types_declare, b4_public_types_define): Use them.
3210 * data/lalr1.cc (b4_symbol_constructor_declare)
3211 (b4_symbol_constructor_declare_)
3212 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
3214 * data/variant.hh: here.
3215 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
3217 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
3218 b4_symbol_constructor_declare, as it is now done by
3219 b4_public_types_define and b4_public_types_declare.
3221 2009-03-02 Akim Demaille <demaille@gostai.com>
3223 Coding style changes.
3224 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3225 (b4_symbol_constructor_declarations)
3226 (b4_symbol_constructor_definition_)
3227 (b4_symbol_constructor_definitions)
3228 (b4_yytranslate_definition): Rename as...
3229 (b4_symbol_constructor_declare_)
3230 (b4_symbol_constructor_declare)
3231 (b4_symbol_constructor_define_)
3232 (b4_symbol_constructor_define)
3233 (b4_yytranslate_define): these.
3234 * data/variant.hh (b4_variant_definition): Rename as...
3235 (b4_variant_define): this.
3237 2009-03-02 Akim Demaille <demaille@gostai.com>
3239 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
3240 * data/bison.m4 (b4_percent_define_if_define): New.
3241 * data/c++.m4 (b4_variant_if): Move to...
3242 * data/bison.m4: Here, using b4_percent_define_if_define.
3243 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
3244 * data/bison.m4: Here, using b4_percent_define_if_define.
3246 2009-03-02 Akim Demaille <demaille@gostai.com>
3248 Dub symbol_type_base as a public type.
3249 * data/c++.m4 (b4_public_types_declare): Now define
3250 symbol_type_base and symbol_type.
3251 (b4_public_types_define): New.
3252 In both cases, the definitions are taken verbatim from lalr1.cc.
3253 * data/lalr1.cc: Adjust.
3255 2009-03-02 Akim Demaille <demaille@gostai.com>
3257 b4_public_types_declare.
3258 * data/c++.m4 (b4_public_types_declare): New.
3259 * data/glr.cc, data/lalr1.cc: Use it.
3261 2009-03-02 Akim Demaille <demaille@gostai.com>
3263 b4_semantic_type_declare.
3264 * data/c++.m4 (b4_semantic_type_declare): New.
3265 Factors and generalizes what was in glr.cc and lalr1.cc.
3266 * data/variant.hh (b4_semantic_type_declare): Redefine it for
3268 * data/lalr1.cc, data/glr.cc: Use it.
3270 2009-02-26 Akim Demaille <demaille@gostai.com>
3273 * gnulib: Upgrade from master.
3274 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
3277 2009-02-25 Akim Demaille <demaille@gostai.com>
3279 Remove useless arguments.
3280 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
3283 2009-02-25 Akim Demaille <demaille@gostai.com>
3286 * data/lalr1.cc: here.
3288 2009-02-25 Akim Demaille <demaille@gostai.com>
3290 Fix glr.cc's debug level handling.
3291 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
3292 glr.c which is used.
3293 (debug_level, set_debug_level): Adjust.
3295 2009-02-25 Akim Demaille <demaille@gostai.com>
3298 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
3300 2009-02-25 Akim Demaille <demaille@gostai.com>
3303 * etc/bench.pl.in (generate_grammar_list): Consitently use
3304 location_type, not yy::location.
3306 2009-02-25 Akim Demaille <demaille@gostai.com>
3309 * data/lalr1.cc: here.
3311 2009-02-19 Akim Demaille <demaille@gostai.com>
3313 Make yyparser::error public.
3314 * data/lalr1.cc: here.
3315 There is no good reason to keep it private (and it is convenient
3316 to use it from the scanner for instance). It is already public in
3319 2009-02-19 Akim Demaille <demaille@gostai.com>
3322 * data/glr.cc: here.
3324 2009-02-19 Akim Demaille <demaille@gostai.com>
3326 Remove trailing blanks.
3327 The epilogue has its own ending \n, no need to add another.
3329 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
3331 * data/glr.cc: dnl when extending the epilogue.
3332 Remove stray "private:".
3334 2009-02-19 Akim Demaille <demaille@gostai.com>
3337 * data/c.m4 (b4_c_function_decl): Here.
3339 2009-02-19 Akim Demaille <demaille@gostai.com>
3342 * data/lalr1.cc: here.
3344 2009-02-19 Akim Demaille <demaille@gostai.com>
3347 * data/variant.hh: New, extracted from...
3348 * data/lalr1.cc: here.
3350 * data/local.mk: Adjust.
3352 2009-02-19 Akim Demaille <demaille@gostai.com>
3354 Extract stack.hh from lalr1.cc.
3355 * data/stack.hh: New.
3356 * data/lalr1.cc: Extract from here.
3357 * data/local.mk: Adjust.
3359 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
3361 Add reminder about uploading public key to keys.gnupg.net.
3362 * HACKING (Release Procedure): Here.
3364 2009-01-28 Akim Demaille <demaille@gostai.com>
3366 * NEWS: Update information about 2.4.1 and 2.4.2.
3368 2008-11-04 Akim Demaille <demaille@gostai.com>
3371 * NEWS: Use more outline-mode markup.
3372 Suggested by Jim Meyering.
3374 2009-01-08 Akim Demaille <demaille@gostai.com>
3376 Fix grep portability issues.
3377 Grep on Solaris does not support -q.
3378 Reported by Summum Bonum.
3380 * NEWS: Add a stub for 2.4.2.
3381 * THANKS: Add Summum Bonum.
3382 * tests/atlocal.in (EGREP): New.
3383 (CC, CXX, XSLTPROC): Make it possible to override them via
3385 * tests/java.at: Use $EGREP instead of egrep.
3386 Use AT_CHECK's ignore instead of grep's -q.
3388 2008-12-11 Akim Demaille <demaille@gostai.com>
3390 Pass the token type to yysyntax_error.
3391 * data/yacc.c (yysyntax_error): Take the transated token instead
3396 2008-12-11 Akim Demaille <demaille@gostai.com>
3399 * data/glr.c: Formatting changes.
3401 2008-12-11 Akim Demaille <demaille@gostai.com>
3403 Propagate i18n changes into glr.c.
3405 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
3406 building the error message format dynamically.
3407 * data/lalr1.java: Formatting changes.
3409 2008-12-11 Akim Demaille <demaille@gostai.com>
3412 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
3413 Solves problems when top_srcdir is an absolute path.
3414 Suggested by Eric Blake.
3415 * configure.ac: Require Autoconf 2.62.
3417 2008-12-11 Akim Demaille <demaille@gostai.com>
3419 Simplify the i18n of the error messages.
3420 * data/lalr1.cc: Comment changes.
3421 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
3422 lalr1.cc instead of building dynamically the format string.
3424 2008-12-08 Akim Demaille <demaille@gostai.com>
3426 Fix portability issue in the test suite.
3427 * tests/local.at (AT_MATCHES_CHECK): New.
3428 Based on Perl instead of Sed. Sed has too many portability
3429 pitfalls, not ever Sed is GNU Sed.
3430 * tests/actions.at (Fix user actions without a trailing semicolon):
3433 2008-12-08 Akim Demaille <demaille@gostai.com>
3436 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
3438 2008-12-08 Akim Demaille <demaille@gostai.com>
3440 Install autoconf as a submodule to get m4sugar.
3441 * .gitmodules: Add submodules/autoconf.
3442 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
3443 submodules/autoconf.
3445 2008-12-08 Akim Demaille <demaille@gostai.com>
3447 Test token.prefix in all the skeletons.
3448 * data/java.m4 (b4_token_enum): Use the token.prefix.
3449 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
3450 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
3451 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
3452 * tests/java.at: Comment changes.
3453 (AT_CHECK_JAVA_MINIMAL): Define the END token.
3454 (Java parser class and package names): Add token.prefix check.
3456 2008-12-08 Akim Demaille <demaille@gostai.com>
3458 Fix regeneration of atconfig.
3459 * tests/local.mk (tests/atconfig): The rule was incorrect, but
3460 remove it: now that there is no tests/Makefile.am, the top-level
3461 Makefile properly updates atconfig when needed.
3463 2008-12-07 Di-an Jan <dianj@freeshell.org>
3465 Implement the FIXME that ends an user action with a semicolon
3466 if it seems necessary.
3467 * src/scan-code.l (flex rules section): Flag cpp directive from
3468 any `#' to the first unescaped end-of-line. Semicolon is not
3469 needed after `;', `{', '}', or cpp directives and is needed after
3470 any other token (whitespaces and comments have no effect).
3471 * tests/actions.at (Fix user actions without a trailing semicolon):
3473 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
3474 to make user actions complete statements.
3475 Adjust column numbers in error messages.
3476 * tests/regression.at (Fix user actions without a trailing semicolon):
3477 Remove. Covered by new test.
3479 2008-12-07 Akim Demaille <demaille@gostai.com>
3482 * gnulib: Update from master.
3484 2008-12-05 Eric Blake <ebb9@byu.net>
3486 Avoid compiler warning.
3487 * src/output.c (muscle_insert_item_number_table): Delete unused
3490 2008-12-02 Eric Blake <ebb9@byu.net>
3492 Build testsuite with newer autoconf.
3493 * tests/output.at (m4_expand): Don't override in newer autoconf,
3494 where the underlying implementation changed.
3495 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
3496 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
3497 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
3498 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
3499 since some of them contain unbalanced ')'.
3501 2008-12-01 Akim Demaille <demaille@gostai.com>
3503 Use b4_symbol for printers and destructors everywhere.
3504 * data/bison.m4 (b4_symbol_action_location): New.
3505 * data/c.m4 (b4_symbol_actions): Remove.
3506 Adjust all callers to use by b4_symbol_foreach and the corresponding
3507 b4_symbol_printer/destructor macro.
3508 * data/glr.cc: Adjust.
3509 * data/lalr1.java: Adjust the %destructor sanity check.
3510 * src/output.c (symbol_code_props_output): Remove, we no longer
3511 need the b4_symbol_printers/destructors tables.
3513 2008-12-01 Akim Demaille <demaille@gostai.com>
3515 Use b4_symbol_case_.
3516 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
3519 2008-12-01 Akim Demaille <demaille@gostai.com>
3521 Move b4_symbol based macro to bison.m4.
3522 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
3523 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
3524 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
3525 (b4_type_foreach): Move to...
3526 * data/bison.m4: Here.
3527 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
3528 b4_symbol_value_template instead of b4_symbol_value.
3530 2008-12-01 Akim Demaille <demaille@gostai.com>
3532 b4_symbol/type_foreach.
3533 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
3536 2008-12-01 Akim Demaille <demaille@gostai.com>
3538 Use the symbol properties to output the printer/destructor for lalr1.cc.
3539 Instead of defining complex list of tuples to define various
3540 properties of the symbols, we now prefer to define symbols as
3541 "structs" in m4: using the symbol key (its number), and the
3542 property name, b4_symbol gives it value. Use this to handle
3543 destructors and printers.
3545 * src/output.c (CODE_PROP): New.
3546 (prepare_symbol_definitions): Use it to define the printer and
3547 destructor related attributes of the symbols.
3548 * data/lalr1.cc (b4_symbol_actions): Rename as...
3549 (b4_symbol_action): this.
3550 Use b4_symbol instead of 6 arguments.
3551 (b4_symbol_printer, b4_symbol_destructor): New.
3552 Use them instead of b4_symbol_actions.
3554 2008-12-01 Akim Demaille <demaille@gostai.com>
3556 Avoid capturing variables too easily.
3557 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
3558 v__ and p__ instead of v and p.
3560 2008-12-01 Akim Demaille <demaille@gostai.com>
3562 Remove spurious empty line before syncline.
3563 * data/bison.m4 (b4_syncline): Don't output an empty line before
3566 2008-11-26 Akim Demaille <demaille@gostai.com>
3568 Convert lib/Makefile.am into lib/local.mk.
3569 The real problem is rather gnulib.mk, which itself is extracted
3570 from a Makefile.am that gnulib expects to the "recursive". The
3571 tool prefix-gnulib-mk converts such a gnulib.mk to be
3572 non-recursive. Also, some AC_SUBST variables need to be adjusted.
3574 * etc/prefix-gnulib-mk: New.
3575 * bootstrap (slurp): Use it to convert further gnulib.mk.
3576 No longer try to avoid re-creation of lib/gnulib.mk as the changes
3578 * lib/Makefile.am: Rename as...
3579 * lib/local.mk: this.
3580 Adjust to be prefixed.
3581 * Makefile.am, configure.ac: Adjust.
3582 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
3584 2008-11-26 Akim Demaille <demaille@gostai.com>
3587 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
3588 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
3589 Reported by Eric Blake.
3591 2008-11-26 Akim Demaille <demaille@gostai.com>
3593 Use b4_parser_tables_define in glr.cc.
3594 * data/glr.c: Use b4_parser_tables_define instead of defining the
3595 (deterministic integral) tables by hand.
3597 2008-11-26 Akim Demaille <demaille@gostai.com>
3599 Use b4_parser_tables_define in Java.
3600 * data/java.m4 (b4_typed_parser_table): Rename as...
3601 (b4_typed_parser_table_define): this, for consistency.
3602 Accept a comment as $4.
3604 (b4_integral_parser_table): Rename as...
3605 (b4_integral_parser_table_define): this.
3606 * data/lalr1.java: Adjust all uses.
3607 Use b4_parser_tables_define instead of generation by hand.
3609 2008-11-26 Akim Demaille <demaille@gostai.com>
3611 Prepare the convergence bw C style and Java table generation.
3612 * data/bison.m4 (b4_tables_map, b4_tables_declare)
3613 (b4_tables_define): Rename as...
3614 (b4_integral_parser_tables_map, b4_parser_tables_declare)
3615 (b4_parser_tables_define): these.
3616 * data/c.m4 (b4_table_define): Rename as...
3617 (b4_integral_parser_table_define): this.
3618 * data/lalr1.cc: Adjust.
3619 (b4_table_define, b4_table_declare): Rename as...
3620 (b4_integral_parser_table_define)
3621 (b4_integral_parser_table_declare): these.
3622 (yyrline_): Move the comment where it is actually used.
3623 * data/yacc.c: Adjust.
3624 (yyrline): Use b4_integral_parser_table_define.
3626 2008-11-26 Akim Demaille <demaille@gostai.com>
3629 * src/parse-gram.h, src/parse-gram.c: Regen.
3631 2008-11-26 Akim Demaille <demaille@gostai.com>
3633 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
3634 * data/lalr1.cc (b4_tables_map): Move to...
3635 * data/bison.m4: here.
3636 Update the comment for yytable during the flight.
3637 (b4_tables_declare, b4_tables_define): New.
3638 * data/lalr1.cc: Use them.
3639 * data/c.m4 (b4_table_define): New.
3640 * data/yacc.c: Use b4_tables_define instead of output the tables
3642 * tests/regression.at (Web2c Actions): Adjust the expected output,
3643 the order of the tables changed.
3645 2008-11-26 Akim Demaille <demaille@gostai.com>
3647 Get rid of (yy)rhs and (yy)prhs.
3648 These tables are no longer needed in the parsers, and they don't seem to
3649 be useful. They are not documented either.
3651 * src/output.c (prepare_rules): Get rid of rhs and prhs.
3652 Adjust the computation of (yy)r2.
3654 2008-11-26 Akim Demaille <demaille@gostai.com>
3656 Rule length is unsigned.
3657 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
3659 2008-11-26 Akim Demaille <demaille@gostai.com>
3661 Get rid of lalr1-split.cc.
3662 It was no longer maintainer.
3664 * data/lalr1-split.cc: Remove.
3665 * etc/bench.pl.in (bench_fusion_parser): Remove.
3668 2008-11-26 Akim Demaille <demaille@gostai.com>
3670 Use yy* consistently.
3671 * data/glr.c: Now that yyrhs no longer exists as a global
3672 variable, rename local "rhs" variables into "yyrhs" for
3675 2008-11-25 Akim Demaille <demaille@gostai.com>
3677 Get rid of yyrhs and yyprhs in glr.c.
3678 * data/glr.c (yyrhs, yyprhs): Remove.
3679 Instead, use the state stack and yystos.
3681 2008-11-25 Akim Demaille <demaille@gostai.com>
3684 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
3685 as an Autotest keyword.
3687 2008-11-25 Akim Demaille <demaille@gostai.com>
3689 Prefer TESTSUITE_FLAGS.
3690 TESTSUITEFLAGS is barely readable.
3692 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
3693 for backward compatibility.
3694 Use the former instead of the latter.
3696 2008-11-25 Akim Demaille <demaille@gostai.com>
3698 Get rid of yyrhs and yyprhs in larl1.java.
3699 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
3700 (yy_reduce_print): Rather, use yystos_ and the state stack.
3702 2008-11-25 Akim Demaille <demaille@gostai.com>
3706 2008-11-25 Akim Demaille <demaille@gostai.com>
3708 Get rid of yyrhs and yyprhs in yacc.c.
3709 They were used to get the symbol types, given a rule number, when
3710 displaying the top of the stack before a reduction. But the
3711 symbol type is available from the state stack. This has two be
3712 benefits: two tables less in the parser (making it smaller), and a
3713 more consistent use of the three stacks which will help to fuse
3716 * data/yacc.c (yyprhs, yyrhs): Remove.
3717 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
3718 (yy_reduce_print): Take yyssp as argument.
3719 Use it, together with yystos, to get the symbol type.
3720 * tests/regression.at (Web2c Report): Remove these tables from the
3723 2008-11-25 Akim Demaille <demaille@gostai.com>
3726 The point is to factor the generation of the tables across skeletons.
3727 This is language dependant.
3729 * data/c.m4 (b4_comment_): New.
3730 Should be usable to define how to generate tables independently of
3732 (b4_c_comment): New.
3733 (b4_comment): Bounce to b4_c_comment.
3734 Now support $2 = [PREFIX] for indentation.
3735 * data/lalr1.cc (b4_table_declare): Don't output a comment if
3736 there is no comment.
3737 Indent it properly when there is one.
3738 Output the ending semicolon.
3739 (b4_table_define): Space changes.
3740 Output the ending semicolon.
3741 (b4_tables_map): New.
3742 Use it twice instead of declaring and defining the (integral)
3745 2008-11-25 Akim Demaille <demaille@gostai.com>
3748 * data/lalr1.cc (b4_table_declare): New.
3749 Use it to declare the tables defined with b4_table_define.
3750 (b4_table_define): Declare a third arg to match b4_table_declare
3752 Move all the comments around invocations of b4_table_define into
3753 the invocations itselves.
3754 Move things around to have the order for declarations and
3757 2008-11-25 Akim Demaille <demaille@gostai.com>
3760 * data/lalr1.java: here.
3762 2008-11-25 Akim Demaille <demaille@gostai.com>
3764 b4_args is more general than only C++.
3765 * data/lalr1.cc (b4_args, _b4_args): Move to...
3766 * data/bison.m4: here.
3768 2008-11-21 Di-an Jan <dianj@freeshell.org>
3770 Implement no-XXX arguments for --warnings, --report, --trace.
3771 * src/getargs.c (flags_argmatch): Handles no-XXX.
3772 Fix typo in doxygen comment.
3774 2008-11-21 Akim Demaille <demaille@gostai.com>
3776 Display the changes in cross-options.texi.
3777 * build-aux/cross-options.pl ($sep): New, to separate items.
3778 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
3781 2008-11-20 Di-an Jan <dianj@freeshell.org>
3783 Improves options in the manual.
3784 * doc/bison.texinfo (-g, -x): Add space before argument.
3785 (Option Cross Key): Implement FIXME: listing directives also.
3786 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
3787 (Short Option): Special case -d. Put arguments inside @option.
3788 (Bison Directive): Add column, automatically extracted from
3789 src/scan-gram.l (actual name passed as the first argument)
3790 with special case for %define.
3791 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
3792 to build-aux/cross-options.pl.
3793 * src/getargs.c (usage): Document limitations of cross-options.pl.
3794 * src/scan-gram.l: Likewise.
3796 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3798 Fix unexpanded macros in GLR defines file.
3799 Reported by Csaba Raduly at
3800 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3801 * THANKS (Csaba Raduly): Add.
3802 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3803 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3804 lexer in a separate module that includes the defines file.
3805 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
3807 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3808 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3809 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3810 (AT_DATA_SOURCE_PROLOGUE): New.
3811 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3812 (AT_DATA_SOURCE): New.
3813 (AT_FULL_COMPILE): Extend to support an additional source file.
3815 2008-11-18 Akim Demaille <demaille@gostai.com>
3818 * TODO: More short term issues.
3820 2008-11-18 Akim Demaille <demaille@gostai.com>
3823 * src/parse-gram.h, src/parse-gram.c: Regen.
3825 2008-11-18 Akim Demaille <demaille@gostai.com>
3827 Use b4_subtract where possible.
3828 * data/lalr1.cc (b4_subtract): Move to...
3829 * data/bison.m4: here.
3830 * data/glr.c (b4_rhs_data): Use it.
3831 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
3833 2008-11-18 Akim Demaille <demaille@gostai.com>
3835 Remove incorrect mode specification.
3836 * data/glr.cc: Don't pretend it's C code.
3838 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3840 Simplify last patch slightly.
3841 * src/getargs.c (getargs): Here.
3843 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3845 Fix last warning from --enable-gcc-warnings.
3846 * src/getargs.c (getargs): Don't assign const address to non-const
3849 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3851 Don't let maintainer-*-check targets force a version update.
3852 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3855 2008-11-17 Di-an Jan <dianj@freeshell.org>
3857 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3858 Align menus. Adjust word wrapping. Use node names for menu names.
3859 (Examples): Don't abbreviate node names.
3860 (LocalWords): Remove abbreviations.
3861 (Copying): Make description a sentence.
3862 (Java Action Features): Remove period to match the rest of menu.
3864 2008-11-17 Di-an Jan <dianj@freeshell.org>
3866 Handles several --enable-gcc-warnings.
3867 * src/getargs.c (command_line_location): Set parameters to void.
3868 * src/output.c (symbol_type_name_cmp): Make static.
3869 (symbols_by_type_name): Set parameters to void.
3870 (symbol_definitions_output): Remove unused parameter. Rename as...
3871 (prepare_symbol_definitions): this.
3872 (muscles_output): Move symbol_definitions_output to...
3873 (output): here as prepare_symbol_definitions.
3874 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
3875 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
3877 2008-11-17 Di-an Jan <dianj@freeshell.org>
3879 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
3880 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
3882 2008-11-16 Akim Demaille <demaille@gostai.com>
3884 Add missing $(EXEEXT).
3885 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
3886 "src/bison$(EXEEXT)".
3887 Reported by Di-an Jan.
3889 2008-11-15 Akim Demaille <demaille@gostai.com>
3893 2008-11-15 Akim Demaille <demaille@gostai.com>
3896 * tests/input.at: here.
3898 2008-11-15 Akim Demaille <demaille@gostai.com>
3900 Remove duplicate header inclusion.
3903 2008-11-15 Akim Demaille <demaille@gostai.com>
3905 * src/parse-gram.h, src/parse-gram.c: Regen.
3907 2008-11-15 Akim Demaille <demaille@gostai.com>
3909 Support parametric types.
3911 There are two issues to handle: first scanning nested angle
3912 bracket pairs to support types such as std::pair< std::string,
3913 std::list<std::string> > >.
3915 Another issue is to address idiosyncracies of C++: do not glue two
3916 closing angle brackets together (otherwise it's operator>>), and
3917 avoid sticking blindly a TYPE to the opening <, as it can result
3918 in '<:' which is a digraph for '['.
3920 * src/scan-gram.l (brace_level): Rename as...
3923 Implement support for complex tags.
3926 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
3927 (b4_symbol_variant): Leave space around types as parameters.
3928 * examples/variant.yy: Use nested template types and leading ::.
3929 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
3931 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
3932 * tests/c++.at: Test parametric types.
3934 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3937 This is not sufficient, but we test at least that the make_SYMBOL
3938 interface is not affected by token.prefix. A more general test
3939 will be implemented when the support of token.prefix is generalized
3942 * tests/c++.at: One more variant test, using token.prefix.
3944 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3946 Test the make_TOKEN interface.
3947 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
3948 Factor the common code in yylex.
3949 Use it to test "%define lex_symbol".
3951 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3955 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3957 Simplify code for variants bench marks.
3958 * etc/bench.pl.in (&generate_grammar_list): Define and use
3960 Factor the common code in yylex.
3962 2008-11-15 Akim Demaille <demaille@gostai.com>
3964 Better error message.
3965 * bootstrap (find_tool): Fix the error message.
3967 2008-11-15 Akim Demaille <demaille@gostai.com>
3969 Update variant.yy to newest interface.
3970 * examples/variant.yy: Define lex_symbol.
3973 2008-11-15 Akim Demaille <demaille@gostai.com>
3975 Don't use locations in variant.yy.
3976 * examples/variant.yy: Adjust to not using locations.
3978 2008-11-15 Akim Demaille <demaille@gostai.com>
3981 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
3982 comments for the license.
3984 2008-11-15 Akim Demaille <demaille@gostai.com>
3986 Remove tests/Makefile.am.
3987 * tests/Makefile.am: Rename as...
3988 * tests/local.mk: this.
3989 * Makefile.am, configure.ac: Adjust.
3990 * Makefile.am (DISTCLEANFILES): Define.
3991 (maintainer-check, maintainer-xml-check, maintainer-push-check):
3992 Remove, we no longer need to bounce to the real targets.
3994 2008-11-15 Akim Demaille <demaille@gostai.com>
3998 2008-11-15 Akim Demaille <demaille@gostai.com>
4001 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
4002 * djgpp/local.mk: this new file.
4004 2008-11-15 Akim Demaille <demaille@gostai.com>
4006 Remove doc/Makefile.am.
4007 * doc/Makefile.am: Rename as...
4008 * doc/local.mk: this.
4010 * Makefile.am, configure.ac: Adjust.
4011 * Makefile.am (MOSTLYCLEANFILES): New.
4012 * src/local.mk: Adjust.
4014 2008-11-15 Akim Demaille <demaille@gostai.com>
4016 Move sc_tight_scope into maint.mk.
4017 It does not work, and I don't know how it was supposed to work: it
4018 seems to be looking for sources in the build tree. I just moved
4019 it at a better place, fixing it is still required.
4021 * src/local.mk (echo): Remove.
4022 (sc_tight_scope): Move to...
4025 2008-11-15 Akim Demaille <demaille@gostai.com>
4028 * src/parse-gram.h, src/parse-gram.h: Regen.
4030 2008-11-15 Akim Demaille <demaille@gostai.com>
4032 Remove src/Makefile.am.
4033 * src/Makefile.am: Rename as...
4034 * src/local.mk: this.
4035 Prefix all the paths with src/.
4036 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
4037 (AM_CPPFLAGS): Find find in builddir/src.
4038 (YACC): Move the flags into...
4040 * maint.mk (sc_tight_scope): Disable.
4041 It used to bounce to the version in src/Makefile.am which is now
4042 part of this very Makefile.
4043 * Makefile.am, configure.ac: Adjust.
4044 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
4045 include "..." to find files "here": we are no longer in src/, so
4046 qualify the includes with src/.
4047 * doc/Makefile.am (PREPATH): No longer include the top_builddir
4049 (.x.1): Adjust to be able to create src/foo from the top level
4050 Makefile, instead of going bounce to src/Makefile the creation of
4053 2008-11-15 Akim Demaille <demaille@gostai.com>
4055 Remove useless variable.
4056 * doc/Makefile.am (srcsrcdir): Remove.
4058 2008-11-15 Akim Demaille <demaille@gostai.com>
4060 Remove data/Makefile.am.
4061 * data/Makefile.am: Rename as...
4062 * data/local.mk: this.
4064 * Makefile.am, configure.ac: Adjust.
4066 2008-11-15 Akim Demaille <demaille@gostai.com>
4068 Remove etc/Makefile.am.
4069 * etc/Makefile.am: Rename as...
4070 * etc/local.mk: this.
4072 * Makefile.am, configure.ac: Adjust.
4074 2008-11-15 Akim Demaille <demaille@gostai.com>
4076 Remove examples/local.mk.
4077 examples/calc++/Makefile.am might be interesting to keep as is, since
4078 it is an example in itself.
4080 * examples/Makefile.am: Rename as...
4081 * examples/local.mk: this.
4083 * Makefile.am, configure.ac: Adjust.
4085 2008-11-15 Akim Demaille <demaille@gostai.com>
4087 Remove build-aux/Makefile.am.
4088 Recursive Makefiles are really way too slow, let's get rid of some of
4091 * build-aux/Makefile.am: Rename as...
4092 * build-aux/local.mk: this.
4094 * Makefile.am, configure.ac: Adjust.
4096 2008-11-15 Akim Demaille <demaille@gostai.com>
4098 Provide convenience constructors for locations and positions.
4099 * data/location.cc (position::position): Accept file, line and
4100 column as arguments with default values.
4101 Always qualify initial line and column literals as unsigned.
4102 (location::location): Provide convenience constructors.
4104 2008-11-15 Akim Demaille <demaille@gostai.com>
4106 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
4108 Using template buys us nothing, and makes it uselessly complex to
4109 construct a symbol. Besides, it could not be generalized to other
4110 languages, while make_FOO would work in C/Java etc.
4112 * data/lalr1.cc (b4_symbol_): New.
4113 (b4_symbol): Use it.
4114 (b4_symbol_constructor_declaration_)
4115 (b4_symbol_constructor_definition_): Instead of generating
4116 specializations of an overloaded template function, just generate
4117 several functions whose names are forged from the token names
4118 without the token.prefix.
4119 (b4_symbol_constructor_declarations): Generate them for all the
4120 symbols, not just by class of symbol type, now that instead of
4121 specializing a function template by the token, we generate a
4122 function named after the token.
4123 (b4_symbol_constructor_specialization_)
4124 (b4_symbol_constructor_specializations): Remove.
4125 * etc/bench.pl.in: Adjust to this new API.
4127 2008-11-13 Akim Demaille <demaille@gostai.com>
4129 %define token.prefix.
4130 Provide a means to add a prefix to the name of the tokens as
4131 output in the generated files. Because of name clashes, it is
4132 good to have such a prefix such as TOK_ that protects from names
4133 such as EOF, FILE etc. But it clutters the grammar itself.
4135 * data/bison.m4 (token.prefix): Empty by default.
4136 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
4137 * data/lalr1.cc (b4_symbol): Ditto.
4139 2008-11-13 Akim Demaille <demaille@gostai.com>
4141 Compute at M4 time some of the subtractions.
4142 * data/lalr1.cc (b4_subtract): New.
4143 (b4_rhs_data): Use it.
4145 2008-11-13 Akim Demaille <demaille@gostai.com>
4148 This allows the user to get the type of a token returned by yylex.
4150 * data/lalr1.cc (symbol::token): New.
4151 (yytoknum_): Define when %define lex_symbol, independently of
4153 (yytoken_number_): Move into...
4154 (symbol::token): here, since that's the only use.
4155 The other one is YYPRINT which was not officially supported
4156 by lalr1.cc, and anyway it did not work since YYPRINT uses this
4157 array under a different name (yytoknum).
4159 2008-11-13 Akim Demaille <demaille@gostai.com>
4162 * TODO (YYERRCODE): Mention the case of $undef.
4164 2008-11-13 Akim Demaille <demaille@gostai.com>
4167 * TODO (YYPRINT): New.
4169 2008-11-13 Akim Demaille <demaille@gostai.com>
4172 * data/lalr1.cc, data/yacc.c: Fix the description of the
4173 yytranslate and yytoknum tables.
4175 2008-11-13 Akim Demaille <demaille@gostai.com>
4177 Define make_symbol in the header.
4178 To reach good performances these functions should be inlined (yet
4179 this is to measure precisely). To this end they must be available
4182 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
4183 location_type with the class name.
4184 Since will now be output in the header, declare "inline".
4185 No longer use b4_symbol_constructor_specializations, but
4186 b4_symbol_constructor_definitions in the header.
4187 Don't call it in the *.cc file.
4189 2008-11-13 Akim Demaille <demaille@gostai.com>
4191 Define yytranslate in the header for lex_symbol.
4192 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
4193 into the header file when using %define lex_symbol.
4194 (yytranslate_): Declare inline.
4196 2008-11-13 Akim Demaille <demaille@gostai.com>
4198 Define the constructors of symbol_type in
4199 b4_symbol_constructor_definitions.
4200 The constructors are called by the make_symbol functions, which a
4201 forthcoming patch will move elsewhere. Hence the interest of
4202 putting them together.
4204 The stack_symbol_type does not need to be moved, it is used only
4207 * data/lalr1.cc: Move symbol_type and symbol_base_type
4208 constructors into...
4209 (b4_symbol_constructor_definitions): here.
4212 2008-11-13 Akim Demaille <demaille@gostai.com>
4214 Make it easier to move the definition of yytranslate_.
4215 Forthcoming changes will make it possible to use yytranslate_
4216 from outside the parser implementation file.
4218 * data/lalr1.cc (b4_yytranslate_definition): New.
4221 2008-11-13 Akim Demaille <demaille@gostai.com>
4223 Remove useless class specification.
4224 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
4225 to refer to the class name to use a type defined by the class for
4226 arguments of member functions.
4228 2008-11-13 Akim Demaille <demaille@gostai.com>
4230 Finer input type for yytranslate.
4231 This patch is debatable: the tradition expects yylex to return an int
4232 which happens to correspond to token_number (which is an enum). This
4233 allows for instance to return characters (such as '*' etc.). But this
4234 goes against the stronger typing I am trying to have with the new
4235 lex interface which return a symbol_type. So in this case, feed
4236 yytranslate_ with a token_type.
4238 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
4239 expect a token_type.
4241 2008-11-13 Akim Demaille <demaille@gostai.com>
4243 Honor lex-params in %define lex_symbol mode.
4244 * data/lalr1.cc: Use b4_lex_param.
4246 2008-11-13 Akim Demaille <demaille@gostai.com>
4249 * src/output.c (symbol_definitions_output): Rename symbol
4250 attributes type_name and has_type_name as type and has_type.
4251 * data/lalr1.cc: Adjust uses.
4253 2008-11-13 Akim Demaille <demaille@gostai.com>
4255 Use b4_type_names for the union type.
4256 The union used to compute the size of the variant used to iterate
4257 over the type of all the symbols, with a lot of redundancy. Now
4258 iterate over the lists of symbols having the same type-name.
4260 * data/lalr1.cc (b4_char_sizeof_): New.
4261 (b4_char_sizeof): Use it.
4262 Adjust to be called with a list of numbers instead of a single
4264 Adjust its caller for new-line issues.
4266 2008-11-13 Akim Demaille <demaille@gostai.com>
4268 Define the "identifier" of a symbol.
4269 Symbols may have several string representations, for instance if
4270 they have an alias. What I call its "id" is a string that can be
4271 used as an identifier. May not exist.
4273 Currently the symbols which have the "tag_is_id" flag set are
4274 those that don't have an alias. Look harder for the id.
4276 * src/output.c (is_identifier): Move to...
4277 * src/symtab.c (is_identifier): here.
4278 * src/symtab.h, src/symtab.c (symbol_id_get): New.
4279 * src/output.c (symbol_definitions_output): Use it to define "id"
4281 Remove the definition of "tag_is_id".
4282 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
4283 "tag_is_id" were used to produce code.
4284 We still use "tag" for documentation.
4286 2008-11-11 Akim Demaille <demaille@gostai.com>
4288 Locations are no longer required by lalr1.cc.
4289 * data/lalr1.cc (_b4_args, b4_args): New.
4290 Adjust all uses of locations to make them optional.
4291 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
4292 (AT_CHECK_NAMESPACE): Check the use of locations.
4293 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
4294 without locations with lalr1.cc.
4296 * tests/output.at: Check lalr1.cc with and without location
4298 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
4299 Don't use locations.
4301 2008-11-11 Akim Demaille <demaille@gostai.com>
4304 * tests/local.at (AT_FULL_COMPILE): New.
4305 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
4307 2008-11-11 Akim Demaille <demaille@gostai.com>
4309 Support parens in calc++.
4310 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
4311 * examples/calc++/test (run): Check the expected output.
4315 2008-11-11 Akim Demaille <demaille@gostai.com>
4317 Simplify lalr1.cc since %defines is mandatory.
4318 * data/lalr1.cc: Remove useless calls to b4_defines_if.
4320 2008-11-11 Akim Demaille <demaille@gostai.com>
4323 * TODO (yysyntax_error): New item.
4325 2008-11-11 Akim Demaille <demaille@gostai.com>
4328 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
4331 2008-11-11 Akim Demaille <demaille@gostai.com>
4333 Support i18n of the parse error messages.
4334 * TODO (lalr1.cc/I18n): Remove.
4335 * data/lalr1.cc (yysyntax_error_): Support the translation of the
4336 error messages, as done in yacc.c.
4337 Stay within the yy* pseudo namespace.
4339 2008-11-11 Akim Demaille <demaille@gostai.com>
4342 * TODO (single stack, yysyntax_error): New.
4344 2008-11-11 Akim Demaille <demaille@gostai.com>
4346 Make it possible to return a symbol_type from yylex.
4347 * data/lalr1.cc (b4_lex_symbol_if): New.
4348 (parse): When lex_symbol is defined, expected yylex to return the
4350 * etc/bench.pl.in (generate_grammar_list): Extend to support this
4352 (bench_variant_parser): Exercise it.
4354 2008-11-11 Akim Demaille <demaille@gostai.com>
4356 Remove useless bench case.
4357 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
4360 2008-11-11 Akim Demaille <demaille@gostai.com>
4362 Improve display of directives.
4363 * etc/bench.pl.in (parse_term): Don't add useless eol.
4365 2008-11-11 Akim Demaille <demaille@gostai.com>
4367 Use string_cast in the bench.
4368 * etc/bench.pl.in (generate_grammar_list): Define and use
4371 2008-11-11 Akim Demaille <demaille@gostai.com>
4373 Replace yychar with a Boolean.
4374 * data/lalr1.cc (parse::yychar): Replace by...
4375 (parse::yyempty): this.
4377 2008-11-11 Akim Demaille <demaille@gostai.com>
4382 2008-11-11 Akim Demaille <demaille@gostai.com>
4384 Let yytranslate handle the eof case.
4385 * data/lalr1.cc (yytranslate_): Handle the EOF case.
4387 No longer expect yychar to be equal to yyeof_, rather, test the
4388 lookahead's (translated) kind.
4390 2008-11-11 Akim Demaille <demaille@gostai.com>
4392 yychar cannot be empty in yyerrlab.
4393 * TODO (yychar == yyempty_): New.
4394 * data/lalr1.cc: Remove the handling of this case.
4395 This eases forthcoming changes related to yychar and yytranslate.
4397 2008-11-11 Akim Demaille <demaille@gostai.com>
4399 Bench: syntactic sugar for %define/#define.
4400 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
4401 (&bench_push_parser, bench_variant_parser): Use this feature.
4405 2008-11-11 Akim Demaille <demaille@gostai.com>
4407 Less memory pressure on the "list" bench.
4408 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
4409 the values, to limit memory pressure.
4411 2008-11-11 Akim Demaille <demaille@gostai.com>
4413 Introduce make_symbol.
4414 make_symbol provides a means to construct a full symbol (kind,
4415 value, location) in a single shot. It is meant to be a Symbol
4416 constructor, parameterized by the symbol kind so that overloading
4417 would prevent incorrect kind/value pairs. Unfortunately
4418 parameterized constructors do not work well in C++ (unless the
4419 parameter also appears as an argument, which is not acceptable),
4420 hence the use of a function instead of a constructor.
4422 * data/lalr1.cc (b4_symbol_constructor_declaration_)
4423 (b4_symbol_constructor_declarations)
4424 (b4_symbol_constructor_specialization_)
4425 (b4_symbol_constructor_specializations)
4426 (b4_symbol_constructor_definition_)
4427 (b4_symbol_constructor_definitions): New.
4428 Use them where appropriate to generate declaration, declaration of
4429 the specializations, and implementations of the templated
4430 overloaded function "make_symbol".
4431 (variant::variant): Always define a default ctor.
4432 Also provide a copy ctor.
4433 (symbol_base_type, symbol_type): New ctor overloads for value-less
4435 (symbol_type): Now public, so that functions such as yylex can use
4438 2008-11-11 Akim Demaille <demaille@gostai.com>
4440 Inform m4 whether a tag is a valid id.
4441 * src/output.c (is_identifier): New.
4442 (symbol_definitions_output): Use it to define tag_is_id.
4443 But maybe this should be done at m4 level?
4445 2008-11-11 Akim Demaille <demaille@gostai.com>
4447 Test 214 was failing: it greps with a pattern containing [ ]*
4448 which obviously meant to catch spaces and tabs, but contained only
4449 spaces. Tabulations in sources are a nuisance, so to simplify the
4450 matter, get rid of all the tabulations in the Java sources. The
4451 other skeletons will be treated equally later.
4453 * data/java.m4, data/lalr1.java: Untabify.
4454 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
4455 tabulations are no longer generated.
4457 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
4459 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
4460 * configure.ac: Adjust usage.
4461 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4462 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4463 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
4465 2008-11-10 Di-an Jan <dianj@freeshell.org>
4467 Workaround Java's ``code too large'' problem for parser tables
4468 in most cases, by using one function per initialization.
4469 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
4470 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
4471 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
4472 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
4473 (yytname_): Use b4_typed_parser_table.
4474 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
4475 ``code too large'' error.
4477 2008-11-10 Di-an Jan <dianj@freeshell.org>
4479 * NEWS: Document them.
4481 General Java skeleton improvements.
4482 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
4483 using gcj < 4.3 in the testsuite, according to comments in
4484 gnulib/m4/javacomp.m4.
4485 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
4486 location_type, position_type): Remove extraneous brackets from
4487 b4_percent_define_default.
4488 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
4489 m4_define and m4_define_default.
4490 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
4491 which marks the end of user code with appropriate syncline, like all
4492 the other skeletons.
4493 (b4_user_post_prologue): Add. Don't silently drop.
4495 (parse): Inline yylex.
4496 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
4497 (%{...%}): Fix typo of %code imports.
4498 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
4500 Support annotations on parser class with %define annotations.
4501 * data/lalr1.java (annotations): Add to parser class modifier.
4502 * doc/bison.texinfo (Java Parser Interface): Document
4503 %define annotations.
4504 (Java Declarations Summary): Document %define annotations.
4505 * tests/java.at (Java parser class modifiers): Test annotations.
4507 Do not generate code for %error-verbose unless requested.
4508 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
4509 Make private. Make conditional on %error-verbose.
4510 (getErrorVerbose, setErrorVerbose): New.
4511 (yytnamerr_): Make conditional on %error-verbose.
4512 (yysyntax_error): Make some code conditional on %error-verbose.
4513 * doc/bison.texinfo (Java Bison Interface): Remove the parts
4514 about %error-verbose having no effect.
4515 (getErrorVerbose, setErrorVerbose): Document.
4517 Move constants for token names to Lexer interface.
4518 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
4519 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
4520 (parse): Qualify EOF to Lexer.EOF.
4521 * doc/bison.texinfo (Java Parser Interface): Move documentation of
4522 EOF and token names to Java Lexer Interface.
4523 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
4525 Make yyerror public.
4526 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
4527 (yyerror): Change to public. Add Javadoc comments. Use longer
4528 parameter names. Make the body rather than the declarator
4529 conditional on %locations.
4530 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
4532 Allow user to add code to the constructor with %code init.
4533 * data/java.m4 (b4_init_throws): New, for %define init_throws.
4534 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
4535 Add %code init to the front of the constructor body.
4536 * doc/bison.texinfo (YYParser.YYParser): Document %code init
4537 and %define init_throws.
4538 (Java Declarations Summary): Document %code init and
4539 %define init_throws.
4540 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
4541 (Java constructor init and init_throws): Add tests.
4543 2008-11-10 Akim Demaille <demaille@gostai.com>
4546 * TODO (-D): is implemented.
4547 (associativity): Same precedence must have the same associativity.
4548 For instance, how can a * b / c be parsed if * is %left and / is
4550 (YYERRORCODE, YYFAIL, YYBACKUP): New.
4552 2008-11-10 Akim Demaille <demaille@gostai.com>
4556 2008-11-10 Akim Demaille <demaille@gostai.com>
4558 More information about the symbols.
4559 * src/output.c (type_names_output): Document all the symbols,
4560 including those that don't have a type-name.
4561 (symbol_definitions_output): Define "is_token" and
4563 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
4564 type-name, now that they are defined too in b4_type_names.
4566 2008-11-10 Akim Demaille <demaille@gostai.com>
4570 2008-11-10 Akim Demaille <demaille@gostai.com>
4572 Make parser::yytranslate static.
4573 Small speedup (1%) on the list grammar. And makes yytranslate_
4574 available in non member functions.
4576 * data/lalr1.cc (yytranslate_): Does not need to be a instance
4579 2008-11-10 Akim Demaille <demaille@gostai.com>
4581 Avoid trailing spaces.
4582 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
4583 * data/lalr1.cc: Don't indent before rule and symbol actions, as
4584 they can be empty, and anyway this incorrectly indents the first
4587 2008-11-10 Akim Demaille <demaille@gostai.com>
4591 2008-11-10 Akim Demaille <demaille@gostai.com>
4593 Use "enum" for integral constants.
4594 This is just nicer to read, I observed no speedup.
4596 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
4597 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
4598 (yyuser_token_number_max_, yyundef_token_): Move into...
4599 (yytranslate_): here.
4601 2008-11-10 Akim Demaille <demaille@gostai.com>
4603 Shortcuts in bench directives.
4604 * etc/bench.pl.in (parse_dirs): New.
4606 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
4607 Create the benches in "benches/".
4609 2008-11-10 Akim Demaille <demaille@gostai.com>
4612 * data/lalr1.cc: here.
4614 2008-11-10 Akim Demaille <demaille@gostai.com>
4616 Adjust verbose message to using emacs.
4617 * etc/bench.pl.in: Inform compilation-mode when we change the
4619 (generate_grammar_list): Recognize %define "variant" in addition
4622 2008-11-10 Akim Demaille <demaille@gostai.com>
4624 Classify symbols by type-name.
4625 * src/uniqstr.h (UNIQSTR_CMP): New.
4626 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
4627 (type_names_output): New.
4628 (muscles_output): Use it.
4629 * data/lalr1.cc (b4_symbol_action_): Remove.
4630 (b4_symbol_case_, b4_type_action_): New.
4631 Adjust uses of b4_symbol_action_ to use b4_type_action_.
4633 2008-11-10 Akim Demaille <demaille@gostai.com>
4635 Change the handling of the symbols in the skeletons.
4636 Before we were using tables which lines were the symbols and which
4637 columns were things like number, tag, type-name etc. It is was
4638 difficult to extend: each time a column was added, all the numbers had
4639 to be updated (you asked for colon $2, not for "tag"). Also, it was
4640 hard to filter these tables when only a subset of the symbols (say the
4641 tokens, or the nterms, or the tokens that have and external number
4642 *and* a type-name) was of interest.
4644 Now instead of monolithic tables, we define one macro per cell. For
4645 instance "b4_symbol(0, tag)" is a macro name which contents is
4646 self-decriptive. The macro "b4_symbol" provides easier access to
4649 * src/output.c (type_names_output): Remove.
4650 (symbol_numbers_output, symbol_definitions_output): New.
4651 (muscles_output): Call them.
4652 (prepare_symbols): Define b4_symbols_number.
4654 2008-11-10 Akim Demaille <demaille@gostai.com>
4657 * src/getargs.h, src/getargs.c (trace_muscle): New.
4658 (trace_types, trace_args): Support it.
4659 * src/output.c (output_skeleton): Use it.
4661 2008-11-10 Akim Demaille <demaille@gostai.com>
4664 * src/output.c (muscles_output): New, extracted from...
4665 (output_skeleton): here.
4668 2008-11-10 Akim Demaille <demaille@gostai.com>
4672 2008-11-10 Akim Demaille <demaille@gostai.com>
4674 Update the variant example.
4675 * examples/variant.yy: Formatting changes.
4678 2008-11-10 Akim Demaille <demaille@gostai.com>
4680 Support constructor with an argument.
4681 This improves the "list" bench by 2%.
4683 * data/lalr1.cc (variant::build): Add an overloaded version with
4685 * tests/c++.at (AT_CHECK_VARIANT): Check it.
4687 2008-11-10 Akim Demaille <demaille@gostai.com>
4690 * tests/c++.at (AT_CHECK_VARIANTS): New.
4691 Use it with and without %define assert.
4693 2008-11-10 Akim Demaille <demaille@gostai.com>
4695 Add %precedence support.
4696 Unfortunately it is not possible to reuse the %prec directive. This
4697 is because to please POSIX, we do not require to end the rules with a
4698 semicolon. As a result,
4702 is ambiguous: either a rule which precedence is that of baz, or a rule,
4703 and then a declaration of the precedence of the token baz.
4705 * doc/bison.texinfo: Document %precedence.
4706 (Precedence Only): New.
4707 * src/assoc.h, src/assoc.c (precedence_assoc): New.
4708 * src/conflicts.c (resolve_sr_conflict): Support it.
4709 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
4711 * tests/calc.at: Use %precedence for NEG.
4712 * tests/conflicts.at (%precedence does not suffice)
4713 (%precedence suffices): New tests.
4715 2008-11-09 Akim Demaille <demaille@gostai.com>
4717 Make benches in a sub dirs.
4718 * etc/bench.pl.in ($dir): New.
4720 Check the use of constructors with an argument.
4721 (bench_variant_parser): Fix.
4723 2008-11-09 Akim Demaille <demaille@gostai.com>
4727 2008-11-09 Akim Demaille <demaille@gostai.com>
4731 2008-11-09 Akim Demaille <demaille@gostai.com>
4733 Require the generation of parse-gram.output.
4734 * src/Makefile.am (YACC): Pass --report=all.
4736 2008-11-09 Akim Demaille <demaille@gostai.com>
4740 2008-11-09 Akim Demaille <demaille@gostai.com>
4743 * TODO: Remove obsolete items.
4746 2008-11-09 Akim Demaille <demaille@gostai.com>
4749 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
4750 (@token, $grammar, $bench): New.
4751 (generate_grammar_variant): Rename as...
4752 (generate_grammar_list): this.
4753 (generate_grammar): Adjust.
4754 (bench_grammar): Rename as...
4756 Use it in the various bench-marking routines.
4757 (-b, -g): New options.
4759 2008-11-09 Akim Demaille <demaille@gostai.com>
4761 Use a static hierarchy for symbols in the C++ parser.
4762 * data/lalr1.cc (symbol_base_type, symbol_type)
4763 (stack_symbol_type): Make it a static hierarchy.
4764 Adjust dependencies.
4766 2008-11-09 Akim Demaille <demaille@gostai.com>
4768 bench.pl -d, --directive.
4769 * etc/bench.pl.in (@directive): New.
4770 (&bench_grammar): Use it.
4771 (&bench_list_grammar): New, to provide access to the "variant"
4774 (getopts): Support -d, --directive.
4776 2008-11-09 Akim Demaille <demaille@gostai.com>
4778 Use inline for small operations.
4779 * data/lalr1.cc (symbol_base_type, symbol_type)
4780 (stack_symbol_type): Declare constructor and other operations as
4782 (yy_destroy_): Inline.
4784 2008-11-09 Akim Demaille <demaille@gostai.com>
4786 Introduce a hierarchy for symbols.
4787 * data/lalr1.cc (symbol_base_type, symbol_type): New.
4788 (data_type): Rename as...
4789 (stack_symbol_type): this.
4790 Derive from symbol_base_type.
4791 (yy_symbol_value_print_): Merge into...
4792 (yy_symbol_print_): this.
4795 (yydestruct_): Rename as...
4796 (yy_destroy_): this.
4797 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
4798 (parser::parse): yyla is now of symbol_type.
4799 Use its type member instead of yytoken.
4801 2008-11-09 Akim Demaille <demaille@gostai.com>
4803 Rename data_type and stack_symbol_type.
4804 * data/lalr1.cc (data_type): Rename as...
4805 (stack_symbol_type): this.
4807 2008-11-09 Akim Demaille <demaille@gostai.com>
4809 Handle semantic value and location together.
4810 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
4811 yydata.value and yydata.location.
4812 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
4813 (YY_SYMBOL_PRINT): Now take semantic value and location as a
4816 (yydestruct_): New overload for a stack symbol.
4818 2008-11-09 Akim Demaille <demaille@gostai.com>
4820 Push a complete symbol, not connected parts.
4821 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
4822 state, value and location.
4825 2008-11-09 Akim Demaille <demaille@gostai.com>
4827 Agregate yylval and yylloc.
4828 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
4829 (parser::yyla): this.
4831 2008-11-09 Akim Demaille <demaille@gostai.com>
4833 Rely on the state stack to display reduction traces.
4834 To display rhs symbols before a reduction, we used information
4835 about the rule reduced, which required the tables yyrhs and
4836 yyprhs. Now use rely only on the state stack to get the same
4839 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
4841 (parser::yyrhs_, parser::yyprhs_): Remove.
4842 (parser::yy_reduce_print_): Use the state stack.
4844 2008-11-09 Akim Demaille <demaille@gostai.com>
4846 Fuse yyval and yyloc into yylhs.
4847 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
4849 (parse): Replace yyval and yyloc with yylhs.value and
4851 After a user action, compute yylhs.state earlier.
4852 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
4855 2008-11-09 Di-an Jan <dianj@freeshell.org>
4857 Remove unused variable.
4858 * src/output.c (type_names_output): Remove unused variable sep.
4860 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
4862 Change tests/output.at quoting.
4863 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
4864 expanding arguments.
4866 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4868 Don't add a semicolon to actions for %skeleton or %language.
4869 It breaks Java test cases as reported by Akim Demaille.
4870 * src/scan-code.l: Implement.
4872 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4874 Clean up %skeleton and %language priority implementation.
4875 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
4876 remove static qualifier because others will soon need to see it.
4877 (language_prio): Likewise.
4878 (getargs): Use command_line_prio rather than 0.
4879 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
4881 (skeleton_prio): Extern it.
4882 (language_prio): Extern it.
4883 * src/parse-gram.y: Use grammar_prio rather than 1.
4885 2008-11-07 Akim Demaille <demaille@gostai.com>
4887 Moving push traces into yypush_.
4888 * data/lalr1.cc (yypush_): Now takes a optional trace message.
4891 2008-11-07 Akim Demaille <demaille@gostai.com>
4893 The single-stack C++ parser is now the standard one.
4894 * data/lalr1.cc: Rename as...
4895 * data/lalr1-split.cc: this.
4896 * data/lalr1-fusion.cc: Rename as...
4897 * data/lalr1.cc: this.
4898 * etc/bench.pl.in: Adjust.
4900 2008-11-07 Akim Demaille <demaille@gostai.com>
4902 Avoid empty-if warnings.
4903 Reported by Quentin Hocquet.
4905 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
4906 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
4908 2008-11-07 Akim Demaille <demaille@gostai.com>
4910 Pass command line location to skeleton_arg and language_argmatch.
4911 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
4912 The location argument is now mandatory.
4913 Adjust all dependencies.
4914 (getargs): Use command_line_location.
4916 2008-11-07 Akim Demaille <demaille@gostai.com>
4919 * src/getargs.c (usage): Document -D.
4920 Fix help string for --locations.
4921 (command_line_location): New.
4922 (short_options, long_options, getargs): Support -D, --define.
4923 (getargs): Move -d support at the right place.
4924 * doc/bison.texinfo (Bison Options): Update.
4925 * tests/input.at (%define, --define): New.
4927 2008-11-07 Akim Demaille <demaille@gostai.com>
4929 Initialize the muscle table before parsing the command line.
4930 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
4931 (getargs): Define file_name.
4932 * src/main.c (main): Initialize muscle_tab before calling
4934 * src/muscle_tab.c (muscle_init): No longer define file_name, as
4935 its value is not available yet.
4937 2008-11-07 Akim Demaille <demaille@gostai.com>
4939 Locations without columns for command line arguments.
4940 * src/location.c (location_print): Don't display negative columns.
4941 * src/location.h: Document this.
4943 2008-11-07 Akim Demaille <demaille@gostai.com>
4946 * src/getargs.c (usage): Fix help string for -W.
4948 2008-11-07 Akim Demaille <demaille@gostai.com>
4950 Handle more general types of option arguments.
4951 * build-aux/cross-options.pl: The argument ends at the first
4952 space, not the first non-symbol character.
4953 Use @var for each word appearing the argument description.
4955 2008-11-07 Akim Demaille <demaille@gostai.com>
4957 Destroy the variants that remain on the stack in case of error.
4958 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
4960 Display the value only if yymsg is nonnull.
4961 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
4963 2008-11-07 Akim Demaille <demaille@gostai.com>
4965 Add "%define assert" to variants.
4966 This is used to help the user catch cases where some value gets
4967 ovewritten by a new one. This should not happen, as this will
4970 Unfortunately this uncovered a bug in the C++ parser itself: the
4971 lookahead value was not destroyed between two calls to yylex. For
4972 instance if the previous lookahead was a std::string, and then an int,
4973 then the value of the std::string was correctly taken (i.e., the
4974 lookahead was now an empty string), but std::string structure itself
4977 This is now done in variant::build(other&) (which is used to take the
4978 value of the lookahead): other is not only stolen from its value, it
4979 is also destroyed. This incurs a new performance penalty of a few
4980 percent, and union becomes faster again.
4982 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
4983 (b4_variant_if): New.
4984 (variant::built): New.
4985 Use it whereever the status of the variant changes.
4986 * etc/bench.pl.in: Check the penalty of %define assert.
4988 2008-11-07 Akim Demaille <demaille@gostai.com>
4990 Use "%define variant" in bench.pl.
4991 * etc/bench.pl.in: No longer use the pseudo directive %variants,
4992 just use %define variants.
4994 2008-11-07 Akim Demaille <demaille@gostai.com>
4997 * src/parse-gram.h, src/parse-gram.c: Regen.
4999 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
5001 Fix user actions without a trailing semicolon.
5002 Reported by Sergei Steshenko at
5003 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
5004 * THANKS (Sergei Steshenko): Add.
5005 * src/scan-code.l (SC_RULE_ACTION): Fix it.
5006 * tests/regression.at (Fix user actions without a trailing semicolon):
5009 2008-11-04 Akim Demaille <demaille@gostai.com>
5011 Use b4_copyright_years.
5012 * data/yacc.c (b4_copyright_years): New.
5013 Fix its value according to the comments in the file.
5014 Use it and undefine it.
5016 2008-11-04 Akim Demaille <demaille@gostai.com>
5019 * data/lalr1-fusion.cc, src/parse-gram.y: here.
5021 2008-11-04 Akim Demaille <demaille@gostai.com>
5024 * data/lalr1-fusion.cc: here.
5026 2008-11-04 Akim Demaille <demaille@gostai.com>
5028 Use strict on bench.pl.
5029 * etc/bench.pl.in (&run, &generate_grammar): New.
5030 Rename the grammar generating functions for consistency.
5031 Change the interface so that the list of benches to run is passed
5032 as (optionless) arguments.
5033 (&compile): Use &run.
5035 2008-11-04 Akim Demaille <demaille@gostai.com>
5037 Remove spurious initial empty lines.
5038 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
5039 * data/yacc.c: End the @output lines with an @.
5041 2008-11-04 Akim Demaille <demaille@gostai.com>
5043 Improve the display of sizes.
5044 * etc/bench.p.in: Higher precision.
5045 Sort by decreasing size.
5047 2008-11-04 Akim Demaille <demaille@gostai.com>
5049 Don't memcpy C++ structures.
5050 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
5052 (variant::build): New overload for
5053 copy-construction-that-destroys.
5054 (variant::swap): New.
5055 (parser::yypush_): Use it in variant mode.
5057 2008-11-04 Akim Demaille <demaille@gostai.com>
5059 Better defaults for bench.pl.
5060 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
5062 Adjust &verbose uses.
5065 2008-11-04 Akim Demaille <demaille@gostai.com>
5067 Make variant.yy more complex.
5068 std::list cannot be copied via memcpy, they are more demanding than
5069 std::string. Use one std::list to strengthen the test.
5071 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
5073 Create a list of strings, instead of a single large string.
5075 2008-11-04 Akim Demaille <demaille@gostai.com>
5078 * etc/bench.pl.in (--bench, $bench): New.
5080 2008-11-04 Akim Demaille <demaille@gostai.com>
5083 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
5084 Define it after as().
5086 2008-11-04 Akim Demaille <demaille@gostai.com>
5089 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
5091 2008-11-04 Akim Demaille <demaille@gostai.com>
5093 Issue missing synclines after user actions.
5094 * data/c.m4 (b4_case): Issue synclines on the output file.
5096 2008-11-04 Akim Demaille <demaille@gostai.com>
5098 Remove trailing empty line.
5099 * data/lalr1-fusion.cc: Don't add an empty line after the user's
5102 2008-11-04 Akim Demaille <demaille@gostai.com>
5104 Fix output of copyright years.
5105 * data/bison.m4 (b4_copyright): Fix the indentation of the
5106 copyright year paragraph.
5107 Use b4_copyright_years when no years are given.
5108 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
5109 (b4_copyright_years): New.
5112 2008-11-04 Akim Demaille <demaille@gostai.com>
5114 Avoid the spurious initial empty line.
5115 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
5116 the end of @output request to suppress the empty line that
5119 2008-11-04 Akim Demaille <demaille@gostai.com>
5121 Remove parser::rhs_number_type.
5122 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
5123 (yyrhs_): Use b4_table_define.
5125 2008-11-04 Akim Demaille <demaille@gostai.com>
5128 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
5130 2008-11-04 Akim Demaille <demaille@gostai.com>
5132 Factor the declaration of the integer tables.
5133 * data/lalr1-fusion.cc (b4_table_define): New.
5136 2008-11-03 Akim Demaille <demaille@gostai.com>
5138 Fix indentation of tables in lalr1.cc
5139 * data/lalr1-fusion.cc: Fix the indentation.
5141 2008-11-03 Akim Demaille <demaille@gostai.com>
5143 Destroy the lhs symbols after reduction.
5144 * data/lalr1-fusion.cc (parse): After the user action, when in
5145 variant mode, destroy the lhs symbols.
5147 2008-11-03 Akim Demaille <demaille@gostai.com>
5149 Simplify yysyntax_error_ use.
5150 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
5151 type, but make it unnamed in the declaration when it is not used.
5153 2008-11-03 Akim Demaille <demaille@gostai.com>
5155 Let yy::variant::build return an lvalue.
5156 * data/lalr1-fusion.cc (variant::build): Return a reference to the
5159 2008-11-03 Akim Demaille <demaille@gostai.com>
5161 Define yy::variant only when needed.
5162 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
5165 2008-11-03 Akim Demaille <demaille@gostai.com>
5167 Bench the three-stack lalr1.cc.
5168 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
5171 2008-11-03 Akim Demaille <demaille@gostai.com>
5173 Fail on parse error in calc++.
5174 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
5176 * examples/calc++/test ($me, $number, $exit, run): New.
5177 Use them to propagate errors to the exit status.
5179 2008-11-03 Akim Demaille <demaille@gostai.com>
5181 Don't specify the skeleton twice in the example.
5182 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
5183 file does what is needed.
5185 2008-11-03 Akim Demaille <demaille@gostai.com>
5187 bench: Improve output.
5188 * etc/bench.pl.in (bench_grammar): Tune the printf format.
5190 2008-11-03 Akim Demaille <demaille@gostai.com>
5192 bench: check impact of %debug on variants.
5193 * etc/bench.pl.in (variant_grammar): Fix the computation of
5195 Generate a grammar file that can work with or without %debug.
5196 Do use the @directive.
5197 (bench_variant_parser): Check impact of %debug.
5198 (@directives): Rename all the occurrences to...
5199 (@directive): this, for consistency.
5201 2008-11-03 Akim Demaille <demaille@gostai.com>
5203 bench: report the size too.
5204 * etc/bench.pl.in ($iterations): Defaults to -3.
5205 (&bench_grammar): Require hireswallclock.
5206 Compute and display the size of the result.
5209 2008-11-03 Akim Demaille <demaille@gostai.com>
5211 bench: More use of the verbosity level.
5212 * etc/bench.pl.in ($verbose, &verbose): New.
5214 More POD documentation.
5216 2008-11-03 Akim Demaille <demaille@gostai.com>
5218 bench.pl: a command line interface
5219 * etc/bench.pl.in: More doc.
5220 Some fixes in the documentation.
5221 ($cflags, $iterations, &help, &getopt): New.
5223 (&variant_grammar): Let the number of stages be 10 times what is
5226 2008-11-03 Akim Demaille <demaille@gostai.com>
5228 Bench the use of Boost.Variants.
5229 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
5231 (&compile): Be ready to compile C++ parsers.
5232 (&bench_push_parser): Move debug information to the outermost
5234 * THANKS: Add Michiel De Wilde.
5236 2008-11-03 Akim Demaille <demaille@gostai.com>
5238 bench.pl: Pass directives as a list instead of as a string.
5239 * etc/bench.pl.in (&directives): New.
5240 (&triangular_grammar, &calc_grammar): Use it to format the Bison
5242 (&triangular_grammar): Do use the directives (were ignored).
5243 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
5246 2008-11-03 Akim Demaille <demaille@gostai.com>
5248 Improve genericity of bench.pl.
5249 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
5251 (&bench_push_parser): New.
5254 2008-11-03 Akim Demaille <demaille@gostai.com>
5256 Add documentation to bench.pl.
5257 * etc/bench.pl.in: Comment changes.
5259 2008-11-03 Akim Demaille <demaille@gostai.com>
5261 Fuse the three stacks into a single one.
5263 In order to make it easy to perform benchmarks to ensure that
5264 there are no performance loss, lalr1.cc is forked into
5265 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
5268 Meanwhile, to make sure that lalr1-fusion.cc is correctly
5269 exercized by the test suite, the user must install a symbolic link
5270 from lalr1.cc to it.
5272 Instead of having three stacks (state, value, location), use a
5273 stack of triples. This considerably simplifies the code (and it
5274 will be easier not to require locations as currently does the C++
5275 parser), and also gives a 10% speedup according to
5276 etc/bench (probably mainly since memory allocation is done once
5277 instead of three times).
5279 Another motivation is to make it easier to destruct properly
5280 semantic values: now that they are bound to their state (hence
5281 symbol type) it will be easier to call the appropriate destructor.
5283 These changes should probably benefit the C parser too.
5285 * data/lalr1.cc: Copy as...
5286 * data/lalr1-fusion.cc: this new file.
5287 (b4_rhs_value, b4_rhs_location): New definitions overriding those
5289 (state_stack_type, semantic_stack_type, location_stack_type)
5290 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
5291 (data_type, stack_type, yystack_): New.
5292 (YYLLOC_DEFAULT, yypush_): Adjust.
5293 (yyerror_range): Now based on data_type, not location_type.
5295 2008-11-03 Akim Demaille <demaille@gostai.com>
5297 Push the state, value, and location at the same time.
5298 This is needed to prepare a forthcoming patch that fuses the three
5301 * data/lalr1.cc (parser::yypush_): New.
5302 (parser::yynewstate): Change the semantics: instead of arriving to
5303 this label when value and location have been pushed, but yystate
5304 is to be pushed on the state stack, now the three of them must
5305 have been pushed before. yystate still must be the new state.
5306 This allows to use yypush_ everywhere instead of individual
5307 handling of the stacks.
5309 2008-11-03 Akim Demaille <demaille@gostai.com>
5311 Prefer references to pointers.
5312 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
5313 definition to use references instead of pointers.
5314 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
5315 Take the value and location as references.
5318 2008-11-03 Akim Demaille <demaille@gostai.com>
5320 stack::size instead of stack::height.
5321 * data/lalr1.cc (stack::height): Rename as...
5322 (stack::size): this.
5323 Fix the output type.
5326 2008-11-03 Akim Demaille <demaille@gostai.com>
5328 Use variants to support objects as semantic values.
5329 This patch was inspired by work by Michiel De Wilde. But he used
5330 Boost variants which (i) requires Boost on the user side, (ii) is
5331 slow, and (iii) has useless overhead (the parser knows the type of
5332 the semantic value there is no reason to duplicate this
5333 information as Boost.Variants do).
5335 This implementation reserves a buffer large enough to store the
5336 largest objects. yy::variant implements this buffer. It was
5337 implemented with Quentin Hocquet.
5339 * src/output.c (type_names_output): New.
5340 (output_skeleton): Invoke it.
5341 * data/c++.m4 (b4_variant_if): New.
5342 (b4_symbol_value): If needed, provide a definition for variants.
5343 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
5344 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
5345 (b4_char_sizeof, yy::variant): New.
5346 (parser::parse): If variants are requested, define
5347 parser::union_type, parser::variant, change the definition of
5348 semantic_type, construct $$ before running the user action instead
5349 of performing a default $$ = $1.
5350 * examples/variant.yy: New.
5351 Based on an example by Michiel De Wilde.
5353 2008-11-03 Akim Demaille <demaille@gostai.com>
5355 Parameterize the extraction of semantic values.
5356 To make future changes easier, no longer rely on ".TYPE" being the
5357 way to get a semantic value.
5359 * data/c.m4 (b4_symbol_value): New.
5361 * data/c++.m4, data/yacc.c: Use it.
5362 * data/glr.c: Use b4_symbol_value.
5366 2008-11-03 Akim Demaille <demaille@gostai.com>
5368 Prepare easier M4 changes.
5369 * data/lalr1.cc: Use escaped [] instead of literals to prepare
5372 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5374 Initiate further development.
5375 * NEWS: Create an empty section for new entries.
5376 * gnulib: Update submodule to HEAD.
5378 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5380 * NEWS: Version 2.4.
5382 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5384 Prepare for next release.
5385 * NEWS: Briefly mention changes since 2.3b.
5386 * README: Say GNU m4 1.4.6, which we've been requiring in release
5387 announcements already, not 1.4.3, which breaks the build.
5389 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5391 Say %language is experimental.
5392 We're thinking of extending it's effect on output file naming. See the
5394 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
5395 * NEWS: Say it's experimental.
5396 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
5397 recommend it over %skeleton for now.
5398 (Bison Options): Likewise.
5399 (C++ Bison Interface): Use %skeleton not %language.
5400 (Calc++ Parser): Use %skeleton not %language.
5401 * src/getargs.c (usage): Say it's experimental.
5403 2008-11-01 Di-an Jan <dianj@freeshell.org>
5404 Paolo Bonzini <bonzini@gnu.org>
5406 Support all Java parser class modifiers.
5407 * data/java.m4 (b4_percent_define_get3): New.
5408 (b4_final_if, b4_strictfp_if): New.
5409 * data/lalr1.java (final, strictfp, extends, implements): Support.
5410 * doc/bison.texinfo (final, strictfp, extends, implements): Add
5412 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
5413 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
5414 (AT_CHECK_JAVA_GREP): New.
5415 (Java parser class modifiers): New test.
5416 (Java parser class extends and implements): New test.
5418 Model exception propagation better with throws and lex_throws.
5419 * data/java.m4 (b4_list2): New.
5420 (throws): Change default.
5421 * data/lalr1.java (yyaction): Add throws.
5422 (parse): Add lex_throws in addition to throws.
5423 * doc/bison.texinfo (throws, lex_throws): Add documentation.
5424 * tests/java.at (Java throws specifications): New test.
5426 Improve documentation for Java parsers.
5427 * doc/bison.texinfo (Java Parsers): Add subsections.
5428 Don't quote first argument of %define.
5429 (Java Bison Interface): Document output files. Move documentation
5430 of parser class and merge into Java Parser Interface. Document
5431 features that error out. Document directives with no effect.
5432 Move note about Javadoc higher.
5433 (Java Semantic Values): Explicitly mention stype.
5434 Document that generic types cannot be used.
5435 (Java Location Values): Use @deftypeivar. Document constructors.
5436 Correct return value for toString.
5437 (Java Parser Interface): List undocumented constants/fields.
5438 Move documentation of fields added by %parse-param closer to list
5439 of members. Document that token names are added as fields.
5440 Document constructors accurately. Remove error method.
5441 (Java Scanner Interface): Move note on %pure-parser to Java Bison
5442 Interface. Describe %code lexer and yylex accutately.
5443 Remove documentation that does not match the code.
5444 (Java Action Features): New.
5445 (Java Differences): Add reference. Add item on semantic values.
5446 Add note about @{ ... @}. Clarify %% epilogue placement.
5447 (Java Declarations Summary): New.
5450 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
5451 (b4_remove_comma): Quote test argument.
5452 (b4_identification): Remove "bison" field.
5453 * tests/java.at (Java parser class and package names): New test.
5454 (Java %parse-param and %lex-param): New test.
5455 (Java stype, position_class and location_class): New test.
5457 2008-10-31 Di-an Jan <dianj@freeshell.org>
5459 * data/lalr1.jave: Update copyright years.
5460 (YYParser): Correct name of "generated from" file in Javadoc:
5461 use b4_file_name instead of @ofile@.
5462 (Location constructor): Correct Javadoc parameter name.
5463 (yylloc): Add missing opening m4 quote after b4_location_if.
5464 This removes a stray [ in the Javadoc of Lexer.getStartPos.
5465 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
5466 (YYParser constructor): Correct Javadoc parameter name.
5468 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
5470 Always put auxiliary code files in the same dir as other output files.
5471 * src/files.c (compute_file_name_parts): When the user specifies
5472 --output but not --file-prefix, extract the directory prefix from the
5473 file prefix not from the grammar file name. This affects the location
5474 of files like location.hh generated by the C++ skeleton. The includes
5475 in the other output files require this fix.
5476 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
5477 for expected output files.
5478 (Output files): Add a test for the above.
5480 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
5482 * gnulib: Update submodule to HEAD.
5484 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5486 Update copyright year.
5487 * src/files.c: Here.
5489 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
5491 Don't overwrite the input file.
5492 * src/files.c (output_file_name_check): Fatal error if using input file
5494 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
5496 (Conflicting output files): Add test.
5498 2008-10-28 Akim Demaille <demaille@gostai.com>
5501 * data/lalr1.cc: Formatting changes.
5503 2008-10-28 Akim Demaille <demaille@gostai.com>
5505 Don't define debugging functions when !YYDEBUG.
5506 * data/lalr1.cc (debug_stream, set_debug_stream)
5507 (debug_level_type, debug_level, set_debug_level): Don't
5508 declare them when YYDEBUG is not defined.
5509 The implementation are already YYDEBUG-aware.
5511 2008-10-28 Akim Demaille <demaille@gostai.com>
5513 Prefer "continue" for empty loop bodies.
5514 * etc/bench.pl.in: Use "continue" instead of {}.
5516 2008-10-28 Akim Demaille <demaille@gostai.com>
5518 Space and comments changes.
5519 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
5520 * data/c.m4, data/lalr1.cc: Space changes.
5522 2008-10-28 Akim Demaille <demaille@gostai.com>
5524 Make gnulib a submodule.
5526 * .gitmodules (gnulib): New.
5528 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5530 Fix yyerror_range for user-defined location type in C++. Reported by
5532 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
5533 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
5534 * THANKS (Georg Sauthoff): Add.
5536 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5538 Update several administrative files mainly to facilitate releasing.
5539 * HACKING (Administrivia): Make the git-merge-changelog notes more
5541 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
5542 (Release Procedure): Update for git and add numerous details that were
5544 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
5545 * maint.mk (announcement): Don't list bison as a bootstrap tool so
5546 that announcements don't claim we bootstrapped with whatever bison
5547 happened to be in PATH. Add flex as a bootstrap tool.
5548 * Makefile.maint: Remove, previously replaced by maint.mk.
5549 * Makefile.cfg: Remove, and migrate settings to...
5550 * cfg.mk: ... here for the sake of `make announcement'.
5551 * bootstrap.conf (gnulib_modules): Add announce-gen.
5552 * README: Say GNU Bison instead of just Bison. Suggested by Karl
5555 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
5557 Small but important bugfixes for the Java skeleton.
5558 * data/lalr1.java (yyerror): Change Location to b4_location_type.
5559 (yy_symbol_print): Call toString on yyvaluep.
5561 2008-08-29 Akim Demaille <demaille@gostai.com>
5563 Clarify UPDATED use.
5564 * doc/bison.texinfo: It refers to the last edition of this file,
5565 not to the release date of Bison.
5566 Reported by Joel E. Denny.
5568 2008-08-29 Akim Demaille <demaille@gostai.com>
5570 * README: Update FAQ pointer.
5571 Reported by Joel E. Denny.
5573 2008-08-27 Eric Blake <ebb9@byu.net>
5575 Resync m4sugar from autoconf.
5576 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
5577 (m4_init): Adjust to latest m4.git changes.
5578 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
5580 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
5581 (_m4_list_cmp): Reduce side effects.
5583 2008-08-27 Akim Demaille <demaille@gostai.com>
5585 Check yyerrok in calc.at.
5586 * tests/calc.at (calc.y): Use yyerrok on "( error )".
5587 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
5590 2008-08-27 Akim Demaille <demaille@gostai.com>
5592 Support yyerrok in lalr1.cc.
5593 YYBACKUP is still to import back into lalr1.cc.
5594 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
5596 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5598 For maintainer-check*, don't recompile for a $(VERSION) update.
5600 (_is-dist-target): Override the one in GNUmakefile.
5601 * Makefile.am (EXTRA_DIST): Add cfg.mk.
5603 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5605 Update for recent change to gnulib.
5606 * src/parse-gram.y: Don't include strverscmp.h. It comes from
5609 2008-08-15 Eric Blake <ebb9@byu.net>
5611 Remaining m4sugar merge from autoconf.
5612 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
5613 * data/m4sugar/foreach.m4: New file, copied from autoconf.
5614 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
5615 * src/output.c (output_skeleton): Tell m4 how to find it.
5617 Partial m4sugar merge from autoconf: m4_map.
5618 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
5619 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
5620 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
5621 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
5623 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
5625 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
5628 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
5630 Keep .version and PACKAGE_VERSION in sync.
5631 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
5632 dependency, and add comments justifying this in more detail. Discussed
5634 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
5636 2008-08-06 Eric Blake <ebb9@byu.net>
5638 Partial m4sugar merge from autoconf: m4_shiftn.
5639 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
5640 (m4_shift2, m4_shift3): New macros.
5641 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
5642 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
5643 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
5644 * data/java.m4 (b4_remove_comma): Likewise.
5646 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
5647 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
5648 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
5649 (m4_init): Consolidate wrapped text into single m4_wrap.
5650 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
5653 2008-08-05 Eric Blake <ebb9@byu.net>
5655 Partial m4sugar merge from autoconf: builtins, version.m4.
5656 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
5657 (m4_prepend): Remove, as it is unused and inherently quadratic,
5658 whereas m4_append is linear in newer m4.
5659 (m4_mkstemp): New builtin.
5660 (m4_symbols): Make rename conditional.
5661 (m4_version_prereq): Ensure fatal error if used in bison, which
5662 intentionally lacks version.m4.
5664 Fix comments in m4sugar.
5665 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
5667 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5669 Update for recent .gitignore fix in Gnulib.
5670 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
5671 anchored .gitignore entries.
5673 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5675 Set gnu or gnits strictness.
5676 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
5677 development and gnits strictness for releases. Based on Eric Blake's
5679 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
5681 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5683 * NEWS: Clarify documentation of %language.
5685 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5687 Support usage of git-merge-changelog.
5688 * .gitattributes: New.
5689 * HACKING: Document usage of git-merge-changelog.
5690 * bootstrap: Install git-merge-changelog entries in .git/config
5693 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5695 Remove remaining dependence on CVS Id keyword.
5696 * ChangeLog: For the sake of people still using CVS, don't use dollars
5698 * data/xslt/bison.xsl: Remove Id from header comments, where it was
5700 * data/xslt/xml2dot.xsl: Likewise.
5701 * data/xslt/xml2text.xsl: Likewise.
5702 * data/xslt/xml2xhtml.xsl: Likewise.
5703 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
5704 * doc/Makefile.am (neutralize): Remove, no longer needed.
5705 (.x.1): Don't use neutralize.
5706 (edit): Don't substitute for ID.
5707 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
5709 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5711 Fix dependence on computed configure variables.
5712 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
5713 $(top_srcdir)/configure.ac so that changes to computed variables, such
5714 as PACKAGE_VERSION, are seen.
5715 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
5717 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
5719 Update copyright dates for recent changes.
5720 * Makefile.am: Here.
5721 * src/Makefile.am: Here.
5722 * src/reduce.c: Here.
5723 * tests/reduce.at: Here.
5725 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
5727 Use git-version-gen for version names between releases.
5728 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
5729 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
5730 * .prev-version: New.
5731 * .version.in: Remove.
5732 * ChangeLog: Remove the Id previously used for capturing the CVS
5734 * GNUmakefile: Remove, now copied from Gnulib.
5735 * Makefile.am: Add code suggested by comments in
5736 build-aux/git-version-gen.
5737 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
5738 .prev-version, and .version.
5739 * NEWS (2.3b+): Rename to...
5740 (?.?): ... this because we're dropping the "+" version naming scheme,
5741 but, in general, we still can't be sure of our next release name.
5742 * bootstrap: Add a quick hack to remove from .gitignore the
5743 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
5744 entry. This should really be fixed in gnulib instead.
5745 * bootstrap.conf (gnulib_modules): Add gnumakefile.
5746 * configure.ac (AC_INIT): Set version name by invoking
5747 build-aux/git-version-gen.
5748 (AC_CONFIG_FILES): Remove .version, now generated by
5749 build-aux/git-version-gen.
5750 * maint.mk: New, copied from coreutils.
5751 * doc/.cvsignore (bison.1): Add.
5752 * doc/.gitignore (/bison.1): Add.
5753 * doc/bison.1: Remove, generated.
5754 * src/.cvsignore (revision.c): Remove.
5755 * src/.gitignore (/revision.c): Remove.
5756 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
5757 (BUILT_SOURCES): Remove revision.c.
5758 (revision.c): Remove.
5759 * src/getargs.c (version): Don't print revision after the VERSION.
5760 * src/revision.h: Remove.
5762 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5764 Fix untranslatable composition of sentences. Reported by Goran
5766 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
5767 * THANKS (Goran Uddeborg): Add.
5768 * src/reduce.c (reduce_print): Report the number of nonterminals and
5769 rules useless in the grammar in separate sentences.
5770 * tests/reduce.at (Useless Rules): Update output.
5771 (Reduced Automaton): Likewise.
5772 (Underivable Rules): Likewise.
5773 (Empty Language): Likewise.
5775 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5777 Fix some .gitignore and .cvsignore problems.
5778 * bootstrap (insert_sorted_if_absent): Replace all uses with...
5779 (insert_vc_ignore): ... this new function, which prepends `/' to all
5780 .gitignore entries before passing them to insert_sorted_if_absent.
5781 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
5782 .cvsignore files are maintained even though Bison developers run
5783 bootstrap while using Git.
5784 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
5787 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
5788 unneeded. Reported by Eric Blake.
5789 * lib/.gitignore (/*~): Add.
5790 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
5791 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
5793 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
5795 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5797 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
5798 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
5799 * bootstrap.conf (gnulib_modules): Add unsetenv.
5800 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
5801 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
5803 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
5804 the first argument because it may become position-dependent, and unset
5805 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
5806 Add comments explaining these issues in more detail.
5808 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
5810 Add .gitignore everywhere based on .cvsignore.
5812 * build-aux/.gitignore: New.
5813 * data/.gitignore: New.
5814 * doc/.gitignore: New.
5815 * etc/.gitignore: New.
5816 * examples/.gitignore: New.
5817 * examples/calc++/.gitignore: New.
5818 * lib/.gitignore: New.
5819 * m4/.gitignore: New.
5820 * po/.gitignore: New.
5821 * runtime-po/.gitignore: New.
5822 * src/.gitignore: New.
5823 * tests/.gitignore: New.
5825 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5827 * NEWS (2.3b+): New section, empty for now.
5828 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
5830 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5832 * NEWS (2.3b): Update release date since there has been a delay in
5833 getting the announcements and tarballs out.
5835 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5837 * NEWS: Version 2.3b.
5838 * configure.ac (AC_INIT): Likewise.
5839 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
5841 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5843 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
5844 been doing it for years.
5845 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
5846 (Release Procedure): Add FIXME about make alpha being unmaintained.
5848 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
5850 * data/yacc.c: Reformat m4 a little for readability.
5851 * src/lalr.c (build_relations): Correct comment.
5853 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5855 DJGPP specific issue.
5856 * djgpp/config.sed: Fixes required to run configure scripts generated
5859 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5861 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
5862 coordinator@translationproject.org.
5864 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5866 * THANKS: Add Eric Blake.
5868 2008-04-23 Eric Blake <ebb9@byu.net>
5870 Revert prior patch, by working around autoconf regression.
5871 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
5872 ("Output file name: ("): Uncomment test.
5873 ("Output file name: )"): Likewise.
5874 Based on an idea from Noah Misch.
5876 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5878 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
5879 2.61. Reported by Juan Manuel Guerrero at
5880 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
5881 * tests/output.at ("Output file name: ("): Comment out test case for
5883 ("Output file name: )"): Likewise.
5885 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5887 * GNUmakefile: Update git-version-gen invocation so make dist
5890 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5892 Update to the current gnulib CVS repository, and fix trigraph handling
5894 * bootstrap: Update gnulib CVS repository URL.
5895 (symlink_to_dir): Encapsulate the code that guarantees the destination
5896 directory exists into...
5897 (check_dst_dir): ... this new function, and...
5898 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
5899 fail when copying files into lib/uniwidth/.
5900 * src/output.c (prepare_symbols): When writing yytname muscles, where
5901 symbol names will be encoded in C-string literals, tell quotearg to
5902 escape trigraphs. This used to be the default in gnulib.
5903 * tests/regression.at (Token definitions): Because of the change in
5904 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
5905 escapes trigraphs in symbol names. Thus, yytname no longer has
5906 trigraphs unnecessarily doubly escaped. Update test case output.
5907 Extend test case to be sure Bison's own error messages will no longer
5908 have trigraphs in symbol names unnecessarily escaped once.
5910 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
5912 Fix make dist infinite loop reported by Juan Manuel Guerrero at
5913 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
5914 * .cvsignore: Add .version.
5916 * bootstrap.conf (gnulib_modules): Add git-version-gen.
5917 * configure.ac (AC_CONFIG_FILES): Add .version.
5918 * build-aux/.cvsignore: Add git-version-gen.
5920 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5922 * NEWS (2.3a+): Mention that -g now takes an argument.
5923 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
5924 consistency. Update the -g and -x entries now that they take
5925 arguments. Use brackets to indicate optional arguments.
5926 * src/getargs.c (usage): Explain the relationship between arguments of
5927 long and short options more completely. Document --defines and -d
5928 separately since the former takes an argument but, for POSIX Yacc, the
5930 (short_options): Let -W take an optional argument like --warnings.
5931 (getargs): Sort cases.
5933 2008-02-28 Akim Demaille <demaille@gostai.com>
5935 * doc/bison.texinfo: Fix a few typos.
5937 2008-02-28 Akim Demaille <akim@epita.fr>
5939 * doc/bison.texinfo (Bison Options): Document -W.
5940 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
5942 2008-02-28 Akim Demaille <akim@epita.fr>
5944 * src/getargs.c (short_options): Split and sort for readability.
5945 -g and -x take optional arguments, just like their long options.
5946 * build-aux/cross-options.pl: Use /x to make the regexp easier to
5948 Fix the handling of $opt which resulted in all the argument to be
5949 considered as optional.
5951 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
5953 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
5954 say its interface is experimental.
5955 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5957 (Bison Options): In the -L and --language entry, mention Java.
5958 (Java Bison Interface): Say the interface is experimental.
5959 * src/getargs.c (usage): Mention -L and --language.
5961 * NEWS (2.3a+): Say the push parsing interface is experimental.
5962 * doc/bison.texinfo (Push Decl): Likewise.
5963 (Decl Summary): Likewise in the "%define api.push_pull" entry.
5964 (Push Parser Function): Likewise.
5965 (Pull Parser Function): Likewise.
5966 (Parser Create Function): Likewise.
5967 (Parser Delete Function): Likewise.
5968 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
5969 yypull_parse, and yypush_parse entries.
5971 * NEWS (2.3a+): Mention XML support, and say the schema is
5973 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
5974 * src/getargs.c (usage): Say the XML schema is experimental.
5976 * NEWS (2.3a+): Say option instead of flag.
5978 2008-02-21 Wojciech Polak <polak@gnu.org>
5980 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
5983 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
5985 Fix impure push parser compile error reported by Bob Rossi at
5986 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
5987 * data/yacc.c: Clean up whitespace in the output a little.
5988 (yypstate_allocated): Define for impure push parsers regardless of
5989 whether the pull interface is also requested.
5990 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
5991 check impure push parsers without the pull interface.
5993 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
5994 yyerror takes arguments specified by %parse-param while yypstate_new
5996 * doc/bison.texinfo (Parser Create Function): Document that
5997 yypstate_new returns 0 for multiple impure parser instances.
5998 * tests/push.at (Push Parsing: Multiple impure instances): Update
5999 expected stderr output.
6001 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
6003 * runtime-po/POTFILES.in (push.c): Remove.
6005 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
6007 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
6008 * data/push.c: Rename to...
6009 * data/yacc.c: ... this, overwriting it.
6010 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
6011 `%push-pull-parser' -> `%define api.push_pull "both"'.
6012 Remove old yacc.c tests, and update push.c tests to yacc.c.
6014 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
6016 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
6017 `"%code top" blocks' instead of `%code "top" blocks'.
6018 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
6019 Clean up whitespace in the output a little.
6021 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
6023 Fix documentation problems reported by Tim Josling at
6024 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
6025 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
6026 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
6027 integers. Explain the effect of literal string aliases on error
6028 messages. Copy token 0 documentation from the C++ skeleton
6031 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
6033 Accept a token number in a %left, %right, or %nonassoc for POSIX
6034 conformance. Reported by Tim Josling at
6035 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
6036 * NEWS (2.3a+): Mention.
6037 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
6038 and code numbers are treated by precedence declarations.
6039 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
6041 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
6043 (symbol.prec): New, just like symbol but allows INT.
6044 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
6046 * tests/regression.at (Token number in precedence declaration): New
6049 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6051 DJGPP specific issues.
6052 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
6053 be changed. Copyright timestamp adjusted.
6054 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
6055 be changed. Copyright timestamp adjusted.
6056 * djgpp/config.site: Copyright timestamp adjusted.
6057 * djgpp/config_h.sed: Copyright timestamp adjusted.
6058 * djgpp/djunpack.bat: Copyright timestamp adjusted.
6059 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
6060 filename translation list.
6061 * djgpp/subpipe.c (init_subpipe): Check the environment variables
6062 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
6063 files shall be created. Before trying to use the temp dir where the
6064 environment variable points to check that the dir really exists. If
6065 not default to the cwd as temp dir. Copyright timestamp adjusted.
6066 * djgpp/subpipe.h: Copyright timestamp adjusted.
6067 * djgpp/testsuite.sed: Copyright timestamp adjusted.
6069 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
6071 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
6073 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
6075 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
6076 Problem reported by Claudio Saavedra in
6077 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
6079 2008-01-05 Wojciech Polak <polak@gnu.org>
6081 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
6082 document's title with the input grammar file name.
6084 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
6086 Automate regression testing of the XML/XSLT implementation. Discussed
6088 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
6089 * configure.ac (XSLTPROC): New substitution.
6090 * Makefile.am (maintainer-xml-check): New phony target invoking...
6091 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
6092 invoking make maintainer-check with BISON_TEST_XML=1.
6093 * tests/atlocal.in (XSLTPROC): New.
6094 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
6095 not to report reachable memory when Bison is expected to have a
6096 non-zero exit status and (2) to compare XML/XSLT output with --graph
6097 and --report=all output for every working grammar when
6099 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
6100 (AT_BISON_CHECK_XML): New.
6101 (AT_QUELL_VALGRIND): New.
6102 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
6103 (AT_CHECK): ... don't redefine this since this was the old way to
6105 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
6106 AT_BISON_CHECK invocations.
6107 * tests/c++.at: Likewise.
6108 * tests/calc.at: Likewise.
6109 * tests/conflicts.at: Likewise.
6110 * tests/cxx-type.at: Likewise.
6111 * tests/existing.at: Likewise.
6112 * tests/glr-regression.at: Likewise.
6113 * tests/headers.at: Likewise.
6114 * tests/input.at: Likewise.
6115 * tests/java.at: Likewise.
6116 * tests/output.at: Likewise.
6117 * tests/push.at: Likewise.
6118 * tests/reduce.at: Likewise.
6119 * tests/regression.at: Likewise.
6120 * tests/sets.at: Likewise.
6121 * tests/skeletons.at: Likewise.
6122 * tests/synclines.at: Likewise.
6123 * tests/torture.at: Likewise.
6124 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
6125 tends to hang xsltproc.
6126 (Big horizontal): Likewise.
6128 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
6130 In XML output, remove redundant class attribute on symbol element.
6131 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
6132 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
6133 look up a symbol to determine whether it's a nonterminal or terminal.
6134 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
6135 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
6137 Add prec/assoc information to XML output.
6138 * src/gram.c (grammar_rules_print_xml): For each rule that has a
6139 %prec, add a percent_prec attribute.
6140 * src/print-xml.c (print_grammar): For each terminal that has a
6141 precedence or associativity, add a prec or assoc attribute.
6143 (xml_puts): Use xml_indent.
6144 (xml_printf): Use xml_indent.
6145 * src/print-xml.h (xml_indent): Prototype.
6147 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
6148 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
6150 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
6152 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
6153 (bison:ruleByNumber): ... this for clarity.
6154 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
6155 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
6156 (xsl:template match="reduction"): Update.
6157 (xsl:template match="item"): Update.
6158 (xsl:template match="reduction"): Update.
6160 In the XML output, don't print the list of rules where symbols appear.
6161 Compute it in XSLT instead. Discussed at
6162 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
6163 * data/xslt/bison.xsl (bison:ruleByLhs): New.
6164 (bison:ruleByRhs): New.
6165 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
6167 (xsl:template match="terminal/rule"): Remove.
6168 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
6170 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
6172 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
6173 bison:ruleByRhs and mode="number-link" for rule template.
6174 (xsl:template match="terminal/rule"): Remove.
6175 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
6176 bison:ruleByRhs and mode="number-link" for rule template.
6177 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
6179 (xsl:template match="rule" mode="number-link"): ... this.
6180 * src/print-xml.c (print_grammar): Don't print the list of rules.
6182 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6184 Don't let --report affect XML output; always print all information.
6186 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
6187 * src/conflicts.c (log_resolution): Implement.
6188 * src/print-xml.c (print_core): Implement.
6189 (print_state): Implement.
6190 (print_xml): Implement.
6192 * NEWS (2.3a+): Fix quotes.
6193 * src/parse-gram.y (prologue_declaration): For consistency with -v,
6194 don't let %verbose clear the list specified by --report.
6196 2007-11-26 Akim Demaille <akim@epita.fr>
6198 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
6200 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
6202 In the XML output, list useless and unused symbols and rules with the
6203 useful ones and add a "usefulness" attribute. Discussed starting at
6204 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
6205 * src/gram.c (grammar_rules_partial_print_xml): Remove.
6206 (grammar_rules_print_xml): Print all rules instead of just those
6207 useful in the grammar, and add a "usefulness" attribute.
6208 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
6209 * src/print-xml.c (print_rules_useless_in_parser): Remove.
6210 (print_grammar): Print all nonterminals instead of just useful ones,
6211 and add a "usefulness" attribute to nonterminals and terminals.
6212 (print_xml): Don't print a separate "reductions" or
6213 "rules-useless-in-parser" element.
6214 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
6215 (reduce_xml): Remove.
6216 (reduce_token_unused_in_grammar): New.
6217 (reduce_nonterminal_useless_in_grammar): New.
6218 * src/reduce.h (reduce_xml): Remove prototype.
6219 (reduce_token_unused_in_grammar): Add prototype.
6220 (reduce_nonterminal_useless_in_grammar): Add prototype.
6221 * data/xslt/xml2text.xsl: Update for XML changes.
6222 * data/xslt/xml2xhtml.xsl: Update for XML changes.
6223 * tests/reduce.at (Useless Terminals): Update output.
6224 (Useless Rules): Update output.
6225 (Reduced Automaton): Update output.
6227 Say "Terminals unused in grammar" instead of "Unused terminals".
6228 * NEWS (2.3a+): Update.
6229 * doc/bison.texinfo (Understanding): Update example output.
6230 * src/reduce.c (reduce_output): Implement.
6231 * data/xslt/xml2text.xsl: Implement.
6232 * data/xslt/xml2xhtml.xsl: Implement.
6234 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
6236 Accept --report-file=FILE to override the default `.output' filename.
6237 * NEWS (2.3a+): Mention.
6238 * doc/bison.texinfo (Bison Options): Add an entry.
6239 * src/files.c (compute_output_file_names): Don't override
6240 spec_verbose_file if already set.
6241 * src/getargs.c (usage): Document --report-file.
6242 (REPORT_FILE_OPTION): New anonymous enum member.
6243 (long_options): Add entry for it.
6244 (getargs): Add case for it setting spec_verbose_file.
6246 * build-aux/cross-options.pl: Don't record a short option just because
6248 * doc/.cvsignore: Add yacc.1.
6250 2007-11-14 Akim Demaille <akim@epita.fr>
6252 * doc/yacc.1.in: New.
6253 * configure.ac, doc/Makefile.am: Adjust.
6254 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
6256 Use AC_SUBST for assignments too.
6257 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
6259 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6261 * src/gram.c: Remove comments that duplicate comments in gram.h.
6263 When reporting useless rules and nonterminals, say "useless in grammar"
6264 instead of "useless", and say "useless in parser" instead of "never
6265 reduced". Discussed starting at
6266 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
6267 * NEWS (2.3a+): Mention this change.
6268 * data/xslt/xml2text.xsl: Update output text and expected input XML
6269 element names to match changes below.
6270 * data/xslt/xml2xhtml.xsl: Likewise.
6271 (xsl:template match="bison-xml-report"): Add missing entry in Table of
6272 Contents: "Rules useless in parser due to conflicts".
6273 * doc/bison.texinfo (Decl Summary): Reword a little.
6274 (Understanding): Update example output for changes below.
6275 * src/gram.c: (rule_useful_p): Rename to...
6276 (rule_useful_in_grammar_p): ... this.
6277 (rule_useless_p): Rename to...
6278 (rule_useless_in_grammar_p): ... this.
6279 (rule_never_reduced_p): Rename to...
6280 (rule_useless_in_parser_p): ... this.
6281 (grammar_rules_print): Update for renames.
6282 (grammar_rules_print_xml): Update for renames.
6283 (grammar_rules_never_reduced_report): Rename to...
6284 (grammar_rules_useless_report): ... this since it is used for either
6285 kind of useless rule.
6286 * src/gram.h: Reword comments and update function names in prototypes.
6287 * src/main.c (main): Say "rule useless in parser due to conflicts".
6288 * src/print-xml.c (print_rules_never_reduced): Rename to...
6289 (print_rules_useless_in_parser): ... this, and rename output XML
6290 element "rules-never-reduced" to "rules-useless-in-parser".
6291 (print_xml): Update for rename.
6292 * src/print.c (print_results): Say "Rules useless in parser due to
6294 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
6295 (nonterminals_reduce): Say "nonterminal useless in grammar".
6296 (reduce_output): Say "Nonterminals useless in grammar".
6297 Say "Rules useless in grammar".
6298 (reduce_xml): Rename output XML element "useless" to
6299 "useless-in-grammar".
6300 (reduce_print): Don't report the count of grammatically useless rules
6301 as "rules never reduced" just because %yacc is specified.
6302 In the correct report of this count, say nonterminal(s) and rule(s)
6303 "useless in grammar".
6304 * tests/conflicts.at (S/R in initial): Update expected output.
6305 (Defaulted Conflicted Reduction): Likewise.
6306 (Unreachable States After Conflict Resolution): Likewise.
6307 * tests/existing.at (GNU pic Grammar): Likewise.
6308 * tests/reduce.at (Useless Nonterminals): Likewise.
6309 (Useless Rules): Likewise.
6310 (Reduced Automaton): Likewise.
6311 (Underivable Rules): Likewise.
6312 (Empty Language): Likewise.
6314 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6316 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
6317 here document and before the EOF so that BSD's implementation of Bourne
6318 shell doesn't parse the delimiter as part of the here document.
6319 * doc/.cvsignore: Add cross-options.texi.
6320 * src/getargs.c (usage): Add a blank line after the warning categories.
6322 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
6324 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
6326 2007-11-05 Akim Demaille <akim@epita.fr>
6328 Remove Id: from bison.1.
6329 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
6330 (perl -0777 -pi -e 's/\.PP\nId): New.
6331 (.x.1): Use it to ignore the version control revision.
6333 2007-11-05 Akim Demaille <demaille@gostai.com>
6335 * build-aux/Makefile.am: Ship cross-options.pl.
6336 * doc/Makefile.am: Always refer to cross-options.texi with
6338 (MAINTAINERCLEANFILES): Add it.
6340 2007-11-04 Akim Demaille <demaille@gostai.com>
6342 Generate the long/short option cross-table.
6343 * build-aux/cross-options.pl: New.
6344 * doc/Makefile.am (cross-options.texi): New.
6345 * doc/bison.texinfo: Use it.
6347 2007-11-04 Akim Demaille <demaille@gostai.com>
6349 Generate bison.1 using help2man.
6350 * doc/common.x, doc/bison.x: New.
6351 * doc/Makefile.am (bison.1, .x.1): New.
6352 The code is taken from autoconf-2.61/man/Makefile.am.
6353 * configure.ac: Look for help2man.
6355 2007-11-04 Akim Demaille <demaille@gostai.com>
6358 * src/getargs.c (usage): Document -W, make it clear that -d,
6359 -g and -x have optional arguments.
6361 2007-11-04 Akim Demaille <demaille@gostai.com>
6363 Find sha1sum when named gsha1sum.
6364 * bootstrap (find_tool): New.
6367 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6369 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
6371 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
6372 * NEWS (2.3a+): Mention.
6373 * data/bison.m4 (b4_pure_if): Don't define it here.
6374 * data/c.m4 (b4_identification): Depend on individual skeletons to
6375 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
6376 values of the %define variables api.pure or api.push_pull. Define
6377 YYPURE, YYPUSH, and YYPULL accordingly.
6378 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
6379 glr.cc has already defined b4_pure_flag.
6380 * data/push.c: Define b4_pure_if based on `%define api.pure'.
6381 Remove YYPUSH and YYPULL since they're back in b4_identification again.
6382 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
6383 * doc/bison.texinfo (Pure Decl): Update.
6384 (Push Decl): Update.
6385 (Decl Summary): Add api.pure to %define entry.
6386 In %pure-parser entry, say it's deprecated and reference %define.
6387 (Pure Calling): Update.
6388 (Error Reporting): Update.
6389 (C++ Scanner Interface): Update.
6390 (How Can I Reset the Parser): Update.
6391 (Table of Symbols): In %pure-parser entry, say it's deprecated and
6393 * src/getargs.c (pure_parser): Remove global variable.
6394 * src/getargs.h (pure_parser): Remove extern.
6395 * src/output.c (prepare): Don't define pure_flag muscle.
6396 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
6397 wrapper around `%define api.pure'.
6398 * tests/calc.at (Simple LALR Calculator): Update.
6399 (Simple GLR Calculator): Update.
6400 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
6402 (GLR: Resolve ambiguity, pure, locations): Update.
6403 (GLR: Merge conflicting parses, pure, no locations): Update.
6404 (GLR: Merge conflicting parses, pure, locations): Update.
6405 * tests/glr-regression.at (Uninitialized location when reporting
6407 * tests/input.at (Unused %define api.pure): New test case.
6408 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
6409 AT_PURE_IF and AT_PURE_AND_LOC_IF.
6410 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6412 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6414 %define push_pull -> %define api.push_pull. Discussed starting at
6415 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
6416 * data/push.c: Expect the new name.
6417 * data/yacc.c: Likewise.
6418 * doc/bison.texinfo (Push Decl): Update.
6419 (Decl Summary): Update %define entry.
6420 (Push Parser Function): Update.
6421 (Pull Parser Function): Update.
6422 (Parser Create Function): Update.
6423 (Parser Delete Function): Update.
6424 * tests/calc.at (Simple LALR Calculator): Update.
6425 * tests/input.at (%define enum variables): Update.
6426 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6427 (Push Parsing: Multiple impure instances): Update.
6428 (Push Parsing: Unsupported Skeletons): Update.
6429 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
6430 (Exploding the Stack Size with Malloc): Update.
6432 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
6435 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
6437 For the XML output's terminal element, rename @number to @token-number,
6438 and add @symbol-number. In the nonterminal element, rename @number to
6439 @symbol-number. Discussed starting at
6440 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
6441 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
6443 (xsl:template match="nonterminal"): Likewise.
6444 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
6445 (xsl:template match="nonterminal"): Likewise.
6446 * src/print-xml.c (print_grammar): Implement.
6448 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6450 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
6451 2007-10-11 change, the child elements here are items not rules.
6452 (xsl:template match="item"): New.
6453 (xsl:template match="rule"): Update for new reduced itemset.
6454 (xsl:template match="point"): Remove.
6455 (xsl:template match="empty"): For consistency with --graph, don't
6456 output "/* empty */".
6457 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
6458 line-wrap, don't pass a negative value as first-line-length since this
6459 won't work with the following changes.
6460 (xsl:template name="line-wrap"): Simplify slightly.
6461 (xsl:template name="ws-search"): Eliminate recursion.
6462 * src/print_graph.c (print_core): Don't print a reduction's lookahead
6463 set next to an item whose dot is not at the end of the RHS even if it
6464 happens to be associated with the same rule.
6466 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6468 Add %define lr.keep_unreachable_states.
6469 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
6470 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
6471 * src/main.c (main): Implement it.
6472 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6473 Extend to test it, and fix a typo.
6475 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6477 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
6478 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
6479 the example .output text.
6480 * tests/regression.at (Extra lookahead sets in report): Improve wording
6483 2007-10-17 Wojciech Polak <polak@gnu.org>
6485 * src/print-xml.c (print_grammar): Renamed
6486 <terminal> and <nonterminal> attributes:
6487 "type" to "number" and "symbol" to "name".
6488 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
6489 Use new attribute names.
6490 (xsl:template match="nonterminal"): Likewise.
6491 * data/xslt/xml2xhtml.xsl: Likewise.
6493 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
6495 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
6496 (Option Cross Key): Likewise.
6498 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
6499 next to an item whose dot is not at the end of the RHS even if it
6500 happens to be associated with the same rule.
6501 * src/print.c (print_core): Likewise.
6502 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
6503 (Resolved SR Conflicts): Update output.
6504 * tests/regression.at (Extra lookahead sets in report): New test case.
6506 2007-10-11 Wojciech Polak <polak@gnu.org>
6508 * src/print-xml.c (print_core): Remove item set
6510 * data/xslt/bison.xsl (bison:ruleNumber): New key.
6511 Improve processing time. Suggested by Joel E. Denny.
6512 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
6513 Write xsl:param "required" attribute as comment.
6514 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
6515 (xsl:template match="rule"): Support new reduced itemset.
6516 (xsl:template match="point"): Remove.
6517 * data/xslt/xml2xhtml.xsl: Likewise.
6519 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6521 * src/getargs.c (version): Update copyright year.
6523 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6525 Make xml2dot.xsl and --graph produce the same output.
6526 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a ` '
6527 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
6529 (xsl:template name="output-node"): Use the new escape template instead
6530 of the string-replace template directly.
6531 (xsl:template name="output-edge"): Likewise.
6532 (xsl:template name="escape"): New, escapes backslashes and newlines in
6533 addition to quotation marks.
6534 * src/graphviz.c (start_graph, output_node, output_edge): Add
6535 whitespace to output for legibility.
6537 Make xml2text.xsl and --report produce the same output, and remove the
6538 XML "conflicts" element since a conflict summary is easily extracted
6540 * data/xslt/bison.xsl: New.
6541 (xsl:template match="state" mode="bison:count-conflicts): New.
6542 * data/xslt/xml2text.xsl: Import bison.xsl.
6543 (xsl:template match="bison-xml-report"): Instead of styling the
6544 "conflicts" element, style the "automaton" element with mode
6545 "conflicts". Unlike the former, the latter lists S/R and R/R
6546 conflicts for a state on the same line.
6547 (xsl:template match="conflicts"): Remove.
6548 (xsl:template match="conflict"): Remove.
6549 (xsl:template match="terminal"): Line-wrap the list of rules in which
6550 the terminal is used.
6551 (xsl:template match="nonterminal"): Likewise for nonterminals.
6552 (xsl:template match="automaton" mode="conflicts"): New.
6553 (xsl:template match="state" mode="conflicts"): New.
6554 (xsl:template name="line-wrap"): New.
6555 (xsl:template name="ws-search"): New.
6556 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
6557 (xsl:template match="bison-xml-report"): Instead of styling the
6558 "conflicts" element, style the "automaton" element with mode
6560 (xsl:template match="conflicts"): Remove.
6561 (xsl:template match="conflict"): Remove.
6562 (xsl:template match="automaton" mode="conflicts"): New.
6563 (xsl:template match="state" mode="conflicts): New.
6564 * src/conflicts.c (conflicts_output_xml): Remove.
6565 * src/conflicts.h (conflicts_output_xml): Remove prototype.
6566 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
6567 * src/print.c (print_grammar): Consistently wrap at the 66th column so
6568 the corresponding XSLT is easier. Also, never wrap between a word and
6569 the comma that follows it.
6571 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6573 Improve C++ namespace support. Discussed starting at
6574 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
6575 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
6576 b4_namespace_close): New macros that interpret the %define variable
6577 "namespace" so its value can contain "::" to indicate nested
6579 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
6581 * data/lalr1.cc (b4_namespace): Likewise.
6582 * data/location.cc (b4_namespace): Likewise.
6583 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
6584 inside a new table in the general %define entry. Document `%define
6585 namespace' there as well. Point the %name-prefix entry to it since it
6586 explains it more completely in the case of C++.
6587 (C++ Bison Interface): Mention `%define namespace' instead of
6589 (Table of Symbols): Remove the `%define push_pull' entry. The %define
6591 * tests/c++.at (Relative namespace references): New test case.
6592 (Absolute namespace references): New test case.
6593 (Syntactically invalid namespace references): New test case.
6594 * tests/input.at (C++ namespace reference errors): New test case.
6596 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6598 Add syncline support and location accessor to internal %define
6600 * data/bison.m4 (b4_percent_define_get_loc): New.
6601 (b4_percent_define_get_syncline): New.
6602 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
6603 (b4_percent_define_default): Record defining location as line 1 rather
6604 than 0 for the sake of synchronizing #line's, and define
6605 b4_percent_define_syncline(VARIABLE).
6606 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
6607 * src/muscle_tab.c (muscle_syncline_grow): New.
6608 (muscle_code_grow): Use muscle_syncline_grow.
6609 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
6610 define b4_percent_define_syncline(VARIABLE).
6611 (muscle_percent_define_get_loc): New.
6612 (muscle_percent_define_get_syncline): New.
6613 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
6614 remove some unused variables.
6615 (muscle_percent_define_default): Record defining location as line 1
6616 rather than 0 for the sake of synchronizing #line's, and define
6617 b4_percent_define_syncline(VARIABLE).
6618 (muscle_percent_define_check_values): Use
6619 muscle_percent_define_get_loc.
6620 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
6621 (muscle_percent_define_get_syncline): Prototype.
6622 * tests/skeletons.at (%define Boolean variables: invalid skeleton
6623 defaults): Update output for location change.
6624 (Complaining during macro argument expansion): Extend to test
6625 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
6627 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
6629 Fix some error-reporting macro bugs.
6630 * data/bison.m4 (b4_cat): New.
6631 (b4_error, b4_error_at): Use b4_cat to send error directives directly
6632 to stdout so they don't become arguments to other macros. Update
6633 comments and add examples.
6634 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
6636 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
6637 after printing the error directive so that M4 doesn't report subsequent
6638 problems that are induced by this problem.
6639 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
6640 instead of just in them. Recognize @\n in both places. Both expand to
6641 the empty string. Needed by b4_cat.
6642 * tests/skeletons.at (Complaining during macro argument expansion):
6644 (Fatal errors make M4 exit immediately): New test case.
6646 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
6648 Implement --print-datadir.
6649 * src/getargs.c (usage): Mention.
6650 (PRINT_DATADIR_OPTION): New anonymous enum member.
6651 (long_options): Add entry for it.
6652 (getargs): Add case for it calling compute_pkgdatadir.
6653 * src/output.c (output_skeleton): Encapsulate data directory
6654 computation from here...
6655 (prepare): ... and from here...
6656 (compute_pkgdatadir): ... into this new function.
6657 * src/output.h (compute_pkgdatadir): Prototype.
6659 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
6661 * src/print-xml.c (escape_bufs): New static global variable
6663 (xml_escape_n): ... the static local variable buf here.
6664 (print_xml): Free memory for escape_bufs.
6665 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
6667 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
6669 Replace `%push-parser' and `%push-pull-parser' with
6670 `%define push_pull "push"' and `%define push_pull "both"'.
6671 `%define push_pull "pull"' is the default.
6672 * doc/bison.texinfo (Push Decl, Push Parser Function,
6673 Pull Parser Function, Parser Create Function, Parser Delete Function):
6674 Update declarations.
6675 (Decl Summary, Table of Symbols): Replace %push-parser and
6676 %push-pull-parser entries with a %define push_pull entry.
6677 * data/bison.m4 (b4_percent_define_check_values): New macro.
6678 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
6680 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
6682 * data/push.c: ... to here and compute them from the value of the
6683 %define variable push_pull.
6684 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
6685 parsing requests here...
6686 * data/yacc.c: ... hack this to switch to push.c any time
6687 b4_use_push_pull_flag or the %define variable push_pull is set. This
6688 will go away when we mv push.c yacc.c.
6689 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
6690 push parsing is not supported since unused %define variables are
6692 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
6693 * src/muscle_tab.h (muscle_percent_define_check_values): Update
6694 comments for consistency with b4_percent_define_check_values.
6695 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
6697 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
6699 (prologue_declaration): Remove %push-parser and %push-pull-parser
6701 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
6702 * tests/calc.at: Update declarations.
6703 * tests/input.at (%define enum variables): New test case.
6704 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
6706 (Push Parsing: Multiple impure instances): Update declaration.
6707 (Push Parsing: Unsupported Skeletons): New test case.
6708 * tests/torture.at (Exploding the Stack Size with Alloca): Update
6710 (Exploding the Stack Size with Malloc): Update declaration.
6712 2007-09-24 Wojciech Polak <polak@gnu.org>
6714 Add XSLT transformations.
6716 * data/xslt/xml2dot.xsl: Transform XML into DOT.
6717 * data/xslt/xml2text.xsl: Transform XML into plain text.
6718 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
6719 * data/Makefile.am (xsltdir): New variable.
6720 (dist_xslt_DATA): Add xslt/*.xsl files.
6722 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
6724 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
6725 Problem reported by Wojciech Polak.
6726 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
6727 (xml_printf): Undo change I made on 21 September; that is,
6728 indent 2 spaces, not 1.
6730 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
6732 Pacify ./configure --enable-gcc-warnings.
6733 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
6734 `char const *' instead of `char *'.
6735 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
6736 local variable `sep'.
6738 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6740 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
6742 * src/print-xml.c: Prefer "const" after types; that's more consistent.
6743 (xml_printf): Indent just 1 space for level.
6744 (e_char, xlate_char): Remove.
6745 (xml_escape_string): Rewrite to avoid undefined behavior (used
6746 storage that was freed from the stack).
6747 (xml_escape_n): Don't bother checking for subscript error.
6749 2007-09-21 Wojciech Polak <polak@gnu.org>
6751 Add Bison XML Automaton Report.
6753 Add support for an -x option to generate an XML report.
6754 It is not documented yet.
6755 * src/print-xml.c: New file.
6756 * src/print-xml.h: Likewise.
6757 * lib/timevar.def (TV_XML): New var.
6758 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
6759 * src/conflicts.c: Include print-xml.h.
6760 (solved_conflicts_xml_obstack): New var.
6761 (log_resolution, conflicts_solve, conflicts_free):
6762 Add support for XML report.
6763 (conflicts_output_val): New function.
6764 * src/conflicts.h (conflicts_output_val): New decl.
6765 * src/files.c (spec_xml_file): New var.
6766 (compute_output_file_names, output_file_names_free): Add XML support.
6767 * src/files.h (spec_xml_file): New decl.
6768 * src/getargs.c (xml_flag): New var.
6769 (usage, short_options, long_options, getargs): Add XML support.
6770 * src/getargs.h (xml_flag): New decl.
6771 * src/gram.c: Include print-xml.h.
6772 (rule_lhs_print_xml, rule_rhs_print_xml):
6773 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
6775 * src/gram.h: Declare external ones.
6776 * src/main.c: Include print-xml.h.
6777 (main): Add XML support.
6778 * src/reduce.c: Include print-xml.h.
6779 (reduce_xml): New function.
6780 * src/reduce.h: Declare it.
6781 * src/state.c: Include print-xml.h.
6782 (state_new): Add XML support.
6783 (state_rule_lookahead_tokens_print_xml): New function.
6784 * src/state.h: Declare it.
6785 (struct state): New member solved_conflicts_xml.
6786 * src/symtab.c (symbol_class_get_string): New function.
6787 * src/symtab.h: Declare it.
6789 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6791 * GNUmakefile: Switch to coreutils's version.
6792 * bootstrap: Likewise.
6793 * Makefile.cfg: Adjust to new GNUmakefile.
6794 * README-hacking: Likewise.
6798 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
6799 Bruno Haible <bruno@clisp.org>
6801 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6802 and is a script that invokes bison. Tighten the code. Add comments.
6804 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
6806 Spell "boolean" as "Boolean". Reported by Akim Demaille.
6807 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
6808 * doc/bison.texinfo (Decl Summary): Fix.
6809 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
6810 * tests/input.at (Boolean %define variables): Update output.
6811 * tests/skeletons.at (%define boolean variables: invalid skeleton
6812 defaults): Rename to...
6813 (%define Boolean variables: invalid skeleton defaults): ... this and
6816 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
6818 In impure push mode, don't allow more than one yypstate to be allocated
6819 since multiple impure parsers would corrupt yynerrs.
6820 * data/push.c (yypstate_allocated): New static global variable
6822 (yypull_parse): If yypstate_new returns 0, don't report it as memory
6823 exhaustion if yypstate_allocated is 1, but still return 2.
6824 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
6825 already 1. Otherwise, set it to 1.
6826 (yypstate_delete): Set it to 0.
6827 * tests/push.at (Push Parsing: Multiple impure instances): New test
6830 2007-08-17 Bob Rossi <bob@brasko.net>
6832 * doc/bison.texinfo (Push Decl): Document the push parser.
6833 (Table of Symbols): Ditto.
6835 (Decl Summary): Ditto.
6836 (Multiple Parsers, Push Parser Function, Pull Parser Function,
6837 Parser Create Function, Parser Delete Function):
6838 Add new push parser symbols.
6839 (Table of Symbols): Document push-parser, push-pull-parser,
6840 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
6842 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
6845 * doc/gpl-3.0.texi: New file.
6846 * doc/gpl.texi: Remove.
6847 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
6848 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
6849 * README-hacking, TODO, bootstrap, bootstrap.conf:
6850 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
6851 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
6852 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
6853 * data/lalr1.cc, data/lalr1.java, data/location.cc:
6854 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
6855 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
6856 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
6857 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
6858 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
6859 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
6860 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
6861 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
6862 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
6863 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
6864 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
6865 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
6866 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
6867 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
6868 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
6869 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
6870 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
6871 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
6872 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
6873 * src/complain.c, src/complain.h, src/conflicts.c:
6874 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
6875 * src/files.h, src/flex-scanner.h, src/getargs.c:
6876 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
6877 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
6878 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
6879 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
6880 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
6881 * src/print.c, src/print.h, src/print_graph.c:
6882 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
6883 * src/reduce.h, src/relation.c, src/relation.h:
6884 * src/revision.h, src/scan-code.h, src/scan-code.l:
6885 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
6886 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
6887 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
6888 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
6889 * tests/Makefile.am, tests/actions.at, tests/c++.at:
6890 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
6891 * tests/existing.at, tests/glr-regression.at:
6892 * tests/headers.at, tests/input.at, tests/java.at:
6893 * tests/local.at, tests/output.at, tests/push.at:
6894 * tests/reduce.at, tests/regression.at, tests/sets.at:
6895 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
6899 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6901 Get rid of broken %no-parser, -n, and --no-parser implementation and
6903 * TODO: Don't mention them.
6904 * doc/bison.1: Likewise.
6905 * doc/bison.texinfo (Decl Summary): Likewise.
6906 (Bison Options): Likewise.
6907 (Option Cross Key): Likewise.
6908 * src/getargs.c (no_parser_flag): Remove global variable.
6909 (usage): Don't print description of -n and --no-parser.
6910 (long_options): Remove --no-parser entry here.
6911 (getargs): Remove -n case in the switch here.
6912 * src/getargs.h (no_parser_flag): Remove extern.
6913 * tests/regression.at (Web2c Actions): Remove comment that mentions
6916 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6918 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
6919 name user variables starting with `yy'. Just pass NULL instead of a
6920 dummy local &yylval to yypush_parse.
6921 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
6924 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
6926 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
6927 true since it's then always used regardless of whether yyoverflow is
6928 defined. Reported by Christian Burger at
6929 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
6930 * THANKS: Add Christian Burger.
6932 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6933 node names: say "Decl Summary" not "Bison Declaration Summary".
6935 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
6937 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
6938 determine whether this function has already complained about an invalid
6939 value for a %define boolean variable, don't check whether Bison has
6940 ever examined the value. As written, the check was a tautology.
6941 Instead, record and check for this complaint using a separate muscle.
6943 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
6945 Fix push parsing memory leak reported by Brandon Lucia at
6946 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
6947 * THANKS: Add Brandon Lucia.
6948 * data/push.c (yypstate_delete): Free the stack if it was reallocated
6949 but the parse never completed and thus freed it.
6950 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
6951 * tests/testsuite.at: Include push.at.
6952 * test/push.at: New.
6953 (Push Parsing: Memory Leak for Early Deletion): New test case.
6955 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
6957 Improve handling of multiple S/R conflicts in the same state and of S/R
6958 conflicts involving multiple reductions.
6959 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
6960 set for a state here or Bison will abort if it is reassigned on a
6961 later conflicted reduction in the same state.
6962 Similarly, don't finalize and assign the solved conflicts report here
6963 or it will be lost if it is reassigned on a later conflicted reduction
6965 (set_conflicts): Instead, assign them both here after all S/R conflicts
6966 in the state have been fully examined.
6967 * src/print.c (shift_set): Rename to...
6968 (no_reduce_set): ... this.
6969 (print_reductions): Update for rename, and add %nonassoc error action
6970 tokens to no_reduce_set so that, when printing the first remaining
6971 reduction on an error action token, the reduction is enclosed in
6973 (print_results): Update for rename.
6974 * tests/conflicts.at (Solved conflicts report for multiple reductions
6975 in a state): New test case.
6976 (%nonassoc error actions for multiple reductions in a state): New test
6979 * src/main.c (main): Don't depend on C99 features.
6981 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
6983 * build-aux/.cvsignore: Add compile.
6984 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
6987 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
6989 * bootstrap (slurp): Create target directories that don't exist.
6990 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
6992 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6994 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
6996 * closure.c (closure): Likewise.
6997 * state.h (reductions): Comment sorting of rules.
6998 (state): Comment sorting of items.
7000 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
7002 Fix C++ test cases after recent Gnulib changes. Discussed starting at
7003 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
7004 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
7005 definition in order to avoid Gnulib headers since we don't use config.h
7007 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
7008 rather than AT_DATA so that config.h is included.
7010 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
7012 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
7013 instead of fprintf. Guard these functions with #if YYDEBUG instead of
7014 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
7015 and so that YYFPRINTF is guaranteed to be defined here.
7017 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7019 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
7021 (muscle_percent_define_check_values): ... this more helpful function.
7022 Again, it's not used yet, but it will be.
7023 * src/muscle_tab.h: Likewise.
7025 Improve some comments in parser table construction.
7026 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
7027 (generate_states): Don't mention ruleset, which is internal to closure.
7028 * src/closure.c (closure): Explain sorting of core and itemset, which
7029 is required for this function to behave correctly.
7030 * src/closure.h (closure): Mention sorting.
7032 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
7034 * src/lalr.c (state_lookahead_tokens_count): For code readability,
7035 move the check for disabled transitions to an aver since conflict
7036 resolution hasn't happened yet.
7038 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
7039 labels a state as inconsistent just because it has error transitions.
7040 The original form of this check appeared in revision 1.1 of lalr.c,
7041 which was committed on 1991-12-21. Now (at least), changing the
7042 consistency label on such a state appears to have no useful effect in
7043 any of the places it is examined, which I enumerate below. The key
7044 point to understanding each item in this enumeration is that a state
7045 with an error transition is labelled consistent in the first place only
7046 if it has no rules, so the check cannot matter for states that have
7047 rules. (1) Labelling a state as inconsistent will cause set_conflicts
7048 to try to identify its conflicts, and a state must have *rules* to have
7049 conflicts. (2) Labelling a state as inconsistent will affect how
7050 action_row sets the default *rule* for the state. (3) Labelling a
7051 state as inconsistent will cause build_relations to add lookback edges
7052 to *rules* in that state.
7053 * src/state.h (struct state): Word the comment for member consistent
7056 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
7058 Don't depend on C99 features.
7059 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
7060 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
7061 * src/reader.c (check_and_convert_grammar): Fix for-loop.
7062 * src/state.c (state_mark_reachable_states): Fix for-loop.
7063 (state_remove_unreachable_states): Fix for-loop.
7065 Don't widen struct state with member reachable just to temporarily
7066 record reachability. Instead, use a local bitset.
7067 * src/state.h (struct state): Remove member.
7068 * src/state.c (state_new): Don't initialize it.
7069 (state_mark_reachable_states): Rename to...
7070 (state_record_reachable_states): ... this, and use bitset.
7071 (state_remove_unreachable_states): Use bitset.
7073 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
7075 * src/Makefile.am (yacc): Quote target action commands properly so
7076 that the yacc script isn't corrupt. Reported by Hans Aberg at
7077 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
7079 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
7080 the case of pure parsers. Reported by Frans Englich at
7081 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
7082 * THANKS: Add Frans Englich.
7084 * NEWS (2.3a+): In the %code entry, reference section `Bison
7085 Declaration Summary' from the manual now since the %code summary has
7087 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
7088 in the rules section must be terminated by semicolons.
7090 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
7092 Extend the front-end API for %define variables to more completely
7093 mirror the back-end. This will be useful in the future.
7094 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
7095 Update comments to mention the new front-end counterparts of these
7097 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
7098 for muscle_string_decode and muscle_location_decode.
7099 (muscle_string_decode): New static function.
7100 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
7101 (muscle_percent_define_get, muscle_percent_define_ifdef): New
7103 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
7104 muscle_percent_define_get to mimic the b4_percent_define_flag_if
7105 implementation more closely.
7106 (muscle_percent_define_invalid_value): New function.
7107 * src/muscle_tab.h (muscle_percent_define_get,
7108 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
7111 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
7113 * NEWS (2.3a+): Mention yesterday's state-removal change.
7114 (2.3a): Remove the %language entry, which was added after 2.3a.
7115 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
7116 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
7117 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
7118 tests/existing.at: Update copyright date.
7120 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
7122 If conflict resolution makes states unreachable, remove those states,
7123 report rules that are then unused, and don't report conflicts in those
7125 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
7126 New global function.
7127 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
7129 * src/main.c (main): After conflict resolution, remove the unreachable
7130 states and update all data structures that reference states by number.
7131 * src/state.c (state_new): Initialize each state's reachable member to
7133 (state_mark_reachable_states): New static function.
7134 (state_remove_unreachable_states): New global function.
7135 * src/state.h (struct state): Add member bool reachable.
7136 (state_remove_unreachable_states): Prototype.
7137 * tests/conflicts.at (Unreachable States After Conflict Resolution):
7139 * tests/existing.at (GNU pic Grammar): Update test case output now that
7140 an unused rule is discovered.
7142 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
7144 Minor code cleanup in parser table construction.
7145 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
7146 (new_itemsets, save_reductions): Update for rename to nitemset.
7147 * src/closure.c (nritemset): Rename to...
7148 (nitemset): ... this since the "r" appears to meaningless and isn't
7149 used in the comments.
7150 (closure): Update for rename.
7151 * src/closure.h (nritemset): Update extern to...
7152 (nitemset): ... this.
7153 * src/lalr.c (LA): Fix a typo in comments.
7154 * src/print.c (print_core): Update for rename to nitemset.
7155 * src/print_graph.c (print_graph): Likewise.
7156 * src/state.h: Fix some typos in header comments.
7158 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
7160 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
7161 still sticks to ASCII. Sorry!
7163 * README-hacking: New file, taken mostly from coreutils, with changes
7164 for Bison. Contains much of the contents of:
7165 * README-cvs: Remove.
7166 * bootstrap: Sync from gnulib.
7167 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
7168 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
7170 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
7172 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
7174 (Java Differences): Fix some typos.
7175 * THANKS: Add Sebastian Setzer.
7177 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
7179 * data/java.m4 (b4_single_class_if): Remove.
7180 (b4_abstract_if): Look at "%define abstract".
7182 (b4_union_name): Rename...
7183 (b4_yystype): ... to this. Map to "%define stype".
7184 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
7185 b4_maybe_throws): Fix quoting.
7186 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
7187 * data/lalr1.java (Lexer interface): Always define.
7188 (Lexer interface within parser class): Remove.
7189 (YYLexer class): New, used when "%code lexer" is present.
7190 (constructor): When "%code lexer" is used, pass %lex-param
7191 to the lexer constructor.
7192 (yylex, yyparse): Remove %lex-param from method invocations
7193 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
7195 * doc/bison.texinfo (Java Bison Interface): Mention "%define
7196 abstract". Rename "%define union_name" to "%define stype".
7197 Rename method names according to previous patch.
7198 (Java Scanner Interface): Describe "%code lexer" instead of
7199 "%pure-parser" and "%define single_class".
7200 (Java Differences): Mention "%code lexer".
7202 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
7203 Include scanner here, using macros from tests/local.at.
7204 (AT_DATA_CALC_Y): Remove final argument.
7205 (_AT_CHECK_JAVA_CALC): Likewise.
7206 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
7207 of %locations and %error-verbose.
7208 (main): Test with and without %lex-param.
7209 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
7210 (AT_BISON_OPTION_POPDEFS): Pop it.
7212 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7214 DJGPP spefic issue. Inhibit the use of disallowed characters for
7215 file name genertion on Win98, WinXP, etc. These are |<>":?*\
7216 and concern testsuite case 46.
7217 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
7218 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
7219 * djgpp/config.bat: Inhibit the use of disallowed characters.
7221 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7223 Miscellaneous %define and %code cleanup.
7224 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
7225 values are interpreted.
7226 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
7227 documentation a little more.
7228 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
7229 muscle_percent_define_insert, muscle_percent_code_grow): New
7231 * src/muscle_tab.h (muscle_percent_define_insert,
7232 muscle_percent_code_grow): Prototype.
7233 * src/parse-gram.y (prologue_declaration): Use
7234 muscle_percent_define_insert and muscle_percent_code_grow when parsing
7235 %define and %code directives.
7237 Make it easy to share %define boolean variables between the front-end
7238 and back-end. Though not used yet, this will be useful in the future.
7239 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
7240 Bison uses of names rather than just skeleton uses of names.
7241 (b4_percent_define_get, b4_percent_define_ifdef): Rename
7242 b4_percent_define_skeleton_variables(VARIABLE) to
7243 b4_percent_define_bison_variables(VARIABLE).
7244 (b4_percent_code_get, b4_percent_code_ifdef): Rename
7245 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
7246 b4_percent_code_bison_qualifiers(QUALIFIER).
7247 (b4_check_user_names_wrap): Update for renames.
7248 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
7249 muscle_percent_define_default): New functions mimicking
7250 b4_percent_define_flag_if and b4_percent_define_default.
7252 For %define variables, report locations for invalid values and
7254 * data/bison.m4 (b4_percent_define_flag_if): Read
7255 b4_percent_define_loc(VARIABLE) to report the location of an invalid
7257 (b4_percent_define_default): Save a special location in
7258 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
7259 must later be reported as invalid.
7260 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
7262 (muscle_percent_define_insert): Record the location of VARIABLE in
7263 muscle percent_define_loc(VARIABLE), and use it to report the previous
7264 location for a redefinition.
7265 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
7266 (muscle_percent_define_default): Update like b4_percent_define_default.
7267 (muscle_grow_user_name_list): Rename to...
7268 (muscle_user_name_list_grow): ... this for consistency and use
7269 muscle_location_grow.
7270 * src/muscle_tab.h (muscle_location_grow): Prototype.
7271 * tests/input.at (%define errors): Update expected output.
7272 * tests/skeletons.at (%define boolean variables: invalid skeleton
7273 defaults): New test case.
7275 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
7277 * src/print.c (lookahead_set, state_default_rule): Remove.
7278 (print_reductions): Replace state_default_rule invocation with
7279 equivalent use of yydefact, which was computed in token_actions in
7281 (print_results): Don't allocate lookahead_set.
7283 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
7285 * data/lalr1.java: Prefix all private members with yy.
7287 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
7289 Use YYFPRINTF instead of fprintf where appropriate. Reported by
7290 Sebastien Fricker at
7291 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
7292 * THANKS: Add Sebastien Fricker.
7293 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
7294 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
7295 accept a variable number of arguments.
7297 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
7299 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
7301 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7303 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
7304 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
7305 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
7307 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
7309 Undo my 2007-02-07 change, switching back to the c-strcase module
7310 introduced in the 2007-02-03 change. Bruno Haible reported that
7311 the 2007-02-07 change would be dangerous in Turkish if we add a
7312 language whose name contains "i", since "i" is not lowercase "I"
7314 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
7315 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
7316 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
7317 * m4/.cvsignore: Remove strcase.m4.
7318 * src/getargs.c: Revert 2007-02-07 change, as follows.
7319 Include c-strcase.h.
7320 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
7322 2007-02-11 Bruno Haible <bruno@clisp.org>
7324 Enable the Java related testsuite tests when the only Java compiler
7325 found is a gcj < 4.3. Discussed at
7326 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
7327 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
7329 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
7331 * data/Makefile.am: Update copyright date.
7332 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
7333 yypstate_new returns NULL.
7334 (yypstate_new): Return NULL if malloc does.
7335 * src/reader.c (packgram): Move translation of rule actions from the
7336 beginning of packgram to...
7337 (check_and_convert_grammar): ... here right before packgram is invoked
7338 so it's easier to write more complete comments, and remove redundant
7341 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
7343 As in semantic actions, make @$ in %initial-action, %destructor, and
7344 %printer imply %locations.
7345 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
7347 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
7348 (@$ in %initial-action implies %locations,
7349 @$ in %destructor implies %locations,
7350 @$ in %printer implies %locations): ... these new test cases.
7352 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
7354 Undo most of the 2007-02-03 change, switching to the strcase module
7355 now that gnulib strcase has been fixed.
7356 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
7357 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
7358 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
7359 * m4/.cvsignore: Add strcase.m4.
7360 * src/getargs.c: Revert 2007-02-03 change, as follows.
7361 Don't include c-strcase.h.
7362 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
7363 strcasecmp has "unspecified behavior" outside the POSIX locale,
7364 but it works fine in practice if at least one argument is ASCII,
7365 as is the case in Bison.
7367 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
7369 * tests/java.at: Skip tests if only one of javac/java is present.
7370 Reported by Joel E. Denny.
7371 * tests/atlocal.in: Adjust copyright years.
7373 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
7375 * data/lalr1.java (Stack): Work around old verifiers that disallow
7376 access to the private fields of an inner class, from the outer class.
7377 We can make Stack's fields public because user code doesn't have access
7378 to the instance of Stack used by parse(). Reported by Paul Eggert.
7380 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
7382 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
7383 the right spot for these files?
7384 * bootstrap.conf (gnulib_modules): Add c-strcase.
7385 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
7387 * src/getargs.c: Include c-strcase.h.
7388 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
7389 to avoid unspecified behavior.
7391 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
7393 * doc/bison.texinfo (Decl Summary): Correct typo.
7395 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
7397 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
7398 Complain if the value does not match empty, "true" or "false".
7399 * data/c++.m4: Adjust default definitions of %define variables.
7400 * data/java.m4: Adjust default definitions of %define variables.
7401 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
7403 * tests/input.at (Boolean %define variables): Test new behavior.
7405 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
7407 * NEWS: Mention java.
7408 * TODO: Remove things that are done.
7409 * bootstrap.conf: Add javacomp-script and javaexec-script.
7410 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
7412 * data/Makefile.am: Add new files.
7413 * data/java-skel.m4: New.
7414 * data/java.m4: New.
7415 * data/lalr1.java: New.
7417 * doc/bison.texinfo: Put "A Complete C++ Example" under
7418 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
7419 under Other Languages.
7421 * src/getargs.c (valid_languages): Add Java.
7422 * src/getargs.h (struct bison_language): Update size of string fields.
7424 * tests/Makefile.am: Add java.at.
7425 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
7426 * tests/java.at: New.
7427 * tests/testsuite.at: Include it.
7429 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
7432 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
7433 at_directive_argv arguments so these no longer have to be global
7434 variables. Also, update the implementation for the following changes.
7435 (fail_for_at_directive_too_many_args,
7436 fail_for_at_directive_too_few_args): Add at_directive_name argument.
7437 (at_directive_name): Remove as at_directive_argv[0] will be used for
7439 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
7440 for the directive name.
7441 (at_directive_argc, at_directive_argv): Make these local within
7442 skel_lex instead of global.
7443 (INITIAL): Update directive start action for above changes.
7444 (SC_AT_DIRECTIVE_ARG): Rename to...
7445 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
7446 (SC_AT_DIRECTIVE_SKIP_WS): Update.
7447 (scan_skel): Move yylex_destroy to...
7448 (skel_scanner_free): ... here.
7449 * tests/skeletons.at (installed skeleton file name): Rename to...
7450 (installed skeleton file names): ... this.
7452 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
7454 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
7455 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
7456 Summary" not "Directives".
7457 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
7458 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
7459 since the former is now the more complete one.
7460 (Prologue Alternatives): Likewise and do the same for %defines.
7461 (Table of Symbols): Add summary of %code, add summary of %define, and
7462 move full %code documentation to...
7463 (Decl Summary): ... here for consistency with other entries in these
7465 Move %define entry in order to keep this list alphabetized.
7466 Reword %define entry a little to put less emphasis on the skeleton
7467 concept, which most users shouldn't have to think about.
7469 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
7471 Adjust to recent gnulib changes.
7472 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
7473 Add string.h, string_.h, unistd_.h, wchar_.h.
7474 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
7475 * src/system.h: Don't include <stpcpy.h>; this is now done by
7478 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
7480 Simplify implementation of unqualified %code, implement macros for
7481 uniform treatment of boolean %define flags. Document %define.
7482 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
7483 b4_percent_code_ifdef): New.
7484 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
7485 * data/c++.m4: Define default value for global_tokens_and_yystype.
7486 * data/glr.cc: Likewise.
7487 * data/location.cc: Use b4_percent_define_flag_if.
7489 * doc/bison.texinfo (Decl Summary): Document %define.
7491 * src/parse-gram.y (Unqualified %code): Change muscle name to
7493 (content.opt): Default to empty.
7495 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7497 Implement support for relative and absolute skeleton file names.
7498 Discussed starting at
7499 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
7500 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
7501 (Bison Options): Document in --skeleton entry.
7502 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
7503 full_skeleton can't necessarily hold all of pkgdatadir.
7504 If the specified skeleton file name contains a `/', don't prepend
7506 * src/parse-gram.y (prologue_declaration): If the specified skeleton
7507 file name contains a `/', prepend the grammar file directory.
7508 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
7509 * skeletons.at: New file.
7510 (relative skeleton file names): New test case.
7511 (installed skeleton file names): New test case.
7512 * tests/testsuite.at: Include skeletons.at.
7514 * bootstrap: Update copyright to 2007.
7516 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
7518 * bootstrap: Remove occurrences of .#bootmp from the files.
7520 2007-01-17 Akim Demaille <akim@epita.fr>
7522 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
7524 Use per-type %printer.
7526 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7528 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
7529 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7530 djgpp/config.site, src/files.c, src/files.h, src/main.c,
7531 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
7532 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
7533 tests/glr-regression.at, tests/input.at, tests/local.at,
7534 tests/output.at, tests/torture.at: Update copyright to 2007.
7536 2007-01-16 Akim Demaille <akim@epita.fr>
7538 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
7540 (Calc++ Scanner): Exit with failure if we can't open the input
7542 Accept "-" standing for stdin.
7543 (Calc++ Top Level): Print the result only if the parsing was
7546 2007-01-16 Akim Demaille <akim@epita.fr>
7548 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
7550 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
7551 and Joel E. Denny <jdenny@ces.clemson.edu>
7553 Clean up %define and %code implementation in M4 some. Most
7554 importantly, rename all related macros to be in the b4_percent_define
7555 and b4_percent_code namespaces. Also, complete support for `.' in
7556 %define variable names and %code qualifiers.
7557 * data/bison.m4 (b4_check_user_names): Check for special
7558 "SKELETON-NAMESPACE(name)" macros instead of using two nested
7560 (b4_get_percent_define, b4_get_percent_code): Rename to...
7561 (b4_percent_define_get, b4_percent_code_get): ... these.
7562 Extend documentation with examples.
7563 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
7564 b4_percent_define_skeleton_variables and
7565 b4_percent_code_skeleton_qualifiers.
7566 Expect any value for the %define variable `foo' to be stored in the
7567 macro named `b4_percent_define(foo)'; expect any %code blocks for the
7568 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
7569 expect any unqualified %code blocks to be stored in a macro named
7570 `b4_percent_code_unqualified'.
7571 Use m4_indir so that %define variable names and %code qualifiers can
7572 contain `.', which is allowed by the grammar parser.
7573 (b4_percent_define_default): New macro to set a default value for a
7575 (m4_wrap): Update wrapped code, and fix some underquoting.
7576 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
7577 Expect grammar uses of %define variables and %code qualifiers to be
7578 defined in b4_percent_define_user_variables and
7579 b4_percent_code_user_qualifiers.
7580 * data/c++.m4: Use b4_percent_define_default rather than
7581 m4_define_default. Fix some underquoting. Skeleton usage of %define
7582 variable define_location_comparison now implies skeleton usage of
7583 %define variable filename_type.
7584 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7585 data/push.c, data/yacc.c: Update macro names.
7586 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
7589 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7591 DJGPP specific issues.
7593 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
7594 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
7596 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7598 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
7599 run parsers in all tests so that Valgrind is invoked during
7600 maintainer-check-valgrind.
7601 (Duplicate representation of merged trees): Free all semantic values.
7602 (Duplicated user destructor for lookahead): Likewise.
7604 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7606 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
7607 command-line prefix.
7608 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
7609 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
7610 miss Valgrind messages.
7611 (Exploding the Stack Size with Malloc): Likewise.
7613 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7615 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
7616 locals. Reported by Juan Manuel Guerrero at
7617 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
7618 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
7619 Fix some indentation also.
7620 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
7621 explaining this issue.
7623 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
7624 and Joel E. Denny <jdenny@ces.clemson.edu>
7626 Simplify union and prologue handling, and escape union and lex/parse
7627 params with digraphs.
7628 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
7629 values to the empty string since these are no longer guaranteed
7630 initialized by the front-end.
7631 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
7632 braces around b4_user_stype since this is no longer done by the
7634 * src/files.c, src/files.h (pre_prologue_obstack,
7635 post_prologue_obstack): Remove.
7636 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
7637 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
7638 with digraphs. This fixes lex params and parse params.
7639 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
7640 * src/output.c (prepare): Remove muscle insertion of the prologues.
7641 (output): Remove freeing of pre_prologue_obstack and
7642 post_prologue_obstack.
7643 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
7644 than prologue_augment for prologue parsing so you don't need prologue
7646 (grammar_declaration): For %union RHS, use `braceless' instead of
7647 "{...}" so that braces are already stripped and code is escaped with
7649 * src/reader.c (prologue_augment): Remove.
7650 (reader): Remove initialization of pre_prologue_obstack and
7651 post_prologue_obstack.
7652 * src/reader.h (prologue_augment): Remove.
7654 * data/c.m4: Remove stray parenthesis.
7656 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7658 Remove quotes from variables names in %define directives and from
7659 qualifiers in %code directives, and restrict the characters that are
7660 allowed in them to M4-friendly ones. For %define, continue to support
7661 the quoted form as a deprecated feature. Discussed starting at
7662 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
7663 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
7665 * doc/bison.texinfo (Prologue Alternatives): Update.
7666 (Decl Summary): In %defines entry, update mention of `%code requires'
7667 and `%code provides'.
7668 (C++ Location Values): Update %define uses.
7669 (Calc++ Parser Interface): Likewise.
7670 (Calc++ Parser): Likewise, and update `%code requires' uses.
7671 (Table of Symbols): Update %code documentation.
7672 * src/parse-gram.y (prologue_declaration): For %define variables, use
7673 `variable' instead of `STRING'.
7674 (grammar_declaration): For %code qualifiers, use `ID' instead of
7676 (variable): New nonterminal that takes an `ID' or a `STRING'.
7677 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
7679 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
7680 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
7681 (%define errors): Update %define uses.
7683 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7685 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
7686 instead of muscle_insert for %define values so that M4-special
7687 characters are replaced with digraphs.
7688 * tests/input.at (%define errors): Extend to check weird values.
7690 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7692 Instead of having skeletons declare all valid %define variables and
7693 %code qualifiers, provide macros that retrieve the associated values
7694 and build these lists automatically. Thus Bison will now warn when a
7695 variable or qualifier is not used by the skeleton in the current
7696 invocation regardless of whether it might sometimes be used by that
7697 skeleton in other invocations. Also, move all %define value macros to
7698 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
7699 form, which is replaced by %code.
7700 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
7701 (b4_check_user_names): ... this, and change the series of valid name
7702 arguments to a single list argument for names used in the skeleton
7703 similar to the existing list argument for names used in the grammar.
7704 Warn instead of complaining.
7705 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
7706 values and %code code, to format %code code properly, and to build
7707 lists of all %define variables and %code qualifiers used in the
7708 skeleton: b4_skeleton_percent_define_variables and
7709 b4_skeleton_percent_code_qualifiers.
7710 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
7712 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
7713 the skeleton names lists can finish building first. In place of
7714 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
7715 expect the lists b4_user_percent_define_variables and
7716 b4_user_percent_code_qualifiers.
7717 * data/c++.m4: Where setting default values for b4_parser_class_name,
7718 b4_location_type, b4_filename_type, b4_namespace, and
7719 b4_define_location_comparison, update their names to the
7720 b4_percent_define_ namespace.
7721 * data/glr.c: Don't use b4_check_percent_define_variables and
7722 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7723 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
7724 (b4_parser_class_name, b4_namespace): Define these using
7725 b4_get_percent_define for parser_class_name and namespace.
7726 * data/location.cc: Use b4_get_percent_define.
7727 * data/push.c: Don't use b4_check_percent_define_variables and
7728 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7729 * data/yacc.c: Likewise, and don't call m4_exit in
7730 b4_use_push_for_pull_if or m4_wrap code will never execute.
7731 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
7733 (muscle_grow_user_name_list): ... this for consistency with the
7734 terminology used in bison.m4.
7735 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
7736 %define variable names, and rename muscle used_percent_define_variables
7737 to user_percent_define_variables.
7738 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
7739 user_percent_code_qualifiers.
7741 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
7742 {CODE} form is no longer accepted.
7743 * tests/input.at (Reject bad %code qualifiers): Rename to...
7744 (Reject unused %code qualifiers): ... this, and update test output.
7745 (%define error): Update test output.
7747 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
7749 Check for unrecognized %define variables similar to checking for
7750 unrecognized %code qualifiers. Check for redefined %define variables.
7751 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
7753 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
7754 (b4_check_percent_define_variables): New, also wraps it.
7755 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
7756 variables using b4_check_percent_define_variables.
7757 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
7758 all those exercised in the test suite and all those listed in the
7759 `Default values' section of c++.m4. Are there others?
7760 * data/push.c, data/yacc.c: Declare no valid %define variables.
7761 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
7762 similar to muscle_find, but it works even when the muscle stores a
7764 (muscle_grow_used_name_list): New function for constructing the used
7765 name list muscles that b4_check_for_unrecognized_names requires.
7766 * src/parse-gram.y (prologue_declaration): Warn if a variable is
7767 %define'd more than once. Define the b4_used_percent_define_variables
7768 muscle with muscle_grow_used_name_list.
7769 (grammar_declaration): Abbreviate %code code with
7770 muscle_grow_used_name_list.
7771 * tests/input.at (%define errors): New.
7773 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7775 Provide warn_at, complain_at, and fatal_at function callbacks to the
7776 skeletons, and use this for %code qualifier complaints.
7777 * data/bison.m4 (b4_error_at): New, invoked by...
7778 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
7779 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
7780 @fatal_at(...@) directives.
7781 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
7782 qualifiers in b4_used_percent_code_qualifiers and to use
7784 * src/location.c, src/location.h (boundary_set_from_string): New global
7786 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
7788 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
7789 to b4_used_percent_code_qualifiers.
7790 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
7792 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
7793 (lineno): Rename to...
7794 (out_lineno): ... this so I don't misunderstand it again.
7795 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
7796 here; these newlines are in the input but not the output file.
7797 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
7798 (at_directive_perform): ... this new static function, and add handling
7799 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
7801 * tests/input.at (Reject bad %code qualifiers): Update test output with
7802 locations and extend.
7804 * tests/output.at (Output file name: [, Output file name: ]): Remove
7805 bogus comment about these tests failing.
7807 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7809 Clean up b4_check_percent_code_qualifiers a little.
7810 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
7811 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
7812 documentation and add examples.
7813 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
7816 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7818 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
7819 unreliable -- especially when they're hidden inside another macro.
7820 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
7821 data/c.m4: Remove m4_divert(-1).
7822 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7823 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
7824 m4_divert_push(0) and m4_divert_pop(0).
7825 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
7826 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
7827 pushed and popped by m4sugar, should be first on the stack.
7829 Provide warn, complain, and fatal function callbacks to the skeletons.
7830 This provides more flexibility than m4_fatal, improves the error
7831 message format, and captures messages for translation. Discussed
7833 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
7834 * data/bison.m4 (b4_error): New, invoked by...
7835 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
7836 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
7837 directives. Because these M4 macros might be called when the current
7838 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
7839 the previous removal of uses of m4_divert, which caused trouble.
7840 (b4_check_percent_code_qualifiers): Use b4_complain instead of
7841 m4_fatal to report unrecognized %code qualifiers.
7842 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
7843 push parser requests.
7844 * data/glr.c: Use b4_complain instead of m4_fatal to report
7845 non-deterministic push parser requests.
7846 Update @output usage to @output(...@) form.
7847 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
7848 report missing %defines. Update @output usage to @output(...@) form.
7849 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
7851 * src/main.c (main): Invoke skel_scanner_free.
7852 * src/scan-skel.h (skel_scanner_free): Prototype new function.
7853 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
7854 obstack_for_string from flex-scanner.h.
7855 (YY_DECL): Use to declare skel_lex static.
7856 (decode_at_digraphs): Remove; now handled in the new
7857 SC_AT_DIRECTIVE_ARG start condition.
7858 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
7860 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
7861 at_directive_argv): New static globals.
7862 (INITIAL): Use fail_for_invalid_at.
7863 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
7864 recognize the start of a generalized `@directive(...@)' form and
7866 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
7867 directive args (using the new obstack_for_string), to decode the
7868 contained @ diagraphs, and to perform the directive. It recognizes
7869 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
7871 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
7872 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
7874 (scan_skel): Initialize obstack_for_string on the first call.
7875 (skel_scanner_free): New function to free obstack_for_string.
7876 * tests/input.at (Reject bad %code qualifiers): Update test output.
7878 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
7880 Consolidate the 4 prologue alternative directives (%code, %requires,
7881 %provides, and %code-top) into a single %code directive with an
7882 optional qualifier field. Discussed at
7883 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
7884 * NEWS (2.3a+): Rewrite the existing entry for the prologue
7886 * doc/bison.texinfo (Prologue Alternatives): Update.
7887 (Decl Summary): Update to %code "requires" and %code "provides".
7888 (Calc++ Parser): Update to %code "requires".
7889 (Table of Symbols): Remove entries for %requires, %provides, and
7890 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
7891 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
7892 are replaced by b4_percent_code_provides and b4_percent_code_requires,
7893 which are skeleton-specific.
7894 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
7895 declare what %code qualifiers it supports and to complain if any other
7896 qualifiers were used in the grammar.
7897 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
7898 and b4_user_code([b4_percent_code_provides]) in place of
7899 b4_user_requires and b4_user_provides.
7900 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
7901 Add b4_user_code([b4_percent_code_top]) and
7902 b4_user_code([b4_percent_code]).
7903 Invoke b4_check_percent_code_qualifiers.
7904 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7905 PERCENT_REQUIRES): Remove.
7906 (grammar_declaration): Remove RHS's for %code-top, %provides, and
7907 %requires. Rewrite the %code RHS as the unqualified form defining the
7908 muscle b4_percent_code. Add another RHS for the qualified %code form,
7909 which defines muscles of the form b4_percent_code_QUALIFIER and the
7910 b4_used_percent_code_qualifiers muscle.
7911 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7912 PERCENT_REQUIRES): Remove.
7913 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
7914 %code "requires" and %code "provides".
7915 * tests/input.at (Reject bad %code qualifiers): New.
7917 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7919 Use the new code_props interface for destructors and printers.
7920 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
7921 printer_location members, and change the type of the destructor and
7922 printer members to code_props.
7923 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
7924 symbol_printer_get, semantic_type_destructor_set,
7925 semantic_type_printer_set, default_tagged_destructor_set,
7926 default_tagless_destructor_set, default_tagged_printer_set,
7927 default_tagless_printer_set): Use code_props in arguments and return
7928 types in place of char const * and location.
7929 (symbol_destructor_location_get, symbol_printer_location_get): Remove
7930 since the locations are now contained in the return of
7931 symbol_destructor_get and symbol_printer_get.
7932 * src/output.c (symbol_destructors_output, symbol_printers_output):
7934 (symbol_code_props_output): ... this to eliminate duplicate code.
7935 (output_skeleton): Update to use symbol_code_props_output.
7936 * src/reader.c (symbol_should_be_used): Update use of
7937 symbol_destructor_get.
7938 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7939 Update uses of the various _destructor_set and _printer_set functions.
7940 * src/symtab.c: (default_tagged_destructor_location,
7941 default_tagless_destructor_location, default_tagged_printer_location,
7942 default_tagless_printer_location): Remove since we...
7943 (default_tagged_destructor, default_tagless_destructor,
7944 default_tagged_printer, default_tagless_printer): ... change the type
7945 of these to code_props.
7946 (symbol_new, semantic_type_new, symbol_destructor_set,
7947 semantic_type_destructor_set, symbol_destructor_get,
7948 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
7949 symbol_check_alias_consistency, default_tagged_destructor_set,
7950 default_tagless_destructor_set, default_tagged_printer_set,
7951 default_tagless_printer_set): Update.
7952 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
7953 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
7955 (symbol_print): Use SYMBOL_CODE_PRINT.
7957 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7959 Use the new code_props interface for rule actions.
7960 * src/symlist.h (symbol_list): Replace action, action_location, and
7961 used members with a code_props action_props member.
7962 * src/reader.c (symbol_should_be_used, grammar_rule_check,
7963 grammar_midrule_action, grammar_current_rule_merge_set,
7964 grammar_current_rule_symbol_append, packgram): Update.
7965 * src/scan-code.h (translate_rule_action): Remove, no longer used.
7966 * src/scan-code.l (handle_action_dollar): Update.
7967 (translate_rule_action): Remove, no longer used.
7968 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
7970 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7972 Use the new code_props interface in parse-gram.y.
7973 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
7974 Update all uses of translate_* functions to use the new code_props
7975 interface and to use gram_scanner_last_string_free and
7976 code_scanner_last_string_free where possible.
7977 (grammar_declaration): symbol_list_destructor_set and
7978 symbol_list_printer_set now perform the translation, so don't do it
7979 here. Use gram_scanner_last_string_free where possible.
7980 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
7981 translate_code): Remove, no longer used.
7982 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
7983 symbol_list_printer_set): Perform code translation here rather than
7984 depending on the caller to do so.
7986 * src/symlist.h (struct symbol_list): Correct some documentation typos.
7987 * src/scan-gram.h (gram_last_string): Remove declaration.
7988 * src/scan-gram.l (last_string): Declare it static.
7990 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7992 Encapsulate code properties and related functionality for the various
7993 destructors, printers, and actions into a code_props structure and
7994 interface. This patch merely implements code_props in scan-code.h and
7995 scan-code.l. Future patches will rewrite other modules to use it.
7996 Discussed starting at
7997 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
7998 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
7999 consistently initialize const structs that have an empty location
8001 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
8002 to ensure consistency.
8003 * src/scan-code.h (code_props): New structure.
8004 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
8005 function, macro, and const global variable for initializing a
8006 code_props with no code.
8007 (code_props_plain_init, code_props_symbol_action_init,
8008 code_props_rule_action_init, code_props_translate_code): The rest of
8009 the new code_props functional interface. Among other things, the init
8010 functions set the code_props kind field so that
8011 code_props_translate_code will know whether to behave like
8012 translate_symbol_action, translate_rule_action, or translate_code.
8013 These old translate functions must remain until all other modules are
8014 updated to use the new code_props interface.
8015 (code_scanner_last_string_free): New function similar to
8016 gram_scanner_last_string_free.
8017 (code_scanner_free): Add documentation.
8018 * src/scan-code.l: Implement the new interface.
8019 (code_lex): Make it static, add a code_props* argument, and remove the
8021 (last_string): New static global similar to the one in scan-gram.l.
8022 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
8024 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
8025 code_props since Bison may one day use this information for destructors
8027 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
8028 (handle_action_dollar): Use symbol_list_n_get and set used flag
8029 directly since symbol_list_n_used_set is removed.
8030 (translate_action): Add a code_props* argument and remove the rule,
8031 action, and location arguments. Pass the code_props* on to code_lex.
8032 (translate_rule_action, translate_symbol_action, translate_code):
8033 Rewrite as wrappers around the new code_props interface.
8034 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
8035 it would eventually need to break the encapsulation of code_props.
8037 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
8039 * etc/.cvsignore: New.
8041 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
8043 Add maintainer-push-check to run maintainer-check using push parsing in
8044 place of pull parsing where available.
8045 * Makefile.am (maintainer-push-check): New.
8046 * data/bison.m4 (b4_use_push_for_pull_if): New.
8047 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
8048 appropriately based on their existing values.
8049 (yypush_parse): Don't print push-parser-specific diagnostics if push
8050 parsing is being used in place of pull parsing.
8051 * data/yacc.c: If push parsing should replace pull parsing, redirect to
8053 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
8054 variable, and insert b4_use_push_for_pull_flag into muscles.
8055 * tests/Makefile.am (maintainer-push-check): New.
8057 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
8059 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
8060 (whether successful or failed) so that yypush_parse can be invoked
8061 again to start a new parse using the same yypstate.
8062 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
8063 check multiple yypull_parse invocations on the same yypstate. For pull
8064 mode, extend to check multiple yyparse invocations.
8065 (Exploding the Stack Size with Alloca): Extend to try with
8067 (Exploding the Stack Size with Malloc): Likewise.
8069 * tests/calc.at (Simple LALR Calculator): Don't specify
8070 %skeleton "push.c" since %push-pull-parser implies that now.
8071 * tests/headers.at (export YYLTYPE): Don't check for the push
8072 declarations. Otherwise, this test case can't be used to see if push
8073 mode can truly emulate pull mode.
8074 * tests/input.at (Torturing the Scanner): Likewise.
8075 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
8076 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
8077 AT_YACC_IF, which now includes the case of push mode since %skeleton
8078 need not be used for push mode. This will be more intuitive once
8079 push.c is renamed to yacc.c.
8081 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
8083 For push mode, convert yyparse from a macro to a function, invoke yylex
8084 instead of passing a yylexp argument to yypull_parse, and don't
8085 generate yypull_parse or yyparse unless %push-pull-parser is declared.
8086 Discussed starting at
8087 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
8088 * data/bison.m4 (b4_pull_if): New.
8089 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
8090 * data/push.c: Improve M4 quoting a little.
8091 (b4_generate_macro_args, b4_parenthesize): Remove.
8092 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
8093 any time a pull parser is requested.
8094 Don't #define this as a wrapper around yypull_parse. Instead, when
8095 both push and pull are requested, make it a function that does that
8097 (yypull_parse): If there's a b4_prefix, #define this to
8098 b4_prefix[pull_parse] when both push and pull are requested.
8099 Don't define this as a function unless both push and pull are
8101 Remove the yylexp argument and hard-code yylex invocation instead.
8102 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
8104 * src/getargs.c (pull_parser): New global initialized to true.
8105 * getargs.h (pull_parser): extern it.
8106 * src/output.c (prepare): Insert pull_flag muscle.
8107 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
8108 (prologue_declaration): Set both push_parser and pull_parser = true for
8109 %push-pull-parser. Set push_parser = true and pull_parser = false for
8111 * src/scan-gram.l: Don't accept %push_parser as an alternative to
8112 %push-parser since there's no backward-compatibility concern here.
8113 Scan %push-pull-parser.
8114 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
8115 instead of %push-parser.
8116 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
8117 prototype it in the module that calls yyparse.
8118 * tests/input.at (Torturing the Scanner): Likewise.
8119 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
8121 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
8123 Update etc/bench.pl. Optimize push mode a little (the yyn change
8124 deserves most of the credit).
8125 * Makefile.am (SUBDIRS): Add etc subdirectory.
8126 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
8127 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
8128 yytoken, yyval, and yyloc declarations to...
8129 (yyparse or yypush_parse): ... here to improve performance. For
8130 yypush_parse invocations after the first, be sure to assign yyn its old
8132 (yypstate_new): Don't bother initializing the yyresult field since the
8133 initial value isn't used.
8134 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
8135 remove the #define that, in push mode, set it to yyps->NAME.
8136 * etc/Makefile.am: New.
8137 * etc/bench.pl: Remove and build it instead from...
8138 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
8139 "tests/bison" from the build directory by default rather than just
8140 invoking "bison" from $PATH.
8141 (calc_grammar): Update push parser code: don't declare yylval globally,
8142 don't define yyparse_wrapper, and don't #define yyparse.
8143 (bench_grammar): Update to check all working combinations of yacc.c,
8144 push.c, impure, pure, pull, and push.
8146 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
8148 For push mode, add pull wrappers around yypush_parse.
8149 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
8150 (yypull_parse): New function wrapping yypush_parse.
8151 (yyparse): New #define wrapping yypull_parse.
8152 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
8154 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
8155 prototype yylex in the module that calls yyparse, and don't prototype
8156 yyparse there. Otherwise, the yyparse expansion won't compile.
8157 * tests/input.at (Torturing the Scanner): Likewise.
8159 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
8161 Enable push parsers to operate in impure mode. Thus, %push-parser no
8162 longer implies %pure-parser. The point of this change is to move
8163 towards being able to test the push parser code by running the entire
8164 test suite as if %push-parser had been declared.
8165 * data/push.c (yypush_parse): For impure mode, remove the
8166 yypushed_char, yypushed_val, and yypushed_loc arguments.
8167 Instead, declare these as local variables initialized to the global
8168 yychar, yylval, and yylloc.
8169 For the first yypush_parse invocation only, restore the initial values
8170 of these global variables when it's time to read a token since they
8171 have been overwritten.
8172 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
8174 * tests/calc.at (Simple LALR(1) Calculator): Always declare
8175 %pure-parser along with %push-parser since this test case was designed
8176 for pure push parsers.
8177 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
8178 (AT_YACC_OR_PUSH_IF): New.
8179 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
8180 add a note that it's still wrong for some cases (as it has been for a
8182 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
8183 %push-parser no longer implies %pure-parser.
8185 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8187 Remove some unnecessary differences between the pull parser code and
8188 the push parser code. This patch enables yynerrs in push mode.
8189 * data/push.c: Reformat M4 a little.
8190 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
8191 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
8192 because push mode is on. Instead, if pure mode is on, move yynerrs
8194 (b4_declare_parser_state_variables): ... here.
8195 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
8196 to yyps->NAME so it can be used in yypush_parse.
8197 (yypush_parse): Don't omit uses of yynerrs in push mode.
8199 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8201 Fix bug such that the first pushed token's value and location are
8202 sometimes overwritten (sometimes by %initial-action) before being used.
8203 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
8204 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
8205 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
8206 more closely mimic the pull parser logic.
8207 Don't copy the pushed token to yychar, yylval, and yylloc until it's
8208 time to read a token, which is after any initialization of yylval and
8210 (gottoken): Rename label to...
8211 (yyread_pushed_token): ... for clarity and to avoid infringing on the
8214 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8216 Rearrange initialization of the parser state variables so that the
8217 skeleton doesn't have to have a copy for pull mode and another for push
8218 mode. This patch also fixes at least a bug such that yylloc was not
8219 initialized (with b4_location_initial_line and
8220 b4_location_initial_column) upon calling yypush_parse. However, that
8221 initialization now overwrites the first token's location;
8222 %initial-action assigning @$ already did the same thing, and both bugs
8223 will be fixed in a later patch.
8224 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
8225 (b4_declare_parser_state_variables): Remove initialization of yytoken,
8226 yyss, yyvs, yyls, and yystacksize.
8227 (yypstate_new): Remove initialization of some yypstate fields: yystate,
8228 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
8230 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
8231 yyps->NAME so it can be used in yypush_parse.
8232 (yyparse or yypush_parse): For yypush_parse, don't print the
8233 "Starting parse" diagnostic for invocations after the first.
8234 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
8235 yypush_parse, only do it for the first invocation.
8236 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
8237 initialization to occur in yypush_parse but only on the first
8240 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8242 * data/push.c: Add CPP guards around push parser declarations in both
8243 the header and the code file.
8244 In the code file, move the push parser declarations to the same place
8245 they appear in the header file.
8246 Clean up the M4 some, especially the inconsistent underquoting in
8247 some b4_c_function_def and b4_c_function_decl uses.
8249 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8251 Encapsulate the push parser state variables into an M4 macro so the
8252 push skeleton doesn't have to list them again for pull mode's yyparse.
8253 For push mode, remove yypush_parse's local equivalents of these
8254 variables to eliminate unnecessary copying between the two sets at
8255 run-time. This patch also fixes at least a bug related to multiple
8256 %initial-action invocations in push mode.
8257 * data/push.c (b4_declare_parser_variables): Rename to...
8258 (b4_declare_scanner_communication_variables): ... this for clarity and
8260 (b4_declare_yyparse_variables): Remove and move its contents to the one
8261 spot where it was invoked.
8262 (b4_declare_parser_state_variables): New macro containing the parser
8263 state variables required by push mode.
8264 (struct yypstate): Replace all fields but yynew with
8265 b4_declare_parser_state_variables.
8266 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
8267 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
8268 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
8269 (yyparse or yypush_parse): For yyparse in pull mode, replace local
8270 parser state variable declarations with
8271 b4_declare_parser_state_variables.
8272 Don't initialize parser state variables when calling yypush_parse since
8273 yypstate_new already does that.
8274 Invoke the user's initial action only upon the first yypush_parse
8276 Remove all code that copies between the local parser state variables
8279 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8281 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
8282 prevent a name collision in a future patch where these names will
8283 sometimes be #define'd.
8284 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
8285 since it no longer has the same name as the existing argument.
8286 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
8288 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
8289 and Joel E. Denny <jdenny@ces.clemson.edu>
8291 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
8292 that the argument is case-insensitive, and there's no `=' here.
8293 For the %skeleton entry, mention that %language is better.
8294 (Bison Options): Likewise for --language and --skeleton. Move the
8295 --skeleton entry so that the `Tuning the parser' section is sorted
8296 alphabetically on long options.
8297 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
8298 %language directive in detail here; cross-reference the %language
8299 documentation instead.
8300 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
8301 `%require "2.3b"' so that the example is always up-to-date.
8302 (Table of Symbols): Add entries for %language and %skeleton.
8303 * examples/extexi (normalize): Instead of replacing every %require
8304 argument with the current Bison version, just substitute for
8305 `@value{VERSION}'. This guarantees that we're testing what actually
8306 appears in the documentation.
8307 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
8308 rather than `@VERSION@'.
8310 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8312 * NEWS: Reword the %language news a bit, and put it earlier.
8314 * src/getargs.c (skeleton_arg): Last arg is now location const *.
8315 Rewrite to simplify the logic.
8316 (language_argmatch): Likewise.
8317 (program_name): We now own this var.
8318 * src/getargs.h (struct bison_language): Use char[] rather than
8321 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
8323 * src/complain.c (program_name): Remove decl; no longer needed.
8324 * src/main.c (program_name): Remove; now belongs to getargs.
8326 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
8328 * NEWS: Document %language.
8330 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
8332 * data/c-skel.m4, data/c++-skel.m4: New files.
8333 * data/glr.c: Complain on push parsers.
8335 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
8337 (Decl Summary): Document %language and %skeleton.
8338 (Command line): Document -L.
8340 * examples/extexi: Rewrite %require directive.
8341 * examples/calc++/Makefile.am: Pass VERSION to extexi.
8343 * src/files.c (compute_exts_from_gc): Look in language structure
8345 (compute_file_name_parts): Check whether .tab should be added.
8346 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
8347 (language, skeleton_arg, language_argmatch): New.
8348 (long_options): Add --language.
8349 (getargs): Use skeleton_arg, add -L/--language.
8350 * src/getargs.h: Include location.h.
8351 (struct bison_language, language, skeleton_arg, language_argmatch): New.
8352 * src/output.c (prepare): Pick default skeleton from struct language.
8353 Don't dispatch C skeletons here.
8354 * src/parse-gram.y (PERCENT_LANGUAGE): New.
8355 (prologue_declaration): Add "%language" rule, use skeleton_arg.
8356 * src/scan-gram.l ("%language"): New rule.
8358 * tests/calc.at: Test %skeleton and %language.
8359 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
8360 (AT_GLR_IF): Look for %skeleton "glr.cc".
8361 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
8362 (AT_YACC_IF): Reject %language.
8364 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8366 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
8367 since it wasn't used; only the typedef name 'semantic_type' is needed.
8368 Also, omit trailing white space.
8370 * bootstrap: Sync from coreutils.
8371 (gnulib_extra_files): Add build-aux/announce.gen.
8372 (slurp): Adjust .gitignore files like .cvsignore files.
8373 * build-aux/announce-gen: Remove from CVS, since bootstrap
8376 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
8378 Make %push-parser imply %pure-parser. This fixes several bugs; see
8379 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
8380 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
8382 * data/push.c: Don't bother testing b4_push_if when deciding whether
8383 to expand b4_declare_parser_variables globally.
8384 (yypush_parse): Likewise in here.
8386 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
8387 (yy_reduce_print): Reformat M4 for readability.
8389 2006-12-15 Bob Rossi <bob@brasko.net>
8390 and Joel Denny <jdenny@ces.clemson.edu>
8392 * data/push.c (yypstate): Add typedef, and update all uses of
8393 struct yypstate to just yypstate.
8394 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
8396 2006-12-14 Bob Rossi <bob@brasko.net>
8398 * data/push.c (yypush_parse): Declare prototype regardless of
8401 2006-12-14 Bob Rossi <bob@brasko.net>
8403 * data/push.c (yyparse): Remove the prototype and the #define when in
8406 2006-12-13 Bob Rossi <bob@brasko.net>
8408 * data/push.c (yypstate_init): Rename to...
8409 (yypstate_new): ... this and use b4_c_function_def.
8410 (yypstate_delete): New.
8411 (yypush_parse): Change parameters yynval and yynlloc to be const.
8412 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
8413 yypstate_delete functions.
8415 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
8417 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
8418 strange test case titles. Reported by Bob Rossi.
8420 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
8422 * TODO: Add pointer to Sylvain Schmitz's work on static detection
8423 of potential ambiguities in GLR grammers.
8425 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
8427 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
8428 `bison ', use m4_index instead of m4_substr since chopping up a string
8429 containing M4-special characters causes problems here.
8431 Fix a couple of bugs related to special characters in user-specified
8432 file names, and make it easier for skeletons to compute output file
8433 names with the same file name prefix as Bison-computed output file
8435 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
8436 b4_parser_file_name and b4_spec_defines_file instead of
8437 @output_parser_name@ and @output_header_name@, which are now redundant.
8438 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
8439 b4_parser_file_name, b4_spec_defines_file, and the new
8440 @basename(FILENAME@) instead of @output_parser_name@ and
8441 @output_header_name@, which inappropriately escaped the file names as
8443 * src/files.c (all_but_ext): Remove static qualifier.
8444 (compute_output_file_names): Move `free (all_but_ext)' to...
8445 (output_file_names_free): ... here since all_but_ext is needed later.
8446 * src/files.h (all_but_ext): Extern.
8447 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
8448 exactly what MUSCLE_INSERT_STRING used to do.
8449 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
8450 characters are escaped properly.
8451 * src/output.c (prepare): Define muscle file_name_all_but_ext as
8453 For pkgdatadir muscle, maintain previous functionality by using
8454 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
8455 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
8456 digraphs would never be expanded. Hopefully no one has M4-special
8457 characters in his Bison installation path.
8458 * src/scan-skel.l: Don't parse @output_header_name@ and
8459 @output_parser_name@ anymore since they're now redundant.
8460 In @output, use decode_at_digraphs.
8461 Parse a new @basename command that invokes last_component.
8462 (decode_at_digraphs): New.
8463 (BASE_QPUTS): Remove unused.
8464 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
8465 (Output file name): New tests.
8467 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
8469 Warn about output files that are generated by the skeletons and that
8470 conflict with other output files.
8471 * data/glr.c: Don't generate the header file here when glr.cc does.
8472 * src/files.c (file_names, file_names_count): New static globals.
8473 (compute_output_file_names): Invoke output_file_name_check for files
8474 not generated by the skeletons and remove existing checks.
8475 (output_file_name_check): New function that warns about conflicting
8477 (output_file_names_free): Free file_names.
8478 * src/files.h (output_file_name_check): Declare.
8479 * src/scan-skel.l: Invoke output_file_name_check for files generated by
8481 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
8482 (Conflicting output files): New tests.
8484 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8486 * doc/bison.texinfo: Fix a couple of typos.
8488 2006-12-08 Bob Rossi <bob@brasko.net>
8490 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
8492 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
8494 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
8495 (yypush_parse): Rename yypvars argument to yyps and remove redundant
8497 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
8498 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
8500 2006-12-07 Bob Rossi <bob@brasko.net>
8501 and Joel Denny <jdenny@ces.clemson.edu>
8503 * data/push.c (yypvarsinit): Change return type from void* to struct
8504 yypvars*. No longer cast to void* on return.
8505 (struct yypvars): Remove yylen since it need not be remembered between
8506 yypushparse invocations.
8507 (yypushparse): Don't copy between yylen and pv->yylen.
8509 2006-12-05 Bob Rossi <bob@brasko.net>
8511 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
8512 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
8513 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
8514 (struct yypvars): Remove b4_declare_parser_variables.
8515 (yypvarsinit): Remove init code for removed variables.
8516 (global scope): Do not declare b4_declare_parser_variables if
8518 (yypushparse): Add b4_declare_parser_variables.
8519 Init new local variables, and remove init code for removed
8522 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
8523 and yyparse for other modes.
8524 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
8525 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
8526 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
8527 (AT_PURE_LEX_IF): True if pure or push parser.
8529 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
8531 Document Yacc prologue alternatives and default %destructor's and
8532 %printer's as experimental. Don't mention Java yet. Discussed at
8533 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
8534 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
8535 (2.3a): Annotate this entry to say the old forms of these features were
8537 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
8538 Table of Symbols): Say they're experimental. Comment out any mention
8539 of Java (we'll want this back eventually).
8541 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
8543 Support a file name argument to %defines. Deprecate `=' in
8544 %file-prefix, %name-prefix, and %output. Discussed at
8545 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
8546 * NEWS (2.3a+): Mention.
8547 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
8548 form of %defines, and remove `=' from entries for %file-prefix,
8549 %name-prefix, and %output.
8550 * src/parse-gram.y (prologue_declaration): Implement.
8551 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
8552 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
8553 all but one occurrence of %name-prefix.
8554 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
8555 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
8556 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
8557 occurrence of each of %file-prefix and %output. Add check for %defines
8559 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
8560 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
8561 Remove the `=' from %output.
8563 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
8565 Don't escape $ in test case titles since Autoconf 2.61 now does that
8567 * tests/actions.at (Default %printer and %destructor are not for error
8568 or $undefined): Here.
8569 (Default %printer and %destructor are not for $accept): Here.
8570 * tests/input.at (Invalid $n and @n): Here.
8572 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
8574 Rename <!> to <>. Discussed starting at
8575 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
8576 * NEWS (2.3a+): Update.
8577 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
8579 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
8580 * src/scan-gram.l (INITIAL): Implement.
8581 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
8582 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
8584 * tests/actions.at (Default tagless %printer and %destructor,
8585 Default tagged and per-type %printer and %destructor,
8586 Default %printer and %destructor are not for error or $undefined,
8587 Default %printer and %destructor are not for $accept,
8588 Default %printer and %destructor for mid-rule values): Update.
8589 * tests/input.at (Default %printer and %destructor redeclared,
8590 Unused values with default %destructor): Update.
8592 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
8594 Don't let %prec take a nonterminal.
8595 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
8597 * tests/input.at (%prec takes a token): New test checking that %prec
8598 won't take a nonterminal.
8600 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8602 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
8603 it was double-quoted.
8604 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
8605 grammar is maintained with Bison's highest standards.
8606 * src/getargs.c: Fix some typos in Doxygen comments.
8608 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8610 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
8611 later. Reported by Paul Eggert in
8612 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
8613 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
8614 * src/scan-code.l (translate_action): Don't bother invoking
8615 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
8616 (code_scanner_free): Instead of invoking
8617 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
8619 * src/scan-gram.l (gram_scanner_free): Likewise.
8620 * src/scan-skel.l (scan_skel): Likewise.
8622 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
8624 * src/files.c (tr): Change return type to void.
8625 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
8626 has been called previously for the same key.
8627 (muscle_find): Return storage instead of value so that
8628 --enable-gcc-warnings doesn't produce warnings that the return discards
8629 const. aver that the value and storage are the same since storage
8630 could potentially be NULL when value is not.
8631 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
8634 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8636 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
8637 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
8638 us a slightly cleaner distribution, and also works.
8639 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
8642 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
8643 and Paul Eggert <eggert@cs.ucla.edu>
8645 Don't let Bison leak memory except when it complains.
8646 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
8647 (spec_defines_file, dir_prefix): Now char *, not const char *,
8648 since they are freed.
8649 * src/files.c: Likewise.
8650 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
8652 (tr): Now operates in-place. All uses changed.
8653 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
8655 (compute_file_name_parts, compute_output_file_names): Don't store
8656 read-only data in variables that will be freed.
8657 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
8658 src_extension, and header_extension.
8659 (output_file_names_free): New public function to free
8660 spec_verbose_file, spec_graph_file, spec_defines_file,
8661 parser_file_name, and dir_prefix.
8662 * src/getargs.c (getargs): Don't store read-only data in variables that
8664 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
8665 (which previously existed but was unused), and quotearg_free.
8666 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
8667 * src/muscle_tab.c: Likewise.
8668 (muscle_entry): Make the value char const *,
8669 and add a new storage member that is char * and can be freed.
8670 (muscle_entry_free): New private function.
8671 (muscle_init): Use it instead of free.
8672 (muscle_insert, muscle_grow): Update and use new storage member.
8673 (muscle_code_grow): Free the string passed to muscle_grow
8674 since it's not needed anymore.
8675 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
8676 add a new `char *code' member.
8677 ("{...}"): Declare semantic type as code.
8678 * src/scan-code.h (translate_rule_action):
8679 (translate_symbol_action, translate_code, translate_action): Return
8680 `char const *' rather than `char *' since external code should not free
8682 * src/scan-code.l: Likewise.
8683 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
8684 which is "{...}" in the parser.
8685 * tests/Makefile.am (maintainer-check-valgrind): Set
8686 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
8688 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
8690 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
8691 expecting a non-zero exit status sets --leak-check=summary and
8692 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
8693 this case, and we don't want to hear about it.
8695 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8697 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
8698 instead of from the template, to simplify configuration a bit.
8699 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
8700 and m4/wint_t.m4, as they are needed with the latest gnulib.
8702 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8704 Disable unset/unused mid-rule value warnings by default, and recognize
8705 --warnings=midrule-values to enable them. Discussed starting at
8706 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
8707 * NEWS (2.3a+): Mention.
8708 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
8709 warnings): Add entry for midrule-values subargument.
8710 * src/reader.c (symbol_should_be_used): Don't return true just because
8711 the value is a set/used mid-rule value unless
8712 --warnings=midrule-values was specified.
8713 * tests/input.at (Unused values, Unused values before symbol
8714 declarations): Run tests with and without --warnings=midrule-values.
8716 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
8717 than LIST_FREE directly.
8719 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8721 Finish implementing --warnings=error, which should not be implied by
8722 --warnings=all (or by its synonyms -W and --warnings without
8724 * src/complain.c (set_warning_issued): New function to report that
8725 warnings are being treated as errors and to record an error if so.
8727 (warn_at, warn): ... here.
8728 * src/getargs.c (warnings_args, warnings_types): Reorder so that
8729 "error - warnings are errors" does not appear above "all - all of the
8731 (getargs): For -W and --warnings without subarguments, don't let
8732 FLAGS_ARGMATCH set warnings_error in warnings_flag.
8733 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
8735 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8737 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
8738 empty subargument list. For example: `bison --warnings= parser.y'.
8740 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8742 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
8743 the parser header file so that gcc doesn't warn.
8745 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8747 Split the default %destructor/%printer into two kinds: <*> and <!>.
8748 Discussed starting at
8749 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
8750 * NEWS (2.3a+): Mention.
8751 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
8752 previous change today related to mid-rules.
8753 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
8754 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
8755 (TYPE_TAG_ANY): Add as <*>.
8756 (TYPE_TAG_NONE): Add as <!>.
8757 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
8759 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
8760 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
8761 * src/symlist.c (symbol_list_default_new): Split into tagged and
8763 (symbol_list_destructor_set, symbol_list_printer_set): Split
8764 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
8765 SYMLIST_DEFAULT_TAGLESS.
8766 * src/symlist.h: Update symbol_list_default*_new prototypes.
8767 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
8768 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
8769 * src/symtab.c (default_destructor, default_destructor_location,
8770 default_printer, default_printer_location): Split each into tagged and
8772 (symbol_destructor_get, symbol_destructor_location_get,
8773 symbol_printer_get, symbol_printer_location_get): Implement tagged
8774 default and tagless default cases.
8775 (default_destructor_set, default_printer_set): Split each into tagged
8776 and tagless versions.
8777 * src/symtab.h: Update prototypes.
8778 * tests/actions.at (Default %printer and %destructor): Rename to...
8779 (Default tagless %printer and %destructor): ... this, and extend.
8780 (Per-type %printer and %destructor): Rename to...
8781 (Default tagged and per-type %printer and %destructor): ... this, and
8783 (Default %printer and %destructor for user-defined end token): Extend.
8784 (Default %printer and %destructor are not for error or $undefined):
8786 (Default %printer and %destructor are not for $accept): Update.
8787 (Default %printer and %destructor for mid-rule values): Extend.
8788 * tests/input.at (Default %printer and %destructor redeclared): Extend.
8789 (Unused values with default %destructor): Extend.
8791 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8793 Don't apply the default %destructor/%printer to an unreferenced midrule
8795 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
8796 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
8797 like $@n instead of just @n so that the default %destructor/%printer
8798 logic doesn't see them as user-defined symbols.
8799 (symbol_is_dummy): Check for both forms of the name.
8800 * src/reader.c (packgram): Remove the `$' from each midrule symbol
8801 name for which the midrule value is referenced in any action.
8802 * tests/actions.at (Default %printer and %destructor for mid-rule
8804 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
8805 for change to dummy symbol names.
8807 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8809 Warn about unset midrule $$ if the corresponding $n is used.
8810 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
8812 (packgram): Before invoking grammar_rule_check on any rule, make sure
8813 all actions have already been scanned in order to set `used' flags.
8814 Otherwise, checking that a midrule's $$ is set will not always work
8815 properly because the midrule check must forward-reference the midrule's
8817 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
8820 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8822 More improvements to the documentation of the prologue alternatives:
8823 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
8825 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
8826 some text to clarify the relative importance of the new directives and
8827 to show how these directives may be viewed as code labels.
8829 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
8831 Similar to the recently removed %before-header, add %code-top as the
8832 alternative to the pre-prologue. Mentioned at
8833 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
8834 Also, let the prologue alternatives appear in the grammar section.
8835 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
8836 (prologue_declaration): Move the existing prologue alternatives to...
8837 (grammar_declaration): ... here and add %code-top.
8838 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
8840 Clean up and extend documentation for the prologue alternatives.
8841 * NEWS (2.3a+): Describe prologue alternatives.
8842 * doc/bison.texinfo (Prologue): Move discussion of prologue
8844 (Prologue Alternatives): ... this new section, and extend it to discuss
8845 all 4 directives in detail.
8846 (Table of Symbols): Clean up discussion of prologue alternatives and
8849 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8851 DJGPP specific issues.
8853 * djgpp/config.bat: config.hin has been moved to lib. Adjust
8854 config.bat accordingly.
8855 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
8856 * djgpp/config.site: Likewise.
8858 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
8860 Replace %*-header with %provides, %requires, %code. See discussion at
8861 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
8863 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
8864 (b4_user_start_header): Remove.
8865 * data/glr.c: Use new macros instead of b4_*start_header
8867 * data/glr.cc: Likewise.
8868 * data/lalr1.cc: Likewise.
8869 * data/push.c: Likewise.
8870 * data/yacc.c: Likewise.
8872 * doc/bison.texinfo: Remove %before-header, rename
8873 %{start,end,after}-header to %requires, %provides, %code.
8875 * src/parse-gram.y: Likewise (also rename token names accordingly).
8876 * src/scan-gram.l: Likewise.
8877 * tests/actions.at: Likewise.
8879 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
8881 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
8882 Problem reported by Joel E. Denny.
8884 2006-10-14 Jim Meyering <jim@meyering.net>
8886 (Sync from coreutils.)
8887 Work also when the working directory (with e.g. coreutils sources)
8888 is version controlled with git, rather than CVS.
8889 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
8891 In messages and comments, say e.g., "checked-out sources",
8892 rather than "CVS sources".
8893 (version_controlled_file): New function. Work for git as well as
8894 for CVS. Don't use grep's -q option.
8895 (slurp): Call it here, in place of CVS-specific code.
8897 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
8899 Fix testsuite for ./configure --enable-gcc-warnings:
8900 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
8901 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
8902 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
8903 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
8904 * test/regression.at (Diagnostic that expects two alternatives):
8907 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8909 * bootstrap.conf (gnulib_modules): Add config-h.
8910 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
8911 worry about HAVE_CONFIG_H.
8912 * lib/abitset.c: Likewise.
8913 * lib/bitset.c: Likewise.
8914 * lib/bitset_stats.c: Likewise.
8915 * lib/bitsetv-print.c: Likewise.
8916 * lib/bitsetv.c: Likewise.
8917 * lib/ebitset.c: Likewise.
8918 * lib/get-errno.c: Likewise.
8919 * lib/lbitset.c: Likewise.
8920 * lib/subpipe.c: Likewise.
8921 * lib/timevar.c: Likewise.
8922 * lib/vbitset.c: Likewise.
8923 * lib/bitset.c: Include "bitset.h" first, to test interface.
8924 * lib/bitset_stats.c: Include "bitset_stats.h" first.
8925 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
8926 * lib/bitsetv.c: Include "bitsetv.h" first.
8927 * lib/get-errno.c: Include "get-errno.h" first.
8928 * m4/.cvsignore: Add config-h.m4.
8929 * tests/actions.at (Default %printer and %destructor for ...):
8930 Adjust expected line numbers in output to reflect removal of #if
8931 HAVE_CONFIG_H lines.
8932 * tests/glr-regression.at (Missed %merge type warnings when ...):
8934 * tests/regression.at (Braced code in declaration in rules section):
8936 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
8937 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
8938 Include <config.h> unconditionally.
8940 * bootstrap: Sync from coreutils, as follows:
8942 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8944 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
8945 variable was sometimes used without being initialized. This
8946 messed up the installation of the INSTALL file in some cases.
8948 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8950 * bootstrap (usage, main program, symlink_to_gnulib): Add option
8951 --copy. Inspired by a suggestion from Bruno Haible.
8953 2006-10-03 Jim Meyering <jim@meyering.net>
8955 * bootstrap: Undo last change to this file, since now gnulib-tool
8956 sticks with the automake default in generating dependencies.
8958 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8960 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
8961 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
8963 * doc/bison.1: Add copyright notice.
8965 * data/glr.c: Don't include <stdarg.h>; not used.
8967 * NEWS: The -g and --graph options now output graphs in Graphviz
8968 DOT format, not VCG format.
8969 * doc/bison.1: Likewise.
8970 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
8971 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
8973 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
8974 * TODO: Remove Graphviz entry.
8975 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
8976 remove vcg.c, vcg.h, vcg_defaults.h.
8977 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
8978 * src/graphviz.c, src/graphviz.h: New files.
8979 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
8980 * src/files.h: Make comment more generic.
8981 * src/main.c (main): Likewise.
8982 * src/print_graph.h: Likewise.
8983 * src/getargs.c (usage): Make usage description more generic.
8984 * src/print_graph.c: Include graphviz.h rather than vcg.h.
8985 (static_graph, fgraph): Remove. All uses changed to pass
8986 arguments instead of sharing a static var.
8987 (print_core, print_actions, print_state, print_graph):
8988 Output graphviz format rather than VCG format.
8989 * tests/.cvsignore: Remove *.vcg; add *.dot.
8990 * tests/output.at: Expect *.dot files, not *.vcg files.
8992 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
8993 accommodates the 2006-10-08 change.
8995 2006-10-11 Bob Rossi <bob@brasko.net>
8997 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
8998 (b4_yyssa, b4_yyerror_range): New macros.
8999 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
9000 (yypvarsinit): Remove init of removed fields.
9001 (yypushparse): Remove use of removed fields; use new macros instead.
9003 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
9005 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
9006 in a push parser. Reindent slightly to match yacc.c better.
9008 2006-10-11 Bob Rossi <bob@brasko.net>
9010 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
9012 (yypvarsinit, yypushparse): Remove init of removed fields.
9013 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
9015 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
9017 * THANKS: Add Paolo Bonzini and Bob Rossi.
9019 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
9021 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
9022 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
9023 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
9024 b4_define_user_cde and uses): Remove.
9025 (b4_comment, b4_prefix, b4_sync_start): New.
9026 * data/bison.m4: New file, with most of the content removed from c.m4.
9027 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
9028 * src/output.c (output_skeleton): Pass bison.m4.
9029 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
9032 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
9034 Fix test failure reported by Tom Lane in
9035 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
9036 and try to make such failures easier to catch in the future.
9037 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
9038 that's now the caller's responsibility.
9039 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
9040 Set yychar = YYEOF if it's negative.
9041 * tests/actions.at (yylex): Abort if asked to read past EOF.
9042 * tests/conflicts.at (yylex): Likewise.
9043 * tests/cxx-type.at (yylex): Likewise.
9044 * tests/glr-regression.at (yylex): Likewise.
9045 * tests/input.at (yylex): Likewise.
9046 * tests/regression.at (yylex): Likewise.
9047 * tests/torture.at (yylex): Likewise.
9049 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
9051 Fix problems with translating English-language diagnostics.
9052 * bootstrap: Fix bug introduced in recent bootstrap changes, with
9053 respect to bison-runtime pot generation. The YY_ stuff
9054 wasn't being captured.
9055 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
9056 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
9057 * runtime-po/POTFILES.in: Add data/push.c.
9059 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
9061 Merge bootstrap changes from coreutils.
9063 2006-09-28 Jim Meyering <jim@meyering.net>
9065 Automatically generated dependencies are important even
9066 when all of the sources in a directory come from gnulib.
9067 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
9068 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
9070 2006-09-23 Jim Meyering <jim@meyering.net>
9072 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
9074 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9076 * bootstrap: Add support for --force.
9077 (usage): New function. Describe usage less tersely.
9078 (CVS_only_file): New var.
9080 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
9082 * data/push.c (YYPUSH_MORE): Make it an enum instead.
9083 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
9084 Adjust white space and comments to match GNU style better.
9086 2006-09-20 Bob Rossi <bob@brasko.net>
9088 * data/push.c (yyresult_get): Remove function.
9089 (YYPUSH_MORE): Add #define.
9090 (yypushparse): Modify return value.
9092 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9094 * stamp-h.in: Remove; no longer needed.
9095 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
9096 Remove config.h, config.hin, intl (no longer created).
9097 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
9100 Sync bootstrap from coreutils, as follows:
9102 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
9104 * bootstrap (symlink_to_gnulib): New function.
9105 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
9106 to copies-of-gnulib.
9107 (cp_mark_as_generated, slurp, gnulib_files):
9108 Avoid making a copy if it's the same as the old version.
9109 (gnulib_files): Add support for this variable (used by Bison).
9111 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9113 * src/getargs.c (usage): Rework to use conventions similar to
9114 coreutils, to make translation a bit easier and the code a bit
9115 smaller. Problem reported by Tim Van Holder.
9117 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
9119 Use some of gnulib's new modules, taken from coreutils.
9121 * bootstrap: Sync from coreutils, except add support for gnulib_files.
9122 * bootstrap.conf: New file.
9123 (gnulib_modules): Add configmake, inttypes, unistd.
9124 (XGETTEXT_OPTIONS): Add complain, complain_at,
9125 fatal, fatal_at, warn, warn_at, unexpected_end.
9126 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
9127 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
9129 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
9131 (GNULIB_AUTOCONF_SNIPPET): Remove.
9132 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
9134 * lib/.cvsignore: Add inttypes_.h.
9135 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
9136 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
9137 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
9138 no-longer-necessary initializations.
9139 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
9140 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
9141 use the unistd module.
9142 * src/system.h: Likewise.
9143 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
9144 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
9145 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
9146 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
9147 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
9148 * src/system.h: Include inttypes.h unconditionally, now that we
9149 use the inttypes module. Don't bother to include stdint.h, since
9150 inttypes.h now does that for us.
9151 (LOCALEDIR): Remove, now that we use the configmake module.
9152 * src/getargs.c: Include configmake.h.
9153 * src/main.c: Likewise.
9154 * src/output.c: Likewise.
9155 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
9156 not from $abs_top_builddir, since config.h moved.
9159 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
9160 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
9162 * src/parse-gram.y (symbol_declaration): Don't put statements
9163 before declarations; it's not portable to C89.
9164 * src/scan-code.l (handle_action_at): Likewise.
9166 * src/scan-code.l: Always initialize braces_level; the old code
9167 left it uninitialized and therefore had undefined behavior.
9169 Don't attempt to redefine 'assert', since it runs afoul of
9170 systems where standard headers (mistakenly) include <assert.h>.
9171 Instead, define and use our own alternative, called 'aver'.
9172 * src/reader.c: Don't include assert.h, since we no longer
9174 * src/scan-code.l: Likewise.
9175 * src/system.h (assert): Remove, replacing with....
9176 (aver): New function, taking a bool arg. All uses changed.
9177 * src/tables.c (pack_vector): Ensure that aver arg is bool,
9178 not merely an integer.
9180 2006-09-15 Bob Rossi <bob@brasko.net>
9182 Add support for push parsing. Based on the original work of
9183 Odd Arild Olsen <oao@fibula.no>.
9184 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
9185 * data/c.m4 (YYPUSH): New.
9186 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
9187 * data/push.c: New file.
9188 * src/getargs.c (push_parser): New var.
9189 * src/getargs.h (push_parser): New declaration.
9190 * src/output.c (prepare): Add macro insertion of `push_flag'.
9191 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
9192 (prologue_declaration): Parse %push-parser.
9193 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
9194 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
9195 list of removed lines from the traces observed.
9196 (AT_CHECK_CALC_LALR): Added push parser tests.
9198 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
9200 * NEWS: Version 2.3a.
9201 * configure.ac (AC_INIT): Likewise.
9203 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
9204 "#define YYSTYPE int" that caused "make maintainer-check" to fail
9205 due to header ordering dependencies. I don't know why the #define
9208 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
9209 runtime cost when YYDEBUG is not defined, and so that some tests
9210 that used to fail now work. Problem and initial suggestion by
9212 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
9213 * data/glr.cc (b4_parser_class_name):
9214 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
9215 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
9216 (yydebug_) [YYDEBUG]: New member.
9217 (yycdebug_): Now defined only if YYDEBUG.
9218 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
9219 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
9220 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
9222 (debug_stream, set_debug_stream, debug_level, set_debug_level):
9223 Define only if YYDEBUG.
9224 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
9226 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
9227 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
9228 AT_CHECK_CALC_GLR_CC that are working now.
9230 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
9232 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
9233 We don't need them in glr.cc, and glr.c defines them.
9234 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
9235 assumes that defining it to anything is the same as defining
9236 it to 1. Problem reported by Paolo Bonzini.
9238 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
9240 * data/c.m4 (b4_null, b4_case): Define.
9241 * src/output.c (prepare_symbols): Use b4_null.
9242 (user_actions_output): Use b4_case.
9244 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
9246 * data/glr.c (b4_shared_declarations): Put start-header first,
9247 before any #includes that we generate, so that feature-test
9248 macros work. Problem reported by Michael Deutschmann in
9249 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
9250 * data/lalr1.cc: Likewise.
9251 * doc/bison.texinfo (Prologue): Document that feature-test macros
9252 should be defined before any Bison declarations.
9253 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
9254 that depend on location.hh after, not before, Bison decls, since
9255 we now include location.hh after the first user prologue.
9257 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
9258 Sander Brandenburg in
9259 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
9260 Also, fix minor white space and comment issues.
9261 (Prologue): Mention that it's better to define feature-test macros
9262 before Bison declarations. Problem reported by Michael Deutschmann.
9264 * README-cvs: Fix typo: "&" should be "&&". Problem reported
9266 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
9267 This adjusts to recent gnulib changes.
9269 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9271 Finish implementation of per-type %destructor/%printer. Discussed
9273 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
9275 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
9276 * NEWS (2.3+): Add a description of this feature to the default
9277 %destructor/%printer description.
9278 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
9279 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
9280 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
9281 list node contains a semantic type.
9282 * src/symtab.c, src/symtab.h: Extend with a table that associates
9283 semantic types with their %destructor's and %printer's.
9284 (semantic_type_from_uniqstr, semantic_type_get,
9285 semantic_type_destructor_set, semantic_type_printer_set): New functions
9286 composing the public interface of that table.
9287 (symbol_destructor_get, symbol_destructor_location_get,
9288 symbol_printer_get, symbol_printer_location_get): If there's no
9289 per-symbol %destructor/%printer, look up the per-type before trying
9291 * tests/actions.at (Per-type %printer and %destructor): New test case.
9292 * tests/input.at (Default %printer and %destructor redeclared):
9293 Extend to check that multiple occurrences of %symbol-default in a
9294 single %destructor/%printer declaration is an error.
9295 (Per-type %printer and %destructor redeclared, Unused values with
9296 per-type %destructor): New test cases.
9298 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9300 Require default %destructor/%printer to be declared using
9301 %symbol-default instead of an empty symbol list, and start working on
9302 new per-type %destructor/%printer. Discussed at
9303 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
9304 * NEWS (2.3+): Add %symbol-default to example.
9305 * bison.texinfo (Freeing Discarded Symbols): Likewise.
9306 (Table of Symbols): Add entry for %symbol-default.
9307 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
9308 (generic_symlist, generic_symlist_item): New nonterminals for creating
9309 a list in which each item is a symbol, semantic type, or
9311 (grammar_declaration): Use generic_symlist in %destructor and %printer
9312 declarations instead of symbols.1 or an empty list.
9313 (symbol_declaration, precedence_declaration, symbols.1): Update actions
9314 for changes to symbol_list.
9315 * src/reader.c: Update for changes to symbol_list.
9316 * src/scan-code.l: Likewise.
9317 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
9318 * src/symlist.c, src/symlist.h: Extend such that a list node may
9319 represent a semantic type or a %symbol-default in addition to just an
9320 ordinary symbol. Add switched functions for setting %destructor's and
9322 * tests/actions.at, tests/input.at: Add %symbol-default to all default
9323 %destructor/%printer declarations.
9325 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
9327 Whether the default %destructor/%printer applies to a particular symbol
9328 isn't a question of whether the user *declares* that symbol (in %token,
9329 for example). It's a question of whether the user by any means
9330 *defines* the symbol at all (by simply using a char token, for
9331 example). $end is defined by Bison whereas any other token with token
9332 number 0 is defined by the user. The error token is always defined by
9333 Bison regardless of whether the user declares it with %token, but we
9334 may one day let the user define error as a nonterminal instead.
9335 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
9336 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
9337 the meaning of "user-defined".
9338 * tests/actions.at (Default %printer and %destructor for user-declared
9339 end token): Rename to...
9340 (Default %printer and %destructor for user-defined end token): ...
9343 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
9344 computation of whether to apply the default, don't maintain a list of
9345 every Bison-defined symbol. Instead, just check for a first character
9346 of '$', which a user symbol cannot have, and check for the error token.
9348 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
9350 Don't apply the default %destructor or %printer to the error token,
9351 $undefined, or $accept. This change fits the general rule that the
9352 default %destructor and %printer are only for user-declared symbols,
9353 and it solves several difficulties that are described in the new test
9355 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
9356 * tests/actions.at (Default %printer and %destructor are not for error
9357 or $undefined, Default %printer and %destructor are not for $accept):
9360 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
9362 Allow %start after the first rule.
9363 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
9364 when parsing the first rule.
9365 (check_and_convert_grammar): Search for it here after all grammar
9366 declarations have been parsed. Skip midrules, which have dummy LHS
9368 * src/symtab.c (symbol_is_dummy): New function.
9369 * src/symtab.h (symbol_is_dummy): Declare it.
9370 * tests/input.at (%start after first rule): New test.
9372 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9374 Redo some of the previous commit: add back the ability to use
9375 non-aliased/undeclared string literals since it might be useful to
9376 those declaring %token-table.
9377 * src/reader.c (check_and_convert_grammar): Undo changes in previous
9378 commit: don't worry about complaints from symbols_pack.
9379 * src/symtab.c (symbol_new, symbol_class_set,
9380 symbol_check_alias_consistency): Undo changes in previous commit: count
9381 each string literal as a new symbol and token, assign it a symbol
9382 number, and don't complain about non-aliased string literals.
9383 (symbols_pack): Since symbol_make_alias still does not decrement symbol
9384 and token counts but does still set aliased tokens to the same number,
9385 symbol_pack_processor now leaves empty slots in the symbols array.
9387 * tests/regression.at (Undeclared string literal): Remove test case
9388 added in previous commit since non-aliased string literals are allowed
9390 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
9391 remove unnecessary string literal declarations.
9392 * tests/sets.at (Firsts): Likewise.
9394 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9396 Don't allow an undeclared string literal, but allow a string literal to
9397 be used before its declaration.
9398 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
9399 symbols_pack complained.
9400 * src/symtab.c (symbol_new): Don't count a string literal as a new
9402 (symbol_class_set): Don't count a string literal as a new token, and
9403 don't assign it a symbol number since symbol_make_alias does that.
9404 (symbol_make_alias): It's not necessary to decrement the symbol and
9405 token counts anymore. Don't assume that an alias declaration occurs
9406 before any uses of the identifier or string, and thus don't assert that
9407 one of them has the highest symbol number so far.
9408 (symbol_check_alias_consistency): Complain if there's a string literal
9409 that wasn't declared as an alias.
9410 (symbols_pack): Bail if symbol_check_alias_consistency failed since
9411 symbol_pack asserts that every token has been assigned a symbol number
9412 although undeclared string literals have not.
9413 * tests/regression.at (String alias declared after use, Undeclared
9414 string literal): New test cases.
9415 (Characters Escapes, Web2c Actions): Declare string literals as
9417 * tests/sets.at (Firsts): Likewise.
9419 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
9421 In the grammar scanner, STRING_FINISH unclosed constructs and return
9422 them to the parser in order to improve error messages.
9423 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
9424 SC_BRACED_CODE, SC_PROLOGUE): Implement.
9425 * tests/input.at (Unclosed constructs): New test case.
9426 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
9429 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
9432 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
9434 Handle string aliases for character tokens correctly.
9435 * src/symtab.c (symbol_user_token_number_set): If the token has an
9436 alias, check and set its alias's user token number instead of its own,
9437 which is set to indicate the alias. Previously, every occurrence of
9438 the character token in the grammar overwrote that alias indicator with
9440 * tests/input.at (String aliases for character tokens): New test.
9442 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
9444 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
9446 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
9448 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
9449 to prevent failures when building on older platforms.
9450 Check for autopoint failure.
9451 Set XGETTEXT_OPTIONS to values that check for C format strings,
9452 so that translators are warned about them (this also helps
9453 prevent core dumps).
9455 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
9456 function, since it simplifies our code a bit.
9458 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
9459 rather than -W, so we don't get bogus warnings about sign comparisons.
9460 Add -Wpointer-arith, since that warning is useful (it reports code
9461 that does not conform to C89 and that some compilers reject).
9462 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
9463 since it's no longer needed.
9465 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
9467 Clean up scanners a bit.
9468 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
9469 definitions so gcc won't warn when obstack_for_string is unused.
9470 * src/scan-code.l: config.h and system.h are already #include'd by
9471 scan-code-c.c, so get rid of them here.
9472 * src/scan-gram.l: Likewise.
9473 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
9474 definitions rather than duplicating the rest of it.
9475 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
9477 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
9479 Suppress signed/unsigned comparison warnings for yycheck.
9480 * data/c.m4 (b4_safest_int_type): New macro.
9481 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
9482 a signed int type, cast it to b4_safest_int_type first.
9483 * data/yacc.c: Likewise.
9484 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
9487 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
9489 * doc/bison.texinfo: Fix some typos.
9491 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
9493 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
9494 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
9496 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
9497 the latest gnulib does this a different way.
9498 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
9499 translation was patched, so stop omitting it.
9501 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9503 Enable declaration of default %printer/%destructor. Make the parser
9504 use these for all user-declared grammar symbols for which the user does
9505 not declare a specific %printer/%destructor. Thus, the parser uses it
9506 for token 0 if the user declares it but not if Bison generates it as
9507 $end. Discussed starting at
9508 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
9509 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
9511 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
9512 * NEWS (2.3+): Mention.
9513 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
9514 declare a %destructor for a mid-rule's semantic value. It's just
9515 impossible to declare one specific to it.
9516 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
9517 code. Describe default %destructor form.
9518 * src/parse-gram.y (grammar_declaration): Parse default
9519 %printer/%destructor declarations.
9520 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
9521 and symbol_destructor_location_get rather than accessing the destructor
9522 and destructor_location members of struct symbol.
9523 (symbol_printers_output): Likewise but for %printer's.
9524 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
9526 * src/symtab.c (default_destructor, default_destructor_location,
9527 default_printer, default_printer_location): New static global
9528 variables to record the default %destructor and %printer.
9529 (symbol_destructor_get, symbol_destructor_location_get,
9530 symbol_printer_get, symbol_printer_location_get): New functions to
9531 compute the appropriate %destructor and %printer for a symbol.
9532 (default_destructor_set, default_printer_set): New functions to set the
9533 default %destructor and %printer.
9534 * src/symtab.h: Prototype all those new functions.
9535 * tests/actions.at (Default %printer and %destructor): New test to
9536 check that the right %printer and %destructor are called, that they're
9537 not called for $end, and that $$ and @$ work correctly.
9538 (Default %printer and %destructor for user-declared end token): New
9539 test to check that the default %printer and %destructor are called for
9540 a user-declared end token.
9541 * tests/input.at (Default %printer and %destructor redeclared, Unused
9542 values with default %destructor): New tests to check related grammar
9543 warnings and errors.
9545 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9547 Clean up handling of %destructor for the end token (token 0).
9548 Discussed starting at
9549 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
9551 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
9553 Make the skeletons consistent in how they pop the end token and invoke
9555 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
9556 state, which has token number 0, since this would invoke the
9557 %destructor for the end token.
9558 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
9559 until after shifting the end token, or else it won't be popped.
9560 * data/yacc.c (yyparse): Likewise.
9562 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
9563 it's the end token. Upon termination, destroy an unshifted lookahead
9564 even when it's the end token.
9565 * data/lalr1.cc (yy::parser::parse): Likewise.
9566 * data/yacc.c (yyparse): Likewise.
9568 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
9569 value warnings for the end token when the user gives the end token a
9572 * tests/actions.at (Printers and Destructors): Test all the above.
9574 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
9576 Update to latest gnulib and gettext versions.
9577 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
9579 (gnulib_files): Add m4/warning.m4. Don't worry about files
9580 overwritten by autopoint.
9581 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
9582 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
9584 Don't use autoreconf; instead, invoke autopoint etc. by hand,
9585 so that we can remove the intl files at a better time.
9586 (intl_files_to_remove): Remove aclocal.m4, since it gets
9587 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
9588 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
9589 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
9590 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
9591 Remove datarootdir hack; no longer needed.
9592 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
9593 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
9594 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
9596 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
9597 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
9599 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
9601 * bootstrap: Adjust to today's change to gnulib-tool by invoking
9602 it with --assume-autoconf='latest-stable'.
9604 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
9606 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
9607 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
9609 * src/muscle_tab.h (muscle_grow): Replace the header comments with
9610 those from muscle_tab.c since the old ones are misleading.
9612 2006-07-13 Akim Demaille <akim@epita.fr>
9614 Support %define "KEY" {VALUE}.
9615 * src/scan-code.h, src/scan-code.l (translate_action)
9616 (translate_rule_action, translate_symbol_action, translate_code):
9617 Return char *, not const char *.
9618 * src/parse-gram.y (declaration): Rename as...
9619 (prologue_declaration): this.
9620 (string_content): Remove this nonterminal, use STRING.
9621 (braceless, content, content.opt): New nonterminal.
9623 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
9625 * src/scan-gram.l (getargs.h): Don't include it.
9627 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
9629 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
9630 rather than a for-loop that declares a local bool variable. This
9631 should work around a compatibility problem with a Cray x1e C++
9632 compiler reported by Hung Nguyen in
9633 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
9634 The for-loop was introduced in the 2004-11-17 change but I don't
9635 know why it was needed.
9637 2006-07-12 Akim Demaille <akim@epita.fr>
9639 * data/c.m4: Comment changes.
9641 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
9643 * src/complain.c (error_message, ERROR_MESSAGE): New.
9645 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
9646 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
9648 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9650 * NEWS: Instead of %union, you can define and use your own union type
9651 YYSTYPE if your grammar contains at least one <type> tag.
9652 Your YYSTYPE need not be a macro; it can be a typedef.
9653 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
9654 (Union Decl, Decl Summary): Document this.
9655 * data/glr.c (YYSTYPE): Implement this.
9656 * data/glr.cc (YYSTYPE): Likewise.
9657 * data/lalr1.cc (YYSTYPE): Likewise.
9658 * data/yacc.c (YYSTYPE): Likewise.
9659 * src/output.c (prepare): Output tag_seen_flag.
9660 * src/parse-gram.y (declaration, grammar_declaration):
9661 Use 'union_seen' rather than 'typed' to determine whether
9662 %union has been seen, since grammars can now be typed without
9664 (symbol_declaration, type.opt, symbol_def):
9665 Keep track of whether a tag has been seen.
9666 * src/reader.c (union_seen, tag_seen): New vars.
9668 * src/reader.h (union_seen, tag_seen, typed): Likewise.
9669 * src/scan-code.l (untyped_var_seen): New variable.
9670 (handle_action_dollar): Adjust to above changes.
9671 (handle_action_dollar, handle_action_at):
9672 Improve overflow checking for outlandish numbers.
9673 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
9674 avoid new diagnostics generated by above changes.
9675 * tests/regression.at (YYSTYPE typedef): Add test to check
9676 for type tags without %union.
9678 * src/symlist.c (symbol_list_length): Return int, not unsigned
9679 int, since callers expect int. This may need to get revisited
9680 once we have proper integer overflow checking.
9682 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
9683 object is now static.
9685 * src/getargs.c (flags_argmatch): Return void, not int,
9686 to pacify ./configure --enable-gcc-warnings.
9688 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
9689 since last_string is already defined to FLEX_PREFIX (last_string).
9691 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9693 Implement --warnings/-W.
9694 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
9696 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
9698 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
9699 (warnings_args, warnings_types): New.
9700 (getargs, short_options, long_options): Accept -W/--warnings.
9701 Sort the options by alphabetical order, upper case letter right
9702 before its lower case.
9704 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
9706 Change %merge result type clash warnings to errors. Discussed at
9707 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
9708 * src/reader.c (record_merge_function_type): Use complain_at.
9709 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9710 declared later): Update test case results.
9712 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9714 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
9715 to be in alphabetical order.
9716 (trace_args): Spelling fixes.
9718 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9720 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
9721 so they don't collide with user-defined macros.
9722 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
9723 this was never guaranteed, and now that we're using gnulib stdint,
9724 which defines int_fast16_t to long int, the problem is exposed.
9726 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
9728 * data/c.m4 (b4_basename): Simplify a bit, since we don't
9729 need the full POSIX semantics (and weren't implementing them
9732 Adjust to Autoconf 2.60 and today's gnulib.
9733 * bootstrap (gnulib_modules): Add stdint.
9734 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
9735 no longer copies it.
9736 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
9737 since stdint needs the former and wcwidth (which is now required
9738 by mbswidth) needs the latter.
9739 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
9740 work around a compatibility glitch between gettext 0.14.6 and
9742 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
9743 Do not check for uintptr_t, since new stdint module does the right
9745 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
9746 Add stdint.h, stdint_.h, wcwidth.h.
9747 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
9748 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
9749 stdint.m4, wchar_t.m4, wcwidth.m4.
9750 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
9751 usual order for ../lib/*.h files.
9752 (file_name_split): Use last_component, not base_name, to adjust
9754 * src/parse-gram.h: Include <strverscmp.h> in the usual order
9755 for ../lib/*.h files.
9756 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
9757 Define unconditionally, since we now assume the stdint module.
9758 * src/scan-skel.l: Include <dirname.h>.
9759 (BASE_QPUTS): Use last_component, not base_name.
9760 * src/system.h: Include <unlocked-io.h> in the usual order
9761 for ../lib/*.h files. Include <stdint.h> unconditionally,
9762 since we now use the stdint module.
9763 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
9764 HAVE_UINTPTR_T, since we now use the stdint module.
9765 (base_name): Remove decl, since files now include <dirname.h>
9768 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9770 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
9772 * data/yacc.c, data/glr.c, data/location.cc: Use them.
9773 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
9775 * tests/calc.at: Adjust.
9777 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9779 * data/c.m4 (b4_basename): New.
9780 (b4_syncline): Also output the location of its invocation (from
9782 (b4_user_action, b4_define_user_action, b4_user_actions)
9783 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
9784 (b4_user_stype): New.
9785 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
9787 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9789 In the grammar file, the first column is 1 not 0 on the first line as
9790 on every other line.
9791 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
9792 * tests/input.at (Torturing the Scanner): Update output.
9794 * src/scan-gram.l (scanner_cursor): Declare it static.
9796 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9798 In warnings, say "previous declaration" rather than "first
9800 * src/symtab.c (redeclaration): Do that here.
9801 * src/reader.c (record_merge_function_type): In the case of a result
9802 type clash, report the previous declaration rather than the very first
9803 one in the grammar file.
9804 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9805 declared later): Add a third declaration to check this behavior.
9806 * tests/input.at (Incompatible Aliases): Update output.
9808 2006-06-27 Akim Demaille <akim@epita.fr>
9810 * doc/Doxyfile.in: New.
9811 * doc/Makefile.am: Use it.
9812 * src/lalr.h, src/symtab.h: Initial doxygenation.
9814 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9816 Don't miss %merge result type warnings just because the LHS types are
9817 declared after the %merge. This continues the effort of the previous
9819 * src/reader.c (get_merge_function): Don't set the merger type yet.
9820 (record_merge_function_type): New function for setting the merger type
9821 and checking for clashes.
9822 (grammar_current_rule_merge_set): Set the location of the %merge for
9824 (packgram): Invoke record_merge_function_type for each rule now that
9825 all symbol type declarations have been parsed.
9826 * src/reader.h (merger_list.type_declaration_location): New member
9827 storing the location of the first %merge from which the type for this
9828 merging function was derived.
9829 * src/symlist.h (symbol_list.merger_declaration_location): New member
9830 storing the location of a rule's %merge, if any.
9831 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9832 declared later): New test to catch the error fixed by the above patch.
9834 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9836 Get action warnings (grammar_rule_check) right even when symbol
9837 declarations appear after the rules. Discussed at
9838 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
9840 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
9841 Don't mistake the type of $$ in a midrule to be that of its parent
9843 * src/reader.c (grammar_current_rule_end): Don't invoke
9844 grammar_rule_check yet since not all symbol declarations may have been
9846 (grammar_midrule_action): Likewise.
9847 Don't record whether the midrule's $$ has been used yet since actions
9848 haven't been translated yet.
9849 Record the midrule's parent rule and its RHS index within the parent
9851 (grammar_current_rule_action_append): Don't translate the action yet
9852 since not all symbol declarations may have been parsed yet and, thus,
9853 warnings about types for $$, $n, @$, and @n can't be reported yet.
9854 (packgram): Translate the action and invoke grammar_rule_check now that
9855 all symbol declarations have been parsed.
9856 * src/scan-code.l (handle_action_dollar): Now that this is invoked
9857 after parsing the entire grammar file, the symbol list here in the case
9858 of a midrule is actually the midrule's empty RHS, so reference its
9859 parent rule's RHS where necessary.
9860 On the other hand, now that you can already know it's a midrule, you
9861 aren't forced to think $$ has the same type as its parent rule's $$.
9862 (handle_action_at): In the case of a midrule, reference the parent rule
9864 * src/symlist.c (symbol_list_new): Initialize new midrule-related
9866 (symbol_list_length): Now that this is invoked after all rules have
9867 been parsed, a NULL symbol (rather than a NULL symbol list node)
9868 terminates a rule. symbol_list_print already does this correctly.
9869 * src/symlist.h (symbol_list.midrule_parent_rule,
9870 symbol_list.midrule_parent_rhs_index): New members so that midrules can
9871 remember their relationships with their parents.
9872 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
9873 fixed by the above patch.
9874 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
9876 (Unused values): ... this old test case and...
9877 (Unused values before symbol declarations): ... this new test case.
9878 This one is the same as `Unused values' except that all symbol
9879 declarations appear after the rules in order to catch the rest of the
9880 errors fixed by the above patch.
9882 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9885 * src/reader.c (current_rule): Declare it static since it's no longer
9886 used outside this file.
9887 (grammar_current_rule_action_append): Remove redundant arguments from
9888 translate_rule_action invocation.
9889 * src/reader.h (current_rule): Remove this unused extern.
9890 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
9891 * src/scan-code.l (translate_rule_action): Likewise.
9893 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
9895 Clean up yesterday's patch.
9896 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
9898 * src/reader.c (grammar_current_rule_action_append): ... here for
9899 consistency with grammar_current_rule_symbol_append.
9900 * tests/regression.at (Braced code in declaration in rules section):
9901 Make yyerror and yylex static as usual.
9903 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
9905 Fix bug that mistakes braced code in a declaration in the rules section
9906 to be a rule action. Mentioned at
9907 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
9908 * src/scan-gram.l: Move midrule action detection from the start of the
9909 scanning of any braced code to...
9910 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
9911 action. For readability, use $2 and @2 rather than the equivalent
9913 * tests/regression.at (Braced code in declaration in rules section):
9914 New test to catch the error fixed by the above patch.
9916 Work on code readability some.
9917 * src/scan-code.l (current_rule): Get rid of this misleading and
9918 redundant declaration: it's actually extern'ed in reader.h.
9919 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
9920 translate_action): Add a rule argument and use it instead of the global
9922 (translate_rule_action): This already receives current_rule through an
9923 argument, so pass it on to translate_action instead of assigning
9924 current_rule to current_rule.
9925 (translate_symbol_action, translate_code): Pass rule = NULL to
9928 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
9930 Rename %before-definitions to %start-header and %after-definitions to
9931 %end-header. Don't use these declarations to separate pre-prologue
9932 blocks from post-prologue blocks. Add new order-independent
9933 declarations %before-header and %after-header as alternatives to the
9934 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
9935 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
9936 * NEWS (2.3+): Update for these changes.
9937 * data/glr.c (b4_before_definitions): Update to...
9938 (b4_start_header): ... this.
9939 (b4_after_definitions): Update to...
9940 (b4_end_header): ... this.
9941 * data/glr.cc: Likewise.
9942 * data/lalr1.cc: Likewise.
9943 * data/yacc.c: Likewise.
9944 * doc/bison.texinfo (The prologue): Update names, and replace remaining
9945 prologue blocks with %*-header declarations.
9946 (Calc++ Parser): Likewise.
9947 (Decl Summary): Update names.
9948 (Table of Symbols): Update description.
9949 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
9950 (PERCENT_END_HEADER): ... this.
9951 (PERCENT_BEFORE_DEFINITIONS): Update to...
9952 (PERCENT_START_HEADER): ... this.
9953 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9954 (declaration): Update token names and m4 macro names.
9955 When parsing %end-header and %start-header, invoke translate_code
9956 before muscle_code_grow, and no longer set global booleans to remember
9957 whether these declarations have been seen.
9958 Parse new %after-header and %before-header.
9959 * src/reader.c (before_definitions, after_definitions): Remove.
9960 (prologue_augment): Accept a new bool argument to specify whether to
9961 augment the pre-prologue or post-prologue.
9962 * src/reader.h (before_definitions, after_definitions): Remove these
9964 (prologue_augment): Add new bool argument.
9965 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
9966 (PERCENT_END_HEADER): ... this.
9967 (PERCENT_BEFORE_DEFINITIONS): Update to...
9968 (PERCENT_START_HEADER): ... this.
9969 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9970 * tests/actions.at (Printers and Destructors): Update names.
9972 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
9974 Add comparison operators for C++ location classes. Discussed at
9975 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
9976 * data/c++.m4 (b4_define_location_comparison): New boolean %define
9977 declaration indicating whether filename_type has an operator==. If
9978 filename_type is `std::string', it defaults to `1', `0' otherwise.
9979 * data/location.cc: Iff b4_define_location_comparison is `1', add
9980 operator== and operator!= for class position and for class location.
9983 * src/scan-action.l: Remove unused file.
9984 * src/symtab.c (symbol_printer_set): Use printer_location not
9985 destructor_location.
9986 * src/symtab.h (struct symbol): Replace incorrect source comment for
9988 * tests/input.at (Incompatible Aliases): Update output with correct
9991 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
9993 Don't put the pre-prologue in the header file. For the yacc.c code
9994 file and the glr.c header and code files, move the pre-prologue before
9995 the token definitions. Add new %before-definitions and
9996 %after-definitions to declare code that will go in both the header file
9997 and code file. Discussed at
9998 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
9999 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
10001 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
10002 * NEWS (2.3+): Describe these changes.
10003 * data/glr.c (b4_pre_prologue): Move from within to before...
10004 (b4_shared_declarations): ... this.
10005 Add new b4_before_definitions before b4_token_enums.
10006 Add new b4_after_definitions at the end.
10007 * data/glr.cc (b4_pre_prologue): Replace with...
10008 (b4_before_definitions): ... this in the header file.
10009 (b4_after_definitions): New near the end of the header file.
10010 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
10011 code file right before including the header file.
10012 (b4_before_definitions): New in the previous position of
10013 b4_pre_prologue in the header file.
10014 (b4_after_definitions): New near the end of the header file.
10015 * data/yacc.c: Clean up some m4 quoting especially in the header file.
10016 (b4_token_enums_defines): In the code file, move to right before
10017 YYSTYPE for consistency with the header file.
10018 (b4_before_definitions): New right before b4_token_enums_defines in
10019 both the header and code file.
10020 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
10021 header and code file.
10022 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
10023 of prologues for %union dependencies.
10024 (Decl Summary): In %defines description, mention the effect of
10025 %before-definitions and %after-definitions on the header file.
10026 (Calc++ Parser): Forward declare driver in a %before-definitions rather
10027 than in the pre-prologue so that make check succeeds.
10028 (Table of Symbols): Add entries for %before-definitions and
10029 %after-definitions.
10030 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
10031 %before-definitions.
10032 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
10033 (declaration): Parse those declarations and append to
10034 b4_before_definitions and b4_after_definitions, respectively.
10035 * src/reader.c (before_definitions, after_definitions): New bools to
10036 track whether those declarations have been seen.
10037 (prologue_augment): Add to the post-prologue if %union,
10038 %before-definitions, or %after-definitions has been seen.
10039 * src/reader.h (before_definitions, after_definitions): New extern's.
10040 * src/scan-gram.l: Scan the new declarations.
10041 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
10042 prologue block in a %before-definitions or a %after-definitions based
10043 on whether the %union is declared.
10044 * tests/regression.at (Early token definitions with --yacc, Early token
10045 definitions without --yacc): Move tests for token definitions into the
10046 post-prologue since token names are no longer defined in the
10049 2006-06-20 Akim Demaille <akim@epita.fr>
10051 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
10052 (symbol_get): Use it.
10053 * src/parse-gram.y: Use it.
10055 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
10057 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
10058 build succeeds when configured with --enable-gcc-warnings.
10060 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
10062 * src/parse-gram.y (char_name): New function.
10063 (CHAR, STRING, string_content): For %printer, properly escape.
10064 (ID): Prefer fputs to fprintf.
10065 (id): Reindent to be consistent with other rules.
10066 Properly quote char.
10068 The Translation Project changed its way of publishing translations
10069 to maintainers. I haven't received any responses to my request
10070 for supporting the old way, or for documenting the new way. I
10071 have modified 'bootstrap' to use screen scraping
10072 (in this case, HTML scraping). This is unreliable and inelegant,
10073 but I don't see any better way. Yuck.
10074 * bootstrap (TP_URL, WGET_COMMAND): New vars.
10075 (get_translations): New function, which uses HTML scraping to
10076 deduce locations of latest translations.
10077 Use this function to grab both bison and bison-runtime .po files.
10078 Don't bother priming the pump for the runtime-po domain any more,
10079 as it's now translated better than bison is.
10081 2006-06-19 Akim Demaille <akim@epita.fr>
10083 * src/scan-gram.l: No longer "parse" things after `%union' until
10084 `{'. Rather, return a single "%union" token.
10085 No longer make symbols: return strings, and leave the conversion
10086 to symbols to the parser.
10087 (SC_PRE_CODE, token_type): Remove.
10088 * src/parse-gram.y (%union): New field `character'.
10091 (ID, ID_COLON): Now that the scanner no longer makes them
10092 identifiers, adjust all uses to invoke symbol_get.
10093 (id_colon): New, wraps the conversion from string to symbol.
10094 (%union): Accept a possible union_name.
10095 (symbol): Now can be a char.
10096 * data/c.m4 (b4_union_name): Leave a default value.
10097 * data/glr.c, data/yacc.c: Use it.
10099 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
10101 For associating token numbers with token names for "yacc.c", don't use
10102 #define statements unless `--yacc' is specified; always use enum
10103 yytokentype. Most important discussions start at:
10104 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
10105 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
10107 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
10108 * NEWS (2.3+): Mention.
10109 * data/c.m4 (b4_yacc_if): New.
10110 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
10112 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
10113 on token name definitions.
10114 * src/getargs.c (usage): Capitalize `Yacc' in English.
10115 * src/output.c (prepare): Define b4_yacc_flag.
10116 * tests/regression.at (Early token definitions): Test that tokens names
10117 are defined before the pre-prologue not just before the post-prologue.
10118 Remove this test case and copy to...
10119 (Early token definitions with --yacc): ... this to test #define's.
10120 (Early token definitions without --yacc): ... and this to test enums.
10122 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
10124 * NEWS: Reword the post-2.3 change to not be so optimistic about
10125 removing the old "look-ahead" spelling.
10126 Update previous look-ahead/lookahead change reports.
10127 * REFERENCES: look-ahead -> lookahead (since that's
10128 what he actually wrote).
10129 * doc/refcard.tex: look ahead -> lookahead,
10130 look-ahead -> lookahead
10132 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
10134 For consistency, use `lookahead' instead of `look-ahead' or
10135 `look_ahead'. Discussed starting at
10136 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
10138 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
10139 * NEWS: For the next release, note the change to `--report'.
10140 * TODO, doc/bison.1: Update English.
10141 * doc/bison.texinfo: Update English.
10142 (Understanding Your Parser, Bison Options): Document as
10143 `--report=lookahead' rather than `--report=look-ahead'.
10144 * src/conflicts.c: Update English in comments.
10145 (lookahead_set): Rename from look_ahead_set.
10146 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
10147 (resolve_sr_conflict): Rename local look_ahead_tokens to
10148 lookahead_tokens, and update other uses.
10149 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
10150 count_rr_conflicts, conflicts_free): Update uses.
10151 * src/getargs.c (report_args): Move "lookahead" before alternate
10153 (report_types): Update uses.
10154 (usage): For `--report' usage description, state `lookahead' spelling
10155 rather than `look-ahead'.
10156 * src/getargs.h (report.report_lookahead_tokens): Rename from
10157 report_look_ahead_tokens.
10158 * src/lalr.c: Update English in comments.
10159 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
10160 (state_lookahead_tokens_count): Rename from
10161 state_look_ahead_tokens_count.
10162 Rename local n_look_ahead_tokens to n_lookahead_tokens.
10163 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
10164 Rename local n_look_ahead_tokens to n_lookahead_tokens.
10166 Update English in output.
10167 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
10168 * src/print.c: Update English in comments.
10169 (lookahead_set): Rename from look_ahead_set.
10170 (print_reduction): Rename argument lookahead_token from
10172 (print_core, state_default_rule, print_reductions, print_results):
10174 * src/print_graph.c: Update English in comments.
10175 (print_core): Update uses.
10176 * src/state.c: Update English in comments.
10177 (reductions_new): Update uses.
10178 (state_rule_lookahead_tokens_print): Rename from
10179 state_rule_look_ahead_tokens_print, and update other uses.
10180 * src/state.h: Update English in comments.
10181 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
10182 (state_rule_lookahead_tokens_print): Rename from
10183 state_rule_look_ahead_tokens_print.
10184 * src/tables.c: Update English in comments.
10185 (conflict_row, action_row): Update uses.
10186 * tests/glr-regression.at
10187 (Incorrect lookahead during deterministic GLR,
10188 Incorrect lookahead during nondeterministic GLR): Rename
10189 print_look_ahead to print_lookahead.
10190 * tests/torture.at: Update English in comments.
10191 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
10192 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
10193 (Many lookahead tokens): Update uses.
10194 * data/glr.c: Update English in comments.
10195 * lalr1.cc: Likewise.
10196 * yacc.c: Likewise.
10197 * src/conflicts.h: Likewise.
10198 * src/lalr.h: Likewise.
10199 * src/main.c: Likewise.
10200 * src/output.c: Likewise.
10201 * src/parse-gram.c: Likewise.
10202 * src/tables.h: Likewise.
10203 * tests/calc.at: Likewise.
10205 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
10207 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
10209 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
10211 * TODO: Add request from Nelson H. F. Beebe to be able to install
10212 Bison without installing the yacc script.
10214 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
10216 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
10217 and yytext if they're already #define'd.
10218 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
10219 * src/scan-code-c.c: ... here.
10220 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
10223 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
10225 Get Bison to build again when configured with --enable-gcc-warnings.
10226 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
10227 missing #include's.
10228 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
10229 loc argument as it shadows a global.
10230 * src/scan-gram.l: Remove stray comma that prevents boundary_set
10233 * src/.cvsignore: Add scan-code.c.
10235 2006-06-07 Akim Demaille <akim@epita.fr>
10237 * src/scan-gram.l: Move the "add a trailing ; to actions" code
10239 * src/scan-code.l: here.
10240 * tests/input.at (Torturing the Scanner): Fix another location
10243 2006-06-07 Akim Demaille <akim@epita.fr>
10245 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
10247 2006-06-06 Akim Demaille <akim@epita.fr>
10249 Extract the parsing of user actions from the grammar scanner.
10250 As a consequence, the relation between the grammar scanner and
10251 parser is much simpler. We can also split "composite tokens" back
10252 into simple tokens.
10253 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
10254 * src/scan-gram.l (add_column_width, adjust_location): Move to and
10256 * src/location.h, src/location.c (add_column_width)
10257 (location_compute): these.
10258 Fix the column count: the initial column is 0.
10259 (location_print): Be robust to ending column being 0.
10260 * src/location.h (boundary_set): New.
10261 * src/main.c: Adjust to scanner_free being renamed as
10263 * src/output.c: Include scan-code.h.
10264 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
10266 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
10267 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
10268 which is now, again, a separate token.
10269 Adjust all dependencies.
10270 Whereever actions with $ and @ are used, use translate_code.
10271 (action): Remove this nonterminal which is now useless.
10272 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
10273 (grammar_current_rule_action_append): Use translate_code.
10274 (packgram): Bound check ruleno, itemno, and rule_length.
10275 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
10276 (last_string, last_braced_code_loc, max_left_semantic_context)
10277 (scanner_initialize, scanner_free, scanner_last_string_free)
10278 (gram_out, gram_lineno, YY_DECL_): Move to...
10279 * src/scan-gram.h: this new file.
10280 (YY_DECL): Rename as...
10282 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
10283 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10284 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10285 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10286 Move these declarations, and...
10287 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
10289 * src/flex-scanner.h: this new file.
10290 * src/scan-gram.l (rule_length, rule_length_overflow)
10291 (increment_rule_length): Remove.
10292 (last_braced_code_loc): Rename as...
10293 (gram_last_braced_code_loc): this.
10294 Adjust to the changes of the parser.
10295 Move all the handling of $ and @ into...
10296 * src/scan-code.l: here.
10297 * src/scan-gram.l (handle_dollar, handle_at): Remove.
10298 (handle_action_dollar, handle_action_at): Move to...
10299 * src/scan-code.l: here.
10300 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
10301 scan-code.h, scan-code-c.c, scan-gram.h.
10302 (EXTRA_bison_SOURCES): Add scan-code.l.
10303 (BUILT_SOURCES): Add scan-code.c.
10304 (yacc): Be robust to white spaces.
10306 * tests/conflicts.at, tests/input.at, tests/reduce.at,
10307 * tests/regression.at: Adjust the column numbers.
10308 * tests/regression.at: Adjust the error message.
10310 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10312 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10313 Use Akim's wording from
10314 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
10316 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10318 Between Bison releases, manually append `+' to the previous Bison
10319 release number, and use that as a signal to automatically print the
10320 ChangeLog's CVS Id keyword from --version. Discussed starting at
10321 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
10322 * ChangeLog: Add Id header.
10323 * configure.ac (AC_INIT): Append `+' to `2.3'.
10324 * src/.cvsignore: Add revision.c.
10325 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
10326 (BUILT_SOURCES): Add revision.c.
10327 (revision.c): New target rule. This file defines a new global variable
10328 named revision. It initializes it with either the Id from ChangeLog
10329 or, if VERSION doesn't contain `+', with the empty string.
10330 * src/getargs.c (version): Print the value of revision.
10331 * src/revision.h: Extern revision.
10333 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
10335 * NEWS: Version 2.3.
10336 * configure.ac (AC_INIT): Likewise.
10338 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
10340 * data/glr.c (YYRECOVERING): Define to be a function-like macro
10341 with no arguments, not as an object-like macro. This is for
10342 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
10343 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
10344 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
10347 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
10349 * src/getargs.c (usage): Back out yesterday's modification of the
10350 --help output so that we don't have to wait for translation before
10353 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
10355 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
10356 Problem reported by Akim Demaille.
10358 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
10360 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10362 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
10364 * data/yacc.c (yy_reduce_print): Omit trailing white space in
10365 generated source code. Problem reported by Frans Englich in
10366 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
10368 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
10370 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
10371 shell, not within 'make', so that 'make' by an ordinary builder
10372 (using GNU make) does not worry about configuring gzip. This also
10373 works around a bug reported independently by Keith Thompson and by
10374 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
10375 stderr rather than stdout, messing up the build logs.
10377 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10379 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
10380 to make sure that YYID will never be unused. This fixes a 'make
10381 maintainer-check' failure caused by the recent changes to the 'Trivial
10382 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
10384 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
10386 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10388 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
10389 state before an empty RHS is always resolved here. Only the location
10390 of that state is guaranteed to be resolved, and that's enough. This
10391 fixes the remaining bug reported by Derek M. Jones in
10392 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10393 * tests/glr-regression.at (Uninitialized location when reporting
10394 ambiguity): Test the above case.
10395 Also, the embedded comments in this test case claim it checks the case
10396 of an empty RHS that has inherited the initial location. However, the
10397 corresponding LHS was already resolved, so yyresolveLocations didn't
10398 actually have reason to modify it. Fix this by forcing
10399 nondeterministic operation at the beginning of the parse.
10401 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
10403 * data/c.m4 (b4_yy_symbol_print_generate):
10404 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
10405 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
10406 of the bugs reported today by Derek M Jones in
10407 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10408 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
10409 defined to be a type name without parens or brackets.
10410 (Location Type): Similarly for YYLTYPE.
10411 * tests/regression.at (Trivial grammars): Put in a test for this
10412 bug that will be caught by 'make maintainer-check' (though not,
10413 alas, by 'make check' unless your compiler is picky).
10415 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
10417 * NEWS: Version 2.2.
10418 * configure.ac (AC_INIT): Likewise.
10420 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
10422 * data/glr.c (yyreportTree): Make room in yystates for the state
10423 preceding the RHS. This fixes the segmentation fault reported by Derek
10425 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
10426 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
10427 to the user. Reported for yyreportTree by Derek M. Jones later in the
10429 * THANKS: Add Derek M. Jones.
10430 Update my email address.
10431 Fix typo in Steve Murphy's name.
10433 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
10435 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
10436 checking against YYLAST that caused the parser to miss a potential
10437 alternative in its diagnostic.
10438 Problem reported by Maria Jose Moron Fernandez in
10439 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
10440 * data/lalr1.cc (yysyntax_error_): Likewise.
10441 * data/yacc.c (yysyntax_error): Likewise.
10442 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
10443 tokens, in case we run into an older C compiler.
10444 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
10445 Use them to check for the off-by-one error fixed above.
10447 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
10448 YYSIZE_T, not size_t.
10449 * tests/regression.at (Trivial grammars): New test, to catch
10450 the error fixed by the above patch.
10452 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10454 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
10456 Reported by Steve Murphy.
10458 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10460 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
10461 * data/glr.cc: b4_location_flag is now b4_locations_flag.
10463 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10465 Implement --trace=m4.
10466 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
10467 * src/output.c (output_skeleton): When set, pass -dV to m4.
10469 Factor the handling of flags in m4.
10470 * src/output.c (prepare): Rename the muscle names debug, defines,
10471 error_verbose to debug_flag, defines_flag, error_verbose_flag.
10472 * data/c.m4: Adjust.
10473 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
10474 Use b4_define_flag_if to define other b4_FLAG_if macros.
10475 (b4_location_if): As a consequence, rename as...
10476 (b4_locations_if): this, for consistency.
10477 Adjust all the skeletons.
10479 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10481 * etc/bench.pm: Shorten bench names.
10483 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10485 * src/output.h, src/output.c (error_verbose): Move to...
10486 * src/getargs.h, src/getargs.c: here.
10488 Adjust dependencies.
10490 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
10492 * data/c.m4 (b4_copyright): Put the special exception for Bison
10493 skeletons here, so we don't have to put it in each skeleton. All
10494 uses changed. Suggested by Akim Demaille. Also, wrap the
10495 copyright notice, in case it is longer than 80 columns. Replace
10496 comma by newline after title.
10498 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
10500 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
10501 incompatibility, not a bug. Mention that it wasn't fixed as of
10504 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
10506 * examples/extexi: Enforce the precedence of concatenation over
10508 Reported by Tommy Nordgren.
10510 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
10512 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
10513 with the member "token".
10514 Reported by Martin Nylin.
10516 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
10518 * data/glr.c: Switch to Bison 2.2 special-exception language in
10519 the copyright notice. Use more-regular format for titles and
10521 * data/glr.cc: Likewise.
10522 * data/location.cc: Likewise.
10523 * data/yacc.cc: Likewise.
10524 * doc/bison.texinfo (Conditions): Document this.
10525 * NEWS: likewise. Upgrade version to 2.2.
10527 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
10529 * data/glr.cc: Remove dead code.
10531 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
10533 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
10534 that variable and the line breaks the bootstrap. Problem reported
10535 by Juan M. Guerrero.
10537 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
10539 * doc/bison.texinfo (Multiple start-symbols): New.
10541 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
10543 * etc/README, etc/bench.pl: New.
10545 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
10547 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
10549 Reported by Mickael Labau.
10550 * tests/input.at (Torturing the Scanner): Test it.
10552 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
10554 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
10555 Problem reported by Bob Rossi.
10557 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
10559 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
10560 and didn't really work.
10561 For the index, use @ifnotinfo, not @iftex.
10562 Minor cleanups of spacing and terminology.
10564 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
10566 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
10567 of AT_NAME_PREFIX when %name-prefix is not used.
10569 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
10571 Apply --prefix to C++ skeletons too: they change the namespace.
10572 The test suite already exercize these cases.
10573 * data/c++.m4 (b4_namespace): New.
10574 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
10575 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
10576 * data/yacc.c, data/glr.c: Remove a useless `[]'.
10577 * doc/bison.texinfo: Document it.
10578 (Option Cross Key): Use @multitable in all formats. It looks
10579 nicer, even in TeX outputs.
10580 (Rules): Use the same code whatever the output type is.
10581 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
10582 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
10583 * tests/calc.at: Use it, instead of hard coding `yy'.
10585 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10587 * TODO: Remove dead items.
10589 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10591 * doc/FAQ: Remove, merged into...
10592 * doc/bison.texinfo (FAQ): this.
10593 * doc/Makefile.am (EXTRA_DIST): Adjust.
10595 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10597 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
10599 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
10600 * doc/bison.texinfo (Calc++ Scanner): Use it.
10602 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
10604 Fix two nits reported by twlevo, plus one more that I discovered.
10606 * src/assoc.h (assoc_to_string): Give a name to the arg, as
10607 this is the usual Bison style.
10608 * src/location.h (location_print): Likewise.
10610 * src/reader.h (token_name): Likewise.
10612 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
10614 Fix some nits reported by twlevo.
10615 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
10616 and "POSIX". Use more-modern syntax for URLs. Mention C++
10617 and ask for Java. Don't hardwire OS version numbers. Add
10619 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
10620 * src/conflicts.c (solved_conflicts_obstack): Now static.
10622 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
10624 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
10625 page. Say "you can use it" not "you may use it" as on the web page;
10626 we're describing capabilities not granting permission.
10628 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
10630 * data/glr.c (yyresolveLocations): Rename local variables to avoid
10631 shadowing warnings. Use usual patter for iterating through RHS.
10632 * tests/glr-regression.at
10633 (Uninitialized location when reporting ambiguity):
10634 Modify yylex so that it uses its argument, rather than trying
10635 to rely on ARGSUSED (which doesn't work for gcc with warnings).
10636 const char -> char const.
10638 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
10639 Don't use tabs inside commands; it messes up 'ps'.
10640 Problem reported by twlevo.
10642 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
10644 * tests/glr-regression.at (Uninitialized location when reporting
10645 ambiguity): New test case.
10646 * data/glr.c (yyresolveLocations): New function, which uses
10648 (yyresolveValue): Invoke yyresolveLocations before reporting an
10650 * doc/bison.texinfo (Default Action for Locations): Note
10651 YYLLOC_DEFAULT's usage for ambiguity locations.
10652 (GLR Semantic Actions): Cross-reference those notes.
10654 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
10656 * tests/glr-regression.at (Leaked semantic values when reporting
10657 ambiguity): Remove unnecessary union and type declarations.
10658 (Leaked lookahead after nondeterministic parse syntax error): New test
10660 * data/glr.c (yyparse): Check for zero stacks remaining before
10661 attempting to shift the lookahead so that you don't lose it.
10663 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10665 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
10666 * tests/glr-regression.at (Leaked semantic values when reporting
10667 ambiguity): New test case.
10668 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
10669 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
10670 now unnecessary yystackp parameter.
10671 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
10672 destructors can be called.
10674 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
10675 in existing testcases.
10677 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10679 Don't leak semantic values for parent RHS when a user action cuts the
10680 parser, and clean up related code a bit.
10681 * tests/glr-regression.at (Leaked merged semantic value if user action
10682 cuts parse): Rename to...
10683 (Leaked semantic values if user action cuts parse): ... this. Add check
10684 for leaked parent RHS values.
10685 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
10686 between an unresolved state (non-empty chain of semantic options) and
10687 an incomplete one (signaled by an empty chain).
10688 (yyresolveStates): Document the interface. Move all manipulation of a
10689 successfully or unsuccessfully resolved yyGLRState to...
10690 (yyresolveValue): ... here so that yyresolveValue always leaves a
10691 yyGLRState with consistent data and thus is easier to understand.
10692 Remove the yyvalp and yylocp parameters since they are always just
10693 taken from the yys parameter. When reporting a discarded merged value
10694 in debugging output, note that it is incompletely merged. Document the
10696 (yyresolveAction): If resolving any of the RHS states fails, destroy
10697 them all rather than leaking them. Thus, as long as user actions are
10698 written to clean up the RHS correctly, yyresolveAction always cleans up
10699 the RHS of a semantic option. Document the interface.
10701 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
10703 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
10704 led to a segmentation fault in GNU Pascal. Problem reported
10707 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
10709 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
10710 mid-rule action inside a nonterminal symbol in order to declare a
10711 destructor for its semantic value.
10713 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
10715 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
10716 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
10717 __cplusplus && ! defined _STDLIB_H && !
10718 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
10719 defined free))]: Include <stdlib.h> rather than rolling our own
10720 declarations of malloc and free, to avoid problems with
10721 incompatible declarations (using 'throw') C++'s stdlib.h. This
10722 should fix Debian bug 340012
10723 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
10724 reported by Guillaume Melquiond.
10726 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10728 * NEWS: Clarify symbols versus types in unused-value warnings.
10730 * configure.ac (AC_INIT): Bump version number.
10732 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10734 * NEWS: Version 2.1a.
10735 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
10736 since C99 requires this.
10738 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
10740 * m4/c-working.m4: New file.
10741 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
10743 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
10745 * Makefile.maint: Merge from coreutils.
10747 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
10749 More portability fixes for problems summarized by Nelson H. F. Beebe.
10751 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
10752 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
10753 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
10754 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
10755 messes up because C++ code is compiled in 32-bit mode but linked
10758 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
10760 More portability fixes for problems summarized by Nelson H. F. Beebe.
10762 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
10763 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
10765 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
10766 nodist_PROGRAMS, since we don't need to actually compile the
10767 example if we're just doing a plain 'make'. This avoids bothering
10768 the installer unnecessarily about problems due to weird C++
10771 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
10773 More portability fixes for problems summarized by Nelson H. F. Beebe.
10775 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
10776 than #include "...", and compile with -I'.'. The old method was
10777 not portable, according to Posix and the C standard, and it does
10778 not work with Sun C 5.7, where previous #line directives affect
10779 the working directory used in later #include "..." directives.
10781 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10783 Various DJGGP specific issues in /djgpp
10785 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
10787 More portability fixes for problems summarized by Nelson H. F. Beebe.
10789 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
10790 '#include <map>' works and that you can apply ++ to iterators.
10792 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
10794 Work around portability problems summarized by Nelson H. F. Beebe in
10795 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
10797 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10798 that '#include <string>' works.
10800 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
10801 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
10802 "warning: sorry: semantics of inline function static data `const
10803 unsigned char translate_table[262]' are wrong (you'll wind up with
10806 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
10807 or, xor to not_, and_, or_, and xor_, respectively. This works
10808 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
10809 random system header somewhere that includes the equivalent of
10812 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
10813 -E" works; it apparently doesn't work with PathScale EKO Compiler
10816 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
10818 During deterministic GLR operation, user actions should be able to
10819 influence the parse by changing yychar. To make this easier to fix and
10820 to make glr.c easier to evolve in general, don't maintain yytoken in
10821 parallel with yychar; just compute yytoken when needed.
10822 * tests/glr-regression.at (Incorrect lookahead during deterministic
10823 GLR): Check that setting yychar in a user action has the intended
10825 * data/glr.c (yyGLRStack): Remove yytokenp member.
10826 (yyclearin): Don't set *yytokenp.
10827 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
10828 yychar rather than *yytokenp to determine the current lookahead.
10829 Compute yytoken locally when needed.
10830 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
10833 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
10834 after `--report' documentation.
10836 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
10838 * src/parse-gram.y (grammar_declaration): Location of printer
10839 symbol is @1, not list->location. Bug reported by twlevo.
10840 * tests/input.at (Incompatible Aliases): Adjust to above change.
10842 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
10844 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
10845 all the test at once. This makes the output easier to read in the
10848 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
10849 got from <http://bro-ids.org/download.html>. The bug is that
10850 when two actions appeared in succession, the second one was
10851 scanned before the first one was added to the grammar rule
10852 as a midrule action. Bison then output the incorrect warning
10853 "parse.y:905.17-906.36: warning: unused value: $3".
10854 * src/parse-gram.y (BRACED_CODE, action): These are no longer
10855 associated with a value.
10856 (rhs): Don't invoke grammar_current_rule_action_append.
10857 (action): Invoke it here instead.
10858 * src/reader.c (grammar_midrule_action): Now extern.
10859 (grammar_current_rule_action_append): Don't invoke
10860 grammar_midrule_action; that is now the scanner's job.
10861 * src/reader.h (last_string, last_braced_code_loc):
10862 (grammar_midrule_action): New decls.
10863 * src/scan-gram.l (last_string): Now extern, sigh.
10864 (last_braced_code_loc): New extern variable.
10865 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
10866 rule already has an action.
10867 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
10868 * tests/input.at (AT_CHECK_UNUSED_VALUES):
10869 Add some tests to check that the above changes fixed the bug.
10871 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
10873 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
10874 All used changed. Check whether the symbol has a destructor,
10875 not whether it is typed.
10876 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
10877 that the values are still reported as unused. All line numbers
10880 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
10882 Work around a bug in bro 0.8, which underparenthesizes its
10883 definition of YYLLOC_DEFAULT.
10884 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
10886 * data/lalr1.cc: Likewise.
10887 * data/yacc.cc: Likewise.
10889 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
10891 Work around a bug in Pike 7.0, and give the Pike folks a
10892 better way to override the usual int widths.
10893 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
10894 user can override the types.
10895 (short): #undef, to work around a bug in Pike 7.0.
10896 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
10897 (union yyalloc.yyss): Use yytype_int16 rather than short.
10899 (yysigned_char): Remove.
10900 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
10901 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
10902 * tests/regression.at (Web2c Actions): Adjust to above changes.
10904 * src/reader.c (check_and_convert_grammar): New function.
10905 (reader): Close the input file even if something went wrong during
10906 parsing. Minor file descriptor leak reported by twlevo.
10908 * src/assoc.c (assoc_to_string): Use a default: abort (); case
10909 to pacify gcc -Wswitch-default.
10910 * src/scan-gram.l (adjust_location): Use a default: break; case
10911 to pacify gcc -Wswitch-default.
10912 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
10913 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10914 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10915 Move these decls to scan-skel.l, since they don't need to be
10917 * src/scan-skel.l: Accept the above decls.
10918 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
10921 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
10923 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
10924 since we don't want to insist on a version number at the start
10925 of the changelog every time.
10926 * Makefile.maint: Sync from coreutils a bit better.
10927 (sc_trailing_blank): Renamed from sc_trailing_space.
10929 (sc_no_if_have_config_h, sc_require_config_h):
10930 (sc_prohibit_assert_without_use): New rules.
10931 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
10932 (sc_dd_max_sym_length): Fix leading spaces in rule.
10933 (sc_system_h_headers): Prefix with @.
10934 (sc_useless_cpp_parens, m4-check): Output line numbers.
10935 (changelog-check): Allow version only in head.
10936 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
10937 satisfy new Makefile.maint rule.
10938 * data/glr.c: Likewise.
10939 * data/glr.cc: Likewise.
10940 * data/lalr1.cc: Likewise.
10941 * data/yacc.c: Likewise.
10942 * lib/ebitsetv.c: Likewise.
10943 * lib/lbitset.c: Likewise.
10944 * lib/subpipe.c: Likewise.
10945 * lib/timevar.c: Likewise.
10946 * src/system.h: Likewise.
10947 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
10948 * djgpp/Makefile.maint: Add copyright notice.
10949 * djgpp/README.in: Likewise.
10950 * djgpp/config.bat: Likewise.
10951 * djgpp/config.site: Likewise.
10952 * djgpp/config_h.sed: Likewise.
10953 * djgpp/djunpack.bat: Likewise.
10954 * djgpp/config.sed: Fix copyright notice to match standard format.
10955 * djgpp/subpipe.h: Likewise.
10956 * lib/bitsetv-print.c: Likewise.
10957 * lib/bitsetv.c: Likewise.
10958 * lib/subpipe.h: Likewise.
10959 * lib/timevar.c: Likewise.
10960 * lib/timevar.h: Likewise.
10961 * djgpp/subpipe.c: Use standard recipe for config.h.
10962 * lib/abitset.c: Likewise.
10963 * lib/bitset.c: Likewise.
10964 * lib/bitset_stats.c: Likewise.
10965 * lib/bitsetv-print.c: Likewise.
10966 * lib/bitsetv.c: Likewise.
10967 * lib/ebitsetv.c: Likewise.
10968 * lib/get-errno.c: Likewise.
10969 * lib/lbitset.c: Likewise.
10970 * lib/subpipe.c: Likewise.
10971 * lib/timevar.c: Likewise.
10972 * lib/vbitset.c: Likewise.
10973 * tests/local.at: Likewise.
10974 * src/scan-gram.l: Don't include verify.h, since system.h does
10976 * .x-sc_require_config_h: New file.
10977 * .x-sc_unmarked_diagnostics: New file.
10979 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
10981 Be a bit more systematic about using 'abort'.
10982 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
10983 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
10984 Put 'default: abort ();' before some other case, to satisfy older
10985 pedantic compilers.
10986 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10987 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
10988 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
10989 * src/conflicts.c (resolve_sr_conflict): Likewise.
10990 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
10991 (get_decision_str, get_orientation_str, get_node_alignment_str):
10992 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
10993 (get_linestyle_str, get_arrowstyle_str): Likewise.
10994 * src/conflicts.c (resolve_sr_conflict):
10995 Use a default case rather than one for the one remaining enum
10996 value, to catch invalid enum values as well.
10997 * src/lalr.c (set_goto_map, map_goto):
10998 Prefer "assert (FOO);" to "if (!FOO) abort ();".
10999 * src/nullable.c (nullable_compute, token_definitions_output):
11001 * src/reader.c (packgram, reader): Likewise.
11002 * src/state.c (transitions_to, state_new, state_reduction_find):
11004 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
11005 (symbol_pack): Likewise.
11006 * src/tables.c (conflict_row, pack_vector): Likewise.
11007 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
11008 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
11009 * src/system.h: Don't include <assert.h>.
11010 (assert): New macro.
11012 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
11013 (Destructor Decl, Parser Function, Pure Calling):
11014 Describe rules for braces inside C code more carefully.
11016 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
11018 Fix some porting glitches found by Nelson H. F. Beebe.
11019 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
11020 compilers that don't understand that abort () does not return.
11021 * src/state.c (transitions_to): Likewise.
11022 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
11023 that '#include <cstdlib>' works.
11024 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
11025 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
11026 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
11027 for the benefit of some pre-C99 compilers.
11029 * bootstrap: Undo changes to gnulib files that autoreconf made.
11031 Minor fixups to get 'make maintainer-check' to work.
11032 * configure.ac: Don't use -Wnested-externs, as it's incompatible
11033 with the new verify.h implementation.
11034 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
11035 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
11036 * data/yacc.c (YYUSE): Likewise.
11037 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
11038 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
11039 * src/parse-gram.y (declaration): Don't pass a string constant
11040 to a function that expects char *, since GCC might complain
11041 about the constant value.
11042 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
11043 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
11044 before #defining them.
11045 * tests/glr-regression.at
11046 (Incorrectly initialized location for empty right-hand side in GLR):
11047 In yyerror, use the msg arg.
11048 (Corrupted semantic options if user action cuts parse):
11049 (Incorrect lookahead during deterministic GLR):
11050 (Incorrect lookahead during nondeterministic GLR):
11051 Don't name a local var 'index'; it shadows string.h's 'index'.
11053 2006-01-19 Akim Demaille <akim@epita.fr>
11055 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
11056 location, not just parts of it.
11058 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
11060 * NEWS: Document the fact that multiple %unions are now allowed.
11061 * doc/bison.texinfo (Union Decl): Likewise.
11062 * TODO: This feature is now implemented, so remove it from
11065 * Makefile.maint: Merge with coreutils Makefile.maint.
11066 (CVS_LIST): Use build-aux version if available.
11067 (VERSION_REGEXP): New macro.
11068 (syntax-check-rules): Add sc_no_if_have_config_h,
11069 sc_prohibit_assert_without_use, sc_require_config_h,
11070 sc_useless_cpp_parens.
11071 (sc_obsolete_symbols): Check for O_NDELAY.
11072 (sc_dd_max_sym_length): Track coreutils.
11073 (sc_unmarked_diagnostics): Look in all files, not just *.c.
11074 (sc_useless_cpp_parens): New rule.
11075 (news-date-check): Look for version or today's date.
11076 (changelog-check): Don't require version number near head.
11077 (copyright-check): Use current year instead of hardwiring 2005.
11078 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
11079 (announcement): Add --gpg-key-ID.
11081 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
11082 with "file system".
11084 Avoid undefined behavior that addressed just before the start of an
11085 array. Problem reported by twlevo.
11086 * src/reader.c (packgram): Prepend a new sentinel before ritem.
11087 * src/lalr.c (build_relations): Rely on new sentinel.
11088 * src/gram.c (gram_free): Adjust to new sentinel.
11090 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
11092 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
11093 yylookaheadNeeds. All uses updated.
11094 (yysplitStack): Rename local yynewLookaheadStatuses to
11095 yynewLookaheadNeeds.
11096 * data/glr-regression.at (Incorrect lookahead during nondeterministic
11097 GLR): In comments, change `lookahead status' to `lookahead need'.
11099 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11101 * data/glr.c (yysplitStack): A little stylistic rewrite.
11103 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11105 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
11107 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
11109 * doc/bison.texinfo: Fix some typos.
11110 (GLR Semantic Actions): New subsection discussing special
11111 considerations because GLR semantic actions might be deferred.
11112 (Actions): Mention look-ahead usage of yylval.
11113 (Actions and Locations): Mention look-ahead usage of yylloc.
11114 (Special Features for Use in Actions): Add YYEOF entry and mention it
11115 in the yychar entry.
11116 In the yychar entry, remove mention of the local yychar case (pure
11117 parser) since this is irrelevant information when writing semantic
11118 actions and since it's already discussed in `Table of Symbols' where
11119 yychar is otherwise described as an external variable.
11120 In the yychar entry, don't call it the `current' look-ahead since it
11121 isn't when semantic actions are deferred.
11122 In the yychar and yyclearin entries, add note about deferred semantic
11124 Add yylloc and yylval entries discussing look-ahead usage.
11125 (Look-Ahead Tokens): When discussing yychar, don't call it the
11126 `current' look-ahead, and do mention yylval and yylloc.
11127 (Error Recovery): Cross-reference `Action Features' when mentioning
11129 (Table of Symbols): In the yychar entry, don't call it the `current'
11131 In the yylloc and yylval entries, mention look-ahead usage.
11133 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
11135 * tests/glr-regression.at: Update copyright year to 2006.
11137 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
11139 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
11140 use during nondeterministic operation to track which stacks have
11141 actually needed the current lookahead.
11142 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
11143 Allocate, deallocate, resize, and otherwise shuffle space for
11144 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
11145 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
11146 appropriately during nondeterministic operation.
11147 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
11148 members to store the current lookahead to be used by the deferred
11150 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
11151 from which the RHS is taken. Set the lookahead members of the new
11152 yySemanticOption according to the lookahead status for stack yyk.
11153 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
11154 yyaddDeferredAction.
11155 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
11156 members of yySemanticOption before invoking yyuserAction, and then set
11157 them back to their current values afterward.
11158 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
11159 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
11160 * tests/glr-regression.at: Remove `.' from the ends of recent test case
11161 titles for consistency.
11162 (Leaked merged semantic value if user action cuts parse): In order to
11163 suppress lint warnings, use arguments in merge function, and assign
11164 char value < 128 in main.
11165 (Incorrect lookahead during deterministic GLR): New test case.
11166 (Incorrect lookahead during nondeterministic GLR): New test case.
11168 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
11170 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
11171 !yyvaluep as signal that no semantic value is available to print.
11172 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
11173 to print a semantic value.
11175 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
11177 * tests/glr-regression.at: For consistency with my newer test cases,
11178 don't thank myself.
11180 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
11182 * data/glr.c (yyresolveValue): When merging semantic options, if at
11183 least one user action succeeds but a later one cuts the parse, then
11184 destroy the semantic value before returning rather than leaking it.
11185 (yyresolveStates): If a user action cuts the parse and thus
11186 yyresolveValue fails, ignore the (unset) semantic value rather than
11187 corrupting the yyGLRState, and empty the semantic options list since
11188 the user actions should have called all necessary destructors.
11189 Simplify code with YYCHK.
11190 * tests/glr-regression.at (Corrupted semantic options if user action
11191 cuts parse): New test case.
11192 (Undesirable destructors if user action cuts parse): New test case.
11193 Before applying any of this patch, this test case never actually failed
11194 for me... but only because the corrupted semantic options usually
11196 (Leaked merged semantic value if user action cuts parse): New test
11199 2006-01-05 Akim Demaille <akim@epita.fr>
11201 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
11203 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
11205 * data/c.m4 (b4_c_modern): New macro, with a new provision for
11206 _MSC_VER. Problem reported by Cenzato Marco.
11207 (b4_c_function_def): Use it.
11208 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
11210 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
11211 than rolling our own.
11213 2006-01-04 Akim Demaille <akim@epita.fr>
11215 Also warn about non-used mid-rule values.
11216 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
11218 (symbol_list_new): Adjust.
11219 * src/reader.c (symbol_typed_p): New.
11220 (grammar_rule_check): Use it.
11221 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
11223 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
11225 * tests/actions.at (Exotic Dollars): Adjust.
11227 2006-01-04 Akim Demaille <akim@epita.fr>
11229 * src/reader.c (grammar_midrule_action): If $$ is set in a
11230 mid-rule, move the `used' bit to its lhs.
11231 * tests/input.at (Unused values): New.
11232 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
11234 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
11236 * doc/bison.texinfo (Bison Options): Say more accurately what
11238 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
11239 about declarations in the grammar when in Yacc mode, as POSIX does
11240 not require a diagnostic when the grammar uses extensions.
11242 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
11244 Warn about dubious constructions like "%token T T".
11245 Reported by twlevo.
11246 * src/symtab.h (struct symbol.declared): New member.
11247 * src/symtab.c (symbol_new): Initialize it to false.
11248 (symbol_class_set): New arg DECLARING, specifying whether
11249 this is a declaration that we want to warn about, if there
11250 is more than one of them. All uses changed.
11252 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
11253 Allow multiple %union directives, whose contents concatenate.
11254 * src/parse-gram.y (grammar_declaration): Likewise.
11255 Use muscle_code_grow, so that we don't need stype_line any more.
11258 * src/muscle_tab.c (muscle_grow): Fix comment.
11260 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
11261 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
11262 Update copyright year to 2006.
11264 2006-01-03 Akim Demaille <akim@epita.fr>
11266 Have glr.cc pass (some of) the calc.at tests.
11267 * data/glr.cc (b4_parse_param_orig): New.
11268 (b4_parse_param): Improve its definition, and bound it more
11269 clearly in the skeleton.
11270 (b4_epilogue): Append, instead of prepending, in order to keep
11272 Simplify the generation of auxiliary functions: locations and
11273 purity are mandated.
11274 (b4_global_tokens_and_yystype): Honor it.
11275 * data/location.cc (c++.m4): Don't include it.
11276 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
11278 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
11280 Be sure to initialize the first position's filename.
11281 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
11283 (AT_CHECK_CALC_GLR_CC): New.
11284 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
11286 2006-01-02 Akim Demaille <akim@epita.fr>
11288 * src/output.c (output_skeleton): Don't hard wire the inclusion of
11290 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
11291 * data/glr.cc: Do not include stack.hh.
11293 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
11295 * data/glr.c: Reformat whitespace with tabs.
11296 (b4_lpure_formals): Remove this unused m4 macro.
11297 * tests/cxx-type.at: Reformat whitespace with tabs.
11298 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
11299 since it's a member. Rename type to isNterm for clarity.
11301 2005-12-29 Akim <akim@sulaco.local>
11303 Let glr.cc catch up with symbol_value_print.
11304 * data/glr.cc (b4_yysymprint_generate): Replace by...
11305 (b4_yy_symbol_print_generate): this.
11306 (yy_symbol_print, yy_symbol_value_print): Declare them.
11308 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
11310 * src/location.h (boundary): Note that a line or column equal
11311 to INT_MAX indicates an overflow.
11312 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
11313 (rule_length_overflow, increment_rule_length, add_column_width):
11315 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
11316 (<SC_BRACED_CODE>"}"):
11317 Use increment_rule_length rather than incrementing it by hand.
11318 (adjust_location, handle_syncline): Diagnose overflow.
11319 (handle_action_dollar, handle_action_at):
11320 Fix bug with monstrosities like $-2147483648.
11321 Remove now-unnecessary checks.
11322 (scan_integer): Verify assumptions and remove now-unnecessary checks.
11323 (convert_ucn_to_byte): Verify assumptions.
11324 (handle_syncline): New arg LOC. All callers changed.
11325 Don't store through a value derived from char const * pointer.
11327 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
11330 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
11332 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
11333 Remove unnecessary forward static decls.
11335 2005-12-27 Akim Demaille <akim@epita.fr>
11337 * src/reader.c (grammar_current_rule_check): Also check that $$
11339 Take the rule to check as argument, hence rename as...
11340 (grammar_rule_check): this.
11341 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
11343 (grammar_rule_begin, grammar_rule_end): these, for consistency.
11344 (grammar_midrule_action, grammar_symbol_append): Now static.
11345 * tests/torture.at (input): Don't rely on the default action
11346 being always performed.
11347 * tests/calc.at: "Set" $$ even when the action is "cut" with
11349 * tests/actions.at (Exotic Dollars): Instead of using unused
11350 values, check that the warning is issued.
11352 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
11354 * NEWS: Improve wording for unused-value warnings.
11356 2005-12-22 Akim Demaille <akim@epita.fr>
11358 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
11359 (b4_yysymprint_generate): Rename as...
11360 (b4_yy_symbol_print_generate): this.
11361 Generate yy_symbol_print instead of yysymprint.
11362 Generate also yy_symbol_value_print, and use it.
11364 2005-12-22 Akim Demaille <akim@epita.fr>
11366 * NEWS: Warn about unused values.
11367 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
11369 (symbol_list_n_get, symbol_list_n_used_set): New.
11370 (symbol_list_n_type_name_get): Use symbol_list_n_get.
11371 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
11372 * src/reader.c (grammar_current_rule_check): Check that values are
11374 * src/symtab.c (symbol_print): Accept 0.
11375 * tests/existing.at: Remove the type information.
11377 Remove useless actions (beware of mid-rule actions: perl -000
11378 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
11379 * tests/actions.at (Exotic Dollars): Use unused values.
11380 * tests/calc.at: Likewise.
11381 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11384 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
11387 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
11389 Undo 2005-12-01 tentative license wording change. The wording is
11390 still being reviewed by the lawyers, and we don't want to wait for
11391 them before publishing a test release. For now, revert to the
11393 * NEWS: Undo 2005-12-01 change.
11394 * data/glr.c: Revert to previous license wording.
11395 * data/glr.cc: Likewise.
11396 * data/lalr1.cc: Likewise.
11397 * data/location.cc: Likewise.
11398 * data/yacc.c: Likewise.
11400 * NEWS: Reword %destructor vs YYABORT etc.
11401 * data/glr.c: Use American spacing, for consistency.
11402 * data/glr.cc: Likewise.
11403 * data/lalr1.cc: Likewise.
11404 * data/yacc.c: Likewise.
11405 * data/yacc.c: Reformat comments slightly.
11406 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
11407 for consistency. Fix some spelling errors and reword recently-included
11409 * tests/cxx-type.at: Cast results of malloc, for C++.
11411 2005-12-21 Joel E. Denny <address@hidden>
11413 * tests/cxx-type.at: Construct a tree, count the parents of shared
11414 nodes, and free each node once and only once. Previously, the memory
11415 for semantic values was leaked instead.
11417 2005-12-21 Joel E. Denny <address@hidden>
11419 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
11420 (yylval, yylloc): If pure, #define to yystackp->yyval and
11421 yystackp->yyloc similar to yychar and yynerrs.
11422 (yyparse): If pure, remove local yylval and yylloc. Add local
11423 yystackp to accommodate pure definitions of yylval and yylloc.
11424 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
11425 yylvalp and yyllocp to &yylval and &yylloc.
11426 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
11427 namespace. Previously, nerrs and char were missing, but lval and lloc
11429 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
11430 yylvalp and yyllocp parameters since, if pure, these are now always
11431 accessible through yystackp. If not pure, they are still accessible
11433 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
11434 `if (YYID (N))' to pacify lint.
11436 2005-12-21 Akim Demaille <akim@epita.fr>
11438 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
11439 destroy the RHS symbols of a rule.
11440 * data/yacc.c (yylen): Initialize to 0.
11441 Keep its value to the number of items to possibly shift.
11442 In particular, a regular successful parse that ends on YYFINAL by
11443 a (internal) YYACCEPT must not have yylen != 0.
11444 (yyerrorlab, yyreturn): Pop the RHS.
11445 Reorder a bit to emphasize the `shifting' bits of code.
11446 (YYPOPSTACK): Now accept a number of items to pop.
11447 * data/lalr1.cc: Likewise.
11448 * data/glr.c: Formatting changes.
11449 Use goto instead of fall through.
11450 * doc/bison.texinfo (Destructor Decl): Complete.
11452 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11454 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11455 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
11456 * djgpp/config.bat: Replace every occurence of the file name
11457 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11458 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11459 * djgpp/config.sed: Replace every occurence of the file name
11460 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11461 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11462 * djgpp/djunpack.bat: DJGPP specific file.
11463 * djgpp/fnchange.lst: DJGPP specific file.
11464 * djgpp/README.in: Add new information about how to unpack the bison
11465 source on MSDOS and other systems which have 8.3 file name restrictions
11466 using djunpack.bat and fnchange.lst.
11468 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
11470 * bootstrap (build_cvs_prefix): Remove; unused.
11471 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
11472 when getting gnulib.
11474 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
11476 * data/glr.c: Reorder typedef declarations for structs to match order
11477 of struct declarations.
11478 Rename yystack everywhere to yystackp except in yyparse where it's not
11480 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
11482 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
11483 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
11484 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
11487 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
11489 * tests/sets.at (Accept): Fix typos in regular expression used to
11490 sed out the final state number.
11492 Work around portability problem on Solaris 10: flex-generated
11493 files include <stdio.h> before <config.h>, which messes up
11494 because the latter defines __EXTENSIONS__. Address the problem
11495 by creating two new little files that include <config.h> first,
11496 then include the flex-generated files. Rewrite everyone else
11497 to include <config.h> first, as well.
11498 * lib/timevar.c: Always include "config.h".
11499 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
11500 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
11501 (EXTRA_bison_SOURCES): New macro.
11502 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
11503 * src/system.h: Don't include config.h.
11504 * src/LR0.c: Include <config.h> first.
11505 * src/assoc.c: Likewise.
11506 * src/closure.c: Likewise.
11507 * src/complain.c: Likewise.
11508 * src/conflicts.c: Likewise.
11509 * src/derives.c: Likewise.
11510 * src/files.c: Likewise.
11511 * src/getargs.c: Likewise.
11512 * src/gram.c: Likewise.
11513 * src/lalr.c: Likewise.
11514 * src/location.c: Likewise.
11515 * src/main.c: Likewise.
11516 * src/muscle_tab.c: Likewise.
11517 * src/nullable.c: Likewise.
11518 * src/output.c: Likewise.
11519 * src/parse-gram.y: Likewise.
11520 * src/print.c: Likewise.
11521 * src/print_graph.c: Likewise.
11522 * src/reader.c: Likewise.
11523 * src/reduce.c: Likewise.
11524 * src/relation.c: Likewise.
11525 * src/state.c: Likewise.
11526 * src/symlist.c: Likewise.
11527 * src/symtab.c: Likewise.
11528 * src/tables.c: Likewise.
11529 * src/uniqstr.c: Likewise.
11530 * src/vcg.c: Likewise.
11532 * src/parse-gram.y: Fix minor problems uncovered by lint.
11533 (current_lhs, current_lhs_location): Now static.
11534 (current_assoc): Remove unused variable.
11536 Cleanups so that Bison-generated parsers have less lint.
11537 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
11538 Prepend /*ARGSUSED*/, for lint's sake.
11539 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
11540 definition if 'lint' is defined.
11541 (YYID): New macro (or function, if lint).
11542 All uses of /*CONSTCOND*/0 replaced by YYID(0).
11543 * data/yacc.c: Likewise.
11544 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
11545 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
11546 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
11548 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
11549 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
11550 Use YYID(0) rather than 0, for lint.
11551 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
11552 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
11554 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
11556 * tests/glr-regression.at
11557 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11558 Close memory leak reported by twlevo.
11560 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
11562 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
11564 (yyparse): Iterate another stack in order to call user destructors.
11565 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11567 (Duplicated user destructor for lookahead): This test now is expected
11570 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
11572 * NEWS: Document the following change.
11573 * data/yacc.c: Say "parser skeleton" rather than "file", since
11574 it's no longer just a file.
11575 * data/glr.c: Grant a special exception for C GLR parsers, that
11576 reads like the already-existing exception for C LALR(1) parsers.
11577 * data/glr.cc: Likewise.
11578 * data/lalr1.cc: Likewise.
11579 * data/location.cc: Likewise.
11580 * data/yacc.c: Reword the "written by" statement to clarify that
11581 it was the parser skeleton, not the entire output file.
11582 * data/glr.c: Written by Paul Hilfinger.
11583 * data/glr.cc: Written by Akim Demaille.
11584 * data/lalr1.cc: Likewise.
11586 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
11588 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
11589 Fix typos in previous change that broke 'make check'.
11590 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
11592 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
11593 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
11594 We can revert this once things settle down.
11596 * src/conflicts.c (conflicts_print): Don't print file name twice
11597 when %expect fails because there were no conflicts.
11598 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
11600 * tests/conflicts.at (%expect not enough, %expect too much):
11601 (%expect with reduce conflicts): Adjust to new behavior.
11603 2005-11-18 Akim Demaille <akim@epita.fr>
11605 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
11607 * NEWS: Document this.
11608 * doc/bison.texinfo (Expect Decl): Likewise.
11610 2005-11-16 Akim Demaille <akim@epita.fr>
11612 Generalize the display of semantic values and locations in traces.
11613 * data/glr.c (yy_reduce_print): Fix indices (again).
11614 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
11616 * data/lalr1.cc (yyreduce_print): Rename as...
11617 (yy_reduce_print): this.
11618 Display values and locations.
11619 * data/yacc.c (yy_reduce_print): Likewise.
11620 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
11621 (yysymprint): Move higher to be visible from yy_reduce_print).
11623 * tests/calc.at: Adjust the expected length of the traces.
11625 2005-11-14 Akim Demaille <akim@epita.fr>
11627 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
11628 from 1 to N, while values and location start at 0.
11629 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
11631 2005-11-14 Akim Demaille <akim@epita.fr>
11633 * data/glr.c (yy_reduce_print): Fix the $ number.
11635 2005-11-14 Akim Demaille <akim@epita.fr>
11637 "Use" parse parameters.
11638 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
11639 * data/glr.c, data/glr.cc: Use them.
11640 * data/glr.c (YYUSE): Have a C++ definition that supports
11643 2005-11-14 Akim Demaille <akim@epita.fr>
11645 * data/glr.c (yyexpandGLRStack): Declare only if defined.
11647 2005-11-14 Akim Demaille <akim@epita.fr>
11649 * data/glr.cc: New.
11650 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
11652 2005-11-12 Akim Demaille <akim@epita.fr>
11654 Let position and location be PODs.
11655 * data/location.cc (position::initialize, location::initialize): New.
11656 (position::position, location::location): Define only if
11657 b4_location_constructors is defined.
11658 * data/lalr1.cc (b4_location_constructors): Define it for backward
11660 * doc/bison.texinfo (Initial Action Decl): Use initialize.
11662 2005-11-12 Akim Demaille <akim@epita.fr>
11664 * data/lalr1.cc: Move the body of the ctor and dtor into the
11665 parser file (instead of the header).
11666 Wrap the implementations in a "namespace yy".
11668 2005-11-12 Akim Demaille <akim@epita.fr>
11670 Have glr.c include its header file when created.
11671 * data/glr.c (b4_shared_declarations): New.
11672 Output them verbatim in the parser if !%defines, otherwise
11673 output then in the header file, and include it instead.
11675 2005-11-11 Akim Demaille <akim@epita.fr>
11677 * data/glr.c: Comment changes.
11679 2005-11-11 Akim Demaille <akim@epita.fr>
11681 When yydebug, report semantic and location values for reductions.
11682 * data/glr.c (yy_reduce_print): Report the semantic values and the
11684 (YY_REDUCE_PRINT): Adjust.
11685 (yyglrReduce): Use them.
11686 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
11687 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
11688 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
11691 2005-11-10 Akim Demaille <akim@epita.fr>
11693 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
11694 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
11695 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
11697 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
11699 * m4/cxx.m4, examples/Makefile.am: Don't build
11700 examples/calc++ if no C++ compiler is available. (trivial change)
11702 2005-11-09 Akim Demaille <akim@epita.fr>
11704 * src/scan-skel.l: Use a couple of asserts.
11706 2005-11-03 Akim Demaille <akim@epita.fr>
11708 In some (weird) cases, the final state number is incorrect.
11709 Reported by Alexandre Duret-Lutz.
11710 * src/LR0.c (state_list_append): Remove the computation of
11712 (save_reductions): Do it here.
11713 (get_state): Alpha conversion.
11714 (generate_states): Use a for loop.
11715 * src/gram.h (item_number_is_rule_number)
11716 (item_number_is_symbol_number): New.
11717 * src/state.c: Use assert.
11718 * src/system.h: Include assert.h.
11719 * tests/sets.at (Accept): New.
11721 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11723 * data/glr.c (yyfill): Adjust comment.
11724 (yyresolveAction): Initialize default location properly
11725 for empty right-hand sides.
11726 (yydoAction): Ditto.
11727 Add comment explaining apparently dead code.
11728 * tests/glr-regression.at
11729 (Incorrectly initialized location for empty right-hand side in GLR):
11732 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
11734 * bootstrap (cleanup_gnulib): New function. Use it to clean up
11735 gnulib when interrupted. This fixes some race conditions and
11736 works around some portability problems (one noted by Paul
11739 2005-10-22 Akim <akim@epita.fr>
11741 * Makefile.cfg: Adjust to config -> build-aux.
11742 Reported by twledo.
11744 2005-10-21 Akim Demaille <akim@epita.fr>
11746 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
11748 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
11749 * data/yacc.c (b4_Pure_if): Rename as...
11750 (b4_yacc_pure_if): this.
11751 (YY_SYMBOL_PRINT, yyparse): Adjust.
11752 * doc/bison.texinfo: Formatting changes.
11754 2005-10-21 Akim Demaille <akim@epita.fr>
11756 Finish the transition config -> build-aux.
11757 * configure.ac, Makefile.am: Use build-aux.
11758 * config/prev-version, config/announce-gen, config/Makefile.am:
11760 * build-aux/prev-version, build-aux/announce-gen,
11761 * build-aux/Makefile.am: here.
11763 2005-10-14 Akim Demaille <akim@epita.fr>
11765 * examples/calc++/test: Use set -x only when VERBOSE.
11767 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
11769 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
11770 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
11772 2005-10-13 Akim Demaille <akim@epita.fr>
11774 * src/scan-skel.l: Output the base name parts of the parser and
11776 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
11778 Use this to exercise C++ outputs in subdirs.
11779 Reported by Oleg Smolsky.
11781 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
11783 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
11784 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
11785 Problem reported by John P. Hartmann.
11786 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
11787 already defined it.
11789 2005-10-12 Akim Demaille <akim@epita.fr>
11791 * src/parse-gram.y (version_check): Exit 63 to please missing
11792 (stands for "version mismatch).
11793 * tests/input.at, doc/bison.texinfo: Adjust.
11795 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
11797 Work around portability problems with Visual Age C compiler
11798 (xlc and xlC_r) reported by John P. Hartmann.
11799 * data/location.cc (initial_column, initial_line): Remove.
11800 All uses replaced by 0 and 1.
11801 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
11802 that xlc complains about.
11803 * src/scan-skel.l (skel_wrap): Likewise.
11804 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
11806 * data/yacc.c (YYMODERN_C): New macro, which also looks at
11807 __STDC_VERSION__. Use it everywhere instead of looking at
11808 __STDC__ and __cplusplus.
11810 2005-10-10 Akim Demaille <akim@epita.fr>
11812 * examples/calc++/test: Be quiet unless VERBOSE.
11814 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
11816 * data/c.m4 (yydestruct, yysymprint):
11817 Use YYUSE instead of casting to void.
11818 * data/glr.c (YYUSE): New macro.
11819 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11820 Use it instead of rolling our own.
11821 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11823 Use /*CONSTCOND*/ to suppress lint warnings.
11824 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11825 (YY_STACK_PRINT): Use 'false' not '0'.
11826 (YYUSE): New macro.
11827 (yysymprint_, yydestruct_): Use it instead of rolling our own.
11828 * data/yacc.c (YYUSE): New macro.
11829 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
11830 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
11831 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
11834 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
11835 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
11837 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
11839 Undo the parts of the unlocked-I/O change that substituted
11840 putc or puts for printf. This might hurt performance a bit,
11841 but some people prefer the printf style.
11842 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
11843 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
11844 All uses replaced by YYFPRINTF and YYDPRINTF.
11845 * data/yacc.c: Likewise.
11846 * lib/bitset.c (bitset_print): Likewise.
11847 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
11849 * lib/lbitset.c (debug_lbitset): Likewise.
11850 * src/closure.c (print_firsts, print_fderives): Likewise.
11851 * src/gram.c (grammar_dump): Likewise.
11852 * src/lalr.c (look_ahead_tokens_print): Likewise.
11853 * src/output.c (escaped_output): Likewise.
11854 (user_actions_output): Break apart two printfs.
11855 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
11856 * src/reduce.c (reduce_print): Likewise.
11857 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11858 * src/system.h: Include unlocked-io.h rathe than stdio.h.
11860 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11861 Use assignments rather than casts-to-void to suppress
11862 unused-variable warnings. This pacifies 'lint'.
11863 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
11864 unused-variable warnings.
11866 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11868 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11870 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
11872 Use unlocked I/O for a minor performance improvement on hosts like
11873 GNU/Linux and Solaris that support unlocked I/O. The basic idea
11874 is to use the gnlib unlocked-io module, and to prefer putc and
11875 puts to printf when either will work (since the latter doesn't
11876 come in an unlocked flavor).
11877 * bootstrap (gnulib_modules): Add unlocked-io.
11878 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
11879 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
11880 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
11881 and similarly for puts and putc and printf.
11882 * data/yacc.c: Likewise.
11883 * lib/bitset.c (bitset_print): Likewise.
11884 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
11885 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
11887 * lib/lbitset.c (debug_lbitset): Likewise.
11888 * src/closure.c (print_firsts, print_fderives): Likewise.
11889 * src/gram.c (grammar_dump): Likewise.
11890 * src/lalr.c (look_ahead_tokens_print): Likewise.
11891 * src/output.c (escaped_output): Likewise.
11892 (user_actions_output): Coalesce two printfs.
11893 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
11894 * src/reduce.c (reduce_print): Likewise.
11895 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11896 * src/system.h: Include unlocked-io.h rather than stdio.h.
11898 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
11899 this confuses xgettext.
11901 2005-10-02 Akim Demaille <akim@epita.fr>
11903 * bootstrap (gnulib_modules): Add strverscmp.
11904 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
11905 * m4/.cvsignore: Add strverscmp.m4.
11906 * src/parse-gram.y (%require): New token, new rule.
11907 (version_check): New.
11908 * src/scan-gram.l (%require): Adjust.
11909 * tests/input.at (AT_REQUIRE): New.
11911 * doc/bison.texinfo (Require Decl): New.
11912 (Calc++ Parser): Use %require.
11914 2005-10-02 Akim Demaille <akim@epita.fr>
11916 * data/location.cc: New.
11918 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
11919 Akim Demaille <akim@epita.fr>
11921 Make sure -odir/foo.cc creates dir/location.hh etc.
11922 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
11923 (spec_file_prefix, spec_verbose_file, spec_graph_file)
11924 (spec_defines_file): Now const.
11926 (short_base_name): Remove.
11927 * src/files.c: Adjust.
11928 (dirname.h): Include.
11929 (base_name): Don't prototype it.
11930 (finput): Remove, duplicates gram_in.
11931 (full_base_name, short_base_name): Replace by...
11932 (all_but_ext, all_but_tab_ext): these.
11933 (compute_base_names): Rename as...
11934 (compute_file_name_parts): this.
11935 Update to compute the new variables, including dir_prefix.
11936 Adjust dependencies.
11937 * src/output.c (prepare): Output them.
11938 * src/reader.c: Adjust to use gram_in, not finput.
11939 * src/scan-skel.l (@dir_prefix@): New.
11941 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11943 * lib/subpipe.c: New function end_of_output_subpipe() added
11944 to allow support for non-posix systems. This is a no-op function
11947 * lib/subpipe.h: New function end_of_output_subpipe() added
11948 to allow support for non-posix systems. This is a no-op function
11951 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
11952 handle the lack of pipe/fork functionality on non-posix systems.
11954 * djgpp/Makefile.maint: DJGPP specific file.
11956 * djgpp/README.in: DJGPP specific file.
11958 * djgpp/config.bat: DJGPP specific configuration file.
11960 * djgpp/config.sed: DJGPP specific configuration file.
11962 * djgpp/config.site: DJGPP specific configuration file.
11964 * djgpp/config_h.sed: DJGPP specific configuration file.
11966 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
11968 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
11970 2005-10-02 Akim Demaille <akim@epita.fr>
11972 * data/location.cc: New, extract from...
11973 * data/lalr1.cc: here.
11974 (location.hh): Include it after the user prologue, in case the
11975 filename type is defined by the user.
11976 Forward declation location and position before the pre-prologue.
11977 (yyresult_): Rename as...
11978 (yyresult): this, it's a local variable, not an attribute.
11979 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
11981 2005-10-01 Akim Demaille <akim@epita.fr>
11983 * examples/extexi: Restore the #line generation.
11985 2005-09-30 Akim Demaille <akim@epita.fr>,
11986 Alexandre Duret-Lutz <adl@gnu.org>
11988 Move the token type and YYSTYPE in the parser class.
11989 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
11990 (parser::token): New, from the moved free definition of tokens.
11991 (parser::semantic_value): Now a full definition instead of an
11992 indirection to YYSTYPE.
11993 (b4_post_prologue): No longer included in the header file, but
11994 in the implementation file.
11995 * doc/bison.texi (C+ Language Interface): Update.
11996 * src/parse-gram.y: Support unary %define.
11997 * tests/actions.at: Define global_tokens_and_yystype for backward
11998 compatibility until we update the tests.
11999 * tests/calc.at: Idem.
12000 (first_line, first_column, last_line, last_column): Define for lalr1.cc
12001 to simplify the code.
12003 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
12005 Port to SunOS 4.1.4, which lacks strtoul and strerror.
12006 Ah, the good old days! Problem reported by Peter Klein.
12007 * bootstrap (gnulib_modules): Add strerror, strtoul.
12008 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
12009 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
12011 2005-09-29 Akim Demaille <akim@epita.fr>
12013 * data/c.m4 (b4_error_verbose_if): New.
12014 * data/lalr1.cc: Use it.
12015 (YYERROR_VERBOSE_IF): Remove.
12016 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
12017 parser members, replaced by...
12018 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
12020 (yysyntax_error_): Takes the state number as argument.
12021 (yyreduce_print_): Use the argument yyrule, not the former
12024 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
12026 * bootstrap (gnulib_modules): Add verify.
12027 * lib/.cvsignore: Add verify.h.
12028 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
12029 * src/system.h (verify): Remove.
12030 Include verify.h instead.
12031 * src/tables.c (tables_generate): Use new API for 'verify'.
12033 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
12035 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
12036 local variables whose names begin with 'yy'.
12037 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
12038 Trivial changes from Joel E. Denny.
12040 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
12042 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
12043 don't use alloca any more.
12045 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
12046 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
12047 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
12048 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
12049 to match yacc.c, to test more hosts.
12051 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
12053 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
12054 doesn't affect behavior.
12055 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
12057 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
12058 This works a bit better with glibc, if user code has already included
12060 * doc/bison.texinfo (Bison Parser): Document that users can't
12061 arbitrarily use malloc and free for other purposes. Document
12062 that <alloca.h> and <malloc.h> might be included.
12063 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
12064 user must declare alloca.
12066 * HACKING (release): Forwarn the Translation Project about
12069 2005-09-20 Akim Demaille <akim@epita.fr>
12071 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
12073 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
12075 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
12076 (YYSTACK_ALLOC_MAXIMUM): Use it.
12077 (yysyntax_error): New function.
12078 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
12079 multiple syntax errors are reported, and alloca is being used.
12080 Instead, reallocate buffers twice as big each time, so that
12081 we waste at most half the allocated memory. Start with a small
12082 (128-byte) buffer that will suffice in most cases anyway.
12083 Use yysyntax_error to do most of the work.
12085 * doc/bison.texinfo (Error Reporting, Table of Symbols):
12086 yynerrs is the number of errors reported, not the number of
12087 errors encountered.
12089 * tests/glr-regression.at (Duplicated user destructor for lookahead):
12090 Mark it as expected to fail.
12091 Cast result of malloc; problem reported by twlevo@xs4all.nl.
12092 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
12093 Don't start user-code symbols with "yy", to avoid name space problems.
12095 2005-09-19 Akim Demaille <akim@epita.fr>
12097 Remove the traits, failed experiment.
12098 It never proved useful, and anyway because of the current
12099 definition, it was not possible to have several specialization of
12100 this traits, making it useless.
12101 * data/lalr1.cc (yy:traits): Remove.
12102 Inline its definitions in the parser class.
12104 2005-09-19 Akim Demaille <akim@epita.fr>
12106 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
12107 least Mac OSX with a /usr/local install of gettext.
12109 2005-09-19 Akim Demaille <akim@epita.fr>
12111 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
12112 and yytoken for similarity with the other skeletons.
12114 2005-09-19 Akim Demaille <akim@epita.fr>
12116 * NEWS, configure.ac: update version number to 2.1a.
12118 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
12120 * NEWS: Version 2.1.
12122 * NEWS: Remove notice of yytname change, since it was never in an
12124 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
12126 * src/output.c (prepare): Likewise.
12127 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
12128 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
12129 is not defined. This is an awful hack, but it's enough for now.
12130 All callers changed.
12131 * tests/glr-regression-at (make_value): Args are const pointers now,
12132 to avoid GCC warning.
12133 (Duplicated user destructor for lookahead): New test. Currently
12134 skipped. It fails on my host but I'm not sure it'll always fail.
12136 2005-09-16 Akim Demaille <akim@epita.fr>
12138 * src/symtab.h (struct symbol): Declare the printer and destructor
12139 as const, to avoid accidental calls to free.
12140 (symbol_destructor_set, symbol_printer_set): Adjust.
12141 * src/symtab.c: Adjust.
12143 2005-09-16 Akim Demaille <akim@epita.fr>
12145 * data/c.m4 (b4_token_enums): New.
12146 (b4_token_defines): Rename as...
12147 (b4_token_enums_defines): this.
12148 (b4_token_defines): New, output only the #defines.
12149 * data/yacc.c, data/glr.c: Adjust.
12150 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
12151 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
12154 2005-09-16 Akim Demaille <akim@epita.fr>
12156 * data/lalr1.cc (yylex_): Remove, inline its code.
12157 (yyreport_syntax_error_): Remove, replaced by...
12158 (yysyntax_error_): this which returns a string and leaves to the
12159 caller the call to the users' error function.
12160 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
12161 Move from members of the parser object...
12162 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
12163 to local variables of the parse function.
12165 2005-09-16 Akim Demaille <akim@epita.fr>
12167 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
12168 since it's in Bison's name space.
12170 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
12172 * data/glr.c (yyresolveValue): Add default case to pacify
12173 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
12175 * NEWS: Document when yyparse started to return 2.
12176 * doc/bison.texinfo (Parser Function): Document when yyparse
12179 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
12180 (b4_filename_type): Renamed back from b4_file_name_type. All uses
12182 (class position): file_name -> filename (reverting). All uses changed.
12184 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
12186 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
12187 do anything if $@ exists. This reverts part of the 2005-07-07
12190 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
12192 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
12193 contains obsolete information and isn't worth distributing as a
12194 separate file anyway.
12195 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
12196 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
12197 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
12198 (yyparse): Abort if user code uses longjmp to throw an unexpected
12201 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
12203 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
12204 Suggested by twlevo@xs4all.nl.
12206 * data/glr.c (YYCHK1): Do not assume YYE is in range.
12207 This avoids a diagnostic from gcc -Wswitch-enum.
12208 Problem reported by twlevo@xs4all.nl.
12210 * doc/bison.texinfo: Don't use "filename", as per GNU coding
12211 standards. Use "file name" or "file" or "name", depending on
12213 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
12214 not to hack/foo.tab.c.
12215 (Calc++ Top Level): 2nd arg of main is not const.
12216 * data/glr.c: b4_filename -> b4_file_name.
12217 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
12219 (class position): filename -> file_name. All uses changed.
12220 * data/yacc.c: b4_filename -> b4_file_name.
12221 * lib/bitset.h: filename -> file_name in local vars.
12222 * lib/bitset_stats.c: Likewise.
12223 * src/files.c: Likewise.
12224 * src/scan-skel.l ("@output ".*\n): Likewise.
12225 * src/files.c (file_name_split): Renamed from filename_split.
12226 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
12228 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
12230 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
12231 to accommodate latest gnulib.
12233 * tests/glr-regression.at (Duplicate representation of merged trees):
12234 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
12236 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
12239 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
12241 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
12242 All uses changed. Invoke user destructor after an error during a
12243 split parse (trivial change from Joel E. Denny).
12245 * tests/glr-regression.at
12246 (User destructor after an error during a split parse): New test case.
12247 Problem reported by Joel E. Denny in:
12248 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
12250 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
12252 * README-cvs: Give URLs for recommended tools.
12253 Mention Gzip version problem, and bootstrapping issues.
12254 Remove troubleshooting section, as it's somewhat obsolete.
12256 * bootstrap (no_cache): New var, to accommodate different wget
12257 variants. Use it instead of '-C off'. Problem reported by
12260 * data/glr.c (yydestroyStackItem): New function.
12261 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
12262 debugging information. Problem reported by Joel E. Denny.
12264 2005-08-25 Akim Demaille <akim@epita.fr>
12266 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
12268 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
12270 * data/glr.c (yyrecoverSyntaxError, yyreturn):
12271 Don't invoke destructor on unresolved entries.
12272 * tests/glr-regression.at
12273 (User destructor for unresolved GLR semantic value): New test case.
12274 Problem reported by Joel E. Denny in:
12275 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
12277 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
12279 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
12281 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
12282 lib-prefix.m4, po.m4.
12284 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
12285 in yydestruct diagnostic, since it might not be an error.
12286 Problem reported by Joel Denny near end of
12287 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
12288 * data/lalr1.cc (yyerturn): Likewise.
12289 * data/yacc.c (yyreturn): Likewise.
12290 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
12292 * src/files.c: Remove obsolete FIXME comment.
12294 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
12295 with the other templates, and to fix bogus run-on messages such
12296 as the one reported at the end of
12297 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
12298 All callers changed to avoid the newline.
12299 (yyprocessOneStack): Output two lines rather than one, to accommodate
12300 the above change. This changes the debug output format slightly.
12302 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
12303 reported by Joel E. Denny in
12304 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
12306 * tests/glr-regression.at (Duplicate representation of merged trees):
12307 New test, from Joel E. Denny in:
12308 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
12309 * THANKS: Add Joel E. Denny.
12311 * configure.ac (AC_INIT): Bump to 2.0c.
12313 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
12315 * NEWS: Version 2.0b.
12317 * Makefile.am (SUBDIRS): Put examples before tests, so that
12318 "make check" doesn't finish with "All 1 tests passed".
12320 * tests/regression.at (Token definitions): Don't rely on
12321 AT_PARSER_CHECK for data that contains backslashes. It currently
12322 uses 'echo', and 'echo' isn't portable if its argument contains
12323 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
12324 that the byte '\0xff' is not printable in the C locale; it is,
12325 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
12326 not printable, so use '\0x81' to test.
12328 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
12329 version of GCC, since the macro is used with non-GCC compilers.
12331 Fix core dump reported by Pablo De Napoli in
12332 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
12333 * tests/regression.at (Invalid inputs with {}): New test.
12334 * src/parse-gram.y (token_name): Translate type before using
12337 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
12338 the user's name space. All uses changed to __attribute__
12340 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
12341 Add __attribute__ ((__noreturn__)).
12343 * etc/clcommit: Remove. We weren't using it, and it failed
12344 "make maintainer-distcheck".
12345 * Makefile.maint: Merge from coreutils.
12346 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
12347 (syntax-check-rules): Change list of rules as described below.
12348 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
12349 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
12350 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
12351 (sc_trailing_space): New rules.
12352 (sc_xalloc_h_in_src): Remove.
12353 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
12354 (sc_space_tab, sc_error_exit_success, sc_changelog):
12355 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
12356 (makefile-check, po-check, author_mark_check):
12357 (makefile_path_separator_check, copyright-check):
12358 Use grep -n, to make it easier to find violations.
12359 Use CVS_LIST and CVS_LIST_EXCEPT.
12360 (header_regexp, h_re): Remove.
12362 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
12363 (my-distcheck): Use more-modern GCC flags.
12364 (signatures, %.asc): Remove.
12365 (rel-files, announcement): Remove signatures.
12366 Restore old updating code, even though we don't use it, so
12367 that we're the same as coreutils.
12368 (alpha, beta, major): Depend on news-date-check.
12369 Make the upload commands.
12371 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
12372 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
12373 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
12374 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
12375 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
12376 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
12377 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
12378 * tests/sets.at: Likewise.
12380 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
12381 we comment out the Autoconf version number.
12382 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
12383 it's error-prone and "make maintainer-distcheck" rejects it.
12385 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
12386 Indent calls to "error" to pacify "make maintainer-distcheck",
12387 when the calls are not intended to be translated.
12388 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
12390 * src/Makefile.am (DEFS): Use +=, to pacify
12391 "make maintainer-distcheck".
12392 (bison_SOURCES): Add scan-skel.h.
12393 (sc_tight_scope): New rule, from coreutils.
12395 * src/files.c (src_extension, header_extension):
12396 Now static, not extern.
12397 * src/getargs.c (short_options): Likewise.
12398 * src/muscle_tab.c (muscle_table): Likewise.
12399 * src/parse-gram.y (current_class, current_type, current_prec):
12401 * src/reader.c (grammar_end, previous_rule_end): Likewise.
12402 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
12403 * src/main.c (main): Cast bindtextdomain and textdomain calls to
12404 void, to avoid warning when NLS is disabled.
12405 * src/output.c: Include scan-skel.h.
12406 (scan_skel): Remove decl, since scan-skel.h does this.
12408 Indent calls to "error" to pacify "make maintainer-distcheck".
12409 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
12410 * src/reader.h (gram_end, gram_lineno): New decls to pacify
12411 "make maintainer-distcheck".
12412 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
12413 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
12414 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
12415 (skel_lex_destroy, scan_skel): Move these decls to...
12416 * src/scan-skel.h: New file.
12417 * src/uniqstr.c (uniqstr_assert):
12418 Indent calls to "error" to pacify "make maintainer-distcheck".
12420 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
12423 * tests/torture.at: Revamp to avoid misuse of atoi that
12424 "make maintainer-distcheck" complained about.
12426 * examples/extexi (message): Don't print a message more than once,
12427 and omit line-number decoration that makes Emacs compile think
12428 that informative messages are worth worrying about.
12430 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
12432 * configure.ac: Update version number.
12434 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
12436 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
12437 autogenerated by the maintainer.
12438 * examples/calc++/.cvsignore: Add *.yy.
12440 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
12441 * lib/bitset_stats.c (bitset_stats_init): Likewise.
12442 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12444 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
12446 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
12447 from maintainer-distcheck about casting the argument of 'free'.
12449 * NEWS: Mention recent yytname changes.
12450 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
12452 * bootstrap: For translations that have not yet been upgraded to
12453 the new runtime-po domain, prime the pump by extracting the
12454 relevant strings from the obsolete translations. This code can be
12455 removed once the bison-runtime domain has been translated by each
12458 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
12459 now that token names are already quoted.
12461 Fix problem reported by Anthony Heading.
12462 * data/glr.c (YYTOKEN_TABLE): New macro.
12463 (yytname): Define if YYTOKEN_TABLE.
12464 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
12465 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
12466 (YYERROR_VERBOSE): Define the same way the other skeletons do.
12467 * src/output.c (prepare_symbols): Output token_table_flag.
12469 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
12471 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
12472 again if the first call fails.
12474 * data/glr.c (yytnamerr): New function.
12475 (yyreportSyntaxError): Use it to dequote most string literals.
12476 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
12477 with other skeletons. All uses changed.
12478 (yytnameerr_): New function.
12479 (yyreport_syntax_error): Use it to dequote most string literals.
12480 * data/yacc.c (yytnamerr): New function.
12481 (yyerrlab): Use it to decode most string literals.
12482 * doc/bison.texinfo (Decl Summary, Calling Convention):
12483 Clarify quoting convention of yytname.
12484 * src/output.c (prepare_symbols): Quote all names. This undoes
12485 the 2005-04-17 change, which is now accomplished (mostly) via
12486 changes in the parsers as described above.
12487 * tests/regression.at (Token definitions, Web2c Actions):
12488 Undo most 2005-04-17 change here, too.
12490 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
12492 Fix more problems reported by twlevo@xs4all.nl.
12493 * tests/cxx-type.at: Don't pipe output of ./types through sed to
12494 remove trailing spaces. This loses the exit status of ./types,
12495 and isn't needed since ./types shouldn't be emitting trailing
12497 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
12498 as the stack isn't valid in that case.
12500 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
12501 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
12502 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
12503 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
12505 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
12506 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
12507 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
12510 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
12511 overly-picky compilers that reject 'char *foo = "bar";'.
12513 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
12514 to FILE * parameter, not to stderr. This fixes a typo introduced
12515 in the 2005-07-12 change.
12517 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
12518 warnings from GCC 4.
12520 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
12521 (yyglrShiftDefer, yysplitStack):
12522 Remove unused parameters b4_pure_formals. All uses changed.
12523 (yyglrShift): Remove unused parameters b4_user_formals.
12525 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
12527 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
12529 Destructor cleanups and regularization among the three skeletons.
12530 * NEWS: Document the behavior changes.
12531 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
12532 stack before failing, as the cleanup code will do it for us now.
12533 * data/lalr1.cc (yyerrlab): Likewise.
12534 * data/glr.c (yyparse): Pop everything off the stack before
12535 freeing it, so that destructors get called properly.
12536 * data/lalr1.cc (yyreturn): Likewise.
12537 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
12538 This is more consistent.
12539 * doc/bison.texinfo (Destructor Decl): Mention more reasons
12540 why destructors might be called. 1.875 -> 2.1.
12541 (Destructor Decl, Decl Summary, Table of Symbols):
12542 Some English-language cleanups for %destructor.
12543 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12544 Add output line for destructor of start symbol.
12545 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
12546 because of that same extra output line.
12548 * NEWS: Document minor wording changes in diagnostics of
12549 Bison-generated parsers.
12550 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
12551 Remove unused formals. All uses changed.
12552 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
12553 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
12554 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
12555 Rename yyoverflowab to yyexhaustedlab.
12556 When memory exhaustion occurs during syntax-error reporting,
12557 report it separately rather than in a single diagnostic; this
12559 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
12560 (Memory Exhausted): Renamed from Parser Stack Overflow.
12561 Revamp wording slightly to prefer "memory exhaustion".
12562 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
12564 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
12566 Add i18n support to the GLR skeleton. Partially fix the C++
12567 skeleton; a C++ expert needs to finish this. Remove debugging
12568 msgids; there's little point to having them translated, since they
12569 can be understood only by someone who can read the
12570 (English-language) source code.
12572 Generate runtime-po/bison-runtime.pot automatically, so that we
12573 don't have to worry about garbage getting in that file. We'll
12574 make sure after the next official release that old msgids don't
12576 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
12578 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
12579 Now auto-generated.
12580 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
12581 Fix typos in explanations of the runtime file.
12582 * bootstrap: Change gettext keyword from YYI18N to YY_.
12583 Use standard Makefile.in.in in runtime-po, since we'll arrange
12584 for backward-compatible bison-runtime.po files in a different way.
12585 * data/glr.c (YY_): New macro, from yacc.c.
12586 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
12587 Translate messages intended for users.
12588 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
12589 the wording in the other skeletons. We don't know that the memory
12591 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
12592 Use same method that yacc.c uses.
12593 Don't translate debugging messages.
12594 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
12595 it doesn't work (yet), and requires C++ expertise to fix.
12596 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
12597 Move defn to a more logical place, to be consistent with other
12599 Don't translate debugging messages.
12600 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
12601 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
12602 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
12603 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
12605 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
12606 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
12608 * tests/glr-regression.at (Badly Collapsed GLR States):
12610 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12611 yylex should return 0 at EOF rather than aborting.
12613 Improve tests for stack overflow in GLR parser.
12614 Problem reported by twlevo@xs4all.nl.
12615 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
12617 (yyStackOverflow): Just longjmp, but with value 2 so that caller
12618 can handle the problem.
12619 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
12620 (yyparse): New local variable yyresult to record the result.
12621 Use result of setjmp to set it, rather than storing itinto
12623 (yyDone): Remove label.
12624 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
12625 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
12626 if YYABORT is used).
12627 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
12628 yyparse status; put status > 1 into diagnostic.
12629 Check that status==2 works.
12630 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
12631 Use exit status 3 for failure to open (which shouldn't happen).
12633 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
12635 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
12636 1 on syntax error; just let yyparse do its thing.
12637 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
12638 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
12639 (Exploding the Stack Size with Alloca):
12640 (Exploding the Stack Size with Malloc):
12641 Expect exit status 2, not 1, since the parser is supposed to blow
12642 its stack. Problem reported by twlevo@xs4all.nl.
12644 * data/glr.c (yyparse): Don't assume that the initial calls
12645 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
12646 Print a stack-overflow message and fail instead.
12647 Initialize the line-number information before creating the stack,
12648 so that the stack-overflow message can report line zero safely.
12650 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
12652 Fix problems reported by twlevo@xs4all.nl.
12653 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
12654 (yyuserMerge): Provide a default case if b4_mergers is empty.
12655 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
12656 * tests/glr-regression.at
12657 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12658 Add casts to pacify C++ compilers.
12659 * tests/glr-regression.at (Improper merging of GLR delayed action
12660 sets): Declare yylex before using it.
12661 * tests/Makefile.am (maintainer-check-g++): Fix a stray
12662 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
12663 test for valgrind; valgrind is independent of g++.
12664 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
12665 for compatibility with POSIX 1003.1-2001 (if running coreutils).
12666 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
12667 Use a destructor, so that we can expand the stack. Change
12668 YYSTYPE to char * so that we can free it. Cast result of malloc.
12670 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12672 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
12673 a valgrind failure. Problem reported by twlevo@xs4all.nl.
12675 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
12677 * PACKAGING: New file, suggested by Bruno Haible and taken from
12678 similar wording in gettext's PACKAGING file.
12679 * NEWS: Mention PACKAGING.
12680 * Makefile.am (EXTRA_DIST): Add PACKAGING.
12682 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
12684 * NEWS: Document recent i18n improvements.
12685 * bootstrap: Get runtime translations into runtime-po.
12686 Create runtime-po files automatically, if possible.
12687 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
12688 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
12689 does not infringe on the user's name space.
12690 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
12691 * doc/bison.texinfo (Internationalization): Revamp the English
12692 and Texinfo syntax a bit, to try to make it clearer.
12693 (Bison Options, Option Cross Key): Mention --print-localedir.
12694 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
12695 YYENABLE_NLS. Quote a bit more.
12696 * runtime-po/.cvsignore: New file.
12697 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
12698 * runtime-po/Rules-quot: Remove; now created by bootstrap.
12699 * runtime-po/quot.sed: Likewise.
12700 * runtime-po/boldquot.sed: Likewise.
12701 * runtime-po/en@quot.header: Likewise.
12702 * runtime-po/en@boldquot.header: Likewise.
12703 * runtime-po/insert-header.sin: Likewise.
12704 * runtime-po/remove-potcdate.sin: Likewise.
12705 * runtime-po/Makevars: Likewise.
12706 * runtime-po/LINGUAS: Likewise.
12707 * runtime-po/de.po: Likewise; we will rely on the translation project
12708 to maintain this, so "bootstrap" should get it.
12709 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
12711 * src/main.c (main): Bind the bison-runtime domain, too.
12713 2005-07-12 Bruno Haible <bruno@clisp.org>
12715 * data/yacc.c: Include <libintl.h> when NLS is enabled.
12716 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
12717 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
12718 * runtime-po: New directory.
12719 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
12720 $(DOMAIN).pot-update rule, so that old messages are never dropped.
12721 * runtime-po/Rules-quot: New file, copied from po/.
12722 * runtime-po/quot.sed: Likewise.
12723 * runtime-po/boldquot.sed: Likewise.
12724 * runtime-po/en@quot.header: Likewise.
12725 * runtime-po/en@boldquot.header: Likewise.
12726 * runtime-po/insert-header.sin: Likewise.
12727 * runtime-po/remove-potcdate.sin: Likewise.
12728 * runtime-po/Makevars: New file.
12729 * runtime-po/POTFILES.in: New file.
12730 * runtime-po/LINGUAS: New file.
12731 * runtime-po/bison-runtime.pot: New file.
12732 * runtime-po/de.po: New file.
12733 * m4/bison.m4: New file.
12734 * Makefile.am (SUBDIRS): Add runtime-po.
12735 (aclocaldir, aclocal_DATA): New variables.
12736 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
12738 * src/getargs.c (usage): Document --print-localedir option.
12739 (PRINT_LOCALEDIR_OPTION): New enum item.
12740 (long_options): Add --print-localedir option.
12741 (getargs): Handle --print-localedir option.
12742 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
12743 (Internationalization): New section.
12745 2005-07-12 Akim Demaille <akim@epita.fr>
12747 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
12748 for consistency with the rest of the code.
12749 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
12752 2005-07-12 Akim Demaille <akim@epita.fr>
12754 * src/parse-gram.y: Use %printer instead of YYPRINT.
12756 2005-07-12 Akim Demaille <akim@epita.fr>
12758 * src/symtab.h, src/symtab.c (symbol_print): New.
12759 * src/symlist.h, src/symlist.c (symbol_list_print): New.
12760 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
12762 2005-07-12 Akim Demaille <akim@epita.fr>
12764 * data/glr.c (b4_syncline): Fix (swap) the definitions of
12765 b4_at_dollar and b4_dollar_dollar.
12767 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
12769 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
12770 and Pennello's paper.
12772 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
12774 * data/yacc.c (yyparse): Undo previous patch. Instead,
12775 set yylsp[0] and yyvsp[0] only if the initial action
12776 sets yylloc and yylval, respectively.
12778 * data/yacc.c (yyparse): In the initial action, set
12779 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
12780 This avoids the use of undefined variables if the initial
12781 action does not set yylloc and/or yylval.
12783 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
12785 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
12786 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
12787 Remove from CVS. These files are automatically generated.
12788 * examples/extexi: Clarify that this file is now part of Bison,
12789 not GNU M4, and that it works with any POSIX-compatible Awk.
12790 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
12791 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
12792 so that we also get calc++-parser.yy. Geneate it.
12793 Use $(AWK), not gawk, since any conforming Awk will do.
12794 Put comment before action, since older 'make' can't handle comment
12796 $(BUILT_SOURCES): List all built sources, not just some of them.
12797 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
12798 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
12799 $($(calc_sources_generated)): Remove unnecessary test for existence
12800 of target. (This had a shell syntax error anyway; a stray "x".)
12801 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
12803 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
12805 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
12806 implied by the other modules.
12808 2005-07-06 Akim Demaille <akim@epita.fr>
12810 Bind examples/calc++ to the package.
12811 * examples/calc++/Makefile: Remove, replaced by...
12812 * examples/calc++/Makefile.am: ... this new file.
12813 * examples/calc++/test: Remove input.
12814 * examples/calc++/compile: Remove.
12815 * examples/Makefile.am: New.
12816 * configure.ac, Makefile.am: Adjust.
12817 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
12819 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
12821 * data/glr.c (yyFail): Drastically simplify; since the format argument
12822 never had any % directives, we can simply pass it to yyerror.
12823 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
12824 be modified later, as that is the usual style in glr.c.
12825 Problems reported by Paul Hilfinger.
12827 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
12828 and size overflow errors.
12829 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
12830 in case the user prolog sets feature-test macros like _GNU_SOURCE.
12831 (YYSIZEMAX): New macro.
12832 (yystpcpy): New function, taken from yacc.c.
12833 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
12834 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
12835 so that we don't have to maintain their signatures.
12836 (yyFail): Check for buffer overflow, by using vsnprintf rather
12837 than vsprintf. Allocate a bigger buffer if possible.
12838 Report an error if buffer allocation fails.
12839 (yyStackOverflow): New function.
12840 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
12841 the initialization was successful. It might fail if storage was
12843 (yyexpandGLRStack): Add more checks for storage allocation failure.
12844 Use yyStackOverflow to report failures.
12845 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
12846 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
12847 Don't assume stack number fits in int.
12848 (yysplitStack): Check for storage allocation failure.
12849 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
12850 can print diagnostics on storage allocation failure. All callers
12852 (yyresolveValue): Use yybool for boolean.
12853 (yyreportSyntaxError): Check for size-calculation overflow.
12854 This code is taken from yacc.c.
12855 (yyparse): Check for storage allocation errors when allocating
12858 2005-07-05 Akim Demaille <akim@epita.fr>
12860 Extract calc++ from the documentation.
12861 * doc/bison.texinfo (Calc++): Add the extraction marks.
12862 * examples/extexi: New, from the aborted GNU Programming 2E.
12863 Separate the different paragraph of a file with empty lines.
12864 * examples/Makefile: Use it to extract the whole calc++ example.
12866 2005-06-24 Akim Demaille <akim@epita.fr>
12868 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
12871 2005-06-22 Akim Demaille <akim@epita.fr>
12873 * doc/bison.texinfo (C++ Language Interface): First stab.
12874 (C++ Parsers): Remove.
12876 2005-06-22 Akim Demaille <akim@epita.fr>
12878 * data/lalr1.cc (yylex_): Honor %lex-param.
12880 2005-06-22 Akim Demaille <akim@epita.fr>
12882 Start a set of simple examples.
12883 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
12884 * examples/calc++/calc++-driver.hh,
12885 * examples/calc++/calc++-parser.yy,
12886 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
12887 * examples/calc++/compile, examples/calc++/test: New.
12889 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
12891 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
12892 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
12893 which stems from the 2005-05-27 patch.
12895 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12897 * data/glr.c: Modify treatment of unused parameters to permit use
12898 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
12900 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
12902 Fix infringement on user name space reported by Janos Zoltan Szabo.
12903 * data/yacc.c (yyparse): strlen -> yystrlen.
12905 2005-05-30 Akim Demaille <akim@epita.fr>
12907 * data/lalr1.cc (_): New.
12908 Translate the various messages.
12910 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
12912 Fix infringement on user name space reported by Bruno Haible.
12913 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
12914 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
12915 the user's name space.
12916 (alloca): Include <stdlib.h> to get it, if it's not built in.
12917 (YYMALLOC, YYFREE): Define only if needed.
12918 (malloc, free): Declare, but only if needed, as this infringes on
12919 the user name space.
12921 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
12923 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
12924 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
12926 * lib/ebitset.c (min, max): Undef before defining.
12927 * lib/vbitset.c (min, max): Likewise.
12928 * lib/subpipe.c (create_subpipe): Save local variables in case
12929 vfork clobbers them.
12931 2005-05-24 Bruno Haible <bruno@clisp.org>
12933 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
12934 error message syntax used by gcc-4.0.
12936 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
12938 * README: Mention m4 1.4.3. Remove obsolete advice about
12939 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
12941 * bootstrap: Remove workaround for problem I encountered with
12942 gettext 0.14.1; it seems to be fixed now.
12944 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
12946 * NEWS: Version 2.0a.
12948 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
12949 the previous change.
12951 Various maintainer cleanups.
12952 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
12953 conftest*, for benefit of CVS commands run at the same time as
12954 "configure". Add build-aux, since "bootstrap" now creates it and
12956 * Makefile.cfg (move_if_change): Remove.
12957 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
12958 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
12959 (po_repo, do-po-update, po-update, wget_files, get-targets):
12960 (config.guess-url_prefix, config.sub-url_prefix):
12961 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
12962 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
12963 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
12965 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
12966 this is now the recommended name.
12967 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
12968 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
12969 ylwrap. These files now go into build-aux.
12970 * config/move-if-change: Remove.
12971 * config/prev-version.txt: Bump from 1.75 to 2.0.
12973 * bootstrap: Add stdio-safer, unistd-safer modules.
12974 Remove m4/glibc2.m4 (introduced by latest gnulib, but
12976 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
12977 fopen-safer.c, stdio-safer.h, unistd-safer.h.
12978 * lib/subpipe.c: Include "unistd-safer.h".
12979 (create_subpipe): Make sure all the newly-created
12980 file descriptors are > 2, so that diagnostics don't
12981 get sent down them (which might cause Bison to hang, in theory).
12982 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
12983 * src/files.c (xfopen): Use fopen_safer, not fopen.
12985 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
12986 yesterday's yacc.c fix.
12988 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
12990 * data/glr.c, data/lalr1.cc: Update copyright date.
12992 Fix a destructor bug reported by Wolfgang Spraul in
12993 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
12994 * data/yacc.c (yyabortlab): Don't call destructor, and
12995 don't set yychar to EMPTY.
12996 (yyoverflowlab): Don't call destructor.
12997 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
12998 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
12999 since we no longer output the message "discarding lookahead token
13002 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13004 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
13005 fix a small glitch in debugging output.
13006 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
13007 after YY_SYMBOL_PRINT where needed.
13009 (struct yyGLRState): Add some comments.
13010 (struct yySemanticOption): Add some comments.
13011 (union yyGLRStackItem): Add comment.
13013 (yymergeOptionSets): Correct this to properly perform the union,
13014 avoiding infinite reported by Michael Rosien.
13017 * tests/glr-regression.at: Add test for GLR merging error reported
13020 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
13022 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
13023 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
13024 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
13025 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
13026 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
13027 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
13028 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
13029 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
13030 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
13031 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
13032 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
13033 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
13034 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
13035 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
13036 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
13037 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
13038 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
13039 src/derives.h, src/files.c, src/files.h, src/getargs.c,
13040 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
13041 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
13042 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
13043 src/output.h, src/parse-gram.c, src/parse-gram.h,
13044 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
13045 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
13046 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
13047 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
13048 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
13049 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
13050 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
13051 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
13052 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
13053 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
13054 tests/reduce.at, tests/regression.at, tests/sets.at,
13055 tests/synclines.at, tests/testsuite.at, tests/torture.at:
13056 Update FSF postal mail address.
13058 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
13060 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
13061 Problem reported by Ralf Menzel.
13063 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
13065 * tests/actions.at: Test that stack overflow invokes destructors.
13066 From Marcus Holland-Moritz.
13067 * data/yacc.c (yyerrlab): Move the code that destroys the stack
13069 (yyreturn): to here. That way, destructors are called properly
13070 even if the stack overflows, or the user calls YYACCEPT or
13071 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
13072 (yyoverflowlab): Destroy the lookahead.
13074 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
13076 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
13078 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
13080 * NEWS: Bison-generated C parsers no longer quote literal strings
13081 associated with tokens.
13082 * src/output.c (prepare_symbols): Don't escape strings,
13083 since users don't want to see C escapes.
13084 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
13086 * tests/input.at (Torturing the Scanner): Likewise.
13087 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
13089 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
13091 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
13092 the data size is known to be too small and we can't increase it.
13093 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
13095 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
13097 * src/parse-gram.y: Include quotearg.h.
13098 (string_as_id): Quote $1 before using it as a key, since the
13099 lexer no longer quotes it for us.
13100 (string_content): Don't strip quotes, since lexer no longer
13102 * src/scan-gram.l: Include quotearg.h.
13103 ("\""): Omit quote.
13104 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
13105 a key, since the rest of the lexer doesn't quote it.
13106 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
13107 * tests/regression.at (Token definitions): Check for backslashes
13110 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
13111 (YYSIZE_T): Define to unsigned long int when using an older compiler.
13112 (yyparse): Revamp code to generate long syntax error message, to
13113 make it easier to translate, and to avoid problems with arithmetic
13114 overflow. Change "virtual memory" to "memory" in diagnostic, since
13115 we don't know whether the memory is virtual.
13117 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
13119 * NEWS: Bison-generated C parsers now use the _ macro to
13121 * data/yacc.c (_) [!defined _]: New macro.
13122 All English strings wrapped inside this macro.
13123 * doc/bison.texinfo (Bison Parser): Document _.
13124 * po/POTFILES.in: Include src/parse-gram.c, since it now
13125 includes translateable strings that parse-gram.y doesn't.
13127 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
13129 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
13130 reverting the 2004-10-11 change to this function.
13131 (symbol_check_alias_consistency): Don't call symbol_type_set
13132 if the type name is already correct.
13133 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
13135 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
13137 * tests/regression.at (Token definitions): Don't use a token named
13138 c, as that generates a "#define c ..." that runs afoul of buggy
13139 stdlib.h that uses the identifier c as a member of struct
13140 drand48_data. Problem reported by Horst Wente.
13142 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
13144 * bootstrap: Change translation URL from
13145 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
13146 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
13147 redirection glitches. Problem reported by twlevo@xs4all.nl.
13149 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
13151 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
13152 after operands; POSIX says this isn't portable for the c99 command.
13154 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
13156 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
13157 immediately if a data overrun has occurred; this may help us track
13158 down what may be a spurious failure on MacOS.
13160 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
13162 Respond to problems reported by twlevo@xs4all.nl.
13164 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
13166 * src/vcg.h: Comment fix.
13167 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
13168 (G_CMAX): Change to -1 instead of INT_MAX.
13170 * data/yacc.c (yyparse): Omit spaces before #line.
13172 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
13174 * src/tables.c (state_number_to_vector_number): Put it inside an
13175 "#if 0", since it's not currently used. Problem reported by
13178 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
13180 * src/output.c (escaped_output): Renamed from
13181 escaped_file_name_output, since we now use it for symbol tags as
13182 well. All uses changed.
13183 (symbol_destructors_output, symbol_printers_output):
13184 Escape symbol tags too.
13185 Problem reported by Matyas Forstner in
13186 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
13188 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
13190 * src/output.c (user_actions_output, token_definitions_output,
13191 symbol_destructors_output, symbol_printers_output): Likewise.
13192 * src/reader.c (prologue_augment): Likewise.
13193 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
13195 * src/vcg.c (output_edge): Don't quote linestyle arg.
13196 Problem reported by twlevo@xs4all.nl.
13198 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
13200 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
13201 example, reported by Derek M Jones. Also, make the example even
13202 more outrageous, to better illustrate how bad the problem is.
13204 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
13206 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
13207 putsym. Typo reported by Sebastian Piping.
13209 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
13211 * doc/bison.texinfo (Language and Grammar): some -> same
13212 (Epilogue): int he -> in the
13213 Typos reported by Sebastian Piping via Justin Pence.
13215 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
13217 * tests/glr-regression.at (Improper handling of embedded actions
13218 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
13219 embedded actions and $-N in GLR parsers", work around an Autoconf bug
13220 with dollar signs in test names.
13221 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
13222 for a similar reason.
13224 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
13226 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
13227 wants to redefine G_VIEW.
13229 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
13231 * src/vcg.c (get_view_str): Remove case for normal_view.
13232 Problem reported by twlevo@xs4all.nl.
13234 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
13236 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
13237 Problem reported by twlevo@xs4all.nl.
13239 * doc/bison.texinfo: Change @dircategory from "GNU programming
13240 tools" to "Software development". Requested by Richard Stallman
13243 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
13245 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
13246 Problem reported by twlevo@xs4all.nl.
13248 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
13250 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
13251 keyword; it's not needed with modern compilers, and it doesn't
13252 affect correctness with older compilers. Suggested by
13255 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
13257 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
13258 gcc -Wswitch-default.
13259 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13260 * data/yacc.c (yyparse): Likewise.
13262 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
13264 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
13265 already. Let config.h define any nonstandard values.
13267 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
13269 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
13270 for the benefit of slower hosts. Problem reported by
13271 Nelson H. F. Beebe.
13273 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
13275 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
13276 being defined and not used.
13277 * data/lalr1.cc (yyparse): Likewise.
13278 Use "if (false)" rather than "if (0)".
13280 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
13282 * TODO: Mention that we should allow NUL bytes in tokens.
13284 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
13286 * src/scan-skel.l (<<EOF>>): Don't close standard output.
13287 Problem reported by Hans Aberg.
13289 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
13291 * src/getargs.c (version): Happy new year; update overall
13292 program copyright date from 2004 to 2005.
13294 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
13295 Problem reported by Hans Aberg.
13296 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
13297 (Output file names.): Add a test for the case when standard output
13300 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
13302 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
13303 to fix an oversight in the Bison 2.0 manual.
13305 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
13307 * NEWS: Version 2.0. Reformat the existing news items since
13308 1.875, so that related items are grouped together.
13309 * configure.ac (AC_INIT): Bump version to 2.0.
13310 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
13312 * tests/torture.at (Exploding the Stack Size with Alloca): Set
13313 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
13314 otherwise, we're not testing alloca. Unfortunately there's no
13315 simple way to consult HAVE_ALLOCA here.
13317 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
13320 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
13321 hand. This avoids a warning about comparing int to size_t when
13322 GCC warnings are enabled.
13324 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
13326 * NEWS: Bison-generated parsers no longer default to using the
13327 alloca function (when available) to extend the parser stack, due
13328 to widespread problems in unchecked stack-overflow detection.
13329 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
13330 responsibility to set it to a positive value. This lets the user
13331 specify a value that is not a preprocessor constant.
13332 * data/yacc.c (YYMAXDEPTH): Likewise.
13333 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
13334 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
13335 to be a compile-time constant. However, explain the constraints on it.
13336 Also, explain the constraints on YYINITDEPTH.
13337 (Table of Symbols): Explain that alloca is no longer the default.
13338 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
13341 * doc/bison.texinfo (Location Default Action): Mention that n must
13342 be zero when k is zero. Suggested by Frank Heckenbach.
13344 2004-12-22 Akim Demaille <akim@epita.fr>
13346 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
13347 (parser::state_type, parser::semantic_type, parser::location_type):
13348 Private, not public.
13349 (parser::parse): Return ints, not bool.
13350 Returning a bool introduces a problem: 0 corresponds to false, and
13351 it seems weird to return false on success. Returning true changes
13352 the conventions for yyparse.
13353 Alternatively we could return void and send an exception.
13354 There is no clear consensus (yet?).
13355 (state_stack, semantic_stack, location_stack): Rename as...
13356 (state_stack_type, semantic_stack_type, location_stack_type): these.
13357 Private, not public.
13358 * tests/c++.at: New.
13359 * tests/testsuite.at, tests/Makefile.am: Adjust.
13361 2004-12-21 Akim Demaille <akim@epita.fr>
13363 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
13365 2004-12-21 Akim Demaille <akim@epita.fr>
13367 Don't impose std::string for filenames.
13369 * data/lalr1.cc (b4_filename_type): New.
13370 (position::filename): Use it.
13371 (parser.hh): Move the inclusion of stack.hh and location.hh below
13372 the user code, so that needed headers for the filename type can be
13374 Forward declare them before the user code.
13375 * tests/Makefile.am (check-local, installcheck-local): Pass
13376 TESTSUITEFLAGS to the TESTSUITE.
13378 2004-12-20 Akim Demaille <akim@epita.fr>
13380 Use more STL like names: my_class instead of MyClass.
13382 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
13383 (SemanticStack, SemanticType, StateStack, StateType)
13384 (TokenNumberType, Stack, Slice, Traits, Parser::location)
13385 (Parser::value): Rename as...
13386 (location_stack, location_type, rhs_number_type, semantic_stack)
13387 (semantic_type, state_stack, state_type, token_number_type, stack)
13388 (slice, traits, parser::yylloc, parser::yylval): these.
13390 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
13392 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
13394 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
13395 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13397 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
13399 Remove uses of 'short int' and 'unsigned short int'. This raises
13400 some arbitrary limits. It uses more memory but nowadays that's
13401 not much of an issue.
13403 This change does not affect the generated parsers; that's a different
13404 task, as some users will want to conserve memory there.
13406 Ideally we should use size_t to represent all object counts, and
13407 something like ptrdiff_t to represent signed differences of object
13408 counts; but that will require more code-cleanup than I have the
13409 time to do right now.
13411 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
13412 Use size_t, not int or short int, to count objects.
13413 * src/closure.c (nritemset, closure): Likewise.
13414 * src/closure.h (nritemset, closure): Likewise.
13415 * src/nullable.c (nullable_compute): Likewise.
13416 * src/print.c (print_core): Likewise.
13417 * src/print_graph.c (print_core): Likewise.
13418 * src/state.c (state_compare, state_hash): Likewise.
13419 * src/state.h (struct state): Likewise.
13420 * src/tables.c (default_goto, goto_actions): Likewise.
13422 * src/gram.h (rule_number, rule): Use int, not short int.
13423 * src/output.c (prepare_rules): Likewise.
13424 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
13425 errs, reductions): Likewise.
13426 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
13428 * src/tables.c (vector_number, tally, action_number,
13429 ACTION_NUMBER_MINIMUM): Likewise.
13430 * src/output.c (muscle_insert_short_int_table): Remove.
13432 2004-12-17 Akim Demaille <akim@epita.fr>
13434 * data/lalr1.cc: Extensive Doxygenation.
13435 (error_): Rename as...
13436 (error): this, since it is visible to the user.
13438 (Parser::message): Now an automatic variable from...
13439 (Parser::yyreport_syntax_error_): here.
13440 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
13442 * tests/input.at: Escape $.
13444 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
13446 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
13447 Parenthesize rhs to avoid obscure problems with mistakes like
13448 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
13449 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13450 b4_rhs_location): Likewise.
13451 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13452 b4_rhs_location): Likewise.
13454 2004-12-16 Akim Demaille <akim@epita.fr>
13456 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
13457 yacc.c: be sure to stay within yycheck_.
13458 * tests/actions.at: Re-enable C++ tests.
13460 2004-12-16 Akim Demaille <akim@epita.fr>
13462 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
13465 2004-12-16 Akim Demaille <akim@epita.fr>
13467 Use #define to handle the %name-prefix.
13469 * data/glr.c, data/yacc.c: Comment changes.
13470 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
13471 so that one can refer to yylex in the parser file, and have it
13472 renamed, as is the case with other skeletons.
13474 2004-12-16 Akim Demaille <akim@epita.fr>
13476 Move lalr1.cc internals into yy*.
13478 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
13479 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
13480 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
13481 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
13482 (empty_, final_, terror_, errcode_, ntokens_)
13483 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
13484 (looka_, ilooka_, error_range_, nerrs_):
13486 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
13487 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
13488 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
13489 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
13490 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
13491 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
13492 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
13493 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
13496 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
13498 Fix some problems reported by twlevo at xs4all.
13499 * src/symtab.c (symbol_new): Report an error if the input grammar
13500 contains too many symbols. This is better than calling abort() later.
13501 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
13502 (struct node, struct graph):
13503 Rename member expand to stretch. All uses changed.
13504 (struct graph): Remove member layoutalgorithm. All uses removed.
13505 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
13506 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
13508 (N_STRETCH): Rename from N_EXPAND. All uses changed.
13510 2004-12-15 Akim Demaille <akim@epita.fr>
13512 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
13513 Add more Doxygen comments.
13514 (symprint_, stack_print_, reduce_print_, destruct_, pop)
13515 (report_syntax_error_, translate_): Rename as...
13516 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
13517 (yypop_, yyreport_syntax_error_, yytranslate_): this.
13519 2004-12-15 Akim Demaille <akim@epita.fr>
13521 * data/lalr1.cc (lex_): Rename as...
13523 Move the trace here.
13524 Take the %name-prefix into account.
13525 Reported by Alexandre Duret-Lutz.
13527 2004-12-15 Akim Demaille <akim@epita.fr>
13529 Simplify the C++ parser constructor.
13531 * data/lalr1.cc (debug_): Rename as...
13532 (yydebug_): so that the parser's internals are always in the yy*
13535 (b4_parse_param_decl): Remove the leading comma as it is now only
13536 called as unique argument list.
13537 (Parser::Parser): Remove the constructor accepting a location and
13538 an initial debugging level.
13539 Remove from the other ctor the argument for the debugging level.
13540 (debug_level_type, debug_level, set_debug_level): New.
13542 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
13545 2004-12-15 Akim Demaille <akim@epita.fr>
13547 Remove b4_root related material: failure experiment
13548 (which goal was to allow to derive from a class).
13550 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
13551 definitions and uses.
13553 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
13555 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
13556 not 2, since it's not portable to subtract 1 from the start of an
13557 array. The new item 0 is never set or used. All uses changed.
13559 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
13560 the default definition of YYLLOC_DEFAULT. Problem reported
13561 by Frank Heckenbach.
13563 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
13565 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
13566 the normal case and one for the error case. Just use the
13567 first one uniformly. Problem reported by Frank Heckenbach.
13568 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
13569 use exactly the same macro in both places.
13570 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
13571 so that the normal-case YYRHSLOC works for the error case too.
13573 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
13574 (YYLLOC_DEFAULT): Use the same macro as glr.c.
13575 * doc/bison.texinfo (Location Default Action): Don't claim that
13576 we have an array of locations. Use the same macro for both glr
13577 and lalr parsers. Mention YYRHSLOC. Mention what happens when
13580 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13582 * HACKING: Update email addresses to send announcements to.
13584 * configure.ac (AC_INIT): Bump version to 1.875f.
13586 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13588 * NEWS: Version 1.875e.
13589 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
13591 * src/scan-skel.l: Include "complain.h", for "fatal".
13593 * src/relation.h (relation_print, relation_digraph):
13594 Relation sizes are of type relation_node, not size_t (this is
13595 merely a doc fix, since the two types are equivalent).
13596 (relation_transpose): Relation sizes are of type relation_node,
13598 * src/relation.c: Likewise.
13599 (top, infinity): Now of type relation_node, not int.
13600 (traverse, relation_transpose): Use relation_node, not int.
13602 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
13603 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
13604 (yyparse): Remove unused local introduced in 2004-10-25 patch.
13606 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
13607 specifying whether the test should be skipped. Use it tp
13608 specify that the [%defines %skeleton "lalr1.cc"] tests currently
13609 fail on some hosts, and should be skipped.
13611 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
13613 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
13614 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
13615 unless otherwise specified below.
13617 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
13618 to allocate kernel_base, kernel_items, kernel_size, since
13619 they needn't be initialized to 0.
13620 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
13621 * src/closure.c (new_closure): Likewise, for itemset.
13622 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
13623 * src/lalr.c (set_goto_map): Likewise, for temp_map.
13624 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
13625 (build_relations): Likewise for edge, states1, includes.
13626 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
13627 * src/reader.c (packgram): Likewise, for ritem, rules.
13628 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
13629 * src/relation.c (relation_digraph): Likewise for VERTICES.
13630 (relation_transpose): Likewise for new_R, end_R.
13631 * src/symtab.c (symbols_token_translations_init): Likewise for
13632 token_translations.
13633 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
13634 (token_actions): Likewise for yydefact, actrow, conflrow,
13636 (save_column): Likewise for froms[symno], tos[symno].
13637 (goto_actions): Likewise for state_count.
13638 (pack_table): Likewise for base, pos, check.
13639 (tables_generate): Likewise for width.
13641 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
13642 for initial core. Just have a separate core, so we needn't worry
13643 about whether kernel_size and kernel_base are initialized.
13645 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
13646 kernel_size, kernel_items): Remove unnecessary initialization.
13647 * src/conflicts.c (conflicts): Likewise.
13648 * src/derives.c (derives): Likewise.
13649 * src/muscle_tablc (muscle_insert): Likewise.
13650 * src/relation.c (relation_digraph): Likewise.
13651 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
13652 conflrow, conflict_table, conflict_list, table, check):
13655 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
13656 This is because all callers pass unsigned int.
13657 * src/closure.h (new_closure): Likewise.
13659 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
13660 (build_relations): Initialize includes[i] in all cases.
13661 * src/reader.c (packgram): Always initialize rules[ruleno].prec
13662 and rules[ruleno].precsym. Initialize members in order.
13663 * src/relation.c (relation_transpose): Always initialize new_R[i]
13665 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
13667 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
13668 conflict_list[0] was always 0, but now it isn't initialized.
13670 * src/table.c (table_grow): When conflict_table grew, the grown
13671 area wasn't cleared. Fix this.
13673 * lib/.cvsignore: Add strdup.c, strdup.h.
13674 * m4/.cvsignore: Add strdup.m4.
13676 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
13678 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
13679 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
13680 GOTO_NUMBER_MAXIMUM, since we occasionally compute
13681 ngotos + 1 without checking for overflow.
13682 (build_relations): Use END_NODE, not -1, to denote end of edges.
13683 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
13684 build_relations): Use goto_number, not int, for goto numbers.
13685 * src/tables.c (save_column, default_goto): Likewise.
13687 2004-11-23 Akim Demaille <akim@epita.fr>
13689 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
13690 of #defining from yystype.
13691 Don't typedef yystype, C++ does not need it.
13692 This lets it possible to forward declare it as union.
13694 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
13696 * bootstrap (gnulib_modules): Add extensions.
13697 Problem reported by Jim Meyering.
13699 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
13701 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
13702 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
13703 src/system.h, src/tables.c: XFREE -> free, to accommodate
13704 recent change to gnulib xalloc.h.
13705 Problem reported by Jim Meyering.
13707 2004-11-17 Akim Demaille <akim@epita.fr>
13709 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
13711 2004-11-17 Akim Demaille <akim@epita.fr>,
13712 Alexandre Duret-Lutz <adl@gnu.org>
13714 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
13716 (YYCDEBUG): Adjust.
13717 Use it instead of cdebug_.
13718 (Parser::debug_stream, Parser::set_debug_stream): New.
13719 (Parser::symprint_): Define cdebug_ for temporary backward
13721 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
13724 2004-11-17 Akim Demaille <akim@epita.fr>
13726 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
13727 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
13728 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
13729 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13731 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
13733 * data/glr.c (yyloc_default): Remove; not used.
13734 Problem reported by Frank Heckenbach.
13736 2004-10-25 Akim Demaille <akim@epita.fr>
13738 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
13739 Introduce another definition to address simple location arrays.
13740 (yyGLRStack): New member: yyerror_range.
13741 (yyrecoverSyntaxError, yyparse): Update it.
13742 (yyrecoverSyntaxError): Use it when shifting the error token to
13743 have an accurate range, equivalent to the one computed by both
13744 yacc.c and lalr1.cc.
13745 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
13746 that column numbers start at column 0, as per GNU Coding
13747 Standards, the others tests, and the doc.
13748 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
13749 Adjust to the above change (first column is 0).
13750 And adjust the location of the "<error>", now covering the whole
13753 2004-10-22 Akim Demaille <akim@epita.fr>
13754 and Paul Eggert <eggert@cs.ucla.edu>
13756 Remove some arbitrary limits on goto numbers and relations.
13757 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
13758 initial values, since they're never used.
13759 (set_goto_map): ngotos is now unsigned, so test for overflow
13760 by seeing whether it wraps around to zero.
13761 * src/lalr.h (goto_number): Now size_t, not short int.
13762 (GOTO_NUMBER_MAXIMUM): Remove.
13763 * src/relation.c (relation_print, traverse, relation_transpose):
13764 Check for END_NODE rather than looking at sign.
13765 * src/relation.h (END_NODE): New macro.
13766 (relation_node): Now size_t, not short int.
13768 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
13770 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
13771 keyword, not an identifier. Problem reported by Baron Schwartz in
13772 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
13774 2004-10-11 Akim Demaille <akim@epita.fr>
13776 * src/symtab.c (symbol_check_alias_consistency): Also check
13777 type names, destructors, and printers.
13778 Reported by Alexandre Duret-Lutz.
13779 Recode the handling of associativity and precedence in terms
13780 of symbol_precedence_set.
13781 Accept no redeclaration at all, not even equal to the previous
13783 (redeclaration): New.
13784 Use it to factor redeclaration complaints.
13785 (symbol_make_alias): Don't set the type of the alias, let
13786 symbol_check_alias_consistency do it as for other features.
13787 * src/symtab.h (symbol): Add new member prec_location, and
13789 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
13790 * tests/input.at (Incompatible Aliases): New.
13792 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
13794 .cvsignore fixes to accommodate gnulib changes,
13795 and the practice of naming build directories "_build".
13796 * .cvsignore: Add "_*". Sort.
13797 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
13798 * m4/.cvsignore: Add "*_gl.m4".
13800 2004-10-06 Akim Demaille <akim@epita.fr>
13802 * src/parse-gram.y (add_param): Fix the truncation of trailing
13805 2004-10-05 Akim Demaille <akim@epita.fr>
13807 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
13808 whether the reducion was empty or not. This leaves room to
13809 improve the use of YYLLOC_DEFAULT in such a case.
13810 lalr1.cc is still experimental, so changing this is acceptable.
13811 And finally, there are probably not many users who changed the
13812 handling of locations in GLR, so changing is admissible too.
13814 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
13815 empty reduction, set @$ to an empty location ending the previously
13817 Adjust uses to make sure the code is triggered on empty
13819 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
13820 expected output: empty reductions have empty locations.
13822 2004-09-29 Akim Demaille <akim@epita.fr>
13824 * data/lalr1.cc: Move towards a more standard C++ coding style
13825 for templates: Class < T > -> Class<T>.
13827 2004-09-29 Akim Demaille <akim@epita.fr>
13829 * data/lalr1.cc: Reinstall the former ctor, for sake of
13830 compatibility, but warn it will be removed.
13831 Move towards a more standard C++ coding style (i.e., type *var ->
13834 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
13836 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
13837 since it's less likely to work if NULs are involved in the future.
13839 2004-09-27 Akim Demaille <akim@epita.fr>
13841 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
13843 2004-09-27 Akim Demaille <akim@epita.fr>
13845 * data/lalr1.cc (b4_parse_param_decl_1): New.
13846 (b4_parse_param_decl): Use it to have different names between attribute
13847 and argument names.
13848 (b4_cc_constructor_call): Likewise.
13850 2004-09-24 Akim Demaille <akim@epita.fr>
13852 * src/parse-gram.y (add_param): Strip the leading and trailing
13853 blanks from a formal argument declaration.
13854 (YY_LOCATION_PRINT): New.
13856 2004-09-24 Akim Demaille <akim@epita.fr>
13858 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
13859 after the location.
13861 2004-09-24 Akim Demaille <akim@epita.fr>
13863 * doc/bison.texinfo (Table of Symbols): Sort.
13865 2004-09-21 Akim Demaille <akim@epita.fr>
13867 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
13868 the useless parentheses.
13869 Suggested by Paul Eggert.
13871 2004-09-20 Akim Demaille <akim@epita.fr>
13873 Let the initial-action act on the look-ahead, and use it for the
13874 "initial push" (corresponding to an hypothetical beginning-of-file).
13875 And let lalr1.cc honor %initial-action.
13877 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
13879 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
13880 (Parser::Parser): Remove the ctor that used to initialize it.
13881 (Parser::parse): Like in the other skeletons, issue the "starting
13882 parse" message before any action.
13883 Honor %initial-action.
13884 Initialize the stacks with the lookahead.
13885 * data/yacc.c: Let $$ and @$ in %initial-action designate the
13887 Push them in the stacks.
13888 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
13890 2004-09-20 Akim Demaille <akim@epita.fr>
13892 * doc/bison.texinfo (Initial Action Decl): New.
13894 2004-09-20 Akim Demaille <akim@epita.fr>
13896 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
13897 clearer criterion to define it.
13898 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
13899 When reducing on an empty RHS, use the latest stacked location as
13901 yylloc is not always available.
13902 * data/glr.c: Likewise.
13903 Also, honor initial-actions.
13905 2004-09-20 Akim Demaille <akim@epita.fr>
13907 * data/yacc.c (YY_LOCATION_PRINT): New.
13908 Define when we know YYLTYPE's structure, i.e., when the default
13909 YYLLOC_DEFAULT is used.
13910 * data/c.m4 (b4_yysymprint_generate): Use it.
13911 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
13912 value of the result.
13913 (error_start_): Replace with...
13914 (error_range_): this location array.
13915 This allows to replace code relying on the implementation of
13916 locations by portable code.
13917 * data/yacc.c (yylerrsp): Replace with...
13918 (yyerror_range): this.
13919 Every time a token is popped, update yyerror_range[0], to have an
13920 accurate location for the error token.
13921 * data/glr.c (YY_LOCATION_PRINT): New.
13922 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
13923 deference a pointer.
13924 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
13925 report the location in %printers.
13927 * src/scan-skel.l: Instead of abort, report error messages to ease
13928 understanding skeleton scanning failures.
13930 2004-09-16 Akim Demaille <akim@epita.fr>
13932 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
13933 (iterator, const_iterator): these, to be more in the C++ spirit.
13934 Also, return reverse iterators so that when displaying the stack
13935 we display its bottom first.
13936 (Parser::stack_print_, Parser::reduce_print_): Match the messages
13938 We should probably use vector here though.
13940 2004-09-16 Akim Demaille <akim@epita.fr>
13942 Have more complete shift traces.
13944 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
13945 to report Shifts instead of ad hoc YYDPRINTF invocations,
13946 including for the error token.
13947 * data/lalr1.cc (symprint_): Output the location.
13948 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
13949 output the location within the %printer.
13950 Activate GLR tests, at least to make sure they compile properly.
13951 They still don't pass though.
13952 * tests/calc.at: Adjust expect verbose output, since now "Entering
13953 state..." is on a different line than the "Shifting" message.
13955 2004-09-08 Akim Demaille <akim@epita.fr>
13957 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
13958 Bison directive from the Bison file to the invocation of this
13959 macro, so that these directives are passed to
13960 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
13961 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
13962 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
13963 the extra Bison directives instead of the whole series.
13964 Change the grammar so that there are recoverable errors, and
13965 unrecoverable errors. Now we can have the parser give up before
13966 consuming the whole input. As a result we now can observe that
13967 the lookahead is freed when needed.
13968 Change the parser source to parse argv[1] instead of a hard coded
13970 Simplify yylex, and give a value and location to EOF.
13971 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
13972 passed directives already coded in the file.
13973 Add some tests to check the location of "error".
13974 For some tests, the C++ parser is correct, and not yacc.c.
13975 For other tests, they provide different, but unsatisfying, values,
13976 so keep the C++ value so that at least one parser is "correct"
13977 according to the test suite.
13978 (Actions after errors): Remove, this is subsumed by the
13979 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
13981 2004-09-06 Akim Demaille <akim@epita.fr>
13983 * data/lalr1.cc: Adjust the indentation of the labels.
13984 (Parser::pop): New.
13987 2004-09-06 Akim Demaille <akim@epita.fr>
13989 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
13990 argument, an informative message.
13991 Call YY_SYMBOL_PRINT.
13992 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
13993 * data/lalr1.cc (destruct_): Likewise.
13994 In addition, no longer depend on b4_yysymprint_generate and
13995 b4_yydestruct_generate to generate these functions, do it "by
13998 2004-09-03 Akim Demaille <akim@epita.fr>
14000 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
14001 invoked, yydestruct the lookahead.
14002 * tests/calc.at (Calculator $1): Update the expected lengths of
14003 traces: there is an added line for the discarded lookahead.
14004 * doc/bison.texinfo (Destructor Decl): Some rewording.
14005 Define "discarded" symbols.
14007 2004-09-02 Akim Demaille <akim@epita.fr>
14009 * data/lalr1.cc (translate_, destruct_): No reason to be static.
14011 2004-09-02 Akim Demaille <akim@epita.fr>
14013 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
14014 (YYDSYMPRINTF): Rename as...
14015 (YY_SYMBOL_PRINT): this.
14016 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
14018 Use it instead of direct symprint_ calls.
14019 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
14022 2004-09-02 Akim Demaille <akim@epita.fr>
14024 * data/lalr1.cc (b4_yysymprint_generate): New.
14025 (symprint_): New member function, defined when YYDEBUG.
14026 Use it consistently instead of token/nterm debugging output by
14028 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
14029 %printer calls to use cdebug_ when using lalr1.cc.
14031 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
14033 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
14034 with #ifdef YYDEBUG.
14036 2004-08-26 Akim Demaille <akim@epita.fr>
14038 * doc/bison.texinfo (Implementing Loops): Rename as...
14039 (Implementing Gotos/Loops): this.
14041 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
14043 Adjust to latest gnulib.
14044 * bootstrap (gnulib_modules): Add xalloc-die.
14045 Set LC_ALL=C so that file names sort consistently.
14046 Prefer the gnulib copies of gettext.m4, glibc21.m4,
14047 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
14048 uintmax_t.m4, ulonglong.m4.
14049 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
14050 po.m4 since we are now using _gl.m4 instead.
14052 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
14054 * src/scan-action.l: Remove. Scanning of semantic actions is
14055 handled in scan-gram.l.
14057 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
14059 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
14061 * src/location.h (struct): The file member is a uniqstr.
14062 (equal_boundaries): Use UNIQSTR_EQ for comparison.
14064 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
14066 Fix bug with non-%union parsers that have printers or destructors,
14067 which led to a Bison core dump. Reported by Peter Fales in
14068 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
14070 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
14071 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
14072 not to our own type.
14073 * src/output.c (symbol_destructors_output, symbol_printers_output):
14074 Don't assume %union.
14075 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
14076 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
14077 UNION-FLAG. All callers changed.
14078 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
14079 Use type char, not unsigned int, when declaring an array of char;
14080 this lets us remove a cast.
14081 (Printers and Destructors): Add non-%union test cases.
14083 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
14085 * doc/bison.texinfo: Minor editorial changes, mostly to the new
14086 GLR writeups. E.g., avoid frenchspacing and the future tense,
14087 change "lookahead" to "look-ahead", and change "wrt" to "with
14090 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
14092 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
14093 New sections, split off from the GLR Parsers section. Put the new
14094 Simple GLR Parser near the start of the GLR section, for clarity.
14095 Rewrite connective text.
14097 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
14099 * doc/bison.texinfo (Simple GLR Parsers): New section.
14101 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
14103 * NEWS, TODO, doc/bison.texinfo:
14104 Use "look-ahead" instead of "lookahead", to be consistent.
14105 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
14106 while we're fixing "look-ahead".
14107 * src/conflicts.c (shift_set): Renamed from shiftset.
14108 (look_ahead_set): Renamed from lookaheadset.
14109 * src/print.c: Likewise.
14110 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
14111 name for "lookahead".
14112 (report_types, usage): Likewise.
14113 * src/getargs.h (report_look_ahead_tokens): Renamed from
14115 * src/lalr.c (compute_look_ahead_tokens): Renamed from
14116 compute_lookaheads.
14117 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
14118 (look_ahead_tokens_print): Renamed from lookaheads_print.
14119 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
14120 state_rule_lookaheads_print.
14121 * src/state.h: Likewise.
14122 (reductions.look_ahead_tokens): Renamed from lookaheads.
14123 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
14124 AT_DATA_LOOKAHEADS_GRAMMAR.
14126 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
14128 * README: Update location of patched M4 distribution.
14130 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
14132 Don't assume the C++ compiler takes the same arguments as the C compiler
14134 * configure.ac (O0CXXFLAGS): New var.
14135 * tests/atlocal.in (CXXFLAGS): Use it.
14137 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
14139 Fix some "make check" problems with C++ reported by
14140 Albert Chin-A-Young for Tru64 C++ in this thread:
14141 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
14143 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
14144 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
14145 Output to a .cc file for C++, not to a .c file.
14146 * tests/calc.at (AT_CHECK_CALC): Likewise.
14147 * tests/regression.at (AT_CHECK_DANCER): Likewise.
14148 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
14150 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
14152 * tests/calc.at, tests/actions.at: Workaround for SGI
14153 C++ compiler. (trivial change)
14155 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
14157 Spent a few hours checking out which prerequisite versions the
14158 current sources actually require. I went all the way back to
14159 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
14160 a seemingly endless set of combinations of versions more recent
14161 than that. The bottom line is that the current sources require
14162 fairly recent versions of the build tools, and it'll be some work
14164 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
14165 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
14166 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
14167 Add comments explaining why those particular versions are
14170 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
14171 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
14172 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
14174 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
14175 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
14177 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
14179 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
14180 0.11.5. Suggested by Bruno Haible.
14181 * bootstrap: Remove gettext version checking.
14183 * doc/bison.texinfo (Decl Summary): Also mention that %union
14184 can depend on prerequisite types. Problem reported by Tim
14187 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
14189 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
14190 * README-alpha: Don't tell people not to package this.
14192 * bootstrap: Don't assume $(...) works; use `...` instead.
14193 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
14196 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
14197 put into the -d output file, and mention what to do if YYSTYPE is
14198 defined as a macro.
14200 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
14202 Undo change made earlier today: it caused autopoint to not bring
14203 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
14206 * bootstrap: Check that gettext version matches what's in
14207 configure.ac. Warn users to ignore robots.txt ERROR 404.
14208 * bootstrap: Undo today's earlier change (logged below).
14209 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
14211 The gettext version checking is causing more trouble than it's
14212 curing; remove it. Problem reported by Paul Hilfinger.
14214 * bootstrap: Issue a warning that one can expect a message
14215 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
14216 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
14218 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
14220 Ensure that the C++ compiler used for testing actually works on a
14221 simple test program; if not, skip the C++-related tests. Problem
14222 reported by Vin Shelton in:
14223 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
14225 * m4/cxx.m4: New file.
14226 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
14227 * tests/atlocal.in (BISON_CXX_WORKS): Add.
14228 * tests/local.at (AT_COMPILE_CXX): Use it.
14230 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
14232 * data/glr.c (yylloc): Output this macro even if locations are not
14233 being generated, as the GLR parser needs it even in that case.
14234 Problem reported by Troy A. Johnson
14235 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
14237 * configure.ac (AC_INIT): Update to 1.875e.
14239 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
14241 * NEWS: Version 1.875d.
14242 * configure.ac (AC_INIT): Likewise.
14243 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
14245 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
14246 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
14247 lalr1.cc runs afoul of the first, and the last two are no longer
14248 supported by GCC 3.4.0.
14249 * README: Mention GNU m4 1.4 or later; mention m4 patches.
14250 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
14252 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
14254 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
14255 unsigned int, for compatibility with latest gnulib hash module.
14256 * src/state.c (state_hash, state_hasher): Likewise.
14257 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
14258 * src/uniqstr.c (hash_uniqstr): Likewise.
14260 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
14262 * NEWS: Unescaped newlines are no longer allowed in char & strings.
14264 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
14265 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
14266 character and string literals.
14267 (unexpected_end): New function.
14268 (unexpected_eof): Use it.
14269 (unexpected_newline): New function.
14270 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
14273 * NEWS: Document %expect-rr.
14275 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
14276 Fix typo by replacing $1 with $option.
14277 Remove more 'intl'-related files.
14278 Don't DEFUN AM_INTL_SUBDIR twice.
14280 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
14281 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
14283 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
14284 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
14285 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
14286 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
14287 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
14288 * src/.cvsignore: Add *.output.
14290 * src/parse-gram.y: Put copyright notice inside %{ %} so it
14291 gets copied to the output file.
14293 2004-04-28 Paul Eggert <eggert@twinsun.com>
14295 Get files from the gnulib and po repositories, instead of relying
14296 on them being in our CVS. Upgrade to latest versions of gnulib
14299 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
14300 * bootstrap: Bootstrap from gnulib and po repositories.
14301 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
14302 * README-cvs: Document these changes. Remove version numbers from
14303 mentions of build tools, since they change so often. Mention Flex.
14305 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
14306 (gl_USE_SYSTEM_EXTENSIONS): Add.
14307 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
14308 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
14310 (AC_ISC_POSIX): Remove; we no longer support this
14311 ancient OS, as it gets in the way of latest Autoconf & gnulib.
14312 (AC_HEADER_STDC): Remove: we now assume C89 or better.
14313 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
14314 Do not check for C89 headers, except for locale.h which is used
14315 by the Yacc library and must port to K&R hosts.
14316 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
14317 Do not check for C89 functions, except for setlocale which is
14318 used by the Yacc library.
14319 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
14320 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
14321 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
14322 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
14323 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
14324 AM_GNU_GETTEXT): Remove; now done by:
14325 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
14326 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
14329 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
14330 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
14331 Define to empty, as gnulib.mk will do the rest for us.
14332 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
14334 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
14335 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
14337 * src/files.c: Include gnulib's xstrndup.h.
14339 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
14340 (REALLOC): Use xnrealloc, for likewise.
14341 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
14342 (strnlen, memrchr): Remove decls; functions no longer used.
14343 Include <stpcpy.h>.
14345 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
14346 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14347 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
14348 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
14349 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
14350 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
14351 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
14352 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
14353 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
14354 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
14355 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
14356 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14357 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
14358 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
14359 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
14360 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
14361 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
14362 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
14363 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
14364 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
14365 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
14366 Remove, as these files are now generated automatically
14367 by bootstrap or automake.
14369 * po/ChangeLog: Remove: all but one entry was a duplicate
14370 of this file, and I moved that 2000-11-02 entry here.
14372 * config/.cvsignore: Add Makefile, depcomp, install-sh.
14373 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
14374 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
14375 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
14376 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
14377 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
14378 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
14379 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
14380 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
14381 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
14382 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
14384 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
14385 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
14386 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
14387 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
14388 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
14389 * src/.cvsignore: Remove *_.c.
14392 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
14393 support it. (The latest stable gzip doesn't.)
14395 2004-04-27 Paul Eggert <eggert@twinsun.com>
14397 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
14398 case, as stos_ is now used by destructors due to the 2004-02-09
14401 Remove more K&R C support.
14402 * lib/libiberty.y (PARAMS): Remove. All uses removed.
14403 * lib/subpipe.c (errno): Remove decl.
14404 Include <stdlib.h> unconditionally.
14405 (EXIT_FAILURE): Remove macro.
14406 * src/complain.c (vfprintf, strerror): Remove.
14407 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
14409 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
14410 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
14411 (strchr, strspn, memchr): Remove decls.
14412 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
14413 unconditionally. Do not declare perror.
14414 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
14417 * src/complain.c (_): Remove useless defn, as system.h defines this.
14419 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
14420 with latest obstack.h.
14421 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
14422 to procedure types, as obstack.h now does that for us.
14423 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
14425 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
14426 so that this include file can stand alone.
14427 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
14428 does this now. Include subpipe.h first after config.h, to
14429 test whether it can stand alone.
14431 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
14432 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
14433 unused declaration.
14435 * tests/synclines.at (%union synch line): Put a dummy member in
14436 the union, because empty unions aren't allowed in C. Caught
14439 2004-04-13 Jim Meyering <jim@meyering.net>
14441 * src/conflicts.c (conflicts_print): Correct format string typo:
14442 use `%%' to produce literal `%'. (trivial change)
14444 2004-03-30 Paul Eggert <eggert@twinsun.com>
14446 * src/getargs.c (version): Update copyright year to 2004.
14448 * data/c.m4 (b4_int_type): Use 'short int' rather than
14449 'short', and similarly for 'long', 'unsigned', etc.
14450 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
14451 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
14452 yy_yypstack, yydumpstack): Likewise.
14453 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
14454 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
14456 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
14457 yy_stack_print, yyparse): Likewise.
14458 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
14459 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
14460 * lib/bitset.c (bitset_print): Likewise.
14461 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
14462 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14463 * lib/bitsetv.c (bitsetv_dump): Likewise.
14464 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
14465 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
14467 * src/LR0.c (allocate_itemsets): Likewise.
14468 * src/gram.h (rule_number, rule): Likewise.
14469 * src/lalr.h (goto_number): Likewise.
14470 * src/nullable.c (nullable_compute): Likewise.
14471 * src/output.c (prepare_rules): Likewise.
14472 * src/relation.c (relation_print, relation_digraph): Likewise.
14473 * src/relation.h (relation_node): Likewise.
14474 * src/state.h (state_number, transitions, errs, reductions,
14475 struct state): Likewise.
14476 * src/symtab.h (symbol_number, struct symbol): Likewise.
14477 * src/tables.c (vector_number, tally, action_number,
14478 default_goto, goto_actions): Likewise.
14479 * tests/existing.at (GNU Cim Grammar): Likewise.
14480 * tests/regression.at (Web2c Actions): Likewise.
14482 * src/output.c (muscle_insert_short_int_table): Renamed from
14483 muscle_insert_short_table. All uses changed.
14485 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
14487 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
14488 (declaration): Replace expected_conflicts with expected_sr_conflicts.
14489 Add %expect-rr rule.
14491 * src/scan-gram.l: Recognize %expect-rr.
14493 * src/conflicts.h (expected_sr_conflicts): Rename from
14494 expected_conflicts.
14495 (expected_rr_conflicts): Declare.
14497 * src/conflicts.c (expected_sr_conflicts): Rename from
14498 expected_conflicts.
14499 (expected_rr_conflicts): Define.
14500 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
14502 Use expected_sr_conflicts in place of expected_conflicts.
14503 Warn if expected_rr_conflicts used in non-GLR parser.
14505 * doc/bison.texinfo: Add documentation for %expect-rr.
14507 2004-03-08 Paul Eggert <eggert@gnu.org>
14509 Add support for hex token numbers. Suggested by Odd Arild Olsen in
14510 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
14512 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
14514 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
14515 * src/scan-gram.l (scan_integer): New function.
14517 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
14518 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
14519 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
14520 Say "long int", not "long", for uniformity with GNU style.
14522 2004-02-25 Paul Eggert <eggert@twinsun.com>
14524 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
14525 compilers. This fixes a problem with Intel's C++ compiler being
14526 chatty, reported by Guido Trentalancia in
14527 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
14529 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
14531 Support %destructor and merge error locations in lalr1.cc.
14533 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
14534 (Parser::stos_): Define unconditionally.
14535 (Parser::destruct_): New method. Generate its body with
14536 b4_yydestruct_generate.
14537 (Parser::error_start_): New attribute.
14538 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
14539 token which are discarded.
14540 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
14541 error_start_ when erroneous token are discarded.
14542 (Parser::parse) <yyerrlab1>: Compute the location of the error
14543 token so that it covers all the discarded tokens.
14544 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
14545 it can be called with `%skeleton "lalr1.cc"', and do that.
14547 2004-02-02 Paul Eggert <eggert@twinsun.com>
14549 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
14550 $(top_srcdir)/lib and ../lib. This fixes a bug reported
14551 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
14552 There's no need to mention top_builddir since Automake does that
14554 (INCLUDES): Remove, as Automake says it's obsolescent.
14555 Contents migrated into AM_CPPFLAGS as described above.
14556 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
14558 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
14560 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
14561 (yyreportSyntaxError): Handle case where lookahead token is
14564 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14566 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
14567 resulting parsers are compilable with C++.
14569 2003-12-23 Paul Eggert <eggert@twinsun.com>
14571 * config/depcomp, config/install-sh: Sync with Automake 1.8.
14572 * src/output.c (output_skeleton): Rename local var.
14573 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
14574 Bison tokens, as this runs afoul of the 2003-10-07 change that
14575 disallowed NUL bytes in character constants or string literals.
14577 * tests/local.at: Require Autoconf 2.59's Autotest.
14578 * tests/testsuite.at: Don't include local.at, since we now assume
14579 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
14581 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
14582 multiple inclusion warnings.
14584 2003-12-02 Akim Demaille <akim@epita.fr>
14586 * doc/bison.texinfo (How Can I Reset the Parser): More about start
14590 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
14592 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
14594 2003-10-07 Paul Eggert <eggert@twinsun.com>
14596 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
14597 if testsuite doesn't exist.
14599 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
14600 literals, unfortunately.
14601 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
14602 Complain about NUL bytes in character constants or string literals.
14604 2003-10-05 Paul Eggert <eggert@twinsun.com>
14606 * NEWS: Don't document %no-default-prec, as it's still
14608 * doc/bison.texinfo: Document %no-default-prec only if
14609 the defaultprec flag is set. Normally it's not.
14611 2003-10-04 Paul Eggert <eggert@twinsun.com>
14613 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
14614 non-modifiable lvalue, instead of a modifiable one.
14615 * doc/bison.texinfo (Actions): Document that $$ can
14616 be assigned to. Do not claim that $$ and $N are
14617 array element references: user code should not rely on this.
14619 2003-10-01 Paul Eggert <eggert@twinsun.com>
14621 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
14622 (grammar_declaration): Use it.
14623 * src/scan-gram.l: New token %no-default-prec.
14624 * tests/conflicts.at: Revamp tests to use %no-default-prec.
14625 * NEWS, doc/bison.texinfo: Document the above.
14627 2003-10-01 Akim Demaille <akim@epita.fr>
14629 VCG no longer supports long_straight_phase.
14631 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
14632 * src/print_graph.c (print_graph): Adjust.
14634 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
14635 and Paul Eggert <eggert@twinsun.com>
14637 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
14638 Table of Symbols): Document %default-prec.
14639 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
14640 (grammar_declaration): Set default_prec on %default-prec.
14641 * src/scan-gram.l (%default-prec): New token.
14642 * src/reader.h (default_prec): New flag.
14643 * src/reader.c: Likewise.
14644 (packgram): Handle it.
14645 * tests/conflicts.at (%default-prec without %prec,
14646 %default-prec with %prec, %default-prec 1): New tests.
14648 2003-09-30 Paul Eggert <eggert@twinsun.com>
14650 * tests/testsuite.at: Include local.at, not input.at, fixing
14651 a typo in the 2003-08-25 patch.
14653 2003-08-27 Akim Demaille <akim@epita.fr>
14655 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
14658 2003-08-26 Akim Demaille <akim@epita.fr>
14660 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
14661 "<\#" to avoid magic from Gnus when posting parts of this script.
14663 2003-08-26 Akim Demaille <akim@epita.fr>
14665 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
14666 (Parser::parse): here.
14667 Adjust: nerrs and errstatus is now replaced by...
14668 (Parser::nerrs_, Parser::errstatus_): New.
14670 2003-08-25 Akim Demaille <akim@epita.fr>
14672 * config/announce-gen, Makefile.cfg: New.
14673 * Makefile.am: Adjust.
14674 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
14675 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
14677 2003-08-25 Akim Demaille <akim@epita.fr>
14679 When reducing initial empty rules, Bison parser read an initial
14680 location that is not defined. This results in garbage, and that
14681 affects Bison's own parser. Therefore we need (i) to extend Bison
14682 to support a means to initialize this location, and (ii) to use
14683 this CVS Bison to fix CVS Bison's parser.
14685 * src/reader.h, reader.c (epilogue_augment): Remove, replace
14687 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
14688 * src/parse-gram.y: Adjust.
14689 (%initial-action): New.
14690 (%error-verbose): Since we require CVS Bison, there is no reason
14692 * src/scan-gram.l: Adjust.
14693 * src/Makefile.am (YACC): New, to make sure we use our own parser.
14694 * data/yacc.c (yyparse): Use b4_initial_action.
14696 2003-08-25 Akim Demaille <akim@epita.fr>
14698 * doc/bison.texinfo: Don't promote stdout for error messages.
14700 2003-08-25 Akim Demaille <akim@epita.fr>
14702 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
14703 From Alexandre Duret-Lutz.
14705 2003-08-25 Akim Demaille <akim@epita.fr>
14709 2003-08-25 Akim Demaille <akim@epita.fr>
14711 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
14714 2003-08-25 Akim Demaille <akim@epita.fr>
14716 * data/lalr1.cc (Parser::reduce_print_): New.
14719 2003-08-25 Akim Demaille <akim@epita.fr>
14721 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
14722 error recovery loops. This patch is based on
14723 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
14724 Also, augment the similarity between lalr1.cc and yacc.c.
14725 Note: the locations of error recovery rules are not correct yet.
14727 * data/lalr1.cc: Comment changes to augment the similarity between
14728 lalr1.cc and yacc.c.
14729 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
14730 (yyerrlab1): Remove, but where it used to be (now the bottom part of
14731 yyerrlab), when hitting EOF, pop the whole stack here instead of
14732 merely falling thru the default error handling mechanism.
14733 (yyerrorlab): New label, with the old contents of YYERROR,
14734 plus the following change: pop the stack of rhs corresponding
14735 to the production that invoked YYERROR. That is how Yacc
14736 behaves (required by POSIX).
14737 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
14740 2003-08-25 Akim Demaille <akim@epita.fr>
14742 Tune local.at so that people can "autom4te -l autotest calc.at -o
14743 calc" for instance, to extract a sub test suite.
14745 * tests/testsuite.at: Move the initialization, Autotest version
14746 requirement, and AT_TESTED invocation into...
14747 * tests/local.at: here.
14748 * tests/testsuite.at: Include it for compatibility with Autoconf
14750 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
14753 2003-08-04 Paul Eggert <eggert@twinsun.com>
14755 Rework code slightly to avoid gcc -Wtraditional warnings.
14756 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
14757 The returned value is now stored in *YY0. All callers changed.
14758 * src/output.c (merge_output): Adjust to the above change.
14760 2003-07-26 Paul Eggert <eggert@twinsun.com>
14762 * data/glr.c (YYASSERT): New macro.
14763 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
14764 yyresolveStates, yyprocessOneStack):
14765 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
14766 Derived from a suggestion by Frank Heckenbach.
14768 2003-07-25 Paul Eggert <eggert@twinsun.com>
14770 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
14771 for portability to K&R C (after ansi2knr, presumably). See
14772 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
14773 by Frank Heckenbach, though I have omitted the structure-initialization
14774 part of his glr-knr.diff patch since I recall that the Portable
14775 C Compiler didn't require that change.
14777 Let the user specify how to allocate and free memory.
14778 Derived from a suggestion by Frank Heckenbach in
14779 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
14780 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
14781 All uses of free, malloc, realloc changed to use these macros,
14782 and unnecessary casts removed.
14783 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
14785 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
14787 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
14788 use s.empty() rather than s == "" to test for empty string; see
14789 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
14792 2003-06-25 Akim Demaille <akim@epita.fr>
14794 * config/depcomp, config/install-sh: Update from masters.
14796 2003-06-20 Paul Eggert <eggert@twinsun.com>
14798 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
14799 and return properly parenthesized result.
14800 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
14801 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
14802 Remove unnecessary parentheses from uses.
14803 * doc/bison.texinfo (Location Default Action): Describe the
14804 conventions for parentheses.
14806 2003-06-19 Paul Eggert <eggert@twinsun.com>
14808 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
14809 yyreportTree): Do not assume that size_t is the same width as int,
14810 when printing sizes. Print sizes using an unsigned format.
14811 Problem reported by Frank Heckenbach in
14812 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
14814 Port to Forte Developer 7 C compiler.
14815 * data/glr.c (struct YYLTYPE): If locations are not being used,
14816 declare a single dummy member, as empty structs do not conform
14818 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
14819 the Forte Developer 7 C compiler complains that end-of-loop
14820 code is not reached.
14822 2003-06-17 Paul Eggert <eggert@twinsun.com>
14824 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
14825 avoid warnings from picky compilers about redefinition of PARAMS.
14827 2003-06-17 Paul Eggert <eggert@twinsun.com>
14831 * NEWS: Document 1.875b.
14833 * lib/bbitset.h: Do not include config.h; that's the includer's job.
14834 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
14835 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
14836 Don't use 'index' in comments, as it's a builtin fn on some hosts.
14837 * lib/bitset_stats.c: Include gettext.h unconditionally, as
14838 per recent gettext manual's suggestion.
14839 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
14840 Use prototypes, not old-style definitions.
14841 * lib/lbitset.c (lbitset_unused_clear): Likewise.
14842 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
14843 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
14844 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
14845 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
14846 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
14847 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
14848 vbitset_or_and_cmp, vbitset_copy): Likewise.
14850 * lib/libiberty.h: Do not include config.h; that's the includer's job.
14851 Do not include <stdlib.h>.
14852 (PARAMS): Define unconditionally for C89.
14853 (ATTRIBUTE_NORETURN): Remove.
14854 (ATTRIBUTE_UNUSED): Define unconditionally.
14856 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
14857 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
14858 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
14859 * lib/vbitset.c, lib/vbitset.h: New files.
14860 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14861 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
14864 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
14865 `How Can I Reset @code{yyparse}', since texinfo does not allow
14866 arbitrary @ in node names.
14868 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
14869 shouldn't be needed according to the gettext 0.12.1 documentation
14870 but which seem to be needed anyway: codeset.m4 glibc21.m4
14871 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
14872 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
14873 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
14875 * lib/.cvsignore: Add stdbool.h.
14876 * m4/.cvsignore: Add nls.m4, po.m4.
14878 Upgrade to CVS gnulib.
14879 * stdbool_.h: File renamed from stdbool.h.in.
14880 * configure.ac (AM_STDBOOL_H): Invoke this instead of
14882 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
14883 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
14884 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
14885 (MOSTLYCLEANFILES): New var.
14886 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
14887 (stdbool.h): New rule.
14888 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
14889 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
14890 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
14891 m4/quote.m4: Upgrade to today's gnulib.
14893 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
14894 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
14895 the tests right now.
14896 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
14897 yyerror are declared before use; C99 requires this.
14899 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14901 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
14903 (yyrecoverSyntaxError): Correct the logic for setting and testing
14905 Correct comment on handling EOF.
14906 Allow states with only a default reduction, rather than failing
14907 (I can't quite reconstruct why these were not allowed before).
14909 Fixes to avoid problem that $-N rules in GLR parsers can cause
14910 buffer overruns, corrupting state.
14912 * src/output.c (prepare_rules): Output max_left_semantic_context
14914 * src/reader.h (max_left_semantic_context): New variable declaration.
14915 * src/scan-gram.l (max_left_semantic_context): Define.
14916 (handle_action_dollar): Update max_left_semantic_context.
14917 * data/glr.c (YYMAXLEFT): New definition.
14918 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
14919 (yyresolveAction): Ditto.
14921 Fixes to problems with location handling in GLR parsers reported by
14922 Frank Heckenbach (2003/06/05).
14924 * data/glr.c (YYLTYPE): Make trivial if locations not used.
14925 (YYRHSLOC): Add parentheses, and define only if locations used.
14926 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
14927 locations not used.
14928 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
14929 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
14931 * tests/cxx-type.at: Exercise location information; update tests
14932 to differentiate output with and without locations.
14933 Remove forward declarations of yylex and yyerror---caused errors
14934 because default YYLTYPE not yet defined.
14935 Change semantic actions to compute strings, rather than printing
14936 them directly (to test proper passing of semantics values). Change
14937 output to prefix notation and update test data and expected results.
14938 (yylex): Track locations.
14939 (stmtMerge): Return value rather than printing, and include arguments
14942 2003-06-03 Paul Eggert <eggert@twinsun.com>
14944 Avoid warnings generated by GCC 2.95.4 when Bison is
14945 configured with --enable-gcc-warnings.
14946 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
14947 yy::]b4_parser_class_name[::translate_,
14948 yy::Stack::operator[] (unsigned),
14949 yy::Stack::operator[] (unsigned) const,
14950 yy::Slice::operator[] (unsigned),
14951 yy::Slice::operator[] (unsigned) const):
14952 Rename local vars to avoid warnings.
14953 * tests/glr-regression.at (Improper handling of embedded actions
14954 and $-N in GLR parsers): Remove unused local variable from yylex.
14955 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
14956 (void) as arg when not pure, since we now assume C89 when building
14957 Bison. Pacify GCC by using parameter.
14959 2003-06-02 Paul Eggert <eggert@twinsun.com>
14961 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
14962 yy::Location::lines, yy::Location::columns): Rename arguments
14963 to avoid shadowing; this removes a warning generated by GCC 3.3.
14965 2003-06-01 Paul Eggert <eggert@twinsun.com>
14967 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
14968 to g++, as GCC 3.3 complains if you do it.
14969 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
14970 everything that WARNING_CFLAGS has, except omit warnings
14971 not suitable for C++.
14972 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
14973 * tests/atlocal.in (CXXFLAGS): New var.
14974 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
14976 Fix a GLR parser bug I reported in February; see
14977 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
14978 The problem was that GLR parsers did not conform to the C standard,
14979 because actions like { $1 = $2 + $3; } expanded to expressions
14980 that invoked YYFILL in separate subexpressions, and YYFILL assigned
14981 to a local variable. The C standard says that expressions
14982 like (var = f ()) + (var = f ()) have undefined behavior.
14983 Another problem was that GCC sometimes issues warnings that
14984 yyfill and its parameters are unused.
14986 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
14987 as possibly unused.
14988 (yyfill): New function.
14990 (yyuserAction): Change type of yynormal to bool, so that it matches
14991 the new yyfill signature. Mark it as possibly unused.
14994 Follow up on a bug I reported in February, where a Bison-generated
14995 parser can loop. Provide a test case and a fix for yacc.c. I
14996 don't have a fix for lalr1.cc or for glr.c, unfortunately.
14997 The original bug report is in:
14998 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
15000 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
15001 macro's size was becoming unwieldy.
15002 (yyerrlab): Do not discard an empty lookahead symbol, as this
15003 might destroy garbage.
15004 (yyerrorlab): New label, with the old contents of YYERROR,
15005 plus the following change: pop the stack of rhs corresponding
15006 to the production that invoked YYERROR. That is how Yacc
15007 behaves, and POSIX requires this behavior.
15008 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
15009 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
15010 Define 'alarm' to do nothing if unistd.h is not available.
15011 Add a new rule "exp: '-' error;" to test the above change to
15012 data/yacc.c. Use 'alarm' to abort any test taking longer than
15013 10 seconds, as it's probably looping.
15014 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
15015 Also, the new yacc.c generates two fewer diagnostics for an
15018 2003-05-24 Paul Eggert <eggert@twinsun.com>
15020 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
15021 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
15022 This fixes a problem reported by John Bowman when the Compaq/HP
15023 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
15024 -ansi -Wall -gall).
15025 * data/yacc.c (union yyalloc): Likewise.
15026 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
15028 Switch from 'int' to 'bool' where that makes sense.
15030 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
15031 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
15032 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
15033 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
15034 Return or accept bool, not int. All callers changed.
15035 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
15036 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
15037 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
15038 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
15039 bitset_or_and_cmp_): Likewise.
15040 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
15041 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
15042 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
15043 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
15044 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
15045 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
15046 bitset_stats_or_and_cmp): Likewise.
15047 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
15048 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
15049 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
15050 ebitset_xor_cmp): Likewise.
15051 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
15052 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
15053 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
15054 lbitset_xor_cmp): Likewise.
15055 * lib/bbitset.h: Include <stdbool.h>.
15056 (struct bitset_vtable): The following members now return bool, not
15057 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
15058 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
15060 * src/conflicts.c (count_rr_conflicts): Likewise.
15061 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
15063 * lib/ebitset.c (ebitset_obstack_init): Likewise.
15064 * lib/lbitset.c (lbitset_obstack_init): Likewise.
15065 * src/getargs.c (debug_flag, defines_flag, locations_flag,
15066 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
15067 graph_flag): Likewise.
15068 * src/getargs.h (debug_flag, defines_flag, locations_flag,
15069 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
15070 graph_flag): Likewise.
15071 * src/output.c (error_verbose): Likewise.
15072 * src/output.h (error_verbose): Likewise.
15073 * src/reader.c (start_flag, typed): Likewise.
15074 * src/reader.h (typed): Likewise.
15075 * src/getargs.c (LOCATIONS_OPTION): New constant.
15076 (long_options, getargs): Use it.
15077 * src/lalr.c (build_relations): Use bool, not int.
15078 * src/nullable.c (nullable_compute): Likewise.
15079 * src/print.c (print_reductions): Likewise.
15080 * src/tables.c (action_row, pack_vector): Likewise.
15081 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
15082 * src/output.c (prepare): Use it.
15083 * src/output.c (token_definitions_output,
15084 symbol_destructors_output, symbol_destructors_output): Use string,
15085 not boolean integer, to keep track of whether to output separator.
15086 * src/print_graph.c (print_core): Likewise.
15087 * src/state.c (state_rule_lookaheads_print): Likewise.
15089 * config/install-sh: Sync from automake 1.7.5.
15091 2003-05-14 Paul Eggert <eggert@twinsun.com>
15093 * src/parse-gram.y (rules_or_grammar_declaration): Require a
15094 semicolon after a grammar declaration, in the interest of possible
15095 future changes to the Bison input language.
15096 Do not allow a stray semicolon at the start of the grammar.
15097 (rhses.1): Allow one or more semicolons after any rule, including
15098 just before "|" as required by POSIX.
15099 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
15102 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
15104 %parse-param support for lalr1.cc.
15106 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
15107 b4_cc_constructor_calls, b4_cc_constructor_call,
15108 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
15110 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
15111 parse-param arguments.
15112 (yy::b4_parser_class_name): Declare instance variables to
15113 hold parse-param arguments.
15114 * tests/calc.at: s/value/semantic_value/ because value clashes
15115 with a member of yy::b4_parser_class_name. Adjust C++ code
15116 to handle %parse-param. Enable %parse-param test in C++.
15118 2003-05-12 Paul Eggert <eggert@twinsun.com>
15120 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
15121 English a bit. Fix fclose typo. Change "const char" to "char
15122 const", and use ANSI C rather than K&R for "main". Suggest
15123 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
15124 and suggest yy_switch_to_buffer.
15126 2003-05-05 Paul Eggert <eggert@twinsun.com>
15128 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
15129 C89. This avoids a diagnostic on compilers that define __STDC__
15130 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
15131 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
15133 2003-05-03 Paul Eggert <eggert@twinsun.com>
15135 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
15136 Do not overrun array bounds.
15137 This should fix a bug reported today by Olatunji Oluwabukunmi in
15138 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
15140 2003-04-29 Akim Demaille <akim@epita.fr>
15142 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
15143 * src/getargs.c, src/getargs.h: here, as bool, not int.
15144 (nondeterministic_parser): New.
15145 * src/parse-gram.y, src/scan-gram.l: Support
15146 %nondeterministic-parser.
15147 * src/output.c (prepare): Use nondeterministic_parser instead
15148 of glr_parser where appropriate.
15149 * src/tables.c (conflict_row, action_row, save_row)
15150 (token_actions, token_actions, pack_vector): Ditto.
15152 2003-04-29 Akim Demaille <akim@epita.fr>
15154 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
15156 2003-04-29 Akim Demaille <akim@epita.fr>
15158 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
15159 with %pure-parser and %locations to exercise the patch from Yakov
15162 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
15164 * data/yacc.c: (b4_lex_param): Corrected for the case where
15165 %lex-param is provided and %pure-parser isn't.
15167 2003-04-27 Paul Eggert <eggert@twinsun.com>
15169 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
15170 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
15171 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
15172 if it is not defined.
15173 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
15175 2003-04-26 Paul Eggert <eggert@twinsun.com>
15177 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
15178 Declare to be of type suitable for the ninf value itself, not of
15179 type suitable for the corresponding table, since the latter might
15180 be unsigned but the ninf value might be negative. This fixes a
15181 bug reported by Alexandre Duret-Lutz in
15182 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
15184 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
15185 invokes it. We shouldn't invoke it twice because it will attempt
15186 to put error.o in the archive twice. This fixes a glitch reported
15187 by Martin Mokrejs in
15188 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
15190 2003-04-21 Paul Eggert <eggert@twinsun.com>
15192 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
15195 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
15197 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
15198 Fix obvious typo that results in uncompilable GLR parsers
15199 when both %pure-parser and %locations are used. (trivial change)
15201 2003-04-17 Paul Eggert <eggert@twinsun.com>
15203 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
15204 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
15205 Do not insert the expected token via unput, as this runs afoul
15206 of a POSIX-compatibility bug in flex 2.5.31.
15207 All uses changed to BEGIN the parent state,
15208 since we no longer insert the expected token via unput.
15209 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
15210 that is no longer emitted after the above change.
15212 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
15213 the first one. This change is from Paul Hilfinger, and it fixes
15214 regression reported by Werner Lemberg in
15215 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
15217 (resolve_sr_conflict): Don't invoke state_errs_set
15218 unless one or more tokens have been explicitly made errors.
15219 Otherwise, the above change causes Bison to abort.
15221 * tests/existing.at (GNU pic Grammar): New test case, taken from
15224 2003-03-31 Akim Demaille <akim@epita.fr>
15226 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
15228 2003-03-31 Akim Demaille <akim@epita.fr>
15230 * src/output.c (prepare_symbols): Avoid trailing spaces in the
15233 2003-03-31 Akim Demaille <akim@epita.fr>
15235 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
15236 From Paul Hilfinger.
15238 2003-03-29 Akim Demaille <akim@epita.fr>
15240 * m4/error.m4: Do not put under dynamic conditions some code which
15241 expansion is under static control.
15243 2003-03-29 Akim Demaille <akim@epita.fr>
15245 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
15247 2003-03-29 Akim Demaille <akim@epita.fr>
15249 * doc/bison.texinfo (Strings are Destroyed): New.
15251 2003-03-13 Paul Eggert <eggert@twinsun.com>
15253 * .cvsignore: Add configure.lineno.
15254 * src/.cvsignore: Add yacc.
15255 * tests/.cvsignore: Add testsuite.log.
15256 * doc/fdl.texi: Sync with latest FSF version.
15258 2003-03-12 Paul Eggert <eggert@twinsun.com>
15260 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
15261 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
15262 cursor, instead of leaving it undefined. This fixes a bug
15263 reported by Tim Van Holder in
15264 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
15265 * tests/input.at (Torturing the Scanner): Test the scanner on
15266 an empty input file, which was Tim Van Holder's test case.
15268 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
15269 <sys/resource.h> can be included, include sys/time.h and
15270 sys/times.h first, if available. This works around the SunOS
15271 4.1.4 porting bug reported by Bruce Becker in
15272 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
15274 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
15275 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
15276 AC_HEADER_SYS_WAIT.
15278 Merge changes from gnulib. This was prompted because the CVS
15279 snapshot didn't build on Solaris 7 due to strnlen problems.
15281 These changes need to be merged back into gnulib:
15282 * lib/hash.c: Include <stdbool.h> unconditionally.
15283 * m4/onceonly.m4 (m4_quote): New macro.
15284 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
15285 Quote AC_FOREACH variable-expansions properly.
15286 The 2003-01-03 obstack.h change also needs merging.
15287 {end of changes requiring merging}
15289 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
15290 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
15291 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
15292 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
15293 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
15294 New files, imported from gnulib.
15295 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
15298 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
15299 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
15302 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
15304 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
15305 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
15306 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
15307 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
15308 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
15309 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
15310 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
15311 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
15312 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
15313 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
15314 (jm_PREREQ_ARGMATCH): Remove.
15315 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
15316 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
15318 * src/system.h: Include <stdbool.h> unconditionally.
15320 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
15321 assuming at least C89 in the bitset code for some time now.
15323 2003-03-03 Akim Demaille <akim@epita.fr>
15327 2003-03-02 Akim Demaille <akim@epita.fr>
15329 * doc/bison.texinfo (Table of Symbols): Reactivate the
15330 documentation for %lex-param, and %parse-param.
15332 2003-03-02 Akim Demaille <akim@epita.fr>
15334 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
15335 generate verbose error messages.
15336 Use the number of tokens as an upper bound in yytname, as it
15337 cannot be a non terminal.
15339 2003-03-02 Akim Demaille <akim@epita.fr>
15341 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
15344 2003-03-02 Akim Demaille <akim@epita.fr>
15346 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
15347 Use them to exercise yycheck overrun.
15348 Based on Andrew Suffield's grammar.
15350 2003-03-02 Akim Demaille <akim@epita.fr>
15352 Create tests/local.at for Bison generic testing macros.
15354 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
15355 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
15357 * tests/calc.at (AT_CHECK_CALC): Adjust.
15358 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
15359 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
15360 * tests/local.at: here.
15361 (AT_COMPILE_CXX): Tags the tests using it as c++.
15362 Ignore the test if CXX is not functional.
15364 2003-03-01 Paul Eggert <eggert@twinsun.com>
15366 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
15367 not loc->end, since loc->end might contain garbage and this leads
15368 to undefined behavior on some platforms.
15369 (id_loc, token_start): Use (IF_LINTed) initial values that do not
15370 depend on *loc, so that the reader doesn't give the the false
15371 impression that *loc is initialized.
15372 (<INITIAL>"%%"): Do not bother setting code_start, since its value
15373 does not survive the return.
15375 2003-03-01 Akim Demaille <akim@epita.fr>
15377 * src/scan-gram.l (code_start): Always initialize it when entering
15378 into yylex, as SC_EPILOGUE is activated *before* the corresponding
15379 yylex invocation. An alternative would be making it static, but
15380 then it starts with the second %%'s beginning, instead of its end.
15382 2003-02-28 Paul Eggert <eggert@twinsun.com>
15384 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
15385 around a UnixWare 7.1.1 porting bug reported by John Hughes in
15386 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
15388 2003-02-26 Paul Eggert <eggert@twinsun.com>
15390 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
15391 Remove Sequent/Pyramid discussion (nobody uses them any more).
15392 Merge VMS and MS-DOS discussion; these ports may well be dead
15393 but let's keep mentioning them for now. Put <> around email
15394 addresses. Add copyright notice.
15396 2003-02-24 Paul Eggert <eggert@twinsun.com>
15398 * data/glr.c (yy_reduce_print): yylineno -> yylno,
15399 to avoid collision with flex use of yylineno.
15400 Problem reported by Bruce Lilly in
15401 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
15402 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
15403 * data/yacc.c (yy_reduce_print): Likewise.
15405 * config/depcomp: Sync with Automake 1.7.3.
15407 2003-02-21 Akim Demaille <akim@epita.fr>
15409 * data/lalr1.cc: Use temporary variables instead of casts to
15410 change integer types.
15411 Suggested by Paul Eggert.
15413 2003-02-21 Akim Demaille <akim@epita.fr>
15415 * doc/bison.texinfo: Use "location" consistently to refer to @n,
15416 to avoid confusions with lalr1.cc's notion of Position.
15417 Suggested by Paul Eggert.
15419 2003-02-20 Akim Demaille <akim@epita.fr>
15421 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
15422 before initial_columns.
15423 (location.hh): Use consistent variable names when defining the
15425 Use "last" so that we subtract from Positions, not from unsigned.
15427 2003-02-20 Akim Demaille <akim@epita.fr>
15429 * data/lalr1.cc (position.hh): New subfile, including the extended
15430 and Doxygen'ed documentation of class Position.
15431 (location.hh): Use it.
15432 Document a` la Doxygen.
15433 With the help of Benoit Perrot.
15435 2003-02-20 Akim Demaille <akim@epita.fr>
15437 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
15439 Redefine AT_YYERROR_SEES_LOC_IF using it.
15440 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
15442 Don't use the location in yy::Parser::error_ and
15443 yy::Parser::print_ when not %locations.
15444 Activate more lalr1.cc tests.
15446 2003-02-19 Akim Demaille <akim@epita.fr>
15448 * data/lalr1.cc: When displaying a line number, be sure to make it
15451 2003-02-19 Akim Demaille <akim@epita.fr>
15453 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
15455 (YYABORT, YYACCEPT, YYERROR): New.
15456 * tests/calc.at: Renable the lalr1.cc test.
15458 2003-02-19 Akim Demaille <akim@epita.fr>
15460 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
15461 error recovery, mixing with/without pops and discarding of the
15464 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
15466 2003-02-17 Paul Eggert <eggert@twinsun.com>
15468 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
15469 * tests/testsuite.at (AT_COMPILE): Use them.
15470 This fixes the testsuite problem reported by Robert Lentz in
15471 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
15473 2003-02-12 Paul Eggert <eggert@twinsun.com>
15475 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
15476 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
15477 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
15478 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
15479 Check for malloc failure, for consistency with yacc.c.
15480 (yytname_size): Remove, for consistency with yacc.c.
15482 The bug still remains in data/lalr1.cc, as I didn't have time
15485 2003-02-06 Akim Demaille <akim@epita.fr>
15487 * configure.ac (GXX): Rename as...
15488 (CXX): this, to keep the original Autoconf semantics.
15490 * data/lalr1.cc: Fix b4_copyright invocations.
15491 If YYDEBUG is not defined, don't depend upon name_ being defined.
15492 (location.hh): Include string and iostream.
15493 (Position::filename): New member.
15494 (Position::Position ()): New.
15495 (operator<< (Position)): New.
15496 (operator- (Position, int)): New.
15497 (Location::first, Location::last): Rename as...
15498 (Location::begin, Location::end): these, to mock the conventional
15500 (operator<< (Location)): New.
15501 * tests/atlocal.in (CXX): New.
15502 * tests/testsuite.at (AT_COMPILE_CXX): New.
15503 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
15504 locations in a more synthetic way.
15505 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
15507 Adjust the C locations to match those from Emacs: first column is
15509 Change all the expected results.
15510 Conform to the GCS: simplify the locations when applicable.
15511 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
15512 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
15513 these CPP macros with the m4 macros new defined by...
15514 (AT_CHECK_PUSHDEFS): this, i.e.:
15515 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
15516 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
15518 (AT_CHECK_POPDEFS): Undefine them.
15519 (AT_CHECK_CALC_LALR1_CC): New.
15520 Use it for the first lalr1.cc test.
15522 2003-02-04 Akim Demaille <akim@epita.fr>
15524 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
15525 Location as is defined.
15527 2003-02-04 Akim Demaille <akim@epita.fr>
15529 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
15530 name_ being defined.
15532 2003-02-03 Paul Eggert <eggert@twinsun.com>
15534 * src/gram.h (start_symbol): Remove unused decl.
15536 Use more-consistent naming conventions for local vars.
15538 * src/derives.c (derives_compute): Change type of local var from
15539 int to rule_number.
15540 * src/gram.c (grammar_rules_partial_print): Likewise.
15541 * src/print.c (print_core): Likewise.
15542 * src/reduce.c (reduce_grammar_tables): Likewise.
15544 * src/gram.c (grammar_dump): Change name of item_number *
15545 local var from r to rp.
15546 * src/nullable.c (nullable_compute): Likewise.
15548 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
15550 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
15551 for symbol or symbol_number var.
15552 * src/reader.c (grammar_start_symbol_set): Likewise.
15553 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
15555 * src/state.c (transitions_to): Likewise.
15556 * src/state.h: Likewise.
15557 * src/tables.c (symbol_number_to_vector_number): Likewise.
15559 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
15562 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
15565 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
15568 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
15569 Use str, not s, for char * var. Use ch, not c, for character var.
15570 Use size for size var.
15572 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
15574 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
15576 * src/uniqstr.h: Likewise.
15578 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15579 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15580 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
15581 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
15582 param to have same name as that of enum, so that we don't use
15583 "s" to stand for a non-state.
15585 2003-02-02 Akim Demaille <akim@epita.fr>
15587 * src/scan-skel.l: Scan more than one inert character per yylex
15590 2003-02-01 Paul Eggert <eggert@twinsun.com>
15594 * po/LINGUAS: Add ms.
15596 2003-01-30 Akim Demaille <akim@epita.fr>
15598 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
15600 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15602 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
15605 Changes in response to error report by S. Eken: GLR mode does not
15606 handle negative $ indices or $ indices in embedded rules correctly.
15607 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
15609 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
15610 (b4_rhs_location): Ditto.
15611 (yyfill): New function to copy from stack tree into array
15613 (yyuserAction): Modify to allow incremental move of semantic values
15614 to rhs array when in GLR mode.
15615 Define YYFILL to use in user-defined actions to fill semantic array
15617 Remove dummy use of yystack, as there is now a guaranteed use.
15618 (yydoAction): Modify to allow incremental move of semantic values
15619 to rhs array when in GLR mode.
15620 (yyresolveAction): Ditto.
15621 (yyglrShiftDefer): Update comment.
15622 (yyresolveStates): Use X == NULL for pointers, not !X.
15623 (yyglrReduce): Ditto.
15624 (yydoAction): Ditto
15626 * tests/glr-regr1.at: Rename to ...
15627 * tests/glr-regression.at: Add new regression test for the problems
15628 described above (adapted from S. Eken).
15629 Update copyright notice.
15630 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
15631 * tests/Makefile.am: Ditto.
15633 2003-01-28 Paul Eggert <eggert@twinsun.com>
15635 * data/lalr1.cc: Do not use @output_header_name@ unless
15636 b4_defines_flag is set. This fixes two bugs reported by
15638 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
15639 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
15641 2003-01-21 Paul Eggert <eggert@twinsun.com>
15643 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
15644 we don't need to worry about yyerrlab1 being reported as an
15645 "unused label" by non-GCC C compilers. The downside is that if
15646 locations are used then a couple of statements are duplicated each
15647 time YYERROR is invoked, but the upside is that the warnings
15649 (yyerrlab1): Move code to YERROR.
15650 (yyerrlab2): Remove. Change uses back to yyerrlab1.
15651 This reverts some of the 2002-12-27 change.
15653 2003-01-17 Paul Eggert <eggert@twinsun.com>
15655 * src/output.c (symbol_printers_output): Fix typo that led
15656 to core dump. Problem reported by Antonio Rus in
15657 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
15659 2003-01-13 Akim Demaille <akim@epita.fr>,
15660 Quoc Peyrot <chojin@lrde.epita.fr>,
15661 Robert Anisko <anisko_r@lrde.epita.fr>
15663 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
15664 when the stacks contain one element, as the loop would otherwise
15665 free the last state, and then use the top state (the one we just
15666 popped). This means that the initial elements will not be freed
15667 explicitly, as is the case in yacc.c; it is not a problem, as
15668 these elements have fake values.
15670 2003-01-11 Paul Eggert <eggert@twinsun.com>
15672 * NEWS: %expect-violations are now just warnings, reverting
15673 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
15674 bootstrapping problem reported by Matthias Klose; see
15675 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
15676 * src/conflicts.c (conflicts_print): Likewise.
15677 * tests/conflicts.at (%expect not enough, %expect too much,
15678 %expect with reduce conflicts): Likewise.
15679 * doc/bison.texinfo (Expect Decl): Document this. Also mention
15680 that the warning is enabled if the number of conflicts changes
15681 (not necessarily increases).
15683 * src/getargs.c (version): Update copyright year.
15685 2003-01-09 Akim Demaille <akim@epita.fr>
15687 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
15689 2003-01-08 Paul Eggert <eggert@twinsun.com>
15691 * Makefile.maint (WGETFLAGS):
15692 New macro, containing "-C off" to disable proxy caches.
15693 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
15694 (rel-check): Use $(WGET) instead of wget.
15696 2003-01-06 Paul Eggert <eggert@twinsun.com>
15698 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
15699 the GLR paper of Scott, Johnstone and Hussain.
15701 2003-01-04 Paul Eggert <eggert@twinsun.com>
15703 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
15704 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
15705 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
15706 (EXTRA_LIBRARIES): New var, for liby.a.
15707 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
15708 (EXTRA_SCRIPTS): New var, for yacc.
15710 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
15711 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
15712 Problem reported by Nelson H. F. Beebe.
15714 2003-01-03 Paul Eggert <eggert@twinsun.com>
15716 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
15717 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
15718 when compiling Bison 1.875's `bitset bset = obstack_alloc
15719 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
15721 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
15722 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
15723 grow to a huge size with typical invocation.
15725 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
15726 Use the pattern recommended by Autoconf 2.57, except also protect
15727 against double-definition.
15728 * src/system.h: Likewise.
15729 Portability issues reported by Nelson H. F. Beebe.
15731 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
15732 All uses changed. Provide a definition in both C and C++.
15733 (yytrue, yyfalse): Define even if defined (__cplusplus).
15735 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
15736 Reported by Nelson H. F. Beebe.
15738 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
15740 2003-01-02 Paul Eggert <eggert@twinsun.com>
15742 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
15743 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
15744 Bug reported by Nelson H. F. Beebe.
15746 2003-01-01 Paul Eggert <eggert@twinsun.com>
15750 2002-12-30 Paul Eggert <eggert@twinsun.com>
15752 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
15754 (<INITIAL>","): Here. This causes stray "," to be treated
15757 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
15758 last brace in braced code when not in Yacc mode, for compatibility
15759 with Bison 1.35. This resurrects the 2001-12-15 patch to
15762 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
15763 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
15765 2002-12-28 Paul Eggert <eggert@twinsun.com>
15767 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
15768 that of SYM's type. This fixes Debian bug 168069, reported by
15771 2002-12-28 Paul Eggert <eggert@twinsun.com>
15775 Switch back to the Yacc style of conflict reports, undoing some
15776 of the 2002-07-30 change.
15777 * doc/bison.texinfo (Understanding): Use Yacc style for
15778 conflict reports. Also, use new way of locating rules.
15779 * src/conflicts.c (conflict_report):
15780 Renamed from conflict_report_yacc, removing the old
15781 'conflict_report'. Translate the entire conflict report at once,
15782 so that we don't assume that "," has the same interpretation in
15784 (conflicts_output): Use Yacc-style conflict report for each state,
15785 instead of our more-complicated style.
15786 (conflicts_print): Use Yacc-style conflict report, except print
15787 the input file name when not emulating Yacc.
15788 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
15789 Conflicted Reduction, %expect not enough, %expect too much,
15790 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
15791 * tests/existing.at (GNU Cim Grammar): Likewise.
15792 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
15794 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
15795 fatal): Don't invoke fflush; it's not needed and it might even be
15796 harmful for stdout, as stdout might not be open.
15797 * src/reduce.c (reduce_print): Likewise.
15799 2002-12-27 Paul Eggert <eggert@twinsun.com>
15801 Fix a bug where error locations were not being recorded correctly.
15802 This problem was originally reported by Paul Hilfinger in
15803 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
15805 * data/yacc.c (yyparse): New local var yylerrsp, to record the
15806 top of the location stack's error locations.
15807 (yyerrlab): Set it. When discarding a token, push its location
15808 onto yylerrsp so that we don't lose track of the error's end.
15809 (yyerrlab1): Now is only the target of YYERROR, so that we can
15810 properly record the location of the action that failed. For GCC
15811 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
15812 GCC warning about yyerrlab1 being unused if YYERROR is unused.
15813 (yyerrlab2): New label, which yyerrlab now falls through to.
15814 Compute the error's location by applying YYLLOC_DEFAULT to
15815 the locations of all the symbols that went into the error.
15816 * doc/bison.texinfo (Location Default Action): Mention that
15817 YYLLOC_DEFAULT is also invoked for syntax errors.
15818 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
15819 Error locations include the locations of all the tokens that were
15820 discarded, not just the last token.
15822 2002-12-26 Paul Eggert <eggert@twinsun.com>
15824 * src/files.c: Include quote.h.
15825 (compute_output_file_names): Warn if we detect conflicting
15826 outputs to the same file. This should catch the misunderstanding
15827 exemplified by Debian Bug 165349, reported by Bruce Stephens..
15829 * src/conflicts.c (conflicts_print): If the user specifies
15830 "%expect N", report an error if there are any reduce/reduce
15831 conflicts. This is what the manual says should happen.
15832 This fixes Debian bug 130890, reported by Anthony DeRobertis.
15833 * tests/conflicts.at (%expect with reduce conflicts): New test.
15835 Don't use m4_include on relative file names, as it doesn't work as
15836 desired if there happens to be a file with that name under ".".
15838 * m4sugar/version.m4: Remove; it was included but it wasn't used.
15839 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
15840 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
15841 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
15842 * src/output.c (output_skeleton): Use full path names when
15843 specifying a file to include; don't rely on include path, as
15844 it's unreliable when the working file contains a file with
15847 2002-12-25 Paul Eggert <eggert@twinsun.com>
15849 Remove obsolete references to bison.simple and bison.hairy.
15850 Problem mentioned by Aubin Mahe in
15851 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
15852 * data/glr.c: Comment fix.
15853 * doc/bison.1: Remove references. Also, mention "yacc".
15855 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
15858 * src/parse-gram.y (declaration): Use enum "report_states" rather
15859 than its numeric value 1.
15861 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
15862 opening a new one. This fixes Debian bug 165349, reported by
15865 2002-12-24 Paul Eggert <eggert@twinsun.com>
15869 * Makefile.maint (cvs-update): Don't assume that the shell
15870 supports $(...), as Solaris sh doesn't.
15872 * src/parse-gram.y (lloc_default): Remove test for empty
15873 nonterminals at the end, since it didn't change the result.
15875 2002-12-24 Paul Eggert <eggert@twinsun.com>
15877 If the user does not define YYSTYPE as a macro, Bison now declares it
15878 using typedef instead of defining it as a macro. POSIX requires this.
15879 For consistency, YYLTYPE is also declared instead of defined.
15881 %union directives can now have a tag before the `{', e.g., the
15882 directive `%union foo {...}' now generates the C code
15883 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
15884 The default union tag is `YYSTYPE', for compatibility with Solaris 9
15885 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
15886 instead of `yyltype'.
15888 `yystype' and `yyltype' are now obsolescent macros instead of being
15889 typedefs or tags; they are no longer documented and will be
15890 withdrawn in a future release.
15892 * data/glr.c (b4_location_type): Remove.
15893 (YYSTYPE): Renamed from yystype.
15894 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
15895 (struct YYLTYPE): Renamed from struct yyltype.
15896 (YYLTYPE): Renamed from yyltype.
15897 (yyltype, yystype): New (and obsolescent) macros,
15898 for backward compatibility.
15899 * data/yacc.c: Likewise.
15901 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
15902 does not specify a union tag. This is for compatibility with
15905 * src/parse-gram.y (add_param): 2nd arg is now char * not char
15906 const *, since it is now modified by stripping surrounding { }.
15907 (current_braced_code): Remove.
15908 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
15909 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
15910 trailing " {...}". Now of type <chars>.
15911 (grammar_declaration): Adjust to bundled tokens.
15912 (code_content): Remove; stripping is now done by add_param.
15913 (print_token_value): Print contents of bundled tokens.
15914 (token_name): New function.
15916 * src/reader.h (braced_code, current_braced_code): Remove.
15917 (token_name): New decl.
15919 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
15920 token_type, not braced_code code_kind. All uses changed.
15921 (SC_PRE_CODE): New state, for scanning after a keyword that
15922 has (or usually has) an immediately-following braced code.
15923 (token_type): New local var, to keep track of which token type
15924 to return when scanning braced code.
15925 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
15926 <INITIAL>"%parse-param", <INITIAL>"%printer",
15927 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
15928 instead of returning a token type immediately.
15929 (<INITIAL>"{"): Set token type.
15930 (<SC_BRACED_CODE>"}"): Use it.
15931 (handle_action_dollar, handle_action_at): Now returns bool
15932 indicating success. Fail if ! current_rule; this prevents a core dump.
15933 (handle_symbol_code_dollar, handle_symbol_code_at):
15934 Remove; merge body into caller.
15935 (handle_dollar, handle_at): Complain in invalid contexts.
15937 * NEWS, doc/bison.texinfo: Document the above.
15938 * NEWS: Fix years and program names in copyright notice.
15940 2002-12-17 Paul Eggert <eggert@twinsun.com>
15942 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
15943 Reporting, Table of Symbols): Omit mentions of %lex-param and
15944 %parse-param from the documentation for now.
15946 2002-12-15 Paul Eggert <eggert@twinsun.com>
15948 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
15949 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
15950 lookahead symbol, and which sets yychar in parser actions) and it
15951 disagreed with the Bison documentation. Bug
15952 reported by Andrew Walrond.
15954 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
15955 as the caller now does that.
15956 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
15957 (YYEMPTY): Parenthesize right hand side, since others use it.
15958 (yyparse): Don't assume that our generated code is the only code
15961 2002-12-13 Paul Eggert <eggert@twinsun.com>
15965 POSIX requires a "yacc" command.
15966 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
15967 (MOSTLYCLEANFILES): Add yacc.
15969 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
15970 as an alias for bison y.
15972 * po/LINGUAS: Add da.
15974 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
15975 problem with latest <getopt.h>.
15976 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
15978 * doc/fdl.texi: Upgrade to 1.2.
15979 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
15980 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
15981 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
15983 * config/install-sh: Sync with autotools.
15985 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
15986 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15987 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
15988 locations are requested.
15989 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
15990 locations are requested.
15992 2002-12-12 Paul Eggert <eggert@twinsun.com>
15994 Remove unportable casts and storage allocation tricks.
15995 While we're at it, remove almost all casts, since they
15996 usually aren't needed and are a sign of trouble.
15998 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
16000 * src/derives.c (derives_compute): Do not subtract NTOKENS from
16001 the pointer DSET returned by malloc; this isn't portable.
16002 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
16003 Similarly for DERIVES.
16004 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
16005 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
16006 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
16008 * src/derives.c (derives_compute): Do not bother invoking
16009 int_of_rule_number, since rule numbers are integers.
16011 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
16012 rather than XMALLOC (char, N).
16014 * src/files.c (filename_split): Rewrite to avoid cast.
16016 * src/gram.h (symbol_number_as_item_number,
16017 item_number_as_symbol_number, rule_number_as_item_number,
16018 item_number_as_rule_number):
16019 Now inline functions rather than macros, to avoid casts.
16020 * src/state.h (state_number_as_int): Likewise.
16021 * src/tables.c (state_number_to_vector_number,
16022 symbol_number_to_vector_number): Likewise.
16024 * src/gram.h (int_of_rule_number): Remove; no longer used.
16026 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
16027 since the resulting storage is always stored into.
16029 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
16032 * src/muscle_tab.c (muscle_m4_output):
16033 Now inline. Return bool, not int.
16034 * src/state.c (state_compare): Likewise.
16035 * src/symtab.c (symbol_check_defined,
16036 symbol_check_alias_consistency, symbol_pack, symbol_translation,
16037 hash_compare_symbol, hash_symbol):
16039 * src/uniqstr.c (uniqstr_print): Likewise.
16040 * src/muscle_tab.c (muscle_m4_output_processor):
16041 New function, to avoid casts.
16042 * src/state.c (state_comparator, stage_hasher): Likewise.
16043 * src/symtab.c (symbol_check_defined_processor,
16044 symbol_check_alias_consistency_processor, symbol_pack_processor,
16045 symbol_translation_processor, hash_symbol_comparator,
16046 hash_symbol_hasher): Likewise.
16047 * src/uniqstr.c (uniqstr_print_processor): Likewise.
16048 * src/muscle_tab.c (muscles_m4_output):
16049 Use new functions instead of casting old functions unportably.
16050 * src/state.c (state_hash_new): Likewise.
16051 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
16052 symbols_token_translations_init):
16054 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
16056 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
16057 var instead of casting to long, to avoid casts.
16058 (prepare_states): Use MALLOC rather than alloca, so that we don't
16059 have to worry about alloca.
16060 * src/state.c (state_hash_lookup): Likewise.
16062 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
16063 local var instead of casting to unsigned char, to avoid casts.
16065 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
16066 STATE_ALLOC): Remove.
16067 (transitions_new, errs_new, reductions_new, state_new): Use malloc
16068 rather than calloc, and use offsetof to avoid allocating slightly
16070 (state_new): Initialize all members.
16072 * src/state.c (state_hash): Use unsigned accumulator, not signed.
16074 * src/symtab.c (symbol_free): Remove; unused.
16075 (symbol_get): Remove cast in lhs of assignment.
16076 (symbols_do): Now static. Accept generic arguments, not
16077 hashing-related ones.
16079 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
16080 (symbol_processor): Remove.
16081 (symbols_do): Remove decl; now static.
16083 * src/system.h (alloca): Remove; decl no longer needed.
16084 (<stddef.h>): Include, for offsetof.
16085 (<inttypes.>, <stdint.h>): Include if available.
16086 (uintptr_t): New type, if system lacks it.
16087 (CALLOC, MALLOC, REALLOC): New macros.
16088 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
16091 * src/tables.c (table_size): Now int, to pacify GCC.
16092 (table_grow, table_ninf_remap): Use signed table size.
16093 (save_row): Don't bother initializing locals when not needed.
16094 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
16095 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
16097 * src/vcg.h: Correct misspellings.
16099 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
16102 * src/getargs.c (getargs): Don't assume EOF == -1.
16104 2002-12-09 Paul Eggert <eggert@twinsun.com>
16106 Change identifier spellings to avoid collisions with names
16107 that are reserved by POSIX.
16109 Don't use names ending in _t, since POSIX reserves them.
16110 For consistency, remove _e and _s endings -- they're weren't
16111 needed to remove ambiguity. All uses changed.
16112 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
16113 turn was just renamed from struniq_t.
16114 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
16115 which in turn was just renamed from struniq_processor_t.
16116 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
16117 in turn was renamed from hash_compare_struniq_t.
16118 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
16119 (state_list): Renamed from state_list_t.
16120 * src/assoc.h (assoc): Renamed from assoc_t.
16121 * src/conflicts.c (enum conflict_resolution): Renamed from
16122 enum conflict_resolution_e.
16123 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
16124 (rule_list): Renamed from rule_list_t.
16125 * src/getargs.h (enum trace): Renamed from enum trace_e.
16126 (enum report): Renamed from enum report_e.
16127 * src/gram.h (item_number): Renamed from item_number_t.
16128 (rule_number): Renamed from rule_number_t.
16129 (struct rule_s): Remove the "rule_s" part; not used.
16130 (rule): Renamed from rule_t.
16131 (rule_filter): Renamed from rule_filter_t.
16132 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
16133 (goto_list): Renamed from goto_list_t.
16134 * src/lalr.h (goto_number): Renamed from goto_number_t.
16135 * src/location.h (location): Renamed from location_t.
16136 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
16137 and moved here from:
16138 * src/muscle_tab.h (muscle_entry_t): here.
16139 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
16140 (rule_list): Renamed from rule_list_t.
16141 * src/print_graph.c (static_graph): Renamed from graph.
16142 * src/reader.h (braced_code): Renamed from braced_code_t.
16143 Remove brace_code_e tag.
16144 * src/relation.h (relation_node): Renamed from relation_node_t.
16145 (relation_nodes): Renamed from relation_nodes_t.
16146 (relation): Renamed from relation_t.
16147 * src/state.h (state_number): Renamed from state_number_t.
16148 (struct state): Renamed from struct state_s.
16149 (state): Renamed from state_t.
16150 (transitions): Renamed from transitions_t. Unused (and
16151 misspelled) transtion_s tag removed.
16152 (errs): Renamed from errs_t. Unused errs_s tag removed.
16153 (reductions): Renamed from reductions_t. Unused tag
16154 reductions_s removed.
16155 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
16156 (struct symbol_list): Renamed from struct symbol_list_s.
16157 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
16158 (struct symbol): Renamed from struct symbol_s.
16159 (symbol): Renamed from symbol_t.
16160 * src/tables.c (vector_number): Renamed from vector_number_t.
16161 (action_number): Renamed from action_t.
16162 * src/tables.h (base_number): Renamed from base_t.
16163 * src/vcg.h (enum color): Renamed from enum color_e.
16164 (enum textmode): Renamed from enum textmode_e.
16165 (enum shape): Renamed from enum shape_e.
16166 (struct colorentry): Renamed from struct colorentry_s.
16167 (struct classname): Renamed from struct classname_s.
16168 (struct infoname): Renamed from struct infoname_s.
16169 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
16170 (enum decision): Renamed from enum decision_e.
16171 (enum orientation): Renamed from enum orientation_e.
16172 (enum alignment): Renamed from enum alignment_e.
16173 (enum arrow_mode): Renamed from enum arrow_mode_e.
16174 (enum crossing_type): Renamed from enum crossing_type_e.
16175 (enum view): Renamed from enum view_e.
16176 (struct node): Renamed from struct node_s.
16177 (node): Renamed from node_t.
16178 (enum linestyle): Renamed from enum linestyle_e.
16179 (enum arrowstyle): Renamed from enum arrowstyle_e.
16180 (struct edge): Renamed from struct edge.
16181 (edge): Renamed from edge_t.
16182 (struct graph): Renamed from struct graph_s.
16183 (graph): Renamed from graph_t.
16184 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
16185 Rename value_t -> value.
16186 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
16187 value_t_as_yystype -> value_as_yystype.
16189 Don't include <errno.h> in the mainstream code, since it
16190 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
16191 * lib/get-errno.c, lib/get-errno.h: New files.
16192 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
16194 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
16195 * src/output.c (output_skeleton): Likewise.
16196 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
16198 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
16200 (handle_action_dollar, handle_action_at): Likewise.
16201 * src/system.h: Do not include <errno.h>.
16202 (TAB_EXT): Renamed from EXT_TAB.
16203 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
16205 Avoid str[a-z]*, since <string.h> reserves that name space.
16206 Change all instances of "struniq" in names to "uniqstr", and
16207 likewise for "STRUNIQ" and "UNIQSTR".
16208 * src/uniqstr.c: Renamed from src/struniq.c.
16209 * src/uniqstr.h: Renamed from src/struniq.h.
16210 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
16211 * src/files.c (strsuffix): Remove; unused.
16212 (concat2): Renamed from stringappend. Now static.
16213 * src/files.h (strsuffix, stringappend): Remove; unused.
16214 * src/parse-gram.y (<chars>): Renamed from <string>.
16215 (<uniqstr>): Renamed from <struniq>.
16216 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
16217 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
16218 (struct graph_s.expand): Renamed from struct graph_s.stretch.
16219 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
16220 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
16221 (N_EXPAND): Renamed from N_STRETCH.
16223 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
16224 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
16225 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
16227 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
16228 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
16229 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
16230 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
16231 (BASE_MAXIMUM): Renamed from BASE_MAX.
16232 (BASE_MINIMUM): Renamed from BASE_MIN.
16233 (ACTION_MAX): Remove; unused.
16234 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
16235 Unnecessary casts removed from above defines.
16238 Fix misspelling in names.
16239 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
16240 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
16244 * lib/timevar.c (timevar_report): Renamed from time_report,
16245 for consistency with other names.
16246 * lib/timevar.h (timevar_report): New decl.
16247 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
16250 Sort include-file uses.
16252 Reorder all include files under src to be in the order "system.h".
16253 then the ../lib include files in angle brackets (alphabetized),
16254 then the . include files in double-quotes (alphabetized). Fix
16255 dependency breakages encountered in this process, as follows:
16256 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
16257 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
16258 * src/state.h: Include "symtab.h".
16260 2002-12-08 Paul Eggert <eggert@twinsun.com>
16262 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
16263 since this causes problems when __file__ contains character
16264 sequences like "@" that are treated specially by src/scan-skel.l.
16265 Instead, just use the file's basename. This fixes the bug
16266 reported by Martin Mokrejs in
16267 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
16269 2002-12-06 Paul Eggert <eggert@twinsun.com>
16271 Add support for rules that do not have trailing semicolons, as
16272 POSIX requires. Improve the quality of locations in Bison
16275 * src/location.c: Include <quotearg.h>.
16276 (empty_location): Now const.
16277 (location_print): New function. Follow the recommendation of the
16278 GNU Coding Standards for locations that span file boundaries.
16279 * src/location.h: Do not include <quotearg.h>; no longer needed.
16280 (boundary): New type.
16281 (location_t): Use it. This allows locations to span file boundaries.
16282 All member uses changed: file -> start.file or end.file (as needed),
16283 first_line -> start.line, first_column -> start.column,
16284 last_line -> end.line, last_column -> end.column.
16285 (equal_boundaries): New function.
16286 (LOCATION_RESET, LOCATION_STEP): Remove.
16287 (LOCATION_PRINT): Remove. All callers changed to use location_print.
16288 (empty_location): Now const.
16289 (location_print): New decl.
16290 * src/parse-gram.y (lloc_default): New function, which handles
16291 empty locations more accurately.
16292 (YYLLOC_DEFAULT): Use it.
16293 (%token COLON): Remove.
16294 (%token ID_COLON): New token.
16296 (declarations, rules): Remove trailing semicolon.
16297 (declaration, rules_or_grammar_declaration):
16298 Allow empty (";") declaration.
16299 (symbol_def): Remove empty actions; no longer needed.
16300 (rules_or_grammar_declaration): Remove trailing semicolon.
16301 (semi_colon.opt): Remove.
16302 * src/reader.h: Include location.h.
16303 (scanner_cursor): New decl.
16304 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
16306 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
16308 (STEP): Remove. No longer needed, now that adjust_location does
16309 the work. All uses removed.
16310 (scanner_cursor): New var.
16311 (adjust_location): Renamed from extend_location. It now sets
16312 *loc and adjusts the scanner cursor. All uses changed.
16313 Don't bother testing for CR.
16314 (handle_syncline): Remove location arg; now updates scanner cursor.
16315 All callers changed.
16316 (unexpected_end_of_file): Now accepts start boundary of token or
16317 comment, not location. All callers changed. Update scanner cursor,
16319 (SC_AFTER_IDENTIFIER): New state.
16320 (context_state): Renamed from c_context. All uses changed.
16321 (id_loc, code_start, token_start): New local vars.
16322 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
16323 processing of Yacc white space and equivalents here.
16324 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
16325 instead of returning ID immediately, since we need to search for
16326 a subsequent colon.
16327 (<INITIAL>"'", "\""): Save token_start.
16328 (<INITIAL>"%{", "{", "%%"): Save code_start.
16329 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
16330 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
16331 BEGIN context_state at end, not INITIAL.
16332 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
16333 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
16334 Return correct token start.
16335 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
16336 the start of a character, string or multiline comment is found.
16337 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
16338 Reduction): Adjust reported locations to match the more-precise
16339 results now expected.
16340 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
16341 * tests/reduce.at (Useless Rules, Reduced Automaton,
16342 Underivable Rules): Likewise.
16343 * tests/regression.at (Invalid inputs): No longer `expecting ";"
16344 or "|"' now that so many other tokens are allowed by the new grammar.
16346 * src/complain.h (current_file): Remove duplicate decl;
16347 current_file is now owned by files.h.
16348 * src/complain.c, src/scan-gram.l: Include files.h.
16350 2002-12-06 Paul Eggert <eggert@twinsun.com>
16352 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
16353 promotes to int; it might be unsigned int.
16354 * data/yacc.c (yy_reduce_print): Likewise.
16356 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
16357 be #defined in the prologue, not in the Bison declarations.
16358 This fixes Debian Bug 102878, reported by Shaul Karl.
16360 2002-12-02 Paul Eggert <eggert@twinsun.com>
16362 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
16363 * lib/strtoul.c: New file, from gnulib.
16364 This fixes a porting bug reported by Peter Klein in
16365 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
16367 2002-11-30 Paul Eggert <eggert@twinsun.com>
16369 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
16370 and put only a forward declaration in the prologue. This is for
16371 consistency with the other scanner helper functions.
16373 Type clashes now generate warnings, not errors, since it
16374 appears that POSIX may allow some grammars with type clashes.
16375 * src/reader.c (grammar_current_rule_check): Warn about
16376 type clashes instead of complaining.
16377 * tests/input.at (Type Clashes): Expect warnings, not complaints.
16379 Add Yacc library, since POSIX requires it.
16380 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
16381 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
16382 * lib/main.c, lib/yyerror.c: New files.
16384 gram_error can be static; it need not be extern.
16385 * src/reader.h (gram_error): Remove decl.
16386 * src/parse-gram.y (gram_error): Now static. Add static decl.
16387 (print_token_value): Omit parameter names from forward decl,
16390 2002-11-29 Paul Eggert <eggert@twinsun.com>
16392 * doc/bison.texinfo: Emphasize that yylex and yyerror must
16393 be declared before being used. E.g., one should typically
16394 declare them in the prologue. Use GNU coding style in examples.
16395 Put "const" consistently after the type it modifies. Mention
16396 that C99 supports "inline". Mention that yyerror traditionally
16399 %parse-param and %lex-param now take just one argument, the
16400 declaration; the argument name is deduced from the declaration.
16402 * doc/bison.texinfo (Parser Function, Pure Calling, Error
16403 Reporting, Table of Symbols): Document this.
16404 * src/parse-gram.y (add_param): New function.
16406 (declaration): Implement new rule for %parse-param and %lex-param.
16407 * src/scan-gram.l: "," now elicits a warning, rather than being
16408 a token; this is more compatible with byacc.
16409 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
16411 2002-11-27 Paul Eggert <eggert@twinsun.com>
16413 Rename identifiers to avoid real and potential collisions.
16415 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
16416 to avoid collision with lex macro described by Bruce Lilly in
16417 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
16418 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
16419 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
16420 * src/parse-gram.y (print_token_value): Renamed from yyprint.
16422 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
16423 The name "yycontrol" violates the name space rules, and this stuff
16424 wasn't being used anyway.
16425 (input): Remove action; this stuff wasn't being used.
16426 (gram_error): Rename local variable yylloc -> loc.
16427 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
16428 (YY_DECL): Don't use "yy" at start of local variables.
16429 All uses changed, e.g., yylloc -> loc.
16430 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
16431 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
16432 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
16433 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
16435 * src/parse-gram.y (gram_error): loc is now const *.
16436 * src/reader.h (gram_error): Likewise.
16438 2002-11-24 Paul Eggert <eggert@twinsun.com>
16442 * tests/actions.at (Actions after errors): Use an output format
16443 more similar to that of the Printers and Destructors test.
16444 Test the position of the ';' token too.
16445 (Printers and Destructors): Likewise.
16446 (Printers and Destructors: %glr-parser): Remove for now, to avoid
16447 unnecessarily alarming people when the test fails.
16449 * data/yacc.c (yyerrlab1): Move this label down, so that the
16450 parser does not discard the lookahead token if the user code
16451 invokes YYERROR. This change is required for POSIX conformance.
16453 * lib/error.c: Sync with gnulib.
16455 2002-11-22 Paul Eggert <eggert@twinsun.com>
16457 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
16458 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
16459 * lib/xmalloc.c: Likewise.
16461 2002-11-20 Paul Eggert <eggert@twinsun.com>
16463 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
16465 2002-11-20 Paul Eggert <eggert@twinsun.com>
16467 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
16468 should use `if (! x) abort ();' rather than `assert (x);', and
16469 anyway it's one less thing to worry about configuring.
16471 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
16472 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
16473 and replace all instances of assert with abort.
16474 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
16475 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
16477 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
16478 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
16479 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
16480 hash_find_entry, hash_rehash, hash_insert): Likewise.
16481 * src/conflicts.c (resolve_sr_conflict): Likewise.
16482 * src/lalr.c (set_goto_map, map_goto): Likewise.
16483 * src/nullable.c (nullable_compute): Likewise.
16484 * src/output.c (prepare_rules, token_definitions_output): Likewise.
16485 * src/reader.c (packgram, reader): Likewise.
16486 * src/state.c (state_new, state_free, state_transitions_set,
16487 state_reduction_find): Likewise.
16488 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
16489 symbol_pack): Likewise.
16490 * src/tables.c (conflict_row, pack_vector): Likewise.
16491 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
16492 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
16493 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
16494 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
16496 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
16497 (ARGMATCH_CONSTRAINT): New macro.
16498 (ARGMATCH_ASSERT): Use it.
16500 * src/system.h (verify): New macro.
16501 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
16502 rather than assert.
16503 * src/tables.c (tables_generate): Likewise.
16505 * src/struniq.c (struniq_assert): Now returns void, and aborts
16506 if the assertion is false.
16507 (struniq_assert_p): Remove.
16508 * src/struniq.h: Likewise.
16510 2002-11-18 Paul Eggert <eggert@twinsun.com>
16512 * data/glr.c (yygetLRActions): Replace `yyindex' with
16513 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
16514 This fixes the regression with Sun ONE Studio 7 cc that I reported in
16515 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
16517 2002-11-18 Akim Demaille <akim@epita.fr>
16519 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
16521 From Tim Van Holder.
16523 2002-11-17 Paul Eggert <eggert@twinsun.com>
16525 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
16526 to "SyntaxError" for consistency with my 2002-11-15 change.
16528 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
16529 not define to {}, since this breaks the common use of `YYDPRINTF
16530 ((...));' if a single statement is desired (e.g. before `else').
16531 Work around GCC warnings by surrounding corresponding calls with
16533 (yyhasResolvedValue): Remove unused function.
16534 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
16536 (yyreportSyntaxError): Renamed from yyreportParseError.
16537 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
16539 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
16540 extern when possible. Remove unused initializations.
16542 2002-11-16 Akim Demaille <akim@epita.fr>
16544 Augment the similarity between GLR and LALR traces.
16546 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
16547 (YY_REDUCE_PRINT): New.
16548 (yyparse): Use them.
16549 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
16551 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
16552 state reached after the reduction/recovery, since...
16553 (yyparse, yyprocessOneStack): Report the state we are entering in.
16555 2002-11-16 Akim Demaille <akim@epita.fr>
16557 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
16558 Add support for --trace=skeleton.
16559 * src/scan-skel.l: %option debug.
16560 Scan strings of non-@ or \n instead of character by character.
16561 (scan_skel): Handle trace_skeleton.
16563 (@output_parser_name@, @output_header_name@): ``Restore'' their
16564 support (used to be M4 macros).
16565 * data/yacc.c: Quote larger chunks, a la glr.c.
16566 * data/lalr1.cc: Likewise.
16567 The header guards are no longer available, so use some other
16568 string than `YYLSP_NEEDED'.
16570 2002-11-16 Akim Demaille <akim@epita.fr>
16572 Make the ``Printers and Destructors'' test more verbose, taking
16573 `yacc.c''s behavior as (possibly wrong) reference.
16575 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
16576 instead of fprint on stdout.
16577 Set and report the last_line of the symbols.
16578 Consistently display values and locations.
16580 2002-11-16 Paul Eggert <eggert@twinsun.com>
16582 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
16584 2002-11-15 Paul Eggert <eggert@twinsun.com>
16586 * tests/actions.at (Actions after errors): New test case.
16588 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
16589 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
16590 tests/action.at, tests/calc.at, tests/conflicts.at,
16591 tests/cxx-type.at, tests/regression.at:
16592 "parse error" -> "syntax error" for POSIX compatibility.
16593 "parsing stack overflow..." -> "parser stack overflow" so
16594 that code matches Bison documentation.
16596 2002-11-15 Akim Demaille <akim@epita.fr>
16598 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
16599 take two BRACED_CODE, not two string_content.
16600 Free the scanner's obstack when we are done.
16601 (code_content): New.
16602 * tests/calc.at: Adjust.
16603 * doc/bison.texinfo: Adjust.
16604 Also, make sure to include the `,' for these declarations.
16606 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
16608 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
16609 definition; avoids potential autoreconf problems.
16611 2002-11-15 Akim Demaille <akim@epita.fr>
16613 Always check the value returned by yyparse.
16615 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
16616 returned by yyparse.
16617 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
16619 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
16620 returned by yyparse.
16622 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16624 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
16627 2002-11-14 Paul Eggert <eggert@twinsun.com>
16629 * src/output.c (output_skeleton): Call xfopen instead of
16630 duplicating xfopen's body.
16632 Fix bugs reported by Nelson H. F. Beebe in
16633 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
16635 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
16636 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
16637 Group compiler. Instead, use "$CC -E bar.c". Include the .h
16638 file twice in the grammar, as an extra check.
16640 * tests/input.at (Torturing the Scanner): Surround the
16641 backslash-newline tests with "#if 0", to make it less likely that
16642 we'll run into compiler bugs. Bring back solitary \ inside
16643 comment, but add a closing comment to work around HP C bug. Don't
16644 test backslash-newline in C character constant.
16646 2002-11-14 Akim Demaille <akim@epita.fr>
16648 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
16649 status of the compiler.
16650 Calling `exit 1' is no longer needed.
16651 Reported by Nelson H. F. Beebe.
16653 2002-11-14 Akim Demaille <akim@epita.fr>
16655 * tests/atlocal.in (CPPFLAGS): We have config.h.
16656 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
16658 * tests/actions.at, tests/calc.at, tests/conflicts.at,
16659 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
16660 * tests/regression.at, tests/torture.at: Use them for all the
16661 grammars that are to be compiled.
16662 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
16663 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
16664 * doc/bison.texinfo (GLR Parsers): Document `inline'.
16666 2002-11-14 Akim Demaille <akim@epita.fr>
16668 * doc/bison.texinfo: Various formatting changes (alignments in
16669 samples, additional @group/@end group, GCS in samples.
16670 Use @deffn instead of simple @table to define the directives,
16671 macros, variables etc.
16673 2002-11-13 Paul Eggert <eggert@twinsun.com>
16675 Fix some bugs reported by Albert Chin-A-Young in
16676 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
16678 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
16679 -o c"; the HP C compiler chatters during compilation.
16680 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
16681 * tests/headers.at (export YYLTYPE): Likewise.
16683 * tests/input.at (Torturing the Scanner): Remove lines containing
16684 solitary backslashes, as they tickle a bug in the HP C compiler.
16686 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
16687 comments, since they're not portable. Use GNU coding style.
16689 2002-11-13 Akim Demaille <akim@epita.fr>
16691 * data/yacc.c: Leave bigger chunks of quoted text.
16692 (YYDSYMPRINTF): New.
16693 Use it to report symbol activities.
16694 * data/glr.c (YYDSYMPRINTF): New.
16697 2002-11-12 Paul Eggert <eggert@twinsun.com>
16701 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
16702 (yyglrReduce): Return yyok, not 0.
16703 This should avoid the enumerated-type warnings reported
16704 by Nelson H. F. Beebe in
16705 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
16707 * lib/bbitset.h (BITSET_INLINE): Remove.
16708 * lib/bitset.h [! BITSET_INLINE]: Remove.
16709 (bitset_set, bitset_reset, bitset_test): Rename local vars
16710 to avoid shadowing warnings by GCC.
16712 * data/glr.c (inline): Remove #define. It's the user's
16713 responsibility to #define it away, just like 'const'.
16714 This fixes one of the bugs reported by Nelson H. F. Beebe in
16715 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
16717 * Makefile.maint (po-check): Scan .l and .y files instead of the
16718 .c and the .h files that they generate. This fixes the bug
16719 reported by Tim Van Holder in:
16720 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
16721 Look for N_ as well as for _. Try to avoid matching #define for
16723 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
16724 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
16725 * src/scan-gram.l: Revamp regular expressions so that " and '
16726 do not confuse xgettext.
16728 * src/struniq.h (struniq_new): Do not declare the return type
16729 to be 'const'; this violates the C standard.
16730 * src/struniq.c (struniq_new): Likewise.
16732 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
16734 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
16735 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
16738 2002-11-12 Akim Demaille <akim@epita.fr>
16740 * Makefile.maint: Sync with Autoconf:
16741 (local_updates): New.
16743 2002-11-12 Akim Demaille <akim@epita.fr>
16745 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
16747 2002-11-12 Akim Demaille <akim@epita.fr>
16749 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
16752 2002-11-12 Akim Demaille <akim@epita.fr>
16754 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
16757 2002-11-12 Akim Demaille <akim@epita.fr>
16759 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
16760 Use it to test the GLR parser.
16762 2002-11-12 Akim Demaille <akim@epita.fr>
16764 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
16766 * data/glr.c (yystos): New.
16767 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
16768 (YYDSYMPRINT): New.
16769 (yyval): Don't define it, it is handled via M4.
16770 (yyrecoverParseError): Free verbosely the discarded symbols.
16771 * data/yacc.c (yysymprint): Remove, rather...
16772 (b4_yysymprint_generate): invoke.
16773 * data/c.m4 (b4_yysymprint_generate): New.
16774 Accept pointers as arguments, as opposed to the version from
16776 (b4_yydestruct_generate): Likewise.
16777 * tests/cations.at (Printers and Destructors): Use Bison directives
16778 instead of CPP macros.
16779 Don't rely on internal details.
16781 2002-11-12 Akim Demaille <akim@epita.fr>
16783 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
16784 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
16785 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
16786 it against YYEMPTY and so forth), work on yytoken (i.e., set
16787 it to YYEMPTY etc.).
16788 (yydestruct): Replace with a b4_yydestruct_generate invocation.
16789 (b4_symbol_actions): Remove.
16790 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
16791 for 0, end-of-input.
16793 2002-11-12 Akim Demaille <akim@epita.fr>
16795 * doc/bison.texinfo (Destructor Decl): New.
16797 2002-11-12 Akim Demaille <akim@epita.fr>
16799 * src/tables.c (tables_generate): Use free for pointers that
16800 cannot be NULL, not XFREE.
16801 (pack_vector): Use assert, not fatal, for bound violations.
16802 * src/state.c (state_new): Likewise.
16803 * src/reader.c (reader): Likewise.
16804 * src/lalr.c (set_goto_map): Likewise.
16805 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
16808 2002-11-12 Akim Demaille <akim@epita.fr>
16810 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
16812 * src/scan-gram.l (last_string): Is global to the file, not to
16814 * src/parse-gram.y (input): Don't append the epilogue here,
16815 (epilogue.opt): do it here, and free the scanner's obstack.
16816 * src/reader.c (epilogue_set): Rename as...
16817 (epilogue_augment): this.
16818 * data/c.m4 (b4_epilogue): Defaults to empty.
16820 2002-11-12 Akim Demaille <akim@epita.fr>
16822 * src/getargs.c (long_options): Remove duplicates.
16823 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
16825 * doc/bison.rnh: Remove.
16826 * doc/bison.texinfo (VMS Invocation): Remove.
16828 2002-11-12 Akim Demaille <akim@epita.fr>
16830 * src/struniq.h, src/struniq.c (struniq_t): Is const.
16831 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
16833 Use struniq for symbols.
16835 * src/symtab.h (symbol_t): The tag member is a struniq.
16836 (symbol_type_set): Adjust.
16837 * src/symtab.c (symbol_new): Takes a struniq.
16838 (symbol_free): Don't free the tag member.
16839 (hash_compare_symbol_t, hash_symbol_t): Rename as...
16840 (hash_compare_symbol, hash_symbol): these.
16841 Use the fact that tags as struniqs.
16842 (symbol_get): Use struniq_new.
16843 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
16845 * src/reader.h (merger_list, grammar_currentmerge_set): The name
16846 and type members are struniqs.
16847 * src/reader.c (get_merge_function)
16848 (grammar_current_rule_merge_set): Adjust.
16849 (TYPE, current_type): Are struniq.
16851 Use struniq for file names.
16853 * src/files.h, src/files.c (infile): Split into...
16854 (grammar_file, current_file): these.
16855 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
16856 * src/reduce.c (reduce_print): Likewise.
16857 * src/getargs.c (getargs): Likewise.
16858 * src/complain.h, src/complain.c: Likewise.
16859 * src/main.c (main): Call struniqs_new early enough to use it for
16861 Don't free the input file name.
16863 2002-11-12 Akim Demaille <akim@epita.fr>
16865 * src/symtab.c (symbol_free): Remove dead deactivated code:
16866 type_name are properly removed.
16867 Don't use XFREE to free items that cannot be NULL.
16868 * src/struniq.h, src/struniq.c: New.
16869 * src/main.c (main): Initialize/free struniqs.
16870 * src/parse-gram.y (%union): Add astruniq member.
16872 * src/scan-gram.l (<{tag}>): Return a struniq.
16873 Free the obstack bit that used to store it.
16874 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
16876 2002-11-11 Paul Eggert <eggert@twinsun.com>
16878 Revamp to fix many (but not all) of the C- and M4-related quoting
16879 problems. Among other things, this fixes the Bison bug reported
16880 by Jan Hubicka when processing the Bash grammar; see:
16881 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
16883 Use new @ escapes consistently. Represent brackets with @{ and @}
16884 rather than @<:@ and @:>@, since this works a bit better with dumb
16885 editors like vi. Represent @ with @@, since @ is now consistently
16886 an escape. Use @oline@ and @ofile@ rather than __oline__ and
16887 __ofile__, to avoid unexpected expansions. Similarly, use @output
16888 rather than #output.
16890 * data/c.m4 (b4_copyright): Omit file name from comment, since
16891 the file name could contain "*/".
16892 (b4_synclines_flag): Don't quote the 2nd argument; it should already
16893 be quoted. All uses changed.
16895 * data/glr.c: Use new @ escapes consistently.
16896 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
16897 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
16898 Remove, since they couldn't handle arbitrary characters in file
16900 * data/lalr1.cc: Likewise.
16901 * data/yacc.c: Likewise.
16903 * src/files.c (output_infix): Remove; all uses removed.
16904 * src/files.h: Likewise.
16906 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
16907 mishandled funny characters in file names, and anyway it isn't
16909 * data/yacc.c: Likewise.
16910 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
16912 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
16913 * data/yacc.c: Likewise.
16915 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
16917 (muscle_init): Quote filename as a C string.
16918 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
16919 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
16920 * src/output.c (escaped_file_name_output): New function.
16921 (prepare_symbols): Quote tokens for M4.
16922 (prepare): Don't insert output_infix, output_prefix,
16923 output_parser_name, output_header_name; this is now down by scan-skel.
16924 Insert skeleton as a C string.
16926 * src/output.c (user_actions_output, symbol_destructors_output,
16927 symbol_printers_output): Quote filenames for C and M4.
16928 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16930 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
16931 escapes other than \\ and \'; this simplifies the code.
16932 (<SC_STRING>): Likewise, for \\ and \".
16933 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
16934 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
16935 Use new escapes @{ and @} for [ and ].
16937 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
16938 them with auto vars.
16939 Switch to new escape scheme, where @ is the escape character uniformly.
16940 Abort if a stray escape character is found. Avoid unbounded input
16941 buffer when parsing non-escaped text.
16943 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
16944 __oline__, #output, $@, and @{ do not have unintended meanings.
16946 2002-11-09 Paul Eggert <eggert@twinsun.com>
16948 Fix the test failure due to GCC warnings described in
16949 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
16950 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
16951 evaluate to 0 if it's impossible for NINF to be in the respective
16953 (yygetLRActions, yyrecoverParseError): Use them.
16955 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
16956 counted in the token inserted at end of file. Now takes
16957 location_t *, not location_t, so that the location can be
16958 adjusted. All uses changed.
16960 * tests/regression.at (Invalid inputs): Adjust wording in
16961 diagnostic to match the new behavior.
16963 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
16964 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
16965 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
16966 abort ();'. This reduces the runtime of the "Many lookaheads"
16967 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
16970 2002-11-07 Paul Eggert <eggert@twinsun.com>
16972 * src/parse-gram.y (CHARACTER): Remove unused token.
16975 * src/scan-gram.l: Remove stack option. We no longer use the
16976 stack, since the stack was never deeper than 1; instead, use the
16977 new auto var c_context to record the stacked value.
16979 Remove nounput option. At an unexpected end of file, we now unput
16980 the minimal input necessary to end cleanly; this simplifies the
16983 Avoid unbounded token sizes where this is easy.
16985 (unexpected_end_of_file): New function.
16986 Use it to systematize the error message on unexpected EOF.
16987 (last-string): Now auto, not static.
16988 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
16989 (scanner_last_string_free): Remove; not used.
16990 (percent_percent_count): Move decl to just before use.
16991 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
16992 not the (never otherwised-used) CHARACTER.
16994 2002-11-07 Akim Demaille <akim@epita.fr>
16996 Let yyerror always receive the msg as last argument, so that
16997 yyerror can be variadic.
16999 * data/yacc.c (b4_yyerror_args): New.
17000 Use it when calling yyerror.
17001 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
17002 Use it when calling yyerror.
17003 * doc/bison.texinfo (Error Reporting): Adjust.
17004 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
17005 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
17007 2002-11-06 Akim Demaille <akim@epita.fr>
17009 #line should have quoted strings.
17010 Ideally, this should be done by m4_quotearg.
17012 * src/scan-skel.l: Include quotearg.h.
17014 * src/output.c (symbol_printers_output)
17015 (symbol_destructors_output): Quote the file name.
17017 2002-11-06 Akim Demaille <akim@epita.fr>
17019 * tests/regression.at (Invalid inputs): Adjust to the recent
17022 2002-11-06 Akim Demaille <akim@epita.fr>
17024 Restore --no-lines.
17025 Reported by Jim Kent.
17027 * data/c.m4 (b4_syncline): New.
17028 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
17029 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
17030 * src/output.c (user_actions_output): Likewise.
17031 (prepare): Define 'b4_synclines_flag'.
17032 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
17034 2002-11-06 Akim Demaille <akim@epita.fr>
17036 * src/main.c (main): Free `infile'.
17037 * src/scan-gram.l (handle_syncline): New.
17039 * src/output.c (user_actions_output, symbol_destructors_output)
17040 (symbol_printers_output): Use the location's file name, not
17042 * src/reader.c (prologue_augment, epilogue_set): Likewise.
17044 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17046 * src/tables.c (matching_state): Don't allow states to match if
17047 either has GLR conflict entries.
17049 2002-11-05 Paul Eggert <eggert@twinsun.com>
17051 * src/scan-gram.l: Use more accurate diagnostics, e.g.
17052 "integer out of range" rather than "invalid value".
17053 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
17056 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
17057 Also, remove one static variable in the scanner.
17059 * src/scan-gram.l (braces_level): Now auto, not static.
17060 Initialize to zero if the compiler is being picky.
17061 (INITIAL): Clear braces_level instead of incrementing it.
17062 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
17063 as POSIX 1003.1-2001 requires.
17064 * src/system.h (IF_LINT): New macro, taken from coreutils.
17065 * configure.ac: Define "lint" if --enable-gcc-warnings.
17067 2002-11-05 Akim Demaille <akim@epita.fr>
17069 * src/scan-gram.l: When it starts with `%', complain about the
17070 whole directive, not just that `invalid character: %'.
17072 2002-11-04 Akim Demaille <akim@epita.fr>
17074 * Makefile.maint: Update from Autoconf.
17075 (update, cvs-update, po-update, do-po-update): New.
17077 2002-11-04 Akim Demaille <akim@epita.fr>
17079 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
17081 Have yyerror `use' its arguments.
17082 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
17083 returns true when location & yacc & pure & parse-param.
17084 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
17086 2002-11-04 Akim Demaille <akim@epita.fr>
17088 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
17090 * src/scan-gram.l: Use [\'] instead of ['] to pacify
17093 Use quote, not quote_n since LOCATION_PRINT no longer uses the
17096 2002-11-03 Paul Eggert <eggert@twinsun.com>
17098 * src/reader.c (get_merge_function, grammar_current_rule_check):
17099 Use consistent diagnostics for reporting type name clashes.
17100 Quote the types with <>, for consistency with Yacc.
17101 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
17103 2002-11-03 Akim Demaille <akim@epita.fr>
17105 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
17107 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
17108 (b4_parse_param): Remove.
17109 Use b4_identification.
17110 Propagate b4_pure_args where needed to pass them to yyerror.
17111 * data/glr.m4 (b4_parse_param): Remove.
17112 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
17113 (b4_lpure_formals): New.
17114 Use b4_identification.
17115 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
17116 b4_user_formals and b4_user_args.
17117 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
17118 (yyreportAmbiguity): When using a pure parser, also need
17119 the location, and the parse-params.
17121 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
17122 When using a pure parser, also need the parse-params.
17124 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
17125 (%pure-parser + %parse-param) LALR and GLR parsers.
17126 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
17127 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
17128 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
17129 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
17130 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
17131 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
17132 * doc/bison.texinfo: Untabify the whole file.
17133 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
17134 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
17135 (Error Reporting): Adjust to these new directives.
17136 Document %error-verbose, deprecate YYERROR_VERBOSE.
17138 2002-11-03 Akim Demaille <akim@epita.fr>
17140 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
17141 AT_CHECK_CALC_GLR invocations to use % directives, instead of
17142 command line options.
17143 * tests/cxx-type.at: Formatting changes.
17145 2002-11-03 Paul Eggert <eggert@twinsun.com>
17147 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
17148 to count columns correctly, and to check for invalid inputs.
17150 Use mbsnwidth to count columns correctly. Account for tabs, too.
17151 Include mbswidth.h.
17152 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
17153 (extend_location): New function.
17154 (YY_LINES): Remove.
17156 Handle CRLF in C code rather than in Lex code.
17157 (YY_INPUT): New macro.
17158 (no_cr_read): New function.
17160 Scan UCNs, even though we don't fully handle them yet.
17161 (convert_ucn_to_byte): New function.
17163 Handle backslash-newline correctly in C code.
17164 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
17165 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
17167 (tag, splice): New EREs. Do not allow NUL or newline in tags.
17168 Use {splice} wherever C allows backslash-newline.
17169 YY_STEP after space, newline, vertical-tab.
17170 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
17172 (letter, id): Don't assume ASCII; e.g., spell out a-z.
17174 ({int}, handle_action_dollar, handle_action_at): Check for integer
17177 (YY_STEP): Omit trailing semicolon, so that it's more like C.
17179 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
17180 as well as \000. Check for UCHAR_MAX, not 255.
17181 Allow \x with an arbitrary positive number of digits, as in C.
17182 Check for overflow here.
17183 Allow \? and UCNs, for compatibility with C.
17185 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
17186 with quote slot used by complain_at.
17188 * tests/input.at: Add tests for backslash-newline, m4 quotes
17189 in symbols, long literals, and funny escapes in strings.
17191 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
17192 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
17193 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
17194 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
17195 * m4/mbswidth.m4: New file, from GNU coreutils.
17197 * doc/bison.texinfo (Grammar Outline): Document // comments.
17198 (Symbols): Document that trigraphs have no special meaning in Bison,
17199 nor is backslash-newline allowed.
17200 (Actions): Document that trigraphs have no special meaning.
17202 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
17205 2002-11-02 Paul Eggert <eggert@twinsun.com>
17207 * src/reader.c: Don't include quote.h; not needed.
17208 (get_merge_function): Reword warning to be consistent with
17209 type clash diagnostic in grammar_current_rule_check.
17211 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
17212 bug in trigraph handling.
17214 * src/output.c (prepare_symbols): When printing token names,
17215 escape "[" as "@<:@" and likewise for "]".
17217 * src/system.h (errno): Remove declaration, as we are now
17218 assuming C89 or better, and C89 guarantees errno.
17220 2002-10-30 Paul Eggert <eggert@twinsun.com>
17222 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
17223 Check for close failures.
17224 * src/files.h (xfclose): Return void, not int, since it always
17226 * src/files.c (xfclose): Likewise. Report I/O error if ferror
17228 * src/output.c (output_skeleton): Use xfclose rather than fclose
17229 and ferror. xfclose now checks ferror.
17231 * data/glr.c (YYLEFTMOST_STATE): Remove.
17232 (yyreportTree): Use a stack-based leftmost state. This avoids
17233 our continuing battles with bogus warnings about initializers.
17235 2002-10-30 Akim Demaille <akim@epita.fr>
17237 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
17240 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17242 * tests/glr-regr1.at: New test for reported regressions.
17243 * tests/testsuite.at: Add glr-regr1.at test.
17244 * tests/Makefile.am: Add glr-regr1.at test.
17246 2002-10-24 Paul Eggert <eggert@twinsun.com>
17250 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
17251 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
17252 we use malloc. Don't assume 'A' through 'Z' are contiguous.
17253 Don't assume strdup exists; POSIX says its an XSI extension.
17254 Check for buffer overflow on input.
17256 2002-10-24 Akim Demaille <akim@epita.fr>
17258 * src/output.c (output_skeleton): Don't disable M4sugar comments
17259 too soon: it results in comments being expanded.
17260 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
17263 2002-10-24 Akim Demaille <akim@epita.fr>
17265 * data/yacc.c (m4_int_type): New.
17266 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
17267 char' as only yacc.c wants K&R portability.
17268 * data/glr.c (yysigned_char): Remove.
17269 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
17270 Reported by Quoc Peyrot.
17272 2002-10-23 Paul Eggert <eggert@twinsun.com>
17274 * src/main.c (main): With --trace=time, report times even if a
17275 non-fatal error occurs. Formerly, the times were reported in some
17276 such cases but not in others.
17277 * src/reader.c (reader): Just return if a complaint has been issued,
17278 instead of exiting, so that 'main' can report times.
17280 2002-10-22 Akim Demaille <akim@epita.fr>
17282 * src/system.h: Include sys/types.
17283 Reported by Bert Deknuydt.
17285 2002-10-23 Paul Eggert <eggert@twinsun.com>
17287 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
17288 Suggested by Art Haas.
17290 2002-10-22 Paul Eggert <eggert@twinsun.com>
17292 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
17293 decl; not needed any more.
17294 * src/main.c (main): Use return to exit, undoing yesterday's change.
17295 The last OS that we could find where this wouldn't work is
17296 SunOS 3.5, and that's too old to worry about now.
17298 * data/glr.c (struct yyltype): Define members even when not
17299 doing locations. This is more consistent with yacc.c, and it
17300 works around the following bug reports:
17301 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
17302 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
17304 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
17305 @acronym consistently. Standardize on "Yacc" instead of "YACC",
17306 "Algol" instead of "ALGOL". Give a bit more history about BNF.
17308 2002-10-22 Akim Demaille <akim@epita.fr>
17310 * data/README: New.
17312 2002-10-21 Paul Eggert <eggert@twinsun.com>
17314 Be consistent about 'bool'; the old code used an enum in one
17315 module and an int in another, and this violates the C standard.
17316 * m4/stdbool.m4: New file, from coreutils 4.5.3.
17317 * configure.ac (AC_HEADER_STDBOOL): Add.
17318 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
17319 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
17320 * src/symtab.c (hash_compare_symbol_t): Likewise.
17321 * src/system.h (bool, false, true): Use a definition consistent
17322 with ../lib/hash.c. All uses changed.
17324 * src/complain.c (warning_issued): Renamed from warn_message_count,
17325 so that we needn't worry about integer overflow (!).
17326 Now of type bool. All uses changed.
17327 (complaint_issued): Renamed from complain_message_count; likewise.
17329 * src/main.c (main): Use exit to exit with failure.
17331 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
17332 rather than 1 and 0.
17333 * src/main.c (main): Likewise.
17334 * src/getargs.c (getargs): Likewise.
17335 * src/reader.c (reader): Likewise.
17337 * src/getarg.c (getargs): Remove duplicate code for
17338 "Try `bison --help'".
17340 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
17341 What was that "2" for?
17343 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
17344 * src/getargs.c (usage): Likewise.
17346 * src/getargs.c (getargs): When there are too few operands, report
17347 the last one. When there are too many, report the first extra
17348 one. This is how diffutils does it.
17350 2002-10-20 Paul Eggert <eggert@twinsun.com>
17352 Remove K&R vestiges.
17353 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
17354 * src/complain.c (VA_START): Remove. Assume prototypes.
17355 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
17356 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
17357 fatal): Assume prototypes.
17358 * src/complain.h: Assume prototypes.
17359 * src/system.h (PARAMS): Remove.
17360 Include <limits.h> unconditionally, since it's guaranteeed even
17361 for a freestanding C89 compiler.
17362 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
17363 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
17365 2002-10-20 Akim Demaille <akim@epita.fr>
17367 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
17368 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
17369 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
17370 (yyresolveStates, yyresolveAction, yyresolveStack)
17371 (yyprocessOneStack): Use them.
17372 (yy_reduce_print): New.
17373 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
17375 2002-10-20 Akim Demaille <akim@epita.fr>
17377 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
17378 arguments and output `void'.
17379 (b4_c_function): Rename as...
17380 (b4_c_function_def): this.
17381 (b4_c_function_decl, b4_c_ansi_function_def)
17382 (b4_c_ansi_function_decl): New.
17383 Change the interpretation of the arguments: before `int, foo', now
17385 * data/yacc.c (yyparse): Prototype and define thanks to these.
17386 Adjust b4_c_function_def uses.
17387 * data/glr.c (yyparse): Likewise, but ANSI only.
17389 2002-10-20 Akim Demaille <akim@epita.fr>
17391 * src/output.c (prepare): Move the definition of `tokens_number',
17392 `nterms_number', `undef_token_number', `user_token_number_max'
17394 (prepare_tokens): Here.
17395 (prepare_tokens): Rename as...
17396 (prepare_symbols): this.
17397 (prepare): Move the definition of `rules_number' to...
17398 (prepare_rules): here.
17399 (prepare): Move the definition of `last', `final_state_number',
17400 `states_number' to...
17401 (prepare_states): here.
17402 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
17404 2002-10-20 Akim Demaille <akim@epita.fr>
17406 * src/tables.h, src/tables.c, src/output.c: Comment changes.
17408 2002-10-20 Akim Demaille <akim@epita.fr>
17410 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
17413 2002-10-20 Akim Demaille <akim@epita.fr>
17415 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
17416 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
17418 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
17420 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
17421 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
17424 2002-10-19 Paul Eggert <eggert@twinsun.com>
17426 Do not create a temporary file, as that involves security and
17427 cleanup headaches. Instead, use a pair of pipes.
17428 Derived from a suggestion by Florian Krohm.
17429 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
17430 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
17431 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
17432 (BISON_PREREQ_SUBPIPE): Add.
17433 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
17434 Add subpipe.h, subpipe.c.
17435 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
17436 * po/POTFILES.in: Add lib/subpipe.c.
17437 * src/output.c: Include "subpipe.h".
17438 (m4_invoke): Remove decl.
17439 (scan_skel): New decl.
17440 (output_skeleton): Use pipe rather than temporary file for m4 input.
17441 Check that m4sugar.m4 is readable, to avoid deadlock.
17442 Check for pipe I/O error.
17443 * src/scan-skel.l (readpipe): Remove decl.
17444 (scan_skel): New function, to be used in place of m4_invoke.
17445 Read from stream rather than file.
17447 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
17448 float, as this generates a warning on Solaris 8 + GCC 3.2 with
17449 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
17450 this generates a more-accurate value anyway.
17452 * lib/timevar.c (timervar_accumulate): Rename locals to
17453 avoid confusion with similarly-named more-global.
17454 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
17456 * src/output.c (prepare): Use xstrdup to convert char const *
17457 to char *, to avoid GCC warning.
17459 2002-10-19 Akim Demaille <akim@epita.fr>
17461 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
17462 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
17463 Use them to have `calc.y' ready for %pure-parser.
17464 * data/yacc.c (YYLEX): Pass a yylex return type to
17465 b4_c_function_call.
17467 2002-10-19 Akim Demaille <akim@epita.fr>
17469 Prototype support of %lex-param and %parse-param.
17471 * src/parse-gram.y: Add the definition of the %lex-param and
17472 %parse-param tokens, plus their rules.
17473 Drop the `_' version of %glr-parser.
17475 * src/scan-gram.l (INITIAL): Scan them.
17476 * src/muscle_tab.c: Comment changes.
17477 (muscle_insert, muscle_find): Rename `pair' as `probe'.
17478 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
17479 (muscle_entry_s): The `value' member is no longer const.
17480 Adjust all dependencies.
17481 * src/muscle_tab.c (muscle_init): Adjust: use
17482 MUSCLE_INSERT_STRING.
17483 Initialize the obstack earlier.
17484 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
17485 (muscle_pair_list_grow): New.
17486 * data/c.m4 (b4_c_function_call, b4_c_args): New.
17487 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
17488 * tests/calc.at: Use %locations, not --locations.
17489 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
17491 2002-10-19 Akim Demaille <akim@epita.fr>
17493 * src/getargs.c (usage): Take status as argument and exit
17495 Report the traditional `Try ... --help' message when status != 0.
17496 (usage, version): Don't take a FILE * as arg, it is pointless.
17497 (getargs): When there is an incorrect number of arguments, make it
17498 an error, and report it GNUlically thanks to `usage ()'.
17500 2002-10-18 Paul Eggert <eggert@twinsun.com>
17502 * data/glr.c (yyreportParseError): Don't assume that sprintf
17503 yields the length of the printed string, as this is not true
17504 on SunOS 4.1.4. Reported by Peter Klein.
17506 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
17507 * tests/conflicts.at (%nonassoc and eof): Likewise.
17508 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
17510 2002-10-17 Akim Demaille <akim@epita.fr>
17512 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
17513 * src/getargs.c (trace_types, trace_args): Adjust.
17514 * src/reader.c (grammar_current_rule_prec_set)
17515 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
17516 Standardize error messages.
17517 And s/@prec/%prec/!
17518 (reader): Use trace_flag to enable scanner/parser debugging,
17519 instead of an adhoc scheme.
17520 * src/scan-gram.l: Remove trailing debugging code.
17522 2002-10-16 Paul Eggert <eggert@twinsun.com>
17524 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
17527 * NEWS: Officially drop support for building Bison with K&R C,
17528 since it didn't work anyway and it's not worth worrying about.
17529 * Makefile.maint (wget_files): Remove ansi2knr.c.
17530 (ansi2knr.c-url_prefix): Remove.
17531 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
17532 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17533 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17535 2002-10-15 Paul Eggert <eggert@twinsun.com>
17537 Stop using the "enum_" trick for K&R-style function definitions;
17538 it confused me, and I was the author! Instead, assume that people
17539 who want to use K&R C compilers (when using these modules in GCC,
17540 perhaps?) will run ansi2knr.
17542 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
17543 All uses of "enum_" changed to "enum ".
17544 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17545 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17547 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
17548 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
17549 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
17550 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
17551 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
17552 abitset_not, abitset_ones, abitset_or, abitset_or_and,
17553 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
17554 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
17555 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
17556 Use function prototypes; this removes the need for declaring
17557 static functions simply to provide their prototypes.
17558 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
17559 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
17560 bitset_count_, bitset_create, bitset_dump, bitset_first,
17561 bitset_free, bitset_init, bitset_last, bitset_next,
17562 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
17563 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
17564 bitset_print, bitset_release_memory, bitset_toggle_,
17565 bitset_type_choose, bitset_type_get, bitset_type_name_get,
17566 debug_bitset): Likewise.
17567 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
17568 * lib/bitset_stats.c (bitset_log_histogram_print,
17569 bitset_percent_histogram_print, bitset_stats_and,
17570 bitset_stats_and_cmp, bitset_stats_and_or,
17571 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
17572 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
17573 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
17574 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
17575 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
17576 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
17577 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
17578 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
17579 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
17580 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
17581 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
17582 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
17583 bitset_stats_zero): Likewise.
17584 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17585 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17586 bitsetv_dump, debug_bitsetv): Likewise.
17587 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
17588 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
17589 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
17590 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
17591 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
17592 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
17593 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
17594 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
17595 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
17596 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
17597 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
17599 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
17600 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
17601 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
17602 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
17603 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
17604 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
17605 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
17606 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
17607 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
17608 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
17609 lbitset_xor_cmp, lbitset_zero): Likewise.
17611 2002-10-14 Akim Demaille <akim@epita.fr>
17615 2002-10-14 Akim Demaille <akim@epita.fr>
17617 * tests/Makefile.am (maintainer-check-posix): New.
17619 2002-10-14 Akim Demaille <akim@epita.fr>
17621 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
17624 2002-10-14 Akim Demaille <akim@epita.fr>
17626 * src/tables.c (table_ninf_remap): base -> tab.
17627 Reported by Matt Rosing.
17629 2002-10-14 Paul Eggert <eggert@twinsun.com>
17631 * tests/action.at, tests/calc.at, tests/conflicts.at,
17632 tests/cxx-type.at, tests/headers.at, tests/input.at,
17633 tests/regression.at, tests/synclines.at, tests/torture.at:
17634 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
17635 so that the tests still work even if POSIXLY_CORRECT is set.
17636 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
17638 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
17639 for portability to K&R hosts. Fix typo: signed char is guaranteed
17640 only to 127, not to 128.
17641 * data/glr.c (yysigned_char): New type.
17642 * data/yacc.c (yysigned_char): Likewise.
17643 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
17645 2002-10-13 Paul Eggert <eggert@twinsun.com>
17647 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
17648 true due to limited range of data type" warning from GCC.
17650 * data/c.m4 (b4_token_defines): Protect against double-inclusion
17651 by wrapping enum yytokentype's definition inside #ifndef
17652 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
17654 2002-10-13 Akim Demaille <akim@epita.fr>
17656 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
17657 Un yy- yyrhs to avoid the name clash with the global YYRHS.
17659 2002-10-13 Akim Demaille <akim@epita.fr>
17661 * Makefile.maint: Update from Autoconf 2.54.
17662 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
17664 2002-10-13 Akim Demaille <akim@epita.fr>
17666 * src/print.c (print_state): Separate the list of solved conflicts
17667 from the other items.
17668 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
17670 2002-10-13 Akim Demaille <akim@epita.fr>
17672 Let nondeterministic skeletons be usable with deterministic
17675 With the patch, GAWK compiled by GCC without -O2 passes its test
17676 suite using a GLR parser driven by LALR tables. It fails with -O2
17677 because `struct stat' gives two different answers on my machine:
17678 88 (definition of an auto var) and later 96 (memset on this var).
17679 Hence the stack is badly corrumpted. The headers inclusion is to
17680 blame: if I move the awk.h inclusion before GLR's system header
17681 inclusion, the two struct stat have the same size.
17683 * src/tables.c (pack_table): Always create conflict_table.
17684 (token_actions): Always create conflict_list.
17685 * data/glr.c (YYFLAG): Remove, unused.
17687 2002-10-13 Akim Demaille <akim@epita.fr>
17689 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
17691 (VALGRIND, GXX): New.
17692 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
17693 * tests/bison.in: Run $PREBISON a pre-command.
17694 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
17695 (maintainer-check-g++): New.
17696 * Makefile.am (maintainer-check): New.
17698 2002-10-13 Akim Demaille <akim@epita.fr>
17700 * data/glr.c: Formatting changes.
17701 Tweak some trace messages to match yacc.c's.
17703 2002-10-13 Akim Demaille <akim@epita.fr>
17705 GLR parsers sometimes raise parse errors instead of performing the
17707 Reported by Charles-Henry de Boysson.
17709 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
17710 check the length of the traces when %glr.
17711 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
17713 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
17715 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
17716 (yyltype): Remove the yy prefix from the member names.
17717 (yytable): Complete its comment.
17718 (yygetLRActions): Map error action number from YYTABLE from
17720 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
17721 (which was a bug: it should have been YYTABEL_NINF, and yet it was
17722 not satisfying as we could compare an YYACTION computed from
17723 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
17724 only value for error actions.
17725 (yyreportParseError): In verbose parse error messages, don't issue
17726 `error' in the list of expected tokens.
17727 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
17728 next action to perform to match glr.c's decoding.
17729 (yytable): Complete its comment.
17731 2002-10-13 Paul Eggert <eggert@twinsun.com>
17733 Fix problem reported by Henrik Grubbstroem in
17734 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
17735 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
17736 because the Bison parser reads the second action before reducing
17738 * src/scan-gram.l (rule_length): New static var.
17739 Use it to keep track of the rule length in the scanner, since
17740 we can't expect the parser to be in lock-step sync with the scanner.
17741 (handle_action_dollar, handle_action_at): Use this var.
17742 * tests/actions.at (Exotic Dollars): Test for the problem.
17744 2002-10-12 Paul Eggert <eggert@twinsun.com>
17746 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
17747 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
17748 Include <sys/time.h> when checking for clock_t and struct tms.
17749 Use same include order as source.
17750 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
17751 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
17753 * lib/timevar.c: Update copyright date and clarify comments.
17754 (get_time) [IN_GCC]: Keep the GCC version for reference.
17756 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
17757 GCC version as of today, then merge Bison's changes.
17758 Change "GCC" to "Bison" in copyright notice. timevar.def's
17759 author is Akim, so change that too.
17761 * src/reader.c (grammar_current_rule_check):
17762 Don't worry about the default action if $$ is untyped.
17763 Prevents bogus warnings reported by Jim Gifford in
17764 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
17766 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
17767 * data/glr.c, data/lalr1.cc, data/yacc.c:
17768 Output token definitions before the first part of user declarations.
17769 Fixes compatibility problem reported by Jim Gifford for kbd in
17770 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
17772 2002-10-11 Paul Eggert <eggert@twinsun.com>
17774 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
17775 (yyparse): here. This undoes some of the 2002-07-25 change.
17776 Compatibility problem reported by Ralf S. Engelschall with
17777 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
17779 2002-10-11 Akim Demaille <akim@epita.fr>
17781 * tests/regression.at Characters Escapes): New.
17782 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
17784 Reported by Jan Nieuwenhuizen.
17786 2002-10-11 Akim Demaille <akim@epita.fr>
17790 2002-10-10 Paul Eggert <eggert@twinsun.com>
17792 Portability fixes for bitsets; this also avoids several GCC
17795 * lib/abitset.c: Include <stddef.h>, for offsetof.
17796 * lib/lbitset.c: Likewise.
17798 * lib/abitset.c (abitset_bytes): Return a size that is aligned
17799 properly for vectors of objects. Do not assume that adding a
17800 header size to a multiple of a word size yields a value that is
17801 properly aligned for the whole union.
17802 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17804 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
17805 unique names for structures.
17806 * lib/ebitset.c (ebitset_bytes): Likewise.
17807 * lib/lbitset.c (lbitset_bytes): Likewise.
17809 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
17810 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
17811 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
17812 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
17813 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
17814 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
17815 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
17816 to improve the type-checking that GCC can do.
17817 * lib/bitset.c (bitset_op4_cmp): Likewise.
17818 * lib/bitset_stats.c (bitset_stats_count,
17819 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
17820 bitset_stats_copy, bitset_stats_disjoint_p,
17821 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
17822 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
17823 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
17824 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
17825 bitset_stats_and_or_cmp, bitset_stats_andn_or,
17826 bitset_stats_andn_or_cmp, bitset_stats_or_and,
17827 bitset_stats_or_and_cmp): Likewise.
17828 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
17829 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
17830 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
17831 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
17833 * lib/abitset.h: Include bitset.h, not bbitset.h.
17834 * lib/ebitset.h: Likewise.
17835 * lib/lbitset.h: Likewise.
17837 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
17838 All instances of parameters of type enum bitset_opts are now of
17839 type enum_bitset_opts, to conform to the C Standard, and similarly
17840 for enum_bitset_type.
17841 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17842 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17844 Do not use "struct bitset_struct" to mean different things in
17845 different modules. Not only is this confusing, it violates
17846 the C Standard, which requires that structure types in different
17847 modules must be compatible if one is to be passed to the other.
17848 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
17849 All instances of "struct bitset_struct *" replaced with "bitset".
17850 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
17851 (union bitset_union, struct abitset_struct, struct ebitset_struct,
17852 struct lbitset_struct, struct bitset_stats_struct): New types.
17853 All uses of struct bitset_struct changed to union bitset_union,
17855 * lib/abitset.c (struct abitset_struct, abitset,
17856 struct bitset_struct): Remove.
17857 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
17858 struct bitset_struct): Remove.
17859 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
17860 bitset_struct): Remove.
17861 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
17864 Do not call a function of type T using a call that assumes the
17865 function is of a different type U. Standard C requires that a
17866 function must be called with a type that is compatible with its
17868 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17870 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17872 * lib/ebitset.c (PFV): Remove.
17873 * lib/lbitset.c (PFV): Likewise.
17874 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
17875 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
17877 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
17878 (ebitset_vtable): Use them.
17879 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
17880 lbitset_xor): New functions.
17881 (lbitset_vtable): Use them.
17883 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
17886 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
17888 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
17889 Use offsetof, for simplicity.
17891 2002-10-06 Paul Eggert <eggert@twinsun.com>
17893 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
17894 the same width as int. This reapplies a hunk of the 2002-08-12 patch
17895 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
17896 which was inadvertently undone by the 2002-09-30 patch.
17897 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
17898 the same width as int.
17900 2002-10-04 Paul Eggert <eggert@twinsun.com>
17904 * configure.ac (AC_INIT), NEWS: Increment version number.
17906 * doc/bison.texinfo: Minor spelling, grammar, and white space
17908 (Symbols): Mention that any negative value returned from yylex
17909 signifies end-of-input. Warn about negative chars. Mention
17910 the portable Standard C character set.
17912 The GNU coding standard says CFLAGS and YFLAGS are reserved
17913 for the installer to set.
17914 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
17915 * src/Makefile.am (AM_CFLAGS): Likewise.
17916 (AM_YFLAGS): Renamed from YFLAGS.
17918 Fix some MAX and MIN problems.
17919 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
17920 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
17921 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
17922 * src/reader.c (reader): Use it.
17924 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
17925 POSIX 1003.1-2001 has removed fgrep.
17927 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
17929 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
17930 interpreted as signed.
17931 * lib/ebitset.c (ebitset_list): Fix bug.
17933 2002-10-01 Paul Eggert <eggert@twinsun.com>
17935 More fixes for 64-bit hosts and large bitsets.
17937 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
17938 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
17939 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
17940 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
17941 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
17942 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
17943 bitset_count_): Likewise.
17944 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
17945 bitset_first, bitset_last): Likewise.
17946 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
17947 bitset_stats_list_reverse, bitset_stats_size,
17948 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
17950 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17951 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17952 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17953 bitsetv_reflexive_transitive_closure): Likewise.
17954 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
17955 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
17957 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
17960 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
17961 Use size_t, not unsigned int, to count bytes.
17962 * lib/abitset.h (abitset_bytes): Likewise.
17963 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
17965 * lib/bitset.h (bitset_bytes): Likewise.
17966 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
17967 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
17968 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17969 * lib/ebitset.c (ebitset_bytes): Likewise.
17970 * lib/ebitset.h (ebitset_bytes): Likewise.
17971 * lib/lbitset.c (lbitset_bytes): Likewise.
17972 * lib/lbitset.h (lbitset_bytes): Likewise.
17974 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
17975 abitset_subset_p, abitset_disjoint_p, abitset_and,
17976 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
17977 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
17978 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
17979 abitset_or_and, abitset_or_and_cmp):
17980 Use bitset_windex instead of unsigned int.
17981 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17982 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
17983 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
17984 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
17986 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
17988 * lib/bitset.c (bitset_print):
17989 Use proper printf formats for widths of integer types.
17990 * lib/bitset_stats.c (bitset_percent_histogram_print,
17991 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
17992 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17993 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17994 * lib/lbitset.c (lbitset_bytes): Likewise.
17996 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
17997 BITSET_SIZE_MAX): New macros.
17998 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
17999 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
18000 to BITSET_WINDEX_MAX.
18002 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
18003 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
18004 since we now return the bitset_bindex type (not int).
18006 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
18007 when computing sizes.
18008 * lib/ebitset.c (ebitset_elts_grow): Likewise.
18010 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
18011 and avoid cast to unsigned.
18013 2002-09-30 Akim Demaille <akim@epita.fr>
18015 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
18016 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
18017 Updates from Michael Hayes.
18019 2002-09-30 Art Haas <ahaas@neosoft.com>
18021 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
18023 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
18026 2002-09-27 Akim Demaille <akim@epita.fr>
18030 2002-09-27 Akim Demaille <akim@epita.fr>
18032 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
18033 (Because of AC_LIBSOURCE).
18035 2002-09-27 Akim Demaille <akim@epita.fr>
18037 Playing with Autoscan.
18039 * configure.ac: Remove the old LIBOBJ tweaks.
18040 (AC_REPLACE_FUNCS): Add strrchr and strtol.
18041 * lib/strrchr.c: New.
18042 * lib/strtol.c: New, from the Coreutils 4.5.1.
18044 2002-09-27 Akim Demaille <akim@epita.fr>
18046 Playing with Autoscan.
18048 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
18049 * lib/Makefile.am (libbison_a_SOURCES): No longer include
18050 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
18051 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
18054 2002-09-24 Akim Demaille <akim@epita.fr>
18056 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
18057 (Frequently Asked Questions, Parser Stack Overflow): New.
18059 2002-09-13 Akim Demaille <akim@epita.fr>
18061 Playing with autoscan.
18063 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
18064 * src/files.c (skeleton_find): Remove, unused.
18065 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
18066 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
18068 2002-09-13 Akim Demaille <akim@epita.fr>
18070 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
18071 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
18073 2002-09-13 Akim Demaille <akim@epita.fr>
18075 * configure.ac: Require 2.54.
18076 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
18077 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
18078 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
18079 Remove, provided by Autoconf macros.
18081 2002-09-12 Akim Demaille <akim@epita.fr>
18083 * m4/prereq.m4: Update, from Coreutils 4.5.1.
18085 2002-09-12 Akim Demaille <akim@epita.fr>
18087 * m4/prereq.m4: Update, from Fileutils 4.1.5.
18088 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
18089 Reported by Martin Mokrejs.
18091 2002-09-10 Akim Demaille <akim@epita.fr>
18093 * src/parse-gram.y: Associate a human readable string to each
18095 * tests/regression.at (Invalid inputs): Adjust.
18097 2002-09-10 Gary V. Vaughan <gary@gnu.org>
18099 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
18100 with an Autoconf-2.5x style configure.ac.
18102 2002-09-06 Paul Eggert <eggert@twinsun.com>
18104 * doc/bison.texinfo (Conditions): Make explicit that the GPL
18105 exception applies only to yacc.c. This is a modification of a
18106 patch originally suggested by Akim Demaille.
18108 2002-09-06 Akim Demaille <akim@epita.fr>
18110 * data/c.m4 (b4_copyright): Move the GPL exception comment from
18112 * data/yacc.c: here.
18114 * data/lalr1.cc (struct yyltype): Don't define it, since we use
18116 (b4_ltype): Default to yy::Location from location.hh.
18118 2002-09-04 Jim Meyering <jim@meyering.net>
18120 * data/yacc.c: Guard the declaration of yytoknum also with
18121 `#ifdef YYPRINT', so it is declared only when used.
18123 2002-09-04 Akim Demaille <akim@epita.fr>
18125 * configure.in: Rename as...
18126 * configure.ac: this.
18129 2002-09-04 Akim Demaille <akim@epita.fr>
18131 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
18132 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
18133 translate maintainer only messages.
18135 2002-08-12 Paul Eggert <eggert@twinsun.com>
18139 * Makefile.am (SUBDIRS): Remove intl.
18140 (DISTCLEANFILES): Remove.
18141 * NEWS: Mention that GNU M4 is now required. Clarify what is
18142 meant by "larger grammars". Mention the pt_BR translation.
18143 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
18144 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
18145 Bump version from 0.11.2 to 0.11.5.
18146 (BISON_PREREQ_STAGE): Remove.
18147 (AM_GNU_GETTEXT): Use external gettext.
18148 (AC_OUTPUT): Remove intl/Makefile.
18150 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
18152 * data/glr.c: Include string.h, for strlen.
18153 (yyreportParseError): Use size_t for yysize.
18154 (yy_yypstack): No longer nested inside yypstates, as nested
18155 functions are not portable. Do not assume size_t is the
18157 (yypstates): Do not assume that ptrdiff_t is the same width
18158 as int, and similarly for yyposn and YYINDEX.
18160 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
18162 * lib/Makefile.am (INCLUDES): Do not include from the intl
18163 directory, which has been removed.
18164 * src/Makefile.am (INCLUDES): Likewise.
18166 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
18167 (bitsets_sources, additional_bitsets_sources, timevars_sources):
18170 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
18171 * tests/Makefile.am (EXTRA_DIST): Likewise.
18173 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
18174 Do not assume that bitset_windex is the same width as unsigned.
18176 * lib/abitset.c (abitset_unused_clear): Do not assume that
18177 bitset_word is the same width as int.
18178 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
18179 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
18180 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
18181 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
18182 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
18184 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
18185 portability to one's complement hosts!).
18186 * lib/ebitset.c (ebitset_op1): Likewise.
18187 * lib/lbitset.c (lbitset_op1): Likewise.
18189 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
18190 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
18191 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
18192 Sync with fileutils.
18193 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
18194 lib/gettext.h: Sync with diffutils.
18196 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
18197 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
18199 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
18200 PROTOTYPES to check for prototypes, and "defined __STDC__" to
18203 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
18204 size_t; the old version tried to do this but casted improperly.
18205 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
18206 (bitset_test): Now returns int, not unsigned long.
18208 * lib/bitset_stats.c: Include "gettext.h".
18210 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
18211 name locals "index", as it generates unnecessary warnings on some
18212 hosts that have an "index" function.
18214 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
18215 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
18216 they need translation.
18217 * src/LR0.c (state_list_append, new_itemsets, get_state,
18218 append_states, generate_states): Likewise.
18219 * src/assoc.c (assoc_to_string): Likewise.
18220 * src/closure.c (print_closure, set_firsts, closure): Likewise.
18221 * src/gram.c (grammar_dump): Likewise.
18222 * src/injections.c (injections_compute): Likewise.
18223 * src/lalr.c (lookaheads_print): Likewise.
18224 * src/relation.c (relation_transpose): Likewise.
18225 * src/scan-gram.l: Likewise.
18226 * src/tables.c (table_grow, pack_vector): Likewise.
18228 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
18229 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
18230 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
18231 * m4/mbstate_t.m4: Sync with fileutils.
18232 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
18234 * po/LINGUAS: Add pt_BR.
18235 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
18236 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
18238 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
18240 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
18242 * src/complain.c (strerror_r): Remove decl; not needed.
18243 (strerror): Use same pattern as ../lib/error.c.
18245 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
18247 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
18249 * src/main.c (main): Cast result of bindtextdomain and textdomain
18250 to void, to avoid a GCC warning when --disable-nls is in effect.
18252 * src/scan-gram.l: Use strings rather than escapes when possible,
18253 to minimize the number of warnings from xgettext.
18254 (handle_action_dollar, handle_action_at): Don't use isdigit,
18255 as it mishandles negative chars and it may not work as expected
18256 outside the C locale.
18258 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
18259 this is a GCC extension and is not portable to other compilers.
18261 * src/system.h (alloca): Use same pattern as ../lib/error.c.
18262 Do not include <ctype.h>; no longer needed.
18263 Do not include <malloc.h>; no longer needed (and generates
18264 warnings on OpenBSD 3.0).
18266 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
18269 * tests/regression.at: Do not use 'cc -c input.c -o input';
18270 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
18272 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
18273 exit status as failure, not just exit status 1. Sun C exits
18274 with status 2 sometimes.
18276 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
18277 Use it for the two large tests.
18279 2002-08-02 Akim Demaille <akim@epita.fr>
18281 * src/conflicts.c (conflicts_output): Don't output rules never
18282 reduced here, since anyway that computation doesn't work.
18283 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
18284 (rule_useless_p, rule_never_reduced_p): New.
18285 (grammar_rules_partial_print): Use a filter instead of a range.
18286 Display the title only if needed.
18287 (grammar_rules_print): Adjust.
18288 (grammar_rules_never_reduced_report): New.
18289 * src/tables.c (action_row): Move the computation of rules never
18291 (token_actions): here.
18292 * src/main.c (main): Make the parser before making the report, so
18293 that rules never reduced are computed.
18294 Call grammar_rules_never_reduced_report.
18295 * src/print.c (print_results): Report rules never reduced.
18296 * tests/conflicts.at, tests/reduce.at: Adjust.
18298 2002-08-01 Akim Demaille <akim@epita.fr>
18300 Instead of attaching lookaheads and duplicating the rules being
18301 reduced by a state, attach the lookaheads to the reductions.
18303 * src/state.h (state_t): Remove the `lookaheads',
18304 `lookaheads_rule' member.
18305 (reductions_t): Add a `lookaheads' member.
18306 Use a regular array for the `rules'.
18307 * src/state.c (reductions_new): Initialize the lookaheads member
18309 (state_rule_lookaheads_print): Adjust.
18310 * src/state.h, src/state.c (state_reductions_find): New.
18311 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
18312 (count_rr_conflicts): Adjust.
18313 * src/lalr.c (LArule): Remove.
18314 (add_lookback_edge): Adjust.
18315 (state_lookaheads_count): New.
18316 (states_lookaheads_initialize): Merge into...
18317 (initialize_LA): this.
18318 (lalr_free): Adjust.
18319 * src/main.c (main): Don't free nullable and derives too early: it
18320 is used by --verbose.
18321 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
18323 2002-08-01 Akim Demaille <akim@epita.fr>
18325 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
18327 (set_derives, free_derives): Rename as...
18328 (derives_compute, derives_free): this.
18329 Adjust all dependencies.
18330 * src/nullable.c (set_nullable, free_nullable): Rename as...
18331 (nullable_compute, nullable_free): these.
18332 (rule_list_t): Store rule_t *, not rule_number_t.
18333 * src/state.c (state_rule_lookaheads_print): Directly compare rule
18334 pointers, instead of their numbers.
18335 * src/main.c (main): Call nullable_free, and derives_free earlier,
18336 as they were lo longer used.
18338 2002-08-01 Akim Demaille <akim@epita.fr>
18340 * lib/timevar.c (get_time): Include children time.
18341 * src/lalr.h (LA, LArule): Don't export them: used with the
18343 * src/lalr.c (LA, LArule): Static.
18344 * src/lalr.h, src/lalr.c (lalr_free): New.
18345 * src/main.c (main): Call it.
18346 * src/tables.c (pack_vector): Check whether loc is >= to the
18348 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
18349 (tables_generate): do it, since that's also it which allocates
18351 Don't free LA and LArule, main does.
18353 2002-07-31 Akim Demaille <akim@epita.fr>
18355 Separate parser tables computation and output.
18357 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
18358 (conflict_list, conflict_list_cnt, table, check, table_ninf)
18359 (yydefgoto, yydefact, high): Move to...
18360 * src/tables.h, src/tables.c: here.
18361 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18362 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18363 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
18364 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
18365 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
18366 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
18367 (action_row, save_row, token_actions, save_column, default_goto)
18368 (goto_actions, sort_actions, matching_state, pack_vector)
18369 (table_ninf_remap, pack_table, prepare_actions): Move to...
18370 * src/tables.c: here.
18371 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
18372 * src/output.c (token_actions, output_base, output_conflicts)
18373 (output_check): Merge into...
18374 (prepare_actions): this.
18375 (actions_output): Rename as...
18376 (user_actions_output): this.
18377 * src/main.c (main): Call tables_generate and tables_free.
18379 2002-07-31 Akim Demaille <akim@epita.fr>
18381 Steal GCC's --time-report support.
18383 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
18384 stolen/adjusted from GCC.
18385 * m4/stage.m4: Remove time related checks.
18386 * m4/timevar.m4: New.
18387 * configure.in: Adjust.
18388 * src/system.h: Adjust to using timevar.h.
18389 * src/getargs.h, src/getargs.c: Support trace_time for
18391 * src/main.c (stage): Remove.
18392 (main): Replace `stage' invocations with timevar calls.
18393 * src/output.c: Insert pertinent timevar calls.
18395 2002-07-31 Akim Demaille <akim@epita.fr>
18397 Let --trace have arguments.
18399 * src/getargs.h (enum trace_e): New.
18400 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
18401 (long_options, short_options): --trace/-T takes an optional
18403 Change all the uses of trace_flag to reflect the new flags.
18404 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
18406 Strengthen `stage' portability.
18408 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
18409 * configure.in: Use it.
18410 Don't check for malloc.h and sys/times.h.
18411 * src/system.h: Include them when appropriate.
18412 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
18413 times and struct tms are available.
18415 2002-07-30 Akim Demaille <akim@epita.fr>
18417 In verbose parse error message, don't report `error' as an
18419 * tests/actions.at (Printers and Destructors): Adjust.
18420 * tests/calc.at (Calculator $1): Adjust.
18421 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
18422 error message, do not report the parser accepts the error token in
18425 2002-07-30 Akim Demaille <akim@epita.fr>
18427 Normalize conflict related messages.
18429 * src/complain.h, src/complain.c (warn, complain): New.
18430 * src/conflicts.c (conflicts_print): Use them.
18431 (conflict_report_yacc): New, extracted from...
18432 (conflicts_print): here.
18433 * tests/conflicts.at, tests/existing.at: Adjust.
18435 2002-07-30 Akim Demaille <akim@epita.fr>
18437 Report rules which are never reduced by the parser: those hidden
18440 * src/LR0.c (save_reductions): Don't make the final state too
18441 different: save its reduction (accept) instead of having a state
18442 without any action (no shift or goto, no reduce).
18443 Note: the final state is now a ``regular'' state, i.e., the
18444 parsers now contain `reduce 0' as default reduction.
18445 Nevertheless, since they decide to `accept' when yystate =
18446 final_state, they still will not reduce rule 0.
18447 * src/print.c (print_actions, print_reduction): Adjust.
18448 * src/output.c (action_row): Track reduced rules.
18449 (token_actions): Report rules never reduced.
18450 * tests/conflicts.at, tests/regression.at: Adjust.
18452 2002-07-30 Akim Demaille <akim@epita.fr>
18454 `stage' was accidently included in a previous patch.
18455 Initiate its autoconfiscation.
18457 * configure.in: Look for malloc.h and sys/times.h.
18458 * src/main.c (stage): Adjust.
18459 Report only when trace_flag.
18461 2002-07-29 Akim Demaille <akim@epita.fr>
18463 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
18465 (errs_t): symbol_t*, not symbol_number_t.
18466 (reductions_t): rule_t*, not rule_number_t.
18467 (FOR_EACH_SHIFT): New.
18468 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
18469 * src/print.c, src/print_graph.c: Adjust.
18471 2002-07-29 Akim Demaille <akim@epita.fr>
18473 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
18475 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
18476 (endtoken, accept): these.
18477 * src/reader.c (reader): Set endtoken's default tag to "$end".
18478 Set undeftoken's tag to "$undefined" instead of "$undefined.".
18479 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
18482 2002-07-29 Akim Demaille <akim@epita.fr>
18484 * src/reduce.c (reduce_grammar): When the language is empty,
18485 complain about the start symbol, not the axiom.
18487 * tests/reduce.at (Empty Language): New.
18489 2002-07-26 Akim Demaille <akim@epita.fr>
18491 * src/reader.h, src/reader.c (gram_error): ... can't get
18492 yycontrol without making too strong assumptions on the parser
18494 * src/output.c (prepare_tokens): Use the real 0th value of
18495 token_translations instead of `0'.
18496 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
18498 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
18499 for the time being: %locations ought to provide it to yyerror.
18501 2002-07-25 Akim Demaille <akim@epita.fr>
18503 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
18504 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
18505 * tests/regression.at (Web2c Actions): Adjust.
18507 2002-07-25 Akim Demaille <akim@epita.fr>
18509 Stop storing rules from 1 to nrules + 1.
18511 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
18512 * src/nullable.c, src/output.c, src/print.c, src/reader.c
18513 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
18514 Iterate from 0 to nrules.
18515 Use rule_number_as_item_number and item_number_as_rule_number.
18516 Adjust to `derive' now containing possibly 0.
18517 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
18518 Handle the `- 1' part in rule numbers from/to item numbers.
18519 * src/conflicts.c (log_resolution): Fix the message which reversed
18521 * src/output.c (action_row): Initialize default_rule to -1.
18522 (token_actions): Adjust.
18523 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
18525 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
18527 2002-07-25 Akim Demaille <akim@epita.fr>
18529 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
18530 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
18531 (b4_c_knr_arg_decl): New.
18532 * data/yacc.c: Use it to define yysymprint, yydestruct, and
18533 yyreport_parse_error.
18535 2002-07-25 Akim Demaille <akim@epita.fr>
18537 * data/yacc.c (yyreport_parse_error): New, extracted from...
18539 (yydestruct, yysymprint): Move above yyparse.
18542 2002-07-25 Akim Demaille <akim@epita.fr>
18544 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
18546 (b4_sint_type, b4_uint_type): these.
18547 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
18548 * tests/regression.at (Web2c Actions): Adjust.
18550 2002-07-25 Akim Demaille <akim@epita.fr>
18552 * src/gram.h (TIEM_NUMBER_MAX): New.
18553 (item_number_of_rule_number, rule_number_of_item_number): Rename
18555 (rule_number_as_item_number, item_number_as_rule_number): these.
18556 Adjust dependencies.
18557 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18558 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18559 (symbol_number_to_vector_number): New.
18560 (order): Of vector_number_t* type.
18561 (base_t, BASE_MAX, BASE_MIN): New.
18562 (froms, tos, width, pos, check): Of base_t type.
18563 (action_number_t, ACTION_MIN, ACTION_MAX): New.
18564 (actrow): Of action_number_t type.
18565 (conflrow): Of unsigned int type.
18566 (table_ninf, base_ninf): New.
18567 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
18568 (muscle_insert_int_table, muscle_insert_base_table)
18569 (muscle_insert_rule_number_table): New.
18570 (prepare_tokens): Output `toknum' as int_table.
18571 (action_row): Returns a rule_number_t.
18572 Use ACTION_MIN, not SHRT_MIN.
18573 (token_actions): yydefact is rule_number_t*.
18574 (table_ninf_remap): New.
18575 (pack_table): Use it for `base' and `table'.
18576 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
18578 (YYPACT_NINF, YYTABLE_NINF): these.
18579 (yypact, yytable): Compute their types instead of hard-coded
18581 * tests/regression.at (Web2c Actions): Adjust.
18583 2002-07-19 Akim Demaille <akim@epita.fr>
18585 * src/scan-gram.l (id): Can start with an underscore.
18587 2002-07-16 Akim Demaille <akim@epita.fr>
18589 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
18590 Adjust all former `associativity' dependencies.
18591 * src/symtab.c (symbol_new): Default associativity is `undef', not
18593 (symbol_check_alias_consistence): Adjust.
18595 2002-07-09 Akim Demaille <akim@epita.fr>
18597 * doc/bison.texinfo: Properly set the ``header'' part.
18598 Use @dircategory ``GNU programming tools'' as per Texinfo's
18602 2002-07-09 Akim Demaille <akim@epita.fr>
18604 * lib/quotearg.h: Protect against multiple inclusions.
18605 * src/location.h (location_t): Add a `file' member.
18606 (LOCATION_RESET, LOCATION_PRINT): Adjust.
18607 * src/complain.c (warn_at, complain_at, fatal_at): Drop
18608 `error_one_per_line' support.
18610 2002-07-09 Akim Demaille <akim@epita.fr>
18612 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
18613 * src/reader.c (lineno): Remove.
18614 Adjust all dependencies.
18615 (get_merge_function): Take a location and use complain_at.
18616 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
18617 * tests/regression.at (Invalid inputs, Mixing %token styles):
18620 2002-07-09 Akim Demaille <akim@epita.fr>
18622 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
18623 recovery rule, and forbid extensions when --yacc.
18624 (gram_error): Use complain_at.
18625 * src/reader.c (reader): Exit if there were parse errors.
18627 2002-07-09 Akim Demaille <akim@epita.fr>
18629 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
18630 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
18631 Reported by R Blake <blakers@mac.com>.
18633 2002-07-09 Akim Demaille <akim@epita.fr>
18635 * data/yacc.c: Output the copyright notive in the header.
18637 2002-07-03 Akim Demaille <akim@epita.fr>
18639 * src/output.c (froms, tos): Are state_number_t.
18640 (save_column): sp, sp1, and sp2 are state_number_t.
18641 (prepare): Rename `final' as `final_state_number', `nnts' as
18642 `nterms_number', `nrules' as `rules_number', `nstates' as
18643 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
18645 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
18646 * data/lalr1.cc (nsym_): Remove, unused.
18648 2002-07-03 Akim Demaille <akim@epita.fr>
18650 * src/lalr.h, src/lalr.c (goto_number_t): New.
18651 * src/lalr.c (goto_list_t): New.
18653 * src/nullable.c (rule_list_t): New.
18655 * src/types.h: Remove.
18657 2002-07-03 Akim Demaille <akim@epita.fr>
18659 * src/closure.c (print_fderives): Use rule_rhs_print.
18660 * src/derives.c (print_derives): Use rule_rhs_print.
18661 (rule_list_t): New, replaces `shorts'.
18662 (set_derives): Add comments.
18663 * tests/sets.at (Nullable, Firsts): Adjust.
18665 2002-07-03 Akim Demaille <akim@epita.fr>
18667 * src/output.c (prepare_actions): Free `tally' and `width'.
18668 (prepare_actions): Allocate and free `order'.
18669 * src/symtab.c (symbols_free): Free `symbols'.
18670 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
18671 * src/output.c (m4_invoke): Move to...
18672 * src/scan-skel.l: here.
18673 (<<EOF>>): Close yyout, and free its name.
18675 2002-07-03 Akim Demaille <akim@epita.fr>
18677 Fix some memory leaks, and fix a bug: state 0 was examined twice.
18679 * src/LR0.c (new_state): Merge into...
18680 (state_list_append): this.
18681 (new_states): Merge into...
18682 (generate_states): here.
18683 (set_states): Don't ensure a proper `errs' state member here, do it...
18684 * src/conflicts.c (conflicts_solve): here.
18685 * src/state.h, src/state.c: Comment changes.
18686 (state_t): Rename member `shifts' as `transitions'.
18687 Adjust all dependencies.
18688 (errs_new): For consistency, also take the values as argument.
18689 (errs_dup): Remove.
18690 (state_errs_set): New.
18691 (state_reductions_set, state_transitions_set): Assert that no
18692 previous value was assigned.
18694 (states_free): Use it.
18695 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
18696 temporary storage: use `errs' and `nerrs' as elsewhere.
18697 (set_conflicts): Allocate and free this `errs'.
18699 2002-07-02 Akim Demaille <akim@epita.fr>
18701 * lib/libiberty.h: New.
18702 * lib: Update the bitset implementation from upstream.
18703 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
18704 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
18705 * src/main.c: Adjust bitset stats calls.
18707 2002-07-01 Paul Eggert <eggert@twinsun.com>
18709 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
18710 char, so that negative chars don't collide with $.
18712 2002-06-30 Akim Demaille <akim@epita.fr>
18714 Have the GLR tests be `warning' checked, and fix the warnings.
18716 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
18717 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
18718 (yyremoveDeletes): `yyi' and `yyj' are size_t.
18719 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
18720 (yyaddDeferredAction): static.
18721 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
18722 (yyreportParseError): yyprefix is const.
18723 yytokenp is used only when verbose.
18724 (yy__GNUC__): Replace with __GNUC__.
18725 (yypdumpstack): yyi is size_t.
18726 (yypreference): Un-yy local variables and arguments, to avoid
18727 clashes with `yyr1'. Anyway, we are not in the user name space.
18728 (yytname_size): be an int, as is compared with ints.
18729 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
18731 * tests/cxx-gram.at: Use quotation to protect $1.
18732 Use AT_COMPILE to enable warnings hunts.
18733 Prototype yylex and yyerror.
18735 Include `string.h', not `strings.h'.
18736 Produce and prototype stmtMerge only when used.
18737 yylex takes a location.
18739 2002-06-30 Akim Demaille <akim@epita.fr>
18741 We spend a lot of time in quotearg, in particular when --verbose.
18743 * src/symtab.c (symbol_get): Store a quoted version of the key.
18744 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
18745 Adjust all callers.
18747 2002-06-30 Akim Demaille <akim@epita.fr>
18749 * src/state.h (reductions_t): Rename member `nreds' as num.
18750 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
18751 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
18753 2002-06-30 Akim Demaille <akim@epita.fr>
18755 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
18756 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
18757 (shifts_to): Rename as...
18758 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
18759 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
18760 (TRANSITION_IS_DISABLED, transitions_to): these.
18762 2002-06-30 Akim Demaille <akim@epita.fr>
18764 * src/print.c (print_shifts, print_gotos): Merge into...
18765 (print_transitions): this.
18766 (print_transitions, print_errs, print_reductions): Align the
18767 lookaheads columns.
18768 (print_core, print_transitions, print_errs, print_state,
18769 print_grammar): Output empty lines separator before, not after.
18770 (state_default_rule_compute): Rename as...
18771 (state_default_rule): this.
18772 * tests/conflicts.at (Defaulted Conflicted Reduction),
18773 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
18774 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
18776 2002-06-30 Akim Demaille <akim@epita.fr>
18778 Display items as we display rules.
18780 * src/gram.h, src/gram.c (rule_lhs_print): New.
18781 * src/gram.c (grammar_rules_partial_print): Use it.
18782 * src/print.c (print_core): Likewise.
18783 * tests/conflicts.at (Defaulted Conflicted Reduction),
18784 (Unresolved SR Conflicts): Adjust.
18785 (Unresolved SR Conflicts): Adjust and rename as...
18786 (Resolved SR Conflicts): this, as was meant.
18787 * tests/regression.at (Web2c Report): Adjust.
18789 2002-06-30 Akim Demaille <akim@epita.fr>
18791 * src/print.c (state_default_rule_compute): New, extracted from...
18792 (print_reductions): here.
18793 Pessimize, but clarify the code.
18794 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
18796 2002-06-30 Akim Demaille <akim@epita.fr>
18798 * src/output.c (action_row): Let default_rule be always a rule
18801 2002-06-30 Akim Demaille <akim@epita.fr>
18803 * src/closure.c (print_firsts, print_fderives, closure):
18804 Use BITSET_EXECUTE.
18805 * src/lalr.c (lookaheads_print): Likewise.
18806 * src/state.c (state_rule_lookaheads_print): Likewise.
18807 * src/print_graph.c (print_core): Likewise.
18808 * src/print.c (print_reductions): Likewise.
18809 * src/output.c (action_row): Likewise.
18810 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
18812 2002-06-30 Akim Demaille <akim@epita.fr>
18814 * src/print_graph.c: Use report_flag.
18816 2002-06-30 Akim Demaille <akim@epita.fr>
18818 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
18820 * src/relation.h, src/relation.c (traverse, relation_digraph)
18821 (relation_print, relation_transpose): New.
18823 2002-06-30 Akim Demaille <akim@epita.fr>
18825 * src/state.h, src/state.c (shifts_to): New.
18826 * src/lalr.c (build_relations): Use it.
18828 2002-06-30 Akim Demaille <akim@epita.fr>
18830 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
18831 (item_number_of_rule_number, rule_number_of_item_number): New.
18832 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
18833 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18834 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
18835 Propagate their use.
18836 Much remains to be done, in particular wrt `shorts' from types.h.
18838 2002-06-30 Akim Demaille <akim@epita.fr>
18840 * src/symtab.c (symbol_new): Initialize the `printer' member.
18842 2002-06-30 Akim Demaille <akim@epita.fr>
18844 * src/LR0.c (save_reductions): Remove, replaced by...
18845 * src/state.h, src/state.c (state_reductions_set): New.
18846 (reductions, errs): Rename as...
18847 (reductions_t, errs_t): these.
18848 Adjust all dependencies.
18850 2002-06-30 Akim Demaille <akim@epita.fr>
18852 * src/LR0.c (state_list_t, state_list_append): New.
18853 (first_state, last_state): Now symbol_list_t.
18854 (this_state): Remove.
18855 (new_itemsets, append_states, save_reductions): Take a state_t as
18857 (set_states, generate_states): Adjust.
18858 (save_shifts): Remove, replaced by...
18859 * src/state.h, src/state.c (state_shifts_set): New.
18860 (shifts): Rename as...
18862 Adjust all dependencies.
18863 * src/state.h (state_t): Remove the `next' member.
18865 2002-06-30 Akim Demaille <akim@epita.fr>
18867 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
18870 2002-06-30 Akim Demaille <akim@epita.fr>
18872 Use hash.h for the state hash table.
18874 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
18875 (allocate_storage): Use state_hash_new.
18876 (free_storage): Use state_hash_free.
18877 (new_state, get_state): Adjust.
18878 * src/lalr.h, src/lalr.c (states): Move to...
18879 * src/states.h (state_t): Remove the `link' member, no longer
18881 * src/states.h, src/states.c: here.
18882 (state_hash_new, state_hash_free, state_hash_lookup)
18883 (state_hash_insert, states_free): New.
18884 * src/states.c (state_table, state_compare, state_hash): New.
18885 * src/output.c (output_actions): Do not free states now, since we
18886 still need to know the final_state number in `prepare', called
18887 afterwards. Do it...
18888 * src/main.c (main): here: call states_free after `output'.
18890 2002-06-30 Akim Demaille <akim@epita.fr>
18892 * src/state.h, src/state.c (state_new): New, extracted from...
18893 * src/LR0.c (new_state): here.
18894 * src/state.h (STATE_ALLOC): Move to...
18895 * src/state.c: here.
18896 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
18897 * src/state.h, src/state.c: here.
18899 2002-06-30 Akim Demaille <akim@epita.fr>
18901 * src/reader.c (gensym): Rename as...
18902 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
18903 (getsym): Rename as...
18904 (symbol_get): this.
18906 2002-06-30 Akim Demaille <akim@epita.fr>
18908 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
18909 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
18910 * src/output.c, src/print.c, src/print_graph.c: Propagate.
18911 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
18913 2002-06-30 Akim Demaille <akim@epita.fr>
18915 Make the test suite pass with warnings checked.
18917 * tests/actions.at (Printers and Destructors): Improve.
18918 Avoid unsigned vs. signed issues.
18919 * tests/calc.at: Don't exercise the scanner here, do it...
18920 * tests/input.at (Torturing the Scanner): here.
18922 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18924 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
18925 reorganize first lines parallel to yacc.c.
18927 2002-06-28 Akim Demaille <akim@epita.fr>
18929 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
18930 (b4_token_enum, b4_token_defines): New, factored from...
18931 * data/lalr1.cc, data/yacc.c, glr.c: here.
18933 2002-06-28 Akim Demaille <akim@epita.fr>
18935 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
18937 * src/output.c (merger_output): static.
18939 2002-06-28 Akim Demaille <akim@epita.fr>
18941 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
18942 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
18944 * src/output.c (save_row): Initialize all the variables to pacify GCC.
18946 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18948 Accumulated changelog for new GLR parsing features.
18950 * src/conflicts.c (count_total_conflicts): Change name to
18951 conflicts_total_count.
18952 * src/conflicts.h: Ditto.
18953 * src/output.c (token_actions): Use the new name.
18954 (output_conflicts): Change conflp => conflict_list_heads, and
18955 confl => conflict_list for better readability.
18956 * data/glr.c: Use the new names.
18957 * NEWS: Add self to GLR announcement.
18959 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
18961 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
18964 * data/bison.glr: Change name to glr.c
18965 * data/glr.c: Renamed from bison.glr.
18966 * data/Makefile.am: Add glr.c
18970 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
18971 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
18973 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18975 * data/bison.glr: Be sure to restore the
18976 current #line when returning to the skeleton contents after having
18977 exposed the input file's #line.
18979 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18981 * data/bison.glr: Bring up to date with changes to bison.simple.
18983 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18985 * data/bison.glr: Correct definitions that use b4_prefix.
18986 Various reformatting.
18987 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
18988 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
18989 yytokenp argument; now part of stack.
18990 (yychar): Define to behave as documented.
18991 (yyclearin): Ditto.
18993 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18995 * src/reader.h: Add declaration for free_merger_functions.
18997 * src/reader.c (merge_functions): New variable.
18998 (get_merge_function): New function.
18999 (free_merger_functions): New function.
19000 (readgram): Check for %prec that is not followed by a symbol.
19001 Handle %dprec and %merge declarations.
19002 (packgram): Initialize dprec and merger fields in rules array.
19004 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
19005 conflict_list_cnt, conflict_list_free): New variables.
19006 (table_grow): Also grow conflict_table.
19007 (prepare_rules): Output dprec and merger tables.
19008 (conflict_row): New function.
19009 (action_row): Output conflict lists for GLR parser. Don't use
19010 default reduction in conflicted states for GLR parser so that there
19011 are spaces for the conflict lists.
19012 (save_row): Also save conflict information.
19013 (token_actions): Allocate conflict list.
19014 (merger_output): New function.
19015 (pack_vector): Pack conflict table, too.
19016 (output_conflicts): New function to output yyconflp and yyconfl.
19017 (output_check): Allocate conflict_tos.
19018 (output_actions): Output conflict tables, also.
19019 (output_skeleton): Output b4_mergers definition.
19020 (prepare): Output b4_max_rhs_length definition.
19021 Use 'bison.glr' as default skeleton for GLR parsers.
19023 * src/gram.c (glr_parser): New flag.
19024 (grammar_free): Call free_merger_functions.
19026 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
19027 all pairs of conflicting reductions, rather than just all tokens
19028 causing conflicts. Needed to size conflict tables.
19029 (conflicts_output): Modify call to count_rr_conflicts for new
19031 (conflicts_print): Ditto.
19032 (count_total_conflicts): New function.
19034 * src/reader.h (merger_list): New type.
19035 (merge_functions): New variable.
19037 * src/lex.h (tok_dprec, tok_merge): New token types.
19039 * src/gram.h (rule_s): Add dprec and merger fields.
19040 (glr_parser): New flag.
19042 * src/conflicts.h (count_total_conflicts): New function.
19044 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
19046 * doc/bison.texinfo (Generalized LR Parsing): New section.
19047 (GLR Parsers): New section.
19048 (Language and Grammar): Mention GLR parsing.
19049 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
19050 Correct typo ("tge" -> "the").
19052 * data/bison.glr: New skeleton for GLR parsing.
19054 * tests/cxx-gram.at: New tests for GLR parsing.
19056 * tests/testsuite.at: Include cxx-gram.at.
19058 * tests/Makefile.am: Add cxx-gram.at.
19060 * src/parse-gram.y:
19062 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
19064 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
19066 2002-06-27 Akim Demaille <akim@epita.fr>
19068 * src/options.h, src/options.c: Remove.
19069 * src/getargs.c (short_options, long_options): New.
19071 2002-06-27 Akim Demaille <akim@epita.fr>
19073 * data/bison.simple, data/bison.c++: Rename as...
19074 * data/yacc.c, data/lalr1.cc: these.
19075 * doc/bison.texinfo (Environment Variables): Remove.
19077 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
19079 * src/getargs.c (report_argmatch): Initialize strtok().
19081 2002-06-20 Akim Demaille <akim@epita.fr>
19083 * data/bison.simple (b4_symbol_actions): New, replaces...
19084 (b4_symbol_destructor, b4_symbol_printer): these.
19085 (yysymprint): Be sure to call YYPRINT only for tokens, and using
19086 user token numbers.
19088 2002-06-20 Akim Demaille <akim@epita.fr>
19090 * data/bison.simple (yydestructor): Rename as...
19091 (yydestruct): this.
19093 2002-06-20 Akim Demaille <akim@epita.fr>
19095 * src/symtab.h, src/symtab.c (symbol_type_set)
19096 (symbol_destructor_set, symbol_precedence_set): The location is
19098 Adjust all callers.
19100 2002-06-20 Akim Demaille <akim@epita.fr>
19102 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
19104 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
19106 * src/symtab.h, src/symtab.c (symbol_class_set)
19107 (symbol_user_token_number_set): Likewise.
19108 Adjust all callers.
19109 Promote complain_at.
19110 * tests/input.at (Type Clashes): Adjust.
19112 2002-06-20 Akim Demaille <akim@epita.fr>
19114 * data/bison.simple (YYLEX): Fix the declaration when
19117 2002-06-20 Akim Demaille <akim@epita.fr>
19119 * data/bison.simple (yysymprint): Don't print the token number,
19121 * tests/actions.at (Destructors): Rename as...
19122 (Printers and Destructors): this.
19123 Also exercise %printer.
19125 2002-06-20 Akim Demaille <akim@epita.fr>
19127 * data/bison.simple (YYDSYMPRINT): New.
19128 Use it to remove many of the #if YYDEBUG/if (yydebug).
19130 2002-06-20 Akim Demaille <akim@epita.fr>
19132 * src/symtab.h, src/symtab.c (symbol_t): printer and
19133 printer_location are new members.
19134 (symbol_printer_set): New.
19135 * src/parse-gram.y (PERCENT_PRINTER): New token.
19136 Handle its associated rule.
19137 * src/scan-gram.l: Adjust.
19138 (handle_destructor_at, handle_destructor_dollar): Rename as...
19139 (handle_symbol_code_at, handle_symbol_code_dollar): these.
19140 * src/output.c (symbol_printers_output): New.
19141 (output_skeleton): Call it.
19142 * data/bison.simple (yysymprint): New. Cannot be named yyprint
19143 since there are already many grammar files with a user `yyprint'.
19144 Replace the calls to YYPRINT to calls to yysymprint.
19145 * tests/calc.at: Adjust.
19146 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
19147 taking advantage of parser very internal details (stack size!).
19149 2002-06-20 Akim Demaille <akim@epita.fr>
19151 * src/scan-gram.l: Complete the scanner with the missing patterns
19153 Use `quote' and `symbol_tag_get' where appropriate.
19155 2002-06-19 Akim Demaille <akim@epita.fr>
19157 * tests/actions.at (Destructors): Augment to test locations.
19158 * data/bison.simple (yydestructor): Pass it the current location
19159 if locations are enabled.
19160 Prototype only when __STDC__ or C++.
19161 Change the argument names to move into the yy name space: there is
19164 2002-06-19 Akim Demaille <akim@epita.fr>
19166 * data/bison.simple (b4_pure_if): New.
19167 Use it instead of #ifdef YYPURE.
19169 2002-06-19 Akim Demaille <akim@epita.fr>
19171 * data/bison.simple (b4_location_if): New.
19172 Use it instead of #ifdef YYLSP_NEEDED.
19174 2002-06-19 Akim Demaille <akim@epita.fr>
19176 Prepare @$ in %destructor, but currently don't bind it in the
19177 skeleton, as %location use is not cleaned up yet.
19179 * src/scan-gram.l (handle_dollar, handle_destructor_at)
19180 (handle_action_at): New.
19181 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
19182 a braced_code_t and a location as additional arguments.
19183 (handle_destructor_dollar): Instead of requiring `b4_eval', just
19184 unquote one when outputting `b4_dollar_dollar'.
19186 * data/bison.simple (b4_eval): Remove.
19187 (b4_symbol_destructor): Adjust.
19188 * tests/input.at (Invalid @n): Adjust.
19190 2002-06-19 Zack Weinberg <zack@codesourcery.com>
19192 * doc/bison.texinfo: Document ability to have multiple
19195 2002-06-18 Akim Demaille <akim@epita.fr>
19197 * src/files.c (compute_base_names): When computing the output file
19198 names from the input file name, strip the directory part.
19200 2002-06-18 Akim Demaille <akim@epita.fr>
19202 * data/bison.simple.new: Comment changes.
19203 Reported by Andreas Schwab.
19205 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
19207 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
19208 there are no `label `yyoverflowlab' defined but not used' warnings
19209 when yyoverflow is defined.
19211 2002-06-18 Akim Demaille <akim@epita.fr>
19213 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
19215 (symbol_destructor_set): Adjust.
19216 * src/output.c (symbol_destructors_output): Output the destructor
19218 Output the symbol name.
19219 * data/bison.simple (b4_symbol_destructor): Adjust.
19221 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
19222 and Akim Demaille <akim@epita.fr>
19224 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
19225 what's left on the stack when the error recovery hits EOF.
19226 * tests/actions.at (Destructors): Complete to exercise this case.
19228 2002-06-17 Akim Demaille <akim@epita.fr>
19230 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
19231 arguments is really empty, not only equal to `[]'.
19232 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
19234 (symbol_destructor_set): New.
19235 * src/output.c (symbol_destructors_output): New.
19236 * src/reader.h (brace_code_t, current_braced_code): New.
19237 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
19238 (handle_dollar): Rename as...
19239 (handle_action_dollar): this.
19240 (handle_destructor_dollar): New.
19241 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
19242 (grammar_declaration): Use it.
19243 * data/bison.simple (yystos): Is always defined.
19244 (yydestructor): New.
19245 * tests/actions.at (Destructors): New.
19246 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
19248 2002-06-17 Akim Demaille <akim@epita.fr>
19250 * src/symlist.h, src/symlist.c (symbol_list_length): New.
19251 * src/scan-gram.l (handle_dollar, handle_at): Compute the
19252 rule_length only when needed.
19253 * src/output.c (actions_output, token_definitions_output): Output
19255 * src/symtab.c: Don't access directly to the symbol tag, use
19257 * src/parse-gram.y: Use symbol_list_free.
19259 2002-06-17 Akim Demaille <akim@epita.fr>
19261 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
19262 (symbol_list_prepend, get_type_name): Move to...
19263 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
19264 (symbol_list_prepend, symbol_list_n_type_name_get): here.
19265 Adjust all callers.
19266 (symbol_list_free): New.
19267 * src/scan-gram.l (handle_dollar): Takes a location.
19268 * tests/input.at (Invalid $n): Adjust.
19270 2002-06-17 Akim Demaille <akim@epita.fr>
19272 * src/reader.h, src/reader.c (symbol_list_new): Export it.
19273 (symbol_list_prepend): New.
19274 * src/parse-gram.y (%union): `list' is a new member.
19275 (symbols.1): New, replaces...
19276 (terms_to_prec.1, nterms_to_type.1): these.
19277 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
19278 Take a location as additional argument.
19279 Adjust all callers.
19281 2002-06-15 Akim Demaille <akim@epita.fr>
19283 * src/parse-gram.y: Move %token in the declaration section so that
19284 we don't depend upon CVS Bison.
19286 2002-06-15 Akim Demaille <akim@epita.fr>
19288 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
19289 * src/print.c (print_core): Use it.
19291 2002-06-15 Akim Demaille <akim@epita.fr>
19293 * src/conflicts.c (log_resolution): Accept the rule involved in
19294 the sr conflicts instead of the lookahead number that points to
19296 (flush_reduce): Accept the current lookahead vector as argument,
19297 instead of the index in LA.
19298 (resolve_sr_conflict): Accept the current number of lookahead
19299 bitset to consider for the STATE, instead of the index in LA.
19300 (set_conflicts): Adjust.
19301 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
19303 2002-06-15 Akim Demaille <akim@epita.fr>
19305 * src/state.h (state_t): Replace the `lookaheadsp' member, a
19306 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
19307 Adjust all dependencies.
19308 * src/lalr.c (initialize_lookaheads): Split into...
19309 (states_lookaheads_count, states_lookaheads_initialize): these.
19312 2002-06-15 Akim Demaille <akim@epita.fr>
19314 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
19316 (grammar_rules_print): here.
19317 * src/reduce.c (reduce_output): Use it.
19318 * tests/reduce.at (Useless Rules, Reduced Automaton)
19319 (Underivable Rules): Adjust.
19321 2002-06-15 Akim Demaille <akim@epita.fr>
19323 Copy BYacc's nice way to report the grammar.
19325 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
19327 Don't print the rules' location, it is confusing and useless.
19328 (rule_print): Use grammar_rhs_print.
19329 * src/print.c (print_grammar): Use grammar_rules_print.
19331 2002-06-15 Akim Demaille <akim@epita.fr>
19333 Complete and rationalize `useless thing' warnings.
19335 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
19336 (symbol_tag_print): New.
19337 Use them everywhere in place of accessing directly the tag member.
19338 * src/gram.h, src/gram.c (rule_print): New.
19339 Use it where a rule used to be printed `by hand'.
19340 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
19341 (reduce_grammar_tables): Report the useless rules.
19342 (reduce_print): Useless things are a warning, not an error.
19344 * tests/reduce.at (Useless Nonterminals, Useless Rules):
19345 (Reduced Automaton, Underivable Rules): Adjust.
19346 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
19347 * tests/conflicts.at (Unresolved SR Conflicts)
19348 (Solved SR Conflicts): Adjust.
19350 2002-06-15 Akim Demaille <akim@epita.fr>
19352 Let symbols have a location.
19354 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
19356 Adjust all callers.
19357 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
19358 Use location_t, not int.
19359 * src/symtab.c (symbol_check_defined): Take advantage of the
19361 * tests/regression.at (Invalid inputs): Adjust.
19363 2002-06-15 Akim Demaille <akim@epita.fr>
19365 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
19366 (input): Don't try to initialize yylloc here, do it in the
19368 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
19369 * src/gram.h (rule_t): Change line and action_line into location
19370 and action_location, of location_t type.
19371 Adjust all dependencies.
19372 * src/location.h, src/location.c (empty_location): New.
19373 * src/reader.h, src/reader.c (grammar_start_symbol_set)
19374 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
19375 (grammar_current_rule_symbol_append)
19376 (grammar_current_rule_action_append): Expect a location as argument.
19377 * src/reader.c (grammar_midrule_action): Adjust to attach an
19378 action's location as dummy symbol location.
19379 * src/symtab.h, src/symtab.c (startsymbol_location): New.
19380 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
19383 2002-06-14 Akim Demaille <akim@epita.fr>
19385 Grammar declarations may be found in the grammar section.
19387 * src/parse-gram.y (rules_or_grammar_declaration): New.
19388 (declarations): Each declaration may end with a semicolon, not
19390 (grammar_declaration): `"%union"'.
19391 (grammar): Branch to rules_or_grammar_declaration.
19393 2002-06-14 Akim Demaille <akim@epita.fr>
19395 * src/main.c (main): Invoke scanner_free.
19397 2002-06-14 Akim Demaille <akim@epita.fr>
19399 * src/output.c (m4_invoke): Extracted from...
19400 (output_skeleton): here.
19403 2002-06-14 Akim Demaille <akim@epita.fr>
19405 * src/parse-gram.y (directives, directive, gram)
19406 (grammar_directives, precedence_directives, precedence_directive):
19408 (declarations, declaration, grammar, grammar_declaration)
19409 (precedence_declaration, precedence_declarator): these.
19410 (symbol_declaration): New.
19412 2002-06-14 Akim Demaille <akim@epita.fr>
19414 * src/files.c (action_obstack): Remove, unused.
19415 (output_obstack): Remove it, and all its dependencies, as it is no
19417 * src/reader.c (epilogue_set): Build the epilogue in the
19419 * src/output.h, src/output.c (muscle_obstack): Move to...
19420 * src/muscle_tab.h, src/muscle_tab.h: here.
19421 (muscle_init): Initialize muscle_obstack.
19422 (muscle_free): New.
19423 * src/main.c (main): Call it.
19425 2002-06-14 Akim Demaille <akim@epita.fr>
19427 * src/location.h: New, extracted from...
19428 * src/reader.h: here.
19429 * src/Makefile.am (noinst_HEADERS): Merge into
19430 (bison_SOURCES): this.
19432 * src/parse-gram.y: Use location_t instead of Bison's.
19433 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
19434 Use location_t instead of ints.
19436 2002-06-14 Akim Demaille <akim@epita.fr>
19438 * data/bison.simple, data/bison.c++: Be sure to restore the
19439 current #line when returning to the skeleton contents after having
19440 exposed the input file's #line.
19442 2002-06-12 Akim Demaille <akim@epita.fr>
19444 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
19446 * tests/actions.at (Exotic Dollars): New.
19448 2002-06-12 Akim Demaille <akim@epita.fr>
19450 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
19452 * tests/input.at (Torturing the Scanner): New.
19454 2002-06-11 Akim Demaille <akim@epita.fr>
19456 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
19457 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
19458 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
19459 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
19460 * src/reader.c (reader): Use it.
19462 2002-06-11 Akim Demaille <akim@epita.fr>
19464 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
19465 Adjust all callers.
19466 (scanner_last_string_free): New.
19468 2002-06-11 Akim Demaille <akim@epita.fr>
19470 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
19471 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
19472 (last_string, YY_OBS_FREE): New.
19473 Use them when returning an ID.
19475 2002-06-11 Akim Demaille <akim@epita.fr>
19477 Have Bison grammars parsed by a Bison grammar.
19479 * src/reader.c, src/reader.h (prologue_augment): New.
19480 * src/reader.c (copy_definition): Remove.
19482 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
19483 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
19484 (grammar_current_rule_prec_set, grammar_current_rule_check)
19485 (grammar_current_rule_symbol_append)
19486 (grammar_current_rule_action_append): Export.
19487 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
19488 (symbol_list_action_append): Remove.
19489 Hook the routines from reader.
19490 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
19491 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
19493 * src/reader.c (read_declarations): Remove, unused.
19495 * src/parse-gram.y: Handle the epilogue.
19496 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
19497 (grammar_start_symbol_set): this.
19498 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
19499 * src/reader.c (readgram): Remove, unused.
19500 (reader): Adjust to insert eoftoken and axiom where appropriate.
19502 * src/reader.c (copy_dollar): Replace with...
19503 * src/scan-gram.h (handle_dollar): this.
19504 * src/parse-gram.y: Remove `%thong'.
19506 * src/reader.c (copy_at): Replace with...
19507 * src/scan-gram.h (handle_at): this.
19509 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
19512 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
19515 * src/reader.h, src/reader.c (grammar_rule_end): New.
19517 * src/parse.y (current_type, current_class): New.
19518 Implement `%nterm', `%token' support.
19519 Merge `%term' into `%token'.
19520 (string_as_id): New.
19521 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
19524 * src/parse-gram.y: Be sure to handle properly the beginning of
19527 * src/parse-gram.y: Handle %type.
19528 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
19530 * src/parse-gram.y: More directives support.
19531 * src/options.c: No longer handle source directives.
19533 * src/parse-gram.y: Fix %output.
19535 * src/parse-gram.y: Handle %union.
19536 Use the prologue locations.
19537 * src/reader.c (parse_union_decl): Remove.
19539 * src/reader.h, src/reader.c (epilogue_set): New.
19540 * src/parse-gram.y: Use it.
19542 * data/bison.simple, data/bison.c++: b4_stype is now either not
19543 defined, then default to int, or to the contents of %union,
19544 without `union' itself.
19546 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
19548 * src/output.c (actions_output): Don't output braces, as they are
19549 already handled by the scanner.
19551 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
19552 characters to themselves.
19554 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
19555 that the epilogue has a proper #line.
19557 * src/parse-gram.y: Handle precedence/associativity.
19559 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
19561 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
19562 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
19563 at all to define terminals that cannot be emitted.
19565 * src/scan-gram.l: Escape M4 characters.
19567 * src/scan-gram.l: Working properly with escapes in user
19568 strings/characters.
19570 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
19571 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
19573 Use more modest sizes, as for the time being the parser does not
19574 release memory, and therefore the process swallows a huge amount
19577 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
19578 stricter %token grammar.
19580 * src/symtab.h (associativity): Add `undef_assoc'.
19581 (symbol_precedence_set): Do nothing when passed an undef_assoc.
19582 * src/symtab.c (symbol_check_alias_consistence): Adjust.
19584 * tests/regression.at (Invalid %directive): Remove, as it is now
19586 (Invalid inputs): Adjust to the new error messages.
19587 (Token definitions): The new grammar doesn't allow too many
19590 * src/lex.h, src/lex.c: Remove.
19591 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
19592 (copy_character, copy_string2, copy_string, copy_identifier)
19593 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
19594 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
19595 (parse_action): Remove.
19596 * po/POTFILES.in: Adjust.
19598 2002-06-11 Akim Demaille <akim@epita.fr>
19600 * src/reader.c (parse_action): Don't store directly into the
19601 rule's action member: return the action as a string.
19602 Don't require `rule_length' as an argument: compute it.
19603 (grammar_current_rule_symbol_append)
19604 (grammar_current_rule_action_append): New, eved out from
19606 Remove `action_flag', `rulelength', unused now.
19608 2002-06-11 Akim Demaille <akim@epita.fr>
19610 * src/reader.c (grammar_current_rule_prec_set).
19611 (grammar_current_rule_check): New, eved out from...
19613 Remove `xaction', `first_rhs': useless.
19614 * tests/input.at (Type clashes): New.
19615 * tests/existing.at (GNU Cim Grammar): Adjust.
19617 2002-06-11 Akim Demaille <akim@epita.fr>
19619 * src/reader.c (grammar_midrule_action): New, Eved out from
19622 2002-06-11 Akim Demaille <akim@epita.fr>
19624 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
19626 (readgram): Use them as replacement of inlined code, crule and
19629 2002-06-11 Akim Demaille <akim@epita.fr>
19631 * src/reader.c (grammar_end, grammar_symbol_append): New.
19632 (readgram): Use them.
19633 Make the use of `p' as local as possible.
19635 2002-06-10 Akim Demaille <akim@epita.fr>
19637 GCJ's parser requires the tokens to be defined before the prologue.
19639 * data/bison.simple: Output the token definition before the user's
19641 * tests/regression.at (Braces parsing, Duplicate string)
19642 (Mixing %token styles): Check the output from bison.
19643 (Early token definitions): New.
19645 2002-06-10 Akim Demaille <akim@epita.fr>
19647 * src/symtab.c (symbol_user_token_number_set): Don't complain when
19648 assigning twice the same user number to a token, so that we can
19650 * src/lex.c (lex): here.
19651 Also use `symbol_class_set' instead of hand written code.
19652 * src/reader.c (parse_assoc_decl): Likewise.
19654 2002-06-10 Akim Demaille <akim@epita.fr>
19656 * src/symtab.c, src/symtab.c (symbol_class_set)
19657 (symbol_user_token_number_set): New.
19658 * src/reader.c (parse_token_decl): Use them.
19659 Use a switch instead of ifs.
19660 Use a single argument.
19662 2002-06-10 Akim Demaille <akim@epita.fr>
19664 Remove `%thong' support as it is undocumented, unused, duplicates
19665 `%token's job, and creates useless e-mail traffic with people who
19666 want to know what it is, why it is undocumented, unused, and
19667 duplicates `%token's job.
19669 * src/reader.c (parse_thong_decl): Remove.
19670 * src/options.c (option_table): Remove "thong".
19671 * src/lex.h (tok_thong): Remove.
19673 2002-06-10 Akim Demaille <akim@epita.fr>
19675 * src/symtab.c, src/symtab.c (symbol_type_set)
19676 (symbol_precedence_set): New.
19677 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
19678 (value_components_used): Remove, unused.
19680 2002-06-09 Akim Demaille <akim@epita.fr>
19682 Move symbols handling code out of the reader.
19684 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
19685 (axiom): Move to...
19686 * src/symtab.h, src/symtab.c: here.
19688 * src/gram.c (start_symbol): Remove: use startsymbol->number.
19689 * src/reader.c (startval): Rename as...
19690 * src/symtab.h, src/symtab.c (startsymbol): this.
19691 * src/reader.c: Adjust.
19693 * src/reader.c (symbol_check_defined, symbol_make_alias)
19694 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19695 (token_translations_init)
19697 * src/symtab.c: here.
19698 * src/reader.c (packsymbols): Move to...
19699 * src/symtab.h, src/symtab.c (symbols_pack): here.
19700 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
19703 2002-06-03 Akim Demaille <akim@epita.fr>
19705 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
19708 2002-06-03 Akim Demaille <akim@epita.fr>
19710 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
19711 structs with non literals.
19712 * src/scan-skel.l: never-interactive.
19713 * src/conflicts.c (enum conflict_resolution_e): No trailing
19715 * src/getargs.c (usage): Split long literal strings.
19716 Reported by Hans Aberg.
19718 2002-05-28 Akim Demaille <akim@epita.fr>
19720 * data/bison.c++: Use C++ ostreams.
19721 (cdebug_): New member.
19723 2002-05-28 Akim Demaille <akim@epita.fr>
19725 * src/output.c (output_skeleton): Be sure to allocate enough room
19726 for `/' _and_ for `\0' in full_skeleton.
19728 2002-05-28 Akim Demaille <akim@epita.fr>
19730 * data/bison.c++: Catch up with bison.simple:
19731 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19732 and Paul Eggert <eggert@twinsun.com>: `error' handing.
19733 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
19734 and popping traces.
19736 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19738 * src/output.c (output_skeleton): Put an explicit path in front of
19739 the skeleton file name, rather than relying on the -I directory,
19740 to partially alleviate effects of having a skeleton file lying around
19741 in the current directory.
19743 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19745 * src/conflicts.c (log_resolution): Correct typo:
19746 obstack_printf should be obstack_fgrow1.
19748 2002-05-26 Akim Demaille <akim@epita.fr>
19750 * src/state.h (state_t): `solved_conflicts' is a new member.
19751 * src/LR0.c (new_state): Set it to 0.
19752 * src/conflicts.h, src/conflicts.c (print_conflicts)
19753 (free_conflicts, solve_conflicts): Rename as...
19754 (conflicts_print, conflicts_free, conflicts_solve): these.
19756 * src/conflicts.c (enum conflict_resolution_e)
19757 (solved_conflicts_obstack): New, used by...
19758 (log_resolution): this.
19759 Adjust to attach the conflict resolution to each state.
19760 Complete the description with the precedence/associativity
19762 (resolve_sr_conflict): Adjust.
19763 * src/print.c (print_state): Output its solved_conflicts.
19764 * tests/conflicts.at (Unresolved SR Conflicts)
19765 (Solved SR Conflicts): Exercise --report=all.
19767 2002-05-26 Akim Demaille <akim@epita.fr>
19769 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19770 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19771 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
19772 (token_number_t, item_number_as_token_number)
19773 (token_number_as_item_number, muscle_insert_token_number_table):
19775 (symbol_number_t, item_number_as_symbol_number)
19776 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
19777 these, since it is more appropriate.
19779 2002-05-26 Akim Demaille <akim@epita.fr>
19781 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
19783 * data/bison.simple (yystos) [YYDEBUG]: New.
19784 (yyparse) [YYDEBUG]: Display the symbols which are popped during
19786 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
19788 2002-05-25 Akim Demaille <akim@epita.fr>
19790 * doc/bison.texinfo (Debugging): Split into...
19791 (Tracing): this new section, its former contents, and...
19792 (Understanding): this new section.
19793 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
19795 (report_flag): this.
19796 Adjust all dependencies.
19797 (report_args, report_types, report_argmatch): New.
19798 (usage, getargs): Report/support -r, --report.
19800 (struct option_table_struct): Rename as..,
19801 (struct option_table_s): this.
19802 Rename the `set_flag' member to `flag' to match with getopt_long's
19804 * src/options.c (option_table): Split verbose into an entry for
19805 %verbose, and another for --verbose.
19806 Support --report/-r, so remove -r from the obsolete --raw.
19807 * src/print.c: Attach full item sets and lookaheads reports to
19808 report_flag instead of trace_flag.
19809 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
19811 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19812 and Paul Eggert <eggert@twinsun.com>
19814 * data/bison.simple (yyparse): Correct error handling to conform to
19815 POSIX and yacc. Specifically, after syntax error is discovered,
19816 do not reduce further before shifting the error token.
19817 Clean up the code a bit by removing the labels yyerrdefault,
19818 yyerrhandle, yyerrpop.
19819 * NEWS: Document the above.
19821 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19823 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
19824 type; it isn't always big enough, since it doesn't necessarily
19825 include non-terminals.
19826 (yytranslate): Expand definition of yy_token_number_type, so that
19827 the latter can be removed.
19828 (yy_token_number_type): Remove, only one use.
19829 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
19830 don't use TokenNumberType as element type.
19832 * tests/regression.at: Modify expected output to agree with change
19833 to yyr1 and yytranslate.
19835 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
19837 * src/reader.c (parse_action): Use copy_character instead of
19840 2002-05-13 Akim Demaille <akim@epita.fr>
19842 * tests/regression.at (Token definitions): Prototype yylex and
19845 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19847 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
19848 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
19850 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
19852 2002-05-07 Akim Demaille <akim@epita.fr>
19854 * tests/synclines.at: Be sure to prototype yylex and yyerror to
19855 avoid GCC warnings.
19857 2002-05-07 Akim Demaille <akim@epita.fr>
19861 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
19862 over the RHS of each rule.
19863 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
19864 * src/state.h (state_t): Member `nitems' is unsigned short.
19865 * src/LR0.c (get_state): Adjust.
19866 * src/reader.c (packgram): Likewise.
19867 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
19869 (muscle_insert_int_table): Remove, unused.
19870 (prepare_rules): Remove `max'.
19872 2002-05-06 Akim Demaille <akim@epita.fr>
19874 * src/closure.c (print_firsts): Display of the symbol tags.
19875 (bitmatrix_print): Move to...
19876 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
19878 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
19880 2002-05-06 Akim Demaille <akim@epita.fr>
19882 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
19885 2002-05-06 Akim Demaille <akim@epita.fr>
19887 * src/LR0.c (new_state, get_state): Instead of using the global
19888 `kernel_size' and `kernel_base', have two new arguments:
19889 `core_size' and `core'.
19892 2002-05-06 Akim Demaille <akim@epita.fr>
19894 * src/reader.c (packgram): No longer end `ritem' with a 0
19895 sentinel: it is not used.
19897 2002-05-05 Akim Demaille <akim@epita.fr>
19899 New experimental feature: display the lookaheads in the report and
19902 * src/print (print_core): When --trace-flag, display the rules
19904 * src/print_graph.c (print_core): Likewise.
19905 Swap the arguments.
19908 2002-05-05 Akim Demaille <akim@epita.fr>
19910 * tests/torture.at (Many lookaheads): New test.
19912 2002-05-05 Akim Demaille <akim@epita.fr>
19914 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
19915 (GENERATE_MUSCLE_INSERT_TABLE): this.
19916 (output_int_table, output_unsigned_int_table, output_short_table)
19917 (output_token_number_table, output_item_number_table): Replace with...
19918 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
19919 (muscle_insert_short_table, muscle_insert_token_number_table)
19920 (muscle_insert_item_number_table): these.
19921 Adjust all callers.
19922 (prepare_tokens): Don't free `translations', since...
19923 * src/reader.h, src/reader.c (grammar_free): do it.
19925 * src/gram.h, src/gram.c (grammar_free): here.
19926 * data/bison.simple, data/bison.c++: b4_token_number_max is now
19929 2002-05-05 Akim Demaille <akim@epita.fr>
19931 * src/output.c (output_unsigned_int_table): New.
19932 (prepare_rules): `i' is unsigned.
19933 `prhs', `rline', `r2' are unsigned int.
19934 Rename muscle `rhs_number_max' as `rhs_max'.
19935 Output muscles `prhs_max', `rline_max', and `r2_max'.
19937 * data/bison.simple, data/bison.c++: Adjust to use these muscles
19938 to compute types instead of constant types.
19939 * tests/regression.at (Web2c Actions): Adjust.
19941 2002-05-04 Akim Demaille <akim@epita.fr>
19943 * src/symtab.h (SALIAS, SUNDEF): Rename as...
19944 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
19945 Adjust dependencies.
19946 * src/output.c (token_definitions_output): Be sure not to output a
19947 `#define 'a'' when fed with `%token 'a' "a"'.
19948 * tests/regression.at (Token definitions): New.
19950 2002-05-03 Paul Eggert <eggert@twinsun.com>
19952 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
19955 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
19957 * Makefile.am (SUBDIRS): Remove intl.
19958 (EXTRA_DIST): Add config/config.rpath.
19960 2002-05-03 Akim Demaille <akim@epita.fr>
19962 * data/bison.simple (m4_if): Don't output empty enums.
19963 And actually, output valid enum definitions :(.
19965 2002-05-03 Akim Demaille <akim@epita.fr>
19967 * configure.bat: Remove, completely obsolete.
19968 * Makefile.am (EXTRA_DIST): Adjust.
19969 Don't distribute config.rpath...
19970 * config/Makefile.am (EXTRA_DIST): Do it.
19972 2002-05-03 Akim Demaille <akim@epita.fr>
19974 * configure.in (GETTEXT_VERSION): New.
19975 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
19977 2002-05-03 Akim Demaille <akim@epita.fr>
19979 * data/bison.simple (b4_token_enum): New.
19980 (b4_token_defines): Use it to output tokens both as #define and
19982 Suggested by Paul Eggert.
19983 * src/output.c (token_definitions_output): Don't output spurious
19986 2002-05-03 Akim Demaille <akim@epita.fr>
19988 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19990 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
19992 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
19993 Update the stack class, give a try to deque as the default container.
19995 2002-05-02 Akim Demaille <akim@epita.fr>
19997 * data/bison.simple (yyparse): Do not implement @$ = @1.
19998 (YYLLOC_DEFAULT): Adjust to do it.
19999 * doc/bison.texinfo (Location Default Action): Fix.
20001 2002-05-02 Akim Demaille <akim@epita.fr>
20003 * src/reader.c (parse_braces): Merge into...
20004 (parse_action): this.
20006 2002-05-02 Akim Demaille <akim@epita.fr>
20008 * configure.in (ALL_LINGUAS): Remove.
20009 * po/LINGUAS, hr.po: New.
20011 2002-05-02 Akim Demaille <akim@epita.fr>
20013 Remove the so called hairy (semantic) parsers.
20015 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
20016 * src/gram.h, src/gram.c (semantic_parser): Remove.
20017 (rule_t): Remove the guard and guard_line members.
20018 * src/lex.h (token_t): remove tok_guard.
20019 * src/options.c (option_table): Remove %guard and %semantic_parser
20021 * src/output.c, src/output.h (guards_output): Remove.
20023 (token_definitions_output): Don't output the `T'
20025 (output_skeleton): Don't output the guards.
20026 * src/files.c, src/files.c (attrsfile): Remove.
20027 * src/reader.c (symbol_list): Remove the guard and guard_line
20029 Adjust dependencies.
20030 (parse_guard): Remove.
20031 * data/bison.hairy: Remove.
20032 * doc/bison.texinfo (Environment Variables): Remove occurrences of
20035 2002-05-02 Akim Demaille <akim@epita.fr>
20037 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
20038 (parse_guard): Rename the formal argument `stack_offset' as
20039 `rule_length', which is more readable.
20041 (copy_at, copy_dollar): Instead of outputting the hard coded
20042 values of $$, $n and so forth, output invocation to b4_lhs_value,
20043 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
20044 Note: this patch partially drops `semantic-parser' support: it
20045 always does `rule_length - n', where semantic parsers ought to
20047 * data/bison.simple, data/bison.c++ (b4_lhs_value)
20048 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
20050 2002-05-02 Akim Demaille <akim@epita.fr>
20052 * configure.in (AC_INIT): Bump to 1.49b.
20053 (AM_INIT_AUTOMAKE): Short invocation.
20055 2002-05-02 Akim Demaille <akim@epita.fr>
20059 2002-05-01 Akim Demaille <akim@epita.fr>
20061 * src/skeleton.h: Remove.
20063 2002-05-01 Akim Demaille <akim@epita.fr>
20065 * src/skeleton.h: Fix the #endif.
20066 Reported by Magnus Fromreide.
20068 2002-04-26 Paul Eggert <eggert@twinsun.com>
20070 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
20071 Define if we define YYSTYPE and YYLTYPE, respectively.
20072 (YYCOPY): Fix [] quoting problem in the non-GCC case.
20074 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
20076 * src/scan-skel.l: Postprocess quadrigraphs.
20078 * src/reader.c (copy_character): New function, used to output
20079 single characters while replacing `[' and `]' with quadrigraphs, to
20080 avoid troubles with M4 quotes.
20081 (copy_comment): Output characters with copy_character.
20082 (read_additionnal_code): Likewise.
20083 (copy_string2): Likewise.
20084 (copy_definition): Likewise.
20086 * tests/calc.at: Exercise M4 quoting.
20088 2002-04-25 Akim Demaille <akim@epita.fr>
20090 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
20091 between `!' and the command.
20092 Reported by Paul Eggert.
20094 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
20096 * tests/calc.at: Exercise prologue splitting.
20098 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
20099 `b4_post_prologue' instead of `b4_prologue'.
20101 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
20103 (output): Free pre_prologue_obstack and post_prologue_obstack.
20104 * src/files.h, src/files.c (attrs_obstack): Remove.
20105 (pre_prologue_obstack, post_prologue_obstack): New.
20106 * src/reader.c (copy_definition): Add a parameter to specify the
20107 obstack to fill, instead of using attrs_obstack unconditionally.
20108 (read_declarations): Pass pre_prologue_obstack to copy_definition if
20109 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
20111 2002-04-23 Paul Eggert <eggert@twinsun.com>
20113 * data/bison.simple: Remove unnecessary commentary and white
20114 space differences from 1_29-branch.
20115 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
20117 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
20118 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
20119 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
20120 constructors or destructors.
20122 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
20124 2002-04-23 Akim Demaille <akim@epita.fr>
20126 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
20127 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
20128 location with columns.
20129 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
20130 All reported by Paul Eggert.
20132 2002-04-22 Akim Demaille <akim@epita.fr>
20134 * src/reduce.c (dump_grammar): Move to...
20135 * src/gram.h, src/gram.c (grammar_dump): here.
20136 Be sure to separate long item numbers.
20137 Don't read the members of a rule's prec if its nil.
20139 2002-04-22 Akim Demaille <akim@epita.fr>
20141 * src/output.c (table_size, table_grow): New.
20142 (MAXTABLE): Remove, replace uses with table_size.
20143 (pack_vector): Instead of dying when the table is too big, grow it.
20145 2002-04-22 Akim Demaille <akim@epita.fr>
20147 * data/bison.simple (yyr1): Its type is that of a token number.
20148 * data/bison.c++ (r1_): Likewise.
20149 * tests/regression.at (Web2c Actions): Adjust.
20151 2002-04-22 Akim Demaille <akim@epita.fr>
20153 * src/reader.c (token_translations_init): 256 is now the default
20154 value for the error token, i.e., it will be assigned another
20155 number if the user assigned 256 to one of her tokens.
20156 (reader): Don't force 256 to error.
20157 * doc/bison.texinfo (Symbols): Adjust.
20158 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
20159 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
20160 etc. instead of 10, 20, 30 (which was used to `jump' over error
20161 (256) and undefined (2)).
20163 2002-04-22 Akim Demaille <akim@epita.fr>
20165 Propagate more token_number_t.
20167 * src/gram.h (token_number_as_item_number)
20168 (item_number_as_token_number): New.
20169 * src/output.c (GENERATE_OUTPUT_TABLE): New.
20170 Use it to create output_item_number_table and
20171 output_token_number_table.
20172 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
20173 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
20174 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
20175 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
20177 2002-04-22 Akim Demaille <akim@epita.fr>
20179 * src/output.h, src/output.c (get_lines_number): Remove.
20181 2002-04-19 Akim Demaille <akim@epita.fr>
20183 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
20185 (Debugging): More details about enabling the debugging features.
20186 (Table of Symbols): Describe $$, $n, @$, and @n.
20187 Suggested by Tim Josling.
20189 2002-04-19 Akim Demaille <akim@epita.fr>
20191 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
20193 2002-04-10 Akim Demaille <akim@epita.fr>
20195 * src/system.h: Rely on HAVE_LIMITS_H.
20196 Suggested by Paul Eggert.
20198 2002-04-09 Akim Demaille <akim@epita.fr>
20200 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
20201 full stderr, and strip it according to the bison options, instead
20202 of composing the error message from different bits.
20203 This makes it easier to check for several error messages.
20204 Adjust all the invocations.
20205 Add an invocation exercising the error token.
20206 Add an invocation demonstrating a stupid error message.
20207 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
20209 Error message are for stderr, not stdout.
20211 2002-04-09 Akim Demaille <akim@epita.fr>
20213 * src/gram.h, src/gram.c (error_token_number): Remove, use
20215 * src/reader.c (reader): Don't specify the user token number (2)
20216 for $undefined, as it uselessly prevents using it.
20217 * src/gram.h (token_number_t): Move to...
20218 * src/symtab.h: here.
20219 (state_t.number): Is a token_number_t.
20220 * src/print.c, src/reader.c: Use undeftoken->number instead of
20222 (Even though this 2 is not the same as above: the number of the
20223 undeftoken remains being 2, it is its user token number which
20225 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
20226 `user_token_number_max'.
20227 Output `undef_token_number'.
20228 * data/bison.simple, data/bison.c++: Use them.
20229 Be sure to map invalid yylex return values to
20230 `undef_token_number'. This saves us from gratuitous SEGV.
20232 * tests/conflicts.at (Solved SR Conflicts)
20233 (Unresolved SR Conflicts): Adjust.
20234 * tests/regression.at (Web2c Actions): Adjust.
20236 2002-04-08 Akim Demaille <akim@epita.fr>
20238 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
20240 Remove the duplicate `typedefs'.
20241 (RhsNumberType): Fix the declaration and various other typos.
20243 * data/bison.simple: Use __ofile__.
20244 * src/scan-skel.l: Handle __ofile__.
20246 2002-04-08 Akim Demaille <akim@epita.fr>
20248 * src/gram.h (item_number_t): New, the type of item numbers in
20249 RITEM. Note that it must be able to code symbol numbers as
20250 positive number, and the negation of rule numbers as negative
20252 Adjust all dependencies (pretty many).
20253 * src/reduce.c (rule): Remove this `short *' pointer: use
20255 * src/system.h (MINSHORT, MAXSHORT): Remove.
20256 Include `limits.h'.
20257 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
20258 (shortcpy): Remove.
20259 (MAXTABLE): Move to...
20260 * src/output.c (MAXTABLE): here.
20261 (prepare_rules): Use output_int_table to output rhs.
20262 * data/bison.simple, data/bison.c++: Adjust.
20263 * tests/torture.at (Big triangle): Move the limit from 254 to
20265 * tests/regression.at (Web2c Actions): Ajust.
20267 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
20268 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
20269 passes, but produces negative #line number, once fixed, GCC is
20270 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
20272 * src/state.h (state_h): Code input lines on ints, not shorts.
20274 2002-04-08 Akim Demaille <akim@epita.fr>
20276 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
20277 and then the grammar.
20279 2002-04-08 Akim Demaille <akim@epita.fr>
20281 * src/system.h: No longer using strndup.
20283 2002-04-07 Akim Demaille <akim@epita.fr>
20285 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
20286 * src/output.c (output_table_data): Return the longest number.
20287 (prepare_tokens): Output `token_number_max').
20288 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
20290 Use them to define yy_token_number_type/TokenNumberType.
20291 Use this type for yytranslate.
20292 * tests/torture.at (Big triangle): Push the limit from 124 to
20294 * tests/regression.at (Web2c Actions): Adjust.
20296 2002-04-07 Akim Demaille <akim@epita.fr>
20298 * tests/torture.at (Big triangle): New.
20299 (GNU AWK Grammar, GNU Cim Grammar): Move to...
20300 * tests/existing.at: here.
20302 2002-04-07 Akim Demaille <akim@epita.fr>
20304 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
20306 Adjust dependencies.
20308 2002-04-07 Akim Demaille <akim@epita.fr>
20310 * src/reader.c: Normalize increments to prefix form.
20312 2002-04-07 Akim Demaille <akim@epita.fr>
20314 * src/reader.c, symtab.c: Remove debugging code.
20316 2002-04-07 Akim Demaille <akim@epita.fr>
20318 Rename all the `bucket's as `symbol_t'.
20320 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
20321 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
20322 * src/symtab.c, src/symtab.h (bucket): Rename as...
20324 (symbol_list_new, bucket_check_defined, bucket_make_alias)
20325 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
20326 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20327 (buckets_new, buckets_free, buckets_do): Rename as...
20328 (symbol_list_new, symbol_check_defined, symbol_make_alias)
20329 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
20330 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
20331 (symbols_new, symbols_free, symbols_do): these.
20333 2002-04-07 Akim Demaille <akim@epita.fr>
20335 Use lib/hash for the symbol table.
20337 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
20339 * src/lex.c (lex): Set the `number' member of new terminals.
20340 * src/reader.c (bucket_check_defined, bucket_make_alias)
20341 (bucket_check_alias_consistence, bucket_translation): New.
20342 (reader, grammar_free, readgram, token_translations_init)
20343 (packsymbols): Adjust.
20344 (reader): Number the predefined tokens.
20345 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
20346 for predefined tokens.
20347 * src/symtab.h (bucket): Remove all the hash table related
20349 * src/symtab.c (symtab): Replace by...
20350 (bucket_table): this.
20351 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20352 (buckets_new, buckets_do): New.
20354 2002-04-07 Akim Demaille <akim@epita.fr>
20356 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
20357 (start_symbol, max_user_token_number, semantic_parser)
20358 (error_token_number): Initialize.
20359 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
20362 (errtoken, eoftoken, undeftoken, axiom): Extern.
20364 2002-04-07 Akim Demaille <akim@epita.fr>
20366 * src/gram.h (rule_s): prec and precsym are now pointers
20367 to the bucket giving the priority/associativity.
20368 Member `associativity' removed: useless.
20369 * src/reduce.c, src/conflicts.c: Adjust.
20371 2002-04-07 Akim Demaille <akim@epita.fr>
20373 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
20374 Properly escape the symbols' TAG when outputting them.
20376 2002-04-07 Akim Demaille <akim@epita.fr>
20378 * src/lalr.h (LA): Is a bitsetv, not bitset*.
20380 2002-04-07 Akim Demaille <akim@epita.fr>
20382 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
20383 (LArule): this, which is an array to rule_t*.
20384 * src/print.c, src/conflicts.c: Adjust.
20386 2002-04-07 Akim Demaille <akim@epita.fr>
20388 * src/gram.h (rule_t): Rename `number' as `user_number'.
20389 `number' is a new member.
20390 Adjust dependencies.
20391 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
20393 2002-04-07 Akim Demaille <akim@epita.fr>
20395 As a result of the previous patch, it is no longer needed
20396 to reorder ritem itself.
20398 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
20400 2002-04-07 Akim Demaille <akim@epita.fr>
20402 Be sure never to walk through RITEMS, but use only data related to
20403 the rules themselves. RITEMS should be banished.
20405 * src/output.c (output_token_translations): Rename as...
20406 (prepare_tokens): this.
20407 In addition to `translate', prepare the muscles `tname' and
20408 `toknum', which were handled by...
20409 (output_rule_data): this.
20410 Remove, and move the remainder of its outputs into...
20411 (prepare_rules): this new routines, which also merges content from
20412 (output_gram): this.
20413 (prepare_rules): Be sure never to walk through RITEMS.
20414 (output_stos): Rename as...
20415 (prepare_stos): this.
20416 (output): Always invoke prepare_states, after all, just don't use it
20417 in the output if you don't need it.
20419 2002-04-07 Akim Demaille <akim@epita.fr>
20421 * src/LR0.c (new_state): Display `nstates' as the name of the
20422 newly created state.
20423 Adjust to initialize first_state and last_state if needed.
20424 Be sure to distinguish the initial from the final state.
20425 (new_states): Create the itemset of the initial state, and use
20427 * src/closure.c (closure): Now that the initial state has its
20428 items properly set, there is no need for a special case when
20429 creating `ruleset'.
20431 As a result, now the rule 0, reducing to $axiom, is visible in the
20432 outputs. Adjust the test suite.
20434 * tests/conflicts.at (Solved SR Conflicts)
20435 (Unresolved SR Conflicts): Adjust.
20436 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
20437 * tests/conflicts.at (S/R in initial): New.
20439 2002-04-07 Akim Demaille <akim@epita.fr>
20441 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
20442 the RHS of the rules.
20443 * src/output.c (output_gram): Likewise.
20445 2002-04-07 Akim Demaille <akim@epita.fr>
20447 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
20449 Adjust all dependencies.
20450 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
20451 `number' of the buckets too.
20452 * src/gram.h: Include `symtab.h'.
20453 (associativity): Move to...
20454 * src/symtab.h: here.
20455 No longer include `gram.h'.
20457 2002-04-07 Akim Demaille <akim@epita.fr>
20459 * src/gram.h, src/gram.c (rules_rhs_length): New.
20460 (ritem_longest_rhs): Use it.
20461 * src/gram.h (rule_t): `number' is a new member.
20462 * src/reader.c (packgram): Set it.
20463 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
20464 the end of `rules', and count them out of `nrules'.
20465 (reduce_output, dump_grammar): Adjust.
20466 * src/print.c (print_grammar): It is no longer needed to check for
20467 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
20468 * tests/reduce.at (Reduced Automaton): New test.
20470 2002-04-07 Akim Demaille <akim@epita.fr>
20472 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
20473 lacking `+ 1' to nrules, Bison reported as useless a token if it
20474 was used solely to set the precedence of the last rule...
20476 2002-04-07 Akim Demaille <akim@epita.fr>
20478 * data/bison.c++, data/bison.simple: Don't output the current file
20479 name in #line, to avoid useless diffs between two identical
20480 outputs under different names.
20482 2002-04-07 Akim Demaille <akim@epita.fr>
20484 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
20485 Normalize loops to using `< nrules + 1', not `<= nrules'.
20487 2002-04-07 Akim Demaille <akim@epita.fr>
20491 2002-04-07 Akim Demaille <akim@epita.fr>
20493 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
20494 bucket.value as bucket.number.
20496 2002-04-07 Akim Demaille <akim@epita.fr>
20498 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
20499 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
20500 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
20501 RHS, instead of being an index in RITEMS.
20503 2002-04-04 Paul Eggert <eggert@twinsun.com>
20505 * doc/bison.texinfo: Update copyright date.
20506 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
20507 (Symbols): Warn about running Bison in one character set,
20508 but compiling and/or running in an incompatible one.
20509 Warn about character code 256, too.
20511 2002-04-03 Paul Eggert <eggert@twinsun.com>
20513 * src/bison.data (YYSTACK_ALLOC): Depend on whether
20514 YYERROR_VERBOSE is nonzero, not whether it is defined.
20516 Merge changes from bison-1_29-branch.
20518 2002-03-20 Paul Eggert <eggert@twinsun.com>
20520 Merge fixes from Debian bison_1.34-1.diff.
20522 * configure.in (AC_PREREQ): 2.53.
20524 2002-03-20 Akim Demaille <akim@epita.fr>
20526 * src/conflicts.c (log_resolution): Argument `resolution' is const.
20528 2002-03-19 Paul Eggert <eggert@twinsun.com>
20530 * src/bison.simple (YYCOPY): New macro.
20531 (YYSTACK_RELOCATE): Use it.
20532 Remove Type arg; no longer needed. All callers changed.
20533 (yymemcpy): Remove; no longer needed.
20535 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
20536 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
20538 2002-03-19 Akim Demaille <akim@epita.fr>
20540 Test and fix the #line outputs.
20542 * tests/atlocal.at (GCC): New.
20543 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
20544 (Prologue synch line, %union synch line, Postprologue synch line)
20545 (Action synch line, Epilogue synch line): New tests.
20546 * src/reader.c (parse_union_decl): Define the muscle stype_line.
20547 * data/bison.simple, data/bison.c++: Use it.
20549 2002-03-19 Akim Demaille <akim@epita.fr>
20551 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
20552 (Solved SR Conflicts, %expect not enough, %expect right)
20553 (%expect too much): Move to...
20554 * tests/conflicts.at: this new file.
20556 2002-03-19 Akim Demaille <akim@epita.fr>
20558 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
20559 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
20560 that we can move to enums for instance.
20561 * src/output.c (token_definitions_output): Output a list of
20562 `token-name, token-number' instead of the #define.
20563 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
20565 2002-03-14 Akim Demaille <akim@epita.fr>
20567 Use Gettext 0.11.1.
20569 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
20571 * data/bison.c++: Make the user able to add members to the generated
20572 parser by subclassing.
20574 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
20576 * src/reader.c (read_additionnal_code): `c' should be an integer, not
20578 Reported by Nicolas Tisserand and Nicolas Burrus.
20580 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20582 * src/reader.c: Warn about lacking semi-colons, do not complain.
20584 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20586 * data/bison.c++: Remove a debug line.
20588 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20590 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
20591 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
20592 provide a default implementation.
20594 2002-03-04 Akim Demaille <akim@epita.fr>
20596 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
20597 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
20598 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
20599 * tests/semantic.at (Parsing Guards): Similarly.
20600 * src/reader.at (readgram): Complain if the last rule is not ended
20603 2002-03-04 Akim Demaille <akim@epita.fr>
20605 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
20606 * src/closure.c: here.
20607 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
20609 * src/warshall.h, src/warshall.c: Remove.
20610 * tests/sets.at (Broken Closure): Adjust.
20612 2002-03-04 Akim Demaille <akim@epita.fr>
20614 * src/output.c (output_skeleton): tempdir is const.
20615 bytes_read is unused.
20617 2002-03-04 Akim Demaille <akim@epita.fr>
20619 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20620 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
20622 From Michael Hayes.
20624 2002-03-04 Akim Demaille <akim@epita.fr>
20626 * src/closure.c (closure): `r' is unused.
20628 2002-03-04 Akim Demaille <akim@epita.fr>
20630 * tests/sets.at (Broken Closure): Add the ending `;'.
20631 * src/reader.at (readgram): Complain if a rule is not ended with a
20634 2002-03-04 Akim Demaille <akim@epita.fr>
20636 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
20637 (count_sr_conflicts): Use bitset_count.
20638 * src/reduce.c (inaccessable_symbols): Ditto.
20639 (bits_size): Remove.
20640 * src/warshall.h, src/warshall.c: Convert to bitsetv.
20642 2002-03-04 Akim Demaille <akim@epita.fr>
20644 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
20645 * src/reduce.c: Remove the `bitset_zero's following the
20646 `bitset_create's, as now it is performed by the latter.
20648 2002-03-04 Akim Demaille <akim@epita.fr>
20650 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
20651 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
20652 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
20653 latest sources from Michael.
20655 2002-03-04 Akim Demaille <akim@epita.fr>
20657 * src/output.c (output): Don't free the grammar.
20658 * src/reader.c (grammar_free): New.
20659 * src/main.c (main): Call it and don't free symtab here.
20661 2002-03-04 Akim Demaille <akim@epita.fr>
20663 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
20665 Reported by Benoit Perrot.
20667 2002-03-04 Akim Demaille <akim@epita.fr>
20669 Use bitset operations when possible, not loops over bits.
20671 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
20673 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
20674 * src/reduce.c (useless_nonterminals): Formatting changes.
20675 * src/warshall.c (TC): Use bitset_or.
20677 2002-03-04 Akim Demaille <akim@epita.fr>
20679 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
20680 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
20683 2002-03-04 Akim Demaille <akim@epita.fr>
20685 * src/lalr.c (F): Now a bitset*.
20686 Adjust all dependencies.
20688 2002-03-04 Akim Demaille <akim@epita.fr>
20690 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
20691 Adjust all dependencies.
20693 2002-03-04 Akim Demaille <akim@epita.fr>
20695 * src/L0.c, src/LR0.h (nstates): Be size_t.
20696 Adjust comparisons (signed vs unsigned).
20697 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
20699 Adjust all dependencies.
20701 2002-03-04 Akim Demaille <akim@epita.fr>
20703 * src/closure.c (firsts): Now, also a bitset.
20704 Adjust all dependencies.
20705 (varsetsize): Remove, now unused.
20706 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
20708 2002-03-04 Akim Demaille <akim@epita.fr>
20710 * src/print.c: Convert to use bitset.h, not hand coded iterations
20713 2002-03-04 Akim Demaille <akim@epita.fr>
20715 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
20717 2002-03-04 Akim Demaille <akim@epita.fr>
20719 * src/closure.c (ruleset): Be a bitset.
20720 (rulesetsize): Remove.
20722 2002-03-04 Akim Demaille <akim@epita.fr>
20724 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20725 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
20726 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
20727 * src/closure.c (fderives): Be an array of bitsets.
20729 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
20731 * data/bison.c++: Merge the two generated headers. Insert a copyright
20732 notice in each output file.
20734 2002-02-28 Akim Demaille <akim@epita.fr>
20736 * data/bison.c++: Copy the prologue of bison.simple to fetch
20737 useful M4 definitions, such as b4_header_guard.
20739 2002-02-25 Akim Demaille <akim@epita.fr>
20741 * src/getargs.c (version): Give the name of the authors, and use a
20742 translator friendly scheme for the bgr
20745 2002-02-25 Akim Demaille <akim@epita.fr>
20747 * src/output.c (header_output): Remove, now handled completely via
20750 2002-02-25 Akim Demaille <akim@epita.fr>
20752 * m4/m4.m4: New, from CVS Autoconf.
20753 * configure.in: Invoke it.
20754 * src/output.c (output_skeleton): Use its result instead of the
20757 2002-02-25 Akim Demaille <akim@epita.fr>
20759 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
20761 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
20762 * src/output.c (output_skeleton): Use mkstemp to create a real
20764 Move the filling of `skeleton' and its muscle to...
20766 (output): Move the definition of the prologue muscle to...
20768 * src/system.h (DEFAULT_TMPDIR): New.
20770 2002-02-14 Paul Eggert <eggert@twinsun.com>
20772 Remove the support for C++ namespace cleanliness; it was
20773 causing more problems than it was curing, since it didn't work
20774 properly on some nonstandard C++ compilers. This can wait
20775 for a proper C++ parser.
20777 * NEWS: Document this.
20778 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
20779 of C++, as it's treated like C now.
20780 * src/bison.simple (YYSTD): Remove.
20781 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
20782 Treat C++ just like Standard C instead of trying to support
20783 namespace cleanliness.
20785 2002-02-14 Akim Demaille <akim@epita.fr>
20787 * tests/regression.at (else): Adjust to Andreas' change.
20789 2002-02-14 Akim Demaille <akim@epita.fr>
20791 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
20793 2002-02-13 Andreas Schwab <schwab@suse.de>
20795 * src/output.c (output_rule_data): Don't output NULL, it might
20796 not be defined yet.
20798 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
20800 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
20801 (Copyright notice): Update.
20803 2002-02-11 Akim Demaille <akim@epita.fr>
20805 * tests/regression.at (%nonassoc and eof): Don't include
20806 nonportable headers.
20808 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
20810 * data/bison.c++: Correct error recovery. Make the user able to
20811 initialize the starting location.
20813 2002-02-07 Akim Demaille <akim@epita.fr>
20815 * tests/input.at: New.
20817 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20819 * data/bison.c++: Replace some direct m4 expansions by constants. Be
20820 more consistent when naming methods and variables. Put preprocessor
20821 directives around tables only needed for debugging.
20823 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20825 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
20827 (yy::b4_name::parse): Use print_.
20829 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20831 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
20833 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20835 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
20837 (yy::b4_name::parse): Build verbose error messages, and use error_.
20839 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20841 * data/bison.c++: Fix m4 quoting in comments.
20843 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20845 * data/bison.c++: Adjust the parser code. Fix some muscles that were
20846 not expanded by m4.
20848 2002-02-05 Akim Demaille <akim@epita.fr>
20850 * data/bison.c++: Adjust to the M4 back end.
20851 More is certainly needed.
20853 2002-02-05 Akim Demaille <akim@epita.fr>
20855 Give a try to M4 as a back end.
20857 * lib/readpipe.c: New, from wdiff.
20858 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
20860 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
20861 specific values. Now it is m4 that performs the lookup.
20862 * src/parse-skel.y: Remove.
20863 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
20864 * src/output.c (actions_output, guards_output)
20865 (token_definitions_output): No longer keeps track of the output
20866 line number, hence remove the second argument.
20867 (guards_output): Check against the guard member of a rule, not the
20870 (output_skeleton): Don't look for the skeleton location, let m4 do
20872 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
20874 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
20875 (prepare): Given that for the time being changesyntax is not
20876 usable in M4, rename the muscles using `-' to `_'.
20877 Define `defines_flag', `output_parser_name' and `output_header_name'.
20878 * src/output.h (actions_output, guards_output)
20879 (token_definitions_output): Adjust prototypes.
20880 * src/scan-skel.l: Instead of scanning the skeletons, it now
20881 processes the output of m4: `__oline__' and `#output'.
20882 * data/bison.simple: Adjust to be used by M4(sugar).
20883 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
20885 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
20886 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
20887 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
20888 shamelessly stolen from CVS Autoconf.
20890 2002-02-05 Akim Demaille <akim@epita.fr>
20892 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
20893 * configure.in: Check for the declarations of free and malloc.
20894 * src/muscle_tab.c: Adjust.
20896 2002-02-05 Akim Demaille <akim@epita.fr>
20898 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
20899 which have no values.
20901 2002-02-05 Akim Demaille <akim@epita.fr>
20903 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
20906 2002-01-29 Paul Eggert <eggert@twinsun.com>
20908 * src/bison.simple (YYSIZE_T): Do not define merely because
20909 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
20910 On some platforms, <alloca.h> does not declare YYSTD (size_t).
20912 2002-01-27 Akim Demaille <akim@epita.fr>
20914 Fix `%nonassoc and eof'.
20916 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
20917 which were not properly copied! Replace
20918 memcpy (res->errs, src->errs, src->nerrs);
20920 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
20922 * tests/regression.at (%nonassoc and eof): Adjust to newest
20923 Autotest: `.' is not in the PATH.
20925 2002-01-27 Akim Demaille <akim@epita.fr>
20927 * tests/sets.at (AT_EXTRACT_SETS): New.
20928 (Nullable): Use it.
20931 2002-01-26 Akim Demaille <akim@epita.fr>
20933 * tests/actions.at, tests/calc.at, tests/headers.at,
20934 * tests/torture.at: Adjust to the newest Autotest which no longer
20935 forces `.' in the PATH.
20937 2002-01-25 Akim Demaille <akim@epita.fr>
20939 * tests/regression.at (%nonassoc and eof): New.
20940 Suggested by Robert Anisko.
20942 2002-01-24 Akim Demaille <akim@epita.fr>
20944 Bison dumps core when trying to complain about broken input files.
20945 Reported by Cris van Pelt.
20947 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
20948 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
20950 (Invalid inputs): Strengthen: exercise parse_percent_token.
20952 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
20954 * src/Makefile.am: Add bison.c++.
20955 * src/bison.c++: New skeleton.
20957 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
20961 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
20963 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
20965 2002-01-20 Marc Autret <marc@gnu.org>
20967 * src/files.c (compute_output_file_names): Fix
20969 2002-01-20 Marc Autret <marc@gnu.org>
20971 * tests/output.at: New test.
20972 * src/files.c (compute_base_names): Don't map extensions when
20973 the YACC flag is set, use defaults.
20974 Reported by Evgeny Stambulchik.
20976 2002-01-20 Marc Autret <marc@gnu.org>
20978 * src/system.h: Need to define __attribute__ away for non-GCC
20979 compilers as well (i.e., the vendor C compiler).
20980 Suggested by Albert Chin-A-Young.
20982 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
20984 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
20985 canonical definition.
20986 * src/system.h: Use the canonical definition for PARAMS (avoids
20987 a conflict with the macro from lib/hash.h).
20989 2002-01-11 Akim Demaille <akim@epita.fr>
20991 * configure.in: Use AC_FUNC_STRNLEN.
20992 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
20994 2002-01-09 Akim Demaille <akim@epita.fr>
20996 * src/files.c, src/files.h (output_infix): New.
20997 (tab_extension): Remove.
20998 (compute_base_names): Compute the former, drop the latter.
20999 * src/output.c (prepare): Insert the muscles `output-infix', and
21001 * src/parse-skel.y (string, string.1): New.
21002 (section.header): Use it.
21003 (section.yacc): Remove.
21004 (prefix): Remove too.
21005 * src/scan-skel.l: Adjust.
21006 * src/bison.simple, src/bison.hairy: Adjust.
21008 2002-01-09 Akim Demaille <akim@epita.fr>
21010 * configure.in (WERROR_CFLAGS): Compute it.
21011 * src/Makefile.am (CFLAGS): Pass it.
21012 * tests/atlocal.in (CFLAGS): Idem.
21013 * src/files.c: Fix a few warnings.
21014 (get_extension_index): Remove, unused.
21016 2002-01-08 Akim Demaille <akim@epita.fr>
21018 * src/getargs.c (AS_FILE_NAME): New.
21019 (getargs): Use it to convert DOSish file names.
21020 * src/files.c (base_name): Rename as full_base_name to avoid
21021 clashes with `base_name ()'.
21022 (filename_split): New.
21023 (compute_base_names): N-th rewrite, using filename_split.
21025 2002-01-08 Akim Demaille <akim@epita.fr>
21027 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
21028 New, stolen from the Fileutils 4.1.
21029 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
21030 * configure.in: Check for the presence of memrchr, and of its
21033 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
21035 * lib/hash.h (__P): Added definition for this macro.
21036 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
21037 BUILT_SOURCES, to ensure they are generated first.
21038 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
21039 %error-verbose to allow bootstrapping with bison 1.30x.
21041 2002-01-06 Akim Demaille <akim@epita.fr>
21043 * src/reader.c (parse_braces): Don't fetch the next char, the
21044 convention is to fetch on entry.
21045 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
21046 'switch' without a following semicolon.
21047 * tests/regression.at (braces parsing): New.
21049 2002-01-06 Akim Demaille <akim@epita.fr>
21051 Bison is dead wrong in its RR conflict reports.
21053 * tests/torture.at (GNU Cim Grammar): New.
21054 * src/conflicts.c (count_rr_conflicts): Fix.
21056 2002-01-06 Akim Demaille <akim@epita.fr>
21058 Creating package.m4 from configure.ac causes too many problems.
21060 * tests/Makefile.am (package.m4): Create it by hand,
21061 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
21063 2002-01-06 Akim Demaille <akim@epita.fr>
21065 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
21068 2002-01-04 Paul Eggert <eggert@twinsun.com>
21070 * doc/bison.texinfo (Debugging):
21071 Remove YYSTDERR; it's no longer defined or used.
21072 Also, s/cstdio.h/cstdio/.
21074 2002-01-03 Akim Demaille <akim@epita.fr>
21076 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
21078 2002-01-03 Akim Demaille <akim@epita.fr>
21080 * src/parse-skel.y (process_skeleton): Don't bind the parser's
21081 tracing code to --trace, wait for a better --trace option, with
21084 2002-01-03 Akim Demaille <akim@epita.fr>
21086 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
21087 The ISO C++ standard is extremely clear about it: stderr is
21088 considered a macro, not a regular symbol (see table 94 `Header
21089 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
21090 Therefore std:: does not apply to it. It still does with fprintf.
21091 Also, s/cstdio.h/cstdio/.
21093 2002-01-03 Akim Demaille <akim@epita.fr>
21095 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
21096 for non system headers.
21098 2002-01-02 Akim Demaille <akim@epita.fr>
21100 Equip the skeleton chain with location tracking, runtime trace,
21101 pure parser and scanner.
21103 * src/parse-skel.y: Request a pure parser, locations, and prefix
21105 (%union): Having several members with the same type does not help
21106 type mismatches, simplify.
21107 (YYPRINT, yyprint): New.
21108 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
21109 (skel_error): this.
21111 * src/scan-skel.l: Adjust to these changes.
21112 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
21113 (LOCATION_PRINT, skel_control_t): New.
21115 2001-12-30 Akim Demaille <akim@epita.fr>
21117 * src/parse-skel.y: Get rid of the shift/reduce conflict:
21118 replace `gb' with BLANKS.
21119 * src/scan-skel.l: Adjust.
21121 2001-12-30 Akim Demaille <akim@epita.fr>
21123 * src/system.h: We don't need nor want bcopy.
21124 Throw away MS-DOS crap: we don't need getpid.
21125 * configure.in: We don't need strndup. It was even causing
21126 problems: because Flex includes the headers *before* us,
21127 _GNU_SOURCE is not defined by config.h, and therefore strndup was
21129 * lib/xstrndup.c: New.
21130 * src/scan-skel.l: Use it.
21131 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
21132 * src/parse-skel.y: Use %directives instead of #defines.
21134 2001-12-30 Akim Demaille <akim@epita.fr>
21136 * src/skeleton.h: New.
21137 * src/output.c (output_parser, output_master_parser): Remove, dead
21139 * src/output.h (get_lines_number, actions_output, guards_output)
21140 (token_definitions_output): Prototype them.
21141 * src/parse-skel.y: Add the license notice.
21142 Include output.h and skeleton.h.
21143 (process_skeleton): Returns void, and takes a single parameter.
21144 * src/scan-skel.l: Add the license notice.
21145 Include skeleton.h.
21146 Don't use %option yylineno: it seems that then Flex imagines
21147 REJECT has been used, and therefore it won't reallocate its
21148 buffers (which makes no other sense to me than a bug). It results
21149 in warnings for `unused: yy_flex_realloc'.
21151 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
21153 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
21154 (MUSCLE_INSERT_PREFIX): ...to there.
21155 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
21156 (MUSCLE_INSERT_PREFIX): Move from here...
21158 * src/bison.hairy: Add a section directive. Put braces around muscle
21159 names. This parser skeleton is still broken, but Bison should not
21160 choke on a bad muscle 'syntax'.
21161 * src/bison.simple: Add a section directive. Put braces around muscle
21164 * src/files.h (strsuffix, stringappend): Add declarations.
21165 (tab_extension): Add declaration.
21166 (short_base_name): Add declaration.
21168 * src/files.c (strsuffix, stringappend): No longer static. These
21169 functions are used in the skeleton parser.
21170 (tab_extension): New.
21171 (compute_base_names): Use the computations done in this function
21172 to guess if the generated parsers should have '.tab' in their
21174 (short_base_name): No longer static.
21176 * src/output.c (output_skeleton): New.
21177 (output): Disable call to output_master_parser, and give a try to
21178 a new skeleton handling system.
21179 (guards_output, actions_output): No longer static.
21180 (token_definitions_output, get_lines_number): No longer static.
21182 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
21184 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
21187 * src/parse-skel.y: New file.
21188 * src/scan-skel.l: New file.
21190 2001-12-29 Akim Demaille <akim@epita.fr>
21192 %name-prefix is broken.
21194 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
21195 Adjust all dependencies.
21196 * tests/headers.at (export YYLTYPE): Strengthen this test: use
21199 Renaming yylval but not yylloc is not consistent. Now we do.
21201 * src/bison.simple: Prefix yylloc if used.
21202 * doc/bison.texinfo (Decl Summary): Document that.
21204 2001-12-29 Akim Demaille <akim@epita.fr>
21206 * doc/bison.texinfo: Promote `%long-directive' over
21208 Remove all references to fixed-output-files, yacc is enough.
21210 2001-12-29 Akim Demaille <akim@epita.fr>
21212 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
21213 user prologue. These are defaults.
21214 * tests/actions.at (Mid-rule actions): Make sure the user can
21215 define YYDEBUG and YYERROR_VERBOSE.
21217 2001-12-29 Akim Demaille <akim@epita.fr>
21219 * src/output.c (header_output): Don't forget to export YYLTYPE and
21221 * tests/headers.at (export YYLTYPE): New, make sure it does.
21222 * tests/regression.at (%union and --defines, Invalid CPP headers):
21224 * tests/headers.at: here.
21226 2001-12-29 Akim Demaille <akim@epita.fr>
21228 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
21230 2001-12-29 Akim Demaille <akim@epita.fr>
21232 * tests/actions.at (Mid-rule actions): Output on a single line
21233 instead of several.
21235 2001-12-29 Akim Demaille <akim@epita.fr>
21237 * doc/bison.texinfo: Formatting changes.
21239 2001-12-29 Akim Demaille <akim@epita.fr>
21241 Don't store the token defs in a muscle, just be ready to output it
21242 on command. Now possible via `symbols'. Fixes a memory leak.
21244 * src/output.c (token_definitions_output): New.
21245 (output_parser, header_output): Use it.
21246 * src/reader.c (symbols_save): Remove.
21248 2001-12-29 Akim Demaille <akim@epita.fr>
21250 * src/bison.simple: Do not provide a default for YYSTYPE and
21251 YYLTYPE before the user's prologue. Otherwise it's hardly... a
21254 2001-12-29 Akim Demaille <akim@epita.fr>
21256 Mid-rule actions are simply... ignored!
21258 * src/reader.c (readgram): Be sure to attach mid-rule actions to
21259 the empty-rule associated to the dummy symbol, not to the host
21261 * tests/actions.at (Mid-rule actions): New.
21263 2001-12-29 Akim Demaille <akim@epita.fr>
21267 * src/reader.c (reader): Free grammar.
21269 2001-12-29 Akim Demaille <akim@epita.fr>
21273 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
21274 since it allocates it for each state, although only one is needed.
21275 (allocate_storage): Do it here.
21277 2001-12-29 Akim Demaille <akim@epita.fr>
21279 * src/options.h, src/options.c (create_long_option_table): Rename
21281 (long_option_table_new): this, with a clearer prototype.
21282 (percent_table): Remove, unused,
21283 * src/getargs.c (getargs): Adjust.
21285 2001-12-29 Akim Demaille <akim@epita.fr>
21287 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
21288 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
21291 2001-12-29 Akim Demaille <akim@epita.fr>
21293 * src/lalr.c (build_relations): Rename `states' as `states1'.
21294 Sorry, I don't understand exactly what it is, no better name...
21296 2001-12-29 Akim Demaille <akim@epita.fr>
21298 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
21299 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
21300 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
21303 2001-12-29 Akim Demaille <akim@epita.fr>
21305 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
21308 2001-12-29 Akim Demaille <akim@epita.fr>
21310 * src/reader.c, src/reader.h (user_toknums): Remove.
21311 Adjust all users to use symbols[i]->user_token_number.
21313 2001-12-29 Akim Demaille <akim@epita.fr>
21315 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
21316 Adjust all users to use symbols[i]->prec or ->assoc.
21318 2001-12-29 Akim Demaille <akim@epita.fr>
21320 * src/reader.c, src/reader.h (tags): Remove.
21321 Adjust all users to use symbols[i]->tag.
21323 2001-12-29 Akim Demaille <akim@epita.fr>
21325 * src/gram.h, src/gram.c (symbols): New, similar to state_table
21327 * src/reader.c (packsymbols): Fill this table.
21329 * src/conflicts.c (resolve_sr_conflict): Adjust.
21330 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
21332 Use symbols[i]->tag instead of tags[i].
21334 2001-12-29 Akim Demaille <akim@epita.fr>
21336 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
21337 In addition, put a comment in there, to replace...
21338 * tests/regression.at (%union and C comments): Remove.
21340 2001-12-29 Akim Demaille <akim@epita.fr>
21342 * tests/regression.at (Web2c Actions): Blindly move the actual
21343 output as expected output. The contents *seem* right to me, but I
21344 can't pretend reading perfectly parser tables... Nonetheless, all
21345 the other tests pass correctly, the table look OK, even though the
21346 presence of `$axiom' is to be noted: AFAICS it is useless (but
21349 2001-12-29 Akim Demaille <akim@epita.fr>
21351 * src/reader.c (readgram): Don't add the rule 0 if there were no
21352 rules read. In other words, add it _after_ having performed
21353 grammar sanity checks.
21354 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
21356 2001-12-29 Akim Demaille <akim@epita.fr>
21358 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
21359 visible, and some states have now a different number.
21361 2001-12-29 Akim Demaille <akim@epita.fr>
21363 * src/reader.c (readgram): Bind the initial rule's lineno to that
21365 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
21366 (Solved SR Conflicts): Adjust rule 0's line number.
21368 2001-12-29 Akim Demaille <akim@epita.fr>
21370 Fix the `GAWK Grammar' failure.
21372 * src/LR0.c (final_state): Initialize to -1 so that we do compute
21373 the reductions of the first state which was mistakenly confused
21374 with the final state because precisely final_state was initialized
21376 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
21377 now noticed by Bison.
21378 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
21379 have a reduction on $default.
21381 2001-12-29 Akim Demaille <akim@epita.fr>
21383 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
21385 * src/closure.c (print_closure): Likewise.
21386 * src/derives.c (print_derives): Likewise.
21387 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
21390 2001-12-29 Akim Demaille <akim@epita.fr>
21392 * src/lalr.c (lookaheads_print): New.
21393 (lalr): Call it when --trace-flag.
21394 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
21397 2001-12-29 Akim Demaille <akim@epita.fr>
21399 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
21400 when walking through ritem, even via rule->rhs.
21401 * src/reduce.c (dump_grammar, useful_production, reduce_output)
21402 (useful_production, useless_nonterminals): Likewise.
21403 (reduce_grammar_tables): Likewise, plus update nritems.
21404 * src/nullable.c (set_nullable): Likewise.
21405 * src/lalr.c (build_relations): Likewise.
21406 * tests/sets.at (Nullable): Adjust.
21407 Fortunately, now, the $axiom is no longer nullable.
21409 2001-12-29 Akim Demaille <akim@epita.fr>
21411 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
21413 * src/gram.c (ritem_longest_rhs): Likewise.
21414 * src/reduce.c (nonterminals_reduce): Likewise.
21415 * src/print_graph.c (print_graph): Likewise.
21416 * src/output.c (output_rule_data): Likewise.
21417 * src/nullable.c (set_nullable): Likewise.
21419 2001-12-29 Akim Demaille <akim@epita.fr>
21421 * src/output.c: Comment changes.
21423 2001-12-27 Paul Eggert <eggert@twinsun.com>
21425 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
21426 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
21427 Sparc, as they were causing more porting problems than the
21428 (minor) performance improvement was worth.
21430 Also, catch up with 1.31's YYSTD.
21432 2001-12-27 Akim Demaille <akim@epita.fr>
21434 * src/output.c (output_gram): Rely on nritems, not the
21435 0-sentinel. See below.
21436 Use -1 as separator, not 0.
21437 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
21438 Rely on -1 as separator in yyrhs, instead of 0.
21439 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
21440 twice `Now at end of input', therefore there are two lines less to
21443 2001-12-27 Akim Demaille <akim@epita.fr>
21445 * tests/regression.at (Unresolved SR Conflicts):
21446 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
21449 2001-12-27 Akim Demaille <akim@epita.fr>
21451 * src/LR0.c (new_state): Recognize the final state by the fact it
21452 is reached by eoftoken.
21453 (insert_start_shifting_state, insert_eof_shifting_state)
21454 (insert_accepting_state, augment_automaton): Remove, since now
21455 these states are automatically computed from the initial state.
21456 (generate_states): Adjust.
21457 * src/print.c: When reporting a rule number to the user, substract
21458 1, so that the axiom rule is rule 0, and the first user rule is 1.
21459 * src/reduce.c: Likewise.
21460 * src/print_graph.c (print_core): For the time being, just as for
21461 the report, depend upon --trace-flags to dump the full set of
21463 * src/reader.c (readgram): Once the grammar read, insert the rule
21464 0: `$axiom: START-SYMBOL $'.
21465 * tests/set.at: Adjust: rule 0 is now displayed, and since the
21466 number of the states has changed (the final state is no longer
21467 necessarily the last), catch up.
21469 2001-12-27 Akim Demaille <akim@epita.fr>
21471 Try to make the use of the eoftoken valid. Given that its value
21472 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
21473 is used instead of > 0 where appropriate, (ii), depend upon nritems
21474 instead of the 0-sentinel.
21476 * src/gram.h, src/gram.c (nritems): New.
21477 Expected to be duplication of nitems, but for the time being...
21478 * src/reader.c (packgram): Assert nritems and nitems are equal.
21479 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
21480 * src/closure.c (print_closure, print_fderives): Likewise.
21481 * src/gram.c (ritem_print): Likewise.
21482 * src/print.c (print_core, print_grammar): Likewise.
21483 * src/print_graph.c: Likewise.
21485 2001-12-27 Akim Demaille <akim@epita.fr>
21487 * src/main.c (main): If there are complains after grammar
21488 reductions, then output the report anyway if requested, then die.
21489 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
21490 * src/reader.c (eoftoken): New.
21491 (parse_token_decl): If the token being defined has value `0', it
21493 (packsymbols): No longer hack `tags' to insert `$' by hand.
21494 Be sure to preserve the value of the eoftoken.
21495 (reader): Make sure eoftoken is defined.
21496 Initialize nsyms to 0: now eoftoken is created just like the others.
21497 * src/print.c (print_grammar): Don't special case the eof token.
21498 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
21499 lie anyway, albeit pleasant.
21500 * tests/calc.at: Exercise error messages with eoftoken.
21501 Change the grammar so that empty input is invalid.
21502 Adjust expectations.
21503 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
21505 2001-12-27 Akim Demaille <akim@epita.fr>
21507 * configure.in: Check the protos of strchr ans strspn.
21508 Replace strchr if needed.
21509 * src/system.h: Provide the protos of strchr, strspn and memchr if
21511 * lib/strchr.c: New.
21512 * src/reader.c (symbols_save): Use strchr.
21514 2001-12-27 Akim Demaille <akim@epita.fr>
21516 * src/print.c, src/print_graph.c (escape): New.
21517 Use it to quote the TAGS outputs.
21518 * src/print_graph.c (print_state): Now errors are in red, and
21519 reductions in green.
21520 Prefer high to wide: output the state number on a line of its own.
21522 2001-12-27 Akim Demaille <akim@epita.fr>
21524 * src/state.h, src/state.c (reductions_new): New.
21525 * src/LR0.c (set_state_table): Let all the states have a
21526 `reductions', even if reduced to 0.
21527 (save_reductions): Adjust.
21528 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
21529 * src/print.c (print_reductions, print_actions): Adjust.
21530 * src/output.c (action_row): Adjust.
21532 2001-12-27 Akim Demaille <akim@epita.fr>
21534 * src/state.h, src/state.c (errs_new, errs_dup): New.
21535 * src/LR0.c (set_state_table): Let all the states have an errs,
21536 even if reduced to 0.
21537 * src/print.c (print_errs, print_reductions): Adjust.
21538 * src/output.c (output_actions, action_row): Adjust.
21539 * src/conflicts.c (resolve_sr_conflict): Adjust.
21541 2001-12-27 Akim Demaille <akim@epita.fr>
21543 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
21545 2001-12-27 Akim Demaille <akim@epita.fr>
21547 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
21548 * src/print.c: here.
21549 (lookaheadset, shiftset): New, used as additional storage by
21551 (print_results): Adjust.
21552 (print_shifts, print_gotos, print_errs): New, extracted from...
21553 (print_actions): here.
21554 * src/print_graph.c (print_actions): Remove dead code.
21556 2001-12-27 Akim Demaille <akim@epita.fr>
21558 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
21561 2001-12-27 Akim Demaille <akim@epita.fr>
21563 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
21564 (build_relations): Adjust.
21566 2001-12-27 Akim Demaille <akim@epita.fr>
21568 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
21571 2001-12-27 Akim Demaille <akim@epita.fr>
21573 * src/reader.c (packgram): Catch nitems overflows.
21575 2001-12-27 Akim Demaille <akim@epita.fr>
21577 * src/files.c, src/files.h (guard_obstack): Remove.
21578 * src/output.c (output): Adjust.
21579 * src/reader.c (parse_braces): New, factoring...
21580 (copy_action, copy_guard): these two which are renamed as...
21581 (parse_action, parse_guard): these.
21582 As a voluntary consequence, using braces around guards is now
21585 2001-12-27 Akim Demaille <akim@epita.fr>
21587 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
21588 * src/reader.c (symbol_list): `guard' and `guard_line' are new
21590 (symbol_list_new): Adjust.
21591 (copy_action): action_line is the first line, not the last.
21592 (copy_guard): Just as for actions, store the `action' only, not
21593 the switch/case/break flesh.
21594 Don't parse the user action that might follow the guard, let...
21595 (readgram): do it, i.e., now, there can be an action after a
21597 In other words the guard is just explicitly optional.
21598 (packgram): Adjust.
21599 * src/output.c (guards_output): New.
21600 (output_parser): Call it when needed.
21601 (output): Also free the guard and attrs obstacks.
21602 * src/files.c, src/files.h (obstack_save): Remove.
21603 (output_files): Remove.
21604 As a result, if one needs the former `.act' file, using an
21605 appropriate skeleton which requires actions and guards is now
21607 * src/main.c (main): Adjust.
21608 * tests/semantic.at: New.
21609 * tests/regression.at: Use `input.y' as input file name.
21610 Avoid 8+3 problems by requiring input.c when the test needs the
21613 2001-12-27 Akim Demaille <akim@epita.fr>
21615 * src/reader.c (symbol_list_new): Be sure to initialize all the
21618 2001-12-27 Akim Demaille <akim@epita.fr>
21620 All the hacks using a final pseudo state are now useless.
21622 * src/LR0.c (set_state_table): state_table holds exactly nstates.
21623 * src/lalr.c (nLA): New.
21624 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
21625 instead of lookaheadsp from the pseudo state (nstate + 1).
21627 2001-12-27 Akim Demaille <akim@epita.fr>
21629 * src/output.c (action_row, token_actions): Use a state_t instead
21630 of a integer, and nlookaheads instead of the following state's
21633 2001-12-27 Akim Demaille <akim@epita.fr>
21635 * src/conflicts.c (log_resolution, flush_shift)
21636 (resolve_sr_conflict, set_conflicts, solve_conflicts)
21637 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
21638 (conflicts_print, print_reductions): Use a state_t instead of an
21639 integer when referring to a state.
21640 As much as possible, depend upon nlookaheads, instead of the
21641 `lookaheadsp' member of the following state (since lookaheads of
21642 successive states are successive, the difference between state n + 1
21643 and n served as the number of lookaheads for state n).
21644 * src/lalr.c (add_lookback_edge): Likewise.
21645 * src/print.c (print_core, print_actions, print_state)
21646 (print_results): Likewise.
21647 * src/print_graph.c (print_core, print_actions, print_state)
21648 (print_graph): Likewise.
21649 * src/conflicts.h: Adjust.
21651 2001-12-27 Akim Demaille <akim@epita.fr>
21653 * src/bison.hairy: Formatting/comment changes.
21655 Remove `register' indications.
21656 Add plenty of `static'.
21658 2001-12-27 Akim Demaille <akim@epita.fr>
21660 * src/output.c (prepare): Drop the muscle `ntbase' which
21661 duplicates ntokens.
21662 * src/bison.simple: Formatting/comment changes.
21663 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
21664 is an undocumented synonym.
21666 2001-12-22 Akim Demaille <akim@epita.fr>
21668 * src/output.c (output_table_data): Change the prototype to use
21669 `int' for array ranges: some invocations do pass an int, not a
21671 Reported by Wayne Green.
21673 2001-12-22 Akim Demaille <akim@epita.fr>
21675 Some actions of web2c.y are improperly triggered.
21676 Reported by Mike Castle.
21678 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
21679 * tests/regression.at (Web2c): Rename as...
21680 (Web2c Report): this.
21681 (Web2c Actions): New.
21683 2001-12-22 Akim Demaille <akim@epita.fr>
21685 Reductions in web2c.y are improperly reported.
21686 Reported by Mike Castle.
21688 * src/conflicts.c (print_reductions): Fix.
21689 * tests/regression.at (Web2c): New.
21691 2001-12-18 Akim Demaille <akim@epita.fr>
21693 Some host fail on `assert (!"foo")', which expands to
21694 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
21695 Reported by Nelson Beebee.
21697 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
21698 `#define it_succeeded 0' and `assert (it_succeeded)'.
21700 2001-12-17 Marc Autret <autret_m@epita.fr>
21702 * src/bison.simple: Don't hard code the skeleton line and filename.
21703 * src/output.c (output_parser): Rename 'line' as 'output_line'.
21704 New line counter 'skeleton_line' (skeleton-line muscle).
21706 2001-12-17 Paul Eggert <eggert@twinsun.com>
21708 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
21709 YYDEBUG must be defined to a nonzero value.
21711 * src/bison.simple (yytname): Do not assume that the user defines
21712 YYDEBUG to a properly parenthesized expression.
21714 2001-12-17 Akim Demaille <akim@epita.fr>
21716 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
21717 nlookaheads is a new member.
21719 * src/lalr.h (nlookaheads): Remove this orphan declaration.
21720 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
21723 2001-12-17 Akim Demaille <akim@epita.fr>
21725 * src/files.h, src/files.c (open_files, close_files): Remove.
21726 * src/main.c (main): Don't open/close files, nor invoke lex_free,
21728 * src/reader.c (reader): Do it.
21730 2001-12-17 Akim Demaille <akim@epita.fr>
21732 * src/conflicts.c (print_reductions): Formatting changes.
21734 2001-12-17 Akim Demaille <akim@epita.fr>
21736 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
21737 (flush_reduce): New.
21738 (resolve_sr_conflict): Adjust.
21740 2001-12-17 Akim Demaille <akim@epita.fr>
21742 * src/output.c (output_obstack): Be static and rename as...
21743 (format_obstack): this, to avoid any confusion with files.c's
21745 * src/reader.h (muscle_obstack): Move to...
21746 * src/output.h: here, since it's defined in output.c.
21748 2001-12-17 Akim Demaille <akim@epita.fr>
21750 * src/output.c (action_row, save_column, default_goto)
21751 (sort_actions, matching_state, pack_vector): Better variable
21754 2001-12-17 Akim Demaille <akim@epita.fr>
21756 * src/output.c: Various formatting changes.
21758 2001-12-17 Akim Demaille <akim@epita.fr>
21760 * src/files.c (output_files): Free the output_obstack.
21761 * src/main.c (main): Call print and print_graph conditionally.
21762 * src/print.c (print): Work unconditionally.
21763 * src/print_graph.c (print_graph): Work unconditionally.
21764 * src/conflicts.c (log_resolution): Output only if verbose_flag.
21766 2001-12-16 Marc Autret <autret_m@epita.fr>
21768 * src/output.c (actions_output): Fix. When we use %no-lines,
21769 there is one less line per action.
21771 2001-12-16 Marc Autret <autret_m@epita.fr>
21773 * src/bison.simple: Remove a useless #line directive.
21774 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
21775 * src/output.c (get_lines_number): New.
21776 (output_parser): Adjust, now takes care about the lines of a
21778 Fix line numbering.
21779 (actions_output): Computes the number of lines taken by actions.
21780 (output_master_parser): Insert new skeleton which is the name of
21781 the output parser file name.
21783 2001-12-15 Marc Autret <autret_m@epita.fr>
21785 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
21787 2001-12-15 Marc Autret <autret_m@epita.fr>
21789 * src/output.c (output_gram): Keep track of the hairy one.
21791 2001-12-15 Akim Demaille <akim@epita.fr>
21793 Make `make distcheck' work.
21795 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
21796 system.h which uses libgettext.h.
21798 2001-12-15 Akim Demaille <akim@epita.fr>
21800 * src/nullable.c (set_nullable): Useless rules must be skipped,
21801 otherwise, since we range over their symbols, we might look at a
21802 nonterminal which no longer ``exists'', i.e., it is not counted in
21803 `nvars', hence we overflow our arrays.
21805 2001-12-15 Akim Demaille <akim@epita.fr>
21807 The header can also be produced directly, without any obstack!
21810 * src/files.c, src/files.h (defines_obstack): Remove.
21811 (compute_header_macro): Global.
21812 (defines_obstack_save): Remove.
21813 * src/reader.c (parse_union_decl): No longer output to
21814 defines_obstack: its content can be found in the `stype' muscle
21816 (output_token_translations): Merge into...
21817 (symbols_output): this.
21819 (symbols_save): this.
21821 * src/output.c (header_output): New.
21824 2001-12-15 Akim Demaille <akim@epita.fr>
21826 * src/reader.c (parse_union_decl): Instead of handling two obstack
21827 simultaneously, use one to define the `stype' muscle, and use the
21828 value of the latter to fill defines_obstack.
21829 (copy_comment): Remove.
21830 (copy_comment2): Work for a single obstack.
21832 (copy_comment): this.
21834 2001-12-15 Akim Demaille <akim@epita.fr>
21836 * src/lex.c, src/lex.h (xgetc): No longer static.
21837 * src/reader.c (parse_union_decl): Revamp.
21839 2001-12-15 Akim Demaille <akim@epita.fr>
21841 Still making progress in separating Bison into (i) input, (ii)
21842 process, (iii) output: now we can directly output the parser file
21843 without using table_obstack at all.
21845 * src/files.c, src/files.h (table_obstack): Bye bye.
21846 (parser_file_name): New.
21847 * src/files.c (compute_output_file_names): Compute it.
21848 * src/output.c (actions_output, output_parser)
21849 (output_master_parser): To a file instead of an obstack.
21851 2001-12-15 Akim Demaille <akim@epita.fr>
21853 Attach actions to rules, instead of pre-outputting them to
21856 * src/gram.h (rule_t): action and action_line are new members.
21857 * src/reader.c (symbol_list): Likewise.
21858 (copy_action): Save the actions within the rule.
21859 (packgram): Save them in rule_table.
21860 * src/output.c (actions_output): New.
21861 (output_parser): Use it on `%%actions'.
21862 (output_rule_data): Don't free rule_table.
21864 (prepare): Don't save the `action' muscle.
21865 * src/bison.simple: s/%%action/%%actions/.
21867 2001-12-15 Akim Demaille <akim@epita.fr>
21869 * src/reader.c (copy_action): When --yacc, don't append a `;'
21870 to the user action: let it fail if lacking.
21871 Suggested by Arnold Robbins and Tom Tromey.
21873 2001-12-14 Akim Demaille <akim@epita.fr>
21875 * src/lex.c (literalchar): Simply return the char you decoded, non
21876 longer mess around with obstacks and int pointers.
21877 Adjust all callers.
21879 2001-12-14 Akim Demaille <akim@epita.fr>
21881 * src/lex.c (literalchar): Don't escape the special characters,
21882 just decode them, and keep them as char (before, eol was output as
21883 the 2 char string `\n' etc.).
21884 * src/output.c (output_rule_data): Use quotearg to output the
21887 2001-12-13 Paul Eggert <eggert@twinsun.com>
21889 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
21890 Do not infringe on the global user namespace when using C++.
21891 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
21892 All uses of `fprintf' and `stderr' changed.
21894 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
21896 2001-12-13 Akim Demaille <akim@epita.fr>
21898 The computation of nullable is broken: it doesn't handle empty
21901 * tests/torture.at (GNU AWK Grammar): New.
21902 * tests/sets.at (Nullable): New.
21903 * src/nullable.c (set_nullable): Instead of blindly looping over
21904 `ritems', loop over the rules, and then over their rhs's.
21906 Work around Autotest bugs.
21908 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
21909 frame, because Autotest understand lines starting with a `+' as
21910 traces from the shell. Then, they are not processed properly.
21911 Admittedly an Autotest bug, but we don't have time to wait for
21912 Autotest to catch up.
21913 * tests/regression.at (Broken Closure): Adjust to the new table
21916 * tests/sets.at: here.
21918 2001-12-13 Akim Demaille <akim@epita.fr>
21920 * src/closure.c (closure): Use nrules instead of playing tricks
21921 with BITS_PER_WORD.
21923 2001-12-13 Akim Demaille <akim@epita.fr>
21925 * src/print.c (print_actions): Output the handling of `$' as the
21926 traces do: shifting the token EOF. Before EOF was treated as a
21928 * tests/regression.at: Adjust some tests.
21929 * src/print_graph.c (print_core): Complete the set of items via
21930 closure. The next-to-final and final states are still unsatisfying,
21931 but that's to be addressed elsewhere.
21932 No longer output the rule numbers, but do output the state number.
21933 A single loop for the shifts + gotos is enough, but picked a
21934 distinct color for each.
21935 (print_graph): Initialize and finalize closure.
21937 2001-12-13 Akim Demaille <akim@epita.fr>
21939 * src/reader.c (readgram): Remove dead code, an strip useless
21941 (get_type): Remove, unused.
21943 2001-12-12 Akim Demaille <akim@epita.fr>
21945 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
21946 on that of lib/error.c.
21948 2001-12-12 Akim Demaille <akim@epita.fr>
21950 Some hosts don't like `/' in includes.
21952 * src/system.h: Include libgettext.h without qualifying the path.
21953 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
21956 2001-12-11 Marc Autret <autret_m@epita.fr>
21958 * src/output.c (output_parser): Remove useless muscle.
21960 2001-12-11 Marc Autret <autret_m@epita.fr>
21962 * src/bison.simple: Remove #line just before %%epilogue. It
21963 is now handled in ...
21964 * src/reader.c (read_additionnal_code): Add the output of a
21965 #line for the epilogue.
21967 2001-12-10 Marc Autret <autret_m@epita.fr>
21969 * src/reader.c (copy_definition): Re-use CPP-outed code which
21970 replace precedent remove.
21971 * src/bison.simple: Remove #line before %%prologue because
21972 %%input-line is wrong at this time.
21974 2001-12-10 Marc Autret <autret_m@epita.fr>
21976 * src/reader.c (symbols_output): Clean up.
21977 * src/output.c (output_gram, output): Clean up.
21979 2001-12-10 Akim Demaille <akim@epita.fr>
21981 * src/lalr.c (initialize_lookaheads): New. Extracted from...
21982 * src/LR0.c (set_state_table): here.
21983 * src/lalr.c (lalr): Call it.
21985 2001-12-10 Akim Demaille <akim@epita.fr>
21987 * src/state.h (shifts): Remove the `number' member: shifts are
21988 attached to state, hence no longer need to be labelled with a
21991 2001-12-10 Akim Demaille <akim@epita.fr>
21993 Now that states have a complete set of members, the linked list of
21994 shifts is useless: just fill directly the state's shifts member.
21996 * src/state.h (shifts): Remove the `next' member.
21997 * src/LR0.c (first_state, last_state): Remove.
21998 Adjust the callers.
21999 (augment_automaton): Don't look for the shifts that must be added
22000 a shift on EOF: it is those of the state we looked for! But now,
22001 since shifts are attached, it is no longer needed to looking
22002 merely by its id: its number.
22004 2001-12-10 Akim Demaille <akim@epita.fr>
22006 * src/LR0.c (augment_automaton): Better variable locality.
22007 Remove an impossible branch: if there is a state corresponding to
22008 the start symbol being shifted, then there is shift for the start
22009 symbol from the initial state.
22011 2001-12-10 Akim Demaille <akim@epita.fr>
22013 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
22014 only when appropriate: when insert_start_shifting_state' is not
22016 * tests/regression.at (Rule Line Numbers): Adjust.
22018 2001-12-10 Akim Demaille <akim@epita.fr>
22020 * src/LR0.c (augment_automaton): Now that all states have shifts,
22021 merge the two cases addition shifts to the initial state.
22023 2001-12-10 Akim Demaille <akim@epita.fr>
22025 * src/lalr.c (set_state_table): Move to...
22027 * src/lalr.c (lalr): Don't call it...
22028 * src/LR0.c (generate_states): do it.
22029 * src/LR0.h (first_state): Remove, only the table is used.
22031 2001-12-10 Akim Demaille <akim@epita.fr>
22033 * src/LR0.h (first_shift, first_reduction): Remove.
22034 * src/lalr.c: Don't use first_shift: find shifts through the
22037 2001-12-10 Akim Demaille <akim@epita.fr>
22039 * src/LR0.c: Attach shifts to states as soon as they are
22041 * src/lalr.c (set_state_table): Instead of assigning shifts to
22042 state, just assert that the mapping was properly done.
22044 2001-12-10 Akim Demaille <akim@epita.fr>
22046 * src/LR0.c (insert_start_shift): Rename as...
22047 (insert_start_shifting_state): this.
22048 (insert_eof_shifting_state, insert_accepting_state): New.
22049 (augment_automaton): Adjust.
22050 Better locality of the variables.
22051 When looking if the start_symbol is shifted from the initial
22052 state, using `while (... symbol != start_symbol ...)' sounds
22053 better than `while (... symbol < start_symbol ...)': If fail
22054 to see how the order between symbols could be relevant!
22056 2001-12-10 Akim Demaille <akim@epita.fr>
22058 * src/getargs.h: Don't declare `spec_name_prefix' and
22059 `spec_file_prefix', declared by src/files.h.
22060 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
22061 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
22062 * src/output.c (prepare): Adjust.
22063 * src/reader.c (symbols_output): Likewise.
22064 * src/vmsgetargs.c: Vaguely adjust, but who cares?
22066 2001-12-10 Akim Demaille <akim@epita.fr>
22068 * src/muscle_tab.c (muscle_init): NULL is a better default than
22071 2001-12-10 Akim Demaille <akim@epita.fr>
22073 * src/reader.c (reader): Calling symbols_output once is enough.
22075 2001-12-10 Akim Demaille <akim@epita.fr>
22077 Now that states have a complete set of members, the linked list of
22078 reductions is useless: just fill directly the state's reductions
22081 * src/state.h (struct reductions): Remove member `number' and
22083 * src/LR0.c (first_reduction, last_reduction): Remove.
22084 (save_reductions): Don't link the new reductions, store them in
22086 * src/lalr.c (set_state_table): No need to attach reductions to
22087 states, it's already done.
22088 * src/output.c (output_actions): No longer free the shifts, then
22089 the reductions, then the states: free all the states and their
22092 2001-12-10 Akim Demaille <akim@epita.fr>
22094 * src/options.c (OPTN, DRTV, BOTH): New.
22095 (option_table): Use them.
22097 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
22098 the job of system.h.
22099 * src/options.c: Don't include stdio.h and xalloc.h for the same
22102 2001-12-10 Akim Demaille <akim@epita.fr>
22104 * src/output.c (output, prepare): Make sure the values of the
22105 muscles `action' and `prologue' are 0-terminated.
22107 2001-12-10 Akim Demaille <akim@epita.fr>
22109 Clean up GCC warnings.
22111 * src/reader.c (copy_action): `buf' is not used.
22112 (parse_skel_decl): Be static.
22113 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
22114 * src/options.h (create_long_option_table): Have a real prototype.
22115 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
22116 (hash_delete_at): Return const void *.
22117 Adjust casts to preserve the const.
22119 2001-12-10 Akim Demaille <akim@epita.fr>
22121 * configure.in: Require 2.52g.
22122 M4 is not needed, but AUTOM4TE is.
22123 * m4/m4.m4: Remove.
22124 * tests/Makefile.am: Adjust.
22126 2001-12-10 Akim Demaille <akim@epita.fr>
22128 One structure for states is enough, even though theoretically
22129 there are LR(0) states and LALR(1) states.
22131 * src/lalr.h (state_t): Remove.
22132 (state_table): Be state_t **, not state_t *.
22133 * src/state.h (core, CORE_ALLOC): Rename as...
22134 (state_t, STATE_ALLOC): this.
22135 Add the LALR(1) members: shifts, reductions, errs.
22136 * src/LR0.c (state_table): Rename as...
22137 (state_hash): this, to avoid name clashes with the global
22139 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
22140 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
22142 2001-12-10 Akim Demaille <akim@epita.fr>
22144 Bison dumps core on bash.y.
22145 Reported by Pascal Bart.
22147 * src/warshall.c (bitmatrix_print): New.
22149 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
22150 j must be the outer loop.
22151 * tests/regression.at (Broken Closure): New.
22153 2001-12-05 Akim Demaille <akim@epita.fr>
22155 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
22157 Reported by Peter Hamorsky.
22159 2001-12-05 Akim Demaille <akim@epita.fr>
22161 * src/conflicts.c (err_table): Remove.
22162 (resolve_sr_conflict): Adjust.
22163 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
22165 (state_t.reductions, state_t.shifts): this.
22167 2001-12-05 Akim Demaille <akim@epita.fr>
22169 * src/reduce.c (reduce_grammar_tables): No longer disable the
22170 removal of useless rules via CPP but via `if (0)', so that the
22171 compiler still check the code is valid.
22172 For instance, it should have noticed `rline' no longer exists: use
22173 the `line' member of rule_t.
22174 * src/gram.c (dummy, rline): Remove, unused.
22176 2001-12-05 Akim Demaille <akim@epita.fr>
22178 * src/output.c (pack_vector): Use assert, not berror.
22179 * src/main.c (berror): Remove, unused.
22181 2001-12-05 Akim Demaille <akim@epita.fr>
22183 New experimental feature: if --verbose --trace output all the
22184 items of a state, not only its kernel.
22186 * src/print.c (print_core): If `trace_flag', then invoke closure
22187 before outputting the items of the state (print_core is no longer
22188 a correct name them).
22189 (print_results): Invoke new_closure/free_closure if needed.
22191 2001-12-05 Akim Demaille <akim@epita.fr>
22193 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
22194 * src/closure.c, src/closure.h (itemsetsize): Rename as...
22195 (nitemset): for consistency with the rest of the project.
22197 2001-12-05 Akim Demaille <akim@epita.fr>
22199 * src/closure.c (print_closure): Improve.
22200 (closure): Use it for printing input and output.
22202 2001-12-05 Akim Demaille <akim@epita.fr>
22204 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
22205 indexed by nonterminals.
22207 2001-12-05 Akim Demaille <akim@epita.fr>
22209 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
22211 * src/warshall.h: Remove accidental duplication of the content.
22213 2001-12-05 Akim Demaille <akim@epita.fr>
22215 * src/closure.c (set_fderives): De-obfuscate.
22217 2001-12-05 Akim Demaille <akim@epita.fr>
22219 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
22221 2001-12-05 Akim Demaille <akim@epita.fr>
22223 * src/closure.c (set_firsts): De-obfuscate.
22225 2001-12-05 Akim Demaille <akim@epita.fr>
22227 * src/output.c (action_row): De-obfuscate
22228 using the good o' techniques: arrays not pointers, variable
22229 locality, BITISSET, RESETBIT etc.
22231 2001-12-05 Akim Demaille <akim@epita.fr>
22233 Pessimize the code to simplify it: from now on, all the states
22234 have a valid SHIFTS, which NSHIFTS is possibly 0.
22236 * src/LR0.c (shifts_new): Be global and move to..
22237 * src/state.c, src/state.h: here.
22238 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
22239 * src/print_graph: Adjust.
22241 2001-12-05 Akim Demaille <akim@epita.fr>
22243 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
22244 * src/conflicts.c: Use it.
22245 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
22246 incorrectly ``simplified''.
22248 2001-12-05 Akim Demaille <akim@epita.fr>
22250 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
22251 using the good o' techniques: arrays not pointers, variable
22252 locality, BITISSET, RESETBIT etc.
22254 2001-12-05 Akim Demaille <akim@epita.fr>
22256 * src/state.h (SHIFT_SYMBOL): New.
22257 * src/conflicts.c: Use it to deobfuscate.
22259 2001-12-05 Akim Demaille <akim@epita.fr>
22261 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
22262 (print_reductions): De-obfuscate using the good o' techniques:
22263 arrays not pointers, variable locality, BITISSET.
22265 2001-12-05 Akim Demaille <akim@epita.fr>
22267 * src/conflicts.c (print_reductions): Arrays, not pointers.
22270 2001-12-05 Akim Demaille <akim@epita.fr>
22272 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22274 2001-12-05 Akim Demaille <akim@epita.fr>
22276 * src/conflicts.c (print_reductions): Improve variable locality.
22278 2001-12-05 Akim Demaille <akim@epita.fr>
22280 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22282 2001-12-05 Akim Demaille <akim@epita.fr>
22284 * src/conflicts.c (print_reductions): Improve variable locality.
22286 2001-12-05 Akim Demaille <akim@epita.fr>
22288 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
22289 * src/lalr.c: Use them.
22291 2001-12-05 Akim Demaille <akim@epita.fr>
22293 * src/LR0.c (augment_automaton): Formatting changes.
22294 Better variable locality.
22296 2001-12-05 Akim Demaille <akim@epita.fr>
22298 * src/lalr.c (matrix_print): New.
22299 (transpose): Use it.
22300 Use arrays instead of pointers.
22302 2001-12-05 Akim Demaille <akim@epita.fr>
22304 * src/lalr.c (maxrhs): Move to...
22305 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
22306 * src/lalr.c (build_relations): Adjust.
22308 2001-12-05 Akim Demaille <akim@epita.fr>
22310 * src/lalr.c (transpose): Free the memory allocated to the
22311 argument, as it is replaced by the results by the unique caller.
22312 (build_relations): Merely invoke transpose: it handles the memory
22314 Improve variable locality.
22315 Avoid variables used as mere abbreviations.
22316 (compute_lookaheads): Use arrays instead of pointers.
22318 2001-12-05 Akim Demaille <akim@epita.fr>
22320 * src/lalr.c (initialize_F): Improve variable locality.
22321 Avoid variables used as mere abbreviations.
22323 2001-12-05 Akim Demaille <akim@epita.fr>
22325 * src/derives.c (print_derives): Display the ruleno.
22326 * src/lalr.c (initialize_F, transpose): Better variable locality
22327 to improve readability.
22328 Avoid variables used as mere abbreviations.
22330 2001-12-05 Akim Demaille <akim@epita.fr>
22332 * src/lalr.c (traverse): Use arrays instead of pointers.
22334 2001-12-05 Akim Demaille <akim@epita.fr>
22336 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
22337 the handling of squeue.
22338 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22340 2001-12-05 Akim Demaille <akim@epita.fr>
22342 Because useless nonterminals are now kept alive (instead of being
22343 `destroyed'), we now sometimes examine them, and store information
22344 related to them. Hence we need to know their number, and adjust
22345 memory allocations.
22347 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
22349 * src/LR0.c (allocate_itemsets): The memory allocated to
22350 `symbol_count' was used for two different purpose: once to count
22351 the number of occurrences of each symbol, and later reassigned to
22352 `shift_symbol', containing the symbol that can be shifted from a
22354 Deobfuscate, i.e., allocate, use and free `symbol_count' here
22356 (new_itemsets): Allocate `shift_symbol' here.
22357 (allocate_itemsets): symbol_count includes useless nonterminals.
22358 Make room for them.
22359 (free_storage): Use `free', not `XFREE', for pointers that cannot
22362 2001-12-05 Akim Demaille <akim@epita.fr>
22364 * src/nullable.c (set_nullable): Deobfuscate the handling of
22366 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22368 2001-12-05 Akim Demaille <akim@epita.fr>
22370 * src/gram.c, src/gram.h (ritem_print): New.
22371 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
22372 (This useless function was defined only to work around VMS linkers
22373 that can't handle compilation units with variables only).
22374 * src/reduce.c (dump_grammar): Use it to trace the construction of
22377 2001-12-04 Paul Eggert <eggert@twinsun.com>
22379 * src/bison.simple (union yyalloc): Change member names
22380 to be the same as the stack names.
22381 (yyparse): yyptr is now union yyalloc *, not char *.
22382 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
22383 and may generate better code on some machines.
22384 (yystpcpy): Use prototype if __STDC__ is defined, not just
22385 if __cplusplus is defined.
22387 2001-11-30 Akim Demaille <akim@epita.fr>
22389 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
22390 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
22391 Gettext doesn't compile cleanly, and dies with -Werror.
22392 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
22393 Include WARNING_CFLAGS here.
22394 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
22395 before being defined.
22397 2001-11-27 Paul Eggert <eggert@twinsun.com>
22399 * lib/quotearg.h (quotearg_n, quotearg_n_style):
22400 First arg is int, not unsigned.
22401 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22402 (SIZE_MAX, UINT_MAX): New macros.
22403 (quotearg_n_options): Abort if N is negative.
22404 Avoid overflow check on hosts where size_t is 64 bits and int
22405 is 32 bits, as overflow is impossible there.
22406 Fix off-by-one typo that caused unnecessary reallocation.
22408 2001-11-29 Paul Eggert <eggert@twinsun.com>
22410 Name space cleanup in generated parser.
22412 * doc/bison.texinfo (Bison Parser): Discuss system headers
22413 and their effect on the user name space.
22415 * src/bison.simple:
22416 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
22417 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
22418 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
22420 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
22421 on user names when possible.
22423 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
22424 Simplify test for whather <alloca.h> exists.
22426 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
22428 (<stdio.h>): Include if YYDEBUG.
22430 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
22431 ! defined (yyoverflow) && ! defined (yymemcpy).
22433 (yymemcpy, yyparse): Rename local variables as needed so that
22434 they all begin with 'yy'.
22436 (yystrlen, yystpcpy): New functions.
22438 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
22441 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
22442 instead of relying on string.h functions. Use YYSTACK_ALLOC
22443 and YYSTACK_FREE instead of malloc and free.
22445 2001-11-30 Akim Demaille <akim@epita.fr>
22447 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
22448 before their first uses.
22449 (YYBISON, YYPURE): Move to the top of the output.
22451 2001-11-30 Akim Demaille <akim@epita.fr>
22453 * tests/reduce.at (Useless Nonterminals): Fix.
22455 2001-11-30 Akim Demaille <akim@epita.fr>
22457 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
22458 if body instead of `;' to pacify GCC's warnings.
22460 2001-11-30 Akim Demaille <akim@epita.fr>
22462 Instead of mapping the LHS of unused rules to -1, keep the LHS
22463 valid, but flag the rules as invalid.
22465 * src/gram.h (rule_t): `useful' is a new member.
22466 * src/print.c (print_grammar): Adjust.
22467 * src/derives.c (set_derives): Likewise.
22468 * src/reader.c (packgram, reduce_output): Likewise.
22469 * src/reduce.c (reduce_grammar_tables): Likewise.
22470 * tests/reduce.at (Underivable Rules, Useless Rules): New.
22472 2001-11-30 Akim Demaille <akim@epita.fr>
22474 * src/reduce.c (reduce_output): Formatting changes.
22475 * src/print.c (print_results, print_grammar): Likewise.
22476 * tests/regression.at (Rule Line Numbers)
22477 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
22479 2001-11-30 Akim Demaille <akim@epita.fr>
22481 * src/reduce.c (nonterminals_reduce): Instead of throwing away
22482 useless nonterminals, move them at the end of the symbol arrays.
22483 (reduce_output): Adjust.
22484 * tests/reduce.at (Useless Nonterminals): Adjust.
22486 2001-11-30 Akim Demaille <akim@epita.fr>
22488 * src/reduce.c: Various comment/formatting changes.
22489 (nonterminals_reduce): New, extracted from...
22490 (reduce_grammar_tables): here.
22491 (reduce_grammar): Call nonterminals_reduce.
22493 2001-11-29 Paul Eggert <eggert@twinsun.com>
22495 * src/bison.simple (YYSTACK_REALLOC): Remove.
22496 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
22497 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
22499 (union yyalloc): New type.
22500 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
22501 an arbitrary restriction on hosts where size_t is wider than int.
22503 (yyparse): Don't dump core if alloca or malloc fails; instead, report
22504 a parser stack overflow. Allocate just one block of memory for all
22505 three stacks, instead of allocating three blocks; this typically is
22506 faster and reduces fragmentation.
22508 Do not limit the number of items in the stack to a value that fits
22509 in 'int', as this is an arbitrary limit on hosts with 64-bit
22510 size_t and 32-bit int.
22512 2001-11-29 Marc Autret <autret_m@epita.fr>
22514 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
22515 of defining YYERROR_VERBOSE.
22516 [AT_DATA]: $4 is now out of C declarations in the prologue.
22518 2001-11-28 Marc Autret <autret_m@epita.fr>
22520 * src/reader.c (parse_dquoted_param): New.
22521 (parse_skel_decl): Use it.
22522 * src/lex.h: Add its prototype.
22523 * src/lex.c (literalchar): Become not static.
22525 2001-11-28 Marc Autret <autret_m@epita.fr>
22527 * src/output.h: And put its extern declaration here.
22528 * src/output.c (error_verbose): Define here.
22529 (prepare): Echo name modification.
22530 * src/getargs.h: Clean its extern declaration.
22531 * src/getargs.c (error_verbose_flag): Remove.
22532 (getargs): Remove case 'e'.
22533 * src/options.c (option_table): 'error-verbose' is now seen as simple
22537 * src/reader.c (read_declarations): Remove case tok_include.
22538 (parse_include_decl): Remove.
22539 * src/lex.h (token_t): Remove tok_include.
22540 * src/options.c (option_table): 'include' is now a simple command line
22543 2001-11-28 Marc Autret <autret_m@epita.fr>
22545 * src/bison.simple: Adjust muscle names.
22546 * src/muscle_tab.c (muscle_init): Also rename the muscles.
22547 * src/output.c (prepare): s/_/-/ for the muscles names.
22548 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
22550 2001-11-28 Marc Autret <autret_m@epita.fr>
22552 * src/bison.simple: Fix debug.
22553 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
22555 2001-11-28 Akim Demaille <akim@epita.fr>
22557 * src/LR0.c (shifts_new): New.
22558 (save_shifts, insert_start_shift, augment_automaton): Use it.
22560 2001-11-28 Akim Demaille <akim@epita.fr>
22562 * src/closure.c (closure): `b' and `ruleno' denote the same value:
22565 2001-11-28 Akim Demaille <akim@epita.fr>
22567 * src/closure.c (closure): Instead of looping over word in array
22568 then bits in words, loop over bits in array.
22570 2001-11-28 Akim Demaille <akim@epita.fr>
22572 * src/closure.c (closure): No longer optimize the special case
22573 where all the bits of `ruleset[r]' are set to 0, to make the code
22576 2001-11-28 Akim Demaille <akim@epita.fr>
22578 * src/closure.c (closure): `r' and `c' are new variables, used to
22579 de-obfuscate accesses to RULESET and CORE.
22581 2001-11-28 Akim Demaille <akim@epita.fr>
22583 * src/reduce.c (reduce_print): Use ngettext.
22584 (dump_grammar): Improve the trace accuracy.
22586 2001-11-28 Akim Demaille <akim@epita.fr>
22588 * src/reduce.c (dump_grammar): Don't translate trace messages.
22590 2001-11-28 Akim Demaille <akim@epita.fr>
22592 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
22593 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
22594 as all tags are free'ed afterwards.
22595 From Enrico Scholz.
22597 2001-11-27 Paul Eggert <eggert@twinsun.com>
22599 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
22600 use alloca when we didn't want to, and vice versa.
22602 2001-11-27 Marc Autret <autret_m@epita.fr>
22604 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
22606 * src/output.c (prepare): Remove its update.
22608 2001-11-27 Marc Autret <autret_m@epita.fr>
22610 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
22611 Use %error-verbose.
22613 2001-11-27 Marc Autret <autret_m@epita.fr>
22615 * src/bison.simple: Remove YYERROR_VERBOSE using.
22616 Use %%error_verbose.
22617 (yyparse): Likewise.
22618 * src/output.c (prepare): Give its final value.
22619 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
22620 * src/getargs.h: Add its extern declaration.
22621 * src/getargs.c (error_verbose_flag): New int.
22622 (getargs): Update to catch new case.
22623 * src/options.c (option_table): 'error-verbose' is a new option.
22624 (shortopts): Update.
22626 2001-11-27 Akim Demaille <akim@epita.fr>
22628 * src/system.h: Use intl/libgettext.h.
22629 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
22631 2001-11-27 Akim Demaille <akim@epita.fr>
22633 * tests/torture.at (Exploding the Stack Size with Malloc):
22634 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
22636 2001-11-27 Akim Demaille <akim@epita.fr>
22638 * src/files.c: Include error.h.
22639 Reported by Hans Aberg.
22641 2001-11-26 Marc Autret <autret_m@epita.fr>
22643 * src/reader.c (parse_include_decl): New, not yet implemented.
22644 (read_declarations): Add case tok_include.
22645 * src/getargs.h (include): Add its extern definition.
22646 * src/getargs.c (include): New const char *.
22647 (getargs): Add case '-I'.
22648 * src/options.c (option_table): Add include as command line and
22650 * src/lex.h (token_t): Add tok_include.
22652 2001-11-26 Akim Demaille <akim@epita.fr>
22654 * src/reader.c (readgram): Make sure rules for mid-rule actions
22655 have a lineno equal to that of their host rule.
22656 Reported by Hans Aberg.
22657 * tests/regression.at (Rule Line Numbers): New.
22659 2001-11-26 Akim Demaille <akim@epita.fr>
22661 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
22664 2001-11-26 Akim Demaille <akim@epita.fr>
22666 * src/complain.c, src/complain.h (error): Remove, provided by
22669 2001-11-26 Akim Demaille <akim@epita.fr>
22671 * src/reader.c (read_declarations): Don't abort on tok_illegal,
22672 issue an error message.
22673 * tests/regression.at (Invalid %directive): New.
22674 Reported by Hans Aberg.
22676 2001-11-26 Akim Demaille <akim@epita.fr>
22678 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
22679 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
22681 2001-11-26 Akim Demaille <akim@epita.fr>
22683 * src/conflicts.c (conflicts_print): Don't complain at all when
22684 there are no reduce/reduce conflicts, and as many shift/reduce
22685 conflicts as expected.
22686 * tests/regression.at (%expect right): Adjust.
22688 2001-11-23 Akim Demaille <akim@epita.fr>
22690 * lib/alloca.c: Update, from fileutils.
22692 2001-11-23 Akim Demaille <akim@epita.fr>
22694 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
22696 2001-11-23 Akim Demaille <akim@epita.fr>
22698 * src/system.h: Include alloca.h.
22699 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
22701 2001-11-23 Akim Demaille <akim@epita.fr>
22703 * src/print_graph.c (print_actions): Remove `rule', unused.
22704 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
22705 pacify GCC's signed < unsigned warnings.
22706 * src/closure.c (itemsetsize): Likewise.
22707 * src/reader.c (symbol_list_new): Static.
22709 2001-11-23 Akim Demaille <akim@epita.fr>
22711 Attaching lineno to buckets is stupid, since only one copy of each
22712 symbol is kept, only the line of the first occurrence is kept too.
22714 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
22715 * src/reader.c (rline_allocated): Remove, unused.
22716 (symbol_list): Have a `line' member.
22717 (symbol_list_new): New.
22718 (readgram): Use it.
22719 * src/print.c (print_grammar): Output the rule line numbers.
22720 * tests/regression.at (Solved SR Conflicts)
22721 (Unresolved SR Conflicts): Adjust.
22722 Reported by Hans Aberg.
22724 2001-11-22 Marc Autret <autret_m@epita.fr>
22726 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
22728 2001-11-22 Marc Autret <autret_m@epita.fr>
22730 * src/muscle_tab.c (muscle_init): Remove initialization of
22732 * src/output.c (output_master_parser): Do it here.
22734 2001-11-20 Akim Demaille <akim@epita.fr>
22737 * configure.in (ALL_LINGUAS): Adjust.
22738 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
22739 longer contains strings to translate.
22741 2001-11-19 Akim Demaille <akim@epita.fr>
22743 * src/conflicts.c (conflicts_print): Add a missing \n.
22745 2001-11-19 Akim Demaille <akim@epita.fr>
22747 * src/nullable.c (nullable_print): New.
22748 (set_nullable): Call it when tracing.
22749 Better locality of variables.
22751 2001-11-19 Akim Demaille <akim@epita.fr>
22753 * src/print.c (print_actions): Better locality of variables.
22755 2001-11-19 Akim Demaille <akim@epita.fr>
22757 * src/derives.c (print_derives): Fix and enrich.
22758 * src/closure.c (print_fderives): Likewise.
22760 2001-11-19 Akim Demaille <akim@epita.fr>
22762 * src/closure.c (itemsetend): Remove, replaced with...
22763 (itemsetsize): new.
22765 2001-11-19 Akim Demaille <akim@epita.fr>
22767 * src/LR0.c (kernel_end): Remove, replaced with...
22768 (kernel_size): new.
22770 2001-11-19 Akim Demaille <akim@epita.fr>
22772 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
22775 2001-11-19 Akim Demaille <akim@epita.fr>
22777 * src/closure.c (closure): Use arrays instead of pointers to clarify.
22779 2001-11-19 Akim Demaille <akim@epita.fr>
22781 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
22783 * src/LR0.c: Likewise.
22784 (allocate_itemsets): Use arrays instead of pointers to clarify.
22786 2001-11-19 Akim Demaille <akim@epita.fr>
22788 * src/getargs.c (statistics_flag): Replace with...
22790 (longopts): Accept --trace instead of --statistics.
22791 * src/getargs.h, src/options.c: Adjust.
22792 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
22793 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
22795 2001-11-19 Akim Demaille <akim@epita.fr>
22797 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
22798 pointers to clarify the code.
22799 (save_reductions, save_shifts): Factor common parts of alternatives.
22801 2001-11-19 Akim Demaille <akim@epita.fr>
22803 * src/LR0.c (new_state, get_state): Complete TRACE code.
22804 * src/closure.c: Include `reader.h' to get `tags', needed by the
22806 Rename the conditional DEBUG as TRACE.
22807 Output consistently TRACEs to stderr, not stdout.
22808 * src/derives.c: Likewise.
22809 * src/reduce.c: (inaccessable_symbols): Using if is better style
22811 Use `#if TRACE' instead of `#if 0' for tracing code.
22813 2001-11-19 Akim Demaille <akim@epita.fr>
22815 * src/system.h (LIST_FREE, shortcpy): New.
22816 * src/LR0.c: Use them.
22817 * src/output.c (free_itemsets, free_reductions, free_shifts):
22818 Remove, replaced by LIST_FREE.
22820 2001-11-19 Akim Demaille <akim@epita.fr>
22822 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
22823 (REDUCTIONS_ALLOC): New.
22824 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
22827 2001-11-19 Akim Demaille <akim@epita.fr>
22829 * src/LR0.c (new_state): Complete trace code.
22830 * src/nullable.c (set_nullable): Don't translate traces.
22832 2001-11-19 Akim Demaille <akim@epita.fr>
22834 * src/print_graph.c (print_core): Better locality of variables.
22835 * src/print.c (print_core): Likewise.
22837 2001-11-19 Akim Demaille <akim@epita.fr>
22839 * src/vcg.c: You do the output, so you are responsible of the
22840 handling of VCG syntax, in particular: use quotearg.
22841 * src/print_graph.c: Don't.
22842 (print_actions): Don't output the actions as part of the nodes,
22843 since that's the job of the edges.
22844 (print_state): Don't output by hand: fill the node description,
22845 and ask for its output.
22847 2001-11-19 Akim Demaille <akim@epita.fr>
22849 * src/bison.simple (yyparse): When verbosely reporting an error,
22850 no longer put additional quotes around token names.
22851 * tests/calc.at: Adjust.
22853 2001-11-19 Akim Demaille <akim@epita.fr>
22855 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
22856 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
22857 * src/output.c: Adjust.
22859 2001-11-19 Akim Demaille <akim@epita.fr>
22861 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
22863 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
22865 2001-11-19 Akim Demaille <akim@epita.fr>
22867 * src/gram.h (rule_t): New.
22869 (rrhs, rlhs): Remove, part of state_t.
22870 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
22871 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
22872 * src/reader.c, src/reduce.c: Adjust.
22874 2001-11-19 Akim Demaille <akim@epita.fr>
22876 * src/reader.c (symbols_output): New, extracted from...
22877 (packsymbols): Here.
22880 2001-11-19 Akim Demaille <akim@epita.fr>
22882 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
22883 (maxrhs): this new function.
22885 2001-11-19 Akim Demaille <akim@epita.fr>
22887 * src/lalr.c (F): New macro to access the variable F.
22890 2001-11-19 Akim Demaille <akim@epita.fr>
22892 * src/lalr.h (LA): New macro to access the variable LA.
22893 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22894 * src/lalr.c: Adjust.
22896 2001-11-19 Akim Demaille <akim@epita.fr>
22898 * src/lalr.c (initialize_LA): Only initialize LA. Let...
22899 (set_state_table): handle the `lookaheads' members.
22901 2001-11-19 Akim Demaille <akim@epita.fr>
22903 * src/lalr.h (lookaheads): Removed array, whose contents is now
22905 (state_t): this structure.
22906 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22909 2001-11-19 Akim Demaille <akim@epita.fr>
22911 * src/lalr.h (consistent): Removed array, whose contents is now
22913 (state_t): this structure.
22914 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22917 2001-11-19 Akim Demaille <akim@epita.fr>
22919 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
22920 contents are now members of...
22921 (state_t): this structure.
22922 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22925 2001-11-19 Akim Demaille <akim@epita.fr>
22927 * src/lalr.h (state_t): New.
22928 (state_table): Be a state_t * instead of a core **.
22929 (accessing_symbol): Remove, part of state_t.
22930 * src/lalr.c: Adjust.
22931 (set_accessing_symbol): Merge into...
22932 (set_state_table): this.
22933 * src/print_graph.c, src/conflicts.c: Adjust.
22935 2001-11-14 Akim Demaille <akim@epita.fr>
22937 * tests/calc.at, tests/output.at, tests/regression.at,
22938 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
22939 now the tests are run in private dirs, therefore AC_CLEANUP and
22940 family can be simplified to 0-ary.
22941 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
22942 use abs. path to find config.h.
22943 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
22944 stderr, there can be way too much random noise.
22945 Instead pass -Werror to GCC and rely on the exit status.
22946 Reported by Wolfram Wagner.
22948 2001-11-14 Akim Demaille <akim@epita.fr>
22950 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
22951 defined only if yyoverflow is defined, to avoid `warning: unused
22953 Reported by The Test Suite.
22955 2001-11-14 Akim Demaille <akim@epita.fr>
22957 * src/print.c: Include reduce.h.
22958 Reported by Hans Aberg.
22960 2001-11-14 Akim Demaille <akim@epita.fr>
22962 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
22963 Revert a previous patch: these are really const.
22964 * src/conflicts.c (conflict_report): Additional useless pair of
22965 braces to pacify GCC's warnings for `if () if () {} else {}'.
22966 * src/lex.c (parse_percent_token): Replace equal_offset with
22969 Be sure to strdup `arg' when used, since there is no reason for
22970 token_buffer not to change.
22972 2001-11-14 Akim Demaille <akim@epita.fr>
22974 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
22976 * src/main.c (main): Use them.
22977 Suggested by Hans Aberg.
22979 2001-11-12 Akim Demaille <akim@epita.fr>
22981 * src/system.h (ngettext): Now that we use ngettext, be sure to
22982 provide a default definition when NLS are not used.
22984 2001-11-12 Akim Demaille <akim@epita.fr>
22986 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
22987 Use @kbd to denote user input.
22988 (Language and Grammar): ANSIfy the example.
22989 Adjust its layout for info/notinfo.
22990 (Location Tracking Calc): Output error messages to stderr.
22991 Output locations in a more GNUtically correct way.
22992 Fix a couple of Englishos.
22993 Adjust @group/@end group pairs.
22995 2001-11-12 Akim Demaille <akim@epita.fr>
22997 %expect was not functioning at all.
22999 * src/conflicts.c (expected_conflicts): Set to -1.
23000 (conflict_report): Use ngettext.
23001 (conflicts_print): Check %expect and make its violation an error.
23002 * doc/bison.texinfo (Expect Decl): Adjust.
23003 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
23004 * tests/regression.at (%expect not enough, %expect right)
23005 (%expect too much): New.
23007 2001-11-12 Akim Demaille <akim@epita.fr>
23009 * tests/regression.at (Conflicts): Rename as...
23010 (Unresolved SR Conflicts): this.
23011 (Solved SR Conflicts): New.
23013 2001-11-12 Akim Demaille <akim@epita.fr>
23015 * src/reduce.c (print_results): Rename as...
23016 (reduce_output): This.
23017 Output to OUT, passed as argument, instead of output_obstack.
23018 (dump_grammar): Likewise.
23019 (reduce_free): New.
23021 (reduce_grammar): No longer call reduce_output, since...
23022 * src/print.c (print_results): do it.
23023 * src/main.c (main): Call reduce_free;
23025 2001-11-12 Akim Demaille <akim@epita.fr>
23027 * src/conflicts.c (print_reductions): Accept OUT as argument.
23028 Output to it, not to output_obstack.
23029 * src/print.c (print_actions): Adjust.
23031 2001-11-12 Akim Demaille <akim@epita.fr>
23033 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
23034 the result instead of using...
23035 (src_total, rrc_total, src_count, rrc_count): Remove.
23036 (any_conflicts): Remove.
23037 (print_conflicts): Split into...
23038 (conflicts_print, conflicts_output): New.
23039 * src/conflicts.h: Adjust.
23040 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
23041 * src/print.c (print_grammar): Issue `\n' between two rules.
23042 * tests/regression.at (Conflicts): New.
23043 Reported by Tom Lane.
23045 2001-11-12 Akim Demaille <akim@epita.fr>
23047 * tests/regression.at (Invalid input): Remove, duplicate with
23048 ``Invalid input: 1''.
23050 2001-11-12 Akim Demaille <akim@epita.fr>
23052 * tests/torture.at (AT_DATA_STACK_TORTURE)
23053 (Exploding the Stack Size with Alloca)
23054 (Exploding the Stack Size with Malloc): New.
23056 2001-11-12 Akim Demaille <akim@epita.fr>
23058 * src/bison.simple (YYSTACK_REALLOC): New.
23059 (yyparse) [!yyoverflow]: Use it and free the old stack.
23060 Reported by Per Allansson.
23062 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
23064 * src/bison.simple: Define type yystype instead of YYSTYPE, and
23065 define CPP macro, which substitute YYSTYPE by yystype.
23066 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
23067 with yyltype/YYLTYPE. This allows inclusion of the generated
23068 header within the parser if the compiler, such as GGC, accepts
23069 multiple equivalent #defines.
23072 2001-11-05 Akim Demaille <akim@epita.fr>
23074 * src/reader.c (symbols_output): New, extracted from...
23075 (packsymbols): here.
23078 2001-11-05 Akim Demaille <akim@epita.fr>
23080 * src/lex.c (parse_percent_token): s/quotearg/quote/.
23082 2001-11-05 Akim Demaille <akim@epita.fr>
23084 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
23087 2001-11-05 Akim Demaille <akim@epita.fr>
23089 * src/options.h (struct option_table_struct): set_flags is void*.
23090 * src/options.c (longopts): Support `--output' and `%output'.
23092 * src/lex.h (tok_setopt): Remove, replaced with...
23093 (tok_intopt, tok_stropt): these new guys.
23094 * src/lex.c (getopt.h): Not needed.
23095 (token_buffer, unlexed_token_buffer): Not const.
23096 (percent_table): Promote `-' over `_' in directive names.
23097 Active `%name-prefix', `file-prefix', and `output'.
23098 (parse_percent_token): Accept possible arguments to directives.
23099 Promote `-' over `_' in directive names.
23101 2001-11-04 Akim Demaille <akim@epita.fr>
23103 * doc/bison.texinfo (Decl Summary): Split the list into
23104 `directives for grammars' and `directives for bison'.
23106 Add description of `%name-prefix', `file-prefix', and `output'.
23107 Promote `-' over `_' in directive names.
23108 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
23109 Simplify the description of `--name-prefix'.
23110 Promote `-' over `_' in directive names.
23111 Promote `--output' over `--output-file'.
23112 Fix the description of `--defines'.
23113 * tests/output.at: Exercise %file-prefix and %output.
23115 2001-11-02 Akim Demaille <akim@epita.fr>
23117 * doc/refcard.tex: Update.
23119 2001-11-02 Akim Demaille <akim@epita.fr>
23121 * src/symtab.h (SUNDEF): New.
23122 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
23123 stand for `uninitialized', instead of 0.
23124 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
23125 * src/lex.c (lex): Adjust.
23127 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
23129 Let yylex return it instead of a plain 0.
23130 Reported by Dick Streefland.
23132 2001-11-02 Akim Demaille <akim@epita.fr>
23134 * tests/regression.at (Mixing %token styles): New test.
23136 2001-11-02 Akim Demaille <akim@epita.fr>
23138 * src/reader.c (parse_thong_decl): Formatting changes.
23139 (token_translations_init): New, extracted from...
23140 (packsymbols): Here.
23143 2001-11-01 Akim Demaille <akim@epita.fr>
23145 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
23146 Check that `9foo.y' produces correct cpp guards.
23147 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
23151 2001-11-01 Akim Demaille <akim@epita.fr>
23153 * tests/regression.at (Invalid input: 2): New.
23154 * src/lex.c (unlexed_token_buffer): New.
23155 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
23159 2001-11-01 Akim Demaille <akim@epita.fr>
23161 * tests/calc.at: Catch up with 1.30.
23162 * configure.in: Bump to 1.49a.
23163 Adjust to newer Autotest.
23165 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
23167 * src/conflicts.c: Move global variables rrc_total and src_total ...
23168 (print_conflicts): here.
23169 * src/output.c (output): Free global variable user_toknums.
23170 * src/lex.c (token_obstack): Become static.
23172 2001-10-18 Akim Demaille <akim@epita.fr>
23174 * tests/atlocal.in (GCC): Add.
23175 * tests/calc.at: s/m4_match/m4_bmatch/.
23176 s/m4_patsubst/m4_bpatsubst/.
23177 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
23178 * configure.in: AC_SUBST(GCC).
23180 2001-10-14 Marc Autret <autret_m@epita.fr>
23182 * src/options.c (create_long_option_table): Fix.
23184 2001-10-10 Akim Demaille <akim@epita.fr>
23186 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
23188 2001-10-04 Akim Demaille <akim@epita.fr>
23190 * src/reader.c (parse_union_decl): Push the caracters in
23191 union_obstack, not attrs_obstack.
23193 2001-10-04 Akim Demaille <akim@epita.fr>
23195 Merge in the branch 1.29.
23197 * src/reader.c (packsymbols): Use a temporary obstack for
23198 `%%tokendef', since output_stack is already used elsewhere.
23200 2001-10-02 Akim Demaille <akim@epita.fr>
23204 2001-10-02 Akim Demaille <akim@epita.fr>
23208 2001-10-02 Akim Demaille <akim@epita.fr>
23210 * tests/regression.at (Invalid CPP headers): New.
23211 From Alexander Belopolsky.
23212 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
23214 2001-10-02 Akim Demaille <akim@epita.fr>
23216 * tests/regression.at (Invalid input): New.
23217 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
23220 2001-10-02 Akim Demaille <akim@epita.fr>
23222 * tests/calc.at: Now that --debug works, the tests must be adjusted.
23224 2001-10-02 Akim Demaille <akim@epita.fr>
23226 * src/output.c (output_parser): Assert `skeleton'.
23227 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
23231 2001-10-01 Marc Autret <autret_m@epita.fr>
23233 * src/lex.h: Echo modifications.
23234 * src/lex.c (unlex): Parameter is now token_t.
23237 2001-10-01 Marc Autret <autret_m@epita.fr>
23239 * src/main.c: Include lex.h.
23242 2001-09-29 Akim Demaille <akim@epita.fr>
23244 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
23246 2001-09-28 Akim Demaille <akim@epita.fr>
23248 * tests/testsuite.at: Update to newer Autotest.
23249 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
23251 2001-09-27 Akim Demaille <akim@epita.fr>
23253 Position independent wrapper.
23255 * tests/bison: Remove.
23256 * tests/bison.in: New.
23257 * configure.in: Adjust.
23259 2001-09-27 Paul Eggert <eggert@twinsun.com>
23261 Port quotearg fixes from tar 1.13.24.
23263 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23265 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
23266 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
23268 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
23269 * m4/mbrtowc.m4: New file.
23270 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
23271 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
23273 2001-09-27 Akim Demaille <akim@epita.fr>
23277 2001-09-27 Akim Demaille <akim@epita.fr>
23281 2001-09-25 Akim Demaille <akim@epita.fr>
23283 * src/system.h: Include `xalloc.h'.
23284 Remove it from the C files.
23285 * src/files.c (output_files): Free the obstacks.
23286 * src/lex.c (init_lex): Rename as...
23289 * src/main.c (main): Use it.
23291 2001-09-24 Marc Autret <autret_m@epita.fr>
23293 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
23294 to output informations in fout (FILE*).
23295 (open_graph, close_graph): Likewise.
23296 (output_graph, output_edge, output_node): Likewise.
23297 * src/vcg.h: Update function prototypes.
23298 * src/print_graph.c (print_graph): Open output graph file.
23299 (print_actions): Adjust.
23300 * src/files.h: Remove extern declaration.
23301 * src/files.c: Remove graph_obstack declaration.
23302 (open_files): Remove graph_obstack initialization.
23303 (output_files): Remove graph_obstack saving.
23305 2001-09-24 Marc Autret <autret_m@epita.fr>
23307 * src/files.c (compute_output_file_names): Fix.
23309 2001-09-24 Marc Autret <autret_m@epita.fr>,
23310 Akim Demaille <akim@epita.fr>
23312 * src/reader.c (reader): Remove call to free_symtab ().
23313 * src/main.c (main): Call it here.
23315 * src/conflicts.c (initialize_conflicts): Rename as...
23316 (solve_conflicts): this.
23317 * src/print.c (print_core, print_actions, print_state)
23318 (print_grammar): Dump to a file instead a `output_obstack'.
23319 (print_results): Dump `output_obstack', and then proceed with the
23321 * src/files.c (compute_output_file_names, close_files): New.
23322 (output_files): Adjust.
23323 * src/main.c (main): Adjust.
23325 2001-09-23 Marc Autret <autret_m@epita.fr>
23327 * src/files.c (compute_header_macro): Computes header macro name
23328 from spec_defines_file when given.
23330 2001-09-23 Marc Autret <autret_m@epita.fr>
23332 * src/files.c (output_files): Add default extensions.
23334 2001-09-22 Akim Demaille <akim@epita.fr>
23336 * src/conflicts.c (finalize_conflicts): Rename as...
23337 (free_conflicts): this.
23339 2001-09-22 Akim Demaille <akim@epita.fr>
23341 * src/gram.c (gram_free): Rename back as...
23343 (output_token_translations): Free `token_translations'.
23344 * src/symtab.c (free_symtab): Free the tag field.
23346 2001-09-22 Akim Demaille <akim@epita.fr>
23348 Remove `translations' as it is always set to true.
23350 * src/gram.h: Adjust.
23351 * src/reader.c (packsymbols, parse_token_decl): Adjust
23352 * src/print.c (print_grammar): Adjust.
23353 * src/output.c (output_token_translations): Adjust.
23354 * src/lex.c (lex): Adjust.
23355 * src/gram.c: Be sure the set pointers to NULL.
23356 (dummy): Rename as...
23359 2001-09-22 Akim Demaille <akim@epita.fr>
23361 * configure.in: Invoke AM_LIB_DMALLOC.
23362 * src/system.h: Use dmalloc.
23363 * src/LR0.c: Be sure to have pointers initialized to NULL.
23364 (allocate_itemsets): Allocate kernel_items only if needed.
23366 2001-09-22 Akim Demaille <akim@epita.fr>
23368 * configure.in: Bump to 1.29b.
23369 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
23370 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
23371 need xmalloc.c in calc.y.
23374 2001-09-21 Akim Demaille <akim@epita.fr>
23377 * Makefile.maint, config/config.guess, config/config.sub,
23378 * config/missing: Update from masters.
23379 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
23381 * configure.in (ALL_LINGUAS): Add `tr'.
23383 2001-09-21 Akim Demaille <akim@epita.fr>
23385 * tests/Makefile.am (package.m4): Move to...
23386 ($(srcdir)/$(TESTSUITE)): here.
23388 2001-09-20 Akim Demaille <akim@epita.fr>
23390 * src/complain.c: No longer try to be standalone: use system.h.
23391 Don't assume __STDC__ is defined to 1. Just test if it is defined.
23392 * src/complain.h: Likewise.
23393 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
23394 Remove the unused variable `n'.
23395 From Albert Chin-A-Young.
23397 2001-09-18 Marc Autret <autret_m@epita.fr>
23399 * doc/bison.1: Update.
23400 * doc/bison.texinfo (Bison Options): Update --defines and --graph
23402 (Option Cross Key): Update.
23405 2001-09-18 Marc Autret <autret_m@epita.fr>
23407 * tests/regression.at: New test (comment in %union).
23409 2001-09-18 Marc Autret <autret_m@epita.fr>
23411 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
23413 Reported by Keith Browne.
23415 2001-09-18 Marc Autret <autret_m@epita.fr>
23417 * tests/output.at: Add tests for --defines and --graph.
23419 2001-09-18 Marc Autret <autret_m@epita.fr>
23421 * tests/output.at: Removes tests of %{header,src}_extension features.
23423 2001-09-18 Akim Demaille <akim@epita.fr>
23425 * tests/Makefile.am (package.m4): New.
23426 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
23427 (_AT_CHECK_CALC_ERROR): Likewise.
23428 Factor the `, ' part of verbose error messages.
23430 2001-09-18 Marc Autret <autret_m@epita.fr>
23432 * src/getargs.c (longopts): Declare --defines and --graph as options
23433 with optional arguments.
23434 * src/files.h: Add extern declarations.
23435 * src/files.c (spec_graph_file, spec_defines_file): New.
23436 (output_files): Update.
23437 Remove CPP-outed code.
23439 2001-09-18 Marc Autret <autret_m@epita.fr>
23441 Turn off %{source,header}_extension feature.
23443 * src/files.c (compute_exts_from_gf): Update.
23444 (compute_exts_from_src): Update.
23445 (output_files): CPP-out useless code.
23446 * src/files.h: Remove {header,source}_extension extern declarations.
23447 * src/reader.c (parse_dquoted_param): CPP-out.
23448 (parse_header_extension_decl): Remove.
23449 (parse_source_extension_decl): Remove.
23450 (read_declarations): Remove cases tok_{hdrext,srcext}.
23451 * src/lex.c (percent_table): Remove {header,source}_extension entries.
23452 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
23454 2001-09-10 Akim Demaille <akim@epita.fr>
23456 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
23457 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
23458 (AT_CHECK_OUTPUT): this.
23459 Merely check ls' exit status, its output is useless.
23461 2001-09-10 Akim Demaille <akim@epita.fr>
23463 * tests/calc.at: Use m4_match.
23464 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
23466 2001-09-10 Marc Autret <autret_m@epita.fr>,
23467 Akim Demaille <akim@epita.fr>
23469 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
23471 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
23473 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
23474 * src/lex.h: Adjust prototype.
23475 (token_t): Add `tok_undef'.
23476 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
23477 (parse_percent_token): Now returns token_t.
23478 Add default statement in switch.
23479 (lex): Separate `c' as an input variable, from the token_t result
23481 (unlexed): Is a token_t.
23483 2001-09-10 Akim Demaille <akim@epita.fr>
23485 * configure.in: Bump to 1.29a.
23487 2001-09-07 Akim Demaille <akim@epita.fr>
23491 2001-08-30 Akim Demaille <akim@epita.fr>
23493 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
23494 * m4/atconfig.m4: Remove.
23495 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
23496 * tests/bison: New.
23497 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
23498 m4_if, m4_patsubst, and m4_regexp.
23499 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
23500 `input' file instead of echo.
23502 2001-08-29 Akim Demaille <akim@epita.fr>
23506 2001-08-29 Akim Demaille <akim@epita.fr>
23510 2001-08-29 Paul Eggert <eggert@twinsun.com>
23512 * src/bison.simple (yyparse): Don't take the address of an
23513 item before the start of an array, as that doesn't conform to
23516 2001-08-29 Robert Anisko <anisko_r@epita.fr>
23518 * doc/bison.texinfo (Location Tracking Calc): New node.
23520 2001-08-29 Paul Eggert <eggert@twinsun.com>
23522 * src/output.c (output): Do not define const, as this now
23523 causes more problems than it cures.
23525 2001-08-29 Akim Demaille <akim@epita.fr>
23527 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
23529 Be sure to tag the `detailmenu'.
23531 2001-08-29 Akim Demaille <akim@epita.fr>
23533 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
23534 download in a tmp dir.
23536 2001-08-28 Marc Autret <autret_m@epita.fr>
23538 * config/depcomp: New file.
23540 2001-08-28 Marc Autret <autret_m@epita.fr>
23542 * doc/bison.1 (mandoc): Adjust.
23543 From Juan Manuel Guerrero.
23545 2001-08-28 Marc Autret <autret_m@epita.fr>
23547 * src/print_graph.c (print_state): Fix.
23549 2001-08-27 Marc Autret <autret_m@epita.fr>
23551 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
23553 Echo modifications to the functions prototypes.
23554 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
23556 2001-08-27 Marc Autret <autret_m@epita.fr>
23558 * src/vcg.c: Include `xalloc.h'.
23559 (add_colorentry): New.
23560 (add_classname): New.
23561 (add_infoname): New.
23562 * src/vcg.h: Add new prototypes.
23564 2001-08-27 Akim Demaille <akim@epita.fr>
23566 * Makefile.maint: Sync. again with CVS Autoconf.
23568 2001-08-27 Akim Demaille <akim@epita.fr>
23570 * Makefile.maint: Formatting changes.
23571 (po-update, cvs-update, update): New targets.
23574 2001-08-27 Akim Demaille <akim@epita.fr>
23576 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23577 * Makefile.maint: Sync. with CVS Autoconf.
23579 2001-08-27 Marc Autret <autret_m@epita.fr>
23581 * src/vcg.h (struct infoname_s): New.
23582 (struct colorentry_s): New.
23583 (graph_s): New fields {vertical,horizontal}_order in structure.
23584 Add `infoname' field.
23585 Add `colorentry' field;
23586 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
23587 (G_HORIZONTAL_ORDER): New.
23589 (G_COLORENTRY): New.
23590 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
23591 Add output of `infoname'.
23592 Add output of `colorentry'.
23594 2001-08-27 Marc Autret <autret_m@epita.fr>
23596 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
23597 This one shadowed a global parameter.
23599 2001-08-24 Marc Autret <autret_m@epita.fr>
23601 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
23602 instead of `unsigned'.
23603 (print_state): Do not call obstack_object_size () in obstack_grow ()
23604 to avoid macro variables shadowing.
23606 2001-08-23 Marc Autret <autret_m@epita.fr>
23608 * src/lex.c (percent_table): Typo: s/naem/name/.
23610 Normalize new options declarations.
23612 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
23614 * tests/suite.at: Exercise %header_extension and %source_extension.
23616 2001-08-16 Marc Autret <autret_m@epita.fr>
23618 * src/reader.c (parse_dquoted_param): New.
23619 (parse_header_extension_decl): Use it.
23620 (parse_source_extension_decl): Likewise.
23622 2001-08-16 Marc Autret <autret_m@epita.fr>
23624 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
23625 (get_xxxx_str): Use assert () instead of complain ().
23626 Remove return invokations in default cases.
23627 (get_decision_str): Modify default behaviour. Remove second argument.
23628 Echo modifications on calls.
23629 (output_graph): Fix.
23631 2001-08-16 Marc Autret <autret_m@epita.fr>
23633 * src/getargs.c (usage): Update with ``-g, --graph''.
23635 2001-08-16 Marc Autret <autret_m@epita.fr>
23637 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
23638 (Option Cross Key): Likewise.
23639 * doc/bison.1: Update.
23641 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
23643 * src/output.c (output_master_parser): Don't finish action_obstack.
23644 (output_parser): Don't care about the muscle action, here.
23645 (prepare): Copy the action_obstack in the action muscle.
23646 (output): Free action_obstack.
23648 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23650 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
23651 will contain `%union' declaration.
23652 (parse_union_decl): Delete #line directive output.
23653 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
23654 informations about %union.
23655 (parse_union_decl): Copy the union_obstack in the muscle stype.
23656 * src/bison.simple: Add new #line directive.
23657 Add typdef %%stype YYSTYPE.
23659 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23661 * src/bison.simple: Add new `#line' directive.
23663 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
23665 * src/bison.simple: New `#line' directive.
23666 * src/output.c (output_parser): Support new dynamic muscle input_line.
23668 2001-09-22 Marc Autret <autret_m@epita.fr>
23670 * src/output.c (output_master_parser): New.
23671 (output_parser): Be more re-entrant.
23673 2001-09-21 Marc Autret <autret_m@epita.fr>
23675 * src/reader.c (copy_definition, parse_union_decl): Update and use
23677 (copy_action): Likewise.
23678 Use obstack_1grow ().
23679 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
23681 2001-09-21 Marc Autret <autret_m@epita.fr>
23683 * src/options.c (option_table): Adjust.
23684 * src/lex.c (parse_percent_token): Fix.
23686 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23688 * src/options.c (symtab.h): Include it, need by lex.h.
23690 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23692 * src/lex.c (parse_percent_token): Change type of variable `tx', which
23693 is now an option_table_struct*.
23694 (option_strcmp): New function option_strcmp.
23695 (parse_percent_token): Call option_strcmp.
23696 * src/getargs.c (xalloc.h, options.h): Include it.
23697 (getargs): Call create_long_option_table.
23698 (getargs): Free longopts at the end of the function.
23699 (shortopts): Move in options.c.
23700 * src/options.c (create_long_option_table): New function. Convert
23701 information from option_table to option structure.
23702 * src/reader.c (options.h): Include it.
23704 * src/Makefile.am: Adjust.
23705 * src/options.c (option_table): Create from longopts and percent_table.
23706 * src/getargs.c (longopts): Delete.
23707 * src/lex.c (struct percent_table_struct): Delete.
23708 (percent_table): Delete.
23709 (options.h): Include it.
23710 * src/options.c: Create.
23711 * src/options.h: Create.
23712 Declare enum opt_access_e.
23713 Define struct option_table_struct.
23715 2001-09-20 Marc Autret <autret_m@epita.fr>
23717 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
23720 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
23722 * src/bison.simple: s/%%filename/%%skeleton.
23723 * src/muscle_tab.c (getargs.h): Include it.
23724 (muscle_init): Insert new muscle skeleton.
23726 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
23728 * src/output.c (output_parser): Delete unused variable actions_dumped.
23730 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
23732 * src/output.c (output): Delete call to reader_output_yylsp.
23733 * src/reader.c (reader): Likewise.
23734 * src/reader.h: Delete declaration of reader_output_yylsp.
23736 2001-09-02 Marc Autret <autret_m@epita.fr>
23738 * src/reader.c: Include muscle_tab.h.
23739 (parse_union_decl): Update.
23740 (parse_macro_decl): Rename parse_muscle_decl.
23741 Update to use renamed functions and variable.
23742 (read_declarations, copy_action, read_additionnal_code, : Updated
23743 with correct variables and functions names.
23744 (packsymbols, reader): Likewise.
23746 * src/reader.h (muscle_obstack): Extern declaration update.
23748 * src/output.c: Include muscle_tab.h
23749 In all functions using macro_insert, change by using muscle_insert ().
23750 (macro_obstack): Rename muscle_obstack.
23751 Echo modifications in the whole file.
23752 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
23753 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
23754 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
23756 * src/muscle_tab.h: Update double inclusion macros.
23757 (macro_entry_s): Rename muscle_entry_s.
23760 * src/muscle_tab.c: Include muscle_tab.h.
23761 Rename macro_tabble to muscle_table.
23762 (mhash1, mhash2, mcmp): Use muscle_entry.
23763 (macro_init): Rename muscle_init. Update.
23764 (macro_insert): Rename muscle_insert. Update.
23765 (macro_find): Rename muscle_find. Update.
23767 * src/main.c: Include muscle_tab.h.
23768 (main): Call muscle_init ().
23769 * src/Makefile.am (bison_SOURCES): Echo modifications.
23771 2001-09-02 Marc Autret <autret_m@epita.fr>
23773 Now the files macro_tab.[ch] are named muscle_tab.[ch].
23775 * src/muscle_tab.c, src/muscle_tab.h: Add files.
23777 2001-09-02 Marc Autret <autret_m@epita.fr>
23779 * src/macrotab.c, src/macrotab.h: Remove.
23781 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
23783 * src/reader.c (copy_guard): Use muscle to specify the `#line'
23786 2001-09-01 Marc Autret <autret_m@epita.fr>
23788 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
23789 to an explicit value to activate the feature. We do it here.
23791 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23793 * src/output.c (prepare): Delete the `filename' muscule insertion.
23794 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
23795 (parse_union_decl): Likewise.
23796 * src/macrotab.c (macro_init): Initialize filename by infile.
23798 2001-08-31 Marc Autret <autret_m@epita.fr>
23800 * src/bison.simple (YYLSP_NEEDED): New definition.
23801 * src/output.c (prepare): Add macro insertion of `locations_flag'
23803 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23805 * src/output.c (prepare): Delete insertion of previous muscles,
23806 and insert the `prefix' muscles.
23807 * src/macrotab.c (macro_init): Likewise.
23808 (macro_init): Initialization prefix directive by `yy'.
23809 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
23810 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
23811 yylval, yydebug, yyerror, yynerrs and yyparse.
23812 New directive `#define' to substitute yydebug, ... with option
23815 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23817 * src/main.c (main): Standardize.
23818 * src/output.c (output_table_data, output_parser): Likewise.
23819 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
23821 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
23823 * src/reader.c (read_additionnal_code): Rename %%user_code to
23825 * src/output.c (output): Rename %%declarations to %%prologue.
23826 * src/bison.simple: Echo modifications.
23828 2001-08-31 Marc Autret <autret_m@epita.fr>
23830 * src/reader.c (readgram): CleanUp.
23831 (output_token_defines): Likewise.
23832 (packsymbols): Likewise.
23833 (reader): Likewise.
23834 * src/output.c (output): CPP-out useless code.
23836 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23838 * src/reader.c (reader): Delete obsolete call to function
23839 output_trailers and output_headers.
23840 * src/output.h: Remove obsolete functions prototypes of output_headers
23841 and output_trailers.
23843 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
23845 * src/main.c: Include macrotab.h.
23846 * src/macrotab.h (macro_entry_s): Constify fields.
23847 Adjust functions prototypes.
23848 * src/macrotab.c (macro_insert): Constify key and value.
23849 (macro_find): Constify key.
23850 (macro_insert): Include 'xalloc.h'
23851 (macro_insert): Use XMALLOC.
23852 (macro_find): Constify return value.
23853 * src/output.c (output_table_data): Rename table to table_data.
23854 (output_parser): Constify macro_key, macro_value.
23856 2001-08-30 Marc Autret <autret_m@epita.fr>
23858 * src/reader.c (parse_skel_decl): New.
23859 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
23860 * src/lex.h (token_t): New token `tok_skel'.
23861 * src/lex.c (percent_table): Add skeleton option entry.
23864 2001-08-29 Marc Autret <autret_m@epita.fr>
23866 * src/bison.simple: Add %%user_code directive at the end.
23867 * src/reader.c (read_additionnal_code): New.
23869 * src/output.c (output_program): Remove.
23872 2001-08-28 Marc Autret <autret_m@epita.fr>
23874 * src/output.c (output_actions): Clean up.
23875 (output_gram): CPP-out useless code.
23876 * src/reader.c (reader): Clean up, CPP-out useless code.
23878 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
23880 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
23882 * src/bison.simple: Add `%%definitions'.
23884 2001-08-28 Marc Autret <autret_m@epita.fr>
23886 * config/depcomp: New file.
23888 2001-08-27 Paul Eggert <eggert@twinsun.com>
23890 * src/bison.simple (yyparse): Don't take the address of an
23891 item before the start of an array, as that doesn't conform to
23894 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
23896 * src/output.c (output): Remove the initialization of the macro
23897 obstack. It was done too late here.
23899 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
23901 (reader): Initialize the macro obstack here, since we need it to grow
23902 '%define' directives.
23904 * src/reader.h: Declare the macro obstack as extern.
23906 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
23908 * src/output.c (output_parser): Fix. Store single '%' characters in
23909 the output obstack instead of throwing them away.
23911 2001-08-27 Akim Demaille <akim@epita.fr>
23913 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23915 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23917 * lib/Makefile.am: Adjust.
23919 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23921 * src/bison.simple: Update and add '%%' directives.
23923 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23925 * src/reader.c (reader): Remove calls to 'output_headers' and
23926 'output_trailers'. Remove some C output.
23927 (readgram): Disable a piece of code that was writing a default
23928 definition for 'YYSTYPE'.
23929 (reader_output_yylsp): Remove.
23930 (packsymbols): Output token defintions to a macro.
23931 (copy_definition): Disable C output.
23933 * src/reader.c (parse_macro_decl): New function used to parse macro
23935 (copy_string2): Put the body of copy_string into this new function.
23936 Add a parameter to let the caller choose whether he wants to copy the
23937 string delimiters or not.
23938 (copy_string): Be a simple call to copy_string2 with the last argument
23940 (read_declarations): Add case for macro definition.
23941 (copy_identifier): New.
23942 (parse_macro_decl): Read macro identifiers using copy_identifier
23945 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23947 * src/output.c (prepare): Add prefixed names.
23948 (output_parser): Output semantic actions.
23949 (output_parser): Fix bug on '%%line' directives.
23951 * src/output.c (output_headers): Remove. The C code printed by this
23952 function should now be in the skeletons.
23953 (output_trailers): Remove.
23954 (output): Disable call to 'reader_output_yylsp'.
23955 (output_rule_data): Do not output tables to the table obstack.
23957 * src/output.c: Remove some C dedicated output.
23958 Improve the use of macro and output obstacks.
23959 (output_defines): Remove.
23961 * src/output.c (output_token_translations): Associate 'translate'
23962 table with a macro. No output to the table obstack.
23963 (output_gram): Same for 'rhs' and 'prhs'.
23964 (output_stos): Same for 'stos'.
23965 (output_rule_data): Same for 'r1' and 'r2'.
23966 (token_actions): Same for 'defact'.
23967 (goto_actions): Same for 'defgoto'.
23968 (output_base): Same for 'pact' and 'pgoto'.
23969 (output_table): Same for 'table'.
23970 (output_check): Same for 'check'.
23972 * src/output.c (output_table_data): New function.
23973 (output_short_table): Remove.
23974 (output_short_or_char_table): Remove.
23976 * src/output.c (output_parser): Replace most of the skeleton copy code
23977 with something new. Skeletons are now processed character by character
23978 rather than line by line, and Bison looks for '%%' macros. This is the
23979 first step in making Bison's output process (a lot) more flexible.
23980 (output_parser): Use the macro table.
23982 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23984 * src/main.c (main): Initialize the macro table.
23986 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23988 * src/lex.c (percent_table): Add tok_define.
23989 * src/lex.h: Add tok_define.
23991 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23993 * src/macrotab.c: New file.
23994 * src/macrotab.h: New file.
23995 * src/Makefile.am: Update.
23997 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23999 * lib/hash.c: New file.
24000 * lib/hash.h: New file.
24001 * lib/Makefile.am: Update.
24003 2001-08-15 Akim Demaille <akim@epita.fr>
24007 2001-08-15 Marc Autret <autret_m@epita.fr>
24009 * src/reader.c (readgram): Indent output macro YYSTYPE.
24010 (packsymbols): Likewise.
24011 (output_token_defines): Likewise.
24012 * src/files.c: Standardize.
24013 (compute_header_macro): New.
24014 (defines_obstack_save): New. Use compute_header_macro.
24015 (output_files): Update. Use defines_obstack_save.
24017 2001-08-15 Akim Demaille <akim@epita.fr>
24019 * doc/bison.texinfo (Table of Symbols): Document
24020 YYSTACK_USE_ALLOCA.
24022 2001-08-15 Akim Demaille <akim@epita.fr>
24024 * missing: Update from CVS Automake.
24025 * config/config.guess, config/config.sub, config/texinfo.tex:
24026 Update from gnu.org.
24028 2001-08-15 Akim Demaille <akim@epita.fr>
24030 * Makefile.maint: Sync with CVS Autoconf.
24032 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
24034 * doc/bison.texinfo: Include GNU Free Documentation License from
24036 * doc/fdl.texi: Add to package.
24038 2001-08-14 Marc Autret <autret_m@epita.fr>
24040 Turn on %{source,header}_extension features.
24042 * src/lex.c (percent_table): Un-CPP out header_extension and
24044 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
24045 (compute_exts_from_src): Remove conditions. It restores priorities
24048 2001-08-14 Marc Autret <autret_m@epita.fr>
24050 * src/files.c (compute_base_names): Add extensions computing when
24051 `--file-prefix' used.
24052 Standardize function calls.
24054 2001-08-13 Marc Autret <autret_m@epita.fr>
24056 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
24057 defining it (defined but null disables alloca).
24059 2001-08-13 Marc Autret <autret_m@epita.fr>
24061 * src/bison.simple (_yy_memcpy): CPP reformat.
24063 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
24065 * tests/atconfig.in (CPPFLAGS): Fix.
24067 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
24069 * doc/bison.texinfo: Include GNU General Public License from
24071 * doc/gpl.texi: Add to package.
24073 2001-08-10 Marc Autret <autret_m@epita.fr>
24075 * src/print_graph.h: Fix.
24076 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
24078 2001-08-10 Akim Demaille <akim@epita.fr>
24080 * src/system.h: Provide default declarations for stpcpy, strndup,
24083 2001-08-10 Robert Anisko <anisko_r@epita.fr>
24085 * doc/bison.texinfo (Locations): Update @$ stuff.
24087 2001-08-09 Robert Anisko <anisko_r@epita.fr>
24089 * src/bison.simple (YYLLOC_DEFAULT): Update.
24092 2001-08-08 Marc Autret <autret_m@epita.fr>
24094 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
24095 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
24096 Reported by Fabrice Bauzac.
24098 2001-08-08 Marc Autret <autret_m@epita.fr>
24100 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
24101 * src/vcg.c (output_node): Fix.
24102 * src/vcg.h: Cleanup.
24103 * src/print_graph.c: Add comments.
24104 (node_output_size): New global variable. Simplify the formatting of
24105 the VCG graph output.
24106 (print_actions): Unused code is now used. It notifies the final state
24107 and no action states in the VCG graph. It also give the reduce actions.
24108 The `shift and goto' edges are red and the `go to state' edges are
24110 Get the current node name and node_obstack by argument.
24111 (node_obstack): New variable.
24112 (print_state): Manage node_obstack.
24113 (print_core): Use node_obstack given by argument.
24114 A node is not only computed here but in print_actions also.
24115 (print_graph): CPP out useless code instead of commenting it.
24117 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
24119 * tests/atconfig.in (CPPFLAGS): Fix.
24121 2001-08-07 Akim Demaille <akim@epita.fr>
24123 * src/print_graph.c (quote): New.
24124 (print_core): Use it.
24126 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
24128 * src/vcg.c (complain.h): Include it.
24129 Unepitaize `return' invocations.
24130 [NDEBUG] (main): Remove.
24131 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
24132 * src/files.c (open_files): Initialize graph_obstack.
24133 * src/print_graph.c (print_actions): CPP out useless code.
24134 (print_core): Don't output the last `\n' in labels.
24136 * src/files.c (output_files): Output the VCG file.
24137 * src/main.c (main): Invoke print_graph ();
24139 2001-08-06 Marc Autret <autret_m@epita.fr>
24141 Automaton VCG graph output.
24142 Using option ``-g'' or long option ``--graph'', you can generate
24143 a gram_filename.vcg file containing a VCG description of the LALR (1)
24144 automaton of your grammar.
24146 * src/main.c: Call to print_graph() function.
24147 * src/getargs.h: Update.
24148 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
24149 (graph_flag): New flag.
24150 (longopts): Update.
24151 (getargs): Add case `g'.
24152 * src/files.c (graph_obstack): New obstack struct.
24153 (open_files): Initialize new obstack.
24154 (output_files): Saves graph_obstack if required.
24155 * src/files.h (graph_obstack): New extern declaration.
24156 * src/Makefile.am: Add new source files.
24158 2001-08-06 Marc Autret <autret_m@epita.fr>
24160 * src/print_graph.c, src/print_graph.h (graph): New.
24161 * src/vcg.h: New file.
24162 * src/vcg.c: New file, VCG graph handling.
24164 2001-08-06 Marc Autret <autret_m@epita.fr>
24166 Add of %source_extension and %header_extension which specify
24167 the source or/and the header output file extension.
24169 * src/files.c (compute_base_names): Remove initialisation of
24170 src_extension and header_extension.
24171 (compute_exts_from_gf): Update.
24172 (compute_exts_from_src): Update.
24173 (output_files): Update.
24174 * src/reader.c (parse_header_extension_decl): New.
24175 (parse_source_extension_decl): New.
24176 (read_declarations): New case statements for the new tokens.
24177 * src/lex.c (percent_table): Add entries for %source_extension
24178 and %header_extension.
24179 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
24181 2001-08-06 Marc Autret <autret_m@epita.fr>
24183 * configure.in: Bump to 1.28c.
24184 * doc/bison.texinfo: Texinfo thingies.
24186 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
24188 * tests/atconfig.in (CPPFLAGS): Add.
24189 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
24191 2001-08-03 Akim Demaille <akim@epita.fr>
24195 2001-08-03 Akim Demaille <akim@epita.fr>
24197 * tests/Makefile.am (check-local): Ship testsuite.
24198 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
24199 Include `string.h'.
24201 2001-08-03 Akim Demaille <akim@epita.fr>
24203 * configure.in: Try using -Wformat when compiling.
24205 2001-08-03 Akim Demaille <akim@epita.fr>
24207 * configure.in: Bump to 1.28b.
24209 2001-08-03 Akim Demaille <akim@epita.fr>
24211 * src/complain.c: Adjust strerror_r portability issues.
24213 2001-08-03 Akim Demaille <akim@epita.fr>
24217 2001-08-03 Akim Demaille <akim@epita.fr>
24219 * src/getargs.c, src/getarg.h (skeleton)): Constify.
24220 * src/lex.c (literalchar): Avoid name clashes on `buf'.
24221 * src/getargs.c: Include complain.h.
24222 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
24223 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
24225 2001-08-03 Akim Demaille <akim@epita.fr>
24227 * src/reader.c (readgram): Display hidden chars in error messages.
24229 2001-08-03 Akim Demaille <akim@epita.fr>
24231 Update to gettext 0.10.39.
24233 2001-08-03 Akim Demaille <akim@epita.fr>
24235 * lib/strspn.c: New.
24237 2001-08-01 Marc Autret <autret_m@epita.fr>
24239 * doc/bison.texinfo: Update.
24240 * doc/bison.1 (mandoc): Update.
24241 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
24242 * src/files.c: Support output files extensions computing.
24243 (src_extension): New static variable.
24244 (header_extension): New static variable.
24245 (tr): New function.
24246 (get_extension_index): New function, gets the index of an extension
24247 filename in a string.
24248 (compute_exts_from_gf): New function, computes extensions from the
24249 grammar file extension.
24250 (compute_exts_from_src): New functions, computes extensions from the
24251 C source file extension, file given by ``-o'' option.
24252 (compute_base_names): Update.
24253 (output_files): Update.
24255 2001-08-01 Robert Anisko <anisko_r@epita.fr>
24257 * doc/bison.texi: Document @$.
24258 (Locations): New section.
24260 2001-07-18 Akim Demaille <akim@epita.fr>
24262 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
24263 * config/prev-version.txt, config/move-if-change: New.
24264 * Makefile.am: Adjust.
24266 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
24268 * src/bison.simple (yyparse): Suppress warning `comparaison
24269 between signed and unsigned'.
24271 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
24273 * src/getargs.h (raw_flag): Remove.
24274 * src/getargs.c: Die on `-r'/`--raw'.
24275 * src/lex.c (parse_percent_token): Die on `%raw'.
24276 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
24277 * tests/calc.at: Suppress test with option `--raw'.
24279 2001-07-14 Akim Demaille <akim@epita.fr>
24282 * configure.in: Require Autoconf 2.50.
24283 Update to gettext 0.10.38.
24285 2001-03-16 Akim Demaille <akim@epita.fr>
24287 * doc/bison.texinfo: ANSIfy the examples.
24289 2001-03-16 Akim Demaille <akim@epita.fr>
24291 * getargs.c (skeleton): New variable.
24292 (longopts): --skeleton is a new option.
24293 (shortopts, getargs): -S is a new option.
24294 * getargs.h: Declare skeleton.
24295 * output.c (output_parser): Use it.
24297 2001-03-16 Akim Demaille <akim@epita.fr>
24299 * m4/strerror_r.m4: New.
24300 * m4/error.m4: Run AC_FUNC_STRERROR_R.
24301 * lib/error.h, lib/error.c: Update.
24303 2001-03-16 Akim Demaille <akim@epita.fr>
24305 * src/getargs.c (longopts): Clean up.
24307 2001-02-21 Akim Demaille <akim@epita.fr>
24309 * src/reader.c (gensym): `gensym_count' is your own.
24310 Use a static buf to create the symbol name, as token_buffer is no
24313 2001-02-08 Akim Demaille <akim@epita.fr>
24315 * src/conflicts.c (conflict_report): Be sure not to append to res
24316 between two calls, which could happen if both first sprintf were
24317 skipped, but not the first cp += strlen.
24319 2001-02-08 Akim Demaille <akim@epita.fr>
24321 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
24322 New, from fileutils 4.0.37.
24323 * configure.in: Require Autoconf 2.49c. I took some time before
24324 making this decision. This is the only way out for portability
24325 issues in Bison, it would mean way too much duplicate effort to
24326 import in Bison features implemented in 2.49c since 2.13.
24327 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
24329 2001-02-02 Akim Demaille <akim@epita.fr>
24331 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
24332 * lib/xalloc.h, lib/xmalloc.c: Update.
24334 2001-01-19 Akim Demaille <akim@epita.fr>
24336 Get rid of the ad hoc handling of token_buffer in the scanner: use
24339 * src/lex.c (token_obstack): New.
24340 (init_lex): Initialize it. No longer call...
24341 (grow_token_buffer): this. Remove it.
24342 Adjust all the places which used it to use the obstack.
24344 2001-01-19 Akim Demaille <akim@epita.fr>
24346 * src/lex.h: Rename all the tokens:
24347 s/\bENDFILE\b/tok_eof/g;
24348 s/\bIDENTIFIER\b/tok_identifier/g;
24350 Let them be enums, not #define, to ease debugging.
24351 Adjust all the code.
24353 2001-01-18 Akim Demaille <akim@epita.fr>
24355 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
24356 * src/lex.c (maxtoken, grow_token_buffer): Static.
24358 2001-01-18 Akim Demaille <akim@epita.fr>
24360 Since we now use obstacks, more % directives can be enabled.
24362 * src/lex.c (percent_table): Also accept `%yacc',
24363 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
24365 Handle the actions for `%semantic_parser' and `%pure_parser' here,
24366 instead of returning a token.
24367 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
24368 * src/reader.c (read_declarations): Adjust.
24369 * src/files.c (open_files): Don't call `compute_base_names', don't
24370 compute `attrsfile' since they depend upon data which might be
24371 *in* the input file now.
24372 (output_files): Do it here.
24373 * src/output.c (output_headers): Document the fact that this patch
24374 introduces a guaranteed SEGV for semantic parsers.
24375 * doc/bison.texinfo: Document them.
24376 * tests/suite.at: Exercise these %options.
24378 2000-12-20 Akim Demaille <akim@epita.fr>
24380 Also handle the output file (--verbose) with obstacks.
24382 * files.c (foutput): Remove.
24383 (output_obstack): New.
24384 Adjust all dependencies.
24385 * src/conflicts.c: Return a string.
24386 * src/system.h (obstack_grow_string): Rename as...
24387 (obstack_sgrow): this. Be ready to work with non literals.
24388 (obstack_fgrow4): New.
24390 2000-12-20 Akim Demaille <akim@epita.fr>
24392 * src/files.c (open_files): Fix the computation of short_base_name
24393 in the case of `-o foo.tab.c'.
24395 2000-12-20 Akim Demaille <akim@epita.fr>
24397 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
24398 (copy_dollar): Now that everything uses obstacks, get rid of the
24401 2000-12-20 Akim Demaille <akim@epita.fr>
24403 * src/files.c (open_files): Actually the `.output' file is based
24404 on the short_base_name, not base_name.
24405 * tests/suite.at (Checking output file names): Adjust.
24407 2000-12-20 Akim Demaille <akim@epita.fr>
24409 * src/bison.s1: Remove, we now use directly...
24410 * src/bison.simple: this.
24411 * src/Makefile.am: Use pkgdata instead of data.
24413 2000-12-20 Akim Demaille <akim@epita.fr>
24415 * src/files.c (guard_obstack): New.
24416 (open_files): Initialize it.
24417 (output_files): Dump it...
24418 * src/files.h: Export it.
24419 * src/reader.c (copy_guard): Use it.
24421 2000-12-19 Akim Demaille <akim@epita.fr>
24423 * src/files.c (outfile, defsfile, actfile): Removed as global
24425 (open_files): Don't compute them.
24426 (output_files): Adjust.
24427 (base_name, short_base_name): Be global.
24428 Adjust dependencies.
24430 2000-12-19 Akim Demaille <akim@epita.fr>
24432 * src/files.c (strsuffix): New.
24433 (stringappend): Be just like strcat but allocate.
24434 (base_names): Eve out from open_files.
24435 Try to simplify the rather hairy computation of base_name and
24437 (open_files): Use it.
24438 * tests/suite.at (Checking output file names): New test.
24440 2000-12-19 Akim Demaille <akim@epita.fr>
24442 * src/system.h (obstack_grow_literal_string): Rename as...
24443 (obstack_grow_string): this.
24444 * src/output.c (output_parser): Recognize `%% actions' instead of
24446 * src/bison.s1: s/$/%% actions/.
24447 * src/bison.hairy: Likewise.
24449 2000-12-19 Akim Demaille <akim@epita.fr>
24451 * src/output.c (output_parser): Compute the `#line' lines when
24453 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
24454 Suggested by Hans Aberg.
24456 2000-12-19 Akim Demaille <akim@epita.fr>
24458 Let the handling of the skeleton files be local to the procedures
24461 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
24463 (fparser, open_extra_files): Remove.
24464 (open_files, output_files): Don't take care of fparser.
24465 * src/files.h: Adjust.
24466 * src/output.c (output_parser): Open and close the file to the
24468 * src/reader.c (read_declarations): When %semantic_parser, open
24471 2000-12-19 Akim Demaille <akim@epita.fr>
24473 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
24474 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
24476 2000-12-19 Akim Demaille <akim@epita.fr>
24478 * src/files.c (open_files): Yipee! We no longer need all the code
24479 looking for `/tmp' since we have no tmp file.
24481 2000-12-19 Akim Demaille <akim@epita.fr>
24483 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
24485 * src/files.c (open_files): Less dependency on MSDOS etc.
24487 2000-12-14 Akim Demaille <akim@epita.fr>
24489 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
24490 Provide a default definition.
24491 Use it when executing the default @ action.
24492 * src/reader.c (reader_output_yylsp): No longer include
24493 `timestamp' and `text' in the default YYLTYPE.
24495 2000-12-12 Akim Demaille <akim@epita.fr>
24497 * src/reader.c (copy_definition, parse_union_decl, copy_action)
24498 (copy_guard): Quote the file names.
24499 Reported by Laurent Mascherpa.
24501 2000-12-12 Akim Demaille <akim@epita.fr>
24503 * src/output.c (output_headers, output_program, output): Be sure
24504 to escape special characters when outputting filenames.
24505 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
24506 (output_headers): Don't depend on them, Use ACTSTR.
24508 2000-11-17 Akim Demaille <akim@epita.fr>
24510 * lib/obstack.h: Formatting changes.
24511 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
24512 prevents type checking.
24513 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24514 cast the value to (void *): assigning a `foo *' to a `void *'
24516 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24517 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
24520 2000-11-17 Akim Demaille <akim@epita.fr>
24522 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
24524 (suite.m4, regression.m4, calc.m4): these.
24525 * tests/atgeneral.m4: Update from CVS Autoconf.
24527 2000-11-17 Akim Demaille <akim@epita.fr>
24529 * tests/regression.m4 (%union and --defines): New test,
24530 demonstrating a current bug in the obstack implementation.
24532 2000-11-17 Akim Demaille <akim@epita.fr>
24534 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
24536 Use them to declare the variables which are global or local to
24539 2000-11-17 Akim Demaille <akim@epita.fr>
24541 * acconfig.h: Remove, no longer used.
24543 2000-11-07 Akim Demaille <akim@epita.fr>
24545 * src: s/Copyright (C)/Copyright/g.
24547 2000-11-07 Akim Demaille <akim@epita.fr>
24549 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
24551 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
24553 2000-11-07 Akim Demaille <akim@epita.fr>
24555 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
24556 Merge in a single CPP if/else.
24558 2000-11-07 Akim Demaille <akim@epita.fr>
24560 * src/output.c (output): Remove useless variables.
24561 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
24562 argument `data' for consistency with the prototypes.
24563 Qualify it `const'.
24564 (obstack_copy, obstack_copy0): Rename the second argument as
24565 `address' for consistency. Qualify it `const'.
24566 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
24567 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
24568 `const' their input argument (`data' or `address').
24569 Adjust the corresponding macros to include `const' in casts.
24571 2000-11-03 Akim Demaille <akim@epita.fr>
24573 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
24574 s/PFILE1/BISON_HAIRY/.
24575 Adjust dependencies.
24577 2000-11-03 Akim Demaille <akim@epita.fr>
24579 For some reason, this was not applied.
24581 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24582 `unlink': it's no longer used.
24584 2000-11-03 Akim Demaille <akim@epita.fr>
24586 * src/files.c (skeleton_find): New function, eved out of...
24587 (open_files, open_extra_files): here.
24589 2000-11-03 Akim Demaille <akim@epita.fr>
24591 Don't use `atexit'.
24593 * src/files.c (obstack_save): New function.
24594 (done): Rename as...
24595 (output_files): this.
24596 Use `obstack_save'.
24597 * src/main.c (main): Don't use `atexit' to register `done', since
24598 it no longer has to remove tmp files, just call `output_files'
24599 when there are no errors.
24601 2000-11-02 Akim Demaille <akim@epita.fr>
24603 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24604 `unlink': it's no longer used.
24605 * src/files.h: Formatting changes.
24607 2000-11-02 Akim Demaille <akim@epita.fr>
24609 Remove the last uses of mktemp and unlink/delete.
24611 * src/files.c (fdefines, ftable): Removed.
24612 (defines_ostack, table_obstack): New.
24613 Adjust dependencies of the former into uses of the latter.
24614 * src/output.c (output_short_or_char_table, output_short_table):
24615 Convert to using obstacks.
24616 * src/reader.c (copy_comment2): Accept one FILE * and two
24618 (output_token_defines, reader_output_yylsp): Use obstacks.
24619 * src/system.h (obstack_fgrow3): New.
24620 * po/POTFILES.in: Adjust.
24622 2000-11-01 Akim Demaille <akim@epita.fr>
24624 Change each use of `fattrs' into a use of `attrs_obstack'.
24626 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
24627 * src/files.c (fattrs): Remove.
24628 (attrs_obstack): New.
24629 Adjust all dependencies.
24630 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
24632 2000-11-01 Akim Demaille <akim@epita.fr>
24634 Introduce obstacks.
24635 Change each use of `faction' into a use of `action_obstack'.
24637 * lib/obstack.h, lib/obstack.c: New files.
24638 * src/files.c (faction): Remove.
24639 (action_obstack): New.
24640 Adjust all dependencies.
24642 2000-10-20 Akim Demaille <akim@epita.fr>
24644 * lib/quote.h (PARAMS): New macro. Use it.
24646 2000-10-16 Akim Demaille <akim@epita.fr>
24648 * src/output.c (output_short_or_char_table): New function.
24649 (output_short_table, output_token_translations): Use it.
24650 (goto_actions): Use output_short_table.
24652 2000-10-16 Akim Demaille <akim@epita.fr>
24654 * src/symtab.c (bucket_new): New function.
24657 * src/output.c (output_short_table): New argument to display the
24658 comment associated with the table.
24659 Adjust dependencies.
24660 (output_gram): Use it.
24661 (output_rule_data): Nicer output layout for YYTNAME.
24663 2000-10-16 Akim Demaille <akim@epita.fr>
24665 * src/lex.c (read_typename): New function.
24667 * src/reader.c (copy_dollar): Likewise.
24669 2000-10-16 Akim Demaille <akim@epita.fr>
24671 * src/reader.c (copy_comment2): Expect the input stream to be on
24672 the `/' which is suspected to open a comment, instead of being
24673 called after `//' or `/*' was read.
24674 (copy_comment, copy_definition, parse_union_decl, copy_action)
24675 (copy_guard): Adjust.
24677 2000-10-16 Akim Demaille <akim@epita.fr>
24679 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
24680 `read_signed_integer'.
24682 2000-10-16 Akim Demaille <akim@epita.fr>
24684 * src/reader.c (copy_dollar): New function.
24685 (copy_guard, copy_action): Use it.
24687 2000-10-16 Akim Demaille <akim@epita.fr>
24689 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
24690 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
24691 New files, from Fileutils 4.0.27.
24692 * src/main.c (printable_version): Remove.
24693 * src/lex.c, src/reader.c: Use `quote'.
24695 2000-10-04 Akim Demaille <akim@epita.fr>
24697 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
24699 2000-10-04 Akim Demaille <akim@epita.fr>
24701 * doc/bison.texinfo: Various typos spotted by Neil Booth.
24703 2000-10-04 Akim Demaille <akim@epita.fr>
24705 When a literal string is used to define two different tokens,
24706 `bison -v' segfaults.
24707 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
24709 * tests/regression.m4: New file.
24710 Include the core of the sample provided by Piotr Gackiewicz.
24711 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
24714 2000-10-04 Akim Demaille <akim@epita.fr>
24716 * src/reader.c (parse_expect_decl): Keep `count' within the size
24720 2000-10-02 Paul Eggert <eggert@twinsun.com>
24722 * bison.s1 (yyparse): Assign the default value
24723 unconditionally, to avoid a GCC warning and make the parser a
24726 2000-10-02 Akim Demaille <akim@epita.fr>
24728 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
24731 2000-10-02 Akim Demaille <akim@epita.fr>
24733 * src/derives.c, src/print.c, src/reduce.c: To ease the
24734 translation, move some `\n' out of the translated strings.
24736 2000-10-02 Akim Demaille <akim@epita.fr>
24738 The location tracking mechanism is precious for parse error
24739 messages. Nevertheless, it is enabled only when `@n' is used in
24740 the grammar, which is a different issue (you can use it in error
24741 message, but not in the grammar per se). Therefore, there should
24742 be another means to enable it.
24744 * src/getargs.c (getargs): Support `--locations'.
24745 (usage): Report it.
24746 * src/getargs.h (locationsflag): Export it.
24747 * src/lex.c (percent_table): Support `%locations'.
24748 * src/reader.c (yylsp_needed): Remove this variable, now replaced
24749 with `locationsflag'.
24750 * doc/bison.texinfo: Document `--locations' and `%locations'.
24752 * tests/calc.m4: Test it.
24754 For regularity of the names, replace each
24755 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
24756 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
24757 In addition replace each `flag' with `_flag'.
24759 2000-10-02 Akim Demaille <akim@epita.fr>
24761 Also test parse error messages, including with YYERROR_VERBOSE.
24763 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
24765 Use it to check the computations.
24766 Use it to check `nonassoc' is honored.
24767 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
24768 `--yyerror-verbose'.
24769 (_AT_CHECK_CALC): Adjust to this option.
24770 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
24772 2000-10-02 Akim Demaille <akim@epita.fr>
24774 Test also `--verbose', `--defines' and `--name-prefix'. Testing
24775 the latter demonstrates a flaw in the handling of non debugging
24776 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
24777 was used in order to simplify:
24793 unfortunately this leads to a CPP conflict when
24794 `--name-prefix=foo' is used since it produces `#define yydebug
24797 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
24798 (YYDPRINTF): New macro.
24800 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
24802 Also test `--verbose', `--defines' and `--name-prefix'.
24804 2000-10-02 Akim Demaille <akim@epita.fr>
24806 Improve the readability of the produced parsers.
24808 * src/bison.s1: Formatting changes.
24809 Improve the comment related to the `$' mark.
24810 (yydefault): Don't fall through to `yyresume': `goto' there.
24811 * src/output.c (output_parser): When the `$' is met, skip the end
24813 New variable, `number_of_dollar_signs', to check there's exactly
24814 one `$' in the parser skeleton.
24816 2000-10-02 Akim Demaille <akim@epita.fr>
24818 * lib/xstrdup.c: New file, from the fileutils.
24819 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
24820 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
24821 instead of strlen + xmalloc + strcpy.
24822 * src/symtab.c (copys): Remove, use xstrdup instead.
24824 2000-10-02 Akim Demaille <akim@epita.fr>
24826 * src/gram.h (associativity): New enum type which replaces the
24827 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
24828 `right_assoc', `left_assoc' and `non_assoc'.
24829 Adjust all dependencies.
24830 * src/reader.c: Formatting changes.
24831 (LTYPESTR): Don't define it, use it as a literal in
24832 `reader_output_yylsp'.
24833 * src/symtab.h (symbol_class): New enum type which replaces the
24834 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
24835 `sunknown', `stoken and `snterm'.
24837 2000-10-02 Akim Demaille <akim@epita.fr>
24839 * src/getargs.c (fixed_outfiles): Rename as...
24840 (yaccflag): for consistency and accuracy.
24841 Adjust dependencies.
24843 2000-10-02 Akim Demaille <akim@epita.fr>
24845 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
24846 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
24847 difficult and introduced a lot of core dump. It turns out that
24848 Bison used an implementation of `xmalloc' based on `calloc', and
24849 at various places it does depend upon the initialization to 0. I
24850 have not tried to isolate the pertinent places, and all the former
24851 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
24852 someone should address this issue.
24854 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
24855 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
24857 Adjust dependencies.
24858 * src/warshall.h: New file.
24861 2000-10-02 Akim Demaille <akim@epita.fr>
24863 Various anti-`extern in *.c' changes.
24865 * src/system.h: Include `assert.h'.
24867 2000-10-02 Akim Demaille <akim@epita.fr>
24869 * src/state.h (nstates, final_state, first_state, first_shift)
24870 (first_reduction): Move their exportation from here...
24871 * src/LR0.h: to here.
24872 Adjust dependencies.
24873 * src/getargs.c (statisticsflag): New variable.
24874 Add support for `--statistics'.
24875 Adjust dependencies.
24877 Remove a lot of now useless `extern' statements in most files.
24879 2000-10-02 Akim Demaille <akim@epita.fr>
24881 * src/LR0.h: New file.
24884 2000-10-02 Akim Demaille <akim@epita.fr>
24886 * src/print.h: New file.
24888 * src/print.c: Formatting and ordering changes.
24889 (verbose, terse): Replace with...
24890 (print_results): this new function.
24891 Adjust dependencies.
24893 2000-10-02 Akim Demaille <akim@epita.fr>
24895 * src/conflicts.c (conflict_report): New function.
24896 (conflict_log, verbose_conflict_log): Replace with...
24897 (print_conflicts): this function.
24898 Adjust dependencies.
24899 * src/conflicts.h: New file.
24900 Propagate its inclusion.
24902 2000-10-02 Akim Demaille <akim@epita.fr>
24904 * src/nullable.h: New file.
24905 Propagate its inclusion.
24906 * src/nullable.c: Formatting changes.
24908 2000-10-02 Akim Demaille <akim@epita.fr>
24910 * src/reduce.h: New file.
24911 Propagate its inclusion.
24912 * src/reduce.c: Topological sort and other formatting changes.
24913 (bool, TRUE, FALSE): Move their definition to...
24914 * src/system.h: here.
24916 2000-10-02 Akim Demaille <akim@epita.fr>
24918 * src/files.c: Formatting changes.
24919 (tryopen, tryclose, openfiles): Rename as...
24920 (xfopen, xfclose, open_files): this.
24921 (stringappend): static.
24922 * src/files.h: Complete the list of exported symbols.
24925 2000-10-02 Akim Demaille <akim@epita.fr>
24927 * src/reader.h: New file.
24928 Propagate its use instead of tedious list of `extern' and
24930 * src/reader.c: Formatting changes, topological sort,
24933 2000-10-02 Akim Demaille <akim@epita.fr>
24935 * src/lex.h: Prototype `lex.c' exported functions.
24936 * src/reader.c: Adjust.
24937 * src/lex.c: Formatting changes.
24938 (safegetc): Rename as...
24941 2000-10-02 Akim Demaille <akim@epita.fr>
24943 * src/lalr.h: New file.
24944 Propagate its inclusion instead of prototypes and `extern'.
24945 * src/lalr.c: Formatting changes, topological sorting etc.
24947 2000-10-02 Akim Demaille <akim@epita.fr>
24949 * src/output.c (token_actions): Introduce a temporary array,
24950 YYDEFACT, that makes it possible for this function to use
24951 output_short_table.
24953 2000-10-02 Akim Demaille <akim@epita.fr>
24955 `user_toknums' is output as a `short[]' in `output.c', while it is
24956 defined as a `int[]' in `reader.c'. For consistency with the
24957 other output tables, `user_toknums' is now defined as a table of
24960 * src/reader.c (user_toknums): Be a short table instead of an int
24962 Adjust dependencies.
24964 Factor the short table outputs.
24966 * src/output.c (output_short_table): New function.
24967 * src/output.c (output_gram, output_stos, output_rule_data)
24968 (output_base, output_table, output_check): Use it.
24970 2000-10-02 Akim Demaille <akim@epita.fr>
24972 * src/output.c (output): Topological sort of the functions, in
24973 order to get rid of the `static' prototypes.
24974 No longer use `register'.
24975 * src/output.h: New file.
24976 Propagate its inclusion in files explicitly prototyping functions
24979 2000-09-21 Akim Demaille <akim@epita.fr>
24981 * src/atgeneral.m4: Update from Autoconf.
24983 2000-09-21 Akim Demaille <akim@epita.fr>
24985 * src/closure.h: New file.
24986 * src/closure.c: Formatting changes, topological sort over the
24987 functions, use of closure.h.
24988 (initialize_closure, finalize_closure): Rename as...
24989 (new_closure, free_closure): these. Adjust dependencies.
24990 * src/LR0.c: Formatting changes, topological sort, use of
24992 (initialize_states): Rename as...
24993 (new_states): this.
24994 * src/Makefile.am (noinst_HEADERS): Adjust.
24996 2000-09-20 Akim Demaille <akim@epita.fr>
24998 * src/acconfig.h: Don't protect config.h against multiple
25000 Don't define PARAMS.
25001 * src/system.h: Define PARAMS.
25002 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
25003 purpose of config.h. system.h must not try to fix wrong
25004 definitions in config.h.
25006 2000-09-20 Akim Demaille <akim@epita.fr>
25008 * src/derives.h: New file.
25009 * src/main.c, src/derives.h: Use it.
25010 Formatting changes.
25011 * src/Makefile.am (noinst_HEADERS): Adjust.
25013 2000-09-20 Akim Demaille <akim@epita.fr>
25015 * tests/atgeneral.m4: Update from Autoconf.
25016 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
25017 (AT_CHECK_CALC): New macros.
25018 Use these macros to test bison with options `', `--raw',
25019 `--debug', `--yacc', `--yacc --debug'.
25021 2000-09-19 Akim Demaille <akim@epita.fr>
25023 * src/output.c: Formatting changes.
25024 * src/machine.h: Remove, leaving its contents in...
25025 * src/system.h: here.
25027 Adjust all dependencies on stdio.h and machine.h.
25028 * src/getargs.h: New file.
25029 Let all `extern' declarations about getargs.c be replaced with
25030 inclusion of `getargs.h'.
25031 * src/Makefile.am (noinst_HEADERS): Adjust.
25033 * tests/calc.m4 (yyin): Be initialized in main, not on the global
25035 (yyerror): Returns void, not int.
25036 * doc/bison.texinfo: Formatting changes.
25038 2000-09-19 Akim Demaille <akim@epita.fr>
25040 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
25043 2000-09-18 Akim Demaille <akim@epita.fr>
25045 * configure.in: Append WARNING_CFLAGS to CFLAGS.
25046 * src/Makefile.am (INCLUDES): Don't.
25047 Be ready to fetch headers in lib/.
25049 2000-09-18 Akim Demaille <akim@epita.fr>
25051 * doc/bison.texinfo: Update the copyright.
25052 ANSIfy and GNUify the examples.
25053 Remove the old menu.
25055 2000-09-18 Akim Demaille <akim@epita.fr>
25057 First set of tests: use the `calc' example from the documentation.
25059 * src/bison.s1 (yyparse): Condition the code using `yytname' which
25060 is defined only when YYDEBUG is.
25061 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
25062 * src/files.c (tryopen, tryclose): Formatting changes.
25063 Move to the top and be static.
25064 * src/reader.c (read_signed_integer): Likewise.
25065 * tests/calc.m4: New file.
25066 * Makefile.am, suite.m4: Adjust.
25067 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
25069 2000-09-18 Akim Demaille <akim@epita.fr>
25071 Add support for an Autotest test suite for Bison.
25073 * m4/m4.m4, m4/atconfig.m4: New files.
25074 * m4/Makefile.am (EXTRA_DIST): Adjust.
25075 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
25077 * src/getargs.c: Display a more standard --version message.
25078 * src/reader.c (reader): Formatting changes.
25079 No longer depend upon VERSION_STRING.
25080 * configure.in: No longer use `dnl'.
25081 Set up the test suite and the new directory `tests/.
25082 (VERSION_STRING): Remove.
25084 2000-04-14 Akim Demaille <akim@epita.fr>
25086 * src/reader.c (copy_comment2): New function, same as former
25087 `copy_comment', but outputs into two FILE *.
25088 (copy_comment): Use it.
25089 (parse_union_decl): Use it.
25090 (get_type, parse_start_decl): Use the same `invalid' message.
25091 (parse_start_decl, parse_union_decl): Use the same `multiple'
25093 (parse_union_decl, copy_guard, copy_action): Use the same
25094 `unmatched' message.
25095 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
25097 2000-03-31 Akim Demaille <akim@epita.fr>
25099 * src/files.c (tryopen, tryclose): Move to the top.
25102 2000-03-31 Akim Demaille <akim@epita.fr>
25104 * src/main.c (main): Don't call `done', exit does it.
25106 2000-03-31 Akim Demaille <akim@epita.fr>
25108 * allocate.c: s/return (foo)/return foo/.
25109 * lalr.c: Likewise.
25111 * output.c: Likewise.
25112 * reader.c: Likewise.
25113 * symtab.c: Likewise.
25114 * vmsgetargs.c: Likewise.
25116 2000-03-31 Akim Demaille <akim@epita.fr>
25118 Clean up the error reporting functions.
25120 * src/report.c: New file.
25121 * src/report.h: Likewise.
25122 * src/Makefile.am: Adjust.
25123 * m4/error.m4: New file.
25124 * m4/Makefile.am: Adjust.
25125 * configure.in (jm_PREREQ_ERROR): Call it.
25126 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
25128 (fatal, fatals): Remove. All callers use complain.c::fatal.
25129 (warn, warni, warns, warnss, warnss): Remove. All callers use
25130 complain.c::complain.
25131 (toomany): Remove, use fatal instead.
25132 * src/files.c (done): No argument, use complain_message_count.
25133 * src/main.c (main): Register `done' to `atexit'.
25135 * src/getargs.c (usage): More `fputs', less `fprintf'.
25137 2000-03-28 Akim Demaille <akim@epita.fr>
25139 * lib/: New directory.
25140 * Makefile.am (SUBDIRS): Adjust.
25141 * configure.in: Adjust.
25142 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
25144 * src/alloca.c: Moved to lib/.
25145 * src/getopt.c: Likewise.
25146 * src/getopt1.c: Likewise.
25147 * src/getopt.h: Likewise.
25148 * src/ansi2knr.c: Likewise.
25149 * src/ansi2knr.1: Likewise.
25150 * src/Makefile.am: Adjust.
25151 * lib/Makefile.am: New file.
25153 2000-03-28 Akim Demaille <akim@epita.fr>
25155 * src/getargs.c (usage): Refresh the help message.
25157 2000-03-17 Akim Demaille <akim@epita.fr>
25159 * src/getopt1.c: Updated from textutils 2.0e
25160 * src/getopt.c: Likewise.
25161 * src/getopt.h: Likewise.
25163 2000-03-17 Akim Demaille <akim@epita.fr>
25165 * src/Makefile.am (bison.simple): Fix the awk program: quote only
25166 the file name, not the whole `#line LINE FILE'.
25168 2000-03-17 Akim Demaille <akim@epita.fr>
25170 On syntax errors, report the token on which we choked.
25172 * src/bison.s1 (yyparse): In the label yyerrlab, when
25173 YYERROR_VERBOSE, add yychar in msg.
25175 2000-03-17 Akim Demaille <akim@epita.fr>
25177 * src/reader.c (copy_at): New function.
25178 (copy_guard): Use it.
25179 (copy_action): Use it.
25181 2000-03-17 Akim Demaille <akim@epita.fr>
25183 Be kind to translators, save some useless translations.
25185 * src/main.c (banner): New function.
25186 (fatal_banner): Use it.
25187 (warn_banner): Use it.
25189 2000-03-17 Akim Demaille <akim@epita.fr>
25191 * src/reader.c (copy_definition): Use copy_string and
25192 copy_comment. Removed now unused `match', `ended',
25194 (copy_comment, copy_string): Moved, to be visible from
25197 2000-03-17 Akim Demaille <akim@epita.fr>
25199 * src/reader.c (copy_string): Declare `static inline'. No
25200 problems with inline, since it is checked by configure.
25201 (copy_comment): Likewise.
25203 2000-03-17 Akim Demaille <akim@epita.fr>
25205 * src/reader.c (packsymbols): Formatting changes.
25207 2000-03-17 Akim Demaille <akim@epita.fr>
25209 * src/reader.c (copy_comment): New function, factored out from:
25210 (copy_action): Use it. Removed now unused `match', `ended',
25212 (copy_guard): Likewise.
25214 2000-03-17 Akim Demaille <akim@epita.fr>
25216 * src/reader.c (copy_string): New function, factored out from:
25217 (copy_action): Use it.
25218 (copy_guard): Likewise.
25220 2000-03-17 Akim Demaille <akim@epita.fr>
25222 Change the handling of @s so that they behave exactly like $s.
25223 There is now a pseudo variable @$ (readble and writable), location
25224 of the lhs of the rule (by default ranging from the location of
25225 the first symbol of the rhs, to the location of the last symbol,
25226 or, if the rhs is empty, YYLLOC).
25228 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
25230 (yyparse): When providing a default semantic action, provide a
25231 default location action.
25232 (after the $): No longer change `*YYLSP', just stack YYLOC the
25233 same way you stack YYVAL.
25234 * src/reader.c (read_declarations): Use warns.
25235 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
25236 (copy_action, case '@'): Likewise.
25237 Use a standard error message, to save useless work from
25240 2000-03-17 Akim Demaille <akim@epita.fr>
25242 * src/bison.s1: Formatting and cosmetics changes.
25243 * src/reader.c: Likewise.
25244 Update the Copyright notice.
25246 2000-03-17 Akim Demaille <akim@epita.fr>
25248 * src/bison.s1 (#line): All set to `#line' only, since the
25249 Makefile now handles them.
25251 2000-03-16 Akim Demaille <akim@epita.fr>
25253 * src/output.c (output_rule_data): Output the documentation of
25254 some of the tables.
25255 (Copyright notice): Update.
25256 Formatting changes.
25258 2000-03-16 Akim Demaille <akim@epita.fr>
25260 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
25261 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
25262 One `#if YYDEBUG' remains, since it uses variables which are
25263 defined only if `YYDEBUG != 0'.
25265 2000-03-16 Akim Demaille <akim@epita.fr>
25267 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
25268 and related variables so that the similarities are highlighted.
25270 2000-03-16 Akim Demaille <akim@epita.fr>
25272 * src/bison.s1: Properly indent CPP directives.
25274 2000-03-16 Akim Demaille <akim@epita.fr>
25276 * src/bison.s1: Properly indent the `alloca' CPP section.
25278 2000-03-16 Akim Demaille <akim@epita.fr>
25280 Do not hard code values of directories in `configure.in'.
25281 Update the `configure' tool chain.
25283 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
25285 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
25286 (AC_OUTPUT): Add m4/Makefile.
25287 Bump to bison 1.28a, 1.29 has never been released.
25288 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
25289 handled via src/Makefile.am.
25290 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
25291 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
25293 * Makefile.am (SUBDIRS): Add m4.
25294 (ACLOCAL_AM_FLAGS): New variable.
25295 (AUTOMAKE_OPTIONS): Add check-news.
25296 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
25297 the proper line number and file name.
25298 (DEFS): Propagate the location of bison library files and of the
25300 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
25302 * acinclude.m4: Remove, replaced by the directory m4.
25303 * m4/Makefile.am (EXTRA_DIST): New variable.
25304 * m4/gettext.m4: New file, from the fileutils.
25305 * m4/lcmessage.m4: Likewise
25306 * m4/progtest.m4: Likewise.
25307 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
25309 2000-03-10 Akim Demaille <akim@epita.fr>
25312 Formatting changes of various comments.
25313 Respect the GNU coding standards at various places.
25314 Don't use `_()' when no translation is needed.
25316 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25319 OS/2 honors TMPDIR environment variable.
25321 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25323 * doc/bison.texinfo: Tweaked spelling and grammar.
25325 Removed reference to price of printed copy.
25326 Mention BISON_SIMPLE and BISON_HAIRY.
25328 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25330 * configure.in, NEWS:
25331 Bison 1.29 released.
25333 1999-10-27 Jesse Thilo <jthilo@gnu.org>
25335 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
25336 Added reference card.
25338 1999-07-26 Jesse Thilo <jthilo@gnu.org>
25340 * po/ru.po: Added Russian translation.
25342 1999-07-26 Jesse Thilo <jthilo@gnu.org>
25344 * configure.in: Added Russian translation.
25346 1999-07-06 Jesse Thilo <jthilo@gnu.org>
25348 * configure.in, NEWS, README:
25349 Released version 1.28.
25351 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25354 Squashed redefinition warning on some systems.
25356 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
25357 Have configure build version string instead of relying on ANSI string
25360 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25362 * po/POTFILES.in: Got rid of version.c.
25364 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25366 * acconfig.h, configure.in:
25367 Have configure build version string instead of relying on ANSI string
25370 1999-06-08 Jesse Thilo <jthilo@gnu.org>
25373 Dropped mention of `+' for long-named options.
25375 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25377 * src/files.c: Added <unistd.h> for unlink().
25379 * src/Makefile.am, src/system.h:
25382 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25384 * README: Added a FAQ list.
25386 * configure.in, acconfig.h:
25389 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25391 * doc/FAQ, doc/Makefile.am:
25394 1999-05-19 Jesse Thilo <jthilo@gnu.org>
25396 * src/alloc.h, src/symtab.h, src/version.c:
25397 Protected inclusion of "config.h" with HAVE_CONFIG_H.
25399 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25401 * src/.cvsignore, src/Makefile.am:
25402 Reorganized: sources in `src', documentation in `doc'.
25404 * src/lex.c (literalchar):
25405 fixed the code for escaping double quotes (thanks
25408 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25410 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
25411 Adjusted paths to reflect directory reorganization.
25413 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25415 * doc/.cvsignore, doc/Makefile.am:
25416 Reorganized: sources in `src', documentation in `doc'.
25418 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25421 Updated AC_INIT file to reflect directory reorganization.
25423 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
25424 Reorganized: sources in `src', documentation in `doc'.
25426 1999-04-13 Jesse Thilo <jthilo@gnu.org>
25429 Don't declare calloc() and realloc() if not necessary.
25431 1999-04-13 Jesse Thilo <jthilo@gnu.org>
25433 * configure.in, acconfig.h, acinclude.m4:
25434 Don't declare calloc() and realloc() if not necessary.
25436 1999-03-23 Jesse Thilo <jthilo@gnu.org>
25438 * po/.cvsignore: Added i18n support.
25440 1999-03-23 Jesse Thilo <jthilo@gnu.org>
25442 * acconfig.h, configure.in, Makefile.am:
25443 Added i18n support.
25445 1999-03-22 Jesse Thilo <jthilo@gnu.org>
25447 * src/bison.s1: Fixed #line numbers.
25449 1999-03-15 Jesse Thilo <jthilo@gnu.org>
25451 * po/es.po, po/fr.po, po/nl.po, po/de.po:
25452 Added PO files from Translation Project.
25454 1999-03-03 Jesse Thilo <jthilo@gnu.org>
25457 Added support for non-ANSI compilers (ansi2knr).
25459 1999-02-16 Jesse Thilo <jthilo@gnu.org>
25461 * configure.in: Bumped version number to 1.27.
25464 Added `bison.simple' to list of files removed by `make distclean'.
25466 1999-02-12 Jesse Thilo <jthilo@gnu.org>
25468 * src/files.c, src/files.h:
25469 Defined locations of parser files in config.h instead of Makefile.
25471 1999-02-12 Jesse Thilo <jthilo@gnu.org>
25473 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
25474 Defined locations of parser files in config.h instead of Makefile.
25476 1999-02-09 Jesse Thilo <jthilo@gnu.org>
25479 Removed inappropriate use of $< macro.
25481 1999-02-05 Jesse Thilo <jthilo@gnu.org>
25483 * po/Makefile.in.in, po/POTFILES.in:
25484 Add `po' directory skeleton.
25486 1999-01-27 Jesse Thilo <jthilo@gnu.org>
25488 * README: Document help-bison list.
25490 * configure.in: Add check for mkstemp().
25492 1999-01-20 Jesse Thilo <jthilo@gnu.org>
25494 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
25495 Hush a few compiler warnings.
25498 Add tryclose(), which verifies that fclose was successful.
25499 Hush a couple of compiler warnings.
25501 1999-01-20 Jesse Thilo <jthilo@gnu.org>
25503 * Makefile.am, OChangeLog:
25504 ChangeLog is now automatically generated. Include the old version as
25507 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25509 * 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:
25510 Update FSF address.
25512 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25514 * doc/bison.texinfo: Fix formatting glitch.
25516 * doc/bison.texinfo: Update FSF address.
25518 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25520 * acconfig.h: Update FSF address.
25522 1999-01-08 Jesse Thilo <jthilo@gnu.org>
25525 Don't define PACKAGE here, since config.h defines it.
25527 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25529 * src/reader.c: Update copyright date.
25532 Ditch sprintf to statically-sized buffers in fatal/warn functions in
25533 favor of output directly to stderr (avoids buffer overruns).
25535 * src/reader.c: Some checks for premature EOF.
25537 * 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:
25538 Use prototypes if the compiler understands them.
25540 * src/files.c: Honor TMPDIR on Unix hosts.
25541 Use prototypes if the compiler understands them.
25544 Fix a couple of buffer overrun bugs.
25545 Use prototypes if the compiler understands them.
25547 * src/system.h: Include unistd.h and ctype.h.
25548 Use #ifdef instead of #if for NLS symbols.
25550 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25552 * doc/bison.texinfo:
25553 Delete comment "consider using @set for edition number, etc..." since
25554 we now are doing so.
25556 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25559 Use prototypes if the compiler understands them.
25561 * NEWS: Document 1.26 highlights.
25563 * Makefile.am: Require Automake 1.3 or later.
25566 Use prototypes if the compiler understands them.
25568 1998-12-29 Jesse Thilo <jthilo@gnu.org>
25571 Use VERSION symbol from automake for version number.
25573 1998-12-29 Jesse Thilo <jthilo@gnu.org>
25575 * acconfig.h, configure.in, version.cin:
25576 Use VERSION symbol from automake for version number.
25578 1998-11-28 Jesse Thilo <jthilo@gnu.org>
25581 Distribute original version of simple parser (bison.s1), not built
25582 version (bison.simple).
25584 1998-11-28 Jesse Thilo <jthilo@gnu.org>
25586 * doc/bison.texinfo: Add info dir entry.
25588 * doc/bison.texinfo:
25589 Let automake put version number into documentation.
25591 1998-11-26 Jesse Thilo <jthilo@gnu.org>
25593 * src/bison.cld, src/build.com, src/vmshlp.mar:
25594 Add non-RCS files from /gd/gnu/bison.
25596 1998-11-26 Jesse Thilo <jthilo@gnu.org>
25599 Document the BISON_HAIRY and BISON_SIMPLE variables.
25601 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25603 * src/version.c: Build version.c automatically.
25606 Fix token numbering (used to start at 258, not 257).
25608 * src/system.h: Include config.h.
25610 * src/getargs.c: Update bug report address.
25612 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
25613 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
25615 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25618 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25620 * configure.in, version.cin:
25621 Build version.c automatically.
25623 * AUTHORS: Add AUTHORS file.
25625 * README: Update bug report address.
25628 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25630 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
25631 Add automake stuff.
25633 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25635 * doc/bison.texinfo: Clean up some formatting.
25637 1998-05-05 Richard Stallman <rms@gnu.org>
25639 * doc/bison.texinfo:
25640 Explain better why to make a pure parser.
25642 1998-01-05 Richard Stallman <rms@gnu.org>
25644 * src/files.c (openfiles):
25645 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
25646 find a temporary directory, if possible. Do not unlink files while
25649 1997-08-25 Richard Stallman <rms@gnu.org>
25651 * src/reader.c (stack_offset;):
25652 Change some warni to warns.
25654 * src/lex.c (literalchar): Use warns, not warni.
25656 1997-06-28 Richard Stallman <rms@gnu.org>
25658 * src/bison.s1: Add a Bison version comment.
25660 * src/main.c (fatal, warn, berror):
25663 1997-06-28 Richard Stallman <rms@gnu.org>
25665 * Makefile.in (bison_version): New variable.
25666 (dist): Use that variable.
25667 (bison.s1): Substitute the Bison version into bison.simple.
25669 * bison.simple: Add a Bison version comment.
25671 1997-06-18 Richard Stallman <rms@gnu.org>
25673 * src/main.c (fatal, warn, berror):
25674 Make error messages standard.
25675 (toomany): Improve error message text.
25677 * 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:
25678 new.h renamed to alloc.h.
25680 1997-06-18 Richard Stallman <rms@gnu.org>
25682 * Makefile.in: new.h renamed to alloc.h.
25684 1997-05-24 Richard Stallman <rms@gnu.org>
25686 * src/lex.c (literalchar):
25687 Fix the code for escaping \, " and '.
25689 (lex): Avoid trouble when there are many chars
25690 to discard in a char literal with just several chars in it.
25692 1997-05-17 Richard Stallman <rms@gnu.org>
25695 Use malloc, if using alloca is troublesome.
25696 (YYSTACK_USE_ALLOCA): New flag macro.
25697 Define it for some systems and compilers.
25698 (YYSTACK_ALLOC): New macro.
25699 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25700 If it was malloc'd, free it.
25702 1997-05-17 Richard Stallman <rms@gnu.org>
25705 Use malloc, if using alloca is troublesome.
25706 (YYSTACK_USE_ALLOCA): New flag macro.
25707 Define it for some systems and compilers.
25708 (YYSTACK_ALLOC): New macro.
25709 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25710 If it was malloc'd, free it.
25712 1997-04-23 Richard Stallman <rms@gnu.org>
25715 (alloca) [__hpux]: Always define as __builtin_alloca.
25717 1997-04-23 Richard Stallman <rms@gnu.org>
25720 (alloca) [__hpux]: Always define as __builtin_alloca.
25722 1997-04-22 Richard Stallman <rms@gnu.org>
25725 [__hpux]: Include alloca.h (right for HPUX 10)
25726 instead of declaring alloca (right for HPUX 9).
25728 * src/bison.s1 (__yy_memcpy):
25729 Declare arg `count' as unsigned int.
25730 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25732 1997-04-22 Richard Stallman <rms@gnu.org>
25735 [__hpux]: Include alloca.h (right for HPUX 10)
25736 instead of declaring alloca (right for HPUX 9).
25738 * bison.simple (__yy_memcpy):
25739 Declare arg `count' as unsigned int.
25740 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25742 1997-01-03 Richard Stallman <rms@gnu.org>
25744 * src/allocate.c: [__STDC__ or _MSC_VER]:
25745 Declare calloc and realloc to return void *.
25747 1997-01-02 Richard Stallman <rms@gnu.org>
25750 [_MSC_VER]: Include stdlib.h and process.h.
25751 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
25753 * src/main.c (main): Return FAILURE as a value.
25754 (printable_version): Declare arg as int, not char.
25756 1997-01-02 Richard Stallman <rms@gnu.org>
25758 * Makefile.in (dist):
25759 Explicitly check for symlinks, and copy them.
25761 1996-12-19 Richard Stallman <rms@gnu.org>
25764 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
25766 1996-12-18 Paul Eggert <eggert@gnu.org>
25768 * src/bison.s1 (yyparse):
25769 If __GNUC__ and YYPARSE_PARAM are both defined,
25770 declare yyparse to have a void * argument.
25772 1996-12-18 Paul Eggert <eggert@gnu.org>
25774 * bison.simple (yyparse):
25775 If __GNUC__ and YYPARSE_PARAM are both defined,
25776 declare yyparse to have a void * argument.
25778 1996-12-17 Richard Stallman <rms@gnu.org>
25780 * src/reduce.c (nbits): Add some casts.
25782 1996-08-12 Richard Stallman <rms@gnu.org>
25784 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
25786 1996-08-12 Richard Stallman <rms@gnu.org>
25788 * bison.simple: Test _MSDOS as well as _MSDOS_.
25790 1996-07-31 Richard Stallman <rms@gnu.org>
25793 [__sun && __i386]: Include alloca.h.
25795 1996-07-31 Richard Stallman <rms@gnu.org>
25798 [__sun && __i386]: Include alloca.h.
25800 1996-07-30 Richard Stallman <rms@gnu.org>
25802 * src/bison.s1: Comment change.
25804 * src/bison.s1: Test _MSDOS_, not MSDOS.
25806 1996-07-30 Richard Stallman <rms@gnu.org>
25808 * bison.simple: Comment change.
25810 * bison.simple: Test _MSDOS_, not MSDOS.
25812 1996-06-01 Richard Stallman <rms@gnu.org>
25814 * 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:
25815 Insert `_' macro around many string constants.
25818 Insert `_' macro around many string constants.
25820 (main): Call setlocale, bindtextdomain and textdomain.
25822 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
25823 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
25824 [ENABLE_NLS]: Include libintl.h.
25825 [ENABLE_NLS] (gettext): Define.
25826 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
25827 (N_, PACKAGE, LOCALEDIR): New macros.
25829 1996-06-01 Richard Stallman <rms@gnu.org>
25831 * POTFILES.in: New file.
25833 * Makefile.in (allocate.o):
25834 Define target explicitly.
25836 * Makefile.in (CFLAGS): Set to @CFLAGS@.
25837 (LDFLAGS): Set to @LDFLAGS@.
25838 (configure): Run autoconf only if preceding `cd' succeeds.
25839 (bison.s1): Redirect output to temporary file then move the
25840 temporary to the target, rather than redirecting directly to bison.s1.
25841 (clean): Remove config.status and config.log.
25842 (distclean): Don't remove config.status here.
25844 1996-05-12 Richard Stallman <rms@gnu.org>
25847 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25849 1996-05-12 Richard Stallman <rms@gnu.org>
25852 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25854 1996-05-11 Richard Stallman <rms@gnu.org>
25856 * src/bison.s1 (__yy_memcpy):
25857 Really reorder the args, as was supposedly done on Feb 14 1995.
25858 (yyparse): Calls changed accordingly.
25860 1996-05-11 Richard Stallman <rms@gnu.org>
25862 * Makefile.in (dist): Don't use $(srcdir).
25864 * bison.simple (__yy_memcpy):
25865 Really reorder the args, as was supposedly done on Feb 14 1995.
25866 (yyparse): Calls changed accordingly.
25868 1996-01-27 Richard Stallman <rms@gnu.org>
25870 * src/output.c (output_rule_data):
25871 Test YYERROR_VERBOSE in the conditional
25872 around the definition of ttyname.
25874 1995-12-29 Richard Stallman <rms@gnu.org>
25877 Fix line numbers in #line commands.
25879 1995-12-29 Richard Stallman <rms@gnu.org>
25882 Fix line numbers in #line commands.
25884 1995-12-27 Richard Stallman <rms@gnu.org>
25886 * src/bison.s1 (YYPARSE_PARAM_DECL):
25887 In C++, make it always null.
25888 (YYPARSE_PARAM_ARG): New macro.
25889 (yyparse): Use YYPARSE_PARAM_ARG.
25891 1995-12-27 Richard Stallman <rms@gnu.org>
25893 * bison.simple (YYPARSE_PARAM_DECL):
25894 In C++, make it always null.
25895 (YYPARSE_PARAM_ARG): New macro.
25896 (yyparse): Use YYPARSE_PARAM_ARG.
25898 1995-11-29 Richard Stallman <rms@gnu.org>
25900 * doc/bison.texinfo:
25901 Describe literal string tokens, %raw, %no_lines, %token_table.
25903 1995-11-29 Daniel Hagerty <hag@gnu.org>
25905 * doc/bison.texinfo: Fixed update date
25907 1995-10-16 Richard Stallman <rms@gnu.org>
25909 * src/version.c: Version 1.25.
25911 1995-10-16 Richard Stallman <rms@gnu.org>
25913 * NEWS: *** empty log message ***
25915 1995-10-16 Richard Stallman <rms@gnu.org>
25917 * doc/bison.1, doc/bison.rnh:
25920 1995-10-15 Richard Stallman <rms@gnu.org>
25922 * src/vmsgetargs.c, src/getargs.c:
25923 Added -n, -k, and -raw switches.
25924 (noparserflag, toknumflag, rawtoknumflag): New variables.
25926 * src/symtab.h (SALIAS):
25927 New #define for adding aliases to %token.
25928 (struct bucket): Added `alias' field.
25930 * src/reduce.c (reduce_grammar):
25931 Revise error message.
25932 (print_notices): Remove final `.' from error message.
25934 * src/reader.c (reader_output_yylsp):
25936 (readgram): Use `#if 0' around code that accepted %command
25937 inside grammar rules: The documentation doesn't allow it,
25938 and it will fail since the %command processors scan for the next %.
25939 (parse_token_decl): Extended the %token
25940 declaration to allow a multi-character symbol as an alias.
25941 (parse_thong_decl): New function.
25942 (read_declarations): Added %thong declarations.
25943 (read_declarations): Handle NOOP to deal with allowing
25944 % declarations as another means to specify the flags.
25945 (readgram): Allow %prec prior to semantics embedded in a rule.
25946 (skip_to_char, read_declarations, copy_definition)
25947 (parse_token_decl, parse_start_decl, parse_type_decl)
25948 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
25949 (get_type_name, copy_guard, copy_action, readgram)
25950 (get_type, packsymbols): Revised most error messages.
25951 Changed `fatal' to `warnxxx' to avoid aborting for error.
25952 Revised and use multiple warnxxx functions to avoid using VARARGS1.
25953 (read_declarations): Improve the error message for
25954 an invalid character. Do not abort.
25955 (read_declarations, copy_guard, copy_action): Use
25956 printable_version to avoid unprintable characters in printed output.
25957 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
25958 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
25959 Allow the type of a non-terminal can be given
25960 more than once, as long as all specifications give the same type.
25963 (output_headers, output_trailers, output, output_gram)
25964 (output_rule_data): Implement noparserflag variable.
25965 Implement toknumflag variable.
25966 (output): Call reader_output_yylsp to output LTYPESTR.
25968 * src/main.c (main):
25969 If reader sees an error, don't process the grammar.
25970 (fatals): Updated to not use VARARGS1.
25971 (printable_version, int_to_string, warn, warni, warns, warnss)
25972 (warnsss): New error reporting functions. Avoid abort for error.
25975 Added THONG and NOOP for alias processing.
25976 Added SETOPT for the new code that allows setting options with %flags.
25979 Include getopt.h. Add some extern decls.
25980 (safegetc): New function to deal with EOF gracefully.
25981 (literalchar); new function to deal with reading \ escapes.
25982 (lex): Use literalchar.
25983 (lex): Implemented "..." tokens.
25984 (literalchar, lex, parse_percent_token): Made tokenbuffer
25985 always contain the token. This includes growing the token
25986 buffer while reading an integer.
25987 (parse_percent_token): Replaced if-else statement with percent_table.
25988 (parse_percent_token): Added % declarations as another
25989 way to specify the flags -n, -l, and -r. Also added hooks for
25990 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
25991 major changes to files.c.
25992 (lex) Retain in the incoming stream a character following
25994 (skip_white_space, lex): Revised most error messages
25995 and changed fatal to warn to avoid aborting.
25996 (percent_table): Added %thong declarations.
25998 * src/gram.h: Comment changes.
26000 * src/files.c (openfiles, open_extra_files, done):
26002 and actfile file. Handle noparserflag. Both for -n switch.
26004 * src/conflicts.c (resolve_sr_conflict):
26005 Remove use of alloca.
26007 1995-06-01 Jim Meyering <meyering@gnu.org>
26009 * doc/bison.texinfo: *** empty log message ***
26011 1995-05-06 Richard Stallman <rms@gnu.org>
26013 * src/bison.s1: Comment change.
26015 1995-05-06 Richard Stallman <rms@gnu.org>
26017 * bison.simple: Comment change.
26019 1995-05-03 Richard Stallman <rms@gnu.org>
26021 * src/version.c: Version now 1.24.
26023 * src/bison.s1: Change distribution terms.
26025 * src/version.c: Version now 1.23.
26027 1995-05-03 Richard Stallman <rms@gnu.org>
26029 * doc/bison.texinfo:
26030 Rewrite "Conditions for Using Bison".
26031 Update version to 1.24.
26033 1995-05-03 Richard Stallman <rms@gnu.org>
26035 * bison.simple: Change distribution terms.
26037 1995-02-23 Richard Stallman <rms@gnu.org>
26039 * src/files.c: Test __VMS_POSIX as well as VMS.
26041 1995-02-14 Jim Meyering <meyering@gnu.org>
26043 * src/bison.s1 (__yy_memcpy):
26044 Renamed from __yy_bcopy to avoid
26045 confusion. Reverse FROM and TO arguments to be consistent with
26048 1995-02-14 Jim Meyering <meyering@gnu.org>
26050 * bison.simple (__yy_memcpy):
26051 Renamed from __yy_bcopy to avoid
26052 confusion. Reverse FROM and TO arguments to be consistent with
26055 1994-11-10 David J. MacKenzie <djm@gnu.org>
26061 * Makefile.in (DISTFILES): Include NEWS.
26063 * Makefile.in (DISTFILES):
26064 Include install-sh, not install.sh.
26066 * configure.in: Update to Autoconf v2 macro names.
26068 1994-10-05 David J. MacKenzie <djm@gnu.org>
26070 * Makefile.in: fix typo
26072 * Makefile.in (prefix, exec_prefix):
26073 Let configure set them.
26075 1994-09-28 David J. MacKenzie <djm@gnu.org>
26077 * Makefile.in: Set datadir to $(prefix)/share.
26079 1994-09-15 Richard Stallman <rms@gnu.org>
26082 Update copyright notice and GPL version.
26084 1994-09-15 Richard Stallman <rms@gnu.org>
26087 Update copyright notice and GPL version.
26089 1994-07-12 Richard Stallman <rms@gnu.org>
26091 * src/reduce.c, src/reader.c:
26094 1994-05-05 David J. MacKenzie <djm@gnu.org>
26096 * Makefile.in: entered into RCS
26098 1994-03-26 Richard Stallman <rms@gnu.org>
26100 * src/bison.s1: entered into RCS
26102 1994-03-26 Richard Stallman <rms@gnu.org>
26104 * bison.simple: entered into RCS
26106 1994-03-25 Richard Stallman <rms@gnu.org>
26108 * src/main.c: entered into RCS
26110 1994-03-24 Richard Stallman <rms@gnu.org>
26112 * src/conflicts.c: entered into RCS
26114 1994-01-02 Richard Stallman <rms@gnu.org>
26116 * Makefile.in: *** empty log message ***
26118 1993-11-21 Richard Stallman <rms@gnu.org>
26120 * src/bison.s1: *** empty log message ***
26122 1993-11-21 Richard Stallman <rms@gnu.org>
26124 * doc/bison.texinfo: entered into RCS
26126 * doc/bison.texinfo: *** empty log message ***
26128 1993-11-21 Richard Stallman <rms@gnu.org>
26130 * bison.simple: *** empty log message ***
26132 1993-10-25 David J. MacKenzie <djm@gnu.org>
26134 * doc/bison.texinfo: *** empty log message ***
26136 1993-10-19 Richard Stallman <rms@gnu.org>
26138 * src/bison.s1: *** empty log message ***
26140 1993-10-19 Richard Stallman <rms@gnu.org>
26142 * bison.simple: *** empty log message ***
26144 1993-10-14 Richard Stallman <rms@gnu.org>
26146 * src/bison.s1: *** empty log message ***
26148 1993-10-14 Richard Stallman <rms@gnu.org>
26150 * bison.simple: *** empty log message ***
26152 1993-09-14 David J. MacKenzie <djm@gnu.org>
26154 * doc/bison.texinfo: *** empty log message ***
26156 1993-09-13 Noah Friedman <friedman@gnu.org>
26158 * Makefile.in: *** empty log message ***
26160 1993-09-10 Richard Stallman <rms@gnu.org>
26162 * src/conflicts.c: *** empty log message ***
26164 * src/system.h: entered into RCS
26166 1993-09-10 Richard Stallman <rms@gnu.org>
26168 * doc/bison.1: entered into RCS
26170 1993-09-06 Noah Friedman <friedman@gnu.org>
26172 * src/version.c: entered into RCS
26174 1993-09-06 Noah Friedman <friedman@gnu.org>
26176 * Makefile.in: *** empty log message ***
26178 1993-07-30 David J. MacKenzie <djm@gnu.org>
26180 * Makefile.in: *** empty log message ***
26182 1993-07-24 Richard Stallman <rms@gnu.org>
26184 * src/bison.s1: *** empty log message ***
26186 1993-07-24 Richard Stallman <rms@gnu.org>
26188 * bison.simple: *** empty log message ***
26190 1993-07-08 David J. MacKenzie <djm@gnu.org>
26192 * Makefile.in: *** empty log message ***
26194 1993-07-04 Richard Stallman <rms@gnu.org>
26196 * src/bison.s1: *** empty log message ***
26198 1993-07-04 Richard Stallman <rms@gnu.org>
26200 * bison.simple: *** empty log message ***
26202 1993-06-26 David J. MacKenzie <djm@gnu.org>
26204 * src/getargs.c: entered into RCS
26206 1993-06-26 David J. MacKenzie <djm@gnu.org>
26208 * doc/bison.texinfo: *** empty log message ***
26210 * doc/bison.1: New file.
26212 1993-06-25 Richard Stallman <rms@gnu.org>
26214 * src/getargs.c: New file.
26216 1993-06-16 Richard Stallman <rms@gnu.org>
26218 * src/bison.s1: *** empty log message ***
26220 1993-06-16 Richard Stallman <rms@gnu.org>
26222 * bison.simple: *** empty log message ***
26224 1993-06-03 Richard Stallman <rms@gnu.org>
26226 * src/bison.s1: New file.
26228 1993-06-03 Richard Stallman <rms@gnu.org>
26230 * doc/bison.texinfo: *** empty log message ***
26232 1993-06-03 Richard Stallman <rms@gnu.org>
26234 * bison.simple: New file.
26236 1993-05-19 Richard Stallman <rms@gnu.org>
26238 * doc/bison.texinfo: New file.
26240 1993-05-07 Noah Friedman <friedman@gnu.org>
26242 * Makefile.in: *** empty log message ***
26244 1993-04-28 Noah Friedman <friedman@gnu.org>
26246 * src/reader.c: *** empty log message ***
26248 1993-04-23 Noah Friedman <friedman@gnu.org>
26250 * src/alloc.h: entered into RCS
26252 1993-04-20 David J. MacKenzie <djm@gnu.org>
26254 * src/version.c: *** empty log message ***
26256 * src/files.c, src/allocate.c:
26259 * src/reader.c: *** empty log message ***
26261 * src/lex.c: entered into RCS
26263 * src/conflicts.c: New file.
26265 * src/symtab.c: entered into RCS
26267 * src/alloc.h: New file.
26269 * src/LR0.c: entered into RCS
26271 1993-04-18 Noah Friedman <friedman@gnu.org>
26273 * src/reader.c: New file.
26275 * src/version.c: *** empty log message ***
26277 1993-04-18 Noah Friedman <friedman@gnu.org>
26279 * Makefile.in: *** empty log message ***
26281 1993-04-17 Noah Friedman <friedman@gnu.org>
26283 * Makefile.in: *** empty log message ***
26285 1993-04-15 Richard Stallman <rms@gnu.org>
26287 * src/main.c, src/files.c:
26290 1993-04-15 Noah Friedman <friedman@gnu.org>
26292 * configure.in: entered into RCS
26294 * configure.in: *** empty log message ***
26296 * configure.in: New file.
26298 1993-04-14 Richard Stallman <rms@gnu.org>
26300 * Makefile.in: New file.
26302 1993-04-13 Richard Stallman <rms@gnu.org>
26304 * src/version.c: New file.
26306 1993-03-25 Richard Stallman <rms@gnu.org>
26308 * src/output.c: entered into RCS
26310 1992-09-25 Richard Stallman <rms@gnu.org>
26312 * configure.bat: entered into RCS
26314 1992-06-22 Richard Stallman <rms@gnu.org>
26316 * src/vmsgetargs.c: entered into RCS
26318 1992-06-22 Richard Stallman <rms@gnu.org>
26320 * doc/bison.rnh: entered into RCS
26322 1992-04-20 David J. MacKenzie <djm@gnu.org>
26324 * README: entered into RCS
26326 1992-01-22 Richard Stallman <rms@gnu.org>
26328 * src/machine.h: entered into RCS
26330 1991-12-21 Richard Stallman <rms@gnu.org>
26332 * src/lalr.c, src/closure.c:
26335 1991-12-20 Richard Stallman <rms@gnu.org>
26337 * src/state.h: entered into RCS
26339 1991-12-18 Richard Stallman <rms@gnu.org>
26341 * src/print.c, src/nullable.c, src/derives.c:
26344 1991-11-03 David J. MacKenzie <djm@gnu.org>
26346 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
26349 1988-09-09 Richard Stallman <rms@gnu.org>
26351 * src/bison.hairy: entered into RCS
26353 1987-12-16 Richard Stallman <rms@gnu.org>
26355 * REFERENCES: entered into RCS
26360 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
26363 Copying and distribution of this file, with or without
26364 modification, are permitted provided the copyright notice and this
26365 notice are preserved.