]> git.saurik.com Git - bison.git/blob - ChangeLog
doc: add bibliography to manual.
[bison.git] / ChangeLog
1 2011-02-20 Joel E. Denny <joeldenny@joeldenny.org>
2
3 doc: add bibliography to manual.
4 * doc/bison.texinfo (Mystery Conflicts): Cross-reference
5 bibliography instead of citing publications directly.
6 (Generalized LR Parsing): Likewise.
7 (Bibliography): New section. Not all entries are cross-referenced
8 yet, but that will come in future patches.
9
10 2011-02-19 Joel E. Denny <joeldenny@joeldenny.org>
11
12 java: test and document previous bug fix.
13 * NEWS (2.5): Document it.
14 * tests/java.at (_AT_DATA_JAVA_CALC_Y): To one of the yyerror
15 invocations, pass a location that spans multiple tokens. Change
16 yyerror to report all of a location rather than just the begin
17 position. Extend yylex and Position to count tokens on a line.
18 Remove getHashCode as it's unused. Update all expected output.
19
20 2011-02-19 Bernd Kiefer <kiefer@dfki.de> (tiny change)
21
22 java: fix location handling bug.
23 Reported at
24 <http://lists.gnu.org/archive/html/bison-patches/2011-02/msg00005.html>.
25 * data/lalr1.java (YYParser::yylloc): For non-empty RHS, fix
26 reversed access to location stack.
27 * THANKS (Bernd Kiefer): Add.
28
29 2010-05-11 Akim Demaille <demaille@gostai.com>
30
31 doc: please Emacs.
32 * doc/bison.texinfo (Local Variables): Move this after the
33 LocalWords, since the latter are looked for in the whole document,
34 while the former are looked for only at its end.
35 Require american spell checking.
36
37 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
38
39 doc: clean up new subsections in manual.
40 * doc/bison.texinfo (%define Summary): Reword so it reads well as
41 a separate section. For example, add an intro, and move most of
42 the text outside of the @deffn so it is not indented so far.
43 (%code Summary): Likewise.
44 (Table of Symbols): Reword %code entry to match the %code entry in
45 Decl Summary.
46
47 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
48
49 doc: finish splitting apart the manual's Decl Summary section.
50 Suggested by Akim Demaille at
51 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
52 * doc/bison.texinfo (Decl Summary): Extract most of the %define
53 entry into...
54 (%define Summary): ... this new subsection, and update all
55 cross-references. For readability of the patches, rewriting of
56 the text so it makes sense as a separate subsection will come in a
57 later patch. Moreover, the majority of the text describing the
58 various new LR features should likely move to another new section
59 somewhere.
60
61 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
62
63 doc: begin to split apart the manual's Decl Summary section.
64 Discussed in thread starting at
65 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
66 * doc/bison.texinfo (Decl Summary): Extract most of the %code
67 entry into...
68 (%code Summary): ... this new subsection, and update all
69 cross-references. For readability of the patches, rewriting of
70 the text so it makes sense as a separate subsection will come in a
71 later patch.
72
73 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
74
75 doc: clean up naming of various Bison files.
76 The Bison manual's names for various files associated with a Bison
77 parser has devolved into inconsistency. This patch makes the
78 naming consistent for the most important files. First, it chooses
79 "grammar file" over "input file". The former appears to be more
80 traditional in the Bison manual, and Bison has other input
81 files (skeletons). Second, it chooses "parser implementation
82 file" over names like "parser file", "parser source file", "parser
83 source code file", and "parser output file". The new name makes
84 it clearer where Bison generates the main parser implementation,
85 and it is easily distinguishable from "parser header file".
86 * doc/bison.texinfo: Implement throughout.
87
88 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
89
90 doc: give credit to more of Bison's developers.
91 * doc/bison.texinfo (Introduction): Don't imply that only Robert
92 Corbett, Richard Stallman, and Wilfred Hansen have contributed to
93 Bison. However, I don't have time to write a full history, so
94 just point readers to THANKS and ChangeLog.
95
96 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
97
98 doc: document experimental features better.
99 * doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
100 LR(1) are experimental. Mention Java. Normally experimental
101 features probably shouldn't be mentioned in the introduction.
102 However, if Bison's limitations to LALR(1), C, and C++ are so
103 important that they should be mentioned here, then it's important
104 to point out that Bison is beginning to escape those limitations.
105 Moreover, these particular experimental features have very little
106 chance of being removed.
107 * src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
108 experimental.
109
110 2011-01-29 Joel E. Denny <joeldenny@joeldenny.org>
111
112 Do not allow identifiers that start with a dash.
113 This cleans up our previous fixes for a bug whereby Bison
114 discarded `.field' in `$-1.field'. The previous fixes were less
115 restrictive about where a dash could appear in an identifier, but
116 the restrictions were hard to explain. That bug was reported and
117 this final fix was originally suggested by Paul Hilfinger. This
118 also fixes a remaining bug reported by Paul Eggert whereby Bison
119 parses `%token ID -123' as `%token ID - 123' and handles `-' as an
120 identifier. Now, `-' cannot be an identifier. Discussed in
121 threads beginning at
122 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
123 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
124 * NEWS (2.5): Update entry describing the dash extension to
125 grammar symbol names. Also, move that entry before the named
126 references entry because the latter mentions the former.
127 * doc/bison.texinfo (Symbol): Update documentation for symbol
128 names. As suggested by Paul Eggert, mention the effect of periods
129 and dashes on named references.
130 (Decl Summary): Update documentation for unquoted %define values,
131 which, as a side effect, can no longer start with dashes either.
132 * src/scan-code.l (id): Implement.
133 * src/scan-gram.l (id): Implement.
134 * tests/actions.at (Exotic Dollars): Extend test group to exercise
135 bug reported by Paul Hilfinger.
136 * tests/input.at (Symbols): Update test group, and extend to
137 exercise bug reported by Paul Eggert.
138 * tests/named-refs.at (Stray symbols in brackets): Update test
139 group.
140 ($ or @ followed by . or -): Likewise.
141 * tests/regression.at (Invalid inputs): Likewise.
142
143 2011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
144
145 * data/yacc.c: Fix last apostrophe warning from xgettext.
146
147 2011-01-09 Paul Eggert <eggert@cs.ucla.edu>
148
149 Fix minor problems encountered by a fresh bootstrap.
150 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
151 as they confuse xgettext, which tries to parse them as C character
152 constants in a preprocessor directive.
153 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
154 that expression might not promote to int on some platforms.
155 * src/parse-gram.c, src/parse-gram.h: Regenerate.
156
157 2011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
158
159 Improve error messages for `$' or `@' followed by `.' or `-'.
160 Previously, for this special case of an invalid reference, the
161 usual "symbol not found in production:" was printed. However,
162 because the symbol name was parsed as the empty string, that
163 message was followed immediately by a newline instead of a symbol
164 name. In reality, this is a syntax error, so the reference is
165 invalid regardless of the symbols actually appearing in the
166 production. Discussed at
167 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
168 * src/scan-code.l (parse_ref): Report the above case as a syntax
169 error. Other than that, continue to handle this case like any
170 other invalid reference that Bison manages to parse because
171 "possibly meant" messages can still be helpful to the user.
172 * tests/named-refs.at ($ or @ followed by . or -): New test group.
173
174 2011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
175
176 doc: don't use @acronym.
177 Lately, many GNU packages are dropping it. See
178 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
179 * doc/bison.texinfo: Remove all uses.
180
181 2011-01-05 Alex Rozenman <rozenman@gmail.com>
182
183 Do not allow identifiers that start with a negative number.
184 Reported by Paul Hilfinger as a side effect of named references
185 support at
186 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
187 Suggested by Paul Eggert.
188 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
189 * src/scan-gram.l ({letter}, {id}): Likewise.
190
191 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
192
193 * ChangeLog (2011-01-02): improve description.
194
195 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
196
197 maint: don't update copyright years in bootstrap.
198 * .x-update-copyright: Add entry for bootstrap.
199 * bootstrap: Remove 2011 from copyright years. The bootstrap
200 version we're currently using comes from an older version of
201 gnulib.
202 * bootstrap.conf (bootstrap_sync): Add comments explaining this
203 issue.
204
205 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
206
207 maint: run "make update-copyright".
208
209 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
210
211 maint: prepare to use year ranges in copyright notices.
212 * README (Copyright statements): New section explaining the range
213 notation. The GNU maintainers document requires this explanation:
214 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
215 I copied our explanation from coreutils.
216 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
217 disabled Bison's automated use of ranges.
218 * cfg.mk (update-copyright-env): Likewise.
219
220 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
221
222 Correct my email address.
223 * ChangeLog: In all recent entries.
224 * THANKS (Joel E. Denny): Here.
225
226 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
227
228 doc: cleanup.
229 * NEWS (2.5): Try to sort entries according to how interesting
230 users might find them.
231
232 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
233
234 doc: cleanup.
235 * NEWS (2.5): Make some minor improvements to wording, and format
236 entries more consistently.
237 * doc/bison.texinfo (Language and Grammar): Point out that IELR
238 and canonical LR are experimental features.
239 (Decl Summary): In list of %define variables, make wording more
240 consistent. Improve discussion of using LALR for GLR.
241
242 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
243
244 parse.lac: document.
245 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
246 other corrections to verbose syntax error messages.
247 * doc/bison.texinfo (Decl Summary): Rewrite entries for
248 lr.default-reductions and lr.type to be clearer, to mention
249 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
250 for parse.lac.
251 (Glossary): Add entry for LAC.
252
253 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
254
255 parse.lac: implement exploratory stack reallocations.
256 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
257 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
258 with values of "failures" (default) or "full".
259 (b4_declare_parser_state_variables): Add yyesa, yyes, and
260 yyes_capacity variables.
261 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
262 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
263 LAC requested.
264 (YYCOPY_NEEDED): New cpp macro.
265 (YYCOPY): Define if LAC requested.
266 (yy_lac_stack_realloc): New function implementing stack
267 reallocations. Use YYMAXDEPTH for maximum stack size given that
268 the stack should never need to grow larger than the main state
269 stack needs to grow without LAC.
270 (YY_LAC_ESTABLISH): Update yy_lac invocation.
271 (yy_lac): Add arguments for exploratory stack memory data
272 recorded in the main parser. Invoke yy_lac_stack_realloc when
273 reallocation is necessary.
274 (yysyntax_error): Add the same new arguments and pass them to
275 yy_lac.
276 (yypstate_delete): Free yyes if necessary.
277 (yyesa, yyes, yyes_capacity): #define these to yypstate members
278 in the case of push parsing.
279 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
280 Update yysyntax_error invocations. At yyreturn, free yyes if
281 necessary.
282 * src/parse-gram.y: %define parse.lac full.
283 * tests/input.at (LAC: errors for %define): Extend for
284 parse.lac-memory-trace.
285 * tests/regression.at (LAC: Exploratory stack): Extend to check
286 that stack reallocs happen when expected.
287 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
288 parse.lac.es-capacity-initial.
289
290 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
291
292 parse.lac: implement as %define variable.
293 LAC = lookahead correction. See discussion at
294 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
295 However, one point there must be corrected: because of %nonassoc,
296 LAC is *not* always redundant for lr.type=canonical-lr.
297 * data/yacc.c: Accept values of "none" (default) or "full" for
298 parse.lac. Accept %define parse.lac.es-capacity to specify
299 capacity of LAC's temporary exploratory stack. It defaults to 20
300 and, for now, will not grow dynamically.
301 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
302 parse.lac!=none.
303 (YYBACKUP): Invoke YY_LAC_DISCARD.
304 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
305 yy_lac and track when it needs to be invoked
306 (yy_lac): New function that, given the current stack, determines
307 whether a token can eventually be shifted. Return status mimics
308 yyparse return status.
309 (yysyntax_error): Change yystate argument to yyssp so stack top
310 can be passed to yy_lac. If LAC is requested, build expected
311 token list by invoking yy_lac for every token instead of just
312 checking the current state for lookaheads. Return 2 if yy_lac
313 exhausts memory.
314 (yyparse, yypush_parse): Use local variable yy_lac_established and
315 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
316 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
317 is requested.
318 * tests/conflicts.at (%nonassoc and eof): Extend to check the
319 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
320 (%error-verbose and consistent errors): Likewise.
321 (LAC: %nonassoc requires splitting canonical LR states): New test
322 group demonstrating how LAC can fix canonical LR.
323 * tests/input.at (LAC: Errors for %define): New test group.
324 * tests/regression.at (LAC: Exploratory stack): New test group.
325 (LAC: Memory exhaustion): New test group.
326
327 2010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
328
329 build: use gnulib's new bootstrap_sync option.
330 Now, whenever we update bison's copy of gnulib, bootstrap will
331 update itself the next time it's run.
332 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
333 * bootstrap.conf (bootstrap_sync): Set to true.
334 * gnulib: Update to latest so bootstrap is in sync now.
335
336 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
337
338 yysyntax_error: adjust prior fixes for branch-2.5's lalr1.cc.
339 On master, there is no yychar in lalr1.cc, but there is on
340 branch-2.5, and the prior cherry-pick of "Fix handling of yychar
341 manipulation in user semantic actions" wasn't adjusted for that
342 difference.
343 * data/lalr1.cc (yy::parser::parse): Translate yychar before
344 every use of yytoken, and add comments explaining this approach.
345 * tests/conflicts.at (%error-verbose and consistent errors):
346 Extend to test yychar manipulation with lalr1.cc.
347
348 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
349
350 yysyntax_error: fix for consistent error with lookahead.
351 * NEWS (2.5): Document.
352 * data/yacc.c (yysyntax_error): In a verbose syntax error
353 message while in a consistent state with a default action (which
354 must be an error action given that yysyntax_error is being
355 invoked), continue to drop the expected token list, but don't
356 drop the unexpected token unless there actually is no lookahead.
357 Moreover, handle that internally instead of returning 1 to tell
358 the caller to do it. With that meaning of 1 gone, renumber
359 return codes more usefully.
360 (yyparse, yypush_parse): Update yysyntax_error usage. Most
361 importantly, set yytoken to YYEMPTY when there's no lookahead.
362 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
363 unexpected token unless there actually is no lookahead.
364 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
365 set yytoken to yyempty_ before invoking yysyntax_error_.
366 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
367 token unless there actually is no lookahead.
368 * data/lalr1.java (YYParser::parse): If there's no lookahead,
369 set yytoken to yyempty_ before invoking yysyntax_error.
370 (YYParser::yysyntax_error): Again, don't drop the unexpected
371 token unless there actually is no lookahead.
372 * tests/conflicts.at (%error-verbose and consistent
373 errors): Extend test group to further reveal how the previous
374 use of the simple "syntax error" message was too general. Test
375 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
376 failure.
377 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
378 to...
379 * tests/local.at: ... here.
380 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
381 (AT_BISON_OPTION_POPDEFS): Pop it.
382 (AT_FULL_COMPILE): Extend to handle Java.
383
384 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
385
386 yysyntax_error: more preparation for readability of next patch.
387 There are no behavioral changes here.
388 * data/glr.c (yyreportSyntaxError): Reorganize.
389 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
390 * tests/conflicts.at (%error-verbose and consistent errors):
391 Reorganize.
392
393 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
394
395 yysyntax_error: prepare for readability of next patches.
396 These are purely whitespace changes that result in ugly code
397 but that make the next couple of patches much easier to read.
398 * data/glr.c (yyreportSyntaxError): Reindent.
399 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
400 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
401 * data/yacc.c (yysyntax_error): Reindent.
402
403 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
404
405 yysyntax_error: improve invocation readability.
406 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
407 invocation, get rid of the while loop, which is misleading
408 because there are really at most two iterations.
409
410 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
411
412 * ChangeLog: Correct some errors in previous entries.
413
414 2010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
415
416 maint: re-anchor all .gitignore entries.
417 * bootstrap: Copy from gnulib's latest for the fix to
418 automatically anchor entries it constructs.
419 * gnulib: Update to latest just so it has the same bootstrap.
420 * .gitignore, build-aux/.gitignore, doc/.gitignore:
421 * lib/.gitignore, m4/.gitignore, po/.gitignore:
422 * runtime-po/.gitignore: Re-anchor all entries.
423
424 2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
425
426 Fix portability problem on OpenBSD 4.7.
427
428 Jim Meyering reported this in
429 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
430 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
431 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
432 for quite some time.
433 * src/parse-gram.c, src/parse-gram.h: Regenerate.
434 * tests/regression.at: Tamper with the renamed witness.
435
436 Adjust to recent changes to gnulib bootstrap.
437
438 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
439 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
440 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
441 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
442 anymore and don't know of anybody else who does. If someone needs
443 these files, they can resurrect them.
444 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
445 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
446 Omit leading '/', since bootstrap omits it.
447 Adjust file names to match current contents better.
448 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
449 installed just for us.
450 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
451 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
452 needed somehow. Don't have time to look into why.
453 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
454 the GNU malloc behavior, where malloc (0) != NULL unless we're
455 out of storage? If not, we can omit malloc-gnu; but for now I left
456 it in to be safe.
457 (vc_ignore): Remove.
458 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
459 uses that convention.
460
461 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
462
463 Version 2.4.3.
464 * NEWS (2.4.3): Set date.
465
466 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
467
468 maint: add gettext version to release announcements.
469 Suggested by Paul Hilfinger at
470 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
471 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
472 * cfg.mk (bootstrap-tools): Add gettext.
473
474 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
475
476 doc: fix -W and %expect documentation some.
477 * NEWS (2.4.3): Mention that there are documentation fixes.
478 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
479 turns conflicts into errors not warnings.
480 (Shift/Reduce): Likewise.
481 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
482
483 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
484
485 -Werror: fix for rules useless in parser after conflicts.
486 * NEWS (2.4.3): Document fix.
487 * src/complain.c (error_message): Extend to handle incomplete
488 error messages so warn and warn_at can be used in more cases.
489 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
490 -Werror is always obeyed.
491 * src/reduce.c (reduce_print): Use warn so that the "warnings
492 being treated as errors" message is printed consistently before
493 the first warning message. This makes testing easier.
494 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
495 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
496 --warnings=error when warnings appear in bison's stderr.
497
498 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
499
500 maint: enable gnits only at stable releases.
501 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
502 version string should disable gnits. Explain in comments.
503
504 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
505
506 i18n: update.
507 * po/POTFILES.in: Add src/graphviz.c.
508
509 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
510
511 i18n: fix for gnulib.
512 * po/POTFILES.in: Add remaining gnulib files that have
513 translatable strings.
514
515 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
516
517 maint: use announce-gen's new --mail-headers.
518 * HACKING (Announce): Update instructions.
519 * cfg.mk (announcement_Cc_): Define.
520 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
521 required by latest gnulib.
522 * gnulib: Update to latest.
523
524 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
525
526 tests: handle Valgrind that complains about >&-.
527 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
528 (Output files: -dv >&-): Skip test group if running
529 maintainer-check-valgrind.
530
531 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
532
533 Update from GFDL GFDL 1.2 to 1.3.
534 * doc/bison.texinfo: Update GFDL version number.
535 * doc/fdl.texi: Update to version 1.3, taken from:
536 http://www.gnu.org/licenses/fdl.texi
537
538 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
539
540 Do not use date ranges in copyright notices.
541 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
542
543 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
544 * TODO, bootstrap, bootstrap.conf:
545 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
546 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
547 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
548 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
549 * data/lalr1.java, data/location.cc:
550 * data/xslt/bison.xsl:
551 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
552 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
553 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
554 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
555 * djgpp/subpipe.c, djgpp/subpipe.h:
556 * djgpp/testsuite.sed, doc/bison.texinfo:
557 * doc/refcard.tex, etc/README, etc/bench.pl.in:
558 * examples/calc++/Makefile.am, examples/extexi:
559 * lib/abitset.c, lib/abitset.h:
560 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
561 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
562 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
563 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
564 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
565 * lib/libiberty.h, lib/main.c, lib/timevar.c:
566 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
567 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
568 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
569 * src/AnnotationList.c, src/AnnotationList.h:
570 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
571 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
572 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
573 * src/complain.h, src/conflicts.c, src/conflicts.h:
574 * src/derives.c, src/derives.h, src/files.c, src/files.h:
575 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
576 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
577 * src/ielr.h, src/lalr.c, src/lalr.h:
578 * src/location.c, src/location.h, src/main.c:
579 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
580 * src/named-ref.h, src/nullable.c, src/nullable.h:
581 * src/output.c, src/output.h, src/parse-gram.y:
582 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
583 * src/print_graph.c, src/print_graph.h, src/reader.c:
584 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
585 * src/relation.h, src/scan-code.h, src/scan-code.l:
586 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
587 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
588 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
589 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
590 * tests/actions.at, tests/atlocal.in, tests/c++.at:
591 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
592 * tests/existing.at, tests/glr-regression.at:
593 * tests/headers.at, tests/input.at, tests/java.at:
594 * tests/local.at, tests/named-refs.at:
595 * tests/output.at, tests/push.at, tests/reduce.at:
596 * tests/regression.at, tests/sets.at, tests/skeletons.at:
597 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
598 * data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
599 * tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
600 * etc/Makefile.am:
601 Don't use date ranges in copyright notices.
602
603 2010-05-11 Akim Demaille <demaille@gostai.com>
604
605 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
606 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
607 header file to the implementation file, after the user %code
608 sections.
609 * NEWS (2.5): Document this.
610
611 2010-05-07 Akim Demaille <demaille@gostai.com>
612
613 c++: use YYRHSLOC.
614 * data/lalr1.cc (YYRHSLOC): New.
615 (YYLLOC_DEFAULT): Use it.
616 * data/glr.cc: If location_type was user defined, do not include
617 location.hh, and do not produce location.hh and position.hh.
618 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
619 Check that glr.cc supports user defined location_type.
620 * NEWS: Document this.
621
622 2010-05-10 Akim Demaille <demaille@gostai.com>
623
624 doc: fix lalr1.cc documentation.
625 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
626 (C++ Bison Interface): Fix lalr1.cc skeleton name.
627 (C++ Parser Interface): Fix semantic_type and location_type names.
628 Document yy::parser::token.
629 Reported by Jerry Quinn.
630
631 2010-05-04 Akim Demaille <demaille@gostai.com>
632
633 lalr1.cc: don't generate location.hh when location_type is defined
634 * data/bison.m4 (b4_percent_define_use): New.
635 (b4_percent_define_get): Use it.
636 Accept a default value.
637 * data/c++.m4: Do not provide a default value for the %define
638 variable location_type, rather, use b4_percent_define_get with a
639 default argument where its value is needed.
640 * data/lalr1.cc: Do not load location.cc (which outputs both
641 location.hh and position.hh) if the user defined location_type.
642 Do not include location.hh either.
643 * data/glr.cc: Likewise.
644
645 2010-05-04 Akim Demaille <demaille@gostai.com>
646
647 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
648 * tests/calc.at (Span): Instead of begin/end, as in the built-in
649 location class, use first and last.
650 Define YYLLOC_DEFAULT to adjust to these changes.
651 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
652 location_type changes.
653
654 2010-05-04 Akim Demaille <demaille@gostai.com>
655
656 tests: enhance AT_SYNCLINES_COMPILE.
657 * tests/synclines.at (AT_TEST_SYNCLINE): Move GCC 4.5 protection
658 into...
659 (AT_SYNCLINES_COMPILE): here.
660 Add more distcc patterns.
661
662 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
663
664 tests: fix maintainer-xml-check.
665 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
666 Update output to include comments now produced by --graph.
667 (xsl:template match="automaton"): As for --graph, name the
668 digraph after the grammar file.
669 * src/print-xml.c (escape_bufs): Enlarge array.
670 (print_xml): Add bug-report and url attributes to
671 bison-xml-report element.
672
673 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
674
675 In DOT output, convert from "/*" comments to "//" comments.
676 This handles the possibility that a "*/" might appear in
677 variable portions of those comments at some point in the future.
678 * src/graphviz.c (start_graph): Implement.
679
680 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
681
682 Document that undefined %prec identifier warnings will remain.
683 * NEWS (2.4.3): Here.
684 (2.4.2): Here.
685
686 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
687
688 Revert 2009-12-30 change for undefined %prec token complaints.
689 That is, keep them as warnings because that should be sufficient
690 to satisfy POSIX without creating backward compatibility issues.
691 Suggested by Richard Stallman at
692 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
693 * NEWS (2.5): Remove mention of complaint.
694 * src/reader.c (grammar_rule_check): Convert complaint back to
695 warning.
696 * tests/input.at (%prec's token must be defined): Update.
697
698 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
699
700 build: don't require src/bison during bootstrap.
701 Suggested by Eric Blake at
702 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
703 * bootstrap.conf (bootstrap_epilogue): New function to make sure
704 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
705
706 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
707
708 i18n: fix untranslatable string.
709 Reported by Goran Uddeborg at
710 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
711 * src/muscle-tab.c (muscle_percent_define_insert): Here.
712
713 2010-04-13 Akim Demaille <demaille@gostai.com>
714
715 tests: calc: minor refactoring.
716 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
717
718 2010-04-13 Akim Demaille <demaille@gostai.com>
719
720 tests: calc: simplify location management.
721 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
722 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
723 define the appropriate AT_LOC accessors.
724 * tests/calc.at: Use AT_LOC accessors.
725
726 2010-04-13 Akim Demaille <demaille@gostai.com>
727
728 test location_type.
729 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
730 Define AT_LOCATION_TYPE_IF.
731 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
732 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
733 used, provide a user location type and use it.
734 (Simple LALR1 C++ Calculator): Add a test case for location_type.
735
736 2010-04-13 Akim Demaille <demaille@gostai.com>
737
738 tests: check fclose's return value.
739 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
740
741 2010-04-13 Akim Demaille <demaille@gostai.com>
742
743 tests: don't depend on the actual location type.
744 * tests/calc.at: Use yy::parser::location_type rather than
745 yy::location, since the former is always right, and might point to
746 another type than the latter.
747
748 2010-04-13 Akim Demaille <demaille@gostai.com>
749
750 formatting changes.
751 * tests/calc.at: Formatting changes.
752
753 2010-04-13 Akim Demaille <demaille@gostai.com>
754
755 lalr1.cc: remove useless forward declaration.
756 * data/lalr1.cc: Include location.hh before stack.hh.
757 Remove the useless forward declarations of position and location.
758 Reported by Chris Morley.
759 * data/glr.cc: Likewise.
760
761 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
762
763 * NEWS (2.4.3): Mention fix for Sun Studio C++.
764
765 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
766
767 tests: fix for newer Sun Studio C++.
768 Reported by Dagobert Michelsen at
769 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
770 * THANKS (Dagobert Michelsen): Add.
771 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
772 Autoconf macro for handling the restrict keyword.
773 * gnulib: Update to latest, which no longer overrides that macro
774 from Autoconf.
775
776 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
777
778 portability: fix pointer arithmetic to conform to C standard.
779 Reported by Tys Lefering at
780 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
781 This fix is already implemented in glr.c and does not apply to
782 lalr1.java.
783 * data/lalr1.cc (yy::parser::parse): Increase size of
784 yyerror_range and adjust subscripting so you don't have to
785 subtract one from the beginning of the array.
786 * data/yacc.c (b4_declare_parser_state_variables,
787 yyparse, yypush_parse): Likewise.
788
789 2010-04-05 Akim Demaille <demaille@gostai.com>
790
791 remove useless include.
792 * src/graphviz.h: Don't include stdbool.h.
793
794 2010-04-05 Akim Demaille <demaille@gostai.com>
795
796 graph: sign the output file.
797 * src/graphviz.c (start_graph): Issue comments about Bison.
798 Suggested by Tys Lefering.
799
800 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
801
802 portability: fix test suite for GCC 4.5's new #error message.
803 Reported by Tys Lefering at
804 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
805 * NEWS (2.4.3): Mention.
806 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
807
808 2010-03-30 Akim Demaille <demaille@gostai.com>
809
810 fix comments.
811 * src/graphviz.h: Add missing license notice.
812 Document.
813
814 2010-03-25 Akim Demaille <demaille@gostai.com>
815
816 tests: fix 250: parse.error=verbose overflow.
817 * tests/regression.at (parse.error=verbose overflow): Avoid the
818 double inclusion of stdlib.h as it triggers hard errors.
819
820 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
821
822 portability: fix for BSD make.
823 Reported by Johan van Selst at
824 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
825 * tests/Makefile.am ($(TESTSUITE)): Qualify package.m4 in
826 this dependency list as in package.m4's target rule.
827
828 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
829
830 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
831 Reported by Johan van Selst at
832 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
833 * NEWS (2.4.3): New.
834 * THANKS (Johan van Selst): Add.
835 * gnulib: Update to latest.
836
837 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
838
839 maint: update for changes to gnulib's announce-gen.
840 * HACKING (Announce): RELEASE_TYPE=major must now be written
841 RELEASE_TYPE=stable.
842
843 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
844
845 Version 2.4.2.
846 * NEWS (2.4.2): Set version and date. For the recent test suite
847 portability fixes, don't be so optimistic about their success
848 given the lack of feedback on the affected platforms.
849
850 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
851
852 tests: fix maintainer-xml-check for recent changes.
853 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
854 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
855 output file whose name conflicts with a previous output file
856 is now never generated.
857
858 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
859
860 portability: fix several issues with M4 subprocess.
861
862 M4's output pipe was not being drained upon fatal errors during
863 scan_skel. As a result, broken-pipe messages from M4 were seen
864 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
865 failure in the test suite. The problem was that, on platforms
866 where the default disposition for SIGPIPE is ignore instead of
867 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
868 then reported it. However, there's some sort of race condition,
869 because the new test group occasionally succeeded.
870 Reported by Albert Chin at
871 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
872
873 There were also problems with the test suite livelocking on
874 Tru64 5.1b. Reported by Didier Godefroy at
875 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
876 Switching to create_pipe_bidi suggested by Akim Demaille.
877
878 To attempt to solve both of these problems, switch to gnulib's
879 create_pipe_bidi and register M4 process as a slave. Along the
880 way, clean up file name conflict handling, which was affected by
881 the broken-pipe problem before the switch.
882 * NEWS (2.4.2): Document.
883 * THANKS (Didier Godefroy): Add.
884 * bootstrap.conf (gnulib_modules): Add pipe.
885 * gnulib: Update to latest to make sure we have all the latest
886 fixes.
887 * lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
888 subpipe.c.
889 * po/POTFILES.in (lib/subpipe.c): Remove.
890 * src/files.c (compute_output_file_names): Update invocations
891 of output_file_name_check.
892 (output_file_name_check): In the case that the grammar file
893 would be overwritten, use complain instead of fatal, but replace
894 the output file name with /dev/null. Use the /dev/null solution
895 for the case of two conflicting output files as well because it
896 seems safer in case Bison one day tries to open both files at
897 the same time.
898 * src/files.h (output_file_name_check): Update prototype.
899 * src/output.c (output_skeleton): Use create_pipe_bidi and
900 wait_subprocess. Assert that scan_skel completely drains the
901 pipe.
902 * src/scan-skel.l (at_directive_perform): Update
903 output_file_name_check invocation.
904 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
905 grammar file actually isn't overwritten.
906 (Conflicting output files: -o foo.y): Update expected output.
907 * tests/skeletons.at (Fatal errors but M4 continues producing
908 output): New test group.
909
910 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
911
912 Update POTFILES.
913 * HACKING (Release Procedure): Add reminder about keeping
914 POTFILES files up-to-date.
915 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
916
917 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
918
919 Code cleanup.
920 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
921 which is already defined in atconfig.
922
923 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
924
925 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
926
927 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
928
929 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
930 * HACKING (Release Procedure): Update notes on copyright years.
931 * Makefile.am (update-package-copyright-year): New target rule.
932 * build-aux/update-package-copyright-year: New file.
933 * cfg.mk (update-copyright): Add update-package-copyright-year
934 as a dependency.
935
936 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
937
938 * bootstrap: Import improvements from latest gnulib.
939
940 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
941
942 build: require Automake 1.11.1 to avoid a security flaw.
943 * HACKING (Release Procedure): Don't document Automake security
944 flaw here.
945 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
946 why here.
947
948 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
949
950 gnulib: update to latest.
951
952 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
953
954 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
955
956 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
957
958 Thank the developer of the initial push parser implementation.
959 This unfortunate oversight is several years old.
960 * THANKS (Odd Arild Olsen): Add.
961
962 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
963
964 Fix some comments concerning LR(0) versus LALR(1).
965
966 Stop equating LR(0) with nondeterminism and LALR(1) with
967 determinism. That is, if all states are consistent, then LR(0)
968 tables are deterministic. On the other hand, LALR(1) tables
969 might be nondeterministic before conflict resolution, and GLR
970 permits LALR(1) tables to remain nondeterministic.
971 * src/LR0.c, src/LR0.h: Here.
972 * src/lalr.c, src/lalr.h: Here.
973 * src/main.c (main): Here.
974 * src/state.c, src/state.h: Here.
975
976 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
977 parser tables.
978
979 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
980
981 maint: run "make update-copyright"
982
983 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
984
985 POSIX: complain if %prec's token was not defined.
986 * NEWS (2.5): Document.
987 * src/reader.c (grammar_rule_check): Convert warning to
988 complaint.
989 * tests/input.at (%prec's token must be defined): Update.
990
991 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
992
993 POSIX: warn if %prec's token was not defined.
994 Reported by Florian Krohm at
995 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
996 * NEWS (2.4.2): Document.
997 * src/reader.c (grammar_rule_check): Implement.
998 (grammar_current_rule_prec_set): Add comments explaining that we
999 here assume a %prec identifier is a token, but we still manage
1000 to support POSIX.
1001 * tests/input.at (%prec's token must be defined): New test
1002 group.
1003
1004 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
1005
1006 * HACKING (Release Procedure): Recommend a secure automake.
1007
1008 2008-12-11 Akim Demaille <demaille@gostai.com>
1009
1010 Propagate i18n changes into glr.c.
1011 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1012 building the error message format dynamically.
1013 * data/lalr1.java: Formatting changes.
1014
1015 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
1016
1017 Port small part of master's 11707b2b so future ports are easier.
1018 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
1019
1020 2008-12-11 Akim Demaille <demaille@gostai.com>
1021
1022 Simplify the i18n of the error messages.
1023 * data/lalr1.cc: Comment changes.
1024
1025 2008-11-11 Akim Demaille <demaille@gostai.com>
1026
1027 Prefer M4 to CPP.
1028 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1029 YYERROR_VERBOSE.
1030
1031 2008-11-11 Akim Demaille <demaille@gostai.com>
1032
1033 Support i18n of the parse error messages.
1034 * TODO (lalr1.cc/I18n): Remove.
1035 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1036 error messages, as done in yacc.c.
1037 Stay within the yy* pseudo namespace.
1038
1039 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
1040
1041 Port small part of master's 8901f32e so future ports are easier.
1042 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
1043 argument, but name it in the function definition only when
1044 verbose error messages are enabled and it'll thus be used.
1045 (yy::parser::parse): Update use of yysyntax_error_.
1046
1047 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
1048
1049 portability: `<' and `>' are not always defined on addresses.
1050 Specifically, don't sort objects by their memory addresses when
1051 they're not allocated in the same array or other object. Though
1052 I haven't found a test case where that fails on my platform, C
1053 says the behavior is undefined.
1054 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1055 FIXME. Use new id field of InadequacyList nodes rather than
1056 their memory addresses when sorting.
1057 (AnnotationList__compute_from_inadequacies): Add
1058 inadequacy_list_node_count argument to pass to
1059 InadequacyList__new_conflict.
1060 * src/AnnotationList.h
1061 (AnnotationList__compute_from_inadequacies): Update prototype
1062 and documentation for new argument.
1063 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1064 node_count argument and use it to assign a unique ID.
1065 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1066 (InadequacyList): Add id field.
1067 (InadequacyList__new_conflict): Update prototype and
1068 documentation for new argument.
1069 * src/ielr.c (ielr_compute_annotation_lists): Update
1070 AnnotationList__compute_from_inadequacies invocation.
1071
1072 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
1073
1074 Fix handling of yychar manipulation in user semantic actions.
1075 The problem was that yacc.c didn't always update the yychar
1076 translation afterwards. However, other skeletons appear to be
1077 fine. glr.c appears to already translate yychar before every
1078 use. lalr1.cc does not define yychar and does not document its
1079 replacement, yyla, for users. It does provide yyclearin, but
1080 that does not manipulate yyla and thus requires no translation
1081 update. In lalr1.java, yychar is out of scope during semantic
1082 actions.
1083 * NEWS (2.5): Document.
1084 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1085 yytoken here.
1086 (yyparse, yypush_parse): Instead, translate before every use of
1087 yytoken, and add comments explaining this approach.
1088 * tests/actions.at (Destroying lookahead assigned by semantic
1089 action): New test group checking that translation happens before
1090 lookahead destructor calls at parser return. Previously,
1091 incorrect destructors were called.
1092 * tests/conflicts.at (%error-verbose and consistent
1093 errors): New test group checking that translation happens at
1094 syntax error detection before the associated verbose error
1095 message and the associated lookahead destructor calls. While
1096 the destructor call is fixed by this patch, the verbose error
1097 message is currently incorrect due to another bug (see
1098 comments in test group), so this is an expected failure for now.
1099
1100 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1101
1102 YYFAIL: warn about uses and remove from lalr1.java.
1103 * NEWS (2.5): Document.
1104 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
1105 and make it private. Update all uses.
1106 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1107
1108 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1109
1110 YYFAIL: deprecate.
1111 * NEWS (2.4.2): Document deprecation and the phase-out plan.
1112 * data/lalr1.java (YYParser::YYFAIL): Add comment about
1113 deprecation.
1114 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1115 YYFAIL from GCC cpp's -Wunused-macros.
1116 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1117 documentation.
1118 (LocalWords): Remove YYFAIL.
1119
1120 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
1121
1122 Code cleanup.
1123 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1124 function, which is no longer used.
1125
1126 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1127
1128 Add gcc's -Wundef to test suite and fix another warning from it.
1129 * NEWS (2.4.2): Update description of -Wundef fix.
1130 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1131 (WARN_CFLAGS_TEST): New substitution.
1132 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1133 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1134 WARN_CFLAGS.
1135 (NO_WERROR_CFLAGS): Likewise.
1136 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1137
1138 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1139
1140 * data/yacc.c: Reformat m4 a little.
1141
1142 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1143
1144 Document gcc -Wundef fix.
1145 * NEWS (2.4.2): Here.
1146 * THANKS (Jonathan Nieder): Add.
1147
1148 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1149
1150 Simplify y.tab.c when location tracking is disabled.
1151 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1152 tracking is not enabled. Instead, unconditionally define
1153 YY_LOCATION_PRINT as a no-op for backward compatibility.
1154
1155 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1156
1157 Avoid warnings from gcc -Wundef y.tab.c.
1158 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1159 defined before using them.
1160 * data/lalr1.cc: Likewise.
1161 * data/yacc.c: Likewise.
1162
1163 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1164
1165 autoconf: update to latest for fix of M4 detection.
1166 Reported by Eric Blake.
1167 * submodules/autoconf: Update.
1168
1169 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1170
1171 portability: use -DGNULIB_POSIXCHECK.
1172 Reported by Eric Blake. See discussions at
1173 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1174 and
1175 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1176 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1177 * bootstrap.conf (gnulib_modules): Add all the printf modules
1178 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1179 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1180 (excluded_files): Remove m4/printf-posix.m4.
1181 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1182 lib/libbison.a so gnulib libraries can be linked.
1183
1184 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1185
1186 Enable assertion output and --disable-assert for configure.
1187 * bootstrap.conf (gnulib_modules): Add assert module.
1188 * src/system.h (aver): Define as assert, and summarize the
1189 discussion on this issue.
1190
1191 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1192
1193 Expand GLR acronym in summary of Bison.
1194 Based on discussion with Akim Demaille starting at
1195 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1196 * doc/bison.texinfo (Introduction): Here.
1197 * src/getargs.c (usage): Here.
1198
1199 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1200
1201 Document named references.
1202 * doc/bison.texinfo (Actions): Add new example and xref to
1203 Using Named References node.
1204 (Using Named References): New node.
1205
1206 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1207
1208 cleanup.
1209 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1210 of char*.
1211 (Sbitset__isEmpty): Use Sbitset instead of char*.
1212 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1213 instead of char. This helps to avoid casting errors.
1214 (Sbitset__or): Use Sbitset instead of char*.
1215
1216 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1217
1218 portability: don't assume 8-bit bytes.
1219 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1220 * src/Sbitset.h (Sbitset__nbytes): Here.
1221 (Sbitset__byteAddress): Here.
1222 (Sbitset__bit_mask): Here.
1223 (Sbitset__last_byte_mask): Here.
1224 (Sbitset__ones): Here.
1225 (SBITSET__FOR_EACH): Here.
1226
1227 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
1228
1229 portability: use va_start and va_end in the same function.
1230 * src/complain.c (error_message): Move va_end from here...
1231 (ERROR_MESSAGE): ... to here.
1232
1233 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1234
1235 * data/bison.m4: Update comments for rename to muscle-tab.h.
1236
1237 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1238
1239 Rename muscle_tab.* to muscle-tab.* for consistency with master.
1240 * src/Makefile.am (bison_SOURCES): Update.
1241 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
1242 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
1243 src/tables.c: Update include.
1244 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
1245 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
1246 include.
1247
1248 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
1249
1250 Minor code cleanup.
1251 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1252 replace all uses with UNIQSTR_CONCAT.
1253 * src/uniqstr.c (uniqstr_vsprintf): New function.
1254 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1255 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1256 macros.
1257
1258 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1259
1260 Minor code cleanup.
1261 * src/parse-gram.y: Clean up sorting of declarations.
1262 Use types to simplify %printer declarations where possible.
1263 Provide %printer for BRACKETED_ID and symbol.prec.
1264 * src/symtab.c: Whitespace change.
1265
1266 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1267
1268 tests: skip tests of file names that platform does not support.
1269 Reported by Michael Raskin at
1270 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1271 * THANKS (Michael Raskin): Add.
1272 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1273 to fail at least for file names containing ":" or "\".
1274
1275 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1276
1277 yysyntax_error: avoid duplicate lookahead collection.
1278 Except when memory reallocation is required, this change
1279 eliminates the need to invoke yysyntax_error twice and thus to
1280 repeat the collection of lookaheads. It also prepares for
1281 future extensions that will make those repetitions more
1282 expensive and that will require additional memory management in
1283 yysyntax_error. Finally, it fixes an obscure bug already
1284 exercised in the test suite.
1285 * data/yacc.c (yysyntax_error): Add arguments for message
1286 buffer variables stored in the parser. Instead of size, return
1287 status similar to yyparse status but indicating success of
1288 message creation. Other than the actual reallocation of the
1289 message buffer, import and clean up memory management code
1290 from...
1291 (yyparse, yypush_parse): ... here.
1292 * tests/regression.at (%error-verbose overflow): No longer an
1293 expected failure.
1294
1295 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1296
1297 yysyntax_error: test memory management more.
1298 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1299 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
1300 New test group.
1301 (%error-verbose overflow): New test group that reveals an
1302 obscure bug. Expected fail for now.
1303
1304 2008-12-11 Akim Demaille <demaille@gostai.com>
1305
1306 Pass the token type to yysyntax_error.
1307 * data/yacc.c (yysyntax_error): Take the transated token instead
1308 of the raw number.
1309 Adjust callers.
1310
1311 2008-12-11 Akim Demaille <demaille@gostai.com>
1312
1313 Simplify the i18n of the error messages.
1314 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
1315 of building dynamically the format string.
1316
1317 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
1318
1319 Remove dead code.
1320 * src/symtab.c (symbol_pack): Here because every symbol's number
1321 is always defined by this time.
1322
1323 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1324
1325 Add additional space after periods in NEWS.
1326 * NEWS (2.5): here.
1327
1328 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
1329
1330 Use the correct conversion specifier for size_t.
1331 Reported by Jim Meyering.
1332 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1333 because Sbitset__Index is size_t.
1334 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1335
1336 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
1337
1338 tests: don't abuse AT_BISON_CHECK.
1339 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1340 additional shell commands outside of AT_BISON_CHECK.
1341
1342 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
1343
1344 tests: check that parse-gram.y's IELR and LALR are identical.
1345 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1346 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1347 group.
1348
1349 2009-09-16 Akim Demaille <demaille@gostai.com>
1350
1351 doc: comment changes.
1352 * doc/bison.texinfo: Comment changes.
1353
1354 2009-09-16 Akim Demaille <demaille@gostai.com>
1355
1356 doc: spell checking.
1357 * doc/bison.texinfo: here.
1358
1359 2009-09-19 Alex Rozenman <rozenman@gmail.com>
1360
1361 Keep sub-messages aligned. Fix strings for translation.
1362 * src/location.h (location_print): Add return value.
1363 * src/location.c (location_print): Return number of printed
1364 characters.
1365 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1366 new functions.
1367 * src/complain.cpp (indent_ptr): New static variable.
1368 (error_message, complain_at_indent, warn_at_indent): Implement
1369 the alignment mechanism.
1370 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1371 for translations. Use new alignment mechanism.
1372 * tests/named-ref.at: Adjust test-cases.
1373 * NEWS (2.5): Add an announcement about named references.
1374
1375 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
1376
1377 tests: clean up push.at test group titles.
1378 * tests/push.at: Remove "Push Parsing: " from test group titles
1379 because these are already under the banner "Push Parsing Tests".
1380
1381 2009-09-12 Alex Rozenman <rozenman@gmail.com>
1382
1383 Provide an additional sub-message for clarity.
1384 Add "symbol not found in production" error message when
1385 an "invalid reference" is detected in named references
1386 resolution.
1387 * src/scan-code.l: Update "invalid reference" case.
1388 * tests/named-ref.at: Adjust test-cases.
1389
1390 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1391
1392 Clean up yacc.c a little.
1393 * data/yacc.c: Clean up M4 for readability, and make output
1394 whitespace more consistent. For the main parse function
1395 comment, instead of saying "yyparse or yypush_parse", say either
1396 "yyparse" or "yypush_parse" depending on which it actually is.
1397
1398 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1399
1400 Complain about unused %define variables and %code qualifiers.
1401 * NEWS (2.5): Document.
1402 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1403 * doc/bison.texinfo (Decl Summary): Document complaint, and
1404 improve %define documentation a little otherwise.
1405 * tests/input.at (Reject unused %code qualifiers): Update.
1406 (%define errors): Update.
1407 (%define, --define, --force-define): Update.
1408 (%define backward compatibility): Update.
1409 (Unused %define api.pure): Update.
1410 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1411
1412 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1413
1414 Use aver not assert.
1415 * src/output.c: Don't include assert.h.
1416 (output_skeleton): Use aver not assert.
1417 * src/system.h (aver): In documentation of why, add links to
1418 Paul Eggert's explanations in the mailing lists.
1419
1420 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1421
1422 Use "Unresolved reference" error message when no symbols were found
1423 in a symbolic reference resolution. Remove .expr and -expr from
1424 the shown reference when the reference is unresolved.
1425 * src/scan-code.l: Change the error message, adjust location columns,
1426 rename variable "exact_mode" to "explicit_bracketing".
1427 * tests/named-ref.at: Adjust existing tests and add a new one.
1428
1429 2009-09-03 Akim Demaille <demaille@gostai.com>
1430
1431 * NEWS (2.4.2): Add "Internationalization" item.
1432
1433 2009-09-03 Akim Demaille <demaille@gostai.com>
1434
1435 bootstrap: fix/improve find_tool.
1436 * bootstrap (find_tool): Improve error messages.
1437 Fix typo about find_tool_names.
1438
1439 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1440
1441 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1442 See
1443 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1444 * src/scan-code.h (code_props_rule_action_init): Rename
1445 named_ref arg to name so it doesn't shadow named_ref type. This
1446 makes it consistent with the function definition in scan-code.l
1447 anyway.
1448
1449 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1450
1451 %define: accept unquoted values.
1452 * NEWS (2.5): Group all %define changes together, and document
1453 this one. Remove quotes in IELR and canonical LR entry.
1454 * doc/bison.texinfo: Remove quotes in most examples throughout.
1455 (Decl Summary): Update %define documentation.
1456 (Table of Symbols): Likewise.
1457 * src/ielr.c (LrType): Update documentation.
1458 * src/parse-gram.y (content.opt): Add production for ID.
1459 * tests/calc.at: Remove quotes in most tests.
1460 * tests/existing.at: Likewise.
1461 * tests/input.at: Likewise.
1462 * tests/local.at: Likewise.
1463 * tests/push.at: Likewise.
1464 * tests/reduce.at: Likewise.
1465 * tests/torture.at: Likewise.
1466
1467 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1468
1469 %define lr.type: make values lowercase IDs.
1470 That is, "LALR" => "lalr", "IELR" => "ielr", and
1471 "canonical LR" => "canonical-lr".
1472 * NEWS (2.5): Update documentation.
1473 * doc/bison.texinfo (Decl Summary): Likewise.
1474 * src/ielr.c (ielr): Use new values.
1475 * src/ielr.h (ielr): Update documentation.
1476 * src/reader.c (prepare_percent_define_front_end_variables): Use
1477 and validate new values.
1478 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1479 grammars.
1480 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1481
1482 2009-08-27 Eric Blake <ebb9@byu.net>
1483
1484 scan-gram: avoid portability trap with ctype usage.
1485 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1486 Avoid compiler warning.
1487
1488 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1489
1490 tests: use perl for printing special sequences to files.
1491 And skip tests if perl is not available. This is better than
1492 playing tricks with shell portability. Suggested by Akim
1493 Demaille.
1494 * tests/input.at (Bad character literals): Use it here for
1495 omitting final newlines.
1496 (Bad escapes in literals): Use it here for special characters.
1497
1498 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1499
1500 tests: show a use of %define lr.default-reductions "consistent"
1501 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1502 prevents the omission of expected tokens for %error-verbose.
1503
1504 2009-08-26 Akim Demaille <demaille@gostai.com>
1505
1506 tests: portability fix.
1507 * tests/input.at (Bad escapes in literals): Don't expect "echo
1508 '\0'" to output \ then 0.
1509
1510 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1511
1512 Actually handle the yytable zero value correctly this time.
1513 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
1514 mention zero values in the YYTABLE comments.
1515 * data/glr.c (yytable_value_is_error): Don't check for zero
1516 value.
1517 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1518 * data/yacc.c (yytable_value_is_error): Likewise.
1519 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1520 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1521 * src/tables.h: In header comments, explain why it's useless to
1522 check for a zero value in yytable.
1523
1524 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1525
1526 More fixes related to last two patches.
1527 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1528 defined.
1529 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
1530 yytable comments: zero indicates syntax error not default
1531 action.
1532 * data/glr.c (yyis_pact_ninf): Rename to...
1533 (yypact_value_is_default): ... this.
1534 (yyisDefaultedState): Update for rename.
1535 (yyis_table_ninf): Rename to...
1536 (yytable_value_is_error): ... this, and check for value zero
1537 besides just YYTABLE_NINF.
1538 (yygetLRActions): Check for default value from yypact. It
1539 appears that this check is always performed before this function
1540 is invoked, and so adding the check here is probably redundant.
1541 However, the code may evolve after this subtlety is forgotten.
1542 Also, update for rename to yytable_value_is_error. Because that
1543 macro now checks for zero, a different but equivalent branch of
1544 the if-then-else here is evaluated.
1545 (yyreportSyntaxError): Update for rename to
1546 yytable_value_is_error. The zero condition was mishandled
1547 before.
1548 (yyrecoverSyntaxError): Update for renames. No behavioral
1549 changes.
1550 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1551 New function.
1552 (yy_table_value_is_error_): New function.
1553 (parse): Use new functions where possible. No behavioral
1554 changes.
1555 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1556 The zero condition was mishandled before.
1557 * data/yacc.c (yyis_pact_ninf): Rename to...
1558 (yypact_value_is_default): ... this.
1559 (yyis_table_ninf): Rename to...
1560 (yytable_value_is_error): ... this, and check for value zero
1561 besides just YYTABLE_NINF.
1562 (yysyntax_error): Update for rename to yytable_value_is_error.
1563 The zero condition was mishandled before.
1564 (yyparse): Update for renames. No behavioral changes.
1565 * src/tables.h: Improve comments about yypact, yytable, etc.
1566 more. Most importantly, say yytable value of zero means syntax
1567 error not default action.
1568
1569 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1570
1571 Fix %error-verbose for conflicts resolved by %nonassoc.
1572 * NEWS (2.5): Document.
1573 * data/glr.c (yyreportSyntaxError): Fix this by checking
1574 yyis_table_ninf.
1575 * data/yacc.c (yysyntax_error): Likewise.
1576 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1577 yytable_ninf_.
1578 * data/lalr1.java (yysyntax_error): Likewise.
1579 * tests/conflicts.at (%nonassoc and eof): Update expected output
1580 and remove FIXME.
1581
1582 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1583
1584 Some code and documentation improvements.
1585 * data/c.m4 (b4_table_value_equals): New macro to capture
1586 some repeated code.
1587 * data/glr.c (yyis_pact_ninf): Use it here.
1588 (yyis_table_ninf): Likewise.
1589 (yyreportSyntaxError): Improve internal comments.
1590 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1591 Use it everywhere possible.
1592 (yyis_table_ninf): Likewise.
1593 (yysyntax_error): Improve internal comments.
1594 * data/lalr1.cc (yysyntax_error_): Likewise.
1595 * data/lalr1.java (yysyntax_error): Likewise.
1596 * src/tables.h: Improve comments about yypact, yytable, etc.
1597
1598 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
1599
1600 Use locale when quoting.
1601 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1602 quote rather than implementing quoting here.
1603
1604 2009-08-20 Eric Blake <ebb9@byu.net>
1605
1606 Make previous patch more robust.
1607 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1608 argmatch.h.
1609 (output_skeleton): Use it.
1610 Suggested by Akim Demaille.
1611
1612 Import latest m4/m4.m4.
1613 * submodules/autoconf: Update to autoconf 2.64.
1614 * configure.ac (M4_GNU_OPTION): New define.
1615 * src/output.c (output_skeleton): Use it to resolve FIXME.
1616 * NEWS: Mention this.
1617
1618 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
1619
1620 Fix complaints about escape sequences.
1621 Discussed starting at
1622 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1623 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1624 For a \0 and similar escape sequences meaning the null
1625 character, report an invalid escape sequence instead of an
1626 invalid null character because the latter does not actually
1627 appear in the user's input.
1628 In all escape sequence complaints, don't escape the initial
1629 backslash, and don't quote when the sequence appears at the end
1630 of the complaint line unless there's whitespace that quotearg
1631 won't escape.
1632 Consistently say "invalid" not "unrecognized".
1633 Consistently prefer "empty character literal" over "extra
1634 characters in character literal" warning for invalid escape
1635 sequences; that is, consistently discard those sequences.
1636 * tests/input.at (Bad escapes in literals): New.
1637
1638 2009-08-19 Akim Demaille <demaille@gostai.com>
1639
1640 doc: fixes.
1641 * doc/bison.texinfo: Fix minor Texinfo errors.
1642
1643 2009-08-19 Akim Demaille <demaille@gostai.com>
1644
1645 doc: %initial-action to initialize yylloc.
1646 Reported by Bill Allombert.
1647 * doc/bison.texinfo: Set fill-column to 76.
1648 (Location Type): Document the use of %initial-action to initialize
1649 yylloc.
1650
1651 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
1652
1653 maint: update for gnulib's recent update-copyright changes
1654 * gnulib: Update.
1655 * .x-update-copyright (COPYING): Add as it's no longer implied
1656 when .x-update-copyright is present.
1657 * cfg.mk (update-copyright-local): Remove, now ignored.
1658 (update-copyright): Declare update-b4-copyright as a dependency.
1659
1660 2009-08-17 Akim Demaille <demaille@gostai.com>
1661
1662 build: require gettext 0.17.
1663
1664 Suggested by Bruno Haible.
1665 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1666 * configure.ac: require gettext 0.17 to ensure compatibility with
1667 gnulib.
1668
1669 2009-08-17 Akim Demaille <demaille@gostai.com>
1670
1671 build: lower gettext requirements.
1672
1673 Bison was uselessly requiring the formatstring macros from
1674 gettext, which resulted in mo files not being installed on systems
1675 that perfectly supported Bison mo files. Lower the requirement.
1676 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1677
1678 * configure.ac: Require need-ngettext instead of
1679 need-formatstring-macros.
1680 Reported by Martin Jabocs.
1681 Suggested by Bruno Haible.
1682 * INSTALL: Restructure.
1683 (Internationalization): New.
1684
1685 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
1686
1687 maint: fix use of copyright year intervals.
1688 * gnulib: Update.
1689 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1690 as now recommended in gnulib/NEWS.
1691 * build-aux/update-b4-copyright: Fix.
1692 * cfg.mk (update-copyright-env): Configure update-copyright.
1693
1694 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
1695
1696 Make it easier to write deterministic tests.
1697 Continues Akim's work from his 2009-06-10 commits.
1698 * src/reader.c (check_and_convert_grammar): Don't add any
1699 symbols after the first symbols_do invocation.
1700 * src/symtab.c (symbols_sorted): New static global.
1701 (user_token_number_redeclaration): Update comments.
1702 (symbol_from_uniqstr): If a new symbol is being created, assert
1703 that symbols_sorted hasn't been allocated yet.
1704 (symbols_free): Free symbols_sorted.
1705 (symbols_cmp, symbols_cmp_qsort): New functions.
1706 (symbols_do): Sort symbol_table into symbols_sorted on first
1707 invocation.
1708 * tests/input.at (Numbered tokens): Recombine tests now that the
1709 output should be deterministic across multiple numbers.
1710
1711 2009-08-12 Akim Demaille <demaille@gostai.com>
1712
1713 distcheck: fix.
1714
1715 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1716
1717 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1718
1719 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
1720
1721 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1722
1723 Miscellaneous code readability improvements.
1724
1725 * src/reader.c (reader): Move %define front-end variable
1726 defaults and checking into...
1727 (prepare_percent_define_front_end_variables): ... this new
1728 function.
1729
1730 * src/scan-gram.l (INITIAL): For consistency with string
1731 literals, don't store open quote on character literal. It's
1732 discarded before returning anyway.
1733 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1734 Make length test more readable, and make the character stored
1735 for an empty literal more obvious while consistent with the
1736 previous behavior.
1737
1738 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1739 USER_NUMBER_HAS_STRING_ALIAS throughout.
1740 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1741 that is repeated in symtab.h. Improve argument names to make it
1742 clear which side of the symbol-string alias pair is which.
1743 (symbol_check_alias_consistency): Improve local variable names
1744 for the same purpose.
1745 * src/symtab.h (struct symbol): Make comments about aliases
1746 clearer.
1747 (symbol_make_alias): Improve comments and argument name.
1748 * src/output.c (token_definitions_output): Update for rename to
1749 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1750
1751 2009-08-08 Alex Rozenman <rozenman@gmail.com>
1752
1753 Convert "misleading reference" messages to warnings.
1754 * src/scan-code.l: New function 'show_sub_messages', more
1755 factoring.
1756 * tests/named-ref.at: Adjust tests.
1757
1758 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1759
1760 maint: run "make update-copyright"
1761
1762 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1763
1764 maint: make update-b4-copyright easier to use
1765 * build-aux/update-b4-copyright: In warnings, report line
1766 numbers rather than character positions.
1767 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1768 that update-copyright runs it.
1769 * gnulib: Update.
1770
1771 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
1772
1773 maint: clean up update-b4-copyright code
1774 * build-aux/update-b4-copyright: Do not accept 2-digit
1775 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1776 Don't accept a `[' in a b4_copyright argument.
1777 Format code more consistently.
1778 Don't assume b4*copyright never occurs.
1779
1780 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1781
1782 maint: automate b4_copyright updates.
1783 * Makefile.am (update-b4-copyright): New target rule.
1784 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
1785 * build-aux/update-b4-copyright: New.
1786 * data/yacc.c: Remove stray characters around b4_copyright
1787 invocations.
1788
1789 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1790
1791 maint: automate annual package-wide copyright-year update.
1792 * .x-update-copyright: New.
1793 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1794 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1795 update-copyright. Remove gnumakefile, which is implied by
1796 maintainer-makefile.
1797 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1798 * gnulib: Update.
1799 * maint.mk: Remove, now copied from gnulib.
1800 * examples/extexi: Add missing "(C)" in copyright statement so
1801 update-copyright can recognize it.
1802 * src/LR0.h: Likewise.
1803 * src/print.h: Likewise.
1804 * src/print_graph.h: Likewise.
1805 * src/gram.c: Add missing comma in copyright statement.
1806 * src/gram.h: Likewise.
1807
1808 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1809
1810 Fix "make distcheck".
1811 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1812 of just calc.stamp.
1813
1814 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
1815
1816 Pacify "gcc -Wunused" for the input function from Flex.
1817 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1818 and later.
1819 * src/scan-code.l: Add "%option noinput", which I cannot find in
1820 the Flex manual, but which Flex has supported since at least as
1821 far back as 2.5.4. However, if any of our developers still use
1822 Flex 2.5.4, they'll need to stop configuring with
1823 --enable-gcc-warnings because "%option noinput" didn't work
1824 correctly until Flex 2.5.6.
1825 * src/scan-gram.l: Likewise.
1826 * src/scan-skel.l: Likewise.
1827
1828 2009-07-31 Alex Rozenman <rozenman@gmail.com>
1829
1830 Fix --enable-gcc-warnings problems.
1831 * src/reader.c: Adjust variable names.
1832 * src/scan-code.l: Fix prototypes and adjust names.
1833 * src/named-ref.c: Remove redundant "if".
1834
1835 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1836
1837 Fix a --enable-gcc-warnings problem.
1838 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1839 variable.
1840
1841 2009-07-24 Alex Rozenman <rozenman@gmail.com>
1842
1843 Fix some memory leaks.
1844 * src/named-ref.c: Add a pointer check (named_ref_free).
1845 * src/scan-code.l: New function (variant_table_free). Called in
1846 code_scanner_free.
1847 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1848
1849 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1850
1851 Warn about character literals not of length one.
1852 * NEWS (2.5): Document.
1853 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1854 the length.
1855 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1856 * tests/input.at (Bad character literals): New test group.
1857
1858 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1859
1860 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1861
1862 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1863
1864 Some M4 cleanup in the testsuite.
1865 Suggested by Eric Blake at
1866 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1867 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1868 complicate the code by distinguishing between a missing value
1869 and an empty string value for an optional argument. This fix is
1870 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1871 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1872 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1873 arguments are not needed because of the following changes.
1874 Fix stale comments.
1875 Bison developers should use GNU M4 and should not use
1876 POSIXLY_CORRECT when building the test suite, so do not
1877 complicate the code by avoiding $10 and above.
1878 Do not quote an empty string value for an optional argument, and
1879 do not distinguish between a missing value and an empty string
1880 value.
1881
1882 2009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
1883
1884 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
1885
1886 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1887
1888 Revert unnecessary column realignment in --help output.
1889 Reported by Akim Demaille at
1890 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1891 * src/getargs.c (usage): Here.
1892
1893 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1894
1895 Alphabetical order in src/Makefile.am.
1896 * src/Makefile.am: Adjust.
1897
1898 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1899
1900 Style changes and factoring.
1901 * src/named-ref.h: Add comments.
1902 * src/parse-gram.y: Readability and style changes.
1903 * src/reader.c: Factoring: assign_named_ref function.
1904 * src/scan-code.l: Factoring and style changes. Rename
1905 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1906 Use "unsigned" type for variant index. Improve readablity.
1907 * src/scan-gram.l: Change error messages and add comments.
1908 * src/symlist.h: symbol_list_null: New function decl.
1909 * src/symlist.c: symbol_list_null: Implement here.
1910 * tests/named-refs.at: Adjust for new error messages.
1911
1912 2009-06-29 Eric Blake <ebb9@byu.net>
1913
1914 scan-code: avoid compiler warnings
1915 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1916
1917 2009-06-29 Akim Demaille <demaille@gostai.com>
1918
1919 build: avoid concurrent extraction of calc++.
1920 * examples/calc++/Makefile.am (calc.stamp): New.
1921 Depend on it to create the sources of calc++ so that concurrent
1922 builds don't launch several "extexi" in parallel.
1923 Not only this is inefficient, this also builds incorrect sources
1924 with several extractions mixed together.
1925
1926 2009-06-27 Alex Rozenman <rozenman@gmail.com>
1927
1928 Implement support for named symbol references.
1929 * src/parse-gram.y: Add new syntax (named_ref.opt).
1930 * src/reader.c: Store named refs in symbol lists.
1931 * src/reader.h: New argument for symbol_append and
1932 action_append functions.
1933 * src/scan-code.h: Add new field (named_ref) into
1934 code_props data structure. Keeps named ref of midrule
1935 actions.
1936 * src/scan-code.l: Support for named refs in semantic
1937 action code. New function 'parse_named_ref'.
1938 * src/scan-gram.l: Support bracketed id.
1939 * src/symlist.c: Store named refs in symbol lists.
1940 * src/symlist.h: New field in symbol list: named_ref.
1941 * src/named-ref.h: New file, a struct for named_ref.
1942 * src/named-ref.cp: New file, named_ref_new function.
1943 * src/local.mk: Add two new files.
1944 * tests/testsuite.at: Include new test group:
1945 * tests/named-refs.at: this new file.
1946
1947 2009-06-25 Akim Demaille <demaille@gostai.com>
1948
1949 hash: check insertion for memory exhaustion.
1950 * src/uniqstr.c (uniqstr_new): New.
1951
1952 2009-06-11 Akim Demaille <demaille@gostai.com>
1953
1954 style changes.
1955 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1956 * src/print-xml.c: Style changes.
1957 * tests/conflicts.at: Comment changes.
1958
1959 2009-06-11 Akim Demaille <demaille@gostai.com>
1960
1961 xml: beware of user strings used to give a %prec to rules.
1962 * tests/conflicts.at (%prec with user strings): New.
1963 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1964 XML output.
1965
1966 2009-06-11 Akim Demaille <demaille@gostai.com>
1967
1968 hash: check insertion for memory exhaustion.
1969 * src/muscle-tab.c (muscle_insert, muscle_grow)
1970 * src/state.c (state_hash_insert): Check the return value of
1971 hash_insert.
1972
1973 2009-06-10 Akim Demaille <demaille@gostai.com>
1974
1975 deterministic test suite.
1976 Some consistency checks on symbols are performed after all the
1977 symbols were read, by an iteration over the symbol table. This
1978 traversal is nondeterministic, which can be a problem for test
1979 cases.
1980 Avoid this.
1981 Addresses another form of nondeterminism reported by Joel E. Denny.
1982 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1983
1984 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1985 test in two.
1986 Use different file names for the three tests to make the
1987 maintenance easier.
1988
1989 2009-06-10 Akim Demaille <demaille@gostai.com>
1990
1991 deterministic user-token-number redeclaration errors.
1992 Address nondeterminism reported by Joel E. Denny.
1993 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1994
1995 * src/uniqstr.h: Comment changes.
1996 * src/location.h (boundary_cmp, location_cmp): New.
1997 * src/symtab.c (user_token_number_redeclaration): New.
1998 (symbol_translation): Use it.
1999 * tests/input.at (Numbered tokens): Adjust the expected output.
2000
2001 2009-05-25 Akim Demaille <demaille@gostai.com>
2002
2003 gnulib: update.
2004 * gnulib: Update to latest.
2005 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2006 * m4/.gitignore: Regen.
2007 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2008 Call xalloc_die on hash_insert failures.
2009 Requested by the new __warn_unused_result__ attribute of
2010 hash_insert.
2011
2012 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2013
2014 Convert multiple variable definition warnings to complaints.
2015 * NEWS (2.5): Add a new entry for that change.
2016 * doc/bison.texinfo (Decl Summary): Update %define entry.
2017 (Bison Options): Update -D/--define/-F/--force-define entry.
2018 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
2019 * src/muscle_tab.h (muscle_percent_define_insert): Update
2020 comments.
2021 * tests/input.at (`%define errors'): Update.
2022 (`%define, --define, --force-define'): Update.
2023
2024 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2025
2026 -F/--force-define and relative %define/-D/--define priorities.
2027 * NEWS (2.5): Add documentation to -D/--define entry.
2028 * build-aux/cross-options.pl: Hard-code association of
2029 --force-define with %define.
2030 * doc/bison.texinfo (Decl Summary): In %define entry,
2031 cross-reference command-line options.
2032 (Bison Options): Add documentation to -D/--define entry.
2033 (Option Cross Key): Widen column for --force-define row.
2034 * src/getargs.c (usage): Document -F/--force-define. Realign
2035 options in output.
2036 (short_options, long_options, getargs): Parse -F/--force-define,
2037 and update muscle_percent_define_insert invocation.
2038 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
2039 (muscle_percent_define_insert): Add argument with that type.
2040 * src/muscle_tab.c (muscle_percent_define_insert): Implement
2041 -F/--force-define behavior and priorities.
2042 * src/parse-gram.y (prologue_declaration): Update
2043 muscle_percent_define_insert invocations.
2044 * tests/input.at (`%define, --define'): Rename to...
2045 (`%define, --define, --force-define'): ... this and extend.
2046
2047 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2048
2049 Update some comments to make sense for -D.
2050 * data/bison.m4 (b4_check_user_names): In header comments, say
2051 "user occurrence" instead of "grammar occurrence".
2052 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
2053 (muscle_percent_code_grow): Likewise just for consistency.
2054
2055 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2056
2057 * data/c++.m4: Update copyright year.
2058
2059 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2060
2061 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2062
2063 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2064
2065 Handle a trailing `:' in a user-supplied C++ namespace better.
2066 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2067 among the closing braces here. This fix might make the
2068 generated code easier to debug, but otherwise it should be
2069 insignificant because a trailing `:' is a C++ error already.
2070
2071 2009-05-19 Akim Demaille <demaille@gostai.com>
2072
2073 remove useless variable.
2074 * src/getargs.c (skeleton_arg): Remove now useless variable.
2075 Should help the compiler see that this printf-like call is sane.
2076
2077 2009-05-11 Akim Demaille <demaille@gostai.com>
2078
2079 doc: use C++ headers.
2080 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2081 headers.
2082
2083 2009-05-05 Akim Demaille <demaille@gostai.com>
2084
2085 fix hexadecimal token number support.
2086 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
2087
2088 2009-05-05 Akim Demaille <demaille@gostai.com>
2089
2090 tests: check token numbers.
2091 * tests/input.at (Numbered tokens): New.
2092
2093 2009-05-04 Akim Demaille <demaille@gostai.com>
2094
2095 bison: catch bad symbol names.
2096 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2097 * tests/input.at: Adjust.
2098
2099 2009-05-04 Akim Demaille <demaille@gostai.com>
2100
2101 space changes.
2102 * src/scan-gram.l: Untabify to be robust to zealous editors.
2103
2104 2009-05-04 Akim Demaille <demaille@gostai.com>
2105
2106 identifiers: dashes are letters.
2107 Dashes can now start identifiers (symbols and directives).
2108
2109 * src/scan-gram.l ({letter}): Add dash.
2110 ({id}): Remove it.
2111 * tests/input.at (Symbols): Adjust.
2112 Remove stray comment.
2113 * tests/regression.at (Invalid inputs): Adjust error message.
2114 * doc/bison.texinfo (Symbols): Update.
2115
2116 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2117
2118 Declare %code to be a permanent feature.
2119 * NEWS (2.4.2): Here.
2120 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2121 experimental.
2122 (Decl Summary): Likewise.
2123
2124 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2125
2126 Convert underscores to dashes in some %define variable names.
2127 For now, just api.push-pull and lr.keep-unreachable-states.
2128 Maintain old names for backward compatibility.
2129 * NEWS (2.5): Document.
2130 * data/c.m4 (b4_identification): Update comment.
2131 * data/yacc.c: Update access.
2132 * doc/bison.texinfo: Update.
2133 * etc/bench.pl.in (bench_grammar): Update use.
2134 * src/files.c (tr): Move to...
2135 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2136 think of a better place to expose it. My logic is that, for all
2137 uses of tr so far, command-line arguments can be involved, and
2138 getargs.h is already included.
2139 * src/main.c (main): Update access.
2140 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2141 variable names to new variable names before assigning value.
2142 * src/reader.c (reader): Update setting default.
2143 * tests/calc.at: Update uses.
2144 * tests/conflicts.at (Unreachable States After Conflict
2145 Resolution): Update use.
2146 * tests/input.at (%define enum variables): Update use.
2147 (%define backward compatibility): New test group.
2148 * tests/push.at: Update uses.
2149 * tests/reduce.at: Update uses.
2150 * tests/torture.at: Update uses.
2151
2152 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2153
2154 Set all front-end %define defaults in one place.
2155 * src/main.c (main): Move lr.keep_unreachable_states default...
2156 * src/reader.c (reader): ... to here.
2157
2158 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2159
2160 Rename lr.default_reductions to lr.default-reductions.
2161 * NEWS (2.5): Here.
2162 * doc/bison.texinfo: Here.
2163 * src/lalr.c (initialize_LA): Here.
2164 * src/print.c (print_reductions): Here.
2165 * src/reader.c (reader): Here.
2166 * src/tables.c (action_row): Here.
2167 * tests/input.at (%define enum variables): Here.
2168 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2169
2170 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2171
2172 Pacify ./configure --enable-gcc-warnings.
2173 * tests/input.at (Symbols): Prototype yyerror and yylex.
2174
2175 2009-04-21 Akim Demaille <demaille@gostai.com>
2176
2177 tests: check the use of dashes and periods in symbols.
2178 * tests/input.at (Symbol): New test group.
2179
2180 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2181
2182 Document how `%define "var" "value"' is not M4-friendly.
2183 * src/parse-gram.y (variable): In comments here.
2184
2185 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2186
2187 Add copyright updates missed during previous cherry pick.
2188 * src/output.c: Here.
2189 * src/parse-gram.y: Here.
2190 * src/scan-gram.l: Here.
2191
2192 2009-04-20 Akim Demaille <demaille@gostai.com>
2193
2194 variables: accept dashes.
2195 * src/scan-gram.l ({id}): Also accept dashes after the initial
2196 letter.
2197 ({directive}): Use {id}.
2198 * src/parse-gram.y: Comment and formatting changes.
2199 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2200 symbols.
2201 * src/complain.h, src/complain.c (yacc_at): New.
2202 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2203 symbol names.
2204 * src/output.c (token_definitions_output): Do not #define token
2205 names with dashes.
2206
2207 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2208
2209 Clean up recent patches a little.
2210 Reported by Akim Demaille.
2211 * doc/bison.texinfo (Understanding): Fix typos.
2212 * src/print.c (print_reductions): Don't use negated variable.
2213
2214 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2215
2216 List accepted values for a %define enum variable with an invalid value.
2217 Suggested by Akim Demaille at
2218 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2219 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2220 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
2221 * tests/input.at (%define lr.default_reductions invalid values): Merge
2222 into...
2223 (%define enum variables): ... here, and update output.
2224
2225 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2226
2227 Rename "default rule" to "default reduction".
2228 This includes changing variable names in code, changing
2229 comments, and renaming %define lr.default_rules to %define
2230 lr.default_reductions.
2231 * NEWS (2.5): Update IELR documentation.
2232 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
2233 Adjust YYDEFACT and yydefact_ documentation.
2234 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2235 and lr.type documentation. Make some other wording
2236 improvements.
2237 (Glossary): Adjust cross-references and Default Reduction
2238 definition.
2239 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2240 Remove a confusing comment pointed out by Akim Demaille.
2241 (initialize_LA): Adjust code.
2242 * src/print-xml.c (print_reductions): Adjust code.
2243 * src/print.c (print_reductions): Adjust code.
2244 * src/reader.c (reader): Adjust code.
2245 * src/tables.c (action_row): Adjust code.
2246 (token_actions): Adjust code.
2247 * src/tables.h: Adjust YYDEFACT documentation.
2248 * tests/input.at (%define lr.default_rules invalid values):
2249 Rename test group to...
2250 (%define lr.default_reductions invalid values): ... this, and
2251 update grammar file and expected output.
2252 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2253 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2254
2255 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2256
2257 Document %define lr.type and lr.default_rules.
2258 * NEWS (2.5): Add an entry.
2259 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2260 besides just LALR(1) and GLR(1).
2261 * doc/bison.texinfo (Introduction): Likewise.
2262 (Language and Grammar): Bison is no longer limited to LALR(1)
2263 restrictions.
2264 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2265 when trying to distinguish from GLR. Talk about LR(1) grammars
2266 rather than LALR(1) grammars.
2267 (Decl Summary): In %define api.push_pull entry, say it applies
2268 to deterministic parsers in C rather than LALR(1) parsers in C.
2269 Add lr.default_rules entry.
2270 Add lr.type entry.
2271 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2272 restrictions.
2273 (Generalized LR Parsing): Same changes as for the previous GLR
2274 section.
2275 (Memory Management): Say deterministic rather than LALR(1).
2276 (Understanding): Correct some bison output.
2277 Index discussion of "accepting state".
2278 Say deterministic rather than LALR(1).
2279 (Bison Options): In --yacc entry, say deterministic rather than
2280 LALR(1).
2281 In --report, --graph, and --xml entries, just don't mention
2282 LALR(1).
2283 (C++ Parsers): Say deterministic rather than LALR(1).
2284 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2285 (Glossary): Add Accepting State, Consistent State, Default Rule,
2286 and IELR(1) definitions.
2287 In Generalized LR (GLR) definition, make same changes as in
2288 previous GLR sections.
2289 In LALR(1) definition, say Bison uses LALR(1) by default rather
2290 than implying Bison is limited to LALR(1).
2291 (LocalWords): Add IELR.
2292
2293 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2294
2295 Finish implementing %define lr.type.
2296 Its value can be "LALR", "IELR", or "canonical LR".
2297 * lib/timevar.def (TV_IELR_PHASE1): New var.
2298 (TV_IELR_PHASE2): New var.
2299 (TV_IELR_PHASE3): New var.
2300 (TV_IELR_PHASE4): New var.
2301 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2302 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2303 Sbitset.h, ielr.h, and ielr.c.
2304 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2305 trace_types): Add trace_ielr.
2306 * src/lalr.h, src/lalr.c (ngotos): Export it.
2307 (F): Rename to...
2308 (goto_follows): ... this, update all uses, and export it.
2309 (set_goto_map): Export it.
2310 (map_goto): Export it.
2311 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2312 handled in ielr.
2313 (initialize_LA): Export it. Move lookback allocation to...
2314 (lalr): ... here because, for canonical LR, initialize_LA must
2315 be invoked but lookback and much of the rest of LALR isn't
2316 needed.
2317 * main.c (main): Instead of lalr, invoke ielr, which invokes
2318 lalr.
2319 * src/reader.c (reader): Default lr.type to "LALR".
2320 Default lr.default_rules to "accepting" if lr.type is "canonical
2321 LR". Leave the default as "all" otherwise.
2322 Check for a valid lr.type value.
2323 * src/state.h, src/state.c (struct state_list): Add state_list
2324 member.
2325 (state_new): Initialize state_list member to NULL.
2326 (state_new_isocore): New function, exported.
2327 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2328 exercises all values of lr.type.
2329 (GNU AWK Grammar): Rename test group to...
2330 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2331 AT_TEST_EXISTING_GRAMMAR.
2332 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2333 (GNU pic Grammar): Rename test group to...
2334 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2335 AT_TEST_EXISTING_GRAMMAR.
2336 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2337 all values of lr.type.
2338 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2339 (Lane Split): Likewise.
2340 (Complex Lane Split): Likewise.
2341 (Split During Added Lookahead Propagation): Likewise.
2342
2343 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2344
2345 Add new files for IELR and canonical LR implementation.
2346 * src/AnnotationList.c: New.
2347 * src/AnnotationList.h: New.
2348 * src/InadequacyList.c: New.
2349 * src/InadequacyList.h: New.
2350 * src/Sbitset.c: New.
2351 * src/Sbitset.h: New.
2352 * src/ielr.c: New.
2353 * src/ielr.h: New.
2354
2355 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2356
2357 Implement %define lr.default_rules.
2358 Its value describes the states that are permitted to contain
2359 default rules: "all", "consistent", or "accepting".
2360 * src/reader.c (reader): Default lr.default_rules to "all".
2361 Check for a valid lr.default_rules value.
2362 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2363 is "accepting", then only mark the accepting state as
2364 consistent.
2365 (initialize_LA): Tell state_lookahead_tokens_count whether
2366 lr.default_rules is "accepting".
2367 * src/tables.c (action_row): If lr.default_rules is not "all",
2368 then disable default rules in inconsistent states.
2369 * src/print.c (print_reductions): Use this opportunity to
2370 perform some assertions about whether lr.default_rules was
2371 obeyed correctly.
2372 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2373 helps with checking the parser tables for a grammar.
2374 * tests/input.at (%define lr.default_rules invalid values): New
2375 test group.
2376 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2377 AT_TEST_TABLES_AND_PARSE.
2378 (`no %define lr.default_rules'): New test group generated by
2379 AT_TEST_LR_DEFAULT_RULES.
2380 (`%define lr.default_rules "all"'): Likewise.
2381 (`%define lr.default_rules "consistent"'): Likewise.
2382 (`%define lr.default_rules "accepting"'): Likewise.
2383
2384 2009-04-20 Akim Demaille <demaille@gostai.com>
2385
2386 Consistently refer to Yacc, not YACC.
2387 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2388
2389 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2390
2391 Pacify make maintainer-check-posix.
2392 * tests/input.at (%define, --define): Move bison command-line
2393 options before grammar file name.
2394
2395 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2396
2397 Document semicolon warnings.
2398 * NEWS (2.5): Here.
2399
2400 2008-12-08 Akim Demaille <demaille@gostai.com>
2401
2402 Fix portability issue in the test suite.
2403 * tests/local.at (AT_MATCHES_CHECK): New.
2404 Based on Perl instead of Sed. Sed has too many portability
2405 pitfalls, not ever Sed is GNU Sed.
2406 * tests/actions.at (Fix user actions without a trailing semicolon):
2407 Use it.
2408
2409 2008-12-07 Di-an Jan <dianj@freeshell.org>
2410
2411 Implement the FIXME that ends an user action with a semicolon
2412 if it seems necessary.
2413 * src/scan-code.l (flex rules section): Flag cpp directive from
2414 any `#' to the first unescaped end-of-line. Semicolon is not
2415 needed after `;', `{', '}', or cpp directives and is needed after
2416 any other token (whitespaces and comments have no effect).
2417 * tests/actions.at (Fix user actions without a trailing semicolon):
2418 New test.
2419 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2420 to make user actions complete statements.
2421 Adjust column numbers in error messages.
2422 * tests/regression.at (Fix user actions without a trailing semicolon):
2423 Remove. Covered by new test.
2424
2425 2009-04-14 Akim Demaille <demaille@gostai.com>
2426
2427 doc: minor fixes.
2428 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2429 (Table of Symbols): Remove duplicate entry for %debug.
2430
2431 2009-04-10 Eric Blake <ebb9@byu.net>
2432
2433 submodules: update to latest
2434 * submodules/autoconf: Use latest upstream Autoconf.
2435
2436 2009-04-06 Eric Blake <ebb9@byu.net>
2437
2438 Work around autoconf 2.63b bug in testsuite.
2439 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2440 autoconf bug related to # in test.
2441
2442 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2443
2444 * NEWS (2.5): Describe new -D/--define feature.
2445
2446 2008-11-10 Akim Demaille <demaille@gostai.com>
2447
2448 --trace=muscles
2449 * src/getargs.h, src/getargs.c (trace_muscle): New.
2450 (trace_types, trace_args): Support it.
2451 * src/output.c (output_skeleton): Use it.
2452
2453 2008-11-10 Akim Demaille <demaille@gostai.com>
2454
2455 muscles_output.
2456 * src/output.c (muscles_output): New, extracted from...
2457 (output_skeleton): here.
2458 Adjust.
2459
2460 2008-11-21 Akim Demaille <demaille@gostai.com>
2461
2462 Display the changes in cross-options.texi.
2463 * build-aux/cross-options.pl ($sep): New, to separate items.
2464 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
2465 the changes.
2466
2467 2008-11-20 Di-an Jan <dianj@freeshell.org>
2468
2469 Improves options in the manual.
2470 * doc/bison.texinfo (-g, -x): Add space before argument.
2471 (Option Cross Key): Implement FIXME: listing directives also.
2472 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2473 (Short Option): Special case -d. Put arguments inside @option.
2474 (Bison Directive): Add column, automatically extracted from
2475 src/scan-gram.l (actual name passed as the first argument)
2476 with special case for %define.
2477 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
2478 to build-aux/cross-options.pl.
2479 * src/getargs.c (usage): Document limitations of cross-options.pl.
2480 * src/scan-gram.l: Likewise.
2481
2482 2009-02-25 Akim Demaille <demaille@gostai.com>
2483
2484 Copyright years.
2485 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2486
2487 2008-12-08 Akim Demaille <demaille@gostai.com>
2488
2489 Install autoconf as a submodule to get m4sugar.
2490 * .gitmodules: Add submodules/autoconf.
2491 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2492 submodules/autoconf.
2493
2494 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2495
2496 Simplify last patch slightly.
2497 * src/getargs.c (getargs): Here.
2498
2499 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2500
2501 Fix last warning from --enable-gcc-warnings.
2502 * src/getargs.c (getargs): Don't assign const address to non-const
2503 pointer.
2504
2505 2008-11-17 Di-an Jan <dianj@freeshell.org>
2506
2507 Handle --enable-gcc-warnings.
2508 * src/getargs.c (command_line_location): Set parameters to void.
2509
2510 2008-11-11 Akim Demaille <demaille@gostai.com>
2511
2512 AT_FULL_COMPILE.
2513 * tests/actions.at, tests/regression.at: Use it.
2514
2515 2008-11-07 Akim Demaille <demaille@gostai.com>
2516
2517 Pass command line location to skeleton_arg and language_argmatch.
2518 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2519 The location argument is now mandatory.
2520 Adjust all dependencies.
2521 (getargs): Use command_line_location.
2522
2523 2008-11-07 Akim Demaille <demaille@gostai.com>
2524
2525 -D, --define.
2526 * src/getargs.c (usage): Document -D.
2527 Fix help string for --locations.
2528 (command_line_location): New.
2529 (short_options, long_options, getargs): Support -D, --define.
2530 (getargs): Move -d support at the right place.
2531 * doc/bison.texinfo (Bison Options): Update.
2532 * tests/input.at (%define, --define): New.
2533
2534 2008-11-07 Akim Demaille <demaille@gostai.com>
2535
2536 Initialize the muscle table before parsing the command line.
2537 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2538 (getargs): Define file_name.
2539 * src/main.c (main): Initialize muscle_tab before calling
2540 getargs.
2541 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2542 its value is not available yet.
2543
2544 2008-11-09 Akim Demaille <demaille@gostai.com>
2545
2546 Require the generation of parse-gram.output.
2547 * src/Makefile.am (YACC): Pass --report=all.
2548
2549 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2550
2551 * NEWS (2.5): New stub.
2552
2553 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2554
2555 Fix options documentation.
2556 * build-aux/cross-options.pl: As in --help output, write optional
2557 arguments as [=ARG] not =[ARG].
2558 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2559
2560 2008-11-07 Akim Demaille <demaille@gostai.com>
2561
2562 Fix --help.
2563 * src/getargs.c (usage): Fix help string for -W.
2564
2565 2008-11-07 Akim Demaille <demaille@gostai.com>
2566
2567 Handle more general types of option arguments.
2568 * build-aux/cross-options.pl: The argument ends at the first
2569 space, not the first non-symbol character.
2570 Use @var for each word appearing the argument description.
2571
2572 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2573
2574 Remove spurious initial empty lines.
2575 * data/location.cc: End the @output lines with an @.
2576
2577 2008-11-04 Akim Demaille <demaille@gostai.com>
2578
2579 Remove spurious initial empty lines.
2580 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2581 * data/yacc.c: End the @output lines with an @.
2582
2583 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2584
2585 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2586 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2587 requirements for a correct m4 are stricter.
2588 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
2589 * configure.ac: Update to use AC_PROG_GNU_M4.
2590 Reported by Eric Blake.
2591
2592 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2593
2594 Help with updating web manual.
2595 * HACKING: Incorporate instructions from gnulib/doc/README.
2596 * bootstrap.conf (gnulib_modules): Add gendocs.
2597
2598 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2599
2600 Fix strange %define locations for default values.
2601 Reported by Akim Demaille at
2602 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2603 and discussed again starting at
2604 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2605 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2606 because location information is bogus.
2607 Use angle brackets to delimit fake file name because square brackets
2608 look like underexpanded m4. Choose a better fake file name.
2609 Use negative line numbers.
2610 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2611 * src/location.c (location_print): If line for a boundary is negative,
2612 only print that boundary's file name.
2613 * src/location.h: Document that.
2614 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2615 defaults): Update output.
2616
2617 2008-11-07 Akim Demaille <demaille@gostai.com>
2618
2619 Locations without columns for command line arguments.
2620 * src/location.c (location_print): Don't display negative columns.
2621 * src/location.h: Document this.
2622
2623 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2624
2625 Add reminder about uploading public key to keys.gnupg.net.
2626 * HACKING (Release Procedure): Here.
2627
2628 2009-03-31 Akim Demaille <demaille@gostai.com>
2629
2630 bootstrap: --help to stdout.
2631 * bootstrap (usage): Don't send --help to stderr.
2632 Use a here doc instead of a long string.
2633
2634 2009-03-31 Akim Demaille <demaille@gostai.com>
2635
2636 bootstrap: README-hacking no longer exists
2637 * bootstrap (checkout_only_file): Set to HACKING.
2638
2639 2009-03-26 Akim Demaille <demaille@gostai.com>
2640
2641 doc: merge HACKING and README-hacking.
2642 Two files is confusing.
2643 Reported by Alexandre Duret-Lutz.
2644
2645 * README-hacking: Merge into...
2646 * HACKING (Working from the repository): here.
2647
2648 2009-03-26 Akim Demaille <demaille@gostai.com>
2649
2650 doc: update README-hacking.
2651 * README-hacking: We now use git and git submodules.
2652 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2653
2654 2009-03-26 Akim Demaille <demaille@gostai.com>
2655
2656 lalr1.cc: avoid GCC 4.3 warnings.
2657 GCC 4.3 now warns about "a || b && c" and asks for explicit
2658 parentheses.
2659 Reported by Alexandre Duret-Lutz.
2660 * data/location.cc: Update copyright years.
2661 (Position::operator==): Use parens to make precedence explicit.
2662 Compare lines and columns first, as they are more likely to be
2663 different, and they are faster to compare.
2664
2665 2009-03-26 Akim Demaille <demaille@gostai.com>
2666
2667 gnulib: update.
2668 * gnulib: Update to latest.
2669 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
2670 use +=.
2671
2672 2009-01-08 Akim Demaille <demaille@gostai.com>
2673
2674 Fix grep portability issues.
2675 Grep on Solaris does not support -q.
2676 Reported by Summum Bonum.
2677
2678 * NEWS: Add a stub for 2.4.2.
2679 * THANKS: Add Summum Bonum.
2680 * tests/atlocal.in (EGREP): New.
2681 (CC, CXX, XSLTPROC): Make it possible to override them via
2682 envvars.
2683 * tests/java.at: Use $EGREP instead of egrep.
2684 Use AT_CHECK's ignore instead of grep's -q.
2685
2686 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2687
2688 Version 2.4.1.
2689 * NEWS: Set version and date.
2690 * lib/Makefile.am: Update copyright year.
2691 * tests/atlocal.in: Update copyright year.
2692
2693 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2694
2695 Semicolon feature removal is not about future language support.
2696 * NEWS: The semicolon feature is no longer active for newer languages,
2697 so don't claim that it causes trouble for them.
2698
2699 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2700
2701 * gnulib: Update submodule to HEAD.
2702
2703 2008-12-09 Akim Demaille <demaille@gostai.com>
2704
2705 Update data/README.
2706 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2707
2708 2008-12-05 Eric Blake <ebb9@byu.net>
2709
2710 Build testsuite with newer autoconf.
2711 * tests/output.at (m4_expand): Don't override in newer autoconf,
2712 where the underlying implementation changed.
2713 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2714 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2715 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2716 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2717 since some of them contain unbalanced ')'.
2718
2719 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2720
2721 * NEWS: Clarify a little.
2722
2723 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2724
2725 * NEWS: Update for recent changes.
2726
2727 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2728
2729 Fix unexpanded macros in GLR defines file.
2730 Reported by Csaba Raduly at
2731 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2732 * THANKS (Csaba Raduly): Add.
2733 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2734 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2735 lexer in a separate module that includes the defines file.
2736 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
2737 source.
2738 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2739 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2740 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2741 (AT_DATA_SOURCE_PROLOGUE): New.
2742 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2743 (AT_DATA_SOURCE): New.
2744 (AT_FULL_COMPILE): New, copied from master branch and extended to
2745 support an additional source file.
2746
2747 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2748
2749 Don't let maintainer-*-check targets force a version update.
2750 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2751 handled.
2752
2753 2008-11-17 Di-an Jan <dianj@freeshell.org>
2754
2755 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2756 Align menus. Adjust word wrapping. Use node names for menu names.
2757 (Examples): Don't abbreviate node names.
2758 (LocalWords): Remove abbreviations.
2759 (Copying): Make description a sentence.
2760 (Java Action Features): Remove period to match the rest of menu.
2761
2762 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2763
2764 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2765 * configure.ac: Adjust usage.
2766 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2767 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2768 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2769
2770 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2771
2772 Don't add a semicolon to actions for %skeleton or %language.
2773 It breaks Java test cases as reported by Akim Demaille.
2774 * src/scan-code.l: Implement.
2775
2776 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2777
2778 Clean up %skeleton and %language priority implementation.
2779 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2780 remove static qualifier because others will soon need to see it.
2781 (language_prio): Likewise.
2782 (getargs): Use command_line_prio rather than 0.
2783 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2784 enum fields.
2785 (skeleton_prio): Extern it.
2786 (language_prio): Extern it.
2787 * src/parse-gram.y: Use grammar_prio rather than 1.
2788
2789 2008-11-04 Akim Demaille <demaille@gostai.com>
2790
2791 * NEWS: Mention the trailing semicolon in action.
2792
2793 2008-11-04 Akim Demaille <demaille@gostai.com>
2794
2795 Reformat NEWS.
2796 * NEWS: Use more outline-mode markup.
2797 Suggested by Jim Meyering.
2798
2799 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2800
2801 Fix user actions without a trailing semicolon.
2802 Reported by Sergei Steshenko at
2803 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2804 * THANKS (Sergei Steshenko): Add.
2805 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2806 * tests/regression.at (Fix user actions without a trailing semicolon):
2807 New test case.
2808
2809 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2810
2811 Initiate further development.
2812 * NEWS: Create an empty section for new entries.
2813 * gnulib: Update submodule to HEAD.
2814
2815 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2816
2817 * NEWS: Version 2.4.
2818
2819 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2820
2821 Prepare for next release.
2822 * NEWS: Briefly mention changes since 2.3b.
2823 * README: Say GNU m4 1.4.6, which we've been requiring in release
2824 announcements already, not 1.4.3, which breaks the build.
2825
2826 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2827
2828 Say %language is experimental.
2829 We're thinking of extending it's effect on output file naming. See the
2830 thread at
2831 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2832 * NEWS: Say it's experimental.
2833 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2834 recommend it over %skeleton for now.
2835 (Bison Options): Likewise.
2836 (C++ Bison Interface): Use %skeleton not %language.
2837 (Calc++ Parser): Use %skeleton not %language.
2838 * src/getargs.c (usage): Say it's experimental.
2839
2840 2008-11-01 Di-an Jan <dianj@freeshell.org>
2841 Paolo Bonzini <bonzini@gnu.org>
2842
2843 Support all Java parser class modifiers.
2844 * data/java.m4 (b4_percent_define_get3): New.
2845 (b4_final_if, b4_strictfp_if): New.
2846 * data/lalr1.java (final, strictfp, extends, implements): Support.
2847 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2848 documentation.
2849 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2850 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2851 (AT_CHECK_JAVA_GREP): New.
2852 (Java parser class modifiers): New test.
2853 (Java parser class extends and implements): New test.
2854
2855 Model exception propagation better with throws and lex_throws.
2856 * data/java.m4 (b4_list2): New.
2857 (throws): Change default.
2858 * data/lalr1.java (yyaction): Add throws.
2859 (parse): Add lex_throws in addition to throws.
2860 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2861 * tests/java.at (Java throws specifications): New test.
2862
2863 Improve documentation for Java parsers.
2864 * doc/bison.texinfo (Java Parsers): Add subsections.
2865 Don't quote first argument of %define.
2866 (Java Bison Interface): Document output files. Move documentation
2867 of parser class and merge into Java Parser Interface. Document
2868 features that error out. Document directives with no effect.
2869 Move note about Javadoc higher.
2870 (Java Semantic Values): Explicitly mention stype.
2871 Document that generic types cannot be used.
2872 (Java Location Values): Use @deftypeivar. Document constructors.
2873 Correct return value for toString.
2874 (Java Parser Interface): List undocumented constants/fields.
2875 Move documentation of fields added by %parse-param closer to list
2876 of members. Document that token names are added as fields.
2877 Document constructors accurately. Remove error method.
2878 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2879 Interface. Describe %code lexer and yylex accutately.
2880 Remove documentation that does not match the code.
2881 (Java Action Features): New.
2882 (Java Differences): Add reference. Add item on semantic values.
2883 Add note about @{ ... @}. Clarify %% epilogue placement.
2884 (Java Declarations Summary): New.
2885
2886 Fix Java skeleton.
2887 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2888 (b4_remove_comma): Quote test argument.
2889 (b4_identification): Remove "bison" field.
2890 * tests/java.at (Java parser class and package names): New test.
2891 (Java %parse-param and %lex-param): New test.
2892 (Java stype, position_class and location_class): New test.
2893
2894 2008-10-31 Di-an Jan <dianj@freeshell.org>
2895
2896 * data/lalr1.jave: Update copyright years.
2897 (YYParser): Correct name of "generated from" file in Javadoc:
2898 use b4_file_name instead of @ofile@.
2899 (Location constructor): Correct Javadoc parameter name.
2900 (yylloc): Add missing opening m4 quote after b4_location_if.
2901 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2902 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2903 (YYParser constructor): Correct Javadoc parameter name.
2904
2905 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2906
2907 Always put auxiliary code files in the same dir as other output files.
2908 * src/files.c (compute_file_name_parts): When the user specifies
2909 --output but not --file-prefix, extract the directory prefix from the
2910 file prefix not from the grammar file name. This affects the location
2911 of files like location.hh generated by the C++ skeleton. The includes
2912 in the other output files require this fix.
2913 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2914 for expected output files.
2915 (Output files): Add a test for the above.
2916
2917 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2918
2919 * gnulib: Update submodule to HEAD.
2920
2921 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2922
2923 Update copyright year.
2924 * src/files.c: Here.
2925
2926 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2927
2928 Don't overwrite the input file.
2929 * src/files.c (output_file_name_check): Fatal error if using input file
2930 for output.
2931 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2932 argument.
2933 (Conflicting output files): Add test.
2934
2935 2008-10-28 Akim Demaille <demaille@gostai.com>
2936
2937 Space changes.
2938 * data/lalr1.cc: Formatting changes.
2939
2940 2008-10-28 Akim Demaille <demaille@gostai.com>
2941
2942 Don't define debugging functions when !YYDEBUG.
2943 * data/lalr1.cc (debug_stream, set_debug_stream)
2944 (debug_level_type, debug_level, set_debug_level): Don't
2945 declare them when YYDEBUG is not defined.
2946 The implementation are already YYDEBUG-aware.
2947
2948 2008-10-28 Akim Demaille <demaille@gostai.com>
2949
2950 Prefer "continue" for empty loop bodies.
2951 * etc/bench.pl.in: Use "continue" instead of {}.
2952
2953 2008-10-28 Akim Demaille <demaille@gostai.com>
2954
2955 Space and comments changes.
2956 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2957 * data/c.m4, data/lalr1.cc: Space changes.
2958
2959 2008-10-28 Akim Demaille <demaille@gostai.com>
2960
2961 Make gnulib a submodule.
2962 * gnulib: New.
2963 * .gitmodules (gnulib): New.
2964
2965 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2966
2967 Fix yyerror_range for user-defined location type in C++. Reported by
2968 Georg Sauthoff at
2969 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2970 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2971 * THANKS (Georg Sauthoff): Add.
2972
2973 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2974
2975 Update several administrative files mainly to facilitate releasing.
2976 * HACKING (Administrivia): Make the git-merge-changelog notes more
2977 helpful.
2978 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2979 (Release Procedure): Update for git and add numerous details that were
2980 previously missing.
2981 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2982 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2983 that announcements don't claim we bootstrapped with whatever bison
2984 happened to be in PATH. Add flex as a bootstrap tool.
2985 * Makefile.maint: Remove, previously replaced by maint.mk.
2986 * Makefile.cfg: Remove, and migrate settings to...
2987 * cfg.mk: ... here for the sake of `make announcement'.
2988 * bootstrap.conf (gnulib_modules): Add announce-gen.
2989 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2990 Berry.
2991
2992 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2993
2994 Small but important bugfixes for the Java skeleton.
2995 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2996 (yy_symbol_print): Call toString on yyvaluep.
2997
2998 2008-08-29 Akim Demaille <demaille@gostai.com>
2999
3000 Clarify UPDATED use.
3001 * doc/bison.texinfo: It refers to the last edition of this file,
3002 not to the release date of Bison.
3003 Reported by Joel E. Denny.
3004
3005 2008-08-29 Akim Demaille <demaille@gostai.com>
3006
3007 * README: Update FAQ pointer.
3008 Reported by Joel E. Denny.
3009
3010 2008-08-27 Eric Blake <ebb9@byu.net>
3011
3012 Resync m4sugar from autoconf.
3013 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3014 (m4_init): Adjust to latest m4.git changes.
3015 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3016 effects.
3017 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3018 (_m4_list_cmp): Reduce side effects.
3019
3020 2008-08-27 Akim Demaille <demaille@gostai.com>
3021
3022 Check yyerrok in calc.at.
3023 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3024 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3025 expected.
3026
3027 2008-08-27 Akim Demaille <demaille@gostai.com>
3028
3029 Support yyerrok in lalr1.cc.
3030 YYBACKUP is still to import back into lalr1.cc.
3031 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3032
3033 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3034
3035 For maintainer-check*, don't recompile for a $(VERSION) update.
3036 * cfg.mk: New file.
3037 (_is-dist-target): Override the one in GNUmakefile.
3038 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3039
3040 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3041
3042 Update for recent change to gnulib.
3043 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3044 string.h now.
3045
3046 2008-08-15 Eric Blake <ebb9@byu.net>
3047
3048 Remaining m4sugar merge from autoconf.
3049 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3050 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3051 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3052 * src/output.c (output_skeleton): Tell m4 how to find it.
3053
3054 Partial m4sugar merge from autoconf: m4_map.
3055 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3056 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3057 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3058 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3059 for empty list.
3060 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3061 Likewise.
3062 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3063 declares it.
3064
3065 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3066
3067 Keep .version and PACKAGE_VERSION in sync.
3068 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3069 dependency, and add comments justifying this in more detail. Discussed
3070 starting at
3071 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3072
3073 2008-08-06 Eric Blake <ebb9@byu.net>
3074
3075 Partial m4sugar merge from autoconf: m4_shiftn.
3076 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3077 (m4_shift2, m4_shift3): New macros.
3078 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3079 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3080 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3081 * data/java.m4 (b4_remove_comma): Likewise.
3082
3083 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3084 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3085 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3086 (m4_init): Consolidate wrapped text into single m4_wrap.
3087 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3088 in wrapped text.
3089
3090 2008-08-05 Eric Blake <ebb9@byu.net>
3091
3092 Partial m4sugar merge from autoconf: builtins, version.m4.
3093 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3094 (m4_prepend): Remove, as it is unused and inherently quadratic,
3095 whereas m4_append is linear in newer m4.
3096 (m4_mkstemp): New builtin.
3097 (m4_symbols): Make rename conditional.
3098 (m4_version_prereq): Ensure fatal error if used in bison, which
3099 intentionally lacks version.m4.
3100
3101 Fix comments in m4sugar.
3102 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3103
3104 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3105
3106 Update for recent .gitignore fix in Gnulib.
3107 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3108 anchored .gitignore entries.
3109
3110 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3111
3112 Set gnu or gnits strictness.
3113 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3114 development and gnits strictness for releases. Based on Eric Blake's
3115 suggestion at
3116 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3117
3118 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3119
3120 * NEWS: Clarify documentation of %language.
3121
3122 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3123
3124 Support usage of git-merge-changelog.
3125 * .gitattributes: New.
3126 * HACKING: Document usage of git-merge-changelog.
3127 * bootstrap: Install git-merge-changelog entries in .git/config
3128 if appropriate.
3129
3130 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3131
3132 Remove remaining dependence on CVS Id keyword.
3133 * ChangeLog: For the sake of people still using CVS, don't use dollars
3134 when mentioning Id.
3135 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3136 unusual anyway.
3137 * data/xslt/xml2dot.xsl: Likewise.
3138 * data/xslt/xml2text.xsl: Likewise.
3139 * data/xslt/xml2xhtml.xsl: Likewise.
3140 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3141 * doc/Makefile.am (neutralize): Remove, no longer needed.
3142 (.x.1): Don't use neutralize.
3143 (edit): Don't substitute for ID.
3144 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3145
3146 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3147
3148 Fix dependence on computed configure variables.
3149 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3150 $(top_srcdir)/configure.ac so that changes to computed variables, such
3151 as PACKAGE_VERSION, are seen.
3152 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3153
3154 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3155
3156 Update copyright dates for recent changes.
3157 * Makefile.am: Here.
3158 * src/Makefile.am: Here.
3159 * src/reduce.c: Here.
3160 * tests/reduce.at: Here.
3161
3162 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3163
3164 Use git-version-gen for version names between releases.
3165 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3166 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3167 * .prev-version: New.
3168 * .version.in: Remove.
3169 * ChangeLog: Remove the Id previously used for capturing the CVS
3170 revision.
3171 * GNUmakefile: Remove, now copied from Gnulib.
3172 * Makefile.am: Add code suggested by comments in
3173 build-aux/git-version-gen.
3174 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3175 .prev-version, and .version.
3176 * NEWS (2.3b+): Rename to...
3177 (?.?): ... this because we're dropping the "+" version naming scheme,
3178 but, in general, we still can't be sure of our next release name.
3179 * bootstrap: Add a quick hack to remove from .gitignore the
3180 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3181 entry. This should really be fixed in gnulib instead.
3182 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3183 * configure.ac (AC_INIT): Set version name by invoking
3184 build-aux/git-version-gen.
3185 (AC_CONFIG_FILES): Remove .version, now generated by
3186 build-aux/git-version-gen.
3187 * maint.mk: New, copied from coreutils.
3188 * doc/.cvsignore (bison.1): Add.
3189 * doc/.gitignore (/bison.1): Add.
3190 * doc/bison.1: Remove, generated.
3191 * src/.cvsignore (revision.c): Remove.
3192 * src/.gitignore (/revision.c): Remove.
3193 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3194 (BUILT_SOURCES): Remove revision.c.
3195 (revision.c): Remove.
3196 * src/getargs.c (version): Don't print revision after the VERSION.
3197 * src/revision.h: Remove.
3198
3199 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3200
3201 Fix untranslatable composition of sentences. Reported by Goran
3202 Uddeborg at
3203 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3204 * THANKS (Goran Uddeborg): Add.
3205 * src/reduce.c (reduce_print): Report the number of nonterminals and
3206 rules useless in the grammar in separate sentences.
3207 * tests/reduce.at (Useless Rules): Update output.
3208 (Reduced Automaton): Likewise.
3209 (Underivable Rules): Likewise.
3210 (Empty Language): Likewise.
3211
3212 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3213
3214 Fix some .gitignore and .cvsignore problems.
3215 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3216 (insert_vc_ignore): ... this new function, which prepends `/' to all
3217 .gitignore entries before passing them to insert_sorted_if_absent.
3218 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3219 .cvsignore files are maintained even though Bison developers run
3220 bootstrap while using Git.
3221 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3222 unneeded by Bison.
3223 (gnulib): Add.
3224 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3225 unneeded. Reported by Eric Blake.
3226 * lib/.gitignore (/*~): Add.
3227 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3228 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3229 Blake.
3230 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3231
3232 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3233
3234 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3235 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3236 * bootstrap.conf (gnulib_modules): Add unsetenv.
3237 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3238 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3239 (/setenv.m4): Add.
3240 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3241 the first argument because it may become position-dependent, and unset
3242 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3243 Add comments explaining these issues in more detail.
3244
3245 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3246
3247 Add .gitignore everywhere based on .cvsignore.
3248 * .gitignore: New.
3249 * build-aux/.gitignore: New.
3250 * data/.gitignore: New.
3251 * doc/.gitignore: New.
3252 * etc/.gitignore: New.
3253 * examples/.gitignore: New.
3254 * examples/calc++/.gitignore: New.
3255 * lib/.gitignore: New.
3256 * m4/.gitignore: New.
3257 * po/.gitignore: New.
3258 * runtime-po/.gitignore: New.
3259 * src/.gitignore: New.
3260 * tests/.gitignore: New.
3261
3262 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3263
3264 * NEWS (2.3b+): New section, empty for now.
3265 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3266
3267 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3268
3269 * NEWS (2.3b): Update release date since there has been a delay in
3270 getting the announcements and tarballs out.
3271
3272 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3273
3274 * NEWS: Version 2.3b.
3275 * configure.ac (AC_INIT): Likewise.
3276 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3277
3278 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3279
3280 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3281 been doing it for years.
3282 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3283 (Release Procedure): Add FIXME about make alpha being unmaintained.
3284
3285 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3286
3287 * data/yacc.c: Reformat m4 a little for readability.
3288 * src/lalr.c (build_relations): Correct comment.
3289
3290 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3291
3292 DJGPP specific issue.
3293 * djgpp/config.sed: Fixes required to run configure scripts generated
3294 by autoconf 2.62.
3295
3296 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3297
3298 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3299 coordinator@translationproject.org.
3300
3301 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3302
3303 * THANKS: Add Eric Blake.
3304
3305 2008-04-23 Eric Blake <ebb9@byu.net>
3306
3307 Revert prior patch, by working around autoconf regression.
3308 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3309 ("Output file name: ("): Uncomment test.
3310 ("Output file name: )"): Likewise.
3311 Based on an idea from Noah Misch.
3312
3313 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3314
3315 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3316 2.61. Reported by Juan Manuel Guerrero at
3317 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3318 * tests/output.at ("Output file name: ("): Comment out test case for
3319 now.
3320 ("Output file name: )"): Likewise.
3321
3322 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3323
3324 * GNUmakefile: Update git-version-gen invocation so make dist
3325 succeeds.
3326
3327 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3328
3329 Update to the current gnulib CVS repository, and fix trigraph handling
3330 in Bison.
3331 * bootstrap: Update gnulib CVS repository URL.
3332 (symlink_to_dir): Encapsulate the code that guarantees the destination
3333 directory exists into...
3334 (check_dst_dir): ... this new function, and...
3335 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3336 fail when copying files into lib/uniwidth/.
3337 * src/output.c (prepare_symbols): When writing yytname muscles, where
3338 symbol names will be encoded in C-string literals, tell quotearg to
3339 escape trigraphs. This used to be the default in gnulib.
3340 * tests/regression.at (Token definitions): Because of the change in
3341 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3342 escapes trigraphs in symbol names. Thus, yytname no longer has
3343 trigraphs unnecessarily doubly escaped. Update test case output.
3344 Extend test case to be sure Bison's own error messages will no longer
3345 have trigraphs in symbol names unnecessarily escaped once.
3346
3347 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3348
3349 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3350 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3351 * .cvsignore: Add .version.
3352 * .version.in: New.
3353 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3354 * configure.ac (AC_CONFIG_FILES): Add .version.
3355 * build-aux/.cvsignore: Add git-version-gen.
3356
3357 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3358
3359 * NEWS (2.3a+): Mention that -g now takes an argument.
3360 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3361 consistency. Update the -g and -x entries now that they take
3362 arguments. Use brackets to indicate optional arguments.
3363 * src/getargs.c (usage): Explain the relationship between arguments of
3364 long and short options more completely. Document --defines and -d
3365 separately since the former takes an argument but, for POSIX Yacc, the
3366 latter does not.
3367 (short_options): Let -W take an optional argument like --warnings.
3368 (getargs): Sort cases.
3369
3370 2008-02-28 Akim Demaille <demaille@gostai.com>
3371
3372 * doc/bison.texinfo: Fix a few typos.
3373
3374 2008-02-28 Akim Demaille <akim@epita.fr>
3375
3376 * doc/bison.texinfo (Bison Options): Document -W.
3377 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3378
3379 2008-02-28 Akim Demaille <akim@epita.fr>
3380
3381 * src/getargs.c (short_options): Split and sort for readability.
3382 -g and -x take optional arguments, just like their long options.
3383 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3384 understand.
3385 Fix the handling of $opt which resulted in all the argument to be
3386 considered as optional.
3387
3388 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3389
3390 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3391 say its interface is experimental.
3392 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3393 Java.
3394 (Bison Options): In the -L and --language entry, mention Java.
3395 (Java Bison Interface): Say the interface is experimental.
3396 * src/getargs.c (usage): Mention -L and --language.
3397
3398 * NEWS (2.3a+): Say the push parsing interface is experimental.
3399 * doc/bison.texinfo (Push Decl): Likewise.
3400 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3401 (Push Parser Function): Likewise.
3402 (Pull Parser Function): Likewise.
3403 (Parser Create Function): Likewise.
3404 (Parser Delete Function): Likewise.
3405 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3406 yypull_parse, and yypush_parse entries.
3407
3408 * NEWS (2.3a+): Mention XML support, and say the schema is
3409 experimental.
3410 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3411 * src/getargs.c (usage): Say the XML schema is experimental.
3412
3413 * NEWS (2.3a+): Say option instead of flag.
3414
3415 2008-02-21 Wojciech Polak <polak@gnu.org>
3416
3417 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3418 text.
3419
3420 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3421
3422 Fix impure push parser compile error reported by Bob Rossi at
3423 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3424 * data/yacc.c: Clean up whitespace in the output a little.
3425 (yypstate_allocated): Define for impure push parsers regardless of
3426 whether the pull interface is also requested.
3427 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3428 check impure push parsers without the pull interface.
3429
3430 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3431 yyerror takes arguments specified by %parse-param while yypstate_new
3432 does not.
3433 * doc/bison.texinfo (Parser Create Function): Document that
3434 yypstate_new returns 0 for multiple impure parser instances.
3435 * tests/push.at (Push Parsing: Multiple impure instances): Update
3436 expected stderr output.
3437
3438 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3439
3440 * runtime-po/POTFILES.in (push.c): Remove.
3441
3442 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3443
3444 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3445 * data/push.c: Rename to...
3446 * data/yacc.c: ... this, overwriting it.
3447 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3448 `%push-pull-parser' -> `%define api.push_pull "both"'.
3449 Remove old yacc.c tests, and update push.c tests to yacc.c.
3450
3451 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3452
3453 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3454 `"%code top" blocks' instead of `%code "top" blocks'.
3455 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3456 Clean up whitespace in the output a little.
3457
3458 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3459
3460 Fix documentation problems reported by Tim Josling at
3461 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3462 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3463 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3464 integers. Explain the effect of literal string aliases on error
3465 messages. Copy token 0 documentation from the C++ skeleton
3466 documentation.
3467
3468 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3469
3470 Accept a token number in a %left, %right, or %nonassoc for POSIX
3471 conformance. Reported by Tim Josling at
3472 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3473 * NEWS (2.3a+): Mention.
3474 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3475 and code numbers are treated by precedence declarations.
3476 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3477 of symbols.1.
3478 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3479 of symbol.
3480 (symbol.prec): New, just like symbol but allows INT.
3481 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3482 longer holds.
3483 * tests/regression.at (Token number in precedence declaration): New
3484 test case.
3485
3486 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3487
3488 DJGPP specific issues.
3489 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3490 be changed. Copyright timestamp adjusted.
3491 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3492 be changed. Copyright timestamp adjusted.
3493 * djgpp/config.site: Copyright timestamp adjusted.
3494 * djgpp/config_h.sed: Copyright timestamp adjusted.
3495 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3496 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3497 filename translation list.
3498 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3499 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3500 files shall be created. Before trying to use the temp dir where the
3501 environment variable points to check that the dir really exists. If
3502 not default to the cwd as temp dir. Copyright timestamp adjusted.
3503 * djgpp/subpipe.h: Copyright timestamp adjusted.
3504 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3505
3506 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3507
3508 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3509
3510 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3511
3512 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3513 Problem reported by Claudio Saavedra in
3514 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3515
3516 2008-01-05 Wojciech Polak <polak@gnu.org>
3517
3518 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3519 document's title with the input grammar file name.
3520
3521 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3522
3523 Automate regression testing of the XML/XSLT implementation. Discussed
3524 starting at
3525 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3526 * configure.ac (XSLTPROC): New substitution.
3527 * Makefile.am (maintainer-xml-check): New phony target invoking...
3528 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3529 invoking make maintainer-check with BISON_TEST_XML=1.
3530 * tests/atlocal.in (XSLTPROC): New.
3531 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3532 not to report reachable memory when Bison is expected to have a
3533 non-zero exit status and (2) to compare XML/XSLT output with --graph
3534 and --report=all output for every working grammar when
3535 BISON_TEST_XML=1.
3536 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3537 (AT_BISON_CHECK_XML): New.
3538 (AT_QUELL_VALGRIND): New.
3539 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3540 (AT_CHECK): ... don't redefine this since this was the old way to
3541 quell Valgrind.
3542 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3543 AT_BISON_CHECK invocations.
3544 * tests/c++.at: Likewise.
3545 * tests/calc.at: Likewise.
3546 * tests/conflicts.at: Likewise.
3547 * tests/cxx-type.at: Likewise.
3548 * tests/existing.at: Likewise.
3549 * tests/glr-regression.at: Likewise.
3550 * tests/headers.at: Likewise.
3551 * tests/input.at: Likewise.
3552 * tests/java.at: Likewise.
3553 * tests/output.at: Likewise.
3554 * tests/push.at: Likewise.
3555 * tests/reduce.at: Likewise.
3556 * tests/regression.at: Likewise.
3557 * tests/sets.at: Likewise.
3558 * tests/skeletons.at: Likewise.
3559 * tests/synclines.at: Likewise.
3560 * tests/torture.at: Likewise.
3561 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3562 tends to hang xsltproc.
3563 (Big horizontal): Likewise.
3564
3565 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3566
3567 In XML output, remove redundant class attribute on symbol element.
3568 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3569 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3570 look up a symbol to determine whether it's a nonterminal or terminal.
3571 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3572 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3573
3574 Add prec/assoc information to XML output.
3575 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3576 %prec, add a percent_prec attribute.
3577 * src/print-xml.c (print_grammar): For each terminal that has a
3578 precedence or associativity, add a prec or assoc attribute.
3579 (xml_indent): New.
3580 (xml_puts): Use xml_indent.
3581 (xml_printf): Use xml_indent.
3582 * src/print-xml.h (xml_indent): Prototype.
3583
3584 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3585 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3586
3587 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3588
3589 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3590 (bison:ruleByNumber): ... this for clarity.
3591 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3592 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3593 (xsl:template match="reduction"): Update.
3594 (xsl:template match="item"): Update.
3595 (xsl:template match="reduction"): Update.
3596
3597 In the XML output, don't print the list of rules where symbols appear.
3598 Compute it in XSLT instead. Discussed at
3599 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3600 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3601 (bison:ruleByRhs): New.
3602 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3603 bison:ruleByRhs.
3604 (xsl:template match="terminal/rule"): Remove.
3605 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3606 bison:ruleByRhs.
3607 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3608 Remove.
3609 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3610 bison:ruleByRhs and mode="number-link" for rule template.
3611 (xsl:template match="terminal/rule"): Remove.
3612 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3613 bison:ruleByRhs and mode="number-link" for rule template.
3614 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3615 Rewrite as...
3616 (xsl:template match="rule" mode="number-link"): ... this.
3617 * src/print-xml.c (print_grammar): Don't print the list of rules.
3618
3619 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3620
3621 Don't let --report affect XML output; always print all information.
3622 Discussed at
3623 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3624 * src/conflicts.c (log_resolution): Implement.
3625 * src/print-xml.c (print_core): Implement.
3626 (print_state): Implement.
3627 (print_xml): Implement.
3628
3629 * NEWS (2.3a+): Fix quotes.
3630 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3631 don't let %verbose clear the list specified by --report.
3632
3633 2007-11-26 Akim Demaille <akim@epita.fr>
3634
3635 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3636
3637 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3638
3639 In the XML output, list useless and unused symbols and rules with the
3640 useful ones and add a "usefulness" attribute. Discussed starting at
3641 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3642 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3643 (grammar_rules_print_xml): Print all rules instead of just those
3644 useful in the grammar, and add a "usefulness" attribute.
3645 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3646 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3647 (print_grammar): Print all nonterminals instead of just useful ones,
3648 and add a "usefulness" attribute to nonterminals and terminals.
3649 (print_xml): Don't print a separate "reductions" or
3650 "rules-useless-in-parser" element.
3651 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3652 (reduce_xml): Remove.
3653 (reduce_token_unused_in_grammar): New.
3654 (reduce_nonterminal_useless_in_grammar): New.
3655 * src/reduce.h (reduce_xml): Remove prototype.
3656 (reduce_token_unused_in_grammar): Add prototype.
3657 (reduce_nonterminal_useless_in_grammar): Add prototype.
3658 * data/xslt/xml2text.xsl: Update for XML changes.
3659 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3660 * tests/reduce.at (Useless Terminals): Update output.
3661 (Useless Rules): Update output.
3662 (Reduced Automaton): Update output.
3663
3664 Say "Terminals unused in grammar" instead of "Unused terminals".
3665 * NEWS (2.3a+): Update.
3666 * doc/bison.texinfo (Understanding): Update example output.
3667 * src/reduce.c (reduce_output): Implement.
3668 * data/xslt/xml2text.xsl: Implement.
3669 * data/xslt/xml2xhtml.xsl: Implement.
3670
3671 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3672
3673 Accept --report-file=FILE to override the default `.output' filename.
3674 * NEWS (2.3a+): Mention.
3675 * doc/bison.texinfo (Bison Options): Add an entry.
3676 * src/files.c (compute_output_file_names): Don't override
3677 spec_verbose_file if already set.
3678 * src/getargs.c (usage): Document --report-file.
3679 (REPORT_FILE_OPTION): New anonymous enum member.
3680 (long_options): Add entry for it.
3681 (getargs): Add case for it setting spec_verbose_file.
3682
3683 * build-aux/cross-options.pl: Don't record a short option just because
3684 there's an arg.
3685 * doc/.cvsignore: Add yacc.1.
3686
3687 2007-11-14 Akim Demaille <akim@epita.fr>
3688
3689 * doc/yacc.1.in: New.
3690 * configure.ac, doc/Makefile.am: Adjust.
3691 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3692 config.h symbol.
3693 Use AC_SUBST for assignments too.
3694 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3695
3696 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3697
3698 * src/gram.c: Remove comments that duplicate comments in gram.h.
3699
3700 When reporting useless rules and nonterminals, say "useless in grammar"
3701 instead of "useless", and say "useless in parser" instead of "never
3702 reduced". Discussed starting at
3703 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3704 * NEWS (2.3a+): Mention this change.
3705 * data/xslt/xml2text.xsl: Update output text and expected input XML
3706 element names to match changes below.
3707 * data/xslt/xml2xhtml.xsl: Likewise.
3708 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3709 Contents: "Rules useless in parser due to conflicts".
3710 * doc/bison.texinfo (Decl Summary): Reword a little.
3711 (Understanding): Update example output for changes below.
3712 * src/gram.c: (rule_useful_p): Rename to...
3713 (rule_useful_in_grammar_p): ... this.
3714 (rule_useless_p): Rename to...
3715 (rule_useless_in_grammar_p): ... this.
3716 (rule_never_reduced_p): Rename to...
3717 (rule_useless_in_parser_p): ... this.
3718 (grammar_rules_print): Update for renames.
3719 (grammar_rules_print_xml): Update for renames.
3720 (grammar_rules_never_reduced_report): Rename to...
3721 (grammar_rules_useless_report): ... this since it is used for either
3722 kind of useless rule.
3723 * src/gram.h: Reword comments and update function names in prototypes.
3724 * src/main.c (main): Say "rule useless in parser due to conflicts".
3725 * src/print-xml.c (print_rules_never_reduced): Rename to...
3726 (print_rules_useless_in_parser): ... this, and rename output XML
3727 element "rules-never-reduced" to "rules-useless-in-parser".
3728 (print_xml): Update for rename.
3729 * src/print.c (print_results): Say "Rules useless in parser due to
3730 conflicts".
3731 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3732 (nonterminals_reduce): Say "nonterminal useless in grammar".
3733 (reduce_output): Say "Nonterminals useless in grammar".
3734 Say "Rules useless in grammar".
3735 (reduce_xml): Rename output XML element "useless" to
3736 "useless-in-grammar".
3737 (reduce_print): Don't report the count of grammatically useless rules
3738 as "rules never reduced" just because %yacc is specified.
3739 In the correct report of this count, say nonterminal(s) and rule(s)
3740 "useless in grammar".
3741 * tests/conflicts.at (S/R in initial): Update expected output.
3742 (Defaulted Conflicted Reduction): Likewise.
3743 (Unreachable States After Conflict Resolution): Likewise.
3744 * tests/existing.at (GNU pic Grammar): Likewise.
3745 * tests/reduce.at (Useless Nonterminals): Likewise.
3746 (Useless Rules): Likewise.
3747 (Reduced Automaton): Likewise.
3748 (Underivable Rules): Likewise.
3749 (Empty Language): Likewise.
3750
3751 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3752
3753 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3754 here document and before the EOF so that BSD's implementation of Bourne
3755 shell doesn't parse the delimiter as part of the here document.
3756 * doc/.cvsignore: Add cross-options.texi.
3757 * src/getargs.c (usage): Add a blank line after the warning categories.
3758
3759 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
3760
3761 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3762
3763 2007-11-05 Akim Demaille <akim@epita.fr>
3764
3765 Remove Id: from bison.1.
3766 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3767 (perl -0777 -pi -e 's/\.PP\nId): New.
3768 (.x.1): Use it to ignore the version control revision.
3769
3770 2007-11-05 Akim Demaille <demaille@gostai.com>
3771
3772 * build-aux/Makefile.am: Ship cross-options.pl.
3773 * doc/Makefile.am: Always refer to cross-options.texi with
3774 $(srcdir).
3775 (MAINTAINERCLEANFILES): Add it.
3776
3777 2007-11-04 Akim Demaille <demaille@gostai.com>
3778
3779 Generate the long/short option cross-table.
3780 * build-aux/cross-options.pl: New.
3781 * doc/Makefile.am (cross-options.texi): New.
3782 * doc/bison.texinfo: Use it.
3783
3784 2007-11-04 Akim Demaille <demaille@gostai.com>
3785
3786 Generate bison.1 using help2man.
3787 * doc/common.x, doc/bison.x: New.
3788 * doc/Makefile.am (bison.1, .x.1): New.
3789 The code is taken from autoconf-2.61/man/Makefile.am.
3790 * configure.ac: Look for help2man.
3791
3792 2007-11-04 Akim Demaille <demaille@gostai.com>
3793
3794 Complete --help.
3795 * src/getargs.c (usage): Document -W, make it clear that -d,
3796 -g and -x have optional arguments.
3797
3798 2007-11-04 Akim Demaille <demaille@gostai.com>
3799
3800 Find sha1sum when named gsha1sum.
3801 * bootstrap (find_tool): New.
3802 ($SHA1SUM): New.
3803
3804 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3805
3806 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3807 at
3808 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3809 * NEWS (2.3a+): Mention.
3810 * data/bison.m4 (b4_pure_if): Don't define it here.
3811 * data/c.m4 (b4_identification): Depend on individual skeletons to
3812 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3813 values of the %define variables api.pure or api.push_pull. Define
3814 YYPURE, YYPUSH, and YYPULL accordingly.
3815 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3816 glr.cc has already defined b4_pure_flag.
3817 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3818 Remove YYPUSH and YYPULL since they're back in b4_identification again.
3819 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
3820 * doc/bison.texinfo (Pure Decl): Update.
3821 (Push Decl): Update.
3822 (Decl Summary): Add api.pure to %define entry.
3823 In %pure-parser entry, say it's deprecated and reference %define.
3824 (Pure Calling): Update.
3825 (Error Reporting): Update.
3826 (C++ Scanner Interface): Update.
3827 (How Can I Reset the Parser): Update.
3828 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3829 reference %define.
3830 * src/getargs.c (pure_parser): Remove global variable.
3831 * src/getargs.h (pure_parser): Remove extern.
3832 * src/output.c (prepare): Don't define pure_flag muscle.
3833 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3834 wrapper around `%define api.pure'.
3835 * tests/calc.at (Simple LALR Calculator): Update.
3836 (Simple GLR Calculator): Update.
3837 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3838 Update.
3839 (GLR: Resolve ambiguity, pure, locations): Update.
3840 (GLR: Merge conflicting parses, pure, no locations): Update.
3841 (GLR: Merge conflicting parses, pure, locations): Update.
3842 * tests/glr-regression.at (Uninitialized location when reporting
3843 ambiguity): Update
3844 * tests/input.at (Unused %define api.pure): New test case.
3845 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3846 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3847 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3848
3849 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3850
3851 %define push_pull -> %define api.push_pull. Discussed starting at
3852 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3853 * data/push.c: Expect the new name.
3854 * data/yacc.c: Likewise.
3855 * doc/bison.texinfo (Push Decl): Update.
3856 (Decl Summary): Update %define entry.
3857 (Push Parser Function): Update.
3858 (Pull Parser Function): Update.
3859 (Parser Create Function): Update.
3860 (Parser Delete Function): Update.
3861 * tests/calc.at (Simple LALR Calculator): Update.
3862 * tests/input.at (%define enum variables): Update.
3863 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3864 (Push Parsing: Multiple impure instances): Update.
3865 (Push Parsing: Unsupported Skeletons): Update.
3866 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3867 (Exploding the Stack Size with Malloc): Update.
3868
3869 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3870 other entries some.
3871
3872 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3873
3874 For the XML output's terminal element, rename @number to @token-number,
3875 and add @symbol-number. In the nonterminal element, rename @number to
3876 @symbol-number. Discussed starting at
3877 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3878 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3879 renames.
3880 (xsl:template match="nonterminal"): Likewise.
3881 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3882 (xsl:template match="nonterminal"): Likewise.
3883 * src/print-xml.c (print_grammar): Implement.
3884
3885 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3886
3887 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3888 2007-10-11 change, the child elements here are items not rules.
3889 (xsl:template match="item"): New.
3890 (xsl:template match="rule"): Update for new reduced itemset.
3891 (xsl:template match="point"): Remove.
3892 (xsl:template match="empty"): For consistency with --graph, don't
3893 output "/* empty */".
3894 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3895 line-wrap, don't pass a negative value as first-line-length since this
3896 won't work with the following changes.
3897 (xsl:template name="line-wrap"): Simplify slightly.
3898 (xsl:template name="ws-search"): Eliminate recursion.
3899 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3900 set next to an item whose dot is not at the end of the RHS even if it
3901 happens to be associated with the same rule.
3902
3903 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3904
3905 Add %define lr.keep_unreachable_states.
3906 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3907 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3908 * src/main.c (main): Implement it.
3909 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3910 Extend to test it, and fix a typo.
3911
3912 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3913
3914 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
3915 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3916 the example .output text.
3917 * tests/regression.at (Extra lookahead sets in report): Improve wording
3918 of comments.
3919
3920 2007-10-17 Wojciech Polak <polak@gnu.org>
3921
3922 * src/print-xml.c (print_grammar): Renamed
3923 <terminal> and <nonterminal> attributes:
3924 "type" to "number" and "symbol" to "name".
3925 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3926 Use new attribute names.
3927 (xsl:template match="nonterminal"): Likewise.
3928 * data/xslt/xml2xhtml.xsl: Likewise.
3929
3930 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3931
3932 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3933 (Option Cross Key): Likewise.
3934
3935 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3936 next to an item whose dot is not at the end of the RHS even if it
3937 happens to be associated with the same rule.
3938 * src/print.c (print_core): Likewise.
3939 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3940 (Resolved SR Conflicts): Update output.
3941 * tests/regression.at (Extra lookahead sets in report): New test case.
3942
3943 2007-10-11 Wojciech Polak <polak@gnu.org>
3944
3945 * src/print-xml.c (print_core): Remove item set
3946 redundancy.
3947 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3948 Improve processing time. Suggested by Joel E. Denny.
3949 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3950 Write xsl:param "required" attribute as comment.
3951 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3952 (xsl:template match="rule"): Support new reduced itemset.
3953 (xsl:template match="point"): Remove.
3954 * data/xslt/xml2xhtml.xsl: Likewise.
3955
3956 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3957
3958 * src/getargs.c (version): Update copyright year.
3959
3960 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3961
3962 Make xml2dot.xsl and --graph produce the same output.
3963 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
3964 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3965 escaped later.
3966 (xsl:template name="output-node"): Use the new escape template instead
3967 of the string-replace template directly.
3968 (xsl:template name="output-edge"): Likewise.
3969 (xsl:template name="escape"): New, escapes backslashes and newlines in
3970 addition to quotation marks.
3971 * src/graphviz.c (start_graph, output_node, output_edge): Add
3972 whitespace to output for legibility.
3973
3974 Make xml2text.xsl and --report produce the same output, and remove the
3975 XML "conflicts" element since a conflict summary is easily extracted
3976 from the automaton.
3977 * data/xslt/bison.xsl: New.
3978 (xsl:template match="state" mode="bison:count-conflicts): New.
3979 * data/xslt/xml2text.xsl: Import bison.xsl.
3980 (xsl:template match="bison-xml-report"): Instead of styling the
3981 "conflicts" element, style the "automaton" element with mode
3982 "conflicts". Unlike the former, the latter lists S/R and R/R
3983 conflicts for a state on the same line.
3984 (xsl:template match="conflicts"): Remove.
3985 (xsl:template match="conflict"): Remove.
3986 (xsl:template match="terminal"): Line-wrap the list of rules in which
3987 the terminal is used.
3988 (xsl:template match="nonterminal"): Likewise for nonterminals.
3989 (xsl:template match="automaton" mode="conflicts"): New.
3990 (xsl:template match="state" mode="conflicts"): New.
3991 (xsl:template name="line-wrap"): New.
3992 (xsl:template name="ws-search"): New.
3993 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3994 (xsl:template match="bison-xml-report"): Instead of styling the
3995 "conflicts" element, style the "automaton" element with mode
3996 "conflicts."
3997 (xsl:template match="conflicts"): Remove.
3998 (xsl:template match="conflict"): Remove.
3999 (xsl:template match="automaton" mode="conflicts"): New.
4000 (xsl:template match="state" mode="conflicts): New.
4001 * src/conflicts.c (conflicts_output_xml): Remove.
4002 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4003 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4004 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4005 the corresponding XSLT is easier. Also, never wrap between a word and
4006 the comma that follows it.
4007
4008 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4009
4010 Improve C++ namespace support. Discussed starting at
4011 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4012 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4013 b4_namespace_close): New macros that interpret the %define variable
4014 "namespace" so its value can contain "::" to indicate nested
4015 namespaces.
4016 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4017 the above macros.
4018 * data/lalr1.cc (b4_namespace): Likewise.
4019 * data/location.cc (b4_namespace): Likewise.
4020 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4021 inside a new table in the general %define entry. Document `%define
4022 namespace' there as well. Point the %name-prefix entry to it since it
4023 explains it more completely in the case of C++.
4024 (C++ Bison Interface): Mention `%define namespace' instead of
4025 %name-prefix.
4026 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4027 entry suffices.
4028 * tests/c++.at (Relative namespace references): New test case.
4029 (Absolute namespace references): New test case.
4030 (Syntactically invalid namespace references): New test case.
4031 * tests/input.at (C++ namespace reference errors): New test case.
4032
4033 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4034
4035 Add syncline support and location accessor to internal %define
4036 interfaces.
4037 * data/bison.m4 (b4_percent_define_get_loc): New.
4038 (b4_percent_define_get_syncline): New.
4039 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4040 (b4_percent_define_default): Record defining location as line 1 rather
4041 than 0 for the sake of synchronizing #line's, and define
4042 b4_percent_define_syncline(VARIABLE).
4043 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4044 * src/muscle_tab.c (muscle_syncline_grow): New.
4045 (muscle_code_grow): Use muscle_syncline_grow.
4046 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4047 define b4_percent_define_syncline(VARIABLE).
4048 (muscle_percent_define_get_loc): New.
4049 (muscle_percent_define_get_syncline): New.
4050 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4051 remove some unused variables.
4052 (muscle_percent_define_default): Record defining location as line 1
4053 rather than 0 for the sake of synchronizing #line's, and define
4054 b4_percent_define_syncline(VARIABLE).
4055 (muscle_percent_define_check_values): Use
4056 muscle_percent_define_get_loc.
4057 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4058 (muscle_percent_define_get_syncline): Prototype.
4059 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4060 defaults): Update output for location change.
4061 (Complaining during macro argument expansion): Extend to test
4062 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4063
4064 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4065
4066 Fix some error-reporting macro bugs.
4067 * data/bison.m4 (b4_cat): New.
4068 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4069 to stdout so they don't become arguments to other macros. Update
4070 comments and add examples.
4071 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4072 add examples.
4073 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4074 after printing the error directive so that M4 doesn't report subsequent
4075 problems that are induced by this problem.
4076 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4077 instead of just in them. Recognize @\n in both places. Both expand to
4078 the empty string. Needed by b4_cat.
4079 * tests/skeletons.at (Complaining during macro argument expansion):
4080 New test case.
4081 (Fatal errors make M4 exit immediately): New test case.
4082
4083 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4084
4085 Implement --print-datadir.
4086 * src/getargs.c (usage): Mention.
4087 (PRINT_DATADIR_OPTION): New anonymous enum member.
4088 (long_options): Add entry for it.
4089 (getargs): Add case for it calling compute_pkgdatadir.
4090 * src/output.c (output_skeleton): Encapsulate data directory
4091 computation from here...
4092 (prepare): ... and from here...
4093 (compute_pkgdatadir): ... into this new function.
4094 * src/output.h (compute_pkgdatadir): Prototype.
4095
4096 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4097
4098 * src/print-xml.c (escape_bufs): New static global variable
4099 replacing...
4100 (xml_escape_n): ... the static local variable buf here.
4101 (print_xml): Free memory for escape_bufs.
4102 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4103
4104 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4105
4106 Replace `%push-parser' and `%push-pull-parser' with
4107 `%define push_pull "push"' and `%define push_pull "both"'.
4108 `%define push_pull "pull"' is the default.
4109 * doc/bison.texinfo (Push Decl, Push Parser Function,
4110 Pull Parser Function, Parser Create Function, Parser Delete Function):
4111 Update declarations.
4112 (Decl Summary, Table of Symbols): Replace %push-parser and
4113 %push-pull-parser entries with a %define push_pull entry.
4114 * data/bison.m4 (b4_percent_define_check_values): New macro.
4115 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4116 definitions...
4117 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4118 definitions...
4119 * data/push.c: ... to here and compute them from the value of the
4120 %define variable push_pull.
4121 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4122 parsing requests here...
4123 * data/yacc.c: ... hack this to switch to push.c any time
4124 b4_use_push_pull_flag or the %define variable push_pull is set. This
4125 will go away when we mv push.c yacc.c.
4126 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4127 push parsing is not supported since unused %define variables are
4128 reported anyway.
4129 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4130 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4131 comments for consistency with b4_percent_define_check_values.
4132 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4133 muscles.
4134 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4135 Remove.
4136 (prologue_declaration): Remove %push-parser and %push-pull-parser
4137 rules.
4138 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4139 * tests/calc.at: Update declarations.
4140 * tests/input.at (%define enum variables): New test case.
4141 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4142 declaration.
4143 (Push Parsing: Multiple impure instances): Update declaration.
4144 (Push Parsing: Unsupported Skeletons): New test case.
4145 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4146 declaration.
4147 (Exploding the Stack Size with Malloc): Update declaration.
4148
4149 2007-09-24 Wojciech Polak <polak@gnu.org>
4150
4151 Add XSLT transformations.
4152
4153 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4154 * data/xslt/xml2text.xsl: Transform XML into plain text.
4155 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4156 * data/Makefile.am (xsltdir): New variable.
4157 (dist_xslt_DATA): Add xslt/*.xsl files.
4158
4159 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4160
4161 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4162 Problem reported by Wojciech Polak.
4163 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4164 (xml_printf): Undo change I made on 21 September; that is,
4165 indent 2 spaces, not 1.
4166
4167 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4168
4169 Pacify ./configure --enable-gcc-warnings.
4170 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4171 `char const *' instead of `char *'.
4172 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4173 local variable `sep'.
4174
4175 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4176
4177 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4178 elsewhere.
4179 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4180 (xml_printf): Indent just 1 space for level.
4181 (e_char, xlate_char): Remove.
4182 (xml_escape_string): Rewrite to avoid undefined behavior (used
4183 storage that was freed from the stack).
4184 (xml_escape_n): Don't bother checking for subscript error.
4185
4186 2007-09-21 Wojciech Polak <polak@gnu.org>
4187
4188 Add Bison XML Automaton Report.
4189
4190 Add support for an -x option to generate an XML report.
4191 It is not documented yet.
4192 * src/print-xml.c: New file.
4193 * src/print-xml.h: Likewise.
4194 * lib/timevar.def (TV_XML): New var.
4195 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4196 * src/conflicts.c: Include print-xml.h.
4197 (solved_conflicts_xml_obstack): New var.
4198 (log_resolution, conflicts_solve, conflicts_free):
4199 Add support for XML report.
4200 (conflicts_output_val): New function.
4201 * src/conflicts.h (conflicts_output_val): New decl.
4202 * src/files.c (spec_xml_file): New var.
4203 (compute_output_file_names, output_file_names_free): Add XML support.
4204 * src/files.h (spec_xml_file): New decl.
4205 * src/getargs.c (xml_flag): New var.
4206 (usage, short_options, long_options, getargs): Add XML support.
4207 * src/getargs.h (xml_flag): New decl.
4208 * src/gram.c: Include print-xml.h.
4209 (rule_lhs_print_xml, rule_rhs_print_xml):
4210 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4211 New functions.
4212 * src/gram.h: Declare external ones.
4213 * src/main.c: Include print-xml.h.
4214 (main): Add XML support.
4215 * src/reduce.c: Include print-xml.h.
4216 (reduce_xml): New function.
4217 * src/reduce.h: Declare it.
4218 * src/state.c: Include print-xml.h.
4219 (state_new): Add XML support.
4220 (state_rule_lookahead_tokens_print_xml): New function.
4221 * src/state.h: Declare it.
4222 (struct state): New member solved_conflicts_xml.
4223 * src/symtab.c (symbol_class_get_string): New function.
4224 * src/symtab.h: Declare it.
4225
4226 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4227
4228 * GNUmakefile: Switch to coreutils's version.
4229 * bootstrap: Likewise.
4230 * Makefile.cfg: Adjust to new GNUmakefile.
4231 * README-hacking: Likewise.
4232
4233 Import from gnulib:
4234
4235 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4236 Bruno Haible <bruno@clisp.org>
4237
4238 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4239 and is a script that invokes bison. Tighten the code. Add comments.
4240
4241 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4242
4243 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4244 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4245 * doc/bison.texinfo (Decl Summary): Fix.
4246 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4247 * tests/input.at (Boolean %define variables): Update output.
4248 * tests/skeletons.at (%define boolean variables: invalid skeleton
4249 defaults): Rename to...
4250 (%define Boolean variables: invalid skeleton defaults): ... this and
4251 update output.
4252
4253 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4254
4255 In impure push mode, don't allow more than one yypstate to be allocated
4256 since multiple impure parsers would corrupt yynerrs.
4257 * data/push.c (yypstate_allocated): New static global variable
4258 initialized to 0.
4259 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4260 exhaustion if yypstate_allocated is 1, but still return 2.
4261 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4262 already 1. Otherwise, set it to 1.
4263 (yypstate_delete): Set it to 0.
4264 * tests/push.at (Push Parsing: Multiple impure instances): New test
4265 case.
4266
4267 2007-08-17 Bob Rossi <bob@brasko.net>
4268
4269 * doc/bison.texinfo (Push Decl): Document the push parser.
4270 (Table of Symbols): Ditto.
4271 (Pure Decl): Ditto.
4272 (Decl Summary): Ditto.
4273 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4274 Parser Create Function, Parser Delete Function):
4275 Add new push parser symbols.
4276 (Table of Symbols): Document push-parser, push-pull-parser,
4277 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4278
4279 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4280
4281 Update to GPLv3.
4282 * doc/gpl-3.0.texi: New file.
4283 * doc/gpl.texi: Remove.
4284 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4285 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4286 * README-hacking, TODO, bootstrap, bootstrap.conf:
4287 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4288 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4289 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4290 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4291 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4292 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4293 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4294 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4295 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4296 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4297 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4298 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4299 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4300 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4301 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4302 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4303 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4304 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4305 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4306 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4307 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4308 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4309 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4310 * src/complain.c, src/complain.h, src/conflicts.c:
4311 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4312 * src/files.h, src/flex-scanner.h, src/getargs.c:
4313 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4314 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4315 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4316 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4317 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4318 * src/print.c, src/print.h, src/print_graph.c:
4319 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4320 * src/reduce.h, src/relation.c, src/relation.h:
4321 * src/revision.h, src/scan-code.h, src/scan-code.l:
4322 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4323 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4324 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4325 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4326 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4327 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4328 * tests/existing.at, tests/glr-regression.at:
4329 * tests/headers.at, tests/input.at, tests/java.at:
4330 * tests/local.at, tests/output.at, tests/push.at:
4331 * tests/reduce.at, tests/regression.at, tests/sets.at:
4332 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4333 * tests/torture.at:
4334 Update to GPLv3.
4335
4336 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4337
4338 Get rid of broken %no-parser, -n, and --no-parser implementation and
4339 documentation.
4340 * TODO: Don't mention them.
4341 * doc/bison.1: Likewise.
4342 * doc/bison.texinfo (Decl Summary): Likewise.
4343 (Bison Options): Likewise.
4344 (Option Cross Key): Likewise.
4345 * src/getargs.c (no_parser_flag): Remove global variable.
4346 (usage): Don't print description of -n and --no-parser.
4347 (long_options): Remove --no-parser entry here.
4348 (getargs): Remove -n case in the switch here.
4349 * src/getargs.h (no_parser_flag): Remove extern.
4350 * tests/regression.at (Web2c Actions): Remove comment that mentions
4351 --no-parser.
4352
4353 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4354
4355 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4356 name user variables starting with `yy'. Just pass NULL instead of a
4357 dummy local &yylval to yypush_parse.
4358 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4359 starting with `yy'.
4360
4361 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4362
4363 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4364 true since it's then always used regardless of whether yyoverflow is
4365 defined. Reported by Christian Burger at
4366 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4367 * THANKS: Add Christian Burger.
4368
4369 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4370 node names: say "Decl Summary" not "Bison Declaration Summary".
4371
4372 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4373
4374 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4375 determine whether this function has already complained about an invalid
4376 value for a %define boolean variable, don't check whether Bison has
4377 ever examined the value. As written, the check was a tautology.
4378 Instead, record and check for this complaint using a separate muscle.
4379
4380 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4381
4382 Fix push parsing memory leak reported by Brandon Lucia at
4383 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4384 * THANKS: Add Brandon Lucia.
4385 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4386 but the parse never completed and thus freed it.
4387 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4388 * tests/testsuite.at: Include push.at.
4389 * test/push.at: New.
4390 (Push Parsing: Memory Leak for Early Deletion): New test case.
4391
4392 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4393
4394 Improve handling of multiple S/R conflicts in the same state and of S/R
4395 conflicts involving multiple reductions.
4396 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4397 set for a state here or Bison will abort if it is reassigned on a
4398 later conflicted reduction in the same state.
4399 Similarly, don't finalize and assign the solved conflicts report here
4400 or it will be lost if it is reassigned on a later conflicted reduction
4401 in the same state.
4402 (set_conflicts): Instead, assign them both here after all S/R conflicts
4403 in the state have been fully examined.
4404 * src/print.c (shift_set): Rename to...
4405 (no_reduce_set): ... this.
4406 (print_reductions): Update for rename, and add %nonassoc error action
4407 tokens to no_reduce_set so that, when printing the first remaining
4408 reduction on an error action token, the reduction is enclosed in
4409 brackets.
4410 (print_results): Update for rename.
4411 * tests/conflicts.at (Solved conflicts report for multiple reductions
4412 in a state): New test case.
4413 (%nonassoc error actions for multiple reductions in a state): New test
4414 case.
4415
4416 * src/main.c (main): Don't depend on C99 features.
4417
4418 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4419
4420 * build-aux/.cvsignore: Add compile.
4421 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4422 uniwidth.
4423
4424 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4425
4426 * bootstrap (slurp): Create target directories that don't exist.
4427 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4428
4429 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4430
4431 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4432 than item number.
4433 * closure.c (closure): Likewise.
4434 * state.h (reductions): Comment sorting of rules.
4435 (state): Comment sorting of items.
4436
4437 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4438
4439 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4440 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4441 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4442 definition in order to avoid Gnulib headers since we don't use config.h
4443 here.
4444 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4445 rather than AT_DATA so that config.h is included.
4446
4447 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4448
4449 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4450 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4451 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4452 and so that YYFPRINTF is guaranteed to be defined here.
4453
4454 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4455
4456 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4457 with...
4458 (muscle_percent_define_check_values): ... this more helpful function.
4459 Again, it's not used yet, but it will be.
4460 * src/muscle_tab.h: Likewise.
4461
4462 Improve some comments in parser table construction.
4463 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4464 (generate_states): Don't mention ruleset, which is internal to closure.
4465 * src/closure.c (closure): Explain sorting of core and itemset, which
4466 is required for this function to behave correctly.
4467 * src/closure.h (closure): Mention sorting.
4468
4469 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4470
4471 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4472 move the check for disabled transitions to an aver since conflict
4473 resolution hasn't happened yet.
4474
4475 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4476 labels a state as inconsistent just because it has error transitions.
4477 The original form of this check appeared in revision 1.1 of lalr.c,
4478 which was committed on 1991-12-21. Now (at least), changing the
4479 consistency label on such a state appears to have no useful effect in
4480 any of the places it is examined, which I enumerate below. The key
4481 point to understanding each item in this enumeration is that a state
4482 with an error transition is labelled consistent in the first place only
4483 if it has no rules, so the check cannot matter for states that have
4484 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4485 to try to identify its conflicts, and a state must have *rules* to have
4486 conflicts. (2) Labelling a state as inconsistent will affect how
4487 action_row sets the default *rule* for the state. (3) Labelling a
4488 state as inconsistent will cause build_relations to add lookback edges
4489 to *rules* in that state.
4490 * src/state.h (struct state): Word the comment for member consistent
4491 more carefully.
4492
4493 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4494
4495 Don't depend on C99 features.
4496 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4497 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4498 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4499 * src/state.c (state_mark_reachable_states): Fix for-loop.
4500 (state_remove_unreachable_states): Fix for-loop.
4501
4502 Don't widen struct state with member reachable just to temporarily
4503 record reachability. Instead, use a local bitset.
4504 * src/state.h (struct state): Remove member.
4505 * src/state.c (state_new): Don't initialize it.
4506 (state_mark_reachable_states): Rename to...
4507 (state_record_reachable_states): ... this, and use bitset.
4508 (state_remove_unreachable_states): Use bitset.
4509
4510 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4511
4512 * src/Makefile.am (yacc): Quote target action commands properly so
4513 that the yacc script isn't corrupt. Reported by Hans Aberg at
4514 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4515
4516 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4517 the case of pure parsers. Reported by Frans Englich at
4518 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4519 * THANKS: Add Frans Englich.
4520
4521 * NEWS (2.3a+): In the %code entry, reference section `Bison
4522 Declaration Summary' from the manual now since the %code summary has
4523 moved there.
4524 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4525 in the rules section must be terminated by semicolons.
4526
4527 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4528
4529 Extend the front-end API for %define variables to more completely
4530 mirror the back-end. This will be useful in the future.
4531 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4532 Update comments to mention the new front-end counterparts of these
4533 macros.
4534 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4535 for muscle_string_decode and muscle_location_decode.
4536 (muscle_string_decode): New static function.
4537 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4538 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4539 functions.
4540 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4541 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4542 implementation more closely.
4543 (muscle_percent_define_invalid_value): New function.
4544 * src/muscle_tab.h (muscle_percent_define_get,
4545 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4546 Prototype.
4547
4548 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4549
4550 * NEWS (2.3a+): Mention yesterday's state-removal change.
4551 (2.3a): Remove the %language entry, which was added after 2.3a.
4552 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4553 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4554 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4555 tests/existing.at: Update copyright date.
4556
4557 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4558
4559 If conflict resolution makes states unreachable, remove those states,
4560 report rules that are then unused, and don't report conflicts in those
4561 states.
4562 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4563 New global function.
4564 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4565 function.
4566 * src/main.c (main): After conflict resolution, remove the unreachable
4567 states and update all data structures that reference states by number.
4568 * src/state.c (state_new): Initialize each state's reachable member to
4569 false.
4570 (state_mark_reachable_states): New static function.
4571 (state_remove_unreachable_states): New global function.
4572 * src/state.h (struct state): Add member bool reachable.
4573 (state_remove_unreachable_states): Prototype.
4574 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4575 New test case.
4576 * tests/existing.at (GNU pic Grammar): Update test case output now that
4577 an unused rule is discovered.
4578
4579 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4580
4581 Minor code cleanup in parser table construction.
4582 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4583 (new_itemsets, save_reductions): Update for rename to nitemset.
4584 * src/closure.c (nritemset): Rename to...
4585 (nitemset): ... this since the "r" appears to meaningless and isn't
4586 used in the comments.
4587 (closure): Update for rename.
4588 * src/closure.h (nritemset): Update extern to...
4589 (nitemset): ... this.
4590 * src/lalr.c (LA): Fix a typo in comments.
4591 * src/print.c (print_core): Update for rename to nitemset.
4592 * src/print_graph.c (print_graph): Likewise.
4593 * src/state.h: Fix some typos in header comments.
4594
4595 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4596
4597 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4598 still sticks to ASCII. Sorry!
4599
4600 * README-hacking: New file, taken mostly from coreutils, with changes
4601 for Bison. Contains much of the contents of:
4602 * README-cvs: Remove.
4603 * bootstrap: Sync from gnulib.
4604 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4605 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4606
4607 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4608
4609 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4610 Setzer.
4611 (Java Differences): Fix some typos.
4612 * THANKS: Add Sebastian Setzer.
4613
4614 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4615
4616 * data/java.m4 (b4_single_class_if): Remove.
4617 (b4_abstract_if): Look at "%define abstract".
4618 (b4_lexer_if): New.
4619 (b4_union_name): Rename...
4620 (b4_yystype): ... to this. Map to "%define stype".
4621 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4622 b4_maybe_throws): Fix quoting.
4623 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4624 * data/lalr1.java (Lexer interface): Always define.
4625 (Lexer interface within parser class): Remove.
4626 (YYLexer class): New, used when "%code lexer" is present.
4627 (constructor): When "%code lexer" is used, pass %lex-param
4628 to the lexer constructor.
4629 (yylex, yyparse): Remove %lex-param from method invocations
4630 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4631
4632 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4633 abstract". Rename "%define union_name" to "%define stype".
4634 Rename method names according to previous patch.
4635 (Java Scanner Interface): Describe "%code lexer" instead of
4636 "%pure-parser" and "%define single_class".
4637 (Java Differences): Mention "%code lexer".
4638
4639 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4640 Include scanner here, using macros from tests/local.at.
4641 (AT_DATA_CALC_Y): Remove final argument.
4642 (_AT_CHECK_JAVA_CALC): Likewise.
4643 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4644 of %locations and %error-verbose.
4645 (main): Test with and without %lex-param.
4646 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4647 (AT_BISON_OPTION_POPDEFS): Pop it.
4648
4649 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4650
4651 DJGPP spefic issue. Inhibit the use of disallowed characters for
4652 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4653 and concern testsuite case 46.
4654 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4655 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4656 * djgpp/config.bat: Inhibit the use of disallowed characters.
4657
4658 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4659
4660 Miscellaneous %define and %code cleanup.
4661 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4662 values are interpreted.
4663 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4664 documentation a little more.
4665 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4666 muscle_percent_define_insert, muscle_percent_code_grow): New
4667 functions/macros.
4668 * src/muscle_tab.h (muscle_percent_define_insert,
4669 muscle_percent_code_grow): Prototype.
4670 * src/parse-gram.y (prologue_declaration): Use
4671 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4672 %define and %code directives.
4673
4674 Make it easy to share %define boolean variables between the front-end
4675 and back-end. Though not used yet, this will be useful in the future.
4676 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4677 Bison uses of names rather than just skeleton uses of names.
4678 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4679 b4_percent_define_skeleton_variables(VARIABLE) to
4680 b4_percent_define_bison_variables(VARIABLE).
4681 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4682 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4683 b4_percent_code_bison_qualifiers(QUALIFIER).
4684 (b4_check_user_names_wrap): Update for renames.
4685 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4686 muscle_percent_define_default): New functions mimicking
4687 b4_percent_define_flag_if and b4_percent_define_default.
4688
4689 For %define variables, report locations for invalid values and
4690 redefinitions.
4691 * data/bison.m4 (b4_percent_define_flag_if): Read
4692 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4693 value for VARIABLE.
4694 (b4_percent_define_default): Save a special location in
4695 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4696 must later be reported as invalid.
4697 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4698 functions.
4699 (muscle_percent_define_insert): Record the location of VARIABLE in
4700 muscle percent_define_loc(VARIABLE), and use it to report the previous
4701 location for a redefinition.
4702 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4703 (muscle_percent_define_default): Update like b4_percent_define_default.
4704 (muscle_grow_user_name_list): Rename to...
4705 (muscle_user_name_list_grow): ... this for consistency and use
4706 muscle_location_grow.
4707 * src/muscle_tab.h (muscle_location_grow): Prototype.
4708 * tests/input.at (%define errors): Update expected output.
4709 * tests/skeletons.at (%define boolean variables: invalid skeleton
4710 defaults): New test case.
4711
4712 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4713
4714 * src/print.c (lookahead_set, state_default_rule): Remove.
4715 (print_reductions): Replace state_default_rule invocation with
4716 equivalent use of yydefact, which was computed in token_actions in
4717 tables.c.
4718 (print_results): Don't allocate lookahead_set.
4719
4720 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
4721
4722 * data/lalr1.java: Prefix all private members with yy.
4723
4724 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4725
4726 Use YYFPRINTF instead of fprintf where appropriate. Reported by
4727 Sebastien Fricker at
4728 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
4729 * THANKS: Add Sebastien Fricker.
4730 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4731 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4732 accept a variable number of arguments.
4733
4734 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4735
4736 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4737
4738 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4739
4740 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4741 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4742 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4743
4744 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4745
4746 Undo my 2007-02-07 change, switching back to the c-strcase module
4747 introduced in the 2007-02-03 change. Bruno Haible reported that
4748 the 2007-02-07 change would be dangerous in Turkish if we add a
4749 language whose name contains "i", since "i" is not lowercase "I"
4750 in Turkish.
4751 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4752 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4753 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4754 * m4/.cvsignore: Remove strcase.m4.
4755 * src/getargs.c: Revert 2007-02-07 change, as follows.
4756 Include c-strcase.h.
4757 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4758
4759 2007-02-11 Bruno Haible <bruno@clisp.org>
4760
4761 Enable the Java related testsuite tests when the only Java compiler
4762 found is a gcj < 4.3. Discussed at
4763 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4764 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4765
4766 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4767
4768 * data/Makefile.am: Update copyright date.
4769 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4770 yypstate_new returns NULL.
4771 (yypstate_new): Return NULL if malloc does.
4772 * src/reader.c (packgram): Move translation of rule actions from the
4773 beginning of packgram to...
4774 (check_and_convert_grammar): ... here right before packgram is invoked
4775 so it's easier to write more complete comments, and remove redundant
4776 code.
4777
4778 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4779
4780 As in semantic actions, make @$ in %initial-action, %destructor, and
4781 %printer imply %locations.
4782 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4783 scanning @$.
4784 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4785 (@$ in %initial-action implies %locations,
4786 @$ in %destructor implies %locations,
4787 @$ in %printer implies %locations): ... these new test cases.
4788
4789 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4790
4791 Undo most of the 2007-02-03 change, switching to the strcase module
4792 now that gnulib strcase has been fixed.
4793 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4794 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4795 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4796 * m4/.cvsignore: Add strcase.m4.
4797 * src/getargs.c: Revert 2007-02-03 change, as follows.
4798 Don't include c-strcase.h.
4799 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4800 strcasecmp has "unspecified behavior" outside the POSIX locale,
4801 but it works fine in practice if at least one argument is ASCII,
4802 as is the case in Bison.
4803
4804 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
4805
4806 * tests/java.at: Skip tests if only one of javac/java is present.
4807 Reported by Joel E. Denny.
4808 * tests/atlocal.in: Adjust copyright years.
4809
4810 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
4811
4812 * data/lalr1.java (Stack): Work around old verifiers that disallow
4813 access to the private fields of an inner class, from the outer class.
4814 We can make Stack's fields public because user code doesn't have access
4815 to the instance of Stack used by parse(). Reported by Paul Eggert.
4816
4817 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4818
4819 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4820 the right spot for these files?
4821 * bootstrap.conf (gnulib_modules): Add c-strcase.
4822 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4823 c-strncasecmp.c.
4824 * src/getargs.c: Include c-strcase.h.
4825 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4826 to avoid unspecified behavior.
4827
4828 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4829
4830 * doc/bison.texinfo (Decl Summary): Correct typo.
4831
4832 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
4833
4834 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4835 Complain if the value does not match empty, "true" or "false".
4836 * data/c++.m4: Adjust default definitions of %define variables.
4837 * data/java.m4: Adjust default definitions of %define variables.
4838 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4839 to above behavior.
4840 * tests/input.at (Boolean %define variables): Test new behavior.
4841
4842 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
4843
4844 * NEWS: Mention java.
4845 * TODO: Remove things that are done.
4846 * bootstrap.conf: Add javacomp-script and javaexec-script.
4847 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4848
4849 * data/Makefile.am: Add new files.
4850 * data/java-skel.m4: New.
4851 * data/java.m4: New.
4852 * data/lalr1.java: New.
4853
4854 * doc/bison.texinfo: Put "A Complete C++ Example" under
4855 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4856 under Other Languages.
4857
4858 * src/getargs.c (valid_languages): Add Java.
4859 * src/getargs.h (struct bison_language): Update size of string fields.
4860
4861 * tests/Makefile.am: Add java.at.
4862 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4863 * tests/java.at: New.
4864 * tests/testsuite.at: Include it.
4865
4866 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4867
4868 Clean up.
4869 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4870 at_directive_argv arguments so these no longer have to be global
4871 variables. Also, update the implementation for the following changes.
4872 (fail_for_at_directive_too_many_args,
4873 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4874 (at_directive_name): Remove as at_directive_argv[0] will be used for
4875 this now.
4876 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4877 for the directive name.
4878 (at_directive_argc, at_directive_argv): Make these local within
4879 skel_lex instead of global.
4880 (INITIAL): Update directive start action for above changes.
4881 (SC_AT_DIRECTIVE_ARG): Rename to...
4882 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4883 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4884 (scan_skel): Move yylex_destroy to...
4885 (skel_scanner_free): ... here.
4886 * tests/skeletons.at (installed skeleton file name): Rename to...
4887 (installed skeleton file names): ... this.
4888
4889 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4890
4891 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4892 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4893 Summary" not "Directives".
4894 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4895 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4896 since the former is now the more complete one.
4897 (Prologue Alternatives): Likewise and do the same for %defines.
4898 (Table of Symbols): Add summary of %code, add summary of %define, and
4899 move full %code documentation to...
4900 (Decl Summary): ... here for consistency with other entries in these
4901 sections.
4902 Move %define entry in order to keep this list alphabetized.
4903 Reword %define entry a little to put less emphasis on the skeleton
4904 concept, which most users shouldn't have to think about.
4905
4906 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4907
4908 Adjust to recent gnulib changes.
4909 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4910 Add string.h, string_.h, unistd_.h, wchar_.h.
4911 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4912 * src/system.h: Don't include <stpcpy.h>; this is now done by
4913 <string.h>.
4914
4915 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
4916
4917 Simplify implementation of unqualified %code, implement macros for
4918 uniform treatment of boolean %define flags. Document %define.
4919 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4920 b4_percent_code_ifdef): New.
4921 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4922 * data/c++.m4: Define default value for global_tokens_and_yystype.
4923 * data/glr.cc: Likewise.
4924 * data/location.cc: Use b4_percent_define_flag_if.
4925
4926 * doc/bison.texinfo (Decl Summary): Document %define.
4927
4928 * src/parse-gram.y (Unqualified %code): Change muscle name to
4929 b4_percent_code().
4930 (content.opt): Default to empty.
4931
4932 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4933
4934 Implement support for relative and absolute skeleton file names.
4935 Discussed starting at
4936 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4937 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4938 (Bison Options): Document in --skeleton entry.
4939 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4940 full_skeleton can't necessarily hold all of pkgdatadir.
4941 If the specified skeleton file name contains a `/', don't prepend
4942 pkgdatadir.
4943 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4944 file name contains a `/', prepend the grammar file directory.
4945 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4946 * skeletons.at: New file.
4947 (relative skeleton file names): New test case.
4948 (installed skeleton file names): New test case.
4949 * tests/testsuite.at: Include skeletons.at.
4950
4951 * bootstrap: Update copyright to 2007.
4952
4953 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
4954
4955 * bootstrap: Remove occurrences of .#bootmp from the files.
4956
4957 2007-01-17 Akim Demaille <akim@epita.fr>
4958
4959 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4960 nonterminals.
4961 Use per-type %printer.
4962
4963 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4964
4965 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4966 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4967 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4968 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4969 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4970 tests/glr-regression.at, tests/input.at, tests/local.at,
4971 tests/output.at, tests/torture.at: Update copyright to 2007.
4972
4973 2007-01-16 Akim Demaille <akim@epita.fr>
4974
4975 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4976 error code.
4977 (Calc++ Scanner): Exit with failure if we can't open the input
4978 file.
4979 Accept "-" standing for stdin.
4980 (Calc++ Top Level): Print the result only if the parsing was
4981 successful.
4982
4983 2007-01-16 Akim Demaille <akim@epita.fr>
4984
4985 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4986
4987 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
4988 and Joel E. Denny <jdenny@ces.clemson.edu>
4989
4990 Clean up %define and %code implementation in M4 some. Most
4991 importantly, rename all related macros to be in the b4_percent_define
4992 and b4_percent_code namespaces. Also, complete support for `.' in
4993 %define variable names and %code qualifiers.
4994 * data/bison.m4 (b4_check_user_names): Check for special
4995 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4996 m4_foreach loops.
4997 (b4_get_percent_define, b4_get_percent_code): Rename to...
4998 (b4_percent_define_get, b4_percent_code_get): ... these.
4999 Extend documentation with examples.
5000 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5001 b4_percent_define_skeleton_variables and
5002 b4_percent_code_skeleton_qualifiers.
5003 Expect any value for the %define variable `foo' to be stored in the
5004 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5005 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5006 expect any unqualified %code blocks to be stored in a macro named
5007 `b4_percent_code_unqualified'.
5008 Use m4_indir so that %define variable names and %code qualifiers can
5009 contain `.', which is allowed by the grammar parser.
5010 (b4_percent_define_default): New macro to set a default value for a
5011 %define variable.
5012 (m4_wrap): Update wrapped code, and fix some underquoting.
5013 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5014 Expect grammar uses of %define variables and %code qualifiers to be
5015 defined in b4_percent_define_user_variables and
5016 b4_percent_code_user_qualifiers.
5017 * data/c++.m4: Use b4_percent_define_default rather than
5018 m4_define_default. Fix some underquoting. Skeleton usage of %define
5019 variable define_location_comparison now implies skeleton usage of
5020 %define variable filename_type.
5021 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5022 data/push.c, data/yacc.c: Update macro names.
5023 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5024 muscle names.
5025
5026 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5027
5028 DJGPP specific issues.
5029
5030 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5031 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5032
5033 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5034
5035 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5036 run parsers in all tests so that Valgrind is invoked during
5037 maintainer-check-valgrind.
5038 (Duplicate representation of merged trees): Free all semantic values.
5039 (Duplicated user destructor for lookahead): Likewise.
5040
5041 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5042
5043 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5044 command-line prefix.
5045 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5046 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5047 miss Valgrind messages.
5048 (Exploding the Stack Size with Malloc): Likewise.
5049
5050 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5051
5052 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5053 locals. Reported by Juan Manuel Guerrero at
5054 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5055 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5056 Fix some indentation also.
5057 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5058 explaining this issue.
5059
5060 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
5061 and Joel E. Denny <jdenny@ces.clemson.edu>
5062
5063 Simplify union and prologue handling, and escape union and lex/parse
5064 params with digraphs.
5065 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5066 values to the empty string since these are no longer guaranteed
5067 initialized by the front-end.
5068 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5069 braces around b4_user_stype since this is no longer done by the
5070 front-end.
5071 * src/files.c, src/files.h (pre_prologue_obstack,
5072 post_prologue_obstack): Remove.
5073 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5074 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5075 with digraphs. This fixes lex params and parse params.
5076 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5077 * src/output.c (prepare): Remove muscle insertion of the prologues.
5078 (output): Remove freeing of pre_prologue_obstack and
5079 post_prologue_obstack.
5080 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5081 than prologue_augment for prologue parsing so you don't need prologue
5082 obstacks.
5083 (grammar_declaration): For %union RHS, use `braceless' instead of
5084 "{...}" so that braces are already stripped and code is escaped with
5085 digraphs.
5086 * src/reader.c (prologue_augment): Remove.
5087 (reader): Remove initialization of pre_prologue_obstack and
5088 post_prologue_obstack.
5089 * src/reader.h (prologue_augment): Remove.
5090
5091 * data/c.m4: Remove stray parenthesis.
5092
5093 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5094
5095 Remove quotes from variables names in %define directives and from
5096 qualifiers in %code directives, and restrict the characters that are
5097 allowed in them to M4-friendly ones. For %define, continue to support
5098 the quoted form as a deprecated feature. Discussed starting at
5099 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5100 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5101 %code.
5102 * doc/bison.texinfo (Prologue Alternatives): Update.
5103 (Decl Summary): In %defines entry, update mention of `%code requires'
5104 and `%code provides'.
5105 (C++ Location Values): Update %define uses.
5106 (Calc++ Parser Interface): Likewise.
5107 (Calc++ Parser): Likewise, and update `%code requires' uses.
5108 (Table of Symbols): Update %code documentation.
5109 * src/parse-gram.y (prologue_declaration): For %define variables, use
5110 `variable' instead of `STRING'.
5111 (grammar_declaration): For %code qualifiers, use `ID' instead of
5112 `STRING'.
5113 (variable): New nonterminal that takes an `ID' or a `STRING'.
5114 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5115 and %define uses.
5116 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5117 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5118 (%define errors): Update %define uses.
5119
5120 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5121
5122 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5123 instead of muscle_insert for %define values so that M4-special
5124 characters are replaced with digraphs.
5125 * tests/input.at (%define errors): Extend to check weird values.
5126
5127 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5128
5129 Instead of having skeletons declare all valid %define variables and
5130 %code qualifiers, provide macros that retrieve the associated values
5131 and build these lists automatically. Thus Bison will now warn when a
5132 variable or qualifier is not used by the skeleton in the current
5133 invocation regardless of whether it might sometimes be used by that
5134 skeleton in other invocations. Also, move all %define value macros to
5135 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5136 form, which is replaced by %code.
5137 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5138 (b4_check_user_names): ... this, and change the series of valid name
5139 arguments to a single list argument for names used in the skeleton
5140 similar to the existing list argument for names used in the grammar.
5141 Warn instead of complaining.
5142 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5143 values and %code code, to format %code code properly, and to build
5144 lists of all %define variables and %code qualifiers used in the
5145 skeleton: b4_skeleton_percent_define_variables and
5146 b4_skeleton_percent_code_qualifiers.
5147 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5148 Remove, and...
5149 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5150 the skeleton names lists can finish building first. In place of
5151 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5152 expect the lists b4_user_percent_define_variables and
5153 b4_user_percent_code_qualifiers.
5154 * data/c++.m4: Where setting default values for b4_parser_class_name,
5155 b4_location_type, b4_filename_type, b4_namespace, and
5156 b4_define_location_comparison, update their names to the
5157 b4_percent_define_ namespace.
5158 * data/glr.c: Don't use b4_check_percent_define_variables and
5159 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5160 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5161 (b4_parser_class_name, b4_namespace): Define these using
5162 b4_get_percent_define for parser_class_name and namespace.
5163 * data/location.cc: Use b4_get_percent_define.
5164 * data/push.c: Don't use b4_check_percent_define_variables and
5165 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5166 * data/yacc.c: Likewise, and don't call m4_exit in
5167 b4_use_push_for_pull_if or m4_wrap code will never execute.
5168 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5169 Rename to...
5170 (muscle_grow_user_name_list): ... this for consistency with the
5171 terminology used in bison.m4.
5172 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5173 %define variable names, and rename muscle used_percent_define_variables
5174 to user_percent_define_variables.
5175 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5176 user_percent_code_qualifiers.
5177 (content): Remove.
5178 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5179 {CODE} form is no longer accepted.
5180 * tests/input.at (Reject bad %code qualifiers): Rename to...
5181 (Reject unused %code qualifiers): ... this, and update test output.
5182 (%define error): Update test output.
5183
5184 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5185
5186 Check for unrecognized %define variables similar to checking for
5187 unrecognized %code qualifiers. Check for redefined %define variables.
5188 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5189 generalizes...
5190 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5191 (b4_check_percent_define_variables): New, also wraps it.
5192 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5193 variables using b4_check_percent_define_variables.
5194 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5195 all those exercised in the test suite and all those listed in the
5196 `Default values' section of c++.m4. Are there others?
5197 * data/push.c, data/yacc.c: Declare no valid %define variables.
5198 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5199 similar to muscle_find, but it works even when the muscle stores a
5200 const value.
5201 (muscle_grow_used_name_list): New function for constructing the used
5202 name list muscles that b4_check_for_unrecognized_names requires.
5203 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5204 %define'd more than once. Define the b4_used_percent_define_variables
5205 muscle with muscle_grow_used_name_list.
5206 (grammar_declaration): Abbreviate %code code with
5207 muscle_grow_used_name_list.
5208 * tests/input.at (%define errors): New.
5209
5210 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5211
5212 Provide warn_at, complain_at, and fatal_at function callbacks to the
5213 skeletons, and use this for %code qualifier complaints.
5214 * data/bison.m4 (b4_error_at): New, invoked by...
5215 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5216 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5217 @fatal_at(...@) directives.
5218 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5219 qualifiers in b4_used_percent_code_qualifiers and to use
5220 b4_complain_at.
5221 * src/location.c, src/location.h (boundary_set_from_string): New global
5222 function.
5223 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5224 function.
5225 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5226 to b4_used_percent_code_qualifiers.
5227 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5228 function.
5229 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5230 (lineno): Rename to...
5231 (out_lineno): ... this so I don't misunderstand it again.
5232 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5233 here; these newlines are in the input but not the output file.
5234 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5235 (at_directive_perform): ... this new static function, and add handling
5236 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5237 directives.
5238 * tests/input.at (Reject bad %code qualifiers): Update test output with
5239 locations and extend.
5240
5241 * tests/output.at (Output file name: [, Output file name: ]): Remove
5242 bogus comment about these tests failing.
5243
5244 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5245
5246 Clean up b4_check_percent_code_qualifiers a little.
5247 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5248 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5249 documentation and add examples.
5250 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5251 qualifiers here.
5252
5253 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5254
5255 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5256 unreliable -- especially when they're hidden inside another macro.
5257 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5258 data/c.m4: Remove m4_divert(-1).
5259 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5260 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5261 m4_divert_push(0) and m4_divert_pop(0).
5262 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5263 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5264 pushed and popped by m4sugar, should be first on the stack.
5265
5266 Provide warn, complain, and fatal function callbacks to the skeletons.
5267 This provides more flexibility than m4_fatal, improves the error
5268 message format, and captures messages for translation. Discussed
5269 starting at
5270 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5271 * data/bison.m4 (b4_error): New, invoked by...
5272 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5273 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5274 directives. Because these M4 macros might be called when the current
5275 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5276 the previous removal of uses of m4_divert, which caused trouble.
5277 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5278 m4_fatal to report unrecognized %code qualifiers.
5279 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5280 push parser requests.
5281 * data/glr.c: Use b4_complain instead of m4_fatal to report
5282 non-deterministic push parser requests.
5283 Update @output usage to @output(...@) form.
5284 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5285 report missing %defines. Update @output usage to @output(...@) form.
5286 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5287 @output(...@) form.
5288 * src/main.c (main): Invoke skel_scanner_free.
5289 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5290 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5291 obstack_for_string from flex-scanner.h.
5292 (YY_DECL): Use to declare skel_lex static.
5293 (decode_at_digraphs): Remove; now handled in the new
5294 SC_AT_DIRECTIVE_ARG start condition.
5295 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5296 functions.
5297 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5298 at_directive_argv): New static globals.
5299 (INITIAL): Use fail_for_invalid_at.
5300 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5301 recognize the start of a generalized `@directive(...@)' form and
5302 start...
5303 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5304 directive args (using the new obstack_for_string), to decode the
5305 contained @ diagraphs, and to perform the directive. It recognizes
5306 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5307 @output(...@).
5308 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5309 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5310 `@,'.
5311 (scan_skel): Initialize obstack_for_string on the first call.
5312 (skel_scanner_free): New function to free obstack_for_string.
5313 * tests/input.at (Reject bad %code qualifiers): Update test output.
5314
5315 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5316
5317 Consolidate the 4 prologue alternative directives (%code, %requires,
5318 %provides, and %code-top) into a single %code directive with an
5319 optional qualifier field. Discussed at
5320 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5321 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5322 alternatives.
5323 * doc/bison.texinfo (Prologue Alternatives): Update.
5324 (Decl Summary): Update to %code "requires" and %code "provides".
5325 (Calc++ Parser): Update to %code "requires".
5326 (Table of Symbols): Remove entries for %requires, %provides, and
5327 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5328 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5329 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5330 which are skeleton-specific.
5331 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5332 declare what %code qualifiers it supports and to complain if any other
5333 qualifiers were used in the grammar.
5334 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5335 and b4_user_code([b4_percent_code_provides]) in place of
5336 b4_user_requires and b4_user_provides.
5337 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5338 Add b4_user_code([b4_percent_code_top]) and
5339 b4_user_code([b4_percent_code]).
5340 Invoke b4_check_percent_code_qualifiers.
5341 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5342 PERCENT_REQUIRES): Remove.
5343 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5344 %requires. Rewrite the %code RHS as the unqualified form defining the
5345 muscle b4_percent_code. Add another RHS for the qualified %code form,
5346 which defines muscles of the form b4_percent_code_QUALIFIER and the
5347 b4_used_percent_code_qualifiers muscle.
5348 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5349 PERCENT_REQUIRES): Remove.
5350 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5351 %code "requires" and %code "provides".
5352 * tests/input.at (Reject bad %code qualifiers): New.
5353
5354 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5355
5356 Use the new code_props interface for destructors and printers.
5357 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5358 printer_location members, and change the type of the destructor and
5359 printer members to code_props.
5360 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5361 symbol_printer_get, semantic_type_destructor_set,
5362 semantic_type_printer_set, default_tagged_destructor_set,
5363 default_tagless_destructor_set, default_tagged_printer_set,
5364 default_tagless_printer_set): Use code_props in arguments and return
5365 types in place of char const * and location.
5366 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5367 since the locations are now contained in the return of
5368 symbol_destructor_get and symbol_printer_get.
5369 * src/output.c (symbol_destructors_output, symbol_printers_output):
5370 Replace with...
5371 (symbol_code_props_output): ... this to eliminate duplicate code.
5372 (output_skeleton): Update to use symbol_code_props_output.
5373 * src/reader.c (symbol_should_be_used): Update use of
5374 symbol_destructor_get.
5375 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5376 Update uses of the various _destructor_set and _printer_set functions.
5377 * src/symtab.c: (default_tagged_destructor_location,
5378 default_tagless_destructor_location, default_tagged_printer_location,
5379 default_tagless_printer_location): Remove since we...
5380 (default_tagged_destructor, default_tagless_destructor,
5381 default_tagged_printer, default_tagless_printer): ... change the type
5382 of these to code_props.
5383 (symbol_new, semantic_type_new, symbol_destructor_set,
5384 semantic_type_destructor_set, symbol_destructor_get,
5385 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5386 symbol_check_alias_consistency, default_tagged_destructor_set,
5387 default_tagless_destructor_set, default_tagged_printer_set,
5388 default_tagless_printer_set): Update.
5389 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5390 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5391 code_props members.
5392 (symbol_print): Use SYMBOL_CODE_PRINT.
5393
5394 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5395
5396 Use the new code_props interface for rule actions.
5397 * src/symlist.h (symbol_list): Replace action, action_location, and
5398 used members with a code_props action_props member.
5399 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5400 grammar_midrule_action, grammar_current_rule_merge_set,
5401 grammar_current_rule_symbol_append, packgram): Update.
5402 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5403 * src/scan-code.l (handle_action_dollar): Update.
5404 (translate_rule_action): Remove, no longer used.
5405 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5406
5407 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5408
5409 Use the new code_props interface in parse-gram.y.
5410 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5411 Update all uses of translate_* functions to use the new code_props
5412 interface and to use gram_scanner_last_string_free and
5413 code_scanner_last_string_free where possible.
5414 (grammar_declaration): symbol_list_destructor_set and
5415 symbol_list_printer_set now perform the translation, so don't do it
5416 here. Use gram_scanner_last_string_free where possible.
5417 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5418 translate_code): Remove, no longer used.
5419 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5420 symbol_list_printer_set): Perform code translation here rather than
5421 depending on the caller to do so.
5422
5423 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5424 * src/scan-gram.h (gram_last_string): Remove declaration.
5425 * src/scan-gram.l (last_string): Declare it static.
5426
5427 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5428
5429 Encapsulate code properties and related functionality for the various
5430 destructors, printers, and actions into a code_props structure and
5431 interface. This patch merely implements code_props in scan-code.h and
5432 scan-code.l. Future patches will rewrite other modules to use it.
5433 Discussed starting at
5434 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5435 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5436 consistently initialize const structs that have an empty location
5437 field.
5438 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5439 to ensure consistency.
5440 * src/scan-code.h (code_props): New structure.
5441 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5442 function, macro, and const global variable for initializing a
5443 code_props with no code.
5444 (code_props_plain_init, code_props_symbol_action_init,
5445 code_props_rule_action_init, code_props_translate_code): The rest of
5446 the new code_props functional interface. Among other things, the init
5447 functions set the code_props kind field so that
5448 code_props_translate_code will know whether to behave like
5449 translate_symbol_action, translate_rule_action, or translate_code.
5450 These old translate functions must remain until all other modules are
5451 updated to use the new code_props interface.
5452 (code_scanner_last_string_free): New function similar to
5453 gram_scanner_last_string_free.
5454 (code_scanner_free): Add documentation.
5455 * src/scan-code.l: Implement the new interface.
5456 (code_lex): Make it static, add a code_props* argument, and remove the
5457 rule argument.
5458 (last_string): New static global similar to the one in scan-gram.l.
5459 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5460 instead of rule.
5461 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5462 code_props since Bison may one day use this information for destructors
5463 and printers.
5464 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5465 (handle_action_dollar): Use symbol_list_n_get and set used flag
5466 directly since symbol_list_n_used_set is removed.
5467 (translate_action): Add a code_props* argument and remove the rule,
5468 action, and location arguments. Pass the code_props* on to code_lex.
5469 (translate_rule_action, translate_symbol_action, translate_code):
5470 Rewrite as wrappers around the new code_props interface.
5471 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5472 it would eventually need to break the encapsulation of code_props.
5473
5474 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5475
5476 * etc/.cvsignore: New.
5477
5478 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5479
5480 Add maintainer-push-check to run maintainer-check using push parsing in
5481 place of pull parsing where available.
5482 * Makefile.am (maintainer-push-check): New.
5483 * data/bison.m4 (b4_use_push_for_pull_if): New.
5484 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5485 appropriately based on their existing values.
5486 (yypush_parse): Don't print push-parser-specific diagnostics if push
5487 parsing is being used in place of pull parsing.
5488 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5489 push.c.
5490 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5491 variable, and insert b4_use_push_for_pull_flag into muscles.
5492 * tests/Makefile.am (maintainer-push-check): New.
5493
5494 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5495
5496 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5497 (whether successful or failed) so that yypush_parse can be invoked
5498 again to start a new parse using the same yypstate.
5499 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5500 check multiple yypull_parse invocations on the same yypstate. For pull
5501 mode, extend to check multiple yyparse invocations.
5502 (Exploding the Stack Size with Alloca): Extend to try with
5503 %push-pull-parser.
5504 (Exploding the Stack Size with Malloc): Likewise.
5505
5506 * tests/calc.at (Simple LALR Calculator): Don't specify
5507 %skeleton "push.c" since %push-pull-parser implies that now.
5508 * tests/headers.at (export YYLTYPE): Don't check for the push
5509 declarations. Otherwise, this test case can't be used to see if push
5510 mode can truly emulate pull mode.
5511 * tests/input.at (Torturing the Scanner): Likewise.
5512 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5513 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5514 AT_YACC_IF, which now includes the case of push mode since %skeleton
5515 need not be used for push mode. This will be more intuitive once
5516 push.c is renamed to yacc.c.
5517
5518 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5519
5520 For push mode, convert yyparse from a macro to a function, invoke yylex
5521 instead of passing a yylexp argument to yypull_parse, and don't
5522 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5523 Discussed starting at
5524 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5525 * data/bison.m4 (b4_pull_if): New.
5526 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5527 * data/push.c: Improve M4 quoting a little.
5528 (b4_generate_macro_args, b4_parenthesize): Remove.
5529 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5530 any time a pull parser is requested.
5531 Don't #define this as a wrapper around yypull_parse. Instead, when
5532 both push and pull are requested, make it a function that does that
5533 same thing.
5534 (yypull_parse): If there's a b4_prefix, #define this to
5535 b4_prefix[pull_parse] when both push and pull are requested.
5536 Don't define this as a function unless both push and pull are
5537 requested.
5538 Remove the yylexp argument and hard-code yylex invocation instead.
5539 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5540 %push-parser.
5541 * src/getargs.c (pull_parser): New global initialized to true.
5542 * getargs.h (pull_parser): extern it.
5543 * src/output.c (prepare): Insert pull_flag muscle.
5544 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5545 (prologue_declaration): Set both push_parser and pull_parser = true for
5546 %push-pull-parser. Set push_parser = true and pull_parser = false for
5547 %push-parser.
5548 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5549 %push-parser since there's no backward-compatibility concern here.
5550 Scan %push-pull-parser.
5551 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5552 instead of %push-parser.
5553 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5554 prototype it in the module that calls yyparse.
5555 * tests/input.at (Torturing the Scanner): Likewise.
5556 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5557
5558 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5559
5560 Update etc/bench.pl. Optimize push mode a little (the yyn change
5561 deserves most of the credit).
5562 * Makefile.am (SUBDIRS): Add etc subdirectory.
5563 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5564 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5565 yytoken, yyval, and yyloc declarations to...
5566 (yyparse or yypush_parse): ... here to improve performance. For
5567 yypush_parse invocations after the first, be sure to assign yyn its old
5568 value again.
5569 (yypstate_new): Don't bother initializing the yyresult field since the
5570 initial value isn't used.
5571 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5572 remove the #define that, in push mode, set it to yyps->NAME.
5573 * etc/Makefile.am: New.
5574 * etc/bench.pl: Remove and build it instead from...
5575 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5576 "tests/bison" from the build directory by default rather than just
5577 invoking "bison" from $PATH.
5578 (calc_grammar): Update push parser code: don't declare yylval globally,
5579 don't define yyparse_wrapper, and don't #define yyparse.
5580 (bench_grammar): Update to check all working combinations of yacc.c,
5581 push.c, impure, pure, pull, and push.
5582
5583 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5584
5585 For push mode, add pull wrappers around yypush_parse.
5586 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5587 (yypull_parse): New function wrapping yypush_parse.
5588 (yyparse): New #define wrapping yypull_parse.
5589 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5590 is declared.
5591 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5592 prototype yylex in the module that calls yyparse, and don't prototype
5593 yyparse there. Otherwise, the yyparse expansion won't compile.
5594 * tests/input.at (Torturing the Scanner): Likewise.
5595
5596 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5597
5598 Enable push parsers to operate in impure mode. Thus, %push-parser no
5599 longer implies %pure-parser. The point of this change is to move
5600 towards being able to test the push parser code by running the entire
5601 test suite as if %push-parser had been declared.
5602 * data/push.c (yypush_parse): For impure mode, remove the
5603 yypushed_char, yypushed_val, and yypushed_loc arguments.
5604 Instead, declare these as local variables initialized to the global
5605 yychar, yylval, and yylloc.
5606 For the first yypush_parse invocation only, restore the initial values
5607 of these global variables when it's time to read a token since they
5608 have been overwritten.
5609 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5610 %push-parser.
5611 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5612 %pure-parser along with %push-parser since this test case was designed
5613 for pure push parsers.
5614 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5615 (AT_YACC_OR_PUSH_IF): New.
5616 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5617 add a note that it's still wrong for some cases (as it has been for a
5618 while).
5619 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5620 %push-parser no longer implies %pure-parser.
5621
5622 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5623
5624 Remove some unnecessary differences between the pull parser code and
5625 the push parser code. This patch enables yynerrs in push mode.
5626 * data/push.c: Reformat M4 a little.
5627 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5628 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5629 because push mode is on. Instead, if pure mode is on, move yynerrs
5630 to...
5631 (b4_declare_parser_state_variables): ... here.
5632 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5633 to yyps->NAME so it can be used in yypush_parse.
5634 (yypush_parse): Don't omit uses of yynerrs in push mode.
5635
5636 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5637
5638 Fix bug such that the first pushed token's value and location are
5639 sometimes overwritten (sometimes by %initial-action) before being used.
5640 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5641 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5642 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5643 more closely mimic the pull parser logic.
5644 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5645 time to read a token, which is after any initialization of yylval and
5646 yylloc.
5647 (gottoken): Rename label to...
5648 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5649 user namespace.
5650
5651 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5652
5653 Rearrange initialization of the parser state variables so that the
5654 skeleton doesn't have to have a copy for pull mode and another for push
5655 mode. This patch also fixes at least a bug such that yylloc was not
5656 initialized (with b4_location_initial_line and
5657 b4_location_initial_column) upon calling yypush_parse. However, that
5658 initialization now overwrites the first token's location;
5659 %initial-action assigning @$ already did the same thing, and both bugs
5660 will be fixed in a later patch.
5661 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5662 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5663 yyss, yyvs, yyls, and yystacksize.
5664 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5665 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5666 yylsp.
5667 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5668 yyps->NAME so it can be used in yypush_parse.
5669 (yyparse or yypush_parse): For yypush_parse, don't print the
5670 "Starting parse" diagnostic for invocations after the first.
5671 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5672 yypush_parse, only do it for the first invocation.
5673 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5674 initialization to occur in yypush_parse but only on the first
5675 invocation.
5676
5677 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5678
5679 * data/push.c: Add CPP guards around push parser declarations in both
5680 the header and the code file.
5681 In the code file, move the push parser declarations to the same place
5682 they appear in the header file.
5683 Clean up the M4 some, especially the inconsistent underquoting in
5684 some b4_c_function_def and b4_c_function_decl uses.
5685
5686 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5687
5688 Encapsulate the push parser state variables into an M4 macro so the
5689 push skeleton doesn't have to list them again for pull mode's yyparse.
5690 For push mode, remove yypush_parse's local equivalents of these
5691 variables to eliminate unnecessary copying between the two sets at
5692 run-time. This patch also fixes at least a bug related to multiple
5693 %initial-action invocations in push mode.
5694 * data/push.c (b4_declare_parser_variables): Rename to...
5695 (b4_declare_scanner_communication_variables): ... this for clarity and
5696 update both uses.
5697 (b4_declare_yyparse_variables): Remove and move its contents to the one
5698 spot where it was invoked.
5699 (b4_declare_parser_state_variables): New macro containing the parser
5700 state variables required by push mode.
5701 (struct yypstate): Replace all fields but yynew with
5702 b4_declare_parser_state_variables.
5703 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5704 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5705 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5706 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5707 parser state variable declarations with
5708 b4_declare_parser_state_variables.
5709 Don't initialize parser state variables when calling yypush_parse since
5710 yypstate_new already does that.
5711 Invoke the user's initial action only upon the first yypush_parse
5712 invocation.
5713 Remove all code that copies between the local parser state variables
5714 and the yypstate.
5715
5716 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5717
5718 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5719 prevent a name collision in a future patch where these names will
5720 sometimes be #define'd.
5721 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5722 since it no longer has the same name as the existing argument.
5723 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5724
5725 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
5726 and Joel E. Denny <jdenny@ces.clemson.edu>
5727
5728 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5729 that the argument is case-insensitive, and there's no `=' here.
5730 For the %skeleton entry, mention that %language is better.
5731 (Bison Options): Likewise for --language and --skeleton. Move the
5732 --skeleton entry so that the `Tuning the parser' section is sorted
5733 alphabetically on long options.
5734 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5735 %language directive in detail here; cross-reference the %language
5736 documentation instead.
5737 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5738 `%require "2.3b"' so that the example is always up-to-date.
5739 (Table of Symbols): Add entries for %language and %skeleton.
5740 * examples/extexi (normalize): Instead of replacing every %require
5741 argument with the current Bison version, just substitute for
5742 `@value{VERSION}'. This guarantees that we're testing what actually
5743 appears in the documentation.
5744 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5745 rather than `@VERSION@'.
5746
5747 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5748
5749 * NEWS: Reword the %language news a bit, and put it earlier.
5750
5751 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5752 Rewrite to simplify the logic.
5753 (language_argmatch): Likewise.
5754 (program_name): We now own this var.
5755 * src/getargs.h (struct bison_language): Use char[] rather than
5756 const char *.
5757
5758 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5759 Java is supported.
5760 * src/complain.c (program_name): Remove decl; no longer needed.
5761 * src/main.c (program_name): Remove; now belongs to getargs.
5762
5763 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
5764
5765 * NEWS: Document %language.
5766
5767 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5768
5769 * data/c-skel.m4, data/c++-skel.m4: New files.
5770 * data/glr.c: Complain on push parsers.
5771
5772 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5773 over %skeleton.
5774 (Decl Summary): Document %language and %skeleton.
5775 (Command line): Document -L.
5776
5777 * examples/extexi: Rewrite %require directive.
5778 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5779
5780 * src/files.c (compute_exts_from_gc): Look in language structure
5781 for .y extension.
5782 (compute_file_name_parts): Check whether .tab should be added.
5783 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5784 (language, skeleton_arg, language_argmatch): New.
5785 (long_options): Add --language.
5786 (getargs): Use skeleton_arg, add -L/--language.
5787 * src/getargs.h: Include location.h.
5788 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5789 * src/output.c (prepare): Pick default skeleton from struct language.
5790 Don't dispatch C skeletons here.
5791 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5792 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5793 * src/scan-gram.l ("%language"): New rule.
5794
5795 * tests/calc.at: Test %skeleton and %language.
5796 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5797 (AT_GLR_IF): Look for %skeleton "glr.cc".
5798 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5799 (AT_YACC_IF): Reject %language.
5800
5801 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5802
5803 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5804 since it wasn't used; only the typedef name 'semantic_type' is needed.
5805 Also, omit trailing white space.
5806
5807 * bootstrap: Sync from coreutils.
5808 (gnulib_extra_files): Add build-aux/announce.gen.
5809 (slurp): Adjust .gitignore files like .cvsignore files.
5810 * build-aux/announce-gen: Remove from CVS, since bootstrap
5811 now creates this.
5812
5813 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5814
5815 Make %push-parser imply %pure-parser. This fixes several bugs; see
5816 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5817 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5818 pure_parser = true.
5819 * data/push.c: Don't bother testing b4_push_if when deciding whether
5820 to expand b4_declare_parser_variables globally.
5821 (yypush_parse): Likewise in here.
5822
5823 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5824 (yy_reduce_print): Reformat M4 for readability.
5825
5826 2006-12-15 Bob Rossi <bob@brasko.net>
5827 and Joel Denny <jdenny@ces.clemson.edu>
5828
5829 * data/push.c (yypstate): Add typedef, and update all uses of
5830 struct yypstate to just yypstate.
5831 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5832
5833 2006-12-14 Bob Rossi <bob@brasko.net>
5834
5835 * data/push.c (yypush_parse): Declare prototype regardless of
5836 %locations option.
5837
5838 2006-12-14 Bob Rossi <bob@brasko.net>
5839
5840 * data/push.c (yyparse): Remove the prototype and the #define when in
5841 push-parser mode.
5842
5843 2006-12-13 Bob Rossi <bob@brasko.net>
5844
5845 * data/push.c (yypstate_init): Rename to...
5846 (yypstate_new): ... this and use b4_c_function_def.
5847 (yypstate_delete): New.
5848 (yypush_parse): Change parameters yynval and yynlloc to be const.
5849 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5850 yypstate_delete functions.
5851
5852 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5853
5854 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5855 strange test case titles. Reported by Bob Rossi.
5856
5857 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5858
5859 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5860 of potential ambiguities in GLR grammers.
5861
5862 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5863
5864 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5865 `bison ', use m4_index instead of m4_substr since chopping up a string
5866 containing M4-special characters causes problems here.
5867
5868 Fix a couple of bugs related to special characters in user-specified
5869 file names, and make it easier for skeletons to compute output file
5870 names with the same file name prefix as Bison-computed output file
5871 names.
5872 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5873 b4_parser_file_name and b4_spec_defines_file instead of
5874 @output_parser_name@ and @output_header_name@, which are now redundant.
5875 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5876 b4_parser_file_name, b4_spec_defines_file, and the new
5877 @basename(FILENAME@) instead of @output_parser_name@ and
5878 @output_header_name@, which inappropriately escaped the file names as
5879 C string literals.
5880 * src/files.c (all_but_ext): Remove static qualifier.
5881 (compute_output_file_names): Move `free (all_but_ext)' to...
5882 (output_file_names_free): ... here since all_but_ext is needed later.
5883 * src/files.h (all_but_ext): Extern.
5884 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5885 exactly what MUSCLE_INSERT_STRING used to do.
5886 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5887 characters are escaped properly.
5888 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5889 all_but_ext.
5890 For pkgdatadir muscle, maintain previous functionality by using
5891 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5892 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5893 digraphs would never be expanded. Hopefully no one has M4-special
5894 characters in his Bison installation path.
5895 * src/scan-skel.l: Don't parse @output_header_name@ and
5896 @output_parser_name@ anymore since they're now redundant.
5897 In @output, use decode_at_digraphs.
5898 Parse a new @basename command that invokes last_component.
5899 (decode_at_digraphs): New.
5900 (BASE_QPUTS): Remove unused.
5901 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5902 (Output file name): New tests.
5903
5904 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5905
5906 Warn about output files that are generated by the skeletons and that
5907 conflict with other output files.
5908 * data/glr.c: Don't generate the header file here when glr.cc does.
5909 * src/files.c (file_names, file_names_count): New static globals.
5910 (compute_output_file_names): Invoke output_file_name_check for files
5911 not generated by the skeletons and remove existing checks.
5912 (output_file_name_check): New function that warns about conflicting
5913 output file names.
5914 (output_file_names_free): Free file_names.
5915 * src/files.h (output_file_name_check): Declare.
5916 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5917 the skeletons.
5918 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5919 (Conflicting output files): New tests.
5920
5921 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5922
5923 * doc/bison.texinfo: Fix a couple of typos.
5924
5925 2006-12-08 Bob Rossi <bob@brasko.net>
5926
5927 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5928 Rename to...
5929 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5930 update all uses.
5931 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5932 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5933 local pv.
5934 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5935 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5936
5937 2006-12-07 Bob Rossi <bob@brasko.net>
5938 and Joel Denny <jdenny@ces.clemson.edu>
5939
5940 * data/push.c (yypvarsinit): Change return type from void* to struct
5941 yypvars*. No longer cast to void* on return.
5942 (struct yypvars): Remove yylen since it need not be remembered between
5943 yypushparse invocations.
5944 (yypushparse): Don't copy between yylen and pv->yylen.
5945
5946 2006-12-05 Bob Rossi <bob@brasko.net>
5947
5948 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5949 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5950 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5951 (struct yypvars): Remove b4_declare_parser_variables.
5952 (yypvarsinit): Remove init code for removed variables.
5953 (global scope): Do not declare b4_declare_parser_variables if
5954 push or pure mode.
5955 (yypushparse): Add b4_declare_parser_variables.
5956 Init new local variables, and remove init code for removed
5957 yypvars variables.
5958 (yyparse): Delete.
5959 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5960 and yyparse for other modes.
5961 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5962 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5963 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5964 (AT_PURE_LEX_IF): True if pure or push parser.
5965
5966 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5967
5968 Document Yacc prologue alternatives and default %destructor's and
5969 %printer's as experimental. Don't mention Java yet. Discussed at
5970 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5971 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5972 (2.3a): Annotate this entry to say the old forms of these features were
5973 also experimental.
5974 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
5975 Table of Symbols): Say they're experimental. Comment out any mention
5976 of Java (we'll want this back eventually).
5977
5978 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5979
5980 Support a file name argument to %defines. Deprecate `=' in
5981 %file-prefix, %name-prefix, and %output. Discussed at
5982 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5983 * NEWS (2.3a+): Mention.
5984 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
5985 form of %defines, and remove `=' from entries for %file-prefix,
5986 %name-prefix, and %output.
5987 * src/parse-gram.y (prologue_declaration): Implement.
5988 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5989 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5990 all but one occurrence of %name-prefix.
5991 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5992 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5993 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5994 occurrence of each of %file-prefix and %output. Add check for %defines
5995 with argument.
5996 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5997 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5998 Remove the `=' from %output.
5999
6000 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6001
6002 Don't escape $ in test case titles since Autoconf 2.61 now does that
6003 correctly.
6004 * tests/actions.at (Default %printer and %destructor are not for error
6005 or $undefined): Here.
6006 (Default %printer and %destructor are not for $accept): Here.
6007 * tests/input.at (Invalid $n and @n): Here.
6008
6009 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6010
6011 Rename <!> to <>. Discussed starting at
6012 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6013 * NEWS (2.3a+): Update.
6014 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
6015 Update.
6016 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6017 * src/scan-gram.l (INITIAL): Implement.
6018 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6019 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6020 comment.
6021 * tests/actions.at (Default tagless %printer and %destructor,
6022 Default tagged and per-type %printer and %destructor,
6023 Default %printer and %destructor are not for error or $undefined,
6024 Default %printer and %destructor are not for $accept,
6025 Default %printer and %destructor for mid-rule values): Update.
6026 * tests/input.at (Default %printer and %destructor redeclared,
6027 Unused values with default %destructor): Update.
6028
6029 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6030
6031 Don't let %prec take a nonterminal.
6032 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6033 token.
6034 * tests/input.at (%prec takes a token): New test checking that %prec
6035 won't take a nonterminal.
6036
6037 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6038
6039 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6040 it was double-quoted.
6041 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6042 grammar is maintained with Bison's highest standards.
6043 * src/getargs.c: Fix some typos in Doxygen comments.
6044
6045 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6046
6047 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6048 later. Reported by Paul Eggert in
6049 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6050 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6051 * src/scan-code.l (translate_action): Don't bother invoking
6052 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6053 (code_scanner_free): Instead of invoking
6054 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6055 which frees more.
6056 * src/scan-gram.l (gram_scanner_free): Likewise.
6057 * src/scan-skel.l (scan_skel): Likewise.
6058
6059 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6060
6061 * src/files.c (tr): Change return type to void.
6062 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6063 has been called previously for the same key.
6064 (muscle_find): Return storage instead of value so that
6065 --enable-gcc-warnings doesn't produce warnings that the return discards
6066 const. aver that the value and storage are the same since storage
6067 could potentially be NULL when value is not.
6068 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6069 same as 0.
6070
6071 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6072
6073 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6074 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6075 us a slightly cleaner distribution, and also works.
6076 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6077 gnulib changes.
6078
6079 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6080 and Paul Eggert <eggert@cs.ucla.edu>
6081
6082 Don't let Bison leak memory except when it complains.
6083 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6084 (spec_defines_file, dir_prefix): Now char *, not const char *,
6085 since they are freed.
6086 * src/files.c: Likewise.
6087 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6088 Likewise.
6089 (tr): Now operates in-place. All uses changed.
6090 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6091 values.
6092 (compute_file_name_parts, compute_output_file_names): Don't store
6093 read-only data in variables that will be freed.
6094 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6095 src_extension, and header_extension.
6096 (output_file_names_free): New public function to free
6097 spec_verbose_file, spec_graph_file, spec_defines_file,
6098 parser_file_name, and dir_prefix.
6099 * src/getargs.c (getargs): Don't store read-only data in variables that
6100 will be freed.
6101 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6102 (which previously existed but was unused), and quotearg_free.
6103 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6104 * src/muscle_tab.c: Likewise.
6105 (muscle_entry): Make the value char const *,
6106 and add a new storage member that is char * and can be freed.
6107 (muscle_entry_free): New private function.
6108 (muscle_init): Use it instead of free.
6109 (muscle_insert, muscle_grow): Update and use new storage member.
6110 (muscle_code_grow): Free the string passed to muscle_grow
6111 since it's not needed anymore.
6112 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6113 add a new `char *code' member.
6114 ("{...}"): Declare semantic type as code.
6115 * src/scan-code.h (translate_rule_action):
6116 (translate_symbol_action, translate_code, translate_action): Return
6117 `char const *' rather than `char *' since external code should not free
6118 these strings.
6119 * src/scan-code.l: Likewise.
6120 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6121 which is "{...}" in the parser.
6122 * tests/Makefile.am (maintainer-check-valgrind): Set
6123 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6124 Valgrind.
6125 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6126 complain.
6127 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6128 expecting a non-zero exit status sets --leak-check=summary and
6129 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6130 this case, and we don't want to hear about it.
6131
6132 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6133
6134 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6135 instead of from the template, to simplify configuration a bit.
6136 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6137 and m4/wint_t.m4, as they are needed with the latest gnulib.
6138
6139 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6140
6141 Disable unset/unused mid-rule value warnings by default, and recognize
6142 --warnings=midrule-values to enable them. Discussed starting at
6143 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6144 * NEWS (2.3a+): Mention.
6145 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6146 warnings): Add entry for midrule-values subargument.
6147 * src/reader.c (symbol_should_be_used): Don't return true just because
6148 the value is a set/used mid-rule value unless
6149 --warnings=midrule-values was specified.
6150 * tests/input.at (Unused values, Unused values before symbol
6151 declarations): Run tests with and without --warnings=midrule-values.
6152
6153 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6154 than LIST_FREE directly.
6155
6156 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6157
6158 Finish implementing --warnings=error, which should not be implied by
6159 --warnings=all (or by its synonyms -W and --warnings without
6160 subarguments).
6161 * src/complain.c (set_warning_issued): New function to report that
6162 warnings are being treated as errors and to record an error if so.
6163 Invoke...
6164 (warn_at, warn): ... here.
6165 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6166 "error - warnings are errors" does not appear above "all - all of the
6167 above".
6168 (getargs): For -W and --warnings without subarguments, don't let
6169 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6170 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6171
6172 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6173
6174 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6175 empty subargument list. For example: `bison --warnings= parser.y'.
6176
6177 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6178
6179 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6180 the parser header file so that gcc doesn't warn.
6181
6182 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6183
6184 Split the default %destructor/%printer into two kinds: <*> and <!>.
6185 Discussed starting at
6186 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6187 * NEWS (2.3a+): Mention.
6188 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6189 previous change today related to mid-rules.
6190 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6191 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6192 (TYPE_TAG_ANY): Add as <*>.
6193 (TYPE_TAG_NONE): Add as <!>.
6194 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6195 for <*> and <!>.
6196 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6197 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6198 * src/symlist.c (symbol_list_default_new): Split into tagged and
6199 tagless versions.
6200 (symbol_list_destructor_set, symbol_list_printer_set): Split
6201 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6202 SYMLIST_DEFAULT_TAGLESS.
6203 * src/symlist.h: Update symbol_list_default*_new prototypes.
6204 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6205 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6206 * src/symtab.c (default_destructor, default_destructor_location,
6207 default_printer, default_printer_location): Split each into tagged and
6208 tagless versions.
6209 (symbol_destructor_get, symbol_destructor_location_get,
6210 symbol_printer_get, symbol_printer_location_get): Implement tagged
6211 default and tagless default cases.
6212 (default_destructor_set, default_printer_set): Split each into tagged
6213 and tagless versions.
6214 * src/symtab.h: Update prototypes.
6215 * tests/actions.at (Default %printer and %destructor): Rename to...
6216 (Default tagless %printer and %destructor): ... this, and extend.
6217 (Per-type %printer and %destructor): Rename to...
6218 (Default tagged and per-type %printer and %destructor): ... this, and
6219 extend.
6220 (Default %printer and %destructor for user-defined end token): Extend.
6221 (Default %printer and %destructor are not for error or $undefined):
6222 Update.
6223 (Default %printer and %destructor are not for $accept): Update.
6224 (Default %printer and %destructor for mid-rule values): Extend.
6225 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6226 (Unused values with default %destructor): Extend.
6227
6228 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6229
6230 Don't apply the default %destructor/%printer to an unreferenced midrule
6231 value. Mentioned at
6232 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6233 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6234 like $@n instead of just @n so that the default %destructor/%printer
6235 logic doesn't see them as user-defined symbols.
6236 (symbol_is_dummy): Check for both forms of the name.
6237 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6238 name for which the midrule value is referenced in any action.
6239 * tests/actions.at (Default %printer and %destructor for mid-rule
6240 values): New test.
6241 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6242 for change to dummy symbol names.
6243
6244 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6245
6246 Warn about unset midrule $$ if the corresponding $n is used.
6247 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6248 $n usage.
6249 (packgram): Before invoking grammar_rule_check on any rule, make sure
6250 all actions have already been scanned in order to set `used' flags.
6251 Otherwise, checking that a midrule's $$ is set will not always work
6252 properly because the midrule check must forward-reference the midrule's
6253 parent rule.
6254 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6255 warning.
6256
6257 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6258
6259 More improvements to the documentation of the prologue alternatives:
6260 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6261 Bison manual.
6262 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6263 some text to clarify the relative importance of the new directives and
6264 to show how these directives may be viewed as code labels.
6265
6266 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6267
6268 Similar to the recently removed %before-header, add %code-top as the
6269 alternative to the pre-prologue. Mentioned at
6270 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6271 Also, let the prologue alternatives appear in the grammar section.
6272 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6273 (prologue_declaration): Move the existing prologue alternatives to...
6274 (grammar_declaration): ... here and add %code-top.
6275 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6276
6277 Clean up and extend documentation for the prologue alternatives.
6278 * NEWS (2.3a+): Describe prologue alternatives.
6279 * doc/bison.texinfo (Prologue): Move discussion of prologue
6280 alternatives to...
6281 (Prologue Alternatives): ... this new section, and extend it to discuss
6282 all 4 directives in detail.
6283 (Table of Symbols): Clean up discussion of prologue alternatives and
6284 add %code-top.
6285
6286 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6287
6288 DJGPP specific issues.
6289
6290 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6291 config.bat accordingly.
6292 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6293 * djgpp/config.site: Likewise.
6294
6295 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
6296
6297 Replace %*-header with %provides, %requires, %code. See discussion at
6298 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6299
6300 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6301 (b4_user_start_header): Remove.
6302 * data/glr.c: Use new macros instead of b4_*start_header
6303 and b4_*end_header.
6304 * data/glr.cc: Likewise.
6305 * data/lalr1.cc: Likewise.
6306 * data/push.c: Likewise.
6307 * data/yacc.c: Likewise.
6308
6309 * doc/bison.texinfo: Remove %before-header, rename
6310 %{start,end,after}-header to %requires, %provides, %code.
6311
6312 * src/parse-gram.y: Likewise (also rename token names accordingly).
6313 * src/scan-gram.l: Likewise.
6314 * tests/actions.at: Likewise.
6315
6316 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6317
6318 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6319 Problem reported by Joel E. Denny.
6320
6321 2006-10-14 Jim Meyering <jim@meyering.net>
6322
6323 (Sync from coreutils.)
6324 Work also when the working directory (with e.g. coreutils sources)
6325 is version controlled with git, rather than CVS.
6326 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6327 rather than CVS.
6328 In messages and comments, say e.g., "checked-out sources",
6329 rather than "CVS sources".
6330 (version_controlled_file): New function. Work for git as well as
6331 for CVS. Don't use grep's -q option.
6332 (slurp): Call it here, in place of CVS-specific code.
6333
6334 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6335
6336 Fix testsuite for ./configure --enable-gcc-warnings:
6337 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6338 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6339 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6340 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6341 * test/regression.at (Diagnostic that expects two alternatives):
6342 Likewise.
6343
6344 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6345
6346 * bootstrap.conf (gnulib_modules): Add config-h.
6347 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6348 worry about HAVE_CONFIG_H.
6349 * lib/abitset.c: Likewise.
6350 * lib/bitset.c: Likewise.
6351 * lib/bitset_stats.c: Likewise.
6352 * lib/bitsetv-print.c: Likewise.
6353 * lib/bitsetv.c: Likewise.
6354 * lib/ebitset.c: Likewise.
6355 * lib/get-errno.c: Likewise.
6356 * lib/lbitset.c: Likewise.
6357 * lib/subpipe.c: Likewise.
6358 * lib/timevar.c: Likewise.
6359 * lib/vbitset.c: Likewise.
6360 * lib/bitset.c: Include "bitset.h" first, to test interface.
6361 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6362 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6363 * lib/bitsetv.c: Include "bitsetv.h" first.
6364 * lib/get-errno.c: Include "get-errno.h" first.
6365 * m4/.cvsignore: Add config-h.m4.
6366 * tests/actions.at (Default %printer and %destructor for ...):
6367 Adjust expected line numbers in output to reflect removal of #if
6368 HAVE_CONFIG_H lines.
6369 * tests/glr-regression.at (Missed %merge type warnings when ...):
6370 Likewise.
6371 * tests/regression.at (Braced code in declaration in rules section):
6372 Likewise.
6373 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6374 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6375 Include <config.h> unconditionally.
6376
6377 * bootstrap: Sync from coreutils, as follows:
6378
6379 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6380
6381 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6382 variable was sometimes used without being initialized. This
6383 messed up the installation of the INSTALL file in some cases.
6384
6385 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6386
6387 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6388 --copy. Inspired by a suggestion from Bruno Haible.
6389
6390 2006-10-03 Jim Meyering <jim@meyering.net>
6391
6392 * bootstrap: Undo last change to this file, since now gnulib-tool
6393 sticks with the automake default in generating dependencies.
6394
6395 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6396
6397 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6398 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6399
6400 * doc/bison.1: Add copyright notice.
6401
6402 * data/glr.c: Don't include <stdarg.h>; not used.
6403
6404 * NEWS: The -g and --graph options now output graphs in Graphviz
6405 DOT format, not VCG format.
6406 * doc/bison.1: Likewise.
6407 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6408 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6409 of this change in
6410 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6411 * TODO: Remove Graphviz entry.
6412 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6413 remove vcg.c, vcg.h, vcg_defaults.h.
6414 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6415 * src/graphviz.c, src/graphviz.h: New files.
6416 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6417 * src/files.h: Make comment more generic.
6418 * src/main.c (main): Likewise.
6419 * src/print_graph.h: Likewise.
6420 * src/getargs.c (usage): Make usage description more generic.
6421 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6422 (static_graph, fgraph): Remove. All uses changed to pass
6423 arguments instead of sharing a static var.
6424 (print_core, print_actions, print_state, print_graph):
6425 Output graphviz format rather than VCG format.
6426 * tests/.cvsignore: Remove *.vcg; add *.dot.
6427 * tests/output.at: Expect *.dot files, not *.vcg files.
6428
6429 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6430 accommodates the 2006-10-08 change.
6431
6432 2006-10-11 Bob Rossi <bob@brasko.net>
6433
6434 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6435 (b4_yyssa, b4_yyerror_range): New macros.
6436 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6437 (yypvarsinit): Remove init of removed fields.
6438 (yypushparse): Remove use of removed fields; use new macros instead.
6439
6440 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6441
6442 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6443 in a push parser. Reindent slightly to match yacc.c better.
6444
6445 2006-10-11 Bob Rossi <bob@brasko.net>
6446
6447 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6448 yymsg_alloc fields.
6449 (yypvarsinit, yypushparse): Remove init of removed fields.
6450 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6451
6452 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6453
6454 * THANKS: Add Paolo Bonzini and Bob Rossi.
6455
6456 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6457
6458 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6459 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6460 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6461 b4_define_user_cde and uses): Remove.
6462 (b4_comment, b4_prefix, b4_sync_start): New.
6463 * data/bison.m4: New file, with most of the content removed from c.m4.
6464 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6465 * src/output.c (output_skeleton): Pass bison.m4.
6466 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6467 only if specified.
6468
6469 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6470
6471 Fix test failure reported by Tom Lane in
6472 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6473 and try to make such failures easier to catch in the future.
6474 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6475 that's now the caller's responsibility.
6476 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6477 Set yychar = YYEOF if it's negative.
6478 * tests/actions.at (yylex): Abort if asked to read past EOF.
6479 * tests/conflicts.at (yylex): Likewise.
6480 * tests/cxx-type.at (yylex): Likewise.
6481 * tests/glr-regression.at (yylex): Likewise.
6482 * tests/input.at (yylex): Likewise.
6483 * tests/regression.at (yylex): Likewise.
6484 * tests/torture.at (yylex): Likewise.
6485
6486 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6487
6488 Fix problems with translating English-language diagnostics.
6489 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6490 respect to bison-runtime pot generation. The YY_ stuff
6491 wasn't being captured.
6492 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6493 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6494 * runtime-po/POTFILES.in: Add data/push.c.
6495
6496 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6497
6498 Merge bootstrap changes from coreutils.
6499
6500 2006-09-28 Jim Meyering <jim@meyering.net>
6501
6502 Automatically generated dependencies are important even
6503 when all of the sources in a directory come from gnulib.
6504 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6505 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6506
6507 2006-09-23 Jim Meyering <jim@meyering.net>
6508
6509 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6510
6511 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6512
6513 * bootstrap: Add support for --force.
6514 (usage): New function. Describe usage less tersely.
6515 (CVS_only_file): New var.
6516
6517 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6518
6519 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6520 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6521 Adjust white space and comments to match GNU style better.
6522
6523 2006-09-20 Bob Rossi <bob@brasko.net>
6524
6525 * data/push.c (yyresult_get): Remove function.
6526 (YYPUSH_MORE): Add #define.
6527 (yypushparse): Modify return value.
6528
6529 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6530
6531 * stamp-h.in: Remove; no longer needed.
6532 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6533 Remove config.h, config.hin, intl (no longer created).
6534 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6535 stamp-h1.
6536
6537 Sync bootstrap from coreutils, as follows:
6538
6539 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6540
6541 * bootstrap (symlink_to_gnulib): New function.
6542 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6543 to copies-of-gnulib.
6544 (cp_mark_as_generated, slurp, gnulib_files):
6545 Avoid making a copy if it's the same as the old version.
6546 (gnulib_files): Add support for this variable (used by Bison).
6547
6548 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6549
6550 * src/getargs.c (usage): Rework to use conventions similar to
6551 coreutils, to make translation a bit easier and the code a bit
6552 smaller. Problem reported by Tim Van Holder.
6553
6554 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6555
6556 Use some of gnulib's new modules, taken from coreutils.
6557
6558 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6559 * bootstrap.conf: New file.
6560 (gnulib_modules): Add configmake, inttypes, unistd.
6561 (XGETTEXT_OPTIONS): Add complain, complain_at,
6562 fatal, fatal_at, warn, warn_at, unexpected_end.
6563 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6564 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6565 (gl_EARLY): Add.
6566 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6567 (gl_INIT): Add
6568 (GNULIB_AUTOCONF_SNIPPET): Remove.
6569 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6570 the pickiest.
6571 * lib/.cvsignore: Add inttypes_.h.
6572 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6573 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6574 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6575 no-longer-necessary initializations.
6576 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6577 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6578 use the unistd module.
6579 * src/system.h: Likewise.
6580 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6581 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6582 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6583 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6584 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6585 * src/system.h: Include inttypes.h unconditionally, now that we
6586 use the inttypes module. Don't bother to include stdint.h, since
6587 inttypes.h now does that for us.
6588 (LOCALEDIR): Remove, now that we use the configmake module.
6589 * src/getargs.c: Include configmake.h.
6590 * src/main.c: Likewise.
6591 * src/output.c: Likewise.
6592 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6593 not from $abs_top_builddir, since config.h moved.
6594
6595
6596 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6597 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6598
6599 * src/parse-gram.y (symbol_declaration): Don't put statements
6600 before declarations; it's not portable to C89.
6601 * src/scan-code.l (handle_action_at): Likewise.
6602
6603 * src/scan-code.l: Always initialize braces_level; the old code
6604 left it uninitialized and therefore had undefined behavior.
6605
6606 Don't attempt to redefine 'assert', since it runs afoul of
6607 systems where standard headers (mistakenly) include <assert.h>.
6608 Instead, define and use our own alternative, called 'aver'.
6609 * src/reader.c: Don't include assert.h, since we no longer
6610 use assert.
6611 * src/scan-code.l: Likewise.
6612 * src/system.h (assert): Remove, replacing with....
6613 (aver): New function, taking a bool arg. All uses changed.
6614 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6615 not merely an integer.
6616
6617 2006-09-15 Bob Rossi <bob@brasko.net>
6618
6619 Add support for push parsing. Based on the original work of
6620 Odd Arild Olsen <oao@fibula.no>.
6621 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6622 * data/c.m4 (YYPUSH): New.
6623 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6624 * data/push.c: New file.
6625 * src/getargs.c (push_parser): New var.
6626 * src/getargs.h (push_parser): New declaration.
6627 * src/output.c (prepare): Add macro insertion of `push_flag'.
6628 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6629 (prologue_declaration): Parse %push-parser.
6630 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6631 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6632 list of removed lines from the traces observed.
6633 (AT_CHECK_CALC_LALR): Added push parser tests.
6634
6635 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6636
6637 * NEWS: Version 2.3a.
6638 * configure.ac (AC_INIT): Likewise.
6639
6640 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6641 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6642 due to header ordering dependencies. I don't know why the #define
6643 was there.
6644
6645 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6646 runtime cost when YYDEBUG is not defined, and so that some tests
6647 that used to fail now work. Problem and initial suggestion by
6648 Paolo Bonzini.
6649 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6650 * data/glr.cc (b4_parser_class_name):
6651 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6652 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6653 (yydebug_) [YYDEBUG]: New member.
6654 (yycdebug_): Now defined only if YYDEBUG.
6655 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6656 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6657 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6658 if YYYDEBUG.
6659 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6660 Define only if YYDEBUG.
6661 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6662 set_debug_level.
6663 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6664 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6665 AT_CHECK_CALC_GLR_CC that are working now.
6666
6667 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6668
6669 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6670 We don't need them in glr.cc, and glr.c defines them.
6671 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6672 assumes that defining it to anything is the same as defining
6673 it to 1. Problem reported by Paolo Bonzini.
6674
6675 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6676
6677 * data/c.m4 (b4_null, b4_case): Define.
6678 * src/output.c (prepare_symbols): Use b4_null.
6679 (user_actions_output): Use b4_case.
6680
6681 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6682
6683 * data/glr.c (b4_shared_declarations): Put start-header first,
6684 before any #includes that we generate, so that feature-test
6685 macros work. Problem reported by Michael Deutschmann in
6686 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6687 * data/lalr1.cc: Likewise.
6688 * doc/bison.texinfo (Prologue): Document that feature-test macros
6689 should be defined before any Bison declarations.
6690 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6691 that depend on location.hh after, not before, Bison decls, since
6692 we now include location.hh after the first user prologue.
6693
6694 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6695 Sander Brandenburg in
6696 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6697 Also, fix minor white space and comment issues.
6698 (Prologue): Mention that it's better to define feature-test macros
6699 before Bison declarations. Problem reported by Michael Deutschmann.
6700
6701 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6702 by Jim Meyering.
6703 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6704 This adjusts to recent gnulib changes.
6705
6706 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6707
6708 Finish implementation of per-type %destructor/%printer. Discussed
6709 starting at
6710 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6711 and
6712 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6713 * NEWS (2.3+): Add a description of this feature to the default
6714 %destructor/%printer description.
6715 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6716 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6717 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6718 list node contains a semantic type.
6719 * src/symtab.c, src/symtab.h: Extend with a table that associates
6720 semantic types with their %destructor's and %printer's.
6721 (semantic_type_from_uniqstr, semantic_type_get,
6722 semantic_type_destructor_set, semantic_type_printer_set): New functions
6723 composing the public interface of that table.
6724 (symbol_destructor_get, symbol_destructor_location_get,
6725 symbol_printer_get, symbol_printer_location_get): If there's no
6726 per-symbol %destructor/%printer, look up the per-type before trying
6727 the default.
6728 * tests/actions.at (Per-type %printer and %destructor): New test case.
6729 * tests/input.at (Default %printer and %destructor redeclared):
6730 Extend to check that multiple occurrences of %symbol-default in a
6731 single %destructor/%printer declaration is an error.
6732 (Per-type %printer and %destructor redeclared, Unused values with
6733 per-type %destructor): New test cases.
6734
6735 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6736
6737 Require default %destructor/%printer to be declared using
6738 %symbol-default instead of an empty symbol list, and start working on
6739 new per-type %destructor/%printer. Discussed at
6740 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6741 * NEWS (2.3+): Add %symbol-default to example.
6742 * bison.texinfo (Freeing Discarded Symbols): Likewise.
6743 (Table of Symbols): Add entry for %symbol-default.
6744 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6745 (generic_symlist, generic_symlist_item): New nonterminals for creating
6746 a list in which each item is a symbol, semantic type, or
6747 %symbol-default.
6748 (grammar_declaration): Use generic_symlist in %destructor and %printer
6749 declarations instead of symbols.1 or an empty list.
6750 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6751 for changes to symbol_list.
6752 * src/reader.c: Update for changes to symbol_list.
6753 * src/scan-code.l: Likewise.
6754 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6755 * src/symlist.c, src/symlist.h: Extend such that a list node may
6756 represent a semantic type or a %symbol-default in addition to just an
6757 ordinary symbol. Add switched functions for setting %destructor's and
6758 %printer's.
6759 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6760 %destructor/%printer declarations.
6761
6762 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6763
6764 Whether the default %destructor/%printer applies to a particular symbol
6765 isn't a question of whether the user *declares* that symbol (in %token,
6766 for example). It's a question of whether the user by any means
6767 *defines* the symbol at all (by simply using a char token, for
6768 example). $end is defined by Bison whereas any other token with token
6769 number 0 is defined by the user. The error token is always defined by
6770 Bison regardless of whether the user declares it with %token, but we
6771 may one day let the user define error as a nonterminal instead.
6772 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6773 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6774 the meaning of "user-defined".
6775 * tests/actions.at (Default %printer and %destructor for user-declared
6776 end token): Rename to...
6777 (Default %printer and %destructor for user-defined end token): ...
6778 this.
6779
6780 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6781 computation of whether to apply the default, don't maintain a list of
6782 every Bison-defined symbol. Instead, just check for a first character
6783 of '$', which a user symbol cannot have, and check for the error token.
6784
6785 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6786
6787 Don't apply the default %destructor or %printer to the error token,
6788 $undefined, or $accept. This change fits the general rule that the
6789 default %destructor and %printer are only for user-declared symbols,
6790 and it solves several difficulties that are described in the new test
6791 cases listed below.
6792 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6793 * tests/actions.at (Default %printer and %destructor are not for error
6794 or $undefined, Default %printer and %destructor are not for $accept):
6795 New test cases.
6796
6797 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6798
6799 Allow %start after the first rule.
6800 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6801 when parsing the first rule.
6802 (check_and_convert_grammar): Search for it here after all grammar
6803 declarations have been parsed. Skip midrules, which have dummy LHS
6804 nonterminals.
6805 * src/symtab.c (symbol_is_dummy): New function.
6806 * src/symtab.h (symbol_is_dummy): Declare it.
6807 * tests/input.at (%start after first rule): New test.
6808
6809 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6810
6811 Redo some of the previous commit: add back the ability to use
6812 non-aliased/undeclared string literals since it might be useful to
6813 those declaring %token-table.
6814 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6815 commit: don't worry about complaints from symbols_pack.
6816 * src/symtab.c (symbol_new, symbol_class_set,
6817 symbol_check_alias_consistency): Undo changes in previous commit: count
6818 each string literal as a new symbol and token, assign it a symbol
6819 number, and don't complain about non-aliased string literals.
6820 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6821 and token counts but does still set aliased tokens to the same number,
6822 symbol_pack_processor now leaves empty slots in the symbols array.
6823 Remove those slots.
6824 * tests/regression.at (Undeclared string literal): Remove test case
6825 added in previous commit since non-aliased string literals are allowed
6826 again.
6827 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6828 remove unnecessary string literal declarations.
6829 * tests/sets.at (Firsts): Likewise.
6830
6831 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6832
6833 Don't allow an undeclared string literal, but allow a string literal to
6834 be used before its declaration.
6835 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6836 symbols_pack complained.
6837 * src/symtab.c (symbol_new): Don't count a string literal as a new
6838 symbol.
6839 (symbol_class_set): Don't count a string literal as a new token, and
6840 don't assign it a symbol number since symbol_make_alias does that.
6841 (symbol_make_alias): It's not necessary to decrement the symbol and
6842 token counts anymore. Don't assume that an alias declaration occurs
6843 before any uses of the identifier or string, and thus don't assert that
6844 one of them has the highest symbol number so far.
6845 (symbol_check_alias_consistency): Complain if there's a string literal
6846 that wasn't declared as an alias.
6847 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6848 symbol_pack asserts that every token has been assigned a symbol number
6849 although undeclared string literals have not.
6850 * tests/regression.at (String alias declared after use, Undeclared
6851 string literal): New test cases.
6852 (Characters Escapes, Web2c Actions): Declare string literals as
6853 aliases.
6854 * tests/sets.at (Firsts): Likewise.
6855
6856 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6857
6858 In the grammar scanner, STRING_FINISH unclosed constructs and return
6859 them to the parser in order to improve error messages.
6860 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6861 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6862 * tests/input.at (Unclosed constructs): New test case.
6863 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6864 seen.
6865
6866 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6867 unused global.
6868
6869 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6870
6871 Handle string aliases for character tokens correctly.
6872 * src/symtab.c (symbol_user_token_number_set): If the token has an
6873 alias, check and set its alias's user token number instead of its own,
6874 which is set to indicate the alias. Previously, every occurrence of
6875 the character token in the grammar overwrote that alias indicator with
6876 the character code.
6877 * tests/input.at (String aliases for character tokens): New test.
6878
6879 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6880
6881 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6882
6883 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6884
6885 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6886 to prevent failures when building on older platforms.
6887 Check for autopoint failure.
6888 Set XGETTEXT_OPTIONS to values that check for C format strings,
6889 so that translators are warned about them (this also helps
6890 prevent core dumps).
6891
6892 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6893 function, since it simplifies our code a bit.
6894
6895 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6896 rather than -W, so we don't get bogus warnings about sign comparisons.
6897 Add -Wpointer-arith, since that warning is useful (it reports code
6898 that does not conform to C89 and that some compilers reject).
6899 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6900 since it's no longer needed.
6901
6902 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6903
6904 Clean up scanners a bit.
6905 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6906 definitions so gcc won't warn when obstack_for_string is unused.
6907 * src/scan-code.l: config.h and system.h are already #include'd by
6908 scan-code-c.c, so get rid of them here.
6909 * src/scan-gram.l: Likewise.
6910 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6911 definitions rather than duplicating the rest of it.
6912 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6913
6914 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6915
6916 Suppress signed/unsigned comparison warnings for yycheck.
6917 * data/c.m4 (b4_safest_int_type): New macro.
6918 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6919 a signed int type, cast it to b4_safest_int_type first.
6920 * data/yacc.c: Likewise.
6921 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6922 also overwritten.
6923
6924 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6925
6926 * doc/bison.texinfo: Fix some typos.
6927
6928 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6929
6930 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6931 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6932
6933 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6934 the latest gnulib does this a different way.
6935 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6936 translation was patched, so stop omitting it.
6937
6938 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6939
6940 Enable declaration of default %printer/%destructor. Make the parser
6941 use these for all user-declared grammar symbols for which the user does
6942 not declare a specific %printer/%destructor. Thus, the parser uses it
6943 for token 0 if the user declares it but not if Bison generates it as
6944 $end. Discussed starting at
6945 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6946 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6947 and
6948 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6949 * NEWS (2.3+): Mention.
6950 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6951 declare a %destructor for a mid-rule's semantic value. It's just
6952 impossible to declare one specific to it.
6953 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6954 code. Describe default %destructor form.
6955 * src/parse-gram.y (grammar_declaration): Parse default
6956 %printer/%destructor declarations.
6957 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6958 and symbol_destructor_location_get rather than accessing the destructor
6959 and destructor_location members of struct symbol.
6960 (symbol_printers_output): Likewise but for %printer's.
6961 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6962 again.
6963 * src/symtab.c (default_destructor, default_destructor_location,
6964 default_printer, default_printer_location): New static global
6965 variables to record the default %destructor and %printer.
6966 (symbol_destructor_get, symbol_destructor_location_get,
6967 symbol_printer_get, symbol_printer_location_get): New functions to
6968 compute the appropriate %destructor and %printer for a symbol.
6969 (default_destructor_set, default_printer_set): New functions to set the
6970 default %destructor and %printer.
6971 * src/symtab.h: Prototype all those new functions.
6972 * tests/actions.at (Default %printer and %destructor): New test to
6973 check that the right %printer and %destructor are called, that they're
6974 not called for $end, and that $$ and @$ work correctly.
6975 (Default %printer and %destructor for user-declared end token): New
6976 test to check that the default %printer and %destructor are called for
6977 a user-declared end token.
6978 * tests/input.at (Default %printer and %destructor redeclared, Unused
6979 values with default %destructor): New tests to check related grammar
6980 warnings and errors.
6981
6982 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6983
6984 Clean up handling of %destructor for the end token (token 0).
6985 Discussed starting at
6986 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6987 and
6988 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6989
6990 Make the skeletons consistent in how they pop the end token and invoke
6991 its %destructor.
6992 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6993 state, which has token number 0, since this would invoke the
6994 %destructor for the end token.
6995 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6996 until after shifting the end token, or else it won't be popped.
6997 * data/yacc.c (yyparse): Likewise.
6998
6999 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7000 it's the end token. Upon termination, destroy an unshifted lookahead
7001 even when it's the end token.
7002 * data/lalr1.cc (yy::parser::parse): Likewise.
7003 * data/yacc.c (yyparse): Likewise.
7004
7005 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7006 value warnings for the end token when the user gives the end token a
7007 %destructor.
7008
7009 * tests/actions.at (Printers and Destructors): Test all the above.
7010
7011 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7012
7013 Update to latest gnulib and gettext versions.
7014 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7015 Add fopen-safer.
7016 (gnulib_files): Add m4/warning.m4. Don't worry about files
7017 overwritten by autopoint.
7018 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7019 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7020 rejects them.
7021 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7022 so that we can remove the intl files at a better time.
7023 (intl_files_to_remove): Remove aclocal.m4, since it gets
7024 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7025 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7026 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7027 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7028 Remove datarootdir hack; no longer needed.
7029 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7030 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7031 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7032 strdup.h.
7033 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7034 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7035
7036 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7037
7038 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7039 it with --assume-autoconf='latest-stable'.
7040
7041 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7042
7043 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7044 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7045 YYSTYPE' and `{'.
7046 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7047 those from muscle_tab.c since the old ones are misleading.
7048
7049 2006-07-13 Akim Demaille <akim@epita.fr>
7050
7051 Support %define "KEY" {VALUE}.
7052 * src/scan-code.h, src/scan-code.l (translate_action)
7053 (translate_rule_action, translate_symbol_action, translate_code):
7054 Return char *, not const char *.
7055 * src/parse-gram.y (declaration): Rename as...
7056 (prologue_declaration): this.
7057 (string_content): Remove this nonterminal, use STRING.
7058 (braceless, content, content.opt): New nonterminal.
7059 Use them.
7060 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7061 as value.
7062 * src/scan-gram.l (getargs.h): Don't include it.
7063
7064 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7065
7066 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7067 rather than a for-loop that declares a local bool variable. This
7068 should work around a compatibility problem with a Cray x1e C++
7069 compiler reported by Hung Nguyen in
7070 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7071 The for-loop was introduced in the 2004-11-17 change but I don't
7072 know why it was needed.
7073
7074 2006-07-12 Akim Demaille <akim@epita.fr>
7075
7076 * data/c.m4: Comment changes.
7077
7078 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
7079
7080 * src/complain.c (error_message, ERROR_MESSAGE): New.
7081 To factor...
7082 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7083 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7084
7085 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7086
7087 * NEWS: Instead of %union, you can define and use your own union type
7088 YYSTYPE if your grammar contains at least one <type> tag.
7089 Your YYSTYPE need not be a macro; it can be a typedef.
7090 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7091 (Union Decl, Decl Summary): Document this.
7092 * data/glr.c (YYSTYPE): Implement this.
7093 * data/glr.cc (YYSTYPE): Likewise.
7094 * data/lalr1.cc (YYSTYPE): Likewise.
7095 * data/yacc.c (YYSTYPE): Likewise.
7096 * src/output.c (prepare): Output tag_seen_flag.
7097 * src/parse-gram.y (declaration, grammar_declaration):
7098 Use 'union_seen' rather than 'typed' to determine whether
7099 %union has been seen, since grammars can now be typed without
7100 %union.
7101 (symbol_declaration, type.opt, symbol_def):
7102 Keep track of whether a tag has been seen.
7103 * src/reader.c (union_seen, tag_seen): New vars.
7104 (typed): remove.
7105 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7106 * src/scan-code.l (untyped_var_seen): New variable.
7107 (handle_action_dollar): Adjust to above changes.
7108 (handle_action_dollar, handle_action_at):
7109 Improve overflow checking for outlandish numbers.
7110 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7111 avoid new diagnostics generated by above changes.
7112 * tests/regression.at (YYSTYPE typedef): Add test to check
7113 for type tags without %union.
7114
7115 * src/symlist.c (symbol_list_length): Return int, not unsigned
7116 int, since callers expect int. This may need to get revisited
7117 once we have proper integer overflow checking.
7118
7119 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7120 object is now static.
7121
7122 * src/getargs.c (flags_argmatch): Return void, not int,
7123 to pacify ./configure --enable-gcc-warnings.
7124
7125 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7126 since last_string is already defined to FLEX_PREFIX (last_string).
7127
7128 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7129
7130 Implement --warnings/-W.
7131 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7132 replaced by...
7133 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7134 Adjust callers.
7135 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7136 (warnings_args, warnings_types): New.
7137 (getargs, short_options, long_options): Accept -W/--warnings.
7138 Sort the options by alphabetical order, upper case letter right
7139 before its lower case.
7140
7141 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7142
7143 Change %merge result type clash warnings to errors. Discussed at
7144 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7145 * src/reader.c (record_merge_function_type): Use complain_at.
7146 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7147 declared later): Update test case results.
7148
7149 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7150
7151 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7152 to be in alphabetical order.
7153 (trace_args): Spelling fixes.
7154
7155 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7156
7157 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7158 so they don't collide with user-defined macros.
7159 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7160 this was never guaranteed, and now that we're using gnulib stdint,
7161 which defines int_fast16_t to long int, the problem is exposed.
7162
7163 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7164
7165 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7166 need the full POSIX semantics (and weren't implementing them
7167 anyway).
7168
7169 Adjust to Autoconf 2.60 and today's gnulib.
7170 * bootstrap (gnulib_modules): Add stdint.
7171 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7172 no longer copies it.
7173 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7174 since stdint needs the former and wcwidth (which is now required
7175 by mbswidth) needs the latter.
7176 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7177 work around a compatibility glitch between gettext 0.14.6 and
7178 Autoconf 2.60.
7179 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7180 Do not check for uintptr_t, since new stdint module does the right
7181 thing.
7182 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7183 Add stdint.h, stdint_.h, wcwidth.h.
7184 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7185 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7186 stdint.m4, wchar_t.m4, wcwidth.m4.
7187 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7188 usual order for ../lib/*.h files.
7189 (file_name_split): Use last_component, not base_name, to adjust
7190 to gnulib changes.
7191 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7192 for ../lib/*.h files.
7193 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7194 Define unconditionally, since we now assume the stdint module.
7195 * src/scan-skel.l: Include <dirname.h>.
7196 (BASE_QPUTS): Use last_component, not base_name.
7197 * src/system.h: Include <unlocked-io.h> in the usual order
7198 for ../lib/*.h files. Include <stdint.h> unconditionally,
7199 since we now use the stdint module.
7200 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7201 HAVE_UINTPTR_T, since we now use the stdint module.
7202 (base_name): Remove decl, since files now include <dirname.h>
7203 to get the decl.
7204
7205 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7206
7207 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7208 New, default to 1.
7209 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7210 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7211 default.
7212 * tests/calc.at: Adjust.
7213
7214 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7215
7216 * data/c.m4 (b4_basename): New.
7217 (b4_syncline): Also output the location of its invocation (from
7218 the skeleton).
7219 (b4_user_action, b4_define_user_action, b4_user_actions)
7220 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7221 (b4_user_stype): New.
7222 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7223
7224 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7225
7226 In the grammar file, the first column is 1 not 0 on the first line as
7227 on every other line.
7228 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7229 * tests/input.at (Torturing the Scanner): Update output.
7230
7231 * src/scan-gram.l (scanner_cursor): Declare it static.
7232
7233 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7234
7235 In warnings, say "previous declaration" rather than "first
7236 declaration".
7237 * src/symtab.c (redeclaration): Do that here.
7238 * src/reader.c (record_merge_function_type): In the case of a result
7239 type clash, report the previous declaration rather than the very first
7240 one in the grammar file.
7241 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7242 declared later): Add a third declaration to check this behavior.
7243 * tests/input.at (Incompatible Aliases): Update output.
7244
7245 2006-06-27 Akim Demaille <akim@epita.fr>
7246
7247 * doc/Doxyfile.in: New.
7248 * doc/Makefile.am: Use it.
7249 * src/lalr.h, src/symtab.h: Initial doxygenation.
7250
7251 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7252
7253 Don't miss %merge result type warnings just because the LHS types are
7254 declared after the %merge. This continues the effort of the previous
7255 patch.
7256 * src/reader.c (get_merge_function): Don't set the merger type yet.
7257 (record_merge_function_type): New function for setting the merger type
7258 and checking for clashes.
7259 (grammar_current_rule_merge_set): Set the location of the %merge for
7260 the current rule.
7261 (packgram): Invoke record_merge_function_type for each rule now that
7262 all symbol type declarations have been parsed.
7263 * src/reader.h (merger_list.type_declaration_location): New member
7264 storing the location of the first %merge from which the type for this
7265 merging function was derived.
7266 * src/symlist.h (symbol_list.merger_declaration_location): New member
7267 storing the location of a rule's %merge, if any.
7268 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7269 declared later): New test to catch the error fixed by the above patch.
7270
7271 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7272
7273 Get action warnings (grammar_rule_check) right even when symbol
7274 declarations appear after the rules. Discussed at
7275 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7276 and
7277 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7278 Don't mistake the type of $$ in a midrule to be that of its parent
7279 rule's $$.
7280 * src/reader.c (grammar_current_rule_end): Don't invoke
7281 grammar_rule_check yet since not all symbol declarations may have been
7282 parsed yet.
7283 (grammar_midrule_action): Likewise.
7284 Don't record whether the midrule's $$ has been used yet since actions
7285 haven't been translated yet.
7286 Record the midrule's parent rule and its RHS index within the parent
7287 rule.
7288 (grammar_current_rule_action_append): Don't translate the action yet
7289 since not all symbol declarations may have been parsed yet and, thus,
7290 warnings about types for $$, $n, @$, and @n can't be reported yet.
7291 (packgram): Translate the action and invoke grammar_rule_check now that
7292 all symbol declarations have been parsed.
7293 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7294 after parsing the entire grammar file, the symbol list here in the case
7295 of a midrule is actually the midrule's empty RHS, so reference its
7296 parent rule's RHS where necessary.
7297 On the other hand, now that you can already know it's a midrule, you
7298 aren't forced to think $$ has the same type as its parent rule's $$.
7299 (handle_action_at): In the case of a midrule, reference the parent rule
7300 where necessary.
7301 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7302 members.
7303 (symbol_list_length): Now that this is invoked after all rules have
7304 been parsed, a NULL symbol (rather than a NULL symbol list node)
7305 terminates a rule. symbol_list_print already does this correctly.
7306 * src/symlist.h (symbol_list.midrule_parent_rule,
7307 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7308 remember their relationships with their parents.
7309 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7310 fixed by the above patch.
7311 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7312 implementing...
7313 (Unused values): ... this old test case and...
7314 (Unused values before symbol declarations): ... this new test case.
7315 This one is the same as `Unused values' except that all symbol
7316 declarations appear after the rules in order to catch the rest of the
7317 errors fixed by the above patch.
7318
7319 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7320
7321 More cleanup.
7322 * src/reader.c (current_rule): Declare it static since it's no longer
7323 used outside this file.
7324 (grammar_current_rule_action_append): Remove redundant arguments from
7325 translate_rule_action invocation.
7326 * src/reader.h (current_rule): Remove this unused extern.
7327 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7328 * src/scan-code.l (translate_rule_action): Likewise.
7329
7330 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7331
7332 Clean up yesterday's patch.
7333 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7334 to...
7335 * src/reader.c (grammar_current_rule_action_append): ... here for
7336 consistency with grammar_current_rule_symbol_append.
7337 * tests/regression.at (Braced code in declaration in rules section):
7338 Make yyerror and yylex static as usual.
7339
7340 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7341
7342 Fix bug that mistakes braced code in a declaration in the rules section
7343 to be a rule action. Mentioned at
7344 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7345 * src/scan-gram.l: Move midrule action detection from the start of the
7346 scanning of any braced code to...
7347 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7348 action. For readability, use $2 and @2 rather than the equivalent
7349 global variables.
7350 * tests/regression.at (Braced code in declaration in rules section):
7351 New test to catch the error fixed by the above patch.
7352
7353 Work on code readability some.
7354 * src/scan-code.l (current_rule): Get rid of this misleading and
7355 redundant declaration: it's actually extern'ed in reader.h.
7356 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7357 translate_action): Add a rule argument and use it instead of the global
7358 current_rule.
7359 (translate_rule_action): This already receives current_rule through an
7360 argument, so pass it on to translate_action instead of assigning
7361 current_rule to current_rule.
7362 (translate_symbol_action, translate_code): Pass rule = NULL to
7363 translate_action.
7364
7365 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7366
7367 Rename %before-definitions to %start-header and %after-definitions to
7368 %end-header. Don't use these declarations to separate pre-prologue
7369 blocks from post-prologue blocks. Add new order-independent
7370 declarations %before-header and %after-header as alternatives to the
7371 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7372 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7373 * NEWS (2.3+): Update for these changes.
7374 * data/glr.c (b4_before_definitions): Update to...
7375 (b4_start_header): ... this.
7376 (b4_after_definitions): Update to...
7377 (b4_end_header): ... this.
7378 * data/glr.cc: Likewise.
7379 * data/lalr1.cc: Likewise.
7380 * data/yacc.c: Likewise.
7381 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7382 prologue blocks with %*-header declarations.
7383 (Calc++ Parser): Likewise.
7384 (Decl Summary): Update names.
7385 (Table of Symbols): Update description.
7386 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7387 (PERCENT_END_HEADER): ... this.
7388 (PERCENT_BEFORE_DEFINITIONS): Update to...
7389 (PERCENT_START_HEADER): ... this.
7390 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7391 (declaration): Update token names and m4 macro names.
7392 When parsing %end-header and %start-header, invoke translate_code
7393 before muscle_code_grow, and no longer set global booleans to remember
7394 whether these declarations have been seen.
7395 Parse new %after-header and %before-header.
7396 * src/reader.c (before_definitions, after_definitions): Remove.
7397 (prologue_augment): Accept a new bool argument to specify whether to
7398 augment the pre-prologue or post-prologue.
7399 * src/reader.h (before_definitions, after_definitions): Remove these
7400 extern's.
7401 (prologue_augment): Add new bool argument.
7402 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7403 (PERCENT_END_HEADER): ... this.
7404 (PERCENT_BEFORE_DEFINITIONS): Update to...
7405 (PERCENT_START_HEADER): ... this.
7406 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7407 * tests/actions.at (Printers and Destructors): Update names.
7408
7409 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7410
7411 Add comparison operators for C++ location classes. Discussed at
7412 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7413 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7414 declaration indicating whether filename_type has an operator==. If
7415 filename_type is `std::string', it defaults to `1', `0' otherwise.
7416 * data/location.cc: Iff b4_define_location_comparison is `1', add
7417 operator== and operator!= for class position and for class location.
7418
7419 Some minor fixes.
7420 * src/scan-action.l: Remove unused file.
7421 * src/symtab.c (symbol_printer_set): Use printer_location not
7422 destructor_location.
7423 * src/symtab.h (struct symbol): Replace incorrect source comment for
7424 printer members.
7425 * tests/input.at (Incompatible Aliases): Update output with correct
7426 printer location.
7427
7428 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7429
7430 Don't put the pre-prologue in the header file. For the yacc.c code
7431 file and the glr.c header and code files, move the pre-prologue before
7432 the token definitions. Add new %before-definitions and
7433 %after-definitions to declare code that will go in both the header file
7434 and code file. Discussed at
7435 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7436 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7437 and
7438 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7439 * NEWS (2.3+): Describe these changes.
7440 * data/glr.c (b4_pre_prologue): Move from within to before...
7441 (b4_shared_declarations): ... this.
7442 Add new b4_before_definitions before b4_token_enums.
7443 Add new b4_after_definitions at the end.
7444 * data/glr.cc (b4_pre_prologue): Replace with...
7445 (b4_before_definitions): ... this in the header file.
7446 (b4_after_definitions): New near the end of the header file.
7447 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7448 code file right before including the header file.
7449 (b4_before_definitions): New in the previous position of
7450 b4_pre_prologue in the header file.
7451 (b4_after_definitions): New near the end of the header file.
7452 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7453 (b4_token_enums_defines): In the code file, move to right before
7454 YYSTYPE for consistency with the header file.
7455 (b4_before_definitions): New right before b4_token_enums_defines in
7456 both the header and code file.
7457 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7458 header and code file.
7459 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7460 of prologues for %union dependencies.
7461 (Decl Summary): In %defines description, mention the effect of
7462 %before-definitions and %after-definitions on the header file.
7463 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7464 than in the pre-prologue so that make check succeeds.
7465 (Table of Symbols): Add entries for %before-definitions and
7466 %after-definitions.
7467 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7468 %before-definitions.
7469 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7470 (declaration): Parse those declarations and append to
7471 b4_before_definitions and b4_after_definitions, respectively.
7472 * src/reader.c (before_definitions, after_definitions): New bools to
7473 track whether those declarations have been seen.
7474 (prologue_augment): Add to the post-prologue if %union,
7475 %before-definitions, or %after-definitions has been seen.
7476 * src/reader.h (before_definitions, after_definitions): New extern's.
7477 * src/scan-gram.l: Scan the new declarations.
7478 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7479 prologue block in a %before-definitions or a %after-definitions based
7480 on whether the %union is declared.
7481 * tests/regression.at (Early token definitions with --yacc, Early token
7482 definitions without --yacc): Move tests for token definitions into the
7483 post-prologue since token names are no longer defined in the
7484 pre-prologue.
7485
7486 2006-06-20 Akim Demaille <akim@epita.fr>
7487
7488 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7489 (symbol_get): Use it.
7490 * src/parse-gram.y: Use it.
7491
7492 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7493
7494 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7495 build succeeds when configured with --enable-gcc-warnings.
7496
7497 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7498
7499 * src/parse-gram.y (char_name): New function.
7500 (CHAR, STRING, string_content): For %printer, properly escape.
7501 (ID): Prefer fputs to fprintf.
7502 (id): Reindent to be consistent with other rules.
7503 Properly quote char.
7504
7505 The Translation Project changed its way of publishing translations
7506 to maintainers. I haven't received any responses to my request
7507 for supporting the old way, or for documenting the new way. I
7508 have modified 'bootstrap' to use screen scraping
7509 (in this case, HTML scraping). This is unreliable and inelegant,
7510 but I don't see any better way. Yuck.
7511 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7512 (get_translations): New function, which uses HTML scraping to
7513 deduce locations of latest translations.
7514 Use this function to grab both bison and bison-runtime .po files.
7515 Don't bother priming the pump for the runtime-po domain any more,
7516 as it's now translated better than bison is.
7517
7518 2006-06-19 Akim Demaille <akim@epita.fr>
7519
7520 * src/scan-gram.l: No longer "parse" things after `%union' until
7521 `{'. Rather, return a single "%union" token.
7522 No longer make symbols: return strings, and leave the conversion
7523 to symbols to the parser.
7524 (SC_PRE_CODE, token_type): Remove.
7525 * src/parse-gram.y (%union): New field `character'.
7526 Sort tokens.
7527 (CHAR): New token.
7528 (ID, ID_COLON): Now that the scanner no longer makes them
7529 identifiers, adjust all uses to invoke symbol_get.
7530 (id_colon): New, wraps the conversion from string to symbol.
7531 (%union): Accept a possible union_name.
7532 (symbol): Now can be a char.
7533 * data/c.m4 (b4_union_name): Leave a default value.
7534 * data/glr.c, data/yacc.c: Use it.
7535
7536 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7537
7538 For associating token numbers with token names for "yacc.c", don't use
7539 #define statements unless `--yacc' is specified; always use enum
7540 yytokentype. Most important discussions start at:
7541 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7542 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7543 and
7544 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7545 * NEWS (2.3+): Mention.
7546 * data/c.m4 (b4_yacc_if): New.
7547 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7548 token #define's.
7549 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7550 on token name definitions.
7551 * src/getargs.c (usage): Capitalize `Yacc' in English.
7552 * src/output.c (prepare): Define b4_yacc_flag.
7553 * tests/regression.at (Early token definitions): Test that tokens names
7554 are defined before the pre-prologue not just before the post-prologue.
7555 Remove this test case and copy to...
7556 (Early token definitions with --yacc): ... this to test #define's.
7557 (Early token definitions without --yacc): ... and this to test enums.
7558
7559 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7560
7561 * NEWS: Reword the post-2.3 change to not be so optimistic about
7562 removing the old "look-ahead" spelling.
7563 Update previous look-ahead/lookahead change reports.
7564 * REFERENCES: look-ahead -> lookahead (since that's
7565 what he actually wrote).
7566 * doc/refcard.tex: look ahead -> lookahead,
7567 look-ahead -> lookahead
7568
7569 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7570
7571 For consistency, use `lookahead' instead of `look-ahead' or
7572 `look_ahead'. Discussed starting at
7573 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7574 and then at
7575 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7576 * NEWS: For the next release, note the change to `--report'.
7577 * TODO, doc/bison.1: Update English.
7578 * doc/bison.texinfo: Update English.
7579 (Understanding Your Parser, Bison Options): Document as
7580 `--report=lookahead' rather than `--report=look-ahead'.
7581 * src/conflicts.c: Update English in comments.
7582 (lookahead_set): Rename from look_ahead_set.
7583 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7584 (resolve_sr_conflict): Rename local look_ahead_tokens to
7585 lookahead_tokens, and update other uses.
7586 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7587 count_rr_conflicts, conflicts_free): Update uses.
7588 * src/getargs.c (report_args): Move "lookahead" before alternate
7589 spellings.
7590 (report_types): Update uses.
7591 (usage): For `--report' usage description, state `lookahead' spelling
7592 rather than `look-ahead'.
7593 * src/getargs.h (report.report_lookahead_tokens): Rename from
7594 report_look_ahead_tokens.
7595 * src/lalr.c: Update English in comments.
7596 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7597 (state_lookahead_tokens_count): Rename from
7598 state_look_ahead_tokens_count.
7599 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7600 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7601 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7602 Update other uses.
7603 Update English in output.
7604 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7605 * src/print.c: Update English in comments.
7606 (lookahead_set): Rename from look_ahead_set.
7607 (print_reduction): Rename argument lookahead_token from
7608 look_ahead_token.
7609 (print_core, state_default_rule, print_reductions, print_results):
7610 Update uses.
7611 * src/print_graph.c: Update English in comments.
7612 (print_core): Update uses.
7613 * src/state.c: Update English in comments.
7614 (reductions_new): Update uses.
7615 (state_rule_lookahead_tokens_print): Rename from
7616 state_rule_look_ahead_tokens_print, and update other uses.
7617 * src/state.h: Update English in comments.
7618 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7619 (state_rule_lookahead_tokens_print): Rename from
7620 state_rule_look_ahead_tokens_print.
7621 * src/tables.c: Update English in comments.
7622 (conflict_row, action_row): Update uses.
7623 * tests/glr-regression.at
7624 (Incorrect lookahead during deterministic GLR,
7625 Incorrect lookahead during nondeterministic GLR): Rename
7626 print_look_ahead to print_lookahead.
7627 * tests/torture.at: Update English in comments.
7628 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7629 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7630 (Many lookahead tokens): Update uses.
7631 * data/glr.c: Update English in comments.
7632 * lalr1.cc: Likewise.
7633 * yacc.c: Likewise.
7634 * src/conflicts.h: Likewise.
7635 * src/lalr.h: Likewise.
7636 * src/main.c: Likewise.
7637 * src/output.c: Likewise.
7638 * src/parse-gram.c: Likewise.
7639 * src/tables.h: Likewise.
7640 * tests/calc.at: Likewise.
7641
7642 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7643
7644 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7645
7646 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7647
7648 * TODO: Add request from Nelson H. F. Beebe to be able to install
7649 Bison without installing the yacc script.
7650
7651 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7652
7653 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7654 and yytext if they're already #define'd.
7655 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7656 * src/scan-code-c.c: ... here.
7657 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7658 <config.h>.
7659
7660 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7661
7662 Get Bison to build again when configured with --enable-gcc-warnings.
7663 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7664 missing #include's.
7665 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7666 loc argument as it shadows a global.
7667 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7668 invocation.
7669
7670 * src/.cvsignore: Add scan-code.c.
7671
7672 2006-06-07 Akim Demaille <akim@epita.fr>
7673
7674 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7675 to...
7676 * src/scan-code.l: here.
7677 * tests/input.at (Torturing the Scanner): Fix another location
7678 error.
7679
7680 2006-06-07 Akim Demaille <akim@epita.fr>
7681
7682 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7683
7684 2006-06-06 Akim Demaille <akim@epita.fr>
7685
7686 Extract the parsing of user actions from the grammar scanner.
7687 As a consequence, the relation between the grammar scanner and
7688 parser is much simpler. We can also split "composite tokens" back
7689 into simple tokens.
7690 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7691 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7692 rename as...
7693 * src/location.h, src/location.c (add_column_width)
7694 (location_compute): these.
7695 Fix the column count: the initial column is 0.
7696 (location_print): Be robust to ending column being 0.
7697 * src/location.h (boundary_set): New.
7698 * src/main.c: Adjust to scanner_free being renamed as
7699 gram_scanner_free.
7700 * src/output.c: Include scan-code.h.
7701 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7702 Use boundary_set.
7703 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7704 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7705 which is now, again, a separate token.
7706 Adjust all dependencies.
7707 Whereever actions with $ and @ are used, use translate_code.
7708 (action): Remove this nonterminal which is now useless.
7709 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7710 (grammar_current_rule_action_append): Use translate_code.
7711 (packgram): Bound check ruleno, itemno, and rule_length.
7712 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7713 (last_string, last_braced_code_loc, max_left_semantic_context)
7714 (scanner_initialize, scanner_free, scanner_last_string_free)
7715 (gram_out, gram_lineno, YY_DECL_): Move to...
7716 * src/scan-gram.h: this new file.
7717 (YY_DECL): Rename as...
7718 (GRAM_DECL): this.
7719 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7720 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7721 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7722 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7723 Move these declarations, and...
7724 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7725 these to...
7726 * src/flex-scanner.h: this new file.
7727 * src/scan-gram.l (rule_length, rule_length_overflow)
7728 (increment_rule_length): Remove.
7729 (last_braced_code_loc): Rename as...
7730 (gram_last_braced_code_loc): this.
7731 Adjust to the changes of the parser.
7732 Move all the handling of $ and @ into...
7733 * src/scan-code.l: here.
7734 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7735 (handle_action_dollar, handle_action_at): Move to...
7736 * src/scan-code.l: here.
7737 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7738 scan-code.h, scan-code-c.c, scan-gram.h.
7739 (EXTRA_bison_SOURCES): Add scan-code.l.
7740 (BUILT_SOURCES): Add scan-code.c.
7741 (yacc): Be robust to white spaces.
7742
7743 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7744 * tests/regression.at: Adjust the column numbers.
7745 * tests/regression.at: Adjust the error message.
7746
7747 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7748
7749 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7750 Use Akim's wording from
7751 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7752
7753 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7754
7755 Between Bison releases, manually append `+' to the previous Bison
7756 release number, and use that as a signal to automatically print the
7757 ChangeLog's CVS Id keyword from --version. Discussed starting at
7758 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7759 * ChangeLog: Add Id header.
7760 * configure.ac (AC_INIT): Append `+' to `2.3'.
7761 * src/.cvsignore: Add revision.c.
7762 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7763 (BUILT_SOURCES): Add revision.c.
7764 (revision.c): New target rule. This file defines a new global variable
7765 named revision. It initializes it with either the Id from ChangeLog
7766 or, if VERSION doesn't contain `+', with the empty string.
7767 * src/getargs.c (version): Print the value of revision.
7768 * src/revision.h: Extern revision.
7769
7770 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7771
7772 * NEWS: Version 2.3.
7773 * configure.ac (AC_INIT): Likewise.
7774
7775 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7776
7777 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7778 with no arguments, not as an object-like macro. This is for
7779 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7780 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7781 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7782 Document this.
7783
7784 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7785
7786 * src/getargs.c (usage): Back out yesterday's modification of the
7787 --help output so that we don't have to wait for translation before
7788 releasing 2.3.
7789
7790 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7791
7792 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7793 Problem reported by Akim Demaille.
7794
7795 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7796
7797 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7798
7799 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7800
7801 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7802 generated source code. Problem reported by Frans Englich in
7803 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7804
7805 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7806
7807 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7808 shell, not within 'make', so that 'make' by an ordinary builder
7809 (using GNU make) does not worry about configuring gzip. This also
7810 works around a bug reported independently by Keith Thompson and by
7811 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7812 stderr rather than stdout, messing up the build logs.
7813
7814 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7815
7816 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7817 to make sure that YYID will never be unused. This fixes a 'make
7818 maintainer-check' failure caused by the recent changes to the 'Trivial
7819 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7820 not used.
7821 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7822
7823 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7824
7825 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7826 state before an empty RHS is always resolved here. Only the location
7827 of that state is guaranteed to be resolved, and that's enough. This
7828 fixes the remaining bug reported by Derek M. Jones in
7829 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7830 * tests/glr-regression.at (Uninitialized location when reporting
7831 ambiguity): Test the above case.
7832 Also, the embedded comments in this test case claim it checks the case
7833 of an empty RHS that has inherited the initial location. However, the
7834 corresponding LHS was already resolved, so yyresolveLocations didn't
7835 actually have reason to modify it. Fix this by forcing
7836 nondeterministic operation at the beginning of the parse.
7837
7838 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7839
7840 * data/c.m4 (b4_yy_symbol_print_generate):
7841 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7842 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7843 of the bugs reported today by Derek M Jones in
7844 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7845 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7846 defined to be a type name without parens or brackets.
7847 (Location Type): Similarly for YYLTYPE.
7848 * tests/regression.at (Trivial grammars): Put in a test for this
7849 bug that will be caught by 'make maintainer-check' (though not,
7850 alas, by 'make check' unless your compiler is picky).
7851
7852 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7853
7854 * NEWS: Version 2.2.
7855 * configure.ac (AC_INIT): Likewise.
7856
7857 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7858
7859 * data/glr.c (yyreportTree): Make room in yystates for the state
7860 preceding the RHS. This fixes the segmentation fault reported by Derek
7861 M. Jones in
7862 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7863 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7864 to the user. Reported for yyreportTree by Derek M. Jones later in the
7865 same thread.
7866 * THANKS: Add Derek M. Jones.
7867 Update my email address.
7868 Fix typo in Steve Murphy's name.
7869
7870 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7871
7872 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7873 checking against YYLAST that caused the parser to miss a potential
7874 alternative in its diagnostic.
7875 Problem reported by Maria Jose Moron Fernandez in
7876 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7877 * data/lalr1.cc (yysyntax_error_): Likewise.
7878 * data/yacc.c (yysyntax_error): Likewise.
7879 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7880 tokens, in case we run into an older C compiler.
7881 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7882 Use them to check for the off-by-one error fixed above.
7883
7884 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7885 YYSIZE_T, not size_t.
7886 * tests/regression.at (Trivial grammars): New test, to catch
7887 the error fixed by the above patch.
7888
7889 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7890
7891 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7892 scheme.
7893 Reported by Steve Murphy.
7894
7895 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7896
7897 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7898 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7899
7900 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7901
7902 Implement --trace=m4.
7903 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7904 * src/output.c (output_skeleton): When set, pass -dV to m4.
7905
7906 Factor the handling of flags in m4.
7907 * src/output.c (prepare): Rename the muscle names debug, defines,
7908 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7909 * data/c.m4: Adjust.
7910 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7911 Use b4_define_flag_if to define other b4_FLAG_if macros.
7912 (b4_location_if): As a consequence, rename as...
7913 (b4_locations_if): this, for consistency.
7914 Adjust all the skeletons.
7915
7916 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7917
7918 * etc/bench.pm: Shorten bench names.
7919
7920 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7921
7922 * src/output.h, src/output.c (error_verbose): Move to...
7923 * src/getargs.h, src/getargs.c: here.
7924 Sort the flags.
7925 Adjust dependencies.
7926
7927 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7928
7929 * data/c.m4 (b4_copyright): Put the special exception for Bison
7930 skeletons here, so we don't have to put it in each skeleton. All
7931 uses changed. Suggested by Akim Demaille. Also, wrap the
7932 copyright notice, in case it is longer than 80 columns. Replace
7933 comma by newline after title.
7934
7935 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7936
7937 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7938 incompatibility, not a bug. Mention that it wasn't fixed as of
7939 flex 2.5.33.
7940
7941 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7942
7943 * examples/extexi: Enforce the precedence of concatenation over
7944 >>.
7945 Reported by Tommy Nordgren.
7946
7947 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7948
7949 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7950 with the member "token".
7951 Reported by Martin Nylin.
7952
7953 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7954
7955 * data/glr.c: Switch to Bison 2.2 special-exception language in
7956 the copyright notice. Use more-regular format for titles and
7957 copyright notices.
7958 * data/glr.cc: Likewise.
7959 * data/location.cc: Likewise.
7960 * data/yacc.cc: Likewise.
7961 * doc/bison.texinfo (Conditions): Document this.
7962 * NEWS: likewise. Upgrade version to 2.2.
7963
7964 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
7965
7966 * data/glr.cc: Remove dead code.
7967
7968 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7969
7970 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7971 that variable and the line breaks the bootstrap. Problem reported
7972 by Juan M. Guerrero.
7973
7974 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7975
7976 * doc/bison.texinfo (Multiple start-symbols): New.
7977
7978 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7979
7980 * etc/README, etc/bench.pl: New.
7981
7982 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
7983
7984 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7985 rule.
7986 Reported by Mickael Labau.
7987 * tests/input.at (Torturing the Scanner): Test it.
7988
7989 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7990
7991 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7992 Problem reported by Bob Rossi.
7993
7994 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7995
7996 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7997 and didn't really work.
7998 For the index, use @ifnotinfo, not @iftex.
7999 Minor cleanups of spacing and terminology.
8000
8001 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8002
8003 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8004 of AT_NAME_PREFIX when %name-prefix is not used.
8005
8006 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8007
8008 Apply --prefix to C++ skeletons too: they change the namespace.
8009 The test suite already exercize these cases.
8010 * data/c++.m4 (b4_namespace): New.
8011 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8012 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8013 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8014 * doc/bison.texinfo: Document it.
8015 (Option Cross Key): Use @multitable in all formats. It looks
8016 nicer, even in TeX outputs.
8017 (Rules): Use the same code whatever the output type is.
8018 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8019 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8020 * tests/calc.at: Use it, instead of hard coding `yy'.
8021
8022 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8023
8024 * TODO: Remove dead items.
8025
8026 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8027
8028 * doc/FAQ: Remove, merged into...
8029 * doc/bison.texinfo (FAQ): this.
8030 * doc/Makefile.am (EXTRA_DIST): Adjust.
8031
8032 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8033
8034 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8035 even if empty.
8036 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8037 * doc/bison.texinfo (Calc++ Scanner): Use it.
8038
8039 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8040
8041 Fix two nits reported by twlevo, plus one more that I discovered.
8042
8043 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8044 this is the usual Bison style.
8045 * src/location.h (location_print): Likewise.
8046
8047 * src/reader.h (token_name): Likewise.
8048
8049 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8050
8051 Fix some nits reported by twlevo.
8052 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8053 and "POSIX". Use more-modern syntax for URLs. Mention C++
8054 and ask for Java. Don't hardwire OS version numbers. Add
8055 copyright notice.
8056 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8057 * src/conflicts.c (solved_conflicts_obstack): Now static.
8058
8059 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8060
8061 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8062 page. Say "you can use it" not "you may use it" as on the web page;
8063 we're describing capabilities not granting permission.
8064
8065 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8066
8067 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8068 shadowing warnings. Use usual patter for iterating through RHS.
8069 * tests/glr-regression.at
8070 (Uninitialized location when reporting ambiguity):
8071 Modify yylex so that it uses its argument, rather than trying
8072 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8073 const char -> char const.
8074
8075 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8076 Don't use tabs inside commands; it messes up 'ps'.
8077 Problem reported by twlevo.
8078
8079 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8080
8081 * tests/glr-regression.at (Uninitialized location when reporting
8082 ambiguity): New test case.
8083 * data/glr.c (yyresolveLocations): New function, which uses
8084 YYLLOC_DEFAULT.
8085 (yyresolveValue): Invoke yyresolveLocations before reporting an
8086 ambiguity.
8087 * doc/bison.texinfo (Default Action for Locations): Note
8088 YYLLOC_DEFAULT's usage for ambiguity locations.
8089 (GLR Semantic Actions): Cross-reference those notes.
8090
8091 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8092
8093 * tests/glr-regression.at (Leaked semantic values when reporting
8094 ambiguity): Remove unnecessary union and type declarations.
8095 (Leaked lookahead after nondeterministic parse syntax error): New test
8096 case.
8097 * data/glr.c (yyparse): Check for zero stacks remaining before
8098 attempting to shift the lookahead so that you don't lose it.
8099
8100 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8101
8102 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8103 * tests/glr-regression.at (Leaked semantic values when reporting
8104 ambiguity): New test case.
8105 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8106 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8107 now unnecessary yystackp parameter.
8108 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8109 destructors can be called.
8110
8111 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8112 in existing testcases.
8113
8114 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8115
8116 Don't leak semantic values for parent RHS when a user action cuts the
8117 parser, and clean up related code a bit.
8118 * tests/glr-regression.at (Leaked merged semantic value if user action
8119 cuts parse): Rename to...
8120 (Leaked semantic values if user action cuts parse): ... this. Add check
8121 for leaked parent RHS values.
8122 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8123 between an unresolved state (non-empty chain of semantic options) and
8124 an incomplete one (signaled by an empty chain).
8125 (yyresolveStates): Document the interface. Move all manipulation of a
8126 successfully or unsuccessfully resolved yyGLRState to...
8127 (yyresolveValue): ... here so that yyresolveValue always leaves a
8128 yyGLRState with consistent data and thus is easier to understand.
8129 Remove the yyvalp and yylocp parameters since they are always just
8130 taken from the yys parameter. When reporting a discarded merged value
8131 in debugging output, note that it is incompletely merged. Document the
8132 interface.
8133 (yyresolveAction): If resolving any of the RHS states fails, destroy
8134 them all rather than leaking them. Thus, as long as user actions are
8135 written to clean up the RHS correctly, yyresolveAction always cleans up
8136 the RHS of a semantic option. Document the interface.
8137
8138 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8139
8140 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8141 led to a segmentation fault in GNU Pascal. Problem reported
8142 by Waldek Hebisch.
8143
8144 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8145
8146 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8147 mid-rule action inside a nonterminal symbol in order to declare a
8148 destructor for its semantic value.
8149
8150 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8151
8152 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8153 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8154 __cplusplus && ! defined _STDLIB_H && !
8155 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8156 defined free))]: Include <stdlib.h> rather than rolling our own
8157 declarations of malloc and free, to avoid problems with
8158 incompatible declarations (using 'throw') C++'s stdlib.h. This
8159 should fix Debian bug 340012
8160 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8161 reported by Guillaume Melquiond.
8162
8163 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8164
8165 * NEWS: Clarify symbols versus types in unused-value warnings.
8166
8167 * configure.ac (AC_INIT): Bump version number.
8168
8169 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8170
8171 * NEWS: Version 2.1a.
8172 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8173 since C99 requires this.
8174
8175 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8176
8177 * m4/c-working.m4: New file.
8178 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8179
8180 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8181
8182 * Makefile.maint: Merge from coreutils.
8183
8184 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8185
8186 More portability fixes for problems summarized by Nelson H. F. Beebe.
8187
8188 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8189 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8190 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8191 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8192 messes up because C++ code is compiled in 32-bit mode but linked
8193 in 64-bit mode.
8194
8195 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8196
8197 More portability fixes for problems summarized by Nelson H. F. Beebe.
8198
8199 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8200 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8201
8202 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8203 nodist_PROGRAMS, since we don't need to actually compile the
8204 example if we're just doing a plain 'make'. This avoids bothering
8205 the installer unnecessarily about problems due to weird C++
8206 compilers.
8207
8208 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8209
8210 More portability fixes for problems summarized by Nelson H. F. Beebe.
8211
8212 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8213 than #include "...", and compile with -I'.'. The old method was
8214 not portable, according to Posix and the C standard, and it does
8215 not work with Sun C 5.7, where previous #line directives affect
8216 the working directory used in later #include "..." directives.
8217
8218 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8219
8220 Various DJGGP specific issues in /djgpp
8221
8222 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8223
8224 More portability fixes for problems summarized by Nelson H. F. Beebe.
8225
8226 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8227 '#include <map>' works and that you can apply ++ to iterators.
8228
8229 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8230
8231 Work around portability problems summarized by Nelson H. F. Beebe in
8232 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8233
8234 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8235 that '#include <string>' works.
8236
8237 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8238 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8239 "warning: sorry: semantics of inline function static data `const
8240 unsigned char translate_table[262]' are wrong (you'll wind up with
8241 multiple copies)".
8242
8243 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8244 or, xor to not_, and_, or_, and xor_, respectively. This works
8245 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8246 random system header somewhere that includes the equivalent of
8247 <iso646.h>.
8248
8249 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8250 -E" works; it apparently doesn't work with PathScale EKO Compiler
8251 Suite Version 2.0.
8252
8253 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8254
8255 During deterministic GLR operation, user actions should be able to
8256 influence the parse by changing yychar. To make this easier to fix and
8257 to make glr.c easier to evolve in general, don't maintain yytoken in
8258 parallel with yychar; just compute yytoken when needed.
8259 * tests/glr-regression.at (Incorrect lookahead during deterministic
8260 GLR): Check that setting yychar in a user action has the intended
8261 effect.
8262 * data/glr.c (yyGLRStack): Remove yytokenp member.
8263 (yyclearin): Don't set *yytokenp.
8264 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8265 yychar rather than *yytokenp to determine the current lookahead.
8266 Compute yytoken locally when needed.
8267 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8268 point to.
8269
8270 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8271 after `--report' documentation.
8272
8273 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8274
8275 * src/parse-gram.y (grammar_declaration): Location of printer
8276 symbol is @1, not list->location. Bug reported by twlevo.
8277 * tests/input.at (Incompatible Aliases): Adjust to above change.
8278
8279 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8280
8281 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8282 all the test at once. This makes the output easier to read in the
8283 normal case.
8284
8285 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8286 got from <http://bro-ids.org/download.html>. The bug is that
8287 when two actions appeared in succession, the second one was
8288 scanned before the first one was added to the grammar rule
8289 as a midrule action. Bison then output the incorrect warning
8290 "parse.y:905.17-906.36: warning: unused value: $3".
8291 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8292 associated with a value.
8293 (rhs): Don't invoke grammar_current_rule_action_append.
8294 (action): Invoke it here instead.
8295 * src/reader.c (grammar_midrule_action): Now extern.
8296 (grammar_current_rule_action_append): Don't invoke
8297 grammar_midrule_action; that is now the scanner's job.
8298 * src/reader.h (last_string, last_braced_code_loc):
8299 (grammar_midrule_action): New decls.
8300 * src/scan-gram.l (last_string): Now extern, sigh.
8301 (last_braced_code_loc): New extern variable.
8302 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8303 rule already has an action.
8304 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8305 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8306 Add some tests to check that the above changes fixed the bug.
8307
8308 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8309
8310 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8311 All used changed. Check whether the symbol has a destructor,
8312 not whether it is typed.
8313 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8314 that the values are still reported as unused. All line numbers
8315 adjusted.
8316
8317 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8318
8319 Work around a bug in bro 0.8, which underparenthesizes its
8320 definition of YYLLOC_DEFAULT.
8321 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8322 their arguments.
8323 * data/lalr1.cc: Likewise.
8324 * data/yacc.cc: Likewise.
8325
8326 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8327
8328 Work around a bug in Pike 7.0, and give the Pike folks a
8329 better way to override the usual int widths.
8330 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8331 user can override the types.
8332 (short): #undef, to work around a bug in Pike 7.0.
8333 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8334 (union yyalloc.yyss): Use yytype_int16 rather than short.
8335 All uses changed.
8336 (yysigned_char): Remove.
8337 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8338 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8339 * tests/regression.at (Web2c Actions): Adjust to above changes.
8340
8341 * src/reader.c (check_and_convert_grammar): New function.
8342 (reader): Close the input file even if something went wrong during
8343 parsing. Minor file descriptor leak reported by twlevo.
8344
8345 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8346 to pacify gcc -Wswitch-default.
8347 * src/scan-gram.l (adjust_location): Use a default: break; case
8348 to pacify gcc -Wswitch-default.
8349 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8350 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8351 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8352 Move these decls to scan-skel.l, since they don't need to be
8353 visible elsewhere.
8354 * src/scan-skel.l: Accept the above decls.
8355 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8356 is used.
8357
8358 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8359
8360 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8361 since we don't want to insist on a version number at the start
8362 of the changelog every time.
8363 * Makefile.maint: Sync from coreutils a bit better.
8364 (sc_trailing_blank): Renamed from sc_trailing_space.
8365 All uses changed.
8366 (sc_no_if_have_config_h, sc_require_config_h):
8367 (sc_prohibit_assert_without_use): New rules.
8368 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8369 (sc_dd_max_sym_length): Fix leading spaces in rule.
8370 (sc_system_h_headers): Prefix with @.
8371 (sc_useless_cpp_parens, m4-check): Output line numbers.
8372 (changelog-check): Allow version only in head.
8373 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8374 satisfy new Makefile.maint rule.
8375 * data/glr.c: Likewise.
8376 * data/glr.cc: Likewise.
8377 * data/lalr1.cc: Likewise.
8378 * data/yacc.c: Likewise.
8379 * lib/ebitsetv.c: Likewise.
8380 * lib/lbitset.c: Likewise.
8381 * lib/subpipe.c: Likewise.
8382 * lib/timevar.c: Likewise.
8383 * src/system.h: Likewise.
8384 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8385 * djgpp/Makefile.maint: Add copyright notice.
8386 * djgpp/README.in: Likewise.
8387 * djgpp/config.bat: Likewise.
8388 * djgpp/config.site: Likewise.
8389 * djgpp/config_h.sed: Likewise.
8390 * djgpp/djunpack.bat: Likewise.
8391 * djgpp/config.sed: Fix copyright notice to match standard format.
8392 * djgpp/subpipe.h: Likewise.
8393 * lib/bitsetv-print.c: Likewise.
8394 * lib/bitsetv.c: Likewise.
8395 * lib/subpipe.h: Likewise.
8396 * lib/timevar.c: Likewise.
8397 * lib/timevar.h: Likewise.
8398 * djgpp/subpipe.c: Use standard recipe for config.h.
8399 * lib/abitset.c: Likewise.
8400 * lib/bitset.c: Likewise.
8401 * lib/bitset_stats.c: Likewise.
8402 * lib/bitsetv-print.c: Likewise.
8403 * lib/bitsetv.c: Likewise.
8404 * lib/ebitsetv.c: Likewise.
8405 * lib/get-errno.c: Likewise.
8406 * lib/lbitset.c: Likewise.
8407 * lib/subpipe.c: Likewise.
8408 * lib/timevar.c: Likewise.
8409 * lib/vbitset.c: Likewise.
8410 * tests/local.at: Likewise.
8411 * src/scan-gram.l: Don't include verify.h, since system.h does
8412 that for us.
8413 * .x-sc_require_config_h: New file.
8414 * .x-sc_unmarked_diagnostics: New file.
8415
8416 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8417
8418 Be a bit more systematic about using 'abort'.
8419 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8420 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8421 Put 'default: abort ();' before some other case, to satisfy older
8422 pedantic compilers.
8423 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8424 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8425 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8426 * src/conflicts.c (resolve_sr_conflict): Likewise.
8427 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8428 (get_decision_str, get_orientation_str, get_node_alignment_str):
8429 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8430 (get_linestyle_str, get_arrowstyle_str): Likewise.
8431 * src/conflicts.c (resolve_sr_conflict):
8432 Use a default case rather than one for the one remaining enum
8433 value, to catch invalid enum values as well.
8434 * src/lalr.c (set_goto_map, map_goto):
8435 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8436 * src/nullable.c (nullable_compute, token_definitions_output):
8437 Likewise.
8438 * src/reader.c (packgram, reader): Likewise.
8439 * src/state.c (transitions_to, state_new, state_reduction_find):
8440 Likewise.
8441 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8442 (symbol_pack): Likewise.
8443 * src/tables.c (conflict_row, pack_vector): Likewise.
8444 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8445 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8446 * src/system.h: Don't include <assert.h>.
8447 (assert): New macro.
8448
8449 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8450 (Destructor Decl, Parser Function, Pure Calling):
8451 Describe rules for braces inside C code more carefully.
8452
8453 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8454
8455 Fix some porting glitches found by Nelson H. F. Beebe.
8456 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8457 compilers that don't understand that abort () does not return.
8458 * src/state.c (transitions_to): Likewise.
8459 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8460 that '#include <cstdlib>' works.
8461 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8462 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8463 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8464 for the benefit of some pre-C99 compilers.
8465
8466 * bootstrap: Undo changes to gnulib files that autoreconf made.
8467
8468 Minor fixups to get 'make maintainer-check' to work.
8469 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8470 with the new verify.h implementation.
8471 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8472 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8473 * data/yacc.c (YYUSE): Likewise.
8474 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8475 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8476 * src/parse-gram.y (declaration): Don't pass a string constant
8477 to a function that expects char *, since GCC might complain
8478 about the constant value.
8479 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8480 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8481 before #defining them.
8482 * tests/glr-regression.at
8483 (Incorrectly initialized location for empty right-hand side in GLR):
8484 In yyerror, use the msg arg.
8485 (Corrupted semantic options if user action cuts parse):
8486 (Incorrect lookahead during deterministic GLR):
8487 (Incorrect lookahead during nondeterministic GLR):
8488 Don't name a local var 'index'; it shadows string.h's 'index'.
8489
8490 2006-01-19 Akim Demaille <akim@epita.fr>
8491
8492 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8493 location, not just parts of it.
8494
8495 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8496
8497 * NEWS: Document the fact that multiple %unions are now allowed.
8498 * doc/bison.texinfo (Union Decl): Likewise.
8499 * TODO: This feature is now implemented, so remove it from
8500 the wishlist.
8501
8502 * Makefile.maint: Merge with coreutils Makefile.maint.
8503 (CVS_LIST): Use build-aux version if available.
8504 (VERSION_REGEXP): New macro.
8505 (syntax-check-rules): Add sc_no_if_have_config_h,
8506 sc_prohibit_assert_without_use, sc_require_config_h,
8507 sc_useless_cpp_parens.
8508 (sc_obsolete_symbols): Check for O_NDELAY.
8509 (sc_dd_max_sym_length): Track coreutils.
8510 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8511 (sc_useless_cpp_parens): New rule.
8512 (news-date-check): Look for version or today's date.
8513 (changelog-check): Don't require version number near head.
8514 (copyright-check): Use current year instead of hardwiring 2005.
8515 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8516 (announcement): Add --gpg-key-ID.
8517
8518 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8519 with "file system".
8520
8521 Avoid undefined behavior that addressed just before the start of an
8522 array. Problem reported by twlevo.
8523 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8524 * src/lalr.c (build_relations): Rely on new sentinel.
8525 * src/gram.c (gram_free): Adjust to new sentinel.
8526
8527 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8528
8529 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8530 yylookaheadNeeds. All uses updated.
8531 (yysplitStack): Rename local yynewLookaheadStatuses to
8532 yynewLookaheadNeeds.
8533 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8534 GLR): In comments, change `lookahead status' to `lookahead need'.
8535
8536 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8537
8538 * data/glr.c (yysplitStack): A little stylistic rewrite.
8539
8540 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8541
8542 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8543
8544 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8545
8546 * doc/bison.texinfo: Fix some typos.
8547 (GLR Semantic Actions): New subsection discussing special
8548 considerations because GLR semantic actions might be deferred.
8549 (Actions): Mention look-ahead usage of yylval.
8550 (Actions and Locations): Mention look-ahead usage of yylloc.
8551 (Special Features for Use in Actions): Add YYEOF entry and mention it
8552 in the yychar entry.
8553 In the yychar entry, remove mention of the local yychar case (pure
8554 parser) since this is irrelevant information when writing semantic
8555 actions and since it's already discussed in `Table of Symbols' where
8556 yychar is otherwise described as an external variable.
8557 In the yychar entry, don't call it the `current' look-ahead since it
8558 isn't when semantic actions are deferred.
8559 In the yychar and yyclearin entries, add note about deferred semantic
8560 actions.
8561 Add yylloc and yylval entries discussing look-ahead usage.
8562 (Look-Ahead Tokens): When discussing yychar, don't call it the
8563 `current' look-ahead, and do mention yylval and yylloc.
8564 (Error Recovery): Cross-reference `Action Features' when mentioning
8565 yyclearin.
8566 (Table of Symbols): In the yychar entry, don't call it the `current'
8567 look-ahead.
8568 In the yylloc and yylval entries, mention look-ahead usage.
8569
8570 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8571
8572 * tests/glr-regression.at: Update copyright year to 2006.
8573
8574 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8575
8576 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8577 use during nondeterministic operation to track which stacks have
8578 actually needed the current lookahead.
8579 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8580 Allocate, deallocate, resize, and otherwise shuffle space for
8581 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8582 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8583 appropriately during nondeterministic operation.
8584 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8585 members to store the current lookahead to be used by the deferred
8586 user action.
8587 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8588 from which the RHS is taken. Set the lookahead members of the new
8589 yySemanticOption according to the lookahead status for stack yyk.
8590 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8591 yyaddDeferredAction.
8592 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8593 members of yySemanticOption before invoking yyuserAction, and then set
8594 them back to their current values afterward.
8595 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8596 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8597 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8598 titles for consistency.
8599 (Leaked merged semantic value if user action cuts parse): In order to
8600 suppress lint warnings, use arguments in merge function, and assign
8601 char value < 128 in main.
8602 (Incorrect lookahead during deterministic GLR): New test case.
8603 (Incorrect lookahead during nondeterministic GLR): New test case.
8604
8605 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8606
8607 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8608 !yyvaluep as signal that no semantic value is available to print.
8609 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8610 to print a semantic value.
8611
8612 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8613
8614 * tests/glr-regression.at: For consistency with my newer test cases,
8615 don't thank myself.
8616
8617 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8618
8619 * data/glr.c (yyresolveValue): When merging semantic options, if at
8620 least one user action succeeds but a later one cuts the parse, then
8621 destroy the semantic value before returning rather than leaking it.
8622 (yyresolveStates): If a user action cuts the parse and thus
8623 yyresolveValue fails, ignore the (unset) semantic value rather than
8624 corrupting the yyGLRState, and empty the semantic options list since
8625 the user actions should have called all necessary destructors.
8626 Simplify code with YYCHK.
8627 * tests/glr-regression.at (Corrupted semantic options if user action
8628 cuts parse): New test case.
8629 (Undesirable destructors if user action cuts parse): New test case.
8630 Before applying any of this patch, this test case never actually failed
8631 for me... but only because the corrupted semantic options usually
8632 masked this bug.
8633 (Leaked merged semantic value if user action cuts parse): New test
8634 case.
8635
8636 2006-01-05 Akim Demaille <akim@epita.fr>
8637
8638 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8639
8640 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8641
8642 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8643 _MSC_VER. Problem reported by Cenzato Marco.
8644 (b4_c_function_def): Use it.
8645 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8646 b4_c_modern.
8647 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8648 than rolling our own.
8649
8650 2006-01-04 Akim Demaille <akim@epita.fr>
8651
8652 Also warn about non-used mid-rule values.
8653 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8654 member.
8655 (symbol_list_new): Adjust.
8656 * src/reader.c (symbol_typed_p): New.
8657 (grammar_rule_check): Use it.
8658 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8659 Check its rule.
8660 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8661 Use it.
8662 * tests/actions.at (Exotic Dollars): Adjust.
8663
8664 2006-01-04 Akim Demaille <akim@epita.fr>
8665
8666 * src/reader.c (grammar_midrule_action): If $$ is set in a
8667 mid-rule, move the `used' bit to its lhs.
8668 * tests/input.at (Unused values): New.
8669 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8670
8671 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8672
8673 * doc/bison.texinfo (Bison Options): Say more accurately what
8674 --yacc does.
8675 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8676 about declarations in the grammar when in Yacc mode, as POSIX does
8677 not require a diagnostic when the grammar uses extensions.
8678
8679 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8680
8681 Warn about dubious constructions like "%token T T".
8682 Reported by twlevo.
8683 * src/symtab.h (struct symbol.declared): New member.
8684 * src/symtab.c (symbol_new): Initialize it to false.
8685 (symbol_class_set): New arg DECLARING, specifying whether
8686 this is a declaration that we want to warn about, if there
8687 is more than one of them. All uses changed.
8688
8689 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8690 Allow multiple %union directives, whose contents concatenate.
8691 * src/parse-gram.y (grammar_declaration): Likewise.
8692 Use muscle_code_grow, so that we don't need stype_line any more.
8693 All uses changed.
8694
8695 * src/muscle_tab.c (muscle_grow): Fix comment.
8696
8697 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8698 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8699 Update copyright year to 2006.
8700
8701 2006-01-03 Akim Demaille <akim@epita.fr>
8702
8703 Have glr.cc pass (some of) the calc.at tests.
8704 * data/glr.cc (b4_parse_param_orig): New.
8705 (b4_parse_param): Improve its definition, and bound it more
8706 clearly in the skeleton.
8707 (b4_epilogue): Append, instead of prepending, in order to keep
8708 #line consistency.
8709 Simplify the generation of auxiliary functions: locations and
8710 purity are mandated.
8711 (b4_global_tokens_and_yystype): Honor it.
8712 * data/location.cc (c++.m4): Don't include it.
8713 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8714 and AT_SKEL_CC_IF.
8715 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8716 AT_LALR1_CC_IF.
8717 Be sure to initialize the first position's filename.
8718 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8719 mandated anyway.
8720 (AT_CHECK_CALC_GLR_CC): New.
8721 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8722
8723 2006-01-02 Akim Demaille <akim@epita.fr>
8724
8725 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8726 c.m4.
8727 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
8728 * data/glr.cc: Do not include stack.hh.
8729
8730 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8731
8732 * data/glr.c: Reformat whitespace with tabs.
8733 (b4_lpure_formals): Remove this unused m4 macro.
8734 * tests/cxx-type.at: Reformat whitespace with tabs.
8735 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8736 since it's a member. Rename type to isNterm for clarity.
8737
8738 2005-12-29 Akim <akim@sulaco.local>
8739
8740 Let glr.cc catch up with symbol_value_print.
8741 * data/glr.cc (b4_yysymprint_generate): Replace by...
8742 (b4_yy_symbol_print_generate): this.
8743 (yy_symbol_print, yy_symbol_value_print): Declare them.
8744
8745 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8746
8747 * src/location.h (boundary): Note that a line or column equal
8748 to INT_MAX indicates an overflow.
8749 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8750 (rule_length_overflow, increment_rule_length, add_column_width):
8751 New functions.
8752 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8753 (<SC_BRACED_CODE>"}"):
8754 Use increment_rule_length rather than incrementing it by hand.
8755 (adjust_location, handle_syncline): Diagnose overflow.
8756 (handle_action_dollar, handle_action_at):
8757 Fix bug with monstrosities like $-2147483648.
8758 Remove now-unnecessary checks.
8759 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8760 (convert_ucn_to_byte): Verify assumptions.
8761 (handle_syncline): New arg LOC. All callers changed.
8762 Don't store through a value derived from char const * pointer.
8763
8764 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8765 GCC warnings.
8766
8767 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8768
8769 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8770 Remove unnecessary forward static decls.
8771
8772 2005-12-27 Akim Demaille <akim@epita.fr>
8773
8774 * src/reader.c (grammar_current_rule_check): Also check that $$
8775 is used.
8776 Take the rule to check as argument, hence rename as...
8777 (grammar_rule_check): this.
8778 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8779 Rename as...
8780 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8781 (grammar_midrule_action, grammar_symbol_append): Now static.
8782 * tests/torture.at (input): Don't rely on the default action
8783 being always performed.
8784 * tests/calc.at: "Set" $$ even when the action is "cut" with
8785 YYERROR or other.
8786 * tests/actions.at (Exotic Dollars): Instead of using unused
8787 values, check that the warning is issued.
8788
8789 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8790
8791 * NEWS: Improve wording for unused-value warnings.
8792
8793 2005-12-22 Akim Demaille <akim@epita.fr>
8794
8795 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8796 (b4_yysymprint_generate): Rename as...
8797 (b4_yy_symbol_print_generate): this.
8798 Generate yy_symbol_print instead of yysymprint.
8799 Generate also yy_symbol_value_print, and use it.
8800
8801 2005-12-22 Akim Demaille <akim@epita.fr>
8802
8803 * NEWS: Warn about unused values.
8804 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8805 a `used' member.
8806 (symbol_list_n_get, symbol_list_n_used_set): New.
8807 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8808 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8809 * src/reader.c (grammar_current_rule_check): Check that values are
8810 used.
8811 * src/symtab.c (symbol_print): Accept 0.
8812 * tests/existing.at: Remove the type information.
8813 Empty the actions.
8814 Remove useless actions (beware of mid-rule actions: perl -000
8815 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8816 * tests/actions.at (Exotic Dollars): Use unused values.
8817 * tests/calc.at: Likewise.
8818 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8819 Likewise.
8820
8821 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8822 rule_useful_p.
8823
8824 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8825
8826 Undo 2005-12-01 tentative license wording change. The wording is
8827 still being reviewed by the lawyers, and we don't want to wait for
8828 them before publishing a test release. For now, revert to the
8829 previous wording.
8830 * NEWS: Undo 2005-12-01 change.
8831 * data/glr.c: Revert to previous license wording.
8832 * data/glr.cc: Likewise.
8833 * data/lalr1.cc: Likewise.
8834 * data/location.cc: Likewise.
8835 * data/yacc.c: Likewise.
8836
8837 * NEWS: Reword %destructor vs YYABORT etc.
8838 * data/glr.c: Use American spacing, for consistency.
8839 * data/glr.cc: Likewise.
8840 * data/lalr1.cc: Likewise.
8841 * data/yacc.c: Likewise.
8842 * data/yacc.c: Reformat comments slightly.
8843 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8844 for consistency. Fix some spelling errors and reword recently-included
8845 text slightly.
8846 * tests/cxx-type.at: Cast results of malloc, for C++.
8847
8848 2005-12-21 Joel E. Denny <address@hidden>
8849
8850 * tests/cxx-type.at: Construct a tree, count the parents of shared
8851 nodes, and free each node once and only once. Previously, the memory
8852 for semantic values was leaked instead.
8853
8854 2005-12-21 Joel E. Denny <address@hidden>
8855
8856 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8857 (yylval, yylloc): If pure, #define to yystackp->yyval and
8858 yystackp->yyloc similar to yychar and yynerrs.
8859 (yyparse): If pure, remove local yylval and yylloc. Add local
8860 yystackp to accommodate pure definitions of yylval and yylloc.
8861 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8862 yylvalp and yyllocp to &yylval and &yylloc.
8863 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8864 namespace. Previously, nerrs and char were missing, but lval and lloc
8865 weren't necessary.
8866 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8867 yylvalp and yyllocp parameters since, if pure, these are now always
8868 accessible through yystackp. If not pure, they are still accessible
8869 globally.
8870 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8871 `if (YYID (N))' to pacify lint.
8872
8873 2005-12-21 Akim Demaille <akim@epita.fr>
8874
8875 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8876 destroy the RHS symbols of a rule.
8877 * data/yacc.c (yylen): Initialize to 0.
8878 Keep its value to the number of items to possibly shift.
8879 In particular, a regular successful parse that ends on YYFINAL by
8880 a (internal) YYACCEPT must not have yylen != 0.
8881 (yyerrorlab, yyreturn): Pop the RHS.
8882 Reorder a bit to emphasize the `shifting' bits of code.
8883 (YYPOPSTACK): Now accept a number of items to pop.
8884 * data/lalr1.cc: Likewise.
8885 * data/glr.c: Formatting changes.
8886 Use goto instead of fall through.
8887 * doc/bison.texinfo (Destructor Decl): Complete.
8888
8889 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8890
8891 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8892 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8893 * djgpp/config.bat: Replace every occurence of the file name
8894 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8895 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8896 * djgpp/config.sed: Replace every occurence of the file name
8897 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8898 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8899 * djgpp/djunpack.bat: DJGPP specific file.
8900 * djgpp/fnchange.lst: DJGPP specific file.
8901 * djgpp/README.in: Add new information about how to unpack the bison
8902 source on MSDOS and other systems which have 8.3 file name restrictions
8903 using djunpack.bat and fnchange.lst.
8904
8905 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8906
8907 * bootstrap (build_cvs_prefix): Remove; unused.
8908 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8909 when getting gnulib.
8910
8911 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8912
8913 * data/glr.c: Reorder typedef declarations for structs to match order
8914 of struct declarations.
8915 Rename yystack everywhere to yystackp except in yyparse where it's not
8916 a pointer.
8917 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8918 consistency.
8919 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8920 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8921 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8922 lint.
8923
8924 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8925
8926 * tests/sets.at (Accept): Fix typos in regular expression used to
8927 sed out the final state number.
8928
8929 Work around portability problem on Solaris 10: flex-generated
8930 files include <stdio.h> before <config.h>, which messes up
8931 because the latter defines __EXTENSIONS__. Address the problem
8932 by creating two new little files that include <config.h> first,
8933 then include the flex-generated files. Rewrite everyone else
8934 to include <config.h> first, as well.
8935 * lib/timevar.c: Always include "config.h".
8936 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8937 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8938 (EXTRA_bison_SOURCES): New macro.
8939 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8940 * src/system.h: Don't include config.h.
8941 * src/LR0.c: Include <config.h> first.
8942 * src/assoc.c: Likewise.
8943 * src/closure.c: Likewise.
8944 * src/complain.c: Likewise.
8945 * src/conflicts.c: Likewise.
8946 * src/derives.c: Likewise.
8947 * src/files.c: Likewise.
8948 * src/getargs.c: Likewise.
8949 * src/gram.c: Likewise.
8950 * src/lalr.c: Likewise.
8951 * src/location.c: Likewise.
8952 * src/main.c: Likewise.
8953 * src/muscle_tab.c: Likewise.
8954 * src/nullable.c: Likewise.
8955 * src/output.c: Likewise.
8956 * src/parse-gram.y: Likewise.
8957 * src/print.c: Likewise.
8958 * src/print_graph.c: Likewise.
8959 * src/reader.c: Likewise.
8960 * src/reduce.c: Likewise.
8961 * src/relation.c: Likewise.
8962 * src/state.c: Likewise.
8963 * src/symlist.c: Likewise.
8964 * src/symtab.c: Likewise.
8965 * src/tables.c: Likewise.
8966 * src/uniqstr.c: Likewise.
8967 * src/vcg.c: Likewise.
8968
8969 * src/parse-gram.y: Fix minor problems uncovered by lint.
8970 (current_lhs, current_lhs_location): Now static.
8971 (current_assoc): Remove unused variable.
8972
8973 Cleanups so that Bison-generated parsers have less lint.
8974 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8975 Prepend /*ARGSUSED*/, for lint's sake.
8976 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8977 definition if 'lint' is defined.
8978 (YYID): New macro (or function, if lint).
8979 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8980 * data/yacc.c: Likewise.
8981 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8982 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8983 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8984 is C++ only.
8985 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8986 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8987 Use YYID(0) rather than 0, for lint.
8988 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8989 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8990
8991 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8992
8993 * tests/glr-regression.at
8994 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8995 Close memory leak reported by twlevo.
8996
8997 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8998
8999 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9000 all stacks.
9001 (yyparse): Iterate another stack in order to call user destructors.
9002 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9003 New test case.
9004 (Duplicated user destructor for lookahead): This test now is expected
9005 to succeed.
9006
9007 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9008
9009 * NEWS: Document the following change.
9010 * data/yacc.c: Say "parser skeleton" rather than "file", since
9011 it's no longer just a file.
9012 * data/glr.c: Grant a special exception for C GLR parsers, that
9013 reads like the already-existing exception for C LALR(1) parsers.
9014 * data/glr.cc: Likewise.
9015 * data/lalr1.cc: Likewise.
9016 * data/location.cc: Likewise.
9017 * data/yacc.c: Reword the "written by" statement to clarify that
9018 it was the parser skeleton, not the entire output file.
9019 * data/glr.c: Written by Paul Hilfinger.
9020 * data/glr.cc: Written by Akim Demaille.
9021 * data/lalr1.cc: Likewise.
9022
9023 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9024
9025 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9026 Fix typos in previous change that broke 'make check'.
9027 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9028 supported in C.
9029 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9030 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9031 We can revert this once things settle down.
9032
9033 * src/conflicts.c (conflicts_print): Don't print file name twice
9034 when %expect fails because there were no conflicts.
9035 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9036 change.
9037 * tests/conflicts.at (%expect not enough, %expect too much):
9038 (%expect with reduce conflicts): Adjust to new behavior.
9039
9040 2005-11-18 Akim Demaille <akim@epita.fr>
9041
9042 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9043 errors.
9044 * NEWS: Document this.
9045 * doc/bison.texinfo (Expect Decl): Likewise.
9046
9047 2005-11-16 Akim Demaille <akim@epita.fr>
9048
9049 Generalize the display of semantic values and locations in traces.
9050 * data/glr.c (yy_reduce_print): Fix indices (again).
9051 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9052 literal integers.
9053 * data/lalr1.cc (yyreduce_print): Rename as...
9054 (yy_reduce_print): this.
9055 Display values and locations.
9056 * data/yacc.c (yy_reduce_print): Likewise.
9057 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9058 (yysymprint): Move higher to be visible from yy_reduce_print).
9059 (yyparse): Adjust.
9060 * tests/calc.at: Adjust the expected length of the traces.
9061
9062 2005-11-14 Akim Demaille <akim@epita.fr>
9063
9064 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9065 from 1 to N, while values and location start at 0.
9066 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9067
9068 2005-11-14 Akim Demaille <akim@epita.fr>
9069
9070 * data/glr.c (yy_reduce_print): Fix the $ number.
9071
9072 2005-11-14 Akim Demaille <akim@epita.fr>
9073
9074 "Use" parse parameters.
9075 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9076 * data/glr.c, data/glr.cc: Use them.
9077 * data/glr.c (YYUSE): Have a C++ definition that supports
9078 non-pointer types.
9079
9080 2005-11-14 Akim Demaille <akim@epita.fr>
9081
9082 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9083
9084 2005-11-14 Akim Demaille <akim@epita.fr>
9085
9086 * data/glr.cc: New.
9087 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9088
9089 2005-11-12 Akim Demaille <akim@epita.fr>
9090
9091 Let position and location be PODs.
9092 * data/location.cc (position::initialize, location::initialize): New.
9093 (position::position, location::location): Define only if
9094 b4_location_constructors is defined.
9095 * data/lalr1.cc (b4_location_constructors): Define it for backward
9096 compatibility.
9097 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9098
9099 2005-11-12 Akim Demaille <akim@epita.fr>
9100
9101 * data/lalr1.cc: Move the body of the ctor and dtor into the
9102 parser file (instead of the header).
9103 Wrap the implementations in a "namespace yy".
9104
9105 2005-11-12 Akim Demaille <akim@epita.fr>
9106
9107 Have glr.c include its header file when created.
9108 * data/glr.c (b4_shared_declarations): New.
9109 Output them verbatim in the parser if !%defines, otherwise
9110 output then in the header file, and include it instead.
9111
9112 2005-11-11 Akim Demaille <akim@epita.fr>
9113
9114 * data/glr.c: Comment changes.
9115
9116 2005-11-11 Akim Demaille <akim@epita.fr>
9117
9118 When yydebug, report semantic and location values for reductions.
9119 * data/glr.c (yy_reduce_print): Report the semantic values and the
9120 locations.
9121 (YY_REDUCE_PRINT): Adjust.
9122 (yyglrReduce): Use them.
9123 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9124 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9125 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9126 traces.
9127
9128 2005-11-10 Akim Demaille <akim@epita.fr>
9129
9130 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9131 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9132 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9133
9134 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9135
9136 * m4/cxx.m4, examples/Makefile.am: Don't build
9137 examples/calc++ if no C++ compiler is available. (trivial change)
9138
9139 2005-11-09 Akim Demaille <akim@epita.fr>
9140
9141 * src/scan-skel.l: Use a couple of asserts.
9142
9143 2005-11-03 Akim Demaille <akim@epita.fr>
9144
9145 In some (weird) cases, the final state number is incorrect.
9146 Reported by Alexandre Duret-Lutz.
9147 * src/LR0.c (state_list_append): Remove the computation of
9148 final_state.
9149 (save_reductions): Do it here.
9150 (get_state): Alpha conversion.
9151 (generate_states): Use a for loop.
9152 * src/gram.h (item_number_is_rule_number)
9153 (item_number_is_symbol_number): New.
9154 * src/state.c: Use assert.
9155 * src/system.h: Include assert.h.
9156 * tests/sets.at (Accept): New.
9157
9158 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9159
9160 * data/glr.c (yyfill): Adjust comment.
9161 (yyresolveAction): Initialize default location properly
9162 for empty right-hand sides.
9163 (yydoAction): Ditto.
9164 Add comment explaining apparently dead code.
9165 * tests/glr-regression.at
9166 (Incorrectly initialized location for empty right-hand side in GLR):
9167 New test.
9168
9169 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9170
9171 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9172 gnulib when interrupted. This fixes some race conditions and
9173 works around some portability problems (one noted by Paul
9174 Hilfinger).
9175
9176 2005-10-22 Akim <akim@epita.fr>
9177
9178 * Makefile.cfg: Adjust to config -> build-aux.
9179 Reported by twledo.
9180
9181 2005-10-21 Akim Demaille <akim@epita.fr>
9182
9183 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9184 the %parse-params.
9185 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9186 * data/yacc.c (b4_Pure_if): Rename as...
9187 (b4_yacc_pure_if): this.
9188 (YY_SYMBOL_PRINT, yyparse): Adjust.
9189 * doc/bison.texinfo: Formatting changes.
9190
9191 2005-10-21 Akim Demaille <akim@epita.fr>
9192
9193 Finish the transition config -> build-aux.
9194 * configure.ac, Makefile.am: Use build-aux.
9195 * config/prev-version, config/announce-gen, config/Makefile.am:
9196 Move to...
9197 * build-aux/prev-version, build-aux/announce-gen,
9198 * build-aux/Makefile.am: here.
9199
9200 2005-10-14 Akim Demaille <akim@epita.fr>
9201
9202 * examples/calc++/test: Use set -x only when VERBOSE.
9203
9204 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9205
9206 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9207 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9208
9209 2005-10-13 Akim Demaille <akim@epita.fr>
9210
9211 * src/scan-skel.l: Output the base name parts of the parser and
9212 header file names.
9213 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9214 additional checks.
9215 Use this to exercise C++ outputs in subdirs.
9216 Reported by Oleg Smolsky.
9217
9218 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9219
9220 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9221 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9222 Problem reported by John P. Hartmann.
9223 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9224 already defined it.
9225
9226 2005-10-12 Akim Demaille <akim@epita.fr>
9227
9228 * src/parse-gram.y (version_check): Exit 63 to please missing
9229 (stands for "version mismatch).
9230 * tests/input.at, doc/bison.texinfo: Adjust.
9231
9232 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9233
9234 Work around portability problems with Visual Age C compiler
9235 (xlc and xlC_r) reported by John P. Hartmann.
9236 * data/location.cc (initial_column, initial_line): Remove.
9237 All uses replaced by 0 and 1.
9238 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9239 that xlc complains about.
9240 * src/scan-skel.l (skel_wrap): Likewise.
9241 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9242 as __STDC__.
9243 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9244 __STDC_VERSION__. Use it everywhere instead of looking at
9245 __STDC__ and __cplusplus.
9246
9247 2005-10-10 Akim Demaille <akim@epita.fr>
9248
9249 * examples/calc++/test: Be quiet unless VERBOSE.
9250
9251 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9252
9253 * data/c.m4 (yydestruct, yysymprint):
9254 Use YYUSE instead of casting to void.
9255 * data/glr.c (YYUSE): New macro.
9256 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9257 Use it instead of rolling our own.
9258 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9259 (YYCHK1):
9260 Use /*CONSTCOND*/ to suppress lint warnings.
9261 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9262 (YY_STACK_PRINT): Use 'false' not '0'.
9263 (YYUSE): New macro.
9264 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9265 * data/yacc.c (YYUSE): New macro.
9266 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9267 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9268 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9269
9270
9271 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9272 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9273
9274 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9275
9276 Undo the parts of the unlocked-I/O change that substituted
9277 putc or puts for printf. This might hurt performance a bit,
9278 but some people prefer the printf style.
9279 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9280 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9281 All uses replaced by YYFPRINTF and YYDPRINTF.
9282 * data/yacc.c: Likewise.
9283 * lib/bitset.c (bitset_print): Likewise.
9284 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9285 putc and puts.
9286 * lib/lbitset.c (debug_lbitset): Likewise.
9287 * src/closure.c (print_firsts, print_fderives): Likewise.
9288 * src/gram.c (grammar_dump): Likewise.
9289 * src/lalr.c (look_ahead_tokens_print): Likewise.
9290 * src/output.c (escaped_output): Likewise.
9291 (user_actions_output): Break apart two printfs.
9292 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9293 * src/reduce.c (reduce_print): Likewise.
9294 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9295 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9296
9297 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9298 Use assignments rather than casts-to-void to suppress
9299 unused-variable warnings. This pacifies 'lint'.
9300 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9301 unused-variable warnings.
9302
9303 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9304
9305 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9306
9307 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9308
9309 Use unlocked I/O for a minor performance improvement on hosts like
9310 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9311 is to use the gnlib unlocked-io module, and to prefer putc and
9312 puts to printf when either will work (since the latter doesn't
9313 come in an unlocked flavor).
9314 * bootstrap (gnulib_modules): Add unlocked-io.
9315 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9316 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9317 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9318 and similarly for puts and putc and printf.
9319 * data/yacc.c: Likewise.
9320 * lib/bitset.c (bitset_print): Likewise.
9321 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9322 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9323 to printf.
9324 * lib/lbitset.c (debug_lbitset): Likewise.
9325 * src/closure.c (print_firsts, print_fderives): Likewise.
9326 * src/gram.c (grammar_dump): Likewise.
9327 * src/lalr.c (look_ahead_tokens_print): Likewise.
9328 * src/output.c (escaped_output): Likewise.
9329 (user_actions_output): Coalesce two printfs.
9330 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9331 * src/reduce.c (reduce_print): Likewise.
9332 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9333 * src/system.h: Include unlocked-io.h rather than stdio.h.
9334
9335 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9336 this confuses xgettext.
9337
9338 2005-10-02 Akim Demaille <akim@epita.fr>
9339
9340 * bootstrap (gnulib_modules): Add strverscmp.
9341 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9342 * m4/.cvsignore: Add strverscmp.m4.
9343 * src/parse-gram.y (%require): New token, new rule.
9344 (version_check): New.
9345 * src/scan-gram.l (%require): Adjust.
9346 * tests/input.at (AT_REQUIRE): New.
9347 Use it.
9348 * doc/bison.texinfo (Require Decl): New.
9349 (Calc++ Parser): Use %require.
9350
9351 2005-10-02 Akim Demaille <akim@epita.fr>
9352
9353 * data/location.cc: New.
9354
9355 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9356 Akim Demaille <akim@epita.fr>
9357
9358 Make sure -odir/foo.cc creates dir/location.hh etc.
9359 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9360 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9361 (spec_defines_file): Now const.
9362 (dir_prefix): New.
9363 (short_base_name): Remove.
9364 * src/files.c: Adjust.
9365 (dirname.h): Include.
9366 (base_name): Don't prototype it.
9367 (finput): Remove, duplicates gram_in.
9368 (full_base_name, short_base_name): Replace by...
9369 (all_but_ext, all_but_tab_ext): these.
9370 (compute_base_names): Rename as...
9371 (compute_file_name_parts): this.
9372 Update to compute the new variables, including dir_prefix.
9373 Adjust dependencies.
9374 * src/output.c (prepare): Output them.
9375 * src/reader.c: Adjust to use gram_in, not finput.
9376 * src/scan-skel.l (@dir_prefix@): New.
9377
9378 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9379
9380 * lib/subpipe.c: New function end_of_output_subpipe() added
9381 to allow support for non-posix systems. This is a no-op function
9382 for posix systems.
9383
9384 * lib/subpipe.h: New function end_of_output_subpipe() added
9385 to allow support for non-posix systems. This is a no-op function
9386 for posix systems.
9387
9388 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9389 handle the lack of pipe/fork functionality on non-posix systems.
9390
9391 * djgpp/Makefile.maint: DJGPP specific file.
9392
9393 * djgpp/README.in: DJGPP specific file.
9394
9395 * djgpp/config.bat: DJGPP specific configuration file.
9396
9397 * djgpp/config.sed: DJGPP specific configuration file.
9398
9399 * djgpp/config.site: DJGPP specific configuration file.
9400
9401 * djgpp/config_h.sed: DJGPP specific configuration file.
9402
9403 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9404
9405 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9406
9407 2005-10-02 Akim Demaille <akim@epita.fr>
9408
9409 * data/location.cc: New, extract from...
9410 * data/lalr1.cc: here.
9411 (location.hh): Include it after the user prologue, in case the
9412 filename type is defined by the user.
9413 Forward declation location and position before the pre-prologue.
9414 (yyresult_): Rename as...
9415 (yyresult): this, it's a local variable, not an attribute.
9416 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9417
9418 2005-10-01 Akim Demaille <akim@epita.fr>
9419
9420 * examples/extexi: Restore the #line generation.
9421
9422 2005-09-30 Akim Demaille <akim@epita.fr>,
9423 Alexandre Duret-Lutz <adl@gnu.org>
9424
9425 Move the token type and YYSTYPE in the parser class.
9426 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9427 (parser::token): New, from the moved free definition of tokens.
9428 (parser::semantic_value): Now a full definition instead of an
9429 indirection to YYSTYPE.
9430 (b4_post_prologue): No longer included in the header file, but
9431 in the implementation file.
9432 * doc/bison.texi (C+ Language Interface): Update.
9433 * src/parse-gram.y: Support unary %define.
9434 * tests/actions.at: Define global_tokens_and_yystype for backward
9435 compatibility until we update the tests.
9436 * tests/calc.at: Idem.
9437 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9438 to simplify the code.
9439
9440 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9441
9442 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9443 Ah, the good old days! Problem reported by Peter Klein.
9444 * bootstrap (gnulib_modules): Add strerror, strtoul.
9445 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9446 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9447
9448 2005-09-29 Akim Demaille <akim@epita.fr>
9449
9450 * data/c.m4 (b4_error_verbose_if): New.
9451 * data/lalr1.cc: Use it.
9452 (YYERROR_VERBOSE_IF): Remove.
9453 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9454 parser members, replaced by...
9455 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9456 local variables.
9457 (yysyntax_error_): Takes the state number as argument.
9458 (yyreduce_print_): Use the argument yyrule, not the former
9459 attribute yyn_.
9460
9461 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9462
9463 * bootstrap (gnulib_modules): Add verify.
9464 * lib/.cvsignore: Add verify.h.
9465 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9466 * src/system.h (verify): Remove.
9467 Include verify.h instead.
9468 * src/tables.c (tables_generate): Use new API for 'verify'.
9469
9470 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9471
9472 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9473 local variables whose names begin with 'yy'.
9474 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9475 Trivial changes from Joel E. Denny.
9476
9477 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9478 it itself.
9479 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9480 don't use alloca any more.
9481
9482 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9483 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9484 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9485 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9486 to match yacc.c, to test more hosts.
9487
9488 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9489
9490 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9491 doesn't affect behavior.
9492 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9493 Solaris, AIX, MSC.
9494 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9495 This works a bit better with glibc, if user code has already included
9496 stdlib.h.
9497 * doc/bison.texinfo (Bison Parser): Document that users can't
9498 arbitrarily use malloc and free for other purposes. Document
9499 that <alloca.h> and <malloc.h> might be included.
9500 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9501 user must declare alloca.
9502
9503 * HACKING (release): Forwarn the Translation Project about
9504 stable releses.
9505
9506 2005-09-20 Akim Demaille <akim@epita.fr>
9507
9508 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9509
9510 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9511
9512 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9513 (YYSTACK_ALLOC_MAXIMUM): Use it.
9514 (yysyntax_error): New function.
9515 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9516 multiple syntax errors are reported, and alloca is being used.
9517 Instead, reallocate buffers twice as big each time, so that
9518 we waste at most half the allocated memory. Start with a small
9519 (128-byte) buffer that will suffice in most cases anyway.
9520 Use yysyntax_error to do most of the work.
9521
9522 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9523 yynerrs is the number of errors reported, not the number of
9524 errors encountered.
9525
9526 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9527 Mark it as expected to fail.
9528 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9529 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9530 Don't start user-code symbols with "yy", to avoid name space problems.
9531
9532 2005-09-19 Akim Demaille <akim@epita.fr>
9533
9534 Remove the traits, failed experiment.
9535 It never proved useful, and anyway because of the current
9536 definition, it was not possible to have several specialization of
9537 this traits, making it useless.
9538 * data/lalr1.cc (yy:traits): Remove.
9539 Inline its definitions in the parser class.
9540
9541 2005-09-19 Akim Demaille <akim@epita.fr>
9542
9543 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9544 least Mac OSX with a /usr/local install of gettext.
9545
9546 2005-09-19 Akim Demaille <akim@epita.fr>
9547
9548 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9549 and yytoken for similarity with the other skeletons.
9550
9551 2005-09-19 Akim Demaille <akim@epita.fr>
9552
9553 * NEWS, configure.ac: update version number to 2.1a.
9554
9555 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9556
9557 * NEWS: Version 2.1.
9558
9559 * NEWS: Remove notice of yytname change, since it was never in an
9560 official release.
9561 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9562 diagnostic.
9563 * src/output.c (prepare): Likewise.
9564 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9565 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9566 is not defined. This is an awful hack, but it's enough for now.
9567 All callers changed.
9568 * tests/glr-regression-at (make_value): Args are const pointers now,
9569 to avoid GCC warning.
9570 (Duplicated user destructor for lookahead): New test. Currently
9571 skipped. It fails on my host but I'm not sure it'll always fail.
9572
9573 2005-09-16 Akim Demaille <akim@epita.fr>
9574
9575 * src/symtab.h (struct symbol): Declare the printer and destructor
9576 as const, to avoid accidental calls to free.
9577 (symbol_destructor_set, symbol_printer_set): Adjust.
9578 * src/symtab.c: Adjust.
9579
9580 2005-09-16 Akim Demaille <akim@epita.fr>
9581
9582 * data/c.m4 (b4_token_enums): New.
9583 (b4_token_defines): Rename as...
9584 (b4_token_enums_defines): this.
9585 (b4_token_defines): New, output only the #defines.
9586 * data/yacc.c, data/glr.c: Adjust.
9587 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9588 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9589 as default values.
9590
9591 2005-09-16 Akim Demaille <akim@epita.fr>
9592
9593 * data/lalr1.cc (yylex_): Remove, inline its code.
9594 (yyreport_syntax_error_): Remove, replaced by...
9595 (yysyntax_error_): this which returns a string and leaves to the
9596 caller the call to the users' error function.
9597 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9598 Move from members of the parser object...
9599 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9600 to local variables of the parse function.
9601
9602 2005-09-16 Akim Demaille <akim@epita.fr>
9603
9604 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9605 since it's in Bison's name space.
9606
9607 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9608
9609 * data/glr.c (yyresolveValue): Add default case to pacify
9610 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9611
9612 * NEWS: Document when yyparse started to return 2.
9613 * doc/bison.texinfo (Parser Function): Document when yyparse
9614 returns 2.
9615
9616 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9617 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9618 changed.
9619 (class position): file_name -> filename (reverting). All uses changed.
9620
9621 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9622
9623 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9624 do anything if $@ exists. This reverts part of the 2005-07-07
9625 patch.
9626
9627 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9628
9629 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9630 contains obsolete information and isn't worth distributing as a
9631 separate file anyway.
9632 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9633 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9634 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9635 (yyparse): Abort if user code uses longjmp to throw an unexpected
9636 value.
9637
9638 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9639
9640 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9641 Suggested by twlevo@xs4all.nl.
9642
9643 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9644 This avoids a diagnostic from gcc -Wswitch-enum.
9645 Problem reported by twlevo@xs4all.nl.
9646
9647 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9648 standards. Use "file name" or "file" or "name", depending on
9649 the context.
9650 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9651 not to hack/foo.tab.c.
9652 (Calc++ Top Level): 2nd arg of main is not const.
9653 * data/glr.c: b4_filename -> b4_file_name.
9654 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9655 All uses changed.
9656 (class position): filename -> file_name. All uses changed.
9657 * data/yacc.c: b4_filename -> b4_file_name.
9658 * lib/bitset.h: filename -> file_name in local vars.
9659 * lib/bitset_stats.c: Likewise.
9660 * src/files.c: Likewise.
9661 * src/scan-skel.l ("@output ".*\n): Likewise.
9662 * src/files.c (file_name_split): Renamed from filename_split.
9663 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9664
9665 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9666
9667 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9668 to accommodate latest gnulib.
9669
9670 * tests/glr-regression.at (Duplicate representation of merged trees):
9671 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9672
9673 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9674 needed.
9675
9676 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9677
9678 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9679 All uses changed. Invoke user destructor after an error during a
9680 split parse (trivial change from Joel E. Denny).
9681
9682 * tests/glr-regression.at
9683 (User destructor after an error during a split parse): New test case.
9684 Problem reported by Joel E. Denny in:
9685 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9686
9687 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9688
9689 * README-cvs: Give URLs for recommended tools.
9690 Mention Gzip version problem, and bootstrapping issues.
9691 Remove troubleshooting section, as it's somewhat obsolete.
9692
9693 * bootstrap (no_cache): New var, to accommodate different wget
9694 variants. Use it instead of '-C off'. Problem reported by
9695 twlevo@xs4all.nl.
9696
9697 * data/glr.c (yydestroyStackItem): New function.
9698 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9699 debugging information. Problem reported by Joel E. Denny.
9700
9701 2005-08-25 Akim Demaille <akim@epita.fr>
9702
9703 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9704
9705 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9706
9707 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9708 Don't invoke destructor on unresolved entries.
9709 * tests/glr-regression.at
9710 (User destructor for unresolved GLR semantic value): New test case.
9711 Problem reported by Joel E. Denny in:
9712 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9713
9714 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9715
9716 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9717 Add strnlen.c.
9718 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9719 lib-prefix.m4, po.m4.
9720
9721 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9722 in yydestruct diagnostic, since it might not be an error.
9723 Problem reported by Joel Denny near end of
9724 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9725 * data/lalr1.cc (yyerturn): Likewise.
9726 * data/yacc.c (yyreturn): Likewise.
9727 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9728
9729 * src/files.c: Remove obsolete FIXME comment.
9730
9731 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9732 with the other templates, and to fix bogus run-on messages such
9733 as the one reported at the end of
9734 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9735 All callers changed to avoid the newline.
9736 (yyprocessOneStack): Output two lines rather than one, to accommodate
9737 the above change. This changes the debug output format slightly.
9738
9739 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9740 reported by Joel E. Denny in
9741 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9742 (trivial change).
9743 * tests/glr-regression.at (Duplicate representation of merged trees):
9744 New test, from Joel E. Denny in:
9745 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9746 * THANKS: Add Joel E. Denny.
9747
9748 * configure.ac (AC_INIT): Bump to 2.0c.
9749
9750 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9751
9752 * NEWS: Version 2.0b.
9753
9754 * Makefile.am (SUBDIRS): Put examples before tests, so that
9755 "make check" doesn't finish with "All 1 tests passed".
9756
9757 * tests/regression.at (Token definitions): Don't rely on
9758 AT_PARSER_CHECK for data that contains backslashes. It currently
9759 uses 'echo', and 'echo' isn't portable if its argument contains
9760 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9761 that the byte '\0xff' is not printable in the C locale; it is,
9762 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9763 not printable, so use '\0x81' to test.
9764
9765 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9766 version of GCC, since the macro is used with non-GCC compilers.
9767
9768 Fix core dump reported by Pablo De Napoli in
9769 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9770 * tests/regression.at (Invalid inputs with {}): New test.
9771 * src/parse-gram.y (token_name): Translate type before using
9772 it as an index.
9773
9774 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9775 the user's name space. All uses changed to __attribute__
9776 ((__unused__)).
9777 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9778 Add __attribute__ ((__noreturn__)).
9779
9780 * etc/clcommit: Remove. We weren't using it, and it failed
9781 "make maintainer-distcheck".
9782 * Makefile.maint: Merge from coreutils.
9783 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9784 (syntax-check-rules): Change list of rules as described below.
9785 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9786 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9787 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9788 (sc_trailing_space): New rules.
9789 (sc_xalloc_h_in_src): Remove.
9790 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9791 (sc_space_tab, sc_error_exit_success, sc_changelog):
9792 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9793 (makefile-check, po-check, author_mark_check):
9794 (makefile_path_separator_check, copyright-check):
9795 Use grep -n, to make it easier to find violations.
9796 Use CVS_LIST and CVS_LIST_EXCEPT.
9797 (header_regexp, h_re): Remove.
9798 (dd_c): New macro.
9799 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9800 (my-distcheck): Use more-modern GCC flags.
9801 (signatures, %.asc): Remove.
9802 (rel-files, announcement): Remove signatures.
9803 Restore old updating code, even though we don't use it, so
9804 that we're the same as coreutils.
9805 (alpha, beta, major): Depend on news-date-check.
9806 Make the upload commands.
9807
9808 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9809 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9810 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9811 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9812 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9813 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9814 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9815 * tests/sets.at: Likewise.
9816
9817 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9818 we comment out the Autoconf version number.
9819 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9820 it's error-prone and "make maintainer-distcheck" rejects it.
9821
9822 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9823 Indent calls to "error" to pacify "make maintainer-distcheck",
9824 when the calls are not intended to be translated.
9825 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9826
9827 * src/Makefile.am (DEFS): Use +=, to pacify
9828 "make maintainer-distcheck".
9829 (bison_SOURCES): Add scan-skel.h.
9830 (sc_tight_scope): New rule, from coreutils.
9831
9832 * src/files.c (src_extension, header_extension):
9833 Now static, not extern.
9834 * src/getargs.c (short_options): Likewise.
9835 * src/muscle_tab.c (muscle_table): Likewise.
9836 * src/parse-gram.y (current_class, current_type, current_prec):
9837 Likewise.
9838 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9839 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9840 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9841 void, to avoid warning when NLS is disabled.
9842 * src/output.c: Include scan-skel.h.
9843 (scan_skel): Remove decl, since scan-skel.h does this.
9844 (output_skeleton):
9845 Indent calls to "error" to pacify "make maintainer-distcheck".
9846 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9847 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9848 "make maintainer-distcheck".
9849 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9850 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9851 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9852 (skel_lex_destroy, scan_skel): Move these decls to...
9853 * src/scan-skel.h: New file.
9854 * src/uniqstr.c (uniqstr_assert):
9855 Indent calls to "error" to pacify "make maintainer-distcheck".
9856
9857 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9858 not @VAR@.
9859
9860 * tests/torture.at: Revamp to avoid misuse of atoi that
9861 "make maintainer-distcheck" complained about.
9862
9863 * examples/extexi (message): Don't print a message more than once,
9864 and omit line-number decoration that makes Emacs compile think
9865 that informative messages are worth worrying about.
9866
9867 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9868
9869 * configure.ac: Update version number.
9870
9871 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9872 accidentally.
9873 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9874 autogenerated by the maintainer.
9875 * examples/calc++/.cvsignore: Add *.yy.
9876
9877 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9878 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9879 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9880
9881 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9882
9883 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9884 from maintainer-distcheck about casting the argument of 'free'.
9885
9886 * NEWS: Mention recent yytname changes.
9887 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9888
9889 * bootstrap: For translations that have not yet been upgraded to
9890 the new runtime-po domain, prime the pump by extracting the
9891 relevant strings from the obsolete translations. This code can be
9892 removed once the bison-runtime domain has been translated by each
9893 team.
9894
9895 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9896 now that token names are already quoted.
9897
9898 Fix problem reported by Anthony Heading.
9899 * data/glr.c (YYTOKEN_TABLE): New macro.
9900 (yytname): Define if YYTOKEN_TABLE.
9901 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9902 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9903 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9904 * src/output.c (prepare_symbols): Output token_table_flag.
9905
9906 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9907
9908 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9909 again if the first call fails.
9910
9911 * data/glr.c (yytnamerr): New function.
9912 (yyreportSyntaxError): Use it to dequote most string literals.
9913 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9914 with other skeletons. All uses changed.
9915 (yytnameerr_): New function.
9916 (yyreport_syntax_error): Use it to dequote most string literals.
9917 * data/yacc.c (yytnamerr): New function.
9918 (yyerrlab): Use it to decode most string literals.
9919 * doc/bison.texinfo (Decl Summary, Calling Convention):
9920 Clarify quoting convention of yytname.
9921 * src/output.c (prepare_symbols): Quote all names. This undoes
9922 the 2005-04-17 change, which is now accomplished (mostly) via
9923 changes in the parsers as described above.
9924 * tests/regression.at (Token definitions, Web2c Actions):
9925 Undo most 2005-04-17 change here, too.
9926
9927 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9928
9929 Fix more problems reported by twlevo@xs4all.nl.
9930 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9931 remove trailing spaces. This loses the exit status of ./types,
9932 and isn't needed since ./types shouldn't be emitting trailing
9933 spaces.
9934 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9935 as the stack isn't valid in that case.
9936
9937 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9938 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9939 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9940 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9941 is used.
9942 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9943 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9944 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9945 Likewise.
9946
9947 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9948 overly-picky compilers that reject 'char *foo = "bar";'.
9949
9950 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9951 to FILE * parameter, not to stderr. This fixes a typo introduced
9952 in the 2005-07-12 change.
9953
9954 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9955 warnings from GCC 4.
9956
9957 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9958 (yyglrShiftDefer, yysplitStack):
9959 Remove unused parameters b4_pure_formals. All uses changed.
9960 (yyglrShift): Remove unused parameters b4_user_formals.
9961 All uses changed.
9962 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9963
9964 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9965
9966 Destructor cleanups and regularization among the three skeletons.
9967 * NEWS: Document the behavior changes.
9968 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9969 stack before failing, as the cleanup code will do it for us now.
9970 * data/lalr1.cc (yyerrlab): Likewise.
9971 * data/glr.c (yyparse): Pop everything off the stack before
9972 freeing it, so that destructors get called properly.
9973 * data/lalr1.cc (yyreturn): Likewise.
9974 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9975 This is more consistent.
9976 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9977 why destructors might be called. 1.875 -> 2.1.
9978 (Destructor Decl, Decl Summary, Table of Symbols):
9979 Some English-language cleanups for %destructor.
9980 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9981 Add output line for destructor of start symbol.
9982 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9983 because of that same extra output line.
9984
9985 * NEWS: Document minor wording changes in diagnostics of
9986 Bison-generated parsers.
9987 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9988 Remove unused formals. All uses changed.
9989 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9990 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9991 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9992 Rename yyoverflowab to yyexhaustedlab.
9993 When memory exhaustion occurs during syntax-error reporting,
9994 report it separately rather than in a single diagnostic; this
9995 eases translation.
9996 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9997 (Memory Exhausted): Renamed from Parser Stack Overflow.
9998 Revamp wording slightly to prefer "memory exhaustion".
9999 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10000
10001 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10002
10003 Add i18n support to the GLR skeleton. Partially fix the C++
10004 skeleton; a C++ expert needs to finish this. Remove debugging
10005 msgids; there's little point to having them translated, since they
10006 can be understood only by someone who can read the
10007 (English-language) source code.
10008
10009 Generate runtime-po/bison-runtime.pot automatically, so that we
10010 don't have to worry about garbage getting in that file. We'll
10011 make sure after the next official release that old msgids don't
10012 get lost. See
10013 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10014
10015 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10016 Now auto-generated.
10017 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10018 Fix typos in explanations of the runtime file.
10019 * bootstrap: Change gettext keyword from YYI18N to YY_.
10020 Use standard Makefile.in.in in runtime-po, since we'll arrange
10021 for backward-compatible bison-runtime.po files in a different way.
10022 * data/glr.c (YY_): New macro, from yacc.c.
10023 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10024 Translate messages intended for users.
10025 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10026 the wording in the other skeletons. We don't know that the memory
10027 is virtual.
10028 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10029 Use same method that yacc.c uses.
10030 Don't translate debugging messages.
10031 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10032 it doesn't work (yet), and requires C++ expertise to fix.
10033 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10034 Move defn to a more logical place, to be consistent with other
10035 skeletons.
10036 Don't translate debugging messages.
10037 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10038 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10039 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10040 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10041
10042 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10043 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10044 void, not int.
10045 * tests/glr-regression.at (Badly Collapsed GLR States):
10046 Likewise.
10047 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10048 yylex should return 0 at EOF rather than aborting.
10049
10050 Improve tests for stack overflow in GLR parser.
10051 Problem reported by twlevo@xs4all.nl.
10052 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10053 All uses removed.
10054 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10055 can handle the problem.
10056 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10057 (yyparse): New local variable yyresult to record the result.
10058 Use result of setjmp to set it, rather than storing itinto
10059 struct.
10060 (yyDone): Remove label.
10061 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10062 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10063 if YYABORT is used).
10064 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10065 yyparse status; put status > 1 into diagnostic.
10066 Check that status==2 works.
10067 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10068 Use exit status 3 for failure to open (which shouldn't happen).
10069
10070 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10071
10072 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10073 1 on syntax error; just let yyparse do its thing.
10074 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10075 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10076 (Exploding the Stack Size with Alloca):
10077 (Exploding the Stack Size with Malloc):
10078 Expect exit status 2, not 1, since the parser is supposed to blow
10079 its stack. Problem reported by twlevo@xs4all.nl.
10080
10081 * data/glr.c (yyparse): Don't assume that the initial calls
10082 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10083 Print a stack-overflow message and fail instead.
10084 Initialize the line-number information before creating the stack,
10085 so that the stack-overflow message can report line zero safely.
10086
10087 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10088
10089 Fix problems reported by twlevo@xs4all.nl.
10090 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10091 (yyuserMerge): Provide a default case if b4_mergers is empty.
10092 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10093 * tests/glr-regression.at
10094 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10095 Add casts to pacify C++ compilers.
10096 * tests/glr-regression.at (Improper merging of GLR delayed action
10097 sets): Declare yylex before using it.
10098 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10099 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10100 test for valgrind; valgrind is independent of g++.
10101 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10102 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10103 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10104 Use a destructor, so that we can expand the stack. Change
10105 YYSTYPE to char * so that we can free it. Cast result of malloc.
10106
10107 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10108
10109 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10110 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10111
10112 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10113
10114 * PACKAGING: New file, suggested by Bruno Haible and taken from
10115 similar wording in gettext's PACKAGING file.
10116 * NEWS: Mention PACKAGING.
10117 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10118
10119 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10120
10121 * NEWS: Document recent i18n improvements.
10122 * bootstrap: Get runtime translations into runtime-po.
10123 Create runtime-po files automatically, if possible.
10124 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10125 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10126 does not infringe on the user's name space.
10127 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10128 * doc/bison.texinfo (Internationalization): Revamp the English
10129 and Texinfo syntax a bit, to try to make it clearer.
10130 (Bison Options, Option Cross Key): Mention --print-localedir.
10131 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10132 YYENABLE_NLS. Quote a bit more.
10133 * runtime-po/.cvsignore: New file.
10134 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10135 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10136 * runtime-po/quot.sed: Likewise.
10137 * runtime-po/boldquot.sed: Likewise.
10138 * runtime-po/en@quot.header: Likewise.
10139 * runtime-po/en@boldquot.header: Likewise.
10140 * runtime-po/insert-header.sin: Likewise.
10141 * runtime-po/remove-potcdate.sin: Likewise.
10142 * runtime-po/Makevars: Likewise.
10143 * runtime-po/LINGUAS: Likewise.
10144 * runtime-po/de.po: Likewise; we will rely on the translation project
10145 to maintain this, so "bootstrap" should get it.
10146 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10147 its value.
10148 * src/main.c (main): Bind the bison-runtime domain, too.
10149
10150 2005-07-12 Bruno Haible <bruno@clisp.org>
10151
10152 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10153 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10154 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10155 * runtime-po: New directory.
10156 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10157 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10158 * runtime-po/Rules-quot: New file, copied from po/.
10159 * runtime-po/quot.sed: Likewise.
10160 * runtime-po/boldquot.sed: Likewise.
10161 * runtime-po/en@quot.header: Likewise.
10162 * runtime-po/en@boldquot.header: Likewise.
10163 * runtime-po/insert-header.sin: Likewise.
10164 * runtime-po/remove-potcdate.sin: Likewise.
10165 * runtime-po/Makevars: New file.
10166 * runtime-po/POTFILES.in: New file.
10167 * runtime-po/LINGUAS: New file.
10168 * runtime-po/bison-runtime.pot: New file.
10169 * runtime-po/de.po: New file.
10170 * m4/bison.m4: New file.
10171 * Makefile.am (SUBDIRS): Add runtime-po.
10172 (aclocaldir, aclocal_DATA): New variables.
10173 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10174 Define aclocaldir.
10175 * src/getargs.c (usage): Document --print-localedir option.
10176 (PRINT_LOCALEDIR_OPTION): New enum item.
10177 (long_options): Add --print-localedir option.
10178 (getargs): Handle --print-localedir option.
10179 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10180 (Internationalization): New section.
10181
10182 2005-07-12 Akim Demaille <akim@epita.fr>
10183
10184 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10185 for consistency with the rest of the code.
10186 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10187 Add separators.
10188
10189 2005-07-12 Akim Demaille <akim@epita.fr>
10190
10191 * src/parse-gram.y: Use %printer instead of YYPRINT.
10192
10193 2005-07-12 Akim Demaille <akim@epita.fr>
10194
10195 * src/symtab.h, src/symtab.c (symbol_print): New.
10196 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10197 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10198
10199 2005-07-12 Akim Demaille <akim@epita.fr>
10200
10201 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10202 b4_at_dollar and b4_dollar_dollar.
10203
10204 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10205
10206 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10207 and Pennello's paper.
10208
10209 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10210
10211 * data/yacc.c (yyparse): Undo previous patch. Instead,
10212 set yylsp[0] and yyvsp[0] only if the initial action
10213 sets yylloc and yylval, respectively.
10214
10215 * data/yacc.c (yyparse): In the initial action, set
10216 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10217 This avoids the use of undefined variables if the initial
10218 action does not set yylloc and/or yylval.
10219
10220 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10221
10222 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10223 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10224 Remove from CVS. These files are automatically generated.
10225 * examples/extexi: Clarify that this file is now part of Bison,
10226 not GNU M4, and that it works with any POSIX-compatible Awk.
10227 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10228 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10229 so that we also get calc++-parser.yy. Geneate it.
10230 Use $(AWK), not gawk, since any conforming Awk will do.
10231 Put comment before action, since older 'make' can't handle comment
10232 in action.
10233 $(BUILT_SOURCES): List all built sources, not just some of them.
10234 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10235 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10236 $($(calc_sources_generated)): Remove unnecessary test for existence
10237 of target. (This had a shell syntax error anyway; a stray "x".)
10238 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10239 calc++-parser.yy.
10240 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10241
10242 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10243 implied by the other modules.
10244
10245 2005-07-06 Akim Demaille <akim@epita.fr>
10246
10247 Bind examples/calc++ to the package.
10248 * examples/calc++/Makefile: Remove, replaced by...
10249 * examples/calc++/Makefile.am: ... this new file.
10250 * examples/calc++/test: Remove input.
10251 * examples/calc++/compile: Remove.
10252 * examples/Makefile.am: New.
10253 * configure.ac, Makefile.am: Adjust.
10254 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10255
10256 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10257
10258 * data/glr.c (yyFail): Drastically simplify; since the format argument
10259 never had any % directives, we can simply pass it to yyerror.
10260 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10261 be modified later, as that is the usual style in glr.c.
10262 Problems reported by Paul Hilfinger.
10263
10264 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10265 and size overflow errors.
10266 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10267 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10268 (YYSIZEMAX): New macro.
10269 (yystpcpy): New function, taken from yacc.c.
10270 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10271 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10272 so that we don't have to maintain their signatures.
10273 (yyFail): Check for buffer overflow, by using vsnprintf rather
10274 than vsprintf. Allocate a bigger buffer if possible.
10275 Report an error if buffer allocation fails.
10276 (yyStackOverflow): New function.
10277 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10278 the initialization was successful. It might fail if storage was
10279 exhausted.
10280 (yyexpandGLRStack): Add more checks for storage allocation failure.
10281 Use yyStackOverflow to report failures.
10282 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10283 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10284 Don't assume stack number fits in int.
10285 (yysplitStack): Check for storage allocation failure.
10286 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10287 can print diagnostics on storage allocation failure. All callers
10288 changed.
10289 (yyresolveValue): Use yybool for boolean.
10290 (yyreportSyntaxError): Check for size-calculation overflow.
10291 This code is taken from yacc.c.
10292 (yyparse): Check for storage allocation errors when allocating
10293 the initial stack.
10294
10295 2005-07-05 Akim Demaille <akim@epita.fr>
10296
10297 Extract calc++ from the documentation.
10298 * doc/bison.texinfo (Calc++): Add the extraction marks.
10299 * examples/extexi: New, from the aborted GNU Programming 2E.
10300 Separate the different paragraph of a file with empty lines.
10301 * examples/Makefile: Use it to extract the whole calc++ example.
10302
10303 2005-06-24 Akim Demaille <akim@epita.fr>
10304
10305 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10306 class typedefs.
10307
10308 2005-06-22 Akim Demaille <akim@epita.fr>
10309
10310 * doc/bison.texinfo (C++ Language Interface): First stab.
10311 (C++ Parsers): Remove.
10312
10313 2005-06-22 Akim Demaille <akim@epita.fr>
10314
10315 * data/lalr1.cc (yylex_): Honor %lex-param.
10316
10317 2005-06-22 Akim Demaille <akim@epita.fr>
10318
10319 Start a set of simple examples.
10320 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10321 * examples/calc++/calc++-driver.hh,
10322 * examples/calc++/calc++-parser.yy,
10323 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10324 * examples/calc++/compile, examples/calc++/test: New.
10325
10326 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10327
10328 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10329 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10330 which stems from the 2005-05-27 patch.
10331
10332 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10333
10334 * data/glr.c: Modify treatment of unused parameters to permit use
10335 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10336
10337 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10338
10339 Fix infringement on user name space reported by Janos Zoltan Szabo.
10340 * data/yacc.c (yyparse): strlen -> yystrlen.
10341
10342 2005-05-30 Akim Demaille <akim@epita.fr>
10343
10344 * data/lalr1.cc (_): New.
10345 Translate the various messages.
10346
10347 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10348
10349 Fix infringement on user name space reported by Bruno Haible.
10350 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10351 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10352 the user's name space.
10353 (alloca): Include <stdlib.h> to get it, if it's not built in.
10354 (YYMALLOC, YYFREE): Define only if needed.
10355 (malloc, free): Declare, but only if needed, as this infringes on
10356 the user name space.
10357
10358 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10359
10360 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10361 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10362 with %d format.
10363 * lib/ebitset.c (min, max): Undef before defining.
10364 * lib/vbitset.c (min, max): Likewise.
10365 * lib/subpipe.c (create_subpipe): Save local variables in case
10366 vfork clobbers them.
10367
10368 2005-05-24 Bruno Haible <bruno@clisp.org>
10369
10370 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10371 error message syntax used by gcc-4.0.
10372
10373 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10374
10375 * README: Mention m4 1.4.3. Remove obsolete advice about
10376 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10377
10378 * bootstrap: Remove workaround for problem I encountered with
10379 gettext 0.14.1; it seems to be fixed now.
10380
10381 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10382
10383 * NEWS: Version 2.0a.
10384
10385 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10386 the previous change.
10387
10388 Various maintainer cleanups.
10389 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10390 conftest*, for benefit of CVS commands run at the same time as
10391 "configure". Add build-aux, since "bootstrap" now creates it and
10392 its subfiles.
10393 * Makefile.cfg (move_if_change): Remove.
10394 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10395 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10396 (po_repo, do-po-update, po-update, wget_files, get-targets):
10397 (config.guess-url_prefix, config.sub-url_prefix):
10398 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10399 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10400 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10401 Remove.
10402 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10403 this is now the recommended name.
10404 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10405 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10406 ylwrap. These files now go into build-aux.
10407 * config/move-if-change: Remove.
10408 * config/prev-version.txt: Bump from 1.75 to 2.0.
10409
10410 * bootstrap: Add stdio-safer, unistd-safer modules.
10411 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10412 we don't need it).
10413 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10414 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10415 * lib/subpipe.c: Include "unistd-safer.h".
10416 (create_subpipe): Make sure all the newly-created
10417 file descriptors are > 2, so that diagnostics don't
10418 get sent down them (which might cause Bison to hang, in theory).
10419 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10420 * src/files.c (xfopen): Use fopen_safer, not fopen.
10421
10422 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10423 yesterday's yacc.c fix.
10424
10425 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10426
10427 * data/glr.c, data/lalr1.cc: Update copyright date.
10428
10429 Fix a destructor bug reported by Wolfgang Spraul in
10430 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10431 * data/yacc.c (yyabortlab): Don't call destructor, and
10432 don't set yychar to EMPTY.
10433 (yyoverflowlab): Don't call destructor.
10434 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10435 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10436 since we no longer output the message "discarding lookahead token
10437 end of input ()".
10438
10439 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10440
10441 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10442 fix a small glitch in debugging output.
10443 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10444 after YY_SYMBOL_PRINT where needed.
10445
10446 (struct yyGLRState): Add some comments.
10447 (struct yySemanticOption): Add some comments.
10448 (union yyGLRStackItem): Add comment.
10449
10450 (yymergeOptionSets): Correct this to properly perform the union,
10451 avoiding infinite reported by Michael Rosien.
10452 Update comment.
10453
10454 * tests/glr-regression.at: Add test for GLR merging error reported
10455 by M. Rosien.
10456
10457 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10458
10459 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10460 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10461 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10462 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10463 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10464 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10465 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10466 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10467 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10468 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10469 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10470 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10471 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10472 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10473 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10474 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10475 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10476 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10477 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10478 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10479 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10480 src/output.h, src/parse-gram.c, src/parse-gram.h,
10481 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10482 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10483 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10484 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10485 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10486 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10487 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10488 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10489 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10490 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10491 tests/reduce.at, tests/regression.at, tests/sets.at,
10492 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10493 Update FSF postal mail address.
10494
10495 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10496
10497 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10498 Problem reported by Ralf Menzel.
10499
10500 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10501
10502 * tests/actions.at: Test that stack overflow invokes destructors.
10503 From Marcus Holland-Moritz.
10504 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10505 from here....
10506 (yyreturn): to here. That way, destructors are called properly
10507 even if the stack overflows, or the user calls YYACCEPT or
10508 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10509 (yyoverflowlab): Destroy the lookahead.
10510
10511 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10512
10513 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10514
10515 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10516
10517 * NEWS: Bison-generated C parsers no longer quote literal strings
10518 associated with tokens.
10519 * src/output.c (prepare_symbols): Don't escape strings,
10520 since users don't want to see C escapes.
10521 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10522 in diagnostics.
10523 * tests/input.at (Torturing the Scanner): Likewise.
10524 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10525
10526 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10527
10528 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10529 the data size is known to be too small and we can't increase it.
10530 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10531
10532 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10533
10534 * src/parse-gram.y: Include quotearg.h.
10535 (string_as_id): Quote $1 before using it as a key, since the
10536 lexer no longer quotes it for us.
10537 (string_content): Don't strip quotes, since lexer no longer
10538 quotes it for us.
10539 * src/scan-gram.l: Include quotearg.h.
10540 ("\""): Omit quote.
10541 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10542 a key, since the rest of the lexer doesn't quote it.
10543 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10544 * tests/regression.at (Token definitions): Check for backslashes
10545 in token strings.
10546
10547 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10548 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10549 (yyparse): Revamp code to generate long syntax error message, to
10550 make it easier to translate, and to avoid problems with arithmetic
10551 overflow. Change "virtual memory" to "memory" in diagnostic, since
10552 we don't know whether the memory is virtual.
10553
10554 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10555
10556 * NEWS: Bison-generated C parsers now use the _ macro to
10557 translate strings.
10558 * data/yacc.c (_) [!defined _]: New macro.
10559 All English strings wrapped inside this macro.
10560 * doc/bison.texinfo (Bison Parser): Document _.
10561 * po/POTFILES.in: Include src/parse-gram.c, since it now
10562 includes translateable strings that parse-gram.y doesn't.
10563
10564 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10565
10566 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10567 reverting the 2004-10-11 change to this function.
10568 (symbol_check_alias_consistency): Don't call symbol_type_set
10569 if the type name is already correct.
10570 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10571
10572 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10573
10574 * tests/regression.at (Token definitions): Don't use a token named
10575 c, as that generates a "#define c ..." that runs afoul of buggy
10576 stdlib.h that uses the identifier c as a member of struct
10577 drand48_data. Problem reported by Horst Wente.
10578
10579 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10580
10581 * bootstrap: Change translation URL from
10582 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10583 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10584 redirection glitches. Problem reported by twlevo@xs4all.nl.
10585
10586 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10587
10588 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10589 after operands; POSIX says this isn't portable for the c99 command.
10590
10591 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10592
10593 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10594 immediately if a data overrun has occurred; this may help us track
10595 down what may be a spurious failure on MacOS.
10596
10597 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10598
10599 Respond to problems reported by twlevo@xs4all.nl.
10600
10601 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10602
10603 * src/vcg.h: Comment fix.
10604 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10605 (G_CMAX): Change to -1 instead of INT_MAX.
10606
10607 * data/yacc.c (yyparse): Omit spaces before #line.
10608
10609 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10610
10611 * src/tables.c (state_number_to_vector_number): Put it inside an
10612 "#if 0", since it's not currently used. Problem reported by
10613 Roland McGrath.
10614
10615 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10616
10617 * src/output.c (escaped_output): Renamed from
10618 escaped_file_name_output, since we now use it for symbol tags as
10619 well. All uses changed.
10620 (symbol_destructors_output, symbol_printers_output):
10621 Escape symbol tags too.
10622 Problem reported by Matyas Forstner in
10623 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10624
10625 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10626 not needed.
10627 * src/output.c (user_actions_output, token_definitions_output,
10628 symbol_destructors_output, symbol_printers_output): Likewise.
10629 * src/reader.c (prologue_augment): Likewise.
10630 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10631
10632 * src/vcg.c (output_edge): Don't quote linestyle arg.
10633 Problem reported by twlevo@xs4all.nl.
10634
10635 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10636
10637 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10638 example, reported by Derek M Jones. Also, make the example even
10639 more outrageous, to better illustrate how bad the problem is.
10640
10641 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10642
10643 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10644 putsym. Typo reported by Sebastian Piping.
10645
10646 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10647
10648 * doc/bison.texinfo (Language and Grammar): some -> same
10649 (Epilogue): int he -> in the
10650 Typos reported by Sebastian Piping via Justin Pence.
10651
10652 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10653
10654 * tests/glr-regression.at (Improper handling of embedded actions
10655 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10656 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10657 with dollar signs in test names.
10658 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10659 for a similar reason.
10660
10661 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10662
10663 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10664 wants to redefine G_VIEW.
10665
10666 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10667
10668 * src/vcg.c (get_view_str): Remove case for normal_view.
10669 Problem reported by twlevo@xs4all.nl.
10670
10671 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10672
10673 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10674 Problem reported by twlevo@xs4all.nl.
10675
10676 * doc/bison.texinfo: Change @dircategory from "GNU programming
10677 tools" to "Software development". Requested by Richard Stallman
10678 via Karl Berry.
10679
10680 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10681
10682 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10683 Problem reported by twlevo@xs4all.nl.
10684
10685 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10686
10687 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10688 keyword; it's not needed with modern compilers, and it doesn't
10689 affect correctness with older compilers. Suggested by
10690 twlevo@xs4all.nl.
10691
10692 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10693
10694 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10695 gcc -Wswitch-default.
10696 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10697 * data/yacc.c (yyparse): Likewise.
10698
10699 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10700
10701 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10702 already. Let config.h define any nonstandard values.
10703
10704 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10705
10706 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10707 for the benefit of slower hosts. Problem reported by
10708 Nelson H. F. Beebe.
10709
10710 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10711
10712 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10713 being defined and not used.
10714 * data/lalr1.cc (yyparse): Likewise.
10715 Use "if (false)" rather than "if (0)".
10716
10717 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10718
10719 * TODO: Mention that we should allow NUL bytes in tokens.
10720
10721 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10722
10723 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10724 Problem reported by Hans Aberg.
10725
10726 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10727
10728 * src/getargs.c (version): Happy new year; update overall
10729 program copyright date from 2004 to 2005.
10730
10731 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10732 Problem reported by Hans Aberg.
10733 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10734 (Output file names.): Add a test for the case when standard output
10735 is closed.
10736
10737 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10738
10739 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10740 to fix an oversight in the Bison 2.0 manual.
10741
10742 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10743
10744 * NEWS: Version 2.0. Reformat the existing news items since
10745 1.875, so that related items are grouped together.
10746 * configure.ac (AC_INIT): Bump version to 2.0.
10747 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10748
10749 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10750 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10751 otherwise, we're not testing alloca. Unfortunately there's no
10752 simple way to consult HAVE_ALLOCA here.
10753
10754 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10755 for yymsg, too.
10756
10757 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10758 hand. This avoids a warning about comparing int to size_t when
10759 GCC warnings are enabled.
10760
10761 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10762
10763 * NEWS: Bison-generated parsers no longer default to using the
10764 alloca function (when available) to extend the parser stack, due
10765 to widespread problems in unchecked stack-overflow detection.
10766 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10767 responsibility to set it to a positive value. This lets the user
10768 specify a value that is not a preprocessor constant.
10769 * data/yacc.c (YYMAXDEPTH): Likewise.
10770 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10771 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10772 to be a compile-time constant. However, explain the constraints on it.
10773 Also, explain the constraints on YYINITDEPTH.
10774 (Table of Symbols): Explain that alloca is no longer the default.
10775 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10776 to 1.
10777
10778 * doc/bison.texinfo (Location Default Action): Mention that n must
10779 be zero when k is zero. Suggested by Frank Heckenbach.
10780
10781 2004-12-22 Akim Demaille <akim@epita.fr>
10782
10783 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10784 (parser::state_type, parser::semantic_type, parser::location_type):
10785 Private, not public.
10786 (parser::parse): Return ints, not bool.
10787 Returning a bool introduces a problem: 0 corresponds to false, and
10788 it seems weird to return false on success. Returning true changes
10789 the conventions for yyparse.
10790 Alternatively we could return void and send an exception.
10791 There is no clear consensus (yet?).
10792 (state_stack, semantic_stack, location_stack): Rename as...
10793 (state_stack_type, semantic_stack_type, location_stack_type): these.
10794 Private, not public.
10795 * tests/c++.at: New.
10796 * tests/testsuite.at, tests/Makefile.am: Adjust.
10797
10798 2004-12-21 Akim Demaille <akim@epita.fr>
10799
10800 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10801
10802 2004-12-21 Akim Demaille <akim@epita.fr>
10803
10804 Don't impose std::string for filenames.
10805
10806 * data/lalr1.cc (b4_filename_type): New.
10807 (position::filename): Use it.
10808 (parser.hh): Move the inclusion of stack.hh and location.hh below
10809 the user code, so that needed headers for the filename type can be
10810 included first.
10811 Forward declare them before the user code.
10812 * tests/Makefile.am (check-local, installcheck-local): Pass
10813 TESTSUITEFLAGS to the TESTSUITE.
10814
10815 2004-12-20 Akim Demaille <akim@epita.fr>
10816
10817 Use more STL like names: my_class instead of MyClass.
10818
10819 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10820 (SemanticStack, SemanticType, StateStack, StateType)
10821 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10822 (Parser::value): Rename as...
10823 (location_stack, location_type, rhs_number_type, semantic_stack)
10824 (semantic_type, state_stack, state_type, token_number_type, stack)
10825 (slice, traits, parser::yylloc, parser::yylval): these.
10826
10827 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10828
10829 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10830
10831 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10832 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10833
10834 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10835
10836 Remove uses of 'short int' and 'unsigned short int'. This raises
10837 some arbitrary limits. It uses more memory but nowadays that's
10838 not much of an issue.
10839
10840 This change does not affect the generated parsers; that's a different
10841 task, as some users will want to conserve memory there.
10842
10843 Ideally we should use size_t to represent all object counts, and
10844 something like ptrdiff_t to represent signed differences of object
10845 counts; but that will require more code-cleanup than I have the
10846 time to do right now.
10847
10848 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10849 Use size_t, not int or short int, to count objects.
10850 * src/closure.c (nritemset, closure): Likewise.
10851 * src/closure.h (nritemset, closure): Likewise.
10852 * src/nullable.c (nullable_compute): Likewise.
10853 * src/print.c (print_core): Likewise.
10854 * src/print_graph.c (print_core): Likewise.
10855 * src/state.c (state_compare, state_hash): Likewise.
10856 * src/state.h (struct state): Likewise.
10857 * src/tables.c (default_goto, goto_actions): Likewise.
10858
10859 * src/gram.h (rule_number, rule): Use int, not short int.
10860 * src/output.c (prepare_rules): Likewise.
10861 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10862 errs, reductions): Likewise.
10863 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10864 Likewise.
10865 * src/tables.c (vector_number, tally, action_number,
10866 ACTION_NUMBER_MINIMUM): Likewise.
10867 * src/output.c (muscle_insert_short_int_table): Remove.
10868
10869 2004-12-17 Akim Demaille <akim@epita.fr>
10870
10871 * data/lalr1.cc: Extensive Doxygenation.
10872 (error_): Rename as...
10873 (error): this, since it is visible to the user.
10874 Adjust callers.
10875 (Parser::message): Now an automatic variable from...
10876 (Parser::yyreport_syntax_error_): here.
10877 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10878 Parser::error.
10879 * tests/input.at: Escape $.
10880
10881 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10882
10883 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10884 Parenthesize rhs to avoid obscure problems with mistakes like
10885 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10886 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10887 b4_rhs_location): Likewise.
10888 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10889 b4_rhs_location): Likewise.
10890
10891 2004-12-16 Akim Demaille <akim@epita.fr>
10892
10893 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10894 yacc.c: be sure to stay within yycheck_.
10895 * tests/actions.at: Re-enable C++ tests.
10896
10897 2004-12-16 Akim Demaille <akim@epita.fr>
10898
10899 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10900 real.
10901
10902 2004-12-16 Akim Demaille <akim@epita.fr>
10903
10904 Use #define to handle the %name-prefix.
10905
10906 * data/glr.c, data/yacc.c: Comment changes.
10907 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10908 so that one can refer to yylex in the parser file, and have it
10909 renamed, as is the case with other skeletons.
10910
10911 2004-12-16 Akim Demaille <akim@epita.fr>
10912
10913 Move lalr1.cc internals into yy*.
10914
10915 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10916 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10917 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10918 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10919 (empty_, final_, terror_, errcode_, ntokens_)
10920 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10921 (looka_, ilooka_, error_range_, nerrs_):
10922 Rename as...
10923 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10924 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10925 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10926 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10927 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10928 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10929 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10930 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10931 these.
10932
10933 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10934
10935 Fix some problems reported by twlevo at xs4all.
10936 * src/symtab.c (symbol_new): Report an error if the input grammar
10937 contains too many symbols. This is better than calling abort() later.
10938 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10939 (struct node, struct graph):
10940 Rename member expand to stretch. All uses changed.
10941 (struct graph): Remove member layoutalgorithm. All uses removed.
10942 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10943 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10944 All uses changed.
10945 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10946
10947 2004-12-15 Akim Demaille <akim@epita.fr>
10948
10949 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10950 Add more Doxygen comments.
10951 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10952 (report_syntax_error_, translate_): Rename as...
10953 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10954 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10955
10956 2004-12-15 Akim Demaille <akim@epita.fr>
10957
10958 * data/lalr1.cc (lex_): Rename as...
10959 (yylex_): this.
10960 Move the trace here.
10961 Take the %name-prefix into account.
10962 Reported by Alexandre Duret-Lutz.
10963
10964 2004-12-15 Akim Demaille <akim@epita.fr>
10965
10966 Simplify the C++ parser constructor.
10967
10968 * data/lalr1.cc (debug_): Rename as...
10969 (yydebug_): so that the parser's internals are always in the yy*
10970 pseudo namespace.
10971 Adjust uses.
10972 (b4_parse_param_decl): Remove the leading comma as it is now only
10973 called as unique argument list.
10974 (Parser::Parser): Remove the constructor accepting a location and
10975 an initial debugging level.
10976 Remove from the other ctor the argument for the debugging level.
10977 (debug_level_type, debug_level, set_debug_level): New.
10978
10979 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10980 constructor calls.
10981
10982 2004-12-15 Akim Demaille <akim@epita.fr>
10983
10984 Remove b4_root related material: failure experiment
10985 (which goal was to allow to derive from a class).
10986
10987 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10988 definitions and uses.
10989
10990 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10991
10992 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10993 not 2, since it's not portable to subtract 1 from the start of an
10994 array. The new item 0 is never set or used. All uses changed.
10995
10996 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10997 the default definition of YYLLOC_DEFAULT. Problem reported
10998 by Frank Heckenbach.
10999
11000 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11001
11002 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11003 the normal case and one for the error case. Just use the
11004 first one uniformly. Problem reported by Frank Heckenbach.
11005 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11006 use exactly the same macro in both places.
11007 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11008 so that the normal-case YYRHSLOC works for the error case too.
11009 All uses changed.
11010 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11011 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11012 * doc/bison.texinfo (Location Default Action): Don't claim that
11013 we have an array of locations. Use the same macro for both glr
11014 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11015 the index is 0.
11016
11017 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11018
11019 * HACKING: Update email addresses to send announcements to.
11020
11021 * configure.ac (AC_INIT): Bump version to 1.875f.
11022
11023 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11024
11025 * NEWS: Version 1.875e.
11026 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11027
11028 * src/scan-skel.l: Include "complain.h", for "fatal".
11029
11030 * src/relation.h (relation_print, relation_digraph):
11031 Relation sizes are of type relation_node, not size_t (this is
11032 merely a doc fix, since the two types are equivalent).
11033 (relation_transpose): Relation sizes are of type relation_node,
11034 not int.
11035 * src/relation.c: Likewise.
11036 (top, infinity): Now of type relation_node, not int.
11037 (traverse, relation_transpose): Use relation_node, not int.
11038
11039 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11040 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11041 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11042
11043 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11044 specifying whether the test should be skipped. Use it tp
11045 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11046 fail on some hosts, and should be skipped.
11047
11048 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11049
11050 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11051 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11052 unless otherwise specified below.
11053
11054 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11055 to allocate kernel_base, kernel_items, kernel_size, since
11056 they needn't be initialized to 0.
11057 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11058 * src/closure.c (new_closure): Likewise, for itemset.
11059 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11060 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11061 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11062 (build_relations): Likewise for edge, states1, includes.
11063 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11064 * src/reader.c (packgram): Likewise, for ritem, rules.
11065 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11066 * src/relation.c (relation_digraph): Likewise for VERTICES.
11067 (relation_transpose): Likewise for new_R, end_R.
11068 * src/symtab.c (symbols_token_translations_init): Likewise for
11069 token_translations.
11070 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11071 (token_actions): Likewise for yydefact, actrow, conflrow,
11072 conflict_list.
11073 (save_column): Likewise for froms[symno], tos[symno].
11074 (goto_actions): Likewise for state_count.
11075 (pack_table): Likewise for base, pos, check.
11076 (tables_generate): Likewise for width.
11077
11078 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11079 for initial core. Just have a separate core, so we needn't worry
11080 about whether kernel_size and kernel_base are initialized.
11081
11082 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11083 kernel_size, kernel_items): Remove unnecessary initialization.
11084 * src/conflicts.c (conflicts): Likewise.
11085 * src/derives.c (derives): Likewise.
11086 * src/muscle_tablc (muscle_insert): Likewise.
11087 * src/relation.c (relation_digraph): Likewise.
11088 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11089 conflrow, conflict_table, conflict_list, table, check):
11090 Likewise.
11091
11092 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11093 This is because all callers pass unsigned int.
11094 * src/closure.h (new_closure): Likewise.
11095
11096 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11097 (build_relations): Initialize includes[i] in all cases.
11098 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11099 and rules[ruleno].precsym. Initialize members in order.
11100 * src/relation.c (relation_transpose): Always initialize new_R[i]
11101 and end_R[i].
11102 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11103
11104 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11105 conflict_list[0] was always 0, but now it isn't initialized.
11106
11107 * src/table.c (table_grow): When conflict_table grew, the grown
11108 area wasn't cleared. Fix this.
11109
11110 * lib/.cvsignore: Add strdup.c, strdup.h.
11111 * m4/.cvsignore: Add strdup.m4.
11112
11113 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11114
11115 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11116 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11117 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11118 ngotos + 1 without checking for overflow.
11119 (build_relations): Use END_NODE, not -1, to denote end of edges.
11120 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11121 build_relations): Use goto_number, not int, for goto numbers.
11122 * src/tables.c (save_column, default_goto): Likewise.
11123
11124 2004-11-23 Akim Demaille <akim@epita.fr>
11125
11126 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11127 of #defining from yystype.
11128 Don't typedef yystype, C++ does not need it.
11129 This lets it possible to forward declare it as union.
11130
11131 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11132
11133 * bootstrap (gnulib_modules): Add extensions.
11134 Problem reported by Jim Meyering.
11135
11136 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11137
11138 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11139 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11140 src/system.h, src/tables.c: XFREE -> free, to accommodate
11141 recent change to gnulib xalloc.h.
11142 Problem reported by Jim Meyering.
11143
11144 2004-11-17 Akim Demaille <akim@epita.fr>
11145
11146 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11147
11148 2004-11-17 Akim Demaille <akim@epita.fr>,
11149 Alexandre Duret-Lutz <adl@gnu.org>
11150
11151 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11152 changes.
11153 (YYCDEBUG): Adjust.
11154 Use it instead of cdebug_.
11155 (Parser::debug_stream, Parser::set_debug_stream): New.
11156 (Parser::symprint_): Define cdebug_ for temporary backward
11157 compatibility.
11158 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11159 debug_stream ().
11160
11161 2004-11-17 Akim Demaille <akim@epita.fr>
11162
11163 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11164 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11165 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11166 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11167
11168 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11169
11170 * data/glr.c (yyloc_default): Remove; not used.
11171 Problem reported by Frank Heckenbach.
11172
11173 2004-10-25 Akim Demaille <akim@epita.fr>
11174
11175 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11176 Introduce another definition to address simple location arrays.
11177 (yyGLRStack): New member: yyerror_range.
11178 (yyrecoverSyntaxError, yyparse): Update it.
11179 (yyrecoverSyntaxError): Use it when shifting the error token to
11180 have an accurate range, equivalent to the one computed by both
11181 yacc.c and lalr1.cc.
11182 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11183 that column numbers start at column 0, as per GNU Coding
11184 Standards, the others tests, and the doc.
11185 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11186 Adjust to the above change (first column is 0).
11187 And adjust the location of the "<error>", now covering the whole
11188 line.
11189
11190 2004-10-22 Akim Demaille <akim@epita.fr>
11191 and Paul Eggert <eggert@cs.ucla.edu>
11192
11193 Remove some arbitrary limits on goto numbers and relations.
11194 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11195 initial values, since they're never used.
11196 (set_goto_map): ngotos is now unsigned, so test for overflow
11197 by seeing whether it wraps around to zero.
11198 * src/lalr.h (goto_number): Now size_t, not short int.
11199 (GOTO_NUMBER_MAXIMUM): Remove.
11200 * src/relation.c (relation_print, traverse, relation_transpose):
11201 Check for END_NODE rather than looking at sign.
11202 * src/relation.h (END_NODE): New macro.
11203 (relation_node): Now size_t, not short int.
11204
11205 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11206
11207 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11208 keyword, not an identifier. Problem reported by Baron Schwartz in
11209 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11210
11211 2004-10-11 Akim Demaille <akim@epita.fr>
11212
11213 * src/symtab.c (symbol_check_alias_consistency): Also check
11214 type names, destructors, and printers.
11215 Reported by Alexandre Duret-Lutz.
11216 Recode the handling of associativity and precedence in terms
11217 of symbol_precedence_set.
11218 Accept no redeclaration at all, not even equal to the previous
11219 value.
11220 (redeclaration): New.
11221 Use it to factor redeclaration complaints.
11222 (symbol_make_alias): Don't set the type of the alias, let
11223 symbol_check_alias_consistency do it as for other features.
11224 * src/symtab.h (symbol): Add new member prec_location, and
11225 type_location.
11226 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11227 * tests/input.at (Incompatible Aliases): New.
11228
11229 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11230
11231 .cvsignore fixes to accommodate gnulib changes,
11232 and the practice of naming build directories "_build".
11233 * .cvsignore: Add "_*". Sort.
11234 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11235 * m4/.cvsignore: Add "*_gl.m4".
11236
11237 2004-10-06 Akim Demaille <akim@epita.fr>
11238
11239 * src/parse-gram.y (add_param): Fix the truncation of trailing
11240 spaces.
11241
11242 2004-10-05 Akim Demaille <akim@epita.fr>
11243
11244 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11245 whether the reducion was empty or not. This leaves room to
11246 improve the use of YYLLOC_DEFAULT in such a case.
11247 lalr1.cc is still experimental, so changing this is acceptable.
11248 And finally, there are probably not many users who changed the
11249 handling of locations in GLR, so changing is admissible too.
11250
11251 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11252 empty reduction, set @$ to an empty location ending the previously
11253 stacked symbol.
11254 Adjust uses to make sure the code is triggered on empty
11255 reductions.
11256 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11257 expected output: empty reductions have empty locations.
11258
11259 2004-09-29 Akim Demaille <akim@epita.fr>
11260
11261 * data/lalr1.cc: Move towards a more standard C++ coding style
11262 for templates: Class < T > -> Class<T>.
11263
11264 2004-09-29 Akim Demaille <akim@epita.fr>
11265
11266 * data/lalr1.cc: Reinstall the former ctor, for sake of
11267 compatibility, but warn it will be removed.
11268 Move towards a more standard C++ coding style (i.e., type *var ->
11269 type* var).
11270
11271 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11272
11273 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11274 since it's less likely to work if NULs are involved in the future.
11275
11276 2004-09-27 Akim Demaille <akim@epita.fr>
11277
11278 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11279
11280 2004-09-27 Akim Demaille <akim@epita.fr>
11281
11282 * data/lalr1.cc (b4_parse_param_decl_1): New.
11283 (b4_parse_param_decl): Use it to have different names between attribute
11284 and argument names.
11285 (b4_cc_constructor_call): Likewise.
11286
11287 2004-09-24 Akim Demaille <akim@epita.fr>
11288
11289 * src/parse-gram.y (add_param): Strip the leading and trailing
11290 blanks from a formal argument declaration.
11291 (YY_LOCATION_PRINT): New.
11292
11293 2004-09-24 Akim Demaille <akim@epita.fr>
11294
11295 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11296 after the location.
11297
11298 2004-09-24 Akim Demaille <akim@epita.fr>
11299
11300 * doc/bison.texinfo (Table of Symbols): Sort.
11301
11302 2004-09-21 Akim Demaille <akim@epita.fr>
11303
11304 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11305 the useless parentheses.
11306 Suggested by Paul Eggert.
11307
11308 2004-09-20 Akim Demaille <akim@epita.fr>
11309
11310 Let the initial-action act on the look-ahead, and use it for the
11311 "initial push" (corresponding to an hypothetical beginning-of-file).
11312 And let lalr1.cc honor %initial-action.
11313
11314 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11315 example.
11316 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11317 (Parser::Parser): Remove the ctor that used to initialize it.
11318 (Parser::parse): Like in the other skeletons, issue the "starting
11319 parse" message before any action.
11320 Honor %initial-action.
11321 Initialize the stacks with the lookahead.
11322 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11323 look-ahead.
11324 Push them in the stacks.
11325 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11326
11327 2004-09-20 Akim Demaille <akim@epita.fr>
11328
11329 * doc/bison.texinfo (Initial Action Decl): New.
11330
11331 2004-09-20 Akim Demaille <akim@epita.fr>
11332
11333 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11334 clearer criterion to define it.
11335 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11336 When reducing on an empty RHS, use the latest stacked location as
11337 location.
11338 yylloc is not always available.
11339 * data/glr.c: Likewise.
11340 Also, honor initial-actions.
11341
11342 2004-09-20 Akim Demaille <akim@epita.fr>
11343
11344 * data/yacc.c (YY_LOCATION_PRINT): New.
11345 Define when we know YYLTYPE's structure, i.e., when the default
11346 YYLLOC_DEFAULT is used.
11347 * data/c.m4 (b4_yysymprint_generate): Use it.
11348 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11349 value of the result.
11350 (error_start_): Replace with...
11351 (error_range_): this location array.
11352 This allows to replace code relying on the implementation of
11353 locations by portable code.
11354 * data/yacc.c (yylerrsp): Replace with...
11355 (yyerror_range): this.
11356 Every time a token is popped, update yyerror_range[0], to have an
11357 accurate location for the error token.
11358 * data/glr.c (YY_LOCATION_PRINT): New.
11359 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11360 deference a pointer.
11361 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11362 report the location in %printers.
11363
11364 * src/scan-skel.l: Instead of abort, report error messages to ease
11365 understanding skeleton scanning failures.
11366
11367 2004-09-16 Akim Demaille <akim@epita.fr>
11368
11369 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11370 (iterator, const_iterator): these, to be more in the C++ spirit.
11371 Also, return reverse iterators so that when displaying the stack
11372 we display its bottom first.
11373 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11374 from yacc.c.
11375 We should probably use vector here though.
11376
11377 2004-09-16 Akim Demaille <akim@epita.fr>
11378
11379 Have more complete shift traces.
11380
11381 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11382 to report Shifts instead of ad hoc YYDPRINTF invocations,
11383 including for the error token.
11384 * data/lalr1.cc (symprint_): Output the location.
11385 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11386 output the location within the %printer.
11387 Activate GLR tests, at least to make sure they compile properly.
11388 They still don't pass though.
11389 * tests/calc.at: Adjust expect verbose output, since now "Entering
11390 state..." is on a different line than the "Shifting" message.
11391
11392 2004-09-08 Akim Demaille <akim@epita.fr>
11393
11394 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11395 Bison directive from the Bison file to the invocation of this
11396 macro, so that these directives are passed to
11397 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11398 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11399 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11400 the extra Bison directives instead of the whole series.
11401 Change the grammar so that there are recoverable errors, and
11402 unrecoverable errors. Now we can have the parser give up before
11403 consuming the whole input. As a result we now can observe that
11404 the lookahead is freed when needed.
11405 Change the parser source to parse argv[1] instead of a hard coded
11406 string.
11407 Simplify yylex, and give a value and location to EOF.
11408 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11409 passed directives already coded in the file.
11410 Add some tests to check the location of "error".
11411 For some tests, the C++ parser is correct, and not yacc.c.
11412 For other tests, they provide different, but unsatisfying, values,
11413 so keep the C++ value so that at least one parser is "correct"
11414 according to the test suite.
11415 (Actions after errors): Remove, this is subsumed by the
11416 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11417
11418 2004-09-06 Akim Demaille <akim@epita.fr>
11419
11420 * data/lalr1.cc: Adjust the indentation of the labels.
11421 (Parser::pop): New.
11422 Use it.
11423
11424 2004-09-06 Akim Demaille <akim@epita.fr>
11425
11426 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11427 argument, an informative message.
11428 Call YY_SYMBOL_PRINT.
11429 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11430 * data/lalr1.cc (destruct_): Likewise.
11431 In addition, no longer depend on b4_yysymprint_generate and
11432 b4_yydestruct_generate to generate these functions, do it "by
11433 hand".
11434
11435 2004-09-03 Akim Demaille <akim@epita.fr>
11436
11437 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11438 invoked, yydestruct the lookahead.
11439 * tests/calc.at (Calculator $1): Update the expected lengths of
11440 traces: there is an added line for the discarded lookahead.
11441 * doc/bison.texinfo (Destructor Decl): Some rewording.
11442 Define "discarded" symbols.
11443
11444 2004-09-02 Akim Demaille <akim@epita.fr>
11445
11446 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11447
11448 2004-09-02 Akim Demaille <akim@epita.fr>
11449
11450 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11451 (YYDSYMPRINTF): Rename as...
11452 (YY_SYMBOL_PRINT): this.
11453 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11454 two.
11455 Use it instead of direct symprint_ calls.
11456 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11457 one.
11458
11459 2004-09-02 Akim Demaille <akim@epita.fr>
11460
11461 * data/lalr1.cc (b4_yysymprint_generate): New.
11462 (symprint_): New member function, defined when YYDEBUG.
11463 Use it consistently instead of token/nterm debugging output by
11464 hand.
11465 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11466 %printer calls to use cdebug_ when using lalr1.cc.
11467
11468 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11469
11470 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11471 with #ifdef YYDEBUG.
11472
11473 2004-08-26 Akim Demaille <akim@epita.fr>
11474
11475 * doc/bison.texinfo (Implementing Loops): Rename as...
11476 (Implementing Gotos/Loops): this.
11477
11478 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11479
11480 Adjust to latest gnulib.
11481 * bootstrap (gnulib_modules): Add xalloc-die.
11482 Set LC_ALL=C so that file names sort consistently.
11483 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11484 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11485 uintmax_t.m4, ulonglong.m4.
11486 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11487 po.m4 since we are now using _gl.m4 instead.
11488
11489 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11490
11491 * src/scan-action.l: Remove. Scanning of semantic actions is
11492 handled in scan-gram.l.
11493
11494 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11495
11496 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11497
11498 * src/location.h (struct): The file member is a uniqstr.
11499 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11500
11501 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11502
11503 Fix bug with non-%union parsers that have printers or destructors,
11504 which led to a Bison core dump. Reported by Peter Fales in
11505 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11506
11507 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11508 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11509 not to our own type.
11510 * src/output.c (symbol_destructors_output, symbol_printers_output):
11511 Don't assume %union.
11512 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11513 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11514 UNION-FLAG. All callers changed.
11515 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11516 Use type char, not unsigned int, when declaring an array of char;
11517 this lets us remove a cast.
11518 (Printers and Destructors): Add non-%union test cases.
11519
11520 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11521
11522 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11523 GLR writeups. E.g., avoid frenchspacing and the future tense,
11524 change "lookahead" to "look-ahead", and change "wrt" to "with
11525 respect to".
11526
11527 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11528
11529 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11530 New sections, split off from the GLR Parsers section. Put the new
11531 Simple GLR Parser near the start of the GLR section, for clarity.
11532 Rewrite connective text.
11533
11534 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11535
11536 * doc/bison.texinfo (Simple GLR Parsers): New section.
11537
11538 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11539
11540 * NEWS, TODO, doc/bison.texinfo:
11541 Use "look-ahead" instead of "lookahead", to be consistent.
11542 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11543 while we're fixing "look-ahead".
11544 * src/conflicts.c (shift_set): Renamed from shiftset.
11545 (look_ahead_set): Renamed from lookaheadset.
11546 * src/print.c: Likewise.
11547 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11548 name for "lookahead".
11549 (report_types, usage): Likewise.
11550 * src/getargs.h (report_look_ahead_tokens): Renamed from
11551 report_lookaheads.
11552 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11553 compute_lookaheads.
11554 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11555 (look_ahead_tokens_print): Renamed from lookaheads_print.
11556 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11557 state_rule_lookaheads_print.
11558 * src/state.h: Likewise.
11559 (reductions.look_ahead_tokens): Renamed from lookaheads.
11560 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11561 AT_DATA_LOOKAHEADS_GRAMMAR.
11562
11563 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11564
11565 * README: Update location of patched M4 distribution.
11566
11567 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11568
11569 Don't assume the C++ compiler takes the same arguments as the C compiler
11570 (trivial change).
11571 * configure.ac (O0CXXFLAGS): New var.
11572 * tests/atlocal.in (CXXFLAGS): Use it.
11573
11574 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11575
11576 Fix some "make check" problems with C++ reported by
11577 Albert Chin-A-Young for Tru64 C++ in this thread:
11578 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11579
11580 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11581 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11582 Output to a .cc file for C++, not to a .c file.
11583 * tests/calc.at (AT_CHECK_CALC): Likewise.
11584 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11585 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11586
11587 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11588
11589 * tests/calc.at, tests/actions.at: Workaround for SGI
11590 C++ compiler. (trivial change)
11591
11592 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11593
11594 Spent a few hours checking out which prerequisite versions the
11595 current sources actually require. I went all the way back to
11596 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11597 a seemingly endless set of combinations of versions more recent
11598 than that. The bottom line is that the current sources require
11599 fairly recent versions of the build tools, and it'll be some work
11600 to change this.
11601 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11602 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11603 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11604 Add comments explaining why those particular versions are
11605 currently needed.
11606
11607 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11608 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11609 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11610
11611 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11612 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11613
11614 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11615
11616 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11617 0.11.5. Suggested by Bruno Haible.
11618 * bootstrap: Remove gettext version checking.
11619
11620 * doc/bison.texinfo (Decl Summary): Also mention that %union
11621 can depend on prerequisite types. Problem reported by Tim
11622 Van Holder.
11623
11624 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11625
11626 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11627 * README-alpha: Don't tell people not to package this.
11628
11629 * bootstrap: Don't assume $(...) works; use `...` instead.
11630 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11631 gettext better.
11632
11633 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11634 put into the -d output file, and mention what to do if YYSTYPE is
11635 defined as a macro.
11636
11637 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11638
11639 Undo change made earlier today: it caused autopoint to not bring
11640 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11641 autopoint's.
11642
11643 * bootstrap: Check that gettext version matches what's in
11644 configure.ac. Warn users to ignore robots.txt ERROR 404.
11645 * bootstrap: Undo today's earlier change (logged below).
11646 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11647
11648 The gettext version checking is causing more trouble than it's
11649 curing; remove it. Problem reported by Paul Hilfinger.
11650
11651 * bootstrap: Issue a warning that one can expect a message
11652 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11653 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11654
11655 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11656
11657 Ensure that the C++ compiler used for testing actually works on a
11658 simple test program; if not, skip the C++-related tests. Problem
11659 reported by Vin Shelton in:
11660 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11661
11662 * m4/cxx.m4: New file.
11663 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11664 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11665 * tests/local.at (AT_COMPILE_CXX): Use it.
11666
11667 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11668
11669 * data/glr.c (yylloc): Output this macro even if locations are not
11670 being generated, as the GLR parser needs it even in that case.
11671 Problem reported by Troy A. Johnson
11672 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11673
11674 * configure.ac (AC_INIT): Update to 1.875e.
11675
11676 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11677
11678 * NEWS: Version 1.875d.
11679 * configure.ac (AC_INIT): Likewise.
11680 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11681
11682 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11683 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11684 lalr1.cc runs afoul of the first, and the last two are no longer
11685 supported by GCC 3.4.0.
11686 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11687 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11688
11689 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11690
11691 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11692 unsigned int, for compatibility with latest gnulib hash module.
11693 * src/state.c (state_hash, state_hasher): Likewise.
11694 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11695 * src/uniqstr.c (hash_uniqstr): Likewise.
11696
11697 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11698
11699 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11700
11701 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11702 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11703 character and string literals.
11704 (unexpected_end): New function.
11705 (unexpected_eof): Use it.
11706 (unexpected_newline): New function.
11707 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11708 actions.
11709
11710 * NEWS: Document %expect-rr.
11711
11712 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11713 Fix typo by replacing $1 with $option.
11714 Remove more 'intl'-related files.
11715 Don't DEFUN AM_INTL_SUBDIR twice.
11716
11717 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11718 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11719 strtoul.c.
11720 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11721 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11722 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11723 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11724 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11725 * src/.cvsignore: Add *.output.
11726
11727 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11728 gets copied to the output file.
11729
11730 2004-04-28 Paul Eggert <eggert@twinsun.com>
11731
11732 Get files from the gnulib and po repositories, instead of relying
11733 on them being in our CVS. Upgrade to latest versions of gnulib
11734 and Automake.
11735
11736 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11737 * bootstrap: Bootstrap from gnulib and po repositories.
11738 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11739 * README-cvs: Document these changes. Remove version numbers from
11740 mentions of build tools, since they change so often. Mention Flex.
11741
11742 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11743 (gl_USE_SYSTEM_EXTENSIONS): Add.
11744 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11745 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
11746 does this for us.
11747 (AC_ISC_POSIX): Remove; we no longer support this
11748 ancient OS, as it gets in the way of latest Autoconf & gnulib.
11749 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11750 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11751 Do not check for C89 headers, except for locale.h which is used
11752 by the Yacc library and must port to K&R hosts.
11753 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11754 Do not check for C89 functions, except for setlocale which is
11755 used by the Yacc library.
11756 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11757 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11758 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11759 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11760 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11761 AM_GNU_GETTEXT): Remove; now done by:
11762 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11763 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11764 for us.
11765
11766 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11767 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11768 Define to empty, as gnulib.mk will do the rest for us.
11769 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11770 for us.
11771 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11772 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11773
11774 * src/files.c: Include gnulib's xstrndup.h.
11775
11776 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11777 (REALLOC): Use xnrealloc, for likewise.
11778 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11779 (strnlen, memrchr): Remove decls; functions no longer used.
11780 Include <stpcpy.h>.
11781
11782 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11783 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11784 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11785 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11786 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11787 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11788 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11789 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11790 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11791 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11792 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11793 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11794 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11795 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11796 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11797 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11798 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11799 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11800 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11801 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11802 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11803 Remove, as these files are now generated automatically
11804 by bootstrap or automake.
11805
11806 * po/ChangeLog: Remove: all but one entry was a duplicate
11807 of this file, and I moved that 2000-11-02 entry here.
11808
11809 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11810 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11811 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11812 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11813 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11814 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11815 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11816 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11817 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11818 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11819 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11820 xstrndup.h.
11821 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11822 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11823 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11824 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11825 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11826 * src/.cvsignore: Remove *_.c.
11827
11828
11829 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11830 support it. (The latest stable gzip doesn't.)
11831
11832 2004-04-27 Paul Eggert <eggert@twinsun.com>
11833
11834 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11835 case, as stos_ is now used by destructors due to the 2004-02-09
11836 change.
11837
11838 Remove more K&R C support.
11839 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11840 * lib/subpipe.c (errno): Remove decl.
11841 Include <stdlib.h> unconditionally.
11842 (EXIT_FAILURE): Remove macro.
11843 * src/complain.c (vfprintf, strerror): Remove.
11844 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11845 unconditionally.
11846 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11847 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11848 (strchr, strspn, memchr): Remove decls.
11849 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11850 unconditionally. Do not declare perror.
11851 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11852 unconditionally.
11853
11854 * src/complain.c (_): Remove useless defn, as system.h defines this.
11855
11856 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11857 with latest obstack.h.
11858 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11859 to procedure types, as obstack.h now does that for us.
11860 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11861
11862 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11863 so that this include file can stand alone.
11864 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11865 does this now. Include subpipe.h first after config.h, to
11866 test whether it can stand alone.
11867
11868 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11869 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11870 unused declaration.
11871
11872 * tests/synclines.at (%union synch line): Put a dummy member in
11873 the union, because empty unions aren't allowed in C. Caught
11874 by GCC 3.4.0.
11875
11876 2004-04-13 Jim Meyering <jim@meyering.net>
11877
11878 * src/conflicts.c (conflicts_print): Correct format string typo:
11879 use `%%' to produce literal `%'. (trivial change)
11880
11881 2004-03-30 Paul Eggert <eggert@twinsun.com>
11882
11883 * src/getargs.c (version): Update copyright year to 2004.
11884
11885 * data/c.m4 (b4_int_type): Use 'short int' rather than
11886 'short', and similarly for 'long', 'unsigned', etc.
11887 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11888 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11889 yy_yypstack, yydumpstack): Likewise.
11890 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11891 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11892 Likewise.
11893 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11894 yy_stack_print, yyparse): Likewise.
11895 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11896 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11897 * lib/bitset.c (bitset_print): Likewise.
11898 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11899 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11900 * lib/bitsetv.c (bitsetv_dump): Likewise.
11901 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11902 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11903 Likewise.
11904 * src/LR0.c (allocate_itemsets): Likewise.
11905 * src/gram.h (rule_number, rule): Likewise.
11906 * src/lalr.h (goto_number): Likewise.
11907 * src/nullable.c (nullable_compute): Likewise.
11908 * src/output.c (prepare_rules): Likewise.
11909 * src/relation.c (relation_print, relation_digraph): Likewise.
11910 * src/relation.h (relation_node): Likewise.
11911 * src/state.h (state_number, transitions, errs, reductions,
11912 struct state): Likewise.
11913 * src/symtab.h (symbol_number, struct symbol): Likewise.
11914 * src/tables.c (vector_number, tally, action_number,
11915 default_goto, goto_actions): Likewise.
11916 * tests/existing.at (GNU Cim Grammar): Likewise.
11917 * tests/regression.at (Web2c Actions): Likewise.
11918
11919 * src/output.c (muscle_insert_short_int_table): Renamed from
11920 muscle_insert_short_table. All uses changed.
11921
11922 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11923
11924 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11925 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11926 Add %expect-rr rule.
11927
11928 * src/scan-gram.l: Recognize %expect-rr.
11929
11930 * src/conflicts.h (expected_sr_conflicts): Rename from
11931 expected_conflicts.
11932 (expected_rr_conflicts): Declare.
11933
11934 * src/conflicts.c (expected_sr_conflicts): Rename from
11935 expected_conflicts.
11936 (expected_rr_conflicts): Define.
11937 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11938 for GLR parsers.
11939 Use expected_sr_conflicts in place of expected_conflicts.
11940 Warn if expected_rr_conflicts used in non-GLR parser.
11941
11942 * doc/bison.texinfo: Add documentation for %expect-rr.
11943
11944 2004-03-08 Paul Eggert <eggert@gnu.org>
11945
11946 Add support for hex token numbers. Suggested by Odd Arild Olsen in
11947 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
11948
11949 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11950 in lalr1.cc.
11951 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11952 * src/scan-gram.l (scan_integer): New function.
11953 ({int}): Use it.
11954 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11955 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11956 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11957 Say "long int", not "long", for uniformity with GNU style.
11958
11959 2004-02-25 Paul Eggert <eggert@twinsun.com>
11960
11961 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11962 compilers. This fixes a problem with Intel's C++ compiler being
11963 chatty, reported by Guido Trentalancia in
11964 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
11965
11966 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11967
11968 Support %destructor and merge error locations in lalr1.cc.
11969
11970 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11971 (Parser::stos_): Define unconditionally.
11972 (Parser::destruct_): New method. Generate its body with
11973 b4_yydestruct_generate.
11974 (Parser::error_start_): New attribute.
11975 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11976 token which are discarded.
11977 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11978 error_start_ when erroneous token are discarded.
11979 (Parser::parse) <yyerrlab1>: Compute the location of the error
11980 token so that it covers all the discarded tokens.
11981 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11982 it can be called with `%skeleton "lalr1.cc"', and do that.
11983
11984 2004-02-02 Paul Eggert <eggert@twinsun.com>
11985
11986 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11987 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11988 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11989 There's no need to mention top_builddir since Automake does that
11990 for us.
11991 (INCLUDES): Remove, as Automake says it's obsolescent.
11992 Contents migrated into AM_CPPFLAGS as described above.
11993 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11994
11995 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11996
11997 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11998 (yyreportSyntaxError): Handle case where lookahead token is
11999 YYEMPTY.
12000
12001 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12002
12003 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12004 resulting parsers are compilable with C++.
12005
12006 2003-12-23 Paul Eggert <eggert@twinsun.com>
12007
12008 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12009 * src/output.c (output_skeleton): Rename local var.
12010 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12011 Bison tokens, as this runs afoul of the 2003-10-07 change that
12012 disallowed NUL bytes in character constants or string literals.
12013
12014 * tests/local.at: Require Autoconf 2.59's Autotest.
12015 * tests/testsuite.at: Don't include local.at, since we now assume
12016 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12017 including it.
12018 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12019 multiple inclusion warnings.
12020
12021 2003-12-02 Akim Demaille <akim@epita.fr>
12022
12023 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12024 conditions.
12025 From Bruno Haible.
12026
12027 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12028
12029 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12030
12031 2003-10-07 Paul Eggert <eggert@twinsun.com>
12032
12033 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12034 if testsuite doesn't exist.
12035
12036 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12037 literals, unfortunately.
12038 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12039 Complain about NUL bytes in character constants or string literals.
12040
12041 2003-10-05 Paul Eggert <eggert@twinsun.com>
12042
12043 * NEWS: Don't document %no-default-prec, as it's still
12044 too experimental.
12045 * doc/bison.texinfo: Document %no-default-prec only if
12046 the defaultprec flag is set. Normally it's not.
12047
12048 2003-10-04 Paul Eggert <eggert@twinsun.com>
12049
12050 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12051 non-modifiable lvalue, instead of a modifiable one.
12052 * doc/bison.texinfo (Actions): Document that $$ can
12053 be assigned to. Do not claim that $$ and $N are
12054 array element references: user code should not rely on this.
12055
12056 2003-10-01 Paul Eggert <eggert@twinsun.com>
12057
12058 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12059 (grammar_declaration): Use it.
12060 * src/scan-gram.l: New token %no-default-prec.
12061 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12062 * NEWS, doc/bison.texinfo: Document the above.
12063
12064 2003-10-01 Akim Demaille <akim@epita.fr>
12065
12066 VCG no longer supports long_straight_phase.
12067
12068 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12069 * src/print_graph.c (print_graph): Adjust.
12070
12071 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
12072 and Paul Eggert <eggert@twinsun.com>
12073
12074 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12075 Table of Symbols): Document %default-prec.
12076 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12077 (grammar_declaration): Set default_prec on %default-prec.
12078 * src/scan-gram.l (%default-prec): New token.
12079 * src/reader.h (default_prec): New flag.
12080 * src/reader.c: Likewise.
12081 (packgram): Handle it.
12082 * tests/conflicts.at (%default-prec without %prec,
12083 %default-prec with %prec, %default-prec 1): New tests.
12084
12085 2003-09-30 Paul Eggert <eggert@twinsun.com>
12086
12087 * tests/testsuite.at: Include local.at, not input.at, fixing
12088 a typo in the 2003-08-25 patch.
12089
12090 2003-08-27 Akim Demaille <akim@epita.fr>
12091
12092 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12093 GCC warnings.
12094
12095 2003-08-26 Akim Demaille <akim@epita.fr>
12096
12097 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12098 "<\#" to avoid magic from Gnus when posting parts of this script.
12099
12100 2003-08-26 Akim Demaille <akim@epita.fr>
12101
12102 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12103 (Parser::parse): here.
12104 Adjust: nerrs and errstatus is now replaced by...
12105 (Parser::nerrs_, Parser::errstatus_): New.
12106
12107 2003-08-25 Akim Demaille <akim@epita.fr>
12108
12109 * config/announce-gen, Makefile.cfg: New.
12110 * Makefile.am: Adjust.
12111 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12112 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12113
12114 2003-08-25 Akim Demaille <akim@epita.fr>
12115
12116 When reducing initial empty rules, Bison parser read an initial
12117 location that is not defined. This results in garbage, and that
12118 affects Bison's own parser. Therefore we need (i) to extend Bison
12119 to support a means to initialize this location, and (ii) to use
12120 this CVS Bison to fix CVS Bison's parser.
12121
12122 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12123 with...
12124 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12125 * src/parse-gram.y: Adjust.
12126 (%initial-action): New.
12127 (%error-verbose): Since we require CVS Bison, there is no reason
12128 not to use it.
12129 * src/scan-gram.l: Adjust.
12130 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12131 * data/yacc.c (yyparse): Use b4_initial_action.
12132
12133 2003-08-25 Akim Demaille <akim@epita.fr>
12134
12135 * doc/bison.texinfo: Don't promote stdout for error messages.
12136
12137 2003-08-25 Akim Demaille <akim@epita.fr>
12138
12139 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12140 From Alexandre Duret-Lutz.
12141
12142 2003-08-25 Akim Demaille <akim@epita.fr>
12143
12144 Version 1.875c.
12145
12146 2003-08-25 Akim Demaille <akim@epita.fr>
12147
12148 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12149 Use them.
12150
12151 2003-08-25 Akim Demaille <akim@epita.fr>
12152
12153 * data/lalr1.cc (Parser::reduce_print_): New.
12154 Use it.
12155
12156 2003-08-25 Akim Demaille <akim@epita.fr>
12157
12158 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12159 error recovery loops. This patch is based on
12160 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12161 Also, augment the similarity between lalr1.cc and yacc.c.
12162 Note: the locations of error recovery rules are not correct yet.
12163
12164 * data/lalr1.cc: Comment changes to augment the similarity between
12165 lalr1.cc and yacc.c.
12166 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12167 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12168 yyerrlab), when hitting EOF, pop the whole stack here instead of
12169 merely falling thru the default error handling mechanism.
12170 (yyerrorlab): New label, with the old contents of YYERROR,
12171 plus the following change: pop the stack of rhs corresponding
12172 to the production that invoked YYERROR. That is how Yacc
12173 behaves (required by POSIX).
12174 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12175 fail.
12176
12177 2003-08-25 Akim Demaille <akim@epita.fr>
12178
12179 Tune local.at so that people can "autom4te -l autotest calc.at -o
12180 calc" for instance, to extract a sub test suite.
12181
12182 * tests/testsuite.at: Move the initialization, Autotest version
12183 requirement, and AT_TESTED invocation into...
12184 * tests/local.at: here.
12185 * tests/testsuite.at: Include it for compatibility with Autoconf
12186 2.57.
12187 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12188 be ignore.
12189
12190 2003-08-04 Paul Eggert <eggert@twinsun.com>
12191
12192 Rework code slightly to avoid gcc -Wtraditional warnings.
12193 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12194 The returned value is now stored in *YY0. All callers changed.
12195 * src/output.c (merge_output): Adjust to the above change.
12196
12197 2003-07-26 Paul Eggert <eggert@twinsun.com>
12198
12199 * data/glr.c (YYASSERT): New macro.
12200 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12201 yyresolveStates, yyprocessOneStack):
12202 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12203 Derived from a suggestion by Frank Heckenbach.
12204
12205 2003-07-25 Paul Eggert <eggert@twinsun.com>
12206
12207 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12208 for portability to K&R C (after ansi2knr, presumably). See
12209 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12210 by Frank Heckenbach, though I have omitted the structure-initialization
12211 part of his glr-knr.diff patch since I recall that the Portable
12212 C Compiler didn't require that change.
12213
12214 Let the user specify how to allocate and free memory.
12215 Derived from a suggestion by Frank Heckenbach in
12216 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12217 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12218 All uses of free, malloc, realloc changed to use these macros,
12219 and unnecessary casts removed.
12220 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12221
12222 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12223
12224 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12225 use s.empty() rather than s == "" to test for empty string; see
12226 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12227 (trivial change)
12228
12229 2003-06-25 Akim Demaille <akim@epita.fr>
12230
12231 * config/depcomp, config/install-sh: Update from masters.
12232
12233 2003-06-20 Paul Eggert <eggert@twinsun.com>
12234
12235 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12236 and return properly parenthesized result.
12237 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12238 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12239 Remove unnecessary parentheses from uses.
12240 * doc/bison.texinfo (Location Default Action): Describe the
12241 conventions for parentheses.
12242
12243 2003-06-19 Paul Eggert <eggert@twinsun.com>
12244
12245 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12246 yyreportTree): Do not assume that size_t is the same width as int,
12247 when printing sizes. Print sizes using an unsigned format.
12248 Problem reported by Frank Heckenbach in
12249 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12250
12251 Port to Forte Developer 7 C compiler.
12252 * data/glr.c (struct YYLTYPE): If locations are not being used,
12253 declare a single dummy member, as empty structs do not conform
12254 to the C standard.
12255 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12256 the Forte Developer 7 C compiler complains that end-of-loop
12257 code is not reached.
12258
12259 2003-06-17 Paul Eggert <eggert@twinsun.com>
12260
12261 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12262 avoid warnings from picky compilers about redefinition of PARAMS.
12263
12264 2003-06-17 Paul Eggert <eggert@twinsun.com>
12265
12266 Version 1.875b.
12267
12268 * NEWS: Document 1.875b.
12269
12270 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12271 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12272 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12273 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12274 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12275 per recent gettext manual's suggestion.
12276 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12277 Use prototypes, not old-style definitions.
12278 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12279 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12280 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12281 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12282 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12283 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12284 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12285 vbitset_or_and_cmp, vbitset_copy): Likewise.
12286
12287 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12288 Do not include <stdlib.h>.
12289 (PARAMS): Define unconditionally for C89.
12290 (ATTRIBUTE_NORETURN): Remove.
12291 (ATTRIBUTE_UNUSED): Define unconditionally.
12292
12293 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12294 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12295 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12296 * lib/vbitset.c, lib/vbitset.h: New files.
12297 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12298 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12299 from libbitset.
12300
12301 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12302 `How Can I Reset @code{yyparse}', since texinfo does not allow
12303 arbitrary @ in node names.
12304
12305 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12306 shouldn't be needed according to the gettext 0.12.1 documentation
12307 but which seem to be needed anyway: codeset.m4 glibc21.m4
12308 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12309 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12310 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12311
12312 * lib/.cvsignore: Add stdbool.h.
12313 * m4/.cvsignore: Add nls.m4, po.m4.
12314
12315 Upgrade to CVS gnulib.
12316 * stdbool_.h: File renamed from stdbool.h.in.
12317 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12318 AC_HEADER_STDBOOL.
12319 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12320 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12321 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12322 (MOSTLYCLEANFILES): New var.
12323 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12324 (stdbool.h): New rule.
12325 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12326 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12327 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12328 m4/quote.m4: Upgrade to today's gnulib.
12329
12330 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12331 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12332 the tests right now.
12333 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12334 yyerror are declared before use; C99 requires this.
12335
12336 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12337
12338 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12339 first.
12340 (yyrecoverSyntaxError): Correct the logic for setting and testing
12341 yyerrState.
12342 Correct comment on handling EOF.
12343 Allow states with only a default reduction, rather than failing
12344 (I can't quite reconstruct why these were not allowed before).
12345
12346 Fixes to avoid problem that $-N rules in GLR parsers can cause
12347 buffer overruns, corrupting state.
12348
12349 * src/output.c (prepare_rules): Output max_left_semantic_context
12350 definition.
12351 * src/reader.h (max_left_semantic_context): New variable declaration.
12352 * src/scan-gram.l (max_left_semantic_context): Define.
12353 (handle_action_dollar): Update max_left_semantic_context.
12354 * data/glr.c (YYMAXLEFT): New definition.
12355 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12356 (yyresolveAction): Ditto.
12357
12358 Fixes to problems with location handling in GLR parsers reported by
12359 Frank Heckenbach (2003/06/05).
12360
12361 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12362 (YYRHSLOC): Add parentheses, and define only if locations used.
12363 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12364 locations not used.
12365 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12366 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12367
12368 * tests/cxx-type.at: Exercise location information; update tests
12369 to differentiate output with and without locations.
12370 Remove forward declarations of yylex and yyerror---caused errors
12371 because default YYLTYPE not yet defined.
12372 Change semantic actions to compute strings, rather than printing
12373 them directly (to test proper passing of semantics values). Change
12374 output to prefix notation and update test data and expected results.
12375 (yylex): Track locations.
12376 (stmtMerge): Return value rather than printing, and include arguments
12377 in value.
12378
12379 2003-06-03 Paul Eggert <eggert@twinsun.com>
12380
12381 Avoid warnings generated by GCC 2.95.4 when Bison is
12382 configured with --enable-gcc-warnings.
12383 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12384 yy::]b4_parser_class_name[::translate_,
12385 yy::Stack::operator[] (unsigned),
12386 yy::Stack::operator[] (unsigned) const,
12387 yy::Slice::operator[] (unsigned),
12388 yy::Slice::operator[] (unsigned) const):
12389 Rename local vars to avoid warnings.
12390 * tests/glr-regression.at (Improper handling of embedded actions
12391 and $-N in GLR parsers): Remove unused local variable from yylex.
12392 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12393 (void) as arg when not pure, since we now assume C89 when building
12394 Bison. Pacify GCC by using parameter.
12395
12396 2003-06-02 Paul Eggert <eggert@twinsun.com>
12397
12398 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12399 yy::Location::lines, yy::Location::columns): Rename arguments
12400 to avoid shadowing; this removes a warning generated by GCC 3.3.
12401
12402 2003-06-01 Paul Eggert <eggert@twinsun.com>
12403
12404 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12405 to g++, as GCC 3.3 complains if you do it.
12406 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12407 everything that WARNING_CFLAGS has, except omit warnings
12408 not suitable for C++.
12409 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12410 * tests/atlocal.in (CXXFLAGS): New var.
12411 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12412
12413 Fix a GLR parser bug I reported in February; see
12414 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12415 The problem was that GLR parsers did not conform to the C standard,
12416 because actions like { $1 = $2 + $3; } expanded to expressions
12417 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12418 to a local variable. The C standard says that expressions
12419 like (var = f ()) + (var = f ()) have undefined behavior.
12420 Another problem was that GCC sometimes issues warnings that
12421 yyfill and its parameters are unused.
12422
12423 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12424 as possibly unused.
12425 (yyfill): New function.
12426 (YYFILL): Use it.
12427 (yyuserAction): Change type of yynormal to bool, so that it matches
12428 the new yyfill signature. Mark it as possibly unused.
12429
12430
12431 Follow up on a bug I reported in February, where a Bison-generated
12432 parser can loop. Provide a test case and a fix for yacc.c. I
12433 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12434 The original bug report is in:
12435 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12436
12437 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12438 macro's size was becoming unwieldy.
12439 (yyerrlab): Do not discard an empty lookahead symbol, as this
12440 might destroy garbage.
12441 (yyerrorlab): New label, with the old contents of YYERROR,
12442 plus the following change: pop the stack of rhs corresponding
12443 to the production that invoked YYERROR. That is how Yacc
12444 behaves, and POSIX requires this behavior.
12445 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12446 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12447 Define 'alarm' to do nothing if unistd.h is not available.
12448 Add a new rule "exp: '-' error;" to test the above change to
12449 data/yacc.c. Use 'alarm' to abort any test taking longer than
12450 10 seconds, as it's probably looping.
12451 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12452 Also, the new yacc.c generates two fewer diagnostics for an
12453 existing test.
12454
12455 2003-05-24 Paul Eggert <eggert@twinsun.com>
12456
12457 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12458 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12459 This fixes a problem reported by John Bowman when the Compaq/HP
12460 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12461 -ansi -Wall -gall).
12462 * data/yacc.c (union yyalloc): Likewise.
12463 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12464
12465 Switch from 'int' to 'bool' where that makes sense.
12466
12467 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12468 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12469 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12470 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12471 Return or accept bool, not int. All callers changed.
12472 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12473 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12474 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12475 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12476 bitset_or_and_cmp_): Likewise.
12477 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12478 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12479 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12480 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12481 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12482 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12483 bitset_stats_or_and_cmp): Likewise.
12484 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12485 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12486 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12487 ebitset_xor_cmp): Likewise.
12488 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12489 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12490 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12491 lbitset_xor_cmp): Likewise.
12492 * lib/bbitset.h: Include <stdbool.h>.
12493 (struct bitset_vtable): The following members now return bool, not
12494 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12495 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12496 or_and_cmp).
12497 * src/conflicts.c (count_rr_conflicts): Likewise.
12498 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12499 All uses changed.
12500 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12501 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12502 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12503 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12504 graph_flag): Likewise.
12505 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12506 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12507 graph_flag): Likewise.
12508 * src/output.c (error_verbose): Likewise.
12509 * src/output.h (error_verbose): Likewise.
12510 * src/reader.c (start_flag, typed): Likewise.
12511 * src/reader.h (typed): Likewise.
12512 * src/getargs.c (LOCATIONS_OPTION): New constant.
12513 (long_options, getargs): Use it.
12514 * src/lalr.c (build_relations): Use bool, not int.
12515 * src/nullable.c (nullable_compute): Likewise.
12516 * src/print.c (print_reductions): Likewise.
12517 * src/tables.c (action_row, pack_vector): Likewise.
12518 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12519 * src/output.c (prepare): Use it.
12520 * src/output.c (token_definitions_output,
12521 symbol_destructors_output, symbol_destructors_output): Use string,
12522 not boolean integer, to keep track of whether to output separator.
12523 * src/print_graph.c (print_core): Likewise.
12524 * src/state.c (state_rule_lookaheads_print): Likewise.
12525
12526 * config/install-sh: Sync from automake 1.7.5.
12527
12528 2003-05-14 Paul Eggert <eggert@twinsun.com>
12529
12530 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12531 semicolon after a grammar declaration, in the interest of possible
12532 future changes to the Bison input language.
12533 Do not allow a stray semicolon at the start of the grammar.
12534 (rhses.1): Allow one or more semicolons after any rule, including
12535 just before "|" as required by POSIX.
12536 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12537 grammar.
12538
12539 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12540
12541 %parse-param support for lalr1.cc.
12542
12543 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12544 b4_cc_constructor_calls, b4_cc_constructor_call,
12545 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12546 definitions.
12547 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12548 parse-param arguments.
12549 (yy::b4_parser_class_name): Declare instance variables to
12550 hold parse-param arguments.
12551 * tests/calc.at: s/value/semantic_value/ because value clashes
12552 with a member of yy::b4_parser_class_name. Adjust C++ code
12553 to handle %parse-param. Enable %parse-param test in C++.
12554
12555 2003-05-12 Paul Eggert <eggert@twinsun.com>
12556
12557 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12558 English a bit. Fix fclose typo. Change "const char" to "char
12559 const", and use ANSI C rather than K&R for "main". Suggest
12560 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12561 and suggest yy_switch_to_buffer.
12562
12563 2003-05-05 Paul Eggert <eggert@twinsun.com>
12564
12565 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12566 C89. This avoids a diagnostic on compilers that define __STDC__
12567 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12568 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12569
12570 2003-05-03 Paul Eggert <eggert@twinsun.com>
12571
12572 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12573 Do not overrun array bounds.
12574 This should fix a bug reported today by Olatunji Oluwabukunmi in
12575 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12576
12577 2003-04-29 Akim Demaille <akim@epita.fr>
12578
12579 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12580 * src/getargs.c, src/getargs.h: here, as bool, not int.
12581 (nondeterministic_parser): New.
12582 * src/parse-gram.y, src/scan-gram.l: Support
12583 %nondeterministic-parser.
12584 * src/output.c (prepare): Use nondeterministic_parser instead
12585 of glr_parser where appropriate.
12586 * src/tables.c (conflict_row, action_row, save_row)
12587 (token_actions, token_actions, pack_vector): Ditto.
12588
12589 2003-04-29 Akim Demaille <akim@epita.fr>
12590
12591 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12592
12593 2003-04-29 Akim Demaille <akim@epita.fr>
12594
12595 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12596 with %pure-parser and %locations to exercise the patch from Yakov
12597 Markovitch below.
12598
12599 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12600
12601 * data/yacc.c: (b4_lex_param): Corrected for the case where
12602 %lex-param is provided and %pure-parser isn't.
12603
12604 2003-04-27 Paul Eggert <eggert@twinsun.com>
12605
12606 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12607 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12608 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12609 if it is not defined.
12610 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12611
12612 2003-04-26 Paul Eggert <eggert@twinsun.com>
12613
12614 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12615 Declare to be of type suitable for the ninf value itself, not of
12616 type suitable for the corresponding table, since the latter might
12617 be unsigned but the ninf value might be negative. This fixes a
12618 bug reported by Alexandre Duret-Lutz in
12619 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12620
12621 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12622 invokes it. We shouldn't invoke it twice because it will attempt
12623 to put error.o in the archive twice. This fixes a glitch reported
12624 by Martin Mokrejs in
12625 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12626
12627 2003-04-21 Paul Eggert <eggert@twinsun.com>
12628
12629 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12630 to gnulib.
12631
12632 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12633
12634 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12635 Fix obvious typo that results in uncompilable GLR parsers
12636 when both %pure-parser and %locations are used. (trivial change)
12637
12638 2003-04-17 Paul Eggert <eggert@twinsun.com>
12639
12640 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12641 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12642 Do not insert the expected token via unput, as this runs afoul
12643 of a POSIX-compatibility bug in flex 2.5.31.
12644 All uses changed to BEGIN the parent state,
12645 since we no longer insert the expected token via unput.
12646 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12647 that is no longer emitted after the above change.
12648
12649 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12650 the first one. This change is from Paul Hilfinger, and it fixes
12651 regression reported by Werner Lemberg in
12652 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12653
12654 (resolve_sr_conflict): Don't invoke state_errs_set
12655 unless one or more tokens have been explicitly made errors.
12656 Otherwise, the above change causes Bison to abort.
12657
12658 * tests/existing.at (GNU pic Grammar): New test case, taken from
12659 Lemberg's email.
12660
12661 2003-03-31 Akim Demaille <akim@epita.fr>
12662
12663 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12664
12665 2003-03-31 Akim Demaille <akim@epita.fr>
12666
12667 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12668 output.
12669
12670 2003-03-31 Akim Demaille <akim@epita.fr>
12671
12672 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12673 From Paul Hilfinger.
12674
12675 2003-03-29 Akim Demaille <akim@epita.fr>
12676
12677 * m4/error.m4: Do not put under dynamic conditions some code which
12678 expansion is under static control.
12679
12680 2003-03-29 Akim Demaille <akim@epita.fr>
12681
12682 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12683
12684 2003-03-29 Akim Demaille <akim@epita.fr>
12685
12686 * doc/bison.texinfo (Strings are Destroyed): New.
12687
12688 2003-03-13 Paul Eggert <eggert@twinsun.com>
12689
12690 * .cvsignore: Add configure.lineno.
12691 * src/.cvsignore: Add yacc.
12692 * tests/.cvsignore: Add testsuite.log.
12693 * doc/fdl.texi: Sync with latest FSF version.
12694
12695 2003-03-12 Paul Eggert <eggert@twinsun.com>
12696
12697 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12698 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12699 cursor, instead of leaving it undefined. This fixes a bug
12700 reported by Tim Van Holder in
12701 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12702 * tests/input.at (Torturing the Scanner): Test the scanner on
12703 an empty input file, which was Tim Van Holder's test case.
12704
12705 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12706 <sys/resource.h> can be included, include sys/time.h and
12707 sys/times.h first, if available. This works around the SunOS
12708 4.1.4 porting bug reported by Bruce Becker in
12709 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12710
12711 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12712 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12713 AC_HEADER_SYS_WAIT.
12714
12715 Merge changes from gnulib. This was prompted because the CVS
12716 snapshot didn't build on Solaris 7 due to strnlen problems.
12717
12718 These changes need to be merged back into gnulib:
12719 * lib/hash.c: Include <stdbool.h> unconditionally.
12720 * m4/onceonly.m4 (m4_quote): New macro.
12721 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12722 Quote AC_FOREACH variable-expansions properly.
12723 The 2003-01-03 obstack.h change also needs merging.
12724 {end of changes requiring merging}
12725
12726 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12727 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12728 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12729 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12730 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12731 New files, imported from gnulib.
12732 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12733 above.
12734
12735 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12736 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12737 gnulib sources.
12738
12739 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12740 Add.
12741 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12742 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12743 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12744 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12745 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12746 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12747 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12748 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12749 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12750 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12751 (jm_PREREQ_ARGMATCH): Remove.
12752 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12753 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12754
12755 * src/system.h: Include <stdbool.h> unconditionally.
12756
12757 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12758 assuming at least C89 in the bitset code for some time now.
12759
12760 2003-03-03 Akim Demaille <akim@epita.fr>
12761
12762 * ro.po: New.
12763
12764 2003-03-02 Akim Demaille <akim@epita.fr>
12765
12766 * doc/bison.texinfo (Table of Symbols): Reactivate the
12767 documentation for %lex-param, and %parse-param.
12768
12769 2003-03-02 Akim Demaille <akim@epita.fr>
12770
12771 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12772 generate verbose error messages.
12773 Use the number of tokens as an upper bound in yytname, as it
12774 cannot be a non terminal.
12775
12776 2003-03-02 Akim Demaille <akim@epita.fr>
12777
12778 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12779 message.
12780
12781 2003-03-02 Akim Demaille <akim@epita.fr>
12782
12783 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12784 Use them to exercise yycheck overrun.
12785 Based on Andrew Suffield's grammar.
12786
12787 2003-03-02 Akim Demaille <akim@epita.fr>
12788
12789 Create tests/local.at for Bison generic testing macros.
12790
12791 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12792 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12793 This new file.
12794 * tests/calc.at (AT_CHECK_CALC): Adjust.
12795 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12796 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12797 * tests/local.at: here.
12798 (AT_COMPILE_CXX): Tags the tests using it as c++.
12799 Ignore the test if CXX is not functional.
12800
12801 2003-03-01 Paul Eggert <eggert@twinsun.com>
12802
12803 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12804 not loc->end, since loc->end might contain garbage and this leads
12805 to undefined behavior on some platforms.
12806 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12807 depend on *loc, so that the reader doesn't give the the false
12808 impression that *loc is initialized.
12809 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12810 does not survive the return.
12811
12812 2003-03-01 Akim Demaille <akim@epita.fr>
12813
12814 * src/scan-gram.l (code_start): Always initialize it when entering
12815 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12816 yylex invocation. An alternative would be making it static, but
12817 then it starts with the second %%'s beginning, instead of its end.
12818
12819 2003-02-28 Paul Eggert <eggert@twinsun.com>
12820
12821 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12822 around a UnixWare 7.1.1 porting bug reported by John Hughes in
12823 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
12824
12825 2003-02-26 Paul Eggert <eggert@twinsun.com>
12826
12827 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12828 Remove Sequent/Pyramid discussion (nobody uses them any more).
12829 Merge VMS and MS-DOS discussion; these ports may well be dead
12830 but let's keep mentioning them for now. Put <> around email
12831 addresses. Add copyright notice.
12832
12833 2003-02-24 Paul Eggert <eggert@twinsun.com>
12834
12835 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12836 to avoid collision with flex use of yylineno.
12837 Problem reported by Bruce Lilly in
12838 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
12839 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12840 * data/yacc.c (yy_reduce_print): Likewise.
12841
12842 * config/depcomp: Sync with Automake 1.7.3.
12843
12844 2003-02-21 Akim Demaille <akim@epita.fr>
12845
12846 * data/lalr1.cc: Use temporary variables instead of casts to
12847 change integer types.
12848 Suggested by Paul Eggert.
12849
12850 2003-02-21 Akim Demaille <akim@epita.fr>
12851
12852 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12853 to avoid confusions with lalr1.cc's notion of Position.
12854 Suggested by Paul Eggert.
12855
12856 2003-02-20 Akim Demaille <akim@epita.fr>
12857
12858 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12859 before initial_columns.
12860 (location.hh): Use consistent variable names when defining the
12861 operator<<.
12862 Use "last" so that we subtract from Positions, not from unsigned.
12863
12864 2003-02-20 Akim Demaille <akim@epita.fr>
12865
12866 * data/lalr1.cc (position.hh): New subfile, including the extended
12867 and Doxygen'ed documentation of class Position.
12868 (location.hh): Use it.
12869 Document a` la Doxygen.
12870 With the help of Benoit Perrot.
12871
12872 2003-02-20 Akim Demaille <akim@epita.fr>
12873
12874 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12875 AT_YACC_IF.
12876 Redefine AT_YYERROR_SEES_LOC_IF using it.
12877 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12878 not defined.
12879 Don't use the location in yy::Parser::error_ and
12880 yy::Parser::print_ when not %locations.
12881 Activate more lalr1.cc tests.
12882
12883 2003-02-19 Akim Demaille <akim@epita.fr>
12884
12885 * data/lalr1.cc: When displaying a line number, be sure to make it
12886 an int.
12887
12888 2003-02-19 Akim Demaille <akim@epita.fr>
12889
12890 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12891 Remove, useless.
12892 (YYABORT, YYACCEPT, YYERROR): New.
12893 * tests/calc.at: Renable the lalr1.cc test.
12894
12895 2003-02-19 Akim Demaille <akim@epita.fr>
12896
12897 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12898 error recovery, mixing with/without pops and discarding of the
12899 lookahead.
12900 Exercise YYERROR.
12901 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12902
12903 2003-02-17 Paul Eggert <eggert@twinsun.com>
12904
12905 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12906 * tests/testsuite.at (AT_COMPILE): Use them.
12907 This fixes the testsuite problem reported by Robert Lentz in
12908 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
12909
12910 2003-02-12 Paul Eggert <eggert@twinsun.com>
12911
12912 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12913 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
12914 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
12915 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12916 Check for malloc failure, for consistency with yacc.c.
12917 (yytname_size): Remove, for consistency with yacc.c.
12918
12919 The bug still remains in data/lalr1.cc, as I didn't have time
12920 to fix it there.
12921
12922 2003-02-06 Akim Demaille <akim@epita.fr>
12923
12924 * configure.ac (GXX): Rename as...
12925 (CXX): this, to keep the original Autoconf semantics.
12926 Require 2.57.
12927 * data/lalr1.cc: Fix b4_copyright invocations.
12928 If YYDEBUG is not defined, don't depend upon name_ being defined.
12929 (location.hh): Include string and iostream.
12930 (Position::filename): New member.
12931 (Position::Position ()): New.
12932 (operator<< (Position)): New.
12933 (operator- (Position, int)): New.
12934 (Location::first, Location::last): Rename as...
12935 (Location::begin, Location::end): these, to mock the conventional
12936 iterator names.
12937 (operator<< (Location)): New.
12938 * tests/atlocal.in (CXX): New.
12939 * tests/testsuite.at (AT_COMPILE_CXX): New.
12940 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12941 locations in a more synthetic way.
12942 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12943 lalr1.cc is used.
12944 Adjust the C locations to match those from Emacs: first column is
12945 column 0.
12946 Change all the expected results.
12947 Conform to the GCS: simplify the locations when applicable.
12948 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12949 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12950 these CPP macros with the m4 macros new defined by...
12951 (AT_CHECK_PUSHDEFS): this, i.e.:
12952 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
12953 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
12954 New macros.
12955 (AT_CHECK_POPDEFS): Undefine them.
12956 (AT_CHECK_CALC_LALR1_CC): New.
12957 Use it for the first lalr1.cc test.
12958
12959 2003-02-04 Akim Demaille <akim@epita.fr>
12960
12961 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12962 Location as is defined.
12963
12964 2003-02-04 Akim Demaille <akim@epita.fr>
12965
12966 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12967 name_ being defined.
12968
12969 2003-02-03 Paul Eggert <eggert@twinsun.com>
12970
12971 * src/gram.h (start_symbol): Remove unused decl.
12972
12973 Use more-consistent naming conventions for local vars.
12974
12975 * src/derives.c (derives_compute): Change type of local var from
12976 int to rule_number.
12977 * src/gram.c (grammar_rules_partial_print): Likewise.
12978 * src/print.c (print_core): Likewise.
12979 * src/reduce.c (reduce_grammar_tables): Likewise.
12980
12981 * src/gram.c (grammar_dump): Change name of item_number *
12982 local var from r to rp.
12983 * src/nullable.c (nullable_compute): Likewise.
12984
12985 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12986
12987 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12988 for symbol or symbol_number var.
12989 * src/reader.c (grammar_start_symbol_set): Likewise.
12990 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12991 Likewise.
12992 * src/state.c (transitions_to): Likewise.
12993 * src/state.h: Likewise.
12994 * src/tables.c (symbol_number_to_vector_number): Likewise.
12995
12996 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12997 char * var.
12998
12999 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13000 var.
13001
13002 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13003 var.
13004
13005 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13006 Use str, not s, for char * var. Use ch, not c, for character var.
13007 Use size for size var.
13008
13009 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13010 char * var.
13011 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13012 uniqstr var.
13013 * src/uniqstr.h: Likewise.
13014
13015 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13016 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13017 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13018 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13019 param to have same name as that of enum, so that we don't use
13020 "s" to stand for a non-state.
13021
13022 2003-02-02 Akim Demaille <akim@epita.fr>
13023
13024 * src/scan-skel.l: Scan more than one inert character per yylex
13025 invocation.
13026
13027 2003-02-01 Paul Eggert <eggert@twinsun.com>
13028
13029 Version 1.875a.
13030
13031 * po/LINGUAS: Add ms.
13032
13033 2003-01-30 Akim Demaille <akim@epita.fr>
13034
13035 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13036
13037 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13038
13039 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13040 of $1.
13041
13042 Changes in response to error report by S. Eken: GLR mode does not
13043 handle negative $ indices or $ indices in embedded rules correctly.
13044 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13045
13046 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13047 (b4_rhs_location): Ditto.
13048 (yyfill): New function to copy from stack tree into array
13049 incrementally.
13050 (yyuserAction): Modify to allow incremental move of semantic values
13051 to rhs array when in GLR mode.
13052 Define YYFILL to use in user-defined actions to fill semantic array
13053 as needed.
13054 Remove dummy use of yystack, as there is now a guaranteed use.
13055 (yydoAction): Modify to allow incremental move of semantic values
13056 to rhs array when in GLR mode.
13057 (yyresolveAction): Ditto.
13058 (yyglrShiftDefer): Update comment.
13059 (yyresolveStates): Use X == NULL for pointers, not !X.
13060 (yyglrReduce): Ditto.
13061 (yydoAction): Ditto
13062
13063 * tests/glr-regr1.at: Rename to ...
13064 * tests/glr-regression.at: Add new regression test for the problems
13065 described above (adapted from S. Eken).
13066 Update copyright notice.
13067 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13068 * tests/Makefile.am: Ditto.
13069
13070 2003-01-28 Paul Eggert <eggert@twinsun.com>
13071
13072 * data/lalr1.cc: Do not use @output_header_name@ unless
13073 b4_defines_flag is set. This fixes two bugs reported by
13074 Tim Van Holder in
13075 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13076 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13077
13078 2003-01-21 Paul Eggert <eggert@twinsun.com>
13079
13080 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13081 we don't need to worry about yyerrlab1 being reported as an
13082 "unused label" by non-GCC C compilers. The downside is that if
13083 locations are used then a couple of statements are duplicated each
13084 time YYERROR is invoked, but the upside is that the warnings
13085 should vanish.
13086 (yyerrlab1): Move code to YERROR.
13087 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13088 This reverts some of the 2002-12-27 change.
13089
13090 2003-01-17 Paul Eggert <eggert@twinsun.com>
13091
13092 * src/output.c (symbol_printers_output): Fix typo that led
13093 to core dump. Problem reported by Antonio Rus in
13094 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13095
13096 2003-01-13 Akim Demaille <akim@epita.fr>,
13097 Quoc Peyrot <chojin@lrde.epita.fr>,
13098 Robert Anisko <anisko_r@lrde.epita.fr>
13099
13100 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13101 when the stacks contain one element, as the loop would otherwise
13102 free the last state, and then use the top state (the one we just
13103 popped). This means that the initial elements will not be freed
13104 explicitly, as is the case in yacc.c; it is not a problem, as
13105 these elements have fake values.
13106
13107 2003-01-11 Paul Eggert <eggert@twinsun.com>
13108
13109 * NEWS: %expect-violations are now just warnings, reverting
13110 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13111 bootstrapping problem reported by Matthias Klose; see
13112 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13113 * src/conflicts.c (conflicts_print): Likewise.
13114 * tests/conflicts.at (%expect not enough, %expect too much,
13115 %expect with reduce conflicts): Likewise.
13116 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13117 that the warning is enabled if the number of conflicts changes
13118 (not necessarily increases).
13119
13120 * src/getargs.c (version): Update copyright year.
13121
13122 2003-01-09 Akim Demaille <akim@epita.fr>
13123
13124 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13125
13126 2003-01-08 Paul Eggert <eggert@twinsun.com>
13127
13128 * Makefile.maint (WGETFLAGS):
13129 New macro, containing "-C off" to disable proxy caches.
13130 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13131 (rel-check): Use $(WGET) instead of wget.
13132
13133 2003-01-06 Paul Eggert <eggert@twinsun.com>
13134
13135 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13136 the GLR paper of Scott, Johnstone and Hussain.
13137
13138 2003-01-04 Paul Eggert <eggert@twinsun.com>
13139
13140 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13141 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13142 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13143 (EXTRA_LIBRARIES): New var, for liby.a.
13144 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13145 (EXTRA_SCRIPTS): New var, for yacc.
13146
13147 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13148 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13149 Problem reported by Nelson H. F. Beebe.
13150
13151 2003-01-03 Paul Eggert <eggert@twinsun.com>
13152
13153 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13154 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13155 when compiling Bison 1.875's `bitset bset = obstack_alloc
13156 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13157
13158 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13159 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13160 grow to a huge size with typical invocation.
13161
13162 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13163 Use the pattern recommended by Autoconf 2.57, except also protect
13164 against double-definition.
13165 * src/system.h: Likewise.
13166 Portability issues reported by Nelson H. F. Beebe.
13167
13168 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13169 All uses changed. Provide a definition in both C and C++.
13170 (yytrue, yyfalse): Define even if defined (__cplusplus).
13171
13172 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13173 Reported by Nelson H. F. Beebe.
13174
13175 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13176
13177 2003-01-02 Paul Eggert <eggert@twinsun.com>
13178
13179 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13180 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13181 Bug reported by Nelson H. F. Beebe.
13182
13183 2003-01-01 Paul Eggert <eggert@twinsun.com>
13184
13185 * Version 1.875.
13186
13187 2002-12-30 Paul Eggert <eggert@twinsun.com>
13188
13189 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13190 Moved here from...
13191 (<INITIAL>","): Here. This causes stray "," to be treated
13192 more uniformly.
13193
13194 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13195 last brace in braced code when not in Yacc mode, for compatibility
13196 with Bison 1.35. This resurrects the 2001-12-15 patch to
13197 src/reader.c.
13198
13199 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13200 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13201
13202 2002-12-28 Paul Eggert <eggert@twinsun.com>
13203
13204 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13205 that of SYM's type. This fixes Debian bug 168069, reported by
13206 Thomas Olsson.
13207
13208 2002-12-28 Paul Eggert <eggert@twinsun.com>
13209
13210 Version 1.75f.
13211
13212 Switch back to the Yacc style of conflict reports, undoing some
13213 of the 2002-07-30 change.
13214 * doc/bison.texinfo (Understanding): Use Yacc style for
13215 conflict reports. Also, use new way of locating rules.
13216 * src/conflicts.c (conflict_report):
13217 Renamed from conflict_report_yacc, removing the old
13218 'conflict_report'. Translate the entire conflict report at once,
13219 so that we don't assume that "," has the same interpretation in
13220 all languages.
13221 (conflicts_output): Use Yacc-style conflict report for each state,
13222 instead of our more-complicated style.
13223 (conflicts_print): Use Yacc-style conflict report, except print
13224 the input file name when not emulating Yacc.
13225 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13226 Conflicted Reduction, %expect not enough, %expect too much,
13227 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13228 * tests/existing.at (GNU Cim Grammar): Likewise.
13229 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13230
13231 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13232 fatal): Don't invoke fflush; it's not needed and it might even be
13233 harmful for stdout, as stdout might not be open.
13234 * src/reduce.c (reduce_print): Likewise.
13235
13236 2002-12-27 Paul Eggert <eggert@twinsun.com>
13237
13238 Fix a bug where error locations were not being recorded correctly.
13239 This problem was originally reported by Paul Hilfinger in
13240 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13241
13242 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13243 top of the location stack's error locations.
13244 (yyerrlab): Set it. When discarding a token, push its location
13245 onto yylerrsp so that we don't lose track of the error's end.
13246 (yyerrlab1): Now is only the target of YYERROR, so that we can
13247 properly record the location of the action that failed. For GCC
13248 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13249 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13250 (yyerrlab2): New label, which yyerrlab now falls through to.
13251 Compute the error's location by applying YYLLOC_DEFAULT to
13252 the locations of all the symbols that went into the error.
13253 * doc/bison.texinfo (Location Default Action): Mention that
13254 YYLLOC_DEFAULT is also invoked for syntax errors.
13255 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13256 Error locations include the locations of all the tokens that were
13257 discarded, not just the last token.
13258
13259 2002-12-26 Paul Eggert <eggert@twinsun.com>
13260
13261 * src/files.c: Include quote.h.
13262 (compute_output_file_names): Warn if we detect conflicting
13263 outputs to the same file. This should catch the misunderstanding
13264 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13265
13266 * src/conflicts.c (conflicts_print): If the user specifies
13267 "%expect N", report an error if there are any reduce/reduce
13268 conflicts. This is what the manual says should happen.
13269 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13270 * tests/conflicts.at (%expect with reduce conflicts): New test.
13271
13272 Don't use m4_include on relative file names, as it doesn't work as
13273 desired if there happens to be a file with that name under ".".
13274
13275 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13276 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13277 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13278 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13279 * src/output.c (output_skeleton): Use full path names when
13280 specifying a file to include; don't rely on include path, as
13281 it's unreliable when the working file contains a file with
13282 that name.
13283
13284 2002-12-25 Paul Eggert <eggert@twinsun.com>
13285
13286 Remove obsolete references to bison.simple and bison.hairy.
13287 Problem mentioned by Aubin Mahe in
13288 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13289 * data/glr.c: Comment fix.
13290 * doc/bison.1: Remove references. Also, mention "yacc".
13291
13292 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13293 with -g option.
13294
13295 * src/parse-gram.y (declaration): Use enum "report_states" rather
13296 than its numeric value 1.
13297
13298 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13299 opening a new one. This fixes Debian bug 165349, reported by
13300 Bruce Stephens.
13301
13302 2002-12-24 Paul Eggert <eggert@twinsun.com>
13303
13304 Version 1.75e.
13305
13306 * Makefile.maint (cvs-update): Don't assume that the shell
13307 supports $(...), as Solaris sh doesn't.
13308
13309 * src/parse-gram.y (lloc_default): Remove test for empty
13310 nonterminals at the end, since it didn't change the result.
13311
13312 2002-12-24 Paul Eggert <eggert@twinsun.com>
13313
13314 If the user does not define YYSTYPE as a macro, Bison now declares it
13315 using typedef instead of defining it as a macro. POSIX requires this.
13316 For consistency, YYLTYPE is also declared instead of defined.
13317
13318 %union directives can now have a tag before the `{', e.g., the
13319 directive `%union foo {...}' now generates the C code
13320 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13321 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13322 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13323 instead of `yyltype'.
13324
13325 `yystype' and `yyltype' are now obsolescent macros instead of being
13326 typedefs or tags; they are no longer documented and will be
13327 withdrawn in a future release.
13328
13329 * data/glr.c (b4_location_type): Remove.
13330 (YYSTYPE): Renamed from yystype.
13331 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13332 (struct YYLTYPE): Renamed from struct yyltype.
13333 (YYLTYPE): Renamed from yyltype.
13334 (yyltype, yystype): New (and obsolescent) macros,
13335 for backward compatibility.
13336 * data/yacc.c: Likewise.
13337
13338 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13339 does not specify a union tag. This is for compatibility with
13340 Solaris 9 yacc.
13341
13342 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13343 const *, since it is now modified by stripping surrounding { }.
13344 (current_braced_code): Remove.
13345 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13346 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13347 trailing " {...}". Now of type <chars>.
13348 (grammar_declaration): Adjust to bundled tokens.
13349 (code_content): Remove; stripping is now done by add_param.
13350 (print_token_value): Print contents of bundled tokens.
13351 (token_name): New function.
13352
13353 * src/reader.h (braced_code, current_braced_code): Remove.
13354 (token_name): New decl.
13355
13356 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13357 token_type, not braced_code code_kind. All uses changed.
13358 (SC_PRE_CODE): New state, for scanning after a keyword that
13359 has (or usually has) an immediately-following braced code.
13360 (token_type): New local var, to keep track of which token type
13361 to return when scanning braced code.
13362 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13363 <INITIAL>"%parse-param", <INITIAL>"%printer",
13364 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13365 instead of returning a token type immediately.
13366 (<INITIAL>"{"): Set token type.
13367 (<SC_BRACED_CODE>"}"): Use it.
13368 (handle_action_dollar, handle_action_at): Now returns bool
13369 indicating success. Fail if ! current_rule; this prevents a core dump.
13370 (handle_symbol_code_dollar, handle_symbol_code_at):
13371 Remove; merge body into caller.
13372 (handle_dollar, handle_at): Complain in invalid contexts.
13373
13374 * NEWS, doc/bison.texinfo: Document the above.
13375 * NEWS: Fix years and program names in copyright notice.
13376
13377 2002-12-17 Paul Eggert <eggert@twinsun.com>
13378
13379 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13380 Reporting, Table of Symbols): Omit mentions of %lex-param and
13381 %parse-param from the documentation for now.
13382
13383 2002-12-15 Paul Eggert <eggert@twinsun.com>
13384
13385 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13386 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13387 lookahead symbol, and which sets yychar in parser actions) and it
13388 disagreed with the Bison documentation. Bug
13389 reported by Andrew Walrond.
13390
13391 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13392 as the caller now does that.
13393 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13394 (YYEMPTY): Parenthesize right hand side, since others use it.
13395 (yyparse): Don't assume that our generated code is the only code
13396 that sets yychar.
13397
13398 2002-12-13 Paul Eggert <eggert@twinsun.com>
13399
13400 Version 1.75d.
13401
13402 POSIX requires a "yacc" command.
13403 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13404 (MOSTLYCLEANFILES): Add yacc.
13405 (yacc): New rule.
13406 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13407 as an alias for bison y.
13408
13409 * po/LINGUAS: Add da.
13410
13411 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13412 problem with latest <getopt.h>.
13413 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13414
13415 * doc/fdl.texi: Upgrade to 1.2.
13416 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13417 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13418 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13419 gnulib.
13420 * config/install-sh: Sync with autotools.
13421
13422 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13423 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13424 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13425 locations are requested.
13426 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13427 locations are requested.
13428
13429 2002-12-12 Paul Eggert <eggert@twinsun.com>
13430
13431 Remove unportable casts and storage allocation tricks.
13432 While we're at it, remove almost all casts, since they
13433 usually aren't needed and are a sign of trouble.
13434
13435 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13436
13437 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13438 the pointer DSET returned by malloc; this isn't portable.
13439 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13440 Similarly for DERIVES.
13441 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13442 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13443 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13444
13445 * src/derives.c (derives_compute): Do not bother invoking
13446 int_of_rule_number, since rule numbers are integers.
13447
13448 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13449 rather than XMALLOC (char, N).
13450
13451 * src/files.c (filename_split): Rewrite to avoid cast.
13452
13453 * src/gram.h (symbol_number_as_item_number,
13454 item_number_as_symbol_number, rule_number_as_item_number,
13455 item_number_as_rule_number):
13456 Now inline functions rather than macros, to avoid casts.
13457 * src/state.h (state_number_as_int): Likewise.
13458 * src/tables.c (state_number_to_vector_number,
13459 symbol_number_to_vector_number): Likewise.
13460
13461 * src/gram.h (int_of_rule_number): Remove; no longer used.
13462
13463 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13464 since the resulting storage is always stored into.
13465
13466 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13467 where it's needed.
13468
13469 * src/muscle_tab.c (muscle_m4_output):
13470 Now inline. Return bool, not int.
13471 * src/state.c (state_compare): Likewise.
13472 * src/symtab.c (symbol_check_defined,
13473 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13474 hash_compare_symbol, hash_symbol):
13475 Likewise.
13476 * src/uniqstr.c (uniqstr_print): Likewise.
13477 * src/muscle_tab.c (muscle_m4_output_processor):
13478 New function, to avoid casts.
13479 * src/state.c (state_comparator, stage_hasher): Likewise.
13480 * src/symtab.c (symbol_check_defined_processor,
13481 symbol_check_alias_consistency_processor, symbol_pack_processor,
13482 symbol_translation_processor, hash_symbol_comparator,
13483 hash_symbol_hasher): Likewise.
13484 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13485 * src/muscle_tab.c (muscles_m4_output):
13486 Use new functions instead of casting old functions unportably.
13487 * src/state.c (state_hash_new): Likewise.
13488 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13489 symbols_token_translations_init):
13490 Likewise.
13491 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13492
13493 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13494 var instead of casting to long, to avoid casts.
13495 (prepare_states): Use MALLOC rather than alloca, so that we don't
13496 have to worry about alloca.
13497 * src/state.c (state_hash_lookup): Likewise.
13498
13499 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13500 local var instead of casting to unsigned char, to avoid casts.
13501
13502 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13503 STATE_ALLOC): Remove.
13504 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13505 rather than calloc, and use offsetof to avoid allocating slightly
13506 too much storage.
13507 (state_new): Initialize all members.
13508
13509 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13510
13511 * src/symtab.c (symbol_free): Remove; unused.
13512 (symbol_get): Remove cast in lhs of assignment.
13513 (symbols_do): Now static. Accept generic arguments, not
13514 hashing-related ones.
13515
13516 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13517 (symbol_processor): Remove.
13518 (symbols_do): Remove decl; now static.
13519
13520 * src/system.h (alloca): Remove; decl no longer needed.
13521 (<stddef.h>): Include, for offsetof.
13522 (<inttypes.>, <stdint.h>): Include if available.
13523 (uintptr_t): New type, if system lacks it.
13524 (CALLOC, MALLOC, REALLOC): New macros.
13525 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13526 new macros.
13527
13528 * src/tables.c (table_size): Now int, to pacify GCC.
13529 (table_grow, table_ninf_remap): Use signed table size.
13530 (save_row): Don't bother initializing locals when not needed.
13531 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13532 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13533
13534 * src/vcg.h: Correct misspellings.
13535
13536 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13537
13538
13539 * src/getargs.c (getargs): Don't assume EOF == -1.
13540
13541 2002-12-09 Paul Eggert <eggert@twinsun.com>
13542
13543 Change identifier spellings to avoid collisions with names
13544 that are reserved by POSIX.
13545
13546 Don't use names ending in _t, since POSIX reserves them.
13547 For consistency, remove _e and _s endings -- they're weren't
13548 needed to remove ambiguity. All uses changed.
13549 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13550 turn was just renamed from struniq_t.
13551 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13552 which in turn was just renamed from struniq_processor_t.
13553 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13554 in turn was renamed from hash_compare_struniq_t.
13555 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13556 (state_list): Renamed from state_list_t.
13557 * src/assoc.h (assoc): Renamed from assoc_t.
13558 * src/conflicts.c (enum conflict_resolution): Renamed from
13559 enum conflict_resolution_e.
13560 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13561 (rule_list): Renamed from rule_list_t.
13562 * src/getargs.h (enum trace): Renamed from enum trace_e.
13563 (enum report): Renamed from enum report_e.
13564 * src/gram.h (item_number): Renamed from item_number_t.
13565 (rule_number): Renamed from rule_number_t.
13566 (struct rule_s): Remove the "rule_s" part; not used.
13567 (rule): Renamed from rule_t.
13568 (rule_filter): Renamed from rule_filter_t.
13569 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13570 (goto_list): Renamed from goto_list_t.
13571 * src/lalr.h (goto_number): Renamed from goto_number_t.
13572 * src/location.h (location): Renamed from location_t.
13573 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13574 and moved here from:
13575 * src/muscle_tab.h (muscle_entry_t): here.
13576 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13577 (rule_list): Renamed from rule_list_t.
13578 * src/print_graph.c (static_graph): Renamed from graph.
13579 * src/reader.h (braced_code): Renamed from braced_code_t.
13580 Remove brace_code_e tag.
13581 * src/relation.h (relation_node): Renamed from relation_node_t.
13582 (relation_nodes): Renamed from relation_nodes_t.
13583 (relation): Renamed from relation_t.
13584 * src/state.h (state_number): Renamed from state_number_t.
13585 (struct state): Renamed from struct state_s.
13586 (state): Renamed from state_t.
13587 (transitions): Renamed from transitions_t. Unused (and
13588 misspelled) transtion_s tag removed.
13589 (errs): Renamed from errs_t. Unused errs_s tag removed.
13590 (reductions): Renamed from reductions_t. Unused tag
13591 reductions_s removed.
13592 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13593 (struct symbol_list): Renamed from struct symbol_list_s.
13594 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13595 (struct symbol): Renamed from struct symbol_s.
13596 (symbol): Renamed from symbol_t.
13597 * src/tables.c (vector_number): Renamed from vector_number_t.
13598 (action_number): Renamed from action_t.
13599 * src/tables.h (base_number): Renamed from base_t.
13600 * src/vcg.h (enum color): Renamed from enum color_e.
13601 (enum textmode): Renamed from enum textmode_e.
13602 (enum shape): Renamed from enum shape_e.
13603 (struct colorentry): Renamed from struct colorentry_s.
13604 (struct classname): Renamed from struct classname_s.
13605 (struct infoname): Renamed from struct infoname_s.
13606 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13607 (enum decision): Renamed from enum decision_e.
13608 (enum orientation): Renamed from enum orientation_e.
13609 (enum alignment): Renamed from enum alignment_e.
13610 (enum arrow_mode): Renamed from enum arrow_mode_e.
13611 (enum crossing_type): Renamed from enum crossing_type_e.
13612 (enum view): Renamed from enum view_e.
13613 (struct node): Renamed from struct node_s.
13614 (node): Renamed from node_t.
13615 (enum linestyle): Renamed from enum linestyle_e.
13616 (enum arrowstyle): Renamed from enum arrowstyle_e.
13617 (struct edge): Renamed from struct edge.
13618 (edge): Renamed from edge_t.
13619 (struct graph): Renamed from struct graph_s.
13620 (graph): Renamed from graph_t.
13621 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13622 Rename value_t -> value.
13623 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13624 value_t_as_yystype -> value_as_yystype.
13625
13626 Don't include <errno.h> in the mainstream code, since it
13627 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13628 * lib/get-errno.c, lib/get-errno.h: New files.
13629 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13630 get-errno.c.
13631 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13632 * src/output.c (output_skeleton): Likewise.
13633 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13634 instead of errno.
13635 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13636 Likewise.
13637 (handle_action_dollar, handle_action_at): Likewise.
13638 * src/system.h: Do not include <errno.h>.
13639 (TAB_EXT): Renamed from EXT_TAB.
13640 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13641
13642 Avoid str[a-z]*, since <string.h> reserves that name space.
13643 Change all instances of "struniq" in names to "uniqstr", and
13644 likewise for "STRUNIQ" and "UNIQSTR".
13645 * src/uniqstr.c: Renamed from src/struniq.c.
13646 * src/uniqstr.h: Renamed from src/struniq.h.
13647 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13648 * src/files.c (strsuffix): Remove; unused.
13649 (concat2): Renamed from stringappend. Now static.
13650 * src/files.h (strsuffix, stringappend): Remove; unused.
13651 * src/parse-gram.y (<chars>): Renamed from <string>.
13652 (<uniqstr>): Renamed from <struniq>.
13653 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13654 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13655 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13656 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13657 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13658 (N_EXPAND): Renamed from N_STRETCH.
13659
13660 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13661 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13662 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13663 Remove; unused.
13664 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13665 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13666 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13667 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13668 (BASE_MAXIMUM): Renamed from BASE_MAX.
13669 (BASE_MINIMUM): Renamed from BASE_MIN.
13670 (ACTION_MAX): Remove; unused.
13671 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13672 Unnecessary casts removed from above defines.
13673
13674
13675 Fix misspelling in names.
13676 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13677 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13678 G_NODE_ALIGNEMENT.
13679
13680
13681 * lib/timevar.c (timevar_report): Renamed from time_report,
13682 for consistency with other names.
13683 * lib/timevar.h (timevar_report): New decl.
13684 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13685
13686
13687 Sort include-file uses.
13688
13689 Reorder all include files under src to be in the order "system.h".
13690 then the ../lib include files in angle brackets (alphabetized),
13691 then the . include files in double-quotes (alphabetized). Fix
13692 dependency breakages encountered in this process, as follows:
13693 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13694 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13695 * src/state.h: Include "symtab.h".
13696
13697 2002-12-08 Paul Eggert <eggert@twinsun.com>
13698
13699 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13700 since this causes problems when __file__ contains character
13701 sequences like "@" that are treated specially by src/scan-skel.l.
13702 Instead, just use the file's basename. This fixes the bug
13703 reported by Martin Mokrejs in
13704 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13705
13706 2002-12-06 Paul Eggert <eggert@twinsun.com>
13707
13708 Add support for rules that do not have trailing semicolons, as
13709 POSIX requires. Improve the quality of locations in Bison
13710 diagnostics.
13711
13712 * src/location.c: Include <quotearg.h>.
13713 (empty_location): Now const.
13714 (location_print): New function. Follow the recommendation of the
13715 GNU Coding Standards for locations that span file boundaries.
13716 * src/location.h: Do not include <quotearg.h>; no longer needed.
13717 (boundary): New type.
13718 (location_t): Use it. This allows locations to span file boundaries.
13719 All member uses changed: file -> start.file or end.file (as needed),
13720 first_line -> start.line, first_column -> start.column,
13721 last_line -> end.line, last_column -> end.column.
13722 (equal_boundaries): New function.
13723 (LOCATION_RESET, LOCATION_STEP): Remove.
13724 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13725 (empty_location): Now const.
13726 (location_print): New decl.
13727 * src/parse-gram.y (lloc_default): New function, which handles
13728 empty locations more accurately.
13729 (YYLLOC_DEFAULT): Use it.
13730 (%token COLON): Remove.
13731 (%token ID_COLON): New token.
13732 (rules): Use it.
13733 (declarations, rules): Remove trailing semicolon.
13734 (declaration, rules_or_grammar_declaration):
13735 Allow empty (";") declaration.
13736 (symbol_def): Remove empty actions; no longer needed.
13737 (rules_or_grammar_declaration): Remove trailing semicolon.
13738 (semi_colon.opt): Remove.
13739 * src/reader.h: Include location.h.
13740 (scanner_cursor): New decl.
13741 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13742 rolling our own.
13743 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13744 of *loc.
13745 (STEP): Remove. No longer needed, now that adjust_location does
13746 the work. All uses removed.
13747 (scanner_cursor): New var.
13748 (adjust_location): Renamed from extend_location. It now sets
13749 *loc and adjusts the scanner cursor. All uses changed.
13750 Don't bother testing for CR.
13751 (handle_syncline): Remove location arg; now updates scanner cursor.
13752 All callers changed.
13753 (unexpected_end_of_file): Now accepts start boundary of token or
13754 comment, not location. All callers changed. Update scanner cursor,
13755 not the location.
13756 (SC_AFTER_IDENTIFIER): New state.
13757 (context_state): Renamed from c_context. All uses changed.
13758 (id_loc, code_start, token_start): New local vars.
13759 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13760 processing of Yacc white space and equivalents here.
13761 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13762 instead of returning ID immediately, since we need to search for
13763 a subsequent colon.
13764 (<INITIAL>"'", "\""): Save token_start.
13765 (<INITIAL>"%{", "{", "%%"): Save code_start.
13766 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13767 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13768 BEGIN context_state at end, not INITIAL.
13769 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13770 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13771 Return correct token start.
13772 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13773 the start of a character, string or multiline comment is found.
13774 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13775 Reduction): Adjust reported locations to match the more-precise
13776 results now expected.
13777 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13778 * tests/reduce.at (Useless Rules, Reduced Automaton,
13779 Underivable Rules): Likewise.
13780 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13781 or "|"' now that so many other tokens are allowed by the new grammar.
13782
13783 * src/complain.h (current_file): Remove duplicate decl;
13784 current_file is now owned by files.h.
13785 * src/complain.c, src/scan-gram.l: Include files.h.
13786
13787 2002-12-06 Paul Eggert <eggert@twinsun.com>
13788
13789 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13790 promotes to int; it might be unsigned int.
13791 * data/yacc.c (yy_reduce_print): Likewise.
13792
13793 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13794 be #defined in the prologue, not in the Bison declarations.
13795 This fixes Debian Bug 102878, reported by Shaul Karl.
13796
13797 2002-12-02 Paul Eggert <eggert@twinsun.com>
13798
13799 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13800 * lib/strtoul.c: New file, from gnulib.
13801 This fixes a porting bug reported by Peter Klein in
13802 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
13803
13804 2002-11-30 Paul Eggert <eggert@twinsun.com>
13805
13806 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13807 and put only a forward declaration in the prologue. This is for
13808 consistency with the other scanner helper functions.
13809
13810 Type clashes now generate warnings, not errors, since it
13811 appears that POSIX may allow some grammars with type clashes.
13812 * src/reader.c (grammar_current_rule_check): Warn about
13813 type clashes instead of complaining.
13814 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13815
13816 Add Yacc library, since POSIX requires it.
13817 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13818 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13819 * lib/main.c, lib/yyerror.c: New files.
13820
13821 gram_error can be static; it need not be extern.
13822 * src/reader.h (gram_error): Remove decl.
13823 * src/parse-gram.y (gram_error): Now static. Add static decl.
13824 (print_token_value): Omit parameter names from forward decl,
13825 for consistency.
13826
13827 2002-11-29 Paul Eggert <eggert@twinsun.com>
13828
13829 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13830 be declared before being used. E.g., one should typically
13831 declare them in the prologue. Use GNU coding style in examples.
13832 Put "const" consistently after the type it modifies. Mention
13833 that C99 supports "inline". Mention that yyerror traditionally
13834 returns "int".
13835
13836 %parse-param and %lex-param now take just one argument, the
13837 declaration; the argument name is deduced from the declaration.
13838
13839 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13840 Reporting, Table of Symbols): Document this.
13841 * src/parse-gram.y (add_param): New function.
13842 (COMMA): Remove.
13843 (declaration): Implement new rule for %parse-param and %lex-param.
13844 * src/scan-gram.l: "," now elicits a warning, rather than being
13845 a token; this is more compatible with byacc.
13846 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13847
13848 2002-11-27 Paul Eggert <eggert@twinsun.com>
13849
13850 Rename identifiers to avoid real and potential collisions.
13851
13852 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13853 to avoid collision with lex macro described by Bruce Lilly in
13854 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13855 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13856 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13857 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13858 All uses changed.
13859 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13860 The name "yycontrol" violates the name space rules, and this stuff
13861 wasn't being used anyway.
13862 (input): Remove action; this stuff wasn't being used.
13863 (gram_error): Rename local variable yylloc -> loc.
13864 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13865 (YY_DECL): Don't use "yy" at start of local variables.
13866 All uses changed, e.g., yylloc -> loc.
13867 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13868 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13869 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13870 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13871
13872 * src/parse-gram.y (gram_error): loc is now const *.
13873 * src/reader.h (gram_error): Likewise.
13874
13875 2002-11-24 Paul Eggert <eggert@twinsun.com>
13876
13877 Version 1.75c.
13878
13879 * tests/actions.at (Actions after errors): Use an output format
13880 more similar to that of the Printers and Destructors test.
13881 Test the position of the ';' token too.
13882 (Printers and Destructors): Likewise.
13883 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13884 unnecessarily alarming people when the test fails.
13885
13886 * data/yacc.c (yyerrlab1): Move this label down, so that the
13887 parser does not discard the lookahead token if the user code
13888 invokes YYERROR. This change is required for POSIX conformance.
13889
13890 * lib/error.c: Sync with gnulib.
13891
13892 2002-11-22 Paul Eggert <eggert@twinsun.com>
13893
13894 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13895 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13896 * lib/xmalloc.c: Likewise.
13897
13898 2002-11-20 Paul Eggert <eggert@twinsun.com>
13899
13900 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13901
13902 2002-11-20 Paul Eggert <eggert@twinsun.com>
13903
13904 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13905 should use `if (! x) abort ();' rather than `assert (x);', and
13906 anyway it's one less thing to worry about configuring.
13907
13908 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13909 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13910 and replace all instances of assert with abort.
13911 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13912 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13913
13914 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13915 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13916 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13917 hash_find_entry, hash_rehash, hash_insert): Likewise.
13918 * src/conflicts.c (resolve_sr_conflict): Likewise.
13919 * src/lalr.c (set_goto_map, map_goto): Likewise.
13920 * src/nullable.c (nullable_compute): Likewise.
13921 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13922 * src/reader.c (packgram, reader): Likewise.
13923 * src/state.c (state_new, state_free, state_transitions_set,
13924 state_reduction_find): Likewise.
13925 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13926 symbol_pack): Likewise.
13927 * src/tables.c (conflict_row, pack_vector): Likewise.
13928 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13929 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13930 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13931 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13932
13933 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13934 (ARGMATCH_CONSTRAINT): New macro.
13935 (ARGMATCH_ASSERT): Use it.
13936
13937 * src/system.h (verify): New macro.
13938 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13939 rather than assert.
13940 * src/tables.c (tables_generate): Likewise.
13941
13942 * src/struniq.c (struniq_assert): Now returns void, and aborts
13943 if the assertion is false.
13944 (struniq_assert_p): Remove.
13945 * src/struniq.h: Likewise.
13946
13947 2002-11-18 Paul Eggert <eggert@twinsun.com>
13948
13949 * data/glr.c (yygetLRActions): Replace `yyindex' with
13950 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13951 This fixes the regression with Sun ONE Studio 7 cc that I reported in
13952 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
13953
13954 2002-11-18 Akim Demaille <akim@epita.fr>
13955
13956 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13957 space.
13958 From Tim Van Holder.
13959
13960 2002-11-17 Paul Eggert <eggert@twinsun.com>
13961
13962 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13963 to "SyntaxError" for consistency with my 2002-11-15 change.
13964
13965 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13966 not define to {}, since this breaks the common use of `YYDPRINTF
13967 ((...));' if a single statement is desired (e.g. before `else').
13968 Work around GCC warnings by surrounding corresponding calls with
13969 {} if needed.
13970 (yyhasResolvedValue): Remove unused function.
13971 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13972 loop body.
13973 (yyreportSyntaxError): Renamed from yyreportParseError.
13974 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13975 All uses changed.
13976 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13977 extern when possible. Remove unused initializations.
13978
13979 2002-11-16 Akim Demaille <akim@epita.fr>
13980
13981 Augment the similarity between GLR and LALR traces.
13982
13983 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13984 (YY_REDUCE_PRINT): New.
13985 (yyparse): Use them.
13986 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13987 YYDPRINT here.
13988 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13989 state reached after the reduction/recovery, since...
13990 (yyparse, yyprocessOneStack): Report the state we are entering in.
13991
13992 2002-11-16 Akim Demaille <akim@epita.fr>
13993
13994 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13995 Add support for --trace=skeleton.
13996 * src/scan-skel.l: %option debug.
13997 Scan strings of non-@ or \n instead of character by character.
13998 (scan_skel): Handle trace_skeleton.
13999 (QPUTS): New.
14000 (@output_parser_name@, @output_header_name@): ``Restore'' their
14001 support (used to be M4 macros).
14002 * data/yacc.c: Quote larger chunks, a la glr.c.
14003 * data/lalr1.cc: Likewise.
14004 The header guards are no longer available, so use some other
14005 string than `YYLSP_NEEDED'.
14006
14007 2002-11-16 Akim Demaille <akim@epita.fr>
14008
14009 Make the ``Printers and Destructors'' test more verbose, taking
14010 `yacc.c''s behavior as (possibly wrong) reference.
14011
14012 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14013 instead of fprint on stdout.
14014 Set and report the last_line of the symbols.
14015 Consistently display values and locations.
14016
14017 2002-11-16 Paul Eggert <eggert@twinsun.com>
14018
14019 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14020
14021 2002-11-15 Paul Eggert <eggert@twinsun.com>
14022
14023 * tests/actions.at (Actions after errors): New test case.
14024
14025 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14026 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14027 tests/action.at, tests/calc.at, tests/conflicts.at,
14028 tests/cxx-type.at, tests/regression.at:
14029 "parse error" -> "syntax error" for POSIX compatibility.
14030 "parsing stack overflow..." -> "parser stack overflow" so
14031 that code matches Bison documentation.
14032
14033 2002-11-15 Akim Demaille <akim@epita.fr>
14034
14035 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14036 take two BRACED_CODE, not two string_content.
14037 Free the scanner's obstack when we are done.
14038 (code_content): New.
14039 * tests/calc.at: Adjust.
14040 * doc/bison.texinfo: Adjust.
14041 Also, make sure to include the `,' for these declarations.
14042
14043 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14044
14045 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14046 definition; avoids potential autoreconf problems.
14047
14048 2002-11-15 Akim Demaille <akim@epita.fr>
14049
14050 Always check the value returned by yyparse.
14051
14052 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14053 returned by yyparse.
14054 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14055 Adjust calls.
14056 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14057 returned by yyparse.
14058
14059 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14060
14061 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14062 on input.at test.
14063
14064 2002-11-14 Paul Eggert <eggert@twinsun.com>
14065
14066 * src/output.c (output_skeleton): Call xfopen instead of
14067 duplicating xfopen's body.
14068
14069 Fix bugs reported by Nelson H. F. Beebe in
14070 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14071
14072 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14073 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14074 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14075 file twice in the grammar, as an extra check.
14076
14077 * tests/input.at (Torturing the Scanner): Surround the
14078 backslash-newline tests with "#if 0", to make it less likely that
14079 we'll run into compiler bugs. Bring back solitary \ inside
14080 comment, but add a closing comment to work around HP C bug. Don't
14081 test backslash-newline in C character constant.
14082
14083 2002-11-14 Akim Demaille <akim@epita.fr>
14084
14085 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14086 status of the compiler.
14087 Calling `exit 1' is no longer needed.
14088 Reported by Nelson H. F. Beebe.
14089
14090 2002-11-14 Akim Demaille <akim@epita.fr>
14091
14092 * tests/atlocal.in (CPPFLAGS): We have config.h.
14093 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14094 New.
14095 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14096 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14097 * tests/regression.at, tests/torture.at: Use them for all the
14098 grammars that are to be compiled.
14099 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14100 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14101 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14102
14103 2002-11-14 Akim Demaille <akim@epita.fr>
14104
14105 * doc/bison.texinfo: Various formatting changes (alignments in
14106 samples, additional @group/@end group, GCS in samples.
14107 Use @deffn instead of simple @table to define the directives,
14108 macros, variables etc.
14109
14110 2002-11-13 Paul Eggert <eggert@twinsun.com>
14111
14112 Fix some bugs reported by Albert Chin-A-Young in
14113 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14114
14115 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14116 -o c"; the HP C compiler chatters during compilation.
14117 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14118 * tests/headers.at (export YYLTYPE): Likewise.
14119
14120 * tests/input.at (Torturing the Scanner): Remove lines containing
14121 solitary backslashes, as they tickle a bug in the HP C compiler.
14122
14123 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14124 comments, since they're not portable. Use GNU coding style.
14125
14126 2002-11-13 Akim Demaille <akim@epita.fr>
14127
14128 * data/yacc.c: Leave bigger chunks of quoted text.
14129 (YYDSYMPRINTF): New.
14130 Use it to report symbol activities.
14131 * data/glr.c (YYDSYMPRINTF): New.
14132 Use it.
14133
14134 2002-11-12 Paul Eggert <eggert@twinsun.com>
14135
14136 Version 1.75b.
14137
14138 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14139 (yyglrReduce): Return yyok, not 0.
14140 This should avoid the enumerated-type warnings reported
14141 by Nelson H. F. Beebe in
14142 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14143
14144 * lib/bbitset.h (BITSET_INLINE): Remove.
14145 * lib/bitset.h [! BITSET_INLINE]: Remove.
14146 (bitset_set, bitset_reset, bitset_test): Rename local vars
14147 to avoid shadowing warnings by GCC.
14148
14149 * data/glr.c (inline): Remove #define. It's the user's
14150 responsibility to #define it away, just like 'const'.
14151 This fixes one of the bugs reported by Nelson H. F. Beebe in
14152 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14153
14154 * Makefile.maint (po-check): Scan .l and .y files instead of the
14155 .c and the .h files that they generate. This fixes the bug
14156 reported by Tim Van Holder in:
14157 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14158 Look for N_ as well as for _. Try to avoid matching #define for
14159 N_ and _.
14160 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14161 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14162 * src/scan-gram.l: Revamp regular expressions so that " and '
14163 do not confuse xgettext.
14164
14165 * src/struniq.h (struniq_new): Do not declare the return type
14166 to be 'const'; this violates the C standard.
14167 * src/struniq.c (struniq_new): Likewise.
14168
14169 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14170
14171 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14172 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14173 linker.
14174
14175 2002-11-12 Akim Demaille <akim@epita.fr>
14176
14177 * Makefile.maint: Sync with Autoconf:
14178 (local_updates): New.
14179
14180 2002-11-12 Akim Demaille <akim@epita.fr>
14181
14182 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14183
14184 2002-11-12 Akim Demaille <akim@epita.fr>
14185
14186 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14187 locations.
14188
14189 2002-11-12 Akim Demaille <akim@epita.fr>
14190
14191 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14192 not yyvalue.
14193
14194 2002-11-12 Akim Demaille <akim@epita.fr>
14195
14196 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14197 Use it to test the GLR parser.
14198
14199 2002-11-12 Akim Demaille <akim@epita.fr>
14200
14201 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14202 defines it.
14203 * data/glr.c (yystos): New.
14204 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14205 (YYDSYMPRINT): New.
14206 (yyval): Don't define it, it is handled via M4.
14207 (yyrecoverParseError): Free verbosely the discarded symbols.
14208 * data/yacc.c (yysymprint): Remove, rather...
14209 (b4_yysymprint_generate): invoke.
14210 * data/c.m4 (b4_yysymprint_generate): New.
14211 Accept pointers as arguments, as opposed to the version from
14212 yacc.c.
14213 (b4_yydestruct_generate): Likewise.
14214 * tests/cations.at (Printers and Destructors): Use Bison directives
14215 instead of CPP macros.
14216 Don't rely on internal details.
14217
14218 2002-11-12 Akim Demaille <akim@epita.fr>
14219
14220 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14221 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14222 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14223 it against YYEMPTY and so forth), work on yytoken (i.e., set
14224 it to YYEMPTY etc.).
14225 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14226 (b4_symbol_actions): Remove.
14227 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14228 for 0, end-of-input.
14229
14230 2002-11-12 Akim Demaille <akim@epita.fr>
14231
14232 * doc/bison.texinfo (Destructor Decl): New.
14233
14234 2002-11-12 Akim Demaille <akim@epita.fr>
14235
14236 * src/tables.c (tables_generate): Use free for pointers that
14237 cannot be NULL, not XFREE.
14238 (pack_vector): Use assert, not fatal, for bound violations.
14239 * src/state.c (state_new): Likewise.
14240 * src/reader.c (reader): Likewise.
14241 * src/lalr.c (set_goto_map): Likewise.
14242 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14243 the file name.
14244
14245 2002-11-12 Akim Demaille <akim@epita.fr>
14246
14247 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14248 Restore.
14249 * src/scan-gram.l (last_string): Is global to the file, not to
14250 yylex.
14251 * src/parse-gram.y (input): Don't append the epilogue here,
14252 (epilogue.opt): do it here, and free the scanner's obstack.
14253 * src/reader.c (epilogue_set): Rename as...
14254 (epilogue_augment): this.
14255 * data/c.m4 (b4_epilogue): Defaults to empty.
14256
14257 2002-11-12 Akim Demaille <akim@epita.fr>
14258
14259 * src/getargs.c (long_options): Remove duplicates.
14260 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14261 Remove.
14262 * doc/bison.rnh: Remove.
14263 * doc/bison.texinfo (VMS Invocation): Remove.
14264
14265 2002-11-12 Akim Demaille <akim@epita.fr>
14266
14267 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14268 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14269
14270 Use struniq for symbols.
14271
14272 * src/symtab.h (symbol_t): The tag member is a struniq.
14273 (symbol_type_set): Adjust.
14274 * src/symtab.c (symbol_new): Takes a struniq.
14275 (symbol_free): Don't free the tag member.
14276 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14277 (hash_compare_symbol, hash_symbol): these.
14278 Use the fact that tags as struniqs.
14279 (symbol_get): Use struniq_new.
14280 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14281 Returns a strniq.
14282 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14283 and type members are struniqs.
14284 * src/reader.c (get_merge_function)
14285 (grammar_current_rule_merge_set): Adjust.
14286 (TYPE, current_type): Are struniq.
14287
14288 Use struniq for file names.
14289
14290 * src/files.h, src/files.c (infile): Split into...
14291 (grammar_file, current_file): these.
14292 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14293 * src/reduce.c (reduce_print): Likewise.
14294 * src/getargs.c (getargs): Likewise.
14295 * src/complain.h, src/complain.c: Likewise.
14296 * src/main.c (main): Call struniqs_new early enough to use it for
14297 file names.
14298 Don't free the input file name.
14299
14300 2002-11-12 Akim Demaille <akim@epita.fr>
14301
14302 * src/symtab.c (symbol_free): Remove dead deactivated code:
14303 type_name are properly removed.
14304 Don't use XFREE to free items that cannot be NULL.
14305 * src/struniq.h, src/struniq.c: New.
14306 * src/main.c (main): Initialize/free struniqs.
14307 * src/parse-gram.y (%union): Add astruniq member.
14308 (yyprint): Adjust.
14309 * src/scan-gram.l (<{tag}>): Return a struniq.
14310 Free the obstack bit that used to store it.
14311 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14312
14313 2002-11-11 Paul Eggert <eggert@twinsun.com>
14314
14315 Revamp to fix many (but not all) of the C- and M4-related quoting
14316 problems. Among other things, this fixes the Bison bug reported
14317 by Jan Hubicka when processing the Bash grammar; see:
14318 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14319
14320 Use new @ escapes consistently. Represent brackets with @{ and @}
14321 rather than @<:@ and @:>@, since this works a bit better with dumb
14322 editors like vi. Represent @ with @@, since @ is now consistently
14323 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14324 __ofile__, to avoid unexpected expansions. Similarly, use @output
14325 rather than #output.
14326
14327 * data/c.m4 (b4_copyright): Omit file name from comment, since
14328 the file name could contain "*/".
14329 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14330 be quoted. All uses changed.
14331
14332 * data/glr.c: Use new @ escapes consistently.
14333 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14334 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14335 Remove, since they couldn't handle arbitrary characters in file
14336 names.
14337 * data/lalr1.cc: Likewise.
14338 * data/yacc.c: Likewise.
14339
14340 * src/files.c (output_infix): Remove; all uses removed.
14341 * src/files.h: Likewise.
14342
14343 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14344 mishandled funny characters in file names, and anyway it isn't
14345 needed any more.
14346 * data/yacc.c: Likewise.
14347 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14348
14349 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14350 * data/yacc.c: Likewise.
14351
14352 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14353 strings now.
14354 (muscle_init): Quote filename as a C string.
14355 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14356 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14357 * src/output.c (escaped_file_name_output): New function.
14358 (prepare_symbols): Quote tokens for M4.
14359 (prepare): Don't insert output_infix, output_prefix,
14360 output_parser_name, output_header_name; this is now down by scan-skel.
14361 Insert skeleton as a C string.
14362
14363 * src/output.c (user_actions_output, symbol_destructors_output,
14364 symbol_printers_output): Quote filenames for C and M4.
14365 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14366
14367 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14368 escapes other than \\ and \'; this simplifies the code.
14369 (<SC_STRING>): Likewise, for \\ and \".
14370 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14371 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14372 Use new escapes @{ and @} for [ and ].
14373
14374 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14375 them with auto vars.
14376 Switch to new escape scheme, where @ is the escape character uniformly.
14377 Abort if a stray escape character is found. Avoid unbounded input
14378 buffer when parsing non-escaped text.
14379
14380 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14381 __oline__, #output, $@, and @{ do not have unintended meanings.
14382
14383 2002-11-09 Paul Eggert <eggert@twinsun.com>
14384
14385 Fix the test failure due to GCC warnings described in
14386 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14387 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14388 evaluate to 0 if it's impossible for NINF to be in the respective
14389 table.
14390 (yygetLRActions, yyrecoverParseError): Use them.
14391
14392 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14393 counted in the token inserted at end of file. Now takes
14394 location_t *, not location_t, so that the location can be
14395 adjusted. All uses changed.
14396
14397 * tests/regression.at (Invalid inputs): Adjust wording in
14398 diagnostic to match the new behavior.
14399
14400 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14401 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14402 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14403 abort ();'. This reduces the runtime of the "Many lookaheads"
14404 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14405 GCC 3.2.
14406
14407 2002-11-07 Paul Eggert <eggert@twinsun.com>
14408
14409 * src/parse-gram.y (CHARACTER): Remove unused token.
14410 All uses removed.
14411
14412 * src/scan-gram.l: Remove stack option. We no longer use the
14413 stack, since the stack was never deeper than 1; instead, use the
14414 new auto var c_context to record the stacked value.
14415
14416 Remove nounput option. At an unexpected end of file, we now unput
14417 the minimal input necessary to end cleanly; this simplifies the
14418 code.
14419
14420 Avoid unbounded token sizes where this is easy.
14421
14422 (unexpected_end_of_file): New function.
14423 Use it to systematize the error message on unexpected EOF.
14424 (last-string): Now auto, not static.
14425 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14426 (scanner_last_string_free): Remove; not used.
14427 (percent_percent_count): Move decl to just before use.
14428 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14429 not the (never otherwised-used) CHARACTER.
14430
14431 2002-11-07 Akim Demaille <akim@epita.fr>
14432
14433 Let yyerror always receive the msg as last argument, so that
14434 yyerror can be variadic.
14435
14436 * data/yacc.c (b4_yyerror_args): New.
14437 Use it when calling yyerror.
14438 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14439 Use it when calling yyerror.
14440 * doc/bison.texinfo (Error Reporting): Adjust.
14441 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14442 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14443
14444 2002-11-06 Akim Demaille <akim@epita.fr>
14445
14446 #line should have quoted strings.
14447 Ideally, this should be done by m4_quotearg.
14448
14449 * src/scan-skel.l: Include quotearg.h.
14450 Quote __ofile__.
14451 * src/output.c (symbol_printers_output)
14452 (symbol_destructors_output): Quote the file name.
14453
14454 2002-11-06 Akim Demaille <akim@epita.fr>
14455
14456 * tests/regression.at (Invalid inputs): Adjust to the recent
14457 messages.
14458
14459 2002-11-06 Akim Demaille <akim@epita.fr>
14460
14461 Restore --no-lines.
14462 Reported by Jim Kent.
14463
14464 * data/c.m4 (b4_syncline): New.
14465 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14466 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14467 * src/output.c (user_actions_output): Likewise.
14468 (prepare): Define 'b4_synclines_flag'.
14469 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14470
14471 2002-11-06 Akim Demaille <akim@epita.fr>
14472
14473 * src/main.c (main): Free `infile'.
14474 * src/scan-gram.l (handle_syncline): New.
14475 Recognize `#line'.
14476 * src/output.c (user_actions_output, symbol_destructors_output)
14477 (symbol_printers_output): Use the location's file name, not
14478 infile.
14479 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14480
14481 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14482
14483 * src/tables.c (matching_state): Don't allow states to match if
14484 either has GLR conflict entries.
14485
14486 2002-11-05 Paul Eggert <eggert@twinsun.com>
14487
14488 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14489 "integer out of range" rather than "invalid value".
14490 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14491 accordingly.
14492
14493 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14494 Also, remove one static variable in the scanner.
14495
14496 * src/scan-gram.l (braces_level): Now auto, not static.
14497 Initialize to zero if the compiler is being picky.
14498 (INITIAL): Clear braces_level instead of incrementing it.
14499 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14500 as POSIX 1003.1-2001 requires.
14501 * src/system.h (IF_LINT): New macro, taken from coreutils.
14502 * configure.ac: Define "lint" if --enable-gcc-warnings.
14503
14504 2002-11-05 Akim Demaille <akim@epita.fr>
14505
14506 * src/scan-gram.l: When it starts with `%', complain about the
14507 whole directive, not just that `invalid character: %'.
14508
14509 2002-11-04 Akim Demaille <akim@epita.fr>
14510
14511 * Makefile.maint: Update from Autoconf.
14512 (update, cvs-update, po-update, do-po-update): New.
14513
14514 2002-11-04 Akim Demaille <akim@epita.fr>
14515
14516 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14517 and yyerror.
14518 Have yyerror `use' its arguments.
14519 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14520 returns true when location & yacc & pure & parse-param.
14521 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14522
14523 2002-11-04 Akim Demaille <akim@epita.fr>
14524
14525 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14526 clashes.
14527 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14528 font-lock-mode.
14529 Use complain_at.
14530 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14531 slot 0.
14532
14533 2002-11-03 Paul Eggert <eggert@twinsun.com>
14534
14535 * src/reader.c (get_merge_function, grammar_current_rule_check):
14536 Use consistent diagnostics for reporting type name clashes.
14537 Quote the types with <>, for consistency with Yacc.
14538 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14539
14540 2002-11-03 Akim Demaille <akim@epita.fr>
14541
14542 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14543 New.
14544 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14545 (b4_parse_param): Remove.
14546 Use b4_identification.
14547 Propagate b4_pure_args where needed to pass them to yyerror.
14548 * data/glr.m4 (b4_parse_param): Remove.
14549 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14550 (b4_lpure_formals): New.
14551 Use b4_identification.
14552 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14553 b4_user_formals and b4_user_args.
14554 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14555 (yyreportAmbiguity): When using a pure parser, also need
14556 the location, and the parse-params.
14557 Adjust callers.
14558 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14559 When using a pure parser, also need the parse-params.
14560 Adjust callers.
14561 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14562 (%pure-parser + %parse-param) LALR and GLR parsers.
14563 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14564 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14565 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14566 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14567 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14568 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14569 * doc/bison.texinfo: Untabify the whole file.
14570 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14571 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14572 (Error Reporting): Adjust to these new directives.
14573 Document %error-verbose, deprecate YYERROR_VERBOSE.
14574
14575 2002-11-03 Akim Demaille <akim@epita.fr>
14576
14577 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14578 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14579 command line options.
14580 * tests/cxx-type.at: Formatting changes.
14581
14582 2002-11-03 Paul Eggert <eggert@twinsun.com>
14583
14584 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14585 to count columns correctly, and to check for invalid inputs.
14586
14587 Use mbsnwidth to count columns correctly. Account for tabs, too.
14588 Include mbswidth.h.
14589 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14590 (extend_location): New function.
14591 (YY_LINES): Remove.
14592
14593 Handle CRLF in C code rather than in Lex code.
14594 (YY_INPUT): New macro.
14595 (no_cr_read): New function.
14596
14597 Scan UCNs, even though we don't fully handle them yet.
14598 (convert_ucn_to_byte): New function.
14599
14600 Handle backslash-newline correctly in C code.
14601 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14602 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14603 all uses changed.
14604 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14605 Use {splice} wherever C allows backslash-newline.
14606 YY_STEP after space, newline, vertical-tab.
14607 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14608
14609 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14610
14611 ({int}, handle_action_dollar, handle_action_at): Check for integer
14612 overflow.
14613
14614 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14615
14616 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14617 as well as \000. Check for UCHAR_MAX, not 255.
14618 Allow \x with an arbitrary positive number of digits, as in C.
14619 Check for overflow here.
14620 Allow \? and UCNs, for compatibility with C.
14621
14622 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14623 with quote slot used by complain_at.
14624
14625 * tests/input.at: Add tests for backslash-newline, m4 quotes
14626 in symbols, long literals, and funny escapes in strings.
14627
14628 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14629 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14630 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14631 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14632 * m4/mbswidth.m4: New file, from GNU coreutils.
14633
14634 * doc/bison.texinfo (Grammar Outline): Document // comments.
14635 (Symbols): Document that trigraphs have no special meaning in Bison,
14636 nor is backslash-newline allowed.
14637 (Actions): Document that trigraphs have no special meaning.
14638
14639 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14640 no longer used.
14641
14642 2002-11-02 Paul Eggert <eggert@twinsun.com>
14643
14644 * src/reader.c: Don't include quote.h; not needed.
14645 (get_merge_function): Reword warning to be consistent with
14646 type clash diagnostic in grammar_current_rule_check.
14647
14648 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14649 bug in trigraph handling.
14650
14651 * src/output.c (prepare_symbols): When printing token names,
14652 escape "[" as "@<:@" and likewise for "]".
14653
14654 * src/system.h (errno): Remove declaration, as we are now
14655 assuming C89 or better, and C89 guarantees errno.
14656
14657 2002-10-30 Paul Eggert <eggert@twinsun.com>
14658
14659 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14660 Check for close failures.
14661 * src/files.h (xfclose): Return void, not int, since it always
14662 returned zero.
14663 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14664 indicates one.
14665 * src/output.c (output_skeleton): Use xfclose rather than fclose
14666 and ferror. xfclose now checks ferror.
14667
14668 * data/glr.c (YYLEFTMOST_STATE): Remove.
14669 (yyreportTree): Use a stack-based leftmost state. This avoids
14670 our continuing battles with bogus warnings about initializers.
14671
14672 2002-10-30 Akim Demaille <akim@epita.fr>
14673
14674 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14675 #if.
14676
14677 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14678
14679 * tests/glr-regr1.at: New test for reported regressions.
14680 * tests/testsuite.at: Add glr-regr1.at test.
14681 * tests/Makefile.am: Add glr-regr1.at test.
14682
14683 2002-10-24 Paul Eggert <eggert@twinsun.com>
14684
14685 Version 1.75a.
14686
14687 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14688 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14689 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14690 Don't assume strdup exists; POSIX says its an XSI extension.
14691 Check for buffer overflow on input.
14692
14693 2002-10-24 Akim Demaille <akim@epita.fr>
14694
14695 * src/output.c (output_skeleton): Don't disable M4sugar comments
14696 too soon: it results in comments being expanded.
14697 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14698 first output.
14699
14700 2002-10-24 Akim Demaille <akim@epita.fr>
14701
14702 * data/yacc.c (m4_int_type): New.
14703 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14704 char' as only yacc.c wants K&R portability.
14705 * data/glr.c (yysigned_char): Remove.
14706 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14707 Reported by Quoc Peyrot.
14708
14709 2002-10-23 Paul Eggert <eggert@twinsun.com>
14710
14711 * src/main.c (main): With --trace=time, report times even if a
14712 non-fatal error occurs. Formerly, the times were reported in some
14713 such cases but not in others.
14714 * src/reader.c (reader): Just return if a complaint has been issued,
14715 instead of exiting, so that 'main' can report times.
14716
14717 2002-10-22 Akim Demaille <akim@epita.fr>
14718
14719 * src/system.h: Include sys/types.
14720 Reported by Bert Deknuydt.
14721
14722 2002-10-23 Paul Eggert <eggert@twinsun.com>
14723
14724 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14725 Suggested by Art Haas.
14726
14727 2002-10-22 Paul Eggert <eggert@twinsun.com>
14728
14729 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14730 decl; not needed any more.
14731 * src/main.c (main): Use return to exit, undoing yesterday's change.
14732 The last OS that we could find where this wouldn't work is
14733 SunOS 3.5, and that's too old to worry about now.
14734
14735 * data/glr.c (struct yyltype): Define members even when not
14736 doing locations. This is more consistent with yacc.c, and it
14737 works around the following bug reports:
14738 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14739 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
14740
14741 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14742 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14743 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14744
14745 2002-10-22 Akim Demaille <akim@epita.fr>
14746
14747 * data/README: New.
14748
14749 2002-10-21 Paul Eggert <eggert@twinsun.com>
14750
14751 Be consistent about 'bool'; the old code used an enum in one
14752 module and an int in another, and this violates the C standard.
14753 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14754 * configure.ac (AC_HEADER_STDBOOL): Add.
14755 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14756 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14757 * src/symtab.c (hash_compare_symbol_t): Likewise.
14758 * src/system.h (bool, false, true): Use a definition consistent
14759 with ../lib/hash.c. All uses changed.
14760
14761 * src/complain.c (warning_issued): Renamed from warn_message_count,
14762 so that we needn't worry about integer overflow (!).
14763 Now of type bool. All uses changed.
14764 (complaint_issued): Renamed from complain_message_count; likewise.
14765
14766 * src/main.c (main): Use exit to exit with failure.
14767
14768 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14769 rather than 1 and 0.
14770 * src/main.c (main): Likewise.
14771 * src/getargs.c (getargs): Likewise.
14772 * src/reader.c (reader): Likewise.
14773
14774 * src/getarg.c (getargs): Remove duplicate code for
14775 "Try `bison --help'".
14776
14777 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14778 What was that "2" for?
14779
14780 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14781 * src/getargs.c (usage): Likewise.
14782
14783 * src/getargs.c (getargs): When there are too few operands, report
14784 the last one. When there are too many, report the first extra
14785 one. This is how diffutils does it.
14786
14787 2002-10-20 Paul Eggert <eggert@twinsun.com>
14788
14789 Remove K&R vestiges.
14790 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14791 * src/complain.c (VA_START): Remove. Assume prototypes.
14792 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14793 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14794 fatal): Assume prototypes.
14795 * src/complain.h: Assume prototypes.
14796 * src/system.h (PARAMS): Remove.
14797 Include <limits.h> unconditionally, since it's guaranteeed even
14798 for a freestanding C89 compiler.
14799 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14800 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
14801
14802 2002-10-20 Akim Demaille <akim@epita.fr>
14803
14804 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14805 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14806 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14807 (yyresolveStates, yyresolveAction, yyresolveStack)
14808 (yyprocessOneStack): Use them.
14809 (yy_reduce_print): New.
14810 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14811
14812 2002-10-20 Akim Demaille <akim@epita.fr>
14813
14814 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14815 arguments and output `void'.
14816 (b4_c_function): Rename as...
14817 (b4_c_function_def): this.
14818 (b4_c_function_decl, b4_c_ansi_function_def)
14819 (b4_c_ansi_function_decl): New.
14820 Change the interpretation of the arguments: before `int, foo', now
14821 `int foo, foo'.
14822 * data/yacc.c (yyparse): Prototype and define thanks to these.
14823 Adjust b4_c_function_def uses.
14824 * data/glr.c (yyparse): Likewise, but ANSI only.
14825
14826 2002-10-20 Akim Demaille <akim@epita.fr>
14827
14828 * src/output.c (prepare): Move the definition of `tokens_number',
14829 `nterms_number', `undef_token_number', `user_token_number_max'
14830 to...
14831 (prepare_tokens): Here.
14832 (prepare_tokens): Rename as...
14833 (prepare_symbols): this.
14834 (prepare): Move the definition of `rules_number' to...
14835 (prepare_rules): here.
14836 (prepare): Move the definition of `last', `final_state_number',
14837 `states_number' to...
14838 (prepare_states): here.
14839 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14840
14841 2002-10-20 Akim Demaille <akim@epita.fr>
14842
14843 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14844
14845 2002-10-20 Akim Demaille <akim@epita.fr>
14846
14847 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14848 * data/c.m4: here.
14849
14850 2002-10-20 Akim Demaille <akim@epita.fr>
14851
14852 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14853 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14854 `pair'.
14855 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14856 `name' to...
14857 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14858 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14859 These.
14860
14861 2002-10-19 Paul Eggert <eggert@twinsun.com>
14862
14863 Do not create a temporary file, as that involves security and
14864 cleanup headaches. Instead, use a pair of pipes.
14865 Derived from a suggestion by Florian Krohm.
14866 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14867 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14868 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14869 (BISON_PREREQ_SUBPIPE): Add.
14870 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14871 Add subpipe.h, subpipe.c.
14872 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14873 * po/POTFILES.in: Add lib/subpipe.c.
14874 * src/output.c: Include "subpipe.h".
14875 (m4_invoke): Remove decl.
14876 (scan_skel): New decl.
14877 (output_skeleton): Use pipe rather than temporary file for m4 input.
14878 Check that m4sugar.m4 is readable, to avoid deadlock.
14879 Check for pipe I/O error.
14880 * src/scan-skel.l (readpipe): Remove decl.
14881 (scan_skel): New function, to be used in place of m4_invoke.
14882 Read from stream rather than file.
14883
14884 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14885 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14886 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14887 this generates a more-accurate value anyway.
14888
14889 * lib/timevar.c (timervar_accumulate): Rename locals to
14890 avoid confusion with similarly-named more-global.
14891 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14892
14893 * src/output.c (prepare): Use xstrdup to convert char const *
14894 to char *, to avoid GCC warning.
14895
14896 2002-10-19 Akim Demaille <akim@epita.fr>
14897
14898 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14899 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14900 Use them to have `calc.y' ready for %pure-parser.
14901 * data/yacc.c (YYLEX): Pass a yylex return type to
14902 b4_c_function_call.
14903
14904 2002-10-19 Akim Demaille <akim@epita.fr>
14905
14906 Prototype support of %lex-param and %parse-param.
14907
14908 * src/parse-gram.y: Add the definition of the %lex-param and
14909 %parse-param tokens, plus their rules.
14910 Drop the `_' version of %glr-parser.
14911 Add the "," token.
14912 * src/scan-gram.l (INITIAL): Scan them.
14913 * src/muscle_tab.c: Comment changes.
14914 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14915 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14916 (muscle_entry_s): The `value' member is no longer const.
14917 Adjust all dependencies.
14918 * src/muscle_tab.c (muscle_init): Adjust: use
14919 MUSCLE_INSERT_STRING.
14920 Initialize the obstack earlier.
14921 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14922 (muscle_pair_list_grow): New.
14923 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14924 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14925 * tests/calc.at: Use %locations, not --locations.
14926 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14927
14928 2002-10-19 Akim Demaille <akim@epita.fr>
14929
14930 * src/getargs.c (usage): Take status as argument and exit
14931 accordingly.
14932 Report the traditional `Try ... --help' message when status != 0.
14933 (usage, version): Don't take a FILE * as arg, it is pointless.
14934 (getargs): When there is an incorrect number of arguments, make it
14935 an error, and report it GNUlically thanks to `usage ()'.
14936
14937 2002-10-18 Paul Eggert <eggert@twinsun.com>
14938
14939 * data/glr.c (yyreportParseError): Don't assume that sprintf
14940 yields the length of the printed string, as this is not true
14941 on SunOS 4.1.4. Reported by Peter Klein.
14942
14943 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14944 * tests/conflicts.at (%nonassoc and eof): Likewise.
14945 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14946
14947 2002-10-17 Akim Demaille <akim@epita.fr>
14948
14949 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14950 * src/getargs.c (trace_types, trace_args): Adjust.
14951 * src/reader.c (grammar_current_rule_prec_set)
14952 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14953 Standardize error messages.
14954 And s/@prec/%prec/!
14955 (reader): Use trace_flag to enable scanner/parser debugging,
14956 instead of an adhoc scheme.
14957 * src/scan-gram.l: Remove trailing debugging code.
14958
14959 2002-10-16 Paul Eggert <eggert@twinsun.com>
14960
14961 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14962 MUSCLE_TAB_H.
14963
14964 * NEWS: Officially drop support for building Bison with K&R C,
14965 since it didn't work anyway and it's not worth worrying about.
14966 * Makefile.maint (wget_files): Remove ansi2knr.c.
14967 (ansi2knr.c-url_prefix): Remove.
14968 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14969 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14970 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14971
14972 2002-10-15 Paul Eggert <eggert@twinsun.com>
14973
14974 Stop using the "enum_" trick for K&R-style function definitions;
14975 it confused me, and I was the author! Instead, assume that people
14976 who want to use K&R C compilers (when using these modules in GCC,
14977 perhaps?) will run ansi2knr.
14978
14979 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14980 All uses of "enum_" changed to "enum ".
14981 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14982 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14983
14984 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14985 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14986 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14987 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14988 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14989 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14990 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14991 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14992 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14993 Use function prototypes; this removes the need for declaring
14994 static functions simply to provide their prototypes.
14995 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14996 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14997 bitset_count_, bitset_create, bitset_dump, bitset_first,
14998 bitset_free, bitset_init, bitset_last, bitset_next,
14999 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15000 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15001 bitset_print, bitset_release_memory, bitset_toggle_,
15002 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15003 debug_bitset): Likewise.
15004 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15005 * lib/bitset_stats.c (bitset_log_histogram_print,
15006 bitset_percent_histogram_print, bitset_stats_and,
15007 bitset_stats_and_cmp, bitset_stats_and_or,
15008 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15009 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15010 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15011 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15012 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15013 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15014 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15015 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15016 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15017 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15018 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15019 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15020 bitset_stats_zero): Likewise.
15021 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15022 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15023 bitsetv_dump, debug_bitsetv): Likewise.
15024 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15025 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15026 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15027 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15028 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15029 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15030 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15031 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15032 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15033 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15034 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15035 Likewise.
15036 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15037 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15038 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15039 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15040 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15041 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15042 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15043 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15044 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15045 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15046 lbitset_xor_cmp, lbitset_zero): Likewise.
15047
15048 2002-10-14 Akim Demaille <akim@epita.fr>
15049
15050 Version 1.75.
15051
15052 2002-10-14 Akim Demaille <akim@epita.fr>
15053
15054 * tests/Makefile.am (maintainer-check-posix): New.
15055
15056 2002-10-14 Akim Demaille <akim@epita.fr>
15057
15058 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15059 member.
15060
15061 2002-10-14 Akim Demaille <akim@epita.fr>
15062
15063 * src/tables.c (table_ninf_remap): base -> tab.
15064 Reported by Matt Rosing.
15065
15066 2002-10-14 Paul Eggert <eggert@twinsun.com>
15067
15068 * tests/action.at, tests/calc.at, tests/conflicts.at,
15069 tests/cxx-type.at, tests/headers.at, tests/input.at,
15070 tests/regression.at, tests/synclines.at, tests/torture.at:
15071 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15072 so that the tests still work even if POSIXLY_CORRECT is set.
15073 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15074
15075 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15076 for portability to K&R hosts. Fix typo: signed char is guaranteed
15077 only to 127, not to 128.
15078 * data/glr.c (yysigned_char): New type.
15079 * data/yacc.c (yysigned_char): Likewise.
15080 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15081
15082 2002-10-13 Paul Eggert <eggert@twinsun.com>
15083
15084 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15085 true due to limited range of data type" warning from GCC.
15086
15087 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15088 by wrapping enum yytokentype's definition inside #ifndef
15089 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15090
15091 2002-10-13 Akim Demaille <akim@epita.fr>
15092
15093 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15094 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15095
15096 2002-10-13 Akim Demaille <akim@epita.fr>
15097
15098 * Makefile.maint: Update from Autoconf 2.54.
15099 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15100
15101 2002-10-13 Akim Demaille <akim@epita.fr>
15102
15103 * src/print.c (print_state): Separate the list of solved conflicts
15104 from the other items.
15105 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15106
15107 2002-10-13 Akim Demaille <akim@epita.fr>
15108
15109 Let nondeterministic skeletons be usable with deterministic
15110 tables.
15111
15112 With the patch, GAWK compiled by GCC without -O2 passes its test
15113 suite using a GLR parser driven by LALR tables. It fails with -O2
15114 because `struct stat' gives two different answers on my machine:
15115 88 (definition of an auto var) and later 96 (memset on this var).
15116 Hence the stack is badly corrumpted. The headers inclusion is to
15117 blame: if I move the awk.h inclusion before GLR's system header
15118 inclusion, the two struct stat have the same size.
15119
15120 * src/tables.c (pack_table): Always create conflict_table.
15121 (token_actions): Always create conflict_list.
15122 * data/glr.c (YYFLAG): Remove, unused.
15123
15124 2002-10-13 Akim Demaille <akim@epita.fr>
15125
15126 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15127 (O0FLAGS): New.
15128 (VALGRIND, GXX): New.
15129 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15130 * tests/bison.in: Run $PREBISON a pre-command.
15131 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15132 (maintainer-check-g++): New.
15133 * Makefile.am (maintainer-check): New.
15134
15135 2002-10-13 Akim Demaille <akim@epita.fr>
15136
15137 * data/glr.c: Formatting changes.
15138 Tweak some trace messages to match yacc.c's.
15139
15140 2002-10-13 Akim Demaille <akim@epita.fr>
15141
15142 GLR parsers sometimes raise parse errors instead of performing the
15143 default reduction.
15144 Reported by Charles-Henry de Boysson.
15145
15146 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15147 check the length of the traces when %glr.
15148 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15149 GLR's traces.
15150 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15151 Test GLR parsers.
15152 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15153 (yyltype): Remove the yy prefix from the member names.
15154 (yytable): Complete its comment.
15155 (yygetLRActions): Map error action number from YYTABLE from
15156 YYTABLE_NINF to 0.
15157 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15158 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15159 not satisfying as we could compare an YYACTION computed from
15160 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15161 only value for error actions.
15162 (yyreportParseError): In verbose parse error messages, don't issue
15163 `error' in the list of expected tokens.
15164 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15165 next action to perform to match glr.c's decoding.
15166 (yytable): Complete its comment.
15167
15168 2002-10-13 Paul Eggert <eggert@twinsun.com>
15169
15170 Fix problem reported by Henrik Grubbstroem in
15171 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15172 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15173 because the Bison parser reads the second action before reducing
15174 the first one.
15175 * src/scan-gram.l (rule_length): New static var.
15176 Use it to keep track of the rule length in the scanner, since
15177 we can't expect the parser to be in lock-step sync with the scanner.
15178 (handle_action_dollar, handle_action_at): Use this var.
15179 * tests/actions.at (Exotic Dollars): Test for the problem.
15180
15181 2002-10-12 Paul Eggert <eggert@twinsun.com>
15182
15183 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15184 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15185 Include <sys/time.h> when checking for clock_t and struct tms.
15186 Use same include order as source.
15187 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15188 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15189
15190 * lib/timevar.c: Update copyright date and clarify comments.
15191 (get_time) [IN_GCC]: Keep the GCC version for reference.
15192
15193 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15194 GCC version as of today, then merge Bison's changes.
15195 Change "GCC" to "Bison" in copyright notice. timevar.def's
15196 author is Akim, so change that too.
15197
15198 * src/reader.c (grammar_current_rule_check):
15199 Don't worry about the default action if $$ is untyped.
15200 Prevents bogus warnings reported by Jim Gifford in
15201 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15202
15203 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15204 * data/glr.c, data/lalr1.cc, data/yacc.c:
15205 Output token definitions before the first part of user declarations.
15206 Fixes compatibility problem reported by Jim Gifford for kbd in
15207 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15208
15209 2002-10-11 Paul Eggert <eggert@twinsun.com>
15210
15211 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15212 (yyparse): here. This undoes some of the 2002-07-25 change.
15213 Compatibility problem reported by Ralf S. Engelschall with
15214 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15215
15216 2002-10-11 Akim Demaille <akim@epita.fr>
15217
15218 * tests/regression.at Characters Escapes): New.
15219 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15220 characters.
15221 Reported by Jan Nieuwenhuizen.
15222
15223 2002-10-11 Akim Demaille <akim@epita.fr>
15224
15225 * po/id.po: New.
15226
15227 2002-10-10 Paul Eggert <eggert@twinsun.com>
15228
15229 Portability fixes for bitsets; this also avoids several GCC
15230 warnings.
15231
15232 * lib/abitset.c: Include <stddef.h>, for offsetof.
15233 * lib/lbitset.c: Likewise.
15234
15235 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15236 properly for vectors of objects. Do not assume that adding a
15237 header size to a multiple of a word size yields a value that is
15238 properly aligned for the whole union.
15239 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15240
15241 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15242 unique names for structures.
15243 * lib/ebitset.c (ebitset_bytes): Likewise.
15244 * lib/lbitset.c (lbitset_bytes): Likewise.
15245
15246 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15247 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15248 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15249 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15250 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15251 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15252 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15253 to improve the type-checking that GCC can do.
15254 * lib/bitset.c (bitset_op4_cmp): Likewise.
15255 * lib/bitset_stats.c (bitset_stats_count,
15256 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15257 bitset_stats_copy, bitset_stats_disjoint_p,
15258 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15259 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15260 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15261 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15262 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15263 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15264 bitset_stats_or_and_cmp): Likewise.
15265 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15266 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15267 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15268 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15269
15270 * lib/abitset.h: Include bitset.h, not bbitset.h.
15271 * lib/ebitset.h: Likewise.
15272 * lib/lbitset.h: Likewise.
15273
15274 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15275 All instances of parameters of type enum bitset_opts are now of
15276 type enum_bitset_opts, to conform to the C Standard, and similarly
15277 for enum_bitset_type.
15278 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15279 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15280
15281 Do not use "struct bitset_struct" to mean different things in
15282 different modules. Not only is this confusing, it violates
15283 the C Standard, which requires that structure types in different
15284 modules must be compatible if one is to be passed to the other.
15285 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15286 All instances of "struct bitset_struct *" replaced with "bitset".
15287 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15288 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15289 struct lbitset_struct, struct bitset_stats_struct): New types.
15290 All uses of struct bitset_struct changed to union bitset_union,
15291 etc.
15292 * lib/abitset.c (struct abitset_struct, abitset,
15293 struct bitset_struct): Remove.
15294 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15295 struct bitset_struct): Remove.
15296 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15297 bitset_struct): Remove.
15298 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15299 Likewise.
15300
15301 Do not call a function of type T using a call that assumes the
15302 function is of a different type U. Standard C requires that a
15303 function must be called with a type that is compatible with its
15304 definition.
15305 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15306 New decls.
15307 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15308 New functions.
15309 * lib/ebitset.c (PFV): Remove.
15310 * lib/lbitset.c (PFV): Likewise.
15311 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15312 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15313 decls.
15314 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15315 (ebitset_vtable): Use them.
15316 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15317 lbitset_xor): New functions.
15318 (lbitset_vtable): Use them.
15319
15320 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15321 Declare.
15322
15323 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15324 GCC warning.
15325 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15326 Use offsetof, for simplicity.
15327
15328 2002-10-06 Paul Eggert <eggert@twinsun.com>
15329
15330 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15331 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15332 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15333 which was inadvertently undone by the 2002-09-30 patch.
15334 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15335 the same width as int.
15336
15337 2002-10-04 Paul Eggert <eggert@twinsun.com>
15338
15339 Version 1.50.
15340
15341 * configure.ac (AC_INIT), NEWS: Increment version number.
15342
15343 * doc/bison.texinfo: Minor spelling, grammar, and white space
15344 fixes.
15345 (Symbols): Mention that any negative value returned from yylex
15346 signifies end-of-input. Warn about negative chars. Mention
15347 the portable Standard C character set.
15348
15349 The GNU coding standard says CFLAGS and YFLAGS are reserved
15350 for the installer to set.
15351 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15352 * src/Makefile.am (AM_CFLAGS): Likewise.
15353 (AM_YFLAGS): Renamed from YFLAGS.
15354
15355 Fix some MAX and MIN problems.
15356 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15357 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15358 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15359 * src/reader.c (reader): Use it.
15360
15361 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15362 POSIX 1003.1-2001 has removed fgrep.
15363
15364 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15365
15366 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15367 interpreted as signed.
15368 * lib/ebitset.c (ebitset_list): Fix bug.
15369
15370 2002-10-01 Paul Eggert <eggert@twinsun.com>
15371
15372 More fixes for 64-bit hosts and large bitsets.
15373
15374 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15375 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15376 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15377 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15378 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15379 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15380 bitset_count_): Likewise.
15381 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15382 bitset_first, bitset_last): Likewise.
15383 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15384 bitset_stats_list_reverse, bitset_stats_size,
15385 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15386 Likewise.
15387 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15388 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15389 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15390 bitsetv_reflexive_transitive_closure): Likewise.
15391 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15392 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15393 Likewise.
15394 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15395 Likewise.
15396
15397 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15398 Use size_t, not unsigned int, to count bytes.
15399 * lib/abitset.h (abitset_bytes): Likewise.
15400 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15401 Likewise.
15402 * lib/bitset.h (bitset_bytes): Likewise.
15403 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15404 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15405 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15406 * lib/ebitset.c (ebitset_bytes): Likewise.
15407 * lib/ebitset.h (ebitset_bytes): Likewise.
15408 * lib/lbitset.c (lbitset_bytes): Likewise.
15409 * lib/lbitset.h (lbitset_bytes): Likewise.
15410
15411 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15412 abitset_subset_p, abitset_disjoint_p, abitset_and,
15413 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15414 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15415 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15416 abitset_or_and, abitset_or_and_cmp):
15417 Use bitset_windex instead of unsigned int.
15418 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15419 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15420 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15421 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15422 Likewise.
15423 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15424
15425 * lib/bitset.c (bitset_print):
15426 Use proper printf formats for widths of integer types.
15427 * lib/bitset_stats.c (bitset_percent_histogram_print,
15428 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15429 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15430 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15431 * lib/lbitset.c (lbitset_bytes): Likewise.
15432
15433 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15434 BITSET_SIZE_MAX): New macros.
15435 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15436 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15437 to BITSET_WINDEX_MAX.
15438
15439 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15440 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15441 since we now return the bitset_bindex type (not int).
15442
15443 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15444 when computing sizes.
15445 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15446
15447 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15448 and avoid cast to unsigned.
15449
15450 2002-09-30 Akim Demaille <akim@epita.fr>
15451
15452 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15453 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15454 Updates from Michael Hayes.
15455
15456 2002-09-30 Art Haas <ahaas@neosoft.com>
15457
15458 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15459 invocations.
15460 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15461 defined.
15462
15463 2002-09-27 Akim Demaille <akim@epita.fr>
15464
15465 Version 1.49c.
15466
15467 2002-09-27 Akim Demaille <akim@epita.fr>
15468
15469 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15470 (Because of AC_LIBSOURCE).
15471
15472 2002-09-27 Akim Demaille <akim@epita.fr>
15473
15474 Playing with Autoscan.
15475
15476 * configure.ac: Remove the old LIBOBJ tweaks.
15477 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15478 * lib/strrchr.c: New.
15479 * lib/strtol.c: New, from the Coreutils 4.5.1.
15480
15481 2002-09-27 Akim Demaille <akim@epita.fr>
15482
15483 Playing with Autoscan.
15484
15485 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15486 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15487 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15488 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15489 Coreutils 4.5.1.
15490
15491 2002-09-24 Akim Demaille <akim@epita.fr>
15492
15493 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15494 (Frequently Asked Questions, Parser Stack Overflow): New.
15495
15496 2002-09-13 Akim Demaille <akim@epita.fr>
15497
15498 Playing with autoscan.
15499
15500 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15501 * src/files.c (skeleton_find): Remove, unused.
15502 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15503 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15504
15505 2002-09-13 Akim Demaille <akim@epita.fr>
15506
15507 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15508 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15509
15510 2002-09-13 Akim Demaille <akim@epita.fr>
15511
15512 * configure.ac: Require 2.54.
15513 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15514 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15515 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15516 Remove, provided by Autoconf macros.
15517
15518 2002-09-12 Akim Demaille <akim@epita.fr>
15519
15520 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15521
15522 2002-09-12 Akim Demaille <akim@epita.fr>
15523
15524 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15525 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15526 Reported by Martin Mokrejs.
15527
15528 2002-09-10 Akim Demaille <akim@epita.fr>
15529
15530 * src/parse-gram.y: Associate a human readable string to each
15531 token type.
15532 * tests/regression.at (Invalid inputs): Adjust.
15533
15534 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15535
15536 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15537 with an Autoconf-2.5x style configure.ac.
15538
15539 2002-09-06 Paul Eggert <eggert@twinsun.com>
15540
15541 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15542 exception applies only to yacc.c. This is a modification of a
15543 patch originally suggested by Akim Demaille.
15544
15545 2002-09-06 Akim Demaille <akim@epita.fr>
15546
15547 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15548 here to...
15549 * data/yacc.c: here.
15550
15551 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15552 LocationType.
15553 (b4_ltype): Default to yy::Location from location.hh.
15554
15555 2002-09-04 Jim Meyering <jim@meyering.net>
15556
15557 * data/yacc.c: Guard the declaration of yytoknum also with
15558 `#ifdef YYPRINT', so it is declared only when used.
15559
15560 2002-09-04 Akim Demaille <akim@epita.fr>
15561
15562 * configure.in: Rename as...
15563 * configure.ac: this.
15564 Bump to 1.49c.
15565
15566 2002-09-04 Akim Demaille <akim@epita.fr>
15567
15568 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15569 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15570 translate maintainer only messages.
15571
15572 2002-08-12 Paul Eggert <eggert@twinsun.com>
15573
15574 Version 1.49b.
15575
15576 * Makefile.am (SUBDIRS): Remove intl.
15577 (DISTCLEANFILES): Remove.
15578 * NEWS: Mention that GNU M4 is now required. Clarify what is
15579 meant by "larger grammars". Mention the pt_BR translation.
15580 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15581 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15582 Bump version from 0.11.2 to 0.11.5.
15583 (BISON_PREREQ_STAGE): Remove.
15584 (AM_GNU_GETTEXT): Use external gettext.
15585 (AC_OUTPUT): Remove intl/Makefile.
15586
15587 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15588
15589 * data/glr.c: Include string.h, for strlen.
15590 (yyreportParseError): Use size_t for yysize.
15591 (yy_yypstack): No longer nested inside yypstates, as nested
15592 functions are not portable. Do not assume size_t is the
15593 same width as int.
15594 (yypstates): Do not assume that ptrdiff_t is the same width
15595 as int, and similarly for yyposn and YYINDEX.
15596
15597 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15598
15599 * lib/Makefile.am (INCLUDES): Do not include from the intl
15600 directory, which has been removed.
15601 * src/Makefile.am (INCLUDES): Likewise.
15602
15603 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15604 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15605 New vars.
15606
15607 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15608 * tests/Makefile.am (EXTRA_DIST): Likewise.
15609
15610 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15611 Do not assume that bitset_windex is the same width as unsigned.
15612
15613 * lib/abitset.c (abitset_unused_clear): Do not assume that
15614 bitset_word is the same width as int.
15615 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15616 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15617 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15618 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15619 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15620
15621 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15622 portability to one's complement hosts!).
15623 * lib/ebitset.c (ebitset_op1): Likewise.
15624 * lib/lbitset.c (lbitset_op1): Likewise.
15625
15626 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15627 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15628 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15629 Sync with fileutils.
15630 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15631 lib/gettext.h: Sync with diffutils.
15632
15633 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15634 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15635
15636 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15637 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15638 check for void *.
15639
15640 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15641 size_t; the old version tried to do this but casted improperly.
15642 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15643 (bitset_test): Now returns int, not unsigned long.
15644
15645 * lib/bitset_stats.c: Include "gettext.h".
15646 (_): New macro.
15647 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15648 name locals "index", as it generates unnecessary warnings on some
15649 hosts that have an "index" function.
15650
15651 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15652 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15653 they need translation.
15654 * src/LR0.c (state_list_append, new_itemsets, get_state,
15655 append_states, generate_states): Likewise.
15656 * src/assoc.c (assoc_to_string): Likewise.
15657 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15658 * src/gram.c (grammar_dump): Likewise.
15659 * src/injections.c (injections_compute): Likewise.
15660 * src/lalr.c (lookaheads_print): Likewise.
15661 * src/relation.c (relation_transpose): Likewise.
15662 * src/scan-gram.l: Likewise.
15663 * src/tables.c (table_grow, pack_vector): Likewise.
15664
15665 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15666 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15667 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15668 * m4/mbstate_t.m4: Sync with fileutils.
15669 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15670
15671 * po/LINGUAS: Add pt_BR.
15672 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15673 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15674 lib/timevar.c.
15675 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15676 manual recommends.
15677 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15678
15679 * src/complain.c (strerror_r): Remove decl; not needed.
15680 (strerror): Use same pattern as ../lib/error.c.
15681
15682 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15683
15684 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15685
15686 * src/main.c (main): Cast result of bindtextdomain and textdomain
15687 to void, to avoid a GCC warning when --disable-nls is in effect.
15688
15689 * src/scan-gram.l: Use strings rather than escapes when possible,
15690 to minimize the number of warnings from xgettext.
15691 (handle_action_dollar, handle_action_at): Don't use isdigit,
15692 as it mishandles negative chars and it may not work as expected
15693 outside the C locale.
15694
15695 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15696 this is a GCC extension and is not portable to other compilers.
15697
15698 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15699 Do not include <ctype.h>; no longer needed.
15700 Do not include <malloc.h>; no longer needed (and generates
15701 warnings on OpenBSD 3.0).
15702
15703 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15704 it's not portable.
15705
15706 * tests/regression.at: Do not use 'cc -c input.c -o input';
15707 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15708
15709 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15710 exit status as failure, not just exit status 1. Sun C exits
15711 with status 2 sometimes.
15712
15713 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15714 Use it for the two large tests.
15715
15716 2002-08-02 Akim Demaille <akim@epita.fr>
15717
15718 * src/conflicts.c (conflicts_output): Don't output rules never
15719 reduced here, since anyway that computation doesn't work.
15720 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15721 (rule_useless_p, rule_never_reduced_p): New.
15722 (grammar_rules_partial_print): Use a filter instead of a range.
15723 Display the title only if needed.
15724 (grammar_rules_print): Adjust.
15725 (grammar_rules_never_reduced_report): New.
15726 * src/tables.c (action_row): Move the computation of rules never
15727 reduced to...
15728 (token_actions): here.
15729 * src/main.c (main): Make the parser before making the report, so
15730 that rules never reduced are computed.
15731 Call grammar_rules_never_reduced_report.
15732 * src/print.c (print_results): Report rules never reduced.
15733 * tests/conflicts.at, tests/reduce.at: Adjust.
15734
15735 2002-08-01 Akim Demaille <akim@epita.fr>
15736
15737 Instead of attaching lookaheads and duplicating the rules being
15738 reduced by a state, attach the lookaheads to the reductions.
15739
15740 * src/state.h (state_t): Remove the `lookaheads',
15741 `lookaheads_rule' member.
15742 (reductions_t): Add a `lookaheads' member.
15743 Use a regular array for the `rules'.
15744 * src/state.c (reductions_new): Initialize the lookaheads member
15745 to 0.
15746 (state_rule_lookaheads_print): Adjust.
15747 * src/state.h, src/state.c (state_reductions_find): New.
15748 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15749 (count_rr_conflicts): Adjust.
15750 * src/lalr.c (LArule): Remove.
15751 (add_lookback_edge): Adjust.
15752 (state_lookaheads_count): New.
15753 (states_lookaheads_initialize): Merge into...
15754 (initialize_LA): this.
15755 (lalr_free): Adjust.
15756 * src/main.c (main): Don't free nullable and derives too early: it
15757 is used by --verbose.
15758 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15759
15760 2002-08-01 Akim Demaille <akim@epita.fr>
15761
15762 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15763 `rule_number_t**'.
15764 (set_derives, free_derives): Rename as...
15765 (derives_compute, derives_free): this.
15766 Adjust all dependencies.
15767 * src/nullable.c (set_nullable, free_nullable): Rename as...
15768 (nullable_compute, nullable_free): these.
15769 (rule_list_t): Store rule_t *, not rule_number_t.
15770 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15771 pointers, instead of their numbers.
15772 * src/main.c (main): Call nullable_free, and derives_free earlier,
15773 as they were lo longer used.
15774
15775 2002-08-01 Akim Demaille <akim@epita.fr>
15776
15777 * lib/timevar.c (get_time): Include children time.
15778 * src/lalr.h (LA, LArule): Don't export them: used with the
15779 state_t.
15780 * src/lalr.c (LA, LArule): Static.
15781 * src/lalr.h, src/lalr.c (lalr_free): New.
15782 * src/main.c (main): Call it.
15783 * src/tables.c (pack_vector): Check whether loc is >= to the
15784 table_size, not >.
15785 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15786 (tables_generate): do it, since that's also it which allocates
15787 them.
15788 Don't free LA and LArule, main does.
15789
15790 2002-07-31 Akim Demaille <akim@epita.fr>
15791
15792 Separate parser tables computation and output.
15793
15794 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15795 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15796 (yydefgoto, yydefact, high): Move to...
15797 * src/tables.h, src/tables.c: here.
15798 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15799 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15800 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15801 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15802 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15803 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15804 (action_row, save_row, token_actions, save_column, default_goto)
15805 (goto_actions, sort_actions, matching_state, pack_vector)
15806 (table_ninf_remap, pack_table, prepare_actions): Move to...
15807 * src/tables.c: here.
15808 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15809 * src/output.c (token_actions, output_base, output_conflicts)
15810 (output_check): Merge into...
15811 (prepare_actions): this.
15812 (actions_output): Rename as...
15813 (user_actions_output): this.
15814 * src/main.c (main): Call tables_generate and tables_free.
15815
15816 2002-07-31 Akim Demaille <akim@epita.fr>
15817
15818 Steal GCC's --time-report support.
15819
15820 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15821 stolen/adjusted from GCC.
15822 * m4/stage.m4: Remove time related checks.
15823 * m4/timevar.m4: New.
15824 * configure.in: Adjust.
15825 * src/system.h: Adjust to using timevar.h.
15826 * src/getargs.h, src/getargs.c: Support trace_time for
15827 --trace=time.
15828 * src/main.c (stage): Remove.
15829 (main): Replace `stage' invocations with timevar calls.
15830 * src/output.c: Insert pertinent timevar calls.
15831
15832 2002-07-31 Akim Demaille <akim@epita.fr>
15833
15834 Let --trace have arguments.
15835
15836 * src/getargs.h (enum trace_e): New.
15837 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15838 (long_options, short_options): --trace/-T takes an optional
15839 argument.
15840 Change all the uses of trace_flag to reflect the new flags.
15841 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15842
15843 Strengthen `stage' portability.
15844
15845 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15846 * configure.in: Use it.
15847 Don't check for malloc.h and sys/times.h.
15848 * src/system.h: Include them when appropriate.
15849 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15850 times and struct tms are available.
15851
15852 2002-07-30 Akim Demaille <akim@epita.fr>
15853
15854 In verbose parse error message, don't report `error' as an
15855 expected token.
15856 * tests/actions.at (Printers and Destructors): Adjust.
15857 * tests/calc.at (Calculator $1): Adjust.
15858 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15859 error message, do not report the parser accepts the error token in
15860 that state.
15861
15862 2002-07-30 Akim Demaille <akim@epita.fr>
15863
15864 Normalize conflict related messages.
15865
15866 * src/complain.h, src/complain.c (warn, complain): New.
15867 * src/conflicts.c (conflicts_print): Use them.
15868 (conflict_report_yacc): New, extracted from...
15869 (conflicts_print): here.
15870 * tests/conflicts.at, tests/existing.at: Adjust.
15871
15872 2002-07-30 Akim Demaille <akim@epita.fr>
15873
15874 Report rules which are never reduced by the parser: those hidden
15875 by conflicts.
15876
15877 * src/LR0.c (save_reductions): Don't make the final state too
15878 different: save its reduction (accept) instead of having a state
15879 without any action (no shift or goto, no reduce).
15880 Note: the final state is now a ``regular'' state, i.e., the
15881 parsers now contain `reduce 0' as default reduction.
15882 Nevertheless, since they decide to `accept' when yystate =
15883 final_state, they still will not reduce rule 0.
15884 * src/print.c (print_actions, print_reduction): Adjust.
15885 * src/output.c (action_row): Track reduced rules.
15886 (token_actions): Report rules never reduced.
15887 * tests/conflicts.at, tests/regression.at: Adjust.
15888
15889 2002-07-30 Akim Demaille <akim@epita.fr>
15890
15891 `stage' was accidently included in a previous patch.
15892 Initiate its autoconfiscation.
15893
15894 * configure.in: Look for malloc.h and sys/times.h.
15895 * src/main.c (stage): Adjust.
15896 Report only when trace_flag.
15897
15898 2002-07-29 Akim Demaille <akim@epita.fr>
15899
15900 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15901 state_number_t.
15902 (errs_t): symbol_t*, not symbol_number_t.
15903 (reductions_t): rule_t*, not rule_number_t.
15904 (FOR_EACH_SHIFT): New.
15905 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15906 * src/print.c, src/print_graph.c: Adjust.
15907
15908 2002-07-29 Akim Demaille <akim@epita.fr>
15909
15910 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15911
15912 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15913 (endtoken, accept): these.
15914 * src/reader.c (reader): Set endtoken's default tag to "$end".
15915 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15916 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15917 Adjust.
15918
15919 2002-07-29 Akim Demaille <akim@epita.fr>
15920
15921 * src/reduce.c (reduce_grammar): When the language is empty,
15922 complain about the start symbol, not the axiom.
15923 Use its location.
15924 * tests/reduce.at (Empty Language): New.
15925
15926 2002-07-26 Akim Demaille <akim@epita.fr>
15927
15928 * src/reader.h, src/reader.c (gram_error): ... can't get
15929 yycontrol without making too strong assumptions on the parser
15930 itself.
15931 * src/output.c (prepare_tokens): Use the real 0th value of
15932 token_translations instead of `0'.
15933 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15934 visible here.
15935 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15936 for the time being: %locations ought to provide it to yyerror.
15937
15938 2002-07-25 Akim Demaille <akim@epita.fr>
15939
15940 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15941 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15942 * tests/regression.at (Web2c Actions): Adjust.
15943
15944 2002-07-25 Akim Demaille <akim@epita.fr>
15945
15946 Stop storing rules from 1 to nrules + 1.
15947
15948 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15949 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15950 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15951 Iterate from 0 to nrules.
15952 Use rule_number_as_item_number and item_number_as_rule_number.
15953 Adjust to `derive' now containing possibly 0.
15954 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15955 Handle the `- 1' part in rule numbers from/to item numbers.
15956 * src/conflicts.c (log_resolution): Fix the message which reversed
15957 shift and reduce.
15958 * src/output.c (action_row): Initialize default_rule to -1.
15959 (token_actions): Adjust.
15960 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15961 expected output.
15962 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15963
15964 2002-07-25 Akim Demaille <akim@epita.fr>
15965
15966 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15967 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15968 (b4_c_knr_arg_decl): New.
15969 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15970 yyreport_parse_error.
15971
15972 2002-07-25 Akim Demaille <akim@epita.fr>
15973
15974 * data/yacc.c (yyreport_parse_error): New, extracted from...
15975 (yyparse): here.
15976 (yydestruct, yysymprint): Move above yyparse.
15977 Be K&R compliant.
15978
15979 2002-07-25 Akim Demaille <akim@epita.fr>
15980
15981 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15982 replace...
15983 (b4_sint_type, b4_uint_type): these.
15984 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15985 * tests/regression.at (Web2c Actions): Adjust.
15986
15987 2002-07-25 Akim Demaille <akim@epita.fr>
15988
15989 * src/gram.h (TIEM_NUMBER_MAX): New.
15990 (item_number_of_rule_number, rule_number_of_item_number): Rename
15991 as...
15992 (rule_number_as_item_number, item_number_as_rule_number): these.
15993 Adjust dependencies.
15994 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15995 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15996 (symbol_number_to_vector_number): New.
15997 (order): Of vector_number_t* type.
15998 (base_t, BASE_MAX, BASE_MIN): New.
15999 (froms, tos, width, pos, check): Of base_t type.
16000 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16001 (actrow): Of action_number_t type.
16002 (conflrow): Of unsigned int type.
16003 (table_ninf, base_ninf): New.
16004 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16005 (muscle_insert_int_table, muscle_insert_base_table)
16006 (muscle_insert_rule_number_table): New.
16007 (prepare_tokens): Output `toknum' as int_table.
16008 (action_row): Returns a rule_number_t.
16009 Use ACTION_MIN, not SHRT_MIN.
16010 (token_actions): yydefact is rule_number_t*.
16011 (table_ninf_remap): New.
16012 (pack_table): Use it for `base' and `table'.
16013 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16014 replaced with...
16015 (YYPACT_NINF, YYTABLE_NINF): these.
16016 (yypact, yytable): Compute their types instead of hard-coded
16017 `short'.
16018 * tests/regression.at (Web2c Actions): Adjust.
16019
16020 2002-07-19 Akim Demaille <akim@epita.fr>
16021
16022 * src/scan-gram.l (id): Can start with an underscore.
16023
16024 2002-07-16 Akim Demaille <akim@epita.fr>
16025
16026 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16027 Adjust all former `associativity' dependencies.
16028 * src/symtab.c (symbol_new): Default associativity is `undef', not
16029 `right'.
16030 (symbol_check_alias_consistence): Adjust.
16031
16032 2002-07-09 Akim Demaille <akim@epita.fr>
16033
16034 * doc/bison.texinfo: Properly set the ``header'' part.
16035 Use @dircategory ``GNU programming tools'' as per Texinfo's
16036 documentation.
16037 Use @copying.
16038
16039 2002-07-09 Akim Demaille <akim@epita.fr>
16040
16041 * lib/quotearg.h: Protect against multiple inclusions.
16042 * src/location.h (location_t): Add a `file' member.
16043 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16044 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16045 `error_one_per_line' support.
16046
16047 2002-07-09 Akim Demaille <akim@epita.fr>
16048
16049 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16050 * src/reader.c (lineno): Remove.
16051 Adjust all dependencies.
16052 (get_merge_function): Take a location and use complain_at.
16053 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16054 * tests/regression.at (Invalid inputs, Mixing %token styles):
16055 Adjust.
16056
16057 2002-07-09 Akim Demaille <akim@epita.fr>
16058
16059 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16060 recovery rule, and forbid extensions when --yacc.
16061 (gram_error): Use complain_at.
16062 * src/reader.c (reader): Exit if there were parse errors.
16063
16064 2002-07-09 Akim Demaille <akim@epita.fr>
16065
16066 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16067 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16068 Reported by R Blake <blakers@mac.com>.
16069
16070 2002-07-09 Akim Demaille <akim@epita.fr>
16071
16072 * data/yacc.c: Output the copyright notive in the header.
16073
16074 2002-07-03 Akim Demaille <akim@epita.fr>
16075
16076 * src/output.c (froms, tos): Are state_number_t.
16077 (save_column): sp, sp1, and sp2 are state_number_t.
16078 (prepare): Rename `final' as `final_state_number', `nnts' as
16079 `nterms_number', `nrules' as `rules_number', `nstates' as
16080 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16081 unused.
16082 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16083 * data/lalr1.cc (nsym_): Remove, unused.
16084
16085 2002-07-03 Akim Demaille <akim@epita.fr>
16086
16087 * src/lalr.h, src/lalr.c (goto_number_t): New.
16088 * src/lalr.c (goto_list_t): New.
16089 Propagate them.
16090 * src/nullable.c (rule_list_t): New.
16091 Propagate.
16092 * src/types.h: Remove.
16093
16094 2002-07-03 Akim Demaille <akim@epita.fr>
16095
16096 * src/closure.c (print_fderives): Use rule_rhs_print.
16097 * src/derives.c (print_derives): Use rule_rhs_print.
16098 (rule_list_t): New, replaces `shorts'.
16099 (set_derives): Add comments.
16100 * tests/sets.at (Nullable, Firsts): Adjust.
16101
16102 2002-07-03 Akim Demaille <akim@epita.fr>
16103
16104 * src/output.c (prepare_actions): Free `tally' and `width'.
16105 (prepare_actions): Allocate and free `order'.
16106 * src/symtab.c (symbols_free): Free `symbols'.
16107 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16108 * src/output.c (m4_invoke): Move to...
16109 * src/scan-skel.l: here.
16110 (<<EOF>>): Close yyout, and free its name.
16111
16112 2002-07-03 Akim Demaille <akim@epita.fr>
16113
16114 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16115
16116 * src/LR0.c (new_state): Merge into...
16117 (state_list_append): this.
16118 (new_states): Merge into...
16119 (generate_states): here.
16120 (set_states): Don't ensure a proper `errs' state member here, do it...
16121 * src/conflicts.c (conflicts_solve): here.
16122 * src/state.h, src/state.c: Comment changes.
16123 (state_t): Rename member `shifts' as `transitions'.
16124 Adjust all dependencies.
16125 (errs_new): For consistency, also take the values as argument.
16126 (errs_dup): Remove.
16127 (state_errs_set): New.
16128 (state_reductions_set, state_transitions_set): Assert that no
16129 previous value was assigned.
16130 (state_free): New.
16131 (states_free): Use it.
16132 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16133 temporary storage: use `errs' and `nerrs' as elsewhere.
16134 (set_conflicts): Allocate and free this `errs'.
16135
16136 2002-07-02 Akim Demaille <akim@epita.fr>
16137
16138 * lib/libiberty.h: New.
16139 * lib: Update the bitset implementation from upstream.
16140 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16141 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16142 * src/main.c: Adjust bitset stats calls.
16143
16144 2002-07-01 Paul Eggert <eggert@twinsun.com>
16145
16146 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16147 char, so that negative chars don't collide with $.
16148
16149 2002-06-30 Akim Demaille <akim@epita.fr>
16150
16151 Have the GLR tests be `warning' checked, and fix the warnings.
16152
16153 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16154 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16155 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16156 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16157 (yyaddDeferredAction): static.
16158 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16159 (yyreportParseError): yyprefix is const.
16160 yytokenp is used only when verbose.
16161 (yy__GNUC__): Replace with __GNUC__.
16162 (yypdumpstack): yyi is size_t.
16163 (yypreference): Un-yy local variables and arguments, to avoid
16164 clashes with `yyr1'. Anyway, we are not in the user name space.
16165 (yytname_size): be an int, as is compared with ints.
16166 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16167 Use them.
16168 * tests/cxx-gram.at: Use quotation to protect $1.
16169 Use AT_COMPILE to enable warnings hunts.
16170 Prototype yylex and yyerror.
16171 `Use' argc.
16172 Include `string.h', not `strings.h'.
16173 Produce and prototype stmtMerge only when used.
16174 yylex takes a location.
16175
16176 2002-06-30 Akim Demaille <akim@epita.fr>
16177
16178 We spend a lot of time in quotearg, in particular when --verbose.
16179
16180 * src/symtab.c (symbol_get): Store a quoted version of the key.
16181 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16182 Adjust all callers.
16183
16184 2002-06-30 Akim Demaille <akim@epita.fr>
16185
16186 * src/state.h (reductions_t): Rename member `nreds' as num.
16187 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16188 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16189
16190 2002-06-30 Akim Demaille <akim@epita.fr>
16191
16192 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16193 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16194 (shifts_to): Rename as...
16195 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16196 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16197 (TRANSITION_IS_DISABLED, transitions_to): these.
16198
16199 2002-06-30 Akim Demaille <akim@epita.fr>
16200
16201 * src/print.c (print_shifts, print_gotos): Merge into...
16202 (print_transitions): this.
16203 (print_transitions, print_errs, print_reductions): Align the
16204 lookaheads columns.
16205 (print_core, print_transitions, print_errs, print_state,
16206 print_grammar): Output empty lines separator before, not after.
16207 (state_default_rule_compute): Rename as...
16208 (state_default_rule): this.
16209 * tests/conflicts.at (Defaulted Conflicted Reduction),
16210 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16211 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16212
16213 2002-06-30 Akim Demaille <akim@epita.fr>
16214
16215 Display items as we display rules.
16216
16217 * src/gram.h, src/gram.c (rule_lhs_print): New.
16218 * src/gram.c (grammar_rules_partial_print): Use it.
16219 * src/print.c (print_core): Likewise.
16220 * tests/conflicts.at (Defaulted Conflicted Reduction),
16221 (Unresolved SR Conflicts): Adjust.
16222 (Unresolved SR Conflicts): Adjust and rename as...
16223 (Resolved SR Conflicts): this, as was meant.
16224 * tests/regression.at (Web2c Report): Adjust.
16225
16226 2002-06-30 Akim Demaille <akim@epita.fr>
16227
16228 * src/print.c (state_default_rule_compute): New, extracted from...
16229 (print_reductions): here.
16230 Pessimize, but clarify the code.
16231 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16232
16233 2002-06-30 Akim Demaille <akim@epita.fr>
16234
16235 * src/output.c (action_row): Let default_rule be always a rule
16236 number.
16237
16238 2002-06-30 Akim Demaille <akim@epita.fr>
16239
16240 * src/closure.c (print_firsts, print_fderives, closure):
16241 Use BITSET_EXECUTE.
16242 * src/lalr.c (lookaheads_print): Likewise.
16243 * src/state.c (state_rule_lookaheads_print): Likewise.
16244 * src/print_graph.c (print_core): Likewise.
16245 * src/print.c (print_reductions): Likewise.
16246 * src/output.c (action_row): Likewise.
16247 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16248
16249 2002-06-30 Akim Demaille <akim@epita.fr>
16250
16251 * src/print_graph.c: Use report_flag.
16252
16253 2002-06-30 Akim Demaille <akim@epita.fr>
16254
16255 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16256 to...
16257 * src/relation.h, src/relation.c (traverse, relation_digraph)
16258 (relation_print, relation_transpose): New.
16259
16260 2002-06-30 Akim Demaille <akim@epita.fr>
16261
16262 * src/state.h, src/state.c (shifts_to): New.
16263 * src/lalr.c (build_relations): Use it.
16264
16265 2002-06-30 Akim Demaille <akim@epita.fr>
16266
16267 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16268 (item_number_of_rule_number, rule_number_of_item_number): New.
16269 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16270 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16271 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16272 Propagate their use.
16273 Much remains to be done, in particular wrt `shorts' from types.h.
16274
16275 2002-06-30 Akim Demaille <akim@epita.fr>
16276
16277 * src/symtab.c (symbol_new): Initialize the `printer' member.
16278
16279 2002-06-30 Akim Demaille <akim@epita.fr>
16280
16281 * src/LR0.c (save_reductions): Remove, replaced by...
16282 * src/state.h, src/state.c (state_reductions_set): New.
16283 (reductions, errs): Rename as...
16284 (reductions_t, errs_t): these.
16285 Adjust all dependencies.
16286
16287 2002-06-30 Akim Demaille <akim@epita.fr>
16288
16289 * src/LR0.c (state_list_t, state_list_append): New.
16290 (first_state, last_state): Now symbol_list_t.
16291 (this_state): Remove.
16292 (new_itemsets, append_states, save_reductions): Take a state_t as
16293 argument.
16294 (set_states, generate_states): Adjust.
16295 (save_shifts): Remove, replaced by...
16296 * src/state.h, src/state.c (state_shifts_set): New.
16297 (shifts): Rename as...
16298 (shifts_t): this.
16299 Adjust all dependencies.
16300 * src/state.h (state_t): Remove the `next' member.
16301
16302 2002-06-30 Akim Demaille <akim@epita.fr>
16303
16304 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16305 escaped in slot 0.
16306
16307 2002-06-30 Akim Demaille <akim@epita.fr>
16308
16309 Use hash.h for the state hash table.
16310
16311 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16312 (allocate_storage): Use state_hash_new.
16313 (free_storage): Use state_hash_free.
16314 (new_state, get_state): Adjust.
16315 * src/lalr.h, src/lalr.c (states): Move to...
16316 * src/states.h (state_t): Remove the `link' member, no longer
16317 used.
16318 * src/states.h, src/states.c: here.
16319 (state_hash_new, state_hash_free, state_hash_lookup)
16320 (state_hash_insert, states_free): New.
16321 * src/states.c (state_table, state_compare, state_hash): New.
16322 * src/output.c (output_actions): Do not free states now, since we
16323 still need to know the final_state number in `prepare', called
16324 afterwards. Do it...
16325 * src/main.c (main): here: call states_free after `output'.
16326
16327 2002-06-30 Akim Demaille <akim@epita.fr>
16328
16329 * src/state.h, src/state.c (state_new): New, extracted from...
16330 * src/LR0.c (new_state): here.
16331 * src/state.h (STATE_ALLOC): Move to...
16332 * src/state.c: here.
16333 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16334 * src/state.h, src/state.c: here.
16335
16336 2002-06-30 Akim Demaille <akim@epita.fr>
16337
16338 * src/reader.c (gensym): Rename as...
16339 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16340 (getsym): Rename as...
16341 (symbol_get): this.
16342
16343 2002-06-30 Akim Demaille <akim@epita.fr>
16344
16345 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16346 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16347 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16348 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16349
16350 2002-06-30 Akim Demaille <akim@epita.fr>
16351
16352 Make the test suite pass with warnings checked.
16353
16354 * tests/actions.at (Printers and Destructors): Improve.
16355 Avoid unsigned vs. signed issues.
16356 * tests/calc.at: Don't exercise the scanner here, do it...
16357 * tests/input.at (Torturing the Scanner): here.
16358
16359 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16360
16361 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16362 reorganize first lines parallel to yacc.c.
16363
16364 2002-06-28 Akim Demaille <akim@epita.fr>
16365
16366 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16367 (b4_token_enum, b4_token_defines): New, factored from...
16368 * data/lalr1.cc, data/yacc.c, glr.c: here.
16369
16370 2002-06-28 Akim Demaille <akim@epita.fr>
16371
16372 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16373 unused variables.
16374 * src/output.c (merger_output): static.
16375
16376 2002-06-28 Akim Demaille <akim@epita.fr>
16377
16378 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16379 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16380 pacify GCC.
16381 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16382
16383 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16384
16385 Accumulated changelog for new GLR parsing features.
16386
16387 * src/conflicts.c (count_total_conflicts): Change name to
16388 conflicts_total_count.
16389 * src/conflicts.h: Ditto.
16390 * src/output.c (token_actions): Use the new name.
16391 (output_conflicts): Change conflp => conflict_list_heads, and
16392 confl => conflict_list for better readability.
16393 * data/glr.c: Use the new names.
16394 * NEWS: Add self to GLR announcement.
16395
16396 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16397
16398 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16399 Akim Demaille.
16400
16401 * data/bison.glr: Change name to glr.c
16402 * data/glr.c: Renamed from bison.glr.
16403 * data/Makefile.am: Add glr.c
16404
16405 * src/getargs.c:
16406
16407 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16408 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16409
16410 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16411
16412 * data/bison.glr: Be sure to restore the
16413 current #line when returning to the skeleton contents after having
16414 exposed the input file's #line.
16415
16416 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16417
16418 * data/bison.glr: Bring up to date with changes to bison.simple.
16419
16420 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16421
16422 * data/bison.glr: Correct definitions that use b4_prefix.
16423 Various reformatting.
16424 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16425 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16426 yytokenp argument; now part of stack.
16427 (yychar): Define to behave as documented.
16428 (yyclearin): Ditto.
16429
16430 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16431
16432 * src/reader.h: Add declaration for free_merger_functions.
16433
16434 * src/reader.c (merge_functions): New variable.
16435 (get_merge_function): New function.
16436 (free_merger_functions): New function.
16437 (readgram): Check for %prec that is not followed by a symbol.
16438 Handle %dprec and %merge declarations.
16439 (packgram): Initialize dprec and merger fields in rules array.
16440
16441 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16442 conflict_list_cnt, conflict_list_free): New variables.
16443 (table_grow): Also grow conflict_table.
16444 (prepare_rules): Output dprec and merger tables.
16445 (conflict_row): New function.
16446 (action_row): Output conflict lists for GLR parser. Don't use
16447 default reduction in conflicted states for GLR parser so that there
16448 are spaces for the conflict lists.
16449 (save_row): Also save conflict information.
16450 (token_actions): Allocate conflict list.
16451 (merger_output): New function.
16452 (pack_vector): Pack conflict table, too.
16453 (output_conflicts): New function to output yyconflp and yyconfl.
16454 (output_check): Allocate conflict_tos.
16455 (output_actions): Output conflict tables, also.
16456 (output_skeleton): Output b4_mergers definition.
16457 (prepare): Output b4_max_rhs_length definition.
16458 Use 'bison.glr' as default skeleton for GLR parsers.
16459
16460 * src/gram.c (glr_parser): New flag.
16461 (grammar_free): Call free_merger_functions.
16462
16463 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16464 all pairs of conflicting reductions, rather than just all tokens
16465 causing conflicts. Needed to size conflict tables.
16466 (conflicts_output): Modify call to count_rr_conflicts for new
16467 interface.
16468 (conflicts_print): Ditto.
16469 (count_total_conflicts): New function.
16470
16471 * src/reader.h (merger_list): New type.
16472 (merge_functions): New variable.
16473
16474 * src/lex.h (tok_dprec, tok_merge): New token types.
16475
16476 * src/gram.h (rule_s): Add dprec and merger fields.
16477 (glr_parser): New flag.
16478
16479 * src/conflicts.h (count_total_conflicts): New function.
16480
16481 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16482
16483 * doc/bison.texinfo (Generalized LR Parsing): New section.
16484 (GLR Parsers): New section.
16485 (Language and Grammar): Mention GLR parsing.
16486 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16487 Correct typo ("tge" -> "the").
16488
16489 * data/bison.glr: New skeleton for GLR parsing.
16490
16491 * tests/cxx-gram.at: New tests for GLR parsing.
16492
16493 * tests/testsuite.at: Include cxx-gram.at.
16494
16495 * tests/Makefile.am: Add cxx-gram.at.
16496
16497 * src/parse-gram.y:
16498
16499 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16500
16501 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16502
16503 2002-06-27 Akim Demaille <akim@epita.fr>
16504
16505 * src/options.h, src/options.c: Remove.
16506 * src/getargs.c (short_options, long_options): New.
16507
16508 2002-06-27 Akim Demaille <akim@epita.fr>
16509
16510 * data/bison.simple, data/bison.c++: Rename as...
16511 * data/yacc.c, data/lalr1.cc: these.
16512 * doc/bison.texinfo (Environment Variables): Remove.
16513
16514 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16515
16516 * src/getargs.c (report_argmatch): Initialize strtok().
16517
16518 2002-06-20 Akim Demaille <akim@epita.fr>
16519
16520 * data/bison.simple (b4_symbol_actions): New, replaces...
16521 (b4_symbol_destructor, b4_symbol_printer): these.
16522 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16523 user token numbers.
16524
16525 2002-06-20 Akim Demaille <akim@epita.fr>
16526
16527 * data/bison.simple (yydestructor): Rename as...
16528 (yydestruct): this.
16529
16530 2002-06-20 Akim Demaille <akim@epita.fr>
16531
16532 * src/symtab.h, src/symtab.c (symbol_type_set)
16533 (symbol_destructor_set, symbol_precedence_set): The location is
16534 the last argument.
16535 Adjust all callers.
16536
16537 2002-06-20 Akim Demaille <akim@epita.fr>
16538
16539 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16540 internals.
16541 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16542 Takes a location.
16543 * src/symtab.h, src/symtab.c (symbol_class_set)
16544 (symbol_user_token_number_set): Likewise.
16545 Adjust all callers.
16546 Promote complain_at.
16547 * tests/input.at (Type Clashes): Adjust.
16548
16549 2002-06-20 Akim Demaille <akim@epita.fr>
16550
16551 * data/bison.simple (YYLEX): Fix the declaration when
16552 %pure-parser.
16553
16554 2002-06-20 Akim Demaille <akim@epita.fr>
16555
16556 * data/bison.simple (yysymprint): Don't print the token number,
16557 just its name.
16558 * tests/actions.at (Destructors): Rename as...
16559 (Printers and Destructors): this.
16560 Also exercise %printer.
16561
16562 2002-06-20 Akim Demaille <akim@epita.fr>
16563
16564 * data/bison.simple (YYDSYMPRINT): New.
16565 Use it to remove many of the #if YYDEBUG/if (yydebug).
16566
16567 2002-06-20 Akim Demaille <akim@epita.fr>
16568
16569 * src/symtab.h, src/symtab.c (symbol_t): printer and
16570 printer_location are new members.
16571 (symbol_printer_set): New.
16572 * src/parse-gram.y (PERCENT_PRINTER): New token.
16573 Handle its associated rule.
16574 * src/scan-gram.l: Adjust.
16575 (handle_destructor_at, handle_destructor_dollar): Rename as...
16576 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16577 * src/output.c (symbol_printers_output): New.
16578 (output_skeleton): Call it.
16579 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16580 since there are already many grammar files with a user `yyprint'.
16581 Replace the calls to YYPRINT to calls to yysymprint.
16582 * tests/calc.at: Adjust.
16583 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16584 taking advantage of parser very internal details (stack size!).
16585
16586 2002-06-20 Akim Demaille <akim@epita.fr>
16587
16588 * src/scan-gram.l: Complete the scanner with the missing patterns
16589 to pacify Flex.
16590 Use `quote' and `symbol_tag_get' where appropriate.
16591
16592 2002-06-19 Akim Demaille <akim@epita.fr>
16593
16594 * tests/actions.at (Destructors): Augment to test locations.
16595 * data/bison.simple (yydestructor): Pass it the current location
16596 if locations are enabled.
16597 Prototype only when __STDC__ or C++.
16598 Change the argument names to move into the yy name space: there is
16599 user code here.
16600
16601 2002-06-19 Akim Demaille <akim@epita.fr>
16602
16603 * data/bison.simple (b4_pure_if): New.
16604 Use it instead of #ifdef YYPURE.
16605
16606 2002-06-19 Akim Demaille <akim@epita.fr>
16607
16608 * data/bison.simple (b4_location_if): New.
16609 Use it instead of #ifdef YYLSP_NEEDED.
16610
16611 2002-06-19 Akim Demaille <akim@epita.fr>
16612
16613 Prepare @$ in %destructor, but currently don't bind it in the
16614 skeleton, as %location use is not cleaned up yet.
16615
16616 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16617 (handle_action_at): New.
16618 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16619 a braced_code_t and a location as additional arguments.
16620 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16621 unquote one when outputting `b4_dollar_dollar'.
16622 Adjust callers.
16623 * data/bison.simple (b4_eval): Remove.
16624 (b4_symbol_destructor): Adjust.
16625 * tests/input.at (Invalid @n): Adjust.
16626
16627 2002-06-19 Zack Weinberg <zack@codesourcery.com>
16628
16629 * doc/bison.texinfo: Document ability to have multiple
16630 prologue sections.
16631
16632 2002-06-18 Akim Demaille <akim@epita.fr>
16633
16634 * src/files.c (compute_base_names): When computing the output file
16635 names from the input file name, strip the directory part.
16636
16637 2002-06-18 Akim Demaille <akim@epita.fr>
16638
16639 * data/bison.simple.new: Comment changes.
16640 Reported by Andreas Schwab.
16641
16642 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16643
16644 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16645 there are no `label `yyoverflowlab' defined but not used' warnings
16646 when yyoverflow is defined.
16647
16648 2002-06-18 Akim Demaille <akim@epita.fr>
16649
16650 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16651 new member.
16652 (symbol_destructor_set): Adjust.
16653 * src/output.c (symbol_destructors_output): Output the destructor
16654 locations.
16655 Output the symbol name.
16656 * data/bison.simple (b4_symbol_destructor): Adjust.
16657
16658 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16659 and Akim Demaille <akim@epita.fr>
16660
16661 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16662 what's left on the stack when the error recovery hits EOF.
16663 * tests/actions.at (Destructors): Complete to exercise this case.
16664
16665 2002-06-17 Akim Demaille <akim@epita.fr>
16666
16667 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16668 arguments is really empty, not only equal to `[]'.
16669 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16670 member.
16671 (symbol_destructor_set): New.
16672 * src/output.c (symbol_destructors_output): New.
16673 * src/reader.h (brace_code_t, current_braced_code): New.
16674 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16675 (handle_dollar): Rename as...
16676 (handle_action_dollar): this.
16677 (handle_destructor_dollar): New.
16678 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16679 (grammar_declaration): Use it.
16680 * data/bison.simple (yystos): Is always defined.
16681 (yydestructor): New.
16682 * tests/actions.at (Destructors): New.
16683 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16684
16685 2002-06-17 Akim Demaille <akim@epita.fr>
16686
16687 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16688 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16689 rule_length only when needed.
16690 * src/output.c (actions_output, token_definitions_output): Output
16691 the full M4 block.
16692 * src/symtab.c: Don't access directly to the symbol tag, use
16693 symbol_tag_get.
16694 * src/parse-gram.y: Use symbol_list_free.
16695
16696 2002-06-17 Akim Demaille <akim@epita.fr>
16697
16698 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16699 (symbol_list_prepend, get_type_name): Move to...
16700 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16701 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16702 Adjust all callers.
16703 (symbol_list_free): New.
16704 * src/scan-gram.l (handle_dollar): Takes a location.
16705 * tests/input.at (Invalid $n): Adjust.
16706
16707 2002-06-17 Akim Demaille <akim@epita.fr>
16708
16709 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16710 (symbol_list_prepend): New.
16711 * src/parse-gram.y (%union): `list' is a new member.
16712 (symbols.1): New, replaces...
16713 (terms_to_prec.1, nterms_to_type.1): these.
16714 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16715 Take a location as additional argument.
16716 Adjust all callers.
16717
16718 2002-06-15 Akim Demaille <akim@epita.fr>
16719
16720 * src/parse-gram.y: Move %token in the declaration section so that
16721 we don't depend upon CVS Bison.
16722
16723 2002-06-15 Akim Demaille <akim@epita.fr>
16724
16725 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16726 * src/print.c (print_core): Use it.
16727
16728 2002-06-15 Akim Demaille <akim@epita.fr>
16729
16730 * src/conflicts.c (log_resolution): Accept the rule involved in
16731 the sr conflicts instead of the lookahead number that points to
16732 that rule.
16733 (flush_reduce): Accept the current lookahead vector as argument,
16734 instead of the index in LA.
16735 (resolve_sr_conflict): Accept the current number of lookahead
16736 bitset to consider for the STATE, instead of the index in LA.
16737 (set_conflicts): Adjust.
16738 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16739
16740 2002-06-15 Akim Demaille <akim@epita.fr>
16741
16742 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16743 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16744 Adjust all dependencies.
16745 * src/lalr.c (initialize_lookaheads): Split into...
16746 (states_lookaheads_count, states_lookaheads_initialize): these.
16747 (lalr): Adjust.
16748
16749 2002-06-15 Akim Demaille <akim@epita.fr>
16750
16751 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16752 out of...
16753 (grammar_rules_print): here.
16754 * src/reduce.c (reduce_output): Use it.
16755 * tests/reduce.at (Useless Rules, Reduced Automaton)
16756 (Underivable Rules): Adjust.
16757
16758 2002-06-15 Akim Demaille <akim@epita.fr>
16759
16760 Copy BYacc's nice way to report the grammar.
16761
16762 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16763 New.
16764 Don't print the rules' location, it is confusing and useless.
16765 (rule_print): Use grammar_rhs_print.
16766 * src/print.c (print_grammar): Use grammar_rules_print.
16767
16768 2002-06-15 Akim Demaille <akim@epita.fr>
16769
16770 Complete and rationalize `useless thing' warnings.
16771
16772 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16773 (symbol_tag_print): New.
16774 Use them everywhere in place of accessing directly the tag member.
16775 * src/gram.h, src/gram.c (rule_print): New.
16776 Use it where a rule used to be printed `by hand'.
16777 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16778 (reduce_grammar_tables): Report the useless rules.
16779 (reduce_print): Useless things are a warning, not an error.
16780 Report it as such.
16781 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16782 (Reduced Automaton, Underivable Rules): Adjust.
16783 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16784 * tests/conflicts.at (Unresolved SR Conflicts)
16785 (Solved SR Conflicts): Adjust.
16786
16787 2002-06-15 Akim Demaille <akim@epita.fr>
16788
16789 Let symbols have a location.
16790
16791 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16792 (getsym): Adjust.
16793 Adjust all callers.
16794 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16795 Use location_t, not int.
16796 * src/symtab.c (symbol_check_defined): Take advantage of the
16797 location.
16798 * tests/regression.at (Invalid inputs): Adjust.
16799
16800 2002-06-15 Akim Demaille <akim@epita.fr>
16801
16802 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16803 (input): Don't try to initialize yylloc here, do it in the
16804 scanner.
16805 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16806 * src/gram.h (rule_t): Change line and action_line into location
16807 and action_location, of location_t type.
16808 Adjust all dependencies.
16809 * src/location.h, src/location.c (empty_location): New.
16810 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16811 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16812 (grammar_current_rule_symbol_append)
16813 (grammar_current_rule_action_append): Expect a location as argument.
16814 * src/reader.c (grammar_midrule_action): Adjust to attach an
16815 action's location as dummy symbol location.
16816 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16817 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16818 the line numbers.
16819
16820 2002-06-14 Akim Demaille <akim@epita.fr>
16821
16822 Grammar declarations may be found in the grammar section.
16823
16824 * src/parse-gram.y (rules_or_grammar_declaration): New.
16825 (declarations): Each declaration may end with a semicolon, not
16826 just...
16827 (grammar_declaration): `"%union"'.
16828 (grammar): Branch to rules_or_grammar_declaration.
16829
16830 2002-06-14 Akim Demaille <akim@epita.fr>
16831
16832 * src/main.c (main): Invoke scanner_free.
16833
16834 2002-06-14 Akim Demaille <akim@epita.fr>
16835
16836 * src/output.c (m4_invoke): Extracted from...
16837 (output_skeleton): here.
16838 Free tempfile.
16839
16840 2002-06-14 Akim Demaille <akim@epita.fr>
16841
16842 * src/parse-gram.y (directives, directive, gram)
16843 (grammar_directives, precedence_directives, precedence_directive):
16844 Rename as...
16845 (declarations, declaration, grammar, grammar_declaration)
16846 (precedence_declaration, precedence_declarator): these.
16847 (symbol_declaration): New.
16848
16849 2002-06-14 Akim Demaille <akim@epita.fr>
16850
16851 * src/files.c (action_obstack): Remove, unused.
16852 (output_obstack): Remove it, and all its dependencies, as it is no
16853 longer needed.
16854 * src/reader.c (epilogue_set): Build the epilogue in the
16855 muscle_obstack.
16856 * src/output.h, src/output.c (muscle_obstack): Move to...
16857 * src/muscle_tab.h, src/muscle_tab.h: here.
16858 (muscle_init): Initialize muscle_obstack.
16859 (muscle_free): New.
16860 * src/main.c (main): Call it.
16861
16862 2002-06-14 Akim Demaille <akim@epita.fr>
16863
16864 * src/location.h: New, extracted from...
16865 * src/reader.h: here.
16866 * src/Makefile.am (noinst_HEADERS): Merge into
16867 (bison_SOURCES): this.
16868 Add location.h.
16869 * src/parse-gram.y: Use location_t instead of Bison's.
16870 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16871 Use location_t instead of ints.
16872
16873 2002-06-14 Akim Demaille <akim@epita.fr>
16874
16875 * data/bison.simple, data/bison.c++: Be sure to restore the
16876 current #line when returning to the skeleton contents after having
16877 exposed the input file's #line.
16878
16879 2002-06-12 Akim Demaille <akim@epita.fr>
16880
16881 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16882 eager.
16883 * tests/actions.at (Exotic Dollars): New.
16884
16885 2002-06-12 Akim Demaille <akim@epita.fr>
16886
16887 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16888 ['"/] too eagerly.
16889 * tests/input.at (Torturing the Scanner): New.
16890
16891 2002-06-11 Akim Demaille <akim@epita.fr>
16892
16893 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16894 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16895 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16896 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16897 * src/reader.c (reader): Use it.
16898
16899 2002-06-11 Akim Demaille <akim@epita.fr>
16900
16901 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16902 Adjust all callers.
16903 (scanner_last_string_free): New.
16904
16905 2002-06-11 Akim Demaille <akim@epita.fr>
16906
16907 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16908 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16909 (last_string, YY_OBS_FREE): New.
16910 Use them when returning an ID.
16911
16912 2002-06-11 Akim Demaille <akim@epita.fr>
16913
16914 Have Bison grammars parsed by a Bison grammar.
16915
16916 * src/reader.c, src/reader.h (prologue_augment): New.
16917 * src/reader.c (copy_definition): Remove.
16918
16919 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16920 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16921 (grammar_current_rule_prec_set, grammar_current_rule_check)
16922 (grammar_current_rule_symbol_append)
16923 (grammar_current_rule_action_append): Export.
16924 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16925 (symbol_list_action_append): Remove.
16926 Hook the routines from reader.
16927 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16928 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16929
16930 * src/reader.c (read_declarations): Remove, unused.
16931
16932 * src/parse-gram.y: Handle the epilogue.
16933 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16934 (grammar_start_symbol_set): this.
16935 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16936 * src/reader.c (readgram): Remove, unused.
16937 (reader): Adjust to insert eoftoken and axiom where appropriate.
16938
16939 * src/reader.c (copy_dollar): Replace with...
16940 * src/scan-gram.h (handle_dollar): this.
16941 * src/parse-gram.y: Remove `%thong'.
16942
16943 * src/reader.c (copy_at): Replace with...
16944 * src/scan-gram.h (handle_at): this.
16945
16946 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16947 New.
16948
16949 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16950 time being.
16951
16952 * src/reader.h, src/reader.c (grammar_rule_end): New.
16953
16954 * src/parse.y (current_type, current_class): New.
16955 Implement `%nterm', `%token' support.
16956 Merge `%term' into `%token'.
16957 (string_as_id): New.
16958 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16959 type name.
16960
16961 * src/parse-gram.y: Be sure to handle properly the beginning of
16962 rules.
16963
16964 * src/parse-gram.y: Handle %type.
16965 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16966
16967 * src/parse-gram.y: More directives support.
16968 * src/options.c: No longer handle source directives.
16969
16970 * src/parse-gram.y: Fix %output.
16971
16972 * src/parse-gram.y: Handle %union.
16973 Use the prologue locations.
16974 * src/reader.c (parse_union_decl): Remove.
16975
16976 * src/reader.h, src/reader.c (epilogue_set): New.
16977 * src/parse-gram.y: Use it.
16978
16979 * data/bison.simple, data/bison.c++: b4_stype is now either not
16980 defined, then default to int, or to the contents of %union,
16981 without `union' itself.
16982 Adjust.
16983 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16984
16985 * src/output.c (actions_output): Don't output braces, as they are
16986 already handled by the scanner.
16987
16988 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16989 characters to themselves.
16990
16991 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16992 that the epilogue has a proper #line.
16993
16994 * src/parse-gram.y: Handle precedence/associativity.
16995
16996 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16997 a terminal.
16998 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16999 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17000 at all to define terminals that cannot be emitted.
17001
17002 * src/scan-gram.l: Escape M4 characters.
17003
17004 * src/scan-gram.l: Working properly with escapes in user
17005 strings/characters.
17006
17007 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17008 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17009 grammar.
17010 Use more modest sizes, as for the time being the parser does not
17011 release memory, and therefore the process swallows a huge amount
17012 of memory.
17013
17014 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17015 stricter %token grammar.
17016
17017 * src/symtab.h (associativity): Add `undef_assoc'.
17018 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17019 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17020
17021 * tests/regression.at (Invalid %directive): Remove, as it is now
17022 meaningless.
17023 (Invalid inputs): Adjust to the new error messages.
17024 (Token definitions): The new grammar doesn't allow too many
17025 eccentricities.
17026
17027 * src/lex.h, src/lex.c: Remove.
17028 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17029 (copy_character, copy_string2, copy_string, copy_identifier)
17030 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17031 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17032 (parse_action): Remove.
17033 * po/POTFILES.in: Adjust.
17034
17035 2002-06-11 Akim Demaille <akim@epita.fr>
17036
17037 * src/reader.c (parse_action): Don't store directly into the
17038 rule's action member: return the action as a string.
17039 Don't require `rule_length' as an argument: compute it.
17040 (grammar_current_rule_symbol_append)
17041 (grammar_current_rule_action_append): New, eved out from
17042 (readgram): here.
17043 Remove `action_flag', `rulelength', unused now.
17044
17045 2002-06-11 Akim Demaille <akim@epita.fr>
17046
17047 * src/reader.c (grammar_current_rule_prec_set).
17048 (grammar_current_rule_check): New, eved out from...
17049 (readgram): here.
17050 Remove `xaction', `first_rhs': useless.
17051 * tests/input.at (Type clashes): New.
17052 * tests/existing.at (GNU Cim Grammar): Adjust.
17053
17054 2002-06-11 Akim Demaille <akim@epita.fr>
17055
17056 * src/reader.c (grammar_midrule_action): New, Eved out from
17057 (readgram): here.
17058
17059 2002-06-11 Akim Demaille <akim@epita.fr>
17060
17061 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17062 New.
17063 (readgram): Use them as replacement of inlined code, crule and
17064 crule1.
17065
17066 2002-06-11 Akim Demaille <akim@epita.fr>
17067
17068 * src/reader.c (grammar_end, grammar_symbol_append): New.
17069 (readgram): Use them.
17070 Make the use of `p' as local as possible.
17071
17072 2002-06-10 Akim Demaille <akim@epita.fr>
17073
17074 GCJ's parser requires the tokens to be defined before the prologue.
17075
17076 * data/bison.simple: Output the token definition before the user's
17077 prologue.
17078 * tests/regression.at (Braces parsing, Duplicate string)
17079 (Mixing %token styles): Check the output from bison.
17080 (Early token definitions): New.
17081
17082 2002-06-10 Akim Demaille <akim@epita.fr>
17083
17084 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17085 assigning twice the same user number to a token, so that we can
17086 use it in...
17087 * src/lex.c (lex): here.
17088 Also use `symbol_class_set' instead of hand written code.
17089 * src/reader.c (parse_assoc_decl): Likewise.
17090
17091 2002-06-10 Akim Demaille <akim@epita.fr>
17092
17093 * src/symtab.c, src/symtab.c (symbol_class_set)
17094 (symbol_user_token_number_set): New.
17095 * src/reader.c (parse_token_decl): Use them.
17096 Use a switch instead of ifs.
17097 Use a single argument.
17098
17099 2002-06-10 Akim Demaille <akim@epita.fr>
17100
17101 Remove `%thong' support as it is undocumented, unused, duplicates
17102 `%token's job, and creates useless e-mail traffic with people who
17103 want to know what it is, why it is undocumented, unused, and
17104 duplicates `%token's job.
17105
17106 * src/reader.c (parse_thong_decl): Remove.
17107 * src/options.c (option_table): Remove "thong".
17108 * src/lex.h (tok_thong): Remove.
17109
17110 2002-06-10 Akim Demaille <akim@epita.fr>
17111
17112 * src/symtab.c, src/symtab.c (symbol_type_set)
17113 (symbol_precedence_set): New.
17114 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17115 (value_components_used): Remove, unused.
17116
17117 2002-06-09 Akim Demaille <akim@epita.fr>
17118
17119 Move symbols handling code out of the reader.
17120
17121 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17122 (axiom): Move to...
17123 * src/symtab.h, src/symtab.c: here.
17124
17125 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17126 * src/reader.c (startval): Rename as...
17127 * src/symtab.h, src/symtab.c (startsymbol): this.
17128 * src/reader.c: Adjust.
17129
17130 * src/reader.c (symbol_check_defined, symbol_make_alias)
17131 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17132 (token_translations_init)
17133 Move to...
17134 * src/symtab.c: here.
17135 * src/reader.c (packsymbols): Move to...
17136 * src/symtab.h, src/symtab.c (symbols_pack): here.
17137 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17138 argument.
17139
17140 2002-06-03 Akim Demaille <akim@epita.fr>
17141
17142 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17143 then statements.
17144
17145 2002-06-03 Akim Demaille <akim@epita.fr>
17146
17147 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17148 structs with non literals.
17149 * src/scan-skel.l: never-interactive.
17150 * src/conflicts.c (enum conflict_resolution_e): No trailing
17151 comma.
17152 * src/getargs.c (usage): Split long literal strings.
17153 Reported by Hans Aberg.
17154
17155 2002-05-28 Akim Demaille <akim@epita.fr>
17156
17157 * data/bison.c++: Use C++ ostreams.
17158 (cdebug_): New member.
17159
17160 2002-05-28 Akim Demaille <akim@epita.fr>
17161
17162 * src/output.c (output_skeleton): Be sure to allocate enough room
17163 for `/' _and_ for `\0' in full_skeleton.
17164
17165 2002-05-28 Akim Demaille <akim@epita.fr>
17166
17167 * data/bison.c++: Catch up with bison.simple:
17168 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17169 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17170 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17171 and popping traces.
17172
17173 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17174
17175 * src/output.c (output_skeleton): Put an explicit path in front of
17176 the skeleton file name, rather than relying on the -I directory,
17177 to partially alleviate effects of having a skeleton file lying around
17178 in the current directory.
17179
17180 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17181
17182 * src/conflicts.c (log_resolution): Correct typo:
17183 obstack_printf should be obstack_fgrow1.
17184
17185 2002-05-26 Akim Demaille <akim@epita.fr>
17186
17187 * src/state.h (state_t): `solved_conflicts' is a new member.
17188 * src/LR0.c (new_state): Set it to 0.
17189 * src/conflicts.h, src/conflicts.c (print_conflicts)
17190 (free_conflicts, solve_conflicts): Rename as...
17191 (conflicts_print, conflicts_free, conflicts_solve): these.
17192 Adjust callers.
17193 * src/conflicts.c (enum conflict_resolution_e)
17194 (solved_conflicts_obstack): New, used by...
17195 (log_resolution): this.
17196 Adjust to attach the conflict resolution to each state.
17197 Complete the description with the precedence/associativity
17198 information.
17199 (resolve_sr_conflict): Adjust.
17200 * src/print.c (print_state): Output its solved_conflicts.
17201 * tests/conflicts.at (Unresolved SR Conflicts)
17202 (Solved SR Conflicts): Exercise --report=all.
17203
17204 2002-05-26 Akim Demaille <akim@epita.fr>
17205
17206 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17207 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17208 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17209 (token_number_t, item_number_as_token_number)
17210 (token_number_as_item_number, muscle_insert_token_number_table):
17211 Rename as...
17212 (symbol_number_t, item_number_as_symbol_number)
17213 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17214 these, since it is more appropriate.
17215
17216 2002-05-26 Akim Demaille <akim@epita.fr>
17217
17218 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17219 `Error:' lines.
17220 * data/bison.simple (yystos) [YYDEBUG]: New.
17221 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17222 error recovery.
17223 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17224
17225 2002-05-25 Akim Demaille <akim@epita.fr>
17226
17227 * doc/bison.texinfo (Debugging): Split into...
17228 (Tracing): this new section, its former contents, and...
17229 (Understanding): this new section.
17230 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17231 by...
17232 (report_flag): this.
17233 Adjust all dependencies.
17234 (report_args, report_types, report_argmatch): New.
17235 (usage, getargs): Report/support -r, --report.
17236 * src/options.h
17237 (struct option_table_struct): Rename as..,
17238 (struct option_table_s): this.
17239 Rename the `set_flag' member to `flag' to match with getopt_long's
17240 struct.
17241 * src/options.c (option_table): Split verbose into an entry for
17242 %verbose, and another for --verbose.
17243 Support --report/-r, so remove -r from the obsolete --raw.
17244 * src/print.c: Attach full item sets and lookaheads reports to
17245 report_flag instead of trace_flag.
17246 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17247
17248 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17249 and Paul Eggert <eggert@twinsun.com>
17250
17251 * data/bison.simple (yyparse): Correct error handling to conform to
17252 POSIX and yacc. Specifically, after syntax error is discovered,
17253 do not reduce further before shifting the error token.
17254 Clean up the code a bit by removing the labels yyerrdefault,
17255 yyerrhandle, yyerrpop.
17256 * NEWS: Document the above.
17257
17258 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17259
17260 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17261 type; it isn't always big enough, since it doesn't necessarily
17262 include non-terminals.
17263 (yytranslate): Expand definition of yy_token_number_type, so that
17264 the latter can be removed.
17265 (yy_token_number_type): Remove, only one use.
17266 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17267 don't use TokenNumberType as element type.
17268
17269 * tests/regression.at: Modify expected output to agree with change
17270 to yyr1 and yytranslate.
17271
17272 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17273
17274 * src/reader.c (parse_action): Use copy_character instead of
17275 obstack_1grow.
17276
17277 2002-05-13 Akim Demaille <akim@epita.fr>
17278
17279 * tests/regression.at (Token definitions): Prototype yylex and
17280 yyerror.
17281
17282 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17283
17284 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17285 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17286 32-bit arithmetic.
17287 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17288
17289 2002-05-07 Akim Demaille <akim@epita.fr>
17290
17291 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17292 avoid GCC warnings.
17293
17294 2002-05-07 Akim Demaille <akim@epita.fr>
17295
17296 Kill GCC warnings.
17297
17298 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17299 over the RHS of each rule.
17300 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17301 * src/state.h (state_t): Member `nitems' is unsigned short.
17302 * src/LR0.c (get_state): Adjust.
17303 * src/reader.c (packgram): Likewise.
17304 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17305 `Type'.
17306 (muscle_insert_int_table): Remove, unused.
17307 (prepare_rules): Remove `max'.
17308
17309 2002-05-06 Akim Demaille <akim@epita.fr>
17310
17311 * src/closure.c (print_firsts): Display of the symbol tags.
17312 (bitmatrix_print): Move to...
17313 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17314 here.
17315 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17316
17317 2002-05-06 Akim Demaille <akim@epita.fr>
17318
17319 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17320 hash_do_for_each.
17321
17322 2002-05-06 Akim Demaille <akim@epita.fr>
17323
17324 * src/LR0.c (new_state, get_state): Instead of using the global
17325 `kernel_size' and `kernel_base', have two new arguments:
17326 `core_size' and `core'.
17327 Adjust callers.
17328
17329 2002-05-06 Akim Demaille <akim@epita.fr>
17330
17331 * src/reader.c (packgram): No longer end `ritem' with a 0
17332 sentinel: it is not used.
17333
17334 2002-05-05 Akim Demaille <akim@epita.fr>
17335
17336 New experimental feature: display the lookaheads in the report and
17337 graph.
17338
17339 * src/print (print_core): When --trace-flag, display the rules
17340 lookaheads.
17341 * src/print_graph.c (print_core): Likewise.
17342 Swap the arguments.
17343 Adjust caller.
17344
17345 2002-05-05 Akim Demaille <akim@epita.fr>
17346
17347 * tests/torture.at (Many lookaheads): New test.
17348
17349 2002-05-05 Akim Demaille <akim@epita.fr>
17350
17351 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17352 (GENERATE_MUSCLE_INSERT_TABLE): this.
17353 (output_int_table, output_unsigned_int_table, output_short_table)
17354 (output_token_number_table, output_item_number_table): Replace with...
17355 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17356 (muscle_insert_short_table, muscle_insert_token_number_table)
17357 (muscle_insert_item_number_table): these.
17358 Adjust all callers.
17359 (prepare_tokens): Don't free `translations', since...
17360 * src/reader.h, src/reader.c (grammar_free): do it.
17361 Move to...
17362 * src/gram.h, src/gram.c (grammar_free): here.
17363 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17364 b4_translate_max.
17365
17366 2002-05-05 Akim Demaille <akim@epita.fr>
17367
17368 * src/output.c (output_unsigned_int_table): New.
17369 (prepare_rules): `i' is unsigned.
17370 `prhs', `rline', `r2' are unsigned int.
17371 Rename muscle `rhs_number_max' as `rhs_max'.
17372 Output muscles `prhs_max', `rline_max', and `r2_max'.
17373 Free rline and r1.
17374 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17375 to compute types instead of constant types.
17376 * tests/regression.at (Web2c Actions): Adjust.
17377
17378 2002-05-04 Akim Demaille <akim@epita.fr>
17379
17380 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17381 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17382 Adjust dependencies.
17383 * src/output.c (token_definitions_output): Be sure not to output a
17384 `#define 'a'' when fed with `%token 'a' "a"'.
17385 * tests/regression.at (Token definitions): New.
17386
17387 2002-05-03 Paul Eggert <eggert@twinsun.com>
17388
17389 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17390 for K&R C.
17391
17392 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17393
17394 * Makefile.am (SUBDIRS): Remove intl.
17395 (EXTRA_DIST): Add config/config.rpath.
17396
17397 2002-05-03 Akim Demaille <akim@epita.fr>
17398
17399 * data/bison.simple (m4_if): Don't output empty enums.
17400 And actually, output valid enum definitions :(.
17401
17402 2002-05-03 Akim Demaille <akim@epita.fr>
17403
17404 * configure.bat: Remove, completely obsolete.
17405 * Makefile.am (EXTRA_DIST): Adjust.
17406 Don't distribute config.rpath...
17407 * config/Makefile.am (EXTRA_DIST): Do it.
17408
17409 2002-05-03 Akim Demaille <akim@epita.fr>
17410
17411 * configure.in (GETTEXT_VERSION): New.
17412 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17413
17414 2002-05-03 Akim Demaille <akim@epita.fr>
17415
17416 * data/bison.simple (b4_token_enum): New.
17417 (b4_token_defines): Use it to output tokens both as #define and
17418 enums.
17419 Suggested by Paul Eggert.
17420 * src/output.c (token_definitions_output): Don't output spurious
17421 white spaces.
17422
17423 2002-05-03 Akim Demaille <akim@epita.fr>
17424
17425 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17426
17427 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17428
17429 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17430 Update the stack class, give a try to deque as the default container.
17431
17432 2002-05-02 Akim Demaille <akim@epita.fr>
17433
17434 * data/bison.simple (yyparse): Do not implement @$ = @1.
17435 (YYLLOC_DEFAULT): Adjust to do it.
17436 * doc/bison.texinfo (Location Default Action): Fix.
17437
17438 2002-05-02 Akim Demaille <akim@epita.fr>
17439
17440 * src/reader.c (parse_braces): Merge into...
17441 (parse_action): this.
17442
17443 2002-05-02 Akim Demaille <akim@epita.fr>
17444
17445 * configure.in (ALL_LINGUAS): Remove.
17446 * po/LINGUAS, hr.po: New.
17447
17448 2002-05-02 Akim Demaille <akim@epita.fr>
17449
17450 Remove the so called hairy (semantic) parsers.
17451
17452 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17453 * src/gram.h, src/gram.c (semantic_parser): Remove.
17454 (rule_t): Remove the guard and guard_line members.
17455 * src/lex.h (token_t): remove tok_guard.
17456 * src/options.c (option_table): Remove %guard and %semantic_parser
17457 support.
17458 * src/output.c, src/output.h (guards_output): Remove.
17459 (prepare): Adjust.
17460 (token_definitions_output): Don't output the `T'
17461 tokens (???).
17462 (output_skeleton): Don't output the guards.
17463 * src/files.c, src/files.c (attrsfile): Remove.
17464 * src/reader.c (symbol_list): Remove the guard and guard_line
17465 members.
17466 Adjust dependencies.
17467 (parse_guard): Remove.
17468 * data/bison.hairy: Remove.
17469 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17470 BISON_HAIRY.
17471
17472 2002-05-02 Akim Demaille <akim@epita.fr>
17473
17474 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17475 (parse_guard): Rename the formal argument `stack_offset' as
17476 `rule_length', which is more readable.
17477 Adjust callers.
17478 (copy_at, copy_dollar): Instead of outputting the hard coded
17479 values of $$, $n and so forth, output invocation to b4_lhs_value,
17480 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17481 Note: this patch partially drops `semantic-parser' support: it
17482 always does `rule_length - n', where semantic parsers ought to
17483 always use `-n'.
17484 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17485 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17486
17487 2002-05-02 Akim Demaille <akim@epita.fr>
17488
17489 * configure.in (AC_INIT): Bump to 1.49b.
17490 (AM_INIT_AUTOMAKE): Short invocation.
17491
17492 2002-05-02 Akim Demaille <akim@epita.fr>
17493
17494 Version 1.49a.
17495
17496 2002-05-01 Akim Demaille <akim@epita.fr>
17497
17498 * src/skeleton.h: Remove.
17499
17500 2002-05-01 Akim Demaille <akim@epita.fr>
17501
17502 * src/skeleton.h: Fix the #endif.
17503 Reported by Magnus Fromreide.
17504
17505 2002-04-26 Paul Eggert <eggert@twinsun.com>
17506
17507 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17508 Define if we define YYSTYPE and YYLTYPE, respectively.
17509 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17510
17511 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17512
17513 * src/scan-skel.l: Postprocess quadrigraphs.
17514
17515 * src/reader.c (copy_character): New function, used to output
17516 single characters while replacing `[' and `]' with quadrigraphs, to
17517 avoid troubles with M4 quotes.
17518 (copy_comment): Output characters with copy_character.
17519 (read_additionnal_code): Likewise.
17520 (copy_string2): Likewise.
17521 (copy_definition): Likewise.
17522
17523 * tests/calc.at: Exercise M4 quoting.
17524
17525 2002-04-25 Akim Demaille <akim@epita.fr>
17526
17527 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17528 between `!' and the command.
17529 Reported by Paul Eggert.
17530
17531 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17532
17533 * tests/calc.at: Exercise prologue splitting.
17534
17535 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17536 `b4_post_prologue' instead of `b4_prologue'.
17537
17538 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17539 muscles.
17540 (output): Free pre_prologue_obstack and post_prologue_obstack.
17541 * src/files.h, src/files.c (attrs_obstack): Remove.
17542 (pre_prologue_obstack, post_prologue_obstack): New.
17543 * src/reader.c (copy_definition): Add a parameter to specify the
17544 obstack to fill, instead of using attrs_obstack unconditionally.
17545 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17546 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17547
17548 2002-04-23 Paul Eggert <eggert@twinsun.com>
17549
17550 * data/bison.simple: Remove unnecessary commentary and white
17551 space differences from 1_29-branch.
17552 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17553
17554 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17555 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17556 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17557 constructors or destructors.
17558
17559 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17560
17561 2002-04-23 Akim Demaille <akim@epita.fr>
17562
17563 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17564 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17565 location with columns.
17566 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17567 All reported by Paul Eggert.
17568
17569 2002-04-22 Akim Demaille <akim@epita.fr>
17570
17571 * src/reduce.c (dump_grammar): Move to...
17572 * src/gram.h, src/gram.c (grammar_dump): here.
17573 Be sure to separate long item numbers.
17574 Don't read the members of a rule's prec if its nil.
17575
17576 2002-04-22 Akim Demaille <akim@epita.fr>
17577
17578 * src/output.c (table_size, table_grow): New.
17579 (MAXTABLE): Remove, replace uses with table_size.
17580 (pack_vector): Instead of dying when the table is too big, grow it.
17581
17582 2002-04-22 Akim Demaille <akim@epita.fr>
17583
17584 * data/bison.simple (yyr1): Its type is that of a token number.
17585 * data/bison.c++ (r1_): Likewise.
17586 * tests/regression.at (Web2c Actions): Adjust.
17587
17588 2002-04-22 Akim Demaille <akim@epita.fr>
17589
17590 * src/reader.c (token_translations_init): 256 is now the default
17591 value for the error token, i.e., it will be assigned another
17592 number if the user assigned 256 to one of her tokens.
17593 (reader): Don't force 256 to error.
17594 * doc/bison.texinfo (Symbols): Adjust.
17595 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17596 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17597 etc. instead of 10, 20, 30 (which was used to `jump' over error
17598 (256) and undefined (2)).
17599
17600 2002-04-22 Akim Demaille <akim@epita.fr>
17601
17602 Propagate more token_number_t.
17603
17604 * src/gram.h (token_number_as_item_number)
17605 (item_number_as_token_number): New.
17606 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17607 Use it to create output_item_number_table and
17608 output_token_number_table.
17609 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17610 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17611 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17612 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17613
17614 2002-04-22 Akim Demaille <akim@epita.fr>
17615
17616 * src/output.h, src/output.c (get_lines_number): Remove.
17617
17618 2002-04-19 Akim Demaille <akim@epita.fr>
17619
17620 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17621 as Lex/Flex'.
17622 (Debugging): More details about enabling the debugging features.
17623 (Table of Symbols): Describe $$, $n, @$, and @n.
17624 Suggested by Tim Josling.
17625
17626 2002-04-19 Akim Demaille <akim@epita.fr>
17627
17628 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17629
17630 2002-04-10 Akim Demaille <akim@epita.fr>
17631
17632 * src/system.h: Rely on HAVE_LIMITS_H.
17633 Suggested by Paul Eggert.
17634
17635 2002-04-09 Akim Demaille <akim@epita.fr>
17636
17637 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17638 full stderr, and strip it according to the bison options, instead
17639 of composing the error message from different bits.
17640 This makes it easier to check for several error messages.
17641 Adjust all the invocations.
17642 Add an invocation exercising the error token.
17643 Add an invocation demonstrating a stupid error message.
17644 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17645 Adjust the tests.
17646 Error message are for stderr, not stdout.
17647
17648 2002-04-09 Akim Demaille <akim@epita.fr>
17649
17650 * src/gram.h, src/gram.c (error_token_number): Remove, use
17651 errtoken->number.
17652 * src/reader.c (reader): Don't specify the user token number (2)
17653 for $undefined, as it uselessly prevents using it.
17654 * src/gram.h (token_number_t): Move to...
17655 * src/symtab.h: here.
17656 (state_t.number): Is a token_number_t.
17657 * src/print.c, src/reader.c: Use undeftoken->number instead of
17658 hard coded 2.
17659 (Even though this 2 is not the same as above: the number of the
17660 undeftoken remains being 2, it is its user token number which
17661 might not be 2).
17662 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17663 `user_token_number_max'.
17664 Output `undef_token_number'.
17665 * data/bison.simple, data/bison.c++: Use them.
17666 Be sure to map invalid yylex return values to
17667 `undef_token_number'. This saves us from gratuitous SEGV.
17668
17669 * tests/conflicts.at (Solved SR Conflicts)
17670 (Unresolved SR Conflicts): Adjust.
17671 * tests/regression.at (Web2c Actions): Adjust.
17672
17673 2002-04-08 Akim Demaille <akim@epita.fr>
17674
17675 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17676 Adding #line.
17677 Remove the duplicate `typedefs'.
17678 (RhsNumberType): Fix the declaration and various other typos.
17679 Use __ofile__.
17680 * data/bison.simple: Use __ofile__.
17681 * src/scan-skel.l: Handle __ofile__.
17682
17683 2002-04-08 Akim Demaille <akim@epita.fr>
17684
17685 * src/gram.h (item_number_t): New, the type of item numbers in
17686 RITEM. Note that it must be able to code symbol numbers as
17687 positive number, and the negation of rule numbers as negative
17688 numbers.
17689 Adjust all dependencies (pretty many).
17690 * src/reduce.c (rule): Remove this `short *' pointer: use
17691 item_number_t.
17692 * src/system.h (MINSHORT, MAXSHORT): Remove.
17693 Include `limits.h'.
17694 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17695 (shortcpy): Remove.
17696 (MAXTABLE): Move to...
17697 * src/output.c (MAXTABLE): here.
17698 (prepare_rules): Use output_int_table to output rhs.
17699 * data/bison.simple, data/bison.c++: Adjust.
17700 * tests/torture.at (Big triangle): Move the limit from 254 to
17701 500.
17702 * tests/regression.at (Web2c Actions): Ajust.
17703
17704 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17705 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17706 passes, but produces negative #line number, once fixed, GCC is
17707 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17708 C), it passes.
17709 * src/state.h (state_h): Code input lines on ints, not shorts.
17710
17711 2002-04-08 Akim Demaille <akim@epita.fr>
17712
17713 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17714 and then the grammar.
17715
17716 2002-04-08 Akim Demaille <akim@epita.fr>
17717
17718 * src/system.h: No longer using strndup.
17719
17720 2002-04-07 Akim Demaille <akim@epita.fr>
17721
17722 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17723 * src/output.c (output_table_data): Return the longest number.
17724 (prepare_tokens): Output `token_number_max').
17725 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17726 New.
17727 Use them to define yy_token_number_type/TokenNumberType.
17728 Use this type for yytranslate.
17729 * tests/torture.at (Big triangle): Push the limit from 124 to
17730 253.
17731 * tests/regression.at (Web2c Actions): Adjust.
17732
17733 2002-04-07 Akim Demaille <akim@epita.fr>
17734
17735 * tests/torture.at (Big triangle): New.
17736 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17737 * tests/existing.at: here.
17738
17739 2002-04-07 Akim Demaille <akim@epita.fr>
17740
17741 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17742 nritems.
17743 Adjust dependencies.
17744
17745 2002-04-07 Akim Demaille <akim@epita.fr>
17746
17747 * src/reader.c: Normalize increments to prefix form.
17748
17749 2002-04-07 Akim Demaille <akim@epita.fr>
17750
17751 * src/reader.c, symtab.c: Remove debugging code.
17752
17753 2002-04-07 Akim Demaille <akim@epita.fr>
17754
17755 Rename all the `bucket's as `symbol_t'.
17756
17757 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17758 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17759 * src/symtab.c, src/symtab.h (bucket): Rename as...
17760 (symbol_t): this.
17761 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17762 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17763 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17764 (buckets_new, buckets_free, buckets_do): Rename as...
17765 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17766 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17767 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17768 (symbols_new, symbols_free, symbols_do): these.
17769
17770 2002-04-07 Akim Demaille <akim@epita.fr>
17771
17772 Use lib/hash for the symbol table.
17773
17774 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17775 EOF.
17776 * src/lex.c (lex): Set the `number' member of new terminals.
17777 * src/reader.c (bucket_check_defined, bucket_make_alias)
17778 (bucket_check_alias_consistence, bucket_translation): New.
17779 (reader, grammar_free, readgram, token_translations_init)
17780 (packsymbols): Adjust.
17781 (reader): Number the predefined tokens.
17782 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17783 for predefined tokens.
17784 * src/symtab.h (bucket): Remove all the hash table related
17785 members.
17786 * src/symtab.c (symtab): Replace by...
17787 (bucket_table): this.
17788 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17789 (buckets_new, buckets_do): New.
17790
17791 2002-04-07 Akim Demaille <akim@epita.fr>
17792
17793 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17794 (start_symbol, max_user_token_number, semantic_parser)
17795 (error_token_number): Initialize.
17796 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17797 Initialize.
17798 (reader): Don't.
17799 (errtoken, eoftoken, undeftoken, axiom): Extern.
17800
17801 2002-04-07 Akim Demaille <akim@epita.fr>
17802
17803 * src/gram.h (rule_s): prec and precsym are now pointers
17804 to the bucket giving the priority/associativity.
17805 Member `associativity' removed: useless.
17806 * src/reduce.c, src/conflicts.c: Adjust.
17807
17808 2002-04-07 Akim Demaille <akim@epita.fr>
17809
17810 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17811 Properly escape the symbols' TAG when outputting them.
17812
17813 2002-04-07 Akim Demaille <akim@epita.fr>
17814
17815 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17816
17817 2002-04-07 Akim Demaille <akim@epita.fr>
17818
17819 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17820 (LArule): this, which is an array to rule_t*.
17821 * src/print.c, src/conflicts.c: Adjust.
17822
17823 2002-04-07 Akim Demaille <akim@epita.fr>
17824
17825 * src/gram.h (rule_t): Rename `number' as `user_number'.
17826 `number' is a new member.
17827 Adjust dependencies.
17828 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17829
17830 2002-04-07 Akim Demaille <akim@epita.fr>
17831
17832 As a result of the previous patch, it is no longer needed
17833 to reorder ritem itself.
17834
17835 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17836
17837 2002-04-07 Akim Demaille <akim@epita.fr>
17838
17839 Be sure never to walk through RITEMS, but use only data related to
17840 the rules themselves. RITEMS should be banished.
17841
17842 * src/output.c (output_token_translations): Rename as...
17843 (prepare_tokens): this.
17844 In addition to `translate', prepare the muscles `tname' and
17845 `toknum', which were handled by...
17846 (output_rule_data): this.
17847 Remove, and move the remainder of its outputs into...
17848 (prepare_rules): this new routines, which also merges content from
17849 (output_gram): this.
17850 (prepare_rules): Be sure never to walk through RITEMS.
17851 (output_stos): Rename as...
17852 (prepare_stos): this.
17853 (output): Always invoke prepare_states, after all, just don't use it
17854 in the output if you don't need it.
17855
17856 2002-04-07 Akim Demaille <akim@epita.fr>
17857
17858 * src/LR0.c (new_state): Display `nstates' as the name of the
17859 newly created state.
17860 Adjust to initialize first_state and last_state if needed.
17861 Be sure to distinguish the initial from the final state.
17862 (new_states): Create the itemset of the initial state, and use
17863 new_state.
17864 * src/closure.c (closure): Now that the initial state has its
17865 items properly set, there is no need for a special case when
17866 creating `ruleset'.
17867
17868 As a result, now the rule 0, reducing to $axiom, is visible in the
17869 outputs. Adjust the test suite.
17870
17871 * tests/conflicts.at (Solved SR Conflicts)
17872 (Unresolved SR Conflicts): Adjust.
17873 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17874 * tests/conflicts.at (S/R in initial): New.
17875
17876 2002-04-07 Akim Demaille <akim@epita.fr>
17877
17878 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17879 the RHS of the rules.
17880 * src/output.c (output_gram): Likewise.
17881
17882 2002-04-07 Akim Demaille <akim@epita.fr>
17883
17884 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17885 bucket.
17886 Adjust all dependencies.
17887 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17888 `number' of the buckets too.
17889 * src/gram.h: Include `symtab.h'.
17890 (associativity): Move to...
17891 * src/symtab.h: here.
17892 No longer include `gram.h'.
17893
17894 2002-04-07 Akim Demaille <akim@epita.fr>
17895
17896 * src/gram.h, src/gram.c (rules_rhs_length): New.
17897 (ritem_longest_rhs): Use it.
17898 * src/gram.h (rule_t): `number' is a new member.
17899 * src/reader.c (packgram): Set it.
17900 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17901 the end of `rules', and count them out of `nrules'.
17902 (reduce_output, dump_grammar): Adjust.
17903 * src/print.c (print_grammar): It is no longer needed to check for
17904 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17905 * tests/reduce.at (Reduced Automaton): New test.
17906
17907 2002-04-07 Akim Demaille <akim@epita.fr>
17908
17909 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17910 lacking `+ 1' to nrules, Bison reported as useless a token if it
17911 was used solely to set the precedence of the last rule...
17912
17913 2002-04-07 Akim Demaille <akim@epita.fr>
17914
17915 * data/bison.c++, data/bison.simple: Don't output the current file
17916 name in #line, to avoid useless diffs between two identical
17917 outputs under different names.
17918
17919 2002-04-07 Akim Demaille <akim@epita.fr>
17920
17921 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17922 Normalize loops to using `< nrules + 1', not `<= nrules'.
17923
17924 2002-04-07 Akim Demaille <akim@epita.fr>
17925
17926 * TODO: Update.
17927
17928 2002-04-07 Akim Demaille <akim@epita.fr>
17929
17930 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17931 bucket.value as bucket.number.
17932
17933 2002-04-07 Akim Demaille <akim@epita.fr>
17934
17935 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17936 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17937 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17938 RHS, instead of being an index in RITEMS.
17939
17940 2002-04-04 Paul Eggert <eggert@twinsun.com>
17941
17942 * doc/bison.texinfo: Update copyright date.
17943 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17944 (Symbols): Warn about running Bison in one character set,
17945 but compiling and/or running in an incompatible one.
17946 Warn about character code 256, too.
17947
17948 2002-04-03 Paul Eggert <eggert@twinsun.com>
17949
17950 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17951 YYERROR_VERBOSE is nonzero, not whether it is defined.
17952
17953 Merge changes from bison-1_29-branch.
17954
17955 2002-03-20 Paul Eggert <eggert@twinsun.com>
17956
17957 Merge fixes from Debian bison_1.34-1.diff.
17958
17959 * configure.in (AC_PREREQ): 2.53.
17960
17961 2002-03-20 Akim Demaille <akim@epita.fr>
17962
17963 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17964
17965 2002-03-19 Paul Eggert <eggert@twinsun.com>
17966
17967 * src/bison.simple (YYCOPY): New macro.
17968 (YYSTACK_RELOCATE): Use it.
17969 Remove Type arg; no longer needed. All callers changed.
17970 (yymemcpy): Remove; no longer needed.
17971
17972 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17973 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17974
17975 2002-03-19 Akim Demaille <akim@epita.fr>
17976
17977 Test and fix the #line outputs.
17978
17979 * tests/atlocal.at (GCC): New.
17980 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
17981 (Prologue synch line, %union synch line, Postprologue synch line)
17982 (Action synch line, Epilogue synch line): New tests.
17983 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17984 * data/bison.simple, data/bison.c++: Use it.
17985
17986 2002-03-19 Akim Demaille <akim@epita.fr>
17987
17988 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17989 (Solved SR Conflicts, %expect not enough, %expect right)
17990 (%expect too much): Move to...
17991 * tests/conflicts.at: this new file.
17992
17993 2002-03-19 Akim Demaille <akim@epita.fr>
17994
17995 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17996 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17997 that we can move to enums for instance.
17998 * src/output.c (token_definitions_output): Output a list of
17999 `token-name, token-number' instead of the #define.
18000 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18001
18002 2002-03-14 Akim Demaille <akim@epita.fr>
18003
18004 Use Gettext 0.11.1.
18005
18006 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
18007
18008 * data/bison.c++: Make the user able to add members to the generated
18009 parser by subclassing.
18010
18011 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
18012
18013 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18014 a character.
18015 Reported by Nicolas Tisserand and Nicolas Burrus.
18016
18017 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18018
18019 * src/reader.c: Warn about lacking semi-colons, do not complain.
18020
18021 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18022
18023 * data/bison.c++: Remove a debug line.
18024
18025 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18026
18027 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18028 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18029 provide a default implementation.
18030
18031 2002-03-04 Akim Demaille <akim@epita.fr>
18032
18033 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18034 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18035 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18036 * tests/semantic.at (Parsing Guards): Similarly.
18037 * src/reader.at (readgram): Complain if the last rule is not ended
18038 with a semi-colon.
18039
18040 2002-03-04 Akim Demaille <akim@epita.fr>
18041
18042 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18043 * src/closure.c: here.
18044 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18045 RTC.
18046 * src/warshall.h, src/warshall.c: Remove.
18047 * tests/sets.at (Broken Closure): Adjust.
18048
18049 2002-03-04 Akim Demaille <akim@epita.fr>
18050
18051 * src/output.c (output_skeleton): tempdir is const.
18052 bytes_read is unused.
18053
18054 2002-03-04 Akim Demaille <akim@epita.fr>
18055
18056 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18057 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18058 Update.
18059 From Michael Hayes.
18060
18061 2002-03-04 Akim Demaille <akim@epita.fr>
18062
18063 * src/closure.c (closure): `r' is unused.
18064
18065 2002-03-04 Akim Demaille <akim@epita.fr>
18066
18067 * tests/sets.at (Broken Closure): Add the ending `;'.
18068 * src/reader.at (readgram): Complain if a rule is not ended with a
18069 semi-colon.
18070
18071 2002-03-04 Akim Demaille <akim@epita.fr>
18072
18073 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18074 (count_sr_conflicts): Use bitset_count.
18075 * src/reduce.c (inaccessable_symbols): Ditto.
18076 (bits_size): Remove.
18077 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18078
18079 2002-03-04 Akim Demaille <akim@epita.fr>
18080
18081 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18082 * src/reduce.c: Remove the `bitset_zero's following the
18083 `bitset_create's, as now it is performed by the latter.
18084
18085 2002-03-04 Akim Demaille <akim@epita.fr>
18086
18087 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18088 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18089 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18090 latest sources from Michael.
18091
18092 2002-03-04 Akim Demaille <akim@epita.fr>
18093
18094 * src/output.c (output): Don't free the grammar.
18095 * src/reader.c (grammar_free): New.
18096 * src/main.c (main): Call it and don't free symtab here.
18097
18098 2002-03-04 Akim Demaille <akim@epita.fr>
18099
18100 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18101 before returning.
18102 Reported by Benoit Perrot.
18103
18104 2002-03-04 Akim Demaille <akim@epita.fr>
18105
18106 Use bitset operations when possible, not loops over bits.
18107
18108 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18109 bitset_or.
18110 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18111 * src/reduce.c (useless_nonterminals): Formatting changes.
18112 * src/warshall.c (TC): Use bitset_or.
18113
18114 2002-03-04 Akim Demaille <akim@epita.fr>
18115
18116 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18117 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18118 Ditto.
18119
18120 2002-03-04 Akim Demaille <akim@epita.fr>
18121
18122 * src/lalr.c (F): Now a bitset*.
18123 Adjust all dependencies.
18124
18125 2002-03-04 Akim Demaille <akim@epita.fr>
18126
18127 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18128 Adjust all dependencies.
18129
18130 2002-03-04 Akim Demaille <akim@epita.fr>
18131
18132 * src/L0.c, src/LR0.h (nstates): Be size_t.
18133 Adjust comparisons (signed vs unsigned).
18134 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18135 bitset*.
18136 Adjust all dependencies.
18137
18138 2002-03-04 Akim Demaille <akim@epita.fr>
18139
18140 * src/closure.c (firsts): Now, also a bitset.
18141 Adjust all dependencies.
18142 (varsetsize): Remove, now unused.
18143 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18144
18145 2002-03-04 Akim Demaille <akim@epita.fr>
18146
18147 * src/print.c: Convert to use bitset.h, not hand coded iterations
18148 over ints.
18149
18150 2002-03-04 Akim Demaille <akim@epita.fr>
18151
18152 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18153
18154 2002-03-04 Akim Demaille <akim@epita.fr>
18155
18156 * src/closure.c (ruleset): Be a bitset.
18157 (rulesetsize): Remove.
18158
18159 2002-03-04 Akim Demaille <akim@epita.fr>
18160
18161 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18162 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18163 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18164 * src/closure.c (fderives): Be an array of bitsets.
18165
18166 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
18167
18168 * data/bison.c++: Merge the two generated headers. Insert a copyright
18169 notice in each output file.
18170
18171 2002-02-28 Akim Demaille <akim@epita.fr>
18172
18173 * data/bison.c++: Copy the prologue of bison.simple to fetch
18174 useful M4 definitions, such as b4_header_guard.
18175
18176 2002-02-25 Akim Demaille <akim@epita.fr>
18177
18178 * src/getargs.c (version): Give the name of the authors, and use a
18179 translator friendly scheme for the bgr
18180 copyright notice.
18181
18182 2002-02-25 Akim Demaille <akim@epita.fr>
18183
18184 * src/output.c (header_output): Remove, now handled completely via
18185 M4.
18186
18187 2002-02-25 Akim Demaille <akim@epita.fr>
18188
18189 * m4/m4.m4: New, from CVS Autoconf.
18190 * configure.in: Invoke it.
18191 * src/output.c (output_skeleton): Use its result instead of the
18192 hard coded name.
18193
18194 2002-02-25 Akim Demaille <akim@epita.fr>
18195
18196 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18197 Fileutils 4.1.5.
18198 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18199 * src/output.c (output_skeleton): Use mkstemp to create a real
18200 temporary file.
18201 Move the filling of `skeleton' and its muscle to...
18202 (prepare): here.
18203 (output): Move the definition of the prologue muscle to...
18204 (prepare): here.
18205 * src/system.h (DEFAULT_TMPDIR): New.
18206
18207 2002-02-14 Paul Eggert <eggert@twinsun.com>
18208
18209 Remove the support for C++ namespace cleanliness; it was
18210 causing more problems than it was curing, since it didn't work
18211 properly on some nonstandard C++ compilers. This can wait
18212 for a proper C++ parser.
18213
18214 * NEWS: Document this.
18215 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18216 of C++, as it's treated like C now.
18217 * src/bison.simple (YYSTD): Remove.
18218 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18219 Treat C++ just like Standard C instead of trying to support
18220 namespace cleanliness.
18221
18222 2002-02-14 Akim Demaille <akim@epita.fr>
18223
18224 * tests/regression.at (else): Adjust to Andreas' change.
18225
18226 2002-02-14 Akim Demaille <akim@epita.fr>
18227
18228 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18229
18230 2002-02-13 Andreas Schwab <schwab@suse.de>
18231
18232 * src/output.c (output_rule_data): Don't output NULL, it might
18233 not be defined yet.
18234
18235 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
18236
18237 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18238 (Copyright notice): Update.
18239
18240 2002-02-11 Akim Demaille <akim@epita.fr>
18241
18242 * tests/regression.at (%nonassoc and eof): Don't include
18243 nonportable headers.
18244
18245 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
18246
18247 * data/bison.c++: Correct error recovery. Make the user able to
18248 initialize the starting location.
18249
18250 2002-02-07 Akim Demaille <akim@epita.fr>
18251
18252 * tests/input.at: New.
18253
18254 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18255
18256 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18257 more consistent when naming methods and variables. Put preprocessor
18258 directives around tables only needed for debugging.
18259
18260 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18261
18262 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18263 C++ parsers.
18264 (yy::b4_name::parse): Use print_.
18265
18266 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18267
18268 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18269
18270 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18271
18272 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18273 C++ parsers.
18274 (yy::b4_name::parse): Build verbose error messages, and use error_.
18275
18276 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18277
18278 * data/bison.c++: Fix m4 quoting in comments.
18279
18280 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18281
18282 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18283 not expanded by m4.
18284
18285 2002-02-05 Akim Demaille <akim@epita.fr>
18286
18287 * data/bison.c++: Adjust to the M4 back end.
18288 More is certainly needed.
18289
18290 2002-02-05 Akim Demaille <akim@epita.fr>
18291
18292 Give a try to M4 as a back end.
18293
18294 * lib/readpipe.c: New, from wdiff.
18295 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18296 BISON_HAIRY.
18297 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18298 specific values. Now it is m4 that performs the lookup.
18299 * src/parse-skel.y: Remove.
18300 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18301 * src/output.c (actions_output, guards_output)
18302 (token_definitions_output): No longer keeps track of the output
18303 line number, hence remove the second argument.
18304 (guards_output): Check against the guard member of a rule, not the
18305 action member.
18306 Adjust callers.
18307 (output_skeleton): Don't look for the skeleton location, let m4 do
18308 that.
18309 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18310 file will be used.
18311 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18312 (prepare): Given that for the time being changesyntax is not
18313 usable in M4, rename the muscles using `-' to `_'.
18314 Define `defines_flag', `output_parser_name' and `output_header_name'.
18315 * src/output.h (actions_output, guards_output)
18316 (token_definitions_output): Adjust prototypes.
18317 * src/scan-skel.l: Instead of scanning the skeletons, it now
18318 processes the output of m4: `__oline__' and `#output'.
18319 * data/bison.simple: Adjust to be used by M4(sugar).
18320 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18321 to date.
18322 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18323 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18324 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18325 shamelessly stolen from CVS Autoconf.
18326
18327 2002-02-05 Akim Demaille <akim@epita.fr>
18328
18329 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18330 * configure.in: Check for the declarations of free and malloc.
18331 * src/muscle_tab.c: Adjust.
18332
18333 2002-02-05 Akim Demaille <akim@epita.fr>
18334
18335 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18336 which have no values.
18337
18338 2002-02-05 Akim Demaille <akim@epita.fr>
18339
18340 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18341 * data/: here.
18342
18343 2002-01-29 Paul Eggert <eggert@twinsun.com>
18344
18345 * src/bison.simple (YYSIZE_T): Do not define merely because
18346 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18347 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18348
18349 2002-01-27 Akim Demaille <akim@epita.fr>
18350
18351 Fix `%nonassoc and eof'.
18352
18353 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18354 which were not properly copied! Replace
18355 memcpy (res->errs, src->errs, src->nerrs);
18356 with
18357 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18358 !!!
18359 * tests/regression.at (%nonassoc and eof): Adjust to newest
18360 Autotest: `.' is not in the PATH.
18361
18362 2002-01-27 Akim Demaille <akim@epita.fr>
18363
18364 * tests/sets.at (AT_EXTRACT_SETS): New.
18365 (Nullable): Use it.
18366 (Firsts): New.
18367
18368 2002-01-26 Akim Demaille <akim@epita.fr>
18369
18370 * tests/actions.at, tests/calc.at, tests/headers.at,
18371 * tests/torture.at: Adjust to the newest Autotest which no longer
18372 forces `.' in the PATH.
18373
18374 2002-01-25 Akim Demaille <akim@epita.fr>
18375
18376 * tests/regression.at (%nonassoc and eof): New.
18377 Suggested by Robert Anisko.
18378
18379 2002-01-24 Akim Demaille <akim@epita.fr>
18380
18381 Bison dumps core when trying to complain about broken input files.
18382 Reported by Cris van Pelt.
18383
18384 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18385 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18386 into...
18387 (Invalid inputs): Strengthen: exercise parse_percent_token.
18388
18389 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18390
18391 * src/Makefile.am: Add bison.c++.
18392 * src/bison.c++: New skeleton.
18393
18394 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18395
18396 * po/it.po: New.
18397
18398 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18399
18400 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18401
18402 2002-01-20 Marc Autret <marc@gnu.org>
18403
18404 * src/files.c (compute_output_file_names): Fix
18405
18406 2002-01-20 Marc Autret <marc@gnu.org>
18407
18408 * tests/output.at: New test.
18409 * src/files.c (compute_base_names): Don't map extensions when
18410 the YACC flag is set, use defaults.
18411 Reported by Evgeny Stambulchik.
18412
18413 2002-01-20 Marc Autret <marc@gnu.org>
18414
18415 * src/system.h: Need to define __attribute__ away for non-GCC
18416 compilers as well (i.e., the vendor C compiler).
18417 Suggested by Albert Chin-A-Young.
18418
18419 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18420
18421 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18422 canonical definition.
18423 * src/system.h: Use the canonical definition for PARAMS (avoids
18424 a conflict with the macro from lib/hash.h).
18425
18426 2002-01-11 Akim Demaille <akim@epita.fr>
18427
18428 * configure.in: Use AC_FUNC_STRNLEN.
18429 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18430
18431 2002-01-09 Akim Demaille <akim@epita.fr>
18432
18433 * src/files.c, src/files.h (output_infix): New.
18434 (tab_extension): Remove.
18435 (compute_base_names): Compute the former, drop the latter.
18436 * src/output.c (prepare): Insert the muscles `output-infix', and
18437 `output-suffix'.
18438 * src/parse-skel.y (string, string.1): New.
18439 (section.header): Use it.
18440 (section.yacc): Remove.
18441 (prefix): Remove too.
18442 * src/scan-skel.l: Adjust.
18443 * src/bison.simple, src/bison.hairy: Adjust.
18444
18445 2002-01-09 Akim Demaille <akim@epita.fr>
18446
18447 * configure.in (WERROR_CFLAGS): Compute it.
18448 * src/Makefile.am (CFLAGS): Pass it.
18449 * tests/atlocal.in (CFLAGS): Idem.
18450 * src/files.c: Fix a few warnings.
18451 (get_extension_index): Remove, unused.
18452
18453 2002-01-08 Akim Demaille <akim@epita.fr>
18454
18455 * src/getargs.c (AS_FILE_NAME): New.
18456 (getargs): Use it to convert DOSish file names.
18457 * src/files.c (base_name): Rename as full_base_name to avoid
18458 clashes with `base_name ()'.
18459 (filename_split): New.
18460 (compute_base_names): N-th rewrite, using filename_split.
18461
18462 2002-01-08 Akim Demaille <akim@epita.fr>
18463
18464 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18465 New, stolen from the Fileutils 4.1.
18466 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18467 * configure.in: Check for the presence of memrchr, and of its
18468 prototype.
18469
18470 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18471
18472 * lib/hash.h (__P): Added definition for this macro.
18473 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18474 BUILT_SOURCES, to ensure they are generated first.
18475 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18476 %error-verbose to allow bootstrapping with bison 1.30x.
18477
18478 2002-01-06 Akim Demaille <akim@epita.fr>
18479
18480 * src/reader.c (parse_braces): Don't fetch the next char, the
18481 convention is to fetch on entry.
18482 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18483 'switch' without a following semicolon.
18484 * tests/regression.at (braces parsing): New.
18485
18486 2002-01-06 Akim Demaille <akim@epita.fr>
18487
18488 Bison is dead wrong in its RR conflict reports.
18489
18490 * tests/torture.at (GNU Cim Grammar): New.
18491 * src/conflicts.c (count_rr_conflicts): Fix.
18492
18493 2002-01-06 Akim Demaille <akim@epita.fr>
18494
18495 Creating package.m4 from configure.ac causes too many problems.
18496
18497 * tests/Makefile.am (package.m4): Create it by hand,
18498 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18499
18500 2002-01-06 Akim Demaille <akim@epita.fr>
18501
18502 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18503 skeleton.h.
18504
18505 2002-01-04 Paul Eggert <eggert@twinsun.com>
18506
18507 * doc/bison.texinfo (Debugging):
18508 Remove YYSTDERR; it's no longer defined or used.
18509 Also, s/cstdio.h/cstdio/.
18510
18511 2002-01-03 Akim Demaille <akim@epita.fr>
18512
18513 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18514
18515 2002-01-03 Akim Demaille <akim@epita.fr>
18516
18517 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18518 tracing code to --trace, wait for a better --trace option, with
18519 args.
18520
18521 2002-01-03 Akim Demaille <akim@epita.fr>
18522
18523 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18524 The ISO C++ standard is extremely clear about it: stderr is
18525 considered a macro, not a regular symbol (see table 94 `Header
18526 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18527 Therefore std:: does not apply to it. It still does with fprintf.
18528 Also, s/cstdio.h/cstdio/.
18529
18530 2002-01-03 Akim Demaille <akim@epita.fr>
18531
18532 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18533 for non system headers.
18534
18535 2002-01-02 Akim Demaille <akim@epita.fr>
18536
18537 Equip the skeleton chain with location tracking, runtime trace,
18538 pure parser and scanner.
18539
18540 * src/parse-skel.y: Request a pure parser, locations, and prefix
18541 renaming.
18542 (%union): Having several members with the same type does not help
18543 type mismatches, simplify.
18544 (YYPRINT, yyprint): New.
18545 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18546 (skel_error): this.
18547 Handle locations.
18548 * src/scan-skel.l: Adjust to these changes.
18549 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18550 (LOCATION_PRINT, skel_control_t): New.
18551
18552 2001-12-30 Akim Demaille <akim@epita.fr>
18553
18554 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18555 replace `gb' with BLANKS.
18556 * src/scan-skel.l: Adjust.
18557
18558 2001-12-30 Akim Demaille <akim@epita.fr>
18559
18560 * src/system.h: We don't need nor want bcopy.
18561 Throw away MS-DOS crap: we don't need getpid.
18562 * configure.in: We don't need strndup. It was even causing
18563 problems: because Flex includes the headers *before* us,
18564 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18565 not visible.
18566 * lib/xstrndup.c: New.
18567 * src/scan-skel.l: Use it.
18568 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18569 * src/parse-skel.y: Use %directives instead of #defines.
18570
18571 2001-12-30 Akim Demaille <akim@epita.fr>
18572
18573 * src/skeleton.h: New.
18574 * src/output.c (output_parser, output_master_parser): Remove, dead
18575 code.
18576 * src/output.h (get_lines_number, actions_output, guards_output)
18577 (token_definitions_output): Prototype them.
18578 * src/parse-skel.y: Add the license notice.
18579 Include output.h and skeleton.h.
18580 (process_skeleton): Returns void, and takes a single parameter.
18581 * src/scan-skel.l: Add the license notice.
18582 Include skeleton.h.
18583 Don't use %option yylineno: it seems that then Flex imagines
18584 REJECT has been used, and therefore it won't reallocate its
18585 buffers (which makes no other sense to me than a bug). It results
18586 in warnings for `unused: yy_flex_realloc'.
18587
18588 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
18589
18590 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18591 (MUSCLE_INSERT_PREFIX): ...to there.
18592 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18593 (MUSCLE_INSERT_PREFIX): Move from here...
18594
18595 * src/bison.hairy: Add a section directive. Put braces around muscle
18596 names. This parser skeleton is still broken, but Bison should not
18597 choke on a bad muscle 'syntax'.
18598 * src/bison.simple: Add a section directive. Put braces around muscle
18599 names.
18600
18601 * src/files.h (strsuffix, stringappend): Add declarations.
18602 (tab_extension): Add declaration.
18603 (short_base_name): Add declaration.
18604
18605 * src/files.c (strsuffix, stringappend): No longer static. These
18606 functions are used in the skeleton parser.
18607 (tab_extension): New.
18608 (compute_base_names): Use the computations done in this function
18609 to guess if the generated parsers should have '.tab' in their
18610 names.
18611 (short_base_name): No longer static.
18612
18613 * src/output.c (output_skeleton): New.
18614 (output): Disable call to output_master_parser, and give a try to
18615 a new skeleton handling system.
18616 (guards_output, actions_output): No longer static.
18617 (token_definitions_output, get_lines_number): No longer static.
18618
18619 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18620
18621 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18622 parse-skel.y.
18623
18624 * src/parse-skel.y: New file.
18625 * src/scan-skel.l: New file.
18626
18627 2001-12-29 Akim Demaille <akim@epita.fr>
18628
18629 %name-prefix is broken.
18630
18631 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18632 Adjust all dependencies.
18633 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18634 %name-prefix.
18635
18636 Renaming yylval but not yylloc is not consistent. Now we do.
18637
18638 * src/bison.simple: Prefix yylloc if used.
18639 * doc/bison.texinfo (Decl Summary): Document that.
18640
18641 2001-12-29 Akim Demaille <akim@epita.fr>
18642
18643 * doc/bison.texinfo: Promote `%long-directive' over
18644 `%long_directive'.
18645 Remove all references to fixed-output-files, yacc is enough.
18646
18647 2001-12-29 Akim Demaille <akim@epita.fr>
18648
18649 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18650 user prologue. These are defaults.
18651 * tests/actions.at (Mid-rule actions): Make sure the user can
18652 define YYDEBUG and YYERROR_VERBOSE.
18653
18654 2001-12-29 Akim Demaille <akim@epita.fr>
18655
18656 * src/output.c (header_output): Don't forget to export YYLTYPE and
18657 yylloc.
18658 * tests/headers.at (export YYLTYPE): New, make sure it does.
18659 * tests/regression.at (%union and --defines, Invalid CPP headers):
18660 Move to...
18661 * tests/headers.at: here.
18662
18663 2001-12-29 Akim Demaille <akim@epita.fr>
18664
18665 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18666
18667 2001-12-29 Akim Demaille <akim@epita.fr>
18668
18669 * tests/actions.at (Mid-rule actions): Output on a single line
18670 instead of several.
18671
18672 2001-12-29 Akim Demaille <akim@epita.fr>
18673
18674 * doc/bison.texinfo: Formatting changes.
18675
18676 2001-12-29 Akim Demaille <akim@epita.fr>
18677
18678 Don't store the token defs in a muscle, just be ready to output it
18679 on command. Now possible via `symbols'. Fixes a memory leak.
18680
18681 * src/output.c (token_definitions_output): New.
18682 (output_parser, header_output): Use it.
18683 * src/reader.c (symbols_save): Remove.
18684
18685 2001-12-29 Akim Demaille <akim@epita.fr>
18686
18687 * src/bison.simple: Do not provide a default for YYSTYPE and
18688 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18689 default.
18690
18691 2001-12-29 Akim Demaille <akim@epita.fr>
18692
18693 Mid-rule actions are simply... ignored!
18694
18695 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18696 the empty-rule associated to the dummy symbol, not to the host
18697 rule.
18698 * tests/actions.at (Mid-rule actions): New.
18699
18700 2001-12-29 Akim Demaille <akim@epita.fr>
18701
18702 Memory leak.
18703
18704 * src/reader.c (reader): Free grammar.
18705
18706 2001-12-29 Akim Demaille <akim@epita.fr>
18707
18708 Memory leak.
18709
18710 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18711 since it allocates it for each state, although only one is needed.
18712 (allocate_storage): Do it here.
18713
18714 2001-12-29 Akim Demaille <akim@epita.fr>
18715
18716 * src/options.h, src/options.c (create_long_option_table): Rename
18717 as...
18718 (long_option_table_new): this, with a clearer prototype.
18719 (percent_table): Remove, unused,
18720 * src/getargs.c (getargs): Adjust.
18721
18722 2001-12-29 Akim Demaille <akim@epita.fr>
18723
18724 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18725 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18726 as states.
18727
18728 2001-12-29 Akim Demaille <akim@epita.fr>
18729
18730 * src/lalr.c (build_relations): Rename `states' as `states1'.
18731 Sorry, I don't understand exactly what it is, no better name...
18732
18733 2001-12-29 Akim Demaille <akim@epita.fr>
18734
18735 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18736 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18737 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18738 as rules.
18739
18740 2001-12-29 Akim Demaille <akim@epita.fr>
18741
18742 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18743 ago.
18744
18745 2001-12-29 Akim Demaille <akim@epita.fr>
18746
18747 * src/reader.c, src/reader.h (user_toknums): Remove.
18748 Adjust all users to use symbols[i]->user_token_number.
18749
18750 2001-12-29 Akim Demaille <akim@epita.fr>
18751
18752 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18753 Adjust all users to use symbols[i]->prec or ->assoc.
18754
18755 2001-12-29 Akim Demaille <akim@epita.fr>
18756
18757 * src/reader.c, src/reader.h (tags): Remove.
18758 Adjust all users to use symbols[i]->tag.
18759
18760 2001-12-29 Akim Demaille <akim@epita.fr>
18761
18762 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18763 and rule_table.
18764 * src/reader.c (packsymbols): Fill this table.
18765 Drop sprec.
18766 * src/conflicts.c (resolve_sr_conflict): Adjust.
18767 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18768 single table.
18769 Use symbols[i]->tag instead of tags[i].
18770
18771 2001-12-29 Akim Demaille <akim@epita.fr>
18772
18773 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18774 In addition, put a comment in there, to replace...
18775 * tests/regression.at (%union and C comments): Remove.
18776
18777 2001-12-29 Akim Demaille <akim@epita.fr>
18778
18779 * tests/regression.at (Web2c Actions): Blindly move the actual
18780 output as expected output. The contents *seem* right to me, but I
18781 can't pretend reading perfectly parser tables... Nonetheless, all
18782 the other tests pass correctly, the table look OK, even though the
18783 presence of `$axiom' is to be noted: AFAICS it is useless (but
18784 harmless).
18785
18786 2001-12-29 Akim Demaille <akim@epita.fr>
18787
18788 * src/reader.c (readgram): Don't add the rule 0 if there were no
18789 rules read. In other words, add it _after_ having performed
18790 grammar sanity checks.
18791 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18792
18793 2001-12-29 Akim Demaille <akim@epita.fr>
18794
18795 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18796 visible, and some states have now a different number.
18797
18798 2001-12-29 Akim Demaille <akim@epita.fr>
18799
18800 * src/reader.c (readgram): Bind the initial rule's lineno to that
18801 of the first rule.
18802 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18803 (Solved SR Conflicts): Adjust rule 0's line number.
18804
18805 2001-12-29 Akim Demaille <akim@epita.fr>
18806
18807 Fix the `GAWK Grammar' failure.
18808
18809 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18810 the reductions of the first state which was mistakenly confused
18811 with the final state because precisely final_state was initialized
18812 to 0.
18813 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18814 now noticed by Bison.
18815 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18816 have a reduction on $default.
18817
18818 2001-12-29 Akim Demaille <akim@epita.fr>
18819
18820 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18821 rule line numbers.
18822 * src/closure.c (print_closure): Likewise.
18823 * src/derives.c (print_derives): Likewise.
18824 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18825 now.
18826
18827 2001-12-29 Akim Demaille <akim@epita.fr>
18828
18829 * src/lalr.c (lookaheads_print): New.
18830 (lalr): Call it when --trace-flag.
18831 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18832 are dumped.
18833
18834 2001-12-29 Akim Demaille <akim@epita.fr>
18835
18836 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18837 when walking through ritem, even via rule->rhs.
18838 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18839 (useful_production, useless_nonterminals): Likewise.
18840 (reduce_grammar_tables): Likewise, plus update nritems.
18841 * src/nullable.c (set_nullable): Likewise.
18842 * src/lalr.c (build_relations): Likewise.
18843 * tests/sets.at (Nullable): Adjust.
18844 Fortunately, now, the $axiom is no longer nullable.
18845
18846 2001-12-29 Akim Demaille <akim@epita.fr>
18847
18848 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18849 the 0-sentinel.
18850 * src/gram.c (ritem_longest_rhs): Likewise.
18851 * src/reduce.c (nonterminals_reduce): Likewise.
18852 * src/print_graph.c (print_graph): Likewise.
18853 * src/output.c (output_rule_data): Likewise.
18854 * src/nullable.c (set_nullable): Likewise.
18855
18856 2001-12-29 Akim Demaille <akim@epita.fr>
18857
18858 * src/output.c: Comment changes.
18859
18860 2001-12-27 Paul Eggert <eggert@twinsun.com>
18861
18862 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18863 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18864 Sparc, as they were causing more porting problems than the
18865 (minor) performance improvement was worth.
18866
18867 Also, catch up with 1.31's YYSTD.
18868
18869 2001-12-27 Akim Demaille <akim@epita.fr>
18870
18871 * src/output.c (output_gram): Rely on nritems, not the
18872 0-sentinel. See below.
18873 Use -1 as separator, not 0.
18874 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18875 Rely on -1 as separator in yyrhs, instead of 0.
18876 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18877 twice `Now at end of input', therefore there are two lines less to
18878 expect.
18879
18880 2001-12-27 Akim Demaille <akim@epita.fr>
18881
18882 * tests/regression.at (Unresolved SR Conflicts):
18883 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18884 below.
18885
18886 2001-12-27 Akim Demaille <akim@epita.fr>
18887
18888 * src/LR0.c (new_state): Recognize the final state by the fact it
18889 is reached by eoftoken.
18890 (insert_start_shifting_state, insert_eof_shifting_state)
18891 (insert_accepting_state, augment_automaton): Remove, since now
18892 these states are automatically computed from the initial state.
18893 (generate_states): Adjust.
18894 * src/print.c: When reporting a rule number to the user, substract
18895 1, so that the axiom rule is rule 0, and the first user rule is 1.
18896 * src/reduce.c: Likewise.
18897 * src/print_graph.c (print_core): For the time being, just as for
18898 the report, depend upon --trace-flags to dump the full set of
18899 items.
18900 * src/reader.c (readgram): Once the grammar read, insert the rule
18901 0: `$axiom: START-SYMBOL $'.
18902 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18903 number of the states has changed (the final state is no longer
18904 necessarily the last), catch up.
18905
18906 2001-12-27 Akim Demaille <akim@epita.fr>
18907
18908 Try to make the use of the eoftoken valid. Given that its value
18909 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18910 is used instead of > 0 where appropriate, (ii), depend upon nritems
18911 instead of the 0-sentinel.
18912
18913 * src/gram.h, src/gram.c (nritems): New.
18914 Expected to be duplication of nitems, but for the time being...
18915 * src/reader.c (packgram): Assert nritems and nitems are equal.
18916 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18917 * src/closure.c (print_closure, print_fderives): Likewise.
18918 * src/gram.c (ritem_print): Likewise.
18919 * src/print.c (print_core, print_grammar): Likewise.
18920 * src/print_graph.c: Likewise.
18921
18922 2001-12-27 Akim Demaille <akim@epita.fr>
18923
18924 * src/main.c (main): If there are complains after grammar
18925 reductions, then output the report anyway if requested, then die.
18926 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18927 * src/reader.c (eoftoken): New.
18928 (parse_token_decl): If the token being defined has value `0', it
18929 is the eoftoken.
18930 (packsymbols): No longer hack `tags' to insert `$' by hand.
18931 Be sure to preserve the value of the eoftoken.
18932 (reader): Make sure eoftoken is defined.
18933 Initialize nsyms to 0: now eoftoken is created just like the others.
18934 * src/print.c (print_grammar): Don't special case the eof token.
18935 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18936 lie anyway, albeit pleasant.
18937 * tests/calc.at: Exercise error messages with eoftoken.
18938 Change the grammar so that empty input is invalid.
18939 Adjust expectations.
18940 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18941
18942 2001-12-27 Akim Demaille <akim@epita.fr>
18943
18944 * configure.in: Check the protos of strchr ans strspn.
18945 Replace strchr if needed.
18946 * src/system.h: Provide the protos of strchr, strspn and memchr if
18947 missing.
18948 * lib/strchr.c: New.
18949 * src/reader.c (symbols_save): Use strchr.
18950
18951 2001-12-27 Akim Demaille <akim@epita.fr>
18952
18953 * src/print.c, src/print_graph.c (escape): New.
18954 Use it to quote the TAGS outputs.
18955 * src/print_graph.c (print_state): Now errors are in red, and
18956 reductions in green.
18957 Prefer high to wide: output the state number on a line of its own.
18958
18959 2001-12-27 Akim Demaille <akim@epita.fr>
18960
18961 * src/state.h, src/state.c (reductions_new): New.
18962 * src/LR0.c (set_state_table): Let all the states have a
18963 `reductions', even if reduced to 0.
18964 (save_reductions): Adjust.
18965 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18966 * src/print.c (print_reductions, print_actions): Adjust.
18967 * src/output.c (action_row): Adjust.
18968
18969 2001-12-27 Akim Demaille <akim@epita.fr>
18970
18971 * src/state.h, src/state.c (errs_new, errs_dup): New.
18972 * src/LR0.c (set_state_table): Let all the states have an errs,
18973 even if reduced to 0.
18974 * src/print.c (print_errs, print_reductions): Adjust.
18975 * src/output.c (output_actions, action_row): Adjust.
18976 * src/conflicts.c (resolve_sr_conflict): Adjust.
18977
18978 2001-12-27 Akim Demaille <akim@epita.fr>
18979
18980 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18981
18982 2001-12-27 Akim Demaille <akim@epita.fr>
18983
18984 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18985 * src/print.c: here.
18986 (lookaheadset, shiftset): New, used as additional storage by
18987 print_reductions.
18988 (print_results): Adjust.
18989 (print_shifts, print_gotos, print_errs): New, extracted from...
18990 (print_actions): here.
18991 * src/print_graph.c (print_actions): Remove dead code.
18992
18993 2001-12-27 Akim Demaille <akim@epita.fr>
18994
18995 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18996 `$n' and `@n'.
18997
18998 2001-12-27 Akim Demaille <akim@epita.fr>
18999
19000 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19001 (build_relations): Adjust.
19002
19003 2001-12-27 Akim Demaille <akim@epita.fr>
19004
19005 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19006 duplication.
19007
19008 2001-12-27 Akim Demaille <akim@epita.fr>
19009
19010 * src/reader.c (packgram): Catch nitems overflows.
19011
19012 2001-12-27 Akim Demaille <akim@epita.fr>
19013
19014 * src/files.c, src/files.h (guard_obstack): Remove.
19015 * src/output.c (output): Adjust.
19016 * src/reader.c (parse_braces): New, factoring...
19017 (copy_action, copy_guard): these two which are renamed as...
19018 (parse_action, parse_guard): these.
19019 As a voluntary consequence, using braces around guards is now
19020 mandatory.
19021
19022 2001-12-27 Akim Demaille <akim@epita.fr>
19023
19024 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19025 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19026 members.
19027 (symbol_list_new): Adjust.
19028 (copy_action): action_line is the first line, not the last.
19029 (copy_guard): Just as for actions, store the `action' only, not
19030 the switch/case/break flesh.
19031 Don't parse the user action that might follow the guard, let...
19032 (readgram): do it, i.e., now, there can be an action after a
19033 guard.
19034 In other words the guard is just explicitly optional.
19035 (packgram): Adjust.
19036 * src/output.c (guards_output): New.
19037 (output_parser): Call it when needed.
19038 (output): Also free the guard and attrs obstacks.
19039 * src/files.c, src/files.h (obstack_save): Remove.
19040 (output_files): Remove.
19041 As a result, if one needs the former `.act' file, using an
19042 appropriate skeleton which requires actions and guards is now
19043 required.
19044 * src/main.c (main): Adjust.
19045 * tests/semantic.at: New.
19046 * tests/regression.at: Use `input.y' as input file name.
19047 Avoid 8+3 problems by requiring input.c when the test needs the
19048 parser.
19049
19050 2001-12-27 Akim Demaille <akim@epita.fr>
19051
19052 * src/reader.c (symbol_list_new): Be sure to initialize all the
19053 fields.
19054
19055 2001-12-27 Akim Demaille <akim@epita.fr>
19056
19057 All the hacks using a final pseudo state are now useless.
19058
19059 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19060 * src/lalr.c (nLA): New.
19061 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19062 instead of lookaheadsp from the pseudo state (nstate + 1).
19063
19064 2001-12-27 Akim Demaille <akim@epita.fr>
19065
19066 * src/output.c (action_row, token_actions): Use a state_t instead
19067 of a integer, and nlookaheads instead of the following state's
19068 lookaheadsp.
19069
19070 2001-12-27 Akim Demaille <akim@epita.fr>
19071
19072 * src/conflicts.c (log_resolution, flush_shift)
19073 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19074 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19075 (conflicts_print, print_reductions): Use a state_t instead of an
19076 integer when referring to a state.
19077 As much as possible, depend upon nlookaheads, instead of the
19078 `lookaheadsp' member of the following state (since lookaheads of
19079 successive states are successive, the difference between state n + 1
19080 and n served as the number of lookaheads for state n).
19081 * src/lalr.c (add_lookback_edge): Likewise.
19082 * src/print.c (print_core, print_actions, print_state)
19083 (print_results): Likewise.
19084 * src/print_graph.c (print_core, print_actions, print_state)
19085 (print_graph): Likewise.
19086 * src/conflicts.h: Adjust.
19087
19088 2001-12-27 Akim Demaille <akim@epita.fr>
19089
19090 * src/bison.hairy: Formatting/comment changes.
19091 ANSIfy.
19092 Remove `register' indications.
19093 Add plenty of `static'.
19094
19095 2001-12-27 Akim Demaille <akim@epita.fr>
19096
19097 * src/output.c (prepare): Drop the muscle `ntbase' which
19098 duplicates ntokens.
19099 * src/bison.simple: Formatting/comment changes.
19100 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19101 is an undocumented synonym.
19102
19103 2001-12-22 Akim Demaille <akim@epita.fr>
19104
19105 * src/output.c (output_table_data): Change the prototype to use
19106 `int' for array ranges: some invocations do pass an int, not a
19107 short.
19108 Reported by Wayne Green.
19109
19110 2001-12-22 Akim Demaille <akim@epita.fr>
19111
19112 Some actions of web2c.y are improperly triggered.
19113 Reported by Mike Castle.
19114
19115 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19116 * tests/regression.at (Web2c): Rename as...
19117 (Web2c Report): this.
19118 (Web2c Actions): New.
19119
19120 2001-12-22 Akim Demaille <akim@epita.fr>
19121
19122 Reductions in web2c.y are improperly reported.
19123 Reported by Mike Castle.
19124
19125 * src/conflicts.c (print_reductions): Fix.
19126 * tests/regression.at (Web2c): New.
19127
19128 2001-12-18 Akim Demaille <akim@epita.fr>
19129
19130 Some host fail on `assert (!"foo")', which expands to
19131 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19132 Reported by Nelson Beebee.
19133
19134 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19135 `#define it_succeeded 0' and `assert (it_succeeded)'.
19136
19137 2001-12-17 Marc Autret <autret_m@epita.fr>
19138
19139 * src/bison.simple: Don't hard code the skeleton line and filename.
19140 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19141 New line counter 'skeleton_line' (skeleton-line muscle).
19142
19143 2001-12-17 Paul Eggert <eggert@twinsun.com>
19144
19145 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19146 YYDEBUG must be defined to a nonzero value.
19147
19148 * src/bison.simple (yytname): Do not assume that the user defines
19149 YYDEBUG to a properly parenthesized expression.
19150
19151 2001-12-17 Akim Demaille <akim@epita.fr>
19152
19153 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19154 nlookaheads is a new member.
19155 Adjust all users.
19156 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19157 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19158 state.
19159
19160 2001-12-17 Akim Demaille <akim@epita.fr>
19161
19162 * src/files.h, src/files.c (open_files, close_files): Remove.
19163 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19164 let...
19165 * src/reader.c (reader): Do it.
19166
19167 2001-12-17 Akim Demaille <akim@epita.fr>
19168
19169 * src/conflicts.c (print_reductions): Formatting changes.
19170
19171 2001-12-17 Akim Demaille <akim@epita.fr>
19172
19173 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19174 (flush_reduce): New.
19175 (resolve_sr_conflict): Adjust.
19176
19177 2001-12-17 Akim Demaille <akim@epita.fr>
19178
19179 * src/output.c (output_obstack): Be static and rename as...
19180 (format_obstack): this, to avoid any confusion with files.c's
19181 output_obstack.
19182 * src/reader.h (muscle_obstack): Move to...
19183 * src/output.h: here, since it's defined in output.c.
19184
19185 2001-12-17 Akim Demaille <akim@epita.fr>
19186
19187 * src/output.c (action_row, save_column, default_goto)
19188 (sort_actions, matching_state, pack_vector): Better variable
19189 locality.
19190
19191 2001-12-17 Akim Demaille <akim@epita.fr>
19192
19193 * src/output.c: Various formatting changes.
19194
19195 2001-12-17 Akim Demaille <akim@epita.fr>
19196
19197 * src/files.c (output_files): Free the output_obstack.
19198 * src/main.c (main): Call print and print_graph conditionally.
19199 * src/print.c (print): Work unconditionally.
19200 * src/print_graph.c (print_graph): Work unconditionally.
19201 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19202
19203 2001-12-16 Marc Autret <autret_m@epita.fr>
19204
19205 * src/output.c (actions_output): Fix. When we use %no-lines,
19206 there is one less line per action.
19207
19208 2001-12-16 Marc Autret <autret_m@epita.fr>
19209
19210 * src/bison.simple: Remove a useless #line directive.
19211 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19212 * src/output.c (get_lines_number): New.
19213 (output_parser): Adjust, now takes care about the lines of a
19214 output muscles.
19215 Fix line numbering.
19216 (actions_output): Computes the number of lines taken by actions.
19217 (output_master_parser): Insert new skeleton which is the name of
19218 the output parser file name.
19219
19220 2001-12-15 Marc Autret <autret_m@epita.fr>
19221
19222 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19223
19224 2001-12-15 Marc Autret <autret_m@epita.fr>
19225
19226 * src/output.c (output_gram): Keep track of the hairy one.
19227
19228 2001-12-15 Akim Demaille <akim@epita.fr>
19229
19230 Make `make distcheck' work.
19231
19232 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19233 system.h which uses libgettext.h.
19234
19235 2001-12-15 Akim Demaille <akim@epita.fr>
19236
19237 * src/nullable.c (set_nullable): Useless rules must be skipped,
19238 otherwise, since we range over their symbols, we might look at a
19239 nonterminal which no longer ``exists'', i.e., it is not counted in
19240 `nvars', hence we overflow our arrays.
19241
19242 2001-12-15 Akim Demaille <akim@epita.fr>
19243
19244 The header can also be produced directly, without any obstack!
19245 Yahoo!
19246
19247 * src/files.c, src/files.h (defines_obstack): Remove.
19248 (compute_header_macro): Global.
19249 (defines_obstack_save): Remove.
19250 * src/reader.c (parse_union_decl): No longer output to
19251 defines_obstack: its content can be found in the `stype' muscle
19252 anyway.
19253 (output_token_translations): Merge into...
19254 (symbols_output): this.
19255 Rename as...
19256 (symbols_save): this.
19257 (reader): Adjust.
19258 * src/output.c (header_output): New.
19259 (output): Call it.
19260
19261 2001-12-15 Akim Demaille <akim@epita.fr>
19262
19263 * src/reader.c (parse_union_decl): Instead of handling two obstack
19264 simultaneously, use one to define the `stype' muscle, and use the
19265 value of the latter to fill defines_obstack.
19266 (copy_comment): Remove.
19267 (copy_comment2): Work for a single obstack.
19268 Rename as...
19269 (copy_comment): this.
19270
19271 2001-12-15 Akim Demaille <akim@epita.fr>
19272
19273 * src/lex.c, src/lex.h (xgetc): No longer static.
19274 * src/reader.c (parse_union_decl): Revamp.
19275
19276 2001-12-15 Akim Demaille <akim@epita.fr>
19277
19278 Still making progress in separating Bison into (i) input, (ii)
19279 process, (iii) output: now we can directly output the parser file
19280 without using table_obstack at all.
19281
19282 * src/files.c, src/files.h (table_obstack): Bye bye.
19283 (parser_file_name): New.
19284 * src/files.c (compute_output_file_names): Compute it.
19285 * src/output.c (actions_output, output_parser)
19286 (output_master_parser): To a file instead of an obstack.
19287
19288 2001-12-15 Akim Demaille <akim@epita.fr>
19289
19290 Attach actions to rules, instead of pre-outputting them to
19291 actions_obstack.
19292
19293 * src/gram.h (rule_t): action and action_line are new members.
19294 * src/reader.c (symbol_list): Likewise.
19295 (copy_action): Save the actions within the rule.
19296 (packgram): Save them in rule_table.
19297 * src/output.c (actions_output): New.
19298 (output_parser): Use it on `%%actions'.
19299 (output_rule_data): Don't free rule_table.
19300 (output): Do it.
19301 (prepare): Don't save the `action' muscle.
19302 * src/bison.simple: s/%%action/%%actions/.
19303
19304 2001-12-15 Akim Demaille <akim@epita.fr>
19305
19306 * src/reader.c (copy_action): When --yacc, don't append a `;'
19307 to the user action: let it fail if lacking.
19308 Suggested by Arnold Robbins and Tom Tromey.
19309
19310 2001-12-14 Akim Demaille <akim@epita.fr>
19311
19312 * src/lex.c (literalchar): Simply return the char you decoded, non
19313 longer mess around with obstacks and int pointers.
19314 Adjust all callers.
19315
19316 2001-12-14 Akim Demaille <akim@epita.fr>
19317
19318 * src/lex.c (literalchar): Don't escape the special characters,
19319 just decode them, and keep them as char (before, eol was output as
19320 the 2 char string `\n' etc.).
19321 * src/output.c (output_rule_data): Use quotearg to output the
19322 token strings.
19323
19324 2001-12-13 Paul Eggert <eggert@twinsun.com>
19325
19326 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19327 Do not infringe on the global user namespace when using C++.
19328 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19329 All uses of `fprintf' and `stderr' changed.
19330
19331 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19332
19333 2001-12-13 Akim Demaille <akim@epita.fr>
19334
19335 The computation of nullable is broken: it doesn't handle empty
19336 RHS's properly.
19337
19338 * tests/torture.at (GNU AWK Grammar): New.
19339 * tests/sets.at (Nullable): New.
19340 * src/nullable.c (set_nullable): Instead of blindly looping over
19341 `ritems', loop over the rules, and then over their rhs's.
19342
19343 Work around Autotest bugs.
19344
19345 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19346 frame, because Autotest understand lines starting with a `+' as
19347 traces from the shell. Then, they are not processed properly.
19348 Admittedly an Autotest bug, but we don't have time to wait for
19349 Autotest to catch up.
19350 * tests/regression.at (Broken Closure): Adjust to the new table
19351 frames.
19352 Move to...
19353 * tests/sets.at: here.
19354
19355 2001-12-13 Akim Demaille <akim@epita.fr>
19356
19357 * src/closure.c (closure): Use nrules instead of playing tricks
19358 with BITS_PER_WORD.
19359
19360 2001-12-13 Akim Demaille <akim@epita.fr>
19361
19362 * src/print.c (print_actions): Output the handling of `$' as the
19363 traces do: shifting the token EOF. Before EOF was treated as a
19364 nonterminal.
19365 * tests/regression.at: Adjust some tests.
19366 * src/print_graph.c (print_core): Complete the set of items via
19367 closure. The next-to-final and final states are still unsatisfying,
19368 but that's to be addressed elsewhere.
19369 No longer output the rule numbers, but do output the state number.
19370 A single loop for the shifts + gotos is enough, but picked a
19371 distinct color for each.
19372 (print_graph): Initialize and finalize closure.
19373
19374 2001-12-13 Akim Demaille <akim@epita.fr>
19375
19376 * src/reader.c (readgram): Remove dead code, an strip useless
19377 braces.
19378 (get_type): Remove, unused.
19379
19380 2001-12-12 Akim Demaille <akim@epita.fr>
19381
19382 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19383 on that of lib/error.c.
19384
19385 2001-12-12 Akim Demaille <akim@epita.fr>
19386
19387 Some hosts don't like `/' in includes.
19388
19389 * src/system.h: Include libgettext.h without qualifying the path.
19390 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19391 $(top_srcdir).
19392
19393 2001-12-11 Marc Autret <autret_m@epita.fr>
19394
19395 * src/output.c (output_parser): Remove useless muscle.
19396
19397 2001-12-11 Marc Autret <autret_m@epita.fr>
19398
19399 * src/bison.simple: Remove #line just before %%epilogue. It
19400 is now handled in ...
19401 * src/reader.c (read_additionnal_code): Add the output of a
19402 #line for the epilogue.
19403
19404 2001-12-10 Marc Autret <autret_m@epita.fr>
19405
19406 * src/reader.c (copy_definition): Re-use CPP-outed code which
19407 replace precedent remove.
19408 * src/bison.simple: Remove #line before %%prologue because
19409 %%input-line is wrong at this time.
19410
19411 2001-12-10 Marc Autret <autret_m@epita.fr>
19412
19413 * src/reader.c (symbols_output): Clean up.
19414 * src/output.c (output_gram, output): Clean up.
19415
19416 2001-12-10 Akim Demaille <akim@epita.fr>
19417
19418 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19419 * src/LR0.c (set_state_table): here.
19420 * src/lalr.c (lalr): Call it.
19421
19422 2001-12-10 Akim Demaille <akim@epita.fr>
19423
19424 * src/state.h (shifts): Remove the `number' member: shifts are
19425 attached to state, hence no longer need to be labelled with a
19426 state number.
19427
19428 2001-12-10 Akim Demaille <akim@epita.fr>
19429
19430 Now that states have a complete set of members, the linked list of
19431 shifts is useless: just fill directly the state's shifts member.
19432
19433 * src/state.h (shifts): Remove the `next' member.
19434 * src/LR0.c (first_state, last_state): Remove.
19435 Adjust the callers.
19436 (augment_automaton): Don't look for the shifts that must be added
19437 a shift on EOF: it is those of the state we looked for! But now,
19438 since shifts are attached, it is no longer needed to looking
19439 merely by its id: its number.
19440
19441 2001-12-10 Akim Demaille <akim@epita.fr>
19442
19443 * src/LR0.c (augment_automaton): Better variable locality.
19444 Remove an impossible branch: if there is a state corresponding to
19445 the start symbol being shifted, then there is shift for the start
19446 symbol from the initial state.
19447
19448 2001-12-10 Akim Demaille <akim@epita.fr>
19449
19450 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19451 only when appropriate: when insert_start_shifting_state' is not
19452 invoked.
19453 * tests/regression.at (Rule Line Numbers): Adjust.
19454
19455 2001-12-10 Akim Demaille <akim@epita.fr>
19456
19457 * src/LR0.c (augment_automaton): Now that all states have shifts,
19458 merge the two cases addition shifts to the initial state.
19459
19460 2001-12-10 Akim Demaille <akim@epita.fr>
19461
19462 * src/lalr.c (set_state_table): Move to...
19463 * src/LR0.c: here.
19464 * src/lalr.c (lalr): Don't call it...
19465 * src/LR0.c (generate_states): do it.
19466 * src/LR0.h (first_state): Remove, only the table is used.
19467
19468 2001-12-10 Akim Demaille <akim@epita.fr>
19469
19470 * src/LR0.h (first_shift, first_reduction): Remove.
19471 * src/lalr.c: Don't use first_shift: find shifts through the
19472 states.
19473
19474 2001-12-10 Akim Demaille <akim@epita.fr>
19475
19476 * src/LR0.c: Attach shifts to states as soon as they are
19477 computed.
19478 * src/lalr.c (set_state_table): Instead of assigning shifts to
19479 state, just assert that the mapping was properly done.
19480
19481 2001-12-10 Akim Demaille <akim@epita.fr>
19482
19483 * src/LR0.c (insert_start_shift): Rename as...
19484 (insert_start_shifting_state): this.
19485 (insert_eof_shifting_state, insert_accepting_state): New.
19486 (augment_automaton): Adjust.
19487 Better locality of the variables.
19488 When looking if the start_symbol is shifted from the initial
19489 state, using `while (... symbol != start_symbol ...)' sounds
19490 better than `while (... symbol < start_symbol ...)': If fail
19491 to see how the order between symbols could be relevant!
19492
19493 2001-12-10 Akim Demaille <akim@epita.fr>
19494
19495 * src/getargs.h: Don't declare `spec_name_prefix' and
19496 `spec_file_prefix', declared by src/files.h.
19497 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19498 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19499 * src/output.c (prepare): Adjust.
19500 * src/reader.c (symbols_output): Likewise.
19501 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19502
19503 2001-12-10 Akim Demaille <akim@epita.fr>
19504
19505 * src/muscle_tab.c (muscle_init): NULL is a better default than
19506 `"0"'.
19507
19508 2001-12-10 Akim Demaille <akim@epita.fr>
19509
19510 * src/reader.c (reader): Calling symbols_output once is enough.
19511
19512 2001-12-10 Akim Demaille <akim@epita.fr>
19513
19514 Now that states have a complete set of members, the linked list of
19515 reductions is useless: just fill directly the state's reductions
19516 member.
19517
19518 * src/state.h (struct reductions): Remove member `number' and
19519 `next'.
19520 * src/LR0.c (first_reduction, last_reduction): Remove.
19521 (save_reductions): Don't link the new reductions, store them in
19522 this_state.
19523 * src/lalr.c (set_state_table): No need to attach reductions to
19524 states, it's already done.
19525 * src/output.c (output_actions): No longer free the shifts, then
19526 the reductions, then the states: free all the states and their
19527 members.
19528
19529 2001-12-10 Akim Demaille <akim@epita.fr>
19530
19531 * src/options.c (OPTN, DRTV, BOTH): New.
19532 (option_table): Use them.
19533
19534 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19535 the job of system.h.
19536 * src/options.c: Don't include stdio.h and xalloc.h for the same
19537 reasons.
19538
19539 2001-12-10 Akim Demaille <akim@epita.fr>
19540
19541 * src/output.c (output, prepare): Make sure the values of the
19542 muscles `action' and `prologue' are 0-terminated.
19543
19544 2001-12-10 Akim Demaille <akim@epita.fr>
19545
19546 Clean up GCC warnings.
19547
19548 * src/reader.c (copy_action): `buf' is not used.
19549 (parse_skel_decl): Be static.
19550 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19551 * src/options.h (create_long_option_table): Have a real prototype.
19552 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19553 (hash_delete_at): Return const void *.
19554 Adjust casts to preserve the const.
19555
19556 2001-12-10 Akim Demaille <akim@epita.fr>
19557
19558 * configure.in: Require 2.52g.
19559 M4 is not needed, but AUTOM4TE is.
19560 * m4/m4.m4: Remove.
19561 * tests/Makefile.am: Adjust.
19562
19563 2001-12-10 Akim Demaille <akim@epita.fr>
19564
19565 One structure for states is enough, even though theoretically
19566 there are LR(0) states and LALR(1) states.
19567
19568 * src/lalr.h (state_t): Remove.
19569 (state_table): Be state_t **, not state_t *.
19570 * src/state.h (core, CORE_ALLOC): Rename as...
19571 (state_t, STATE_ALLOC): this.
19572 Add the LALR(1) members: shifts, reductions, errs.
19573 * src/LR0.c (state_table): Rename as...
19574 (state_hash): this, to avoid name clashes with the global
19575 `state_table'.
19576 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19577 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19578
19579 2001-12-10 Akim Demaille <akim@epita.fr>
19580
19581 Bison dumps core on bash.y.
19582 Reported by Pascal Bart.
19583
19584 * src/warshall.c (bitmatrix_print): New.
19585 (TC): Use it.
19586 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19587 j must be the outer loop.
19588 * tests/regression.at (Broken Closure): New.
19589
19590 2001-12-05 Akim Demaille <akim@epita.fr>
19591
19592 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19593 its argument.
19594 Reported by Peter Hamorsky.
19595
19596 2001-12-05 Akim Demaille <akim@epita.fr>
19597
19598 * src/conflicts.c (err_table): Remove.
19599 (resolve_sr_conflict): Adjust.
19600 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19601 Rename as...
19602 (state_t.reductions, state_t.shifts): this.
19603
19604 2001-12-05 Akim Demaille <akim@epita.fr>
19605
19606 * src/reduce.c (reduce_grammar_tables): No longer disable the
19607 removal of useless rules via CPP but via `if (0)', so that the
19608 compiler still check the code is valid.
19609 For instance, it should have noticed `rline' no longer exists: use
19610 the `line' member of rule_t.
19611 * src/gram.c (dummy, rline): Remove, unused.
19612
19613 2001-12-05 Akim Demaille <akim@epita.fr>
19614
19615 * src/output.c (pack_vector): Use assert, not berror.
19616 * src/main.c (berror): Remove, unused.
19617
19618 2001-12-05 Akim Demaille <akim@epita.fr>
19619
19620 New experimental feature: if --verbose --trace output all the
19621 items of a state, not only its kernel.
19622
19623 * src/print.c (print_core): If `trace_flag', then invoke closure
19624 before outputting the items of the state (print_core is no longer
19625 a correct name them).
19626 (print_results): Invoke new_closure/free_closure if needed.
19627
19628 2001-12-05 Akim Demaille <akim@epita.fr>
19629
19630 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19631 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19632 (nitemset): for consistency with the rest of the project.
19633
19634 2001-12-05 Akim Demaille <akim@epita.fr>
19635
19636 * src/closure.c (print_closure): Improve.
19637 (closure): Use it for printing input and output.
19638
19639 2001-12-05 Akim Demaille <akim@epita.fr>
19640
19641 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19642 indexed by nonterminals.
19643
19644 2001-12-05 Akim Demaille <akim@epita.fr>
19645
19646 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19647 what it was!).
19648 * src/warshall.h: Remove accidental duplication of the content.
19649
19650 2001-12-05 Akim Demaille <akim@epita.fr>
19651
19652 * src/closure.c (set_fderives): De-obfuscate.
19653
19654 2001-12-05 Akim Demaille <akim@epita.fr>
19655
19656 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19657
19658 2001-12-05 Akim Demaille <akim@epita.fr>
19659
19660 * src/closure.c (set_firsts): De-obfuscate.
19661
19662 2001-12-05 Akim Demaille <akim@epita.fr>
19663
19664 * src/output.c (action_row): De-obfuscate
19665 using the good o' techniques: arrays not pointers, variable
19666 locality, BITISSET, RESETBIT etc.
19667
19668 2001-12-05 Akim Demaille <akim@epita.fr>
19669
19670 Pessimize the code to simplify it: from now on, all the states
19671 have a valid SHIFTS, which NSHIFTS is possibly 0.
19672
19673 * src/LR0.c (shifts_new): Be global and move to..
19674 * src/state.c, src/state.h: here.
19675 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19676 * src/print_graph: Adjust.
19677
19678 2001-12-05 Akim Demaille <akim@epita.fr>
19679
19680 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19681 * src/conflicts.c: Use it.
19682 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19683 incorrectly ``simplified''.
19684
19685 2001-12-05 Akim Demaille <akim@epita.fr>
19686
19687 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19688 using the good o' techniques: arrays not pointers, variable
19689 locality, BITISSET, RESETBIT etc.
19690
19691 2001-12-05 Akim Demaille <akim@epita.fr>
19692
19693 * src/state.h (SHIFT_SYMBOL): New.
19694 * src/conflicts.c: Use it to deobfuscate.
19695
19696 2001-12-05 Akim Demaille <akim@epita.fr>
19697
19698 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19699 (print_reductions): De-obfuscate using the good o' techniques:
19700 arrays not pointers, variable locality, BITISSET.
19701
19702 2001-12-05 Akim Demaille <akim@epita.fr>
19703
19704 * src/conflicts.c (print_reductions): Arrays, not pointers.
19705 Use BITISSET.
19706
19707 2001-12-05 Akim Demaille <akim@epita.fr>
19708
19709 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19710
19711 2001-12-05 Akim Demaille <akim@epita.fr>
19712
19713 * src/conflicts.c (print_reductions): Improve variable locality.
19714
19715 2001-12-05 Akim Demaille <akim@epita.fr>
19716
19717 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19718
19719 2001-12-05 Akim Demaille <akim@epita.fr>
19720
19721 * src/conflicts.c (print_reductions): Improve variable locality.
19722
19723 2001-12-05 Akim Demaille <akim@epita.fr>
19724
19725 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19726 * src/lalr.c: Use them.
19727
19728 2001-12-05 Akim Demaille <akim@epita.fr>
19729
19730 * src/LR0.c (augment_automaton): Formatting changes.
19731 Better variable locality.
19732
19733 2001-12-05 Akim Demaille <akim@epita.fr>
19734
19735 * src/lalr.c (matrix_print): New.
19736 (transpose): Use it.
19737 Use arrays instead of pointers.
19738
19739 2001-12-05 Akim Demaille <akim@epita.fr>
19740
19741 * src/lalr.c (maxrhs): Move to...
19742 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19743 * src/lalr.c (build_relations): Adjust.
19744
19745 2001-12-05 Akim Demaille <akim@epita.fr>
19746
19747 * src/lalr.c (transpose): Free the memory allocated to the
19748 argument, as it is replaced by the results by the unique caller.
19749 (build_relations): Merely invoke transpose: it handles the memory
19750 deallocation.
19751 Improve variable locality.
19752 Avoid variables used as mere abbreviations.
19753 (compute_lookaheads): Use arrays instead of pointers.
19754
19755 2001-12-05 Akim Demaille <akim@epita.fr>
19756
19757 * src/lalr.c (initialize_F): Improve variable locality.
19758 Avoid variables used as mere abbreviations.
19759
19760 2001-12-05 Akim Demaille <akim@epita.fr>
19761
19762 * src/derives.c (print_derives): Display the ruleno.
19763 * src/lalr.c (initialize_F, transpose): Better variable locality
19764 to improve readability.
19765 Avoid variables used as mere abbreviations.
19766
19767 2001-12-05 Akim Demaille <akim@epita.fr>
19768
19769 * src/lalr.c (traverse): Use arrays instead of pointers.
19770
19771 2001-12-05 Akim Demaille <akim@epita.fr>
19772
19773 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19774 the handling of squeue.
19775 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19776
19777 2001-12-05 Akim Demaille <akim@epita.fr>
19778
19779 Because useless nonterminals are now kept alive (instead of being
19780 `destroyed'), we now sometimes examine them, and store information
19781 related to them. Hence we need to know their number, and adjust
19782 memory allocations.
19783
19784 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19785 static.
19786 * src/LR0.c (allocate_itemsets): The memory allocated to
19787 `symbol_count' was used for two different purpose: once to count
19788 the number of occurrences of each symbol, and later reassigned to
19789 `shift_symbol', containing the symbol that can be shifted from a
19790 given state.
19791 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19792 only, and...
19793 (new_itemsets): Allocate `shift_symbol' here.
19794 (allocate_itemsets): symbol_count includes useless nonterminals.
19795 Make room for them.
19796 (free_storage): Use `free', not `XFREE', for pointers that cannot
19797 be null.
19798
19799 2001-12-05 Akim Demaille <akim@epita.fr>
19800
19801 * src/nullable.c (set_nullable): Deobfuscate the handling of
19802 ritem.
19803 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19804
19805 2001-12-05 Akim Demaille <akim@epita.fr>
19806
19807 * src/gram.c, src/gram.h (ritem_print): New.
19808 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19809 (This useless function was defined only to work around VMS linkers
19810 that can't handle compilation units with variables only).
19811 * src/reduce.c (dump_grammar): Use it to trace the construction of
19812 ritem.
19813
19814 2001-12-04 Paul Eggert <eggert@twinsun.com>
19815
19816 * src/bison.simple (union yyalloc): Change member names
19817 to be the same as the stack names.
19818 (yyparse): yyptr is now union yyalloc *, not char *.
19819 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19820 and may generate better code on some machines.
19821 (yystpcpy): Use prototype if __STDC__ is defined, not just
19822 if __cplusplus is defined.
19823
19824 2001-11-30 Akim Demaille <akim@epita.fr>
19825
19826 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19827 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19828 Gettext doesn't compile cleanly, and dies with -Werror.
19829 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19830 Include WARNING_CFLAGS here.
19831 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19832 before being defined.
19833
19834 2001-11-27 Paul Eggert <eggert@twinsun.com>
19835
19836 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19837 First arg is int, not unsigned.
19838 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19839 (SIZE_MAX, UINT_MAX): New macros.
19840 (quotearg_n_options): Abort if N is negative.
19841 Avoid overflow check on hosts where size_t is 64 bits and int
19842 is 32 bits, as overflow is impossible there.
19843 Fix off-by-one typo that caused unnecessary reallocation.
19844
19845 2001-11-29 Paul Eggert <eggert@twinsun.com>
19846
19847 Name space cleanup in generated parser.
19848
19849 * doc/bison.texinfo (Bison Parser): Discuss system headers
19850 and their effect on the user name space.
19851
19852 * src/bison.simple:
19853 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19854 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19855 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19856
19857 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19858 on user names when possible.
19859
19860 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19861 Simplify test for whather <alloca.h> exists.
19862
19863 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19864
19865 (<stdio.h>): Include if YYDEBUG.
19866
19867 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19868 ! defined (yyoverflow) && ! defined (yymemcpy).
19869
19870 (yymemcpy, yyparse): Rename local variables as needed so that
19871 they all begin with 'yy'.
19872
19873 (yystrlen, yystpcpy): New functions.
19874
19875 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19876 All uses changed.
19877
19878 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19879 instead of relying on string.h functions. Use YYSTACK_ALLOC
19880 and YYSTACK_FREE instead of malloc and free.
19881
19882 2001-11-30 Akim Demaille <akim@epita.fr>
19883
19884 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19885 before their first uses.
19886 (YYBISON, YYPURE): Move to the top of the output.
19887
19888 2001-11-30 Akim Demaille <akim@epita.fr>
19889
19890 * tests/reduce.at (Useless Nonterminals): Fix.
19891
19892 2001-11-30 Akim Demaille <akim@epita.fr>
19893
19894 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19895 if body instead of `;' to pacify GCC's warnings.
19896
19897 2001-11-30 Akim Demaille <akim@epita.fr>
19898
19899 Instead of mapping the LHS of unused rules to -1, keep the LHS
19900 valid, but flag the rules as invalid.
19901
19902 * src/gram.h (rule_t): `useful' is a new member.
19903 * src/print.c (print_grammar): Adjust.
19904 * src/derives.c (set_derives): Likewise.
19905 * src/reader.c (packgram, reduce_output): Likewise.
19906 * src/reduce.c (reduce_grammar_tables): Likewise.
19907 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19908
19909 2001-11-30 Akim Demaille <akim@epita.fr>
19910
19911 * src/reduce.c (reduce_output): Formatting changes.
19912 * src/print.c (print_results, print_grammar): Likewise.
19913 * tests/regression.at (Rule Line Numbers)
19914 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19915
19916 2001-11-30 Akim Demaille <akim@epita.fr>
19917
19918 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19919 useless nonterminals, move them at the end of the symbol arrays.
19920 (reduce_output): Adjust.
19921 * tests/reduce.at (Useless Nonterminals): Adjust.
19922
19923 2001-11-30 Akim Demaille <akim@epita.fr>
19924
19925 * src/reduce.c: Various comment/formatting changes.
19926 (nonterminals_reduce): New, extracted from...
19927 (reduce_grammar_tables): here.
19928 (reduce_grammar): Call nonterminals_reduce.
19929
19930 2001-11-29 Paul Eggert <eggert@twinsun.com>
19931
19932 * src/bison.simple (YYSTACK_REALLOC): Remove.
19933 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19934 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19935 New macros.
19936 (union yyalloc): New type.
19937 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19938 an arbitrary restriction on hosts where size_t is wider than int.
19939
19940 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19941 a parser stack overflow. Allocate just one block of memory for all
19942 three stacks, instead of allocating three blocks; this typically is
19943 faster and reduces fragmentation.
19944
19945 Do not limit the number of items in the stack to a value that fits
19946 in 'int', as this is an arbitrary limit on hosts with 64-bit
19947 size_t and 32-bit int.
19948
19949 2001-11-29 Marc Autret <autret_m@epita.fr>
19950
19951 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19952 of defining YYERROR_VERBOSE.
19953 [AT_DATA]: $4 is now out of C declarations in the prologue.
19954
19955 2001-11-28 Marc Autret <autret_m@epita.fr>
19956
19957 * src/reader.c (parse_dquoted_param): New.
19958 (parse_skel_decl): Use it.
19959 * src/lex.h: Add its prototype.
19960 * src/lex.c (literalchar): Become not static.
19961
19962 2001-11-28 Marc Autret <autret_m@epita.fr>
19963
19964 * src/output.h: And put its extern declaration here.
19965 * src/output.c (error_verbose): Define here.
19966 (prepare): Echo name modification.
19967 * src/getargs.h: Clean its extern declaration.
19968 * src/getargs.c (error_verbose_flag): Remove.
19969 (getargs): Remove case 'e'.
19970 * src/options.c (option_table): 'error-verbose' is now seen as simple
19971 percent option.
19972 Include output.h.
19973
19974 * src/reader.c (read_declarations): Remove case tok_include.
19975 (parse_include_decl): Remove.
19976 * src/lex.h (token_t): Remove tok_include.
19977 * src/options.c (option_table): 'include' is now a simple command line
19978 option.
19979
19980 2001-11-28 Marc Autret <autret_m@epita.fr>
19981
19982 * src/bison.simple: Adjust muscle names.
19983 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19984 * src/output.c (prepare): s/_/-/ for the muscles names.
19985 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19986
19987 2001-11-28 Marc Autret <autret_m@epita.fr>
19988
19989 * src/bison.simple: Fix debug.
19990 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19991
19992 2001-11-28 Akim Demaille <akim@epita.fr>
19993
19994 * src/LR0.c (shifts_new): New.
19995 (save_shifts, insert_start_shift, augment_automaton): Use it.
19996
19997 2001-11-28 Akim Demaille <akim@epita.fr>
19998
19999 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20000 keep ruleno only.
20001
20002 2001-11-28 Akim Demaille <akim@epita.fr>
20003
20004 * src/closure.c (closure): Instead of looping over word in array
20005 then bits in words, loop over bits in array.
20006
20007 2001-11-28 Akim Demaille <akim@epita.fr>
20008
20009 * src/closure.c (closure): No longer optimize the special case
20010 where all the bits of `ruleset[r]' are set to 0, to make the code
20011 clearer.
20012
20013 2001-11-28 Akim Demaille <akim@epita.fr>
20014
20015 * src/closure.c (closure): `r' and `c' are new variables, used to
20016 de-obfuscate accesses to RULESET and CORE.
20017
20018 2001-11-28 Akim Demaille <akim@epita.fr>
20019
20020 * src/reduce.c (reduce_print): Use ngettext.
20021 (dump_grammar): Improve the trace accuracy.
20022
20023 2001-11-28 Akim Demaille <akim@epita.fr>
20024
20025 * src/reduce.c (dump_grammar): Don't translate trace messages.
20026
20027 2001-11-28 Akim Demaille <akim@epita.fr>
20028
20029 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20030 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20031 as all tags are free'ed afterwards.
20032 From Enrico Scholz.
20033
20034 2001-11-27 Paul Eggert <eggert@twinsun.com>
20035
20036 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20037 use alloca when we didn't want to, and vice versa.
20038
20039 2001-11-27 Marc Autret <autret_m@epita.fr>
20040
20041 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20042 initialization.
20043 * src/output.c (prepare): Remove its update.
20044
20045 2001-11-27 Marc Autret <autret_m@epita.fr>
20046
20047 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20048 Use %error-verbose.
20049
20050 2001-11-27 Marc Autret <autret_m@epita.fr>
20051
20052 * src/bison.simple: Remove YYERROR_VERBOSE using.
20053 Use %%error_verbose.
20054 (yyparse): Likewise.
20055 * src/output.c (prepare): Give its final value.
20056 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20057 * src/getargs.h: Add its extern declaration.
20058 * src/getargs.c (error_verbose_flag): New int.
20059 (getargs): Update to catch new case.
20060 * src/options.c (option_table): 'error-verbose' is a new option.
20061 (shortopts): Update.
20062
20063 2001-11-27 Akim Demaille <akim@epita.fr>
20064
20065 * src/system.h: Use intl/libgettext.h.
20066 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20067
20068 2001-11-27 Akim Demaille <akim@epita.fr>
20069
20070 * tests/torture.at (Exploding the Stack Size with Malloc):
20071 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20072
20073 2001-11-27 Akim Demaille <akim@epita.fr>
20074
20075 * src/files.c: Include error.h.
20076 Reported by Hans Aberg.
20077
20078 2001-11-26 Marc Autret <autret_m@epita.fr>
20079
20080 * src/reader.c (parse_include_decl): New, not yet implemented.
20081 (read_declarations): Add case tok_include.
20082 * src/getargs.h (include): Add its extern definition.
20083 * src/getargs.c (include): New const char *.
20084 (getargs): Add case '-I'.
20085 * src/options.c (option_table): Add include as command line and
20086 percent option.
20087 * src/lex.h (token_t): Add tok_include.
20088
20089 2001-11-26 Akim Demaille <akim@epita.fr>
20090
20091 * src/reader.c (readgram): Make sure rules for mid-rule actions
20092 have a lineno equal to that of their host rule.
20093 Reported by Hans Aberg.
20094 * tests/regression.at (Rule Line Numbers): New.
20095
20096 2001-11-26 Akim Demaille <akim@epita.fr>
20097
20098 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20099 size_ts.
20100
20101 2001-11-26 Akim Demaille <akim@epita.fr>
20102
20103 * src/complain.c, src/complain.h (error): Remove, provided by
20104 lib/error.[ch].
20105
20106 2001-11-26 Akim Demaille <akim@epita.fr>
20107
20108 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20109 issue an error message.
20110 * tests/regression.at (Invalid %directive): New.
20111 Reported by Hans Aberg.
20112
20113 2001-11-26 Akim Demaille <akim@epita.fr>
20114
20115 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20116 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20117
20118 2001-11-26 Akim Demaille <akim@epita.fr>
20119
20120 * src/conflicts.c (conflicts_print): Don't complain at all when
20121 there are no reduce/reduce conflicts, and as many shift/reduce
20122 conflicts as expected.
20123 * tests/regression.at (%expect right): Adjust.
20124
20125 2001-11-23 Akim Demaille <akim@epita.fr>
20126
20127 * lib/alloca.c: Update, from fileutils.
20128
20129 2001-11-23 Akim Demaille <akim@epita.fr>
20130
20131 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20132
20133 2001-11-23 Akim Demaille <akim@epita.fr>
20134
20135 * src/system.h: Include alloca.h.
20136 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20137
20138 2001-11-23 Akim Demaille <akim@epita.fr>
20139
20140 * src/print_graph.c (print_actions): Remove `rule', unused.
20141 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20142 pacify GCC's signed < unsigned warnings.
20143 * src/closure.c (itemsetsize): Likewise.
20144 * src/reader.c (symbol_list_new): Static.
20145
20146 2001-11-23 Akim Demaille <akim@epita.fr>
20147
20148 Attaching lineno to buckets is stupid, since only one copy of each
20149 symbol is kept, only the line of the first occurrence is kept too.
20150
20151 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20152 * src/reader.c (rline_allocated): Remove, unused.
20153 (symbol_list): Have a `line' member.
20154 (symbol_list_new): New.
20155 (readgram): Use it.
20156 * src/print.c (print_grammar): Output the rule line numbers.
20157 * tests/regression.at (Solved SR Conflicts)
20158 (Unresolved SR Conflicts): Adjust.
20159 Reported by Hans Aberg.
20160
20161 2001-11-22 Marc Autret <autret_m@epita.fr>
20162
20163 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20164
20165 2001-11-22 Marc Autret <autret_m@epita.fr>
20166
20167 * src/muscle_tab.c (muscle_init): Remove initialization of
20168 skeleton muscle.
20169 * src/output.c (output_master_parser): Do it here.
20170
20171 2001-11-20 Akim Demaille <akim@epita.fr>
20172
20173 * po/sv.po: New.
20174 * configure.in (ALL_LINGUAS): Adjust.
20175 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20176 longer contains strings to translate.
20177
20178 2001-11-19 Akim Demaille <akim@epita.fr>
20179
20180 * src/conflicts.c (conflicts_print): Add a missing \n.
20181
20182 2001-11-19 Akim Demaille <akim@epita.fr>
20183
20184 * src/nullable.c (nullable_print): New.
20185 (set_nullable): Call it when tracing.
20186 Better locality of variables.
20187
20188 2001-11-19 Akim Demaille <akim@epita.fr>
20189
20190 * src/print.c (print_actions): Better locality of variables.
20191
20192 2001-11-19 Akim Demaille <akim@epita.fr>
20193
20194 * src/derives.c (print_derives): Fix and enrich.
20195 * src/closure.c (print_fderives): Likewise.
20196
20197 2001-11-19 Akim Demaille <akim@epita.fr>
20198
20199 * src/closure.c (itemsetend): Remove, replaced with...
20200 (itemsetsize): new.
20201
20202 2001-11-19 Akim Demaille <akim@epita.fr>
20203
20204 * src/LR0.c (kernel_end): Remove, replaced with...
20205 (kernel_size): new.
20206
20207 2001-11-19 Akim Demaille <akim@epita.fr>
20208
20209 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20210 to clarify.
20211
20212 2001-11-19 Akim Demaille <akim@epita.fr>
20213
20214 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20215
20216 2001-11-19 Akim Demaille <akim@epita.fr>
20217
20218 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20219 trace messages.
20220 * src/LR0.c: Likewise.
20221 (allocate_itemsets): Use arrays instead of pointers to clarify.
20222
20223 2001-11-19 Akim Demaille <akim@epita.fr>
20224
20225 * src/getargs.c (statistics_flag): Replace with...
20226 (trace_flag): New.
20227 (longopts): Accept --trace instead of --statistics.
20228 * src/getargs.h, src/options.c: Adjust.
20229 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20230 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20231
20232 2001-11-19 Akim Demaille <akim@epita.fr>
20233
20234 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20235 pointers to clarify the code.
20236 (save_reductions, save_shifts): Factor common parts of alternatives.
20237
20238 2001-11-19 Akim Demaille <akim@epita.fr>
20239
20240 * src/LR0.c (new_state, get_state): Complete TRACE code.
20241 * src/closure.c: Include `reader.h' to get `tags', needed by the
20242 trace code.
20243 Rename the conditional DEBUG as TRACE.
20244 Output consistently TRACEs to stderr, not stdout.
20245 * src/derives.c: Likewise.
20246 * src/reduce.c: (inaccessable_symbols): Using if is better style
20247 than goto.
20248 Use `#if TRACE' instead of `#if 0' for tracing code.
20249
20250 2001-11-19 Akim Demaille <akim@epita.fr>
20251
20252 * src/system.h (LIST_FREE, shortcpy): New.
20253 * src/LR0.c: Use them.
20254 * src/output.c (free_itemsets, free_reductions, free_shifts):
20255 Remove, replaced by LIST_FREE.
20256
20257 2001-11-19 Akim Demaille <akim@epita.fr>
20258
20259 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20260 (REDUCTIONS_ALLOC): New.
20261 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20262 allocation.
20263
20264 2001-11-19 Akim Demaille <akim@epita.fr>
20265
20266 * src/LR0.c (new_state): Complete trace code.
20267 * src/nullable.c (set_nullable): Don't translate traces.
20268
20269 2001-11-19 Akim Demaille <akim@epita.fr>
20270
20271 * src/print_graph.c (print_core): Better locality of variables.
20272 * src/print.c (print_core): Likewise.
20273
20274 2001-11-19 Akim Demaille <akim@epita.fr>
20275
20276 * src/vcg.c: You do the output, so you are responsible of the
20277 handling of VCG syntax, in particular: use quotearg.
20278 * src/print_graph.c: Don't.
20279 (print_actions): Don't output the actions as part of the nodes,
20280 since that's the job of the edges.
20281 (print_state): Don't output by hand: fill the node description,
20282 and ask for its output.
20283
20284 2001-11-19 Akim Demaille <akim@epita.fr>
20285
20286 * src/bison.simple (yyparse): When verbosely reporting an error,
20287 no longer put additional quotes around token names.
20288 * tests/calc.at: Adjust.
20289
20290 2001-11-19 Akim Demaille <akim@epita.fr>
20291
20292 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20293 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20294 * src/output.c: Adjust.
20295
20296 2001-11-19 Akim Demaille <akim@epita.fr>
20297
20298 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20299 (rule_t): this.
20300 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20301
20302 2001-11-19 Akim Demaille <akim@epita.fr>
20303
20304 * src/gram.h (rule_t): New.
20305 (rule_table): New.
20306 (rrhs, rlhs): Remove, part of state_t.
20307 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20308 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20309 * src/reader.c, src/reduce.c: Adjust.
20310
20311 2001-11-19 Akim Demaille <akim@epita.fr>
20312
20313 * src/reader.c (symbols_output): New, extracted from...
20314 (packsymbols): Here.
20315 (reader): Call it.
20316
20317 2001-11-19 Akim Demaille <akim@epita.fr>
20318
20319 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20320 (maxrhs): this new function.
20321
20322 2001-11-19 Akim Demaille <akim@epita.fr>
20323
20324 * src/lalr.c (F): New macro to access the variable F.
20325 Adjust.
20326
20327 2001-11-19 Akim Demaille <akim@epita.fr>
20328
20329 * src/lalr.h (LA): New macro to access the variable LA.
20330 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20331 * src/lalr.c: Adjust.
20332
20333 2001-11-19 Akim Demaille <akim@epita.fr>
20334
20335 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20336 (set_state_table): handle the `lookaheads' members.
20337
20338 2001-11-19 Akim Demaille <akim@epita.fr>
20339
20340 * src/lalr.h (lookaheads): Removed array, whose contents is now
20341 a member of...
20342 (state_t): this structure.
20343 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20344 Adjust.
20345
20346 2001-11-19 Akim Demaille <akim@epita.fr>
20347
20348 * src/lalr.h (consistent): Removed array, whose contents is now
20349 a member of...
20350 (state_t): this structure.
20351 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20352 Adjust.
20353
20354 2001-11-19 Akim Demaille <akim@epita.fr>
20355
20356 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20357 contents are now members of...
20358 (state_t): this structure.
20359 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20360 Adjust.
20361
20362 2001-11-19 Akim Demaille <akim@epita.fr>
20363
20364 * src/lalr.h (state_t): New.
20365 (state_table): Be a state_t * instead of a core **.
20366 (accessing_symbol): Remove, part of state_t.
20367 * src/lalr.c: Adjust.
20368 (set_accessing_symbol): Merge into...
20369 (set_state_table): this.
20370 * src/print_graph.c, src/conflicts.c: Adjust.
20371
20372 2001-11-14 Akim Demaille <akim@epita.fr>
20373
20374 * tests/calc.at, tests/output.at, tests/regression.at,
20375 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20376 now the tests are run in private dirs, therefore AC_CLEANUP and
20377 family can be simplified to 0-ary.
20378 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20379 use abs. path to find config.h.
20380 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20381 stderr, there can be way too much random noise.
20382 Instead pass -Werror to GCC and rely on the exit status.
20383 Reported by Wolfram Wagner.
20384
20385 2001-11-14 Akim Demaille <akim@epita.fr>
20386
20387 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20388 defined only if yyoverflow is defined, to avoid `warning: unused
20389 variable `yyvs1''.
20390 Reported by The Test Suite.
20391
20392 2001-11-14 Akim Demaille <akim@epita.fr>
20393
20394 * src/print.c: Include reduce.h.
20395 Reported by Hans Aberg.
20396
20397 2001-11-14 Akim Demaille <akim@epita.fr>
20398
20399 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20400 Revert a previous patch: these are really const.
20401 * src/conflicts.c (conflict_report): Additional useless pair of
20402 braces to pacify GCC's warnings for `if () if () {} else {}'.
20403 * src/lex.c (parse_percent_token): Replace equal_offset with
20404 arg_offset.
20405 arg is const.
20406 Be sure to strdup `arg' when used, since there is no reason for
20407 token_buffer not to change.
20408
20409 2001-11-14 Akim Demaille <akim@epita.fr>
20410
20411 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20412 definition.
20413 * src/main.c (main): Use them.
20414 Suggested by Hans Aberg.
20415
20416 2001-11-12 Akim Demaille <akim@epita.fr>
20417
20418 * src/system.h (ngettext): Now that we use ngettext, be sure to
20419 provide a default definition when NLS are not used.
20420
20421 2001-11-12 Akim Demaille <akim@epita.fr>
20422
20423 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20424 Use @kbd to denote user input.
20425 (Language and Grammar): ANSIfy the example.
20426 Adjust its layout for info/notinfo.
20427 (Location Tracking Calc): Output error messages to stderr.
20428 Output locations in a more GNUtically correct way.
20429 Fix a couple of Englishos.
20430 Adjust @group/@end group pairs.
20431
20432 2001-11-12 Akim Demaille <akim@epita.fr>
20433
20434 %expect was not functioning at all.
20435
20436 * src/conflicts.c (expected_conflicts): Set to -1.
20437 (conflict_report): Use ngettext.
20438 (conflicts_print): Check %expect and make its violation an error.
20439 * doc/bison.texinfo (Expect Decl): Adjust.
20440 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20441 * tests/regression.at (%expect not enough, %expect right)
20442 (%expect too much): New.
20443
20444 2001-11-12 Akim Demaille <akim@epita.fr>
20445
20446 * tests/regression.at (Conflicts): Rename as...
20447 (Unresolved SR Conflicts): this.
20448 (Solved SR Conflicts): New.
20449
20450 2001-11-12 Akim Demaille <akim@epita.fr>
20451
20452 * src/reduce.c (print_results): Rename as...
20453 (reduce_output): This.
20454 Output to OUT, passed as argument, instead of output_obstack.
20455 (dump_grammar): Likewise.
20456 (reduce_free): New.
20457 Also free V1.
20458 (reduce_grammar): No longer call reduce_output, since...
20459 * src/print.c (print_results): do it.
20460 * src/main.c (main): Call reduce_free;
20461
20462 2001-11-12 Akim Demaille <akim@epita.fr>
20463
20464 * src/conflicts.c (print_reductions): Accept OUT as argument.
20465 Output to it, not to output_obstack.
20466 * src/print.c (print_actions): Adjust.
20467
20468 2001-11-12 Akim Demaille <akim@epita.fr>
20469
20470 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20471 the result instead of using...
20472 (src_total, rrc_total, src_count, rrc_count): Remove.
20473 (any_conflicts): Remove.
20474 (print_conflicts): Split into...
20475 (conflicts_print, conflicts_output): New.
20476 * src/conflicts.h: Adjust.
20477 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20478 * src/print.c (print_grammar): Issue `\n' between two rules.
20479 * tests/regression.at (Conflicts): New.
20480 Reported by Tom Lane.
20481
20482 2001-11-12 Akim Demaille <akim@epita.fr>
20483
20484 * tests/regression.at (Invalid input): Remove, duplicate with
20485 ``Invalid input: 1''.
20486
20487 2001-11-12 Akim Demaille <akim@epita.fr>
20488
20489 * tests/torture.at (AT_DATA_STACK_TORTURE)
20490 (Exploding the Stack Size with Alloca)
20491 (Exploding the Stack Size with Malloc): New.
20492
20493 2001-11-12 Akim Demaille <akim@epita.fr>
20494
20495 * src/bison.simple (YYSTACK_REALLOC): New.
20496 (yyparse) [!yyoverflow]: Use it and free the old stack.
20497 Reported by Per Allansson.
20498
20499 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20500
20501 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20502 define CPP macro, which substitute YYSTYPE by yystype.
20503 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20504 with yyltype/YYLTYPE. This allows inclusion of the generated
20505 header within the parser if the compiler, such as GGC, accepts
20506 multiple equivalent #defines.
20507 From Akim.
20508
20509 2001-11-05 Akim Demaille <akim@epita.fr>
20510
20511 * src/reader.c (symbols_output): New, extracted from...
20512 (packsymbols): here.
20513 (reader): Adjust.
20514
20515 2001-11-05 Akim Demaille <akim@epita.fr>
20516
20517 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20518
20519 2001-11-05 Akim Demaille <akim@epita.fr>
20520
20521 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20522 pattern.
20523
20524 2001-11-05 Akim Demaille <akim@epita.fr>
20525
20526 * src/options.h (struct option_table_struct): set_flags is void*.
20527 * src/options.c (longopts): Support `--output' and `%output'.
20528 (usage): Adjust.
20529 * src/lex.h (tok_setopt): Remove, replaced with...
20530 (tok_intopt, tok_stropt): these new guys.
20531 * src/lex.c (getopt.h): Not needed.
20532 (token_buffer, unlexed_token_buffer): Not const.
20533 (percent_table): Promote `-' over `_' in directive names.
20534 Active `%name-prefix', `file-prefix', and `output'.
20535 (parse_percent_token): Accept possible arguments to directives.
20536 Promote `-' over `_' in directive names.
20537
20538 2001-11-04 Akim Demaille <akim@epita.fr>
20539
20540 * doc/bison.texinfo (Decl Summary): Split the list into
20541 `directives for grammars' and `directives for bison'.
20542 Sort'em.
20543 Add description of `%name-prefix', `file-prefix', and `output'.
20544 Promote `-' over `_' in directive names.
20545 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20546 Simplify the description of `--name-prefix'.
20547 Promote `-' over `_' in directive names.
20548 Promote `--output' over `--output-file'.
20549 Fix the description of `--defines'.
20550 * tests/output.at: Exercise %file-prefix and %output.
20551
20552 2001-11-02 Akim Demaille <akim@epita.fr>
20553
20554 * doc/refcard.tex: Update.
20555
20556 2001-11-02 Akim Demaille <akim@epita.fr>
20557
20558 * src/symtab.h (SUNDEF): New.
20559 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20560 stand for `uninitialized', instead of 0.
20561 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20562 * src/lex.c (lex): Adjust.
20563
20564 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20565 Number it 0.
20566 Let yylex return it instead of a plain 0.
20567 Reported by Dick Streefland.
20568
20569 2001-11-02 Akim Demaille <akim@epita.fr>
20570
20571 * tests/regression.at (Mixing %token styles): New test.
20572
20573 2001-11-02 Akim Demaille <akim@epita.fr>
20574
20575 * src/reader.c (parse_thong_decl): Formatting changes.
20576 (token_translations_init): New, extracted from...
20577 (packsymbols): Here.
20578 Adjust.
20579
20580 2001-11-01 Akim Demaille <akim@epita.fr>
20581
20582 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20583 Check that `9foo.y' produces correct cpp guards.
20584 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20585 guards.
20586 Reported by Wwp.
20587
20588 2001-11-01 Akim Demaille <akim@epita.fr>
20589
20590 * tests/regression.at (Invalid input: 2): New.
20591 * src/lex.c (unlexed_token_buffer): New.
20592 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20593 too.
20594 Reported by Wwp.
20595
20596 2001-11-01 Akim Demaille <akim@epita.fr>
20597
20598 * tests/calc.at: Catch up with 1.30.
20599 * configure.in: Bump to 1.49a.
20600 Adjust to newer Autotest.
20601
20602 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
20603
20604 * src/conflicts.c: Move global variables rrc_total and src_total ...
20605 (print_conflicts): here.
20606 * src/output.c (output): Free global variable user_toknums.
20607 * src/lex.c (token_obstack): Become static.
20608
20609 2001-10-18 Akim Demaille <akim@epita.fr>
20610
20611 * tests/atlocal.in (GCC): Add.
20612 * tests/calc.at: s/m4_match/m4_bmatch/.
20613 s/m4_patsubst/m4_bpatsubst/.
20614 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20615 * configure.in: AC_SUBST(GCC).
20616
20617 2001-10-14 Marc Autret <autret_m@epita.fr>
20618
20619 * src/options.c (create_long_option_table): Fix.
20620
20621 2001-10-10 Akim Demaille <akim@epita.fr>
20622
20623 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20624
20625 2001-10-04 Akim Demaille <akim@epita.fr>
20626
20627 * src/reader.c (parse_union_decl): Push the caracters in
20628 union_obstack, not attrs_obstack.
20629
20630 2001-10-04 Akim Demaille <akim@epita.fr>
20631
20632 Merge in the branch 1.29.
20633
20634 * src/reader.c (packsymbols): Use a temporary obstack for
20635 `%%tokendef', since output_stack is already used elsewhere.
20636
20637 2001-10-02 Akim Demaille <akim@epita.fr>
20638
20639 Bump 1.29d.
20640
20641 2001-10-02 Akim Demaille <akim@epita.fr>
20642
20643 Version 1.29c.
20644
20645 2001-10-02 Akim Demaille <akim@epita.fr>
20646
20647 * tests/regression.at (Invalid CPP headers): New.
20648 From Alexander Belopolsky.
20649 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20650
20651 2001-10-02 Akim Demaille <akim@epita.fr>
20652
20653 * tests/regression.at (Invalid input): New.
20654 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20655 Reported by Shura.
20656
20657 2001-10-02 Akim Demaille <akim@epita.fr>
20658
20659 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20660
20661 2001-10-02 Akim Demaille <akim@epita.fr>
20662
20663 * src/output.c (output_parser): Assert `skeleton'.
20664 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20665 systems.
20666 From Shura.
20667
20668 2001-10-01 Marc Autret <autret_m@epita.fr>
20669
20670 * src/lex.h: Echo modifications.
20671 * src/lex.c (unlex): Parameter is now token_t.
20672 From Hans Aberg.
20673
20674 2001-10-01 Marc Autret <autret_m@epita.fr>
20675
20676 * src/main.c: Include lex.h.
20677 From Hans Aberg.
20678
20679 2001-09-29 Akim Demaille <akim@epita.fr>
20680
20681 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20682
20683 2001-09-28 Akim Demaille <akim@epita.fr>
20684
20685 * tests/testsuite.at: Update to newer Autotest.
20686 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20687
20688 2001-09-27 Akim Demaille <akim@epita.fr>
20689
20690 Position independent wrapper.
20691
20692 * tests/bison: Remove.
20693 * tests/bison.in: New.
20694 * configure.in: Adjust.
20695
20696 2001-09-27 Paul Eggert <eggert@twinsun.com>
20697
20698 Port quotearg fixes from tar 1.13.24.
20699
20700 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20701 tm to be declared.
20702 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20703 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20704
20705 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20706 * m4/mbrtowc.m4: New file.
20707 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20708 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20709
20710 2001-09-27 Akim Demaille <akim@epita.fr>
20711
20712 Bump to 1.29c.
20713
20714 2001-09-27 Akim Demaille <akim@epita.fr>
20715
20716 Version 1.29b.
20717
20718 2001-09-25 Akim Demaille <akim@epita.fr>
20719
20720 * src/system.h: Include `xalloc.h'.
20721 Remove it from the C files.
20722 * src/files.c (output_files): Free the obstacks.
20723 * src/lex.c (init_lex): Rename as...
20724 (lex_init): this.
20725 (lex_free): New.
20726 * src/main.c (main): Use it.
20727
20728 2001-09-24 Marc Autret <autret_m@epita.fr>
20729
20730 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20731 to output informations in fout (FILE*).
20732 (open_graph, close_graph): Likewise.
20733 (output_graph, output_edge, output_node): Likewise.
20734 * src/vcg.h: Update function prototypes.
20735 * src/print_graph.c (print_graph): Open output graph file.
20736 (print_actions): Adjust.
20737 * src/files.h: Remove extern declaration.
20738 * src/files.c: Remove graph_obstack declaration.
20739 (open_files): Remove graph_obstack initialization.
20740 (output_files): Remove graph_obstack saving.
20741
20742 2001-09-24 Marc Autret <autret_m@epita.fr>
20743
20744 * src/files.c (compute_output_file_names): Fix.
20745
20746 2001-09-24 Marc Autret <autret_m@epita.fr>,
20747 Akim Demaille <akim@epita.fr>
20748
20749 * src/reader.c (reader): Remove call to free_symtab ().
20750 * src/main.c (main): Call it here.
20751 Include symtab.h.
20752 * src/conflicts.c (initialize_conflicts): Rename as...
20753 (solve_conflicts): this.
20754 * src/print.c (print_core, print_actions, print_state)
20755 (print_grammar): Dump to a file instead a `output_obstack'.
20756 (print_results): Dump `output_obstack', and then proceed with the
20757 FILE *.
20758 * src/files.c (compute_output_file_names, close_files): New.
20759 (output_files): Adjust.
20760 * src/main.c (main): Adjust.
20761
20762 2001-09-23 Marc Autret <autret_m@epita.fr>
20763
20764 * src/files.c (compute_header_macro): Computes header macro name
20765 from spec_defines_file when given.
20766
20767 2001-09-23 Marc Autret <autret_m@epita.fr>
20768
20769 * src/files.c (output_files): Add default extensions.
20770
20771 2001-09-22 Akim Demaille <akim@epita.fr>
20772
20773 * src/conflicts.c (finalize_conflicts): Rename as...
20774 (free_conflicts): this.
20775
20776 2001-09-22 Akim Demaille <akim@epita.fr>
20777
20778 * src/gram.c (gram_free): Rename back as...
20779 (dummy): this.
20780 (output_token_translations): Free `token_translations'.
20781 * src/symtab.c (free_symtab): Free the tag field.
20782
20783 2001-09-22 Akim Demaille <akim@epita.fr>
20784
20785 Remove `translations' as it is always set to true.
20786
20787 * src/gram.h: Adjust.
20788 * src/reader.c (packsymbols, parse_token_decl): Adjust
20789 * src/print.c (print_grammar): Adjust.
20790 * src/output.c (output_token_translations): Adjust.
20791 * src/lex.c (lex): Adjust.
20792 * src/gram.c: Be sure the set pointers to NULL.
20793 (dummy): Rename as...
20794 (gram_free): this.
20795
20796 2001-09-22 Akim Demaille <akim@epita.fr>
20797
20798 * configure.in: Invoke AM_LIB_DMALLOC.
20799 * src/system.h: Use dmalloc.
20800 * src/LR0.c: Be sure to have pointers initialized to NULL.
20801 (allocate_itemsets): Allocate kernel_items only if needed.
20802
20803 2001-09-22 Akim Demaille <akim@epita.fr>
20804
20805 * configure.in: Bump to 1.29b.
20806 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20807 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20808 need xmalloc.c in calc.y.
20809 From Pascal Bart.
20810
20811 2001-09-21 Akim Demaille <akim@epita.fr>
20812
20813 Version 1.29a.
20814 * Makefile.maint, config/config.guess, config/config.sub,
20815 * config/missing: Update from masters.
20816 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20817 upon package.m4.
20818 * configure.in (ALL_LINGUAS): Add `tr'.
20819
20820 2001-09-21 Akim Demaille <akim@epita.fr>
20821
20822 * tests/Makefile.am (package.m4): Move to...
20823 ($(srcdir)/$(TESTSUITE)): here.
20824
20825 2001-09-20 Akim Demaille <akim@epita.fr>
20826
20827 * src/complain.c: No longer try to be standalone: use system.h.
20828 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20829 * src/complain.h: Likewise.
20830 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20831 Remove the unused variable `n'.
20832 From Albert Chin-A-Young.
20833
20834 2001-09-18 Marc Autret <autret_m@epita.fr>
20835
20836 * doc/bison.1: Update.
20837 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20838 descriptions.
20839 (Option Cross Key): Update.
20840 Add --graph.
20841
20842 2001-09-18 Marc Autret <autret_m@epita.fr>
20843
20844 * tests/regression.at: New test (comment in %union).
20845
20846 2001-09-18 Marc Autret <autret_m@epita.fr>
20847
20848 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20849 do that.
20850 Reported by Keith Browne.
20851
20852 2001-09-18 Marc Autret <autret_m@epita.fr>
20853
20854 * tests/output.at: Add tests for --defines and --graph.
20855
20856 2001-09-18 Marc Autret <autret_m@epita.fr>
20857
20858 * tests/output.at: Removes tests of %{header,src}_extension features.
20859
20860 2001-09-18 Akim Demaille <akim@epita.fr>
20861
20862 * tests/Makefile.am (package.m4): New.
20863 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20864 (_AT_CHECK_CALC_ERROR): Likewise.
20865 Factor the `, ' part of verbose error messages.
20866
20867 2001-09-18 Marc Autret <autret_m@epita.fr>
20868
20869 * src/getargs.c (longopts): Declare --defines and --graph as options
20870 with optional arguments.
20871 * src/files.h: Add extern declarations.
20872 * src/files.c (spec_graph_file, spec_defines_file): New.
20873 (output_files): Update.
20874 Remove CPP-outed code.
20875
20876 2001-09-18 Marc Autret <autret_m@epita.fr>
20877
20878 Turn off %{source,header}_extension feature.
20879
20880 * src/files.c (compute_exts_from_gf): Update.
20881 (compute_exts_from_src): Update.
20882 (output_files): CPP-out useless code.
20883 * src/files.h: Remove {header,source}_extension extern declarations.
20884 * src/reader.c (parse_dquoted_param): CPP-out.
20885 (parse_header_extension_decl): Remove.
20886 (parse_source_extension_decl): Remove.
20887 (read_declarations): Remove cases tok_{hdrext,srcext}.
20888 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20889 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20890
20891 2001-09-10 Akim Demaille <akim@epita.fr>
20892
20893 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20894 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20895 (AT_CHECK_OUTPUT): this.
20896 Merely check ls' exit status, its output is useless.
20897
20898 2001-09-10 Akim Demaille <akim@epita.fr>
20899
20900 * tests/calc.at: Use m4_match.
20901 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20902
20903 2001-09-10 Marc Autret <autret_m@epita.fr>,
20904 Akim Demaille <akim@epita.fr>
20905
20906 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20907 enum color_e.
20908 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20909 to `normal'.
20910 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20911 * src/lex.h: Adjust prototype.
20912 (token_t): Add `tok_undef'.
20913 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20914 (parse_percent_token): Now returns token_t.
20915 Add default statement in switch.
20916 (lex): Separate `c' as an input variable, from the token_t result
20917 part.
20918 (unlexed): Is a token_t.
20919
20920 2001-09-10 Akim Demaille <akim@epita.fr>
20921
20922 * configure.in: Bump to 1.29a.
20923
20924 2001-09-07 Akim Demaille <akim@epita.fr>
20925
20926 Version 1.29.
20927
20928 2001-08-30 Akim Demaille <akim@epita.fr>
20929
20930 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20931 * m4/atconfig.m4: Remove.
20932 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20933 * tests/bison: New.
20934 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20935 m4_if, m4_patsubst, and m4_regexp.
20936 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20937 `input' file instead of echo.
20938
20939 2001-08-29 Akim Demaille <akim@epita.fr>
20940
20941 Bump to 1.28e.
20942
20943 2001-08-29 Akim Demaille <akim@epita.fr>
20944
20945 Version 1.28d.
20946
20947 2001-08-29 Paul Eggert <eggert@twinsun.com>
20948
20949 * src/bison.simple (yyparse): Don't take the address of an
20950 item before the start of an array, as that doesn't conform to
20951 the C Standard.
20952
20953 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20954
20955 * doc/bison.texinfo (Location Tracking Calc): New node.
20956
20957 2001-08-29 Paul Eggert <eggert@twinsun.com>
20958
20959 * src/output.c (output): Do not define const, as this now
20960 causes more problems than it cures.
20961
20962 2001-08-29 Akim Demaille <akim@epita.fr>
20963
20964 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20965 the nodes.
20966 Be sure to tag the `detailmenu'.
20967
20968 2001-08-29 Akim Demaille <akim@epita.fr>
20969
20970 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20971 download in a tmp dir.
20972
20973 2001-08-28 Marc Autret <autret_m@epita.fr>
20974
20975 * config/depcomp: New file.
20976
20977 2001-08-28 Marc Autret <autret_m@epita.fr>
20978
20979 * doc/bison.1 (mandoc): Adjust.
20980 From Juan Manuel Guerrero.
20981
20982 2001-08-28 Marc Autret <autret_m@epita.fr>
20983
20984 * src/print_graph.c (print_state): Fix.
20985
20986 2001-08-27 Marc Autret <autret_m@epita.fr>
20987
20988 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20989 char * members.
20990 Echo modifications to the functions prototypes.
20991 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20992
20993 2001-08-27 Marc Autret <autret_m@epita.fr>
20994
20995 * src/vcg.c: Include `xalloc.h'.
20996 (add_colorentry): New.
20997 (add_classname): New.
20998 (add_infoname): New.
20999 * src/vcg.h: Add new prototypes.
21000
21001 2001-08-27 Akim Demaille <akim@epita.fr>
21002
21003 * Makefile.maint: Sync. again with CVS Autoconf.
21004
21005 2001-08-27 Akim Demaille <akim@epita.fr>
21006
21007 * Makefile.maint: Formatting changes.
21008 (po-update, cvs-update, update): New targets.
21009 (AMTAR): Remove.
21010
21011 2001-08-27 Akim Demaille <akim@epita.fr>
21012
21013 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21014 * Makefile.maint: Sync. with CVS Autoconf.
21015
21016 2001-08-27 Marc Autret <autret_m@epita.fr>
21017
21018 * src/vcg.h (struct infoname_s): New.
21019 (struct colorentry_s): New.
21020 (graph_s): New fields {vertical,horizontal}_order in structure.
21021 Add `infoname' field.
21022 Add `colorentry' field;
21023 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21024 (G_HORIZONTAL_ORDER): New.
21025 (G_INFONAME): New.
21026 (G_COLORENTRY): New.
21027 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21028 Add output of `infoname'.
21029 Add output of `colorentry'.
21030
21031 2001-08-27 Marc Autret <autret_m@epita.fr>
21032
21033 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21034 This one shadowed a global parameter.
21035
21036 2001-08-24 Marc Autret <autret_m@epita.fr>
21037
21038 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21039 instead of `unsigned'.
21040 (print_state): Do not call obstack_object_size () in obstack_grow ()
21041 to avoid macro variables shadowing.
21042
21043 2001-08-23 Marc Autret <autret_m@epita.fr>
21044
21045 * src/lex.c (percent_table): Typo: s/naem/name/.
21046 Add graph option.
21047 Normalize new options declarations.
21048
21049 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21050
21051 * tests/suite.at: Exercise %header_extension and %source_extension.
21052
21053 2001-08-16 Marc Autret <autret_m@epita.fr>
21054
21055 * src/reader.c (parse_dquoted_param): New.
21056 (parse_header_extension_decl): Use it.
21057 (parse_source_extension_decl): Likewise.
21058
21059 2001-08-16 Marc Autret <autret_m@epita.fr>
21060
21061 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21062 (get_xxxx_str): Use assert () instead of complain ().
21063 Remove return invokations in default cases.
21064 (get_decision_str): Modify default behaviour. Remove second argument.
21065 Echo modifications on calls.
21066 (output_graph): Fix.
21067
21068 2001-08-16 Marc Autret <autret_m@epita.fr>
21069
21070 * src/getargs.c (usage): Update with ``-g, --graph''.
21071
21072 2001-08-16 Marc Autret <autret_m@epita.fr>
21073
21074 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21075 (Option Cross Key): Likewise.
21076 * doc/bison.1: Update.
21077
21078 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
21079
21080 * src/output.c (output_master_parser): Don't finish action_obstack.
21081 (output_parser): Don't care about the muscle action, here.
21082 (prepare): Copy the action_obstack in the action muscle.
21083 (output): Free action_obstack.
21084
21085 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21086
21087 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21088 will contain `%union' declaration.
21089 (parse_union_decl): Delete #line directive output.
21090 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21091 informations about %union.
21092 (parse_union_decl): Copy the union_obstack in the muscle stype.
21093 * src/bison.simple: Add new #line directive.
21094 Add typdef %%stype YYSTYPE.
21095
21096 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21097
21098 * src/bison.simple: Add new `#line' directive.
21099
21100 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
21101
21102 * src/bison.simple: New `#line' directive.
21103 * src/output.c (output_parser): Support new dynamic muscle input_line.
21104
21105 2001-09-22 Marc Autret <autret_m@epita.fr>
21106
21107 * src/output.c (output_master_parser): New.
21108 (output_parser): Be more re-entrant.
21109
21110 2001-09-21 Marc Autret <autret_m@epita.fr>
21111
21112 * src/reader.c (copy_definition, parse_union_decl): Update and use
21113 `linef' muscle.
21114 (copy_action): Likewise.
21115 Use obstack_1grow ().
21116 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21117
21118 2001-09-21 Marc Autret <autret_m@epita.fr>
21119
21120 * src/options.c (option_table): Adjust.
21121 * src/lex.c (parse_percent_token): Fix.
21122
21123 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21124
21125 * src/options.c (symtab.h): Include it, need by lex.h.
21126
21127 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21128
21129 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21130 is now an option_table_struct*.
21131 (option_strcmp): New function option_strcmp.
21132 (parse_percent_token): Call option_strcmp.
21133 * src/getargs.c (xalloc.h, options.h): Include it.
21134 (getargs): Call create_long_option_table.
21135 (getargs): Free longopts at the end of the function.
21136 (shortopts): Move in options.c.
21137 * src/options.c (create_long_option_table): New function. Convert
21138 information from option_table to option structure.
21139 * src/reader.c (options.h): Include it.
21140
21141 * src/Makefile.am: Adjust.
21142 * src/options.c (option_table): Create from longopts and percent_table.
21143 * src/getargs.c (longopts): Delete.
21144 * src/lex.c (struct percent_table_struct): Delete.
21145 (percent_table): Delete.
21146 (options.h): Include it.
21147 * src/options.c: Create.
21148 * src/options.h: Create.
21149 Declare enum opt_access_e.
21150 Define struct option_table_struct.
21151
21152 2001-09-20 Marc Autret <autret_m@epita.fr>
21153
21154 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21155 sections of Bison.
21156
21157 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
21158
21159 * src/bison.simple: s/%%filename/%%skeleton.
21160 * src/muscle_tab.c (getargs.h): Include it.
21161 (muscle_init): Insert new muscle skeleton.
21162
21163 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
21164
21165 * src/output.c (output_parser): Delete unused variable actions_dumped.
21166
21167 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
21168
21169 * src/output.c (output): Delete call to reader_output_yylsp.
21170 * src/reader.c (reader): Likewise.
21171 * src/reader.h: Delete declaration of reader_output_yylsp.
21172
21173 2001-09-02 Marc Autret <autret_m@epita.fr>
21174
21175 * src/reader.c: Include muscle_tab.h.
21176 (parse_union_decl): Update.
21177 (parse_macro_decl): Rename parse_muscle_decl.
21178 Update to use renamed functions and variable.
21179 (read_declarations, copy_action, read_additionnal_code, : Updated
21180 with correct variables and functions names.
21181 (packsymbols, reader): Likewise.
21182
21183 * src/reader.h (muscle_obstack): Extern declaration update.
21184
21185 * src/output.c: Include muscle_tab.h
21186 In all functions using macro_insert, change by using muscle_insert ().
21187 (macro_obstack): Rename muscle_obstack.
21188 Echo modifications in the whole file.
21189 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21190 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21191 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21192
21193 * src/muscle_tab.h: Update double inclusion macros.
21194 (macro_entry_s): Rename muscle_entry_s.
21195 Update prototypes.
21196
21197 * src/muscle_tab.c: Include muscle_tab.h.
21198 Rename macro_tabble to muscle_table.
21199 (mhash1, mhash2, mcmp): Use muscle_entry.
21200 (macro_init): Rename muscle_init. Update.
21201 (macro_insert): Rename muscle_insert. Update.
21202 (macro_find): Rename muscle_find. Update.
21203
21204 * src/main.c: Include muscle_tab.h.
21205 (main): Call muscle_init ().
21206 * src/Makefile.am (bison_SOURCES): Echo modifications.
21207
21208 2001-09-02 Marc Autret <autret_m@epita.fr>
21209
21210 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21211
21212 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21213
21214 2001-09-02 Marc Autret <autret_m@epita.fr>
21215
21216 * src/macrotab.c, src/macrotab.h: Remove.
21217
21218 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
21219
21220 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21221 filename.
21222
21223 2001-09-01 Marc Autret <autret_m@epita.fr>
21224
21225 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21226 to an explicit value to activate the feature. We do it here.
21227
21228 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21229
21230 * src/output.c (prepare): Delete the `filename' muscule insertion.
21231 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21232 (parse_union_decl): Likewise.
21233 * src/macrotab.c (macro_init): Initialize filename by infile.
21234
21235 2001-08-31 Marc Autret <autret_m@epita.fr>
21236
21237 * src/bison.simple (YYLSP_NEEDED): New definition.
21238 * src/output.c (prepare): Add macro insertion of `locations_flag'
21239
21240 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21241
21242 * src/output.c (prepare): Delete insertion of previous muscles,
21243 and insert the `prefix' muscles.
21244 * src/macrotab.c (macro_init): Likewise.
21245 (macro_init): Initialization prefix directive by `yy'.
21246 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21247 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21248 yylval, yydebug, yyerror, yynerrs and yyparse.
21249 New directive `#define' to substitute yydebug, ... with option
21250 name_prefix.
21251
21252 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21253
21254 * src/main.c (main): Standardize.
21255 * src/output.c (output_table_data, output_parser): Likewise.
21256 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21257
21258 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21259
21260 * src/reader.c (read_additionnal_code): Rename %%user_code to
21261 %%epilogue.
21262 * src/output.c (output): Rename %%declarations to %%prologue.
21263 * src/bison.simple: Echo modifications.
21264
21265 2001-08-31 Marc Autret <autret_m@epita.fr>
21266
21267 * src/reader.c (readgram): CleanUp.
21268 (output_token_defines): Likewise.
21269 (packsymbols): Likewise.
21270 (reader): Likewise.
21271 * src/output.c (output): CPP-out useless code.
21272
21273 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21274
21275 * src/reader.c (reader): Delete obsolete call to function
21276 output_trailers and output_headers.
21277 * src/output.h: Remove obsolete functions prototypes of output_headers
21278 and output_trailers.
21279
21280 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
21281
21282 * src/main.c: Include macrotab.h.
21283 * src/macrotab.h (macro_entry_s): Constify fields.
21284 Adjust functions prototypes.
21285 * src/macrotab.c (macro_insert): Constify key and value.
21286 (macro_find): Constify key.
21287 (macro_insert): Include 'xalloc.h'
21288 (macro_insert): Use XMALLOC.
21289 (macro_find): Constify return value.
21290 * src/output.c (output_table_data): Rename table to table_data.
21291 (output_parser): Constify macro_key, macro_value.
21292
21293 2001-08-30 Marc Autret <autret_m@epita.fr>
21294
21295 * src/reader.c (parse_skel_decl): New.
21296 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21297 * src/lex.h (token_t): New token `tok_skel'.
21298 * src/lex.c (percent_table): Add skeleton option entry.
21299 Standardize.
21300
21301 2001-08-29 Marc Autret <autret_m@epita.fr>
21302
21303 * src/bison.simple: Add %%user_code directive at the end.
21304 * src/reader.c (read_additionnal_code): New.
21305 (reader): Use it.
21306 * src/output.c (output_program): Remove.
21307 (output): Update.
21308
21309 2001-08-28 Marc Autret <autret_m@epita.fr>
21310
21311 * src/output.c (output_actions): Clean up.
21312 (output_gram): CPP-out useless code.
21313 * src/reader.c (reader): Clean up, CPP-out useless code.
21314
21315 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
21316
21317 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21318 directive.
21319 * src/bison.simple: Add `%%definitions'.
21320
21321 2001-08-28 Marc Autret <autret_m@epita.fr>
21322
21323 * config/depcomp: New file.
21324
21325 2001-08-27 Paul Eggert <eggert@twinsun.com>
21326
21327 * src/bison.simple (yyparse): Don't take the address of an
21328 item before the start of an array, as that doesn't conform to
21329 the C Standard.
21330
21331 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21332
21333 * src/output.c (output): Remove the initialization of the macro
21334 obstack. It was done too late here.
21335
21336 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21337 completely wrong.
21338 (reader): Initialize the macro obstack here, since we need it to grow
21339 '%define' directives.
21340
21341 * src/reader.h: Declare the macro obstack as extern.
21342
21343 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21344
21345 * src/output.c (output_parser): Fix. Store single '%' characters in
21346 the output obstack instead of throwing them away.
21347
21348 2001-08-27 Akim Demaille <akim@epita.fr>
21349
21350 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21351
21352 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21353
21354 * lib/Makefile.am: Adjust.
21355
21356 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21357
21358 * src/bison.simple: Update and add '%%' directives.
21359
21360 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21361
21362 * src/reader.c (reader): Remove calls to 'output_headers' and
21363 'output_trailers'. Remove some C output.
21364 (readgram): Disable a piece of code that was writing a default
21365 definition for 'YYSTYPE'.
21366 (reader_output_yylsp): Remove.
21367 (packsymbols): Output token defintions to a macro.
21368 (copy_definition): Disable C output.
21369
21370 * src/reader.c (parse_macro_decl): New function used to parse macro
21371 declarations.
21372 (copy_string2): Put the body of copy_string into this new function.
21373 Add a parameter to let the caller choose whether he wants to copy the
21374 string delimiters or not.
21375 (copy_string): Be a simple call to copy_string2 with the last argument
21376 bound to true.
21377 (read_declarations): Add case for macro definition.
21378 (copy_identifier): New.
21379 (parse_macro_decl): Read macro identifiers using copy_identifier
21380 rather than lex.
21381
21382 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21383
21384 * src/output.c (prepare): Add prefixed names.
21385 (output_parser): Output semantic actions.
21386 (output_parser): Fix bug on '%%line' directives.
21387
21388 * src/output.c (output_headers): Remove. The C code printed by this
21389 function should now be in the skeletons.
21390 (output_trailers): Remove.
21391 (output): Disable call to 'reader_output_yylsp'.
21392 (output_rule_data): Do not output tables to the table obstack.
21393
21394 * src/output.c: Remove some C dedicated output.
21395 Improve the use of macro and output obstacks.
21396 (output_defines): Remove.
21397
21398 * src/output.c (output_token_translations): Associate 'translate'
21399 table with a macro. No output to the table obstack.
21400 (output_gram): Same for 'rhs' and 'prhs'.
21401 (output_stos): Same for 'stos'.
21402 (output_rule_data): Same for 'r1' and 'r2'.
21403 (token_actions): Same for 'defact'.
21404 (goto_actions): Same for 'defgoto'.
21405 (output_base): Same for 'pact' and 'pgoto'.
21406 (output_table): Same for 'table'.
21407 (output_check): Same for 'check'.
21408
21409 * src/output.c (output_table_data): New function.
21410 (output_short_table): Remove.
21411 (output_short_or_char_table): Remove.
21412
21413 * src/output.c (output_parser): Replace most of the skeleton copy code
21414 with something new. Skeletons are now processed character by character
21415 rather than line by line, and Bison looks for '%%' macros. This is the
21416 first step in making Bison's output process (a lot) more flexible.
21417 (output_parser): Use the macro table.
21418
21419 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21420
21421 * src/main.c (main): Initialize the macro table.
21422
21423 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21424
21425 * src/lex.c (percent_table): Add tok_define.
21426 * src/lex.h: Add tok_define.
21427
21428 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21429
21430 * src/macrotab.c: New file.
21431 * src/macrotab.h: New file.
21432 * src/Makefile.am: Update.
21433
21434 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21435
21436 * lib/hash.c: New file.
21437 * lib/hash.h: New file.
21438 * lib/Makefile.am: Update.
21439
21440 2001-08-15 Akim Demaille <akim@epita.fr>
21441
21442 Version 1.28c.
21443
21444 2001-08-15 Marc Autret <autret_m@epita.fr>
21445
21446 * src/reader.c (readgram): Indent output macro YYSTYPE.
21447 (packsymbols): Likewise.
21448 (output_token_defines): Likewise.
21449 * src/files.c: Standardize.
21450 (compute_header_macro): New.
21451 (defines_obstack_save): New. Use compute_header_macro.
21452 (output_files): Update. Use defines_obstack_save.
21453
21454 2001-08-15 Akim Demaille <akim@epita.fr>
21455
21456 * doc/bison.texinfo (Table of Symbols): Document
21457 YYSTACK_USE_ALLOCA.
21458
21459 2001-08-15 Akim Demaille <akim@epita.fr>
21460
21461 * missing: Update from CVS Automake.
21462 * config/config.guess, config/config.sub, config/texinfo.tex:
21463 Update from gnu.org.
21464
21465 2001-08-15 Akim Demaille <akim@epita.fr>
21466
21467 * Makefile.maint: Sync with CVS Autoconf.
21468
21469 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21470
21471 * doc/bison.texinfo: Include GNU Free Documentation License from
21472 `fdl.texi'.
21473 * doc/fdl.texi: Add to package.
21474
21475 2001-08-14 Marc Autret <autret_m@epita.fr>
21476
21477 Turn on %{source,header}_extension features.
21478
21479 * src/lex.c (percent_table): Un-CPP out header_extension and
21480 source_extension.
21481 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21482 (compute_exts_from_src): Remove conditions. It restores priorities
21483 between options.
21484
21485 2001-08-14 Marc Autret <autret_m@epita.fr>
21486
21487 * src/files.c (compute_base_names): Add extensions computing when
21488 `--file-prefix' used.
21489 Standardize function calls.
21490
21491 2001-08-13 Marc Autret <autret_m@epita.fr>
21492
21493 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21494 defining it (defined but null disables alloca).
21495
21496 2001-08-13 Marc Autret <autret_m@epita.fr>
21497
21498 * src/bison.simple (_yy_memcpy): CPP reformat.
21499
21500 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21501
21502 * tests/atconfig.in (CPPFLAGS): Fix.
21503
21504 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21505
21506 * doc/bison.texinfo: Include GNU General Public License from
21507 `gpl.texi'.
21508 * doc/gpl.texi: Add to package.
21509
21510 2001-08-10 Marc Autret <autret_m@epita.fr>
21511
21512 * src/print_graph.h: Fix.
21513 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21514
21515 2001-08-10 Akim Demaille <akim@epita.fr>
21516
21517 * src/system.h: Provide default declarations for stpcpy, strndup,
21518 and strnlen.
21519
21520 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21521
21522 * doc/bison.texinfo (Locations): Update @$ stuff.
21523
21524 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21525
21526 * src/bison.simple (YYLLOC_DEFAULT): Update.
21527 (yyparse): Adjust.
21528
21529 2001-08-08 Marc Autret <autret_m@epita.fr>
21530
21531 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21532 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21533 Reported by Fabrice Bauzac.
21534
21535 2001-08-08 Marc Autret <autret_m@epita.fr>
21536
21537 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21538 * src/vcg.c (output_node): Fix.
21539 * src/vcg.h: Cleanup.
21540 * src/print_graph.c: Add comments.
21541 (node_output_size): New global variable. Simplify the formatting of
21542 the VCG graph output.
21543 (print_actions): Unused code is now used. It notifies the final state
21544 and no action states in the VCG graph. It also give the reduce actions.
21545 The `shift and goto' edges are red and the `go to state' edges are
21546 blue.
21547 Get the current node name and node_obstack by argument.
21548 (node_obstack): New variable.
21549 (print_state): Manage node_obstack.
21550 (print_core): Use node_obstack given by argument.
21551 A node is not only computed here but in print_actions also.
21552 (print_graph): CPP out useless code instead of commenting it.
21553
21554 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
21555
21556 * tests/atconfig.in (CPPFLAGS): Fix.
21557
21558 2001-08-07 Akim Demaille <akim@epita.fr>
21559
21560 * src/print_graph.c (quote): New.
21561 (print_core): Use it.
21562
21563 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21564
21565 * src/vcg.c (complain.h): Include it.
21566 Unepitaize `return' invocations.
21567 [NDEBUG] (main): Remove.
21568 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21569 * src/files.c (open_files): Initialize graph_obstack.
21570 * src/print_graph.c (print_actions): CPP out useless code.
21571 (print_core): Don't output the last `\n' in labels.
21572 Use `quote'.
21573 * src/files.c (output_files): Output the VCG file.
21574 * src/main.c (main): Invoke print_graph ();
21575
21576 2001-08-06 Marc Autret <autret_m@epita.fr>
21577
21578 Automaton VCG graph output.
21579 Using option ``-g'' or long option ``--graph'', you can generate
21580 a gram_filename.vcg file containing a VCG description of the LALR (1)
21581 automaton of your grammar.
21582
21583 * src/main.c: Call to print_graph() function.
21584 * src/getargs.h: Update.
21585 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21586 (graph_flag): New flag.
21587 (longopts): Update.
21588 (getargs): Add case `g'.
21589 * src/files.c (graph_obstack): New obstack struct.
21590 (open_files): Initialize new obstack.
21591 (output_files): Saves graph_obstack if required.
21592 * src/files.h (graph_obstack): New extern declaration.
21593 * src/Makefile.am: Add new source files.
21594
21595 2001-08-06 Marc Autret <autret_m@epita.fr>
21596
21597 * src/print_graph.c, src/print_graph.h (graph): New.
21598 * src/vcg.h: New file.
21599 * src/vcg.c: New file, VCG graph handling.
21600
21601 2001-08-06 Marc Autret <autret_m@epita.fr>
21602
21603 Add of %source_extension and %header_extension which specify
21604 the source or/and the header output file extension.
21605
21606 * src/files.c (compute_base_names): Remove initialisation of
21607 src_extension and header_extension.
21608 (compute_exts_from_gf): Update.
21609 (compute_exts_from_src): Update.
21610 (output_files): Update.
21611 * src/reader.c (parse_header_extension_decl): New.
21612 (parse_source_extension_decl): New.
21613 (read_declarations): New case statements for the new tokens.
21614 * src/lex.c (percent_table): Add entries for %source_extension
21615 and %header_extension.
21616 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21617
21618 2001-08-06 Marc Autret <autret_m@epita.fr>
21619
21620 * configure.in: Bump to 1.28c.
21621 * doc/bison.texinfo: Texinfo thingies.
21622
21623 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
21624
21625 * tests/atconfig.in (CPPFLAGS): Add.
21626 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21627
21628 2001-08-03 Akim Demaille <akim@epita.fr>
21629
21630 Version 1.28b.
21631
21632 2001-08-03 Akim Demaille <akim@epita.fr>
21633
21634 * tests/Makefile.am (check-local): Ship testsuite.
21635 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21636 Include `string.h'.
21637
21638 2001-08-03 Akim Demaille <akim@epita.fr>
21639
21640 * configure.in: Try using -Wformat when compiling.
21641
21642 2001-08-03 Akim Demaille <akim@epita.fr>
21643
21644 * configure.in: Bump to 1.28b.
21645
21646 2001-08-03 Akim Demaille <akim@epita.fr>
21647
21648 * src/complain.c: Adjust strerror_r portability issues.
21649
21650 2001-08-03 Akim Demaille <akim@epita.fr>
21651
21652 Version 1.28a.
21653
21654 2001-08-03 Akim Demaille <akim@epita.fr>
21655
21656 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21657 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21658 * src/getargs.c: Include complain.h.
21659 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21660 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21661
21662 2001-08-03 Akim Demaille <akim@epita.fr>
21663
21664 * src/reader.c (readgram): Display hidden chars in error messages.
21665
21666 2001-08-03 Akim Demaille <akim@epita.fr>
21667
21668 Update to gettext 0.10.39.
21669
21670 2001-08-03 Akim Demaille <akim@epita.fr>
21671
21672 * lib/strspn.c: New.
21673
21674 2001-08-01 Marc Autret <autret_m@epita.fr>
21675
21676 * doc/bison.texinfo: Update.
21677 * doc/bison.1 (mandoc): Update.
21678 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21679 * src/files.c: Support output files extensions computing.
21680 (src_extension): New static variable.
21681 (header_extension): New static variable.
21682 (tr): New function.
21683 (get_extension_index): New function, gets the index of an extension
21684 filename in a string.
21685 (compute_exts_from_gf): New function, computes extensions from the
21686 grammar file extension.
21687 (compute_exts_from_src): New functions, computes extensions from the
21688 C source file extension, file given by ``-o'' option.
21689 (compute_base_names): Update.
21690 (output_files): Update.
21691
21692 2001-08-01 Robert Anisko <anisko_r@epita.fr>
21693
21694 * doc/bison.texi: Document @$.
21695 (Locations): New section.
21696
21697 2001-07-18 Akim Demaille <akim@epita.fr>
21698
21699 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21700 * config/prev-version.txt, config/move-if-change: New.
21701 * Makefile.am: Adjust.
21702
21703 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
21704
21705 * src/bison.simple (yyparse): Suppress warning `comparaison
21706 between signed and unsigned'.
21707
21708 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
21709
21710 * src/getargs.h (raw_flag): Remove.
21711 * src/getargs.c: Die on `-r'/`--raw'.
21712 * src/lex.c (parse_percent_token): Die on `%raw'.
21713 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21714 * tests/calc.at: Suppress test with option `--raw'.
21715
21716 2001-07-14 Akim Demaille <akim@epita.fr>
21717
21718 * config/: New.
21719 * configure.in: Require Autoconf 2.50.
21720 Update to gettext 0.10.38.
21721
21722 2001-03-16 Akim Demaille <akim@epita.fr>
21723
21724 * doc/bison.texinfo: ANSIfy the examples.
21725
21726 2001-03-16 Akim Demaille <akim@epita.fr>
21727
21728 * getargs.c (skeleton): New variable.
21729 (longopts): --skeleton is a new option.
21730 (shortopts, getargs): -S is a new option.
21731 * getargs.h: Declare skeleton.
21732 * output.c (output_parser): Use it.
21733
21734 2001-03-16 Akim Demaille <akim@epita.fr>
21735
21736 * m4/strerror_r.m4: New.
21737 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21738 * lib/error.h, lib/error.c: Update.
21739
21740 2001-03-16 Akim Demaille <akim@epita.fr>
21741
21742 * src/getargs.c (longopts): Clean up.
21743
21744 2001-02-21 Akim Demaille <akim@epita.fr>
21745
21746 * src/reader.c (gensym): `gensym_count' is your own.
21747 Use a static buf to create the symbol name, as token_buffer is no
21748 longer a buffer.
21749
21750 2001-02-08 Akim Demaille <akim@epita.fr>
21751
21752 * src/conflicts.c (conflict_report): Be sure not to append to res
21753 between two calls, which could happen if both first sprintf were
21754 skipped, but not the first cp += strlen.
21755
21756 2001-02-08 Akim Demaille <akim@epita.fr>
21757
21758 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21759 New, from fileutils 4.0.37.
21760 * configure.in: Require Autoconf 2.49c. I took some time before
21761 making this decision. This is the only way out for portability
21762 issues in Bison, it would mean way too much duplicate effort to
21763 import in Bison features implemented in 2.49c since 2.13.
21764 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21765
21766 2001-02-02 Akim Demaille <akim@epita.fr>
21767
21768 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
21769 * lib/xalloc.h, lib/xmalloc.c: Update.
21770
21771 2001-01-19 Akim Demaille <akim@epita.fr>
21772
21773 Get rid of the ad hoc handling of token_buffer in the scanner: use
21774 the obstacks.
21775
21776 * src/lex.c (token_obstack): New.
21777 (init_lex): Initialize it. No longer call...
21778 (grow_token_buffer): this. Remove it.
21779 Adjust all the places which used it to use the obstack.
21780
21781 2001-01-19 Akim Demaille <akim@epita.fr>
21782
21783 * src/lex.h: Rename all the tokens:
21784 s/\bENDFILE\b/tok_eof/g;
21785 s/\bIDENTIFIER\b/tok_identifier/g;
21786 etc.
21787 Let them be enums, not #define, to ease debugging.
21788 Adjust all the code.
21789
21790 2001-01-18 Akim Demaille <akim@epita.fr>
21791
21792 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21793 * src/lex.c (maxtoken, grow_token_buffer): Static.
21794
21795 2001-01-18 Akim Demaille <akim@epita.fr>
21796
21797 Since we now use obstacks, more % directives can be enabled.
21798
21799 * src/lex.c (percent_table): Also accept `%yacc',
21800 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21801 `%debug'.
21802 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21803 instead of returning a token.
21804 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21805 * src/reader.c (read_declarations): Adjust.
21806 * src/files.c (open_files): Don't call `compute_base_names', don't
21807 compute `attrsfile' since they depend upon data which might be
21808 *in* the input file now.
21809 (output_files): Do it here.
21810 * src/output.c (output_headers): Document the fact that this patch
21811 introduces a guaranteed SEGV for semantic parsers.
21812 * doc/bison.texinfo: Document them.
21813 * tests/suite.at: Exercise these %options.
21814
21815 2000-12-20 Akim Demaille <akim@epita.fr>
21816
21817 Also handle the output file (--verbose) with obstacks.
21818
21819 * files.c (foutput): Remove.
21820 (output_obstack): New.
21821 Adjust all dependencies.
21822 * src/conflicts.c: Return a string.
21823 * src/system.h (obstack_grow_string): Rename as...
21824 (obstack_sgrow): this. Be ready to work with non literals.
21825 (obstack_fgrow4): New.
21826
21827 2000-12-20 Akim Demaille <akim@epita.fr>
21828
21829 * src/files.c (open_files): Fix the computation of short_base_name
21830 in the case of `-o foo.tab.c'.
21831
21832 2000-12-20 Akim Demaille <akim@epita.fr>
21833
21834 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21835 (copy_dollar): Now that everything uses obstacks, get rid of the
21836 FILE * parameters.
21837
21838 2000-12-20 Akim Demaille <akim@epita.fr>
21839
21840 * src/files.c (open_files): Actually the `.output' file is based
21841 on the short_base_name, not base_name.
21842 * tests/suite.at (Checking output file names): Adjust.
21843
21844 2000-12-20 Akim Demaille <akim@epita.fr>
21845
21846 * src/bison.s1: Remove, we now use directly...
21847 * src/bison.simple: this.
21848 * src/Makefile.am: Use pkgdata instead of data.
21849
21850 2000-12-20 Akim Demaille <akim@epita.fr>
21851
21852 * src/files.c (guard_obstack): New.
21853 (open_files): Initialize it.
21854 (output_files): Dump it...
21855 * src/files.h: Export it.
21856 * src/reader.c (copy_guard): Use it.
21857
21858 2000-12-19 Akim Demaille <akim@epita.fr>
21859
21860 * src/files.c (outfile, defsfile, actfile): Removed as global
21861 vars.
21862 (open_files): Don't compute them.
21863 (output_files): Adjust.
21864 (base_name, short_base_name): Be global.
21865 Adjust dependencies.
21866
21867 2000-12-19 Akim Demaille <akim@epita.fr>
21868
21869 * src/files.c (strsuffix): New.
21870 (stringappend): Be just like strcat but allocate.
21871 (base_names): Eve out from open_files.
21872 Try to simplify the rather hairy computation of base_name and
21873 short_base_name.
21874 (open_files): Use it.
21875 * tests/suite.at (Checking output file names): New test.
21876
21877 2000-12-19 Akim Demaille <akim@epita.fr>
21878
21879 * src/system.h (obstack_grow_literal_string): Rename as...
21880 (obstack_grow_string): this.
21881 * src/output.c (output_parser): Recognize `%% actions' instead of
21882 `$'.
21883 * src/bison.s1: s/$/%% actions/.
21884 * src/bison.hairy: Likewise.
21885
21886 2000-12-19 Akim Demaille <akim@epita.fr>
21887
21888 * src/output.c (output_parser): Compute the `#line' lines when
21889 there are.
21890 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21891 Suggested by Hans Aberg.
21892
21893 2000-12-19 Akim Demaille <akim@epita.fr>
21894
21895 Let the handling of the skeleton files be local to the procedures
21896 that use it.
21897
21898 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21899 longer static.
21900 (fparser, open_extra_files): Remove.
21901 (open_files, output_files): Don't take care of fparser.
21902 * src/files.h: Adjust.
21903 * src/output.c (output_parser): Open and close the file to the
21904 skeleton.
21905 * src/reader.c (read_declarations): When %semantic_parser, open
21906 fguard.
21907
21908 2000-12-19 Akim Demaille <akim@epita.fr>
21909
21910 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21911 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21912
21913 2000-12-19 Akim Demaille <akim@epita.fr>
21914
21915 * src/files.c (open_files): Yipee! We no longer need all the code
21916 looking for `/tmp' since we have no tmp file.
21917
21918 2000-12-19 Akim Demaille <akim@epita.fr>
21919
21920 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21921 New macros.
21922 * src/files.c (open_files): Less dependency on MSDOS etc.
21923
21924 2000-12-14 Akim Demaille <akim@epita.fr>
21925
21926 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21927 Provide a default definition.
21928 Use it when executing the default @ action.
21929 * src/reader.c (reader_output_yylsp): No longer include
21930 `timestamp' and `text' in the default YYLTYPE.
21931
21932 2000-12-12 Akim Demaille <akim@epita.fr>
21933
21934 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21935 (copy_guard): Quote the file names.
21936 Reported by Laurent Mascherpa.
21937
21938 2000-12-12 Akim Demaille <akim@epita.fr>
21939
21940 * src/output.c (output_headers, output_program, output): Be sure
21941 to escape special characters when outputting filenames.
21942 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21943 (output_headers): Don't depend on them, Use ACTSTR.
21944
21945 2000-11-17 Akim Demaille <akim@epita.fr>
21946
21947 * lib/obstack.h: Formatting changes.
21948 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21949 prevents type checking.
21950 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21951 cast the value to (void *): assigning a `foo *' to a `void *'
21952 variable is valid.
21953 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21954 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21955 append characters.
21956
21957 2000-11-17 Akim Demaille <akim@epita.fr>
21958
21959 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21960 as...
21961 (suite.m4, regression.m4, calc.m4): these.
21962 * tests/atgeneral.m4: Update from CVS Autoconf.
21963
21964 2000-11-17 Akim Demaille <akim@epita.fr>
21965
21966 * tests/regression.m4 (%union and --defines): New test,
21967 demonstrating a current bug in the obstack implementation.
21968
21969 2000-11-17 Akim Demaille <akim@epita.fr>
21970
21971 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21972 macros.
21973 Use them to declare the variables which are global or local to
21974 `yyparse'.
21975
21976 2000-11-17 Akim Demaille <akim@epita.fr>
21977
21978 * acconfig.h: Remove, no longer used.
21979
21980 2000-11-07 Akim Demaille <akim@epita.fr>
21981
21982 * src: s/Copyright (C)/Copyright/g.
21983
21984 2000-11-07 Akim Demaille <akim@epita.fr>
21985
21986 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21987 defining.
21988 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21989
21990 2000-11-07 Akim Demaille <akim@epita.fr>
21991
21992 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21993 Merge in a single CPP if/else.
21994
21995 2000-11-07 Akim Demaille <akim@epita.fr>
21996
21997 * src/output.c (output): Remove useless variables.
21998 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21999 argument `data' for consistency with the prototypes.
22000 Qualify it `const'.
22001 (obstack_copy, obstack_copy0): Rename the second argument as
22002 `address' for consistency. Qualify it `const'.
22003 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22004 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22005 `const' their input argument (`data' or `address').
22006 Adjust the corresponding macros to include `const' in casts.
22007
22008 2000-11-03 Akim Demaille <akim@epita.fr>
22009
22010 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22011 s/PFILE1/BISON_HAIRY/.
22012 Adjust dependencies.
22013
22014 2000-11-03 Akim Demaille <akim@epita.fr>
22015
22016 For some reason, this was not applied.
22017
22018 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22019 `unlink': it's no longer used.
22020
22021 2000-11-03 Akim Demaille <akim@epita.fr>
22022
22023 * src/files.c (skeleton_find): New function, eved out of...
22024 (open_files, open_extra_files): here.
22025
22026 2000-11-03 Akim Demaille <akim@epita.fr>
22027
22028 Don't use `atexit'.
22029
22030 * src/files.c (obstack_save): New function.
22031 (done): Rename as...
22032 (output_files): this.
22033 Use `obstack_save'.
22034 * src/main.c (main): Don't use `atexit' to register `done', since
22035 it no longer has to remove tmp files, just call `output_files'
22036 when there are no errors.
22037
22038 2000-11-02 Akim Demaille <akim@epita.fr>
22039
22040 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22041 `unlink': it's no longer used.
22042 * src/files.h: Formatting changes.
22043
22044 2000-11-02 Akim Demaille <akim@epita.fr>
22045
22046 Remove the last uses of mktemp and unlink/delete.
22047
22048 * src/files.c (fdefines, ftable): Removed.
22049 (defines_ostack, table_obstack): New.
22050 Adjust dependencies of the former into uses of the latter.
22051 * src/output.c (output_short_or_char_table, output_short_table):
22052 Convert to using obstacks.
22053 * src/reader.c (copy_comment2): Accept one FILE * and two
22054 obstacks.
22055 (output_token_defines, reader_output_yylsp): Use obstacks.
22056 * src/system.h (obstack_fgrow3): New.
22057 * po/POTFILES.in: Adjust.
22058
22059 2000-11-01 Akim Demaille <akim@epita.fr>
22060
22061 Change each use of `fattrs' into a use of `attrs_obstack'.
22062
22063 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22064 * src/files.c (fattrs): Remove.
22065 (attrs_obstack): New.
22066 Adjust all dependencies.
22067 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22068
22069 2000-11-01 Akim Demaille <akim@epita.fr>
22070
22071 Introduce obstacks.
22072 Change each use of `faction' into a use of `action_obstack'.
22073
22074 * lib/obstack.h, lib/obstack.c: New files.
22075 * src/files.c (faction): Remove.
22076 (action_obstack): New.
22077 Adjust all dependencies.
22078
22079 2000-10-20 Akim Demaille <akim@epita.fr>
22080
22081 * lib/quote.h (PARAMS): New macro. Use it.
22082
22083 2000-10-16 Akim Demaille <akim@epita.fr>
22084
22085 * src/output.c (output_short_or_char_table): New function.
22086 (output_short_table, output_token_translations): Use it.
22087 (goto_actions): Use output_short_table.
22088
22089 2000-10-16 Akim Demaille <akim@epita.fr>
22090
22091 * src/symtab.c (bucket_new): New function.
22092 (getsym): Use it.
22093
22094 * src/output.c (output_short_table): New argument to display the
22095 comment associated with the table.
22096 Adjust dependencies.
22097 (output_gram): Use it.
22098 (output_rule_data): Nicer output layout for YYTNAME.
22099
22100 2000-10-16 Akim Demaille <akim@epita.fr>
22101
22102 * src/lex.c (read_typename): New function.
22103 (lex): Use it.
22104 * src/reader.c (copy_dollar): Likewise.
22105
22106 2000-10-16 Akim Demaille <akim@epita.fr>
22107
22108 * src/reader.c (copy_comment2): Expect the input stream to be on
22109 the `/' which is suspected to open a comment, instead of being
22110 called after `//' or `/*' was read.
22111 (copy_comment, copy_definition, parse_union_decl, copy_action)
22112 (copy_guard): Adjust.
22113
22114 2000-10-16 Akim Demaille <akim@epita.fr>
22115
22116 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22117 `read_signed_integer'.
22118
22119 2000-10-16 Akim Demaille <akim@epita.fr>
22120
22121 * src/reader.c (copy_dollar): New function.
22122 (copy_guard, copy_action): Use it.
22123
22124 2000-10-16 Akim Demaille <akim@epita.fr>
22125
22126 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22127 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22128 New files, from Fileutils 4.0.27.
22129 * src/main.c (printable_version): Remove.
22130 * src/lex.c, src/reader.c: Use `quote'.
22131
22132 2000-10-04 Akim Demaille <akim@epita.fr>
22133
22134 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22135
22136 2000-10-04 Akim Demaille <akim@epita.fr>
22137
22138 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22139
22140 2000-10-04 Akim Demaille <akim@epita.fr>
22141
22142 When a literal string is used to define two different tokens,
22143 `bison -v' segfaults.
22144 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22145
22146 * tests/regression.m4: New file.
22147 Include the core of the sample provided by Piotr Gackiewicz.
22148 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22149 properly.
22150
22151 2000-10-04 Akim Demaille <akim@epita.fr>
22152
22153 * src/reader.c (parse_expect_decl): Keep `count' within the size
22154 of `buffer'.
22155 From Neil Booth.
22156
22157 2000-10-02 Paul Eggert <eggert@twinsun.com>
22158
22159 * bison.s1 (yyparse): Assign the default value
22160 unconditionally, to avoid a GCC warning and make the parser a
22161 tad smaller.
22162
22163 2000-10-02 Akim Demaille <akim@epita.fr>
22164
22165 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22166 options.
22167
22168 2000-10-02 Akim Demaille <akim@epita.fr>
22169
22170 * src/derives.c, src/print.c, src/reduce.c: To ease the
22171 translation, move some `\n' out of the translated strings.
22172
22173 2000-10-02 Akim Demaille <akim@epita.fr>
22174
22175 The location tracking mechanism is precious for parse error
22176 messages. Nevertheless, it is enabled only when `@n' is used in
22177 the grammar, which is a different issue (you can use it in error
22178 message, but not in the grammar per se). Therefore, there should
22179 be another means to enable it.
22180
22181 * src/getargs.c (getargs): Support `--locations'.
22182 (usage): Report it.
22183 * src/getargs.h (locationsflag): Export it.
22184 * src/lex.c (percent_table): Support `%locations'.
22185 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22186 with `locationsflag'.
22187 * doc/bison.texinfo: Document `--locations' and `%locations'.
22188 Sort the options.
22189 * tests/calc.m4: Test it.
22190
22191 For regularity of the names, replace each
22192 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22193 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22194 In addition replace each `flag' with `_flag'.
22195
22196 2000-10-02 Akim Demaille <akim@epita.fr>
22197
22198 Also test parse error messages, including with YYERROR_VERBOSE.
22199
22200 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22201 associative).
22202 Use it to check the computations.
22203 Use it to check `nonassoc' is honored.
22204 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22205 `--yyerror-verbose'.
22206 (_AT_CHECK_CALC): Adjust to this option.
22207 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22208
22209 2000-10-02 Akim Demaille <akim@epita.fr>
22210
22211 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22212 the latter demonstrates a flaw in the handling of non debugging
22213 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22214 was used in order to simplify:
22215
22216 #if YYDEBUG
22217 if (yydebug)
22218 {
22219 ...
22220 }
22221 #endif
22222
22223 into
22224
22225 if (yydebug)
22226 {
22227 ...
22228 }
22229
22230 unfortunately this leads to a CPP conflict when
22231 `--name-prefix=foo' is used since it produces `#define yydebug
22232 foodebug'.
22233
22234 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22235 (YYDPRINTF): New macro.
22236 Spread its use.
22237 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22238 the bison options.
22239 Also test `--verbose', `--defines' and `--name-prefix'.
22240
22241 2000-10-02 Akim Demaille <akim@epita.fr>
22242
22243 Improve the readability of the produced parsers.
22244
22245 * src/bison.s1: Formatting changes.
22246 Improve the comment related to the `$' mark.
22247 (yydefault): Don't fall through to `yyresume': `goto' there.
22248 * src/output.c (output_parser): When the `$' is met, skip the end
22249 of its line.
22250 New variable, `number_of_dollar_signs', to check there's exactly
22251 one `$' in the parser skeleton.
22252
22253 2000-10-02 Akim Demaille <akim@epita.fr>
22254
22255 * lib/xstrdup.c: New file, from the fileutils.
22256 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22257 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22258 instead of strlen + xmalloc + strcpy.
22259 * src/symtab.c (copys): Remove, use xstrdup instead.
22260
22261 2000-10-02 Akim Demaille <akim@epita.fr>
22262
22263 * src/gram.h (associativity): New enum type which replaces the
22264 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22265 `right_assoc', `left_assoc' and `non_assoc'.
22266 Adjust all dependencies.
22267 * src/reader.c: Formatting changes.
22268 (LTYPESTR): Don't define it, use it as a literal in
22269 `reader_output_yylsp'.
22270 * src/symtab.h (symbol_class): New enum type which replaces the
22271 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22272 `sunknown', `stoken and `snterm'.
22273
22274 2000-10-02 Akim Demaille <akim@epita.fr>
22275
22276 * src/getargs.c (fixed_outfiles): Rename as...
22277 (yaccflag): for consistency and accuracy.
22278 Adjust dependencies.
22279
22280 2000-10-02 Akim Demaille <akim@epita.fr>
22281
22282 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22283 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22284 difficult and introduced a lot of core dump. It turns out that
22285 Bison used an implementation of `xmalloc' based on `calloc', and
22286 at various places it does depend upon the initialization to 0. I
22287 have not tried to isolate the pertinent places, and all the former
22288 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22289 someone should address this issue.
22290
22291 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22292 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22293 files.
22294 Adjust dependencies.
22295 * src/warshall.h: New file.
22296 Propagate.
22297
22298 2000-10-02 Akim Demaille <akim@epita.fr>
22299
22300 Various anti-`extern in *.c' changes.
22301
22302 * src/system.h: Include `assert.h'.
22303
22304 2000-10-02 Akim Demaille <akim@epita.fr>
22305
22306 * src/state.h (nstates, final_state, first_state, first_shift)
22307 (first_reduction): Move their exportation from here...
22308 * src/LR0.h: to here.
22309 Adjust dependencies.
22310 * src/getargs.c (statisticsflag): New variable.
22311 Add support for `--statistics'.
22312 Adjust dependencies.
22313
22314 Remove a lot of now useless `extern' statements in most files.
22315
22316 2000-10-02 Akim Demaille <akim@epita.fr>
22317
22318 * src/LR0.h: New file.
22319 Propagate its use.
22320
22321 2000-10-02 Akim Demaille <akim@epita.fr>
22322
22323 * src/print.h: New file.
22324 Propagate its use.
22325 * src/print.c: Formatting and ordering changes.
22326 (verbose, terse): Replace with...
22327 (print_results): this new function.
22328 Adjust dependencies.
22329
22330 2000-10-02 Akim Demaille <akim@epita.fr>
22331
22332 * src/conflicts.c (conflict_report): New function.
22333 (conflict_log, verbose_conflict_log): Replace with...
22334 (print_conflicts): this function.
22335 Adjust dependencies.
22336 * src/conflicts.h: New file.
22337 Propagate its inclusion.
22338
22339 2000-10-02 Akim Demaille <akim@epita.fr>
22340
22341 * src/nullable.h: New file.
22342 Propagate its inclusion.
22343 * src/nullable.c: Formatting changes.
22344
22345 2000-10-02 Akim Demaille <akim@epita.fr>
22346
22347 * src/reduce.h: New file.
22348 Propagate its inclusion.
22349 * src/reduce.c: Topological sort and other formatting changes.
22350 (bool, TRUE, FALSE): Move their definition to...
22351 * src/system.h: here.
22352
22353 2000-10-02 Akim Demaille <akim@epita.fr>
22354
22355 * src/files.c: Formatting changes.
22356 (tryopen, tryclose, openfiles): Rename as...
22357 (xfopen, xfclose, open_files): this.
22358 (stringappend): static.
22359 * src/files.h: Complete the list of exported symbols.
22360 Propagate its use.
22361
22362 2000-10-02 Akim Demaille <akim@epita.fr>
22363
22364 * src/reader.h: New file.
22365 Propagate its use instead of tedious list of `extern' and
22366 prototypes.
22367 * src/reader.c: Formatting changes, topological sort,
22368 s/register//.
22369
22370 2000-10-02 Akim Demaille <akim@epita.fr>
22371
22372 * src/lex.h: Prototype `lex.c' exported functions.
22373 * src/reader.c: Adjust.
22374 * src/lex.c: Formatting changes.
22375 (safegetc): Rename as...
22376 (xgetc): this.
22377
22378 2000-10-02 Akim Demaille <akim@epita.fr>
22379
22380 * src/lalr.h: New file.
22381 Propagate its inclusion instead of prototypes and `extern'.
22382 * src/lalr.c: Formatting changes, topological sorting etc.
22383
22384 2000-10-02 Akim Demaille <akim@epita.fr>
22385
22386 * src/output.c (token_actions): Introduce a temporary array,
22387 YYDEFACT, that makes it possible for this function to use
22388 output_short_table.
22389
22390 2000-10-02 Akim Demaille <akim@epita.fr>
22391
22392 `user_toknums' is output as a `short[]' in `output.c', while it is
22393 defined as a `int[]' in `reader.c'. For consistency with the
22394 other output tables, `user_toknums' is now defined as a table of
22395 shorts.
22396
22397 * src/reader.c (user_toknums): Be a short table instead of an int
22398 table.
22399 Adjust dependencies.
22400
22401 Factor the short table outputs.
22402
22403 * src/output.c (output_short_table): New function.
22404 * src/output.c (output_gram, output_stos, output_rule_data)
22405 (output_base, output_table, output_check): Use it.
22406
22407 2000-10-02 Akim Demaille <akim@epita.fr>
22408
22409 * src/output.c (output): Topological sort of the functions, in
22410 order to get rid of the `static' prototypes.
22411 No longer use `register'.
22412 * src/output.h: New file.
22413 Propagate its inclusion in files explicitly prototyping functions
22414 from output.c.
22415
22416 2000-09-21 Akim Demaille <akim@epita.fr>
22417
22418 * src/atgeneral.m4: Update from Autoconf.
22419
22420 2000-09-21 Akim Demaille <akim@epita.fr>
22421
22422 * src/closure.h: New file.
22423 * src/closure.c: Formatting changes, topological sort over the
22424 functions, use of closure.h.
22425 (initialize_closure, finalize_closure): Rename as...
22426 (new_closure, free_closure): these. Adjust dependencies.
22427 * src/LR0.c: Formatting changes, topological sort, use of
22428 cloture.h.
22429 (initialize_states): Rename as...
22430 (new_states): this.
22431 * src/Makefile.am (noinst_HEADERS): Adjust.
22432
22433 2000-09-20 Akim Demaille <akim@epita.fr>
22434
22435 * src/acconfig.h: Don't protect config.h against multiple
22436 inclusion.
22437 Don't define PARAMS.
22438 * src/system.h: Define PARAMS.
22439 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22440 purpose of config.h. system.h must not try to fix wrong
22441 definitions in config.h.
22442
22443 2000-09-20 Akim Demaille <akim@epita.fr>
22444
22445 * src/derives.h: New file.
22446 * src/main.c, src/derives.h: Use it.
22447 Formatting changes.
22448 * src/Makefile.am (noinst_HEADERS): Adjust.
22449
22450 2000-09-20 Akim Demaille <akim@epita.fr>
22451
22452 * tests/atgeneral.m4: Update from Autoconf.
22453 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22454 (AT_CHECK_CALC): New macros.
22455 Use these macros to test bison with options `', `--raw',
22456 `--debug', `--yacc', `--yacc --debug'.
22457
22458 2000-09-19 Akim Demaille <akim@epita.fr>
22459
22460 * src/output.c: Formatting changes.
22461 * src/machine.h: Remove, leaving its contents in...
22462 * src/system.h: here.
22463 Include stdio.h.
22464 Adjust all dependencies on stdio.h and machine.h.
22465 * src/getargs.h: New file.
22466 Let all `extern' declarations about getargs.c be replaced with
22467 inclusion of `getargs.h'.
22468 * src/Makefile.am (noinst_HEADERS): Adjust.
22469
22470 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22471 scope.
22472 (yyerror): Returns void, not int.
22473 * doc/bison.texinfo: Formatting changes.
22474
22475 2000-09-19 Akim Demaille <akim@epita.fr>
22476
22477 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22478 portable.
22479
22480 2000-09-18 Akim Demaille <akim@epita.fr>
22481
22482 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22483 * src/Makefile.am (INCLUDES): Don't.
22484 Be ready to fetch headers in lib/.
22485
22486 2000-09-18 Akim Demaille <akim@epita.fr>
22487
22488 * doc/bison.texinfo: Update the copyright.
22489 ANSIfy and GNUify the examples.
22490 Remove the old menu.
22491
22492 2000-09-18 Akim Demaille <akim@epita.fr>
22493
22494 First set of tests: use the `calc' example from the documentation.
22495
22496 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22497 is defined only when YYDEBUG is.
22498 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22499 * src/files.c (tryopen, tryclose): Formatting changes.
22500 Move to the top and be static.
22501 * src/reader.c (read_signed_integer): Likewise.
22502 * tests/calc.m4: New file.
22503 * Makefile.am, suite.m4: Adjust.
22504 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22505
22506 2000-09-18 Akim Demaille <akim@epita.fr>
22507
22508 Add support for an Autotest test suite for Bison.
22509
22510 * m4/m4.m4, m4/atconfig.m4: New files.
22511 * m4/Makefile.am (EXTRA_DIST): Adjust.
22512 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22513 files.
22514 * src/getargs.c: Display a more standard --version message.
22515 * src/reader.c (reader): Formatting changes.
22516 No longer depend upon VERSION_STRING.
22517 * configure.in: No longer use `dnl'.
22518 Set up the test suite and the new directory `tests/.
22519 (VERSION_STRING): Remove.
22520
22521 2000-04-14 Akim Demaille <akim@epita.fr>
22522
22523 * src/reader.c (copy_comment2): New function, same as former
22524 `copy_comment', but outputs into two FILE *.
22525 (copy_comment): Use it.
22526 (parse_union_decl): Use it.
22527 (get_type, parse_start_decl): Use the same `invalid' message.
22528 (parse_start_decl, parse_union_decl): Use the same `multiple'
22529 message.
22530 (parse_union_decl, copy_guard, copy_action): Use the same
22531 `unmatched' message.
22532 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22533
22534 2000-03-31 Akim Demaille <akim@epita.fr>
22535
22536 * src/files.c (tryopen, tryclose): Move to the top.
22537 Be static.
22538
22539 2000-03-31 Akim Demaille <akim@epita.fr>
22540
22541 * src/main.c (main): Don't call `done', exit does it.
22542
22543 2000-03-31 Akim Demaille <akim@epita.fr>
22544
22545 * allocate.c: s/return (foo)/return foo/.
22546 * lalr.c: Likewise.
22547 * LR0.c: Likewise.
22548 * output.c: Likewise.
22549 * reader.c: Likewise.
22550 * symtab.c: Likewise.
22551 * vmsgetargs.c: Likewise.
22552
22553 2000-03-31 Akim Demaille <akim@epita.fr>
22554
22555 Clean up the error reporting functions.
22556
22557 * src/report.c: New file.
22558 * src/report.h: Likewise.
22559 * src/Makefile.am: Adjust.
22560 * m4/error.m4: New file.
22561 * m4/Makefile.am: Adjust.
22562 * configure.in (jm_PREREQ_ERROR): Call it.
22563 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22564 Remove.
22565 (fatal, fatals): Remove. All callers use complain.c::fatal.
22566 (warn, warni, warns, warnss, warnss): Remove. All callers use
22567 complain.c::complain.
22568 (toomany): Remove, use fatal instead.
22569 * src/files.c (done): No argument, use complain_message_count.
22570 * src/main.c (main): Register `done' to `atexit'.
22571
22572 * src/getargs.c (usage): More `fputs', less `fprintf'.
22573
22574 2000-03-28 Akim Demaille <akim@epita.fr>
22575
22576 * lib/: New directory.
22577 * Makefile.am (SUBDIRS): Adjust.
22578 * configure.in: Adjust.
22579 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22580 useless.
22581 * src/alloca.c: Moved to lib/.
22582 * src/getopt.c: Likewise.
22583 * src/getopt1.c: Likewise.
22584 * src/getopt.h: Likewise.
22585 * src/ansi2knr.c: Likewise.
22586 * src/ansi2knr.1: Likewise.
22587 * src/Makefile.am: Adjust.
22588 * lib/Makefile.am: New file.
22589
22590 2000-03-28 Akim Demaille <akim@epita.fr>
22591
22592 * src/getargs.c (usage): Refresh the help message.
22593
22594 2000-03-17 Akim Demaille <akim@epita.fr>
22595
22596 * src/getopt1.c: Updated from textutils 2.0e
22597 * src/getopt.c: Likewise.
22598 * src/getopt.h: Likewise.
22599
22600 2000-03-17 Akim Demaille <akim@epita.fr>
22601
22602 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22603 the file name, not the whole `#line LINE FILE'.
22604
22605 2000-03-17 Akim Demaille <akim@epita.fr>
22606
22607 On syntax errors, report the token on which we choked.
22608
22609 * src/bison.s1 (yyparse): In the label yyerrlab, when
22610 YYERROR_VERBOSE, add yychar in msg.
22611
22612 2000-03-17 Akim Demaille <akim@epita.fr>
22613
22614 * src/reader.c (copy_at): New function.
22615 (copy_guard): Use it.
22616 (copy_action): Use it.
22617
22618 2000-03-17 Akim Demaille <akim@epita.fr>
22619
22620 Be kind to translators, save some useless translations.
22621
22622 * src/main.c (banner): New function.
22623 (fatal_banner): Use it.
22624 (warn_banner): Use it.
22625
22626 2000-03-17 Akim Demaille <akim@epita.fr>
22627
22628 * src/reader.c (copy_definition): Use copy_string and
22629 copy_comment. Removed now unused `match', `ended',
22630 `cplus_comment'.
22631 (copy_comment, copy_string): Moved, to be visible from
22632 copy_definition.
22633
22634 2000-03-17 Akim Demaille <akim@epita.fr>
22635
22636 * src/reader.c (copy_string): Declare `static inline'. No
22637 problems with inline, since it is checked by configure.
22638 (copy_comment): Likewise.
22639
22640 2000-03-17 Akim Demaille <akim@epita.fr>
22641
22642 * src/reader.c (packsymbols): Formatting changes.
22643
22644 2000-03-17 Akim Demaille <akim@epita.fr>
22645
22646 * src/reader.c (copy_comment): New function, factored out from:
22647 (copy_action): Use it. Removed now unused `match', `ended',
22648 `cplus_comment'.
22649 (copy_guard): Likewise.
22650
22651 2000-03-17 Akim Demaille <akim@epita.fr>
22652
22653 * src/reader.c (copy_string): New function, factored out from:
22654 (copy_action): Use it.
22655 (copy_guard): Likewise.
22656
22657 2000-03-17 Akim Demaille <akim@epita.fr>
22658
22659 Change the handling of @s so that they behave exactly like $s.
22660 There is now a pseudo variable @$ (readble and writable), location
22661 of the lhs of the rule (by default ranging from the location of
22662 the first symbol of the rhs, to the location of the last symbol,
22663 or, if the rhs is empty, YYLLOC).
22664
22665 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22666 yyval.
22667 (yyparse): When providing a default semantic action, provide a
22668 default location action.
22669 (after the $): No longer change `*YYLSP', just stack YYLOC the
22670 same way you stack YYVAL.
22671 * src/reader.c (read_declarations): Use warns.
22672 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22673 (copy_action, case '@'): Likewise.
22674 Use a standard error message, to save useless work from
22675 translators.
22676
22677 2000-03-17 Akim Demaille <akim@epita.fr>
22678
22679 * src/bison.s1: Formatting and cosmetics changes.
22680 * src/reader.c: Likewise.
22681 Update the Copyright notice.
22682
22683 2000-03-17 Akim Demaille <akim@epita.fr>
22684
22685 * src/bison.s1 (#line): All set to `#line' only, since the
22686 Makefile now handles them.
22687
22688 2000-03-16 Akim Demaille <akim@epita.fr>
22689
22690 * src/output.c (output_rule_data): Output the documentation of
22691 some of the tables.
22692 (Copyright notice): Update.
22693 Formatting changes.
22694
22695 2000-03-16 Akim Demaille <akim@epita.fr>
22696
22697 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22698 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22699 One `#if YYDEBUG' remains, since it uses variables which are
22700 defined only if `YYDEBUG != 0'.
22701
22702 2000-03-16 Akim Demaille <akim@epita.fr>
22703
22704 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22705 and related variables so that the similarities are highlighted.
22706
22707 2000-03-16 Akim Demaille <akim@epita.fr>
22708
22709 * src/bison.s1: Properly indent CPP directives.
22710
22711 2000-03-16 Akim Demaille <akim@epita.fr>
22712
22713 * src/bison.s1: Properly indent the `alloca' CPP section.
22714
22715 2000-03-16 Akim Demaille <akim@epita.fr>
22716
22717 Do not hard code values of directories in `configure.in'.
22718 Update the `configure' tool chain.
22719
22720 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22721 src/makefile.am.
22722 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22723 (AC_OUTPUT): Add m4/Makefile.
22724 Bump to bison 1.28a, 1.29 has never been released.
22725 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22726 handled via src/Makefile.am.
22727 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22728 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22729 autoheader.
22730 * Makefile.am (SUBDIRS): Add m4.
22731 (ACLOCAL_AM_FLAGS): New variable.
22732 (AUTOMAKE_OPTIONS): Add check-news.
22733 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22734 the proper line number and file name.
22735 (DEFS): Propagate the location of bison library files and of the
22736 locale files.
22737 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22738 builddir.
22739 * acinclude.m4: Remove, replaced by the directory m4.
22740 * m4/Makefile.am (EXTRA_DIST): New variable.
22741 * m4/gettext.m4: New file, from the fileutils.
22742 * m4/lcmessage.m4: Likewise
22743 * m4/progtest.m4: Likewise.
22744 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22745
22746 2000-03-10 Akim Demaille <akim@epita.fr>
22747
22748 * src/closure.c:
22749 Formatting changes of various comments.
22750 Respect the GNU coding standards at various places.
22751 Don't use `_()' when no translation is needed.
22752
22753 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22754
22755 * src/files.c:
22756 OS/2 honors TMPDIR environment variable.
22757
22758 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22759
22760 * doc/bison.texinfo: Tweaked spelling and grammar.
22761 Updated ISBN.
22762 Removed reference to price of printed copy.
22763 Mention BISON_SIMPLE and BISON_HAIRY.
22764
22765 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22766
22767 * configure.in, NEWS:
22768 Bison 1.29 released.
22769
22770 1999-10-27 Jesse Thilo <jthilo@gnu.org>
22771
22772 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22773 Added reference card.
22774
22775 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22776
22777 * po/ru.po: Added Russian translation.
22778
22779 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22780
22781 * configure.in: Added Russian translation.
22782
22783 1999-07-06 Jesse Thilo <jthilo@gnu.org>
22784
22785 * configure.in, NEWS, README:
22786 Released version 1.28.
22787
22788 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22789
22790 * src/system.h:
22791 Squashed redefinition warning on some systems.
22792
22793 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22794 Have configure build version string instead of relying on ANSI string
22795 concatentation.
22796
22797 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22798
22799 * po/POTFILES.in: Got rid of version.c.
22800
22801 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22802
22803 * acconfig.h, configure.in:
22804 Have configure build version string instead of relying on ANSI string
22805 concatentation.
22806
22807 1999-06-08 Jesse Thilo <jthilo@gnu.org>
22808
22809 * doc/bison.1:
22810 Dropped mention of `+' for long-named options.
22811
22812 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22813
22814 * src/files.c: Added <unistd.h> for unlink().
22815
22816 * src/Makefile.am, src/system.h:
22817 I18n fixes.
22818
22819 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22820
22821 * README: Added a FAQ list.
22822
22823 * configure.in, acconfig.h:
22824 I18n fixes.
22825
22826 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22827
22828 * doc/FAQ, doc/Makefile.am:
22829 Added a FAQ list.
22830
22831 1999-05-19 Jesse Thilo <jthilo@gnu.org>
22832
22833 * src/alloc.h, src/symtab.h, src/version.c:
22834 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22835
22836 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22837
22838 * src/.cvsignore, src/Makefile.am:
22839 Reorganized: sources in `src', documentation in `doc'.
22840
22841 * src/lex.c (literalchar):
22842 fixed the code for escaping double quotes (thanks
22843 Jonathan Czisny.)
22844
22845 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22846
22847 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22848 Adjusted paths to reflect directory reorganization.
22849
22850 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22851
22852 * doc/.cvsignore, doc/Makefile.am:
22853 Reorganized: sources in `src', documentation in `doc'.
22854
22855 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22856
22857 * configure.in:
22858 Updated AC_INIT file to reflect directory reorganization.
22859
22860 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22861 Reorganized: sources in `src', documentation in `doc'.
22862
22863 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22864
22865 * src/allocate.c:
22866 Don't declare calloc() and realloc() if not necessary.
22867
22868 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22869
22870 * configure.in, acconfig.h, acinclude.m4:
22871 Don't declare calloc() and realloc() if not necessary.
22872
22873 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22874
22875 * po/.cvsignore: Added i18n support.
22876
22877 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22878
22879 * acconfig.h, configure.in, Makefile.am:
22880 Added i18n support.
22881
22882 1999-03-22 Jesse Thilo <jthilo@gnu.org>
22883
22884 * src/bison.s1: Fixed #line numbers.
22885
22886 1999-03-15 Jesse Thilo <jthilo@gnu.org>
22887
22888 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22889 Added PO files from Translation Project.
22890
22891 1999-03-03 Jesse Thilo <jthilo@gnu.org>
22892
22893 * Makefile.am:
22894 Added support for non-ANSI compilers (ansi2knr).
22895
22896 1999-02-16 Jesse Thilo <jthilo@gnu.org>
22897
22898 * configure.in: Bumped version number to 1.27.
22899
22900 * Makefile.am:
22901 Added `bison.simple' to list of files removed by `make distclean'.
22902
22903 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22904
22905 * src/files.c, src/files.h:
22906 Defined locations of parser files in config.h instead of Makefile.
22907
22908 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22909
22910 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22911 Defined locations of parser files in config.h instead of Makefile.
22912
22913 1999-02-09 Jesse Thilo <jthilo@gnu.org>
22914
22915 * Makefile.am:
22916 Removed inappropriate use of $< macro.
22917
22918 1999-02-05 Jesse Thilo <jthilo@gnu.org>
22919
22920 * po/Makefile.in.in, po/POTFILES.in:
22921 Add `po' directory skeleton.
22922
22923 1999-01-27 Jesse Thilo <jthilo@gnu.org>
22924
22925 * README: Document help-bison list.
22926
22927 * configure.in: Add check for mkstemp().
22928
22929 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22930
22931 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22932 Hush a few compiler warnings.
22933
22934 * src/files.c:
22935 Add tryclose(), which verifies that fclose was successful.
22936 Hush a couple of compiler warnings.
22937
22938 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22939
22940 * Makefile.am, OChangeLog:
22941 ChangeLog is now automatically generated. Include the old version as
22942 OChangeLog.
22943
22944 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22945
22946 * 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:
22947 Update FSF address.
22948
22949 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22950
22951 * doc/bison.texinfo: Fix formatting glitch.
22952
22953 * doc/bison.texinfo: Update FSF address.
22954
22955 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22956
22957 * acconfig.h: Update FSF address.
22958
22959 1999-01-08 Jesse Thilo <jthilo@gnu.org>
22960
22961 * src/system.h:
22962 Don't define PACKAGE here, since config.h defines it.
22963
22964 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22965
22966 * src/reader.c: Update copyright date.
22967
22968 * src/main.c:
22969 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22970 favor of output directly to stderr (avoids buffer overruns).
22971
22972 * src/reader.c: Some checks for premature EOF.
22973
22974 * 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:
22975 Use prototypes if the compiler understands them.
22976
22977 * src/files.c: Honor TMPDIR on Unix hosts.
22978 Use prototypes if the compiler understands them.
22979
22980 * src/reader.c:
22981 Fix a couple of buffer overrun bugs.
22982 Use prototypes if the compiler understands them.
22983
22984 * src/system.h: Include unistd.h and ctype.h.
22985 Use #ifdef instead of #if for NLS symbols.
22986
22987 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22988
22989 * doc/bison.texinfo:
22990 Delete comment "consider using @set for edition number, etc..." since
22991 we now are doing so.
22992
22993 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22994
22995 * configure.in:
22996 Use prototypes if the compiler understands them.
22997
22998 * NEWS: Document 1.26 highlights.
22999
23000 * Makefile.am: Require Automake 1.3 or later.
23001
23002 * acconfig.h:
23003 Use prototypes if the compiler understands them.
23004
23005 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23006
23007 * src/version.c:
23008 Use VERSION symbol from automake for version number.
23009
23010 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23011
23012 * acconfig.h, configure.in, version.cin:
23013 Use VERSION symbol from automake for version number.
23014
23015 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23016
23017 * Makefile.am:
23018 Distribute original version of simple parser (bison.s1), not built
23019 version (bison.simple).
23020
23021 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23022
23023 * doc/bison.texinfo: Add info dir entry.
23024
23025 * doc/bison.texinfo:
23026 Let automake put version number into documentation.
23027
23028 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23029
23030 * src/bison.cld, src/build.com, src/vmshlp.mar:
23031 Add non-RCS files from /gd/gnu/bison.
23032
23033 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23034
23035 * doc/bison.1:
23036 Document the BISON_HAIRY and BISON_SIMPLE variables.
23037
23038 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23039
23040 * src/version.c: Build version.c automatically.
23041
23042 * src/reader.c:
23043 Fix token numbering (used to start at 258, not 257).
23044
23045 * src/system.h: Include config.h.
23046
23047 * src/getargs.c: Update bug report address.
23048
23049 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23050 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23051
23052 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23053
23054 * Makefile.am:
23055 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23056
23057 * configure.in, version.cin:
23058 Build version.c automatically.
23059
23060 * AUTHORS: Add AUTHORS file.
23061
23062 * README: Update bug report address.
23063
23064 * bison.simple:
23065 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23066
23067 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23068 Add automake stuff.
23069
23070 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23071
23072 * doc/bison.texinfo: Clean up some formatting.
23073
23074 1998-05-05 Richard Stallman <rms@gnu.org>
23075
23076 * doc/bison.texinfo:
23077 Explain better why to make a pure parser.
23078
23079 1998-01-05 Richard Stallman <rms@gnu.org>
23080
23081 * src/files.c (openfiles):
23082 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23083 find a temporary directory, if possible. Do not unlink files while
23084 they are open.
23085
23086 1997-08-25 Richard Stallman <rms@gnu.org>
23087
23088 * src/reader.c (stack_offset;):
23089 Change some warni to warns.
23090
23091 * src/lex.c (literalchar): Use warns, not warni.
23092
23093 1997-06-28 Richard Stallman <rms@gnu.org>
23094
23095 * src/bison.s1: Add a Bison version comment.
23096
23097 * src/main.c (fatal, warn, berror):
23098 Use program_name.
23099
23100 1997-06-28 Richard Stallman <rms@gnu.org>
23101
23102 * Makefile.in (bison_version): New variable.
23103 (dist): Use that variable.
23104 (bison.s1): Substitute the Bison version into bison.simple.
23105
23106 * bison.simple: Add a Bison version comment.
23107
23108 1997-06-18 Richard Stallman <rms@gnu.org>
23109
23110 * src/main.c (fatal, warn, berror):
23111 Make error messages standard.
23112 (toomany): Improve error message text.
23113
23114 * 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:
23115 new.h renamed to alloc.h.
23116
23117 1997-06-18 Richard Stallman <rms@gnu.org>
23118
23119 * Makefile.in: new.h renamed to alloc.h.
23120
23121 1997-05-24 Richard Stallman <rms@gnu.org>
23122
23123 * src/lex.c (literalchar):
23124 Fix the code for escaping \, " and '.
23125
23126 (lex): Avoid trouble when there are many chars
23127 to discard in a char literal with just several chars in it.
23128
23129 1997-05-17 Richard Stallman <rms@gnu.org>
23130
23131 * src/bison.s1:
23132 Use malloc, if using alloca is troublesome.
23133 (YYSTACK_USE_ALLOCA): New flag macro.
23134 Define it for some systems and compilers.
23135 (YYSTACK_ALLOC): New macro.
23136 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23137 If it was malloc'd, free it.
23138
23139 1997-05-17 Richard Stallman <rms@gnu.org>
23140
23141 * bison.simple:
23142 Use malloc, if using alloca is troublesome.
23143 (YYSTACK_USE_ALLOCA): New flag macro.
23144 Define it for some systems and compilers.
23145 (YYSTACK_ALLOC): New macro.
23146 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23147 If it was malloc'd, free it.
23148
23149 1997-04-23 Richard Stallman <rms@gnu.org>
23150
23151 * src/bison.s1:
23152 (alloca) [__hpux]: Always define as __builtin_alloca.
23153
23154 1997-04-23 Richard Stallman <rms@gnu.org>
23155
23156 * bison.simple:
23157 (alloca) [__hpux]: Always define as __builtin_alloca.
23158
23159 1997-04-22 Richard Stallman <rms@gnu.org>
23160
23161 * src/bison.s1:
23162 [__hpux]: Include alloca.h (right for HPUX 10)
23163 instead of declaring alloca (right for HPUX 9).
23164
23165 * src/bison.s1 (__yy_memcpy):
23166 Declare arg `count' as unsigned int.
23167 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23168
23169 1997-04-22 Richard Stallman <rms@gnu.org>
23170
23171 * bison.simple:
23172 [__hpux]: Include alloca.h (right for HPUX 10)
23173 instead of declaring alloca (right for HPUX 9).
23174
23175 * bison.simple (__yy_memcpy):
23176 Declare arg `count' as unsigned int.
23177 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23178
23179 1997-01-03 Richard Stallman <rms@gnu.org>
23180
23181 * src/allocate.c: [__STDC__ or _MSC_VER]:
23182 Declare calloc and realloc to return void *.
23183
23184 1997-01-02 Richard Stallman <rms@gnu.org>
23185
23186 * src/system.h:
23187 [_MSC_VER]: Include stdlib.h and process.h.
23188 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23189
23190 * src/main.c (main): Return FAILURE as a value.
23191 (printable_version): Declare arg as int, not char.
23192
23193 1997-01-02 Richard Stallman <rms@gnu.org>
23194
23195 * Makefile.in (dist):
23196 Explicitly check for symlinks, and copy them.
23197
23198 1996-12-19 Richard Stallman <rms@gnu.org>
23199
23200 * src/files.c:
23201 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23202
23203 1996-12-18 Paul Eggert <eggert@gnu.org>
23204
23205 * src/bison.s1 (yyparse):
23206 If __GNUC__ and YYPARSE_PARAM are both defined,
23207 declare yyparse to have a void * argument.
23208
23209 1996-12-18 Paul Eggert <eggert@gnu.org>
23210
23211 * bison.simple (yyparse):
23212 If __GNUC__ and YYPARSE_PARAM are both defined,
23213 declare yyparse to have a void * argument.
23214
23215 1996-12-17 Richard Stallman <rms@gnu.org>
23216
23217 * src/reduce.c (nbits): Add some casts.
23218
23219 1996-08-12 Richard Stallman <rms@gnu.org>
23220
23221 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23222
23223 1996-08-12 Richard Stallman <rms@gnu.org>
23224
23225 * bison.simple: Test _MSDOS as well as _MSDOS_.
23226
23227 1996-07-31 Richard Stallman <rms@gnu.org>
23228
23229 * src/bison.s1:
23230 [__sun && __i386]: Include alloca.h.
23231
23232 1996-07-31 Richard Stallman <rms@gnu.org>
23233
23234 * bison.simple:
23235 [__sun && __i386]: Include alloca.h.
23236
23237 1996-07-30 Richard Stallman <rms@gnu.org>
23238
23239 * src/bison.s1: Comment change.
23240
23241 * src/bison.s1: Test _MSDOS_, not MSDOS.
23242
23243 1996-07-30 Richard Stallman <rms@gnu.org>
23244
23245 * bison.simple: Comment change.
23246
23247 * bison.simple: Test _MSDOS_, not MSDOS.
23248
23249 1996-06-01 Richard Stallman <rms@gnu.org>
23250
23251 * 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:
23252 Insert `_' macro around many string constants.
23253
23254 * src/main.c:
23255 Insert `_' macro around many string constants.
23256
23257 (main): Call setlocale, bindtextdomain and textdomain.
23258
23259 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23260 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23261 [ENABLE_NLS]: Include libintl.h.
23262 [ENABLE_NLS] (gettext): Define.
23263 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23264 (N_, PACKAGE, LOCALEDIR): New macros.
23265
23266 1996-06-01 Richard Stallman <rms@gnu.org>
23267
23268 * POTFILES.in: New file.
23269
23270 * Makefile.in (allocate.o):
23271 Define target explicitly.
23272
23273 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23274 (LDFLAGS): Set to @LDFLAGS@.
23275 (configure): Run autoconf only if preceding `cd' succeeds.
23276 (bison.s1): Redirect output to temporary file then move the
23277 temporary to the target, rather than redirecting directly to bison.s1.
23278 (clean): Remove config.status and config.log.
23279 (distclean): Don't remove config.status here.
23280
23281 1996-05-12 Richard Stallman <rms@gnu.org>
23282
23283 * src/bison.s1:
23284 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23285
23286 1996-05-12 Richard Stallman <rms@gnu.org>
23287
23288 * bison.simple:
23289 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23290
23291 1996-05-11 Richard Stallman <rms@gnu.org>
23292
23293 * src/bison.s1 (__yy_memcpy):
23294 Really reorder the args, as was supposedly done on Feb 14 1995.
23295 (yyparse): Calls changed accordingly.
23296
23297 1996-05-11 Richard Stallman <rms@gnu.org>
23298
23299 * Makefile.in (dist): Don't use $(srcdir).
23300
23301 * bison.simple (__yy_memcpy):
23302 Really reorder the args, as was supposedly done on Feb 14 1995.
23303 (yyparse): Calls changed accordingly.
23304
23305 1996-01-27 Richard Stallman <rms@gnu.org>
23306
23307 * src/output.c (output_rule_data):
23308 Test YYERROR_VERBOSE in the conditional
23309 around the definition of ttyname.
23310
23311 1995-12-29 Richard Stallman <rms@gnu.org>
23312
23313 * src/bison.s1:
23314 Fix line numbers in #line commands.
23315
23316 1995-12-29 Richard Stallman <rms@gnu.org>
23317
23318 * bison.simple:
23319 Fix line numbers in #line commands.
23320
23321 1995-12-27 Richard Stallman <rms@gnu.org>
23322
23323 * src/bison.s1 (YYPARSE_PARAM_DECL):
23324 In C++, make it always null.
23325 (YYPARSE_PARAM_ARG): New macro.
23326 (yyparse): Use YYPARSE_PARAM_ARG.
23327
23328 1995-12-27 Richard Stallman <rms@gnu.org>
23329
23330 * bison.simple (YYPARSE_PARAM_DECL):
23331 In C++, make it always null.
23332 (YYPARSE_PARAM_ARG): New macro.
23333 (yyparse): Use YYPARSE_PARAM_ARG.
23334
23335 1995-11-29 Richard Stallman <rms@gnu.org>
23336
23337 * doc/bison.texinfo:
23338 Describe literal string tokens, %raw, %no_lines, %token_table.
23339
23340 1995-11-29 Daniel Hagerty <hag@gnu.org>
23341
23342 * doc/bison.texinfo: Fixed update date
23343
23344 1995-10-16 Richard Stallman <rms@gnu.org>
23345
23346 * src/version.c: Version 1.25.
23347
23348 1995-10-16 Richard Stallman <rms@gnu.org>
23349
23350 * NEWS: *** empty log message ***
23351
23352 1995-10-16 Richard Stallman <rms@gnu.org>
23353
23354 * doc/bison.1, doc/bison.rnh:
23355 Add new options.
23356
23357 1995-10-15 Richard Stallman <rms@gnu.org>
23358
23359 * src/vmsgetargs.c, src/getargs.c:
23360 Added -n, -k, and -raw switches.
23361 (noparserflag, toknumflag, rawtoknumflag): New variables.
23362
23363 * src/symtab.h (SALIAS):
23364 New #define for adding aliases to %token.
23365 (struct bucket): Added `alias' field.
23366
23367 * src/reduce.c (reduce_grammar):
23368 Revise error message.
23369 (print_notices): Remove final `.' from error message.
23370
23371 * src/reader.c (reader_output_yylsp):
23372 New function.
23373 (readgram): Use `#if 0' around code that accepted %command
23374 inside grammar rules: The documentation doesn't allow it,
23375 and it will fail since the %command processors scan for the next %.
23376 (parse_token_decl): Extended the %token
23377 declaration to allow a multi-character symbol as an alias.
23378 (parse_thong_decl): New function.
23379 (read_declarations): Added %thong declarations.
23380 (read_declarations): Handle NOOP to deal with allowing
23381 % declarations as another means to specify the flags.
23382 (readgram): Allow %prec prior to semantics embedded in a rule.
23383 (skip_to_char, read_declarations, copy_definition)
23384 (parse_token_decl, parse_start_decl, parse_type_decl)
23385 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23386 (get_type_name, copy_guard, copy_action, readgram)
23387 (get_type, packsymbols): Revised most error messages.
23388 Changed `fatal' to `warnxxx' to avoid aborting for error.
23389 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23390 (read_declarations): Improve the error message for
23391 an invalid character. Do not abort.
23392 (read_declarations, copy_guard, copy_action): Use
23393 printable_version to avoid unprintable characters in printed output.
23394 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23395 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23396 Allow the type of a non-terminal can be given
23397 more than once, as long as all specifications give the same type.
23398
23399 * src/output.c:
23400 (output_headers, output_trailers, output, output_gram)
23401 (output_rule_data): Implement noparserflag variable.
23402 Implement toknumflag variable.
23403 (output): Call reader_output_yylsp to output LTYPESTR.
23404
23405 * src/main.c (main):
23406 If reader sees an error, don't process the grammar.
23407 (fatals): Updated to not use VARARGS1.
23408 (printable_version, int_to_string, warn, warni, warns, warnss)
23409 (warnsss): New error reporting functions. Avoid abort for error.
23410
23411 * src/lex.h:
23412 Added THONG and NOOP for alias processing.
23413 Added SETOPT for the new code that allows setting options with %flags.
23414
23415 * src/lex.c:
23416 Include getopt.h. Add some extern decls.
23417 (safegetc): New function to deal with EOF gracefully.
23418 (literalchar); new function to deal with reading \ escapes.
23419 (lex): Use literalchar.
23420 (lex): Implemented "..." tokens.
23421 (literalchar, lex, parse_percent_token): Made tokenbuffer
23422 always contain the token. This includes growing the token
23423 buffer while reading an integer.
23424 (parse_percent_token): Replaced if-else statement with percent_table.
23425 (parse_percent_token): Added % declarations as another
23426 way to specify the flags -n, -l, and -r. Also added hooks for
23427 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23428 major changes to files.c.
23429 (lex) Retain in the incoming stream a character following
23430 an incorrect '/'.
23431 (skip_white_space, lex): Revised most error messages
23432 and changed fatal to warn to avoid aborting.
23433 (percent_table): Added %thong declarations.
23434
23435 * src/gram.h: Comment changes.
23436
23437 * src/files.c (openfiles, open_extra_files, done):
23438 Add faction flag
23439 and actfile file. Handle noparserflag. Both for -n switch.
23440
23441 * src/conflicts.c (resolve_sr_conflict):
23442 Remove use of alloca.
23443
23444 1995-06-01 Jim Meyering <meyering@gnu.org>
23445
23446 * doc/bison.texinfo: *** empty log message ***
23447
23448 1995-05-06 Richard Stallman <rms@gnu.org>
23449
23450 * src/bison.s1: Comment change.
23451
23452 1995-05-06 Richard Stallman <rms@gnu.org>
23453
23454 * bison.simple: Comment change.
23455
23456 1995-05-03 Richard Stallman <rms@gnu.org>
23457
23458 * src/version.c: Version now 1.24.
23459
23460 * src/bison.s1: Change distribution terms.
23461
23462 * src/version.c: Version now 1.23.
23463
23464 1995-05-03 Richard Stallman <rms@gnu.org>
23465
23466 * doc/bison.texinfo:
23467 Rewrite "Conditions for Using Bison".
23468 Update version to 1.24.
23469
23470 1995-05-03 Richard Stallman <rms@gnu.org>
23471
23472 * bison.simple: Change distribution terms.
23473
23474 1995-02-23 Richard Stallman <rms@gnu.org>
23475
23476 * src/files.c: Test __VMS_POSIX as well as VMS.
23477
23478 1995-02-14 Jim Meyering <meyering@gnu.org>
23479
23480 * src/bison.s1 (__yy_memcpy):
23481 Renamed from __yy_bcopy to avoid
23482 confusion. Reverse FROM and TO arguments to be consistent with
23483 those of memcpy.
23484
23485 1995-02-14 Jim Meyering <meyering@gnu.org>
23486
23487 * bison.simple (__yy_memcpy):
23488 Renamed from __yy_bcopy to avoid
23489 confusion. Reverse FROM and TO arguments to be consistent with
23490 those of memcpy.
23491
23492 1994-11-10 David J. MacKenzie <djm@gnu.org>
23493
23494 * NEWS: reformat
23495
23496 * NEWS: New file.
23497
23498 * Makefile.in (DISTFILES): Include NEWS.
23499
23500 * Makefile.in (DISTFILES):
23501 Include install-sh, not install.sh.
23502
23503 * configure.in: Update to Autoconf v2 macro names.
23504
23505 1994-10-05 David J. MacKenzie <djm@gnu.org>
23506
23507 * Makefile.in: fix typo
23508
23509 * Makefile.in (prefix, exec_prefix):
23510 Let configure set them.
23511
23512 1994-09-28 David J. MacKenzie <djm@gnu.org>
23513
23514 * Makefile.in: Set datadir to $(prefix)/share.
23515
23516 1994-09-15 Richard Stallman <rms@gnu.org>
23517
23518 * src/bison.s1:
23519 Update copyright notice and GPL version.
23520
23521 1994-09-15 Richard Stallman <rms@gnu.org>
23522
23523 * bison.simple:
23524 Update copyright notice and GPL version.
23525
23526 1994-07-12 Richard Stallman <rms@gnu.org>
23527
23528 * src/reduce.c, src/reader.c:
23529 entered into RCS
23530
23531 1994-05-05 David J. MacKenzie <djm@gnu.org>
23532
23533 * Makefile.in: entered into RCS
23534
23535 1994-03-26 Richard Stallman <rms@gnu.org>
23536
23537 * src/bison.s1: entered into RCS
23538
23539 1994-03-26 Richard Stallman <rms@gnu.org>
23540
23541 * bison.simple: entered into RCS
23542
23543 1994-03-25 Richard Stallman <rms@gnu.org>
23544
23545 * src/main.c: entered into RCS
23546
23547 1994-03-24 Richard Stallman <rms@gnu.org>
23548
23549 * src/conflicts.c: entered into RCS
23550
23551 1994-01-02 Richard Stallman <rms@gnu.org>
23552
23553 * Makefile.in: *** empty log message ***
23554
23555 1993-11-21 Richard Stallman <rms@gnu.org>
23556
23557 * src/bison.s1: *** empty log message ***
23558
23559 1993-11-21 Richard Stallman <rms@gnu.org>
23560
23561 * doc/bison.texinfo: entered into RCS
23562
23563 * doc/bison.texinfo: *** empty log message ***
23564
23565 1993-11-21 Richard Stallman <rms@gnu.org>
23566
23567 * bison.simple: *** empty log message ***
23568
23569 1993-10-25 David J. MacKenzie <djm@gnu.org>
23570
23571 * doc/bison.texinfo: *** empty log message ***
23572
23573 1993-10-19 Richard Stallman <rms@gnu.org>
23574
23575 * src/bison.s1: *** empty log message ***
23576
23577 1993-10-19 Richard Stallman <rms@gnu.org>
23578
23579 * bison.simple: *** empty log message ***
23580
23581 1993-10-14 Richard Stallman <rms@gnu.org>
23582
23583 * src/bison.s1: *** empty log message ***
23584
23585 1993-10-14 Richard Stallman <rms@gnu.org>
23586
23587 * bison.simple: *** empty log message ***
23588
23589 1993-09-14 David J. MacKenzie <djm@gnu.org>
23590
23591 * doc/bison.texinfo: *** empty log message ***
23592
23593 1993-09-13 Noah Friedman <friedman@gnu.org>
23594
23595 * Makefile.in: *** empty log message ***
23596
23597 1993-09-10 Richard Stallman <rms@gnu.org>
23598
23599 * src/conflicts.c: *** empty log message ***
23600
23601 * src/system.h: entered into RCS
23602
23603 1993-09-10 Richard Stallman <rms@gnu.org>
23604
23605 * doc/bison.1: entered into RCS
23606
23607 1993-09-06 Noah Friedman <friedman@gnu.org>
23608
23609 * src/version.c: entered into RCS
23610
23611 1993-09-06 Noah Friedman <friedman@gnu.org>
23612
23613 * Makefile.in: *** empty log message ***
23614
23615 1993-07-30 David J. MacKenzie <djm@gnu.org>
23616
23617 * Makefile.in: *** empty log message ***
23618
23619 1993-07-24 Richard Stallman <rms@gnu.org>
23620
23621 * src/bison.s1: *** empty log message ***
23622
23623 1993-07-24 Richard Stallman <rms@gnu.org>
23624
23625 * bison.simple: *** empty log message ***
23626
23627 1993-07-08 David J. MacKenzie <djm@gnu.org>
23628
23629 * Makefile.in: *** empty log message ***
23630
23631 1993-07-04 Richard Stallman <rms@gnu.org>
23632
23633 * src/bison.s1: *** empty log message ***
23634
23635 1993-07-04 Richard Stallman <rms@gnu.org>
23636
23637 * bison.simple: *** empty log message ***
23638
23639 1993-06-26 David J. MacKenzie <djm@gnu.org>
23640
23641 * src/getargs.c: entered into RCS
23642
23643 1993-06-26 David J. MacKenzie <djm@gnu.org>
23644
23645 * doc/bison.texinfo: *** empty log message ***
23646
23647 * doc/bison.1: New file.
23648
23649 1993-06-25 Richard Stallman <rms@gnu.org>
23650
23651 * src/getargs.c: New file.
23652
23653 1993-06-16 Richard Stallman <rms@gnu.org>
23654
23655 * src/bison.s1: *** empty log message ***
23656
23657 1993-06-16 Richard Stallman <rms@gnu.org>
23658
23659 * bison.simple: *** empty log message ***
23660
23661 1993-06-03 Richard Stallman <rms@gnu.org>
23662
23663 * src/bison.s1: New file.
23664
23665 1993-06-03 Richard Stallman <rms@gnu.org>
23666
23667 * doc/bison.texinfo: *** empty log message ***
23668
23669 1993-06-03 Richard Stallman <rms@gnu.org>
23670
23671 * bison.simple: New file.
23672
23673 1993-05-19 Richard Stallman <rms@gnu.org>
23674
23675 * doc/bison.texinfo: New file.
23676
23677 1993-05-07 Noah Friedman <friedman@gnu.org>
23678
23679 * Makefile.in: *** empty log message ***
23680
23681 1993-04-28 Noah Friedman <friedman@gnu.org>
23682
23683 * src/reader.c: *** empty log message ***
23684
23685 1993-04-23 Noah Friedman <friedman@gnu.org>
23686
23687 * src/alloc.h: entered into RCS
23688
23689 1993-04-20 David J. MacKenzie <djm@gnu.org>
23690
23691 * src/version.c: *** empty log message ***
23692
23693 * src/files.c, src/allocate.c:
23694 entered into RCS
23695
23696 * src/reader.c: *** empty log message ***
23697
23698 * src/lex.c: entered into RCS
23699
23700 * src/conflicts.c: New file.
23701
23702 * src/symtab.c: entered into RCS
23703
23704 * src/alloc.h: New file.
23705
23706 * src/LR0.c: entered into RCS
23707
23708 1993-04-18 Noah Friedman <friedman@gnu.org>
23709
23710 * src/reader.c: New file.
23711
23712 * src/version.c: *** empty log message ***
23713
23714 1993-04-18 Noah Friedman <friedman@gnu.org>
23715
23716 * Makefile.in: *** empty log message ***
23717
23718 1993-04-17 Noah Friedman <friedman@gnu.org>
23719
23720 * Makefile.in: *** empty log message ***
23721
23722 1993-04-15 Richard Stallman <rms@gnu.org>
23723
23724 * src/main.c, src/files.c:
23725 New file.
23726
23727 1993-04-15 Noah Friedman <friedman@gnu.org>
23728
23729 * configure.in: entered into RCS
23730
23731 * configure.in: *** empty log message ***
23732
23733 * configure.in: New file.
23734
23735 1993-04-14 Richard Stallman <rms@gnu.org>
23736
23737 * Makefile.in: New file.
23738
23739 1993-04-13 Richard Stallman <rms@gnu.org>
23740
23741 * src/version.c: New file.
23742
23743 1993-03-25 Richard Stallman <rms@gnu.org>
23744
23745 * src/output.c: entered into RCS
23746
23747 1992-09-25 Richard Stallman <rms@gnu.org>
23748
23749 * configure.bat: entered into RCS
23750
23751 1992-06-22 Richard Stallman <rms@gnu.org>
23752
23753 * src/vmsgetargs.c: entered into RCS
23754
23755 1992-06-22 Richard Stallman <rms@gnu.org>
23756
23757 * doc/bison.rnh: entered into RCS
23758
23759 1992-04-20 David J. MacKenzie <djm@gnu.org>
23760
23761 * README: entered into RCS
23762
23763 1992-01-22 Richard Stallman <rms@gnu.org>
23764
23765 * src/machine.h: entered into RCS
23766
23767 1991-12-21 Richard Stallman <rms@gnu.org>
23768
23769 * src/lalr.c, src/closure.c:
23770 entered into RCS
23771
23772 1991-12-20 Richard Stallman <rms@gnu.org>
23773
23774 * src/state.h: entered into RCS
23775
23776 1991-12-18 Richard Stallman <rms@gnu.org>
23777
23778 * src/print.c, src/nullable.c, src/derives.c:
23779 entered into RCS
23780
23781 1991-11-03 David J. MacKenzie <djm@gnu.org>
23782
23783 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23784 entered into RCS
23785
23786 1988-09-09 Richard Stallman <rms@gnu.org>
23787
23788 * src/bison.hairy: entered into RCS
23789
23790 1987-12-16 Richard Stallman <rms@gnu.org>
23791
23792 * REFERENCES: entered into RCS
23793
23794
23795 -----
23796
23797 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
23798 Inc.
23799
23800 Copying and distribution of this file, with or without
23801 modification, are permitted provided the copyright notice and this
23802 notice are preserved.