]> git.saurik.com Git - bison.git/blob - ChangeLog
doc: please Emacs.
[bison.git] / ChangeLog
1 2010-05-11 Akim Demaille <demaille@gostai.com>
2
3 doc: please Emacs.
4 * doc/bison.texinfo (Local Variables): Move this after the
5 LocalWords, since the latter are looked for in the whole document,
6 while the former are looked for only at its end.
7 Require american spell checking.
8
9 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
10
11 doc: clean up new subsections in manual.
12 * doc/bison.texinfo (%define Summary): Reword so it reads well as
13 a separate section. For example, add an intro, and move most of
14 the text outside of the @deffn so it is not indented so far.
15 (%code Summary): Likewise.
16 (Table of Symbols): Reword %code entry to match the %code entry in
17 Decl Summary.
18
19 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
20
21 doc: finish splitting apart the manual's Decl Summary section.
22 Suggested by Akim Demaille at
23 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
24 * doc/bison.texinfo (Decl Summary): Extract most of the %define
25 entry into...
26 (%define Summary): ... this new subsection, and update all
27 cross-references. For readability of the patches, rewriting of
28 the text so it makes sense as a separate subsection will come in a
29 later patch. Moreover, the majority of the text describing the
30 various new LR features should likely move to another new section
31 somewhere.
32
33 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
34
35 doc: begin to split apart the manual's Decl Summary section.
36 Discussed in thread starting at
37 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
38 * doc/bison.texinfo (Decl Summary): Extract most of the %code
39 entry into...
40 (%code Summary): ... this new subsection, and update all
41 cross-references. For readability of the patches, rewriting of
42 the text so it makes sense as a separate subsection will come in a
43 later patch.
44
45 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
46
47 doc: clean up naming of various Bison files.
48 The Bison manual's names for various files associated with a Bison
49 parser has devolved into inconsistency. This patch makes the
50 naming consistent for the most important files. First, it chooses
51 "grammar file" over "input file". The former appears to be more
52 traditional in the Bison manual, and Bison has other input
53 files (skeletons). Second, it chooses "parser implementation
54 file" over names like "parser file", "parser source file", "parser
55 source code file", and "parser output file". The new name makes
56 it clearer where Bison generates the main parser implementation,
57 and it is easily distinguishable from "parser header file".
58 * doc/bison.texinfo: Implement throughout.
59
60 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
61
62 doc: give credit to more of Bison's developers.
63 * doc/bison.texinfo (Introduction): Don't imply that only Robert
64 Corbett, Richard Stallman, and Wilfred Hansen have contributed to
65 Bison. However, I don't have time to write a full history, so
66 just point readers to THANKS and ChangeLog.
67
68 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
69
70 doc: document experimental features better.
71 * doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
72 LR(1) are experimental. Mention Java. Normally experimental
73 features probably shouldn't be mentioned in the introduction.
74 However, if Bison's limitations to LALR(1), C, and C++ are so
75 important that they should be mentioned here, then it's important
76 to point out that Bison is beginning to escape those limitations.
77 Moreover, these particular experimental features have very little
78 chance of being removed.
79 * src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
80 experimental.
81
82 2011-01-29 Joel E. Denny <joeldenny@joeldenny.org>
83
84 Do not allow identifiers that start with a dash.
85 This cleans up our previous fixes for a bug whereby Bison
86 discarded `.field' in `$-1.field'. The previous fixes were less
87 restrictive about where a dash could appear in an identifier, but
88 the restrictions were hard to explain. That bug was reported and
89 this final fix was originally suggested by Paul Hilfinger. This
90 also fixes a remaining bug reported by Paul Eggert whereby Bison
91 parses `%token ID -123' as `%token ID - 123' and handles `-' as an
92 identifier. Now, `-' cannot be an identifier. Discussed in
93 threads beginning at
94 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
95 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
96 * NEWS (2.5): Update entry describing the dash extension to
97 grammar symbol names. Also, move that entry before the named
98 references entry because the latter mentions the former.
99 * doc/bison.texinfo (Symbol): Update documentation for symbol
100 names. As suggested by Paul Eggert, mention the effect of periods
101 and dashes on named references.
102 (Decl Summary): Update documentation for unquoted %define values,
103 which, as a side effect, can no longer start with dashes either.
104 * src/scan-code.l (id): Implement.
105 * src/scan-gram.l (id): Implement.
106 * tests/actions.at (Exotic Dollars): Extend test group to exercise
107 bug reported by Paul Hilfinger.
108 * tests/input.at (Symbols): Update test group, and extend to
109 exercise bug reported by Paul Eggert.
110 * tests/named-refs.at (Stray symbols in brackets): Update test
111 group.
112 ($ or @ followed by . or -): Likewise.
113 * tests/regression.at (Invalid inputs): Likewise.
114
115 2011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
116
117 * data/yacc.c: Fix last apostrophe warning from xgettext.
118
119 2011-01-09 Paul Eggert <eggert@cs.ucla.edu>
120
121 Fix minor problems encountered by a fresh bootstrap.
122 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
123 as they confuse xgettext, which tries to parse them as C character
124 constants in a preprocessor directive.
125 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
126 that expression might not promote to int on some platforms.
127 * src/parse-gram.c, src/parse-gram.h: Regenerate.
128
129 2011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
130
131 Improve error messages for `$' or `@' followed by `.' or `-'.
132 Previously, for this special case of an invalid reference, the
133 usual "symbol not found in production:" was printed. However,
134 because the symbol name was parsed as the empty string, that
135 message was followed immediately by a newline instead of a symbol
136 name. In reality, this is a syntax error, so the reference is
137 invalid regardless of the symbols actually appearing in the
138 production. Discussed at
139 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
140 * src/scan-code.l (parse_ref): Report the above case as a syntax
141 error. Other than that, continue to handle this case like any
142 other invalid reference that Bison manages to parse because
143 "possibly meant" messages can still be helpful to the user.
144 * tests/named-refs.at ($ or @ followed by . or -): New test group.
145
146 2011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
147
148 doc: don't use @acronym.
149 Lately, many GNU packages are dropping it. See
150 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
151 * doc/bison.texinfo: Remove all uses.
152
153 2011-01-05 Alex Rozenman <rozenman@gmail.com>
154
155 Do not allow identifiers that start with a negative number.
156 Reported by Paul Hilfinger as a side effect of named references
157 support at
158 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
159 Suggested by Paul Eggert.
160 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
161 * src/scan-gram.l ({letter}, {id}): Likewise.
162
163 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
164
165 * ChangeLog (2011-01-02): improve description.
166
167 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
168
169 maint: don't update copyright years in bootstrap.
170 * .x-update-copyright: Add entry for bootstrap.
171 * bootstrap: Remove 2011 from copyright years. The bootstrap
172 version we're currently using comes from an older version of
173 gnulib.
174 * bootstrap.conf (bootstrap_sync): Add comments explaining this
175 issue.
176
177 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
178
179 maint: run "make update-copyright".
180
181 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
182
183 maint: prepare to use year ranges in copyright notices.
184 * README (Copyright statements): New section explaining the range
185 notation. The GNU maintainers document requires this explanation:
186 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
187 I copied our explanation from coreutils.
188 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
189 disabled Bison's automated use of ranges.
190 * cfg.mk (update-copyright-env): Likewise.
191
192 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
193
194 Correct my email address.
195 * ChangeLog: In all recent entries.
196 * THANKS (Joel E. Denny): Here.
197
198 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
199
200 doc: cleanup.
201 * NEWS (2.5): Try to sort entries according to how interesting
202 users might find them.
203
204 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
205
206 doc: cleanup.
207 * NEWS (2.5): Make some minor improvements to wording, and format
208 entries more consistently.
209 * doc/bison.texinfo (Language and Grammar): Point out that IELR
210 and canonical LR are experimental features.
211 (Decl Summary): In list of %define variables, make wording more
212 consistent. Improve discussion of using LALR for GLR.
213
214 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
215
216 parse.lac: document.
217 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
218 other corrections to verbose syntax error messages.
219 * doc/bison.texinfo (Decl Summary): Rewrite entries for
220 lr.default-reductions and lr.type to be clearer, to mention
221 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
222 for parse.lac.
223 (Glossary): Add entry for LAC.
224
225 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
226
227 parse.lac: implement exploratory stack reallocations.
228 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
229 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
230 with values of "failures" (default) or "full".
231 (b4_declare_parser_state_variables): Add yyesa, yyes, and
232 yyes_capacity variables.
233 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
234 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
235 LAC requested.
236 (YYCOPY_NEEDED): New cpp macro.
237 (YYCOPY): Define if LAC requested.
238 (yy_lac_stack_realloc): New function implementing stack
239 reallocations. Use YYMAXDEPTH for maximum stack size given that
240 the stack should never need to grow larger than the main state
241 stack needs to grow without LAC.
242 (YY_LAC_ESTABLISH): Update yy_lac invocation.
243 (yy_lac): Add arguments for exploratory stack memory data
244 recorded in the main parser. Invoke yy_lac_stack_realloc when
245 reallocation is necessary.
246 (yysyntax_error): Add the same new arguments and pass them to
247 yy_lac.
248 (yypstate_delete): Free yyes if necessary.
249 (yyesa, yyes, yyes_capacity): #define these to yypstate members
250 in the case of push parsing.
251 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
252 Update yysyntax_error invocations. At yyreturn, free yyes if
253 necessary.
254 * src/parse-gram.y: %define parse.lac full.
255 * tests/input.at (LAC: errors for %define): Extend for
256 parse.lac-memory-trace.
257 * tests/regression.at (LAC: Exploratory stack): Extend to check
258 that stack reallocs happen when expected.
259 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
260 parse.lac.es-capacity-initial.
261
262 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
263
264 parse.lac: implement as %define variable.
265 LAC = lookahead correction. See discussion at
266 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
267 However, one point there must be corrected: because of %nonassoc,
268 LAC is *not* always redundant for lr.type=canonical-lr.
269 * data/yacc.c: Accept values of "none" (default) or "full" for
270 parse.lac. Accept %define parse.lac.es-capacity to specify
271 capacity of LAC's temporary exploratory stack. It defaults to 20
272 and, for now, will not grow dynamically.
273 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
274 parse.lac!=none.
275 (YYBACKUP): Invoke YY_LAC_DISCARD.
276 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
277 yy_lac and track when it needs to be invoked
278 (yy_lac): New function that, given the current stack, determines
279 whether a token can eventually be shifted. Return status mimics
280 yyparse return status.
281 (yysyntax_error): Change yystate argument to yyssp so stack top
282 can be passed to yy_lac. If LAC is requested, build expected
283 token list by invoking yy_lac for every token instead of just
284 checking the current state for lookaheads. Return 2 if yy_lac
285 exhausts memory.
286 (yyparse, yypush_parse): Use local variable yy_lac_established and
287 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
288 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
289 is requested.
290 * tests/conflicts.at (%nonassoc and eof): Extend to check the
291 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
292 (%error-verbose and consistent errors): Likewise.
293 (LAC: %nonassoc requires splitting canonical LR states): New test
294 group demonstrating how LAC can fix canonical LR.
295 * tests/input.at (LAC: Errors for %define): New test group.
296 * tests/regression.at (LAC: Exploratory stack): New test group.
297 (LAC: Memory exhaustion): New test group.
298
299 2010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
300
301 build: use gnulib's new bootstrap_sync option.
302 Now, whenever we update bison's copy of gnulib, bootstrap will
303 update itself the next time it's run.
304 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
305 * bootstrap.conf (bootstrap_sync): Set to true.
306 * gnulib: Update to latest so bootstrap is in sync now.
307
308 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
309
310 yysyntax_error: adjust prior fixes for branch-2.5's lalr1.cc.
311 On master, there is no yychar in lalr1.cc, but there is on
312 branch-2.5, and the prior cherry-pick of "Fix handling of yychar
313 manipulation in user semantic actions" wasn't adjusted for that
314 difference.
315 * data/lalr1.cc (yy::parser::parse): Translate yychar before
316 every use of yytoken, and add comments explaining this approach.
317 * tests/conflicts.at (%error-verbose and consistent errors):
318 Extend to test yychar manipulation with lalr1.cc.
319
320 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
321
322 yysyntax_error: fix for consistent error with lookahead.
323 * NEWS (2.5): Document.
324 * data/yacc.c (yysyntax_error): In a verbose syntax error
325 message while in a consistent state with a default action (which
326 must be an error action given that yysyntax_error is being
327 invoked), continue to drop the expected token list, but don't
328 drop the unexpected token unless there actually is no lookahead.
329 Moreover, handle that internally instead of returning 1 to tell
330 the caller to do it. With that meaning of 1 gone, renumber
331 return codes more usefully.
332 (yyparse, yypush_parse): Update yysyntax_error usage. Most
333 importantly, set yytoken to YYEMPTY when there's no lookahead.
334 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
335 unexpected token unless there actually is no lookahead.
336 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
337 set yytoken to yyempty_ before invoking yysyntax_error_.
338 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
339 token unless there actually is no lookahead.
340 * data/lalr1.java (YYParser::parse): If there's no lookahead,
341 set yytoken to yyempty_ before invoking yysyntax_error.
342 (YYParser::yysyntax_error): Again, don't drop the unexpected
343 token unless there actually is no lookahead.
344 * tests/conflicts.at (%error-verbose and consistent
345 errors): Extend test group to further reveal how the previous
346 use of the simple "syntax error" message was too general. Test
347 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
348 failure.
349 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
350 to...
351 * tests/local.at: ... here.
352 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
353 (AT_BISON_OPTION_POPDEFS): Pop it.
354 (AT_FULL_COMPILE): Extend to handle Java.
355
356 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
357
358 yysyntax_error: more preparation for readability of next patch.
359 There are no behavioral changes here.
360 * data/glr.c (yyreportSyntaxError): Reorganize.
361 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
362 * tests/conflicts.at (%error-verbose and consistent errors):
363 Reorganize.
364
365 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
366
367 yysyntax_error: prepare for readability of next patches.
368 These are purely whitespace changes that result in ugly code
369 but that make the next couple of patches much easier to read.
370 * data/glr.c (yyreportSyntaxError): Reindent.
371 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
372 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
373 * data/yacc.c (yysyntax_error): Reindent.
374
375 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
376
377 yysyntax_error: improve invocation readability.
378 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
379 invocation, get rid of the while loop, which is misleading
380 because there are really at most two iterations.
381
382 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
383
384 * ChangeLog: Correct some errors in previous entries.
385
386 2010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
387
388 maint: re-anchor all .gitignore entries.
389 * bootstrap: Copy from gnulib's latest for the fix to
390 automatically anchor entries it constructs.
391 * gnulib: Update to latest just so it has the same bootstrap.
392 * .gitignore, build-aux/.gitignore, doc/.gitignore:
393 * lib/.gitignore, m4/.gitignore, po/.gitignore:
394 * runtime-po/.gitignore: Re-anchor all entries.
395
396 2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
397
398 Fix portability problem on OpenBSD 4.7.
399
400 Jim Meyering reported this in
401 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
402 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
403 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
404 for quite some time.
405 * src/parse-gram.c, src/parse-gram.h: Regenerate.
406 * tests/regression.at: Tamper with the renamed witness.
407
408 Adjust to recent changes to gnulib bootstrap.
409
410 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
411 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
412 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
413 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
414 anymore and don't know of anybody else who does. If someone needs
415 these files, they can resurrect them.
416 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
417 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
418 Omit leading '/', since bootstrap omits it.
419 Adjust file names to match current contents better.
420 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
421 installed just for us.
422 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
423 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
424 needed somehow. Don't have time to look into why.
425 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
426 the GNU malloc behavior, where malloc (0) != NULL unless we're
427 out of storage? If not, we can omit malloc-gnu; but for now I left
428 it in to be safe.
429 (vc_ignore): Remove.
430 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
431 uses that convention.
432
433 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
434
435 Version 2.4.3.
436 * NEWS (2.4.3): Set date.
437
438 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
439
440 maint: add gettext version to release announcements.
441 Suggested by Paul Hilfinger at
442 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
443 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
444 * cfg.mk (bootstrap-tools): Add gettext.
445
446 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
447
448 doc: fix -W and %expect documentation some.
449 * NEWS (2.4.3): Mention that there are documentation fixes.
450 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
451 turns conflicts into errors not warnings.
452 (Shift/Reduce): Likewise.
453 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
454
455 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
456
457 -Werror: fix for rules useless in parser after conflicts.
458 * NEWS (2.4.3): Document fix.
459 * src/complain.c (error_message): Extend to handle incomplete
460 error messages so warn and warn_at can be used in more cases.
461 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
462 -Werror is always obeyed.
463 * src/reduce.c (reduce_print): Use warn so that the "warnings
464 being treated as errors" message is printed consistently before
465 the first warning message. This makes testing easier.
466 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
467 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
468 --warnings=error when warnings appear in bison's stderr.
469
470 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
471
472 maint: enable gnits only at stable releases.
473 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
474 version string should disable gnits. Explain in comments.
475
476 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
477
478 i18n: update.
479 * po/POTFILES.in: Add src/graphviz.c.
480
481 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
482
483 i18n: fix for gnulib.
484 * po/POTFILES.in: Add remaining gnulib files that have
485 translatable strings.
486
487 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
488
489 maint: use announce-gen's new --mail-headers.
490 * HACKING (Announce): Update instructions.
491 * cfg.mk (announcement_Cc_): Define.
492 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
493 required by latest gnulib.
494 * gnulib: Update to latest.
495
496 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
497
498 tests: handle Valgrind that complains about >&-.
499 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
500 (Output files: -dv >&-): Skip test group if running
501 maintainer-check-valgrind.
502
503 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
504
505 Update from GFDL GFDL 1.2 to 1.3.
506 * doc/bison.texinfo: Update GFDL version number.
507 * doc/fdl.texi: Update to version 1.3, taken from:
508 http://www.gnu.org/licenses/fdl.texi
509
510 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
511
512 Do not use date ranges in copyright notices.
513 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
514
515 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
516 * TODO, bootstrap, bootstrap.conf:
517 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
518 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
519 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
520 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
521 * data/lalr1.java, data/location.cc:
522 * data/xslt/bison.xsl:
523 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
524 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
525 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
526 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
527 * djgpp/subpipe.c, djgpp/subpipe.h:
528 * djgpp/testsuite.sed, doc/bison.texinfo:
529 * doc/refcard.tex, etc/README, etc/bench.pl.in:
530 * examples/calc++/Makefile.am, examples/extexi:
531 * lib/abitset.c, lib/abitset.h:
532 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
533 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
534 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
535 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
536 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
537 * lib/libiberty.h, lib/main.c, lib/timevar.c:
538 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
539 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
540 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
541 * src/AnnotationList.c, src/AnnotationList.h:
542 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
543 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
544 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
545 * src/complain.h, src/conflicts.c, src/conflicts.h:
546 * src/derives.c, src/derives.h, src/files.c, src/files.h:
547 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
548 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
549 * src/ielr.h, src/lalr.c, src/lalr.h:
550 * src/location.c, src/location.h, src/main.c:
551 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
552 * src/named-ref.h, src/nullable.c, src/nullable.h:
553 * src/output.c, src/output.h, src/parse-gram.y:
554 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
555 * src/print_graph.c, src/print_graph.h, src/reader.c:
556 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
557 * src/relation.h, src/scan-code.h, src/scan-code.l:
558 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
559 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
560 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
561 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
562 * tests/actions.at, tests/atlocal.in, tests/c++.at:
563 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
564 * tests/existing.at, tests/glr-regression.at:
565 * tests/headers.at, tests/input.at, tests/java.at:
566 * tests/local.at, tests/named-refs.at:
567 * tests/output.at, tests/push.at, tests/reduce.at:
568 * tests/regression.at, tests/sets.at, tests/skeletons.at:
569 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
570 * data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
571 * tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
572 * etc/Makefile.am:
573 Don't use date ranges in copyright notices.
574
575 2010-05-11 Akim Demaille <demaille@gostai.com>
576
577 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
578 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
579 header file to the implementation file, after the user %code
580 sections.
581 * NEWS (2.5): Document this.
582
583 2010-05-07 Akim Demaille <demaille@gostai.com>
584
585 c++: use YYRHSLOC.
586 * data/lalr1.cc (YYRHSLOC): New.
587 (YYLLOC_DEFAULT): Use it.
588 * data/glr.cc: If location_type was user defined, do not include
589 location.hh, and do not produce location.hh and position.hh.
590 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
591 Check that glr.cc supports user defined location_type.
592 * NEWS: Document this.
593
594 2010-05-10 Akim Demaille <demaille@gostai.com>
595
596 doc: fix lalr1.cc documentation.
597 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
598 (C++ Bison Interface): Fix lalr1.cc skeleton name.
599 (C++ Parser Interface): Fix semantic_type and location_type names.
600 Document yy::parser::token.
601 Reported by Jerry Quinn.
602
603 2010-05-04 Akim Demaille <demaille@gostai.com>
604
605 lalr1.cc: don't generate location.hh when location_type is defined
606 * data/bison.m4 (b4_percent_define_use): New.
607 (b4_percent_define_get): Use it.
608 Accept a default value.
609 * data/c++.m4: Do not provide a default value for the %define
610 variable location_type, rather, use b4_percent_define_get with a
611 default argument where its value is needed.
612 * data/lalr1.cc: Do not load location.cc (which outputs both
613 location.hh and position.hh) if the user defined location_type.
614 Do not include location.hh either.
615 * data/glr.cc: Likewise.
616
617 2010-05-04 Akim Demaille <demaille@gostai.com>
618
619 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
620 * tests/calc.at (Span): Instead of begin/end, as in the built-in
621 location class, use first and last.
622 Define YYLLOC_DEFAULT to adjust to these changes.
623 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
624 location_type changes.
625
626 2010-05-04 Akim Demaille <demaille@gostai.com>
627
628 tests: enhance AT_SYNCLINES_COMPILE.
629 * tests/synclines.at (AT_TEST_SYNCLINE): Move GCC 4.5 protection
630 into...
631 (AT_SYNCLINES_COMPILE): here.
632 Add more distcc patterns.
633
634 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
635
636 tests: fix maintainer-xml-check.
637 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
638 Update output to include comments now produced by --graph.
639 (xsl:template match="automaton"): As for --graph, name the
640 digraph after the grammar file.
641 * src/print-xml.c (escape_bufs): Enlarge array.
642 (print_xml): Add bug-report and url attributes to
643 bison-xml-report element.
644
645 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
646
647 In DOT output, convert from "/*" comments to "//" comments.
648 This handles the possibility that a "*/" might appear in
649 variable portions of those comments at some point in the future.
650 * src/graphviz.c (start_graph): Implement.
651
652 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
653
654 Document that undefined %prec identifier warnings will remain.
655 * NEWS (2.4.3): Here.
656 (2.4.2): Here.
657
658 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
659
660 Revert 2009-12-30 change for undefined %prec token complaints.
661 That is, keep them as warnings because that should be sufficient
662 to satisfy POSIX without creating backward compatibility issues.
663 Suggested by Richard Stallman at
664 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
665 * NEWS (2.5): Remove mention of complaint.
666 * src/reader.c (grammar_rule_check): Convert complaint back to
667 warning.
668 * tests/input.at (%prec's token must be defined): Update.
669
670 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
671
672 build: don't require src/bison during bootstrap.
673 Suggested by Eric Blake at
674 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
675 * bootstrap.conf (bootstrap_epilogue): New function to make sure
676 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
677
678 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
679
680 i18n: fix untranslatable string.
681 Reported by Goran Uddeborg at
682 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
683 * src/muscle-tab.c (muscle_percent_define_insert): Here.
684
685 2010-04-13 Akim Demaille <demaille@gostai.com>
686
687 tests: calc: minor refactoring.
688 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
689
690 2010-04-13 Akim Demaille <demaille@gostai.com>
691
692 tests: calc: simplify location management.
693 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
694 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
695 define the appropriate AT_LOC accessors.
696 * tests/calc.at: Use AT_LOC accessors.
697
698 2010-04-13 Akim Demaille <demaille@gostai.com>
699
700 test location_type.
701 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
702 Define AT_LOCATION_TYPE_IF.
703 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
704 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
705 used, provide a user location type and use it.
706 (Simple LALR1 C++ Calculator): Add a test case for location_type.
707
708 2010-04-13 Akim Demaille <demaille@gostai.com>
709
710 tests: check fclose's return value.
711 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
712
713 2010-04-13 Akim Demaille <demaille@gostai.com>
714
715 tests: don't depend on the actual location type.
716 * tests/calc.at: Use yy::parser::location_type rather than
717 yy::location, since the former is always right, and might point to
718 another type than the latter.
719
720 2010-04-13 Akim Demaille <demaille@gostai.com>
721
722 formatting changes.
723 * tests/calc.at: Formatting changes.
724
725 2010-04-13 Akim Demaille <demaille@gostai.com>
726
727 lalr1.cc: remove useless forward declaration.
728 * data/lalr1.cc: Include location.hh before stack.hh.
729 Remove the useless forward declarations of position and location.
730 Reported by Chris Morley.
731 * data/glr.cc: Likewise.
732
733 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
734
735 * NEWS (2.4.3): Mention fix for Sun Studio C++.
736
737 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
738
739 tests: fix for newer Sun Studio C++.
740 Reported by Dagobert Michelsen at
741 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
742 * THANKS (Dagobert Michelsen): Add.
743 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
744 Autoconf macro for handling the restrict keyword.
745 * gnulib: Update to latest, which no longer overrides that macro
746 from Autoconf.
747
748 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
749
750 portability: fix pointer arithmetic to conform to C standard.
751 Reported by Tys Lefering at
752 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
753 This fix is already implemented in glr.c and does not apply to
754 lalr1.java.
755 * data/lalr1.cc (yy::parser::parse): Increase size of
756 yyerror_range and adjust subscripting so you don't have to
757 subtract one from the beginning of the array.
758 * data/yacc.c (b4_declare_parser_state_variables,
759 yyparse, yypush_parse): Likewise.
760
761 2010-04-05 Akim Demaille <demaille@gostai.com>
762
763 remove useless include.
764 * src/graphviz.h: Don't include stdbool.h.
765
766 2010-04-05 Akim Demaille <demaille@gostai.com>
767
768 graph: sign the output file.
769 * src/graphviz.c (start_graph): Issue comments about Bison.
770 Suggested by Tys Lefering.
771
772 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
773
774 portability: fix test suite for GCC 4.5's new #error message.
775 Reported by Tys Lefering at
776 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
777 * NEWS (2.4.3): Mention.
778 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
779
780 2010-03-30 Akim Demaille <demaille@gostai.com>
781
782 fix comments.
783 * src/graphviz.h: Add missing license notice.
784 Document.
785
786 2010-03-25 Akim Demaille <demaille@gostai.com>
787
788 tests: fix 250: parse.error=verbose overflow.
789 * tests/regression.at (parse.error=verbose overflow): Avoid the
790 double inclusion of stdlib.h as it triggers hard errors.
791
792 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
793
794 portability: fix for BSD make.
795 Reported by Johan van Selst at
796 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
797 * tests/Makefile.am ($(TESTSUITE)): Qualify package.m4 in
798 this dependency list as in package.m4's target rule.
799
800 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
801
802 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
803 Reported by Johan van Selst at
804 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
805 * NEWS (2.4.3): New.
806 * THANKS (Johan van Selst): Add.
807 * gnulib: Update to latest.
808
809 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
810
811 maint: update for changes to gnulib's announce-gen.
812 * HACKING (Announce): RELEASE_TYPE=major must now be written
813 RELEASE_TYPE=stable.
814
815 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
816
817 Version 2.4.2.
818 * NEWS (2.4.2): Set version and date. For the recent test suite
819 portability fixes, don't be so optimistic about their success
820 given the lack of feedback on the affected platforms.
821
822 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
823
824 tests: fix maintainer-xml-check for recent changes.
825 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
826 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
827 output file whose name conflicts with a previous output file
828 is now never generated.
829
830 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
831
832 portability: fix several issues with M4 subprocess.
833
834 M4's output pipe was not being drained upon fatal errors during
835 scan_skel. As a result, broken-pipe messages from M4 were seen
836 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
837 failure in the test suite. The problem was that, on platforms
838 where the default disposition for SIGPIPE is ignore instead of
839 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
840 then reported it. However, there's some sort of race condition,
841 because the new test group occasionally succeeded.
842 Reported by Albert Chin at
843 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
844
845 There were also problems with the test suite livelocking on
846 Tru64 5.1b. Reported by Didier Godefroy at
847 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
848 Switching to create_pipe_bidi suggested by Akim Demaille.
849
850 To attempt to solve both of these problems, switch to gnulib's
851 create_pipe_bidi and register M4 process as a slave. Along the
852 way, clean up file name conflict handling, which was affected by
853 the broken-pipe problem before the switch.
854 * NEWS (2.4.2): Document.
855 * THANKS (Didier Godefroy): Add.
856 * bootstrap.conf (gnulib_modules): Add pipe.
857 * gnulib: Update to latest to make sure we have all the latest
858 fixes.
859 * lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
860 subpipe.c.
861 * po/POTFILES.in (lib/subpipe.c): Remove.
862 * src/files.c (compute_output_file_names): Update invocations
863 of output_file_name_check.
864 (output_file_name_check): In the case that the grammar file
865 would be overwritten, use complain instead of fatal, but replace
866 the output file name with /dev/null. Use the /dev/null solution
867 for the case of two conflicting output files as well because it
868 seems safer in case Bison one day tries to open both files at
869 the same time.
870 * src/files.h (output_file_name_check): Update prototype.
871 * src/output.c (output_skeleton): Use create_pipe_bidi and
872 wait_subprocess. Assert that scan_skel completely drains the
873 pipe.
874 * src/scan-skel.l (at_directive_perform): Update
875 output_file_name_check invocation.
876 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
877 grammar file actually isn't overwritten.
878 (Conflicting output files: -o foo.y): Update expected output.
879 * tests/skeletons.at (Fatal errors but M4 continues producing
880 output): New test group.
881
882 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
883
884 Update POTFILES.
885 * HACKING (Release Procedure): Add reminder about keeping
886 POTFILES files up-to-date.
887 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
888
889 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
890
891 Code cleanup.
892 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
893 which is already defined in atconfig.
894
895 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
896
897 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
898
899 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
900
901 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
902 * HACKING (Release Procedure): Update notes on copyright years.
903 * Makefile.am (update-package-copyright-year): New target rule.
904 * build-aux/update-package-copyright-year: New file.
905 * cfg.mk (update-copyright): Add update-package-copyright-year
906 as a dependency.
907
908 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
909
910 * bootstrap: Import improvements from latest gnulib.
911
912 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
913
914 build: require Automake 1.11.1 to avoid a security flaw.
915 * HACKING (Release Procedure): Don't document Automake security
916 flaw here.
917 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
918 why here.
919
920 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
921
922 gnulib: update to latest.
923
924 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
925
926 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
927
928 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
929
930 Thank the developer of the initial push parser implementation.
931 This unfortunate oversight is several years old.
932 * THANKS (Odd Arild Olsen): Add.
933
934 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
935
936 Fix some comments concerning LR(0) versus LALR(1).
937
938 Stop equating LR(0) with nondeterminism and LALR(1) with
939 determinism. That is, if all states are consistent, then LR(0)
940 tables are deterministic. On the other hand, LALR(1) tables
941 might be nondeterministic before conflict resolution, and GLR
942 permits LALR(1) tables to remain nondeterministic.
943 * src/LR0.c, src/LR0.h: Here.
944 * src/lalr.c, src/lalr.h: Here.
945 * src/main.c (main): Here.
946 * src/state.c, src/state.h: Here.
947
948 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
949 parser tables.
950
951 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
952
953 maint: run "make update-copyright"
954
955 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
956
957 POSIX: complain if %prec's token was not defined.
958 * NEWS (2.5): Document.
959 * src/reader.c (grammar_rule_check): Convert warning to
960 complaint.
961 * tests/input.at (%prec's token must be defined): Update.
962
963 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
964
965 POSIX: warn if %prec's token was not defined.
966 Reported by Florian Krohm at
967 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
968 * NEWS (2.4.2): Document.
969 * src/reader.c (grammar_rule_check): Implement.
970 (grammar_current_rule_prec_set): Add comments explaining that we
971 here assume a %prec identifier is a token, but we still manage
972 to support POSIX.
973 * tests/input.at (%prec's token must be defined): New test
974 group.
975
976 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
977
978 * HACKING (Release Procedure): Recommend a secure automake.
979
980 2008-12-11 Akim Demaille <demaille@gostai.com>
981
982 Propagate i18n changes into glr.c.
983 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
984 building the error message format dynamically.
985 * data/lalr1.java: Formatting changes.
986
987 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
988
989 Port small part of master's 11707b2b so future ports are easier.
990 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
991
992 2008-12-11 Akim Demaille <demaille@gostai.com>
993
994 Simplify the i18n of the error messages.
995 * data/lalr1.cc: Comment changes.
996
997 2008-11-11 Akim Demaille <demaille@gostai.com>
998
999 Prefer M4 to CPP.
1000 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1001 YYERROR_VERBOSE.
1002
1003 2008-11-11 Akim Demaille <demaille@gostai.com>
1004
1005 Support i18n of the parse error messages.
1006 * TODO (lalr1.cc/I18n): Remove.
1007 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1008 error messages, as done in yacc.c.
1009 Stay within the yy* pseudo namespace.
1010
1011 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
1012
1013 Port small part of master's 8901f32e so future ports are easier.
1014 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
1015 argument, but name it in the function definition only when
1016 verbose error messages are enabled and it'll thus be used.
1017 (yy::parser::parse): Update use of yysyntax_error_.
1018
1019 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
1020
1021 portability: `<' and `>' are not always defined on addresses.
1022 Specifically, don't sort objects by their memory addresses when
1023 they're not allocated in the same array or other object. Though
1024 I haven't found a test case where that fails on my platform, C
1025 says the behavior is undefined.
1026 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1027 FIXME. Use new id field of InadequacyList nodes rather than
1028 their memory addresses when sorting.
1029 (AnnotationList__compute_from_inadequacies): Add
1030 inadequacy_list_node_count argument to pass to
1031 InadequacyList__new_conflict.
1032 * src/AnnotationList.h
1033 (AnnotationList__compute_from_inadequacies): Update prototype
1034 and documentation for new argument.
1035 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1036 node_count argument and use it to assign a unique ID.
1037 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1038 (InadequacyList): Add id field.
1039 (InadequacyList__new_conflict): Update prototype and
1040 documentation for new argument.
1041 * src/ielr.c (ielr_compute_annotation_lists): Update
1042 AnnotationList__compute_from_inadequacies invocation.
1043
1044 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
1045
1046 Fix handling of yychar manipulation in user semantic actions.
1047 The problem was that yacc.c didn't always update the yychar
1048 translation afterwards. However, other skeletons appear to be
1049 fine. glr.c appears to already translate yychar before every
1050 use. lalr1.cc does not define yychar and does not document its
1051 replacement, yyla, for users. It does provide yyclearin, but
1052 that does not manipulate yyla and thus requires no translation
1053 update. In lalr1.java, yychar is out of scope during semantic
1054 actions.
1055 * NEWS (2.5): Document.
1056 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1057 yytoken here.
1058 (yyparse, yypush_parse): Instead, translate before every use of
1059 yytoken, and add comments explaining this approach.
1060 * tests/actions.at (Destroying lookahead assigned by semantic
1061 action): New test group checking that translation happens before
1062 lookahead destructor calls at parser return. Previously,
1063 incorrect destructors were called.
1064 * tests/conflicts.at (%error-verbose and consistent
1065 errors): New test group checking that translation happens at
1066 syntax error detection before the associated verbose error
1067 message and the associated lookahead destructor calls. While
1068 the destructor call is fixed by this patch, the verbose error
1069 message is currently incorrect due to another bug (see
1070 comments in test group), so this is an expected failure for now.
1071
1072 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1073
1074 YYFAIL: warn about uses and remove from lalr1.java.
1075 * NEWS (2.5): Document.
1076 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
1077 and make it private. Update all uses.
1078 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1079
1080 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1081
1082 YYFAIL: deprecate.
1083 * NEWS (2.4.2): Document deprecation and the phase-out plan.
1084 * data/lalr1.java (YYParser::YYFAIL): Add comment about
1085 deprecation.
1086 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1087 YYFAIL from GCC cpp's -Wunused-macros.
1088 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1089 documentation.
1090 (LocalWords): Remove YYFAIL.
1091
1092 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
1093
1094 Code cleanup.
1095 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1096 function, which is no longer used.
1097
1098 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1099
1100 Add gcc's -Wundef to test suite and fix another warning from it.
1101 * NEWS (2.4.2): Update description of -Wundef fix.
1102 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1103 (WARN_CFLAGS_TEST): New substitution.
1104 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1105 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1106 WARN_CFLAGS.
1107 (NO_WERROR_CFLAGS): Likewise.
1108 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1109
1110 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1111
1112 * data/yacc.c: Reformat m4 a little.
1113
1114 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1115
1116 Document gcc -Wundef fix.
1117 * NEWS (2.4.2): Here.
1118 * THANKS (Jonathan Nieder): Add.
1119
1120 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1121
1122 Simplify y.tab.c when location tracking is disabled.
1123 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1124 tracking is not enabled. Instead, unconditionally define
1125 YY_LOCATION_PRINT as a no-op for backward compatibility.
1126
1127 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1128
1129 Avoid warnings from gcc -Wundef y.tab.c.
1130 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1131 defined before using them.
1132 * data/lalr1.cc: Likewise.
1133 * data/yacc.c: Likewise.
1134
1135 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1136
1137 autoconf: update to latest for fix of M4 detection.
1138 Reported by Eric Blake.
1139 * submodules/autoconf: Update.
1140
1141 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1142
1143 portability: use -DGNULIB_POSIXCHECK.
1144 Reported by Eric Blake. See discussions at
1145 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1146 and
1147 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1148 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1149 * bootstrap.conf (gnulib_modules): Add all the printf modules
1150 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1151 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1152 (excluded_files): Remove m4/printf-posix.m4.
1153 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1154 lib/libbison.a so gnulib libraries can be linked.
1155
1156 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1157
1158 Enable assertion output and --disable-assert for configure.
1159 * bootstrap.conf (gnulib_modules): Add assert module.
1160 * src/system.h (aver): Define as assert, and summarize the
1161 discussion on this issue.
1162
1163 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1164
1165 Expand GLR acronym in summary of Bison.
1166 Based on discussion with Akim Demaille starting at
1167 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1168 * doc/bison.texinfo (Introduction): Here.
1169 * src/getargs.c (usage): Here.
1170
1171 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1172
1173 Document named references.
1174 * doc/bison.texinfo (Actions): Add new example and xref to
1175 Using Named References node.
1176 (Using Named References): New node.
1177
1178 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1179
1180 cleanup.
1181 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1182 of char*.
1183 (Sbitset__isEmpty): Use Sbitset instead of char*.
1184 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1185 instead of char. This helps to avoid casting errors.
1186 (Sbitset__or): Use Sbitset instead of char*.
1187
1188 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1189
1190 portability: don't assume 8-bit bytes.
1191 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1192 * src/Sbitset.h (Sbitset__nbytes): Here.
1193 (Sbitset__byteAddress): Here.
1194 (Sbitset__bit_mask): Here.
1195 (Sbitset__last_byte_mask): Here.
1196 (Sbitset__ones): Here.
1197 (SBITSET__FOR_EACH): Here.
1198
1199 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
1200
1201 portability: use va_start and va_end in the same function.
1202 * src/complain.c (error_message): Move va_end from here...
1203 (ERROR_MESSAGE): ... to here.
1204
1205 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1206
1207 * data/bison.m4: Update comments for rename to muscle-tab.h.
1208
1209 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1210
1211 Rename muscle_tab.* to muscle-tab.* for consistency with master.
1212 * src/Makefile.am (bison_SOURCES): Update.
1213 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
1214 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
1215 src/tables.c: Update include.
1216 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
1217 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
1218 include.
1219
1220 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
1221
1222 Minor code cleanup.
1223 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1224 replace all uses with UNIQSTR_CONCAT.
1225 * src/uniqstr.c (uniqstr_vsprintf): New function.
1226 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1227 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1228 macros.
1229
1230 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1231
1232 Minor code cleanup.
1233 * src/parse-gram.y: Clean up sorting of declarations.
1234 Use types to simplify %printer declarations where possible.
1235 Provide %printer for BRACKETED_ID and symbol.prec.
1236 * src/symtab.c: Whitespace change.
1237
1238 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1239
1240 tests: skip tests of file names that platform does not support.
1241 Reported by Michael Raskin at
1242 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1243 * THANKS (Michael Raskin): Add.
1244 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1245 to fail at least for file names containing ":" or "\".
1246
1247 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1248
1249 yysyntax_error: avoid duplicate lookahead collection.
1250 Except when memory reallocation is required, this change
1251 eliminates the need to invoke yysyntax_error twice and thus to
1252 repeat the collection of lookaheads. It also prepares for
1253 future extensions that will make those repetitions more
1254 expensive and that will require additional memory management in
1255 yysyntax_error. Finally, it fixes an obscure bug already
1256 exercised in the test suite.
1257 * data/yacc.c (yysyntax_error): Add arguments for message
1258 buffer variables stored in the parser. Instead of size, return
1259 status similar to yyparse status but indicating success of
1260 message creation. Other than the actual reallocation of the
1261 message buffer, import and clean up memory management code
1262 from...
1263 (yyparse, yypush_parse): ... here.
1264 * tests/regression.at (%error-verbose overflow): No longer an
1265 expected failure.
1266
1267 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1268
1269 yysyntax_error: test memory management more.
1270 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1271 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
1272 New test group.
1273 (%error-verbose overflow): New test group that reveals an
1274 obscure bug. Expected fail for now.
1275
1276 2008-12-11 Akim Demaille <demaille@gostai.com>
1277
1278 Pass the token type to yysyntax_error.
1279 * data/yacc.c (yysyntax_error): Take the transated token instead
1280 of the raw number.
1281 Adjust callers.
1282
1283 2008-12-11 Akim Demaille <demaille@gostai.com>
1284
1285 Simplify the i18n of the error messages.
1286 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
1287 of building dynamically the format string.
1288
1289 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
1290
1291 Remove dead code.
1292 * src/symtab.c (symbol_pack): Here because every symbol's number
1293 is always defined by this time.
1294
1295 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1296
1297 Add additional space after periods in NEWS.
1298 * NEWS (2.5): here.
1299
1300 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
1301
1302 Use the correct conversion specifier for size_t.
1303 Reported by Jim Meyering.
1304 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1305 because Sbitset__Index is size_t.
1306 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1307
1308 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
1309
1310 tests: don't abuse AT_BISON_CHECK.
1311 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1312 additional shell commands outside of AT_BISON_CHECK.
1313
1314 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
1315
1316 tests: check that parse-gram.y's IELR and LALR are identical.
1317 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1318 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1319 group.
1320
1321 2009-09-16 Akim Demaille <demaille@gostai.com>
1322
1323 doc: comment changes.
1324 * doc/bison.texinfo: Comment changes.
1325
1326 2009-09-16 Akim Demaille <demaille@gostai.com>
1327
1328 doc: spell checking.
1329 * doc/bison.texinfo: here.
1330
1331 2009-09-19 Alex Rozenman <rozenman@gmail.com>
1332
1333 Keep sub-messages aligned. Fix strings for translation.
1334 * src/location.h (location_print): Add return value.
1335 * src/location.c (location_print): Return number of printed
1336 characters.
1337 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1338 new functions.
1339 * src/complain.cpp (indent_ptr): New static variable.
1340 (error_message, complain_at_indent, warn_at_indent): Implement
1341 the alignment mechanism.
1342 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1343 for translations. Use new alignment mechanism.
1344 * tests/named-ref.at: Adjust test-cases.
1345 * NEWS (2.5): Add an announcement about named references.
1346
1347 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
1348
1349 tests: clean up push.at test group titles.
1350 * tests/push.at: Remove "Push Parsing: " from test group titles
1351 because these are already under the banner "Push Parsing Tests".
1352
1353 2009-09-12 Alex Rozenman <rozenman@gmail.com>
1354
1355 Provide an additional sub-message for clarity.
1356 Add "symbol not found in production" error message when
1357 an "invalid reference" is detected in named references
1358 resolution.
1359 * src/scan-code.l: Update "invalid reference" case.
1360 * tests/named-ref.at: Adjust test-cases.
1361
1362 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1363
1364 Clean up yacc.c a little.
1365 * data/yacc.c: Clean up M4 for readability, and make output
1366 whitespace more consistent. For the main parse function
1367 comment, instead of saying "yyparse or yypush_parse", say either
1368 "yyparse" or "yypush_parse" depending on which it actually is.
1369
1370 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1371
1372 Complain about unused %define variables and %code qualifiers.
1373 * NEWS (2.5): Document.
1374 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1375 * doc/bison.texinfo (Decl Summary): Document complaint, and
1376 improve %define documentation a little otherwise.
1377 * tests/input.at (Reject unused %code qualifiers): Update.
1378 (%define errors): Update.
1379 (%define, --define, --force-define): Update.
1380 (%define backward compatibility): Update.
1381 (Unused %define api.pure): Update.
1382 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1383
1384 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1385
1386 Use aver not assert.
1387 * src/output.c: Don't include assert.h.
1388 (output_skeleton): Use aver not assert.
1389 * src/system.h (aver): In documentation of why, add links to
1390 Paul Eggert's explanations in the mailing lists.
1391
1392 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1393
1394 Use "Unresolved reference" error message when no symbols were found
1395 in a symbolic reference resolution. Remove .expr and -expr from
1396 the shown reference when the reference is unresolved.
1397 * src/scan-code.l: Change the error message, adjust location columns,
1398 rename variable "exact_mode" to "explicit_bracketing".
1399 * tests/named-ref.at: Adjust existing tests and add a new one.
1400
1401 2009-09-03 Akim Demaille <demaille@gostai.com>
1402
1403 * NEWS (2.4.2): Add "Internationalization" item.
1404
1405 2009-09-03 Akim Demaille <demaille@gostai.com>
1406
1407 bootstrap: fix/improve find_tool.
1408 * bootstrap (find_tool): Improve error messages.
1409 Fix typo about find_tool_names.
1410
1411 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1412
1413 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1414 See
1415 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1416 * src/scan-code.h (code_props_rule_action_init): Rename
1417 named_ref arg to name so it doesn't shadow named_ref type. This
1418 makes it consistent with the function definition in scan-code.l
1419 anyway.
1420
1421 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1422
1423 %define: accept unquoted values.
1424 * NEWS (2.5): Group all %define changes together, and document
1425 this one. Remove quotes in IELR and canonical LR entry.
1426 * doc/bison.texinfo: Remove quotes in most examples throughout.
1427 (Decl Summary): Update %define documentation.
1428 (Table of Symbols): Likewise.
1429 * src/ielr.c (LrType): Update documentation.
1430 * src/parse-gram.y (content.opt): Add production for ID.
1431 * tests/calc.at: Remove quotes in most tests.
1432 * tests/existing.at: Likewise.
1433 * tests/input.at: Likewise.
1434 * tests/local.at: Likewise.
1435 * tests/push.at: Likewise.
1436 * tests/reduce.at: Likewise.
1437 * tests/torture.at: Likewise.
1438
1439 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1440
1441 %define lr.type: make values lowercase IDs.
1442 That is, "LALR" => "lalr", "IELR" => "ielr", and
1443 "canonical LR" => "canonical-lr".
1444 * NEWS (2.5): Update documentation.
1445 * doc/bison.texinfo (Decl Summary): Likewise.
1446 * src/ielr.c (ielr): Use new values.
1447 * src/ielr.h (ielr): Update documentation.
1448 * src/reader.c (prepare_percent_define_front_end_variables): Use
1449 and validate new values.
1450 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1451 grammars.
1452 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1453
1454 2009-08-27 Eric Blake <ebb9@byu.net>
1455
1456 scan-gram: avoid portability trap with ctype usage.
1457 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1458 Avoid compiler warning.
1459
1460 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1461
1462 tests: use perl for printing special sequences to files.
1463 And skip tests if perl is not available. This is better than
1464 playing tricks with shell portability. Suggested by Akim
1465 Demaille.
1466 * tests/input.at (Bad character literals): Use it here for
1467 omitting final newlines.
1468 (Bad escapes in literals): Use it here for special characters.
1469
1470 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1471
1472 tests: show a use of %define lr.default-reductions "consistent"
1473 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1474 prevents the omission of expected tokens for %error-verbose.
1475
1476 2009-08-26 Akim Demaille <demaille@gostai.com>
1477
1478 tests: portability fix.
1479 * tests/input.at (Bad escapes in literals): Don't expect "echo
1480 '\0'" to output \ then 0.
1481
1482 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1483
1484 Actually handle the yytable zero value correctly this time.
1485 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
1486 mention zero values in the YYTABLE comments.
1487 * data/glr.c (yytable_value_is_error): Don't check for zero
1488 value.
1489 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1490 * data/yacc.c (yytable_value_is_error): Likewise.
1491 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1492 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1493 * src/tables.h: In header comments, explain why it's useless to
1494 check for a zero value in yytable.
1495
1496 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1497
1498 More fixes related to last two patches.
1499 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1500 defined.
1501 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
1502 yytable comments: zero indicates syntax error not default
1503 action.
1504 * data/glr.c (yyis_pact_ninf): Rename to...
1505 (yypact_value_is_default): ... this.
1506 (yyisDefaultedState): Update for rename.
1507 (yyis_table_ninf): Rename to...
1508 (yytable_value_is_error): ... this, and check for value zero
1509 besides just YYTABLE_NINF.
1510 (yygetLRActions): Check for default value from yypact. It
1511 appears that this check is always performed before this function
1512 is invoked, and so adding the check here is probably redundant.
1513 However, the code may evolve after this subtlety is forgotten.
1514 Also, update for rename to yytable_value_is_error. Because that
1515 macro now checks for zero, a different but equivalent branch of
1516 the if-then-else here is evaluated.
1517 (yyreportSyntaxError): Update for rename to
1518 yytable_value_is_error. The zero condition was mishandled
1519 before.
1520 (yyrecoverSyntaxError): Update for renames. No behavioral
1521 changes.
1522 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1523 New function.
1524 (yy_table_value_is_error_): New function.
1525 (parse): Use new functions where possible. No behavioral
1526 changes.
1527 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1528 The zero condition was mishandled before.
1529 * data/yacc.c (yyis_pact_ninf): Rename to...
1530 (yypact_value_is_default): ... this.
1531 (yyis_table_ninf): Rename to...
1532 (yytable_value_is_error): ... this, and check for value zero
1533 besides just YYTABLE_NINF.
1534 (yysyntax_error): Update for rename to yytable_value_is_error.
1535 The zero condition was mishandled before.
1536 (yyparse): Update for renames. No behavioral changes.
1537 * src/tables.h: Improve comments about yypact, yytable, etc.
1538 more. Most importantly, say yytable value of zero means syntax
1539 error not default action.
1540
1541 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1542
1543 Fix %error-verbose for conflicts resolved by %nonassoc.
1544 * NEWS (2.5): Document.
1545 * data/glr.c (yyreportSyntaxError): Fix this by checking
1546 yyis_table_ninf.
1547 * data/yacc.c (yysyntax_error): Likewise.
1548 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1549 yytable_ninf_.
1550 * data/lalr1.java (yysyntax_error): Likewise.
1551 * tests/conflicts.at (%nonassoc and eof): Update expected output
1552 and remove FIXME.
1553
1554 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1555
1556 Some code and documentation improvements.
1557 * data/c.m4 (b4_table_value_equals): New macro to capture
1558 some repeated code.
1559 * data/glr.c (yyis_pact_ninf): Use it here.
1560 (yyis_table_ninf): Likewise.
1561 (yyreportSyntaxError): Improve internal comments.
1562 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1563 Use it everywhere possible.
1564 (yyis_table_ninf): Likewise.
1565 (yysyntax_error): Improve internal comments.
1566 * data/lalr1.cc (yysyntax_error_): Likewise.
1567 * data/lalr1.java (yysyntax_error): Likewise.
1568 * src/tables.h: Improve comments about yypact, yytable, etc.
1569
1570 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
1571
1572 Use locale when quoting.
1573 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1574 quote rather than implementing quoting here.
1575
1576 2009-08-20 Eric Blake <ebb9@byu.net>
1577
1578 Make previous patch more robust.
1579 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1580 argmatch.h.
1581 (output_skeleton): Use it.
1582 Suggested by Akim Demaille.
1583
1584 Import latest m4/m4.m4.
1585 * submodules/autoconf: Update to autoconf 2.64.
1586 * configure.ac (M4_GNU_OPTION): New define.
1587 * src/output.c (output_skeleton): Use it to resolve FIXME.
1588 * NEWS: Mention this.
1589
1590 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
1591
1592 Fix complaints about escape sequences.
1593 Discussed starting at
1594 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1595 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1596 For a \0 and similar escape sequences meaning the null
1597 character, report an invalid escape sequence instead of an
1598 invalid null character because the latter does not actually
1599 appear in the user's input.
1600 In all escape sequence complaints, don't escape the initial
1601 backslash, and don't quote when the sequence appears at the end
1602 of the complaint line unless there's whitespace that quotearg
1603 won't escape.
1604 Consistently say "invalid" not "unrecognized".
1605 Consistently prefer "empty character literal" over "extra
1606 characters in character literal" warning for invalid escape
1607 sequences; that is, consistently discard those sequences.
1608 * tests/input.at (Bad escapes in literals): New.
1609
1610 2009-08-19 Akim Demaille <demaille@gostai.com>
1611
1612 doc: fixes.
1613 * doc/bison.texinfo: Fix minor Texinfo errors.
1614
1615 2009-08-19 Akim Demaille <demaille@gostai.com>
1616
1617 doc: %initial-action to initialize yylloc.
1618 Reported by Bill Allombert.
1619 * doc/bison.texinfo: Set fill-column to 76.
1620 (Location Type): Document the use of %initial-action to initialize
1621 yylloc.
1622
1623 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
1624
1625 maint: update for gnulib's recent update-copyright changes
1626 * gnulib: Update.
1627 * .x-update-copyright (COPYING): Add as it's no longer implied
1628 when .x-update-copyright is present.
1629 * cfg.mk (update-copyright-local): Remove, now ignored.
1630 (update-copyright): Declare update-b4-copyright as a dependency.
1631
1632 2009-08-17 Akim Demaille <demaille@gostai.com>
1633
1634 build: require gettext 0.17.
1635
1636 Suggested by Bruno Haible.
1637 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1638 * configure.ac: require gettext 0.17 to ensure compatibility with
1639 gnulib.
1640
1641 2009-08-17 Akim Demaille <demaille@gostai.com>
1642
1643 build: lower gettext requirements.
1644
1645 Bison was uselessly requiring the formatstring macros from
1646 gettext, which resulted in mo files not being installed on systems
1647 that perfectly supported Bison mo files. Lower the requirement.
1648 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1649
1650 * configure.ac: Require need-ngettext instead of
1651 need-formatstring-macros.
1652 Reported by Martin Jabocs.
1653 Suggested by Bruno Haible.
1654 * INSTALL: Restructure.
1655 (Internationalization): New.
1656
1657 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
1658
1659 maint: fix use of copyright year intervals.
1660 * gnulib: Update.
1661 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1662 as now recommended in gnulib/NEWS.
1663 * build-aux/update-b4-copyright: Fix.
1664 * cfg.mk (update-copyright-env): Configure update-copyright.
1665
1666 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
1667
1668 Make it easier to write deterministic tests.
1669 Continues Akim's work from his 2009-06-10 commits.
1670 * src/reader.c (check_and_convert_grammar): Don't add any
1671 symbols after the first symbols_do invocation.
1672 * src/symtab.c (symbols_sorted): New static global.
1673 (user_token_number_redeclaration): Update comments.
1674 (symbol_from_uniqstr): If a new symbol is being created, assert
1675 that symbols_sorted hasn't been allocated yet.
1676 (symbols_free): Free symbols_sorted.
1677 (symbols_cmp, symbols_cmp_qsort): New functions.
1678 (symbols_do): Sort symbol_table into symbols_sorted on first
1679 invocation.
1680 * tests/input.at (Numbered tokens): Recombine tests now that the
1681 output should be deterministic across multiple numbers.
1682
1683 2009-08-12 Akim Demaille <demaille@gostai.com>
1684
1685 distcheck: fix.
1686
1687 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1688
1689 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1690
1691 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
1692
1693 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1694
1695 Miscellaneous code readability improvements.
1696
1697 * src/reader.c (reader): Move %define front-end variable
1698 defaults and checking into...
1699 (prepare_percent_define_front_end_variables): ... this new
1700 function.
1701
1702 * src/scan-gram.l (INITIAL): For consistency with string
1703 literals, don't store open quote on character literal. It's
1704 discarded before returning anyway.
1705 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1706 Make length test more readable, and make the character stored
1707 for an empty literal more obvious while consistent with the
1708 previous behavior.
1709
1710 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1711 USER_NUMBER_HAS_STRING_ALIAS throughout.
1712 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1713 that is repeated in symtab.h. Improve argument names to make it
1714 clear which side of the symbol-string alias pair is which.
1715 (symbol_check_alias_consistency): Improve local variable names
1716 for the same purpose.
1717 * src/symtab.h (struct symbol): Make comments about aliases
1718 clearer.
1719 (symbol_make_alias): Improve comments and argument name.
1720 * src/output.c (token_definitions_output): Update for rename to
1721 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1722
1723 2009-08-08 Alex Rozenman <rozenman@gmail.com>
1724
1725 Convert "misleading reference" messages to warnings.
1726 * src/scan-code.l: New function 'show_sub_messages', more
1727 factoring.
1728 * tests/named-ref.at: Adjust tests.
1729
1730 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1731
1732 maint: run "make update-copyright"
1733
1734 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1735
1736 maint: make update-b4-copyright easier to use
1737 * build-aux/update-b4-copyright: In warnings, report line
1738 numbers rather than character positions.
1739 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1740 that update-copyright runs it.
1741 * gnulib: Update.
1742
1743 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
1744
1745 maint: clean up update-b4-copyright code
1746 * build-aux/update-b4-copyright: Do not accept 2-digit
1747 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1748 Don't accept a `[' in a b4_copyright argument.
1749 Format code more consistently.
1750 Don't assume b4*copyright never occurs.
1751
1752 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1753
1754 maint: automate b4_copyright updates.
1755 * Makefile.am (update-b4-copyright): New target rule.
1756 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
1757 * build-aux/update-b4-copyright: New.
1758 * data/yacc.c: Remove stray characters around b4_copyright
1759 invocations.
1760
1761 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1762
1763 maint: automate annual package-wide copyright-year update.
1764 * .x-update-copyright: New.
1765 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1766 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1767 update-copyright. Remove gnumakefile, which is implied by
1768 maintainer-makefile.
1769 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1770 * gnulib: Update.
1771 * maint.mk: Remove, now copied from gnulib.
1772 * examples/extexi: Add missing "(C)" in copyright statement so
1773 update-copyright can recognize it.
1774 * src/LR0.h: Likewise.
1775 * src/print.h: Likewise.
1776 * src/print_graph.h: Likewise.
1777 * src/gram.c: Add missing comma in copyright statement.
1778 * src/gram.h: Likewise.
1779
1780 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1781
1782 Fix "make distcheck".
1783 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1784 of just calc.stamp.
1785
1786 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
1787
1788 Pacify "gcc -Wunused" for the input function from Flex.
1789 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1790 and later.
1791 * src/scan-code.l: Add "%option noinput", which I cannot find in
1792 the Flex manual, but which Flex has supported since at least as
1793 far back as 2.5.4. However, if any of our developers still use
1794 Flex 2.5.4, they'll need to stop configuring with
1795 --enable-gcc-warnings because "%option noinput" didn't work
1796 correctly until Flex 2.5.6.
1797 * src/scan-gram.l: Likewise.
1798 * src/scan-skel.l: Likewise.
1799
1800 2009-07-31 Alex Rozenman <rozenman@gmail.com>
1801
1802 Fix --enable-gcc-warnings problems.
1803 * src/reader.c: Adjust variable names.
1804 * src/scan-code.l: Fix prototypes and adjust names.
1805 * src/named-ref.c: Remove redundant "if".
1806
1807 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1808
1809 Fix a --enable-gcc-warnings problem.
1810 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1811 variable.
1812
1813 2009-07-24 Alex Rozenman <rozenman@gmail.com>
1814
1815 Fix some memory leaks.
1816 * src/named-ref.c: Add a pointer check (named_ref_free).
1817 * src/scan-code.l: New function (variant_table_free). Called in
1818 code_scanner_free.
1819 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1820
1821 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1822
1823 Warn about character literals not of length one.
1824 * NEWS (2.5): Document.
1825 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1826 the length.
1827 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1828 * tests/input.at (Bad character literals): New test group.
1829
1830 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1831
1832 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1833
1834 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1835
1836 Some M4 cleanup in the testsuite.
1837 Suggested by Eric Blake at
1838 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1839 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1840 complicate the code by distinguishing between a missing value
1841 and an empty string value for an optional argument. This fix is
1842 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1843 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1844 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1845 arguments are not needed because of the following changes.
1846 Fix stale comments.
1847 Bison developers should use GNU M4 and should not use
1848 POSIXLY_CORRECT when building the test suite, so do not
1849 complicate the code by avoiding $10 and above.
1850 Do not quote an empty string value for an optional argument, and
1851 do not distinguish between a missing value and an empty string
1852 value.
1853
1854 2009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
1855
1856 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
1857
1858 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1859
1860 Revert unnecessary column realignment in --help output.
1861 Reported by Akim Demaille at
1862 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1863 * src/getargs.c (usage): Here.
1864
1865 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1866
1867 Alphabetical order in src/Makefile.am.
1868 * src/Makefile.am: Adjust.
1869
1870 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1871
1872 Style changes and factoring.
1873 * src/named-ref.h: Add comments.
1874 * src/parse-gram.y: Readability and style changes.
1875 * src/reader.c: Factoring: assign_named_ref function.
1876 * src/scan-code.l: Factoring and style changes. Rename
1877 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1878 Use "unsigned" type for variant index. Improve readablity.
1879 * src/scan-gram.l: Change error messages and add comments.
1880 * src/symlist.h: symbol_list_null: New function decl.
1881 * src/symlist.c: symbol_list_null: Implement here.
1882 * tests/named-refs.at: Adjust for new error messages.
1883
1884 2009-06-29 Eric Blake <ebb9@byu.net>
1885
1886 scan-code: avoid compiler warnings
1887 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1888
1889 2009-06-29 Akim Demaille <demaille@gostai.com>
1890
1891 build: avoid concurrent extraction of calc++.
1892 * examples/calc++/Makefile.am (calc.stamp): New.
1893 Depend on it to create the sources of calc++ so that concurrent
1894 builds don't launch several "extexi" in parallel.
1895 Not only this is inefficient, this also builds incorrect sources
1896 with several extractions mixed together.
1897
1898 2009-06-27 Alex Rozenman <rozenman@gmail.com>
1899
1900 Implement support for named symbol references.
1901 * src/parse-gram.y: Add new syntax (named_ref.opt).
1902 * src/reader.c: Store named refs in symbol lists.
1903 * src/reader.h: New argument for symbol_append and
1904 action_append functions.
1905 * src/scan-code.h: Add new field (named_ref) into
1906 code_props data structure. Keeps named ref of midrule
1907 actions.
1908 * src/scan-code.l: Support for named refs in semantic
1909 action code. New function 'parse_named_ref'.
1910 * src/scan-gram.l: Support bracketed id.
1911 * src/symlist.c: Store named refs in symbol lists.
1912 * src/symlist.h: New field in symbol list: named_ref.
1913 * src/named-ref.h: New file, a struct for named_ref.
1914 * src/named-ref.cp: New file, named_ref_new function.
1915 * src/local.mk: Add two new files.
1916 * tests/testsuite.at: Include new test group:
1917 * tests/named-refs.at: this new file.
1918
1919 2009-06-25 Akim Demaille <demaille@gostai.com>
1920
1921 hash: check insertion for memory exhaustion.
1922 * src/uniqstr.c (uniqstr_new): New.
1923
1924 2009-06-11 Akim Demaille <demaille@gostai.com>
1925
1926 style changes.
1927 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1928 * src/print-xml.c: Style changes.
1929 * tests/conflicts.at: Comment changes.
1930
1931 2009-06-11 Akim Demaille <demaille@gostai.com>
1932
1933 xml: beware of user strings used to give a %prec to rules.
1934 * tests/conflicts.at (%prec with user strings): New.
1935 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1936 XML output.
1937
1938 2009-06-11 Akim Demaille <demaille@gostai.com>
1939
1940 hash: check insertion for memory exhaustion.
1941 * src/muscle-tab.c (muscle_insert, muscle_grow)
1942 * src/state.c (state_hash_insert): Check the return value of
1943 hash_insert.
1944
1945 2009-06-10 Akim Demaille <demaille@gostai.com>
1946
1947 deterministic test suite.
1948 Some consistency checks on symbols are performed after all the
1949 symbols were read, by an iteration over the symbol table. This
1950 traversal is nondeterministic, which can be a problem for test
1951 cases.
1952 Avoid this.
1953 Addresses another form of nondeterminism reported by Joel E. Denny.
1954 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1955
1956 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1957 test in two.
1958 Use different file names for the three tests to make the
1959 maintenance easier.
1960
1961 2009-06-10 Akim Demaille <demaille@gostai.com>
1962
1963 deterministic user-token-number redeclaration errors.
1964 Address nondeterminism reported by Joel E. Denny.
1965 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1966
1967 * src/uniqstr.h: Comment changes.
1968 * src/location.h (boundary_cmp, location_cmp): New.
1969 * src/symtab.c (user_token_number_redeclaration): New.
1970 (symbol_translation): Use it.
1971 * tests/input.at (Numbered tokens): Adjust the expected output.
1972
1973 2009-05-25 Akim Demaille <demaille@gostai.com>
1974
1975 gnulib: update.
1976 * gnulib: Update to latest.
1977 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1978 * m4/.gitignore: Regen.
1979 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1980 Call xalloc_die on hash_insert failures.
1981 Requested by the new __warn_unused_result__ attribute of
1982 hash_insert.
1983
1984 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1985
1986 Convert multiple variable definition warnings to complaints.
1987 * NEWS (2.5): Add a new entry for that change.
1988 * doc/bison.texinfo (Decl Summary): Update %define entry.
1989 (Bison Options): Update -D/--define/-F/--force-define entry.
1990 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
1991 * src/muscle_tab.h (muscle_percent_define_insert): Update
1992 comments.
1993 * tests/input.at (`%define errors'): Update.
1994 (`%define, --define, --force-define'): Update.
1995
1996 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1997
1998 -F/--force-define and relative %define/-D/--define priorities.
1999 * NEWS (2.5): Add documentation to -D/--define entry.
2000 * build-aux/cross-options.pl: Hard-code association of
2001 --force-define with %define.
2002 * doc/bison.texinfo (Decl Summary): In %define entry,
2003 cross-reference command-line options.
2004 (Bison Options): Add documentation to -D/--define entry.
2005 (Option Cross Key): Widen column for --force-define row.
2006 * src/getargs.c (usage): Document -F/--force-define. Realign
2007 options in output.
2008 (short_options, long_options, getargs): Parse -F/--force-define,
2009 and update muscle_percent_define_insert invocation.
2010 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
2011 (muscle_percent_define_insert): Add argument with that type.
2012 * src/muscle_tab.c (muscle_percent_define_insert): Implement
2013 -F/--force-define behavior and priorities.
2014 * src/parse-gram.y (prologue_declaration): Update
2015 muscle_percent_define_insert invocations.
2016 * tests/input.at (`%define, --define'): Rename to...
2017 (`%define, --define, --force-define'): ... this and extend.
2018
2019 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2020
2021 Update some comments to make sense for -D.
2022 * data/bison.m4 (b4_check_user_names): In header comments, say
2023 "user occurrence" instead of "grammar occurrence".
2024 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
2025 (muscle_percent_code_grow): Likewise just for consistency.
2026
2027 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2028
2029 * data/c++.m4: Update copyright year.
2030
2031 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2032
2033 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2034
2035 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2036
2037 Handle a trailing `:' in a user-supplied C++ namespace better.
2038 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2039 among the closing braces here. This fix might make the
2040 generated code easier to debug, but otherwise it should be
2041 insignificant because a trailing `:' is a C++ error already.
2042
2043 2009-05-19 Akim Demaille <demaille@gostai.com>
2044
2045 remove useless variable.
2046 * src/getargs.c (skeleton_arg): Remove now useless variable.
2047 Should help the compiler see that this printf-like call is sane.
2048
2049 2009-05-11 Akim Demaille <demaille@gostai.com>
2050
2051 doc: use C++ headers.
2052 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2053 headers.
2054
2055 2009-05-05 Akim Demaille <demaille@gostai.com>
2056
2057 fix hexadecimal token number support.
2058 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
2059
2060 2009-05-05 Akim Demaille <demaille@gostai.com>
2061
2062 tests: check token numbers.
2063 * tests/input.at (Numbered tokens): New.
2064
2065 2009-05-04 Akim Demaille <demaille@gostai.com>
2066
2067 bison: catch bad symbol names.
2068 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2069 * tests/input.at: Adjust.
2070
2071 2009-05-04 Akim Demaille <demaille@gostai.com>
2072
2073 space changes.
2074 * src/scan-gram.l: Untabify to be robust to zealous editors.
2075
2076 2009-05-04 Akim Demaille <demaille@gostai.com>
2077
2078 identifiers: dashes are letters.
2079 Dashes can now start identifiers (symbols and directives).
2080
2081 * src/scan-gram.l ({letter}): Add dash.
2082 ({id}): Remove it.
2083 * tests/input.at (Symbols): Adjust.
2084 Remove stray comment.
2085 * tests/regression.at (Invalid inputs): Adjust error message.
2086 * doc/bison.texinfo (Symbols): Update.
2087
2088 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2089
2090 Declare %code to be a permanent feature.
2091 * NEWS (2.4.2): Here.
2092 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2093 experimental.
2094 (Decl Summary): Likewise.
2095
2096 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2097
2098 Convert underscores to dashes in some %define variable names.
2099 For now, just api.push-pull and lr.keep-unreachable-states.
2100 Maintain old names for backward compatibility.
2101 * NEWS (2.5): Document.
2102 * data/c.m4 (b4_identification): Update comment.
2103 * data/yacc.c: Update access.
2104 * doc/bison.texinfo: Update.
2105 * etc/bench.pl.in (bench_grammar): Update use.
2106 * src/files.c (tr): Move to...
2107 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2108 think of a better place to expose it. My logic is that, for all
2109 uses of tr so far, command-line arguments can be involved, and
2110 getargs.h is already included.
2111 * src/main.c (main): Update access.
2112 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2113 variable names to new variable names before assigning value.
2114 * src/reader.c (reader): Update setting default.
2115 * tests/calc.at: Update uses.
2116 * tests/conflicts.at (Unreachable States After Conflict
2117 Resolution): Update use.
2118 * tests/input.at (%define enum variables): Update use.
2119 (%define backward compatibility): New test group.
2120 * tests/push.at: Update uses.
2121 * tests/reduce.at: Update uses.
2122 * tests/torture.at: Update uses.
2123
2124 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2125
2126 Set all front-end %define defaults in one place.
2127 * src/main.c (main): Move lr.keep_unreachable_states default...
2128 * src/reader.c (reader): ... to here.
2129
2130 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2131
2132 Rename lr.default_reductions to lr.default-reductions.
2133 * NEWS (2.5): Here.
2134 * doc/bison.texinfo: Here.
2135 * src/lalr.c (initialize_LA): Here.
2136 * src/print.c (print_reductions): Here.
2137 * src/reader.c (reader): Here.
2138 * src/tables.c (action_row): Here.
2139 * tests/input.at (%define enum variables): Here.
2140 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2141
2142 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2143
2144 Pacify ./configure --enable-gcc-warnings.
2145 * tests/input.at (Symbols): Prototype yyerror and yylex.
2146
2147 2009-04-21 Akim Demaille <demaille@gostai.com>
2148
2149 tests: check the use of dashes and periods in symbols.
2150 * tests/input.at (Symbol): New test group.
2151
2152 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2153
2154 Document how `%define "var" "value"' is not M4-friendly.
2155 * src/parse-gram.y (variable): In comments here.
2156
2157 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2158
2159 Add copyright updates missed during previous cherry pick.
2160 * src/output.c: Here.
2161 * src/parse-gram.y: Here.
2162 * src/scan-gram.l: Here.
2163
2164 2009-04-20 Akim Demaille <demaille@gostai.com>
2165
2166 variables: accept dashes.
2167 * src/scan-gram.l ({id}): Also accept dashes after the initial
2168 letter.
2169 ({directive}): Use {id}.
2170 * src/parse-gram.y: Comment and formatting changes.
2171 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2172 symbols.
2173 * src/complain.h, src/complain.c (yacc_at): New.
2174 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2175 symbol names.
2176 * src/output.c (token_definitions_output): Do not #define token
2177 names with dashes.
2178
2179 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2180
2181 Clean up recent patches a little.
2182 Reported by Akim Demaille.
2183 * doc/bison.texinfo (Understanding): Fix typos.
2184 * src/print.c (print_reductions): Don't use negated variable.
2185
2186 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2187
2188 List accepted values for a %define enum variable with an invalid value.
2189 Suggested by Akim Demaille at
2190 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2191 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2192 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
2193 * tests/input.at (%define lr.default_reductions invalid values): Merge
2194 into...
2195 (%define enum variables): ... here, and update output.
2196
2197 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2198
2199 Rename "default rule" to "default reduction".
2200 This includes changing variable names in code, changing
2201 comments, and renaming %define lr.default_rules to %define
2202 lr.default_reductions.
2203 * NEWS (2.5): Update IELR documentation.
2204 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
2205 Adjust YYDEFACT and yydefact_ documentation.
2206 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2207 and lr.type documentation. Make some other wording
2208 improvements.
2209 (Glossary): Adjust cross-references and Default Reduction
2210 definition.
2211 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2212 Remove a confusing comment pointed out by Akim Demaille.
2213 (initialize_LA): Adjust code.
2214 * src/print-xml.c (print_reductions): Adjust code.
2215 * src/print.c (print_reductions): Adjust code.
2216 * src/reader.c (reader): Adjust code.
2217 * src/tables.c (action_row): Adjust code.
2218 (token_actions): Adjust code.
2219 * src/tables.h: Adjust YYDEFACT documentation.
2220 * tests/input.at (%define lr.default_rules invalid values):
2221 Rename test group to...
2222 (%define lr.default_reductions invalid values): ... this, and
2223 update grammar file and expected output.
2224 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2225 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2226
2227 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2228
2229 Document %define lr.type and lr.default_rules.
2230 * NEWS (2.5): Add an entry.
2231 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2232 besides just LALR(1) and GLR(1).
2233 * doc/bison.texinfo (Introduction): Likewise.
2234 (Language and Grammar): Bison is no longer limited to LALR(1)
2235 restrictions.
2236 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2237 when trying to distinguish from GLR. Talk about LR(1) grammars
2238 rather than LALR(1) grammars.
2239 (Decl Summary): In %define api.push_pull entry, say it applies
2240 to deterministic parsers in C rather than LALR(1) parsers in C.
2241 Add lr.default_rules entry.
2242 Add lr.type entry.
2243 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2244 restrictions.
2245 (Generalized LR Parsing): Same changes as for the previous GLR
2246 section.
2247 (Memory Management): Say deterministic rather than LALR(1).
2248 (Understanding): Correct some bison output.
2249 Index discussion of "accepting state".
2250 Say deterministic rather than LALR(1).
2251 (Bison Options): In --yacc entry, say deterministic rather than
2252 LALR(1).
2253 In --report, --graph, and --xml entries, just don't mention
2254 LALR(1).
2255 (C++ Parsers): Say deterministic rather than LALR(1).
2256 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2257 (Glossary): Add Accepting State, Consistent State, Default Rule,
2258 and IELR(1) definitions.
2259 In Generalized LR (GLR) definition, make same changes as in
2260 previous GLR sections.
2261 In LALR(1) definition, say Bison uses LALR(1) by default rather
2262 than implying Bison is limited to LALR(1).
2263 (LocalWords): Add IELR.
2264
2265 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2266
2267 Finish implementing %define lr.type.
2268 Its value can be "LALR", "IELR", or "canonical LR".
2269 * lib/timevar.def (TV_IELR_PHASE1): New var.
2270 (TV_IELR_PHASE2): New var.
2271 (TV_IELR_PHASE3): New var.
2272 (TV_IELR_PHASE4): New var.
2273 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2274 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2275 Sbitset.h, ielr.h, and ielr.c.
2276 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2277 trace_types): Add trace_ielr.
2278 * src/lalr.h, src/lalr.c (ngotos): Export it.
2279 (F): Rename to...
2280 (goto_follows): ... this, update all uses, and export it.
2281 (set_goto_map): Export it.
2282 (map_goto): Export it.
2283 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2284 handled in ielr.
2285 (initialize_LA): Export it. Move lookback allocation to...
2286 (lalr): ... here because, for canonical LR, initialize_LA must
2287 be invoked but lookback and much of the rest of LALR isn't
2288 needed.
2289 * main.c (main): Instead of lalr, invoke ielr, which invokes
2290 lalr.
2291 * src/reader.c (reader): Default lr.type to "LALR".
2292 Default lr.default_rules to "accepting" if lr.type is "canonical
2293 LR". Leave the default as "all" otherwise.
2294 Check for a valid lr.type value.
2295 * src/state.h, src/state.c (struct state_list): Add state_list
2296 member.
2297 (state_new): Initialize state_list member to NULL.
2298 (state_new_isocore): New function, exported.
2299 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2300 exercises all values of lr.type.
2301 (GNU AWK Grammar): Rename test group to...
2302 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2303 AT_TEST_EXISTING_GRAMMAR.
2304 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2305 (GNU pic Grammar): Rename test group to...
2306 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2307 AT_TEST_EXISTING_GRAMMAR.
2308 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2309 all values of lr.type.
2310 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2311 (Lane Split): Likewise.
2312 (Complex Lane Split): Likewise.
2313 (Split During Added Lookahead Propagation): Likewise.
2314
2315 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2316
2317 Add new files for IELR and canonical LR implementation.
2318 * src/AnnotationList.c: New.
2319 * src/AnnotationList.h: New.
2320 * src/InadequacyList.c: New.
2321 * src/InadequacyList.h: New.
2322 * src/Sbitset.c: New.
2323 * src/Sbitset.h: New.
2324 * src/ielr.c: New.
2325 * src/ielr.h: New.
2326
2327 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2328
2329 Implement %define lr.default_rules.
2330 Its value describes the states that are permitted to contain
2331 default rules: "all", "consistent", or "accepting".
2332 * src/reader.c (reader): Default lr.default_rules to "all".
2333 Check for a valid lr.default_rules value.
2334 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2335 is "accepting", then only mark the accepting state as
2336 consistent.
2337 (initialize_LA): Tell state_lookahead_tokens_count whether
2338 lr.default_rules is "accepting".
2339 * src/tables.c (action_row): If lr.default_rules is not "all",
2340 then disable default rules in inconsistent states.
2341 * src/print.c (print_reductions): Use this opportunity to
2342 perform some assertions about whether lr.default_rules was
2343 obeyed correctly.
2344 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2345 helps with checking the parser tables for a grammar.
2346 * tests/input.at (%define lr.default_rules invalid values): New
2347 test group.
2348 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2349 AT_TEST_TABLES_AND_PARSE.
2350 (`no %define lr.default_rules'): New test group generated by
2351 AT_TEST_LR_DEFAULT_RULES.
2352 (`%define lr.default_rules "all"'): Likewise.
2353 (`%define lr.default_rules "consistent"'): Likewise.
2354 (`%define lr.default_rules "accepting"'): Likewise.
2355
2356 2009-04-20 Akim Demaille <demaille@gostai.com>
2357
2358 Consistently refer to Yacc, not YACC.
2359 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2360
2361 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2362
2363 Pacify make maintainer-check-posix.
2364 * tests/input.at (%define, --define): Move bison command-line
2365 options before grammar file name.
2366
2367 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2368
2369 Document semicolon warnings.
2370 * NEWS (2.5): Here.
2371
2372 2008-12-08 Akim Demaille <demaille@gostai.com>
2373
2374 Fix portability issue in the test suite.
2375 * tests/local.at (AT_MATCHES_CHECK): New.
2376 Based on Perl instead of Sed. Sed has too many portability
2377 pitfalls, not ever Sed is GNU Sed.
2378 * tests/actions.at (Fix user actions without a trailing semicolon):
2379 Use it.
2380
2381 2008-12-07 Di-an Jan <dianj@freeshell.org>
2382
2383 Implement the FIXME that ends an user action with a semicolon
2384 if it seems necessary.
2385 * src/scan-code.l (flex rules section): Flag cpp directive from
2386 any `#' to the first unescaped end-of-line. Semicolon is not
2387 needed after `;', `{', '}', or cpp directives and is needed after
2388 any other token (whitespaces and comments have no effect).
2389 * tests/actions.at (Fix user actions without a trailing semicolon):
2390 New test.
2391 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2392 to make user actions complete statements.
2393 Adjust column numbers in error messages.
2394 * tests/regression.at (Fix user actions without a trailing semicolon):
2395 Remove. Covered by new test.
2396
2397 2009-04-14 Akim Demaille <demaille@gostai.com>
2398
2399 doc: minor fixes.
2400 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2401 (Table of Symbols): Remove duplicate entry for %debug.
2402
2403 2009-04-10 Eric Blake <ebb9@byu.net>
2404
2405 submodules: update to latest
2406 * submodules/autoconf: Use latest upstream Autoconf.
2407
2408 2009-04-06 Eric Blake <ebb9@byu.net>
2409
2410 Work around autoconf 2.63b bug in testsuite.
2411 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2412 autoconf bug related to # in test.
2413
2414 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2415
2416 * NEWS (2.5): Describe new -D/--define feature.
2417
2418 2008-11-10 Akim Demaille <demaille@gostai.com>
2419
2420 --trace=muscles
2421 * src/getargs.h, src/getargs.c (trace_muscle): New.
2422 (trace_types, trace_args): Support it.
2423 * src/output.c (output_skeleton): Use it.
2424
2425 2008-11-10 Akim Demaille <demaille@gostai.com>
2426
2427 muscles_output.
2428 * src/output.c (muscles_output): New, extracted from...
2429 (output_skeleton): here.
2430 Adjust.
2431
2432 2008-11-21 Akim Demaille <demaille@gostai.com>
2433
2434 Display the changes in cross-options.texi.
2435 * build-aux/cross-options.pl ($sep): New, to separate items.
2436 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
2437 the changes.
2438
2439 2008-11-20 Di-an Jan <dianj@freeshell.org>
2440
2441 Improves options in the manual.
2442 * doc/bison.texinfo (-g, -x): Add space before argument.
2443 (Option Cross Key): Implement FIXME: listing directives also.
2444 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2445 (Short Option): Special case -d. Put arguments inside @option.
2446 (Bison Directive): Add column, automatically extracted from
2447 src/scan-gram.l (actual name passed as the first argument)
2448 with special case for %define.
2449 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
2450 to build-aux/cross-options.pl.
2451 * src/getargs.c (usage): Document limitations of cross-options.pl.
2452 * src/scan-gram.l: Likewise.
2453
2454 2009-02-25 Akim Demaille <demaille@gostai.com>
2455
2456 Copyright years.
2457 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2458
2459 2008-12-08 Akim Demaille <demaille@gostai.com>
2460
2461 Install autoconf as a submodule to get m4sugar.
2462 * .gitmodules: Add submodules/autoconf.
2463 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2464 submodules/autoconf.
2465
2466 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2467
2468 Simplify last patch slightly.
2469 * src/getargs.c (getargs): Here.
2470
2471 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2472
2473 Fix last warning from --enable-gcc-warnings.
2474 * src/getargs.c (getargs): Don't assign const address to non-const
2475 pointer.
2476
2477 2008-11-17 Di-an Jan <dianj@freeshell.org>
2478
2479 Handle --enable-gcc-warnings.
2480 * src/getargs.c (command_line_location): Set parameters to void.
2481
2482 2008-11-11 Akim Demaille <demaille@gostai.com>
2483
2484 AT_FULL_COMPILE.
2485 * tests/actions.at, tests/regression.at: Use it.
2486
2487 2008-11-07 Akim Demaille <demaille@gostai.com>
2488
2489 Pass command line location to skeleton_arg and language_argmatch.
2490 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2491 The location argument is now mandatory.
2492 Adjust all dependencies.
2493 (getargs): Use command_line_location.
2494
2495 2008-11-07 Akim Demaille <demaille@gostai.com>
2496
2497 -D, --define.
2498 * src/getargs.c (usage): Document -D.
2499 Fix help string for --locations.
2500 (command_line_location): New.
2501 (short_options, long_options, getargs): Support -D, --define.
2502 (getargs): Move -d support at the right place.
2503 * doc/bison.texinfo (Bison Options): Update.
2504 * tests/input.at (%define, --define): New.
2505
2506 2008-11-07 Akim Demaille <demaille@gostai.com>
2507
2508 Initialize the muscle table before parsing the command line.
2509 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2510 (getargs): Define file_name.
2511 * src/main.c (main): Initialize muscle_tab before calling
2512 getargs.
2513 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2514 its value is not available yet.
2515
2516 2008-11-09 Akim Demaille <demaille@gostai.com>
2517
2518 Require the generation of parse-gram.output.
2519 * src/Makefile.am (YACC): Pass --report=all.
2520
2521 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2522
2523 * NEWS (2.5): New stub.
2524
2525 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2526
2527 Fix options documentation.
2528 * build-aux/cross-options.pl: As in --help output, write optional
2529 arguments as [=ARG] not =[ARG].
2530 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2531
2532 2008-11-07 Akim Demaille <demaille@gostai.com>
2533
2534 Fix --help.
2535 * src/getargs.c (usage): Fix help string for -W.
2536
2537 2008-11-07 Akim Demaille <demaille@gostai.com>
2538
2539 Handle more general types of option arguments.
2540 * build-aux/cross-options.pl: The argument ends at the first
2541 space, not the first non-symbol character.
2542 Use @var for each word appearing the argument description.
2543
2544 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2545
2546 Remove spurious initial empty lines.
2547 * data/location.cc: End the @output lines with an @.
2548
2549 2008-11-04 Akim Demaille <demaille@gostai.com>
2550
2551 Remove spurious initial empty lines.
2552 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2553 * data/yacc.c: End the @output lines with an @.
2554
2555 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2556
2557 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2558 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2559 requirements for a correct m4 are stricter.
2560 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
2561 * configure.ac: Update to use AC_PROG_GNU_M4.
2562 Reported by Eric Blake.
2563
2564 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2565
2566 Help with updating web manual.
2567 * HACKING: Incorporate instructions from gnulib/doc/README.
2568 * bootstrap.conf (gnulib_modules): Add gendocs.
2569
2570 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2571
2572 Fix strange %define locations for default values.
2573 Reported by Akim Demaille at
2574 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2575 and discussed again starting at
2576 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2577 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2578 because location information is bogus.
2579 Use angle brackets to delimit fake file name because square brackets
2580 look like underexpanded m4. Choose a better fake file name.
2581 Use negative line numbers.
2582 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2583 * src/location.c (location_print): If line for a boundary is negative,
2584 only print that boundary's file name.
2585 * src/location.h: Document that.
2586 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2587 defaults): Update output.
2588
2589 2008-11-07 Akim Demaille <demaille@gostai.com>
2590
2591 Locations without columns for command line arguments.
2592 * src/location.c (location_print): Don't display negative columns.
2593 * src/location.h: Document this.
2594
2595 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2596
2597 Add reminder about uploading public key to keys.gnupg.net.
2598 * HACKING (Release Procedure): Here.
2599
2600 2009-03-31 Akim Demaille <demaille@gostai.com>
2601
2602 bootstrap: --help to stdout.
2603 * bootstrap (usage): Don't send --help to stderr.
2604 Use a here doc instead of a long string.
2605
2606 2009-03-31 Akim Demaille <demaille@gostai.com>
2607
2608 bootstrap: README-hacking no longer exists
2609 * bootstrap (checkout_only_file): Set to HACKING.
2610
2611 2009-03-26 Akim Demaille <demaille@gostai.com>
2612
2613 doc: merge HACKING and README-hacking.
2614 Two files is confusing.
2615 Reported by Alexandre Duret-Lutz.
2616
2617 * README-hacking: Merge into...
2618 * HACKING (Working from the repository): here.
2619
2620 2009-03-26 Akim Demaille <demaille@gostai.com>
2621
2622 doc: update README-hacking.
2623 * README-hacking: We now use git and git submodules.
2624 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2625
2626 2009-03-26 Akim Demaille <demaille@gostai.com>
2627
2628 lalr1.cc: avoid GCC 4.3 warnings.
2629 GCC 4.3 now warns about "a || b && c" and asks for explicit
2630 parentheses.
2631 Reported by Alexandre Duret-Lutz.
2632 * data/location.cc: Update copyright years.
2633 (Position::operator==): Use parens to make precedence explicit.
2634 Compare lines and columns first, as they are more likely to be
2635 different, and they are faster to compare.
2636
2637 2009-03-26 Akim Demaille <demaille@gostai.com>
2638
2639 gnulib: update.
2640 * gnulib: Update to latest.
2641 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
2642 use +=.
2643
2644 2009-01-08 Akim Demaille <demaille@gostai.com>
2645
2646 Fix grep portability issues.
2647 Grep on Solaris does not support -q.
2648 Reported by Summum Bonum.
2649
2650 * NEWS: Add a stub for 2.4.2.
2651 * THANKS: Add Summum Bonum.
2652 * tests/atlocal.in (EGREP): New.
2653 (CC, CXX, XSLTPROC): Make it possible to override them via
2654 envvars.
2655 * tests/java.at: Use $EGREP instead of egrep.
2656 Use AT_CHECK's ignore instead of grep's -q.
2657
2658 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2659
2660 Version 2.4.1.
2661 * NEWS: Set version and date.
2662 * lib/Makefile.am: Update copyright year.
2663 * tests/atlocal.in: Update copyright year.
2664
2665 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2666
2667 Semicolon feature removal is not about future language support.
2668 * NEWS: The semicolon feature is no longer active for newer languages,
2669 so don't claim that it causes trouble for them.
2670
2671 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2672
2673 * gnulib: Update submodule to HEAD.
2674
2675 2008-12-09 Akim Demaille <demaille@gostai.com>
2676
2677 Update data/README.
2678 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2679
2680 2008-12-05 Eric Blake <ebb9@byu.net>
2681
2682 Build testsuite with newer autoconf.
2683 * tests/output.at (m4_expand): Don't override in newer autoconf,
2684 where the underlying implementation changed.
2685 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2686 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2687 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2688 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2689 since some of them contain unbalanced ')'.
2690
2691 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2692
2693 * NEWS: Clarify a little.
2694
2695 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2696
2697 * NEWS: Update for recent changes.
2698
2699 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2700
2701 Fix unexpanded macros in GLR defines file.
2702 Reported by Csaba Raduly at
2703 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2704 * THANKS (Csaba Raduly): Add.
2705 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2706 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2707 lexer in a separate module that includes the defines file.
2708 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
2709 source.
2710 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2711 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2712 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2713 (AT_DATA_SOURCE_PROLOGUE): New.
2714 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2715 (AT_DATA_SOURCE): New.
2716 (AT_FULL_COMPILE): New, copied from master branch and extended to
2717 support an additional source file.
2718
2719 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2720
2721 Don't let maintainer-*-check targets force a version update.
2722 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2723 handled.
2724
2725 2008-11-17 Di-an Jan <dianj@freeshell.org>
2726
2727 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2728 Align menus. Adjust word wrapping. Use node names for menu names.
2729 (Examples): Don't abbreviate node names.
2730 (LocalWords): Remove abbreviations.
2731 (Copying): Make description a sentence.
2732 (Java Action Features): Remove period to match the rest of menu.
2733
2734 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2735
2736 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2737 * configure.ac: Adjust usage.
2738 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2739 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2740 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2741
2742 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2743
2744 Don't add a semicolon to actions for %skeleton or %language.
2745 It breaks Java test cases as reported by Akim Demaille.
2746 * src/scan-code.l: Implement.
2747
2748 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2749
2750 Clean up %skeleton and %language priority implementation.
2751 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2752 remove static qualifier because others will soon need to see it.
2753 (language_prio): Likewise.
2754 (getargs): Use command_line_prio rather than 0.
2755 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2756 enum fields.
2757 (skeleton_prio): Extern it.
2758 (language_prio): Extern it.
2759 * src/parse-gram.y: Use grammar_prio rather than 1.
2760
2761 2008-11-04 Akim Demaille <demaille@gostai.com>
2762
2763 * NEWS: Mention the trailing semicolon in action.
2764
2765 2008-11-04 Akim Demaille <demaille@gostai.com>
2766
2767 Reformat NEWS.
2768 * NEWS: Use more outline-mode markup.
2769 Suggested by Jim Meyering.
2770
2771 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2772
2773 Fix user actions without a trailing semicolon.
2774 Reported by Sergei Steshenko at
2775 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2776 * THANKS (Sergei Steshenko): Add.
2777 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2778 * tests/regression.at (Fix user actions without a trailing semicolon):
2779 New test case.
2780
2781 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2782
2783 Initiate further development.
2784 * NEWS: Create an empty section for new entries.
2785 * gnulib: Update submodule to HEAD.
2786
2787 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2788
2789 * NEWS: Version 2.4.
2790
2791 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2792
2793 Prepare for next release.
2794 * NEWS: Briefly mention changes since 2.3b.
2795 * README: Say GNU m4 1.4.6, which we've been requiring in release
2796 announcements already, not 1.4.3, which breaks the build.
2797
2798 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2799
2800 Say %language is experimental.
2801 We're thinking of extending it's effect on output file naming. See the
2802 thread at
2803 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2804 * NEWS: Say it's experimental.
2805 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2806 recommend it over %skeleton for now.
2807 (Bison Options): Likewise.
2808 (C++ Bison Interface): Use %skeleton not %language.
2809 (Calc++ Parser): Use %skeleton not %language.
2810 * src/getargs.c (usage): Say it's experimental.
2811
2812 2008-11-01 Di-an Jan <dianj@freeshell.org>
2813 Paolo Bonzini <bonzini@gnu.org>
2814
2815 Support all Java parser class modifiers.
2816 * data/java.m4 (b4_percent_define_get3): New.
2817 (b4_final_if, b4_strictfp_if): New.
2818 * data/lalr1.java (final, strictfp, extends, implements): Support.
2819 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2820 documentation.
2821 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2822 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2823 (AT_CHECK_JAVA_GREP): New.
2824 (Java parser class modifiers): New test.
2825 (Java parser class extends and implements): New test.
2826
2827 Model exception propagation better with throws and lex_throws.
2828 * data/java.m4 (b4_list2): New.
2829 (throws): Change default.
2830 * data/lalr1.java (yyaction): Add throws.
2831 (parse): Add lex_throws in addition to throws.
2832 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2833 * tests/java.at (Java throws specifications): New test.
2834
2835 Improve documentation for Java parsers.
2836 * doc/bison.texinfo (Java Parsers): Add subsections.
2837 Don't quote first argument of %define.
2838 (Java Bison Interface): Document output files. Move documentation
2839 of parser class and merge into Java Parser Interface. Document
2840 features that error out. Document directives with no effect.
2841 Move note about Javadoc higher.
2842 (Java Semantic Values): Explicitly mention stype.
2843 Document that generic types cannot be used.
2844 (Java Location Values): Use @deftypeivar. Document constructors.
2845 Correct return value for toString.
2846 (Java Parser Interface): List undocumented constants/fields.
2847 Move documentation of fields added by %parse-param closer to list
2848 of members. Document that token names are added as fields.
2849 Document constructors accurately. Remove error method.
2850 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2851 Interface. Describe %code lexer and yylex accutately.
2852 Remove documentation that does not match the code.
2853 (Java Action Features): New.
2854 (Java Differences): Add reference. Add item on semantic values.
2855 Add note about @{ ... @}. Clarify %% epilogue placement.
2856 (Java Declarations Summary): New.
2857
2858 Fix Java skeleton.
2859 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2860 (b4_remove_comma): Quote test argument.
2861 (b4_identification): Remove "bison" field.
2862 * tests/java.at (Java parser class and package names): New test.
2863 (Java %parse-param and %lex-param): New test.
2864 (Java stype, position_class and location_class): New test.
2865
2866 2008-10-31 Di-an Jan <dianj@freeshell.org>
2867
2868 * data/lalr1.jave: Update copyright years.
2869 (YYParser): Correct name of "generated from" file in Javadoc:
2870 use b4_file_name instead of @ofile@.
2871 (Location constructor): Correct Javadoc parameter name.
2872 (yylloc): Add missing opening m4 quote after b4_location_if.
2873 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2874 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2875 (YYParser constructor): Correct Javadoc parameter name.
2876
2877 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2878
2879 Always put auxiliary code files in the same dir as other output files.
2880 * src/files.c (compute_file_name_parts): When the user specifies
2881 --output but not --file-prefix, extract the directory prefix from the
2882 file prefix not from the grammar file name. This affects the location
2883 of files like location.hh generated by the C++ skeleton. The includes
2884 in the other output files require this fix.
2885 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2886 for expected output files.
2887 (Output files): Add a test for the above.
2888
2889 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2890
2891 * gnulib: Update submodule to HEAD.
2892
2893 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2894
2895 Update copyright year.
2896 * src/files.c: Here.
2897
2898 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2899
2900 Don't overwrite the input file.
2901 * src/files.c (output_file_name_check): Fatal error if using input file
2902 for output.
2903 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2904 argument.
2905 (Conflicting output files): Add test.
2906
2907 2008-10-28 Akim Demaille <demaille@gostai.com>
2908
2909 Space changes.
2910 * data/lalr1.cc: Formatting changes.
2911
2912 2008-10-28 Akim Demaille <demaille@gostai.com>
2913
2914 Don't define debugging functions when !YYDEBUG.
2915 * data/lalr1.cc (debug_stream, set_debug_stream)
2916 (debug_level_type, debug_level, set_debug_level): Don't
2917 declare them when YYDEBUG is not defined.
2918 The implementation are already YYDEBUG-aware.
2919
2920 2008-10-28 Akim Demaille <demaille@gostai.com>
2921
2922 Prefer "continue" for empty loop bodies.
2923 * etc/bench.pl.in: Use "continue" instead of {}.
2924
2925 2008-10-28 Akim Demaille <demaille@gostai.com>
2926
2927 Space and comments changes.
2928 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2929 * data/c.m4, data/lalr1.cc: Space changes.
2930
2931 2008-10-28 Akim Demaille <demaille@gostai.com>
2932
2933 Make gnulib a submodule.
2934 * gnulib: New.
2935 * .gitmodules (gnulib): New.
2936
2937 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2938
2939 Fix yyerror_range for user-defined location type in C++. Reported by
2940 Georg Sauthoff at
2941 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2942 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2943 * THANKS (Georg Sauthoff): Add.
2944
2945 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2946
2947 Update several administrative files mainly to facilitate releasing.
2948 * HACKING (Administrivia): Make the git-merge-changelog notes more
2949 helpful.
2950 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2951 (Release Procedure): Update for git and add numerous details that were
2952 previously missing.
2953 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2954 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2955 that announcements don't claim we bootstrapped with whatever bison
2956 happened to be in PATH. Add flex as a bootstrap tool.
2957 * Makefile.maint: Remove, previously replaced by maint.mk.
2958 * Makefile.cfg: Remove, and migrate settings to...
2959 * cfg.mk: ... here for the sake of `make announcement'.
2960 * bootstrap.conf (gnulib_modules): Add announce-gen.
2961 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2962 Berry.
2963
2964 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2965
2966 Small but important bugfixes for the Java skeleton.
2967 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2968 (yy_symbol_print): Call toString on yyvaluep.
2969
2970 2008-08-29 Akim Demaille <demaille@gostai.com>
2971
2972 Clarify UPDATED use.
2973 * doc/bison.texinfo: It refers to the last edition of this file,
2974 not to the release date of Bison.
2975 Reported by Joel E. Denny.
2976
2977 2008-08-29 Akim Demaille <demaille@gostai.com>
2978
2979 * README: Update FAQ pointer.
2980 Reported by Joel E. Denny.
2981
2982 2008-08-27 Eric Blake <ebb9@byu.net>
2983
2984 Resync m4sugar from autoconf.
2985 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2986 (m4_init): Adjust to latest m4.git changes.
2987 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2988 effects.
2989 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2990 (_m4_list_cmp): Reduce side effects.
2991
2992 2008-08-27 Akim Demaille <demaille@gostai.com>
2993
2994 Check yyerrok in calc.at.
2995 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2996 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2997 expected.
2998
2999 2008-08-27 Akim Demaille <demaille@gostai.com>
3000
3001 Support yyerrok in lalr1.cc.
3002 YYBACKUP is still to import back into lalr1.cc.
3003 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3004
3005 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3006
3007 For maintainer-check*, don't recompile for a $(VERSION) update.
3008 * cfg.mk: New file.
3009 (_is-dist-target): Override the one in GNUmakefile.
3010 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3011
3012 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3013
3014 Update for recent change to gnulib.
3015 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3016 string.h now.
3017
3018 2008-08-15 Eric Blake <ebb9@byu.net>
3019
3020 Remaining m4sugar merge from autoconf.
3021 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3022 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3023 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3024 * src/output.c (output_skeleton): Tell m4 how to find it.
3025
3026 Partial m4sugar merge from autoconf: m4_map.
3027 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3028 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3029 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3030 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3031 for empty list.
3032 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3033 Likewise.
3034 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3035 declares it.
3036
3037 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3038
3039 Keep .version and PACKAGE_VERSION in sync.
3040 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3041 dependency, and add comments justifying this in more detail. Discussed
3042 starting at
3043 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3044
3045 2008-08-06 Eric Blake <ebb9@byu.net>
3046
3047 Partial m4sugar merge from autoconf: m4_shiftn.
3048 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3049 (m4_shift2, m4_shift3): New macros.
3050 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3051 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3052 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3053 * data/java.m4 (b4_remove_comma): Likewise.
3054
3055 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3056 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3057 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3058 (m4_init): Consolidate wrapped text into single m4_wrap.
3059 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3060 in wrapped text.
3061
3062 2008-08-05 Eric Blake <ebb9@byu.net>
3063
3064 Partial m4sugar merge from autoconf: builtins, version.m4.
3065 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3066 (m4_prepend): Remove, as it is unused and inherently quadratic,
3067 whereas m4_append is linear in newer m4.
3068 (m4_mkstemp): New builtin.
3069 (m4_symbols): Make rename conditional.
3070 (m4_version_prereq): Ensure fatal error if used in bison, which
3071 intentionally lacks version.m4.
3072
3073 Fix comments in m4sugar.
3074 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3075
3076 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3077
3078 Update for recent .gitignore fix in Gnulib.
3079 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3080 anchored .gitignore entries.
3081
3082 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3083
3084 Set gnu or gnits strictness.
3085 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3086 development and gnits strictness for releases. Based on Eric Blake's
3087 suggestion at
3088 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3089
3090 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3091
3092 * NEWS: Clarify documentation of %language.
3093
3094 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3095
3096 Support usage of git-merge-changelog.
3097 * .gitattributes: New.
3098 * HACKING: Document usage of git-merge-changelog.
3099 * bootstrap: Install git-merge-changelog entries in .git/config
3100 if appropriate.
3101
3102 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3103
3104 Remove remaining dependence on CVS Id keyword.
3105 * ChangeLog: For the sake of people still using CVS, don't use dollars
3106 when mentioning Id.
3107 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3108 unusual anyway.
3109 * data/xslt/xml2dot.xsl: Likewise.
3110 * data/xslt/xml2text.xsl: Likewise.
3111 * data/xslt/xml2xhtml.xsl: Likewise.
3112 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3113 * doc/Makefile.am (neutralize): Remove, no longer needed.
3114 (.x.1): Don't use neutralize.
3115 (edit): Don't substitute for ID.
3116 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3117
3118 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3119
3120 Fix dependence on computed configure variables.
3121 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3122 $(top_srcdir)/configure.ac so that changes to computed variables, such
3123 as PACKAGE_VERSION, are seen.
3124 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3125
3126 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3127
3128 Update copyright dates for recent changes.
3129 * Makefile.am: Here.
3130 * src/Makefile.am: Here.
3131 * src/reduce.c: Here.
3132 * tests/reduce.at: Here.
3133
3134 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3135
3136 Use git-version-gen for version names between releases.
3137 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3138 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3139 * .prev-version: New.
3140 * .version.in: Remove.
3141 * ChangeLog: Remove the Id previously used for capturing the CVS
3142 revision.
3143 * GNUmakefile: Remove, now copied from Gnulib.
3144 * Makefile.am: Add code suggested by comments in
3145 build-aux/git-version-gen.
3146 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3147 .prev-version, and .version.
3148 * NEWS (2.3b+): Rename to...
3149 (?.?): ... this because we're dropping the "+" version naming scheme,
3150 but, in general, we still can't be sure of our next release name.
3151 * bootstrap: Add a quick hack to remove from .gitignore the
3152 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3153 entry. This should really be fixed in gnulib instead.
3154 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3155 * configure.ac (AC_INIT): Set version name by invoking
3156 build-aux/git-version-gen.
3157 (AC_CONFIG_FILES): Remove .version, now generated by
3158 build-aux/git-version-gen.
3159 * maint.mk: New, copied from coreutils.
3160 * doc/.cvsignore (bison.1): Add.
3161 * doc/.gitignore (/bison.1): Add.
3162 * doc/bison.1: Remove, generated.
3163 * src/.cvsignore (revision.c): Remove.
3164 * src/.gitignore (/revision.c): Remove.
3165 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3166 (BUILT_SOURCES): Remove revision.c.
3167 (revision.c): Remove.
3168 * src/getargs.c (version): Don't print revision after the VERSION.
3169 * src/revision.h: Remove.
3170
3171 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3172
3173 Fix untranslatable composition of sentences. Reported by Goran
3174 Uddeborg at
3175 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3176 * THANKS (Goran Uddeborg): Add.
3177 * src/reduce.c (reduce_print): Report the number of nonterminals and
3178 rules useless in the grammar in separate sentences.
3179 * tests/reduce.at (Useless Rules): Update output.
3180 (Reduced Automaton): Likewise.
3181 (Underivable Rules): Likewise.
3182 (Empty Language): Likewise.
3183
3184 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3185
3186 Fix some .gitignore and .cvsignore problems.
3187 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3188 (insert_vc_ignore): ... this new function, which prepends `/' to all
3189 .gitignore entries before passing them to insert_sorted_if_absent.
3190 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3191 .cvsignore files are maintained even though Bison developers run
3192 bootstrap while using Git.
3193 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3194 unneeded by Bison.
3195 (gnulib): Add.
3196 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3197 unneeded. Reported by Eric Blake.
3198 * lib/.gitignore (/*~): Add.
3199 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3200 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3201 Blake.
3202 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3203
3204 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3205
3206 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3207 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3208 * bootstrap.conf (gnulib_modules): Add unsetenv.
3209 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3210 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3211 (/setenv.m4): Add.
3212 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3213 the first argument because it may become position-dependent, and unset
3214 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3215 Add comments explaining these issues in more detail.
3216
3217 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3218
3219 Add .gitignore everywhere based on .cvsignore.
3220 * .gitignore: New.
3221 * build-aux/.gitignore: New.
3222 * data/.gitignore: New.
3223 * doc/.gitignore: New.
3224 * etc/.gitignore: New.
3225 * examples/.gitignore: New.
3226 * examples/calc++/.gitignore: New.
3227 * lib/.gitignore: New.
3228 * m4/.gitignore: New.
3229 * po/.gitignore: New.
3230 * runtime-po/.gitignore: New.
3231 * src/.gitignore: New.
3232 * tests/.gitignore: New.
3233
3234 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3235
3236 * NEWS (2.3b+): New section, empty for now.
3237 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3238
3239 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3240
3241 * NEWS (2.3b): Update release date since there has been a delay in
3242 getting the announcements and tarballs out.
3243
3244 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3245
3246 * NEWS: Version 2.3b.
3247 * configure.ac (AC_INIT): Likewise.
3248 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3249
3250 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3251
3252 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3253 been doing it for years.
3254 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3255 (Release Procedure): Add FIXME about make alpha being unmaintained.
3256
3257 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3258
3259 * data/yacc.c: Reformat m4 a little for readability.
3260 * src/lalr.c (build_relations): Correct comment.
3261
3262 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3263
3264 DJGPP specific issue.
3265 * djgpp/config.sed: Fixes required to run configure scripts generated
3266 by autoconf 2.62.
3267
3268 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3269
3270 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3271 coordinator@translationproject.org.
3272
3273 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3274
3275 * THANKS: Add Eric Blake.
3276
3277 2008-04-23 Eric Blake <ebb9@byu.net>
3278
3279 Revert prior patch, by working around autoconf regression.
3280 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3281 ("Output file name: ("): Uncomment test.
3282 ("Output file name: )"): Likewise.
3283 Based on an idea from Noah Misch.
3284
3285 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3286
3287 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3288 2.61. Reported by Juan Manuel Guerrero at
3289 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3290 * tests/output.at ("Output file name: ("): Comment out test case for
3291 now.
3292 ("Output file name: )"): Likewise.
3293
3294 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3295
3296 * GNUmakefile: Update git-version-gen invocation so make dist
3297 succeeds.
3298
3299 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3300
3301 Update to the current gnulib CVS repository, and fix trigraph handling
3302 in Bison.
3303 * bootstrap: Update gnulib CVS repository URL.
3304 (symlink_to_dir): Encapsulate the code that guarantees the destination
3305 directory exists into...
3306 (check_dst_dir): ... this new function, and...
3307 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3308 fail when copying files into lib/uniwidth/.
3309 * src/output.c (prepare_symbols): When writing yytname muscles, where
3310 symbol names will be encoded in C-string literals, tell quotearg to
3311 escape trigraphs. This used to be the default in gnulib.
3312 * tests/regression.at (Token definitions): Because of the change in
3313 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3314 escapes trigraphs in symbol names. Thus, yytname no longer has
3315 trigraphs unnecessarily doubly escaped. Update test case output.
3316 Extend test case to be sure Bison's own error messages will no longer
3317 have trigraphs in symbol names unnecessarily escaped once.
3318
3319 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3320
3321 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3322 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3323 * .cvsignore: Add .version.
3324 * .version.in: New.
3325 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3326 * configure.ac (AC_CONFIG_FILES): Add .version.
3327 * build-aux/.cvsignore: Add git-version-gen.
3328
3329 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3330
3331 * NEWS (2.3a+): Mention that -g now takes an argument.
3332 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3333 consistency. Update the -g and -x entries now that they take
3334 arguments. Use brackets to indicate optional arguments.
3335 * src/getargs.c (usage): Explain the relationship between arguments of
3336 long and short options more completely. Document --defines and -d
3337 separately since the former takes an argument but, for POSIX Yacc, the
3338 latter does not.
3339 (short_options): Let -W take an optional argument like --warnings.
3340 (getargs): Sort cases.
3341
3342 2008-02-28 Akim Demaille <demaille@gostai.com>
3343
3344 * doc/bison.texinfo: Fix a few typos.
3345
3346 2008-02-28 Akim Demaille <akim@epita.fr>
3347
3348 * doc/bison.texinfo (Bison Options): Document -W.
3349 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3350
3351 2008-02-28 Akim Demaille <akim@epita.fr>
3352
3353 * src/getargs.c (short_options): Split and sort for readability.
3354 -g and -x take optional arguments, just like their long options.
3355 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3356 understand.
3357 Fix the handling of $opt which resulted in all the argument to be
3358 considered as optional.
3359
3360 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3361
3362 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3363 say its interface is experimental.
3364 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3365 Java.
3366 (Bison Options): In the -L and --language entry, mention Java.
3367 (Java Bison Interface): Say the interface is experimental.
3368 * src/getargs.c (usage): Mention -L and --language.
3369
3370 * NEWS (2.3a+): Say the push parsing interface is experimental.
3371 * doc/bison.texinfo (Push Decl): Likewise.
3372 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3373 (Push Parser Function): Likewise.
3374 (Pull Parser Function): Likewise.
3375 (Parser Create Function): Likewise.
3376 (Parser Delete Function): Likewise.
3377 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3378 yypull_parse, and yypush_parse entries.
3379
3380 * NEWS (2.3a+): Mention XML support, and say the schema is
3381 experimental.
3382 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3383 * src/getargs.c (usage): Say the XML schema is experimental.
3384
3385 * NEWS (2.3a+): Say option instead of flag.
3386
3387 2008-02-21 Wojciech Polak <polak@gnu.org>
3388
3389 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3390 text.
3391
3392 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3393
3394 Fix impure push parser compile error reported by Bob Rossi at
3395 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3396 * data/yacc.c: Clean up whitespace in the output a little.
3397 (yypstate_allocated): Define for impure push parsers regardless of
3398 whether the pull interface is also requested.
3399 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3400 check impure push parsers without the pull interface.
3401
3402 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3403 yyerror takes arguments specified by %parse-param while yypstate_new
3404 does not.
3405 * doc/bison.texinfo (Parser Create Function): Document that
3406 yypstate_new returns 0 for multiple impure parser instances.
3407 * tests/push.at (Push Parsing: Multiple impure instances): Update
3408 expected stderr output.
3409
3410 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3411
3412 * runtime-po/POTFILES.in (push.c): Remove.
3413
3414 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3415
3416 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3417 * data/push.c: Rename to...
3418 * data/yacc.c: ... this, overwriting it.
3419 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3420 `%push-pull-parser' -> `%define api.push_pull "both"'.
3421 Remove old yacc.c tests, and update push.c tests to yacc.c.
3422
3423 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3424
3425 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3426 `"%code top" blocks' instead of `%code "top" blocks'.
3427 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3428 Clean up whitespace in the output a little.
3429
3430 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3431
3432 Fix documentation problems reported by Tim Josling at
3433 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3434 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3435 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3436 integers. Explain the effect of literal string aliases on error
3437 messages. Copy token 0 documentation from the C++ skeleton
3438 documentation.
3439
3440 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3441
3442 Accept a token number in a %left, %right, or %nonassoc for POSIX
3443 conformance. Reported by Tim Josling at
3444 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3445 * NEWS (2.3a+): Mention.
3446 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3447 and code numbers are treated by precedence declarations.
3448 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3449 of symbols.1.
3450 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3451 of symbol.
3452 (symbol.prec): New, just like symbol but allows INT.
3453 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3454 longer holds.
3455 * tests/regression.at (Token number in precedence declaration): New
3456 test case.
3457
3458 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3459
3460 DJGPP specific issues.
3461 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3462 be changed. Copyright timestamp adjusted.
3463 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3464 be changed. Copyright timestamp adjusted.
3465 * djgpp/config.site: Copyright timestamp adjusted.
3466 * djgpp/config_h.sed: Copyright timestamp adjusted.
3467 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3468 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3469 filename translation list.
3470 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3471 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3472 files shall be created. Before trying to use the temp dir where the
3473 environment variable points to check that the dir really exists. If
3474 not default to the cwd as temp dir. Copyright timestamp adjusted.
3475 * djgpp/subpipe.h: Copyright timestamp adjusted.
3476 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3477
3478 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3479
3480 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3481
3482 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3483
3484 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3485 Problem reported by Claudio Saavedra in
3486 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3487
3488 2008-01-05 Wojciech Polak <polak@gnu.org>
3489
3490 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3491 document's title with the input grammar file name.
3492
3493 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3494
3495 Automate regression testing of the XML/XSLT implementation. Discussed
3496 starting at
3497 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3498 * configure.ac (XSLTPROC): New substitution.
3499 * Makefile.am (maintainer-xml-check): New phony target invoking...
3500 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3501 invoking make maintainer-check with BISON_TEST_XML=1.
3502 * tests/atlocal.in (XSLTPROC): New.
3503 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3504 not to report reachable memory when Bison is expected to have a
3505 non-zero exit status and (2) to compare XML/XSLT output with --graph
3506 and --report=all output for every working grammar when
3507 BISON_TEST_XML=1.
3508 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3509 (AT_BISON_CHECK_XML): New.
3510 (AT_QUELL_VALGRIND): New.
3511 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3512 (AT_CHECK): ... don't redefine this since this was the old way to
3513 quell Valgrind.
3514 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3515 AT_BISON_CHECK invocations.
3516 * tests/c++.at: Likewise.
3517 * tests/calc.at: Likewise.
3518 * tests/conflicts.at: Likewise.
3519 * tests/cxx-type.at: Likewise.
3520 * tests/existing.at: Likewise.
3521 * tests/glr-regression.at: Likewise.
3522 * tests/headers.at: Likewise.
3523 * tests/input.at: Likewise.
3524 * tests/java.at: Likewise.
3525 * tests/output.at: Likewise.
3526 * tests/push.at: Likewise.
3527 * tests/reduce.at: Likewise.
3528 * tests/regression.at: Likewise.
3529 * tests/sets.at: Likewise.
3530 * tests/skeletons.at: Likewise.
3531 * tests/synclines.at: Likewise.
3532 * tests/torture.at: Likewise.
3533 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3534 tends to hang xsltproc.
3535 (Big horizontal): Likewise.
3536
3537 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3538
3539 In XML output, remove redundant class attribute on symbol element.
3540 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3541 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3542 look up a symbol to determine whether it's a nonterminal or terminal.
3543 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3544 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3545
3546 Add prec/assoc information to XML output.
3547 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3548 %prec, add a percent_prec attribute.
3549 * src/print-xml.c (print_grammar): For each terminal that has a
3550 precedence or associativity, add a prec or assoc attribute.
3551 (xml_indent): New.
3552 (xml_puts): Use xml_indent.
3553 (xml_printf): Use xml_indent.
3554 * src/print-xml.h (xml_indent): Prototype.
3555
3556 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3557 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3558
3559 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3560
3561 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3562 (bison:ruleByNumber): ... this for clarity.
3563 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3564 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3565 (xsl:template match="reduction"): Update.
3566 (xsl:template match="item"): Update.
3567 (xsl:template match="reduction"): Update.
3568
3569 In the XML output, don't print the list of rules where symbols appear.
3570 Compute it in XSLT instead. Discussed at
3571 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3572 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3573 (bison:ruleByRhs): New.
3574 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3575 bison:ruleByRhs.
3576 (xsl:template match="terminal/rule"): Remove.
3577 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3578 bison:ruleByRhs.
3579 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3580 Remove.
3581 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3582 bison:ruleByRhs and mode="number-link" for rule template.
3583 (xsl:template match="terminal/rule"): Remove.
3584 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3585 bison:ruleByRhs and mode="number-link" for rule template.
3586 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3587 Rewrite as...
3588 (xsl:template match="rule" mode="number-link"): ... this.
3589 * src/print-xml.c (print_grammar): Don't print the list of rules.
3590
3591 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3592
3593 Don't let --report affect XML output; always print all information.
3594 Discussed at
3595 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3596 * src/conflicts.c (log_resolution): Implement.
3597 * src/print-xml.c (print_core): Implement.
3598 (print_state): Implement.
3599 (print_xml): Implement.
3600
3601 * NEWS (2.3a+): Fix quotes.
3602 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3603 don't let %verbose clear the list specified by --report.
3604
3605 2007-11-26 Akim Demaille <akim@epita.fr>
3606
3607 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3608
3609 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3610
3611 In the XML output, list useless and unused symbols and rules with the
3612 useful ones and add a "usefulness" attribute. Discussed starting at
3613 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3614 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3615 (grammar_rules_print_xml): Print all rules instead of just those
3616 useful in the grammar, and add a "usefulness" attribute.
3617 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3618 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3619 (print_grammar): Print all nonterminals instead of just useful ones,
3620 and add a "usefulness" attribute to nonterminals and terminals.
3621 (print_xml): Don't print a separate "reductions" or
3622 "rules-useless-in-parser" element.
3623 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3624 (reduce_xml): Remove.
3625 (reduce_token_unused_in_grammar): New.
3626 (reduce_nonterminal_useless_in_grammar): New.
3627 * src/reduce.h (reduce_xml): Remove prototype.
3628 (reduce_token_unused_in_grammar): Add prototype.
3629 (reduce_nonterminal_useless_in_grammar): Add prototype.
3630 * data/xslt/xml2text.xsl: Update for XML changes.
3631 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3632 * tests/reduce.at (Useless Terminals): Update output.
3633 (Useless Rules): Update output.
3634 (Reduced Automaton): Update output.
3635
3636 Say "Terminals unused in grammar" instead of "Unused terminals".
3637 * NEWS (2.3a+): Update.
3638 * doc/bison.texinfo (Understanding): Update example output.
3639 * src/reduce.c (reduce_output): Implement.
3640 * data/xslt/xml2text.xsl: Implement.
3641 * data/xslt/xml2xhtml.xsl: Implement.
3642
3643 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3644
3645 Accept --report-file=FILE to override the default `.output' filename.
3646 * NEWS (2.3a+): Mention.
3647 * doc/bison.texinfo (Bison Options): Add an entry.
3648 * src/files.c (compute_output_file_names): Don't override
3649 spec_verbose_file if already set.
3650 * src/getargs.c (usage): Document --report-file.
3651 (REPORT_FILE_OPTION): New anonymous enum member.
3652 (long_options): Add entry for it.
3653 (getargs): Add case for it setting spec_verbose_file.
3654
3655 * build-aux/cross-options.pl: Don't record a short option just because
3656 there's an arg.
3657 * doc/.cvsignore: Add yacc.1.
3658
3659 2007-11-14 Akim Demaille <akim@epita.fr>
3660
3661 * doc/yacc.1.in: New.
3662 * configure.ac, doc/Makefile.am: Adjust.
3663 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3664 config.h symbol.
3665 Use AC_SUBST for assignments too.
3666 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3667
3668 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3669
3670 * src/gram.c: Remove comments that duplicate comments in gram.h.
3671
3672 When reporting useless rules and nonterminals, say "useless in grammar"
3673 instead of "useless", and say "useless in parser" instead of "never
3674 reduced". Discussed starting at
3675 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3676 * NEWS (2.3a+): Mention this change.
3677 * data/xslt/xml2text.xsl: Update output text and expected input XML
3678 element names to match changes below.
3679 * data/xslt/xml2xhtml.xsl: Likewise.
3680 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3681 Contents: "Rules useless in parser due to conflicts".
3682 * doc/bison.texinfo (Decl Summary): Reword a little.
3683 (Understanding): Update example output for changes below.
3684 * src/gram.c: (rule_useful_p): Rename to...
3685 (rule_useful_in_grammar_p): ... this.
3686 (rule_useless_p): Rename to...
3687 (rule_useless_in_grammar_p): ... this.
3688 (rule_never_reduced_p): Rename to...
3689 (rule_useless_in_parser_p): ... this.
3690 (grammar_rules_print): Update for renames.
3691 (grammar_rules_print_xml): Update for renames.
3692 (grammar_rules_never_reduced_report): Rename to...
3693 (grammar_rules_useless_report): ... this since it is used for either
3694 kind of useless rule.
3695 * src/gram.h: Reword comments and update function names in prototypes.
3696 * src/main.c (main): Say "rule useless in parser due to conflicts".
3697 * src/print-xml.c (print_rules_never_reduced): Rename to...
3698 (print_rules_useless_in_parser): ... this, and rename output XML
3699 element "rules-never-reduced" to "rules-useless-in-parser".
3700 (print_xml): Update for rename.
3701 * src/print.c (print_results): Say "Rules useless in parser due to
3702 conflicts".
3703 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3704 (nonterminals_reduce): Say "nonterminal useless in grammar".
3705 (reduce_output): Say "Nonterminals useless in grammar".
3706 Say "Rules useless in grammar".
3707 (reduce_xml): Rename output XML element "useless" to
3708 "useless-in-grammar".
3709 (reduce_print): Don't report the count of grammatically useless rules
3710 as "rules never reduced" just because %yacc is specified.
3711 In the correct report of this count, say nonterminal(s) and rule(s)
3712 "useless in grammar".
3713 * tests/conflicts.at (S/R in initial): Update expected output.
3714 (Defaulted Conflicted Reduction): Likewise.
3715 (Unreachable States After Conflict Resolution): Likewise.
3716 * tests/existing.at (GNU pic Grammar): Likewise.
3717 * tests/reduce.at (Useless Nonterminals): Likewise.
3718 (Useless Rules): Likewise.
3719 (Reduced Automaton): Likewise.
3720 (Underivable Rules): Likewise.
3721 (Empty Language): Likewise.
3722
3723 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3724
3725 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3726 here document and before the EOF so that BSD's implementation of Bourne
3727 shell doesn't parse the delimiter as part of the here document.
3728 * doc/.cvsignore: Add cross-options.texi.
3729 * src/getargs.c (usage): Add a blank line after the warning categories.
3730
3731 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
3732
3733 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3734
3735 2007-11-05 Akim Demaille <akim@epita.fr>
3736
3737 Remove Id: from bison.1.
3738 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3739 (perl -0777 -pi -e 's/\.PP\nId): New.
3740 (.x.1): Use it to ignore the version control revision.
3741
3742 2007-11-05 Akim Demaille <demaille@gostai.com>
3743
3744 * build-aux/Makefile.am: Ship cross-options.pl.
3745 * doc/Makefile.am: Always refer to cross-options.texi with
3746 $(srcdir).
3747 (MAINTAINERCLEANFILES): Add it.
3748
3749 2007-11-04 Akim Demaille <demaille@gostai.com>
3750
3751 Generate the long/short option cross-table.
3752 * build-aux/cross-options.pl: New.
3753 * doc/Makefile.am (cross-options.texi): New.
3754 * doc/bison.texinfo: Use it.
3755
3756 2007-11-04 Akim Demaille <demaille@gostai.com>
3757
3758 Generate bison.1 using help2man.
3759 * doc/common.x, doc/bison.x: New.
3760 * doc/Makefile.am (bison.1, .x.1): New.
3761 The code is taken from autoconf-2.61/man/Makefile.am.
3762 * configure.ac: Look for help2man.
3763
3764 2007-11-04 Akim Demaille <demaille@gostai.com>
3765
3766 Complete --help.
3767 * src/getargs.c (usage): Document -W, make it clear that -d,
3768 -g and -x have optional arguments.
3769
3770 2007-11-04 Akim Demaille <demaille@gostai.com>
3771
3772 Find sha1sum when named gsha1sum.
3773 * bootstrap (find_tool): New.
3774 ($SHA1SUM): New.
3775
3776 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3777
3778 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3779 at
3780 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3781 * NEWS (2.3a+): Mention.
3782 * data/bison.m4 (b4_pure_if): Don't define it here.
3783 * data/c.m4 (b4_identification): Depend on individual skeletons to
3784 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3785 values of the %define variables api.pure or api.push_pull. Define
3786 YYPURE, YYPUSH, and YYPULL accordingly.
3787 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3788 glr.cc has already defined b4_pure_flag.
3789 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3790 Remove YYPUSH and YYPULL since they're back in b4_identification again.
3791 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
3792 * doc/bison.texinfo (Pure Decl): Update.
3793 (Push Decl): Update.
3794 (Decl Summary): Add api.pure to %define entry.
3795 In %pure-parser entry, say it's deprecated and reference %define.
3796 (Pure Calling): Update.
3797 (Error Reporting): Update.
3798 (C++ Scanner Interface): Update.
3799 (How Can I Reset the Parser): Update.
3800 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3801 reference %define.
3802 * src/getargs.c (pure_parser): Remove global variable.
3803 * src/getargs.h (pure_parser): Remove extern.
3804 * src/output.c (prepare): Don't define pure_flag muscle.
3805 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3806 wrapper around `%define api.pure'.
3807 * tests/calc.at (Simple LALR Calculator): Update.
3808 (Simple GLR Calculator): Update.
3809 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3810 Update.
3811 (GLR: Resolve ambiguity, pure, locations): Update.
3812 (GLR: Merge conflicting parses, pure, no locations): Update.
3813 (GLR: Merge conflicting parses, pure, locations): Update.
3814 * tests/glr-regression.at (Uninitialized location when reporting
3815 ambiguity): Update
3816 * tests/input.at (Unused %define api.pure): New test case.
3817 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3818 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3819 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3820
3821 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3822
3823 %define push_pull -> %define api.push_pull. Discussed starting at
3824 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3825 * data/push.c: Expect the new name.
3826 * data/yacc.c: Likewise.
3827 * doc/bison.texinfo (Push Decl): Update.
3828 (Decl Summary): Update %define entry.
3829 (Push Parser Function): Update.
3830 (Pull Parser Function): Update.
3831 (Parser Create Function): Update.
3832 (Parser Delete Function): Update.
3833 * tests/calc.at (Simple LALR Calculator): Update.
3834 * tests/input.at (%define enum variables): Update.
3835 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3836 (Push Parsing: Multiple impure instances): Update.
3837 (Push Parsing: Unsupported Skeletons): Update.
3838 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3839 (Exploding the Stack Size with Malloc): Update.
3840
3841 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3842 other entries some.
3843
3844 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3845
3846 For the XML output's terminal element, rename @number to @token-number,
3847 and add @symbol-number. In the nonterminal element, rename @number to
3848 @symbol-number. Discussed starting at
3849 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3850 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3851 renames.
3852 (xsl:template match="nonterminal"): Likewise.
3853 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3854 (xsl:template match="nonterminal"): Likewise.
3855 * src/print-xml.c (print_grammar): Implement.
3856
3857 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3858
3859 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3860 2007-10-11 change, the child elements here are items not rules.
3861 (xsl:template match="item"): New.
3862 (xsl:template match="rule"): Update for new reduced itemset.
3863 (xsl:template match="point"): Remove.
3864 (xsl:template match="empty"): For consistency with --graph, don't
3865 output "/* empty */".
3866 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3867 line-wrap, don't pass a negative value as first-line-length since this
3868 won't work with the following changes.
3869 (xsl:template name="line-wrap"): Simplify slightly.
3870 (xsl:template name="ws-search"): Eliminate recursion.
3871 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3872 set next to an item whose dot is not at the end of the RHS even if it
3873 happens to be associated with the same rule.
3874
3875 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3876
3877 Add %define lr.keep_unreachable_states.
3878 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3879 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3880 * src/main.c (main): Implement it.
3881 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3882 Extend to test it, and fix a typo.
3883
3884 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3885
3886 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
3887 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3888 the example .output text.
3889 * tests/regression.at (Extra lookahead sets in report): Improve wording
3890 of comments.
3891
3892 2007-10-17 Wojciech Polak <polak@gnu.org>
3893
3894 * src/print-xml.c (print_grammar): Renamed
3895 <terminal> and <nonterminal> attributes:
3896 "type" to "number" and "symbol" to "name".
3897 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3898 Use new attribute names.
3899 (xsl:template match="nonterminal"): Likewise.
3900 * data/xslt/xml2xhtml.xsl: Likewise.
3901
3902 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3903
3904 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3905 (Option Cross Key): Likewise.
3906
3907 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3908 next to an item whose dot is not at the end of the RHS even if it
3909 happens to be associated with the same rule.
3910 * src/print.c (print_core): Likewise.
3911 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3912 (Resolved SR Conflicts): Update output.
3913 * tests/regression.at (Extra lookahead sets in report): New test case.
3914
3915 2007-10-11 Wojciech Polak <polak@gnu.org>
3916
3917 * src/print-xml.c (print_core): Remove item set
3918 redundancy.
3919 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3920 Improve processing time. Suggested by Joel E. Denny.
3921 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3922 Write xsl:param "required" attribute as comment.
3923 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3924 (xsl:template match="rule"): Support new reduced itemset.
3925 (xsl:template match="point"): Remove.
3926 * data/xslt/xml2xhtml.xsl: Likewise.
3927
3928 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3929
3930 * src/getargs.c (version): Update copyright year.
3931
3932 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3933
3934 Make xml2dot.xsl and --graph produce the same output.
3935 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
3936 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3937 escaped later.
3938 (xsl:template name="output-node"): Use the new escape template instead
3939 of the string-replace template directly.
3940 (xsl:template name="output-edge"): Likewise.
3941 (xsl:template name="escape"): New, escapes backslashes and newlines in
3942 addition to quotation marks.
3943 * src/graphviz.c (start_graph, output_node, output_edge): Add
3944 whitespace to output for legibility.
3945
3946 Make xml2text.xsl and --report produce the same output, and remove the
3947 XML "conflicts" element since a conflict summary is easily extracted
3948 from the automaton.
3949 * data/xslt/bison.xsl: New.
3950 (xsl:template match="state" mode="bison:count-conflicts): New.
3951 * data/xslt/xml2text.xsl: Import bison.xsl.
3952 (xsl:template match="bison-xml-report"): Instead of styling the
3953 "conflicts" element, style the "automaton" element with mode
3954 "conflicts". Unlike the former, the latter lists S/R and R/R
3955 conflicts for a state on the same line.
3956 (xsl:template match="conflicts"): Remove.
3957 (xsl:template match="conflict"): Remove.
3958 (xsl:template match="terminal"): Line-wrap the list of rules in which
3959 the terminal is used.
3960 (xsl:template match="nonterminal"): Likewise for nonterminals.
3961 (xsl:template match="automaton" mode="conflicts"): New.
3962 (xsl:template match="state" mode="conflicts"): New.
3963 (xsl:template name="line-wrap"): New.
3964 (xsl:template name="ws-search"): New.
3965 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3966 (xsl:template match="bison-xml-report"): Instead of styling the
3967 "conflicts" element, style the "automaton" element with mode
3968 "conflicts."
3969 (xsl:template match="conflicts"): Remove.
3970 (xsl:template match="conflict"): Remove.
3971 (xsl:template match="automaton" mode="conflicts"): New.
3972 (xsl:template match="state" mode="conflicts): New.
3973 * src/conflicts.c (conflicts_output_xml): Remove.
3974 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3975 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3976 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3977 the corresponding XSLT is easier. Also, never wrap between a word and
3978 the comma that follows it.
3979
3980 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3981
3982 Improve C++ namespace support. Discussed starting at
3983 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3984 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3985 b4_namespace_close): New macros that interpret the %define variable
3986 "namespace" so its value can contain "::" to indicate nested
3987 namespaces.
3988 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3989 the above macros.
3990 * data/lalr1.cc (b4_namespace): Likewise.
3991 * data/location.cc (b4_namespace): Likewise.
3992 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3993 inside a new table in the general %define entry. Document `%define
3994 namespace' there as well. Point the %name-prefix entry to it since it
3995 explains it more completely in the case of C++.
3996 (C++ Bison Interface): Mention `%define namespace' instead of
3997 %name-prefix.
3998 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3999 entry suffices.
4000 * tests/c++.at (Relative namespace references): New test case.
4001 (Absolute namespace references): New test case.
4002 (Syntactically invalid namespace references): New test case.
4003 * tests/input.at (C++ namespace reference errors): New test case.
4004
4005 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4006
4007 Add syncline support and location accessor to internal %define
4008 interfaces.
4009 * data/bison.m4 (b4_percent_define_get_loc): New.
4010 (b4_percent_define_get_syncline): New.
4011 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4012 (b4_percent_define_default): Record defining location as line 1 rather
4013 than 0 for the sake of synchronizing #line's, and define
4014 b4_percent_define_syncline(VARIABLE).
4015 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4016 * src/muscle_tab.c (muscle_syncline_grow): New.
4017 (muscle_code_grow): Use muscle_syncline_grow.
4018 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4019 define b4_percent_define_syncline(VARIABLE).
4020 (muscle_percent_define_get_loc): New.
4021 (muscle_percent_define_get_syncline): New.
4022 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4023 remove some unused variables.
4024 (muscle_percent_define_default): Record defining location as line 1
4025 rather than 0 for the sake of synchronizing #line's, and define
4026 b4_percent_define_syncline(VARIABLE).
4027 (muscle_percent_define_check_values): Use
4028 muscle_percent_define_get_loc.
4029 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4030 (muscle_percent_define_get_syncline): Prototype.
4031 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4032 defaults): Update output for location change.
4033 (Complaining during macro argument expansion): Extend to test
4034 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4035
4036 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4037
4038 Fix some error-reporting macro bugs.
4039 * data/bison.m4 (b4_cat): New.
4040 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4041 to stdout so they don't become arguments to other macros. Update
4042 comments and add examples.
4043 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4044 add examples.
4045 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4046 after printing the error directive so that M4 doesn't report subsequent
4047 problems that are induced by this problem.
4048 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4049 instead of just in them. Recognize @\n in both places. Both expand to
4050 the empty string. Needed by b4_cat.
4051 * tests/skeletons.at (Complaining during macro argument expansion):
4052 New test case.
4053 (Fatal errors make M4 exit immediately): New test case.
4054
4055 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4056
4057 Implement --print-datadir.
4058 * src/getargs.c (usage): Mention.
4059 (PRINT_DATADIR_OPTION): New anonymous enum member.
4060 (long_options): Add entry for it.
4061 (getargs): Add case for it calling compute_pkgdatadir.
4062 * src/output.c (output_skeleton): Encapsulate data directory
4063 computation from here...
4064 (prepare): ... and from here...
4065 (compute_pkgdatadir): ... into this new function.
4066 * src/output.h (compute_pkgdatadir): Prototype.
4067
4068 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4069
4070 * src/print-xml.c (escape_bufs): New static global variable
4071 replacing...
4072 (xml_escape_n): ... the static local variable buf here.
4073 (print_xml): Free memory for escape_bufs.
4074 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4075
4076 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4077
4078 Replace `%push-parser' and `%push-pull-parser' with
4079 `%define push_pull "push"' and `%define push_pull "both"'.
4080 `%define push_pull "pull"' is the default.
4081 * doc/bison.texinfo (Push Decl, Push Parser Function,
4082 Pull Parser Function, Parser Create Function, Parser Delete Function):
4083 Update declarations.
4084 (Decl Summary, Table of Symbols): Replace %push-parser and
4085 %push-pull-parser entries with a %define push_pull entry.
4086 * data/bison.m4 (b4_percent_define_check_values): New macro.
4087 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4088 definitions...
4089 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4090 definitions...
4091 * data/push.c: ... to here and compute them from the value of the
4092 %define variable push_pull.
4093 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4094 parsing requests here...
4095 * data/yacc.c: ... hack this to switch to push.c any time
4096 b4_use_push_pull_flag or the %define variable push_pull is set. This
4097 will go away when we mv push.c yacc.c.
4098 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4099 push parsing is not supported since unused %define variables are
4100 reported anyway.
4101 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4102 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4103 comments for consistency with b4_percent_define_check_values.
4104 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4105 muscles.
4106 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4107 Remove.
4108 (prologue_declaration): Remove %push-parser and %push-pull-parser
4109 rules.
4110 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4111 * tests/calc.at: Update declarations.
4112 * tests/input.at (%define enum variables): New test case.
4113 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4114 declaration.
4115 (Push Parsing: Multiple impure instances): Update declaration.
4116 (Push Parsing: Unsupported Skeletons): New test case.
4117 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4118 declaration.
4119 (Exploding the Stack Size with Malloc): Update declaration.
4120
4121 2007-09-24 Wojciech Polak <polak@gnu.org>
4122
4123 Add XSLT transformations.
4124
4125 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4126 * data/xslt/xml2text.xsl: Transform XML into plain text.
4127 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4128 * data/Makefile.am (xsltdir): New variable.
4129 (dist_xslt_DATA): Add xslt/*.xsl files.
4130
4131 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4132
4133 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4134 Problem reported by Wojciech Polak.
4135 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4136 (xml_printf): Undo change I made on 21 September; that is,
4137 indent 2 spaces, not 1.
4138
4139 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4140
4141 Pacify ./configure --enable-gcc-warnings.
4142 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4143 `char const *' instead of `char *'.
4144 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4145 local variable `sep'.
4146
4147 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4148
4149 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4150 elsewhere.
4151 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4152 (xml_printf): Indent just 1 space for level.
4153 (e_char, xlate_char): Remove.
4154 (xml_escape_string): Rewrite to avoid undefined behavior (used
4155 storage that was freed from the stack).
4156 (xml_escape_n): Don't bother checking for subscript error.
4157
4158 2007-09-21 Wojciech Polak <polak@gnu.org>
4159
4160 Add Bison XML Automaton Report.
4161
4162 Add support for an -x option to generate an XML report.
4163 It is not documented yet.
4164 * src/print-xml.c: New file.
4165 * src/print-xml.h: Likewise.
4166 * lib/timevar.def (TV_XML): New var.
4167 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4168 * src/conflicts.c: Include print-xml.h.
4169 (solved_conflicts_xml_obstack): New var.
4170 (log_resolution, conflicts_solve, conflicts_free):
4171 Add support for XML report.
4172 (conflicts_output_val): New function.
4173 * src/conflicts.h (conflicts_output_val): New decl.
4174 * src/files.c (spec_xml_file): New var.
4175 (compute_output_file_names, output_file_names_free): Add XML support.
4176 * src/files.h (spec_xml_file): New decl.
4177 * src/getargs.c (xml_flag): New var.
4178 (usage, short_options, long_options, getargs): Add XML support.
4179 * src/getargs.h (xml_flag): New decl.
4180 * src/gram.c: Include print-xml.h.
4181 (rule_lhs_print_xml, rule_rhs_print_xml):
4182 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4183 New functions.
4184 * src/gram.h: Declare external ones.
4185 * src/main.c: Include print-xml.h.
4186 (main): Add XML support.
4187 * src/reduce.c: Include print-xml.h.
4188 (reduce_xml): New function.
4189 * src/reduce.h: Declare it.
4190 * src/state.c: Include print-xml.h.
4191 (state_new): Add XML support.
4192 (state_rule_lookahead_tokens_print_xml): New function.
4193 * src/state.h: Declare it.
4194 (struct state): New member solved_conflicts_xml.
4195 * src/symtab.c (symbol_class_get_string): New function.
4196 * src/symtab.h: Declare it.
4197
4198 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4199
4200 * GNUmakefile: Switch to coreutils's version.
4201 * bootstrap: Likewise.
4202 * Makefile.cfg: Adjust to new GNUmakefile.
4203 * README-hacking: Likewise.
4204
4205 Import from gnulib:
4206
4207 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4208 Bruno Haible <bruno@clisp.org>
4209
4210 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4211 and is a script that invokes bison. Tighten the code. Add comments.
4212
4213 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4214
4215 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4216 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4217 * doc/bison.texinfo (Decl Summary): Fix.
4218 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4219 * tests/input.at (Boolean %define variables): Update output.
4220 * tests/skeletons.at (%define boolean variables: invalid skeleton
4221 defaults): Rename to...
4222 (%define Boolean variables: invalid skeleton defaults): ... this and
4223 update output.
4224
4225 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4226
4227 In impure push mode, don't allow more than one yypstate to be allocated
4228 since multiple impure parsers would corrupt yynerrs.
4229 * data/push.c (yypstate_allocated): New static global variable
4230 initialized to 0.
4231 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4232 exhaustion if yypstate_allocated is 1, but still return 2.
4233 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4234 already 1. Otherwise, set it to 1.
4235 (yypstate_delete): Set it to 0.
4236 * tests/push.at (Push Parsing: Multiple impure instances): New test
4237 case.
4238
4239 2007-08-17 Bob Rossi <bob@brasko.net>
4240
4241 * doc/bison.texinfo (Push Decl): Document the push parser.
4242 (Table of Symbols): Ditto.
4243 (Pure Decl): Ditto.
4244 (Decl Summary): Ditto.
4245 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4246 Parser Create Function, Parser Delete Function):
4247 Add new push parser symbols.
4248 (Table of Symbols): Document push-parser, push-pull-parser,
4249 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4250
4251 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4252
4253 Update to GPLv3.
4254 * doc/gpl-3.0.texi: New file.
4255 * doc/gpl.texi: Remove.
4256 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4257 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4258 * README-hacking, TODO, bootstrap, bootstrap.conf:
4259 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4260 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4261 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4262 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4263 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4264 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4265 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4266 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4267 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4268 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4269 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4270 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4271 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4272 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4273 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4274 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4275 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4276 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4277 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4278 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4279 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4280 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4281 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4282 * src/complain.c, src/complain.h, src/conflicts.c:
4283 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4284 * src/files.h, src/flex-scanner.h, src/getargs.c:
4285 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4286 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4287 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4288 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4289 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4290 * src/print.c, src/print.h, src/print_graph.c:
4291 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4292 * src/reduce.h, src/relation.c, src/relation.h:
4293 * src/revision.h, src/scan-code.h, src/scan-code.l:
4294 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4295 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4296 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4297 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4298 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4299 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4300 * tests/existing.at, tests/glr-regression.at:
4301 * tests/headers.at, tests/input.at, tests/java.at:
4302 * tests/local.at, tests/output.at, tests/push.at:
4303 * tests/reduce.at, tests/regression.at, tests/sets.at:
4304 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4305 * tests/torture.at:
4306 Update to GPLv3.
4307
4308 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4309
4310 Get rid of broken %no-parser, -n, and --no-parser implementation and
4311 documentation.
4312 * TODO: Don't mention them.
4313 * doc/bison.1: Likewise.
4314 * doc/bison.texinfo (Decl Summary): Likewise.
4315 (Bison Options): Likewise.
4316 (Option Cross Key): Likewise.
4317 * src/getargs.c (no_parser_flag): Remove global variable.
4318 (usage): Don't print description of -n and --no-parser.
4319 (long_options): Remove --no-parser entry here.
4320 (getargs): Remove -n case in the switch here.
4321 * src/getargs.h (no_parser_flag): Remove extern.
4322 * tests/regression.at (Web2c Actions): Remove comment that mentions
4323 --no-parser.
4324
4325 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4326
4327 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4328 name user variables starting with `yy'. Just pass NULL instead of a
4329 dummy local &yylval to yypush_parse.
4330 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4331 starting with `yy'.
4332
4333 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4334
4335 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4336 true since it's then always used regardless of whether yyoverflow is
4337 defined. Reported by Christian Burger at
4338 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4339 * THANKS: Add Christian Burger.
4340
4341 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4342 node names: say "Decl Summary" not "Bison Declaration Summary".
4343
4344 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4345
4346 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4347 determine whether this function has already complained about an invalid
4348 value for a %define boolean variable, don't check whether Bison has
4349 ever examined the value. As written, the check was a tautology.
4350 Instead, record and check for this complaint using a separate muscle.
4351
4352 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4353
4354 Fix push parsing memory leak reported by Brandon Lucia at
4355 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4356 * THANKS: Add Brandon Lucia.
4357 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4358 but the parse never completed and thus freed it.
4359 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4360 * tests/testsuite.at: Include push.at.
4361 * test/push.at: New.
4362 (Push Parsing: Memory Leak for Early Deletion): New test case.
4363
4364 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4365
4366 Improve handling of multiple S/R conflicts in the same state and of S/R
4367 conflicts involving multiple reductions.
4368 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4369 set for a state here or Bison will abort if it is reassigned on a
4370 later conflicted reduction in the same state.
4371 Similarly, don't finalize and assign the solved conflicts report here
4372 or it will be lost if it is reassigned on a later conflicted reduction
4373 in the same state.
4374 (set_conflicts): Instead, assign them both here after all S/R conflicts
4375 in the state have been fully examined.
4376 * src/print.c (shift_set): Rename to...
4377 (no_reduce_set): ... this.
4378 (print_reductions): Update for rename, and add %nonassoc error action
4379 tokens to no_reduce_set so that, when printing the first remaining
4380 reduction on an error action token, the reduction is enclosed in
4381 brackets.
4382 (print_results): Update for rename.
4383 * tests/conflicts.at (Solved conflicts report for multiple reductions
4384 in a state): New test case.
4385 (%nonassoc error actions for multiple reductions in a state): New test
4386 case.
4387
4388 * src/main.c (main): Don't depend on C99 features.
4389
4390 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4391
4392 * build-aux/.cvsignore: Add compile.
4393 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4394 uniwidth.
4395
4396 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4397
4398 * bootstrap (slurp): Create target directories that don't exist.
4399 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4400
4401 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4402
4403 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4404 than item number.
4405 * closure.c (closure): Likewise.
4406 * state.h (reductions): Comment sorting of rules.
4407 (state): Comment sorting of items.
4408
4409 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4410
4411 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4412 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4413 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4414 definition in order to avoid Gnulib headers since we don't use config.h
4415 here.
4416 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4417 rather than AT_DATA so that config.h is included.
4418
4419 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4420
4421 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4422 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4423 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4424 and so that YYFPRINTF is guaranteed to be defined here.
4425
4426 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4427
4428 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4429 with...
4430 (muscle_percent_define_check_values): ... this more helpful function.
4431 Again, it's not used yet, but it will be.
4432 * src/muscle_tab.h: Likewise.
4433
4434 Improve some comments in parser table construction.
4435 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4436 (generate_states): Don't mention ruleset, which is internal to closure.
4437 * src/closure.c (closure): Explain sorting of core and itemset, which
4438 is required for this function to behave correctly.
4439 * src/closure.h (closure): Mention sorting.
4440
4441 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4442
4443 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4444 move the check for disabled transitions to an aver since conflict
4445 resolution hasn't happened yet.
4446
4447 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4448 labels a state as inconsistent just because it has error transitions.
4449 The original form of this check appeared in revision 1.1 of lalr.c,
4450 which was committed on 1991-12-21. Now (at least), changing the
4451 consistency label on such a state appears to have no useful effect in
4452 any of the places it is examined, which I enumerate below. The key
4453 point to understanding each item in this enumeration is that a state
4454 with an error transition is labelled consistent in the first place only
4455 if it has no rules, so the check cannot matter for states that have
4456 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4457 to try to identify its conflicts, and a state must have *rules* to have
4458 conflicts. (2) Labelling a state as inconsistent will affect how
4459 action_row sets the default *rule* for the state. (3) Labelling a
4460 state as inconsistent will cause build_relations to add lookback edges
4461 to *rules* in that state.
4462 * src/state.h (struct state): Word the comment for member consistent
4463 more carefully.
4464
4465 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4466
4467 Don't depend on C99 features.
4468 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4469 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4470 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4471 * src/state.c (state_mark_reachable_states): Fix for-loop.
4472 (state_remove_unreachable_states): Fix for-loop.
4473
4474 Don't widen struct state with member reachable just to temporarily
4475 record reachability. Instead, use a local bitset.
4476 * src/state.h (struct state): Remove member.
4477 * src/state.c (state_new): Don't initialize it.
4478 (state_mark_reachable_states): Rename to...
4479 (state_record_reachable_states): ... this, and use bitset.
4480 (state_remove_unreachable_states): Use bitset.
4481
4482 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4483
4484 * src/Makefile.am (yacc): Quote target action commands properly so
4485 that the yacc script isn't corrupt. Reported by Hans Aberg at
4486 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4487
4488 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4489 the case of pure parsers. Reported by Frans Englich at
4490 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4491 * THANKS: Add Frans Englich.
4492
4493 * NEWS (2.3a+): In the %code entry, reference section `Bison
4494 Declaration Summary' from the manual now since the %code summary has
4495 moved there.
4496 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4497 in the rules section must be terminated by semicolons.
4498
4499 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4500
4501 Extend the front-end API for %define variables to more completely
4502 mirror the back-end. This will be useful in the future.
4503 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4504 Update comments to mention the new front-end counterparts of these
4505 macros.
4506 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4507 for muscle_string_decode and muscle_location_decode.
4508 (muscle_string_decode): New static function.
4509 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4510 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4511 functions.
4512 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4513 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4514 implementation more closely.
4515 (muscle_percent_define_invalid_value): New function.
4516 * src/muscle_tab.h (muscle_percent_define_get,
4517 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4518 Prototype.
4519
4520 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4521
4522 * NEWS (2.3a+): Mention yesterday's state-removal change.
4523 (2.3a): Remove the %language entry, which was added after 2.3a.
4524 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4525 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4526 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4527 tests/existing.at: Update copyright date.
4528
4529 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4530
4531 If conflict resolution makes states unreachable, remove those states,
4532 report rules that are then unused, and don't report conflicts in those
4533 states.
4534 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4535 New global function.
4536 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4537 function.
4538 * src/main.c (main): After conflict resolution, remove the unreachable
4539 states and update all data structures that reference states by number.
4540 * src/state.c (state_new): Initialize each state's reachable member to
4541 false.
4542 (state_mark_reachable_states): New static function.
4543 (state_remove_unreachable_states): New global function.
4544 * src/state.h (struct state): Add member bool reachable.
4545 (state_remove_unreachable_states): Prototype.
4546 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4547 New test case.
4548 * tests/existing.at (GNU pic Grammar): Update test case output now that
4549 an unused rule is discovered.
4550
4551 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4552
4553 Minor code cleanup in parser table construction.
4554 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4555 (new_itemsets, save_reductions): Update for rename to nitemset.
4556 * src/closure.c (nritemset): Rename to...
4557 (nitemset): ... this since the "r" appears to meaningless and isn't
4558 used in the comments.
4559 (closure): Update for rename.
4560 * src/closure.h (nritemset): Update extern to...
4561 (nitemset): ... this.
4562 * src/lalr.c (LA): Fix a typo in comments.
4563 * src/print.c (print_core): Update for rename to nitemset.
4564 * src/print_graph.c (print_graph): Likewise.
4565 * src/state.h: Fix some typos in header comments.
4566
4567 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4568
4569 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4570 still sticks to ASCII. Sorry!
4571
4572 * README-hacking: New file, taken mostly from coreutils, with changes
4573 for Bison. Contains much of the contents of:
4574 * README-cvs: Remove.
4575 * bootstrap: Sync from gnulib.
4576 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4577 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4578
4579 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4580
4581 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4582 Setzer.
4583 (Java Differences): Fix some typos.
4584 * THANKS: Add Sebastian Setzer.
4585
4586 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4587
4588 * data/java.m4 (b4_single_class_if): Remove.
4589 (b4_abstract_if): Look at "%define abstract".
4590 (b4_lexer_if): New.
4591 (b4_union_name): Rename...
4592 (b4_yystype): ... to this. Map to "%define stype".
4593 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4594 b4_maybe_throws): Fix quoting.
4595 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4596 * data/lalr1.java (Lexer interface): Always define.
4597 (Lexer interface within parser class): Remove.
4598 (YYLexer class): New, used when "%code lexer" is present.
4599 (constructor): When "%code lexer" is used, pass %lex-param
4600 to the lexer constructor.
4601 (yylex, yyparse): Remove %lex-param from method invocations
4602 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4603
4604 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4605 abstract". Rename "%define union_name" to "%define stype".
4606 Rename method names according to previous patch.
4607 (Java Scanner Interface): Describe "%code lexer" instead of
4608 "%pure-parser" and "%define single_class".
4609 (Java Differences): Mention "%code lexer".
4610
4611 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4612 Include scanner here, using macros from tests/local.at.
4613 (AT_DATA_CALC_Y): Remove final argument.
4614 (_AT_CHECK_JAVA_CALC): Likewise.
4615 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4616 of %locations and %error-verbose.
4617 (main): Test with and without %lex-param.
4618 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4619 (AT_BISON_OPTION_POPDEFS): Pop it.
4620
4621 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4622
4623 DJGPP spefic issue. Inhibit the use of disallowed characters for
4624 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4625 and concern testsuite case 46.
4626 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4627 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4628 * djgpp/config.bat: Inhibit the use of disallowed characters.
4629
4630 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4631
4632 Miscellaneous %define and %code cleanup.
4633 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4634 values are interpreted.
4635 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4636 documentation a little more.
4637 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4638 muscle_percent_define_insert, muscle_percent_code_grow): New
4639 functions/macros.
4640 * src/muscle_tab.h (muscle_percent_define_insert,
4641 muscle_percent_code_grow): Prototype.
4642 * src/parse-gram.y (prologue_declaration): Use
4643 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4644 %define and %code directives.
4645
4646 Make it easy to share %define boolean variables between the front-end
4647 and back-end. Though not used yet, this will be useful in the future.
4648 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4649 Bison uses of names rather than just skeleton uses of names.
4650 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4651 b4_percent_define_skeleton_variables(VARIABLE) to
4652 b4_percent_define_bison_variables(VARIABLE).
4653 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4654 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4655 b4_percent_code_bison_qualifiers(QUALIFIER).
4656 (b4_check_user_names_wrap): Update for renames.
4657 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4658 muscle_percent_define_default): New functions mimicking
4659 b4_percent_define_flag_if and b4_percent_define_default.
4660
4661 For %define variables, report locations for invalid values and
4662 redefinitions.
4663 * data/bison.m4 (b4_percent_define_flag_if): Read
4664 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4665 value for VARIABLE.
4666 (b4_percent_define_default): Save a special location in
4667 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4668 must later be reported as invalid.
4669 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4670 functions.
4671 (muscle_percent_define_insert): Record the location of VARIABLE in
4672 muscle percent_define_loc(VARIABLE), and use it to report the previous
4673 location for a redefinition.
4674 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4675 (muscle_percent_define_default): Update like b4_percent_define_default.
4676 (muscle_grow_user_name_list): Rename to...
4677 (muscle_user_name_list_grow): ... this for consistency and use
4678 muscle_location_grow.
4679 * src/muscle_tab.h (muscle_location_grow): Prototype.
4680 * tests/input.at (%define errors): Update expected output.
4681 * tests/skeletons.at (%define boolean variables: invalid skeleton
4682 defaults): New test case.
4683
4684 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4685
4686 * src/print.c (lookahead_set, state_default_rule): Remove.
4687 (print_reductions): Replace state_default_rule invocation with
4688 equivalent use of yydefact, which was computed in token_actions in
4689 tables.c.
4690 (print_results): Don't allocate lookahead_set.
4691
4692 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
4693
4694 * data/lalr1.java: Prefix all private members with yy.
4695
4696 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4697
4698 Use YYFPRINTF instead of fprintf where appropriate. Reported by
4699 Sebastien Fricker at
4700 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
4701 * THANKS: Add Sebastien Fricker.
4702 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4703 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4704 accept a variable number of arguments.
4705
4706 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4707
4708 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4709
4710 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4711
4712 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4713 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4714 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4715
4716 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4717
4718 Undo my 2007-02-07 change, switching back to the c-strcase module
4719 introduced in the 2007-02-03 change. Bruno Haible reported that
4720 the 2007-02-07 change would be dangerous in Turkish if we add a
4721 language whose name contains "i", since "i" is not lowercase "I"
4722 in Turkish.
4723 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4724 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4725 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4726 * m4/.cvsignore: Remove strcase.m4.
4727 * src/getargs.c: Revert 2007-02-07 change, as follows.
4728 Include c-strcase.h.
4729 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4730
4731 2007-02-11 Bruno Haible <bruno@clisp.org>
4732
4733 Enable the Java related testsuite tests when the only Java compiler
4734 found is a gcj < 4.3. Discussed at
4735 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4736 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4737
4738 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4739
4740 * data/Makefile.am: Update copyright date.
4741 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4742 yypstate_new returns NULL.
4743 (yypstate_new): Return NULL if malloc does.
4744 * src/reader.c (packgram): Move translation of rule actions from the
4745 beginning of packgram to...
4746 (check_and_convert_grammar): ... here right before packgram is invoked
4747 so it's easier to write more complete comments, and remove redundant
4748 code.
4749
4750 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4751
4752 As in semantic actions, make @$ in %initial-action, %destructor, and
4753 %printer imply %locations.
4754 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4755 scanning @$.
4756 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4757 (@$ in %initial-action implies %locations,
4758 @$ in %destructor implies %locations,
4759 @$ in %printer implies %locations): ... these new test cases.
4760
4761 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4762
4763 Undo most of the 2007-02-03 change, switching to the strcase module
4764 now that gnulib strcase has been fixed.
4765 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4766 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4767 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4768 * m4/.cvsignore: Add strcase.m4.
4769 * src/getargs.c: Revert 2007-02-03 change, as follows.
4770 Don't include c-strcase.h.
4771 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4772 strcasecmp has "unspecified behavior" outside the POSIX locale,
4773 but it works fine in practice if at least one argument is ASCII,
4774 as is the case in Bison.
4775
4776 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
4777
4778 * tests/java.at: Skip tests if only one of javac/java is present.
4779 Reported by Joel E. Denny.
4780 * tests/atlocal.in: Adjust copyright years.
4781
4782 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
4783
4784 * data/lalr1.java (Stack): Work around old verifiers that disallow
4785 access to the private fields of an inner class, from the outer class.
4786 We can make Stack's fields public because user code doesn't have access
4787 to the instance of Stack used by parse(). Reported by Paul Eggert.
4788
4789 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4790
4791 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4792 the right spot for these files?
4793 * bootstrap.conf (gnulib_modules): Add c-strcase.
4794 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4795 c-strncasecmp.c.
4796 * src/getargs.c: Include c-strcase.h.
4797 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4798 to avoid unspecified behavior.
4799
4800 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4801
4802 * doc/bison.texinfo (Decl Summary): Correct typo.
4803
4804 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
4805
4806 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4807 Complain if the value does not match empty, "true" or "false".
4808 * data/c++.m4: Adjust default definitions of %define variables.
4809 * data/java.m4: Adjust default definitions of %define variables.
4810 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4811 to above behavior.
4812 * tests/input.at (Boolean %define variables): Test new behavior.
4813
4814 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
4815
4816 * NEWS: Mention java.
4817 * TODO: Remove things that are done.
4818 * bootstrap.conf: Add javacomp-script and javaexec-script.
4819 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4820
4821 * data/Makefile.am: Add new files.
4822 * data/java-skel.m4: New.
4823 * data/java.m4: New.
4824 * data/lalr1.java: New.
4825
4826 * doc/bison.texinfo: Put "A Complete C++ Example" under
4827 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4828 under Other Languages.
4829
4830 * src/getargs.c (valid_languages): Add Java.
4831 * src/getargs.h (struct bison_language): Update size of string fields.
4832
4833 * tests/Makefile.am: Add java.at.
4834 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4835 * tests/java.at: New.
4836 * tests/testsuite.at: Include it.
4837
4838 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4839
4840 Clean up.
4841 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4842 at_directive_argv arguments so these no longer have to be global
4843 variables. Also, update the implementation for the following changes.
4844 (fail_for_at_directive_too_many_args,
4845 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4846 (at_directive_name): Remove as at_directive_argv[0] will be used for
4847 this now.
4848 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4849 for the directive name.
4850 (at_directive_argc, at_directive_argv): Make these local within
4851 skel_lex instead of global.
4852 (INITIAL): Update directive start action for above changes.
4853 (SC_AT_DIRECTIVE_ARG): Rename to...
4854 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4855 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4856 (scan_skel): Move yylex_destroy to...
4857 (skel_scanner_free): ... here.
4858 * tests/skeletons.at (installed skeleton file name): Rename to...
4859 (installed skeleton file names): ... this.
4860
4861 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4862
4863 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4864 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4865 Summary" not "Directives".
4866 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4867 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4868 since the former is now the more complete one.
4869 (Prologue Alternatives): Likewise and do the same for %defines.
4870 (Table of Symbols): Add summary of %code, add summary of %define, and
4871 move full %code documentation to...
4872 (Decl Summary): ... here for consistency with other entries in these
4873 sections.
4874 Move %define entry in order to keep this list alphabetized.
4875 Reword %define entry a little to put less emphasis on the skeleton
4876 concept, which most users shouldn't have to think about.
4877
4878 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4879
4880 Adjust to recent gnulib changes.
4881 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4882 Add string.h, string_.h, unistd_.h, wchar_.h.
4883 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4884 * src/system.h: Don't include <stpcpy.h>; this is now done by
4885 <string.h>.
4886
4887 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
4888
4889 Simplify implementation of unqualified %code, implement macros for
4890 uniform treatment of boolean %define flags. Document %define.
4891 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4892 b4_percent_code_ifdef): New.
4893 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4894 * data/c++.m4: Define default value for global_tokens_and_yystype.
4895 * data/glr.cc: Likewise.
4896 * data/location.cc: Use b4_percent_define_flag_if.
4897
4898 * doc/bison.texinfo (Decl Summary): Document %define.
4899
4900 * src/parse-gram.y (Unqualified %code): Change muscle name to
4901 b4_percent_code().
4902 (content.opt): Default to empty.
4903
4904 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4905
4906 Implement support for relative and absolute skeleton file names.
4907 Discussed starting at
4908 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4909 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4910 (Bison Options): Document in --skeleton entry.
4911 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4912 full_skeleton can't necessarily hold all of pkgdatadir.
4913 If the specified skeleton file name contains a `/', don't prepend
4914 pkgdatadir.
4915 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4916 file name contains a `/', prepend the grammar file directory.
4917 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4918 * skeletons.at: New file.
4919 (relative skeleton file names): New test case.
4920 (installed skeleton file names): New test case.
4921 * tests/testsuite.at: Include skeletons.at.
4922
4923 * bootstrap: Update copyright to 2007.
4924
4925 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
4926
4927 * bootstrap: Remove occurrences of .#bootmp from the files.
4928
4929 2007-01-17 Akim Demaille <akim@epita.fr>
4930
4931 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4932 nonterminals.
4933 Use per-type %printer.
4934
4935 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4936
4937 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4938 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4939 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4940 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4941 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4942 tests/glr-regression.at, tests/input.at, tests/local.at,
4943 tests/output.at, tests/torture.at: Update copyright to 2007.
4944
4945 2007-01-16 Akim Demaille <akim@epita.fr>
4946
4947 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4948 error code.
4949 (Calc++ Scanner): Exit with failure if we can't open the input
4950 file.
4951 Accept "-" standing for stdin.
4952 (Calc++ Top Level): Print the result only if the parsing was
4953 successful.
4954
4955 2007-01-16 Akim Demaille <akim@epita.fr>
4956
4957 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4958
4959 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
4960 and Joel E. Denny <jdenny@ces.clemson.edu>
4961
4962 Clean up %define and %code implementation in M4 some. Most
4963 importantly, rename all related macros to be in the b4_percent_define
4964 and b4_percent_code namespaces. Also, complete support for `.' in
4965 %define variable names and %code qualifiers.
4966 * data/bison.m4 (b4_check_user_names): Check for special
4967 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4968 m4_foreach loops.
4969 (b4_get_percent_define, b4_get_percent_code): Rename to...
4970 (b4_percent_define_get, b4_percent_code_get): ... these.
4971 Extend documentation with examples.
4972 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4973 b4_percent_define_skeleton_variables and
4974 b4_percent_code_skeleton_qualifiers.
4975 Expect any value for the %define variable `foo' to be stored in the
4976 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4977 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4978 expect any unqualified %code blocks to be stored in a macro named
4979 `b4_percent_code_unqualified'.
4980 Use m4_indir so that %define variable names and %code qualifiers can
4981 contain `.', which is allowed by the grammar parser.
4982 (b4_percent_define_default): New macro to set a default value for a
4983 %define variable.
4984 (m4_wrap): Update wrapped code, and fix some underquoting.
4985 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4986 Expect grammar uses of %define variables and %code qualifiers to be
4987 defined in b4_percent_define_user_variables and
4988 b4_percent_code_user_qualifiers.
4989 * data/c++.m4: Use b4_percent_define_default rather than
4990 m4_define_default. Fix some underquoting. Skeleton usage of %define
4991 variable define_location_comparison now implies skeleton usage of
4992 %define variable filename_type.
4993 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4994 data/push.c, data/yacc.c: Update macro names.
4995 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4996 muscle names.
4997
4998 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4999
5000 DJGPP specific issues.
5001
5002 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5003 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5004
5005 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5006
5007 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5008 run parsers in all tests so that Valgrind is invoked during
5009 maintainer-check-valgrind.
5010 (Duplicate representation of merged trees): Free all semantic values.
5011 (Duplicated user destructor for lookahead): Likewise.
5012
5013 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5014
5015 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5016 command-line prefix.
5017 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5018 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5019 miss Valgrind messages.
5020 (Exploding the Stack Size with Malloc): Likewise.
5021
5022 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5023
5024 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5025 locals. Reported by Juan Manuel Guerrero at
5026 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5027 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5028 Fix some indentation also.
5029 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5030 explaining this issue.
5031
5032 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
5033 and Joel E. Denny <jdenny@ces.clemson.edu>
5034
5035 Simplify union and prologue handling, and escape union and lex/parse
5036 params with digraphs.
5037 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5038 values to the empty string since these are no longer guaranteed
5039 initialized by the front-end.
5040 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5041 braces around b4_user_stype since this is no longer done by the
5042 front-end.
5043 * src/files.c, src/files.h (pre_prologue_obstack,
5044 post_prologue_obstack): Remove.
5045 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5046 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5047 with digraphs. This fixes lex params and parse params.
5048 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5049 * src/output.c (prepare): Remove muscle insertion of the prologues.
5050 (output): Remove freeing of pre_prologue_obstack and
5051 post_prologue_obstack.
5052 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5053 than prologue_augment for prologue parsing so you don't need prologue
5054 obstacks.
5055 (grammar_declaration): For %union RHS, use `braceless' instead of
5056 "{...}" so that braces are already stripped and code is escaped with
5057 digraphs.
5058 * src/reader.c (prologue_augment): Remove.
5059 (reader): Remove initialization of pre_prologue_obstack and
5060 post_prologue_obstack.
5061 * src/reader.h (prologue_augment): Remove.
5062
5063 * data/c.m4: Remove stray parenthesis.
5064
5065 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5066
5067 Remove quotes from variables names in %define directives and from
5068 qualifiers in %code directives, and restrict the characters that are
5069 allowed in them to M4-friendly ones. For %define, continue to support
5070 the quoted form as a deprecated feature. Discussed starting at
5071 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5072 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5073 %code.
5074 * doc/bison.texinfo (Prologue Alternatives): Update.
5075 (Decl Summary): In %defines entry, update mention of `%code requires'
5076 and `%code provides'.
5077 (C++ Location Values): Update %define uses.
5078 (Calc++ Parser Interface): Likewise.
5079 (Calc++ Parser): Likewise, and update `%code requires' uses.
5080 (Table of Symbols): Update %code documentation.
5081 * src/parse-gram.y (prologue_declaration): For %define variables, use
5082 `variable' instead of `STRING'.
5083 (grammar_declaration): For %code qualifiers, use `ID' instead of
5084 `STRING'.
5085 (variable): New nonterminal that takes an `ID' or a `STRING'.
5086 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5087 and %define uses.
5088 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5089 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5090 (%define errors): Update %define uses.
5091
5092 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5093
5094 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5095 instead of muscle_insert for %define values so that M4-special
5096 characters are replaced with digraphs.
5097 * tests/input.at (%define errors): Extend to check weird values.
5098
5099 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5100
5101 Instead of having skeletons declare all valid %define variables and
5102 %code qualifiers, provide macros that retrieve the associated values
5103 and build these lists automatically. Thus Bison will now warn when a
5104 variable or qualifier is not used by the skeleton in the current
5105 invocation regardless of whether it might sometimes be used by that
5106 skeleton in other invocations. Also, move all %define value macros to
5107 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5108 form, which is replaced by %code.
5109 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5110 (b4_check_user_names): ... this, and change the series of valid name
5111 arguments to a single list argument for names used in the skeleton
5112 similar to the existing list argument for names used in the grammar.
5113 Warn instead of complaining.
5114 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5115 values and %code code, to format %code code properly, and to build
5116 lists of all %define variables and %code qualifiers used in the
5117 skeleton: b4_skeleton_percent_define_variables and
5118 b4_skeleton_percent_code_qualifiers.
5119 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5120 Remove, and...
5121 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5122 the skeleton names lists can finish building first. In place of
5123 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5124 expect the lists b4_user_percent_define_variables and
5125 b4_user_percent_code_qualifiers.
5126 * data/c++.m4: Where setting default values for b4_parser_class_name,
5127 b4_location_type, b4_filename_type, b4_namespace, and
5128 b4_define_location_comparison, update their names to the
5129 b4_percent_define_ namespace.
5130 * data/glr.c: Don't use b4_check_percent_define_variables and
5131 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5132 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5133 (b4_parser_class_name, b4_namespace): Define these using
5134 b4_get_percent_define for parser_class_name and namespace.
5135 * data/location.cc: Use b4_get_percent_define.
5136 * data/push.c: Don't use b4_check_percent_define_variables and
5137 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5138 * data/yacc.c: Likewise, and don't call m4_exit in
5139 b4_use_push_for_pull_if or m4_wrap code will never execute.
5140 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5141 Rename to...
5142 (muscle_grow_user_name_list): ... this for consistency with the
5143 terminology used in bison.m4.
5144 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5145 %define variable names, and rename muscle used_percent_define_variables
5146 to user_percent_define_variables.
5147 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5148 user_percent_code_qualifiers.
5149 (content): Remove.
5150 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5151 {CODE} form is no longer accepted.
5152 * tests/input.at (Reject bad %code qualifiers): Rename to...
5153 (Reject unused %code qualifiers): ... this, and update test output.
5154 (%define error): Update test output.
5155
5156 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5157
5158 Check for unrecognized %define variables similar to checking for
5159 unrecognized %code qualifiers. Check for redefined %define variables.
5160 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5161 generalizes...
5162 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5163 (b4_check_percent_define_variables): New, also wraps it.
5164 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5165 variables using b4_check_percent_define_variables.
5166 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5167 all those exercised in the test suite and all those listed in the
5168 `Default values' section of c++.m4. Are there others?
5169 * data/push.c, data/yacc.c: Declare no valid %define variables.
5170 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5171 similar to muscle_find, but it works even when the muscle stores a
5172 const value.
5173 (muscle_grow_used_name_list): New function for constructing the used
5174 name list muscles that b4_check_for_unrecognized_names requires.
5175 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5176 %define'd more than once. Define the b4_used_percent_define_variables
5177 muscle with muscle_grow_used_name_list.
5178 (grammar_declaration): Abbreviate %code code with
5179 muscle_grow_used_name_list.
5180 * tests/input.at (%define errors): New.
5181
5182 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5183
5184 Provide warn_at, complain_at, and fatal_at function callbacks to the
5185 skeletons, and use this for %code qualifier complaints.
5186 * data/bison.m4 (b4_error_at): New, invoked by...
5187 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5188 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5189 @fatal_at(...@) directives.
5190 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5191 qualifiers in b4_used_percent_code_qualifiers and to use
5192 b4_complain_at.
5193 * src/location.c, src/location.h (boundary_set_from_string): New global
5194 function.
5195 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5196 function.
5197 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5198 to b4_used_percent_code_qualifiers.
5199 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5200 function.
5201 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5202 (lineno): Rename to...
5203 (out_lineno): ... this so I don't misunderstand it again.
5204 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5205 here; these newlines are in the input but not the output file.
5206 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5207 (at_directive_perform): ... this new static function, and add handling
5208 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5209 directives.
5210 * tests/input.at (Reject bad %code qualifiers): Update test output with
5211 locations and extend.
5212
5213 * tests/output.at (Output file name: [, Output file name: ]): Remove
5214 bogus comment about these tests failing.
5215
5216 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5217
5218 Clean up b4_check_percent_code_qualifiers a little.
5219 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5220 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5221 documentation and add examples.
5222 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5223 qualifiers here.
5224
5225 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5226
5227 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5228 unreliable -- especially when they're hidden inside another macro.
5229 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5230 data/c.m4: Remove m4_divert(-1).
5231 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5232 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5233 m4_divert_push(0) and m4_divert_pop(0).
5234 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5235 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5236 pushed and popped by m4sugar, should be first on the stack.
5237
5238 Provide warn, complain, and fatal function callbacks to the skeletons.
5239 This provides more flexibility than m4_fatal, improves the error
5240 message format, and captures messages for translation. Discussed
5241 starting at
5242 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5243 * data/bison.m4 (b4_error): New, invoked by...
5244 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5245 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5246 directives. Because these M4 macros might be called when the current
5247 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5248 the previous removal of uses of m4_divert, which caused trouble.
5249 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5250 m4_fatal to report unrecognized %code qualifiers.
5251 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5252 push parser requests.
5253 * data/glr.c: Use b4_complain instead of m4_fatal to report
5254 non-deterministic push parser requests.
5255 Update @output usage to @output(...@) form.
5256 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5257 report missing %defines. Update @output usage to @output(...@) form.
5258 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5259 @output(...@) form.
5260 * src/main.c (main): Invoke skel_scanner_free.
5261 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5262 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5263 obstack_for_string from flex-scanner.h.
5264 (YY_DECL): Use to declare skel_lex static.
5265 (decode_at_digraphs): Remove; now handled in the new
5266 SC_AT_DIRECTIVE_ARG start condition.
5267 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5268 functions.
5269 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5270 at_directive_argv): New static globals.
5271 (INITIAL): Use fail_for_invalid_at.
5272 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5273 recognize the start of a generalized `@directive(...@)' form and
5274 start...
5275 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5276 directive args (using the new obstack_for_string), to decode the
5277 contained @ diagraphs, and to perform the directive. It recognizes
5278 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5279 @output(...@).
5280 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5281 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5282 `@,'.
5283 (scan_skel): Initialize obstack_for_string on the first call.
5284 (skel_scanner_free): New function to free obstack_for_string.
5285 * tests/input.at (Reject bad %code qualifiers): Update test output.
5286
5287 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5288
5289 Consolidate the 4 prologue alternative directives (%code, %requires,
5290 %provides, and %code-top) into a single %code directive with an
5291 optional qualifier field. Discussed at
5292 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5293 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5294 alternatives.
5295 * doc/bison.texinfo (Prologue Alternatives): Update.
5296 (Decl Summary): Update to %code "requires" and %code "provides".
5297 (Calc++ Parser): Update to %code "requires".
5298 (Table of Symbols): Remove entries for %requires, %provides, and
5299 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5300 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5301 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5302 which are skeleton-specific.
5303 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5304 declare what %code qualifiers it supports and to complain if any other
5305 qualifiers were used in the grammar.
5306 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5307 and b4_user_code([b4_percent_code_provides]) in place of
5308 b4_user_requires and b4_user_provides.
5309 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5310 Add b4_user_code([b4_percent_code_top]) and
5311 b4_user_code([b4_percent_code]).
5312 Invoke b4_check_percent_code_qualifiers.
5313 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5314 PERCENT_REQUIRES): Remove.
5315 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5316 %requires. Rewrite the %code RHS as the unqualified form defining the
5317 muscle b4_percent_code. Add another RHS for the qualified %code form,
5318 which defines muscles of the form b4_percent_code_QUALIFIER and the
5319 b4_used_percent_code_qualifiers muscle.
5320 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5321 PERCENT_REQUIRES): Remove.
5322 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5323 %code "requires" and %code "provides".
5324 * tests/input.at (Reject bad %code qualifiers): New.
5325
5326 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5327
5328 Use the new code_props interface for destructors and printers.
5329 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5330 printer_location members, and change the type of the destructor and
5331 printer members to code_props.
5332 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5333 symbol_printer_get, semantic_type_destructor_set,
5334 semantic_type_printer_set, default_tagged_destructor_set,
5335 default_tagless_destructor_set, default_tagged_printer_set,
5336 default_tagless_printer_set): Use code_props in arguments and return
5337 types in place of char const * and location.
5338 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5339 since the locations are now contained in the return of
5340 symbol_destructor_get and symbol_printer_get.
5341 * src/output.c (symbol_destructors_output, symbol_printers_output):
5342 Replace with...
5343 (symbol_code_props_output): ... this to eliminate duplicate code.
5344 (output_skeleton): Update to use symbol_code_props_output.
5345 * src/reader.c (symbol_should_be_used): Update use of
5346 symbol_destructor_get.
5347 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5348 Update uses of the various _destructor_set and _printer_set functions.
5349 * src/symtab.c: (default_tagged_destructor_location,
5350 default_tagless_destructor_location, default_tagged_printer_location,
5351 default_tagless_printer_location): Remove since we...
5352 (default_tagged_destructor, default_tagless_destructor,
5353 default_tagged_printer, default_tagless_printer): ... change the type
5354 of these to code_props.
5355 (symbol_new, semantic_type_new, symbol_destructor_set,
5356 semantic_type_destructor_set, symbol_destructor_get,
5357 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5358 symbol_check_alias_consistency, default_tagged_destructor_set,
5359 default_tagless_destructor_set, default_tagged_printer_set,
5360 default_tagless_printer_set): Update.
5361 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5362 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5363 code_props members.
5364 (symbol_print): Use SYMBOL_CODE_PRINT.
5365
5366 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5367
5368 Use the new code_props interface for rule actions.
5369 * src/symlist.h (symbol_list): Replace action, action_location, and
5370 used members with a code_props action_props member.
5371 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5372 grammar_midrule_action, grammar_current_rule_merge_set,
5373 grammar_current_rule_symbol_append, packgram): Update.
5374 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5375 * src/scan-code.l (handle_action_dollar): Update.
5376 (translate_rule_action): Remove, no longer used.
5377 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5378
5379 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5380
5381 Use the new code_props interface in parse-gram.y.
5382 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5383 Update all uses of translate_* functions to use the new code_props
5384 interface and to use gram_scanner_last_string_free and
5385 code_scanner_last_string_free where possible.
5386 (grammar_declaration): symbol_list_destructor_set and
5387 symbol_list_printer_set now perform the translation, so don't do it
5388 here. Use gram_scanner_last_string_free where possible.
5389 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5390 translate_code): Remove, no longer used.
5391 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5392 symbol_list_printer_set): Perform code translation here rather than
5393 depending on the caller to do so.
5394
5395 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5396 * src/scan-gram.h (gram_last_string): Remove declaration.
5397 * src/scan-gram.l (last_string): Declare it static.
5398
5399 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5400
5401 Encapsulate code properties and related functionality for the various
5402 destructors, printers, and actions into a code_props structure and
5403 interface. This patch merely implements code_props in scan-code.h and
5404 scan-code.l. Future patches will rewrite other modules to use it.
5405 Discussed starting at
5406 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5407 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5408 consistently initialize const structs that have an empty location
5409 field.
5410 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5411 to ensure consistency.
5412 * src/scan-code.h (code_props): New structure.
5413 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5414 function, macro, and const global variable for initializing a
5415 code_props with no code.
5416 (code_props_plain_init, code_props_symbol_action_init,
5417 code_props_rule_action_init, code_props_translate_code): The rest of
5418 the new code_props functional interface. Among other things, the init
5419 functions set the code_props kind field so that
5420 code_props_translate_code will know whether to behave like
5421 translate_symbol_action, translate_rule_action, or translate_code.
5422 These old translate functions must remain until all other modules are
5423 updated to use the new code_props interface.
5424 (code_scanner_last_string_free): New function similar to
5425 gram_scanner_last_string_free.
5426 (code_scanner_free): Add documentation.
5427 * src/scan-code.l: Implement the new interface.
5428 (code_lex): Make it static, add a code_props* argument, and remove the
5429 rule argument.
5430 (last_string): New static global similar to the one in scan-gram.l.
5431 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5432 instead of rule.
5433 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5434 code_props since Bison may one day use this information for destructors
5435 and printers.
5436 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5437 (handle_action_dollar): Use symbol_list_n_get and set used flag
5438 directly since symbol_list_n_used_set is removed.
5439 (translate_action): Add a code_props* argument and remove the rule,
5440 action, and location arguments. Pass the code_props* on to code_lex.
5441 (translate_rule_action, translate_symbol_action, translate_code):
5442 Rewrite as wrappers around the new code_props interface.
5443 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5444 it would eventually need to break the encapsulation of code_props.
5445
5446 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5447
5448 * etc/.cvsignore: New.
5449
5450 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5451
5452 Add maintainer-push-check to run maintainer-check using push parsing in
5453 place of pull parsing where available.
5454 * Makefile.am (maintainer-push-check): New.
5455 * data/bison.m4 (b4_use_push_for_pull_if): New.
5456 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5457 appropriately based on their existing values.
5458 (yypush_parse): Don't print push-parser-specific diagnostics if push
5459 parsing is being used in place of pull parsing.
5460 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5461 push.c.
5462 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5463 variable, and insert b4_use_push_for_pull_flag into muscles.
5464 * tests/Makefile.am (maintainer-push-check): New.
5465
5466 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5467
5468 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5469 (whether successful or failed) so that yypush_parse can be invoked
5470 again to start a new parse using the same yypstate.
5471 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5472 check multiple yypull_parse invocations on the same yypstate. For pull
5473 mode, extend to check multiple yyparse invocations.
5474 (Exploding the Stack Size with Alloca): Extend to try with
5475 %push-pull-parser.
5476 (Exploding the Stack Size with Malloc): Likewise.
5477
5478 * tests/calc.at (Simple LALR Calculator): Don't specify
5479 %skeleton "push.c" since %push-pull-parser implies that now.
5480 * tests/headers.at (export YYLTYPE): Don't check for the push
5481 declarations. Otherwise, this test case can't be used to see if push
5482 mode can truly emulate pull mode.
5483 * tests/input.at (Torturing the Scanner): Likewise.
5484 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5485 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5486 AT_YACC_IF, which now includes the case of push mode since %skeleton
5487 need not be used for push mode. This will be more intuitive once
5488 push.c is renamed to yacc.c.
5489
5490 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5491
5492 For push mode, convert yyparse from a macro to a function, invoke yylex
5493 instead of passing a yylexp argument to yypull_parse, and don't
5494 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5495 Discussed starting at
5496 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5497 * data/bison.m4 (b4_pull_if): New.
5498 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5499 * data/push.c: Improve M4 quoting a little.
5500 (b4_generate_macro_args, b4_parenthesize): Remove.
5501 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5502 any time a pull parser is requested.
5503 Don't #define this as a wrapper around yypull_parse. Instead, when
5504 both push and pull are requested, make it a function that does that
5505 same thing.
5506 (yypull_parse): If there's a b4_prefix, #define this to
5507 b4_prefix[pull_parse] when both push and pull are requested.
5508 Don't define this as a function unless both push and pull are
5509 requested.
5510 Remove the yylexp argument and hard-code yylex invocation instead.
5511 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5512 %push-parser.
5513 * src/getargs.c (pull_parser): New global initialized to true.
5514 * getargs.h (pull_parser): extern it.
5515 * src/output.c (prepare): Insert pull_flag muscle.
5516 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5517 (prologue_declaration): Set both push_parser and pull_parser = true for
5518 %push-pull-parser. Set push_parser = true and pull_parser = false for
5519 %push-parser.
5520 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5521 %push-parser since there's no backward-compatibility concern here.
5522 Scan %push-pull-parser.
5523 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5524 instead of %push-parser.
5525 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5526 prototype it in the module that calls yyparse.
5527 * tests/input.at (Torturing the Scanner): Likewise.
5528 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5529
5530 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5531
5532 Update etc/bench.pl. Optimize push mode a little (the yyn change
5533 deserves most of the credit).
5534 * Makefile.am (SUBDIRS): Add etc subdirectory.
5535 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5536 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5537 yytoken, yyval, and yyloc declarations to...
5538 (yyparse or yypush_parse): ... here to improve performance. For
5539 yypush_parse invocations after the first, be sure to assign yyn its old
5540 value again.
5541 (yypstate_new): Don't bother initializing the yyresult field since the
5542 initial value isn't used.
5543 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5544 remove the #define that, in push mode, set it to yyps->NAME.
5545 * etc/Makefile.am: New.
5546 * etc/bench.pl: Remove and build it instead from...
5547 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5548 "tests/bison" from the build directory by default rather than just
5549 invoking "bison" from $PATH.
5550 (calc_grammar): Update push parser code: don't declare yylval globally,
5551 don't define yyparse_wrapper, and don't #define yyparse.
5552 (bench_grammar): Update to check all working combinations of yacc.c,
5553 push.c, impure, pure, pull, and push.
5554
5555 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5556
5557 For push mode, add pull wrappers around yypush_parse.
5558 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5559 (yypull_parse): New function wrapping yypush_parse.
5560 (yyparse): New #define wrapping yypull_parse.
5561 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5562 is declared.
5563 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5564 prototype yylex in the module that calls yyparse, and don't prototype
5565 yyparse there. Otherwise, the yyparse expansion won't compile.
5566 * tests/input.at (Torturing the Scanner): Likewise.
5567
5568 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5569
5570 Enable push parsers to operate in impure mode. Thus, %push-parser no
5571 longer implies %pure-parser. The point of this change is to move
5572 towards being able to test the push parser code by running the entire
5573 test suite as if %push-parser had been declared.
5574 * data/push.c (yypush_parse): For impure mode, remove the
5575 yypushed_char, yypushed_val, and yypushed_loc arguments.
5576 Instead, declare these as local variables initialized to the global
5577 yychar, yylval, and yylloc.
5578 For the first yypush_parse invocation only, restore the initial values
5579 of these global variables when it's time to read a token since they
5580 have been overwritten.
5581 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5582 %push-parser.
5583 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5584 %pure-parser along with %push-parser since this test case was designed
5585 for pure push parsers.
5586 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5587 (AT_YACC_OR_PUSH_IF): New.
5588 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5589 add a note that it's still wrong for some cases (as it has been for a
5590 while).
5591 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5592 %push-parser no longer implies %pure-parser.
5593
5594 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5595
5596 Remove some unnecessary differences between the pull parser code and
5597 the push parser code. This patch enables yynerrs in push mode.
5598 * data/push.c: Reformat M4 a little.
5599 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5600 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5601 because push mode is on. Instead, if pure mode is on, move yynerrs
5602 to...
5603 (b4_declare_parser_state_variables): ... here.
5604 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5605 to yyps->NAME so it can be used in yypush_parse.
5606 (yypush_parse): Don't omit uses of yynerrs in push mode.
5607
5608 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5609
5610 Fix bug such that the first pushed token's value and location are
5611 sometimes overwritten (sometimes by %initial-action) before being used.
5612 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5613 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5614 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5615 more closely mimic the pull parser logic.
5616 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5617 time to read a token, which is after any initialization of yylval and
5618 yylloc.
5619 (gottoken): Rename label to...
5620 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5621 user namespace.
5622
5623 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5624
5625 Rearrange initialization of the parser state variables so that the
5626 skeleton doesn't have to have a copy for pull mode and another for push
5627 mode. This patch also fixes at least a bug such that yylloc was not
5628 initialized (with b4_location_initial_line and
5629 b4_location_initial_column) upon calling yypush_parse. However, that
5630 initialization now overwrites the first token's location;
5631 %initial-action assigning @$ already did the same thing, and both bugs
5632 will be fixed in a later patch.
5633 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5634 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5635 yyss, yyvs, yyls, and yystacksize.
5636 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5637 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5638 yylsp.
5639 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5640 yyps->NAME so it can be used in yypush_parse.
5641 (yyparse or yypush_parse): For yypush_parse, don't print the
5642 "Starting parse" diagnostic for invocations after the first.
5643 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5644 yypush_parse, only do it for the first invocation.
5645 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5646 initialization to occur in yypush_parse but only on the first
5647 invocation.
5648
5649 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5650
5651 * data/push.c: Add CPP guards around push parser declarations in both
5652 the header and the code file.
5653 In the code file, move the push parser declarations to the same place
5654 they appear in the header file.
5655 Clean up the M4 some, especially the inconsistent underquoting in
5656 some b4_c_function_def and b4_c_function_decl uses.
5657
5658 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5659
5660 Encapsulate the push parser state variables into an M4 macro so the
5661 push skeleton doesn't have to list them again for pull mode's yyparse.
5662 For push mode, remove yypush_parse's local equivalents of these
5663 variables to eliminate unnecessary copying between the two sets at
5664 run-time. This patch also fixes at least a bug related to multiple
5665 %initial-action invocations in push mode.
5666 * data/push.c (b4_declare_parser_variables): Rename to...
5667 (b4_declare_scanner_communication_variables): ... this for clarity and
5668 update both uses.
5669 (b4_declare_yyparse_variables): Remove and move its contents to the one
5670 spot where it was invoked.
5671 (b4_declare_parser_state_variables): New macro containing the parser
5672 state variables required by push mode.
5673 (struct yypstate): Replace all fields but yynew with
5674 b4_declare_parser_state_variables.
5675 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5676 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5677 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5678 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5679 parser state variable declarations with
5680 b4_declare_parser_state_variables.
5681 Don't initialize parser state variables when calling yypush_parse since
5682 yypstate_new already does that.
5683 Invoke the user's initial action only upon the first yypush_parse
5684 invocation.
5685 Remove all code that copies between the local parser state variables
5686 and the yypstate.
5687
5688 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5689
5690 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5691 prevent a name collision in a future patch where these names will
5692 sometimes be #define'd.
5693 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5694 since it no longer has the same name as the existing argument.
5695 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5696
5697 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
5698 and Joel E. Denny <jdenny@ces.clemson.edu>
5699
5700 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5701 that the argument is case-insensitive, and there's no `=' here.
5702 For the %skeleton entry, mention that %language is better.
5703 (Bison Options): Likewise for --language and --skeleton. Move the
5704 --skeleton entry so that the `Tuning the parser' section is sorted
5705 alphabetically on long options.
5706 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5707 %language directive in detail here; cross-reference the %language
5708 documentation instead.
5709 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5710 `%require "2.3b"' so that the example is always up-to-date.
5711 (Table of Symbols): Add entries for %language and %skeleton.
5712 * examples/extexi (normalize): Instead of replacing every %require
5713 argument with the current Bison version, just substitute for
5714 `@value{VERSION}'. This guarantees that we're testing what actually
5715 appears in the documentation.
5716 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5717 rather than `@VERSION@'.
5718
5719 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5720
5721 * NEWS: Reword the %language news a bit, and put it earlier.
5722
5723 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5724 Rewrite to simplify the logic.
5725 (language_argmatch): Likewise.
5726 (program_name): We now own this var.
5727 * src/getargs.h (struct bison_language): Use char[] rather than
5728 const char *.
5729
5730 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5731 Java is supported.
5732 * src/complain.c (program_name): Remove decl; no longer needed.
5733 * src/main.c (program_name): Remove; now belongs to getargs.
5734
5735 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
5736
5737 * NEWS: Document %language.
5738
5739 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5740
5741 * data/c-skel.m4, data/c++-skel.m4: New files.
5742 * data/glr.c: Complain on push parsers.
5743
5744 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5745 over %skeleton.
5746 (Decl Summary): Document %language and %skeleton.
5747 (Command line): Document -L.
5748
5749 * examples/extexi: Rewrite %require directive.
5750 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5751
5752 * src/files.c (compute_exts_from_gc): Look in language structure
5753 for .y extension.
5754 (compute_file_name_parts): Check whether .tab should be added.
5755 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5756 (language, skeleton_arg, language_argmatch): New.
5757 (long_options): Add --language.
5758 (getargs): Use skeleton_arg, add -L/--language.
5759 * src/getargs.h: Include location.h.
5760 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5761 * src/output.c (prepare): Pick default skeleton from struct language.
5762 Don't dispatch C skeletons here.
5763 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5764 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5765 * src/scan-gram.l ("%language"): New rule.
5766
5767 * tests/calc.at: Test %skeleton and %language.
5768 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5769 (AT_GLR_IF): Look for %skeleton "glr.cc".
5770 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5771 (AT_YACC_IF): Reject %language.
5772
5773 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5774
5775 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5776 since it wasn't used; only the typedef name 'semantic_type' is needed.
5777 Also, omit trailing white space.
5778
5779 * bootstrap: Sync from coreutils.
5780 (gnulib_extra_files): Add build-aux/announce.gen.
5781 (slurp): Adjust .gitignore files like .cvsignore files.
5782 * build-aux/announce-gen: Remove from CVS, since bootstrap
5783 now creates this.
5784
5785 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5786
5787 Make %push-parser imply %pure-parser. This fixes several bugs; see
5788 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5789 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5790 pure_parser = true.
5791 * data/push.c: Don't bother testing b4_push_if when deciding whether
5792 to expand b4_declare_parser_variables globally.
5793 (yypush_parse): Likewise in here.
5794
5795 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5796 (yy_reduce_print): Reformat M4 for readability.
5797
5798 2006-12-15 Bob Rossi <bob@brasko.net>
5799 and Joel Denny <jdenny@ces.clemson.edu>
5800
5801 * data/push.c (yypstate): Add typedef, and update all uses of
5802 struct yypstate to just yypstate.
5803 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5804
5805 2006-12-14 Bob Rossi <bob@brasko.net>
5806
5807 * data/push.c (yypush_parse): Declare prototype regardless of
5808 %locations option.
5809
5810 2006-12-14 Bob Rossi <bob@brasko.net>
5811
5812 * data/push.c (yyparse): Remove the prototype and the #define when in
5813 push-parser mode.
5814
5815 2006-12-13 Bob Rossi <bob@brasko.net>
5816
5817 * data/push.c (yypstate_init): Rename to...
5818 (yypstate_new): ... this and use b4_c_function_def.
5819 (yypstate_delete): New.
5820 (yypush_parse): Change parameters yynval and yynlloc to be const.
5821 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5822 yypstate_delete functions.
5823
5824 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5825
5826 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5827 strange test case titles. Reported by Bob Rossi.
5828
5829 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5830
5831 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5832 of potential ambiguities in GLR grammers.
5833
5834 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5835
5836 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5837 `bison ', use m4_index instead of m4_substr since chopping up a string
5838 containing M4-special characters causes problems here.
5839
5840 Fix a couple of bugs related to special characters in user-specified
5841 file names, and make it easier for skeletons to compute output file
5842 names with the same file name prefix as Bison-computed output file
5843 names.
5844 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5845 b4_parser_file_name and b4_spec_defines_file instead of
5846 @output_parser_name@ and @output_header_name@, which are now redundant.
5847 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5848 b4_parser_file_name, b4_spec_defines_file, and the new
5849 @basename(FILENAME@) instead of @output_parser_name@ and
5850 @output_header_name@, which inappropriately escaped the file names as
5851 C string literals.
5852 * src/files.c (all_but_ext): Remove static qualifier.
5853 (compute_output_file_names): Move `free (all_but_ext)' to...
5854 (output_file_names_free): ... here since all_but_ext is needed later.
5855 * src/files.h (all_but_ext): Extern.
5856 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5857 exactly what MUSCLE_INSERT_STRING used to do.
5858 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5859 characters are escaped properly.
5860 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5861 all_but_ext.
5862 For pkgdatadir muscle, maintain previous functionality by using
5863 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5864 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5865 digraphs would never be expanded. Hopefully no one has M4-special
5866 characters in his Bison installation path.
5867 * src/scan-skel.l: Don't parse @output_header_name@ and
5868 @output_parser_name@ anymore since they're now redundant.
5869 In @output, use decode_at_digraphs.
5870 Parse a new @basename command that invokes last_component.
5871 (decode_at_digraphs): New.
5872 (BASE_QPUTS): Remove unused.
5873 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5874 (Output file name): New tests.
5875
5876 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5877
5878 Warn about output files that are generated by the skeletons and that
5879 conflict with other output files.
5880 * data/glr.c: Don't generate the header file here when glr.cc does.
5881 * src/files.c (file_names, file_names_count): New static globals.
5882 (compute_output_file_names): Invoke output_file_name_check for files
5883 not generated by the skeletons and remove existing checks.
5884 (output_file_name_check): New function that warns about conflicting
5885 output file names.
5886 (output_file_names_free): Free file_names.
5887 * src/files.h (output_file_name_check): Declare.
5888 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5889 the skeletons.
5890 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5891 (Conflicting output files): New tests.
5892
5893 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5894
5895 * doc/bison.texinfo: Fix a couple of typos.
5896
5897 2006-12-08 Bob Rossi <bob@brasko.net>
5898
5899 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5900 Rename to...
5901 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5902 update all uses.
5903 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5904 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5905 local pv.
5906 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5907 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5908
5909 2006-12-07 Bob Rossi <bob@brasko.net>
5910 and Joel Denny <jdenny@ces.clemson.edu>
5911
5912 * data/push.c (yypvarsinit): Change return type from void* to struct
5913 yypvars*. No longer cast to void* on return.
5914 (struct yypvars): Remove yylen since it need not be remembered between
5915 yypushparse invocations.
5916 (yypushparse): Don't copy between yylen and pv->yylen.
5917
5918 2006-12-05 Bob Rossi <bob@brasko.net>
5919
5920 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5921 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5922 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5923 (struct yypvars): Remove b4_declare_parser_variables.
5924 (yypvarsinit): Remove init code for removed variables.
5925 (global scope): Do not declare b4_declare_parser_variables if
5926 push or pure mode.
5927 (yypushparse): Add b4_declare_parser_variables.
5928 Init new local variables, and remove init code for removed
5929 yypvars variables.
5930 (yyparse): Delete.
5931 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5932 and yyparse for other modes.
5933 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5934 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5935 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5936 (AT_PURE_LEX_IF): True if pure or push parser.
5937
5938 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5939
5940 Document Yacc prologue alternatives and default %destructor's and
5941 %printer's as experimental. Don't mention Java yet. Discussed at
5942 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5943 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5944 (2.3a): Annotate this entry to say the old forms of these features were
5945 also experimental.
5946 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
5947 Table of Symbols): Say they're experimental. Comment out any mention
5948 of Java (we'll want this back eventually).
5949
5950 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5951
5952 Support a file name argument to %defines. Deprecate `=' in
5953 %file-prefix, %name-prefix, and %output. Discussed at
5954 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5955 * NEWS (2.3a+): Mention.
5956 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
5957 form of %defines, and remove `=' from entries for %file-prefix,
5958 %name-prefix, and %output.
5959 * src/parse-gram.y (prologue_declaration): Implement.
5960 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5961 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5962 all but one occurrence of %name-prefix.
5963 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5964 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5965 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5966 occurrence of each of %file-prefix and %output. Add check for %defines
5967 with argument.
5968 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5969 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5970 Remove the `=' from %output.
5971
5972 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5973
5974 Don't escape $ in test case titles since Autoconf 2.61 now does that
5975 correctly.
5976 * tests/actions.at (Default %printer and %destructor are not for error
5977 or $undefined): Here.
5978 (Default %printer and %destructor are not for $accept): Here.
5979 * tests/input.at (Invalid $n and @n): Here.
5980
5981 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5982
5983 Rename <!> to <>. Discussed starting at
5984 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5985 * NEWS (2.3a+): Update.
5986 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
5987 Update.
5988 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5989 * src/scan-gram.l (INITIAL): Implement.
5990 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5991 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5992 comment.
5993 * tests/actions.at (Default tagless %printer and %destructor,
5994 Default tagged and per-type %printer and %destructor,
5995 Default %printer and %destructor are not for error or $undefined,
5996 Default %printer and %destructor are not for $accept,
5997 Default %printer and %destructor for mid-rule values): Update.
5998 * tests/input.at (Default %printer and %destructor redeclared,
5999 Unused values with default %destructor): Update.
6000
6001 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6002
6003 Don't let %prec take a nonterminal.
6004 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6005 token.
6006 * tests/input.at (%prec takes a token): New test checking that %prec
6007 won't take a nonterminal.
6008
6009 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6010
6011 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6012 it was double-quoted.
6013 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6014 grammar is maintained with Bison's highest standards.
6015 * src/getargs.c: Fix some typos in Doxygen comments.
6016
6017 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6018
6019 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6020 later. Reported by Paul Eggert in
6021 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6022 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6023 * src/scan-code.l (translate_action): Don't bother invoking
6024 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6025 (code_scanner_free): Instead of invoking
6026 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6027 which frees more.
6028 * src/scan-gram.l (gram_scanner_free): Likewise.
6029 * src/scan-skel.l (scan_skel): Likewise.
6030
6031 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6032
6033 * src/files.c (tr): Change return type to void.
6034 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6035 has been called previously for the same key.
6036 (muscle_find): Return storage instead of value so that
6037 --enable-gcc-warnings doesn't produce warnings that the return discards
6038 const. aver that the value and storage are the same since storage
6039 could potentially be NULL when value is not.
6040 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6041 same as 0.
6042
6043 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6044
6045 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6046 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6047 us a slightly cleaner distribution, and also works.
6048 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6049 gnulib changes.
6050
6051 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6052 and Paul Eggert <eggert@cs.ucla.edu>
6053
6054 Don't let Bison leak memory except when it complains.
6055 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6056 (spec_defines_file, dir_prefix): Now char *, not const char *,
6057 since they are freed.
6058 * src/files.c: Likewise.
6059 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6060 Likewise.
6061 (tr): Now operates in-place. All uses changed.
6062 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6063 values.
6064 (compute_file_name_parts, compute_output_file_names): Don't store
6065 read-only data in variables that will be freed.
6066 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6067 src_extension, and header_extension.
6068 (output_file_names_free): New public function to free
6069 spec_verbose_file, spec_graph_file, spec_defines_file,
6070 parser_file_name, and dir_prefix.
6071 * src/getargs.c (getargs): Don't store read-only data in variables that
6072 will be freed.
6073 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6074 (which previously existed but was unused), and quotearg_free.
6075 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6076 * src/muscle_tab.c: Likewise.
6077 (muscle_entry): Make the value char const *,
6078 and add a new storage member that is char * and can be freed.
6079 (muscle_entry_free): New private function.
6080 (muscle_init): Use it instead of free.
6081 (muscle_insert, muscle_grow): Update and use new storage member.
6082 (muscle_code_grow): Free the string passed to muscle_grow
6083 since it's not needed anymore.
6084 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6085 add a new `char *code' member.
6086 ("{...}"): Declare semantic type as code.
6087 * src/scan-code.h (translate_rule_action):
6088 (translate_symbol_action, translate_code, translate_action): Return
6089 `char const *' rather than `char *' since external code should not free
6090 these strings.
6091 * src/scan-code.l: Likewise.
6092 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6093 which is "{...}" in the parser.
6094 * tests/Makefile.am (maintainer-check-valgrind): Set
6095 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6096 Valgrind.
6097 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6098 complain.
6099 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6100 expecting a non-zero exit status sets --leak-check=summary and
6101 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6102 this case, and we don't want to hear about it.
6103
6104 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6105
6106 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6107 instead of from the template, to simplify configuration a bit.
6108 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6109 and m4/wint_t.m4, as they are needed with the latest gnulib.
6110
6111 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6112
6113 Disable unset/unused mid-rule value warnings by default, and recognize
6114 --warnings=midrule-values to enable them. Discussed starting at
6115 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6116 * NEWS (2.3a+): Mention.
6117 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6118 warnings): Add entry for midrule-values subargument.
6119 * src/reader.c (symbol_should_be_used): Don't return true just because
6120 the value is a set/used mid-rule value unless
6121 --warnings=midrule-values was specified.
6122 * tests/input.at (Unused values, Unused values before symbol
6123 declarations): Run tests with and without --warnings=midrule-values.
6124
6125 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6126 than LIST_FREE directly.
6127
6128 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6129
6130 Finish implementing --warnings=error, which should not be implied by
6131 --warnings=all (or by its synonyms -W and --warnings without
6132 subarguments).
6133 * src/complain.c (set_warning_issued): New function to report that
6134 warnings are being treated as errors and to record an error if so.
6135 Invoke...
6136 (warn_at, warn): ... here.
6137 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6138 "error - warnings are errors" does not appear above "all - all of the
6139 above".
6140 (getargs): For -W and --warnings without subarguments, don't let
6141 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6142 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6143
6144 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6145
6146 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6147 empty subargument list. For example: `bison --warnings= parser.y'.
6148
6149 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6150
6151 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6152 the parser header file so that gcc doesn't warn.
6153
6154 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6155
6156 Split the default %destructor/%printer into two kinds: <*> and <!>.
6157 Discussed starting at
6158 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6159 * NEWS (2.3a+): Mention.
6160 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6161 previous change today related to mid-rules.
6162 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6163 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6164 (TYPE_TAG_ANY): Add as <*>.
6165 (TYPE_TAG_NONE): Add as <!>.
6166 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6167 for <*> and <!>.
6168 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6169 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6170 * src/symlist.c (symbol_list_default_new): Split into tagged and
6171 tagless versions.
6172 (symbol_list_destructor_set, symbol_list_printer_set): Split
6173 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6174 SYMLIST_DEFAULT_TAGLESS.
6175 * src/symlist.h: Update symbol_list_default*_new prototypes.
6176 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6177 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6178 * src/symtab.c (default_destructor, default_destructor_location,
6179 default_printer, default_printer_location): Split each into tagged and
6180 tagless versions.
6181 (symbol_destructor_get, symbol_destructor_location_get,
6182 symbol_printer_get, symbol_printer_location_get): Implement tagged
6183 default and tagless default cases.
6184 (default_destructor_set, default_printer_set): Split each into tagged
6185 and tagless versions.
6186 * src/symtab.h: Update prototypes.
6187 * tests/actions.at (Default %printer and %destructor): Rename to...
6188 (Default tagless %printer and %destructor): ... this, and extend.
6189 (Per-type %printer and %destructor): Rename to...
6190 (Default tagged and per-type %printer and %destructor): ... this, and
6191 extend.
6192 (Default %printer and %destructor for user-defined end token): Extend.
6193 (Default %printer and %destructor are not for error or $undefined):
6194 Update.
6195 (Default %printer and %destructor are not for $accept): Update.
6196 (Default %printer and %destructor for mid-rule values): Extend.
6197 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6198 (Unused values with default %destructor): Extend.
6199
6200 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6201
6202 Don't apply the default %destructor/%printer to an unreferenced midrule
6203 value. Mentioned at
6204 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6205 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6206 like $@n instead of just @n so that the default %destructor/%printer
6207 logic doesn't see them as user-defined symbols.
6208 (symbol_is_dummy): Check for both forms of the name.
6209 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6210 name for which the midrule value is referenced in any action.
6211 * tests/actions.at (Default %printer and %destructor for mid-rule
6212 values): New test.
6213 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6214 for change to dummy symbol names.
6215
6216 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6217
6218 Warn about unset midrule $$ if the corresponding $n is used.
6219 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6220 $n usage.
6221 (packgram): Before invoking grammar_rule_check on any rule, make sure
6222 all actions have already been scanned in order to set `used' flags.
6223 Otherwise, checking that a midrule's $$ is set will not always work
6224 properly because the midrule check must forward-reference the midrule's
6225 parent rule.
6226 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6227 warning.
6228
6229 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6230
6231 More improvements to the documentation of the prologue alternatives:
6232 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6233 Bison manual.
6234 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6235 some text to clarify the relative importance of the new directives and
6236 to show how these directives may be viewed as code labels.
6237
6238 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6239
6240 Similar to the recently removed %before-header, add %code-top as the
6241 alternative to the pre-prologue. Mentioned at
6242 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6243 Also, let the prologue alternatives appear in the grammar section.
6244 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6245 (prologue_declaration): Move the existing prologue alternatives to...
6246 (grammar_declaration): ... here and add %code-top.
6247 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6248
6249 Clean up and extend documentation for the prologue alternatives.
6250 * NEWS (2.3a+): Describe prologue alternatives.
6251 * doc/bison.texinfo (Prologue): Move discussion of prologue
6252 alternatives to...
6253 (Prologue Alternatives): ... this new section, and extend it to discuss
6254 all 4 directives in detail.
6255 (Table of Symbols): Clean up discussion of prologue alternatives and
6256 add %code-top.
6257
6258 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6259
6260 DJGPP specific issues.
6261
6262 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6263 config.bat accordingly.
6264 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6265 * djgpp/config.site: Likewise.
6266
6267 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
6268
6269 Replace %*-header with %provides, %requires, %code. See discussion at
6270 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6271
6272 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6273 (b4_user_start_header): Remove.
6274 * data/glr.c: Use new macros instead of b4_*start_header
6275 and b4_*end_header.
6276 * data/glr.cc: Likewise.
6277 * data/lalr1.cc: Likewise.
6278 * data/push.c: Likewise.
6279 * data/yacc.c: Likewise.
6280
6281 * doc/bison.texinfo: Remove %before-header, rename
6282 %{start,end,after}-header to %requires, %provides, %code.
6283
6284 * src/parse-gram.y: Likewise (also rename token names accordingly).
6285 * src/scan-gram.l: Likewise.
6286 * tests/actions.at: Likewise.
6287
6288 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6289
6290 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6291 Problem reported by Joel E. Denny.
6292
6293 2006-10-14 Jim Meyering <jim@meyering.net>
6294
6295 (Sync from coreutils.)
6296 Work also when the working directory (with e.g. coreutils sources)
6297 is version controlled with git, rather than CVS.
6298 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6299 rather than CVS.
6300 In messages and comments, say e.g., "checked-out sources",
6301 rather than "CVS sources".
6302 (version_controlled_file): New function. Work for git as well as
6303 for CVS. Don't use grep's -q option.
6304 (slurp): Call it here, in place of CVS-specific code.
6305
6306 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6307
6308 Fix testsuite for ./configure --enable-gcc-warnings:
6309 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6310 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6311 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6312 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6313 * test/regression.at (Diagnostic that expects two alternatives):
6314 Likewise.
6315
6316 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6317
6318 * bootstrap.conf (gnulib_modules): Add config-h.
6319 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6320 worry about HAVE_CONFIG_H.
6321 * lib/abitset.c: Likewise.
6322 * lib/bitset.c: Likewise.
6323 * lib/bitset_stats.c: Likewise.
6324 * lib/bitsetv-print.c: Likewise.
6325 * lib/bitsetv.c: Likewise.
6326 * lib/ebitset.c: Likewise.
6327 * lib/get-errno.c: Likewise.
6328 * lib/lbitset.c: Likewise.
6329 * lib/subpipe.c: Likewise.
6330 * lib/timevar.c: Likewise.
6331 * lib/vbitset.c: Likewise.
6332 * lib/bitset.c: Include "bitset.h" first, to test interface.
6333 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6334 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6335 * lib/bitsetv.c: Include "bitsetv.h" first.
6336 * lib/get-errno.c: Include "get-errno.h" first.
6337 * m4/.cvsignore: Add config-h.m4.
6338 * tests/actions.at (Default %printer and %destructor for ...):
6339 Adjust expected line numbers in output to reflect removal of #if
6340 HAVE_CONFIG_H lines.
6341 * tests/glr-regression.at (Missed %merge type warnings when ...):
6342 Likewise.
6343 * tests/regression.at (Braced code in declaration in rules section):
6344 Likewise.
6345 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6346 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6347 Include <config.h> unconditionally.
6348
6349 * bootstrap: Sync from coreutils, as follows:
6350
6351 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6352
6353 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6354 variable was sometimes used without being initialized. This
6355 messed up the installation of the INSTALL file in some cases.
6356
6357 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6358
6359 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6360 --copy. Inspired by a suggestion from Bruno Haible.
6361
6362 2006-10-03 Jim Meyering <jim@meyering.net>
6363
6364 * bootstrap: Undo last change to this file, since now gnulib-tool
6365 sticks with the automake default in generating dependencies.
6366
6367 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6368
6369 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6370 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6371
6372 * doc/bison.1: Add copyright notice.
6373
6374 * data/glr.c: Don't include <stdarg.h>; not used.
6375
6376 * NEWS: The -g and --graph options now output graphs in Graphviz
6377 DOT format, not VCG format.
6378 * doc/bison.1: Likewise.
6379 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6380 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6381 of this change in
6382 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6383 * TODO: Remove Graphviz entry.
6384 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6385 remove vcg.c, vcg.h, vcg_defaults.h.
6386 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6387 * src/graphviz.c, src/graphviz.h: New files.
6388 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6389 * src/files.h: Make comment more generic.
6390 * src/main.c (main): Likewise.
6391 * src/print_graph.h: Likewise.
6392 * src/getargs.c (usage): Make usage description more generic.
6393 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6394 (static_graph, fgraph): Remove. All uses changed to pass
6395 arguments instead of sharing a static var.
6396 (print_core, print_actions, print_state, print_graph):
6397 Output graphviz format rather than VCG format.
6398 * tests/.cvsignore: Remove *.vcg; add *.dot.
6399 * tests/output.at: Expect *.dot files, not *.vcg files.
6400
6401 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6402 accommodates the 2006-10-08 change.
6403
6404 2006-10-11 Bob Rossi <bob@brasko.net>
6405
6406 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6407 (b4_yyssa, b4_yyerror_range): New macros.
6408 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6409 (yypvarsinit): Remove init of removed fields.
6410 (yypushparse): Remove use of removed fields; use new macros instead.
6411
6412 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6413
6414 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6415 in a push parser. Reindent slightly to match yacc.c better.
6416
6417 2006-10-11 Bob Rossi <bob@brasko.net>
6418
6419 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6420 yymsg_alloc fields.
6421 (yypvarsinit, yypushparse): Remove init of removed fields.
6422 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6423
6424 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6425
6426 * THANKS: Add Paolo Bonzini and Bob Rossi.
6427
6428 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6429
6430 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6431 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6432 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6433 b4_define_user_cde and uses): Remove.
6434 (b4_comment, b4_prefix, b4_sync_start): New.
6435 * data/bison.m4: New file, with most of the content removed from c.m4.
6436 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6437 * src/output.c (output_skeleton): Pass bison.m4.
6438 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6439 only if specified.
6440
6441 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6442
6443 Fix test failure reported by Tom Lane in
6444 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6445 and try to make such failures easier to catch in the future.
6446 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6447 that's now the caller's responsibility.
6448 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6449 Set yychar = YYEOF if it's negative.
6450 * tests/actions.at (yylex): Abort if asked to read past EOF.
6451 * tests/conflicts.at (yylex): Likewise.
6452 * tests/cxx-type.at (yylex): Likewise.
6453 * tests/glr-regression.at (yylex): Likewise.
6454 * tests/input.at (yylex): Likewise.
6455 * tests/regression.at (yylex): Likewise.
6456 * tests/torture.at (yylex): Likewise.
6457
6458 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6459
6460 Fix problems with translating English-language diagnostics.
6461 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6462 respect to bison-runtime pot generation. The YY_ stuff
6463 wasn't being captured.
6464 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6465 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6466 * runtime-po/POTFILES.in: Add data/push.c.
6467
6468 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6469
6470 Merge bootstrap changes from coreutils.
6471
6472 2006-09-28 Jim Meyering <jim@meyering.net>
6473
6474 Automatically generated dependencies are important even
6475 when all of the sources in a directory come from gnulib.
6476 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6477 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6478
6479 2006-09-23 Jim Meyering <jim@meyering.net>
6480
6481 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6482
6483 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6484
6485 * bootstrap: Add support for --force.
6486 (usage): New function. Describe usage less tersely.
6487 (CVS_only_file): New var.
6488
6489 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6490
6491 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6492 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6493 Adjust white space and comments to match GNU style better.
6494
6495 2006-09-20 Bob Rossi <bob@brasko.net>
6496
6497 * data/push.c (yyresult_get): Remove function.
6498 (YYPUSH_MORE): Add #define.
6499 (yypushparse): Modify return value.
6500
6501 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6502
6503 * stamp-h.in: Remove; no longer needed.
6504 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6505 Remove config.h, config.hin, intl (no longer created).
6506 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6507 stamp-h1.
6508
6509 Sync bootstrap from coreutils, as follows:
6510
6511 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6512
6513 * bootstrap (symlink_to_gnulib): New function.
6514 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6515 to copies-of-gnulib.
6516 (cp_mark_as_generated, slurp, gnulib_files):
6517 Avoid making a copy if it's the same as the old version.
6518 (gnulib_files): Add support for this variable (used by Bison).
6519
6520 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6521
6522 * src/getargs.c (usage): Rework to use conventions similar to
6523 coreutils, to make translation a bit easier and the code a bit
6524 smaller. Problem reported by Tim Van Holder.
6525
6526 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6527
6528 Use some of gnulib's new modules, taken from coreutils.
6529
6530 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6531 * bootstrap.conf: New file.
6532 (gnulib_modules): Add configmake, inttypes, unistd.
6533 (XGETTEXT_OPTIONS): Add complain, complain_at,
6534 fatal, fatal_at, warn, warn_at, unexpected_end.
6535 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6536 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6537 (gl_EARLY): Add.
6538 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6539 (gl_INIT): Add
6540 (GNULIB_AUTOCONF_SNIPPET): Remove.
6541 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6542 the pickiest.
6543 * lib/.cvsignore: Add inttypes_.h.
6544 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6545 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6546 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6547 no-longer-necessary initializations.
6548 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6549 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6550 use the unistd module.
6551 * src/system.h: Likewise.
6552 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6553 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6554 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6555 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6556 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6557 * src/system.h: Include inttypes.h unconditionally, now that we
6558 use the inttypes module. Don't bother to include stdint.h, since
6559 inttypes.h now does that for us.
6560 (LOCALEDIR): Remove, now that we use the configmake module.
6561 * src/getargs.c: Include configmake.h.
6562 * src/main.c: Likewise.
6563 * src/output.c: Likewise.
6564 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6565 not from $abs_top_builddir, since config.h moved.
6566
6567
6568 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6569 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6570
6571 * src/parse-gram.y (symbol_declaration): Don't put statements
6572 before declarations; it's not portable to C89.
6573 * src/scan-code.l (handle_action_at): Likewise.
6574
6575 * src/scan-code.l: Always initialize braces_level; the old code
6576 left it uninitialized and therefore had undefined behavior.
6577
6578 Don't attempt to redefine 'assert', since it runs afoul of
6579 systems where standard headers (mistakenly) include <assert.h>.
6580 Instead, define and use our own alternative, called 'aver'.
6581 * src/reader.c: Don't include assert.h, since we no longer
6582 use assert.
6583 * src/scan-code.l: Likewise.
6584 * src/system.h (assert): Remove, replacing with....
6585 (aver): New function, taking a bool arg. All uses changed.
6586 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6587 not merely an integer.
6588
6589 2006-09-15 Bob Rossi <bob@brasko.net>
6590
6591 Add support for push parsing. Based on the original work of
6592 Odd Arild Olsen <oao@fibula.no>.
6593 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6594 * data/c.m4 (YYPUSH): New.
6595 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6596 * data/push.c: New file.
6597 * src/getargs.c (push_parser): New var.
6598 * src/getargs.h (push_parser): New declaration.
6599 * src/output.c (prepare): Add macro insertion of `push_flag'.
6600 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6601 (prologue_declaration): Parse %push-parser.
6602 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6603 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6604 list of removed lines from the traces observed.
6605 (AT_CHECK_CALC_LALR): Added push parser tests.
6606
6607 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6608
6609 * NEWS: Version 2.3a.
6610 * configure.ac (AC_INIT): Likewise.
6611
6612 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6613 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6614 due to header ordering dependencies. I don't know why the #define
6615 was there.
6616
6617 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6618 runtime cost when YYDEBUG is not defined, and so that some tests
6619 that used to fail now work. Problem and initial suggestion by
6620 Paolo Bonzini.
6621 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6622 * data/glr.cc (b4_parser_class_name):
6623 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6624 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6625 (yydebug_) [YYDEBUG]: New member.
6626 (yycdebug_): Now defined only if YYDEBUG.
6627 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6628 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6629 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6630 if YYYDEBUG.
6631 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6632 Define only if YYDEBUG.
6633 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6634 set_debug_level.
6635 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6636 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6637 AT_CHECK_CALC_GLR_CC that are working now.
6638
6639 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6640
6641 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6642 We don't need them in glr.cc, and glr.c defines them.
6643 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6644 assumes that defining it to anything is the same as defining
6645 it to 1. Problem reported by Paolo Bonzini.
6646
6647 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6648
6649 * data/c.m4 (b4_null, b4_case): Define.
6650 * src/output.c (prepare_symbols): Use b4_null.
6651 (user_actions_output): Use b4_case.
6652
6653 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6654
6655 * data/glr.c (b4_shared_declarations): Put start-header first,
6656 before any #includes that we generate, so that feature-test
6657 macros work. Problem reported by Michael Deutschmann in
6658 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6659 * data/lalr1.cc: Likewise.
6660 * doc/bison.texinfo (Prologue): Document that feature-test macros
6661 should be defined before any Bison declarations.
6662 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6663 that depend on location.hh after, not before, Bison decls, since
6664 we now include location.hh after the first user prologue.
6665
6666 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6667 Sander Brandenburg in
6668 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6669 Also, fix minor white space and comment issues.
6670 (Prologue): Mention that it's better to define feature-test macros
6671 before Bison declarations. Problem reported by Michael Deutschmann.
6672
6673 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6674 by Jim Meyering.
6675 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6676 This adjusts to recent gnulib changes.
6677
6678 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6679
6680 Finish implementation of per-type %destructor/%printer. Discussed
6681 starting at
6682 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6683 and
6684 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6685 * NEWS (2.3+): Add a description of this feature to the default
6686 %destructor/%printer description.
6687 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6688 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6689 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6690 list node contains a semantic type.
6691 * src/symtab.c, src/symtab.h: Extend with a table that associates
6692 semantic types with their %destructor's and %printer's.
6693 (semantic_type_from_uniqstr, semantic_type_get,
6694 semantic_type_destructor_set, semantic_type_printer_set): New functions
6695 composing the public interface of that table.
6696 (symbol_destructor_get, symbol_destructor_location_get,
6697 symbol_printer_get, symbol_printer_location_get): If there's no
6698 per-symbol %destructor/%printer, look up the per-type before trying
6699 the default.
6700 * tests/actions.at (Per-type %printer and %destructor): New test case.
6701 * tests/input.at (Default %printer and %destructor redeclared):
6702 Extend to check that multiple occurrences of %symbol-default in a
6703 single %destructor/%printer declaration is an error.
6704 (Per-type %printer and %destructor redeclared, Unused values with
6705 per-type %destructor): New test cases.
6706
6707 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6708
6709 Require default %destructor/%printer to be declared using
6710 %symbol-default instead of an empty symbol list, and start working on
6711 new per-type %destructor/%printer. Discussed at
6712 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6713 * NEWS (2.3+): Add %symbol-default to example.
6714 * bison.texinfo (Freeing Discarded Symbols): Likewise.
6715 (Table of Symbols): Add entry for %symbol-default.
6716 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6717 (generic_symlist, generic_symlist_item): New nonterminals for creating
6718 a list in which each item is a symbol, semantic type, or
6719 %symbol-default.
6720 (grammar_declaration): Use generic_symlist in %destructor and %printer
6721 declarations instead of symbols.1 or an empty list.
6722 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6723 for changes to symbol_list.
6724 * src/reader.c: Update for changes to symbol_list.
6725 * src/scan-code.l: Likewise.
6726 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6727 * src/symlist.c, src/symlist.h: Extend such that a list node may
6728 represent a semantic type or a %symbol-default in addition to just an
6729 ordinary symbol. Add switched functions for setting %destructor's and
6730 %printer's.
6731 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6732 %destructor/%printer declarations.
6733
6734 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6735
6736 Whether the default %destructor/%printer applies to a particular symbol
6737 isn't a question of whether the user *declares* that symbol (in %token,
6738 for example). It's a question of whether the user by any means
6739 *defines* the symbol at all (by simply using a char token, for
6740 example). $end is defined by Bison whereas any other token with token
6741 number 0 is defined by the user. The error token is always defined by
6742 Bison regardless of whether the user declares it with %token, but we
6743 may one day let the user define error as a nonterminal instead.
6744 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6745 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6746 the meaning of "user-defined".
6747 * tests/actions.at (Default %printer and %destructor for user-declared
6748 end token): Rename to...
6749 (Default %printer and %destructor for user-defined end token): ...
6750 this.
6751
6752 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6753 computation of whether to apply the default, don't maintain a list of
6754 every Bison-defined symbol. Instead, just check for a first character
6755 of '$', which a user symbol cannot have, and check for the error token.
6756
6757 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6758
6759 Don't apply the default %destructor or %printer to the error token,
6760 $undefined, or $accept. This change fits the general rule that the
6761 default %destructor and %printer are only for user-declared symbols,
6762 and it solves several difficulties that are described in the new test
6763 cases listed below.
6764 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6765 * tests/actions.at (Default %printer and %destructor are not for error
6766 or $undefined, Default %printer and %destructor are not for $accept):
6767 New test cases.
6768
6769 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6770
6771 Allow %start after the first rule.
6772 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6773 when parsing the first rule.
6774 (check_and_convert_grammar): Search for it here after all grammar
6775 declarations have been parsed. Skip midrules, which have dummy LHS
6776 nonterminals.
6777 * src/symtab.c (symbol_is_dummy): New function.
6778 * src/symtab.h (symbol_is_dummy): Declare it.
6779 * tests/input.at (%start after first rule): New test.
6780
6781 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6782
6783 Redo some of the previous commit: add back the ability to use
6784 non-aliased/undeclared string literals since it might be useful to
6785 those declaring %token-table.
6786 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6787 commit: don't worry about complaints from symbols_pack.
6788 * src/symtab.c (symbol_new, symbol_class_set,
6789 symbol_check_alias_consistency): Undo changes in previous commit: count
6790 each string literal as a new symbol and token, assign it a symbol
6791 number, and don't complain about non-aliased string literals.
6792 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6793 and token counts but does still set aliased tokens to the same number,
6794 symbol_pack_processor now leaves empty slots in the symbols array.
6795 Remove those slots.
6796 * tests/regression.at (Undeclared string literal): Remove test case
6797 added in previous commit since non-aliased string literals are allowed
6798 again.
6799 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6800 remove unnecessary string literal declarations.
6801 * tests/sets.at (Firsts): Likewise.
6802
6803 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6804
6805 Don't allow an undeclared string literal, but allow a string literal to
6806 be used before its declaration.
6807 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6808 symbols_pack complained.
6809 * src/symtab.c (symbol_new): Don't count a string literal as a new
6810 symbol.
6811 (symbol_class_set): Don't count a string literal as a new token, and
6812 don't assign it a symbol number since symbol_make_alias does that.
6813 (symbol_make_alias): It's not necessary to decrement the symbol and
6814 token counts anymore. Don't assume that an alias declaration occurs
6815 before any uses of the identifier or string, and thus don't assert that
6816 one of them has the highest symbol number so far.
6817 (symbol_check_alias_consistency): Complain if there's a string literal
6818 that wasn't declared as an alias.
6819 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6820 symbol_pack asserts that every token has been assigned a symbol number
6821 although undeclared string literals have not.
6822 * tests/regression.at (String alias declared after use, Undeclared
6823 string literal): New test cases.
6824 (Characters Escapes, Web2c Actions): Declare string literals as
6825 aliases.
6826 * tests/sets.at (Firsts): Likewise.
6827
6828 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6829
6830 In the grammar scanner, STRING_FINISH unclosed constructs and return
6831 them to the parser in order to improve error messages.
6832 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6833 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6834 * tests/input.at (Unclosed constructs): New test case.
6835 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6836 seen.
6837
6838 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6839 unused global.
6840
6841 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6842
6843 Handle string aliases for character tokens correctly.
6844 * src/symtab.c (symbol_user_token_number_set): If the token has an
6845 alias, check and set its alias's user token number instead of its own,
6846 which is set to indicate the alias. Previously, every occurrence of
6847 the character token in the grammar overwrote that alias indicator with
6848 the character code.
6849 * tests/input.at (String aliases for character tokens): New test.
6850
6851 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6852
6853 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6854
6855 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6856
6857 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6858 to prevent failures when building on older platforms.
6859 Check for autopoint failure.
6860 Set XGETTEXT_OPTIONS to values that check for C format strings,
6861 so that translators are warned about them (this also helps
6862 prevent core dumps).
6863
6864 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6865 function, since it simplifies our code a bit.
6866
6867 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6868 rather than -W, so we don't get bogus warnings about sign comparisons.
6869 Add -Wpointer-arith, since that warning is useful (it reports code
6870 that does not conform to C89 and that some compilers reject).
6871 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6872 since it's no longer needed.
6873
6874 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6875
6876 Clean up scanners a bit.
6877 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6878 definitions so gcc won't warn when obstack_for_string is unused.
6879 * src/scan-code.l: config.h and system.h are already #include'd by
6880 scan-code-c.c, so get rid of them here.
6881 * src/scan-gram.l: Likewise.
6882 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6883 definitions rather than duplicating the rest of it.
6884 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6885
6886 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6887
6888 Suppress signed/unsigned comparison warnings for yycheck.
6889 * data/c.m4 (b4_safest_int_type): New macro.
6890 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6891 a signed int type, cast it to b4_safest_int_type first.
6892 * data/yacc.c: Likewise.
6893 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6894 also overwritten.
6895
6896 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6897
6898 * doc/bison.texinfo: Fix some typos.
6899
6900 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6901
6902 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6903 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6904
6905 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6906 the latest gnulib does this a different way.
6907 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6908 translation was patched, so stop omitting it.
6909
6910 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6911
6912 Enable declaration of default %printer/%destructor. Make the parser
6913 use these for all user-declared grammar symbols for which the user does
6914 not declare a specific %printer/%destructor. Thus, the parser uses it
6915 for token 0 if the user declares it but not if Bison generates it as
6916 $end. Discussed starting at
6917 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6918 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6919 and
6920 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6921 * NEWS (2.3+): Mention.
6922 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6923 declare a %destructor for a mid-rule's semantic value. It's just
6924 impossible to declare one specific to it.
6925 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6926 code. Describe default %destructor form.
6927 * src/parse-gram.y (grammar_declaration): Parse default
6928 %printer/%destructor declarations.
6929 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6930 and symbol_destructor_location_get rather than accessing the destructor
6931 and destructor_location members of struct symbol.
6932 (symbol_printers_output): Likewise but for %printer's.
6933 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6934 again.
6935 * src/symtab.c (default_destructor, default_destructor_location,
6936 default_printer, default_printer_location): New static global
6937 variables to record the default %destructor and %printer.
6938 (symbol_destructor_get, symbol_destructor_location_get,
6939 symbol_printer_get, symbol_printer_location_get): New functions to
6940 compute the appropriate %destructor and %printer for a symbol.
6941 (default_destructor_set, default_printer_set): New functions to set the
6942 default %destructor and %printer.
6943 * src/symtab.h: Prototype all those new functions.
6944 * tests/actions.at (Default %printer and %destructor): New test to
6945 check that the right %printer and %destructor are called, that they're
6946 not called for $end, and that $$ and @$ work correctly.
6947 (Default %printer and %destructor for user-declared end token): New
6948 test to check that the default %printer and %destructor are called for
6949 a user-declared end token.
6950 * tests/input.at (Default %printer and %destructor redeclared, Unused
6951 values with default %destructor): New tests to check related grammar
6952 warnings and errors.
6953
6954 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6955
6956 Clean up handling of %destructor for the end token (token 0).
6957 Discussed starting at
6958 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6959 and
6960 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6961
6962 Make the skeletons consistent in how they pop the end token and invoke
6963 its %destructor.
6964 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6965 state, which has token number 0, since this would invoke the
6966 %destructor for the end token.
6967 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6968 until after shifting the end token, or else it won't be popped.
6969 * data/yacc.c (yyparse): Likewise.
6970
6971 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6972 it's the end token. Upon termination, destroy an unshifted lookahead
6973 even when it's the end token.
6974 * data/lalr1.cc (yy::parser::parse): Likewise.
6975 * data/yacc.c (yyparse): Likewise.
6976
6977 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6978 value warnings for the end token when the user gives the end token a
6979 %destructor.
6980
6981 * tests/actions.at (Printers and Destructors): Test all the above.
6982
6983 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6984
6985 Update to latest gnulib and gettext versions.
6986 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6987 Add fopen-safer.
6988 (gnulib_files): Add m4/warning.m4. Don't worry about files
6989 overwritten by autopoint.
6990 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6991 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6992 rejects them.
6993 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6994 so that we can remove the intl files at a better time.
6995 (intl_files_to_remove): Remove aclocal.m4, since it gets
6996 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6997 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6998 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6999 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7000 Remove datarootdir hack; no longer needed.
7001 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7002 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7003 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7004 strdup.h.
7005 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7006 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7007
7008 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7009
7010 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7011 it with --assume-autoconf='latest-stable'.
7012
7013 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7014
7015 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7016 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7017 YYSTYPE' and `{'.
7018 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7019 those from muscle_tab.c since the old ones are misleading.
7020
7021 2006-07-13 Akim Demaille <akim@epita.fr>
7022
7023 Support %define "KEY" {VALUE}.
7024 * src/scan-code.h, src/scan-code.l (translate_action)
7025 (translate_rule_action, translate_symbol_action, translate_code):
7026 Return char *, not const char *.
7027 * src/parse-gram.y (declaration): Rename as...
7028 (prologue_declaration): this.
7029 (string_content): Remove this nonterminal, use STRING.
7030 (braceless, content, content.opt): New nonterminal.
7031 Use them.
7032 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7033 as value.
7034 * src/scan-gram.l (getargs.h): Don't include it.
7035
7036 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7037
7038 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7039 rather than a for-loop that declares a local bool variable. This
7040 should work around a compatibility problem with a Cray x1e C++
7041 compiler reported by Hung Nguyen in
7042 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7043 The for-loop was introduced in the 2004-11-17 change but I don't
7044 know why it was needed.
7045
7046 2006-07-12 Akim Demaille <akim@epita.fr>
7047
7048 * data/c.m4: Comment changes.
7049
7050 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
7051
7052 * src/complain.c (error_message, ERROR_MESSAGE): New.
7053 To factor...
7054 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7055 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7056
7057 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7058
7059 * NEWS: Instead of %union, you can define and use your own union type
7060 YYSTYPE if your grammar contains at least one <type> tag.
7061 Your YYSTYPE need not be a macro; it can be a typedef.
7062 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7063 (Union Decl, Decl Summary): Document this.
7064 * data/glr.c (YYSTYPE): Implement this.
7065 * data/glr.cc (YYSTYPE): Likewise.
7066 * data/lalr1.cc (YYSTYPE): Likewise.
7067 * data/yacc.c (YYSTYPE): Likewise.
7068 * src/output.c (prepare): Output tag_seen_flag.
7069 * src/parse-gram.y (declaration, grammar_declaration):
7070 Use 'union_seen' rather than 'typed' to determine whether
7071 %union has been seen, since grammars can now be typed without
7072 %union.
7073 (symbol_declaration, type.opt, symbol_def):
7074 Keep track of whether a tag has been seen.
7075 * src/reader.c (union_seen, tag_seen): New vars.
7076 (typed): remove.
7077 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7078 * src/scan-code.l (untyped_var_seen): New variable.
7079 (handle_action_dollar): Adjust to above changes.
7080 (handle_action_dollar, handle_action_at):
7081 Improve overflow checking for outlandish numbers.
7082 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7083 avoid new diagnostics generated by above changes.
7084 * tests/regression.at (YYSTYPE typedef): Add test to check
7085 for type tags without %union.
7086
7087 * src/symlist.c (symbol_list_length): Return int, not unsigned
7088 int, since callers expect int. This may need to get revisited
7089 once we have proper integer overflow checking.
7090
7091 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7092 object is now static.
7093
7094 * src/getargs.c (flags_argmatch): Return void, not int,
7095 to pacify ./configure --enable-gcc-warnings.
7096
7097 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7098 since last_string is already defined to FLEX_PREFIX (last_string).
7099
7100 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7101
7102 Implement --warnings/-W.
7103 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7104 replaced by...
7105 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7106 Adjust callers.
7107 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7108 (warnings_args, warnings_types): New.
7109 (getargs, short_options, long_options): Accept -W/--warnings.
7110 Sort the options by alphabetical order, upper case letter right
7111 before its lower case.
7112
7113 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7114
7115 Change %merge result type clash warnings to errors. Discussed at
7116 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7117 * src/reader.c (record_merge_function_type): Use complain_at.
7118 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7119 declared later): Update test case results.
7120
7121 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7122
7123 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7124 to be in alphabetical order.
7125 (trace_args): Spelling fixes.
7126
7127 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7128
7129 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7130 so they don't collide with user-defined macros.
7131 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7132 this was never guaranteed, and now that we're using gnulib stdint,
7133 which defines int_fast16_t to long int, the problem is exposed.
7134
7135 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7136
7137 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7138 need the full POSIX semantics (and weren't implementing them
7139 anyway).
7140
7141 Adjust to Autoconf 2.60 and today's gnulib.
7142 * bootstrap (gnulib_modules): Add stdint.
7143 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7144 no longer copies it.
7145 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7146 since stdint needs the former and wcwidth (which is now required
7147 by mbswidth) needs the latter.
7148 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7149 work around a compatibility glitch between gettext 0.14.6 and
7150 Autoconf 2.60.
7151 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7152 Do not check for uintptr_t, since new stdint module does the right
7153 thing.
7154 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7155 Add stdint.h, stdint_.h, wcwidth.h.
7156 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7157 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7158 stdint.m4, wchar_t.m4, wcwidth.m4.
7159 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7160 usual order for ../lib/*.h files.
7161 (file_name_split): Use last_component, not base_name, to adjust
7162 to gnulib changes.
7163 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7164 for ../lib/*.h files.
7165 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7166 Define unconditionally, since we now assume the stdint module.
7167 * src/scan-skel.l: Include <dirname.h>.
7168 (BASE_QPUTS): Use last_component, not base_name.
7169 * src/system.h: Include <unlocked-io.h> in the usual order
7170 for ../lib/*.h files. Include <stdint.h> unconditionally,
7171 since we now use the stdint module.
7172 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7173 HAVE_UINTPTR_T, since we now use the stdint module.
7174 (base_name): Remove decl, since files now include <dirname.h>
7175 to get the decl.
7176
7177 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7178
7179 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7180 New, default to 1.
7181 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7182 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7183 default.
7184 * tests/calc.at: Adjust.
7185
7186 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7187
7188 * data/c.m4 (b4_basename): New.
7189 (b4_syncline): Also output the location of its invocation (from
7190 the skeleton).
7191 (b4_user_action, b4_define_user_action, b4_user_actions)
7192 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7193 (b4_user_stype): New.
7194 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7195
7196 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7197
7198 In the grammar file, the first column is 1 not 0 on the first line as
7199 on every other line.
7200 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7201 * tests/input.at (Torturing the Scanner): Update output.
7202
7203 * src/scan-gram.l (scanner_cursor): Declare it static.
7204
7205 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7206
7207 In warnings, say "previous declaration" rather than "first
7208 declaration".
7209 * src/symtab.c (redeclaration): Do that here.
7210 * src/reader.c (record_merge_function_type): In the case of a result
7211 type clash, report the previous declaration rather than the very first
7212 one in the grammar file.
7213 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7214 declared later): Add a third declaration to check this behavior.
7215 * tests/input.at (Incompatible Aliases): Update output.
7216
7217 2006-06-27 Akim Demaille <akim@epita.fr>
7218
7219 * doc/Doxyfile.in: New.
7220 * doc/Makefile.am: Use it.
7221 * src/lalr.h, src/symtab.h: Initial doxygenation.
7222
7223 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7224
7225 Don't miss %merge result type warnings just because the LHS types are
7226 declared after the %merge. This continues the effort of the previous
7227 patch.
7228 * src/reader.c (get_merge_function): Don't set the merger type yet.
7229 (record_merge_function_type): New function for setting the merger type
7230 and checking for clashes.
7231 (grammar_current_rule_merge_set): Set the location of the %merge for
7232 the current rule.
7233 (packgram): Invoke record_merge_function_type for each rule now that
7234 all symbol type declarations have been parsed.
7235 * src/reader.h (merger_list.type_declaration_location): New member
7236 storing the location of the first %merge from which the type for this
7237 merging function was derived.
7238 * src/symlist.h (symbol_list.merger_declaration_location): New member
7239 storing the location of a rule's %merge, if any.
7240 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7241 declared later): New test to catch the error fixed by the above patch.
7242
7243 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7244
7245 Get action warnings (grammar_rule_check) right even when symbol
7246 declarations appear after the rules. Discussed at
7247 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7248 and
7249 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7250 Don't mistake the type of $$ in a midrule to be that of its parent
7251 rule's $$.
7252 * src/reader.c (grammar_current_rule_end): Don't invoke
7253 grammar_rule_check yet since not all symbol declarations may have been
7254 parsed yet.
7255 (grammar_midrule_action): Likewise.
7256 Don't record whether the midrule's $$ has been used yet since actions
7257 haven't been translated yet.
7258 Record the midrule's parent rule and its RHS index within the parent
7259 rule.
7260 (grammar_current_rule_action_append): Don't translate the action yet
7261 since not all symbol declarations may have been parsed yet and, thus,
7262 warnings about types for $$, $n, @$, and @n can't be reported yet.
7263 (packgram): Translate the action and invoke grammar_rule_check now that
7264 all symbol declarations have been parsed.
7265 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7266 after parsing the entire grammar file, the symbol list here in the case
7267 of a midrule is actually the midrule's empty RHS, so reference its
7268 parent rule's RHS where necessary.
7269 On the other hand, now that you can already know it's a midrule, you
7270 aren't forced to think $$ has the same type as its parent rule's $$.
7271 (handle_action_at): In the case of a midrule, reference the parent rule
7272 where necessary.
7273 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7274 members.
7275 (symbol_list_length): Now that this is invoked after all rules have
7276 been parsed, a NULL symbol (rather than a NULL symbol list node)
7277 terminates a rule. symbol_list_print already does this correctly.
7278 * src/symlist.h (symbol_list.midrule_parent_rule,
7279 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7280 remember their relationships with their parents.
7281 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7282 fixed by the above patch.
7283 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7284 implementing...
7285 (Unused values): ... this old test case and...
7286 (Unused values before symbol declarations): ... this new test case.
7287 This one is the same as `Unused values' except that all symbol
7288 declarations appear after the rules in order to catch the rest of the
7289 errors fixed by the above patch.
7290
7291 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7292
7293 More cleanup.
7294 * src/reader.c (current_rule): Declare it static since it's no longer
7295 used outside this file.
7296 (grammar_current_rule_action_append): Remove redundant arguments from
7297 translate_rule_action invocation.
7298 * src/reader.h (current_rule): Remove this unused extern.
7299 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7300 * src/scan-code.l (translate_rule_action): Likewise.
7301
7302 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7303
7304 Clean up yesterday's patch.
7305 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7306 to...
7307 * src/reader.c (grammar_current_rule_action_append): ... here for
7308 consistency with grammar_current_rule_symbol_append.
7309 * tests/regression.at (Braced code in declaration in rules section):
7310 Make yyerror and yylex static as usual.
7311
7312 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7313
7314 Fix bug that mistakes braced code in a declaration in the rules section
7315 to be a rule action. Mentioned at
7316 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7317 * src/scan-gram.l: Move midrule action detection from the start of the
7318 scanning of any braced code to...
7319 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7320 action. For readability, use $2 and @2 rather than the equivalent
7321 global variables.
7322 * tests/regression.at (Braced code in declaration in rules section):
7323 New test to catch the error fixed by the above patch.
7324
7325 Work on code readability some.
7326 * src/scan-code.l (current_rule): Get rid of this misleading and
7327 redundant declaration: it's actually extern'ed in reader.h.
7328 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7329 translate_action): Add a rule argument and use it instead of the global
7330 current_rule.
7331 (translate_rule_action): This already receives current_rule through an
7332 argument, so pass it on to translate_action instead of assigning
7333 current_rule to current_rule.
7334 (translate_symbol_action, translate_code): Pass rule = NULL to
7335 translate_action.
7336
7337 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7338
7339 Rename %before-definitions to %start-header and %after-definitions to
7340 %end-header. Don't use these declarations to separate pre-prologue
7341 blocks from post-prologue blocks. Add new order-independent
7342 declarations %before-header and %after-header as alternatives to the
7343 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7344 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7345 * NEWS (2.3+): Update for these changes.
7346 * data/glr.c (b4_before_definitions): Update to...
7347 (b4_start_header): ... this.
7348 (b4_after_definitions): Update to...
7349 (b4_end_header): ... this.
7350 * data/glr.cc: Likewise.
7351 * data/lalr1.cc: Likewise.
7352 * data/yacc.c: Likewise.
7353 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7354 prologue blocks with %*-header declarations.
7355 (Calc++ Parser): Likewise.
7356 (Decl Summary): Update names.
7357 (Table of Symbols): Update description.
7358 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7359 (PERCENT_END_HEADER): ... this.
7360 (PERCENT_BEFORE_DEFINITIONS): Update to...
7361 (PERCENT_START_HEADER): ... this.
7362 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7363 (declaration): Update token names and m4 macro names.
7364 When parsing %end-header and %start-header, invoke translate_code
7365 before muscle_code_grow, and no longer set global booleans to remember
7366 whether these declarations have been seen.
7367 Parse new %after-header and %before-header.
7368 * src/reader.c (before_definitions, after_definitions): Remove.
7369 (prologue_augment): Accept a new bool argument to specify whether to
7370 augment the pre-prologue or post-prologue.
7371 * src/reader.h (before_definitions, after_definitions): Remove these
7372 extern's.
7373 (prologue_augment): Add new bool argument.
7374 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7375 (PERCENT_END_HEADER): ... this.
7376 (PERCENT_BEFORE_DEFINITIONS): Update to...
7377 (PERCENT_START_HEADER): ... this.
7378 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7379 * tests/actions.at (Printers and Destructors): Update names.
7380
7381 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7382
7383 Add comparison operators for C++ location classes. Discussed at
7384 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7385 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7386 declaration indicating whether filename_type has an operator==. If
7387 filename_type is `std::string', it defaults to `1', `0' otherwise.
7388 * data/location.cc: Iff b4_define_location_comparison is `1', add
7389 operator== and operator!= for class position and for class location.
7390
7391 Some minor fixes.
7392 * src/scan-action.l: Remove unused file.
7393 * src/symtab.c (symbol_printer_set): Use printer_location not
7394 destructor_location.
7395 * src/symtab.h (struct symbol): Replace incorrect source comment for
7396 printer members.
7397 * tests/input.at (Incompatible Aliases): Update output with correct
7398 printer location.
7399
7400 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7401
7402 Don't put the pre-prologue in the header file. For the yacc.c code
7403 file and the glr.c header and code files, move the pre-prologue before
7404 the token definitions. Add new %before-definitions and
7405 %after-definitions to declare code that will go in both the header file
7406 and code file. Discussed at
7407 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7408 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7409 and
7410 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7411 * NEWS (2.3+): Describe these changes.
7412 * data/glr.c (b4_pre_prologue): Move from within to before...
7413 (b4_shared_declarations): ... this.
7414 Add new b4_before_definitions before b4_token_enums.
7415 Add new b4_after_definitions at the end.
7416 * data/glr.cc (b4_pre_prologue): Replace with...
7417 (b4_before_definitions): ... this in the header file.
7418 (b4_after_definitions): New near the end of the header file.
7419 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7420 code file right before including the header file.
7421 (b4_before_definitions): New in the previous position of
7422 b4_pre_prologue in the header file.
7423 (b4_after_definitions): New near the end of the header file.
7424 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7425 (b4_token_enums_defines): In the code file, move to right before
7426 YYSTYPE for consistency with the header file.
7427 (b4_before_definitions): New right before b4_token_enums_defines in
7428 both the header and code file.
7429 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7430 header and code file.
7431 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7432 of prologues for %union dependencies.
7433 (Decl Summary): In %defines description, mention the effect of
7434 %before-definitions and %after-definitions on the header file.
7435 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7436 than in the pre-prologue so that make check succeeds.
7437 (Table of Symbols): Add entries for %before-definitions and
7438 %after-definitions.
7439 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7440 %before-definitions.
7441 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7442 (declaration): Parse those declarations and append to
7443 b4_before_definitions and b4_after_definitions, respectively.
7444 * src/reader.c (before_definitions, after_definitions): New bools to
7445 track whether those declarations have been seen.
7446 (prologue_augment): Add to the post-prologue if %union,
7447 %before-definitions, or %after-definitions has been seen.
7448 * src/reader.h (before_definitions, after_definitions): New extern's.
7449 * src/scan-gram.l: Scan the new declarations.
7450 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7451 prologue block in a %before-definitions or a %after-definitions based
7452 on whether the %union is declared.
7453 * tests/regression.at (Early token definitions with --yacc, Early token
7454 definitions without --yacc): Move tests for token definitions into the
7455 post-prologue since token names are no longer defined in the
7456 pre-prologue.
7457
7458 2006-06-20 Akim Demaille <akim@epita.fr>
7459
7460 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7461 (symbol_get): Use it.
7462 * src/parse-gram.y: Use it.
7463
7464 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7465
7466 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7467 build succeeds when configured with --enable-gcc-warnings.
7468
7469 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7470
7471 * src/parse-gram.y (char_name): New function.
7472 (CHAR, STRING, string_content): For %printer, properly escape.
7473 (ID): Prefer fputs to fprintf.
7474 (id): Reindent to be consistent with other rules.
7475 Properly quote char.
7476
7477 The Translation Project changed its way of publishing translations
7478 to maintainers. I haven't received any responses to my request
7479 for supporting the old way, or for documenting the new way. I
7480 have modified 'bootstrap' to use screen scraping
7481 (in this case, HTML scraping). This is unreliable and inelegant,
7482 but I don't see any better way. Yuck.
7483 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7484 (get_translations): New function, which uses HTML scraping to
7485 deduce locations of latest translations.
7486 Use this function to grab both bison and bison-runtime .po files.
7487 Don't bother priming the pump for the runtime-po domain any more,
7488 as it's now translated better than bison is.
7489
7490 2006-06-19 Akim Demaille <akim@epita.fr>
7491
7492 * src/scan-gram.l: No longer "parse" things after `%union' until
7493 `{'. Rather, return a single "%union" token.
7494 No longer make symbols: return strings, and leave the conversion
7495 to symbols to the parser.
7496 (SC_PRE_CODE, token_type): Remove.
7497 * src/parse-gram.y (%union): New field `character'.
7498 Sort tokens.
7499 (CHAR): New token.
7500 (ID, ID_COLON): Now that the scanner no longer makes them
7501 identifiers, adjust all uses to invoke symbol_get.
7502 (id_colon): New, wraps the conversion from string to symbol.
7503 (%union): Accept a possible union_name.
7504 (symbol): Now can be a char.
7505 * data/c.m4 (b4_union_name): Leave a default value.
7506 * data/glr.c, data/yacc.c: Use it.
7507
7508 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7509
7510 For associating token numbers with token names for "yacc.c", don't use
7511 #define statements unless `--yacc' is specified; always use enum
7512 yytokentype. Most important discussions start at:
7513 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7514 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7515 and
7516 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7517 * NEWS (2.3+): Mention.
7518 * data/c.m4 (b4_yacc_if): New.
7519 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7520 token #define's.
7521 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7522 on token name definitions.
7523 * src/getargs.c (usage): Capitalize `Yacc' in English.
7524 * src/output.c (prepare): Define b4_yacc_flag.
7525 * tests/regression.at (Early token definitions): Test that tokens names
7526 are defined before the pre-prologue not just before the post-prologue.
7527 Remove this test case and copy to...
7528 (Early token definitions with --yacc): ... this to test #define's.
7529 (Early token definitions without --yacc): ... and this to test enums.
7530
7531 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7532
7533 * NEWS: Reword the post-2.3 change to not be so optimistic about
7534 removing the old "look-ahead" spelling.
7535 Update previous look-ahead/lookahead change reports.
7536 * REFERENCES: look-ahead -> lookahead (since that's
7537 what he actually wrote).
7538 * doc/refcard.tex: look ahead -> lookahead,
7539 look-ahead -> lookahead
7540
7541 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7542
7543 For consistency, use `lookahead' instead of `look-ahead' or
7544 `look_ahead'. Discussed starting at
7545 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7546 and then at
7547 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7548 * NEWS: For the next release, note the change to `--report'.
7549 * TODO, doc/bison.1: Update English.
7550 * doc/bison.texinfo: Update English.
7551 (Understanding Your Parser, Bison Options): Document as
7552 `--report=lookahead' rather than `--report=look-ahead'.
7553 * src/conflicts.c: Update English in comments.
7554 (lookahead_set): Rename from look_ahead_set.
7555 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7556 (resolve_sr_conflict): Rename local look_ahead_tokens to
7557 lookahead_tokens, and update other uses.
7558 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7559 count_rr_conflicts, conflicts_free): Update uses.
7560 * src/getargs.c (report_args): Move "lookahead" before alternate
7561 spellings.
7562 (report_types): Update uses.
7563 (usage): For `--report' usage description, state `lookahead' spelling
7564 rather than `look-ahead'.
7565 * src/getargs.h (report.report_lookahead_tokens): Rename from
7566 report_look_ahead_tokens.
7567 * src/lalr.c: Update English in comments.
7568 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7569 (state_lookahead_tokens_count): Rename from
7570 state_look_ahead_tokens_count.
7571 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7572 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7573 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7574 Update other uses.
7575 Update English in output.
7576 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7577 * src/print.c: Update English in comments.
7578 (lookahead_set): Rename from look_ahead_set.
7579 (print_reduction): Rename argument lookahead_token from
7580 look_ahead_token.
7581 (print_core, state_default_rule, print_reductions, print_results):
7582 Update uses.
7583 * src/print_graph.c: Update English in comments.
7584 (print_core): Update uses.
7585 * src/state.c: Update English in comments.
7586 (reductions_new): Update uses.
7587 (state_rule_lookahead_tokens_print): Rename from
7588 state_rule_look_ahead_tokens_print, and update other uses.
7589 * src/state.h: Update English in comments.
7590 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7591 (state_rule_lookahead_tokens_print): Rename from
7592 state_rule_look_ahead_tokens_print.
7593 * src/tables.c: Update English in comments.
7594 (conflict_row, action_row): Update uses.
7595 * tests/glr-regression.at
7596 (Incorrect lookahead during deterministic GLR,
7597 Incorrect lookahead during nondeterministic GLR): Rename
7598 print_look_ahead to print_lookahead.
7599 * tests/torture.at: Update English in comments.
7600 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7601 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7602 (Many lookahead tokens): Update uses.
7603 * data/glr.c: Update English in comments.
7604 * lalr1.cc: Likewise.
7605 * yacc.c: Likewise.
7606 * src/conflicts.h: Likewise.
7607 * src/lalr.h: Likewise.
7608 * src/main.c: Likewise.
7609 * src/output.c: Likewise.
7610 * src/parse-gram.c: Likewise.
7611 * src/tables.h: Likewise.
7612 * tests/calc.at: Likewise.
7613
7614 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7615
7616 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7617
7618 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7619
7620 * TODO: Add request from Nelson H. F. Beebe to be able to install
7621 Bison without installing the yacc script.
7622
7623 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7624
7625 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7626 and yytext if they're already #define'd.
7627 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7628 * src/scan-code-c.c: ... here.
7629 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7630 <config.h>.
7631
7632 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7633
7634 Get Bison to build again when configured with --enable-gcc-warnings.
7635 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7636 missing #include's.
7637 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7638 loc argument as it shadows a global.
7639 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7640 invocation.
7641
7642 * src/.cvsignore: Add scan-code.c.
7643
7644 2006-06-07 Akim Demaille <akim@epita.fr>
7645
7646 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7647 to...
7648 * src/scan-code.l: here.
7649 * tests/input.at (Torturing the Scanner): Fix another location
7650 error.
7651
7652 2006-06-07 Akim Demaille <akim@epita.fr>
7653
7654 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7655
7656 2006-06-06 Akim Demaille <akim@epita.fr>
7657
7658 Extract the parsing of user actions from the grammar scanner.
7659 As a consequence, the relation between the grammar scanner and
7660 parser is much simpler. We can also split "composite tokens" back
7661 into simple tokens.
7662 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7663 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7664 rename as...
7665 * src/location.h, src/location.c (add_column_width)
7666 (location_compute): these.
7667 Fix the column count: the initial column is 0.
7668 (location_print): Be robust to ending column being 0.
7669 * src/location.h (boundary_set): New.
7670 * src/main.c: Adjust to scanner_free being renamed as
7671 gram_scanner_free.
7672 * src/output.c: Include scan-code.h.
7673 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7674 Use boundary_set.
7675 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7676 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7677 which is now, again, a separate token.
7678 Adjust all dependencies.
7679 Whereever actions with $ and @ are used, use translate_code.
7680 (action): Remove this nonterminal which is now useless.
7681 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7682 (grammar_current_rule_action_append): Use translate_code.
7683 (packgram): Bound check ruleno, itemno, and rule_length.
7684 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7685 (last_string, last_braced_code_loc, max_left_semantic_context)
7686 (scanner_initialize, scanner_free, scanner_last_string_free)
7687 (gram_out, gram_lineno, YY_DECL_): Move to...
7688 * src/scan-gram.h: this new file.
7689 (YY_DECL): Rename as...
7690 (GRAM_DECL): this.
7691 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7692 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7693 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7694 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7695 Move these declarations, and...
7696 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7697 these to...
7698 * src/flex-scanner.h: this new file.
7699 * src/scan-gram.l (rule_length, rule_length_overflow)
7700 (increment_rule_length): Remove.
7701 (last_braced_code_loc): Rename as...
7702 (gram_last_braced_code_loc): this.
7703 Adjust to the changes of the parser.
7704 Move all the handling of $ and @ into...
7705 * src/scan-code.l: here.
7706 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7707 (handle_action_dollar, handle_action_at): Move to...
7708 * src/scan-code.l: here.
7709 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7710 scan-code.h, scan-code-c.c, scan-gram.h.
7711 (EXTRA_bison_SOURCES): Add scan-code.l.
7712 (BUILT_SOURCES): Add scan-code.c.
7713 (yacc): Be robust to white spaces.
7714
7715 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7716 * tests/regression.at: Adjust the column numbers.
7717 * tests/regression.at: Adjust the error message.
7718
7719 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7720
7721 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7722 Use Akim's wording from
7723 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7724
7725 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7726
7727 Between Bison releases, manually append `+' to the previous Bison
7728 release number, and use that as a signal to automatically print the
7729 ChangeLog's CVS Id keyword from --version. Discussed starting at
7730 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7731 * ChangeLog: Add Id header.
7732 * configure.ac (AC_INIT): Append `+' to `2.3'.
7733 * src/.cvsignore: Add revision.c.
7734 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7735 (BUILT_SOURCES): Add revision.c.
7736 (revision.c): New target rule. This file defines a new global variable
7737 named revision. It initializes it with either the Id from ChangeLog
7738 or, if VERSION doesn't contain `+', with the empty string.
7739 * src/getargs.c (version): Print the value of revision.
7740 * src/revision.h: Extern revision.
7741
7742 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7743
7744 * NEWS: Version 2.3.
7745 * configure.ac (AC_INIT): Likewise.
7746
7747 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7748
7749 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7750 with no arguments, not as an object-like macro. This is for
7751 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7752 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7753 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7754 Document this.
7755
7756 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7757
7758 * src/getargs.c (usage): Back out yesterday's modification of the
7759 --help output so that we don't have to wait for translation before
7760 releasing 2.3.
7761
7762 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7763
7764 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7765 Problem reported by Akim Demaille.
7766
7767 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7768
7769 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7770
7771 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7772
7773 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7774 generated source code. Problem reported by Frans Englich in
7775 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7776
7777 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7778
7779 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7780 shell, not within 'make', so that 'make' by an ordinary builder
7781 (using GNU make) does not worry about configuring gzip. This also
7782 works around a bug reported independently by Keith Thompson and by
7783 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7784 stderr rather than stdout, messing up the build logs.
7785
7786 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7787
7788 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7789 to make sure that YYID will never be unused. This fixes a 'make
7790 maintainer-check' failure caused by the recent changes to the 'Trivial
7791 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7792 not used.
7793 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7794
7795 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7796
7797 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7798 state before an empty RHS is always resolved here. Only the location
7799 of that state is guaranteed to be resolved, and that's enough. This
7800 fixes the remaining bug reported by Derek M. Jones in
7801 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7802 * tests/glr-regression.at (Uninitialized location when reporting
7803 ambiguity): Test the above case.
7804 Also, the embedded comments in this test case claim it checks the case
7805 of an empty RHS that has inherited the initial location. However, the
7806 corresponding LHS was already resolved, so yyresolveLocations didn't
7807 actually have reason to modify it. Fix this by forcing
7808 nondeterministic operation at the beginning of the parse.
7809
7810 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7811
7812 * data/c.m4 (b4_yy_symbol_print_generate):
7813 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7814 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7815 of the bugs reported today by Derek M Jones in
7816 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7817 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7818 defined to be a type name without parens or brackets.
7819 (Location Type): Similarly for YYLTYPE.
7820 * tests/regression.at (Trivial grammars): Put in a test for this
7821 bug that will be caught by 'make maintainer-check' (though not,
7822 alas, by 'make check' unless your compiler is picky).
7823
7824 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7825
7826 * NEWS: Version 2.2.
7827 * configure.ac (AC_INIT): Likewise.
7828
7829 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7830
7831 * data/glr.c (yyreportTree): Make room in yystates for the state
7832 preceding the RHS. This fixes the segmentation fault reported by Derek
7833 M. Jones in
7834 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7835 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7836 to the user. Reported for yyreportTree by Derek M. Jones later in the
7837 same thread.
7838 * THANKS: Add Derek M. Jones.
7839 Update my email address.
7840 Fix typo in Steve Murphy's name.
7841
7842 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7843
7844 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7845 checking against YYLAST that caused the parser to miss a potential
7846 alternative in its diagnostic.
7847 Problem reported by Maria Jose Moron Fernandez in
7848 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7849 * data/lalr1.cc (yysyntax_error_): Likewise.
7850 * data/yacc.c (yysyntax_error): Likewise.
7851 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7852 tokens, in case we run into an older C compiler.
7853 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7854 Use them to check for the off-by-one error fixed above.
7855
7856 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7857 YYSIZE_T, not size_t.
7858 * tests/regression.at (Trivial grammars): New test, to catch
7859 the error fixed by the above patch.
7860
7861 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7862
7863 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7864 scheme.
7865 Reported by Steve Murphy.
7866
7867 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7868
7869 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7870 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7871
7872 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7873
7874 Implement --trace=m4.
7875 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7876 * src/output.c (output_skeleton): When set, pass -dV to m4.
7877
7878 Factor the handling of flags in m4.
7879 * src/output.c (prepare): Rename the muscle names debug, defines,
7880 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7881 * data/c.m4: Adjust.
7882 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7883 Use b4_define_flag_if to define other b4_FLAG_if macros.
7884 (b4_location_if): As a consequence, rename as...
7885 (b4_locations_if): this, for consistency.
7886 Adjust all the skeletons.
7887
7888 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7889
7890 * etc/bench.pm: Shorten bench names.
7891
7892 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7893
7894 * src/output.h, src/output.c (error_verbose): Move to...
7895 * src/getargs.h, src/getargs.c: here.
7896 Sort the flags.
7897 Adjust dependencies.
7898
7899 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7900
7901 * data/c.m4 (b4_copyright): Put the special exception for Bison
7902 skeletons here, so we don't have to put it in each skeleton. All
7903 uses changed. Suggested by Akim Demaille. Also, wrap the
7904 copyright notice, in case it is longer than 80 columns. Replace
7905 comma by newline after title.
7906
7907 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7908
7909 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7910 incompatibility, not a bug. Mention that it wasn't fixed as of
7911 flex 2.5.33.
7912
7913 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7914
7915 * examples/extexi: Enforce the precedence of concatenation over
7916 >>.
7917 Reported by Tommy Nordgren.
7918
7919 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7920
7921 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7922 with the member "token".
7923 Reported by Martin Nylin.
7924
7925 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7926
7927 * data/glr.c: Switch to Bison 2.2 special-exception language in
7928 the copyright notice. Use more-regular format for titles and
7929 copyright notices.
7930 * data/glr.cc: Likewise.
7931 * data/location.cc: Likewise.
7932 * data/yacc.cc: Likewise.
7933 * doc/bison.texinfo (Conditions): Document this.
7934 * NEWS: likewise. Upgrade version to 2.2.
7935
7936 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
7937
7938 * data/glr.cc: Remove dead code.
7939
7940 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7941
7942 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7943 that variable and the line breaks the bootstrap. Problem reported
7944 by Juan M. Guerrero.
7945
7946 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7947
7948 * doc/bison.texinfo (Multiple start-symbols): New.
7949
7950 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7951
7952 * etc/README, etc/bench.pl: New.
7953
7954 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
7955
7956 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7957 rule.
7958 Reported by Mickael Labau.
7959 * tests/input.at (Torturing the Scanner): Test it.
7960
7961 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7962
7963 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7964 Problem reported by Bob Rossi.
7965
7966 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7967
7968 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7969 and didn't really work.
7970 For the index, use @ifnotinfo, not @iftex.
7971 Minor cleanups of spacing and terminology.
7972
7973 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7974
7975 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7976 of AT_NAME_PREFIX when %name-prefix is not used.
7977
7978 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7979
7980 Apply --prefix to C++ skeletons too: they change the namespace.
7981 The test suite already exercize these cases.
7982 * data/c++.m4 (b4_namespace): New.
7983 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7984 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7985 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7986 * doc/bison.texinfo: Document it.
7987 (Option Cross Key): Use @multitable in all formats. It looks
7988 nicer, even in TeX outputs.
7989 (Rules): Use the same code whatever the output type is.
7990 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7991 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7992 * tests/calc.at: Use it, instead of hard coding `yy'.
7993
7994 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7995
7996 * TODO: Remove dead items.
7997
7998 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7999
8000 * doc/FAQ: Remove, merged into...
8001 * doc/bison.texinfo (FAQ): this.
8002 * doc/Makefile.am (EXTRA_DIST): Adjust.
8003
8004 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8005
8006 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8007 even if empty.
8008 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8009 * doc/bison.texinfo (Calc++ Scanner): Use it.
8010
8011 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8012
8013 Fix two nits reported by twlevo, plus one more that I discovered.
8014
8015 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8016 this is the usual Bison style.
8017 * src/location.h (location_print): Likewise.
8018
8019 * src/reader.h (token_name): Likewise.
8020
8021 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8022
8023 Fix some nits reported by twlevo.
8024 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8025 and "POSIX". Use more-modern syntax for URLs. Mention C++
8026 and ask for Java. Don't hardwire OS version numbers. Add
8027 copyright notice.
8028 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8029 * src/conflicts.c (solved_conflicts_obstack): Now static.
8030
8031 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8032
8033 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8034 page. Say "you can use it" not "you may use it" as on the web page;
8035 we're describing capabilities not granting permission.
8036
8037 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8038
8039 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8040 shadowing warnings. Use usual patter for iterating through RHS.
8041 * tests/glr-regression.at
8042 (Uninitialized location when reporting ambiguity):
8043 Modify yylex so that it uses its argument, rather than trying
8044 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8045 const char -> char const.
8046
8047 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8048 Don't use tabs inside commands; it messes up 'ps'.
8049 Problem reported by twlevo.
8050
8051 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8052
8053 * tests/glr-regression.at (Uninitialized location when reporting
8054 ambiguity): New test case.
8055 * data/glr.c (yyresolveLocations): New function, which uses
8056 YYLLOC_DEFAULT.
8057 (yyresolveValue): Invoke yyresolveLocations before reporting an
8058 ambiguity.
8059 * doc/bison.texinfo (Default Action for Locations): Note
8060 YYLLOC_DEFAULT's usage for ambiguity locations.
8061 (GLR Semantic Actions): Cross-reference those notes.
8062
8063 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8064
8065 * tests/glr-regression.at (Leaked semantic values when reporting
8066 ambiguity): Remove unnecessary union and type declarations.
8067 (Leaked lookahead after nondeterministic parse syntax error): New test
8068 case.
8069 * data/glr.c (yyparse): Check for zero stacks remaining before
8070 attempting to shift the lookahead so that you don't lose it.
8071
8072 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8073
8074 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8075 * tests/glr-regression.at (Leaked semantic values when reporting
8076 ambiguity): New test case.
8077 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8078 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8079 now unnecessary yystackp parameter.
8080 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8081 destructors can be called.
8082
8083 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8084 in existing testcases.
8085
8086 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8087
8088 Don't leak semantic values for parent RHS when a user action cuts the
8089 parser, and clean up related code a bit.
8090 * tests/glr-regression.at (Leaked merged semantic value if user action
8091 cuts parse): Rename to...
8092 (Leaked semantic values if user action cuts parse): ... this. Add check
8093 for leaked parent RHS values.
8094 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8095 between an unresolved state (non-empty chain of semantic options) and
8096 an incomplete one (signaled by an empty chain).
8097 (yyresolveStates): Document the interface. Move all manipulation of a
8098 successfully or unsuccessfully resolved yyGLRState to...
8099 (yyresolveValue): ... here so that yyresolveValue always leaves a
8100 yyGLRState with consistent data and thus is easier to understand.
8101 Remove the yyvalp and yylocp parameters since they are always just
8102 taken from the yys parameter. When reporting a discarded merged value
8103 in debugging output, note that it is incompletely merged. Document the
8104 interface.
8105 (yyresolveAction): If resolving any of the RHS states fails, destroy
8106 them all rather than leaking them. Thus, as long as user actions are
8107 written to clean up the RHS correctly, yyresolveAction always cleans up
8108 the RHS of a semantic option. Document the interface.
8109
8110 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8111
8112 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8113 led to a segmentation fault in GNU Pascal. Problem reported
8114 by Waldek Hebisch.
8115
8116 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8117
8118 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8119 mid-rule action inside a nonterminal symbol in order to declare a
8120 destructor for its semantic value.
8121
8122 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8123
8124 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8125 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8126 __cplusplus && ! defined _STDLIB_H && !
8127 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8128 defined free))]: Include <stdlib.h> rather than rolling our own
8129 declarations of malloc and free, to avoid problems with
8130 incompatible declarations (using 'throw') C++'s stdlib.h. This
8131 should fix Debian bug 340012
8132 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8133 reported by Guillaume Melquiond.
8134
8135 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8136
8137 * NEWS: Clarify symbols versus types in unused-value warnings.
8138
8139 * configure.ac (AC_INIT): Bump version number.
8140
8141 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8142
8143 * NEWS: Version 2.1a.
8144 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8145 since C99 requires this.
8146
8147 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8148
8149 * m4/c-working.m4: New file.
8150 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8151
8152 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8153
8154 * Makefile.maint: Merge from coreutils.
8155
8156 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8157
8158 More portability fixes for problems summarized by Nelson H. F. Beebe.
8159
8160 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8161 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8162 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8163 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8164 messes up because C++ code is compiled in 32-bit mode but linked
8165 in 64-bit mode.
8166
8167 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8168
8169 More portability fixes for problems summarized by Nelson H. F. Beebe.
8170
8171 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8172 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8173
8174 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8175 nodist_PROGRAMS, since we don't need to actually compile the
8176 example if we're just doing a plain 'make'. This avoids bothering
8177 the installer unnecessarily about problems due to weird C++
8178 compilers.
8179
8180 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8181
8182 More portability fixes for problems summarized by Nelson H. F. Beebe.
8183
8184 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8185 than #include "...", and compile with -I'.'. The old method was
8186 not portable, according to Posix and the C standard, and it does
8187 not work with Sun C 5.7, where previous #line directives affect
8188 the working directory used in later #include "..." directives.
8189
8190 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8191
8192 Various DJGGP specific issues in /djgpp
8193
8194 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8195
8196 More portability fixes for problems summarized by Nelson H. F. Beebe.
8197
8198 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8199 '#include <map>' works and that you can apply ++ to iterators.
8200
8201 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8202
8203 Work around portability problems summarized by Nelson H. F. Beebe in
8204 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8205
8206 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8207 that '#include <string>' works.
8208
8209 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8210 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8211 "warning: sorry: semantics of inline function static data `const
8212 unsigned char translate_table[262]' are wrong (you'll wind up with
8213 multiple copies)".
8214
8215 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8216 or, xor to not_, and_, or_, and xor_, respectively. This works
8217 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8218 random system header somewhere that includes the equivalent of
8219 <iso646.h>.
8220
8221 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8222 -E" works; it apparently doesn't work with PathScale EKO Compiler
8223 Suite Version 2.0.
8224
8225 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8226
8227 During deterministic GLR operation, user actions should be able to
8228 influence the parse by changing yychar. To make this easier to fix and
8229 to make glr.c easier to evolve in general, don't maintain yytoken in
8230 parallel with yychar; just compute yytoken when needed.
8231 * tests/glr-regression.at (Incorrect lookahead during deterministic
8232 GLR): Check that setting yychar in a user action has the intended
8233 effect.
8234 * data/glr.c (yyGLRStack): Remove yytokenp member.
8235 (yyclearin): Don't set *yytokenp.
8236 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8237 yychar rather than *yytokenp to determine the current lookahead.
8238 Compute yytoken locally when needed.
8239 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8240 point to.
8241
8242 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8243 after `--report' documentation.
8244
8245 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8246
8247 * src/parse-gram.y (grammar_declaration): Location of printer
8248 symbol is @1, not list->location. Bug reported by twlevo.
8249 * tests/input.at (Incompatible Aliases): Adjust to above change.
8250
8251 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8252
8253 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8254 all the test at once. This makes the output easier to read in the
8255 normal case.
8256
8257 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8258 got from <http://bro-ids.org/download.html>. The bug is that
8259 when two actions appeared in succession, the second one was
8260 scanned before the first one was added to the grammar rule
8261 as a midrule action. Bison then output the incorrect warning
8262 "parse.y:905.17-906.36: warning: unused value: $3".
8263 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8264 associated with a value.
8265 (rhs): Don't invoke grammar_current_rule_action_append.
8266 (action): Invoke it here instead.
8267 * src/reader.c (grammar_midrule_action): Now extern.
8268 (grammar_current_rule_action_append): Don't invoke
8269 grammar_midrule_action; that is now the scanner's job.
8270 * src/reader.h (last_string, last_braced_code_loc):
8271 (grammar_midrule_action): New decls.
8272 * src/scan-gram.l (last_string): Now extern, sigh.
8273 (last_braced_code_loc): New extern variable.
8274 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8275 rule already has an action.
8276 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8277 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8278 Add some tests to check that the above changes fixed the bug.
8279
8280 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8281
8282 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8283 All used changed. Check whether the symbol has a destructor,
8284 not whether it is typed.
8285 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8286 that the values are still reported as unused. All line numbers
8287 adjusted.
8288
8289 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8290
8291 Work around a bug in bro 0.8, which underparenthesizes its
8292 definition of YYLLOC_DEFAULT.
8293 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8294 their arguments.
8295 * data/lalr1.cc: Likewise.
8296 * data/yacc.cc: Likewise.
8297
8298 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8299
8300 Work around a bug in Pike 7.0, and give the Pike folks a
8301 better way to override the usual int widths.
8302 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8303 user can override the types.
8304 (short): #undef, to work around a bug in Pike 7.0.
8305 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8306 (union yyalloc.yyss): Use yytype_int16 rather than short.
8307 All uses changed.
8308 (yysigned_char): Remove.
8309 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8310 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8311 * tests/regression.at (Web2c Actions): Adjust to above changes.
8312
8313 * src/reader.c (check_and_convert_grammar): New function.
8314 (reader): Close the input file even if something went wrong during
8315 parsing. Minor file descriptor leak reported by twlevo.
8316
8317 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8318 to pacify gcc -Wswitch-default.
8319 * src/scan-gram.l (adjust_location): Use a default: break; case
8320 to pacify gcc -Wswitch-default.
8321 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8322 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8323 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8324 Move these decls to scan-skel.l, since they don't need to be
8325 visible elsewhere.
8326 * src/scan-skel.l: Accept the above decls.
8327 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8328 is used.
8329
8330 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8331
8332 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8333 since we don't want to insist on a version number at the start
8334 of the changelog every time.
8335 * Makefile.maint: Sync from coreutils a bit better.
8336 (sc_trailing_blank): Renamed from sc_trailing_space.
8337 All uses changed.
8338 (sc_no_if_have_config_h, sc_require_config_h):
8339 (sc_prohibit_assert_without_use): New rules.
8340 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8341 (sc_dd_max_sym_length): Fix leading spaces in rule.
8342 (sc_system_h_headers): Prefix with @.
8343 (sc_useless_cpp_parens, m4-check): Output line numbers.
8344 (changelog-check): Allow version only in head.
8345 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8346 satisfy new Makefile.maint rule.
8347 * data/glr.c: Likewise.
8348 * data/glr.cc: Likewise.
8349 * data/lalr1.cc: Likewise.
8350 * data/yacc.c: Likewise.
8351 * lib/ebitsetv.c: Likewise.
8352 * lib/lbitset.c: Likewise.
8353 * lib/subpipe.c: Likewise.
8354 * lib/timevar.c: Likewise.
8355 * src/system.h: Likewise.
8356 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8357 * djgpp/Makefile.maint: Add copyright notice.
8358 * djgpp/README.in: Likewise.
8359 * djgpp/config.bat: Likewise.
8360 * djgpp/config.site: Likewise.
8361 * djgpp/config_h.sed: Likewise.
8362 * djgpp/djunpack.bat: Likewise.
8363 * djgpp/config.sed: Fix copyright notice to match standard format.
8364 * djgpp/subpipe.h: Likewise.
8365 * lib/bitsetv-print.c: Likewise.
8366 * lib/bitsetv.c: Likewise.
8367 * lib/subpipe.h: Likewise.
8368 * lib/timevar.c: Likewise.
8369 * lib/timevar.h: Likewise.
8370 * djgpp/subpipe.c: Use standard recipe for config.h.
8371 * lib/abitset.c: Likewise.
8372 * lib/bitset.c: Likewise.
8373 * lib/bitset_stats.c: Likewise.
8374 * lib/bitsetv-print.c: Likewise.
8375 * lib/bitsetv.c: Likewise.
8376 * lib/ebitsetv.c: Likewise.
8377 * lib/get-errno.c: Likewise.
8378 * lib/lbitset.c: Likewise.
8379 * lib/subpipe.c: Likewise.
8380 * lib/timevar.c: Likewise.
8381 * lib/vbitset.c: Likewise.
8382 * tests/local.at: Likewise.
8383 * src/scan-gram.l: Don't include verify.h, since system.h does
8384 that for us.
8385 * .x-sc_require_config_h: New file.
8386 * .x-sc_unmarked_diagnostics: New file.
8387
8388 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8389
8390 Be a bit more systematic about using 'abort'.
8391 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8392 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8393 Put 'default: abort ();' before some other case, to satisfy older
8394 pedantic compilers.
8395 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8396 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8397 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8398 * src/conflicts.c (resolve_sr_conflict): Likewise.
8399 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8400 (get_decision_str, get_orientation_str, get_node_alignment_str):
8401 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8402 (get_linestyle_str, get_arrowstyle_str): Likewise.
8403 * src/conflicts.c (resolve_sr_conflict):
8404 Use a default case rather than one for the one remaining enum
8405 value, to catch invalid enum values as well.
8406 * src/lalr.c (set_goto_map, map_goto):
8407 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8408 * src/nullable.c (nullable_compute, token_definitions_output):
8409 Likewise.
8410 * src/reader.c (packgram, reader): Likewise.
8411 * src/state.c (transitions_to, state_new, state_reduction_find):
8412 Likewise.
8413 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8414 (symbol_pack): Likewise.
8415 * src/tables.c (conflict_row, pack_vector): Likewise.
8416 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8417 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8418 * src/system.h: Don't include <assert.h>.
8419 (assert): New macro.
8420
8421 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8422 (Destructor Decl, Parser Function, Pure Calling):
8423 Describe rules for braces inside C code more carefully.
8424
8425 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8426
8427 Fix some porting glitches found by Nelson H. F. Beebe.
8428 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8429 compilers that don't understand that abort () does not return.
8430 * src/state.c (transitions_to): Likewise.
8431 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8432 that '#include <cstdlib>' works.
8433 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8434 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8435 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8436 for the benefit of some pre-C99 compilers.
8437
8438 * bootstrap: Undo changes to gnulib files that autoreconf made.
8439
8440 Minor fixups to get 'make maintainer-check' to work.
8441 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8442 with the new verify.h implementation.
8443 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8444 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8445 * data/yacc.c (YYUSE): Likewise.
8446 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8447 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8448 * src/parse-gram.y (declaration): Don't pass a string constant
8449 to a function that expects char *, since GCC might complain
8450 about the constant value.
8451 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8452 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8453 before #defining them.
8454 * tests/glr-regression.at
8455 (Incorrectly initialized location for empty right-hand side in GLR):
8456 In yyerror, use the msg arg.
8457 (Corrupted semantic options if user action cuts parse):
8458 (Incorrect lookahead during deterministic GLR):
8459 (Incorrect lookahead during nondeterministic GLR):
8460 Don't name a local var 'index'; it shadows string.h's 'index'.
8461
8462 2006-01-19 Akim Demaille <akim@epita.fr>
8463
8464 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8465 location, not just parts of it.
8466
8467 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8468
8469 * NEWS: Document the fact that multiple %unions are now allowed.
8470 * doc/bison.texinfo (Union Decl): Likewise.
8471 * TODO: This feature is now implemented, so remove it from
8472 the wishlist.
8473
8474 * Makefile.maint: Merge with coreutils Makefile.maint.
8475 (CVS_LIST): Use build-aux version if available.
8476 (VERSION_REGEXP): New macro.
8477 (syntax-check-rules): Add sc_no_if_have_config_h,
8478 sc_prohibit_assert_without_use, sc_require_config_h,
8479 sc_useless_cpp_parens.
8480 (sc_obsolete_symbols): Check for O_NDELAY.
8481 (sc_dd_max_sym_length): Track coreutils.
8482 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8483 (sc_useless_cpp_parens): New rule.
8484 (news-date-check): Look for version or today's date.
8485 (changelog-check): Don't require version number near head.
8486 (copyright-check): Use current year instead of hardwiring 2005.
8487 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8488 (announcement): Add --gpg-key-ID.
8489
8490 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8491 with "file system".
8492
8493 Avoid undefined behavior that addressed just before the start of an
8494 array. Problem reported by twlevo.
8495 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8496 * src/lalr.c (build_relations): Rely on new sentinel.
8497 * src/gram.c (gram_free): Adjust to new sentinel.
8498
8499 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8500
8501 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8502 yylookaheadNeeds. All uses updated.
8503 (yysplitStack): Rename local yynewLookaheadStatuses to
8504 yynewLookaheadNeeds.
8505 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8506 GLR): In comments, change `lookahead status' to `lookahead need'.
8507
8508 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8509
8510 * data/glr.c (yysplitStack): A little stylistic rewrite.
8511
8512 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8513
8514 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8515
8516 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8517
8518 * doc/bison.texinfo: Fix some typos.
8519 (GLR Semantic Actions): New subsection discussing special
8520 considerations because GLR semantic actions might be deferred.
8521 (Actions): Mention look-ahead usage of yylval.
8522 (Actions and Locations): Mention look-ahead usage of yylloc.
8523 (Special Features for Use in Actions): Add YYEOF entry and mention it
8524 in the yychar entry.
8525 In the yychar entry, remove mention of the local yychar case (pure
8526 parser) since this is irrelevant information when writing semantic
8527 actions and since it's already discussed in `Table of Symbols' where
8528 yychar is otherwise described as an external variable.
8529 In the yychar entry, don't call it the `current' look-ahead since it
8530 isn't when semantic actions are deferred.
8531 In the yychar and yyclearin entries, add note about deferred semantic
8532 actions.
8533 Add yylloc and yylval entries discussing look-ahead usage.
8534 (Look-Ahead Tokens): When discussing yychar, don't call it the
8535 `current' look-ahead, and do mention yylval and yylloc.
8536 (Error Recovery): Cross-reference `Action Features' when mentioning
8537 yyclearin.
8538 (Table of Symbols): In the yychar entry, don't call it the `current'
8539 look-ahead.
8540 In the yylloc and yylval entries, mention look-ahead usage.
8541
8542 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8543
8544 * tests/glr-regression.at: Update copyright year to 2006.
8545
8546 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8547
8548 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8549 use during nondeterministic operation to track which stacks have
8550 actually needed the current lookahead.
8551 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8552 Allocate, deallocate, resize, and otherwise shuffle space for
8553 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8554 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8555 appropriately during nondeterministic operation.
8556 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8557 members to store the current lookahead to be used by the deferred
8558 user action.
8559 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8560 from which the RHS is taken. Set the lookahead members of the new
8561 yySemanticOption according to the lookahead status for stack yyk.
8562 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8563 yyaddDeferredAction.
8564 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8565 members of yySemanticOption before invoking yyuserAction, and then set
8566 them back to their current values afterward.
8567 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8568 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8569 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8570 titles for consistency.
8571 (Leaked merged semantic value if user action cuts parse): In order to
8572 suppress lint warnings, use arguments in merge function, and assign
8573 char value < 128 in main.
8574 (Incorrect lookahead during deterministic GLR): New test case.
8575 (Incorrect lookahead during nondeterministic GLR): New test case.
8576
8577 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8578
8579 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8580 !yyvaluep as signal that no semantic value is available to print.
8581 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8582 to print a semantic value.
8583
8584 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8585
8586 * tests/glr-regression.at: For consistency with my newer test cases,
8587 don't thank myself.
8588
8589 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8590
8591 * data/glr.c (yyresolveValue): When merging semantic options, if at
8592 least one user action succeeds but a later one cuts the parse, then
8593 destroy the semantic value before returning rather than leaking it.
8594 (yyresolveStates): If a user action cuts the parse and thus
8595 yyresolveValue fails, ignore the (unset) semantic value rather than
8596 corrupting the yyGLRState, and empty the semantic options list since
8597 the user actions should have called all necessary destructors.
8598 Simplify code with YYCHK.
8599 * tests/glr-regression.at (Corrupted semantic options if user action
8600 cuts parse): New test case.
8601 (Undesirable destructors if user action cuts parse): New test case.
8602 Before applying any of this patch, this test case never actually failed
8603 for me... but only because the corrupted semantic options usually
8604 masked this bug.
8605 (Leaked merged semantic value if user action cuts parse): New test
8606 case.
8607
8608 2006-01-05 Akim Demaille <akim@epita.fr>
8609
8610 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8611
8612 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8613
8614 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8615 _MSC_VER. Problem reported by Cenzato Marco.
8616 (b4_c_function_def): Use it.
8617 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8618 b4_c_modern.
8619 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8620 than rolling our own.
8621
8622 2006-01-04 Akim Demaille <akim@epita.fr>
8623
8624 Also warn about non-used mid-rule values.
8625 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8626 member.
8627 (symbol_list_new): Adjust.
8628 * src/reader.c (symbol_typed_p): New.
8629 (grammar_rule_check): Use it.
8630 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8631 Check its rule.
8632 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8633 Use it.
8634 * tests/actions.at (Exotic Dollars): Adjust.
8635
8636 2006-01-04 Akim Demaille <akim@epita.fr>
8637
8638 * src/reader.c (grammar_midrule_action): If $$ is set in a
8639 mid-rule, move the `used' bit to its lhs.
8640 * tests/input.at (Unused values): New.
8641 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8642
8643 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8644
8645 * doc/bison.texinfo (Bison Options): Say more accurately what
8646 --yacc does.
8647 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8648 about declarations in the grammar when in Yacc mode, as POSIX does
8649 not require a diagnostic when the grammar uses extensions.
8650
8651 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8652
8653 Warn about dubious constructions like "%token T T".
8654 Reported by twlevo.
8655 * src/symtab.h (struct symbol.declared): New member.
8656 * src/symtab.c (symbol_new): Initialize it to false.
8657 (symbol_class_set): New arg DECLARING, specifying whether
8658 this is a declaration that we want to warn about, if there
8659 is more than one of them. All uses changed.
8660
8661 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8662 Allow multiple %union directives, whose contents concatenate.
8663 * src/parse-gram.y (grammar_declaration): Likewise.
8664 Use muscle_code_grow, so that we don't need stype_line any more.
8665 All uses changed.
8666
8667 * src/muscle_tab.c (muscle_grow): Fix comment.
8668
8669 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8670 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8671 Update copyright year to 2006.
8672
8673 2006-01-03 Akim Demaille <akim@epita.fr>
8674
8675 Have glr.cc pass (some of) the calc.at tests.
8676 * data/glr.cc (b4_parse_param_orig): New.
8677 (b4_parse_param): Improve its definition, and bound it more
8678 clearly in the skeleton.
8679 (b4_epilogue): Append, instead of prepending, in order to keep
8680 #line consistency.
8681 Simplify the generation of auxiliary functions: locations and
8682 purity are mandated.
8683 (b4_global_tokens_and_yystype): Honor it.
8684 * data/location.cc (c++.m4): Don't include it.
8685 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8686 and AT_SKEL_CC_IF.
8687 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8688 AT_LALR1_CC_IF.
8689 Be sure to initialize the first position's filename.
8690 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8691 mandated anyway.
8692 (AT_CHECK_CALC_GLR_CC): New.
8693 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8694
8695 2006-01-02 Akim Demaille <akim@epita.fr>
8696
8697 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8698 c.m4.
8699 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
8700 * data/glr.cc: Do not include stack.hh.
8701
8702 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8703
8704 * data/glr.c: Reformat whitespace with tabs.
8705 (b4_lpure_formals): Remove this unused m4 macro.
8706 * tests/cxx-type.at: Reformat whitespace with tabs.
8707 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8708 since it's a member. Rename type to isNterm for clarity.
8709
8710 2005-12-29 Akim <akim@sulaco.local>
8711
8712 Let glr.cc catch up with symbol_value_print.
8713 * data/glr.cc (b4_yysymprint_generate): Replace by...
8714 (b4_yy_symbol_print_generate): this.
8715 (yy_symbol_print, yy_symbol_value_print): Declare them.
8716
8717 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8718
8719 * src/location.h (boundary): Note that a line or column equal
8720 to INT_MAX indicates an overflow.
8721 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8722 (rule_length_overflow, increment_rule_length, add_column_width):
8723 New functions.
8724 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8725 (<SC_BRACED_CODE>"}"):
8726 Use increment_rule_length rather than incrementing it by hand.
8727 (adjust_location, handle_syncline): Diagnose overflow.
8728 (handle_action_dollar, handle_action_at):
8729 Fix bug with monstrosities like $-2147483648.
8730 Remove now-unnecessary checks.
8731 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8732 (convert_ucn_to_byte): Verify assumptions.
8733 (handle_syncline): New arg LOC. All callers changed.
8734 Don't store through a value derived from char const * pointer.
8735
8736 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8737 GCC warnings.
8738
8739 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8740
8741 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8742 Remove unnecessary forward static decls.
8743
8744 2005-12-27 Akim Demaille <akim@epita.fr>
8745
8746 * src/reader.c (grammar_current_rule_check): Also check that $$
8747 is used.
8748 Take the rule to check as argument, hence rename as...
8749 (grammar_rule_check): this.
8750 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8751 Rename as...
8752 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8753 (grammar_midrule_action, grammar_symbol_append): Now static.
8754 * tests/torture.at (input): Don't rely on the default action
8755 being always performed.
8756 * tests/calc.at: "Set" $$ even when the action is "cut" with
8757 YYERROR or other.
8758 * tests/actions.at (Exotic Dollars): Instead of using unused
8759 values, check that the warning is issued.
8760
8761 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8762
8763 * NEWS: Improve wording for unused-value warnings.
8764
8765 2005-12-22 Akim Demaille <akim@epita.fr>
8766
8767 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8768 (b4_yysymprint_generate): Rename as...
8769 (b4_yy_symbol_print_generate): this.
8770 Generate yy_symbol_print instead of yysymprint.
8771 Generate also yy_symbol_value_print, and use it.
8772
8773 2005-12-22 Akim Demaille <akim@epita.fr>
8774
8775 * NEWS: Warn about unused values.
8776 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8777 a `used' member.
8778 (symbol_list_n_get, symbol_list_n_used_set): New.
8779 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8780 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8781 * src/reader.c (grammar_current_rule_check): Check that values are
8782 used.
8783 * src/symtab.c (symbol_print): Accept 0.
8784 * tests/existing.at: Remove the type information.
8785 Empty the actions.
8786 Remove useless actions (beware of mid-rule actions: perl -000
8787 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8788 * tests/actions.at (Exotic Dollars): Use unused values.
8789 * tests/calc.at: Likewise.
8790 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8791 Likewise.
8792
8793 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8794 rule_useful_p.
8795
8796 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8797
8798 Undo 2005-12-01 tentative license wording change. The wording is
8799 still being reviewed by the lawyers, and we don't want to wait for
8800 them before publishing a test release. For now, revert to the
8801 previous wording.
8802 * NEWS: Undo 2005-12-01 change.
8803 * data/glr.c: Revert to previous license wording.
8804 * data/glr.cc: Likewise.
8805 * data/lalr1.cc: Likewise.
8806 * data/location.cc: Likewise.
8807 * data/yacc.c: Likewise.
8808
8809 * NEWS: Reword %destructor vs YYABORT etc.
8810 * data/glr.c: Use American spacing, for consistency.
8811 * data/glr.cc: Likewise.
8812 * data/lalr1.cc: Likewise.
8813 * data/yacc.c: Likewise.
8814 * data/yacc.c: Reformat comments slightly.
8815 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8816 for consistency. Fix some spelling errors and reword recently-included
8817 text slightly.
8818 * tests/cxx-type.at: Cast results of malloc, for C++.
8819
8820 2005-12-21 Joel E. Denny <address@hidden>
8821
8822 * tests/cxx-type.at: Construct a tree, count the parents of shared
8823 nodes, and free each node once and only once. Previously, the memory
8824 for semantic values was leaked instead.
8825
8826 2005-12-21 Joel E. Denny <address@hidden>
8827
8828 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8829 (yylval, yylloc): If pure, #define to yystackp->yyval and
8830 yystackp->yyloc similar to yychar and yynerrs.
8831 (yyparse): If pure, remove local yylval and yylloc. Add local
8832 yystackp to accommodate pure definitions of yylval and yylloc.
8833 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8834 yylvalp and yyllocp to &yylval and &yylloc.
8835 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8836 namespace. Previously, nerrs and char were missing, but lval and lloc
8837 weren't necessary.
8838 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8839 yylvalp and yyllocp parameters since, if pure, these are now always
8840 accessible through yystackp. If not pure, they are still accessible
8841 globally.
8842 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8843 `if (YYID (N))' to pacify lint.
8844
8845 2005-12-21 Akim Demaille <akim@epita.fr>
8846
8847 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8848 destroy the RHS symbols of a rule.
8849 * data/yacc.c (yylen): Initialize to 0.
8850 Keep its value to the number of items to possibly shift.
8851 In particular, a regular successful parse that ends on YYFINAL by
8852 a (internal) YYACCEPT must not have yylen != 0.
8853 (yyerrorlab, yyreturn): Pop the RHS.
8854 Reorder a bit to emphasize the `shifting' bits of code.
8855 (YYPOPSTACK): Now accept a number of items to pop.
8856 * data/lalr1.cc: Likewise.
8857 * data/glr.c: Formatting changes.
8858 Use goto instead of fall through.
8859 * doc/bison.texinfo (Destructor Decl): Complete.
8860
8861 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8862
8863 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8864 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8865 * djgpp/config.bat: Replace every occurence of the file name
8866 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8867 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8868 * djgpp/config.sed: Replace every occurence of the file name
8869 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8870 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8871 * djgpp/djunpack.bat: DJGPP specific file.
8872 * djgpp/fnchange.lst: DJGPP specific file.
8873 * djgpp/README.in: Add new information about how to unpack the bison
8874 source on MSDOS and other systems which have 8.3 file name restrictions
8875 using djunpack.bat and fnchange.lst.
8876
8877 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8878
8879 * bootstrap (build_cvs_prefix): Remove; unused.
8880 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8881 when getting gnulib.
8882
8883 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8884
8885 * data/glr.c: Reorder typedef declarations for structs to match order
8886 of struct declarations.
8887 Rename yystack everywhere to yystackp except in yyparse where it's not
8888 a pointer.
8889 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8890 consistency.
8891 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8892 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8893 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8894 lint.
8895
8896 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8897
8898 * tests/sets.at (Accept): Fix typos in regular expression used to
8899 sed out the final state number.
8900
8901 Work around portability problem on Solaris 10: flex-generated
8902 files include <stdio.h> before <config.h>, which messes up
8903 because the latter defines __EXTENSIONS__. Address the problem
8904 by creating two new little files that include <config.h> first,
8905 then include the flex-generated files. Rewrite everyone else
8906 to include <config.h> first, as well.
8907 * lib/timevar.c: Always include "config.h".
8908 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8909 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8910 (EXTRA_bison_SOURCES): New macro.
8911 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8912 * src/system.h: Don't include config.h.
8913 * src/LR0.c: Include <config.h> first.
8914 * src/assoc.c: Likewise.
8915 * src/closure.c: Likewise.
8916 * src/complain.c: Likewise.
8917 * src/conflicts.c: Likewise.
8918 * src/derives.c: Likewise.
8919 * src/files.c: Likewise.
8920 * src/getargs.c: Likewise.
8921 * src/gram.c: Likewise.
8922 * src/lalr.c: Likewise.
8923 * src/location.c: Likewise.
8924 * src/main.c: Likewise.
8925 * src/muscle_tab.c: Likewise.
8926 * src/nullable.c: Likewise.
8927 * src/output.c: Likewise.
8928 * src/parse-gram.y: Likewise.
8929 * src/print.c: Likewise.
8930 * src/print_graph.c: Likewise.
8931 * src/reader.c: Likewise.
8932 * src/reduce.c: Likewise.
8933 * src/relation.c: Likewise.
8934 * src/state.c: Likewise.
8935 * src/symlist.c: Likewise.
8936 * src/symtab.c: Likewise.
8937 * src/tables.c: Likewise.
8938 * src/uniqstr.c: Likewise.
8939 * src/vcg.c: Likewise.
8940
8941 * src/parse-gram.y: Fix minor problems uncovered by lint.
8942 (current_lhs, current_lhs_location): Now static.
8943 (current_assoc): Remove unused variable.
8944
8945 Cleanups so that Bison-generated parsers have less lint.
8946 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8947 Prepend /*ARGSUSED*/, for lint's sake.
8948 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8949 definition if 'lint' is defined.
8950 (YYID): New macro (or function, if lint).
8951 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8952 * data/yacc.c: Likewise.
8953 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8954 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8955 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8956 is C++ only.
8957 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8958 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8959 Use YYID(0) rather than 0, for lint.
8960 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8961 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8962
8963 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8964
8965 * tests/glr-regression.at
8966 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8967 Close memory leak reported by twlevo.
8968
8969 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8970
8971 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8972 all stacks.
8973 (yyparse): Iterate another stack in order to call user destructors.
8974 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8975 New test case.
8976 (Duplicated user destructor for lookahead): This test now is expected
8977 to succeed.
8978
8979 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8980
8981 * NEWS: Document the following change.
8982 * data/yacc.c: Say "parser skeleton" rather than "file", since
8983 it's no longer just a file.
8984 * data/glr.c: Grant a special exception for C GLR parsers, that
8985 reads like the already-existing exception for C LALR(1) parsers.
8986 * data/glr.cc: Likewise.
8987 * data/lalr1.cc: Likewise.
8988 * data/location.cc: Likewise.
8989 * data/yacc.c: Reword the "written by" statement to clarify that
8990 it was the parser skeleton, not the entire output file.
8991 * data/glr.c: Written by Paul Hilfinger.
8992 * data/glr.cc: Written by Akim Demaille.
8993 * data/lalr1.cc: Likewise.
8994
8995 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8996
8997 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8998 Fix typos in previous change that broke 'make check'.
8999 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9000 supported in C.
9001 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9002 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9003 We can revert this once things settle down.
9004
9005 * src/conflicts.c (conflicts_print): Don't print file name twice
9006 when %expect fails because there were no conflicts.
9007 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9008 change.
9009 * tests/conflicts.at (%expect not enough, %expect too much):
9010 (%expect with reduce conflicts): Adjust to new behavior.
9011
9012 2005-11-18 Akim Demaille <akim@epita.fr>
9013
9014 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9015 errors.
9016 * NEWS: Document this.
9017 * doc/bison.texinfo (Expect Decl): Likewise.
9018
9019 2005-11-16 Akim Demaille <akim@epita.fr>
9020
9021 Generalize the display of semantic values and locations in traces.
9022 * data/glr.c (yy_reduce_print): Fix indices (again).
9023 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9024 literal integers.
9025 * data/lalr1.cc (yyreduce_print): Rename as...
9026 (yy_reduce_print): this.
9027 Display values and locations.
9028 * data/yacc.c (yy_reduce_print): Likewise.
9029 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9030 (yysymprint): Move higher to be visible from yy_reduce_print).
9031 (yyparse): Adjust.
9032 * tests/calc.at: Adjust the expected length of the traces.
9033
9034 2005-11-14 Akim Demaille <akim@epita.fr>
9035
9036 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9037 from 1 to N, while values and location start at 0.
9038 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9039
9040 2005-11-14 Akim Demaille <akim@epita.fr>
9041
9042 * data/glr.c (yy_reduce_print): Fix the $ number.
9043
9044 2005-11-14 Akim Demaille <akim@epita.fr>
9045
9046 "Use" parse parameters.
9047 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9048 * data/glr.c, data/glr.cc: Use them.
9049 * data/glr.c (YYUSE): Have a C++ definition that supports
9050 non-pointer types.
9051
9052 2005-11-14 Akim Demaille <akim@epita.fr>
9053
9054 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9055
9056 2005-11-14 Akim Demaille <akim@epita.fr>
9057
9058 * data/glr.cc: New.
9059 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9060
9061 2005-11-12 Akim Demaille <akim@epita.fr>
9062
9063 Let position and location be PODs.
9064 * data/location.cc (position::initialize, location::initialize): New.
9065 (position::position, location::location): Define only if
9066 b4_location_constructors is defined.
9067 * data/lalr1.cc (b4_location_constructors): Define it for backward
9068 compatibility.
9069 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9070
9071 2005-11-12 Akim Demaille <akim@epita.fr>
9072
9073 * data/lalr1.cc: Move the body of the ctor and dtor into the
9074 parser file (instead of the header).
9075 Wrap the implementations in a "namespace yy".
9076
9077 2005-11-12 Akim Demaille <akim@epita.fr>
9078
9079 Have glr.c include its header file when created.
9080 * data/glr.c (b4_shared_declarations): New.
9081 Output them verbatim in the parser if !%defines, otherwise
9082 output then in the header file, and include it instead.
9083
9084 2005-11-11 Akim Demaille <akim@epita.fr>
9085
9086 * data/glr.c: Comment changes.
9087
9088 2005-11-11 Akim Demaille <akim@epita.fr>
9089
9090 When yydebug, report semantic and location values for reductions.
9091 * data/glr.c (yy_reduce_print): Report the semantic values and the
9092 locations.
9093 (YY_REDUCE_PRINT): Adjust.
9094 (yyglrReduce): Use them.
9095 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9096 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9097 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9098 traces.
9099
9100 2005-11-10 Akim Demaille <akim@epita.fr>
9101
9102 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9103 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9104 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9105
9106 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9107
9108 * m4/cxx.m4, examples/Makefile.am: Don't build
9109 examples/calc++ if no C++ compiler is available. (trivial change)
9110
9111 2005-11-09 Akim Demaille <akim@epita.fr>
9112
9113 * src/scan-skel.l: Use a couple of asserts.
9114
9115 2005-11-03 Akim Demaille <akim@epita.fr>
9116
9117 In some (weird) cases, the final state number is incorrect.
9118 Reported by Alexandre Duret-Lutz.
9119 * src/LR0.c (state_list_append): Remove the computation of
9120 final_state.
9121 (save_reductions): Do it here.
9122 (get_state): Alpha conversion.
9123 (generate_states): Use a for loop.
9124 * src/gram.h (item_number_is_rule_number)
9125 (item_number_is_symbol_number): New.
9126 * src/state.c: Use assert.
9127 * src/system.h: Include assert.h.
9128 * tests/sets.at (Accept): New.
9129
9130 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9131
9132 * data/glr.c (yyfill): Adjust comment.
9133 (yyresolveAction): Initialize default location properly
9134 for empty right-hand sides.
9135 (yydoAction): Ditto.
9136 Add comment explaining apparently dead code.
9137 * tests/glr-regression.at
9138 (Incorrectly initialized location for empty right-hand side in GLR):
9139 New test.
9140
9141 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9142
9143 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9144 gnulib when interrupted. This fixes some race conditions and
9145 works around some portability problems (one noted by Paul
9146 Hilfinger).
9147
9148 2005-10-22 Akim <akim@epita.fr>
9149
9150 * Makefile.cfg: Adjust to config -> build-aux.
9151 Reported by twledo.
9152
9153 2005-10-21 Akim Demaille <akim@epita.fr>
9154
9155 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9156 the %parse-params.
9157 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9158 * data/yacc.c (b4_Pure_if): Rename as...
9159 (b4_yacc_pure_if): this.
9160 (YY_SYMBOL_PRINT, yyparse): Adjust.
9161 * doc/bison.texinfo: Formatting changes.
9162
9163 2005-10-21 Akim Demaille <akim@epita.fr>
9164
9165 Finish the transition config -> build-aux.
9166 * configure.ac, Makefile.am: Use build-aux.
9167 * config/prev-version, config/announce-gen, config/Makefile.am:
9168 Move to...
9169 * build-aux/prev-version, build-aux/announce-gen,
9170 * build-aux/Makefile.am: here.
9171
9172 2005-10-14 Akim Demaille <akim@epita.fr>
9173
9174 * examples/calc++/test: Use set -x only when VERBOSE.
9175
9176 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9177
9178 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9179 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9180
9181 2005-10-13 Akim Demaille <akim@epita.fr>
9182
9183 * src/scan-skel.l: Output the base name parts of the parser and
9184 header file names.
9185 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9186 additional checks.
9187 Use this to exercise C++ outputs in subdirs.
9188 Reported by Oleg Smolsky.
9189
9190 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9191
9192 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9193 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9194 Problem reported by John P. Hartmann.
9195 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9196 already defined it.
9197
9198 2005-10-12 Akim Demaille <akim@epita.fr>
9199
9200 * src/parse-gram.y (version_check): Exit 63 to please missing
9201 (stands for "version mismatch).
9202 * tests/input.at, doc/bison.texinfo: Adjust.
9203
9204 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9205
9206 Work around portability problems with Visual Age C compiler
9207 (xlc and xlC_r) reported by John P. Hartmann.
9208 * data/location.cc (initial_column, initial_line): Remove.
9209 All uses replaced by 0 and 1.
9210 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9211 that xlc complains about.
9212 * src/scan-skel.l (skel_wrap): Likewise.
9213 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9214 as __STDC__.
9215 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9216 __STDC_VERSION__. Use it everywhere instead of looking at
9217 __STDC__ and __cplusplus.
9218
9219 2005-10-10 Akim Demaille <akim@epita.fr>
9220
9221 * examples/calc++/test: Be quiet unless VERBOSE.
9222
9223 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9224
9225 * data/c.m4 (yydestruct, yysymprint):
9226 Use YYUSE instead of casting to void.
9227 * data/glr.c (YYUSE): New macro.
9228 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9229 Use it instead of rolling our own.
9230 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9231 (YYCHK1):
9232 Use /*CONSTCOND*/ to suppress lint warnings.
9233 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9234 (YY_STACK_PRINT): Use 'false' not '0'.
9235 (YYUSE): New macro.
9236 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9237 * data/yacc.c (YYUSE): New macro.
9238 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9239 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9240 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9241
9242
9243 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9244 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9245
9246 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9247
9248 Undo the parts of the unlocked-I/O change that substituted
9249 putc or puts for printf. This might hurt performance a bit,
9250 but some people prefer the printf style.
9251 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9252 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9253 All uses replaced by YYFPRINTF and YYDPRINTF.
9254 * data/yacc.c: Likewise.
9255 * lib/bitset.c (bitset_print): Likewise.
9256 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9257 putc and puts.
9258 * lib/lbitset.c (debug_lbitset): Likewise.
9259 * src/closure.c (print_firsts, print_fderives): Likewise.
9260 * src/gram.c (grammar_dump): Likewise.
9261 * src/lalr.c (look_ahead_tokens_print): Likewise.
9262 * src/output.c (escaped_output): Likewise.
9263 (user_actions_output): Break apart two printfs.
9264 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9265 * src/reduce.c (reduce_print): Likewise.
9266 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9267 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9268
9269 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9270 Use assignments rather than casts-to-void to suppress
9271 unused-variable warnings. This pacifies 'lint'.
9272 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9273 unused-variable warnings.
9274
9275 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9276
9277 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9278
9279 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9280
9281 Use unlocked I/O for a minor performance improvement on hosts like
9282 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9283 is to use the gnlib unlocked-io module, and to prefer putc and
9284 puts to printf when either will work (since the latter doesn't
9285 come in an unlocked flavor).
9286 * bootstrap (gnulib_modules): Add unlocked-io.
9287 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9288 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9289 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9290 and similarly for puts and putc and printf.
9291 * data/yacc.c: Likewise.
9292 * lib/bitset.c (bitset_print): Likewise.
9293 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9294 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9295 to printf.
9296 * lib/lbitset.c (debug_lbitset): Likewise.
9297 * src/closure.c (print_firsts, print_fderives): Likewise.
9298 * src/gram.c (grammar_dump): Likewise.
9299 * src/lalr.c (look_ahead_tokens_print): Likewise.
9300 * src/output.c (escaped_output): Likewise.
9301 (user_actions_output): Coalesce two printfs.
9302 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9303 * src/reduce.c (reduce_print): Likewise.
9304 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9305 * src/system.h: Include unlocked-io.h rather than stdio.h.
9306
9307 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9308 this confuses xgettext.
9309
9310 2005-10-02 Akim Demaille <akim@epita.fr>
9311
9312 * bootstrap (gnulib_modules): Add strverscmp.
9313 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9314 * m4/.cvsignore: Add strverscmp.m4.
9315 * src/parse-gram.y (%require): New token, new rule.
9316 (version_check): New.
9317 * src/scan-gram.l (%require): Adjust.
9318 * tests/input.at (AT_REQUIRE): New.
9319 Use it.
9320 * doc/bison.texinfo (Require Decl): New.
9321 (Calc++ Parser): Use %require.
9322
9323 2005-10-02 Akim Demaille <akim@epita.fr>
9324
9325 * data/location.cc: New.
9326
9327 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9328 Akim Demaille <akim@epita.fr>
9329
9330 Make sure -odir/foo.cc creates dir/location.hh etc.
9331 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9332 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9333 (spec_defines_file): Now const.
9334 (dir_prefix): New.
9335 (short_base_name): Remove.
9336 * src/files.c: Adjust.
9337 (dirname.h): Include.
9338 (base_name): Don't prototype it.
9339 (finput): Remove, duplicates gram_in.
9340 (full_base_name, short_base_name): Replace by...
9341 (all_but_ext, all_but_tab_ext): these.
9342 (compute_base_names): Rename as...
9343 (compute_file_name_parts): this.
9344 Update to compute the new variables, including dir_prefix.
9345 Adjust dependencies.
9346 * src/output.c (prepare): Output them.
9347 * src/reader.c: Adjust to use gram_in, not finput.
9348 * src/scan-skel.l (@dir_prefix@): New.
9349
9350 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9351
9352 * lib/subpipe.c: New function end_of_output_subpipe() added
9353 to allow support for non-posix systems. This is a no-op function
9354 for posix systems.
9355
9356 * lib/subpipe.h: New function end_of_output_subpipe() added
9357 to allow support for non-posix systems. This is a no-op function
9358 for posix systems.
9359
9360 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9361 handle the lack of pipe/fork functionality on non-posix systems.
9362
9363 * djgpp/Makefile.maint: DJGPP specific file.
9364
9365 * djgpp/README.in: DJGPP specific file.
9366
9367 * djgpp/config.bat: DJGPP specific configuration file.
9368
9369 * djgpp/config.sed: DJGPP specific configuration file.
9370
9371 * djgpp/config.site: DJGPP specific configuration file.
9372
9373 * djgpp/config_h.sed: DJGPP specific configuration file.
9374
9375 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9376
9377 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9378
9379 2005-10-02 Akim Demaille <akim@epita.fr>
9380
9381 * data/location.cc: New, extract from...
9382 * data/lalr1.cc: here.
9383 (location.hh): Include it after the user prologue, in case the
9384 filename type is defined by the user.
9385 Forward declation location and position before the pre-prologue.
9386 (yyresult_): Rename as...
9387 (yyresult): this, it's a local variable, not an attribute.
9388 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9389
9390 2005-10-01 Akim Demaille <akim@epita.fr>
9391
9392 * examples/extexi: Restore the #line generation.
9393
9394 2005-09-30 Akim Demaille <akim@epita.fr>,
9395 Alexandre Duret-Lutz <adl@gnu.org>
9396
9397 Move the token type and YYSTYPE in the parser class.
9398 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9399 (parser::token): New, from the moved free definition of tokens.
9400 (parser::semantic_value): Now a full definition instead of an
9401 indirection to YYSTYPE.
9402 (b4_post_prologue): No longer included in the header file, but
9403 in the implementation file.
9404 * doc/bison.texi (C+ Language Interface): Update.
9405 * src/parse-gram.y: Support unary %define.
9406 * tests/actions.at: Define global_tokens_and_yystype for backward
9407 compatibility until we update the tests.
9408 * tests/calc.at: Idem.
9409 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9410 to simplify the code.
9411
9412 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9413
9414 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9415 Ah, the good old days! Problem reported by Peter Klein.
9416 * bootstrap (gnulib_modules): Add strerror, strtoul.
9417 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9418 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9419
9420 2005-09-29 Akim Demaille <akim@epita.fr>
9421
9422 * data/c.m4 (b4_error_verbose_if): New.
9423 * data/lalr1.cc: Use it.
9424 (YYERROR_VERBOSE_IF): Remove.
9425 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9426 parser members, replaced by...
9427 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9428 local variables.
9429 (yysyntax_error_): Takes the state number as argument.
9430 (yyreduce_print_): Use the argument yyrule, not the former
9431 attribute yyn_.
9432
9433 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9434
9435 * bootstrap (gnulib_modules): Add verify.
9436 * lib/.cvsignore: Add verify.h.
9437 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9438 * src/system.h (verify): Remove.
9439 Include verify.h instead.
9440 * src/tables.c (tables_generate): Use new API for 'verify'.
9441
9442 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9443
9444 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9445 local variables whose names begin with 'yy'.
9446 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9447 Trivial changes from Joel E. Denny.
9448
9449 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9450 it itself.
9451 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9452 don't use alloca any more.
9453
9454 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9455 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9456 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9457 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9458 to match yacc.c, to test more hosts.
9459
9460 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9461
9462 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9463 doesn't affect behavior.
9464 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9465 Solaris, AIX, MSC.
9466 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9467 This works a bit better with glibc, if user code has already included
9468 stdlib.h.
9469 * doc/bison.texinfo (Bison Parser): Document that users can't
9470 arbitrarily use malloc and free for other purposes. Document
9471 that <alloca.h> and <malloc.h> might be included.
9472 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9473 user must declare alloca.
9474
9475 * HACKING (release): Forwarn the Translation Project about
9476 stable releses.
9477
9478 2005-09-20 Akim Demaille <akim@epita.fr>
9479
9480 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9481
9482 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9483
9484 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9485 (YYSTACK_ALLOC_MAXIMUM): Use it.
9486 (yysyntax_error): New function.
9487 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9488 multiple syntax errors are reported, and alloca is being used.
9489 Instead, reallocate buffers twice as big each time, so that
9490 we waste at most half the allocated memory. Start with a small
9491 (128-byte) buffer that will suffice in most cases anyway.
9492 Use yysyntax_error to do most of the work.
9493
9494 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9495 yynerrs is the number of errors reported, not the number of
9496 errors encountered.
9497
9498 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9499 Mark it as expected to fail.
9500 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9501 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9502 Don't start user-code symbols with "yy", to avoid name space problems.
9503
9504 2005-09-19 Akim Demaille <akim@epita.fr>
9505
9506 Remove the traits, failed experiment.
9507 It never proved useful, and anyway because of the current
9508 definition, it was not possible to have several specialization of
9509 this traits, making it useless.
9510 * data/lalr1.cc (yy:traits): Remove.
9511 Inline its definitions in the parser class.
9512
9513 2005-09-19 Akim Demaille <akim@epita.fr>
9514
9515 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9516 least Mac OSX with a /usr/local install of gettext.
9517
9518 2005-09-19 Akim Demaille <akim@epita.fr>
9519
9520 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9521 and yytoken for similarity with the other skeletons.
9522
9523 2005-09-19 Akim Demaille <akim@epita.fr>
9524
9525 * NEWS, configure.ac: update version number to 2.1a.
9526
9527 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9528
9529 * NEWS: Version 2.1.
9530
9531 * NEWS: Remove notice of yytname change, since it was never in an
9532 official release.
9533 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9534 diagnostic.
9535 * src/output.c (prepare): Likewise.
9536 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9537 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9538 is not defined. This is an awful hack, but it's enough for now.
9539 All callers changed.
9540 * tests/glr-regression-at (make_value): Args are const pointers now,
9541 to avoid GCC warning.
9542 (Duplicated user destructor for lookahead): New test. Currently
9543 skipped. It fails on my host but I'm not sure it'll always fail.
9544
9545 2005-09-16 Akim Demaille <akim@epita.fr>
9546
9547 * src/symtab.h (struct symbol): Declare the printer and destructor
9548 as const, to avoid accidental calls to free.
9549 (symbol_destructor_set, symbol_printer_set): Adjust.
9550 * src/symtab.c: Adjust.
9551
9552 2005-09-16 Akim Demaille <akim@epita.fr>
9553
9554 * data/c.m4 (b4_token_enums): New.
9555 (b4_token_defines): Rename as...
9556 (b4_token_enums_defines): this.
9557 (b4_token_defines): New, output only the #defines.
9558 * data/yacc.c, data/glr.c: Adjust.
9559 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9560 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9561 as default values.
9562
9563 2005-09-16 Akim Demaille <akim@epita.fr>
9564
9565 * data/lalr1.cc (yylex_): Remove, inline its code.
9566 (yyreport_syntax_error_): Remove, replaced by...
9567 (yysyntax_error_): this which returns a string and leaves to the
9568 caller the call to the users' error function.
9569 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9570 Move from members of the parser object...
9571 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9572 to local variables of the parse function.
9573
9574 2005-09-16 Akim Demaille <akim@epita.fr>
9575
9576 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9577 since it's in Bison's name space.
9578
9579 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9580
9581 * data/glr.c (yyresolveValue): Add default case to pacify
9582 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9583
9584 * NEWS: Document when yyparse started to return 2.
9585 * doc/bison.texinfo (Parser Function): Document when yyparse
9586 returns 2.
9587
9588 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9589 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9590 changed.
9591 (class position): file_name -> filename (reverting). All uses changed.
9592
9593 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9594
9595 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9596 do anything if $@ exists. This reverts part of the 2005-07-07
9597 patch.
9598
9599 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9600
9601 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9602 contains obsolete information and isn't worth distributing as a
9603 separate file anyway.
9604 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9605 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9606 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9607 (yyparse): Abort if user code uses longjmp to throw an unexpected
9608 value.
9609
9610 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9611
9612 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9613 Suggested by twlevo@xs4all.nl.
9614
9615 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9616 This avoids a diagnostic from gcc -Wswitch-enum.
9617 Problem reported by twlevo@xs4all.nl.
9618
9619 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9620 standards. Use "file name" or "file" or "name", depending on
9621 the context.
9622 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9623 not to hack/foo.tab.c.
9624 (Calc++ Top Level): 2nd arg of main is not const.
9625 * data/glr.c: b4_filename -> b4_file_name.
9626 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9627 All uses changed.
9628 (class position): filename -> file_name. All uses changed.
9629 * data/yacc.c: b4_filename -> b4_file_name.
9630 * lib/bitset.h: filename -> file_name in local vars.
9631 * lib/bitset_stats.c: Likewise.
9632 * src/files.c: Likewise.
9633 * src/scan-skel.l ("@output ".*\n): Likewise.
9634 * src/files.c (file_name_split): Renamed from filename_split.
9635 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9636
9637 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9638
9639 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9640 to accommodate latest gnulib.
9641
9642 * tests/glr-regression.at (Duplicate representation of merged trees):
9643 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9644
9645 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9646 needed.
9647
9648 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9649
9650 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9651 All uses changed. Invoke user destructor after an error during a
9652 split parse (trivial change from Joel E. Denny).
9653
9654 * tests/glr-regression.at
9655 (User destructor after an error during a split parse): New test case.
9656 Problem reported by Joel E. Denny in:
9657 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9658
9659 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9660
9661 * README-cvs: Give URLs for recommended tools.
9662 Mention Gzip version problem, and bootstrapping issues.
9663 Remove troubleshooting section, as it's somewhat obsolete.
9664
9665 * bootstrap (no_cache): New var, to accommodate different wget
9666 variants. Use it instead of '-C off'. Problem reported by
9667 twlevo@xs4all.nl.
9668
9669 * data/glr.c (yydestroyStackItem): New function.
9670 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9671 debugging information. Problem reported by Joel E. Denny.
9672
9673 2005-08-25 Akim Demaille <akim@epita.fr>
9674
9675 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9676
9677 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9678
9679 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9680 Don't invoke destructor on unresolved entries.
9681 * tests/glr-regression.at
9682 (User destructor for unresolved GLR semantic value): New test case.
9683 Problem reported by Joel E. Denny in:
9684 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9685
9686 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9687
9688 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9689 Add strnlen.c.
9690 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9691 lib-prefix.m4, po.m4.
9692
9693 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9694 in yydestruct diagnostic, since it might not be an error.
9695 Problem reported by Joel Denny near end of
9696 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9697 * data/lalr1.cc (yyerturn): Likewise.
9698 * data/yacc.c (yyreturn): Likewise.
9699 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9700
9701 * src/files.c: Remove obsolete FIXME comment.
9702
9703 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9704 with the other templates, and to fix bogus run-on messages such
9705 as the one reported at the end of
9706 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9707 All callers changed to avoid the newline.
9708 (yyprocessOneStack): Output two lines rather than one, to accommodate
9709 the above change. This changes the debug output format slightly.
9710
9711 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9712 reported by Joel E. Denny in
9713 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9714 (trivial change).
9715 * tests/glr-regression.at (Duplicate representation of merged trees):
9716 New test, from Joel E. Denny in:
9717 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9718 * THANKS: Add Joel E. Denny.
9719
9720 * configure.ac (AC_INIT): Bump to 2.0c.
9721
9722 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9723
9724 * NEWS: Version 2.0b.
9725
9726 * Makefile.am (SUBDIRS): Put examples before tests, so that
9727 "make check" doesn't finish with "All 1 tests passed".
9728
9729 * tests/regression.at (Token definitions): Don't rely on
9730 AT_PARSER_CHECK for data that contains backslashes. It currently
9731 uses 'echo', and 'echo' isn't portable if its argument contains
9732 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9733 that the byte '\0xff' is not printable in the C locale; it is,
9734 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9735 not printable, so use '\0x81' to test.
9736
9737 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9738 version of GCC, since the macro is used with non-GCC compilers.
9739
9740 Fix core dump reported by Pablo De Napoli in
9741 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9742 * tests/regression.at (Invalid inputs with {}): New test.
9743 * src/parse-gram.y (token_name): Translate type before using
9744 it as an index.
9745
9746 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9747 the user's name space. All uses changed to __attribute__
9748 ((__unused__)).
9749 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9750 Add __attribute__ ((__noreturn__)).
9751
9752 * etc/clcommit: Remove. We weren't using it, and it failed
9753 "make maintainer-distcheck".
9754 * Makefile.maint: Merge from coreutils.
9755 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9756 (syntax-check-rules): Change list of rules as described below.
9757 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9758 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9759 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9760 (sc_trailing_space): New rules.
9761 (sc_xalloc_h_in_src): Remove.
9762 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9763 (sc_space_tab, sc_error_exit_success, sc_changelog):
9764 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9765 (makefile-check, po-check, author_mark_check):
9766 (makefile_path_separator_check, copyright-check):
9767 Use grep -n, to make it easier to find violations.
9768 Use CVS_LIST and CVS_LIST_EXCEPT.
9769 (header_regexp, h_re): Remove.
9770 (dd_c): New macro.
9771 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9772 (my-distcheck): Use more-modern GCC flags.
9773 (signatures, %.asc): Remove.
9774 (rel-files, announcement): Remove signatures.
9775 Restore old updating code, even though we don't use it, so
9776 that we're the same as coreutils.
9777 (alpha, beta, major): Depend on news-date-check.
9778 Make the upload commands.
9779
9780 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9781 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9782 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9783 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9784 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9785 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9786 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9787 * tests/sets.at: Likewise.
9788
9789 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9790 we comment out the Autoconf version number.
9791 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9792 it's error-prone and "make maintainer-distcheck" rejects it.
9793
9794 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9795 Indent calls to "error" to pacify "make maintainer-distcheck",
9796 when the calls are not intended to be translated.
9797 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9798
9799 * src/Makefile.am (DEFS): Use +=, to pacify
9800 "make maintainer-distcheck".
9801 (bison_SOURCES): Add scan-skel.h.
9802 (sc_tight_scope): New rule, from coreutils.
9803
9804 * src/files.c (src_extension, header_extension):
9805 Now static, not extern.
9806 * src/getargs.c (short_options): Likewise.
9807 * src/muscle_tab.c (muscle_table): Likewise.
9808 * src/parse-gram.y (current_class, current_type, current_prec):
9809 Likewise.
9810 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9811 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9812 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9813 void, to avoid warning when NLS is disabled.
9814 * src/output.c: Include scan-skel.h.
9815 (scan_skel): Remove decl, since scan-skel.h does this.
9816 (output_skeleton):
9817 Indent calls to "error" to pacify "make maintainer-distcheck".
9818 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9819 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9820 "make maintainer-distcheck".
9821 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9822 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9823 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9824 (skel_lex_destroy, scan_skel): Move these decls to...
9825 * src/scan-skel.h: New file.
9826 * src/uniqstr.c (uniqstr_assert):
9827 Indent calls to "error" to pacify "make maintainer-distcheck".
9828
9829 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9830 not @VAR@.
9831
9832 * tests/torture.at: Revamp to avoid misuse of atoi that
9833 "make maintainer-distcheck" complained about.
9834
9835 * examples/extexi (message): Don't print a message more than once,
9836 and omit line-number decoration that makes Emacs compile think
9837 that informative messages are worth worrying about.
9838
9839 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9840
9841 * configure.ac: Update version number.
9842
9843 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9844 accidentally.
9845 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9846 autogenerated by the maintainer.
9847 * examples/calc++/.cvsignore: Add *.yy.
9848
9849 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9850 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9851 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9852
9853 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9854
9855 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9856 from maintainer-distcheck about casting the argument of 'free'.
9857
9858 * NEWS: Mention recent yytname changes.
9859 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9860
9861 * bootstrap: For translations that have not yet been upgraded to
9862 the new runtime-po domain, prime the pump by extracting the
9863 relevant strings from the obsolete translations. This code can be
9864 removed once the bison-runtime domain has been translated by each
9865 team.
9866
9867 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9868 now that token names are already quoted.
9869
9870 Fix problem reported by Anthony Heading.
9871 * data/glr.c (YYTOKEN_TABLE): New macro.
9872 (yytname): Define if YYTOKEN_TABLE.
9873 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9874 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9875 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9876 * src/output.c (prepare_symbols): Output token_table_flag.
9877
9878 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9879
9880 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9881 again if the first call fails.
9882
9883 * data/glr.c (yytnamerr): New function.
9884 (yyreportSyntaxError): Use it to dequote most string literals.
9885 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9886 with other skeletons. All uses changed.
9887 (yytnameerr_): New function.
9888 (yyreport_syntax_error): Use it to dequote most string literals.
9889 * data/yacc.c (yytnamerr): New function.
9890 (yyerrlab): Use it to decode most string literals.
9891 * doc/bison.texinfo (Decl Summary, Calling Convention):
9892 Clarify quoting convention of yytname.
9893 * src/output.c (prepare_symbols): Quote all names. This undoes
9894 the 2005-04-17 change, which is now accomplished (mostly) via
9895 changes in the parsers as described above.
9896 * tests/regression.at (Token definitions, Web2c Actions):
9897 Undo most 2005-04-17 change here, too.
9898
9899 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9900
9901 Fix more problems reported by twlevo@xs4all.nl.
9902 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9903 remove trailing spaces. This loses the exit status of ./types,
9904 and isn't needed since ./types shouldn't be emitting trailing
9905 spaces.
9906 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9907 as the stack isn't valid in that case.
9908
9909 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9910 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9911 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9912 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9913 is used.
9914 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9915 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9916 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9917 Likewise.
9918
9919 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9920 overly-picky compilers that reject 'char *foo = "bar";'.
9921
9922 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9923 to FILE * parameter, not to stderr. This fixes a typo introduced
9924 in the 2005-07-12 change.
9925
9926 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9927 warnings from GCC 4.
9928
9929 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9930 (yyglrShiftDefer, yysplitStack):
9931 Remove unused parameters b4_pure_formals. All uses changed.
9932 (yyglrShift): Remove unused parameters b4_user_formals.
9933 All uses changed.
9934 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9935
9936 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9937
9938 Destructor cleanups and regularization among the three skeletons.
9939 * NEWS: Document the behavior changes.
9940 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9941 stack before failing, as the cleanup code will do it for us now.
9942 * data/lalr1.cc (yyerrlab): Likewise.
9943 * data/glr.c (yyparse): Pop everything off the stack before
9944 freeing it, so that destructors get called properly.
9945 * data/lalr1.cc (yyreturn): Likewise.
9946 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9947 This is more consistent.
9948 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9949 why destructors might be called. 1.875 -> 2.1.
9950 (Destructor Decl, Decl Summary, Table of Symbols):
9951 Some English-language cleanups for %destructor.
9952 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9953 Add output line for destructor of start symbol.
9954 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9955 because of that same extra output line.
9956
9957 * NEWS: Document minor wording changes in diagnostics of
9958 Bison-generated parsers.
9959 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9960 Remove unused formals. All uses changed.
9961 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9962 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9963 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9964 Rename yyoverflowab to yyexhaustedlab.
9965 When memory exhaustion occurs during syntax-error reporting,
9966 report it separately rather than in a single diagnostic; this
9967 eases translation.
9968 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9969 (Memory Exhausted): Renamed from Parser Stack Overflow.
9970 Revamp wording slightly to prefer "memory exhaustion".
9971 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9972
9973 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9974
9975 Add i18n support to the GLR skeleton. Partially fix the C++
9976 skeleton; a C++ expert needs to finish this. Remove debugging
9977 msgids; there's little point to having them translated, since they
9978 can be understood only by someone who can read the
9979 (English-language) source code.
9980
9981 Generate runtime-po/bison-runtime.pot automatically, so that we
9982 don't have to worry about garbage getting in that file. We'll
9983 make sure after the next official release that old msgids don't
9984 get lost. See
9985 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9986
9987 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9988 Now auto-generated.
9989 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9990 Fix typos in explanations of the runtime file.
9991 * bootstrap: Change gettext keyword from YYI18N to YY_.
9992 Use standard Makefile.in.in in runtime-po, since we'll arrange
9993 for backward-compatible bison-runtime.po files in a different way.
9994 * data/glr.c (YY_): New macro, from yacc.c.
9995 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9996 Translate messages intended for users.
9997 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9998 the wording in the other skeletons. We don't know that the memory
9999 is virtual.
10000 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10001 Use same method that yacc.c uses.
10002 Don't translate debugging messages.
10003 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10004 it doesn't work (yet), and requires C++ expertise to fix.
10005 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10006 Move defn to a more logical place, to be consistent with other
10007 skeletons.
10008 Don't translate debugging messages.
10009 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10010 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10011 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10012 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10013
10014 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10015 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10016 void, not int.
10017 * tests/glr-regression.at (Badly Collapsed GLR States):
10018 Likewise.
10019 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10020 yylex should return 0 at EOF rather than aborting.
10021
10022 Improve tests for stack overflow in GLR parser.
10023 Problem reported by twlevo@xs4all.nl.
10024 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10025 All uses removed.
10026 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10027 can handle the problem.
10028 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10029 (yyparse): New local variable yyresult to record the result.
10030 Use result of setjmp to set it, rather than storing itinto
10031 struct.
10032 (yyDone): Remove label.
10033 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10034 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10035 if YYABORT is used).
10036 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10037 yyparse status; put status > 1 into diagnostic.
10038 Check that status==2 works.
10039 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10040 Use exit status 3 for failure to open (which shouldn't happen).
10041
10042 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10043
10044 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10045 1 on syntax error; just let yyparse do its thing.
10046 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10047 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10048 (Exploding the Stack Size with Alloca):
10049 (Exploding the Stack Size with Malloc):
10050 Expect exit status 2, not 1, since the parser is supposed to blow
10051 its stack. Problem reported by twlevo@xs4all.nl.
10052
10053 * data/glr.c (yyparse): Don't assume that the initial calls
10054 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10055 Print a stack-overflow message and fail instead.
10056 Initialize the line-number information before creating the stack,
10057 so that the stack-overflow message can report line zero safely.
10058
10059 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10060
10061 Fix problems reported by twlevo@xs4all.nl.
10062 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10063 (yyuserMerge): Provide a default case if b4_mergers is empty.
10064 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10065 * tests/glr-regression.at
10066 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10067 Add casts to pacify C++ compilers.
10068 * tests/glr-regression.at (Improper merging of GLR delayed action
10069 sets): Declare yylex before using it.
10070 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10071 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10072 test for valgrind; valgrind is independent of g++.
10073 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10074 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10075 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10076 Use a destructor, so that we can expand the stack. Change
10077 YYSTYPE to char * so that we can free it. Cast result of malloc.
10078
10079 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10080
10081 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10082 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10083
10084 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10085
10086 * PACKAGING: New file, suggested by Bruno Haible and taken from
10087 similar wording in gettext's PACKAGING file.
10088 * NEWS: Mention PACKAGING.
10089 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10090
10091 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10092
10093 * NEWS: Document recent i18n improvements.
10094 * bootstrap: Get runtime translations into runtime-po.
10095 Create runtime-po files automatically, if possible.
10096 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10097 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10098 does not infringe on the user's name space.
10099 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10100 * doc/bison.texinfo (Internationalization): Revamp the English
10101 and Texinfo syntax a bit, to try to make it clearer.
10102 (Bison Options, Option Cross Key): Mention --print-localedir.
10103 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10104 YYENABLE_NLS. Quote a bit more.
10105 * runtime-po/.cvsignore: New file.
10106 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10107 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10108 * runtime-po/quot.sed: Likewise.
10109 * runtime-po/boldquot.sed: Likewise.
10110 * runtime-po/en@quot.header: Likewise.
10111 * runtime-po/en@boldquot.header: Likewise.
10112 * runtime-po/insert-header.sin: Likewise.
10113 * runtime-po/remove-potcdate.sin: Likewise.
10114 * runtime-po/Makevars: Likewise.
10115 * runtime-po/LINGUAS: Likewise.
10116 * runtime-po/de.po: Likewise; we will rely on the translation project
10117 to maintain this, so "bootstrap" should get it.
10118 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10119 its value.
10120 * src/main.c (main): Bind the bison-runtime domain, too.
10121
10122 2005-07-12 Bruno Haible <bruno@clisp.org>
10123
10124 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10125 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10126 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10127 * runtime-po: New directory.
10128 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10129 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10130 * runtime-po/Rules-quot: New file, copied from po/.
10131 * runtime-po/quot.sed: Likewise.
10132 * runtime-po/boldquot.sed: Likewise.
10133 * runtime-po/en@quot.header: Likewise.
10134 * runtime-po/en@boldquot.header: Likewise.
10135 * runtime-po/insert-header.sin: Likewise.
10136 * runtime-po/remove-potcdate.sin: Likewise.
10137 * runtime-po/Makevars: New file.
10138 * runtime-po/POTFILES.in: New file.
10139 * runtime-po/LINGUAS: New file.
10140 * runtime-po/bison-runtime.pot: New file.
10141 * runtime-po/de.po: New file.
10142 * m4/bison.m4: New file.
10143 * Makefile.am (SUBDIRS): Add runtime-po.
10144 (aclocaldir, aclocal_DATA): New variables.
10145 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10146 Define aclocaldir.
10147 * src/getargs.c (usage): Document --print-localedir option.
10148 (PRINT_LOCALEDIR_OPTION): New enum item.
10149 (long_options): Add --print-localedir option.
10150 (getargs): Handle --print-localedir option.
10151 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10152 (Internationalization): New section.
10153
10154 2005-07-12 Akim Demaille <akim@epita.fr>
10155
10156 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10157 for consistency with the rest of the code.
10158 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10159 Add separators.
10160
10161 2005-07-12 Akim Demaille <akim@epita.fr>
10162
10163 * src/parse-gram.y: Use %printer instead of YYPRINT.
10164
10165 2005-07-12 Akim Demaille <akim@epita.fr>
10166
10167 * src/symtab.h, src/symtab.c (symbol_print): New.
10168 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10169 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10170
10171 2005-07-12 Akim Demaille <akim@epita.fr>
10172
10173 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10174 b4_at_dollar and b4_dollar_dollar.
10175
10176 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10177
10178 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10179 and Pennello's paper.
10180
10181 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10182
10183 * data/yacc.c (yyparse): Undo previous patch. Instead,
10184 set yylsp[0] and yyvsp[0] only if the initial action
10185 sets yylloc and yylval, respectively.
10186
10187 * data/yacc.c (yyparse): In the initial action, set
10188 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10189 This avoids the use of undefined variables if the initial
10190 action does not set yylloc and/or yylval.
10191
10192 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10193
10194 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10195 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10196 Remove from CVS. These files are automatically generated.
10197 * examples/extexi: Clarify that this file is now part of Bison,
10198 not GNU M4, and that it works with any POSIX-compatible Awk.
10199 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10200 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10201 so that we also get calc++-parser.yy. Geneate it.
10202 Use $(AWK), not gawk, since any conforming Awk will do.
10203 Put comment before action, since older 'make' can't handle comment
10204 in action.
10205 $(BUILT_SOURCES): List all built sources, not just some of them.
10206 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10207 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10208 $($(calc_sources_generated)): Remove unnecessary test for existence
10209 of target. (This had a shell syntax error anyway; a stray "x".)
10210 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10211 calc++-parser.yy.
10212 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10213
10214 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10215 implied by the other modules.
10216
10217 2005-07-06 Akim Demaille <akim@epita.fr>
10218
10219 Bind examples/calc++ to the package.
10220 * examples/calc++/Makefile: Remove, replaced by...
10221 * examples/calc++/Makefile.am: ... this new file.
10222 * examples/calc++/test: Remove input.
10223 * examples/calc++/compile: Remove.
10224 * examples/Makefile.am: New.
10225 * configure.ac, Makefile.am: Adjust.
10226 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10227
10228 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10229
10230 * data/glr.c (yyFail): Drastically simplify; since the format argument
10231 never had any % directives, we can simply pass it to yyerror.
10232 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10233 be modified later, as that is the usual style in glr.c.
10234 Problems reported by Paul Hilfinger.
10235
10236 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10237 and size overflow errors.
10238 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10239 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10240 (YYSIZEMAX): New macro.
10241 (yystpcpy): New function, taken from yacc.c.
10242 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10243 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10244 so that we don't have to maintain their signatures.
10245 (yyFail): Check for buffer overflow, by using vsnprintf rather
10246 than vsprintf. Allocate a bigger buffer if possible.
10247 Report an error if buffer allocation fails.
10248 (yyStackOverflow): New function.
10249 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10250 the initialization was successful. It might fail if storage was
10251 exhausted.
10252 (yyexpandGLRStack): Add more checks for storage allocation failure.
10253 Use yyStackOverflow to report failures.
10254 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10255 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10256 Don't assume stack number fits in int.
10257 (yysplitStack): Check for storage allocation failure.
10258 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10259 can print diagnostics on storage allocation failure. All callers
10260 changed.
10261 (yyresolveValue): Use yybool for boolean.
10262 (yyreportSyntaxError): Check for size-calculation overflow.
10263 This code is taken from yacc.c.
10264 (yyparse): Check for storage allocation errors when allocating
10265 the initial stack.
10266
10267 2005-07-05 Akim Demaille <akim@epita.fr>
10268
10269 Extract calc++ from the documentation.
10270 * doc/bison.texinfo (Calc++): Add the extraction marks.
10271 * examples/extexi: New, from the aborted GNU Programming 2E.
10272 Separate the different paragraph of a file with empty lines.
10273 * examples/Makefile: Use it to extract the whole calc++ example.
10274
10275 2005-06-24 Akim Demaille <akim@epita.fr>
10276
10277 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10278 class typedefs.
10279
10280 2005-06-22 Akim Demaille <akim@epita.fr>
10281
10282 * doc/bison.texinfo (C++ Language Interface): First stab.
10283 (C++ Parsers): Remove.
10284
10285 2005-06-22 Akim Demaille <akim@epita.fr>
10286
10287 * data/lalr1.cc (yylex_): Honor %lex-param.
10288
10289 2005-06-22 Akim Demaille <akim@epita.fr>
10290
10291 Start a set of simple examples.
10292 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10293 * examples/calc++/calc++-driver.hh,
10294 * examples/calc++/calc++-parser.yy,
10295 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10296 * examples/calc++/compile, examples/calc++/test: New.
10297
10298 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10299
10300 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10301 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10302 which stems from the 2005-05-27 patch.
10303
10304 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10305
10306 * data/glr.c: Modify treatment of unused parameters to permit use
10307 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10308
10309 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10310
10311 Fix infringement on user name space reported by Janos Zoltan Szabo.
10312 * data/yacc.c (yyparse): strlen -> yystrlen.
10313
10314 2005-05-30 Akim Demaille <akim@epita.fr>
10315
10316 * data/lalr1.cc (_): New.
10317 Translate the various messages.
10318
10319 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10320
10321 Fix infringement on user name space reported by Bruno Haible.
10322 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10323 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10324 the user's name space.
10325 (alloca): Include <stdlib.h> to get it, if it's not built in.
10326 (YYMALLOC, YYFREE): Define only if needed.
10327 (malloc, free): Declare, but only if needed, as this infringes on
10328 the user name space.
10329
10330 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10331
10332 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10333 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10334 with %d format.
10335 * lib/ebitset.c (min, max): Undef before defining.
10336 * lib/vbitset.c (min, max): Likewise.
10337 * lib/subpipe.c (create_subpipe): Save local variables in case
10338 vfork clobbers them.
10339
10340 2005-05-24 Bruno Haible <bruno@clisp.org>
10341
10342 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10343 error message syntax used by gcc-4.0.
10344
10345 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10346
10347 * README: Mention m4 1.4.3. Remove obsolete advice about
10348 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10349
10350 * bootstrap: Remove workaround for problem I encountered with
10351 gettext 0.14.1; it seems to be fixed now.
10352
10353 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10354
10355 * NEWS: Version 2.0a.
10356
10357 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10358 the previous change.
10359
10360 Various maintainer cleanups.
10361 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10362 conftest*, for benefit of CVS commands run at the same time as
10363 "configure". Add build-aux, since "bootstrap" now creates it and
10364 its subfiles.
10365 * Makefile.cfg (move_if_change): Remove.
10366 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10367 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10368 (po_repo, do-po-update, po-update, wget_files, get-targets):
10369 (config.guess-url_prefix, config.sub-url_prefix):
10370 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10371 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10372 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10373 Remove.
10374 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10375 this is now the recommended name.
10376 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10377 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10378 ylwrap. These files now go into build-aux.
10379 * config/move-if-change: Remove.
10380 * config/prev-version.txt: Bump from 1.75 to 2.0.
10381
10382 * bootstrap: Add stdio-safer, unistd-safer modules.
10383 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10384 we don't need it).
10385 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10386 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10387 * lib/subpipe.c: Include "unistd-safer.h".
10388 (create_subpipe): Make sure all the newly-created
10389 file descriptors are > 2, so that diagnostics don't
10390 get sent down them (which might cause Bison to hang, in theory).
10391 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10392 * src/files.c (xfopen): Use fopen_safer, not fopen.
10393
10394 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10395 yesterday's yacc.c fix.
10396
10397 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10398
10399 * data/glr.c, data/lalr1.cc: Update copyright date.
10400
10401 Fix a destructor bug reported by Wolfgang Spraul in
10402 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10403 * data/yacc.c (yyabortlab): Don't call destructor, and
10404 don't set yychar to EMPTY.
10405 (yyoverflowlab): Don't call destructor.
10406 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10407 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10408 since we no longer output the message "discarding lookahead token
10409 end of input ()".
10410
10411 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10412
10413 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10414 fix a small glitch in debugging output.
10415 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10416 after YY_SYMBOL_PRINT where needed.
10417
10418 (struct yyGLRState): Add some comments.
10419 (struct yySemanticOption): Add some comments.
10420 (union yyGLRStackItem): Add comment.
10421
10422 (yymergeOptionSets): Correct this to properly perform the union,
10423 avoiding infinite reported by Michael Rosien.
10424 Update comment.
10425
10426 * tests/glr-regression.at: Add test for GLR merging error reported
10427 by M. Rosien.
10428
10429 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10430
10431 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10432 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10433 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10434 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10435 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10436 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10437 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10438 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10439 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10440 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10441 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10442 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10443 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10444 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10445 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10446 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10447 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10448 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10449 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10450 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10451 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10452 src/output.h, src/parse-gram.c, src/parse-gram.h,
10453 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10454 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10455 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10456 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10457 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10458 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10459 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10460 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10461 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10462 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10463 tests/reduce.at, tests/regression.at, tests/sets.at,
10464 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10465 Update FSF postal mail address.
10466
10467 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10468
10469 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10470 Problem reported by Ralf Menzel.
10471
10472 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10473
10474 * tests/actions.at: Test that stack overflow invokes destructors.
10475 From Marcus Holland-Moritz.
10476 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10477 from here....
10478 (yyreturn): to here. That way, destructors are called properly
10479 even if the stack overflows, or the user calls YYACCEPT or
10480 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10481 (yyoverflowlab): Destroy the lookahead.
10482
10483 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10484
10485 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10486
10487 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10488
10489 * NEWS: Bison-generated C parsers no longer quote literal strings
10490 associated with tokens.
10491 * src/output.c (prepare_symbols): Don't escape strings,
10492 since users don't want to see C escapes.
10493 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10494 in diagnostics.
10495 * tests/input.at (Torturing the Scanner): Likewise.
10496 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10497
10498 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10499
10500 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10501 the data size is known to be too small and we can't increase it.
10502 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10503
10504 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10505
10506 * src/parse-gram.y: Include quotearg.h.
10507 (string_as_id): Quote $1 before using it as a key, since the
10508 lexer no longer quotes it for us.
10509 (string_content): Don't strip quotes, since lexer no longer
10510 quotes it for us.
10511 * src/scan-gram.l: Include quotearg.h.
10512 ("\""): Omit quote.
10513 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10514 a key, since the rest of the lexer doesn't quote it.
10515 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10516 * tests/regression.at (Token definitions): Check for backslashes
10517 in token strings.
10518
10519 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10520 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10521 (yyparse): Revamp code to generate long syntax error message, to
10522 make it easier to translate, and to avoid problems with arithmetic
10523 overflow. Change "virtual memory" to "memory" in diagnostic, since
10524 we don't know whether the memory is virtual.
10525
10526 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10527
10528 * NEWS: Bison-generated C parsers now use the _ macro to
10529 translate strings.
10530 * data/yacc.c (_) [!defined _]: New macro.
10531 All English strings wrapped inside this macro.
10532 * doc/bison.texinfo (Bison Parser): Document _.
10533 * po/POTFILES.in: Include src/parse-gram.c, since it now
10534 includes translateable strings that parse-gram.y doesn't.
10535
10536 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10537
10538 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10539 reverting the 2004-10-11 change to this function.
10540 (symbol_check_alias_consistency): Don't call symbol_type_set
10541 if the type name is already correct.
10542 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10543
10544 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10545
10546 * tests/regression.at (Token definitions): Don't use a token named
10547 c, as that generates a "#define c ..." that runs afoul of buggy
10548 stdlib.h that uses the identifier c as a member of struct
10549 drand48_data. Problem reported by Horst Wente.
10550
10551 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10552
10553 * bootstrap: Change translation URL from
10554 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10555 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10556 redirection glitches. Problem reported by twlevo@xs4all.nl.
10557
10558 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10559
10560 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10561 after operands; POSIX says this isn't portable for the c99 command.
10562
10563 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10564
10565 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10566 immediately if a data overrun has occurred; this may help us track
10567 down what may be a spurious failure on MacOS.
10568
10569 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10570
10571 Respond to problems reported by twlevo@xs4all.nl.
10572
10573 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10574
10575 * src/vcg.h: Comment fix.
10576 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10577 (G_CMAX): Change to -1 instead of INT_MAX.
10578
10579 * data/yacc.c (yyparse): Omit spaces before #line.
10580
10581 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10582
10583 * src/tables.c (state_number_to_vector_number): Put it inside an
10584 "#if 0", since it's not currently used. Problem reported by
10585 Roland McGrath.
10586
10587 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10588
10589 * src/output.c (escaped_output): Renamed from
10590 escaped_file_name_output, since we now use it for symbol tags as
10591 well. All uses changed.
10592 (symbol_destructors_output, symbol_printers_output):
10593 Escape symbol tags too.
10594 Problem reported by Matyas Forstner in
10595 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10596
10597 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10598 not needed.
10599 * src/output.c (user_actions_output, token_definitions_output,
10600 symbol_destructors_output, symbol_printers_output): Likewise.
10601 * src/reader.c (prologue_augment): Likewise.
10602 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10603
10604 * src/vcg.c (output_edge): Don't quote linestyle arg.
10605 Problem reported by twlevo@xs4all.nl.
10606
10607 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10608
10609 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10610 example, reported by Derek M Jones. Also, make the example even
10611 more outrageous, to better illustrate how bad the problem is.
10612
10613 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10614
10615 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10616 putsym. Typo reported by Sebastian Piping.
10617
10618 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10619
10620 * doc/bison.texinfo (Language and Grammar): some -> same
10621 (Epilogue): int he -> in the
10622 Typos reported by Sebastian Piping via Justin Pence.
10623
10624 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10625
10626 * tests/glr-regression.at (Improper handling of embedded actions
10627 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10628 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10629 with dollar signs in test names.
10630 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10631 for a similar reason.
10632
10633 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10634
10635 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10636 wants to redefine G_VIEW.
10637
10638 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10639
10640 * src/vcg.c (get_view_str): Remove case for normal_view.
10641 Problem reported by twlevo@xs4all.nl.
10642
10643 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10644
10645 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10646 Problem reported by twlevo@xs4all.nl.
10647
10648 * doc/bison.texinfo: Change @dircategory from "GNU programming
10649 tools" to "Software development". Requested by Richard Stallman
10650 via Karl Berry.
10651
10652 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10653
10654 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10655 Problem reported by twlevo@xs4all.nl.
10656
10657 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10658
10659 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10660 keyword; it's not needed with modern compilers, and it doesn't
10661 affect correctness with older compilers. Suggested by
10662 twlevo@xs4all.nl.
10663
10664 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10665
10666 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10667 gcc -Wswitch-default.
10668 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10669 * data/yacc.c (yyparse): Likewise.
10670
10671 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10672
10673 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10674 already. Let config.h define any nonstandard values.
10675
10676 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10677
10678 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10679 for the benefit of slower hosts. Problem reported by
10680 Nelson H. F. Beebe.
10681
10682 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10683
10684 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10685 being defined and not used.
10686 * data/lalr1.cc (yyparse): Likewise.
10687 Use "if (false)" rather than "if (0)".
10688
10689 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10690
10691 * TODO: Mention that we should allow NUL bytes in tokens.
10692
10693 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10694
10695 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10696 Problem reported by Hans Aberg.
10697
10698 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10699
10700 * src/getargs.c (version): Happy new year; update overall
10701 program copyright date from 2004 to 2005.
10702
10703 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10704 Problem reported by Hans Aberg.
10705 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10706 (Output file names.): Add a test for the case when standard output
10707 is closed.
10708
10709 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10710
10711 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10712 to fix an oversight in the Bison 2.0 manual.
10713
10714 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10715
10716 * NEWS: Version 2.0. Reformat the existing news items since
10717 1.875, so that related items are grouped together.
10718 * configure.ac (AC_INIT): Bump version to 2.0.
10719 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10720
10721 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10722 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10723 otherwise, we're not testing alloca. Unfortunately there's no
10724 simple way to consult HAVE_ALLOCA here.
10725
10726 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10727 for yymsg, too.
10728
10729 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10730 hand. This avoids a warning about comparing int to size_t when
10731 GCC warnings are enabled.
10732
10733 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10734
10735 * NEWS: Bison-generated parsers no longer default to using the
10736 alloca function (when available) to extend the parser stack, due
10737 to widespread problems in unchecked stack-overflow detection.
10738 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10739 responsibility to set it to a positive value. This lets the user
10740 specify a value that is not a preprocessor constant.
10741 * data/yacc.c (YYMAXDEPTH): Likewise.
10742 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10743 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10744 to be a compile-time constant. However, explain the constraints on it.
10745 Also, explain the constraints on YYINITDEPTH.
10746 (Table of Symbols): Explain that alloca is no longer the default.
10747 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10748 to 1.
10749
10750 * doc/bison.texinfo (Location Default Action): Mention that n must
10751 be zero when k is zero. Suggested by Frank Heckenbach.
10752
10753 2004-12-22 Akim Demaille <akim@epita.fr>
10754
10755 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10756 (parser::state_type, parser::semantic_type, parser::location_type):
10757 Private, not public.
10758 (parser::parse): Return ints, not bool.
10759 Returning a bool introduces a problem: 0 corresponds to false, and
10760 it seems weird to return false on success. Returning true changes
10761 the conventions for yyparse.
10762 Alternatively we could return void and send an exception.
10763 There is no clear consensus (yet?).
10764 (state_stack, semantic_stack, location_stack): Rename as...
10765 (state_stack_type, semantic_stack_type, location_stack_type): these.
10766 Private, not public.
10767 * tests/c++.at: New.
10768 * tests/testsuite.at, tests/Makefile.am: Adjust.
10769
10770 2004-12-21 Akim Demaille <akim@epita.fr>
10771
10772 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10773
10774 2004-12-21 Akim Demaille <akim@epita.fr>
10775
10776 Don't impose std::string for filenames.
10777
10778 * data/lalr1.cc (b4_filename_type): New.
10779 (position::filename): Use it.
10780 (parser.hh): Move the inclusion of stack.hh and location.hh below
10781 the user code, so that needed headers for the filename type can be
10782 included first.
10783 Forward declare them before the user code.
10784 * tests/Makefile.am (check-local, installcheck-local): Pass
10785 TESTSUITEFLAGS to the TESTSUITE.
10786
10787 2004-12-20 Akim Demaille <akim@epita.fr>
10788
10789 Use more STL like names: my_class instead of MyClass.
10790
10791 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10792 (SemanticStack, SemanticType, StateStack, StateType)
10793 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10794 (Parser::value): Rename as...
10795 (location_stack, location_type, rhs_number_type, semantic_stack)
10796 (semantic_type, state_stack, state_type, token_number_type, stack)
10797 (slice, traits, parser::yylloc, parser::yylval): these.
10798
10799 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10800
10801 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10802
10803 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10804 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10805
10806 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10807
10808 Remove uses of 'short int' and 'unsigned short int'. This raises
10809 some arbitrary limits. It uses more memory but nowadays that's
10810 not much of an issue.
10811
10812 This change does not affect the generated parsers; that's a different
10813 task, as some users will want to conserve memory there.
10814
10815 Ideally we should use size_t to represent all object counts, and
10816 something like ptrdiff_t to represent signed differences of object
10817 counts; but that will require more code-cleanup than I have the
10818 time to do right now.
10819
10820 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10821 Use size_t, not int or short int, to count objects.
10822 * src/closure.c (nritemset, closure): Likewise.
10823 * src/closure.h (nritemset, closure): Likewise.
10824 * src/nullable.c (nullable_compute): Likewise.
10825 * src/print.c (print_core): Likewise.
10826 * src/print_graph.c (print_core): Likewise.
10827 * src/state.c (state_compare, state_hash): Likewise.
10828 * src/state.h (struct state): Likewise.
10829 * src/tables.c (default_goto, goto_actions): Likewise.
10830
10831 * src/gram.h (rule_number, rule): Use int, not short int.
10832 * src/output.c (prepare_rules): Likewise.
10833 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10834 errs, reductions): Likewise.
10835 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10836 Likewise.
10837 * src/tables.c (vector_number, tally, action_number,
10838 ACTION_NUMBER_MINIMUM): Likewise.
10839 * src/output.c (muscle_insert_short_int_table): Remove.
10840
10841 2004-12-17 Akim Demaille <akim@epita.fr>
10842
10843 * data/lalr1.cc: Extensive Doxygenation.
10844 (error_): Rename as...
10845 (error): this, since it is visible to the user.
10846 Adjust callers.
10847 (Parser::message): Now an automatic variable from...
10848 (Parser::yyreport_syntax_error_): here.
10849 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10850 Parser::error.
10851 * tests/input.at: Escape $.
10852
10853 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10854
10855 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10856 Parenthesize rhs to avoid obscure problems with mistakes like
10857 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10858 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10859 b4_rhs_location): Likewise.
10860 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10861 b4_rhs_location): Likewise.
10862
10863 2004-12-16 Akim Demaille <akim@epita.fr>
10864
10865 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10866 yacc.c: be sure to stay within yycheck_.
10867 * tests/actions.at: Re-enable C++ tests.
10868
10869 2004-12-16 Akim Demaille <akim@epita.fr>
10870
10871 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10872 real.
10873
10874 2004-12-16 Akim Demaille <akim@epita.fr>
10875
10876 Use #define to handle the %name-prefix.
10877
10878 * data/glr.c, data/yacc.c: Comment changes.
10879 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10880 so that one can refer to yylex in the parser file, and have it
10881 renamed, as is the case with other skeletons.
10882
10883 2004-12-16 Akim Demaille <akim@epita.fr>
10884
10885 Move lalr1.cc internals into yy*.
10886
10887 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10888 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10889 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10890 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10891 (empty_, final_, terror_, errcode_, ntokens_)
10892 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10893 (looka_, ilooka_, error_range_, nerrs_):
10894 Rename as...
10895 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10896 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10897 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10898 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10899 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10900 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10901 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10902 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10903 these.
10904
10905 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10906
10907 Fix some problems reported by twlevo at xs4all.
10908 * src/symtab.c (symbol_new): Report an error if the input grammar
10909 contains too many symbols. This is better than calling abort() later.
10910 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10911 (struct node, struct graph):
10912 Rename member expand to stretch. All uses changed.
10913 (struct graph): Remove member layoutalgorithm. All uses removed.
10914 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10915 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10916 All uses changed.
10917 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10918
10919 2004-12-15 Akim Demaille <akim@epita.fr>
10920
10921 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10922 Add more Doxygen comments.
10923 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10924 (report_syntax_error_, translate_): Rename as...
10925 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10926 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10927
10928 2004-12-15 Akim Demaille <akim@epita.fr>
10929
10930 * data/lalr1.cc (lex_): Rename as...
10931 (yylex_): this.
10932 Move the trace here.
10933 Take the %name-prefix into account.
10934 Reported by Alexandre Duret-Lutz.
10935
10936 2004-12-15 Akim Demaille <akim@epita.fr>
10937
10938 Simplify the C++ parser constructor.
10939
10940 * data/lalr1.cc (debug_): Rename as...
10941 (yydebug_): so that the parser's internals are always in the yy*
10942 pseudo namespace.
10943 Adjust uses.
10944 (b4_parse_param_decl): Remove the leading comma as it is now only
10945 called as unique argument list.
10946 (Parser::Parser): Remove the constructor accepting a location and
10947 an initial debugging level.
10948 Remove from the other ctor the argument for the debugging level.
10949 (debug_level_type, debug_level, set_debug_level): New.
10950
10951 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10952 constructor calls.
10953
10954 2004-12-15 Akim Demaille <akim@epita.fr>
10955
10956 Remove b4_root related material: failure experiment
10957 (which goal was to allow to derive from a class).
10958
10959 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10960 definitions and uses.
10961
10962 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10963
10964 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10965 not 2, since it's not portable to subtract 1 from the start of an
10966 array. The new item 0 is never set or used. All uses changed.
10967
10968 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10969 the default definition of YYLLOC_DEFAULT. Problem reported
10970 by Frank Heckenbach.
10971
10972 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10973
10974 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10975 the normal case and one for the error case. Just use the
10976 first one uniformly. Problem reported by Frank Heckenbach.
10977 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10978 use exactly the same macro in both places.
10979 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10980 so that the normal-case YYRHSLOC works for the error case too.
10981 All uses changed.
10982 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10983 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10984 * doc/bison.texinfo (Location Default Action): Don't claim that
10985 we have an array of locations. Use the same macro for both glr
10986 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10987 the index is 0.
10988
10989 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10990
10991 * HACKING: Update email addresses to send announcements to.
10992
10993 * configure.ac (AC_INIT): Bump version to 1.875f.
10994
10995 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10996
10997 * NEWS: Version 1.875e.
10998 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10999
11000 * src/scan-skel.l: Include "complain.h", for "fatal".
11001
11002 * src/relation.h (relation_print, relation_digraph):
11003 Relation sizes are of type relation_node, not size_t (this is
11004 merely a doc fix, since the two types are equivalent).
11005 (relation_transpose): Relation sizes are of type relation_node,
11006 not int.
11007 * src/relation.c: Likewise.
11008 (top, infinity): Now of type relation_node, not int.
11009 (traverse, relation_transpose): Use relation_node, not int.
11010
11011 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11012 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11013 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11014
11015 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11016 specifying whether the test should be skipped. Use it tp
11017 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11018 fail on some hosts, and should be skipped.
11019
11020 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11021
11022 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11023 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11024 unless otherwise specified below.
11025
11026 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11027 to allocate kernel_base, kernel_items, kernel_size, since
11028 they needn't be initialized to 0.
11029 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11030 * src/closure.c (new_closure): Likewise, for itemset.
11031 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11032 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11033 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11034 (build_relations): Likewise for edge, states1, includes.
11035 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11036 * src/reader.c (packgram): Likewise, for ritem, rules.
11037 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11038 * src/relation.c (relation_digraph): Likewise for VERTICES.
11039 (relation_transpose): Likewise for new_R, end_R.
11040 * src/symtab.c (symbols_token_translations_init): Likewise for
11041 token_translations.
11042 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11043 (token_actions): Likewise for yydefact, actrow, conflrow,
11044 conflict_list.
11045 (save_column): Likewise for froms[symno], tos[symno].
11046 (goto_actions): Likewise for state_count.
11047 (pack_table): Likewise for base, pos, check.
11048 (tables_generate): Likewise for width.
11049
11050 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11051 for initial core. Just have a separate core, so we needn't worry
11052 about whether kernel_size and kernel_base are initialized.
11053
11054 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11055 kernel_size, kernel_items): Remove unnecessary initialization.
11056 * src/conflicts.c (conflicts): Likewise.
11057 * src/derives.c (derives): Likewise.
11058 * src/muscle_tablc (muscle_insert): Likewise.
11059 * src/relation.c (relation_digraph): Likewise.
11060 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11061 conflrow, conflict_table, conflict_list, table, check):
11062 Likewise.
11063
11064 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11065 This is because all callers pass unsigned int.
11066 * src/closure.h (new_closure): Likewise.
11067
11068 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11069 (build_relations): Initialize includes[i] in all cases.
11070 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11071 and rules[ruleno].precsym. Initialize members in order.
11072 * src/relation.c (relation_transpose): Always initialize new_R[i]
11073 and end_R[i].
11074 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11075
11076 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11077 conflict_list[0] was always 0, but now it isn't initialized.
11078
11079 * src/table.c (table_grow): When conflict_table grew, the grown
11080 area wasn't cleared. Fix this.
11081
11082 * lib/.cvsignore: Add strdup.c, strdup.h.
11083 * m4/.cvsignore: Add strdup.m4.
11084
11085 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11086
11087 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11088 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11089 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11090 ngotos + 1 without checking for overflow.
11091 (build_relations): Use END_NODE, not -1, to denote end of edges.
11092 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11093 build_relations): Use goto_number, not int, for goto numbers.
11094 * src/tables.c (save_column, default_goto): Likewise.
11095
11096 2004-11-23 Akim Demaille <akim@epita.fr>
11097
11098 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11099 of #defining from yystype.
11100 Don't typedef yystype, C++ does not need it.
11101 This lets it possible to forward declare it as union.
11102
11103 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11104
11105 * bootstrap (gnulib_modules): Add extensions.
11106 Problem reported by Jim Meyering.
11107
11108 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11109
11110 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11111 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11112 src/system.h, src/tables.c: XFREE -> free, to accommodate
11113 recent change to gnulib xalloc.h.
11114 Problem reported by Jim Meyering.
11115
11116 2004-11-17 Akim Demaille <akim@epita.fr>
11117
11118 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11119
11120 2004-11-17 Akim Demaille <akim@epita.fr>,
11121 Alexandre Duret-Lutz <adl@gnu.org>
11122
11123 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11124 changes.
11125 (YYCDEBUG): Adjust.
11126 Use it instead of cdebug_.
11127 (Parser::debug_stream, Parser::set_debug_stream): New.
11128 (Parser::symprint_): Define cdebug_ for temporary backward
11129 compatibility.
11130 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11131 debug_stream ().
11132
11133 2004-11-17 Akim Demaille <akim@epita.fr>
11134
11135 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11136 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11137 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11138 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11139
11140 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11141
11142 * data/glr.c (yyloc_default): Remove; not used.
11143 Problem reported by Frank Heckenbach.
11144
11145 2004-10-25 Akim Demaille <akim@epita.fr>
11146
11147 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11148 Introduce another definition to address simple location arrays.
11149 (yyGLRStack): New member: yyerror_range.
11150 (yyrecoverSyntaxError, yyparse): Update it.
11151 (yyrecoverSyntaxError): Use it when shifting the error token to
11152 have an accurate range, equivalent to the one computed by both
11153 yacc.c and lalr1.cc.
11154 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11155 that column numbers start at column 0, as per GNU Coding
11156 Standards, the others tests, and the doc.
11157 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11158 Adjust to the above change (first column is 0).
11159 And adjust the location of the "<error>", now covering the whole
11160 line.
11161
11162 2004-10-22 Akim Demaille <akim@epita.fr>
11163 and Paul Eggert <eggert@cs.ucla.edu>
11164
11165 Remove some arbitrary limits on goto numbers and relations.
11166 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11167 initial values, since they're never used.
11168 (set_goto_map): ngotos is now unsigned, so test for overflow
11169 by seeing whether it wraps around to zero.
11170 * src/lalr.h (goto_number): Now size_t, not short int.
11171 (GOTO_NUMBER_MAXIMUM): Remove.
11172 * src/relation.c (relation_print, traverse, relation_transpose):
11173 Check for END_NODE rather than looking at sign.
11174 * src/relation.h (END_NODE): New macro.
11175 (relation_node): Now size_t, not short int.
11176
11177 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11178
11179 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11180 keyword, not an identifier. Problem reported by Baron Schwartz in
11181 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11182
11183 2004-10-11 Akim Demaille <akim@epita.fr>
11184
11185 * src/symtab.c (symbol_check_alias_consistency): Also check
11186 type names, destructors, and printers.
11187 Reported by Alexandre Duret-Lutz.
11188 Recode the handling of associativity and precedence in terms
11189 of symbol_precedence_set.
11190 Accept no redeclaration at all, not even equal to the previous
11191 value.
11192 (redeclaration): New.
11193 Use it to factor redeclaration complaints.
11194 (symbol_make_alias): Don't set the type of the alias, let
11195 symbol_check_alias_consistency do it as for other features.
11196 * src/symtab.h (symbol): Add new member prec_location, and
11197 type_location.
11198 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11199 * tests/input.at (Incompatible Aliases): New.
11200
11201 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11202
11203 .cvsignore fixes to accommodate gnulib changes,
11204 and the practice of naming build directories "_build".
11205 * .cvsignore: Add "_*". Sort.
11206 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11207 * m4/.cvsignore: Add "*_gl.m4".
11208
11209 2004-10-06 Akim Demaille <akim@epita.fr>
11210
11211 * src/parse-gram.y (add_param): Fix the truncation of trailing
11212 spaces.
11213
11214 2004-10-05 Akim Demaille <akim@epita.fr>
11215
11216 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11217 whether the reducion was empty or not. This leaves room to
11218 improve the use of YYLLOC_DEFAULT in such a case.
11219 lalr1.cc is still experimental, so changing this is acceptable.
11220 And finally, there are probably not many users who changed the
11221 handling of locations in GLR, so changing is admissible too.
11222
11223 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11224 empty reduction, set @$ to an empty location ending the previously
11225 stacked symbol.
11226 Adjust uses to make sure the code is triggered on empty
11227 reductions.
11228 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11229 expected output: empty reductions have empty locations.
11230
11231 2004-09-29 Akim Demaille <akim@epita.fr>
11232
11233 * data/lalr1.cc: Move towards a more standard C++ coding style
11234 for templates: Class < T > -> Class<T>.
11235
11236 2004-09-29 Akim Demaille <akim@epita.fr>
11237
11238 * data/lalr1.cc: Reinstall the former ctor, for sake of
11239 compatibility, but warn it will be removed.
11240 Move towards a more standard C++ coding style (i.e., type *var ->
11241 type* var).
11242
11243 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11244
11245 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11246 since it's less likely to work if NULs are involved in the future.
11247
11248 2004-09-27 Akim Demaille <akim@epita.fr>
11249
11250 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11251
11252 2004-09-27 Akim Demaille <akim@epita.fr>
11253
11254 * data/lalr1.cc (b4_parse_param_decl_1): New.
11255 (b4_parse_param_decl): Use it to have different names between attribute
11256 and argument names.
11257 (b4_cc_constructor_call): Likewise.
11258
11259 2004-09-24 Akim Demaille <akim@epita.fr>
11260
11261 * src/parse-gram.y (add_param): Strip the leading and trailing
11262 blanks from a formal argument declaration.
11263 (YY_LOCATION_PRINT): New.
11264
11265 2004-09-24 Akim Demaille <akim@epita.fr>
11266
11267 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11268 after the location.
11269
11270 2004-09-24 Akim Demaille <akim@epita.fr>
11271
11272 * doc/bison.texinfo (Table of Symbols): Sort.
11273
11274 2004-09-21 Akim Demaille <akim@epita.fr>
11275
11276 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11277 the useless parentheses.
11278 Suggested by Paul Eggert.
11279
11280 2004-09-20 Akim Demaille <akim@epita.fr>
11281
11282 Let the initial-action act on the look-ahead, and use it for the
11283 "initial push" (corresponding to an hypothetical beginning-of-file).
11284 And let lalr1.cc honor %initial-action.
11285
11286 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11287 example.
11288 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11289 (Parser::Parser): Remove the ctor that used to initialize it.
11290 (Parser::parse): Like in the other skeletons, issue the "starting
11291 parse" message before any action.
11292 Honor %initial-action.
11293 Initialize the stacks with the lookahead.
11294 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11295 look-ahead.
11296 Push them in the stacks.
11297 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11298
11299 2004-09-20 Akim Demaille <akim@epita.fr>
11300
11301 * doc/bison.texinfo (Initial Action Decl): New.
11302
11303 2004-09-20 Akim Demaille <akim@epita.fr>
11304
11305 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11306 clearer criterion to define it.
11307 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11308 When reducing on an empty RHS, use the latest stacked location as
11309 location.
11310 yylloc is not always available.
11311 * data/glr.c: Likewise.
11312 Also, honor initial-actions.
11313
11314 2004-09-20 Akim Demaille <akim@epita.fr>
11315
11316 * data/yacc.c (YY_LOCATION_PRINT): New.
11317 Define when we know YYLTYPE's structure, i.e., when the default
11318 YYLLOC_DEFAULT is used.
11319 * data/c.m4 (b4_yysymprint_generate): Use it.
11320 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11321 value of the result.
11322 (error_start_): Replace with...
11323 (error_range_): this location array.
11324 This allows to replace code relying on the implementation of
11325 locations by portable code.
11326 * data/yacc.c (yylerrsp): Replace with...
11327 (yyerror_range): this.
11328 Every time a token is popped, update yyerror_range[0], to have an
11329 accurate location for the error token.
11330 * data/glr.c (YY_LOCATION_PRINT): New.
11331 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11332 deference a pointer.
11333 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11334 report the location in %printers.
11335
11336 * src/scan-skel.l: Instead of abort, report error messages to ease
11337 understanding skeleton scanning failures.
11338
11339 2004-09-16 Akim Demaille <akim@epita.fr>
11340
11341 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11342 (iterator, const_iterator): these, to be more in the C++ spirit.
11343 Also, return reverse iterators so that when displaying the stack
11344 we display its bottom first.
11345 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11346 from yacc.c.
11347 We should probably use vector here though.
11348
11349 2004-09-16 Akim Demaille <akim@epita.fr>
11350
11351 Have more complete shift traces.
11352
11353 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11354 to report Shifts instead of ad hoc YYDPRINTF invocations,
11355 including for the error token.
11356 * data/lalr1.cc (symprint_): Output the location.
11357 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11358 output the location within the %printer.
11359 Activate GLR tests, at least to make sure they compile properly.
11360 They still don't pass though.
11361 * tests/calc.at: Adjust expect verbose output, since now "Entering
11362 state..." is on a different line than the "Shifting" message.
11363
11364 2004-09-08 Akim Demaille <akim@epita.fr>
11365
11366 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11367 Bison directive from the Bison file to the invocation of this
11368 macro, so that these directives are passed to
11369 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11370 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11371 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11372 the extra Bison directives instead of the whole series.
11373 Change the grammar so that there are recoverable errors, and
11374 unrecoverable errors. Now we can have the parser give up before
11375 consuming the whole input. As a result we now can observe that
11376 the lookahead is freed when needed.
11377 Change the parser source to parse argv[1] instead of a hard coded
11378 string.
11379 Simplify yylex, and give a value and location to EOF.
11380 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11381 passed directives already coded in the file.
11382 Add some tests to check the location of "error".
11383 For some tests, the C++ parser is correct, and not yacc.c.
11384 For other tests, they provide different, but unsatisfying, values,
11385 so keep the C++ value so that at least one parser is "correct"
11386 according to the test suite.
11387 (Actions after errors): Remove, this is subsumed by the
11388 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11389
11390 2004-09-06 Akim Demaille <akim@epita.fr>
11391
11392 * data/lalr1.cc: Adjust the indentation of the labels.
11393 (Parser::pop): New.
11394 Use it.
11395
11396 2004-09-06 Akim Demaille <akim@epita.fr>
11397
11398 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11399 argument, an informative message.
11400 Call YY_SYMBOL_PRINT.
11401 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11402 * data/lalr1.cc (destruct_): Likewise.
11403 In addition, no longer depend on b4_yysymprint_generate and
11404 b4_yydestruct_generate to generate these functions, do it "by
11405 hand".
11406
11407 2004-09-03 Akim Demaille <akim@epita.fr>
11408
11409 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11410 invoked, yydestruct the lookahead.
11411 * tests/calc.at (Calculator $1): Update the expected lengths of
11412 traces: there is an added line for the discarded lookahead.
11413 * doc/bison.texinfo (Destructor Decl): Some rewording.
11414 Define "discarded" symbols.
11415
11416 2004-09-02 Akim Demaille <akim@epita.fr>
11417
11418 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11419
11420 2004-09-02 Akim Demaille <akim@epita.fr>
11421
11422 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11423 (YYDSYMPRINTF): Rename as...
11424 (YY_SYMBOL_PRINT): this.
11425 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11426 two.
11427 Use it instead of direct symprint_ calls.
11428 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11429 one.
11430
11431 2004-09-02 Akim Demaille <akim@epita.fr>
11432
11433 * data/lalr1.cc (b4_yysymprint_generate): New.
11434 (symprint_): New member function, defined when YYDEBUG.
11435 Use it consistently instead of token/nterm debugging output by
11436 hand.
11437 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11438 %printer calls to use cdebug_ when using lalr1.cc.
11439
11440 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11441
11442 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11443 with #ifdef YYDEBUG.
11444
11445 2004-08-26 Akim Demaille <akim@epita.fr>
11446
11447 * doc/bison.texinfo (Implementing Loops): Rename as...
11448 (Implementing Gotos/Loops): this.
11449
11450 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11451
11452 Adjust to latest gnulib.
11453 * bootstrap (gnulib_modules): Add xalloc-die.
11454 Set LC_ALL=C so that file names sort consistently.
11455 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11456 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11457 uintmax_t.m4, ulonglong.m4.
11458 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11459 po.m4 since we are now using _gl.m4 instead.
11460
11461 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11462
11463 * src/scan-action.l: Remove. Scanning of semantic actions is
11464 handled in scan-gram.l.
11465
11466 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11467
11468 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11469
11470 * src/location.h (struct): The file member is a uniqstr.
11471 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11472
11473 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11474
11475 Fix bug with non-%union parsers that have printers or destructors,
11476 which led to a Bison core dump. Reported by Peter Fales in
11477 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11478
11479 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11480 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11481 not to our own type.
11482 * src/output.c (symbol_destructors_output, symbol_printers_output):
11483 Don't assume %union.
11484 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11485 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11486 UNION-FLAG. All callers changed.
11487 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11488 Use type char, not unsigned int, when declaring an array of char;
11489 this lets us remove a cast.
11490 (Printers and Destructors): Add non-%union test cases.
11491
11492 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11493
11494 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11495 GLR writeups. E.g., avoid frenchspacing and the future tense,
11496 change "lookahead" to "look-ahead", and change "wrt" to "with
11497 respect to".
11498
11499 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11500
11501 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11502 New sections, split off from the GLR Parsers section. Put the new
11503 Simple GLR Parser near the start of the GLR section, for clarity.
11504 Rewrite connective text.
11505
11506 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11507
11508 * doc/bison.texinfo (Simple GLR Parsers): New section.
11509
11510 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11511
11512 * NEWS, TODO, doc/bison.texinfo:
11513 Use "look-ahead" instead of "lookahead", to be consistent.
11514 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11515 while we're fixing "look-ahead".
11516 * src/conflicts.c (shift_set): Renamed from shiftset.
11517 (look_ahead_set): Renamed from lookaheadset.
11518 * src/print.c: Likewise.
11519 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11520 name for "lookahead".
11521 (report_types, usage): Likewise.
11522 * src/getargs.h (report_look_ahead_tokens): Renamed from
11523 report_lookaheads.
11524 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11525 compute_lookaheads.
11526 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11527 (look_ahead_tokens_print): Renamed from lookaheads_print.
11528 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11529 state_rule_lookaheads_print.
11530 * src/state.h: Likewise.
11531 (reductions.look_ahead_tokens): Renamed from lookaheads.
11532 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11533 AT_DATA_LOOKAHEADS_GRAMMAR.
11534
11535 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11536
11537 * README: Update location of patched M4 distribution.
11538
11539 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11540
11541 Don't assume the C++ compiler takes the same arguments as the C compiler
11542 (trivial change).
11543 * configure.ac (O0CXXFLAGS): New var.
11544 * tests/atlocal.in (CXXFLAGS): Use it.
11545
11546 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11547
11548 Fix some "make check" problems with C++ reported by
11549 Albert Chin-A-Young for Tru64 C++ in this thread:
11550 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11551
11552 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11553 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11554 Output to a .cc file for C++, not to a .c file.
11555 * tests/calc.at (AT_CHECK_CALC): Likewise.
11556 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11557 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11558
11559 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11560
11561 * tests/calc.at, tests/actions.at: Workaround for SGI
11562 C++ compiler. (trivial change)
11563
11564 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11565
11566 Spent a few hours checking out which prerequisite versions the
11567 current sources actually require. I went all the way back to
11568 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11569 a seemingly endless set of combinations of versions more recent
11570 than that. The bottom line is that the current sources require
11571 fairly recent versions of the build tools, and it'll be some work
11572 to change this.
11573 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11574 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11575 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11576 Add comments explaining why those particular versions are
11577 currently needed.
11578
11579 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11580 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11581 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11582
11583 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11584 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11585
11586 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11587
11588 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11589 0.11.5. Suggested by Bruno Haible.
11590 * bootstrap: Remove gettext version checking.
11591
11592 * doc/bison.texinfo (Decl Summary): Also mention that %union
11593 can depend on prerequisite types. Problem reported by Tim
11594 Van Holder.
11595
11596 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11597
11598 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11599 * README-alpha: Don't tell people not to package this.
11600
11601 * bootstrap: Don't assume $(...) works; use `...` instead.
11602 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11603 gettext better.
11604
11605 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11606 put into the -d output file, and mention what to do if YYSTYPE is
11607 defined as a macro.
11608
11609 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11610
11611 Undo change made earlier today: it caused autopoint to not bring
11612 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11613 autopoint's.
11614
11615 * bootstrap: Check that gettext version matches what's in
11616 configure.ac. Warn users to ignore robots.txt ERROR 404.
11617 * bootstrap: Undo today's earlier change (logged below).
11618 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11619
11620 The gettext version checking is causing more trouble than it's
11621 curing; remove it. Problem reported by Paul Hilfinger.
11622
11623 * bootstrap: Issue a warning that one can expect a message
11624 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11625 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11626
11627 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11628
11629 Ensure that the C++ compiler used for testing actually works on a
11630 simple test program; if not, skip the C++-related tests. Problem
11631 reported by Vin Shelton in:
11632 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11633
11634 * m4/cxx.m4: New file.
11635 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11636 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11637 * tests/local.at (AT_COMPILE_CXX): Use it.
11638
11639 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11640
11641 * data/glr.c (yylloc): Output this macro even if locations are not
11642 being generated, as the GLR parser needs it even in that case.
11643 Problem reported by Troy A. Johnson
11644 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11645
11646 * configure.ac (AC_INIT): Update to 1.875e.
11647
11648 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11649
11650 * NEWS: Version 1.875d.
11651 * configure.ac (AC_INIT): Likewise.
11652 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11653
11654 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11655 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11656 lalr1.cc runs afoul of the first, and the last two are no longer
11657 supported by GCC 3.4.0.
11658 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11659 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11660
11661 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11662
11663 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11664 unsigned int, for compatibility with latest gnulib hash module.
11665 * src/state.c (state_hash, state_hasher): Likewise.
11666 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11667 * src/uniqstr.c (hash_uniqstr): Likewise.
11668
11669 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11670
11671 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11672
11673 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11674 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11675 character and string literals.
11676 (unexpected_end): New function.
11677 (unexpected_eof): Use it.
11678 (unexpected_newline): New function.
11679 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11680 actions.
11681
11682 * NEWS: Document %expect-rr.
11683
11684 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11685 Fix typo by replacing $1 with $option.
11686 Remove more 'intl'-related files.
11687 Don't DEFUN AM_INTL_SUBDIR twice.
11688
11689 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11690 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11691 strtoul.c.
11692 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11693 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11694 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11695 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11696 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11697 * src/.cvsignore: Add *.output.
11698
11699 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11700 gets copied to the output file.
11701
11702 2004-04-28 Paul Eggert <eggert@twinsun.com>
11703
11704 Get files from the gnulib and po repositories, instead of relying
11705 on them being in our CVS. Upgrade to latest versions of gnulib
11706 and Automake.
11707
11708 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11709 * bootstrap: Bootstrap from gnulib and po repositories.
11710 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11711 * README-cvs: Document these changes. Remove version numbers from
11712 mentions of build tools, since they change so often. Mention Flex.
11713
11714 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11715 (gl_USE_SYSTEM_EXTENSIONS): Add.
11716 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11717 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
11718 does this for us.
11719 (AC_ISC_POSIX): Remove; we no longer support this
11720 ancient OS, as it gets in the way of latest Autoconf & gnulib.
11721 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11722 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11723 Do not check for C89 headers, except for locale.h which is used
11724 by the Yacc library and must port to K&R hosts.
11725 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11726 Do not check for C89 functions, except for setlocale which is
11727 used by the Yacc library.
11728 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11729 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11730 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11731 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11732 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11733 AM_GNU_GETTEXT): Remove; now done by:
11734 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11735 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11736 for us.
11737
11738 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11739 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11740 Define to empty, as gnulib.mk will do the rest for us.
11741 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11742 for us.
11743 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11744 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11745
11746 * src/files.c: Include gnulib's xstrndup.h.
11747
11748 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11749 (REALLOC): Use xnrealloc, for likewise.
11750 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11751 (strnlen, memrchr): Remove decls; functions no longer used.
11752 Include <stpcpy.h>.
11753
11754 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11755 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11756 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11757 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11758 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11759 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11760 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11761 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11762 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11763 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11764 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11765 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11766 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11767 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11768 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11769 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11770 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11771 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11772 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11773 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11774 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11775 Remove, as these files are now generated automatically
11776 by bootstrap or automake.
11777
11778 * po/ChangeLog: Remove: all but one entry was a duplicate
11779 of this file, and I moved that 2000-11-02 entry here.
11780
11781 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11782 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11783 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11784 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11785 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11786 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11787 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11788 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11789 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11790 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11791 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11792 xstrndup.h.
11793 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11794 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11795 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11796 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11797 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11798 * src/.cvsignore: Remove *_.c.
11799
11800
11801 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11802 support it. (The latest stable gzip doesn't.)
11803
11804 2004-04-27 Paul Eggert <eggert@twinsun.com>
11805
11806 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11807 case, as stos_ is now used by destructors due to the 2004-02-09
11808 change.
11809
11810 Remove more K&R C support.
11811 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11812 * lib/subpipe.c (errno): Remove decl.
11813 Include <stdlib.h> unconditionally.
11814 (EXIT_FAILURE): Remove macro.
11815 * src/complain.c (vfprintf, strerror): Remove.
11816 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11817 unconditionally.
11818 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11819 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11820 (strchr, strspn, memchr): Remove decls.
11821 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11822 unconditionally. Do not declare perror.
11823 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11824 unconditionally.
11825
11826 * src/complain.c (_): Remove useless defn, as system.h defines this.
11827
11828 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11829 with latest obstack.h.
11830 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11831 to procedure types, as obstack.h now does that for us.
11832 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11833
11834 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11835 so that this include file can stand alone.
11836 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11837 does this now. Include subpipe.h first after config.h, to
11838 test whether it can stand alone.
11839
11840 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11841 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11842 unused declaration.
11843
11844 * tests/synclines.at (%union synch line): Put a dummy member in
11845 the union, because empty unions aren't allowed in C. Caught
11846 by GCC 3.4.0.
11847
11848 2004-04-13 Jim Meyering <jim@meyering.net>
11849
11850 * src/conflicts.c (conflicts_print): Correct format string typo:
11851 use `%%' to produce literal `%'. (trivial change)
11852
11853 2004-03-30 Paul Eggert <eggert@twinsun.com>
11854
11855 * src/getargs.c (version): Update copyright year to 2004.
11856
11857 * data/c.m4 (b4_int_type): Use 'short int' rather than
11858 'short', and similarly for 'long', 'unsigned', etc.
11859 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11860 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11861 yy_yypstack, yydumpstack): Likewise.
11862 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11863 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11864 Likewise.
11865 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11866 yy_stack_print, yyparse): Likewise.
11867 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11868 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11869 * lib/bitset.c (bitset_print): Likewise.
11870 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11871 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11872 * lib/bitsetv.c (bitsetv_dump): Likewise.
11873 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11874 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11875 Likewise.
11876 * src/LR0.c (allocate_itemsets): Likewise.
11877 * src/gram.h (rule_number, rule): Likewise.
11878 * src/lalr.h (goto_number): Likewise.
11879 * src/nullable.c (nullable_compute): Likewise.
11880 * src/output.c (prepare_rules): Likewise.
11881 * src/relation.c (relation_print, relation_digraph): Likewise.
11882 * src/relation.h (relation_node): Likewise.
11883 * src/state.h (state_number, transitions, errs, reductions,
11884 struct state): Likewise.
11885 * src/symtab.h (symbol_number, struct symbol): Likewise.
11886 * src/tables.c (vector_number, tally, action_number,
11887 default_goto, goto_actions): Likewise.
11888 * tests/existing.at (GNU Cim Grammar): Likewise.
11889 * tests/regression.at (Web2c Actions): Likewise.
11890
11891 * src/output.c (muscle_insert_short_int_table): Renamed from
11892 muscle_insert_short_table. All uses changed.
11893
11894 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11895
11896 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11897 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11898 Add %expect-rr rule.
11899
11900 * src/scan-gram.l: Recognize %expect-rr.
11901
11902 * src/conflicts.h (expected_sr_conflicts): Rename from
11903 expected_conflicts.
11904 (expected_rr_conflicts): Declare.
11905
11906 * src/conflicts.c (expected_sr_conflicts): Rename from
11907 expected_conflicts.
11908 (expected_rr_conflicts): Define.
11909 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11910 for GLR parsers.
11911 Use expected_sr_conflicts in place of expected_conflicts.
11912 Warn if expected_rr_conflicts used in non-GLR parser.
11913
11914 * doc/bison.texinfo: Add documentation for %expect-rr.
11915
11916 2004-03-08 Paul Eggert <eggert@gnu.org>
11917
11918 Add support for hex token numbers. Suggested by Odd Arild Olsen in
11919 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
11920
11921 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11922 in lalr1.cc.
11923 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11924 * src/scan-gram.l (scan_integer): New function.
11925 ({int}): Use it.
11926 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11927 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11928 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11929 Say "long int", not "long", for uniformity with GNU style.
11930
11931 2004-02-25 Paul Eggert <eggert@twinsun.com>
11932
11933 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11934 compilers. This fixes a problem with Intel's C++ compiler being
11935 chatty, reported by Guido Trentalancia in
11936 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
11937
11938 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11939
11940 Support %destructor and merge error locations in lalr1.cc.
11941
11942 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11943 (Parser::stos_): Define unconditionally.
11944 (Parser::destruct_): New method. Generate its body with
11945 b4_yydestruct_generate.
11946 (Parser::error_start_): New attribute.
11947 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11948 token which are discarded.
11949 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11950 error_start_ when erroneous token are discarded.
11951 (Parser::parse) <yyerrlab1>: Compute the location of the error
11952 token so that it covers all the discarded tokens.
11953 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11954 it can be called with `%skeleton "lalr1.cc"', and do that.
11955
11956 2004-02-02 Paul Eggert <eggert@twinsun.com>
11957
11958 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11959 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11960 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11961 There's no need to mention top_builddir since Automake does that
11962 for us.
11963 (INCLUDES): Remove, as Automake says it's obsolescent.
11964 Contents migrated into AM_CPPFLAGS as described above.
11965 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11966
11967 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11968
11969 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11970 (yyreportSyntaxError): Handle case where lookahead token is
11971 YYEMPTY.
11972
11973 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11974
11975 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11976 resulting parsers are compilable with C++.
11977
11978 2003-12-23 Paul Eggert <eggert@twinsun.com>
11979
11980 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11981 * src/output.c (output_skeleton): Rename local var.
11982 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11983 Bison tokens, as this runs afoul of the 2003-10-07 change that
11984 disallowed NUL bytes in character constants or string literals.
11985
11986 * tests/local.at: Require Autoconf 2.59's Autotest.
11987 * tests/testsuite.at: Don't include local.at, since we now assume
11988 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11989 including it.
11990 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11991 multiple inclusion warnings.
11992
11993 2003-12-02 Akim Demaille <akim@epita.fr>
11994
11995 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11996 conditions.
11997 From Bruno Haible.
11998
11999 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12000
12001 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12002
12003 2003-10-07 Paul Eggert <eggert@twinsun.com>
12004
12005 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12006 if testsuite doesn't exist.
12007
12008 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12009 literals, unfortunately.
12010 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12011 Complain about NUL bytes in character constants or string literals.
12012
12013 2003-10-05 Paul Eggert <eggert@twinsun.com>
12014
12015 * NEWS: Don't document %no-default-prec, as it's still
12016 too experimental.
12017 * doc/bison.texinfo: Document %no-default-prec only if
12018 the defaultprec flag is set. Normally it's not.
12019
12020 2003-10-04 Paul Eggert <eggert@twinsun.com>
12021
12022 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12023 non-modifiable lvalue, instead of a modifiable one.
12024 * doc/bison.texinfo (Actions): Document that $$ can
12025 be assigned to. Do not claim that $$ and $N are
12026 array element references: user code should not rely on this.
12027
12028 2003-10-01 Paul Eggert <eggert@twinsun.com>
12029
12030 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12031 (grammar_declaration): Use it.
12032 * src/scan-gram.l: New token %no-default-prec.
12033 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12034 * NEWS, doc/bison.texinfo: Document the above.
12035
12036 2003-10-01 Akim Demaille <akim@epita.fr>
12037
12038 VCG no longer supports long_straight_phase.
12039
12040 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12041 * src/print_graph.c (print_graph): Adjust.
12042
12043 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
12044 and Paul Eggert <eggert@twinsun.com>
12045
12046 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12047 Table of Symbols): Document %default-prec.
12048 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12049 (grammar_declaration): Set default_prec on %default-prec.
12050 * src/scan-gram.l (%default-prec): New token.
12051 * src/reader.h (default_prec): New flag.
12052 * src/reader.c: Likewise.
12053 (packgram): Handle it.
12054 * tests/conflicts.at (%default-prec without %prec,
12055 %default-prec with %prec, %default-prec 1): New tests.
12056
12057 2003-09-30 Paul Eggert <eggert@twinsun.com>
12058
12059 * tests/testsuite.at: Include local.at, not input.at, fixing
12060 a typo in the 2003-08-25 patch.
12061
12062 2003-08-27 Akim Demaille <akim@epita.fr>
12063
12064 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12065 GCC warnings.
12066
12067 2003-08-26 Akim Demaille <akim@epita.fr>
12068
12069 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12070 "<\#" to avoid magic from Gnus when posting parts of this script.
12071
12072 2003-08-26 Akim Demaille <akim@epita.fr>
12073
12074 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12075 (Parser::parse): here.
12076 Adjust: nerrs and errstatus is now replaced by...
12077 (Parser::nerrs_, Parser::errstatus_): New.
12078
12079 2003-08-25 Akim Demaille <akim@epita.fr>
12080
12081 * config/announce-gen, Makefile.cfg: New.
12082 * Makefile.am: Adjust.
12083 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12084 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12085
12086 2003-08-25 Akim Demaille <akim@epita.fr>
12087
12088 When reducing initial empty rules, Bison parser read an initial
12089 location that is not defined. This results in garbage, and that
12090 affects Bison's own parser. Therefore we need (i) to extend Bison
12091 to support a means to initialize this location, and (ii) to use
12092 this CVS Bison to fix CVS Bison's parser.
12093
12094 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12095 with...
12096 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12097 * src/parse-gram.y: Adjust.
12098 (%initial-action): New.
12099 (%error-verbose): Since we require CVS Bison, there is no reason
12100 not to use it.
12101 * src/scan-gram.l: Adjust.
12102 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12103 * data/yacc.c (yyparse): Use b4_initial_action.
12104
12105 2003-08-25 Akim Demaille <akim@epita.fr>
12106
12107 * doc/bison.texinfo: Don't promote stdout for error messages.
12108
12109 2003-08-25 Akim Demaille <akim@epita.fr>
12110
12111 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12112 From Alexandre Duret-Lutz.
12113
12114 2003-08-25 Akim Demaille <akim@epita.fr>
12115
12116 Version 1.875c.
12117
12118 2003-08-25 Akim Demaille <akim@epita.fr>
12119
12120 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12121 Use them.
12122
12123 2003-08-25 Akim Demaille <akim@epita.fr>
12124
12125 * data/lalr1.cc (Parser::reduce_print_): New.
12126 Use it.
12127
12128 2003-08-25 Akim Demaille <akim@epita.fr>
12129
12130 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12131 error recovery loops. This patch is based on
12132 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12133 Also, augment the similarity between lalr1.cc and yacc.c.
12134 Note: the locations of error recovery rules are not correct yet.
12135
12136 * data/lalr1.cc: Comment changes to augment the similarity between
12137 lalr1.cc and yacc.c.
12138 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12139 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12140 yyerrlab), when hitting EOF, pop the whole stack here instead of
12141 merely falling thru the default error handling mechanism.
12142 (yyerrorlab): New label, with the old contents of YYERROR,
12143 plus the following change: pop the stack of rhs corresponding
12144 to the production that invoked YYERROR. That is how Yacc
12145 behaves (required by POSIX).
12146 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12147 fail.
12148
12149 2003-08-25 Akim Demaille <akim@epita.fr>
12150
12151 Tune local.at so that people can "autom4te -l autotest calc.at -o
12152 calc" for instance, to extract a sub test suite.
12153
12154 * tests/testsuite.at: Move the initialization, Autotest version
12155 requirement, and AT_TESTED invocation into...
12156 * tests/local.at: here.
12157 * tests/testsuite.at: Include it for compatibility with Autoconf
12158 2.57.
12159 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12160 be ignore.
12161
12162 2003-08-04 Paul Eggert <eggert@twinsun.com>
12163
12164 Rework code slightly to avoid gcc -Wtraditional warnings.
12165 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12166 The returned value is now stored in *YY0. All callers changed.
12167 * src/output.c (merge_output): Adjust to the above change.
12168
12169 2003-07-26 Paul Eggert <eggert@twinsun.com>
12170
12171 * data/glr.c (YYASSERT): New macro.
12172 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12173 yyresolveStates, yyprocessOneStack):
12174 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12175 Derived from a suggestion by Frank Heckenbach.
12176
12177 2003-07-25 Paul Eggert <eggert@twinsun.com>
12178
12179 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12180 for portability to K&R C (after ansi2knr, presumably). See
12181 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12182 by Frank Heckenbach, though I have omitted the structure-initialization
12183 part of his glr-knr.diff patch since I recall that the Portable
12184 C Compiler didn't require that change.
12185
12186 Let the user specify how to allocate and free memory.
12187 Derived from a suggestion by Frank Heckenbach in
12188 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12189 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12190 All uses of free, malloc, realloc changed to use these macros,
12191 and unnecessary casts removed.
12192 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12193
12194 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12195
12196 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12197 use s.empty() rather than s == "" to test for empty string; see
12198 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12199 (trivial change)
12200
12201 2003-06-25 Akim Demaille <akim@epita.fr>
12202
12203 * config/depcomp, config/install-sh: Update from masters.
12204
12205 2003-06-20 Paul Eggert <eggert@twinsun.com>
12206
12207 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12208 and return properly parenthesized result.
12209 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12210 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12211 Remove unnecessary parentheses from uses.
12212 * doc/bison.texinfo (Location Default Action): Describe the
12213 conventions for parentheses.
12214
12215 2003-06-19 Paul Eggert <eggert@twinsun.com>
12216
12217 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12218 yyreportTree): Do not assume that size_t is the same width as int,
12219 when printing sizes. Print sizes using an unsigned format.
12220 Problem reported by Frank Heckenbach in
12221 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12222
12223 Port to Forte Developer 7 C compiler.
12224 * data/glr.c (struct YYLTYPE): If locations are not being used,
12225 declare a single dummy member, as empty structs do not conform
12226 to the C standard.
12227 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12228 the Forte Developer 7 C compiler complains that end-of-loop
12229 code is not reached.
12230
12231 2003-06-17 Paul Eggert <eggert@twinsun.com>
12232
12233 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12234 avoid warnings from picky compilers about redefinition of PARAMS.
12235
12236 2003-06-17 Paul Eggert <eggert@twinsun.com>
12237
12238 Version 1.875b.
12239
12240 * NEWS: Document 1.875b.
12241
12242 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12243 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12244 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12245 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12246 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12247 per recent gettext manual's suggestion.
12248 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12249 Use prototypes, not old-style definitions.
12250 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12251 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12252 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12253 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12254 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12255 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12256 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12257 vbitset_or_and_cmp, vbitset_copy): Likewise.
12258
12259 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12260 Do not include <stdlib.h>.
12261 (PARAMS): Define unconditionally for C89.
12262 (ATTRIBUTE_NORETURN): Remove.
12263 (ATTRIBUTE_UNUSED): Define unconditionally.
12264
12265 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12266 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12267 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12268 * lib/vbitset.c, lib/vbitset.h: New files.
12269 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12270 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12271 from libbitset.
12272
12273 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12274 `How Can I Reset @code{yyparse}', since texinfo does not allow
12275 arbitrary @ in node names.
12276
12277 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12278 shouldn't be needed according to the gettext 0.12.1 documentation
12279 but which seem to be needed anyway: codeset.m4 glibc21.m4
12280 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12281 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12282 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12283
12284 * lib/.cvsignore: Add stdbool.h.
12285 * m4/.cvsignore: Add nls.m4, po.m4.
12286
12287 Upgrade to CVS gnulib.
12288 * stdbool_.h: File renamed from stdbool.h.in.
12289 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12290 AC_HEADER_STDBOOL.
12291 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12292 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12293 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12294 (MOSTLYCLEANFILES): New var.
12295 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12296 (stdbool.h): New rule.
12297 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12298 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12299 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12300 m4/quote.m4: Upgrade to today's gnulib.
12301
12302 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12303 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12304 the tests right now.
12305 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12306 yyerror are declared before use; C99 requires this.
12307
12308 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12309
12310 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12311 first.
12312 (yyrecoverSyntaxError): Correct the logic for setting and testing
12313 yyerrState.
12314 Correct comment on handling EOF.
12315 Allow states with only a default reduction, rather than failing
12316 (I can't quite reconstruct why these were not allowed before).
12317
12318 Fixes to avoid problem that $-N rules in GLR parsers can cause
12319 buffer overruns, corrupting state.
12320
12321 * src/output.c (prepare_rules): Output max_left_semantic_context
12322 definition.
12323 * src/reader.h (max_left_semantic_context): New variable declaration.
12324 * src/scan-gram.l (max_left_semantic_context): Define.
12325 (handle_action_dollar): Update max_left_semantic_context.
12326 * data/glr.c (YYMAXLEFT): New definition.
12327 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12328 (yyresolveAction): Ditto.
12329
12330 Fixes to problems with location handling in GLR parsers reported by
12331 Frank Heckenbach (2003/06/05).
12332
12333 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12334 (YYRHSLOC): Add parentheses, and define only if locations used.
12335 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12336 locations not used.
12337 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12338 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12339
12340 * tests/cxx-type.at: Exercise location information; update tests
12341 to differentiate output with and without locations.
12342 Remove forward declarations of yylex and yyerror---caused errors
12343 because default YYLTYPE not yet defined.
12344 Change semantic actions to compute strings, rather than printing
12345 them directly (to test proper passing of semantics values). Change
12346 output to prefix notation and update test data and expected results.
12347 (yylex): Track locations.
12348 (stmtMerge): Return value rather than printing, and include arguments
12349 in value.
12350
12351 2003-06-03 Paul Eggert <eggert@twinsun.com>
12352
12353 Avoid warnings generated by GCC 2.95.4 when Bison is
12354 configured with --enable-gcc-warnings.
12355 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12356 yy::]b4_parser_class_name[::translate_,
12357 yy::Stack::operator[] (unsigned),
12358 yy::Stack::operator[] (unsigned) const,
12359 yy::Slice::operator[] (unsigned),
12360 yy::Slice::operator[] (unsigned) const):
12361 Rename local vars to avoid warnings.
12362 * tests/glr-regression.at (Improper handling of embedded actions
12363 and $-N in GLR parsers): Remove unused local variable from yylex.
12364 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12365 (void) as arg when not pure, since we now assume C89 when building
12366 Bison. Pacify GCC by using parameter.
12367
12368 2003-06-02 Paul Eggert <eggert@twinsun.com>
12369
12370 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12371 yy::Location::lines, yy::Location::columns): Rename arguments
12372 to avoid shadowing; this removes a warning generated by GCC 3.3.
12373
12374 2003-06-01 Paul Eggert <eggert@twinsun.com>
12375
12376 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12377 to g++, as GCC 3.3 complains if you do it.
12378 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12379 everything that WARNING_CFLAGS has, except omit warnings
12380 not suitable for C++.
12381 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12382 * tests/atlocal.in (CXXFLAGS): New var.
12383 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12384
12385 Fix a GLR parser bug I reported in February; see
12386 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12387 The problem was that GLR parsers did not conform to the C standard,
12388 because actions like { $1 = $2 + $3; } expanded to expressions
12389 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12390 to a local variable. The C standard says that expressions
12391 like (var = f ()) + (var = f ()) have undefined behavior.
12392 Another problem was that GCC sometimes issues warnings that
12393 yyfill and its parameters are unused.
12394
12395 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12396 as possibly unused.
12397 (yyfill): New function.
12398 (YYFILL): Use it.
12399 (yyuserAction): Change type of yynormal to bool, so that it matches
12400 the new yyfill signature. Mark it as possibly unused.
12401
12402
12403 Follow up on a bug I reported in February, where a Bison-generated
12404 parser can loop. Provide a test case and a fix for yacc.c. I
12405 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12406 The original bug report is in:
12407 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12408
12409 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12410 macro's size was becoming unwieldy.
12411 (yyerrlab): Do not discard an empty lookahead symbol, as this
12412 might destroy garbage.
12413 (yyerrorlab): New label, with the old contents of YYERROR,
12414 plus the following change: pop the stack of rhs corresponding
12415 to the production that invoked YYERROR. That is how Yacc
12416 behaves, and POSIX requires this behavior.
12417 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12418 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12419 Define 'alarm' to do nothing if unistd.h is not available.
12420 Add a new rule "exp: '-' error;" to test the above change to
12421 data/yacc.c. Use 'alarm' to abort any test taking longer than
12422 10 seconds, as it's probably looping.
12423 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12424 Also, the new yacc.c generates two fewer diagnostics for an
12425 existing test.
12426
12427 2003-05-24 Paul Eggert <eggert@twinsun.com>
12428
12429 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12430 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12431 This fixes a problem reported by John Bowman when the Compaq/HP
12432 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12433 -ansi -Wall -gall).
12434 * data/yacc.c (union yyalloc): Likewise.
12435 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12436
12437 Switch from 'int' to 'bool' where that makes sense.
12438
12439 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12440 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12441 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12442 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12443 Return or accept bool, not int. All callers changed.
12444 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12445 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12446 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12447 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12448 bitset_or_and_cmp_): Likewise.
12449 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12450 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12451 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12452 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12453 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12454 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12455 bitset_stats_or_and_cmp): Likewise.
12456 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12457 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12458 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12459 ebitset_xor_cmp): Likewise.
12460 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12461 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12462 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12463 lbitset_xor_cmp): Likewise.
12464 * lib/bbitset.h: Include <stdbool.h>.
12465 (struct bitset_vtable): The following members now return bool, not
12466 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12467 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12468 or_and_cmp).
12469 * src/conflicts.c (count_rr_conflicts): Likewise.
12470 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12471 All uses changed.
12472 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12473 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12474 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12475 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12476 graph_flag): Likewise.
12477 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12478 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12479 graph_flag): Likewise.
12480 * src/output.c (error_verbose): Likewise.
12481 * src/output.h (error_verbose): Likewise.
12482 * src/reader.c (start_flag, typed): Likewise.
12483 * src/reader.h (typed): Likewise.
12484 * src/getargs.c (LOCATIONS_OPTION): New constant.
12485 (long_options, getargs): Use it.
12486 * src/lalr.c (build_relations): Use bool, not int.
12487 * src/nullable.c (nullable_compute): Likewise.
12488 * src/print.c (print_reductions): Likewise.
12489 * src/tables.c (action_row, pack_vector): Likewise.
12490 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12491 * src/output.c (prepare): Use it.
12492 * src/output.c (token_definitions_output,
12493 symbol_destructors_output, symbol_destructors_output): Use string,
12494 not boolean integer, to keep track of whether to output separator.
12495 * src/print_graph.c (print_core): Likewise.
12496 * src/state.c (state_rule_lookaheads_print): Likewise.
12497
12498 * config/install-sh: Sync from automake 1.7.5.
12499
12500 2003-05-14 Paul Eggert <eggert@twinsun.com>
12501
12502 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12503 semicolon after a grammar declaration, in the interest of possible
12504 future changes to the Bison input language.
12505 Do not allow a stray semicolon at the start of the grammar.
12506 (rhses.1): Allow one or more semicolons after any rule, including
12507 just before "|" as required by POSIX.
12508 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12509 grammar.
12510
12511 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12512
12513 %parse-param support for lalr1.cc.
12514
12515 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12516 b4_cc_constructor_calls, b4_cc_constructor_call,
12517 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12518 definitions.
12519 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12520 parse-param arguments.
12521 (yy::b4_parser_class_name): Declare instance variables to
12522 hold parse-param arguments.
12523 * tests/calc.at: s/value/semantic_value/ because value clashes
12524 with a member of yy::b4_parser_class_name. Adjust C++ code
12525 to handle %parse-param. Enable %parse-param test in C++.
12526
12527 2003-05-12 Paul Eggert <eggert@twinsun.com>
12528
12529 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12530 English a bit. Fix fclose typo. Change "const char" to "char
12531 const", and use ANSI C rather than K&R for "main". Suggest
12532 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12533 and suggest yy_switch_to_buffer.
12534
12535 2003-05-05 Paul Eggert <eggert@twinsun.com>
12536
12537 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12538 C89. This avoids a diagnostic on compilers that define __STDC__
12539 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12540 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12541
12542 2003-05-03 Paul Eggert <eggert@twinsun.com>
12543
12544 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12545 Do not overrun array bounds.
12546 This should fix a bug reported today by Olatunji Oluwabukunmi in
12547 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12548
12549 2003-04-29 Akim Demaille <akim@epita.fr>
12550
12551 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12552 * src/getargs.c, src/getargs.h: here, as bool, not int.
12553 (nondeterministic_parser): New.
12554 * src/parse-gram.y, src/scan-gram.l: Support
12555 %nondeterministic-parser.
12556 * src/output.c (prepare): Use nondeterministic_parser instead
12557 of glr_parser where appropriate.
12558 * src/tables.c (conflict_row, action_row, save_row)
12559 (token_actions, token_actions, pack_vector): Ditto.
12560
12561 2003-04-29 Akim Demaille <akim@epita.fr>
12562
12563 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12564
12565 2003-04-29 Akim Demaille <akim@epita.fr>
12566
12567 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12568 with %pure-parser and %locations to exercise the patch from Yakov
12569 Markovitch below.
12570
12571 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12572
12573 * data/yacc.c: (b4_lex_param): Corrected for the case where
12574 %lex-param is provided and %pure-parser isn't.
12575
12576 2003-04-27 Paul Eggert <eggert@twinsun.com>
12577
12578 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12579 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12580 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12581 if it is not defined.
12582 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12583
12584 2003-04-26 Paul Eggert <eggert@twinsun.com>
12585
12586 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12587 Declare to be of type suitable for the ninf value itself, not of
12588 type suitable for the corresponding table, since the latter might
12589 be unsigned but the ninf value might be negative. This fixes a
12590 bug reported by Alexandre Duret-Lutz in
12591 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12592
12593 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12594 invokes it. We shouldn't invoke it twice because it will attempt
12595 to put error.o in the archive twice. This fixes a glitch reported
12596 by Martin Mokrejs in
12597 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12598
12599 2003-04-21 Paul Eggert <eggert@twinsun.com>
12600
12601 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12602 to gnulib.
12603
12604 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12605
12606 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12607 Fix obvious typo that results in uncompilable GLR parsers
12608 when both %pure-parser and %locations are used. (trivial change)
12609
12610 2003-04-17 Paul Eggert <eggert@twinsun.com>
12611
12612 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12613 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12614 Do not insert the expected token via unput, as this runs afoul
12615 of a POSIX-compatibility bug in flex 2.5.31.
12616 All uses changed to BEGIN the parent state,
12617 since we no longer insert the expected token via unput.
12618 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12619 that is no longer emitted after the above change.
12620
12621 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12622 the first one. This change is from Paul Hilfinger, and it fixes
12623 regression reported by Werner Lemberg in
12624 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12625
12626 (resolve_sr_conflict): Don't invoke state_errs_set
12627 unless one or more tokens have been explicitly made errors.
12628 Otherwise, the above change causes Bison to abort.
12629
12630 * tests/existing.at (GNU pic Grammar): New test case, taken from
12631 Lemberg's email.
12632
12633 2003-03-31 Akim Demaille <akim@epita.fr>
12634
12635 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12636
12637 2003-03-31 Akim Demaille <akim@epita.fr>
12638
12639 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12640 output.
12641
12642 2003-03-31 Akim Demaille <akim@epita.fr>
12643
12644 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12645 From Paul Hilfinger.
12646
12647 2003-03-29 Akim Demaille <akim@epita.fr>
12648
12649 * m4/error.m4: Do not put under dynamic conditions some code which
12650 expansion is under static control.
12651
12652 2003-03-29 Akim Demaille <akim@epita.fr>
12653
12654 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12655
12656 2003-03-29 Akim Demaille <akim@epita.fr>
12657
12658 * doc/bison.texinfo (Strings are Destroyed): New.
12659
12660 2003-03-13 Paul Eggert <eggert@twinsun.com>
12661
12662 * .cvsignore: Add configure.lineno.
12663 * src/.cvsignore: Add yacc.
12664 * tests/.cvsignore: Add testsuite.log.
12665 * doc/fdl.texi: Sync with latest FSF version.
12666
12667 2003-03-12 Paul Eggert <eggert@twinsun.com>
12668
12669 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12670 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12671 cursor, instead of leaving it undefined. This fixes a bug
12672 reported by Tim Van Holder in
12673 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12674 * tests/input.at (Torturing the Scanner): Test the scanner on
12675 an empty input file, which was Tim Van Holder's test case.
12676
12677 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12678 <sys/resource.h> can be included, include sys/time.h and
12679 sys/times.h first, if available. This works around the SunOS
12680 4.1.4 porting bug reported by Bruce Becker in
12681 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12682
12683 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12684 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12685 AC_HEADER_SYS_WAIT.
12686
12687 Merge changes from gnulib. This was prompted because the CVS
12688 snapshot didn't build on Solaris 7 due to strnlen problems.
12689
12690 These changes need to be merged back into gnulib:
12691 * lib/hash.c: Include <stdbool.h> unconditionally.
12692 * m4/onceonly.m4 (m4_quote): New macro.
12693 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12694 Quote AC_FOREACH variable-expansions properly.
12695 The 2003-01-03 obstack.h change also needs merging.
12696 {end of changes requiring merging}
12697
12698 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12699 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12700 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12701 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12702 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12703 New files, imported from gnulib.
12704 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12705 above.
12706
12707 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12708 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12709 gnulib sources.
12710
12711 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12712 Add.
12713 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12714 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12715 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12716 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12717 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12718 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12719 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12720 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12721 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12722 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12723 (jm_PREREQ_ARGMATCH): Remove.
12724 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12725 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12726
12727 * src/system.h: Include <stdbool.h> unconditionally.
12728
12729 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12730 assuming at least C89 in the bitset code for some time now.
12731
12732 2003-03-03 Akim Demaille <akim@epita.fr>
12733
12734 * ro.po: New.
12735
12736 2003-03-02 Akim Demaille <akim@epita.fr>
12737
12738 * doc/bison.texinfo (Table of Symbols): Reactivate the
12739 documentation for %lex-param, and %parse-param.
12740
12741 2003-03-02 Akim Demaille <akim@epita.fr>
12742
12743 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12744 generate verbose error messages.
12745 Use the number of tokens as an upper bound in yytname, as it
12746 cannot be a non terminal.
12747
12748 2003-03-02 Akim Demaille <akim@epita.fr>
12749
12750 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12751 message.
12752
12753 2003-03-02 Akim Demaille <akim@epita.fr>
12754
12755 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12756 Use them to exercise yycheck overrun.
12757 Based on Andrew Suffield's grammar.
12758
12759 2003-03-02 Akim Demaille <akim@epita.fr>
12760
12761 Create tests/local.at for Bison generic testing macros.
12762
12763 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12764 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12765 This new file.
12766 * tests/calc.at (AT_CHECK_CALC): Adjust.
12767 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12768 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12769 * tests/local.at: here.
12770 (AT_COMPILE_CXX): Tags the tests using it as c++.
12771 Ignore the test if CXX is not functional.
12772
12773 2003-03-01 Paul Eggert <eggert@twinsun.com>
12774
12775 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12776 not loc->end, since loc->end might contain garbage and this leads
12777 to undefined behavior on some platforms.
12778 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12779 depend on *loc, so that the reader doesn't give the the false
12780 impression that *loc is initialized.
12781 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12782 does not survive the return.
12783
12784 2003-03-01 Akim Demaille <akim@epita.fr>
12785
12786 * src/scan-gram.l (code_start): Always initialize it when entering
12787 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12788 yylex invocation. An alternative would be making it static, but
12789 then it starts with the second %%'s beginning, instead of its end.
12790
12791 2003-02-28 Paul Eggert <eggert@twinsun.com>
12792
12793 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12794 around a UnixWare 7.1.1 porting bug reported by John Hughes in
12795 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
12796
12797 2003-02-26 Paul Eggert <eggert@twinsun.com>
12798
12799 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12800 Remove Sequent/Pyramid discussion (nobody uses them any more).
12801 Merge VMS and MS-DOS discussion; these ports may well be dead
12802 but let's keep mentioning them for now. Put <> around email
12803 addresses. Add copyright notice.
12804
12805 2003-02-24 Paul Eggert <eggert@twinsun.com>
12806
12807 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12808 to avoid collision with flex use of yylineno.
12809 Problem reported by Bruce Lilly in
12810 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
12811 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12812 * data/yacc.c (yy_reduce_print): Likewise.
12813
12814 * config/depcomp: Sync with Automake 1.7.3.
12815
12816 2003-02-21 Akim Demaille <akim@epita.fr>
12817
12818 * data/lalr1.cc: Use temporary variables instead of casts to
12819 change integer types.
12820 Suggested by Paul Eggert.
12821
12822 2003-02-21 Akim Demaille <akim@epita.fr>
12823
12824 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12825 to avoid confusions with lalr1.cc's notion of Position.
12826 Suggested by Paul Eggert.
12827
12828 2003-02-20 Akim Demaille <akim@epita.fr>
12829
12830 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12831 before initial_columns.
12832 (location.hh): Use consistent variable names when defining the
12833 operator<<.
12834 Use "last" so that we subtract from Positions, not from unsigned.
12835
12836 2003-02-20 Akim Demaille <akim@epita.fr>
12837
12838 * data/lalr1.cc (position.hh): New subfile, including the extended
12839 and Doxygen'ed documentation of class Position.
12840 (location.hh): Use it.
12841 Document a` la Doxygen.
12842 With the help of Benoit Perrot.
12843
12844 2003-02-20 Akim Demaille <akim@epita.fr>
12845
12846 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12847 AT_YACC_IF.
12848 Redefine AT_YYERROR_SEES_LOC_IF using it.
12849 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12850 not defined.
12851 Don't use the location in yy::Parser::error_ and
12852 yy::Parser::print_ when not %locations.
12853 Activate more lalr1.cc tests.
12854
12855 2003-02-19 Akim Demaille <akim@epita.fr>
12856
12857 * data/lalr1.cc: When displaying a line number, be sure to make it
12858 an int.
12859
12860 2003-02-19 Akim Demaille <akim@epita.fr>
12861
12862 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12863 Remove, useless.
12864 (YYABORT, YYACCEPT, YYERROR): New.
12865 * tests/calc.at: Renable the lalr1.cc test.
12866
12867 2003-02-19 Akim Demaille <akim@epita.fr>
12868
12869 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12870 error recovery, mixing with/without pops and discarding of the
12871 lookahead.
12872 Exercise YYERROR.
12873 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12874
12875 2003-02-17 Paul Eggert <eggert@twinsun.com>
12876
12877 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12878 * tests/testsuite.at (AT_COMPILE): Use them.
12879 This fixes the testsuite problem reported by Robert Lentz in
12880 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
12881
12882 2003-02-12 Paul Eggert <eggert@twinsun.com>
12883
12884 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12885 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
12886 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
12887 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12888 Check for malloc failure, for consistency with yacc.c.
12889 (yytname_size): Remove, for consistency with yacc.c.
12890
12891 The bug still remains in data/lalr1.cc, as I didn't have time
12892 to fix it there.
12893
12894 2003-02-06 Akim Demaille <akim@epita.fr>
12895
12896 * configure.ac (GXX): Rename as...
12897 (CXX): this, to keep the original Autoconf semantics.
12898 Require 2.57.
12899 * data/lalr1.cc: Fix b4_copyright invocations.
12900 If YYDEBUG is not defined, don't depend upon name_ being defined.
12901 (location.hh): Include string and iostream.
12902 (Position::filename): New member.
12903 (Position::Position ()): New.
12904 (operator<< (Position)): New.
12905 (operator- (Position, int)): New.
12906 (Location::first, Location::last): Rename as...
12907 (Location::begin, Location::end): these, to mock the conventional
12908 iterator names.
12909 (operator<< (Location)): New.
12910 * tests/atlocal.in (CXX): New.
12911 * tests/testsuite.at (AT_COMPILE_CXX): New.
12912 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12913 locations in a more synthetic way.
12914 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12915 lalr1.cc is used.
12916 Adjust the C locations to match those from Emacs: first column is
12917 column 0.
12918 Change all the expected results.
12919 Conform to the GCS: simplify the locations when applicable.
12920 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12921 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12922 these CPP macros with the m4 macros new defined by...
12923 (AT_CHECK_PUSHDEFS): this, i.e.:
12924 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
12925 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
12926 New macros.
12927 (AT_CHECK_POPDEFS): Undefine them.
12928 (AT_CHECK_CALC_LALR1_CC): New.
12929 Use it for the first lalr1.cc test.
12930
12931 2003-02-04 Akim Demaille <akim@epita.fr>
12932
12933 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12934 Location as is defined.
12935
12936 2003-02-04 Akim Demaille <akim@epita.fr>
12937
12938 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12939 name_ being defined.
12940
12941 2003-02-03 Paul Eggert <eggert@twinsun.com>
12942
12943 * src/gram.h (start_symbol): Remove unused decl.
12944
12945 Use more-consistent naming conventions for local vars.
12946
12947 * src/derives.c (derives_compute): Change type of local var from
12948 int to rule_number.
12949 * src/gram.c (grammar_rules_partial_print): Likewise.
12950 * src/print.c (print_core): Likewise.
12951 * src/reduce.c (reduce_grammar_tables): Likewise.
12952
12953 * src/gram.c (grammar_dump): Change name of item_number *
12954 local var from r to rp.
12955 * src/nullable.c (nullable_compute): Likewise.
12956
12957 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12958
12959 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12960 for symbol or symbol_number var.
12961 * src/reader.c (grammar_start_symbol_set): Likewise.
12962 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12963 Likewise.
12964 * src/state.c (transitions_to): Likewise.
12965 * src/state.h: Likewise.
12966 * src/tables.c (symbol_number_to_vector_number): Likewise.
12967
12968 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12969 char * var.
12970
12971 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12972 var.
12973
12974 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12975 var.
12976
12977 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12978 Use str, not s, for char * var. Use ch, not c, for character var.
12979 Use size for size var.
12980
12981 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12982 char * var.
12983 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12984 uniqstr var.
12985 * src/uniqstr.h: Likewise.
12986
12987 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12988 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12989 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12990 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12991 param to have same name as that of enum, so that we don't use
12992 "s" to stand for a non-state.
12993
12994 2003-02-02 Akim Demaille <akim@epita.fr>
12995
12996 * src/scan-skel.l: Scan more than one inert character per yylex
12997 invocation.
12998
12999 2003-02-01 Paul Eggert <eggert@twinsun.com>
13000
13001 Version 1.875a.
13002
13003 * po/LINGUAS: Add ms.
13004
13005 2003-01-30 Akim Demaille <akim@epita.fr>
13006
13007 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13008
13009 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13010
13011 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13012 of $1.
13013
13014 Changes in response to error report by S. Eken: GLR mode does not
13015 handle negative $ indices or $ indices in embedded rules correctly.
13016 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13017
13018 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13019 (b4_rhs_location): Ditto.
13020 (yyfill): New function to copy from stack tree into array
13021 incrementally.
13022 (yyuserAction): Modify to allow incremental move of semantic values
13023 to rhs array when in GLR mode.
13024 Define YYFILL to use in user-defined actions to fill semantic array
13025 as needed.
13026 Remove dummy use of yystack, as there is now a guaranteed use.
13027 (yydoAction): Modify to allow incremental move of semantic values
13028 to rhs array when in GLR mode.
13029 (yyresolveAction): Ditto.
13030 (yyglrShiftDefer): Update comment.
13031 (yyresolveStates): Use X == NULL for pointers, not !X.
13032 (yyglrReduce): Ditto.
13033 (yydoAction): Ditto
13034
13035 * tests/glr-regr1.at: Rename to ...
13036 * tests/glr-regression.at: Add new regression test for the problems
13037 described above (adapted from S. Eken).
13038 Update copyright notice.
13039 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13040 * tests/Makefile.am: Ditto.
13041
13042 2003-01-28 Paul Eggert <eggert@twinsun.com>
13043
13044 * data/lalr1.cc: Do not use @output_header_name@ unless
13045 b4_defines_flag is set. This fixes two bugs reported by
13046 Tim Van Holder in
13047 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13048 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13049
13050 2003-01-21 Paul Eggert <eggert@twinsun.com>
13051
13052 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13053 we don't need to worry about yyerrlab1 being reported as an
13054 "unused label" by non-GCC C compilers. The downside is that if
13055 locations are used then a couple of statements are duplicated each
13056 time YYERROR is invoked, but the upside is that the warnings
13057 should vanish.
13058 (yyerrlab1): Move code to YERROR.
13059 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13060 This reverts some of the 2002-12-27 change.
13061
13062 2003-01-17 Paul Eggert <eggert@twinsun.com>
13063
13064 * src/output.c (symbol_printers_output): Fix typo that led
13065 to core dump. Problem reported by Antonio Rus in
13066 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13067
13068 2003-01-13 Akim Demaille <akim@epita.fr>,
13069 Quoc Peyrot <chojin@lrde.epita.fr>,
13070 Robert Anisko <anisko_r@lrde.epita.fr>
13071
13072 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13073 when the stacks contain one element, as the loop would otherwise
13074 free the last state, and then use the top state (the one we just
13075 popped). This means that the initial elements will not be freed
13076 explicitly, as is the case in yacc.c; it is not a problem, as
13077 these elements have fake values.
13078
13079 2003-01-11 Paul Eggert <eggert@twinsun.com>
13080
13081 * NEWS: %expect-violations are now just warnings, reverting
13082 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13083 bootstrapping problem reported by Matthias Klose; see
13084 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13085 * src/conflicts.c (conflicts_print): Likewise.
13086 * tests/conflicts.at (%expect not enough, %expect too much,
13087 %expect with reduce conflicts): Likewise.
13088 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13089 that the warning is enabled if the number of conflicts changes
13090 (not necessarily increases).
13091
13092 * src/getargs.c (version): Update copyright year.
13093
13094 2003-01-09 Akim Demaille <akim@epita.fr>
13095
13096 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13097
13098 2003-01-08 Paul Eggert <eggert@twinsun.com>
13099
13100 * Makefile.maint (WGETFLAGS):
13101 New macro, containing "-C off" to disable proxy caches.
13102 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13103 (rel-check): Use $(WGET) instead of wget.
13104
13105 2003-01-06 Paul Eggert <eggert@twinsun.com>
13106
13107 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13108 the GLR paper of Scott, Johnstone and Hussain.
13109
13110 2003-01-04 Paul Eggert <eggert@twinsun.com>
13111
13112 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13113 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13114 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13115 (EXTRA_LIBRARIES): New var, for liby.a.
13116 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13117 (EXTRA_SCRIPTS): New var, for yacc.
13118
13119 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13120 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13121 Problem reported by Nelson H. F. Beebe.
13122
13123 2003-01-03 Paul Eggert <eggert@twinsun.com>
13124
13125 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13126 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13127 when compiling Bison 1.875's `bitset bset = obstack_alloc
13128 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13129
13130 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13131 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13132 grow to a huge size with typical invocation.
13133
13134 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13135 Use the pattern recommended by Autoconf 2.57, except also protect
13136 against double-definition.
13137 * src/system.h: Likewise.
13138 Portability issues reported by Nelson H. F. Beebe.
13139
13140 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13141 All uses changed. Provide a definition in both C and C++.
13142 (yytrue, yyfalse): Define even if defined (__cplusplus).
13143
13144 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13145 Reported by Nelson H. F. Beebe.
13146
13147 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13148
13149 2003-01-02 Paul Eggert <eggert@twinsun.com>
13150
13151 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13152 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13153 Bug reported by Nelson H. F. Beebe.
13154
13155 2003-01-01 Paul Eggert <eggert@twinsun.com>
13156
13157 * Version 1.875.
13158
13159 2002-12-30 Paul Eggert <eggert@twinsun.com>
13160
13161 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13162 Moved here from...
13163 (<INITIAL>","): Here. This causes stray "," to be treated
13164 more uniformly.
13165
13166 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13167 last brace in braced code when not in Yacc mode, for compatibility
13168 with Bison 1.35. This resurrects the 2001-12-15 patch to
13169 src/reader.c.
13170
13171 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13172 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13173
13174 2002-12-28 Paul Eggert <eggert@twinsun.com>
13175
13176 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13177 that of SYM's type. This fixes Debian bug 168069, reported by
13178 Thomas Olsson.
13179
13180 2002-12-28 Paul Eggert <eggert@twinsun.com>
13181
13182 Version 1.75f.
13183
13184 Switch back to the Yacc style of conflict reports, undoing some
13185 of the 2002-07-30 change.
13186 * doc/bison.texinfo (Understanding): Use Yacc style for
13187 conflict reports. Also, use new way of locating rules.
13188 * src/conflicts.c (conflict_report):
13189 Renamed from conflict_report_yacc, removing the old
13190 'conflict_report'. Translate the entire conflict report at once,
13191 so that we don't assume that "," has the same interpretation in
13192 all languages.
13193 (conflicts_output): Use Yacc-style conflict report for each state,
13194 instead of our more-complicated style.
13195 (conflicts_print): Use Yacc-style conflict report, except print
13196 the input file name when not emulating Yacc.
13197 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13198 Conflicted Reduction, %expect not enough, %expect too much,
13199 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13200 * tests/existing.at (GNU Cim Grammar): Likewise.
13201 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13202
13203 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13204 fatal): Don't invoke fflush; it's not needed and it might even be
13205 harmful for stdout, as stdout might not be open.
13206 * src/reduce.c (reduce_print): Likewise.
13207
13208 2002-12-27 Paul Eggert <eggert@twinsun.com>
13209
13210 Fix a bug where error locations were not being recorded correctly.
13211 This problem was originally reported by Paul Hilfinger in
13212 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13213
13214 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13215 top of the location stack's error locations.
13216 (yyerrlab): Set it. When discarding a token, push its location
13217 onto yylerrsp so that we don't lose track of the error's end.
13218 (yyerrlab1): Now is only the target of YYERROR, so that we can
13219 properly record the location of the action that failed. For GCC
13220 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13221 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13222 (yyerrlab2): New label, which yyerrlab now falls through to.
13223 Compute the error's location by applying YYLLOC_DEFAULT to
13224 the locations of all the symbols that went into the error.
13225 * doc/bison.texinfo (Location Default Action): Mention that
13226 YYLLOC_DEFAULT is also invoked for syntax errors.
13227 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13228 Error locations include the locations of all the tokens that were
13229 discarded, not just the last token.
13230
13231 2002-12-26 Paul Eggert <eggert@twinsun.com>
13232
13233 * src/files.c: Include quote.h.
13234 (compute_output_file_names): Warn if we detect conflicting
13235 outputs to the same file. This should catch the misunderstanding
13236 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13237
13238 * src/conflicts.c (conflicts_print): If the user specifies
13239 "%expect N", report an error if there are any reduce/reduce
13240 conflicts. This is what the manual says should happen.
13241 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13242 * tests/conflicts.at (%expect with reduce conflicts): New test.
13243
13244 Don't use m4_include on relative file names, as it doesn't work as
13245 desired if there happens to be a file with that name under ".".
13246
13247 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13248 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13249 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13250 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13251 * src/output.c (output_skeleton): Use full path names when
13252 specifying a file to include; don't rely on include path, as
13253 it's unreliable when the working file contains a file with
13254 that name.
13255
13256 2002-12-25 Paul Eggert <eggert@twinsun.com>
13257
13258 Remove obsolete references to bison.simple and bison.hairy.
13259 Problem mentioned by Aubin Mahe in
13260 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13261 * data/glr.c: Comment fix.
13262 * doc/bison.1: Remove references. Also, mention "yacc".
13263
13264 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13265 with -g option.
13266
13267 * src/parse-gram.y (declaration): Use enum "report_states" rather
13268 than its numeric value 1.
13269
13270 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13271 opening a new one. This fixes Debian bug 165349, reported by
13272 Bruce Stephens.
13273
13274 2002-12-24 Paul Eggert <eggert@twinsun.com>
13275
13276 Version 1.75e.
13277
13278 * Makefile.maint (cvs-update): Don't assume that the shell
13279 supports $(...), as Solaris sh doesn't.
13280
13281 * src/parse-gram.y (lloc_default): Remove test for empty
13282 nonterminals at the end, since it didn't change the result.
13283
13284 2002-12-24 Paul Eggert <eggert@twinsun.com>
13285
13286 If the user does not define YYSTYPE as a macro, Bison now declares it
13287 using typedef instead of defining it as a macro. POSIX requires this.
13288 For consistency, YYLTYPE is also declared instead of defined.
13289
13290 %union directives can now have a tag before the `{', e.g., the
13291 directive `%union foo {...}' now generates the C code
13292 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13293 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13294 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13295 instead of `yyltype'.
13296
13297 `yystype' and `yyltype' are now obsolescent macros instead of being
13298 typedefs or tags; they are no longer documented and will be
13299 withdrawn in a future release.
13300
13301 * data/glr.c (b4_location_type): Remove.
13302 (YYSTYPE): Renamed from yystype.
13303 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13304 (struct YYLTYPE): Renamed from struct yyltype.
13305 (YYLTYPE): Renamed from yyltype.
13306 (yyltype, yystype): New (and obsolescent) macros,
13307 for backward compatibility.
13308 * data/yacc.c: Likewise.
13309
13310 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13311 does not specify a union tag. This is for compatibility with
13312 Solaris 9 yacc.
13313
13314 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13315 const *, since it is now modified by stripping surrounding { }.
13316 (current_braced_code): Remove.
13317 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13318 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13319 trailing " {...}". Now of type <chars>.
13320 (grammar_declaration): Adjust to bundled tokens.
13321 (code_content): Remove; stripping is now done by add_param.
13322 (print_token_value): Print contents of bundled tokens.
13323 (token_name): New function.
13324
13325 * src/reader.h (braced_code, current_braced_code): Remove.
13326 (token_name): New decl.
13327
13328 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13329 token_type, not braced_code code_kind. All uses changed.
13330 (SC_PRE_CODE): New state, for scanning after a keyword that
13331 has (or usually has) an immediately-following braced code.
13332 (token_type): New local var, to keep track of which token type
13333 to return when scanning braced code.
13334 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13335 <INITIAL>"%parse-param", <INITIAL>"%printer",
13336 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13337 instead of returning a token type immediately.
13338 (<INITIAL>"{"): Set token type.
13339 (<SC_BRACED_CODE>"}"): Use it.
13340 (handle_action_dollar, handle_action_at): Now returns bool
13341 indicating success. Fail if ! current_rule; this prevents a core dump.
13342 (handle_symbol_code_dollar, handle_symbol_code_at):
13343 Remove; merge body into caller.
13344 (handle_dollar, handle_at): Complain in invalid contexts.
13345
13346 * NEWS, doc/bison.texinfo: Document the above.
13347 * NEWS: Fix years and program names in copyright notice.
13348
13349 2002-12-17 Paul Eggert <eggert@twinsun.com>
13350
13351 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13352 Reporting, Table of Symbols): Omit mentions of %lex-param and
13353 %parse-param from the documentation for now.
13354
13355 2002-12-15 Paul Eggert <eggert@twinsun.com>
13356
13357 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13358 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13359 lookahead symbol, and which sets yychar in parser actions) and it
13360 disagreed with the Bison documentation. Bug
13361 reported by Andrew Walrond.
13362
13363 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13364 as the caller now does that.
13365 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13366 (YYEMPTY): Parenthesize right hand side, since others use it.
13367 (yyparse): Don't assume that our generated code is the only code
13368 that sets yychar.
13369
13370 2002-12-13 Paul Eggert <eggert@twinsun.com>
13371
13372 Version 1.75d.
13373
13374 POSIX requires a "yacc" command.
13375 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13376 (MOSTLYCLEANFILES): Add yacc.
13377 (yacc): New rule.
13378 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13379 as an alias for bison y.
13380
13381 * po/LINGUAS: Add da.
13382
13383 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13384 problem with latest <getopt.h>.
13385 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13386
13387 * doc/fdl.texi: Upgrade to 1.2.
13388 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13389 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13390 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13391 gnulib.
13392 * config/install-sh: Sync with autotools.
13393
13394 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13395 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13396 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13397 locations are requested.
13398 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13399 locations are requested.
13400
13401 2002-12-12 Paul Eggert <eggert@twinsun.com>
13402
13403 Remove unportable casts and storage allocation tricks.
13404 While we're at it, remove almost all casts, since they
13405 usually aren't needed and are a sign of trouble.
13406
13407 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13408
13409 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13410 the pointer DSET returned by malloc; this isn't portable.
13411 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13412 Similarly for DERIVES.
13413 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13414 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13415 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13416
13417 * src/derives.c (derives_compute): Do not bother invoking
13418 int_of_rule_number, since rule numbers are integers.
13419
13420 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13421 rather than XMALLOC (char, N).
13422
13423 * src/files.c (filename_split): Rewrite to avoid cast.
13424
13425 * src/gram.h (symbol_number_as_item_number,
13426 item_number_as_symbol_number, rule_number_as_item_number,
13427 item_number_as_rule_number):
13428 Now inline functions rather than macros, to avoid casts.
13429 * src/state.h (state_number_as_int): Likewise.
13430 * src/tables.c (state_number_to_vector_number,
13431 symbol_number_to_vector_number): Likewise.
13432
13433 * src/gram.h (int_of_rule_number): Remove; no longer used.
13434
13435 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13436 since the resulting storage is always stored into.
13437
13438 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13439 where it's needed.
13440
13441 * src/muscle_tab.c (muscle_m4_output):
13442 Now inline. Return bool, not int.
13443 * src/state.c (state_compare): Likewise.
13444 * src/symtab.c (symbol_check_defined,
13445 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13446 hash_compare_symbol, hash_symbol):
13447 Likewise.
13448 * src/uniqstr.c (uniqstr_print): Likewise.
13449 * src/muscle_tab.c (muscle_m4_output_processor):
13450 New function, to avoid casts.
13451 * src/state.c (state_comparator, stage_hasher): Likewise.
13452 * src/symtab.c (symbol_check_defined_processor,
13453 symbol_check_alias_consistency_processor, symbol_pack_processor,
13454 symbol_translation_processor, hash_symbol_comparator,
13455 hash_symbol_hasher): Likewise.
13456 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13457 * src/muscle_tab.c (muscles_m4_output):
13458 Use new functions instead of casting old functions unportably.
13459 * src/state.c (state_hash_new): Likewise.
13460 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13461 symbols_token_translations_init):
13462 Likewise.
13463 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13464
13465 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13466 var instead of casting to long, to avoid casts.
13467 (prepare_states): Use MALLOC rather than alloca, so that we don't
13468 have to worry about alloca.
13469 * src/state.c (state_hash_lookup): Likewise.
13470
13471 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13472 local var instead of casting to unsigned char, to avoid casts.
13473
13474 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13475 STATE_ALLOC): Remove.
13476 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13477 rather than calloc, and use offsetof to avoid allocating slightly
13478 too much storage.
13479 (state_new): Initialize all members.
13480
13481 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13482
13483 * src/symtab.c (symbol_free): Remove; unused.
13484 (symbol_get): Remove cast in lhs of assignment.
13485 (symbols_do): Now static. Accept generic arguments, not
13486 hashing-related ones.
13487
13488 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13489 (symbol_processor): Remove.
13490 (symbols_do): Remove decl; now static.
13491
13492 * src/system.h (alloca): Remove; decl no longer needed.
13493 (<stddef.h>): Include, for offsetof.
13494 (<inttypes.>, <stdint.h>): Include if available.
13495 (uintptr_t): New type, if system lacks it.
13496 (CALLOC, MALLOC, REALLOC): New macros.
13497 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13498 new macros.
13499
13500 * src/tables.c (table_size): Now int, to pacify GCC.
13501 (table_grow, table_ninf_remap): Use signed table size.
13502 (save_row): Don't bother initializing locals when not needed.
13503 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13504 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13505
13506 * src/vcg.h: Correct misspellings.
13507
13508 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13509
13510
13511 * src/getargs.c (getargs): Don't assume EOF == -1.
13512
13513 2002-12-09 Paul Eggert <eggert@twinsun.com>
13514
13515 Change identifier spellings to avoid collisions with names
13516 that are reserved by POSIX.
13517
13518 Don't use names ending in _t, since POSIX reserves them.
13519 For consistency, remove _e and _s endings -- they're weren't
13520 needed to remove ambiguity. All uses changed.
13521 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13522 turn was just renamed from struniq_t.
13523 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13524 which in turn was just renamed from struniq_processor_t.
13525 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13526 in turn was renamed from hash_compare_struniq_t.
13527 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13528 (state_list): Renamed from state_list_t.
13529 * src/assoc.h (assoc): Renamed from assoc_t.
13530 * src/conflicts.c (enum conflict_resolution): Renamed from
13531 enum conflict_resolution_e.
13532 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13533 (rule_list): Renamed from rule_list_t.
13534 * src/getargs.h (enum trace): Renamed from enum trace_e.
13535 (enum report): Renamed from enum report_e.
13536 * src/gram.h (item_number): Renamed from item_number_t.
13537 (rule_number): Renamed from rule_number_t.
13538 (struct rule_s): Remove the "rule_s" part; not used.
13539 (rule): Renamed from rule_t.
13540 (rule_filter): Renamed from rule_filter_t.
13541 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13542 (goto_list): Renamed from goto_list_t.
13543 * src/lalr.h (goto_number): Renamed from goto_number_t.
13544 * src/location.h (location): Renamed from location_t.
13545 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13546 and moved here from:
13547 * src/muscle_tab.h (muscle_entry_t): here.
13548 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13549 (rule_list): Renamed from rule_list_t.
13550 * src/print_graph.c (static_graph): Renamed from graph.
13551 * src/reader.h (braced_code): Renamed from braced_code_t.
13552 Remove brace_code_e tag.
13553 * src/relation.h (relation_node): Renamed from relation_node_t.
13554 (relation_nodes): Renamed from relation_nodes_t.
13555 (relation): Renamed from relation_t.
13556 * src/state.h (state_number): Renamed from state_number_t.
13557 (struct state): Renamed from struct state_s.
13558 (state): Renamed from state_t.
13559 (transitions): Renamed from transitions_t. Unused (and
13560 misspelled) transtion_s tag removed.
13561 (errs): Renamed from errs_t. Unused errs_s tag removed.
13562 (reductions): Renamed from reductions_t. Unused tag
13563 reductions_s removed.
13564 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13565 (struct symbol_list): Renamed from struct symbol_list_s.
13566 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13567 (struct symbol): Renamed from struct symbol_s.
13568 (symbol): Renamed from symbol_t.
13569 * src/tables.c (vector_number): Renamed from vector_number_t.
13570 (action_number): Renamed from action_t.
13571 * src/tables.h (base_number): Renamed from base_t.
13572 * src/vcg.h (enum color): Renamed from enum color_e.
13573 (enum textmode): Renamed from enum textmode_e.
13574 (enum shape): Renamed from enum shape_e.
13575 (struct colorentry): Renamed from struct colorentry_s.
13576 (struct classname): Renamed from struct classname_s.
13577 (struct infoname): Renamed from struct infoname_s.
13578 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13579 (enum decision): Renamed from enum decision_e.
13580 (enum orientation): Renamed from enum orientation_e.
13581 (enum alignment): Renamed from enum alignment_e.
13582 (enum arrow_mode): Renamed from enum arrow_mode_e.
13583 (enum crossing_type): Renamed from enum crossing_type_e.
13584 (enum view): Renamed from enum view_e.
13585 (struct node): Renamed from struct node_s.
13586 (node): Renamed from node_t.
13587 (enum linestyle): Renamed from enum linestyle_e.
13588 (enum arrowstyle): Renamed from enum arrowstyle_e.
13589 (struct edge): Renamed from struct edge.
13590 (edge): Renamed from edge_t.
13591 (struct graph): Renamed from struct graph_s.
13592 (graph): Renamed from graph_t.
13593 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13594 Rename value_t -> value.
13595 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13596 value_t_as_yystype -> value_as_yystype.
13597
13598 Don't include <errno.h> in the mainstream code, since it
13599 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13600 * lib/get-errno.c, lib/get-errno.h: New files.
13601 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13602 get-errno.c.
13603 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13604 * src/output.c (output_skeleton): Likewise.
13605 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13606 instead of errno.
13607 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13608 Likewise.
13609 (handle_action_dollar, handle_action_at): Likewise.
13610 * src/system.h: Do not include <errno.h>.
13611 (TAB_EXT): Renamed from EXT_TAB.
13612 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13613
13614 Avoid str[a-z]*, since <string.h> reserves that name space.
13615 Change all instances of "struniq" in names to "uniqstr", and
13616 likewise for "STRUNIQ" and "UNIQSTR".
13617 * src/uniqstr.c: Renamed from src/struniq.c.
13618 * src/uniqstr.h: Renamed from src/struniq.h.
13619 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13620 * src/files.c (strsuffix): Remove; unused.
13621 (concat2): Renamed from stringappend. Now static.
13622 * src/files.h (strsuffix, stringappend): Remove; unused.
13623 * src/parse-gram.y (<chars>): Renamed from <string>.
13624 (<uniqstr>): Renamed from <struniq>.
13625 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13626 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13627 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13628 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13629 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13630 (N_EXPAND): Renamed from N_STRETCH.
13631
13632 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13633 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13634 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13635 Remove; unused.
13636 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13637 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13638 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13639 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13640 (BASE_MAXIMUM): Renamed from BASE_MAX.
13641 (BASE_MINIMUM): Renamed from BASE_MIN.
13642 (ACTION_MAX): Remove; unused.
13643 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13644 Unnecessary casts removed from above defines.
13645
13646
13647 Fix misspelling in names.
13648 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13649 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13650 G_NODE_ALIGNEMENT.
13651
13652
13653 * lib/timevar.c (timevar_report): Renamed from time_report,
13654 for consistency with other names.
13655 * lib/timevar.h (timevar_report): New decl.
13656 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13657
13658
13659 Sort include-file uses.
13660
13661 Reorder all include files under src to be in the order "system.h".
13662 then the ../lib include files in angle brackets (alphabetized),
13663 then the . include files in double-quotes (alphabetized). Fix
13664 dependency breakages encountered in this process, as follows:
13665 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13666 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13667 * src/state.h: Include "symtab.h".
13668
13669 2002-12-08 Paul Eggert <eggert@twinsun.com>
13670
13671 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13672 since this causes problems when __file__ contains character
13673 sequences like "@" that are treated specially by src/scan-skel.l.
13674 Instead, just use the file's basename. This fixes the bug
13675 reported by Martin Mokrejs in
13676 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13677
13678 2002-12-06 Paul Eggert <eggert@twinsun.com>
13679
13680 Add support for rules that do not have trailing semicolons, as
13681 POSIX requires. Improve the quality of locations in Bison
13682 diagnostics.
13683
13684 * src/location.c: Include <quotearg.h>.
13685 (empty_location): Now const.
13686 (location_print): New function. Follow the recommendation of the
13687 GNU Coding Standards for locations that span file boundaries.
13688 * src/location.h: Do not include <quotearg.h>; no longer needed.
13689 (boundary): New type.
13690 (location_t): Use it. This allows locations to span file boundaries.
13691 All member uses changed: file -> start.file or end.file (as needed),
13692 first_line -> start.line, first_column -> start.column,
13693 last_line -> end.line, last_column -> end.column.
13694 (equal_boundaries): New function.
13695 (LOCATION_RESET, LOCATION_STEP): Remove.
13696 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13697 (empty_location): Now const.
13698 (location_print): New decl.
13699 * src/parse-gram.y (lloc_default): New function, which handles
13700 empty locations more accurately.
13701 (YYLLOC_DEFAULT): Use it.
13702 (%token COLON): Remove.
13703 (%token ID_COLON): New token.
13704 (rules): Use it.
13705 (declarations, rules): Remove trailing semicolon.
13706 (declaration, rules_or_grammar_declaration):
13707 Allow empty (";") declaration.
13708 (symbol_def): Remove empty actions; no longer needed.
13709 (rules_or_grammar_declaration): Remove trailing semicolon.
13710 (semi_colon.opt): Remove.
13711 * src/reader.h: Include location.h.
13712 (scanner_cursor): New decl.
13713 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13714 rolling our own.
13715 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13716 of *loc.
13717 (STEP): Remove. No longer needed, now that adjust_location does
13718 the work. All uses removed.
13719 (scanner_cursor): New var.
13720 (adjust_location): Renamed from extend_location. It now sets
13721 *loc and adjusts the scanner cursor. All uses changed.
13722 Don't bother testing for CR.
13723 (handle_syncline): Remove location arg; now updates scanner cursor.
13724 All callers changed.
13725 (unexpected_end_of_file): Now accepts start boundary of token or
13726 comment, not location. All callers changed. Update scanner cursor,
13727 not the location.
13728 (SC_AFTER_IDENTIFIER): New state.
13729 (context_state): Renamed from c_context. All uses changed.
13730 (id_loc, code_start, token_start): New local vars.
13731 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13732 processing of Yacc white space and equivalents here.
13733 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13734 instead of returning ID immediately, since we need to search for
13735 a subsequent colon.
13736 (<INITIAL>"'", "\""): Save token_start.
13737 (<INITIAL>"%{", "{", "%%"): Save code_start.
13738 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13739 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13740 BEGIN context_state at end, not INITIAL.
13741 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13742 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13743 Return correct token start.
13744 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13745 the start of a character, string or multiline comment is found.
13746 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13747 Reduction): Adjust reported locations to match the more-precise
13748 results now expected.
13749 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13750 * tests/reduce.at (Useless Rules, Reduced Automaton,
13751 Underivable Rules): Likewise.
13752 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13753 or "|"' now that so many other tokens are allowed by the new grammar.
13754
13755 * src/complain.h (current_file): Remove duplicate decl;
13756 current_file is now owned by files.h.
13757 * src/complain.c, src/scan-gram.l: Include files.h.
13758
13759 2002-12-06 Paul Eggert <eggert@twinsun.com>
13760
13761 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13762 promotes to int; it might be unsigned int.
13763 * data/yacc.c (yy_reduce_print): Likewise.
13764
13765 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13766 be #defined in the prologue, not in the Bison declarations.
13767 This fixes Debian Bug 102878, reported by Shaul Karl.
13768
13769 2002-12-02 Paul Eggert <eggert@twinsun.com>
13770
13771 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13772 * lib/strtoul.c: New file, from gnulib.
13773 This fixes a porting bug reported by Peter Klein in
13774 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
13775
13776 2002-11-30 Paul Eggert <eggert@twinsun.com>
13777
13778 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13779 and put only a forward declaration in the prologue. This is for
13780 consistency with the other scanner helper functions.
13781
13782 Type clashes now generate warnings, not errors, since it
13783 appears that POSIX may allow some grammars with type clashes.
13784 * src/reader.c (grammar_current_rule_check): Warn about
13785 type clashes instead of complaining.
13786 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13787
13788 Add Yacc library, since POSIX requires it.
13789 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13790 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13791 * lib/main.c, lib/yyerror.c: New files.
13792
13793 gram_error can be static; it need not be extern.
13794 * src/reader.h (gram_error): Remove decl.
13795 * src/parse-gram.y (gram_error): Now static. Add static decl.
13796 (print_token_value): Omit parameter names from forward decl,
13797 for consistency.
13798
13799 2002-11-29 Paul Eggert <eggert@twinsun.com>
13800
13801 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13802 be declared before being used. E.g., one should typically
13803 declare them in the prologue. Use GNU coding style in examples.
13804 Put "const" consistently after the type it modifies. Mention
13805 that C99 supports "inline". Mention that yyerror traditionally
13806 returns "int".
13807
13808 %parse-param and %lex-param now take just one argument, the
13809 declaration; the argument name is deduced from the declaration.
13810
13811 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13812 Reporting, Table of Symbols): Document this.
13813 * src/parse-gram.y (add_param): New function.
13814 (COMMA): Remove.
13815 (declaration): Implement new rule for %parse-param and %lex-param.
13816 * src/scan-gram.l: "," now elicits a warning, rather than being
13817 a token; this is more compatible with byacc.
13818 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13819
13820 2002-11-27 Paul Eggert <eggert@twinsun.com>
13821
13822 Rename identifiers to avoid real and potential collisions.
13823
13824 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13825 to avoid collision with lex macro described by Bruce Lilly in
13826 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13827 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13828 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13829 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13830 All uses changed.
13831 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13832 The name "yycontrol" violates the name space rules, and this stuff
13833 wasn't being used anyway.
13834 (input): Remove action; this stuff wasn't being used.
13835 (gram_error): Rename local variable yylloc -> loc.
13836 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13837 (YY_DECL): Don't use "yy" at start of local variables.
13838 All uses changed, e.g., yylloc -> loc.
13839 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13840 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13841 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13842 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13843
13844 * src/parse-gram.y (gram_error): loc is now const *.
13845 * src/reader.h (gram_error): Likewise.
13846
13847 2002-11-24 Paul Eggert <eggert@twinsun.com>
13848
13849 Version 1.75c.
13850
13851 * tests/actions.at (Actions after errors): Use an output format
13852 more similar to that of the Printers and Destructors test.
13853 Test the position of the ';' token too.
13854 (Printers and Destructors): Likewise.
13855 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13856 unnecessarily alarming people when the test fails.
13857
13858 * data/yacc.c (yyerrlab1): Move this label down, so that the
13859 parser does not discard the lookahead token if the user code
13860 invokes YYERROR. This change is required for POSIX conformance.
13861
13862 * lib/error.c: Sync with gnulib.
13863
13864 2002-11-22 Paul Eggert <eggert@twinsun.com>
13865
13866 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13867 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13868 * lib/xmalloc.c: Likewise.
13869
13870 2002-11-20 Paul Eggert <eggert@twinsun.com>
13871
13872 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13873
13874 2002-11-20 Paul Eggert <eggert@twinsun.com>
13875
13876 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13877 should use `if (! x) abort ();' rather than `assert (x);', and
13878 anyway it's one less thing to worry about configuring.
13879
13880 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13881 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13882 and replace all instances of assert with abort.
13883 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13884 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13885
13886 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13887 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13888 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13889 hash_find_entry, hash_rehash, hash_insert): Likewise.
13890 * src/conflicts.c (resolve_sr_conflict): Likewise.
13891 * src/lalr.c (set_goto_map, map_goto): Likewise.
13892 * src/nullable.c (nullable_compute): Likewise.
13893 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13894 * src/reader.c (packgram, reader): Likewise.
13895 * src/state.c (state_new, state_free, state_transitions_set,
13896 state_reduction_find): Likewise.
13897 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13898 symbol_pack): Likewise.
13899 * src/tables.c (conflict_row, pack_vector): Likewise.
13900 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13901 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13902 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13903 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13904
13905 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13906 (ARGMATCH_CONSTRAINT): New macro.
13907 (ARGMATCH_ASSERT): Use it.
13908
13909 * src/system.h (verify): New macro.
13910 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13911 rather than assert.
13912 * src/tables.c (tables_generate): Likewise.
13913
13914 * src/struniq.c (struniq_assert): Now returns void, and aborts
13915 if the assertion is false.
13916 (struniq_assert_p): Remove.
13917 * src/struniq.h: Likewise.
13918
13919 2002-11-18 Paul Eggert <eggert@twinsun.com>
13920
13921 * data/glr.c (yygetLRActions): Replace `yyindex' with
13922 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13923 This fixes the regression with Sun ONE Studio 7 cc that I reported in
13924 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
13925
13926 2002-11-18 Akim Demaille <akim@epita.fr>
13927
13928 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13929 space.
13930 From Tim Van Holder.
13931
13932 2002-11-17 Paul Eggert <eggert@twinsun.com>
13933
13934 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13935 to "SyntaxError" for consistency with my 2002-11-15 change.
13936
13937 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13938 not define to {}, since this breaks the common use of `YYDPRINTF
13939 ((...));' if a single statement is desired (e.g. before `else').
13940 Work around GCC warnings by surrounding corresponding calls with
13941 {} if needed.
13942 (yyhasResolvedValue): Remove unused function.
13943 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13944 loop body.
13945 (yyreportSyntaxError): Renamed from yyreportParseError.
13946 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13947 All uses changed.
13948 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13949 extern when possible. Remove unused initializations.
13950
13951 2002-11-16 Akim Demaille <akim@epita.fr>
13952
13953 Augment the similarity between GLR and LALR traces.
13954
13955 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13956 (YY_REDUCE_PRINT): New.
13957 (yyparse): Use them.
13958 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13959 YYDPRINT here.
13960 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13961 state reached after the reduction/recovery, since...
13962 (yyparse, yyprocessOneStack): Report the state we are entering in.
13963
13964 2002-11-16 Akim Demaille <akim@epita.fr>
13965
13966 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13967 Add support for --trace=skeleton.
13968 * src/scan-skel.l: %option debug.
13969 Scan strings of non-@ or \n instead of character by character.
13970 (scan_skel): Handle trace_skeleton.
13971 (QPUTS): New.
13972 (@output_parser_name@, @output_header_name@): ``Restore'' their
13973 support (used to be M4 macros).
13974 * data/yacc.c: Quote larger chunks, a la glr.c.
13975 * data/lalr1.cc: Likewise.
13976 The header guards are no longer available, so use some other
13977 string than `YYLSP_NEEDED'.
13978
13979 2002-11-16 Akim Demaille <akim@epita.fr>
13980
13981 Make the ``Printers and Destructors'' test more verbose, taking
13982 `yacc.c''s behavior as (possibly wrong) reference.
13983
13984 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13985 instead of fprint on stdout.
13986 Set and report the last_line of the symbols.
13987 Consistently display values and locations.
13988
13989 2002-11-16 Paul Eggert <eggert@twinsun.com>
13990
13991 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13992
13993 2002-11-15 Paul Eggert <eggert@twinsun.com>
13994
13995 * tests/actions.at (Actions after errors): New test case.
13996
13997 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13998 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13999 tests/action.at, tests/calc.at, tests/conflicts.at,
14000 tests/cxx-type.at, tests/regression.at:
14001 "parse error" -> "syntax error" for POSIX compatibility.
14002 "parsing stack overflow..." -> "parser stack overflow" so
14003 that code matches Bison documentation.
14004
14005 2002-11-15 Akim Demaille <akim@epita.fr>
14006
14007 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14008 take two BRACED_CODE, not two string_content.
14009 Free the scanner's obstack when we are done.
14010 (code_content): New.
14011 * tests/calc.at: Adjust.
14012 * doc/bison.texinfo: Adjust.
14013 Also, make sure to include the `,' for these declarations.
14014
14015 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14016
14017 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14018 definition; avoids potential autoreconf problems.
14019
14020 2002-11-15 Akim Demaille <akim@epita.fr>
14021
14022 Always check the value returned by yyparse.
14023
14024 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14025 returned by yyparse.
14026 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14027 Adjust calls.
14028 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14029 returned by yyparse.
14030
14031 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14032
14033 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14034 on input.at test.
14035
14036 2002-11-14 Paul Eggert <eggert@twinsun.com>
14037
14038 * src/output.c (output_skeleton): Call xfopen instead of
14039 duplicating xfopen's body.
14040
14041 Fix bugs reported by Nelson H. F. Beebe in
14042 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14043
14044 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14045 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14046 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14047 file twice in the grammar, as an extra check.
14048
14049 * tests/input.at (Torturing the Scanner): Surround the
14050 backslash-newline tests with "#if 0", to make it less likely that
14051 we'll run into compiler bugs. Bring back solitary \ inside
14052 comment, but add a closing comment to work around HP C bug. Don't
14053 test backslash-newline in C character constant.
14054
14055 2002-11-14 Akim Demaille <akim@epita.fr>
14056
14057 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14058 status of the compiler.
14059 Calling `exit 1' is no longer needed.
14060 Reported by Nelson H. F. Beebe.
14061
14062 2002-11-14 Akim Demaille <akim@epita.fr>
14063
14064 * tests/atlocal.in (CPPFLAGS): We have config.h.
14065 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14066 New.
14067 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14068 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14069 * tests/regression.at, tests/torture.at: Use them for all the
14070 grammars that are to be compiled.
14071 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14072 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14073 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14074
14075 2002-11-14 Akim Demaille <akim@epita.fr>
14076
14077 * doc/bison.texinfo: Various formatting changes (alignments in
14078 samples, additional @group/@end group, GCS in samples.
14079 Use @deffn instead of simple @table to define the directives,
14080 macros, variables etc.
14081
14082 2002-11-13 Paul Eggert <eggert@twinsun.com>
14083
14084 Fix some bugs reported by Albert Chin-A-Young in
14085 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14086
14087 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14088 -o c"; the HP C compiler chatters during compilation.
14089 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14090 * tests/headers.at (export YYLTYPE): Likewise.
14091
14092 * tests/input.at (Torturing the Scanner): Remove lines containing
14093 solitary backslashes, as they tickle a bug in the HP C compiler.
14094
14095 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14096 comments, since they're not portable. Use GNU coding style.
14097
14098 2002-11-13 Akim Demaille <akim@epita.fr>
14099
14100 * data/yacc.c: Leave bigger chunks of quoted text.
14101 (YYDSYMPRINTF): New.
14102 Use it to report symbol activities.
14103 * data/glr.c (YYDSYMPRINTF): New.
14104 Use it.
14105
14106 2002-11-12 Paul Eggert <eggert@twinsun.com>
14107
14108 Version 1.75b.
14109
14110 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14111 (yyglrReduce): Return yyok, not 0.
14112 This should avoid the enumerated-type warnings reported
14113 by Nelson H. F. Beebe in
14114 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14115
14116 * lib/bbitset.h (BITSET_INLINE): Remove.
14117 * lib/bitset.h [! BITSET_INLINE]: Remove.
14118 (bitset_set, bitset_reset, bitset_test): Rename local vars
14119 to avoid shadowing warnings by GCC.
14120
14121 * data/glr.c (inline): Remove #define. It's the user's
14122 responsibility to #define it away, just like 'const'.
14123 This fixes one of the bugs reported by Nelson H. F. Beebe in
14124 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14125
14126 * Makefile.maint (po-check): Scan .l and .y files instead of the
14127 .c and the .h files that they generate. This fixes the bug
14128 reported by Tim Van Holder in:
14129 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14130 Look for N_ as well as for _. Try to avoid matching #define for
14131 N_ and _.
14132 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14133 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14134 * src/scan-gram.l: Revamp regular expressions so that " and '
14135 do not confuse xgettext.
14136
14137 * src/struniq.h (struniq_new): Do not declare the return type
14138 to be 'const'; this violates the C standard.
14139 * src/struniq.c (struniq_new): Likewise.
14140
14141 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14142
14143 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14144 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14145 linker.
14146
14147 2002-11-12 Akim Demaille <akim@epita.fr>
14148
14149 * Makefile.maint: Sync with Autoconf:
14150 (local_updates): New.
14151
14152 2002-11-12 Akim Demaille <akim@epita.fr>
14153
14154 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14155
14156 2002-11-12 Akim Demaille <akim@epita.fr>
14157
14158 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14159 locations.
14160
14161 2002-11-12 Akim Demaille <akim@epita.fr>
14162
14163 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14164 not yyvalue.
14165
14166 2002-11-12 Akim Demaille <akim@epita.fr>
14167
14168 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14169 Use it to test the GLR parser.
14170
14171 2002-11-12 Akim Demaille <akim@epita.fr>
14172
14173 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14174 defines it.
14175 * data/glr.c (yystos): New.
14176 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14177 (YYDSYMPRINT): New.
14178 (yyval): Don't define it, it is handled via M4.
14179 (yyrecoverParseError): Free verbosely the discarded symbols.
14180 * data/yacc.c (yysymprint): Remove, rather...
14181 (b4_yysymprint_generate): invoke.
14182 * data/c.m4 (b4_yysymprint_generate): New.
14183 Accept pointers as arguments, as opposed to the version from
14184 yacc.c.
14185 (b4_yydestruct_generate): Likewise.
14186 * tests/cations.at (Printers and Destructors): Use Bison directives
14187 instead of CPP macros.
14188 Don't rely on internal details.
14189
14190 2002-11-12 Akim Demaille <akim@epita.fr>
14191
14192 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14193 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14194 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14195 it against YYEMPTY and so forth), work on yytoken (i.e., set
14196 it to YYEMPTY etc.).
14197 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14198 (b4_symbol_actions): Remove.
14199 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14200 for 0, end-of-input.
14201
14202 2002-11-12 Akim Demaille <akim@epita.fr>
14203
14204 * doc/bison.texinfo (Destructor Decl): New.
14205
14206 2002-11-12 Akim Demaille <akim@epita.fr>
14207
14208 * src/tables.c (tables_generate): Use free for pointers that
14209 cannot be NULL, not XFREE.
14210 (pack_vector): Use assert, not fatal, for bound violations.
14211 * src/state.c (state_new): Likewise.
14212 * src/reader.c (reader): Likewise.
14213 * src/lalr.c (set_goto_map): Likewise.
14214 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14215 the file name.
14216
14217 2002-11-12 Akim Demaille <akim@epita.fr>
14218
14219 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14220 Restore.
14221 * src/scan-gram.l (last_string): Is global to the file, not to
14222 yylex.
14223 * src/parse-gram.y (input): Don't append the epilogue here,
14224 (epilogue.opt): do it here, and free the scanner's obstack.
14225 * src/reader.c (epilogue_set): Rename as...
14226 (epilogue_augment): this.
14227 * data/c.m4 (b4_epilogue): Defaults to empty.
14228
14229 2002-11-12 Akim Demaille <akim@epita.fr>
14230
14231 * src/getargs.c (long_options): Remove duplicates.
14232 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14233 Remove.
14234 * doc/bison.rnh: Remove.
14235 * doc/bison.texinfo (VMS Invocation): Remove.
14236
14237 2002-11-12 Akim Demaille <akim@epita.fr>
14238
14239 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14240 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14241
14242 Use struniq for symbols.
14243
14244 * src/symtab.h (symbol_t): The tag member is a struniq.
14245 (symbol_type_set): Adjust.
14246 * src/symtab.c (symbol_new): Takes a struniq.
14247 (symbol_free): Don't free the tag member.
14248 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14249 (hash_compare_symbol, hash_symbol): these.
14250 Use the fact that tags as struniqs.
14251 (symbol_get): Use struniq_new.
14252 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14253 Returns a strniq.
14254 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14255 and type members are struniqs.
14256 * src/reader.c (get_merge_function)
14257 (grammar_current_rule_merge_set): Adjust.
14258 (TYPE, current_type): Are struniq.
14259
14260 Use struniq for file names.
14261
14262 * src/files.h, src/files.c (infile): Split into...
14263 (grammar_file, current_file): these.
14264 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14265 * src/reduce.c (reduce_print): Likewise.
14266 * src/getargs.c (getargs): Likewise.
14267 * src/complain.h, src/complain.c: Likewise.
14268 * src/main.c (main): Call struniqs_new early enough to use it for
14269 file names.
14270 Don't free the input file name.
14271
14272 2002-11-12 Akim Demaille <akim@epita.fr>
14273
14274 * src/symtab.c (symbol_free): Remove dead deactivated code:
14275 type_name are properly removed.
14276 Don't use XFREE to free items that cannot be NULL.
14277 * src/struniq.h, src/struniq.c: New.
14278 * src/main.c (main): Initialize/free struniqs.
14279 * src/parse-gram.y (%union): Add astruniq member.
14280 (yyprint): Adjust.
14281 * src/scan-gram.l (<{tag}>): Return a struniq.
14282 Free the obstack bit that used to store it.
14283 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14284
14285 2002-11-11 Paul Eggert <eggert@twinsun.com>
14286
14287 Revamp to fix many (but not all) of the C- and M4-related quoting
14288 problems. Among other things, this fixes the Bison bug reported
14289 by Jan Hubicka when processing the Bash grammar; see:
14290 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14291
14292 Use new @ escapes consistently. Represent brackets with @{ and @}
14293 rather than @<:@ and @:>@, since this works a bit better with dumb
14294 editors like vi. Represent @ with @@, since @ is now consistently
14295 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14296 __ofile__, to avoid unexpected expansions. Similarly, use @output
14297 rather than #output.
14298
14299 * data/c.m4 (b4_copyright): Omit file name from comment, since
14300 the file name could contain "*/".
14301 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14302 be quoted. All uses changed.
14303
14304 * data/glr.c: Use new @ escapes consistently.
14305 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14306 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14307 Remove, since they couldn't handle arbitrary characters in file
14308 names.
14309 * data/lalr1.cc: Likewise.
14310 * data/yacc.c: Likewise.
14311
14312 * src/files.c (output_infix): Remove; all uses removed.
14313 * src/files.h: Likewise.
14314
14315 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14316 mishandled funny characters in file names, and anyway it isn't
14317 needed any more.
14318 * data/yacc.c: Likewise.
14319 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14320
14321 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14322 * data/yacc.c: Likewise.
14323
14324 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14325 strings now.
14326 (muscle_init): Quote filename as a C string.
14327 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14328 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14329 * src/output.c (escaped_file_name_output): New function.
14330 (prepare_symbols): Quote tokens for M4.
14331 (prepare): Don't insert output_infix, output_prefix,
14332 output_parser_name, output_header_name; this is now down by scan-skel.
14333 Insert skeleton as a C string.
14334
14335 * src/output.c (user_actions_output, symbol_destructors_output,
14336 symbol_printers_output): Quote filenames for C and M4.
14337 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14338
14339 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14340 escapes other than \\ and \'; this simplifies the code.
14341 (<SC_STRING>): Likewise, for \\ and \".
14342 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14343 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14344 Use new escapes @{ and @} for [ and ].
14345
14346 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14347 them with auto vars.
14348 Switch to new escape scheme, where @ is the escape character uniformly.
14349 Abort if a stray escape character is found. Avoid unbounded input
14350 buffer when parsing non-escaped text.
14351
14352 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14353 __oline__, #output, $@, and @{ do not have unintended meanings.
14354
14355 2002-11-09 Paul Eggert <eggert@twinsun.com>
14356
14357 Fix the test failure due to GCC warnings described in
14358 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14359 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14360 evaluate to 0 if it's impossible for NINF to be in the respective
14361 table.
14362 (yygetLRActions, yyrecoverParseError): Use them.
14363
14364 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14365 counted in the token inserted at end of file. Now takes
14366 location_t *, not location_t, so that the location can be
14367 adjusted. All uses changed.
14368
14369 * tests/regression.at (Invalid inputs): Adjust wording in
14370 diagnostic to match the new behavior.
14371
14372 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14373 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14374 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14375 abort ();'. This reduces the runtime of the "Many lookaheads"
14376 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14377 GCC 3.2.
14378
14379 2002-11-07 Paul Eggert <eggert@twinsun.com>
14380
14381 * src/parse-gram.y (CHARACTER): Remove unused token.
14382 All uses removed.
14383
14384 * src/scan-gram.l: Remove stack option. We no longer use the
14385 stack, since the stack was never deeper than 1; instead, use the
14386 new auto var c_context to record the stacked value.
14387
14388 Remove nounput option. At an unexpected end of file, we now unput
14389 the minimal input necessary to end cleanly; this simplifies the
14390 code.
14391
14392 Avoid unbounded token sizes where this is easy.
14393
14394 (unexpected_end_of_file): New function.
14395 Use it to systematize the error message on unexpected EOF.
14396 (last-string): Now auto, not static.
14397 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14398 (scanner_last_string_free): Remove; not used.
14399 (percent_percent_count): Move decl to just before use.
14400 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14401 not the (never otherwised-used) CHARACTER.
14402
14403 2002-11-07 Akim Demaille <akim@epita.fr>
14404
14405 Let yyerror always receive the msg as last argument, so that
14406 yyerror can be variadic.
14407
14408 * data/yacc.c (b4_yyerror_args): New.
14409 Use it when calling yyerror.
14410 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14411 Use it when calling yyerror.
14412 * doc/bison.texinfo (Error Reporting): Adjust.
14413 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14414 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14415
14416 2002-11-06 Akim Demaille <akim@epita.fr>
14417
14418 #line should have quoted strings.
14419 Ideally, this should be done by m4_quotearg.
14420
14421 * src/scan-skel.l: Include quotearg.h.
14422 Quote __ofile__.
14423 * src/output.c (symbol_printers_output)
14424 (symbol_destructors_output): Quote the file name.
14425
14426 2002-11-06 Akim Demaille <akim@epita.fr>
14427
14428 * tests/regression.at (Invalid inputs): Adjust to the recent
14429 messages.
14430
14431 2002-11-06 Akim Demaille <akim@epita.fr>
14432
14433 Restore --no-lines.
14434 Reported by Jim Kent.
14435
14436 * data/c.m4 (b4_syncline): New.
14437 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14438 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14439 * src/output.c (user_actions_output): Likewise.
14440 (prepare): Define 'b4_synclines_flag'.
14441 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14442
14443 2002-11-06 Akim Demaille <akim@epita.fr>
14444
14445 * src/main.c (main): Free `infile'.
14446 * src/scan-gram.l (handle_syncline): New.
14447 Recognize `#line'.
14448 * src/output.c (user_actions_output, symbol_destructors_output)
14449 (symbol_printers_output): Use the location's file name, not
14450 infile.
14451 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14452
14453 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14454
14455 * src/tables.c (matching_state): Don't allow states to match if
14456 either has GLR conflict entries.
14457
14458 2002-11-05 Paul Eggert <eggert@twinsun.com>
14459
14460 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14461 "integer out of range" rather than "invalid value".
14462 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14463 accordingly.
14464
14465 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14466 Also, remove one static variable in the scanner.
14467
14468 * src/scan-gram.l (braces_level): Now auto, not static.
14469 Initialize to zero if the compiler is being picky.
14470 (INITIAL): Clear braces_level instead of incrementing it.
14471 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14472 as POSIX 1003.1-2001 requires.
14473 * src/system.h (IF_LINT): New macro, taken from coreutils.
14474 * configure.ac: Define "lint" if --enable-gcc-warnings.
14475
14476 2002-11-05 Akim Demaille <akim@epita.fr>
14477
14478 * src/scan-gram.l: When it starts with `%', complain about the
14479 whole directive, not just that `invalid character: %'.
14480
14481 2002-11-04 Akim Demaille <akim@epita.fr>
14482
14483 * Makefile.maint: Update from Autoconf.
14484 (update, cvs-update, po-update, do-po-update): New.
14485
14486 2002-11-04 Akim Demaille <akim@epita.fr>
14487
14488 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14489 and yyerror.
14490 Have yyerror `use' its arguments.
14491 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14492 returns true when location & yacc & pure & parse-param.
14493 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14494
14495 2002-11-04 Akim Demaille <akim@epita.fr>
14496
14497 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14498 clashes.
14499 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14500 font-lock-mode.
14501 Use complain_at.
14502 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14503 slot 0.
14504
14505 2002-11-03 Paul Eggert <eggert@twinsun.com>
14506
14507 * src/reader.c (get_merge_function, grammar_current_rule_check):
14508 Use consistent diagnostics for reporting type name clashes.
14509 Quote the types with <>, for consistency with Yacc.
14510 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14511
14512 2002-11-03 Akim Demaille <akim@epita.fr>
14513
14514 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14515 New.
14516 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14517 (b4_parse_param): Remove.
14518 Use b4_identification.
14519 Propagate b4_pure_args where needed to pass them to yyerror.
14520 * data/glr.m4 (b4_parse_param): Remove.
14521 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14522 (b4_lpure_formals): New.
14523 Use b4_identification.
14524 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14525 b4_user_formals and b4_user_args.
14526 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14527 (yyreportAmbiguity): When using a pure parser, also need
14528 the location, and the parse-params.
14529 Adjust callers.
14530 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14531 When using a pure parser, also need the parse-params.
14532 Adjust callers.
14533 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14534 (%pure-parser + %parse-param) LALR and GLR parsers.
14535 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14536 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14537 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14538 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14539 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14540 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14541 * doc/bison.texinfo: Untabify the whole file.
14542 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14543 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14544 (Error Reporting): Adjust to these new directives.
14545 Document %error-verbose, deprecate YYERROR_VERBOSE.
14546
14547 2002-11-03 Akim Demaille <akim@epita.fr>
14548
14549 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14550 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14551 command line options.
14552 * tests/cxx-type.at: Formatting changes.
14553
14554 2002-11-03 Paul Eggert <eggert@twinsun.com>
14555
14556 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14557 to count columns correctly, and to check for invalid inputs.
14558
14559 Use mbsnwidth to count columns correctly. Account for tabs, too.
14560 Include mbswidth.h.
14561 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14562 (extend_location): New function.
14563 (YY_LINES): Remove.
14564
14565 Handle CRLF in C code rather than in Lex code.
14566 (YY_INPUT): New macro.
14567 (no_cr_read): New function.
14568
14569 Scan UCNs, even though we don't fully handle them yet.
14570 (convert_ucn_to_byte): New function.
14571
14572 Handle backslash-newline correctly in C code.
14573 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14574 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14575 all uses changed.
14576 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14577 Use {splice} wherever C allows backslash-newline.
14578 YY_STEP after space, newline, vertical-tab.
14579 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14580
14581 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14582
14583 ({int}, handle_action_dollar, handle_action_at): Check for integer
14584 overflow.
14585
14586 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14587
14588 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14589 as well as \000. Check for UCHAR_MAX, not 255.
14590 Allow \x with an arbitrary positive number of digits, as in C.
14591 Check for overflow here.
14592 Allow \? and UCNs, for compatibility with C.
14593
14594 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14595 with quote slot used by complain_at.
14596
14597 * tests/input.at: Add tests for backslash-newline, m4 quotes
14598 in symbols, long literals, and funny escapes in strings.
14599
14600 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14601 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14602 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14603 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14604 * m4/mbswidth.m4: New file, from GNU coreutils.
14605
14606 * doc/bison.texinfo (Grammar Outline): Document // comments.
14607 (Symbols): Document that trigraphs have no special meaning in Bison,
14608 nor is backslash-newline allowed.
14609 (Actions): Document that trigraphs have no special meaning.
14610
14611 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14612 no longer used.
14613
14614 2002-11-02 Paul Eggert <eggert@twinsun.com>
14615
14616 * src/reader.c: Don't include quote.h; not needed.
14617 (get_merge_function): Reword warning to be consistent with
14618 type clash diagnostic in grammar_current_rule_check.
14619
14620 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14621 bug in trigraph handling.
14622
14623 * src/output.c (prepare_symbols): When printing token names,
14624 escape "[" as "@<:@" and likewise for "]".
14625
14626 * src/system.h (errno): Remove declaration, as we are now
14627 assuming C89 or better, and C89 guarantees errno.
14628
14629 2002-10-30 Paul Eggert <eggert@twinsun.com>
14630
14631 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14632 Check for close failures.
14633 * src/files.h (xfclose): Return void, not int, since it always
14634 returned zero.
14635 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14636 indicates one.
14637 * src/output.c (output_skeleton): Use xfclose rather than fclose
14638 and ferror. xfclose now checks ferror.
14639
14640 * data/glr.c (YYLEFTMOST_STATE): Remove.
14641 (yyreportTree): Use a stack-based leftmost state. This avoids
14642 our continuing battles with bogus warnings about initializers.
14643
14644 2002-10-30 Akim Demaille <akim@epita.fr>
14645
14646 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14647 #if.
14648
14649 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14650
14651 * tests/glr-regr1.at: New test for reported regressions.
14652 * tests/testsuite.at: Add glr-regr1.at test.
14653 * tests/Makefile.am: Add glr-regr1.at test.
14654
14655 2002-10-24 Paul Eggert <eggert@twinsun.com>
14656
14657 Version 1.75a.
14658
14659 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14660 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14661 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14662 Don't assume strdup exists; POSIX says its an XSI extension.
14663 Check for buffer overflow on input.
14664
14665 2002-10-24 Akim Demaille <akim@epita.fr>
14666
14667 * src/output.c (output_skeleton): Don't disable M4sugar comments
14668 too soon: it results in comments being expanded.
14669 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14670 first output.
14671
14672 2002-10-24 Akim Demaille <akim@epita.fr>
14673
14674 * data/yacc.c (m4_int_type): New.
14675 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14676 char' as only yacc.c wants K&R portability.
14677 * data/glr.c (yysigned_char): Remove.
14678 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14679 Reported by Quoc Peyrot.
14680
14681 2002-10-23 Paul Eggert <eggert@twinsun.com>
14682
14683 * src/main.c (main): With --trace=time, report times even if a
14684 non-fatal error occurs. Formerly, the times were reported in some
14685 such cases but not in others.
14686 * src/reader.c (reader): Just return if a complaint has been issued,
14687 instead of exiting, so that 'main' can report times.
14688
14689 2002-10-22 Akim Demaille <akim@epita.fr>
14690
14691 * src/system.h: Include sys/types.
14692 Reported by Bert Deknuydt.
14693
14694 2002-10-23 Paul Eggert <eggert@twinsun.com>
14695
14696 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14697 Suggested by Art Haas.
14698
14699 2002-10-22 Paul Eggert <eggert@twinsun.com>
14700
14701 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14702 decl; not needed any more.
14703 * src/main.c (main): Use return to exit, undoing yesterday's change.
14704 The last OS that we could find where this wouldn't work is
14705 SunOS 3.5, and that's too old to worry about now.
14706
14707 * data/glr.c (struct yyltype): Define members even when not
14708 doing locations. This is more consistent with yacc.c, and it
14709 works around the following bug reports:
14710 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14711 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
14712
14713 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14714 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14715 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14716
14717 2002-10-22 Akim Demaille <akim@epita.fr>
14718
14719 * data/README: New.
14720
14721 2002-10-21 Paul Eggert <eggert@twinsun.com>
14722
14723 Be consistent about 'bool'; the old code used an enum in one
14724 module and an int in another, and this violates the C standard.
14725 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14726 * configure.ac (AC_HEADER_STDBOOL): Add.
14727 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14728 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14729 * src/symtab.c (hash_compare_symbol_t): Likewise.
14730 * src/system.h (bool, false, true): Use a definition consistent
14731 with ../lib/hash.c. All uses changed.
14732
14733 * src/complain.c (warning_issued): Renamed from warn_message_count,
14734 so that we needn't worry about integer overflow (!).
14735 Now of type bool. All uses changed.
14736 (complaint_issued): Renamed from complain_message_count; likewise.
14737
14738 * src/main.c (main): Use exit to exit with failure.
14739
14740 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14741 rather than 1 and 0.
14742 * src/main.c (main): Likewise.
14743 * src/getargs.c (getargs): Likewise.
14744 * src/reader.c (reader): Likewise.
14745
14746 * src/getarg.c (getargs): Remove duplicate code for
14747 "Try `bison --help'".
14748
14749 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14750 What was that "2" for?
14751
14752 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14753 * src/getargs.c (usage): Likewise.
14754
14755 * src/getargs.c (getargs): When there are too few operands, report
14756 the last one. When there are too many, report the first extra
14757 one. This is how diffutils does it.
14758
14759 2002-10-20 Paul Eggert <eggert@twinsun.com>
14760
14761 Remove K&R vestiges.
14762 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14763 * src/complain.c (VA_START): Remove. Assume prototypes.
14764 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14765 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14766 fatal): Assume prototypes.
14767 * src/complain.h: Assume prototypes.
14768 * src/system.h (PARAMS): Remove.
14769 Include <limits.h> unconditionally, since it's guaranteeed even
14770 for a freestanding C89 compiler.
14771 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14772 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
14773
14774 2002-10-20 Akim Demaille <akim@epita.fr>
14775
14776 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14777 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14778 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14779 (yyresolveStates, yyresolveAction, yyresolveStack)
14780 (yyprocessOneStack): Use them.
14781 (yy_reduce_print): New.
14782 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14783
14784 2002-10-20 Akim Demaille <akim@epita.fr>
14785
14786 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14787 arguments and output `void'.
14788 (b4_c_function): Rename as...
14789 (b4_c_function_def): this.
14790 (b4_c_function_decl, b4_c_ansi_function_def)
14791 (b4_c_ansi_function_decl): New.
14792 Change the interpretation of the arguments: before `int, foo', now
14793 `int foo, foo'.
14794 * data/yacc.c (yyparse): Prototype and define thanks to these.
14795 Adjust b4_c_function_def uses.
14796 * data/glr.c (yyparse): Likewise, but ANSI only.
14797
14798 2002-10-20 Akim Demaille <akim@epita.fr>
14799
14800 * src/output.c (prepare): Move the definition of `tokens_number',
14801 `nterms_number', `undef_token_number', `user_token_number_max'
14802 to...
14803 (prepare_tokens): Here.
14804 (prepare_tokens): Rename as...
14805 (prepare_symbols): this.
14806 (prepare): Move the definition of `rules_number' to...
14807 (prepare_rules): here.
14808 (prepare): Move the definition of `last', `final_state_number',
14809 `states_number' to...
14810 (prepare_states): here.
14811 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14812
14813 2002-10-20 Akim Demaille <akim@epita.fr>
14814
14815 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14816
14817 2002-10-20 Akim Demaille <akim@epita.fr>
14818
14819 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14820 * data/c.m4: here.
14821
14822 2002-10-20 Akim Demaille <akim@epita.fr>
14823
14824 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14825 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14826 `pair'.
14827 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14828 `name' to...
14829 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14830 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14831 These.
14832
14833 2002-10-19 Paul Eggert <eggert@twinsun.com>
14834
14835 Do not create a temporary file, as that involves security and
14836 cleanup headaches. Instead, use a pair of pipes.
14837 Derived from a suggestion by Florian Krohm.
14838 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14839 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14840 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14841 (BISON_PREREQ_SUBPIPE): Add.
14842 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14843 Add subpipe.h, subpipe.c.
14844 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14845 * po/POTFILES.in: Add lib/subpipe.c.
14846 * src/output.c: Include "subpipe.h".
14847 (m4_invoke): Remove decl.
14848 (scan_skel): New decl.
14849 (output_skeleton): Use pipe rather than temporary file for m4 input.
14850 Check that m4sugar.m4 is readable, to avoid deadlock.
14851 Check for pipe I/O error.
14852 * src/scan-skel.l (readpipe): Remove decl.
14853 (scan_skel): New function, to be used in place of m4_invoke.
14854 Read from stream rather than file.
14855
14856 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14857 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14858 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14859 this generates a more-accurate value anyway.
14860
14861 * lib/timevar.c (timervar_accumulate): Rename locals to
14862 avoid confusion with similarly-named more-global.
14863 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14864
14865 * src/output.c (prepare): Use xstrdup to convert char const *
14866 to char *, to avoid GCC warning.
14867
14868 2002-10-19 Akim Demaille <akim@epita.fr>
14869
14870 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14871 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14872 Use them to have `calc.y' ready for %pure-parser.
14873 * data/yacc.c (YYLEX): Pass a yylex return type to
14874 b4_c_function_call.
14875
14876 2002-10-19 Akim Demaille <akim@epita.fr>
14877
14878 Prototype support of %lex-param and %parse-param.
14879
14880 * src/parse-gram.y: Add the definition of the %lex-param and
14881 %parse-param tokens, plus their rules.
14882 Drop the `_' version of %glr-parser.
14883 Add the "," token.
14884 * src/scan-gram.l (INITIAL): Scan them.
14885 * src/muscle_tab.c: Comment changes.
14886 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14887 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14888 (muscle_entry_s): The `value' member is no longer const.
14889 Adjust all dependencies.
14890 * src/muscle_tab.c (muscle_init): Adjust: use
14891 MUSCLE_INSERT_STRING.
14892 Initialize the obstack earlier.
14893 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14894 (muscle_pair_list_grow): New.
14895 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14896 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14897 * tests/calc.at: Use %locations, not --locations.
14898 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14899
14900 2002-10-19 Akim Demaille <akim@epita.fr>
14901
14902 * src/getargs.c (usage): Take status as argument and exit
14903 accordingly.
14904 Report the traditional `Try ... --help' message when status != 0.
14905 (usage, version): Don't take a FILE * as arg, it is pointless.
14906 (getargs): When there is an incorrect number of arguments, make it
14907 an error, and report it GNUlically thanks to `usage ()'.
14908
14909 2002-10-18 Paul Eggert <eggert@twinsun.com>
14910
14911 * data/glr.c (yyreportParseError): Don't assume that sprintf
14912 yields the length of the printed string, as this is not true
14913 on SunOS 4.1.4. Reported by Peter Klein.
14914
14915 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14916 * tests/conflicts.at (%nonassoc and eof): Likewise.
14917 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14918
14919 2002-10-17 Akim Demaille <akim@epita.fr>
14920
14921 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14922 * src/getargs.c (trace_types, trace_args): Adjust.
14923 * src/reader.c (grammar_current_rule_prec_set)
14924 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14925 Standardize error messages.
14926 And s/@prec/%prec/!
14927 (reader): Use trace_flag to enable scanner/parser debugging,
14928 instead of an adhoc scheme.
14929 * src/scan-gram.l: Remove trailing debugging code.
14930
14931 2002-10-16 Paul Eggert <eggert@twinsun.com>
14932
14933 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14934 MUSCLE_TAB_H.
14935
14936 * NEWS: Officially drop support for building Bison with K&R C,
14937 since it didn't work anyway and it's not worth worrying about.
14938 * Makefile.maint (wget_files): Remove ansi2knr.c.
14939 (ansi2knr.c-url_prefix): Remove.
14940 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14941 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14942 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14943
14944 2002-10-15 Paul Eggert <eggert@twinsun.com>
14945
14946 Stop using the "enum_" trick for K&R-style function definitions;
14947 it confused me, and I was the author! Instead, assume that people
14948 who want to use K&R C compilers (when using these modules in GCC,
14949 perhaps?) will run ansi2knr.
14950
14951 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14952 All uses of "enum_" changed to "enum ".
14953 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14954 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14955
14956 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14957 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14958 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14959 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14960 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14961 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14962 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14963 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14964 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14965 Use function prototypes; this removes the need for declaring
14966 static functions simply to provide their prototypes.
14967 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14968 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14969 bitset_count_, bitset_create, bitset_dump, bitset_first,
14970 bitset_free, bitset_init, bitset_last, bitset_next,
14971 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14972 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14973 bitset_print, bitset_release_memory, bitset_toggle_,
14974 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14975 debug_bitset): Likewise.
14976 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14977 * lib/bitset_stats.c (bitset_log_histogram_print,
14978 bitset_percent_histogram_print, bitset_stats_and,
14979 bitset_stats_and_cmp, bitset_stats_and_or,
14980 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14981 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14982 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14983 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14984 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14985 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14986 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14987 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14988 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14989 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14990 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14991 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14992 bitset_stats_zero): Likewise.
14993 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14994 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14995 bitsetv_dump, debug_bitsetv): Likewise.
14996 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14997 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14998 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14999 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15000 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15001 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15002 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15003 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15004 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15005 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15006 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15007 Likewise.
15008 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15009 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15010 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15011 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15012 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15013 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15014 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15015 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15016 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15017 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15018 lbitset_xor_cmp, lbitset_zero): Likewise.
15019
15020 2002-10-14 Akim Demaille <akim@epita.fr>
15021
15022 Version 1.75.
15023
15024 2002-10-14 Akim Demaille <akim@epita.fr>
15025
15026 * tests/Makefile.am (maintainer-check-posix): New.
15027
15028 2002-10-14 Akim Demaille <akim@epita.fr>
15029
15030 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15031 member.
15032
15033 2002-10-14 Akim Demaille <akim@epita.fr>
15034
15035 * src/tables.c (table_ninf_remap): base -> tab.
15036 Reported by Matt Rosing.
15037
15038 2002-10-14 Paul Eggert <eggert@twinsun.com>
15039
15040 * tests/action.at, tests/calc.at, tests/conflicts.at,
15041 tests/cxx-type.at, tests/headers.at, tests/input.at,
15042 tests/regression.at, tests/synclines.at, tests/torture.at:
15043 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15044 so that the tests still work even if POSIXLY_CORRECT is set.
15045 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15046
15047 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15048 for portability to K&R hosts. Fix typo: signed char is guaranteed
15049 only to 127, not to 128.
15050 * data/glr.c (yysigned_char): New type.
15051 * data/yacc.c (yysigned_char): Likewise.
15052 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15053
15054 2002-10-13 Paul Eggert <eggert@twinsun.com>
15055
15056 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15057 true due to limited range of data type" warning from GCC.
15058
15059 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15060 by wrapping enum yytokentype's definition inside #ifndef
15061 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15062
15063 2002-10-13 Akim Demaille <akim@epita.fr>
15064
15065 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15066 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15067
15068 2002-10-13 Akim Demaille <akim@epita.fr>
15069
15070 * Makefile.maint: Update from Autoconf 2.54.
15071 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15072
15073 2002-10-13 Akim Demaille <akim@epita.fr>
15074
15075 * src/print.c (print_state): Separate the list of solved conflicts
15076 from the other items.
15077 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15078
15079 2002-10-13 Akim Demaille <akim@epita.fr>
15080
15081 Let nondeterministic skeletons be usable with deterministic
15082 tables.
15083
15084 With the patch, GAWK compiled by GCC without -O2 passes its test
15085 suite using a GLR parser driven by LALR tables. It fails with -O2
15086 because `struct stat' gives two different answers on my machine:
15087 88 (definition of an auto var) and later 96 (memset on this var).
15088 Hence the stack is badly corrumpted. The headers inclusion is to
15089 blame: if I move the awk.h inclusion before GLR's system header
15090 inclusion, the two struct stat have the same size.
15091
15092 * src/tables.c (pack_table): Always create conflict_table.
15093 (token_actions): Always create conflict_list.
15094 * data/glr.c (YYFLAG): Remove, unused.
15095
15096 2002-10-13 Akim Demaille <akim@epita.fr>
15097
15098 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15099 (O0FLAGS): New.
15100 (VALGRIND, GXX): New.
15101 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15102 * tests/bison.in: Run $PREBISON a pre-command.
15103 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15104 (maintainer-check-g++): New.
15105 * Makefile.am (maintainer-check): New.
15106
15107 2002-10-13 Akim Demaille <akim@epita.fr>
15108
15109 * data/glr.c: Formatting changes.
15110 Tweak some trace messages to match yacc.c's.
15111
15112 2002-10-13 Akim Demaille <akim@epita.fr>
15113
15114 GLR parsers sometimes raise parse errors instead of performing the
15115 default reduction.
15116 Reported by Charles-Henry de Boysson.
15117
15118 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15119 check the length of the traces when %glr.
15120 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15121 GLR's traces.
15122 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15123 Test GLR parsers.
15124 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15125 (yyltype): Remove the yy prefix from the member names.
15126 (yytable): Complete its comment.
15127 (yygetLRActions): Map error action number from YYTABLE from
15128 YYTABLE_NINF to 0.
15129 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15130 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15131 not satisfying as we could compare an YYACTION computed from
15132 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15133 only value for error actions.
15134 (yyreportParseError): In verbose parse error messages, don't issue
15135 `error' in the list of expected tokens.
15136 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15137 next action to perform to match glr.c's decoding.
15138 (yytable): Complete its comment.
15139
15140 2002-10-13 Paul Eggert <eggert@twinsun.com>
15141
15142 Fix problem reported by Henrik Grubbstroem in
15143 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15144 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15145 because the Bison parser reads the second action before reducing
15146 the first one.
15147 * src/scan-gram.l (rule_length): New static var.
15148 Use it to keep track of the rule length in the scanner, since
15149 we can't expect the parser to be in lock-step sync with the scanner.
15150 (handle_action_dollar, handle_action_at): Use this var.
15151 * tests/actions.at (Exotic Dollars): Test for the problem.
15152
15153 2002-10-12 Paul Eggert <eggert@twinsun.com>
15154
15155 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15156 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15157 Include <sys/time.h> when checking for clock_t and struct tms.
15158 Use same include order as source.
15159 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15160 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15161
15162 * lib/timevar.c: Update copyright date and clarify comments.
15163 (get_time) [IN_GCC]: Keep the GCC version for reference.
15164
15165 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15166 GCC version as of today, then merge Bison's changes.
15167 Change "GCC" to "Bison" in copyright notice. timevar.def's
15168 author is Akim, so change that too.
15169
15170 * src/reader.c (grammar_current_rule_check):
15171 Don't worry about the default action if $$ is untyped.
15172 Prevents bogus warnings reported by Jim Gifford in
15173 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15174
15175 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15176 * data/glr.c, data/lalr1.cc, data/yacc.c:
15177 Output token definitions before the first part of user declarations.
15178 Fixes compatibility problem reported by Jim Gifford for kbd in
15179 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15180
15181 2002-10-11 Paul Eggert <eggert@twinsun.com>
15182
15183 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15184 (yyparse): here. This undoes some of the 2002-07-25 change.
15185 Compatibility problem reported by Ralf S. Engelschall with
15186 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15187
15188 2002-10-11 Akim Demaille <akim@epita.fr>
15189
15190 * tests/regression.at Characters Escapes): New.
15191 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15192 characters.
15193 Reported by Jan Nieuwenhuizen.
15194
15195 2002-10-11 Akim Demaille <akim@epita.fr>
15196
15197 * po/id.po: New.
15198
15199 2002-10-10 Paul Eggert <eggert@twinsun.com>
15200
15201 Portability fixes for bitsets; this also avoids several GCC
15202 warnings.
15203
15204 * lib/abitset.c: Include <stddef.h>, for offsetof.
15205 * lib/lbitset.c: Likewise.
15206
15207 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15208 properly for vectors of objects. Do not assume that adding a
15209 header size to a multiple of a word size yields a value that is
15210 properly aligned for the whole union.
15211 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15212
15213 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15214 unique names for structures.
15215 * lib/ebitset.c (ebitset_bytes): Likewise.
15216 * lib/lbitset.c (lbitset_bytes): Likewise.
15217
15218 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15219 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15220 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15221 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15222 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15223 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15224 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15225 to improve the type-checking that GCC can do.
15226 * lib/bitset.c (bitset_op4_cmp): Likewise.
15227 * lib/bitset_stats.c (bitset_stats_count,
15228 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15229 bitset_stats_copy, bitset_stats_disjoint_p,
15230 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15231 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15232 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15233 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15234 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15235 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15236 bitset_stats_or_and_cmp): Likewise.
15237 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15238 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15239 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15240 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15241
15242 * lib/abitset.h: Include bitset.h, not bbitset.h.
15243 * lib/ebitset.h: Likewise.
15244 * lib/lbitset.h: Likewise.
15245
15246 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15247 All instances of parameters of type enum bitset_opts are now of
15248 type enum_bitset_opts, to conform to the C Standard, and similarly
15249 for enum_bitset_type.
15250 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15251 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15252
15253 Do not use "struct bitset_struct" to mean different things in
15254 different modules. Not only is this confusing, it violates
15255 the C Standard, which requires that structure types in different
15256 modules must be compatible if one is to be passed to the other.
15257 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15258 All instances of "struct bitset_struct *" replaced with "bitset".
15259 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15260 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15261 struct lbitset_struct, struct bitset_stats_struct): New types.
15262 All uses of struct bitset_struct changed to union bitset_union,
15263 etc.
15264 * lib/abitset.c (struct abitset_struct, abitset,
15265 struct bitset_struct): Remove.
15266 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15267 struct bitset_struct): Remove.
15268 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15269 bitset_struct): Remove.
15270 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15271 Likewise.
15272
15273 Do not call a function of type T using a call that assumes the
15274 function is of a different type U. Standard C requires that a
15275 function must be called with a type that is compatible with its
15276 definition.
15277 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15278 New decls.
15279 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15280 New functions.
15281 * lib/ebitset.c (PFV): Remove.
15282 * lib/lbitset.c (PFV): Likewise.
15283 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15284 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15285 decls.
15286 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15287 (ebitset_vtable): Use them.
15288 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15289 lbitset_xor): New functions.
15290 (lbitset_vtable): Use them.
15291
15292 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15293 Declare.
15294
15295 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15296 GCC warning.
15297 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15298 Use offsetof, for simplicity.
15299
15300 2002-10-06 Paul Eggert <eggert@twinsun.com>
15301
15302 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15303 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15304 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15305 which was inadvertently undone by the 2002-09-30 patch.
15306 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15307 the same width as int.
15308
15309 2002-10-04 Paul Eggert <eggert@twinsun.com>
15310
15311 Version 1.50.
15312
15313 * configure.ac (AC_INIT), NEWS: Increment version number.
15314
15315 * doc/bison.texinfo: Minor spelling, grammar, and white space
15316 fixes.
15317 (Symbols): Mention that any negative value returned from yylex
15318 signifies end-of-input. Warn about negative chars. Mention
15319 the portable Standard C character set.
15320
15321 The GNU coding standard says CFLAGS and YFLAGS are reserved
15322 for the installer to set.
15323 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15324 * src/Makefile.am (AM_CFLAGS): Likewise.
15325 (AM_YFLAGS): Renamed from YFLAGS.
15326
15327 Fix some MAX and MIN problems.
15328 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15329 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15330 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15331 * src/reader.c (reader): Use it.
15332
15333 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15334 POSIX 1003.1-2001 has removed fgrep.
15335
15336 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15337
15338 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15339 interpreted as signed.
15340 * lib/ebitset.c (ebitset_list): Fix bug.
15341
15342 2002-10-01 Paul Eggert <eggert@twinsun.com>
15343
15344 More fixes for 64-bit hosts and large bitsets.
15345
15346 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15347 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15348 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15349 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15350 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15351 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15352 bitset_count_): Likewise.
15353 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15354 bitset_first, bitset_last): Likewise.
15355 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15356 bitset_stats_list_reverse, bitset_stats_size,
15357 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15358 Likewise.
15359 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15360 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15361 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15362 bitsetv_reflexive_transitive_closure): Likewise.
15363 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15364 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15365 Likewise.
15366 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15367 Likewise.
15368
15369 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15370 Use size_t, not unsigned int, to count bytes.
15371 * lib/abitset.h (abitset_bytes): Likewise.
15372 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15373 Likewise.
15374 * lib/bitset.h (bitset_bytes): Likewise.
15375 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15376 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15377 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15378 * lib/ebitset.c (ebitset_bytes): Likewise.
15379 * lib/ebitset.h (ebitset_bytes): Likewise.
15380 * lib/lbitset.c (lbitset_bytes): Likewise.
15381 * lib/lbitset.h (lbitset_bytes): Likewise.
15382
15383 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15384 abitset_subset_p, abitset_disjoint_p, abitset_and,
15385 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15386 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15387 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15388 abitset_or_and, abitset_or_and_cmp):
15389 Use bitset_windex instead of unsigned int.
15390 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15391 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15392 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15393 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15394 Likewise.
15395 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15396
15397 * lib/bitset.c (bitset_print):
15398 Use proper printf formats for widths of integer types.
15399 * lib/bitset_stats.c (bitset_percent_histogram_print,
15400 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15401 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15402 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15403 * lib/lbitset.c (lbitset_bytes): Likewise.
15404
15405 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15406 BITSET_SIZE_MAX): New macros.
15407 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15408 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15409 to BITSET_WINDEX_MAX.
15410
15411 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15412 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15413 since we now return the bitset_bindex type (not int).
15414
15415 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15416 when computing sizes.
15417 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15418
15419 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15420 and avoid cast to unsigned.
15421
15422 2002-09-30 Akim Demaille <akim@epita.fr>
15423
15424 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15425 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15426 Updates from Michael Hayes.
15427
15428 2002-09-30 Art Haas <ahaas@neosoft.com>
15429
15430 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15431 invocations.
15432 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15433 defined.
15434
15435 2002-09-27 Akim Demaille <akim@epita.fr>
15436
15437 Version 1.49c.
15438
15439 2002-09-27 Akim Demaille <akim@epita.fr>
15440
15441 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15442 (Because of AC_LIBSOURCE).
15443
15444 2002-09-27 Akim Demaille <akim@epita.fr>
15445
15446 Playing with Autoscan.
15447
15448 * configure.ac: Remove the old LIBOBJ tweaks.
15449 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15450 * lib/strrchr.c: New.
15451 * lib/strtol.c: New, from the Coreutils 4.5.1.
15452
15453 2002-09-27 Akim Demaille <akim@epita.fr>
15454
15455 Playing with Autoscan.
15456
15457 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15458 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15459 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15460 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15461 Coreutils 4.5.1.
15462
15463 2002-09-24 Akim Demaille <akim@epita.fr>
15464
15465 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15466 (Frequently Asked Questions, Parser Stack Overflow): New.
15467
15468 2002-09-13 Akim Demaille <akim@epita.fr>
15469
15470 Playing with autoscan.
15471
15472 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15473 * src/files.c (skeleton_find): Remove, unused.
15474 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15475 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15476
15477 2002-09-13 Akim Demaille <akim@epita.fr>
15478
15479 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15480 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15481
15482 2002-09-13 Akim Demaille <akim@epita.fr>
15483
15484 * configure.ac: Require 2.54.
15485 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15486 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15487 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15488 Remove, provided by Autoconf macros.
15489
15490 2002-09-12 Akim Demaille <akim@epita.fr>
15491
15492 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15493
15494 2002-09-12 Akim Demaille <akim@epita.fr>
15495
15496 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15497 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15498 Reported by Martin Mokrejs.
15499
15500 2002-09-10 Akim Demaille <akim@epita.fr>
15501
15502 * src/parse-gram.y: Associate a human readable string to each
15503 token type.
15504 * tests/regression.at (Invalid inputs): Adjust.
15505
15506 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15507
15508 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15509 with an Autoconf-2.5x style configure.ac.
15510
15511 2002-09-06 Paul Eggert <eggert@twinsun.com>
15512
15513 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15514 exception applies only to yacc.c. This is a modification of a
15515 patch originally suggested by Akim Demaille.
15516
15517 2002-09-06 Akim Demaille <akim@epita.fr>
15518
15519 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15520 here to...
15521 * data/yacc.c: here.
15522
15523 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15524 LocationType.
15525 (b4_ltype): Default to yy::Location from location.hh.
15526
15527 2002-09-04 Jim Meyering <jim@meyering.net>
15528
15529 * data/yacc.c: Guard the declaration of yytoknum also with
15530 `#ifdef YYPRINT', so it is declared only when used.
15531
15532 2002-09-04 Akim Demaille <akim@epita.fr>
15533
15534 * configure.in: Rename as...
15535 * configure.ac: this.
15536 Bump to 1.49c.
15537
15538 2002-09-04 Akim Demaille <akim@epita.fr>
15539
15540 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15541 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15542 translate maintainer only messages.
15543
15544 2002-08-12 Paul Eggert <eggert@twinsun.com>
15545
15546 Version 1.49b.
15547
15548 * Makefile.am (SUBDIRS): Remove intl.
15549 (DISTCLEANFILES): Remove.
15550 * NEWS: Mention that GNU M4 is now required. Clarify what is
15551 meant by "larger grammars". Mention the pt_BR translation.
15552 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15553 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15554 Bump version from 0.11.2 to 0.11.5.
15555 (BISON_PREREQ_STAGE): Remove.
15556 (AM_GNU_GETTEXT): Use external gettext.
15557 (AC_OUTPUT): Remove intl/Makefile.
15558
15559 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15560
15561 * data/glr.c: Include string.h, for strlen.
15562 (yyreportParseError): Use size_t for yysize.
15563 (yy_yypstack): No longer nested inside yypstates, as nested
15564 functions are not portable. Do not assume size_t is the
15565 same width as int.
15566 (yypstates): Do not assume that ptrdiff_t is the same width
15567 as int, and similarly for yyposn and YYINDEX.
15568
15569 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15570
15571 * lib/Makefile.am (INCLUDES): Do not include from the intl
15572 directory, which has been removed.
15573 * src/Makefile.am (INCLUDES): Likewise.
15574
15575 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15576 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15577 New vars.
15578
15579 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15580 * tests/Makefile.am (EXTRA_DIST): Likewise.
15581
15582 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15583 Do not assume that bitset_windex is the same width as unsigned.
15584
15585 * lib/abitset.c (abitset_unused_clear): Do not assume that
15586 bitset_word is the same width as int.
15587 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15588 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15589 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15590 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15591 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15592
15593 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15594 portability to one's complement hosts!).
15595 * lib/ebitset.c (ebitset_op1): Likewise.
15596 * lib/lbitset.c (lbitset_op1): Likewise.
15597
15598 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15599 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15600 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15601 Sync with fileutils.
15602 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15603 lib/gettext.h: Sync with diffutils.
15604
15605 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15606 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15607
15608 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15609 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15610 check for void *.
15611
15612 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15613 size_t; the old version tried to do this but casted improperly.
15614 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15615 (bitset_test): Now returns int, not unsigned long.
15616
15617 * lib/bitset_stats.c: Include "gettext.h".
15618 (_): New macro.
15619 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15620 name locals "index", as it generates unnecessary warnings on some
15621 hosts that have an "index" function.
15622
15623 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15624 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15625 they need translation.
15626 * src/LR0.c (state_list_append, new_itemsets, get_state,
15627 append_states, generate_states): Likewise.
15628 * src/assoc.c (assoc_to_string): Likewise.
15629 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15630 * src/gram.c (grammar_dump): Likewise.
15631 * src/injections.c (injections_compute): Likewise.
15632 * src/lalr.c (lookaheads_print): Likewise.
15633 * src/relation.c (relation_transpose): Likewise.
15634 * src/scan-gram.l: Likewise.
15635 * src/tables.c (table_grow, pack_vector): Likewise.
15636
15637 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15638 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15639 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15640 * m4/mbstate_t.m4: Sync with fileutils.
15641 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15642
15643 * po/LINGUAS: Add pt_BR.
15644 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15645 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15646 lib/timevar.c.
15647 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15648 manual recommends.
15649 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15650
15651 * src/complain.c (strerror_r): Remove decl; not needed.
15652 (strerror): Use same pattern as ../lib/error.c.
15653
15654 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15655
15656 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15657
15658 * src/main.c (main): Cast result of bindtextdomain and textdomain
15659 to void, to avoid a GCC warning when --disable-nls is in effect.
15660
15661 * src/scan-gram.l: Use strings rather than escapes when possible,
15662 to minimize the number of warnings from xgettext.
15663 (handle_action_dollar, handle_action_at): Don't use isdigit,
15664 as it mishandles negative chars and it may not work as expected
15665 outside the C locale.
15666
15667 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15668 this is a GCC extension and is not portable to other compilers.
15669
15670 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15671 Do not include <ctype.h>; no longer needed.
15672 Do not include <malloc.h>; no longer needed (and generates
15673 warnings on OpenBSD 3.0).
15674
15675 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15676 it's not portable.
15677
15678 * tests/regression.at: Do not use 'cc -c input.c -o input';
15679 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15680
15681 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15682 exit status as failure, not just exit status 1. Sun C exits
15683 with status 2 sometimes.
15684
15685 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15686 Use it for the two large tests.
15687
15688 2002-08-02 Akim Demaille <akim@epita.fr>
15689
15690 * src/conflicts.c (conflicts_output): Don't output rules never
15691 reduced here, since anyway that computation doesn't work.
15692 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15693 (rule_useless_p, rule_never_reduced_p): New.
15694 (grammar_rules_partial_print): Use a filter instead of a range.
15695 Display the title only if needed.
15696 (grammar_rules_print): Adjust.
15697 (grammar_rules_never_reduced_report): New.
15698 * src/tables.c (action_row): Move the computation of rules never
15699 reduced to...
15700 (token_actions): here.
15701 * src/main.c (main): Make the parser before making the report, so
15702 that rules never reduced are computed.
15703 Call grammar_rules_never_reduced_report.
15704 * src/print.c (print_results): Report rules never reduced.
15705 * tests/conflicts.at, tests/reduce.at: Adjust.
15706
15707 2002-08-01 Akim Demaille <akim@epita.fr>
15708
15709 Instead of attaching lookaheads and duplicating the rules being
15710 reduced by a state, attach the lookaheads to the reductions.
15711
15712 * src/state.h (state_t): Remove the `lookaheads',
15713 `lookaheads_rule' member.
15714 (reductions_t): Add a `lookaheads' member.
15715 Use a regular array for the `rules'.
15716 * src/state.c (reductions_new): Initialize the lookaheads member
15717 to 0.
15718 (state_rule_lookaheads_print): Adjust.
15719 * src/state.h, src/state.c (state_reductions_find): New.
15720 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15721 (count_rr_conflicts): Adjust.
15722 * src/lalr.c (LArule): Remove.
15723 (add_lookback_edge): Adjust.
15724 (state_lookaheads_count): New.
15725 (states_lookaheads_initialize): Merge into...
15726 (initialize_LA): this.
15727 (lalr_free): Adjust.
15728 * src/main.c (main): Don't free nullable and derives too early: it
15729 is used by --verbose.
15730 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15731
15732 2002-08-01 Akim Demaille <akim@epita.fr>
15733
15734 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15735 `rule_number_t**'.
15736 (set_derives, free_derives): Rename as...
15737 (derives_compute, derives_free): this.
15738 Adjust all dependencies.
15739 * src/nullable.c (set_nullable, free_nullable): Rename as...
15740 (nullable_compute, nullable_free): these.
15741 (rule_list_t): Store rule_t *, not rule_number_t.
15742 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15743 pointers, instead of their numbers.
15744 * src/main.c (main): Call nullable_free, and derives_free earlier,
15745 as they were lo longer used.
15746
15747 2002-08-01 Akim Demaille <akim@epita.fr>
15748
15749 * lib/timevar.c (get_time): Include children time.
15750 * src/lalr.h (LA, LArule): Don't export them: used with the
15751 state_t.
15752 * src/lalr.c (LA, LArule): Static.
15753 * src/lalr.h, src/lalr.c (lalr_free): New.
15754 * src/main.c (main): Call it.
15755 * src/tables.c (pack_vector): Check whether loc is >= to the
15756 table_size, not >.
15757 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15758 (tables_generate): do it, since that's also it which allocates
15759 them.
15760 Don't free LA and LArule, main does.
15761
15762 2002-07-31 Akim Demaille <akim@epita.fr>
15763
15764 Separate parser tables computation and output.
15765
15766 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15767 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15768 (yydefgoto, yydefact, high): Move to...
15769 * src/tables.h, src/tables.c: here.
15770 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15771 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15772 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15773 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15774 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15775 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15776 (action_row, save_row, token_actions, save_column, default_goto)
15777 (goto_actions, sort_actions, matching_state, pack_vector)
15778 (table_ninf_remap, pack_table, prepare_actions): Move to...
15779 * src/tables.c: here.
15780 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15781 * src/output.c (token_actions, output_base, output_conflicts)
15782 (output_check): Merge into...
15783 (prepare_actions): this.
15784 (actions_output): Rename as...
15785 (user_actions_output): this.
15786 * src/main.c (main): Call tables_generate and tables_free.
15787
15788 2002-07-31 Akim Demaille <akim@epita.fr>
15789
15790 Steal GCC's --time-report support.
15791
15792 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15793 stolen/adjusted from GCC.
15794 * m4/stage.m4: Remove time related checks.
15795 * m4/timevar.m4: New.
15796 * configure.in: Adjust.
15797 * src/system.h: Adjust to using timevar.h.
15798 * src/getargs.h, src/getargs.c: Support trace_time for
15799 --trace=time.
15800 * src/main.c (stage): Remove.
15801 (main): Replace `stage' invocations with timevar calls.
15802 * src/output.c: Insert pertinent timevar calls.
15803
15804 2002-07-31 Akim Demaille <akim@epita.fr>
15805
15806 Let --trace have arguments.
15807
15808 * src/getargs.h (enum trace_e): New.
15809 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15810 (long_options, short_options): --trace/-T takes an optional
15811 argument.
15812 Change all the uses of trace_flag to reflect the new flags.
15813 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15814
15815 Strengthen `stage' portability.
15816
15817 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15818 * configure.in: Use it.
15819 Don't check for malloc.h and sys/times.h.
15820 * src/system.h: Include them when appropriate.
15821 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15822 times and struct tms are available.
15823
15824 2002-07-30 Akim Demaille <akim@epita.fr>
15825
15826 In verbose parse error message, don't report `error' as an
15827 expected token.
15828 * tests/actions.at (Printers and Destructors): Adjust.
15829 * tests/calc.at (Calculator $1): Adjust.
15830 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15831 error message, do not report the parser accepts the error token in
15832 that state.
15833
15834 2002-07-30 Akim Demaille <akim@epita.fr>
15835
15836 Normalize conflict related messages.
15837
15838 * src/complain.h, src/complain.c (warn, complain): New.
15839 * src/conflicts.c (conflicts_print): Use them.
15840 (conflict_report_yacc): New, extracted from...
15841 (conflicts_print): here.
15842 * tests/conflicts.at, tests/existing.at: Adjust.
15843
15844 2002-07-30 Akim Demaille <akim@epita.fr>
15845
15846 Report rules which are never reduced by the parser: those hidden
15847 by conflicts.
15848
15849 * src/LR0.c (save_reductions): Don't make the final state too
15850 different: save its reduction (accept) instead of having a state
15851 without any action (no shift or goto, no reduce).
15852 Note: the final state is now a ``regular'' state, i.e., the
15853 parsers now contain `reduce 0' as default reduction.
15854 Nevertheless, since they decide to `accept' when yystate =
15855 final_state, they still will not reduce rule 0.
15856 * src/print.c (print_actions, print_reduction): Adjust.
15857 * src/output.c (action_row): Track reduced rules.
15858 (token_actions): Report rules never reduced.
15859 * tests/conflicts.at, tests/regression.at: Adjust.
15860
15861 2002-07-30 Akim Demaille <akim@epita.fr>
15862
15863 `stage' was accidently included in a previous patch.
15864 Initiate its autoconfiscation.
15865
15866 * configure.in: Look for malloc.h and sys/times.h.
15867 * src/main.c (stage): Adjust.
15868 Report only when trace_flag.
15869
15870 2002-07-29 Akim Demaille <akim@epita.fr>
15871
15872 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15873 state_number_t.
15874 (errs_t): symbol_t*, not symbol_number_t.
15875 (reductions_t): rule_t*, not rule_number_t.
15876 (FOR_EACH_SHIFT): New.
15877 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15878 * src/print.c, src/print_graph.c: Adjust.
15879
15880 2002-07-29 Akim Demaille <akim@epita.fr>
15881
15882 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15883
15884 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15885 (endtoken, accept): these.
15886 * src/reader.c (reader): Set endtoken's default tag to "$end".
15887 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15888 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15889 Adjust.
15890
15891 2002-07-29 Akim Demaille <akim@epita.fr>
15892
15893 * src/reduce.c (reduce_grammar): When the language is empty,
15894 complain about the start symbol, not the axiom.
15895 Use its location.
15896 * tests/reduce.at (Empty Language): New.
15897
15898 2002-07-26 Akim Demaille <akim@epita.fr>
15899
15900 * src/reader.h, src/reader.c (gram_error): ... can't get
15901 yycontrol without making too strong assumptions on the parser
15902 itself.
15903 * src/output.c (prepare_tokens): Use the real 0th value of
15904 token_translations instead of `0'.
15905 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15906 visible here.
15907 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15908 for the time being: %locations ought to provide it to yyerror.
15909
15910 2002-07-25 Akim Demaille <akim@epita.fr>
15911
15912 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15913 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15914 * tests/regression.at (Web2c Actions): Adjust.
15915
15916 2002-07-25 Akim Demaille <akim@epita.fr>
15917
15918 Stop storing rules from 1 to nrules + 1.
15919
15920 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15921 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15922 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15923 Iterate from 0 to nrules.
15924 Use rule_number_as_item_number and item_number_as_rule_number.
15925 Adjust to `derive' now containing possibly 0.
15926 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15927 Handle the `- 1' part in rule numbers from/to item numbers.
15928 * src/conflicts.c (log_resolution): Fix the message which reversed
15929 shift and reduce.
15930 * src/output.c (action_row): Initialize default_rule to -1.
15931 (token_actions): Adjust.
15932 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15933 expected output.
15934 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15935
15936 2002-07-25 Akim Demaille <akim@epita.fr>
15937
15938 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15939 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15940 (b4_c_knr_arg_decl): New.
15941 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15942 yyreport_parse_error.
15943
15944 2002-07-25 Akim Demaille <akim@epita.fr>
15945
15946 * data/yacc.c (yyreport_parse_error): New, extracted from...
15947 (yyparse): here.
15948 (yydestruct, yysymprint): Move above yyparse.
15949 Be K&R compliant.
15950
15951 2002-07-25 Akim Demaille <akim@epita.fr>
15952
15953 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15954 replace...
15955 (b4_sint_type, b4_uint_type): these.
15956 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15957 * tests/regression.at (Web2c Actions): Adjust.
15958
15959 2002-07-25 Akim Demaille <akim@epita.fr>
15960
15961 * src/gram.h (TIEM_NUMBER_MAX): New.
15962 (item_number_of_rule_number, rule_number_of_item_number): Rename
15963 as...
15964 (rule_number_as_item_number, item_number_as_rule_number): these.
15965 Adjust dependencies.
15966 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15967 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15968 (symbol_number_to_vector_number): New.
15969 (order): Of vector_number_t* type.
15970 (base_t, BASE_MAX, BASE_MIN): New.
15971 (froms, tos, width, pos, check): Of base_t type.
15972 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15973 (actrow): Of action_number_t type.
15974 (conflrow): Of unsigned int type.
15975 (table_ninf, base_ninf): New.
15976 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15977 (muscle_insert_int_table, muscle_insert_base_table)
15978 (muscle_insert_rule_number_table): New.
15979 (prepare_tokens): Output `toknum' as int_table.
15980 (action_row): Returns a rule_number_t.
15981 Use ACTION_MIN, not SHRT_MIN.
15982 (token_actions): yydefact is rule_number_t*.
15983 (table_ninf_remap): New.
15984 (pack_table): Use it for `base' and `table'.
15985 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15986 replaced with...
15987 (YYPACT_NINF, YYTABLE_NINF): these.
15988 (yypact, yytable): Compute their types instead of hard-coded
15989 `short'.
15990 * tests/regression.at (Web2c Actions): Adjust.
15991
15992 2002-07-19 Akim Demaille <akim@epita.fr>
15993
15994 * src/scan-gram.l (id): Can start with an underscore.
15995
15996 2002-07-16 Akim Demaille <akim@epita.fr>
15997
15998 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15999 Adjust all former `associativity' dependencies.
16000 * src/symtab.c (symbol_new): Default associativity is `undef', not
16001 `right'.
16002 (symbol_check_alias_consistence): Adjust.
16003
16004 2002-07-09 Akim Demaille <akim@epita.fr>
16005
16006 * doc/bison.texinfo: Properly set the ``header'' part.
16007 Use @dircategory ``GNU programming tools'' as per Texinfo's
16008 documentation.
16009 Use @copying.
16010
16011 2002-07-09 Akim Demaille <akim@epita.fr>
16012
16013 * lib/quotearg.h: Protect against multiple inclusions.
16014 * src/location.h (location_t): Add a `file' member.
16015 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16016 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16017 `error_one_per_line' support.
16018
16019 2002-07-09 Akim Demaille <akim@epita.fr>
16020
16021 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16022 * src/reader.c (lineno): Remove.
16023 Adjust all dependencies.
16024 (get_merge_function): Take a location and use complain_at.
16025 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16026 * tests/regression.at (Invalid inputs, Mixing %token styles):
16027 Adjust.
16028
16029 2002-07-09 Akim Demaille <akim@epita.fr>
16030
16031 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16032 recovery rule, and forbid extensions when --yacc.
16033 (gram_error): Use complain_at.
16034 * src/reader.c (reader): Exit if there were parse errors.
16035
16036 2002-07-09 Akim Demaille <akim@epita.fr>
16037
16038 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16039 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16040 Reported by R Blake <blakers@mac.com>.
16041
16042 2002-07-09 Akim Demaille <akim@epita.fr>
16043
16044 * data/yacc.c: Output the copyright notive in the header.
16045
16046 2002-07-03 Akim Demaille <akim@epita.fr>
16047
16048 * src/output.c (froms, tos): Are state_number_t.
16049 (save_column): sp, sp1, and sp2 are state_number_t.
16050 (prepare): Rename `final' as `final_state_number', `nnts' as
16051 `nterms_number', `nrules' as `rules_number', `nstates' as
16052 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16053 unused.
16054 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16055 * data/lalr1.cc (nsym_): Remove, unused.
16056
16057 2002-07-03 Akim Demaille <akim@epita.fr>
16058
16059 * src/lalr.h, src/lalr.c (goto_number_t): New.
16060 * src/lalr.c (goto_list_t): New.
16061 Propagate them.
16062 * src/nullable.c (rule_list_t): New.
16063 Propagate.
16064 * src/types.h: Remove.
16065
16066 2002-07-03 Akim Demaille <akim@epita.fr>
16067
16068 * src/closure.c (print_fderives): Use rule_rhs_print.
16069 * src/derives.c (print_derives): Use rule_rhs_print.
16070 (rule_list_t): New, replaces `shorts'.
16071 (set_derives): Add comments.
16072 * tests/sets.at (Nullable, Firsts): Adjust.
16073
16074 2002-07-03 Akim Demaille <akim@epita.fr>
16075
16076 * src/output.c (prepare_actions): Free `tally' and `width'.
16077 (prepare_actions): Allocate and free `order'.
16078 * src/symtab.c (symbols_free): Free `symbols'.
16079 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16080 * src/output.c (m4_invoke): Move to...
16081 * src/scan-skel.l: here.
16082 (<<EOF>>): Close yyout, and free its name.
16083
16084 2002-07-03 Akim Demaille <akim@epita.fr>
16085
16086 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16087
16088 * src/LR0.c (new_state): Merge into...
16089 (state_list_append): this.
16090 (new_states): Merge into...
16091 (generate_states): here.
16092 (set_states): Don't ensure a proper `errs' state member here, do it...
16093 * src/conflicts.c (conflicts_solve): here.
16094 * src/state.h, src/state.c: Comment changes.
16095 (state_t): Rename member `shifts' as `transitions'.
16096 Adjust all dependencies.
16097 (errs_new): For consistency, also take the values as argument.
16098 (errs_dup): Remove.
16099 (state_errs_set): New.
16100 (state_reductions_set, state_transitions_set): Assert that no
16101 previous value was assigned.
16102 (state_free): New.
16103 (states_free): Use it.
16104 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16105 temporary storage: use `errs' and `nerrs' as elsewhere.
16106 (set_conflicts): Allocate and free this `errs'.
16107
16108 2002-07-02 Akim Demaille <akim@epita.fr>
16109
16110 * lib/libiberty.h: New.
16111 * lib: Update the bitset implementation from upstream.
16112 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16113 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16114 * src/main.c: Adjust bitset stats calls.
16115
16116 2002-07-01 Paul Eggert <eggert@twinsun.com>
16117
16118 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16119 char, so that negative chars don't collide with $.
16120
16121 2002-06-30 Akim Demaille <akim@epita.fr>
16122
16123 Have the GLR tests be `warning' checked, and fix the warnings.
16124
16125 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16126 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16127 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16128 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16129 (yyaddDeferredAction): static.
16130 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16131 (yyreportParseError): yyprefix is const.
16132 yytokenp is used only when verbose.
16133 (yy__GNUC__): Replace with __GNUC__.
16134 (yypdumpstack): yyi is size_t.
16135 (yypreference): Un-yy local variables and arguments, to avoid
16136 clashes with `yyr1'. Anyway, we are not in the user name space.
16137 (yytname_size): be an int, as is compared with ints.
16138 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16139 Use them.
16140 * tests/cxx-gram.at: Use quotation to protect $1.
16141 Use AT_COMPILE to enable warnings hunts.
16142 Prototype yylex and yyerror.
16143 `Use' argc.
16144 Include `string.h', not `strings.h'.
16145 Produce and prototype stmtMerge only when used.
16146 yylex takes a location.
16147
16148 2002-06-30 Akim Demaille <akim@epita.fr>
16149
16150 We spend a lot of time in quotearg, in particular when --verbose.
16151
16152 * src/symtab.c (symbol_get): Store a quoted version of the key.
16153 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16154 Adjust all callers.
16155
16156 2002-06-30 Akim Demaille <akim@epita.fr>
16157
16158 * src/state.h (reductions_t): Rename member `nreds' as num.
16159 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16160 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16161
16162 2002-06-30 Akim Demaille <akim@epita.fr>
16163
16164 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16165 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16166 (shifts_to): Rename as...
16167 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16168 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16169 (TRANSITION_IS_DISABLED, transitions_to): these.
16170
16171 2002-06-30 Akim Demaille <akim@epita.fr>
16172
16173 * src/print.c (print_shifts, print_gotos): Merge into...
16174 (print_transitions): this.
16175 (print_transitions, print_errs, print_reductions): Align the
16176 lookaheads columns.
16177 (print_core, print_transitions, print_errs, print_state,
16178 print_grammar): Output empty lines separator before, not after.
16179 (state_default_rule_compute): Rename as...
16180 (state_default_rule): this.
16181 * tests/conflicts.at (Defaulted Conflicted Reduction),
16182 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16183 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16184
16185 2002-06-30 Akim Demaille <akim@epita.fr>
16186
16187 Display items as we display rules.
16188
16189 * src/gram.h, src/gram.c (rule_lhs_print): New.
16190 * src/gram.c (grammar_rules_partial_print): Use it.
16191 * src/print.c (print_core): Likewise.
16192 * tests/conflicts.at (Defaulted Conflicted Reduction),
16193 (Unresolved SR Conflicts): Adjust.
16194 (Unresolved SR Conflicts): Adjust and rename as...
16195 (Resolved SR Conflicts): this, as was meant.
16196 * tests/regression.at (Web2c Report): Adjust.
16197
16198 2002-06-30 Akim Demaille <akim@epita.fr>
16199
16200 * src/print.c (state_default_rule_compute): New, extracted from...
16201 (print_reductions): here.
16202 Pessimize, but clarify the code.
16203 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16204
16205 2002-06-30 Akim Demaille <akim@epita.fr>
16206
16207 * src/output.c (action_row): Let default_rule be always a rule
16208 number.
16209
16210 2002-06-30 Akim Demaille <akim@epita.fr>
16211
16212 * src/closure.c (print_firsts, print_fderives, closure):
16213 Use BITSET_EXECUTE.
16214 * src/lalr.c (lookaheads_print): Likewise.
16215 * src/state.c (state_rule_lookaheads_print): Likewise.
16216 * src/print_graph.c (print_core): Likewise.
16217 * src/print.c (print_reductions): Likewise.
16218 * src/output.c (action_row): Likewise.
16219 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16220
16221 2002-06-30 Akim Demaille <akim@epita.fr>
16222
16223 * src/print_graph.c: Use report_flag.
16224
16225 2002-06-30 Akim Demaille <akim@epita.fr>
16226
16227 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16228 to...
16229 * src/relation.h, src/relation.c (traverse, relation_digraph)
16230 (relation_print, relation_transpose): New.
16231
16232 2002-06-30 Akim Demaille <akim@epita.fr>
16233
16234 * src/state.h, src/state.c (shifts_to): New.
16235 * src/lalr.c (build_relations): Use it.
16236
16237 2002-06-30 Akim Demaille <akim@epita.fr>
16238
16239 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16240 (item_number_of_rule_number, rule_number_of_item_number): New.
16241 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16242 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16243 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16244 Propagate their use.
16245 Much remains to be done, in particular wrt `shorts' from types.h.
16246
16247 2002-06-30 Akim Demaille <akim@epita.fr>
16248
16249 * src/symtab.c (symbol_new): Initialize the `printer' member.
16250
16251 2002-06-30 Akim Demaille <akim@epita.fr>
16252
16253 * src/LR0.c (save_reductions): Remove, replaced by...
16254 * src/state.h, src/state.c (state_reductions_set): New.
16255 (reductions, errs): Rename as...
16256 (reductions_t, errs_t): these.
16257 Adjust all dependencies.
16258
16259 2002-06-30 Akim Demaille <akim@epita.fr>
16260
16261 * src/LR0.c (state_list_t, state_list_append): New.
16262 (first_state, last_state): Now symbol_list_t.
16263 (this_state): Remove.
16264 (new_itemsets, append_states, save_reductions): Take a state_t as
16265 argument.
16266 (set_states, generate_states): Adjust.
16267 (save_shifts): Remove, replaced by...
16268 * src/state.h, src/state.c (state_shifts_set): New.
16269 (shifts): Rename as...
16270 (shifts_t): this.
16271 Adjust all dependencies.
16272 * src/state.h (state_t): Remove the `next' member.
16273
16274 2002-06-30 Akim Demaille <akim@epita.fr>
16275
16276 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16277 escaped in slot 0.
16278
16279 2002-06-30 Akim Demaille <akim@epita.fr>
16280
16281 Use hash.h for the state hash table.
16282
16283 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16284 (allocate_storage): Use state_hash_new.
16285 (free_storage): Use state_hash_free.
16286 (new_state, get_state): Adjust.
16287 * src/lalr.h, src/lalr.c (states): Move to...
16288 * src/states.h (state_t): Remove the `link' member, no longer
16289 used.
16290 * src/states.h, src/states.c: here.
16291 (state_hash_new, state_hash_free, state_hash_lookup)
16292 (state_hash_insert, states_free): New.
16293 * src/states.c (state_table, state_compare, state_hash): New.
16294 * src/output.c (output_actions): Do not free states now, since we
16295 still need to know the final_state number in `prepare', called
16296 afterwards. Do it...
16297 * src/main.c (main): here: call states_free after `output'.
16298
16299 2002-06-30 Akim Demaille <akim@epita.fr>
16300
16301 * src/state.h, src/state.c (state_new): New, extracted from...
16302 * src/LR0.c (new_state): here.
16303 * src/state.h (STATE_ALLOC): Move to...
16304 * src/state.c: here.
16305 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16306 * src/state.h, src/state.c: here.
16307
16308 2002-06-30 Akim Demaille <akim@epita.fr>
16309
16310 * src/reader.c (gensym): Rename as...
16311 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16312 (getsym): Rename as...
16313 (symbol_get): this.
16314
16315 2002-06-30 Akim Demaille <akim@epita.fr>
16316
16317 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16318 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16319 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16320 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16321
16322 2002-06-30 Akim Demaille <akim@epita.fr>
16323
16324 Make the test suite pass with warnings checked.
16325
16326 * tests/actions.at (Printers and Destructors): Improve.
16327 Avoid unsigned vs. signed issues.
16328 * tests/calc.at: Don't exercise the scanner here, do it...
16329 * tests/input.at (Torturing the Scanner): here.
16330
16331 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16332
16333 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16334 reorganize first lines parallel to yacc.c.
16335
16336 2002-06-28 Akim Demaille <akim@epita.fr>
16337
16338 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16339 (b4_token_enum, b4_token_defines): New, factored from...
16340 * data/lalr1.cc, data/yacc.c, glr.c: here.
16341
16342 2002-06-28 Akim Demaille <akim@epita.fr>
16343
16344 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16345 unused variables.
16346 * src/output.c (merger_output): static.
16347
16348 2002-06-28 Akim Demaille <akim@epita.fr>
16349
16350 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16351 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16352 pacify GCC.
16353 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16354
16355 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16356
16357 Accumulated changelog for new GLR parsing features.
16358
16359 * src/conflicts.c (count_total_conflicts): Change name to
16360 conflicts_total_count.
16361 * src/conflicts.h: Ditto.
16362 * src/output.c (token_actions): Use the new name.
16363 (output_conflicts): Change conflp => conflict_list_heads, and
16364 confl => conflict_list for better readability.
16365 * data/glr.c: Use the new names.
16366 * NEWS: Add self to GLR announcement.
16367
16368 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16369
16370 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16371 Akim Demaille.
16372
16373 * data/bison.glr: Change name to glr.c
16374 * data/glr.c: Renamed from bison.glr.
16375 * data/Makefile.am: Add glr.c
16376
16377 * src/getargs.c:
16378
16379 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16380 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16381
16382 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16383
16384 * data/bison.glr: Be sure to restore the
16385 current #line when returning to the skeleton contents after having
16386 exposed the input file's #line.
16387
16388 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16389
16390 * data/bison.glr: Bring up to date with changes to bison.simple.
16391
16392 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16393
16394 * data/bison.glr: Correct definitions that use b4_prefix.
16395 Various reformatting.
16396 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16397 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16398 yytokenp argument; now part of stack.
16399 (yychar): Define to behave as documented.
16400 (yyclearin): Ditto.
16401
16402 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16403
16404 * src/reader.h: Add declaration for free_merger_functions.
16405
16406 * src/reader.c (merge_functions): New variable.
16407 (get_merge_function): New function.
16408 (free_merger_functions): New function.
16409 (readgram): Check for %prec that is not followed by a symbol.
16410 Handle %dprec and %merge declarations.
16411 (packgram): Initialize dprec and merger fields in rules array.
16412
16413 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16414 conflict_list_cnt, conflict_list_free): New variables.
16415 (table_grow): Also grow conflict_table.
16416 (prepare_rules): Output dprec and merger tables.
16417 (conflict_row): New function.
16418 (action_row): Output conflict lists for GLR parser. Don't use
16419 default reduction in conflicted states for GLR parser so that there
16420 are spaces for the conflict lists.
16421 (save_row): Also save conflict information.
16422 (token_actions): Allocate conflict list.
16423 (merger_output): New function.
16424 (pack_vector): Pack conflict table, too.
16425 (output_conflicts): New function to output yyconflp and yyconfl.
16426 (output_check): Allocate conflict_tos.
16427 (output_actions): Output conflict tables, also.
16428 (output_skeleton): Output b4_mergers definition.
16429 (prepare): Output b4_max_rhs_length definition.
16430 Use 'bison.glr' as default skeleton for GLR parsers.
16431
16432 * src/gram.c (glr_parser): New flag.
16433 (grammar_free): Call free_merger_functions.
16434
16435 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16436 all pairs of conflicting reductions, rather than just all tokens
16437 causing conflicts. Needed to size conflict tables.
16438 (conflicts_output): Modify call to count_rr_conflicts for new
16439 interface.
16440 (conflicts_print): Ditto.
16441 (count_total_conflicts): New function.
16442
16443 * src/reader.h (merger_list): New type.
16444 (merge_functions): New variable.
16445
16446 * src/lex.h (tok_dprec, tok_merge): New token types.
16447
16448 * src/gram.h (rule_s): Add dprec and merger fields.
16449 (glr_parser): New flag.
16450
16451 * src/conflicts.h (count_total_conflicts): New function.
16452
16453 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16454
16455 * doc/bison.texinfo (Generalized LR Parsing): New section.
16456 (GLR Parsers): New section.
16457 (Language and Grammar): Mention GLR parsing.
16458 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16459 Correct typo ("tge" -> "the").
16460
16461 * data/bison.glr: New skeleton for GLR parsing.
16462
16463 * tests/cxx-gram.at: New tests for GLR parsing.
16464
16465 * tests/testsuite.at: Include cxx-gram.at.
16466
16467 * tests/Makefile.am: Add cxx-gram.at.
16468
16469 * src/parse-gram.y:
16470
16471 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16472
16473 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16474
16475 2002-06-27 Akim Demaille <akim@epita.fr>
16476
16477 * src/options.h, src/options.c: Remove.
16478 * src/getargs.c (short_options, long_options): New.
16479
16480 2002-06-27 Akim Demaille <akim@epita.fr>
16481
16482 * data/bison.simple, data/bison.c++: Rename as...
16483 * data/yacc.c, data/lalr1.cc: these.
16484 * doc/bison.texinfo (Environment Variables): Remove.
16485
16486 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16487
16488 * src/getargs.c (report_argmatch): Initialize strtok().
16489
16490 2002-06-20 Akim Demaille <akim@epita.fr>
16491
16492 * data/bison.simple (b4_symbol_actions): New, replaces...
16493 (b4_symbol_destructor, b4_symbol_printer): these.
16494 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16495 user token numbers.
16496
16497 2002-06-20 Akim Demaille <akim@epita.fr>
16498
16499 * data/bison.simple (yydestructor): Rename as...
16500 (yydestruct): this.
16501
16502 2002-06-20 Akim Demaille <akim@epita.fr>
16503
16504 * src/symtab.h, src/symtab.c (symbol_type_set)
16505 (symbol_destructor_set, symbol_precedence_set): The location is
16506 the last argument.
16507 Adjust all callers.
16508
16509 2002-06-20 Akim Demaille <akim@epita.fr>
16510
16511 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16512 internals.
16513 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16514 Takes a location.
16515 * src/symtab.h, src/symtab.c (symbol_class_set)
16516 (symbol_user_token_number_set): Likewise.
16517 Adjust all callers.
16518 Promote complain_at.
16519 * tests/input.at (Type Clashes): Adjust.
16520
16521 2002-06-20 Akim Demaille <akim@epita.fr>
16522
16523 * data/bison.simple (YYLEX): Fix the declaration when
16524 %pure-parser.
16525
16526 2002-06-20 Akim Demaille <akim@epita.fr>
16527
16528 * data/bison.simple (yysymprint): Don't print the token number,
16529 just its name.
16530 * tests/actions.at (Destructors): Rename as...
16531 (Printers and Destructors): this.
16532 Also exercise %printer.
16533
16534 2002-06-20 Akim Demaille <akim@epita.fr>
16535
16536 * data/bison.simple (YYDSYMPRINT): New.
16537 Use it to remove many of the #if YYDEBUG/if (yydebug).
16538
16539 2002-06-20 Akim Demaille <akim@epita.fr>
16540
16541 * src/symtab.h, src/symtab.c (symbol_t): printer and
16542 printer_location are new members.
16543 (symbol_printer_set): New.
16544 * src/parse-gram.y (PERCENT_PRINTER): New token.
16545 Handle its associated rule.
16546 * src/scan-gram.l: Adjust.
16547 (handle_destructor_at, handle_destructor_dollar): Rename as...
16548 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16549 * src/output.c (symbol_printers_output): New.
16550 (output_skeleton): Call it.
16551 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16552 since there are already many grammar files with a user `yyprint'.
16553 Replace the calls to YYPRINT to calls to yysymprint.
16554 * tests/calc.at: Adjust.
16555 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16556 taking advantage of parser very internal details (stack size!).
16557
16558 2002-06-20 Akim Demaille <akim@epita.fr>
16559
16560 * src/scan-gram.l: Complete the scanner with the missing patterns
16561 to pacify Flex.
16562 Use `quote' and `symbol_tag_get' where appropriate.
16563
16564 2002-06-19 Akim Demaille <akim@epita.fr>
16565
16566 * tests/actions.at (Destructors): Augment to test locations.
16567 * data/bison.simple (yydestructor): Pass it the current location
16568 if locations are enabled.
16569 Prototype only when __STDC__ or C++.
16570 Change the argument names to move into the yy name space: there is
16571 user code here.
16572
16573 2002-06-19 Akim Demaille <akim@epita.fr>
16574
16575 * data/bison.simple (b4_pure_if): New.
16576 Use it instead of #ifdef YYPURE.
16577
16578 2002-06-19 Akim Demaille <akim@epita.fr>
16579
16580 * data/bison.simple (b4_location_if): New.
16581 Use it instead of #ifdef YYLSP_NEEDED.
16582
16583 2002-06-19 Akim Demaille <akim@epita.fr>
16584
16585 Prepare @$ in %destructor, but currently don't bind it in the
16586 skeleton, as %location use is not cleaned up yet.
16587
16588 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16589 (handle_action_at): New.
16590 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16591 a braced_code_t and a location as additional arguments.
16592 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16593 unquote one when outputting `b4_dollar_dollar'.
16594 Adjust callers.
16595 * data/bison.simple (b4_eval): Remove.
16596 (b4_symbol_destructor): Adjust.
16597 * tests/input.at (Invalid @n): Adjust.
16598
16599 2002-06-19 Zack Weinberg <zack@codesourcery.com>
16600
16601 * doc/bison.texinfo: Document ability to have multiple
16602 prologue sections.
16603
16604 2002-06-18 Akim Demaille <akim@epita.fr>
16605
16606 * src/files.c (compute_base_names): When computing the output file
16607 names from the input file name, strip the directory part.
16608
16609 2002-06-18 Akim Demaille <akim@epita.fr>
16610
16611 * data/bison.simple.new: Comment changes.
16612 Reported by Andreas Schwab.
16613
16614 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16615
16616 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16617 there are no `label `yyoverflowlab' defined but not used' warnings
16618 when yyoverflow is defined.
16619
16620 2002-06-18 Akim Demaille <akim@epita.fr>
16621
16622 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16623 new member.
16624 (symbol_destructor_set): Adjust.
16625 * src/output.c (symbol_destructors_output): Output the destructor
16626 locations.
16627 Output the symbol name.
16628 * data/bison.simple (b4_symbol_destructor): Adjust.
16629
16630 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16631 and Akim Demaille <akim@epita.fr>
16632
16633 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16634 what's left on the stack when the error recovery hits EOF.
16635 * tests/actions.at (Destructors): Complete to exercise this case.
16636
16637 2002-06-17 Akim Demaille <akim@epita.fr>
16638
16639 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16640 arguments is really empty, not only equal to `[]'.
16641 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16642 member.
16643 (symbol_destructor_set): New.
16644 * src/output.c (symbol_destructors_output): New.
16645 * src/reader.h (brace_code_t, current_braced_code): New.
16646 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16647 (handle_dollar): Rename as...
16648 (handle_action_dollar): this.
16649 (handle_destructor_dollar): New.
16650 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16651 (grammar_declaration): Use it.
16652 * data/bison.simple (yystos): Is always defined.
16653 (yydestructor): New.
16654 * tests/actions.at (Destructors): New.
16655 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16656
16657 2002-06-17 Akim Demaille <akim@epita.fr>
16658
16659 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16660 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16661 rule_length only when needed.
16662 * src/output.c (actions_output, token_definitions_output): Output
16663 the full M4 block.
16664 * src/symtab.c: Don't access directly to the symbol tag, use
16665 symbol_tag_get.
16666 * src/parse-gram.y: Use symbol_list_free.
16667
16668 2002-06-17 Akim Demaille <akim@epita.fr>
16669
16670 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16671 (symbol_list_prepend, get_type_name): Move to...
16672 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16673 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16674 Adjust all callers.
16675 (symbol_list_free): New.
16676 * src/scan-gram.l (handle_dollar): Takes a location.
16677 * tests/input.at (Invalid $n): Adjust.
16678
16679 2002-06-17 Akim Demaille <akim@epita.fr>
16680
16681 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16682 (symbol_list_prepend): New.
16683 * src/parse-gram.y (%union): `list' is a new member.
16684 (symbols.1): New, replaces...
16685 (terms_to_prec.1, nterms_to_type.1): these.
16686 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16687 Take a location as additional argument.
16688 Adjust all callers.
16689
16690 2002-06-15 Akim Demaille <akim@epita.fr>
16691
16692 * src/parse-gram.y: Move %token in the declaration section so that
16693 we don't depend upon CVS Bison.
16694
16695 2002-06-15 Akim Demaille <akim@epita.fr>
16696
16697 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16698 * src/print.c (print_core): Use it.
16699
16700 2002-06-15 Akim Demaille <akim@epita.fr>
16701
16702 * src/conflicts.c (log_resolution): Accept the rule involved in
16703 the sr conflicts instead of the lookahead number that points to
16704 that rule.
16705 (flush_reduce): Accept the current lookahead vector as argument,
16706 instead of the index in LA.
16707 (resolve_sr_conflict): Accept the current number of lookahead
16708 bitset to consider for the STATE, instead of the index in LA.
16709 (set_conflicts): Adjust.
16710 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16711
16712 2002-06-15 Akim Demaille <akim@epita.fr>
16713
16714 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16715 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16716 Adjust all dependencies.
16717 * src/lalr.c (initialize_lookaheads): Split into...
16718 (states_lookaheads_count, states_lookaheads_initialize): these.
16719 (lalr): Adjust.
16720
16721 2002-06-15 Akim Demaille <akim@epita.fr>
16722
16723 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16724 out of...
16725 (grammar_rules_print): here.
16726 * src/reduce.c (reduce_output): Use it.
16727 * tests/reduce.at (Useless Rules, Reduced Automaton)
16728 (Underivable Rules): Adjust.
16729
16730 2002-06-15 Akim Demaille <akim@epita.fr>
16731
16732 Copy BYacc's nice way to report the grammar.
16733
16734 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16735 New.
16736 Don't print the rules' location, it is confusing and useless.
16737 (rule_print): Use grammar_rhs_print.
16738 * src/print.c (print_grammar): Use grammar_rules_print.
16739
16740 2002-06-15 Akim Demaille <akim@epita.fr>
16741
16742 Complete and rationalize `useless thing' warnings.
16743
16744 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16745 (symbol_tag_print): New.
16746 Use them everywhere in place of accessing directly the tag member.
16747 * src/gram.h, src/gram.c (rule_print): New.
16748 Use it where a rule used to be printed `by hand'.
16749 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16750 (reduce_grammar_tables): Report the useless rules.
16751 (reduce_print): Useless things are a warning, not an error.
16752 Report it as such.
16753 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16754 (Reduced Automaton, Underivable Rules): Adjust.
16755 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16756 * tests/conflicts.at (Unresolved SR Conflicts)
16757 (Solved SR Conflicts): Adjust.
16758
16759 2002-06-15 Akim Demaille <akim@epita.fr>
16760
16761 Let symbols have a location.
16762
16763 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16764 (getsym): Adjust.
16765 Adjust all callers.
16766 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16767 Use location_t, not int.
16768 * src/symtab.c (symbol_check_defined): Take advantage of the
16769 location.
16770 * tests/regression.at (Invalid inputs): Adjust.
16771
16772 2002-06-15 Akim Demaille <akim@epita.fr>
16773
16774 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16775 (input): Don't try to initialize yylloc here, do it in the
16776 scanner.
16777 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16778 * src/gram.h (rule_t): Change line and action_line into location
16779 and action_location, of location_t type.
16780 Adjust all dependencies.
16781 * src/location.h, src/location.c (empty_location): New.
16782 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16783 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16784 (grammar_current_rule_symbol_append)
16785 (grammar_current_rule_action_append): Expect a location as argument.
16786 * src/reader.c (grammar_midrule_action): Adjust to attach an
16787 action's location as dummy symbol location.
16788 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16789 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16790 the line numbers.
16791
16792 2002-06-14 Akim Demaille <akim@epita.fr>
16793
16794 Grammar declarations may be found in the grammar section.
16795
16796 * src/parse-gram.y (rules_or_grammar_declaration): New.
16797 (declarations): Each declaration may end with a semicolon, not
16798 just...
16799 (grammar_declaration): `"%union"'.
16800 (grammar): Branch to rules_or_grammar_declaration.
16801
16802 2002-06-14 Akim Demaille <akim@epita.fr>
16803
16804 * src/main.c (main): Invoke scanner_free.
16805
16806 2002-06-14 Akim Demaille <akim@epita.fr>
16807
16808 * src/output.c (m4_invoke): Extracted from...
16809 (output_skeleton): here.
16810 Free tempfile.
16811
16812 2002-06-14 Akim Demaille <akim@epita.fr>
16813
16814 * src/parse-gram.y (directives, directive, gram)
16815 (grammar_directives, precedence_directives, precedence_directive):
16816 Rename as...
16817 (declarations, declaration, grammar, grammar_declaration)
16818 (precedence_declaration, precedence_declarator): these.
16819 (symbol_declaration): New.
16820
16821 2002-06-14 Akim Demaille <akim@epita.fr>
16822
16823 * src/files.c (action_obstack): Remove, unused.
16824 (output_obstack): Remove it, and all its dependencies, as it is no
16825 longer needed.
16826 * src/reader.c (epilogue_set): Build the epilogue in the
16827 muscle_obstack.
16828 * src/output.h, src/output.c (muscle_obstack): Move to...
16829 * src/muscle_tab.h, src/muscle_tab.h: here.
16830 (muscle_init): Initialize muscle_obstack.
16831 (muscle_free): New.
16832 * src/main.c (main): Call it.
16833
16834 2002-06-14 Akim Demaille <akim@epita.fr>
16835
16836 * src/location.h: New, extracted from...
16837 * src/reader.h: here.
16838 * src/Makefile.am (noinst_HEADERS): Merge into
16839 (bison_SOURCES): this.
16840 Add location.h.
16841 * src/parse-gram.y: Use location_t instead of Bison's.
16842 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16843 Use location_t instead of ints.
16844
16845 2002-06-14 Akim Demaille <akim@epita.fr>
16846
16847 * data/bison.simple, data/bison.c++: Be sure to restore the
16848 current #line when returning to the skeleton contents after having
16849 exposed the input file's #line.
16850
16851 2002-06-12 Akim Demaille <akim@epita.fr>
16852
16853 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16854 eager.
16855 * tests/actions.at (Exotic Dollars): New.
16856
16857 2002-06-12 Akim Demaille <akim@epita.fr>
16858
16859 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16860 ['"/] too eagerly.
16861 * tests/input.at (Torturing the Scanner): New.
16862
16863 2002-06-11 Akim Demaille <akim@epita.fr>
16864
16865 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16866 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16867 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16868 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16869 * src/reader.c (reader): Use it.
16870
16871 2002-06-11 Akim Demaille <akim@epita.fr>
16872
16873 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16874 Adjust all callers.
16875 (scanner_last_string_free): New.
16876
16877 2002-06-11 Akim Demaille <akim@epita.fr>
16878
16879 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16880 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16881 (last_string, YY_OBS_FREE): New.
16882 Use them when returning an ID.
16883
16884 2002-06-11 Akim Demaille <akim@epita.fr>
16885
16886 Have Bison grammars parsed by a Bison grammar.
16887
16888 * src/reader.c, src/reader.h (prologue_augment): New.
16889 * src/reader.c (copy_definition): Remove.
16890
16891 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16892 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16893 (grammar_current_rule_prec_set, grammar_current_rule_check)
16894 (grammar_current_rule_symbol_append)
16895 (grammar_current_rule_action_append): Export.
16896 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16897 (symbol_list_action_append): Remove.
16898 Hook the routines from reader.
16899 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16900 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16901
16902 * src/reader.c (read_declarations): Remove, unused.
16903
16904 * src/parse-gram.y: Handle the epilogue.
16905 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16906 (grammar_start_symbol_set): this.
16907 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16908 * src/reader.c (readgram): Remove, unused.
16909 (reader): Adjust to insert eoftoken and axiom where appropriate.
16910
16911 * src/reader.c (copy_dollar): Replace with...
16912 * src/scan-gram.h (handle_dollar): this.
16913 * src/parse-gram.y: Remove `%thong'.
16914
16915 * src/reader.c (copy_at): Replace with...
16916 * src/scan-gram.h (handle_at): this.
16917
16918 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16919 New.
16920
16921 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16922 time being.
16923
16924 * src/reader.h, src/reader.c (grammar_rule_end): New.
16925
16926 * src/parse.y (current_type, current_class): New.
16927 Implement `%nterm', `%token' support.
16928 Merge `%term' into `%token'.
16929 (string_as_id): New.
16930 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16931 type name.
16932
16933 * src/parse-gram.y: Be sure to handle properly the beginning of
16934 rules.
16935
16936 * src/parse-gram.y: Handle %type.
16937 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16938
16939 * src/parse-gram.y: More directives support.
16940 * src/options.c: No longer handle source directives.
16941
16942 * src/parse-gram.y: Fix %output.
16943
16944 * src/parse-gram.y: Handle %union.
16945 Use the prologue locations.
16946 * src/reader.c (parse_union_decl): Remove.
16947
16948 * src/reader.h, src/reader.c (epilogue_set): New.
16949 * src/parse-gram.y: Use it.
16950
16951 * data/bison.simple, data/bison.c++: b4_stype is now either not
16952 defined, then default to int, or to the contents of %union,
16953 without `union' itself.
16954 Adjust.
16955 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16956
16957 * src/output.c (actions_output): Don't output braces, as they are
16958 already handled by the scanner.
16959
16960 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16961 characters to themselves.
16962
16963 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16964 that the epilogue has a proper #line.
16965
16966 * src/parse-gram.y: Handle precedence/associativity.
16967
16968 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16969 a terminal.
16970 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16971 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16972 at all to define terminals that cannot be emitted.
16973
16974 * src/scan-gram.l: Escape M4 characters.
16975
16976 * src/scan-gram.l: Working properly with escapes in user
16977 strings/characters.
16978
16979 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16980 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16981 grammar.
16982 Use more modest sizes, as for the time being the parser does not
16983 release memory, and therefore the process swallows a huge amount
16984 of memory.
16985
16986 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16987 stricter %token grammar.
16988
16989 * src/symtab.h (associativity): Add `undef_assoc'.
16990 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16991 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16992
16993 * tests/regression.at (Invalid %directive): Remove, as it is now
16994 meaningless.
16995 (Invalid inputs): Adjust to the new error messages.
16996 (Token definitions): The new grammar doesn't allow too many
16997 eccentricities.
16998
16999 * src/lex.h, src/lex.c: Remove.
17000 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17001 (copy_character, copy_string2, copy_string, copy_identifier)
17002 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17003 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17004 (parse_action): Remove.
17005 * po/POTFILES.in: Adjust.
17006
17007 2002-06-11 Akim Demaille <akim@epita.fr>
17008
17009 * src/reader.c (parse_action): Don't store directly into the
17010 rule's action member: return the action as a string.
17011 Don't require `rule_length' as an argument: compute it.
17012 (grammar_current_rule_symbol_append)
17013 (grammar_current_rule_action_append): New, eved out from
17014 (readgram): here.
17015 Remove `action_flag', `rulelength', unused now.
17016
17017 2002-06-11 Akim Demaille <akim@epita.fr>
17018
17019 * src/reader.c (grammar_current_rule_prec_set).
17020 (grammar_current_rule_check): New, eved out from...
17021 (readgram): here.
17022 Remove `xaction', `first_rhs': useless.
17023 * tests/input.at (Type clashes): New.
17024 * tests/existing.at (GNU Cim Grammar): Adjust.
17025
17026 2002-06-11 Akim Demaille <akim@epita.fr>
17027
17028 * src/reader.c (grammar_midrule_action): New, Eved out from
17029 (readgram): here.
17030
17031 2002-06-11 Akim Demaille <akim@epita.fr>
17032
17033 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17034 New.
17035 (readgram): Use them as replacement of inlined code, crule and
17036 crule1.
17037
17038 2002-06-11 Akim Demaille <akim@epita.fr>
17039
17040 * src/reader.c (grammar_end, grammar_symbol_append): New.
17041 (readgram): Use them.
17042 Make the use of `p' as local as possible.
17043
17044 2002-06-10 Akim Demaille <akim@epita.fr>
17045
17046 GCJ's parser requires the tokens to be defined before the prologue.
17047
17048 * data/bison.simple: Output the token definition before the user's
17049 prologue.
17050 * tests/regression.at (Braces parsing, Duplicate string)
17051 (Mixing %token styles): Check the output from bison.
17052 (Early token definitions): New.
17053
17054 2002-06-10 Akim Demaille <akim@epita.fr>
17055
17056 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17057 assigning twice the same user number to a token, so that we can
17058 use it in...
17059 * src/lex.c (lex): here.
17060 Also use `symbol_class_set' instead of hand written code.
17061 * src/reader.c (parse_assoc_decl): Likewise.
17062
17063 2002-06-10 Akim Demaille <akim@epita.fr>
17064
17065 * src/symtab.c, src/symtab.c (symbol_class_set)
17066 (symbol_user_token_number_set): New.
17067 * src/reader.c (parse_token_decl): Use them.
17068 Use a switch instead of ifs.
17069 Use a single argument.
17070
17071 2002-06-10 Akim Demaille <akim@epita.fr>
17072
17073 Remove `%thong' support as it is undocumented, unused, duplicates
17074 `%token's job, and creates useless e-mail traffic with people who
17075 want to know what it is, why it is undocumented, unused, and
17076 duplicates `%token's job.
17077
17078 * src/reader.c (parse_thong_decl): Remove.
17079 * src/options.c (option_table): Remove "thong".
17080 * src/lex.h (tok_thong): Remove.
17081
17082 2002-06-10 Akim Demaille <akim@epita.fr>
17083
17084 * src/symtab.c, src/symtab.c (symbol_type_set)
17085 (symbol_precedence_set): New.
17086 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17087 (value_components_used): Remove, unused.
17088
17089 2002-06-09 Akim Demaille <akim@epita.fr>
17090
17091 Move symbols handling code out of the reader.
17092
17093 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17094 (axiom): Move to...
17095 * src/symtab.h, src/symtab.c: here.
17096
17097 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17098 * src/reader.c (startval): Rename as...
17099 * src/symtab.h, src/symtab.c (startsymbol): this.
17100 * src/reader.c: Adjust.
17101
17102 * src/reader.c (symbol_check_defined, symbol_make_alias)
17103 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17104 (token_translations_init)
17105 Move to...
17106 * src/symtab.c: here.
17107 * src/reader.c (packsymbols): Move to...
17108 * src/symtab.h, src/symtab.c (symbols_pack): here.
17109 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17110 argument.
17111
17112 2002-06-03 Akim Demaille <akim@epita.fr>
17113
17114 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17115 then statements.
17116
17117 2002-06-03 Akim Demaille <akim@epita.fr>
17118
17119 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17120 structs with non literals.
17121 * src/scan-skel.l: never-interactive.
17122 * src/conflicts.c (enum conflict_resolution_e): No trailing
17123 comma.
17124 * src/getargs.c (usage): Split long literal strings.
17125 Reported by Hans Aberg.
17126
17127 2002-05-28 Akim Demaille <akim@epita.fr>
17128
17129 * data/bison.c++: Use C++ ostreams.
17130 (cdebug_): New member.
17131
17132 2002-05-28 Akim Demaille <akim@epita.fr>
17133
17134 * src/output.c (output_skeleton): Be sure to allocate enough room
17135 for `/' _and_ for `\0' in full_skeleton.
17136
17137 2002-05-28 Akim Demaille <akim@epita.fr>
17138
17139 * data/bison.c++: Catch up with bison.simple:
17140 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17141 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17142 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17143 and popping traces.
17144
17145 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17146
17147 * src/output.c (output_skeleton): Put an explicit path in front of
17148 the skeleton file name, rather than relying on the -I directory,
17149 to partially alleviate effects of having a skeleton file lying around
17150 in the current directory.
17151
17152 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17153
17154 * src/conflicts.c (log_resolution): Correct typo:
17155 obstack_printf should be obstack_fgrow1.
17156
17157 2002-05-26 Akim Demaille <akim@epita.fr>
17158
17159 * src/state.h (state_t): `solved_conflicts' is a new member.
17160 * src/LR0.c (new_state): Set it to 0.
17161 * src/conflicts.h, src/conflicts.c (print_conflicts)
17162 (free_conflicts, solve_conflicts): Rename as...
17163 (conflicts_print, conflicts_free, conflicts_solve): these.
17164 Adjust callers.
17165 * src/conflicts.c (enum conflict_resolution_e)
17166 (solved_conflicts_obstack): New, used by...
17167 (log_resolution): this.
17168 Adjust to attach the conflict resolution to each state.
17169 Complete the description with the precedence/associativity
17170 information.
17171 (resolve_sr_conflict): Adjust.
17172 * src/print.c (print_state): Output its solved_conflicts.
17173 * tests/conflicts.at (Unresolved SR Conflicts)
17174 (Solved SR Conflicts): Exercise --report=all.
17175
17176 2002-05-26 Akim Demaille <akim@epita.fr>
17177
17178 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17179 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17180 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17181 (token_number_t, item_number_as_token_number)
17182 (token_number_as_item_number, muscle_insert_token_number_table):
17183 Rename as...
17184 (symbol_number_t, item_number_as_symbol_number)
17185 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17186 these, since it is more appropriate.
17187
17188 2002-05-26 Akim Demaille <akim@epita.fr>
17189
17190 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17191 `Error:' lines.
17192 * data/bison.simple (yystos) [YYDEBUG]: New.
17193 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17194 error recovery.
17195 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17196
17197 2002-05-25 Akim Demaille <akim@epita.fr>
17198
17199 * doc/bison.texinfo (Debugging): Split into...
17200 (Tracing): this new section, its former contents, and...
17201 (Understanding): this new section.
17202 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17203 by...
17204 (report_flag): this.
17205 Adjust all dependencies.
17206 (report_args, report_types, report_argmatch): New.
17207 (usage, getargs): Report/support -r, --report.
17208 * src/options.h
17209 (struct option_table_struct): Rename as..,
17210 (struct option_table_s): this.
17211 Rename the `set_flag' member to `flag' to match with getopt_long's
17212 struct.
17213 * src/options.c (option_table): Split verbose into an entry for
17214 %verbose, and another for --verbose.
17215 Support --report/-r, so remove -r from the obsolete --raw.
17216 * src/print.c: Attach full item sets and lookaheads reports to
17217 report_flag instead of trace_flag.
17218 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17219
17220 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17221 and Paul Eggert <eggert@twinsun.com>
17222
17223 * data/bison.simple (yyparse): Correct error handling to conform to
17224 POSIX and yacc. Specifically, after syntax error is discovered,
17225 do not reduce further before shifting the error token.
17226 Clean up the code a bit by removing the labels yyerrdefault,
17227 yyerrhandle, yyerrpop.
17228 * NEWS: Document the above.
17229
17230 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17231
17232 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17233 type; it isn't always big enough, since it doesn't necessarily
17234 include non-terminals.
17235 (yytranslate): Expand definition of yy_token_number_type, so that
17236 the latter can be removed.
17237 (yy_token_number_type): Remove, only one use.
17238 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17239 don't use TokenNumberType as element type.
17240
17241 * tests/regression.at: Modify expected output to agree with change
17242 to yyr1 and yytranslate.
17243
17244 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17245
17246 * src/reader.c (parse_action): Use copy_character instead of
17247 obstack_1grow.
17248
17249 2002-05-13 Akim Demaille <akim@epita.fr>
17250
17251 * tests/regression.at (Token definitions): Prototype yylex and
17252 yyerror.
17253
17254 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17255
17256 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17257 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17258 32-bit arithmetic.
17259 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17260
17261 2002-05-07 Akim Demaille <akim@epita.fr>
17262
17263 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17264 avoid GCC warnings.
17265
17266 2002-05-07 Akim Demaille <akim@epita.fr>
17267
17268 Kill GCC warnings.
17269
17270 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17271 over the RHS of each rule.
17272 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17273 * src/state.h (state_t): Member `nitems' is unsigned short.
17274 * src/LR0.c (get_state): Adjust.
17275 * src/reader.c (packgram): Likewise.
17276 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17277 `Type'.
17278 (muscle_insert_int_table): Remove, unused.
17279 (prepare_rules): Remove `max'.
17280
17281 2002-05-06 Akim Demaille <akim@epita.fr>
17282
17283 * src/closure.c (print_firsts): Display of the symbol tags.
17284 (bitmatrix_print): Move to...
17285 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17286 here.
17287 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17288
17289 2002-05-06 Akim Demaille <akim@epita.fr>
17290
17291 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17292 hash_do_for_each.
17293
17294 2002-05-06 Akim Demaille <akim@epita.fr>
17295
17296 * src/LR0.c (new_state, get_state): Instead of using the global
17297 `kernel_size' and `kernel_base', have two new arguments:
17298 `core_size' and `core'.
17299 Adjust callers.
17300
17301 2002-05-06 Akim Demaille <akim@epita.fr>
17302
17303 * src/reader.c (packgram): No longer end `ritem' with a 0
17304 sentinel: it is not used.
17305
17306 2002-05-05 Akim Demaille <akim@epita.fr>
17307
17308 New experimental feature: display the lookaheads in the report and
17309 graph.
17310
17311 * src/print (print_core): When --trace-flag, display the rules
17312 lookaheads.
17313 * src/print_graph.c (print_core): Likewise.
17314 Swap the arguments.
17315 Adjust caller.
17316
17317 2002-05-05 Akim Demaille <akim@epita.fr>
17318
17319 * tests/torture.at (Many lookaheads): New test.
17320
17321 2002-05-05 Akim Demaille <akim@epita.fr>
17322
17323 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17324 (GENERATE_MUSCLE_INSERT_TABLE): this.
17325 (output_int_table, output_unsigned_int_table, output_short_table)
17326 (output_token_number_table, output_item_number_table): Replace with...
17327 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17328 (muscle_insert_short_table, muscle_insert_token_number_table)
17329 (muscle_insert_item_number_table): these.
17330 Adjust all callers.
17331 (prepare_tokens): Don't free `translations', since...
17332 * src/reader.h, src/reader.c (grammar_free): do it.
17333 Move to...
17334 * src/gram.h, src/gram.c (grammar_free): here.
17335 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17336 b4_translate_max.
17337
17338 2002-05-05 Akim Demaille <akim@epita.fr>
17339
17340 * src/output.c (output_unsigned_int_table): New.
17341 (prepare_rules): `i' is unsigned.
17342 `prhs', `rline', `r2' are unsigned int.
17343 Rename muscle `rhs_number_max' as `rhs_max'.
17344 Output muscles `prhs_max', `rline_max', and `r2_max'.
17345 Free rline and r1.
17346 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17347 to compute types instead of constant types.
17348 * tests/regression.at (Web2c Actions): Adjust.
17349
17350 2002-05-04 Akim Demaille <akim@epita.fr>
17351
17352 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17353 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17354 Adjust dependencies.
17355 * src/output.c (token_definitions_output): Be sure not to output a
17356 `#define 'a'' when fed with `%token 'a' "a"'.
17357 * tests/regression.at (Token definitions): New.
17358
17359 2002-05-03 Paul Eggert <eggert@twinsun.com>
17360
17361 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17362 for K&R C.
17363
17364 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17365
17366 * Makefile.am (SUBDIRS): Remove intl.
17367 (EXTRA_DIST): Add config/config.rpath.
17368
17369 2002-05-03 Akim Demaille <akim@epita.fr>
17370
17371 * data/bison.simple (m4_if): Don't output empty enums.
17372 And actually, output valid enum definitions :(.
17373
17374 2002-05-03 Akim Demaille <akim@epita.fr>
17375
17376 * configure.bat: Remove, completely obsolete.
17377 * Makefile.am (EXTRA_DIST): Adjust.
17378 Don't distribute config.rpath...
17379 * config/Makefile.am (EXTRA_DIST): Do it.
17380
17381 2002-05-03 Akim Demaille <akim@epita.fr>
17382
17383 * configure.in (GETTEXT_VERSION): New.
17384 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17385
17386 2002-05-03 Akim Demaille <akim@epita.fr>
17387
17388 * data/bison.simple (b4_token_enum): New.
17389 (b4_token_defines): Use it to output tokens both as #define and
17390 enums.
17391 Suggested by Paul Eggert.
17392 * src/output.c (token_definitions_output): Don't output spurious
17393 white spaces.
17394
17395 2002-05-03 Akim Demaille <akim@epita.fr>
17396
17397 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17398
17399 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17400
17401 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17402 Update the stack class, give a try to deque as the default container.
17403
17404 2002-05-02 Akim Demaille <akim@epita.fr>
17405
17406 * data/bison.simple (yyparse): Do not implement @$ = @1.
17407 (YYLLOC_DEFAULT): Adjust to do it.
17408 * doc/bison.texinfo (Location Default Action): Fix.
17409
17410 2002-05-02 Akim Demaille <akim@epita.fr>
17411
17412 * src/reader.c (parse_braces): Merge into...
17413 (parse_action): this.
17414
17415 2002-05-02 Akim Demaille <akim@epita.fr>
17416
17417 * configure.in (ALL_LINGUAS): Remove.
17418 * po/LINGUAS, hr.po: New.
17419
17420 2002-05-02 Akim Demaille <akim@epita.fr>
17421
17422 Remove the so called hairy (semantic) parsers.
17423
17424 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17425 * src/gram.h, src/gram.c (semantic_parser): Remove.
17426 (rule_t): Remove the guard and guard_line members.
17427 * src/lex.h (token_t): remove tok_guard.
17428 * src/options.c (option_table): Remove %guard and %semantic_parser
17429 support.
17430 * src/output.c, src/output.h (guards_output): Remove.
17431 (prepare): Adjust.
17432 (token_definitions_output): Don't output the `T'
17433 tokens (???).
17434 (output_skeleton): Don't output the guards.
17435 * src/files.c, src/files.c (attrsfile): Remove.
17436 * src/reader.c (symbol_list): Remove the guard and guard_line
17437 members.
17438 Adjust dependencies.
17439 (parse_guard): Remove.
17440 * data/bison.hairy: Remove.
17441 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17442 BISON_HAIRY.
17443
17444 2002-05-02 Akim Demaille <akim@epita.fr>
17445
17446 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17447 (parse_guard): Rename the formal argument `stack_offset' as
17448 `rule_length', which is more readable.
17449 Adjust callers.
17450 (copy_at, copy_dollar): Instead of outputting the hard coded
17451 values of $$, $n and so forth, output invocation to b4_lhs_value,
17452 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17453 Note: this patch partially drops `semantic-parser' support: it
17454 always does `rule_length - n', where semantic parsers ought to
17455 always use `-n'.
17456 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17457 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17458
17459 2002-05-02 Akim Demaille <akim@epita.fr>
17460
17461 * configure.in (AC_INIT): Bump to 1.49b.
17462 (AM_INIT_AUTOMAKE): Short invocation.
17463
17464 2002-05-02 Akim Demaille <akim@epita.fr>
17465
17466 Version 1.49a.
17467
17468 2002-05-01 Akim Demaille <akim@epita.fr>
17469
17470 * src/skeleton.h: Remove.
17471
17472 2002-05-01 Akim Demaille <akim@epita.fr>
17473
17474 * src/skeleton.h: Fix the #endif.
17475 Reported by Magnus Fromreide.
17476
17477 2002-04-26 Paul Eggert <eggert@twinsun.com>
17478
17479 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17480 Define if we define YYSTYPE and YYLTYPE, respectively.
17481 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17482
17483 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17484
17485 * src/scan-skel.l: Postprocess quadrigraphs.
17486
17487 * src/reader.c (copy_character): New function, used to output
17488 single characters while replacing `[' and `]' with quadrigraphs, to
17489 avoid troubles with M4 quotes.
17490 (copy_comment): Output characters with copy_character.
17491 (read_additionnal_code): Likewise.
17492 (copy_string2): Likewise.
17493 (copy_definition): Likewise.
17494
17495 * tests/calc.at: Exercise M4 quoting.
17496
17497 2002-04-25 Akim Demaille <akim@epita.fr>
17498
17499 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17500 between `!' and the command.
17501 Reported by Paul Eggert.
17502
17503 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17504
17505 * tests/calc.at: Exercise prologue splitting.
17506
17507 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17508 `b4_post_prologue' instead of `b4_prologue'.
17509
17510 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17511 muscles.
17512 (output): Free pre_prologue_obstack and post_prologue_obstack.
17513 * src/files.h, src/files.c (attrs_obstack): Remove.
17514 (pre_prologue_obstack, post_prologue_obstack): New.
17515 * src/reader.c (copy_definition): Add a parameter to specify the
17516 obstack to fill, instead of using attrs_obstack unconditionally.
17517 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17518 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17519
17520 2002-04-23 Paul Eggert <eggert@twinsun.com>
17521
17522 * data/bison.simple: Remove unnecessary commentary and white
17523 space differences from 1_29-branch.
17524 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17525
17526 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17527 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17528 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17529 constructors or destructors.
17530
17531 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17532
17533 2002-04-23 Akim Demaille <akim@epita.fr>
17534
17535 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17536 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17537 location with columns.
17538 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17539 All reported by Paul Eggert.
17540
17541 2002-04-22 Akim Demaille <akim@epita.fr>
17542
17543 * src/reduce.c (dump_grammar): Move to...
17544 * src/gram.h, src/gram.c (grammar_dump): here.
17545 Be sure to separate long item numbers.
17546 Don't read the members of a rule's prec if its nil.
17547
17548 2002-04-22 Akim Demaille <akim@epita.fr>
17549
17550 * src/output.c (table_size, table_grow): New.
17551 (MAXTABLE): Remove, replace uses with table_size.
17552 (pack_vector): Instead of dying when the table is too big, grow it.
17553
17554 2002-04-22 Akim Demaille <akim@epita.fr>
17555
17556 * data/bison.simple (yyr1): Its type is that of a token number.
17557 * data/bison.c++ (r1_): Likewise.
17558 * tests/regression.at (Web2c Actions): Adjust.
17559
17560 2002-04-22 Akim Demaille <akim@epita.fr>
17561
17562 * src/reader.c (token_translations_init): 256 is now the default
17563 value for the error token, i.e., it will be assigned another
17564 number if the user assigned 256 to one of her tokens.
17565 (reader): Don't force 256 to error.
17566 * doc/bison.texinfo (Symbols): Adjust.
17567 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17568 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17569 etc. instead of 10, 20, 30 (which was used to `jump' over error
17570 (256) and undefined (2)).
17571
17572 2002-04-22 Akim Demaille <akim@epita.fr>
17573
17574 Propagate more token_number_t.
17575
17576 * src/gram.h (token_number_as_item_number)
17577 (item_number_as_token_number): New.
17578 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17579 Use it to create output_item_number_table and
17580 output_token_number_table.
17581 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17582 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17583 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17584 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17585
17586 2002-04-22 Akim Demaille <akim@epita.fr>
17587
17588 * src/output.h, src/output.c (get_lines_number): Remove.
17589
17590 2002-04-19 Akim Demaille <akim@epita.fr>
17591
17592 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17593 as Lex/Flex'.
17594 (Debugging): More details about enabling the debugging features.
17595 (Table of Symbols): Describe $$, $n, @$, and @n.
17596 Suggested by Tim Josling.
17597
17598 2002-04-19 Akim Demaille <akim@epita.fr>
17599
17600 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17601
17602 2002-04-10 Akim Demaille <akim@epita.fr>
17603
17604 * src/system.h: Rely on HAVE_LIMITS_H.
17605 Suggested by Paul Eggert.
17606
17607 2002-04-09 Akim Demaille <akim@epita.fr>
17608
17609 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17610 full stderr, and strip it according to the bison options, instead
17611 of composing the error message from different bits.
17612 This makes it easier to check for several error messages.
17613 Adjust all the invocations.
17614 Add an invocation exercising the error token.
17615 Add an invocation demonstrating a stupid error message.
17616 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17617 Adjust the tests.
17618 Error message are for stderr, not stdout.
17619
17620 2002-04-09 Akim Demaille <akim@epita.fr>
17621
17622 * src/gram.h, src/gram.c (error_token_number): Remove, use
17623 errtoken->number.
17624 * src/reader.c (reader): Don't specify the user token number (2)
17625 for $undefined, as it uselessly prevents using it.
17626 * src/gram.h (token_number_t): Move to...
17627 * src/symtab.h: here.
17628 (state_t.number): Is a token_number_t.
17629 * src/print.c, src/reader.c: Use undeftoken->number instead of
17630 hard coded 2.
17631 (Even though this 2 is not the same as above: the number of the
17632 undeftoken remains being 2, it is its user token number which
17633 might not be 2).
17634 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17635 `user_token_number_max'.
17636 Output `undef_token_number'.
17637 * data/bison.simple, data/bison.c++: Use them.
17638 Be sure to map invalid yylex return values to
17639 `undef_token_number'. This saves us from gratuitous SEGV.
17640
17641 * tests/conflicts.at (Solved SR Conflicts)
17642 (Unresolved SR Conflicts): Adjust.
17643 * tests/regression.at (Web2c Actions): Adjust.
17644
17645 2002-04-08 Akim Demaille <akim@epita.fr>
17646
17647 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17648 Adding #line.
17649 Remove the duplicate `typedefs'.
17650 (RhsNumberType): Fix the declaration and various other typos.
17651 Use __ofile__.
17652 * data/bison.simple: Use __ofile__.
17653 * src/scan-skel.l: Handle __ofile__.
17654
17655 2002-04-08 Akim Demaille <akim@epita.fr>
17656
17657 * src/gram.h (item_number_t): New, the type of item numbers in
17658 RITEM. Note that it must be able to code symbol numbers as
17659 positive number, and the negation of rule numbers as negative
17660 numbers.
17661 Adjust all dependencies (pretty many).
17662 * src/reduce.c (rule): Remove this `short *' pointer: use
17663 item_number_t.
17664 * src/system.h (MINSHORT, MAXSHORT): Remove.
17665 Include `limits.h'.
17666 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17667 (shortcpy): Remove.
17668 (MAXTABLE): Move to...
17669 * src/output.c (MAXTABLE): here.
17670 (prepare_rules): Use output_int_table to output rhs.
17671 * data/bison.simple, data/bison.c++: Adjust.
17672 * tests/torture.at (Big triangle): Move the limit from 254 to
17673 500.
17674 * tests/regression.at (Web2c Actions): Ajust.
17675
17676 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17677 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17678 passes, but produces negative #line number, once fixed, GCC is
17679 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17680 C), it passes.
17681 * src/state.h (state_h): Code input lines on ints, not shorts.
17682
17683 2002-04-08 Akim Demaille <akim@epita.fr>
17684
17685 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17686 and then the grammar.
17687
17688 2002-04-08 Akim Demaille <akim@epita.fr>
17689
17690 * src/system.h: No longer using strndup.
17691
17692 2002-04-07 Akim Demaille <akim@epita.fr>
17693
17694 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17695 * src/output.c (output_table_data): Return the longest number.
17696 (prepare_tokens): Output `token_number_max').
17697 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17698 New.
17699 Use them to define yy_token_number_type/TokenNumberType.
17700 Use this type for yytranslate.
17701 * tests/torture.at (Big triangle): Push the limit from 124 to
17702 253.
17703 * tests/regression.at (Web2c Actions): Adjust.
17704
17705 2002-04-07 Akim Demaille <akim@epita.fr>
17706
17707 * tests/torture.at (Big triangle): New.
17708 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17709 * tests/existing.at: here.
17710
17711 2002-04-07 Akim Demaille <akim@epita.fr>
17712
17713 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17714 nritems.
17715 Adjust dependencies.
17716
17717 2002-04-07 Akim Demaille <akim@epita.fr>
17718
17719 * src/reader.c: Normalize increments to prefix form.
17720
17721 2002-04-07 Akim Demaille <akim@epita.fr>
17722
17723 * src/reader.c, symtab.c: Remove debugging code.
17724
17725 2002-04-07 Akim Demaille <akim@epita.fr>
17726
17727 Rename all the `bucket's as `symbol_t'.
17728
17729 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17730 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17731 * src/symtab.c, src/symtab.h (bucket): Rename as...
17732 (symbol_t): this.
17733 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17734 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17735 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17736 (buckets_new, buckets_free, buckets_do): Rename as...
17737 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17738 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17739 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17740 (symbols_new, symbols_free, symbols_do): these.
17741
17742 2002-04-07 Akim Demaille <akim@epita.fr>
17743
17744 Use lib/hash for the symbol table.
17745
17746 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17747 EOF.
17748 * src/lex.c (lex): Set the `number' member of new terminals.
17749 * src/reader.c (bucket_check_defined, bucket_make_alias)
17750 (bucket_check_alias_consistence, bucket_translation): New.
17751 (reader, grammar_free, readgram, token_translations_init)
17752 (packsymbols): Adjust.
17753 (reader): Number the predefined tokens.
17754 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17755 for predefined tokens.
17756 * src/symtab.h (bucket): Remove all the hash table related
17757 members.
17758 * src/symtab.c (symtab): Replace by...
17759 (bucket_table): this.
17760 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17761 (buckets_new, buckets_do): New.
17762
17763 2002-04-07 Akim Demaille <akim@epita.fr>
17764
17765 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17766 (start_symbol, max_user_token_number, semantic_parser)
17767 (error_token_number): Initialize.
17768 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17769 Initialize.
17770 (reader): Don't.
17771 (errtoken, eoftoken, undeftoken, axiom): Extern.
17772
17773 2002-04-07 Akim Demaille <akim@epita.fr>
17774
17775 * src/gram.h (rule_s): prec and precsym are now pointers
17776 to the bucket giving the priority/associativity.
17777 Member `associativity' removed: useless.
17778 * src/reduce.c, src/conflicts.c: Adjust.
17779
17780 2002-04-07 Akim Demaille <akim@epita.fr>
17781
17782 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17783 Properly escape the symbols' TAG when outputting them.
17784
17785 2002-04-07 Akim Demaille <akim@epita.fr>
17786
17787 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17788
17789 2002-04-07 Akim Demaille <akim@epita.fr>
17790
17791 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17792 (LArule): this, which is an array to rule_t*.
17793 * src/print.c, src/conflicts.c: Adjust.
17794
17795 2002-04-07 Akim Demaille <akim@epita.fr>
17796
17797 * src/gram.h (rule_t): Rename `number' as `user_number'.
17798 `number' is a new member.
17799 Adjust dependencies.
17800 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17801
17802 2002-04-07 Akim Demaille <akim@epita.fr>
17803
17804 As a result of the previous patch, it is no longer needed
17805 to reorder ritem itself.
17806
17807 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17808
17809 2002-04-07 Akim Demaille <akim@epita.fr>
17810
17811 Be sure never to walk through RITEMS, but use only data related to
17812 the rules themselves. RITEMS should be banished.
17813
17814 * src/output.c (output_token_translations): Rename as...
17815 (prepare_tokens): this.
17816 In addition to `translate', prepare the muscles `tname' and
17817 `toknum', which were handled by...
17818 (output_rule_data): this.
17819 Remove, and move the remainder of its outputs into...
17820 (prepare_rules): this new routines, which also merges content from
17821 (output_gram): this.
17822 (prepare_rules): Be sure never to walk through RITEMS.
17823 (output_stos): Rename as...
17824 (prepare_stos): this.
17825 (output): Always invoke prepare_states, after all, just don't use it
17826 in the output if you don't need it.
17827
17828 2002-04-07 Akim Demaille <akim@epita.fr>
17829
17830 * src/LR0.c (new_state): Display `nstates' as the name of the
17831 newly created state.
17832 Adjust to initialize first_state and last_state if needed.
17833 Be sure to distinguish the initial from the final state.
17834 (new_states): Create the itemset of the initial state, and use
17835 new_state.
17836 * src/closure.c (closure): Now that the initial state has its
17837 items properly set, there is no need for a special case when
17838 creating `ruleset'.
17839
17840 As a result, now the rule 0, reducing to $axiom, is visible in the
17841 outputs. Adjust the test suite.
17842
17843 * tests/conflicts.at (Solved SR Conflicts)
17844 (Unresolved SR Conflicts): Adjust.
17845 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17846 * tests/conflicts.at (S/R in initial): New.
17847
17848 2002-04-07 Akim Demaille <akim@epita.fr>
17849
17850 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17851 the RHS of the rules.
17852 * src/output.c (output_gram): Likewise.
17853
17854 2002-04-07 Akim Demaille <akim@epita.fr>
17855
17856 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17857 bucket.
17858 Adjust all dependencies.
17859 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17860 `number' of the buckets too.
17861 * src/gram.h: Include `symtab.h'.
17862 (associativity): Move to...
17863 * src/symtab.h: here.
17864 No longer include `gram.h'.
17865
17866 2002-04-07 Akim Demaille <akim@epita.fr>
17867
17868 * src/gram.h, src/gram.c (rules_rhs_length): New.
17869 (ritem_longest_rhs): Use it.
17870 * src/gram.h (rule_t): `number' is a new member.
17871 * src/reader.c (packgram): Set it.
17872 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17873 the end of `rules', and count them out of `nrules'.
17874 (reduce_output, dump_grammar): Adjust.
17875 * src/print.c (print_grammar): It is no longer needed to check for
17876 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17877 * tests/reduce.at (Reduced Automaton): New test.
17878
17879 2002-04-07 Akim Demaille <akim@epita.fr>
17880
17881 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17882 lacking `+ 1' to nrules, Bison reported as useless a token if it
17883 was used solely to set the precedence of the last rule...
17884
17885 2002-04-07 Akim Demaille <akim@epita.fr>
17886
17887 * data/bison.c++, data/bison.simple: Don't output the current file
17888 name in #line, to avoid useless diffs between two identical
17889 outputs under different names.
17890
17891 2002-04-07 Akim Demaille <akim@epita.fr>
17892
17893 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17894 Normalize loops to using `< nrules + 1', not `<= nrules'.
17895
17896 2002-04-07 Akim Demaille <akim@epita.fr>
17897
17898 * TODO: Update.
17899
17900 2002-04-07 Akim Demaille <akim@epita.fr>
17901
17902 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17903 bucket.value as bucket.number.
17904
17905 2002-04-07 Akim Demaille <akim@epita.fr>
17906
17907 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17908 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17909 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17910 RHS, instead of being an index in RITEMS.
17911
17912 2002-04-04 Paul Eggert <eggert@twinsun.com>
17913
17914 * doc/bison.texinfo: Update copyright date.
17915 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17916 (Symbols): Warn about running Bison in one character set,
17917 but compiling and/or running in an incompatible one.
17918 Warn about character code 256, too.
17919
17920 2002-04-03 Paul Eggert <eggert@twinsun.com>
17921
17922 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17923 YYERROR_VERBOSE is nonzero, not whether it is defined.
17924
17925 Merge changes from bison-1_29-branch.
17926
17927 2002-03-20 Paul Eggert <eggert@twinsun.com>
17928
17929 Merge fixes from Debian bison_1.34-1.diff.
17930
17931 * configure.in (AC_PREREQ): 2.53.
17932
17933 2002-03-20 Akim Demaille <akim@epita.fr>
17934
17935 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17936
17937 2002-03-19 Paul Eggert <eggert@twinsun.com>
17938
17939 * src/bison.simple (YYCOPY): New macro.
17940 (YYSTACK_RELOCATE): Use it.
17941 Remove Type arg; no longer needed. All callers changed.
17942 (yymemcpy): Remove; no longer needed.
17943
17944 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17945 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17946
17947 2002-03-19 Akim Demaille <akim@epita.fr>
17948
17949 Test and fix the #line outputs.
17950
17951 * tests/atlocal.at (GCC): New.
17952 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
17953 (Prologue synch line, %union synch line, Postprologue synch line)
17954 (Action synch line, Epilogue synch line): New tests.
17955 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17956 * data/bison.simple, data/bison.c++: Use it.
17957
17958 2002-03-19 Akim Demaille <akim@epita.fr>
17959
17960 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17961 (Solved SR Conflicts, %expect not enough, %expect right)
17962 (%expect too much): Move to...
17963 * tests/conflicts.at: this new file.
17964
17965 2002-03-19 Akim Demaille <akim@epita.fr>
17966
17967 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17968 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17969 that we can move to enums for instance.
17970 * src/output.c (token_definitions_output): Output a list of
17971 `token-name, token-number' instead of the #define.
17972 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17973
17974 2002-03-14 Akim Demaille <akim@epita.fr>
17975
17976 Use Gettext 0.11.1.
17977
17978 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
17979
17980 * data/bison.c++: Make the user able to add members to the generated
17981 parser by subclassing.
17982
17983 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
17984
17985 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17986 a character.
17987 Reported by Nicolas Tisserand and Nicolas Burrus.
17988
17989 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17990
17991 * src/reader.c: Warn about lacking semi-colons, do not complain.
17992
17993 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17994
17995 * data/bison.c++: Remove a debug line.
17996
17997 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17998
17999 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18000 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18001 provide a default implementation.
18002
18003 2002-03-04 Akim Demaille <akim@epita.fr>
18004
18005 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18006 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18007 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18008 * tests/semantic.at (Parsing Guards): Similarly.
18009 * src/reader.at (readgram): Complain if the last rule is not ended
18010 with a semi-colon.
18011
18012 2002-03-04 Akim Demaille <akim@epita.fr>
18013
18014 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18015 * src/closure.c: here.
18016 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18017 RTC.
18018 * src/warshall.h, src/warshall.c: Remove.
18019 * tests/sets.at (Broken Closure): Adjust.
18020
18021 2002-03-04 Akim Demaille <akim@epita.fr>
18022
18023 * src/output.c (output_skeleton): tempdir is const.
18024 bytes_read is unused.
18025
18026 2002-03-04 Akim Demaille <akim@epita.fr>
18027
18028 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18029 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18030 Update.
18031 From Michael Hayes.
18032
18033 2002-03-04 Akim Demaille <akim@epita.fr>
18034
18035 * src/closure.c (closure): `r' is unused.
18036
18037 2002-03-04 Akim Demaille <akim@epita.fr>
18038
18039 * tests/sets.at (Broken Closure): Add the ending `;'.
18040 * src/reader.at (readgram): Complain if a rule is not ended with a
18041 semi-colon.
18042
18043 2002-03-04 Akim Demaille <akim@epita.fr>
18044
18045 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18046 (count_sr_conflicts): Use bitset_count.
18047 * src/reduce.c (inaccessable_symbols): Ditto.
18048 (bits_size): Remove.
18049 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18050
18051 2002-03-04 Akim Demaille <akim@epita.fr>
18052
18053 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18054 * src/reduce.c: Remove the `bitset_zero's following the
18055 `bitset_create's, as now it is performed by the latter.
18056
18057 2002-03-04 Akim Demaille <akim@epita.fr>
18058
18059 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18060 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18061 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18062 latest sources from Michael.
18063
18064 2002-03-04 Akim Demaille <akim@epita.fr>
18065
18066 * src/output.c (output): Don't free the grammar.
18067 * src/reader.c (grammar_free): New.
18068 * src/main.c (main): Call it and don't free symtab here.
18069
18070 2002-03-04 Akim Demaille <akim@epita.fr>
18071
18072 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18073 before returning.
18074 Reported by Benoit Perrot.
18075
18076 2002-03-04 Akim Demaille <akim@epita.fr>
18077
18078 Use bitset operations when possible, not loops over bits.
18079
18080 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18081 bitset_or.
18082 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18083 * src/reduce.c (useless_nonterminals): Formatting changes.
18084 * src/warshall.c (TC): Use bitset_or.
18085
18086 2002-03-04 Akim Demaille <akim@epita.fr>
18087
18088 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18089 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18090 Ditto.
18091
18092 2002-03-04 Akim Demaille <akim@epita.fr>
18093
18094 * src/lalr.c (F): Now a bitset*.
18095 Adjust all dependencies.
18096
18097 2002-03-04 Akim Demaille <akim@epita.fr>
18098
18099 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18100 Adjust all dependencies.
18101
18102 2002-03-04 Akim Demaille <akim@epita.fr>
18103
18104 * src/L0.c, src/LR0.h (nstates): Be size_t.
18105 Adjust comparisons (signed vs unsigned).
18106 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18107 bitset*.
18108 Adjust all dependencies.
18109
18110 2002-03-04 Akim Demaille <akim@epita.fr>
18111
18112 * src/closure.c (firsts): Now, also a bitset.
18113 Adjust all dependencies.
18114 (varsetsize): Remove, now unused.
18115 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18116
18117 2002-03-04 Akim Demaille <akim@epita.fr>
18118
18119 * src/print.c: Convert to use bitset.h, not hand coded iterations
18120 over ints.
18121
18122 2002-03-04 Akim Demaille <akim@epita.fr>
18123
18124 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18125
18126 2002-03-04 Akim Demaille <akim@epita.fr>
18127
18128 * src/closure.c (ruleset): Be a bitset.
18129 (rulesetsize): Remove.
18130
18131 2002-03-04 Akim Demaille <akim@epita.fr>
18132
18133 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18134 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18135 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18136 * src/closure.c (fderives): Be an array of bitsets.
18137
18138 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
18139
18140 * data/bison.c++: Merge the two generated headers. Insert a copyright
18141 notice in each output file.
18142
18143 2002-02-28 Akim Demaille <akim@epita.fr>
18144
18145 * data/bison.c++: Copy the prologue of bison.simple to fetch
18146 useful M4 definitions, such as b4_header_guard.
18147
18148 2002-02-25 Akim Demaille <akim@epita.fr>
18149
18150 * src/getargs.c (version): Give the name of the authors, and use a
18151 translator friendly scheme for the bgr
18152 copyright notice.
18153
18154 2002-02-25 Akim Demaille <akim@epita.fr>
18155
18156 * src/output.c (header_output): Remove, now handled completely via
18157 M4.
18158
18159 2002-02-25 Akim Demaille <akim@epita.fr>
18160
18161 * m4/m4.m4: New, from CVS Autoconf.
18162 * configure.in: Invoke it.
18163 * src/output.c (output_skeleton): Use its result instead of the
18164 hard coded name.
18165
18166 2002-02-25 Akim Demaille <akim@epita.fr>
18167
18168 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18169 Fileutils 4.1.5.
18170 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18171 * src/output.c (output_skeleton): Use mkstemp to create a real
18172 temporary file.
18173 Move the filling of `skeleton' and its muscle to...
18174 (prepare): here.
18175 (output): Move the definition of the prologue muscle to...
18176 (prepare): here.
18177 * src/system.h (DEFAULT_TMPDIR): New.
18178
18179 2002-02-14 Paul Eggert <eggert@twinsun.com>
18180
18181 Remove the support for C++ namespace cleanliness; it was
18182 causing more problems than it was curing, since it didn't work
18183 properly on some nonstandard C++ compilers. This can wait
18184 for a proper C++ parser.
18185
18186 * NEWS: Document this.
18187 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18188 of C++, as it's treated like C now.
18189 * src/bison.simple (YYSTD): Remove.
18190 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18191 Treat C++ just like Standard C instead of trying to support
18192 namespace cleanliness.
18193
18194 2002-02-14 Akim Demaille <akim@epita.fr>
18195
18196 * tests/regression.at (else): Adjust to Andreas' change.
18197
18198 2002-02-14 Akim Demaille <akim@epita.fr>
18199
18200 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18201
18202 2002-02-13 Andreas Schwab <schwab@suse.de>
18203
18204 * src/output.c (output_rule_data): Don't output NULL, it might
18205 not be defined yet.
18206
18207 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
18208
18209 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18210 (Copyright notice): Update.
18211
18212 2002-02-11 Akim Demaille <akim@epita.fr>
18213
18214 * tests/regression.at (%nonassoc and eof): Don't include
18215 nonportable headers.
18216
18217 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
18218
18219 * data/bison.c++: Correct error recovery. Make the user able to
18220 initialize the starting location.
18221
18222 2002-02-07 Akim Demaille <akim@epita.fr>
18223
18224 * tests/input.at: New.
18225
18226 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18227
18228 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18229 more consistent when naming methods and variables. Put preprocessor
18230 directives around tables only needed for debugging.
18231
18232 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18233
18234 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18235 C++ parsers.
18236 (yy::b4_name::parse): Use print_.
18237
18238 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18239
18240 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18241
18242 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18243
18244 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18245 C++ parsers.
18246 (yy::b4_name::parse): Build verbose error messages, and use error_.
18247
18248 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18249
18250 * data/bison.c++: Fix m4 quoting in comments.
18251
18252 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18253
18254 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18255 not expanded by m4.
18256
18257 2002-02-05 Akim Demaille <akim@epita.fr>
18258
18259 * data/bison.c++: Adjust to the M4 back end.
18260 More is certainly needed.
18261
18262 2002-02-05 Akim Demaille <akim@epita.fr>
18263
18264 Give a try to M4 as a back end.
18265
18266 * lib/readpipe.c: New, from wdiff.
18267 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18268 BISON_HAIRY.
18269 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18270 specific values. Now it is m4 that performs the lookup.
18271 * src/parse-skel.y: Remove.
18272 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18273 * src/output.c (actions_output, guards_output)
18274 (token_definitions_output): No longer keeps track of the output
18275 line number, hence remove the second argument.
18276 (guards_output): Check against the guard member of a rule, not the
18277 action member.
18278 Adjust callers.
18279 (output_skeleton): Don't look for the skeleton location, let m4 do
18280 that.
18281 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18282 file will be used.
18283 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18284 (prepare): Given that for the time being changesyntax is not
18285 usable in M4, rename the muscles using `-' to `_'.
18286 Define `defines_flag', `output_parser_name' and `output_header_name'.
18287 * src/output.h (actions_output, guards_output)
18288 (token_definitions_output): Adjust prototypes.
18289 * src/scan-skel.l: Instead of scanning the skeletons, it now
18290 processes the output of m4: `__oline__' and `#output'.
18291 * data/bison.simple: Adjust to be used by M4(sugar).
18292 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18293 to date.
18294 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18295 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18296 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18297 shamelessly stolen from CVS Autoconf.
18298
18299 2002-02-05 Akim Demaille <akim@epita.fr>
18300
18301 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18302 * configure.in: Check for the declarations of free and malloc.
18303 * src/muscle_tab.c: Adjust.
18304
18305 2002-02-05 Akim Demaille <akim@epita.fr>
18306
18307 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18308 which have no values.
18309
18310 2002-02-05 Akim Demaille <akim@epita.fr>
18311
18312 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18313 * data/: here.
18314
18315 2002-01-29 Paul Eggert <eggert@twinsun.com>
18316
18317 * src/bison.simple (YYSIZE_T): Do not define merely because
18318 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18319 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18320
18321 2002-01-27 Akim Demaille <akim@epita.fr>
18322
18323 Fix `%nonassoc and eof'.
18324
18325 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18326 which were not properly copied! Replace
18327 memcpy (res->errs, src->errs, src->nerrs);
18328 with
18329 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18330 !!!
18331 * tests/regression.at (%nonassoc and eof): Adjust to newest
18332 Autotest: `.' is not in the PATH.
18333
18334 2002-01-27 Akim Demaille <akim@epita.fr>
18335
18336 * tests/sets.at (AT_EXTRACT_SETS): New.
18337 (Nullable): Use it.
18338 (Firsts): New.
18339
18340 2002-01-26 Akim Demaille <akim@epita.fr>
18341
18342 * tests/actions.at, tests/calc.at, tests/headers.at,
18343 * tests/torture.at: Adjust to the newest Autotest which no longer
18344 forces `.' in the PATH.
18345
18346 2002-01-25 Akim Demaille <akim@epita.fr>
18347
18348 * tests/regression.at (%nonassoc and eof): New.
18349 Suggested by Robert Anisko.
18350
18351 2002-01-24 Akim Demaille <akim@epita.fr>
18352
18353 Bison dumps core when trying to complain about broken input files.
18354 Reported by Cris van Pelt.
18355
18356 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18357 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18358 into...
18359 (Invalid inputs): Strengthen: exercise parse_percent_token.
18360
18361 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18362
18363 * src/Makefile.am: Add bison.c++.
18364 * src/bison.c++: New skeleton.
18365
18366 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18367
18368 * po/it.po: New.
18369
18370 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18371
18372 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18373
18374 2002-01-20 Marc Autret <marc@gnu.org>
18375
18376 * src/files.c (compute_output_file_names): Fix
18377
18378 2002-01-20 Marc Autret <marc@gnu.org>
18379
18380 * tests/output.at: New test.
18381 * src/files.c (compute_base_names): Don't map extensions when
18382 the YACC flag is set, use defaults.
18383 Reported by Evgeny Stambulchik.
18384
18385 2002-01-20 Marc Autret <marc@gnu.org>
18386
18387 * src/system.h: Need to define __attribute__ away for non-GCC
18388 compilers as well (i.e., the vendor C compiler).
18389 Suggested by Albert Chin-A-Young.
18390
18391 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18392
18393 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18394 canonical definition.
18395 * src/system.h: Use the canonical definition for PARAMS (avoids
18396 a conflict with the macro from lib/hash.h).
18397
18398 2002-01-11 Akim Demaille <akim@epita.fr>
18399
18400 * configure.in: Use AC_FUNC_STRNLEN.
18401 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18402
18403 2002-01-09 Akim Demaille <akim@epita.fr>
18404
18405 * src/files.c, src/files.h (output_infix): New.
18406 (tab_extension): Remove.
18407 (compute_base_names): Compute the former, drop the latter.
18408 * src/output.c (prepare): Insert the muscles `output-infix', and
18409 `output-suffix'.
18410 * src/parse-skel.y (string, string.1): New.
18411 (section.header): Use it.
18412 (section.yacc): Remove.
18413 (prefix): Remove too.
18414 * src/scan-skel.l: Adjust.
18415 * src/bison.simple, src/bison.hairy: Adjust.
18416
18417 2002-01-09 Akim Demaille <akim@epita.fr>
18418
18419 * configure.in (WERROR_CFLAGS): Compute it.
18420 * src/Makefile.am (CFLAGS): Pass it.
18421 * tests/atlocal.in (CFLAGS): Idem.
18422 * src/files.c: Fix a few warnings.
18423 (get_extension_index): Remove, unused.
18424
18425 2002-01-08 Akim Demaille <akim@epita.fr>
18426
18427 * src/getargs.c (AS_FILE_NAME): New.
18428 (getargs): Use it to convert DOSish file names.
18429 * src/files.c (base_name): Rename as full_base_name to avoid
18430 clashes with `base_name ()'.
18431 (filename_split): New.
18432 (compute_base_names): N-th rewrite, using filename_split.
18433
18434 2002-01-08 Akim Demaille <akim@epita.fr>
18435
18436 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18437 New, stolen from the Fileutils 4.1.
18438 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18439 * configure.in: Check for the presence of memrchr, and of its
18440 prototype.
18441
18442 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18443
18444 * lib/hash.h (__P): Added definition for this macro.
18445 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18446 BUILT_SOURCES, to ensure they are generated first.
18447 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18448 %error-verbose to allow bootstrapping with bison 1.30x.
18449
18450 2002-01-06 Akim Demaille <akim@epita.fr>
18451
18452 * src/reader.c (parse_braces): Don't fetch the next char, the
18453 convention is to fetch on entry.
18454 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18455 'switch' without a following semicolon.
18456 * tests/regression.at (braces parsing): New.
18457
18458 2002-01-06 Akim Demaille <akim@epita.fr>
18459
18460 Bison is dead wrong in its RR conflict reports.
18461
18462 * tests/torture.at (GNU Cim Grammar): New.
18463 * src/conflicts.c (count_rr_conflicts): Fix.
18464
18465 2002-01-06 Akim Demaille <akim@epita.fr>
18466
18467 Creating package.m4 from configure.ac causes too many problems.
18468
18469 * tests/Makefile.am (package.m4): Create it by hand,
18470 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18471
18472 2002-01-06 Akim Demaille <akim@epita.fr>
18473
18474 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18475 skeleton.h.
18476
18477 2002-01-04 Paul Eggert <eggert@twinsun.com>
18478
18479 * doc/bison.texinfo (Debugging):
18480 Remove YYSTDERR; it's no longer defined or used.
18481 Also, s/cstdio.h/cstdio/.
18482
18483 2002-01-03 Akim Demaille <akim@epita.fr>
18484
18485 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18486
18487 2002-01-03 Akim Demaille <akim@epita.fr>
18488
18489 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18490 tracing code to --trace, wait for a better --trace option, with
18491 args.
18492
18493 2002-01-03 Akim Demaille <akim@epita.fr>
18494
18495 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18496 The ISO C++ standard is extremely clear about it: stderr is
18497 considered a macro, not a regular symbol (see table 94 `Header
18498 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18499 Therefore std:: does not apply to it. It still does with fprintf.
18500 Also, s/cstdio.h/cstdio/.
18501
18502 2002-01-03 Akim Demaille <akim@epita.fr>
18503
18504 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18505 for non system headers.
18506
18507 2002-01-02 Akim Demaille <akim@epita.fr>
18508
18509 Equip the skeleton chain with location tracking, runtime trace,
18510 pure parser and scanner.
18511
18512 * src/parse-skel.y: Request a pure parser, locations, and prefix
18513 renaming.
18514 (%union): Having several members with the same type does not help
18515 type mismatches, simplify.
18516 (YYPRINT, yyprint): New.
18517 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18518 (skel_error): this.
18519 Handle locations.
18520 * src/scan-skel.l: Adjust to these changes.
18521 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18522 (LOCATION_PRINT, skel_control_t): New.
18523
18524 2001-12-30 Akim Demaille <akim@epita.fr>
18525
18526 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18527 replace `gb' with BLANKS.
18528 * src/scan-skel.l: Adjust.
18529
18530 2001-12-30 Akim Demaille <akim@epita.fr>
18531
18532 * src/system.h: We don't need nor want bcopy.
18533 Throw away MS-DOS crap: we don't need getpid.
18534 * configure.in: We don't need strndup. It was even causing
18535 problems: because Flex includes the headers *before* us,
18536 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18537 not visible.
18538 * lib/xstrndup.c: New.
18539 * src/scan-skel.l: Use it.
18540 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18541 * src/parse-skel.y: Use %directives instead of #defines.
18542
18543 2001-12-30 Akim Demaille <akim@epita.fr>
18544
18545 * src/skeleton.h: New.
18546 * src/output.c (output_parser, output_master_parser): Remove, dead
18547 code.
18548 * src/output.h (get_lines_number, actions_output, guards_output)
18549 (token_definitions_output): Prototype them.
18550 * src/parse-skel.y: Add the license notice.
18551 Include output.h and skeleton.h.
18552 (process_skeleton): Returns void, and takes a single parameter.
18553 * src/scan-skel.l: Add the license notice.
18554 Include skeleton.h.
18555 Don't use %option yylineno: it seems that then Flex imagines
18556 REJECT has been used, and therefore it won't reallocate its
18557 buffers (which makes no other sense to me than a bug). It results
18558 in warnings for `unused: yy_flex_realloc'.
18559
18560 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
18561
18562 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18563 (MUSCLE_INSERT_PREFIX): ...to there.
18564 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18565 (MUSCLE_INSERT_PREFIX): Move from here...
18566
18567 * src/bison.hairy: Add a section directive. Put braces around muscle
18568 names. This parser skeleton is still broken, but Bison should not
18569 choke on a bad muscle 'syntax'.
18570 * src/bison.simple: Add a section directive. Put braces around muscle
18571 names.
18572
18573 * src/files.h (strsuffix, stringappend): Add declarations.
18574 (tab_extension): Add declaration.
18575 (short_base_name): Add declaration.
18576
18577 * src/files.c (strsuffix, stringappend): No longer static. These
18578 functions are used in the skeleton parser.
18579 (tab_extension): New.
18580 (compute_base_names): Use the computations done in this function
18581 to guess if the generated parsers should have '.tab' in their
18582 names.
18583 (short_base_name): No longer static.
18584
18585 * src/output.c (output_skeleton): New.
18586 (output): Disable call to output_master_parser, and give a try to
18587 a new skeleton handling system.
18588 (guards_output, actions_output): No longer static.
18589 (token_definitions_output, get_lines_number): No longer static.
18590
18591 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18592
18593 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18594 parse-skel.y.
18595
18596 * src/parse-skel.y: New file.
18597 * src/scan-skel.l: New file.
18598
18599 2001-12-29 Akim Demaille <akim@epita.fr>
18600
18601 %name-prefix is broken.
18602
18603 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18604 Adjust all dependencies.
18605 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18606 %name-prefix.
18607
18608 Renaming yylval but not yylloc is not consistent. Now we do.
18609
18610 * src/bison.simple: Prefix yylloc if used.
18611 * doc/bison.texinfo (Decl Summary): Document that.
18612
18613 2001-12-29 Akim Demaille <akim@epita.fr>
18614
18615 * doc/bison.texinfo: Promote `%long-directive' over
18616 `%long_directive'.
18617 Remove all references to fixed-output-files, yacc is enough.
18618
18619 2001-12-29 Akim Demaille <akim@epita.fr>
18620
18621 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18622 user prologue. These are defaults.
18623 * tests/actions.at (Mid-rule actions): Make sure the user can
18624 define YYDEBUG and YYERROR_VERBOSE.
18625
18626 2001-12-29 Akim Demaille <akim@epita.fr>
18627
18628 * src/output.c (header_output): Don't forget to export YYLTYPE and
18629 yylloc.
18630 * tests/headers.at (export YYLTYPE): New, make sure it does.
18631 * tests/regression.at (%union and --defines, Invalid CPP headers):
18632 Move to...
18633 * tests/headers.at: here.
18634
18635 2001-12-29 Akim Demaille <akim@epita.fr>
18636
18637 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18638
18639 2001-12-29 Akim Demaille <akim@epita.fr>
18640
18641 * tests/actions.at (Mid-rule actions): Output on a single line
18642 instead of several.
18643
18644 2001-12-29 Akim Demaille <akim@epita.fr>
18645
18646 * doc/bison.texinfo: Formatting changes.
18647
18648 2001-12-29 Akim Demaille <akim@epita.fr>
18649
18650 Don't store the token defs in a muscle, just be ready to output it
18651 on command. Now possible via `symbols'. Fixes a memory leak.
18652
18653 * src/output.c (token_definitions_output): New.
18654 (output_parser, header_output): Use it.
18655 * src/reader.c (symbols_save): Remove.
18656
18657 2001-12-29 Akim Demaille <akim@epita.fr>
18658
18659 * src/bison.simple: Do not provide a default for YYSTYPE and
18660 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18661 default.
18662
18663 2001-12-29 Akim Demaille <akim@epita.fr>
18664
18665 Mid-rule actions are simply... ignored!
18666
18667 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18668 the empty-rule associated to the dummy symbol, not to the host
18669 rule.
18670 * tests/actions.at (Mid-rule actions): New.
18671
18672 2001-12-29 Akim Demaille <akim@epita.fr>
18673
18674 Memory leak.
18675
18676 * src/reader.c (reader): Free grammar.
18677
18678 2001-12-29 Akim Demaille <akim@epita.fr>
18679
18680 Memory leak.
18681
18682 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18683 since it allocates it for each state, although only one is needed.
18684 (allocate_storage): Do it here.
18685
18686 2001-12-29 Akim Demaille <akim@epita.fr>
18687
18688 * src/options.h, src/options.c (create_long_option_table): Rename
18689 as...
18690 (long_option_table_new): this, with a clearer prototype.
18691 (percent_table): Remove, unused,
18692 * src/getargs.c (getargs): Adjust.
18693
18694 2001-12-29 Akim Demaille <akim@epita.fr>
18695
18696 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18697 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18698 as states.
18699
18700 2001-12-29 Akim Demaille <akim@epita.fr>
18701
18702 * src/lalr.c (build_relations): Rename `states' as `states1'.
18703 Sorry, I don't understand exactly what it is, no better name...
18704
18705 2001-12-29 Akim Demaille <akim@epita.fr>
18706
18707 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18708 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18709 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18710 as rules.
18711
18712 2001-12-29 Akim Demaille <akim@epita.fr>
18713
18714 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18715 ago.
18716
18717 2001-12-29 Akim Demaille <akim@epita.fr>
18718
18719 * src/reader.c, src/reader.h (user_toknums): Remove.
18720 Adjust all users to use symbols[i]->user_token_number.
18721
18722 2001-12-29 Akim Demaille <akim@epita.fr>
18723
18724 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18725 Adjust all users to use symbols[i]->prec or ->assoc.
18726
18727 2001-12-29 Akim Demaille <akim@epita.fr>
18728
18729 * src/reader.c, src/reader.h (tags): Remove.
18730 Adjust all users to use symbols[i]->tag.
18731
18732 2001-12-29 Akim Demaille <akim@epita.fr>
18733
18734 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18735 and rule_table.
18736 * src/reader.c (packsymbols): Fill this table.
18737 Drop sprec.
18738 * src/conflicts.c (resolve_sr_conflict): Adjust.
18739 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18740 single table.
18741 Use symbols[i]->tag instead of tags[i].
18742
18743 2001-12-29 Akim Demaille <akim@epita.fr>
18744
18745 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18746 In addition, put a comment in there, to replace...
18747 * tests/regression.at (%union and C comments): Remove.
18748
18749 2001-12-29 Akim Demaille <akim@epita.fr>
18750
18751 * tests/regression.at (Web2c Actions): Blindly move the actual
18752 output as expected output. The contents *seem* right to me, but I
18753 can't pretend reading perfectly parser tables... Nonetheless, all
18754 the other tests pass correctly, the table look OK, even though the
18755 presence of `$axiom' is to be noted: AFAICS it is useless (but
18756 harmless).
18757
18758 2001-12-29 Akim Demaille <akim@epita.fr>
18759
18760 * src/reader.c (readgram): Don't add the rule 0 if there were no
18761 rules read. In other words, add it _after_ having performed
18762 grammar sanity checks.
18763 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18764
18765 2001-12-29 Akim Demaille <akim@epita.fr>
18766
18767 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18768 visible, and some states have now a different number.
18769
18770 2001-12-29 Akim Demaille <akim@epita.fr>
18771
18772 * src/reader.c (readgram): Bind the initial rule's lineno to that
18773 of the first rule.
18774 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18775 (Solved SR Conflicts): Adjust rule 0's line number.
18776
18777 2001-12-29 Akim Demaille <akim@epita.fr>
18778
18779 Fix the `GAWK Grammar' failure.
18780
18781 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18782 the reductions of the first state which was mistakenly confused
18783 with the final state because precisely final_state was initialized
18784 to 0.
18785 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18786 now noticed by Bison.
18787 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18788 have a reduction on $default.
18789
18790 2001-12-29 Akim Demaille <akim@epita.fr>
18791
18792 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18793 rule line numbers.
18794 * src/closure.c (print_closure): Likewise.
18795 * src/derives.c (print_derives): Likewise.
18796 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18797 now.
18798
18799 2001-12-29 Akim Demaille <akim@epita.fr>
18800
18801 * src/lalr.c (lookaheads_print): New.
18802 (lalr): Call it when --trace-flag.
18803 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18804 are dumped.
18805
18806 2001-12-29 Akim Demaille <akim@epita.fr>
18807
18808 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18809 when walking through ritem, even via rule->rhs.
18810 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18811 (useful_production, useless_nonterminals): Likewise.
18812 (reduce_grammar_tables): Likewise, plus update nritems.
18813 * src/nullable.c (set_nullable): Likewise.
18814 * src/lalr.c (build_relations): Likewise.
18815 * tests/sets.at (Nullable): Adjust.
18816 Fortunately, now, the $axiom is no longer nullable.
18817
18818 2001-12-29 Akim Demaille <akim@epita.fr>
18819
18820 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18821 the 0-sentinel.
18822 * src/gram.c (ritem_longest_rhs): Likewise.
18823 * src/reduce.c (nonterminals_reduce): Likewise.
18824 * src/print_graph.c (print_graph): Likewise.
18825 * src/output.c (output_rule_data): Likewise.
18826 * src/nullable.c (set_nullable): Likewise.
18827
18828 2001-12-29 Akim Demaille <akim@epita.fr>
18829
18830 * src/output.c: Comment changes.
18831
18832 2001-12-27 Paul Eggert <eggert@twinsun.com>
18833
18834 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18835 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18836 Sparc, as they were causing more porting problems than the
18837 (minor) performance improvement was worth.
18838
18839 Also, catch up with 1.31's YYSTD.
18840
18841 2001-12-27 Akim Demaille <akim@epita.fr>
18842
18843 * src/output.c (output_gram): Rely on nritems, not the
18844 0-sentinel. See below.
18845 Use -1 as separator, not 0.
18846 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18847 Rely on -1 as separator in yyrhs, instead of 0.
18848 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18849 twice `Now at end of input', therefore there are two lines less to
18850 expect.
18851
18852 2001-12-27 Akim Demaille <akim@epita.fr>
18853
18854 * tests/regression.at (Unresolved SR Conflicts):
18855 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18856 below.
18857
18858 2001-12-27 Akim Demaille <akim@epita.fr>
18859
18860 * src/LR0.c (new_state): Recognize the final state by the fact it
18861 is reached by eoftoken.
18862 (insert_start_shifting_state, insert_eof_shifting_state)
18863 (insert_accepting_state, augment_automaton): Remove, since now
18864 these states are automatically computed from the initial state.
18865 (generate_states): Adjust.
18866 * src/print.c: When reporting a rule number to the user, substract
18867 1, so that the axiom rule is rule 0, and the first user rule is 1.
18868 * src/reduce.c: Likewise.
18869 * src/print_graph.c (print_core): For the time being, just as for
18870 the report, depend upon --trace-flags to dump the full set of
18871 items.
18872 * src/reader.c (readgram): Once the grammar read, insert the rule
18873 0: `$axiom: START-SYMBOL $'.
18874 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18875 number of the states has changed (the final state is no longer
18876 necessarily the last), catch up.
18877
18878 2001-12-27 Akim Demaille <akim@epita.fr>
18879
18880 Try to make the use of the eoftoken valid. Given that its value
18881 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18882 is used instead of > 0 where appropriate, (ii), depend upon nritems
18883 instead of the 0-sentinel.
18884
18885 * src/gram.h, src/gram.c (nritems): New.
18886 Expected to be duplication of nitems, but for the time being...
18887 * src/reader.c (packgram): Assert nritems and nitems are equal.
18888 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18889 * src/closure.c (print_closure, print_fderives): Likewise.
18890 * src/gram.c (ritem_print): Likewise.
18891 * src/print.c (print_core, print_grammar): Likewise.
18892 * src/print_graph.c: Likewise.
18893
18894 2001-12-27 Akim Demaille <akim@epita.fr>
18895
18896 * src/main.c (main): If there are complains after grammar
18897 reductions, then output the report anyway if requested, then die.
18898 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18899 * src/reader.c (eoftoken): New.
18900 (parse_token_decl): If the token being defined has value `0', it
18901 is the eoftoken.
18902 (packsymbols): No longer hack `tags' to insert `$' by hand.
18903 Be sure to preserve the value of the eoftoken.
18904 (reader): Make sure eoftoken is defined.
18905 Initialize nsyms to 0: now eoftoken is created just like the others.
18906 * src/print.c (print_grammar): Don't special case the eof token.
18907 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18908 lie anyway, albeit pleasant.
18909 * tests/calc.at: Exercise error messages with eoftoken.
18910 Change the grammar so that empty input is invalid.
18911 Adjust expectations.
18912 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18913
18914 2001-12-27 Akim Demaille <akim@epita.fr>
18915
18916 * configure.in: Check the protos of strchr ans strspn.
18917 Replace strchr if needed.
18918 * src/system.h: Provide the protos of strchr, strspn and memchr if
18919 missing.
18920 * lib/strchr.c: New.
18921 * src/reader.c (symbols_save): Use strchr.
18922
18923 2001-12-27 Akim Demaille <akim@epita.fr>
18924
18925 * src/print.c, src/print_graph.c (escape): New.
18926 Use it to quote the TAGS outputs.
18927 * src/print_graph.c (print_state): Now errors are in red, and
18928 reductions in green.
18929 Prefer high to wide: output the state number on a line of its own.
18930
18931 2001-12-27 Akim Demaille <akim@epita.fr>
18932
18933 * src/state.h, src/state.c (reductions_new): New.
18934 * src/LR0.c (set_state_table): Let all the states have a
18935 `reductions', even if reduced to 0.
18936 (save_reductions): Adjust.
18937 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18938 * src/print.c (print_reductions, print_actions): Adjust.
18939 * src/output.c (action_row): Adjust.
18940
18941 2001-12-27 Akim Demaille <akim@epita.fr>
18942
18943 * src/state.h, src/state.c (errs_new, errs_dup): New.
18944 * src/LR0.c (set_state_table): Let all the states have an errs,
18945 even if reduced to 0.
18946 * src/print.c (print_errs, print_reductions): Adjust.
18947 * src/output.c (output_actions, action_row): Adjust.
18948 * src/conflicts.c (resolve_sr_conflict): Adjust.
18949
18950 2001-12-27 Akim Demaille <akim@epita.fr>
18951
18952 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18953
18954 2001-12-27 Akim Demaille <akim@epita.fr>
18955
18956 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18957 * src/print.c: here.
18958 (lookaheadset, shiftset): New, used as additional storage by
18959 print_reductions.
18960 (print_results): Adjust.
18961 (print_shifts, print_gotos, print_errs): New, extracted from...
18962 (print_actions): here.
18963 * src/print_graph.c (print_actions): Remove dead code.
18964
18965 2001-12-27 Akim Demaille <akim@epita.fr>
18966
18967 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18968 `$n' and `@n'.
18969
18970 2001-12-27 Akim Demaille <akim@epita.fr>
18971
18972 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18973 (build_relations): Adjust.
18974
18975 2001-12-27 Akim Demaille <akim@epita.fr>
18976
18977 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18978 duplication.
18979
18980 2001-12-27 Akim Demaille <akim@epita.fr>
18981
18982 * src/reader.c (packgram): Catch nitems overflows.
18983
18984 2001-12-27 Akim Demaille <akim@epita.fr>
18985
18986 * src/files.c, src/files.h (guard_obstack): Remove.
18987 * src/output.c (output): Adjust.
18988 * src/reader.c (parse_braces): New, factoring...
18989 (copy_action, copy_guard): these two which are renamed as...
18990 (parse_action, parse_guard): these.
18991 As a voluntary consequence, using braces around guards is now
18992 mandatory.
18993
18994 2001-12-27 Akim Demaille <akim@epita.fr>
18995
18996 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18997 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18998 members.
18999 (symbol_list_new): Adjust.
19000 (copy_action): action_line is the first line, not the last.
19001 (copy_guard): Just as for actions, store the `action' only, not
19002 the switch/case/break flesh.
19003 Don't parse the user action that might follow the guard, let...
19004 (readgram): do it, i.e., now, there can be an action after a
19005 guard.
19006 In other words the guard is just explicitly optional.
19007 (packgram): Adjust.
19008 * src/output.c (guards_output): New.
19009 (output_parser): Call it when needed.
19010 (output): Also free the guard and attrs obstacks.
19011 * src/files.c, src/files.h (obstack_save): Remove.
19012 (output_files): Remove.
19013 As a result, if one needs the former `.act' file, using an
19014 appropriate skeleton which requires actions and guards is now
19015 required.
19016 * src/main.c (main): Adjust.
19017 * tests/semantic.at: New.
19018 * tests/regression.at: Use `input.y' as input file name.
19019 Avoid 8+3 problems by requiring input.c when the test needs the
19020 parser.
19021
19022 2001-12-27 Akim Demaille <akim@epita.fr>
19023
19024 * src/reader.c (symbol_list_new): Be sure to initialize all the
19025 fields.
19026
19027 2001-12-27 Akim Demaille <akim@epita.fr>
19028
19029 All the hacks using a final pseudo state are now useless.
19030
19031 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19032 * src/lalr.c (nLA): New.
19033 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19034 instead of lookaheadsp from the pseudo state (nstate + 1).
19035
19036 2001-12-27 Akim Demaille <akim@epita.fr>
19037
19038 * src/output.c (action_row, token_actions): Use a state_t instead
19039 of a integer, and nlookaheads instead of the following state's
19040 lookaheadsp.
19041
19042 2001-12-27 Akim Demaille <akim@epita.fr>
19043
19044 * src/conflicts.c (log_resolution, flush_shift)
19045 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19046 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19047 (conflicts_print, print_reductions): Use a state_t instead of an
19048 integer when referring to a state.
19049 As much as possible, depend upon nlookaheads, instead of the
19050 `lookaheadsp' member of the following state (since lookaheads of
19051 successive states are successive, the difference between state n + 1
19052 and n served as the number of lookaheads for state n).
19053 * src/lalr.c (add_lookback_edge): Likewise.
19054 * src/print.c (print_core, print_actions, print_state)
19055 (print_results): Likewise.
19056 * src/print_graph.c (print_core, print_actions, print_state)
19057 (print_graph): Likewise.
19058 * src/conflicts.h: Adjust.
19059
19060 2001-12-27 Akim Demaille <akim@epita.fr>
19061
19062 * src/bison.hairy: Formatting/comment changes.
19063 ANSIfy.
19064 Remove `register' indications.
19065 Add plenty of `static'.
19066
19067 2001-12-27 Akim Demaille <akim@epita.fr>
19068
19069 * src/output.c (prepare): Drop the muscle `ntbase' which
19070 duplicates ntokens.
19071 * src/bison.simple: Formatting/comment changes.
19072 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19073 is an undocumented synonym.
19074
19075 2001-12-22 Akim Demaille <akim@epita.fr>
19076
19077 * src/output.c (output_table_data): Change the prototype to use
19078 `int' for array ranges: some invocations do pass an int, not a
19079 short.
19080 Reported by Wayne Green.
19081
19082 2001-12-22 Akim Demaille <akim@epita.fr>
19083
19084 Some actions of web2c.y are improperly triggered.
19085 Reported by Mike Castle.
19086
19087 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19088 * tests/regression.at (Web2c): Rename as...
19089 (Web2c Report): this.
19090 (Web2c Actions): New.
19091
19092 2001-12-22 Akim Demaille <akim@epita.fr>
19093
19094 Reductions in web2c.y are improperly reported.
19095 Reported by Mike Castle.
19096
19097 * src/conflicts.c (print_reductions): Fix.
19098 * tests/regression.at (Web2c): New.
19099
19100 2001-12-18 Akim Demaille <akim@epita.fr>
19101
19102 Some host fail on `assert (!"foo")', which expands to
19103 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19104 Reported by Nelson Beebee.
19105
19106 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19107 `#define it_succeeded 0' and `assert (it_succeeded)'.
19108
19109 2001-12-17 Marc Autret <autret_m@epita.fr>
19110
19111 * src/bison.simple: Don't hard code the skeleton line and filename.
19112 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19113 New line counter 'skeleton_line' (skeleton-line muscle).
19114
19115 2001-12-17 Paul Eggert <eggert@twinsun.com>
19116
19117 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19118 YYDEBUG must be defined to a nonzero value.
19119
19120 * src/bison.simple (yytname): Do not assume that the user defines
19121 YYDEBUG to a properly parenthesized expression.
19122
19123 2001-12-17 Akim Demaille <akim@epita.fr>
19124
19125 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19126 nlookaheads is a new member.
19127 Adjust all users.
19128 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19129 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19130 state.
19131
19132 2001-12-17 Akim Demaille <akim@epita.fr>
19133
19134 * src/files.h, src/files.c (open_files, close_files): Remove.
19135 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19136 let...
19137 * src/reader.c (reader): Do it.
19138
19139 2001-12-17 Akim Demaille <akim@epita.fr>
19140
19141 * src/conflicts.c (print_reductions): Formatting changes.
19142
19143 2001-12-17 Akim Demaille <akim@epita.fr>
19144
19145 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19146 (flush_reduce): New.
19147 (resolve_sr_conflict): Adjust.
19148
19149 2001-12-17 Akim Demaille <akim@epita.fr>
19150
19151 * src/output.c (output_obstack): Be static and rename as...
19152 (format_obstack): this, to avoid any confusion with files.c's
19153 output_obstack.
19154 * src/reader.h (muscle_obstack): Move to...
19155 * src/output.h: here, since it's defined in output.c.
19156
19157 2001-12-17 Akim Demaille <akim@epita.fr>
19158
19159 * src/output.c (action_row, save_column, default_goto)
19160 (sort_actions, matching_state, pack_vector): Better variable
19161 locality.
19162
19163 2001-12-17 Akim Demaille <akim@epita.fr>
19164
19165 * src/output.c: Various formatting changes.
19166
19167 2001-12-17 Akim Demaille <akim@epita.fr>
19168
19169 * src/files.c (output_files): Free the output_obstack.
19170 * src/main.c (main): Call print and print_graph conditionally.
19171 * src/print.c (print): Work unconditionally.
19172 * src/print_graph.c (print_graph): Work unconditionally.
19173 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19174
19175 2001-12-16 Marc Autret <autret_m@epita.fr>
19176
19177 * src/output.c (actions_output): Fix. When we use %no-lines,
19178 there is one less line per action.
19179
19180 2001-12-16 Marc Autret <autret_m@epita.fr>
19181
19182 * src/bison.simple: Remove a useless #line directive.
19183 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19184 * src/output.c (get_lines_number): New.
19185 (output_parser): Adjust, now takes care about the lines of a
19186 output muscles.
19187 Fix line numbering.
19188 (actions_output): Computes the number of lines taken by actions.
19189 (output_master_parser): Insert new skeleton which is the name of
19190 the output parser file name.
19191
19192 2001-12-15 Marc Autret <autret_m@epita.fr>
19193
19194 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19195
19196 2001-12-15 Marc Autret <autret_m@epita.fr>
19197
19198 * src/output.c (output_gram): Keep track of the hairy one.
19199
19200 2001-12-15 Akim Demaille <akim@epita.fr>
19201
19202 Make `make distcheck' work.
19203
19204 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19205 system.h which uses libgettext.h.
19206
19207 2001-12-15 Akim Demaille <akim@epita.fr>
19208
19209 * src/nullable.c (set_nullable): Useless rules must be skipped,
19210 otherwise, since we range over their symbols, we might look at a
19211 nonterminal which no longer ``exists'', i.e., it is not counted in
19212 `nvars', hence we overflow our arrays.
19213
19214 2001-12-15 Akim Demaille <akim@epita.fr>
19215
19216 The header can also be produced directly, without any obstack!
19217 Yahoo!
19218
19219 * src/files.c, src/files.h (defines_obstack): Remove.
19220 (compute_header_macro): Global.
19221 (defines_obstack_save): Remove.
19222 * src/reader.c (parse_union_decl): No longer output to
19223 defines_obstack: its content can be found in the `stype' muscle
19224 anyway.
19225 (output_token_translations): Merge into...
19226 (symbols_output): this.
19227 Rename as...
19228 (symbols_save): this.
19229 (reader): Adjust.
19230 * src/output.c (header_output): New.
19231 (output): Call it.
19232
19233 2001-12-15 Akim Demaille <akim@epita.fr>
19234
19235 * src/reader.c (parse_union_decl): Instead of handling two obstack
19236 simultaneously, use one to define the `stype' muscle, and use the
19237 value of the latter to fill defines_obstack.
19238 (copy_comment): Remove.
19239 (copy_comment2): Work for a single obstack.
19240 Rename as...
19241 (copy_comment): this.
19242
19243 2001-12-15 Akim Demaille <akim@epita.fr>
19244
19245 * src/lex.c, src/lex.h (xgetc): No longer static.
19246 * src/reader.c (parse_union_decl): Revamp.
19247
19248 2001-12-15 Akim Demaille <akim@epita.fr>
19249
19250 Still making progress in separating Bison into (i) input, (ii)
19251 process, (iii) output: now we can directly output the parser file
19252 without using table_obstack at all.
19253
19254 * src/files.c, src/files.h (table_obstack): Bye bye.
19255 (parser_file_name): New.
19256 * src/files.c (compute_output_file_names): Compute it.
19257 * src/output.c (actions_output, output_parser)
19258 (output_master_parser): To a file instead of an obstack.
19259
19260 2001-12-15 Akim Demaille <akim@epita.fr>
19261
19262 Attach actions to rules, instead of pre-outputting them to
19263 actions_obstack.
19264
19265 * src/gram.h (rule_t): action and action_line are new members.
19266 * src/reader.c (symbol_list): Likewise.
19267 (copy_action): Save the actions within the rule.
19268 (packgram): Save them in rule_table.
19269 * src/output.c (actions_output): New.
19270 (output_parser): Use it on `%%actions'.
19271 (output_rule_data): Don't free rule_table.
19272 (output): Do it.
19273 (prepare): Don't save the `action' muscle.
19274 * src/bison.simple: s/%%action/%%actions/.
19275
19276 2001-12-15 Akim Demaille <akim@epita.fr>
19277
19278 * src/reader.c (copy_action): When --yacc, don't append a `;'
19279 to the user action: let it fail if lacking.
19280 Suggested by Arnold Robbins and Tom Tromey.
19281
19282 2001-12-14 Akim Demaille <akim@epita.fr>
19283
19284 * src/lex.c (literalchar): Simply return the char you decoded, non
19285 longer mess around with obstacks and int pointers.
19286 Adjust all callers.
19287
19288 2001-12-14 Akim Demaille <akim@epita.fr>
19289
19290 * src/lex.c (literalchar): Don't escape the special characters,
19291 just decode them, and keep them as char (before, eol was output as
19292 the 2 char string `\n' etc.).
19293 * src/output.c (output_rule_data): Use quotearg to output the
19294 token strings.
19295
19296 2001-12-13 Paul Eggert <eggert@twinsun.com>
19297
19298 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19299 Do not infringe on the global user namespace when using C++.
19300 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19301 All uses of `fprintf' and `stderr' changed.
19302
19303 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19304
19305 2001-12-13 Akim Demaille <akim@epita.fr>
19306
19307 The computation of nullable is broken: it doesn't handle empty
19308 RHS's properly.
19309
19310 * tests/torture.at (GNU AWK Grammar): New.
19311 * tests/sets.at (Nullable): New.
19312 * src/nullable.c (set_nullable): Instead of blindly looping over
19313 `ritems', loop over the rules, and then over their rhs's.
19314
19315 Work around Autotest bugs.
19316
19317 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19318 frame, because Autotest understand lines starting with a `+' as
19319 traces from the shell. Then, they are not processed properly.
19320 Admittedly an Autotest bug, but we don't have time to wait for
19321 Autotest to catch up.
19322 * tests/regression.at (Broken Closure): Adjust to the new table
19323 frames.
19324 Move to...
19325 * tests/sets.at: here.
19326
19327 2001-12-13 Akim Demaille <akim@epita.fr>
19328
19329 * src/closure.c (closure): Use nrules instead of playing tricks
19330 with BITS_PER_WORD.
19331
19332 2001-12-13 Akim Demaille <akim@epita.fr>
19333
19334 * src/print.c (print_actions): Output the handling of `$' as the
19335 traces do: shifting the token EOF. Before EOF was treated as a
19336 nonterminal.
19337 * tests/regression.at: Adjust some tests.
19338 * src/print_graph.c (print_core): Complete the set of items via
19339 closure. The next-to-final and final states are still unsatisfying,
19340 but that's to be addressed elsewhere.
19341 No longer output the rule numbers, but do output the state number.
19342 A single loop for the shifts + gotos is enough, but picked a
19343 distinct color for each.
19344 (print_graph): Initialize and finalize closure.
19345
19346 2001-12-13 Akim Demaille <akim@epita.fr>
19347
19348 * src/reader.c (readgram): Remove dead code, an strip useless
19349 braces.
19350 (get_type): Remove, unused.
19351
19352 2001-12-12 Akim Demaille <akim@epita.fr>
19353
19354 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19355 on that of lib/error.c.
19356
19357 2001-12-12 Akim Demaille <akim@epita.fr>
19358
19359 Some hosts don't like `/' in includes.
19360
19361 * src/system.h: Include libgettext.h without qualifying the path.
19362 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19363 $(top_srcdir).
19364
19365 2001-12-11 Marc Autret <autret_m@epita.fr>
19366
19367 * src/output.c (output_parser): Remove useless muscle.
19368
19369 2001-12-11 Marc Autret <autret_m@epita.fr>
19370
19371 * src/bison.simple: Remove #line just before %%epilogue. It
19372 is now handled in ...
19373 * src/reader.c (read_additionnal_code): Add the output of a
19374 #line for the epilogue.
19375
19376 2001-12-10 Marc Autret <autret_m@epita.fr>
19377
19378 * src/reader.c (copy_definition): Re-use CPP-outed code which
19379 replace precedent remove.
19380 * src/bison.simple: Remove #line before %%prologue because
19381 %%input-line is wrong at this time.
19382
19383 2001-12-10 Marc Autret <autret_m@epita.fr>
19384
19385 * src/reader.c (symbols_output): Clean up.
19386 * src/output.c (output_gram, output): Clean up.
19387
19388 2001-12-10 Akim Demaille <akim@epita.fr>
19389
19390 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19391 * src/LR0.c (set_state_table): here.
19392 * src/lalr.c (lalr): Call it.
19393
19394 2001-12-10 Akim Demaille <akim@epita.fr>
19395
19396 * src/state.h (shifts): Remove the `number' member: shifts are
19397 attached to state, hence no longer need to be labelled with a
19398 state number.
19399
19400 2001-12-10 Akim Demaille <akim@epita.fr>
19401
19402 Now that states have a complete set of members, the linked list of
19403 shifts is useless: just fill directly the state's shifts member.
19404
19405 * src/state.h (shifts): Remove the `next' member.
19406 * src/LR0.c (first_state, last_state): Remove.
19407 Adjust the callers.
19408 (augment_automaton): Don't look for the shifts that must be added
19409 a shift on EOF: it is those of the state we looked for! But now,
19410 since shifts are attached, it is no longer needed to looking
19411 merely by its id: its number.
19412
19413 2001-12-10 Akim Demaille <akim@epita.fr>
19414
19415 * src/LR0.c (augment_automaton): Better variable locality.
19416 Remove an impossible branch: if there is a state corresponding to
19417 the start symbol being shifted, then there is shift for the start
19418 symbol from the initial state.
19419
19420 2001-12-10 Akim Demaille <akim@epita.fr>
19421
19422 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19423 only when appropriate: when insert_start_shifting_state' is not
19424 invoked.
19425 * tests/regression.at (Rule Line Numbers): Adjust.
19426
19427 2001-12-10 Akim Demaille <akim@epita.fr>
19428
19429 * src/LR0.c (augment_automaton): Now that all states have shifts,
19430 merge the two cases addition shifts to the initial state.
19431
19432 2001-12-10 Akim Demaille <akim@epita.fr>
19433
19434 * src/lalr.c (set_state_table): Move to...
19435 * src/LR0.c: here.
19436 * src/lalr.c (lalr): Don't call it...
19437 * src/LR0.c (generate_states): do it.
19438 * src/LR0.h (first_state): Remove, only the table is used.
19439
19440 2001-12-10 Akim Demaille <akim@epita.fr>
19441
19442 * src/LR0.h (first_shift, first_reduction): Remove.
19443 * src/lalr.c: Don't use first_shift: find shifts through the
19444 states.
19445
19446 2001-12-10 Akim Demaille <akim@epita.fr>
19447
19448 * src/LR0.c: Attach shifts to states as soon as they are
19449 computed.
19450 * src/lalr.c (set_state_table): Instead of assigning shifts to
19451 state, just assert that the mapping was properly done.
19452
19453 2001-12-10 Akim Demaille <akim@epita.fr>
19454
19455 * src/LR0.c (insert_start_shift): Rename as...
19456 (insert_start_shifting_state): this.
19457 (insert_eof_shifting_state, insert_accepting_state): New.
19458 (augment_automaton): Adjust.
19459 Better locality of the variables.
19460 When looking if the start_symbol is shifted from the initial
19461 state, using `while (... symbol != start_symbol ...)' sounds
19462 better than `while (... symbol < start_symbol ...)': If fail
19463 to see how the order between symbols could be relevant!
19464
19465 2001-12-10 Akim Demaille <akim@epita.fr>
19466
19467 * src/getargs.h: Don't declare `spec_name_prefix' and
19468 `spec_file_prefix', declared by src/files.h.
19469 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19470 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19471 * src/output.c (prepare): Adjust.
19472 * src/reader.c (symbols_output): Likewise.
19473 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19474
19475 2001-12-10 Akim Demaille <akim@epita.fr>
19476
19477 * src/muscle_tab.c (muscle_init): NULL is a better default than
19478 `"0"'.
19479
19480 2001-12-10 Akim Demaille <akim@epita.fr>
19481
19482 * src/reader.c (reader): Calling symbols_output once is enough.
19483
19484 2001-12-10 Akim Demaille <akim@epita.fr>
19485
19486 Now that states have a complete set of members, the linked list of
19487 reductions is useless: just fill directly the state's reductions
19488 member.
19489
19490 * src/state.h (struct reductions): Remove member `number' and
19491 `next'.
19492 * src/LR0.c (first_reduction, last_reduction): Remove.
19493 (save_reductions): Don't link the new reductions, store them in
19494 this_state.
19495 * src/lalr.c (set_state_table): No need to attach reductions to
19496 states, it's already done.
19497 * src/output.c (output_actions): No longer free the shifts, then
19498 the reductions, then the states: free all the states and their
19499 members.
19500
19501 2001-12-10 Akim Demaille <akim@epita.fr>
19502
19503 * src/options.c (OPTN, DRTV, BOTH): New.
19504 (option_table): Use them.
19505
19506 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19507 the job of system.h.
19508 * src/options.c: Don't include stdio.h and xalloc.h for the same
19509 reasons.
19510
19511 2001-12-10 Akim Demaille <akim@epita.fr>
19512
19513 * src/output.c (output, prepare): Make sure the values of the
19514 muscles `action' and `prologue' are 0-terminated.
19515
19516 2001-12-10 Akim Demaille <akim@epita.fr>
19517
19518 Clean up GCC warnings.
19519
19520 * src/reader.c (copy_action): `buf' is not used.
19521 (parse_skel_decl): Be static.
19522 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19523 * src/options.h (create_long_option_table): Have a real prototype.
19524 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19525 (hash_delete_at): Return const void *.
19526 Adjust casts to preserve the const.
19527
19528 2001-12-10 Akim Demaille <akim@epita.fr>
19529
19530 * configure.in: Require 2.52g.
19531 M4 is not needed, but AUTOM4TE is.
19532 * m4/m4.m4: Remove.
19533 * tests/Makefile.am: Adjust.
19534
19535 2001-12-10 Akim Demaille <akim@epita.fr>
19536
19537 One structure for states is enough, even though theoretically
19538 there are LR(0) states and LALR(1) states.
19539
19540 * src/lalr.h (state_t): Remove.
19541 (state_table): Be state_t **, not state_t *.
19542 * src/state.h (core, CORE_ALLOC): Rename as...
19543 (state_t, STATE_ALLOC): this.
19544 Add the LALR(1) members: shifts, reductions, errs.
19545 * src/LR0.c (state_table): Rename as...
19546 (state_hash): this, to avoid name clashes with the global
19547 `state_table'.
19548 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19549 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19550
19551 2001-12-10 Akim Demaille <akim@epita.fr>
19552
19553 Bison dumps core on bash.y.
19554 Reported by Pascal Bart.
19555
19556 * src/warshall.c (bitmatrix_print): New.
19557 (TC): Use it.
19558 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19559 j must be the outer loop.
19560 * tests/regression.at (Broken Closure): New.
19561
19562 2001-12-05 Akim Demaille <akim@epita.fr>
19563
19564 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19565 its argument.
19566 Reported by Peter Hamorsky.
19567
19568 2001-12-05 Akim Demaille <akim@epita.fr>
19569
19570 * src/conflicts.c (err_table): Remove.
19571 (resolve_sr_conflict): Adjust.
19572 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19573 Rename as...
19574 (state_t.reductions, state_t.shifts): this.
19575
19576 2001-12-05 Akim Demaille <akim@epita.fr>
19577
19578 * src/reduce.c (reduce_grammar_tables): No longer disable the
19579 removal of useless rules via CPP but via `if (0)', so that the
19580 compiler still check the code is valid.
19581 For instance, it should have noticed `rline' no longer exists: use
19582 the `line' member of rule_t.
19583 * src/gram.c (dummy, rline): Remove, unused.
19584
19585 2001-12-05 Akim Demaille <akim@epita.fr>
19586
19587 * src/output.c (pack_vector): Use assert, not berror.
19588 * src/main.c (berror): Remove, unused.
19589
19590 2001-12-05 Akim Demaille <akim@epita.fr>
19591
19592 New experimental feature: if --verbose --trace output all the
19593 items of a state, not only its kernel.
19594
19595 * src/print.c (print_core): If `trace_flag', then invoke closure
19596 before outputting the items of the state (print_core is no longer
19597 a correct name them).
19598 (print_results): Invoke new_closure/free_closure if needed.
19599
19600 2001-12-05 Akim Demaille <akim@epita.fr>
19601
19602 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19603 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19604 (nitemset): for consistency with the rest of the project.
19605
19606 2001-12-05 Akim Demaille <akim@epita.fr>
19607
19608 * src/closure.c (print_closure): Improve.
19609 (closure): Use it for printing input and output.
19610
19611 2001-12-05 Akim Demaille <akim@epita.fr>
19612
19613 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19614 indexed by nonterminals.
19615
19616 2001-12-05 Akim Demaille <akim@epita.fr>
19617
19618 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19619 what it was!).
19620 * src/warshall.h: Remove accidental duplication of the content.
19621
19622 2001-12-05 Akim Demaille <akim@epita.fr>
19623
19624 * src/closure.c (set_fderives): De-obfuscate.
19625
19626 2001-12-05 Akim Demaille <akim@epita.fr>
19627
19628 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19629
19630 2001-12-05 Akim Demaille <akim@epita.fr>
19631
19632 * src/closure.c (set_firsts): De-obfuscate.
19633
19634 2001-12-05 Akim Demaille <akim@epita.fr>
19635
19636 * src/output.c (action_row): De-obfuscate
19637 using the good o' techniques: arrays not pointers, variable
19638 locality, BITISSET, RESETBIT etc.
19639
19640 2001-12-05 Akim Demaille <akim@epita.fr>
19641
19642 Pessimize the code to simplify it: from now on, all the states
19643 have a valid SHIFTS, which NSHIFTS is possibly 0.
19644
19645 * src/LR0.c (shifts_new): Be global and move to..
19646 * src/state.c, src/state.h: here.
19647 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19648 * src/print_graph: Adjust.
19649
19650 2001-12-05 Akim Demaille <akim@epita.fr>
19651
19652 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19653 * src/conflicts.c: Use it.
19654 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19655 incorrectly ``simplified''.
19656
19657 2001-12-05 Akim Demaille <akim@epita.fr>
19658
19659 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19660 using the good o' techniques: arrays not pointers, variable
19661 locality, BITISSET, RESETBIT etc.
19662
19663 2001-12-05 Akim Demaille <akim@epita.fr>
19664
19665 * src/state.h (SHIFT_SYMBOL): New.
19666 * src/conflicts.c: Use it to deobfuscate.
19667
19668 2001-12-05 Akim Demaille <akim@epita.fr>
19669
19670 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19671 (print_reductions): De-obfuscate using the good o' techniques:
19672 arrays not pointers, variable locality, BITISSET.
19673
19674 2001-12-05 Akim Demaille <akim@epita.fr>
19675
19676 * src/conflicts.c (print_reductions): Arrays, not pointers.
19677 Use BITISSET.
19678
19679 2001-12-05 Akim Demaille <akim@epita.fr>
19680
19681 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19682
19683 2001-12-05 Akim Demaille <akim@epita.fr>
19684
19685 * src/conflicts.c (print_reductions): Improve variable locality.
19686
19687 2001-12-05 Akim Demaille <akim@epita.fr>
19688
19689 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19690
19691 2001-12-05 Akim Demaille <akim@epita.fr>
19692
19693 * src/conflicts.c (print_reductions): Improve variable locality.
19694
19695 2001-12-05 Akim Demaille <akim@epita.fr>
19696
19697 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19698 * src/lalr.c: Use them.
19699
19700 2001-12-05 Akim Demaille <akim@epita.fr>
19701
19702 * src/LR0.c (augment_automaton): Formatting changes.
19703 Better variable locality.
19704
19705 2001-12-05 Akim Demaille <akim@epita.fr>
19706
19707 * src/lalr.c (matrix_print): New.
19708 (transpose): Use it.
19709 Use arrays instead of pointers.
19710
19711 2001-12-05 Akim Demaille <akim@epita.fr>
19712
19713 * src/lalr.c (maxrhs): Move to...
19714 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19715 * src/lalr.c (build_relations): Adjust.
19716
19717 2001-12-05 Akim Demaille <akim@epita.fr>
19718
19719 * src/lalr.c (transpose): Free the memory allocated to the
19720 argument, as it is replaced by the results by the unique caller.
19721 (build_relations): Merely invoke transpose: it handles the memory
19722 deallocation.
19723 Improve variable locality.
19724 Avoid variables used as mere abbreviations.
19725 (compute_lookaheads): Use arrays instead of pointers.
19726
19727 2001-12-05 Akim Demaille <akim@epita.fr>
19728
19729 * src/lalr.c (initialize_F): Improve variable locality.
19730 Avoid variables used as mere abbreviations.
19731
19732 2001-12-05 Akim Demaille <akim@epita.fr>
19733
19734 * src/derives.c (print_derives): Display the ruleno.
19735 * src/lalr.c (initialize_F, transpose): Better variable locality
19736 to improve readability.
19737 Avoid variables used as mere abbreviations.
19738
19739 2001-12-05 Akim Demaille <akim@epita.fr>
19740
19741 * src/lalr.c (traverse): Use arrays instead of pointers.
19742
19743 2001-12-05 Akim Demaille <akim@epita.fr>
19744
19745 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19746 the handling of squeue.
19747 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19748
19749 2001-12-05 Akim Demaille <akim@epita.fr>
19750
19751 Because useless nonterminals are now kept alive (instead of being
19752 `destroyed'), we now sometimes examine them, and store information
19753 related to them. Hence we need to know their number, and adjust
19754 memory allocations.
19755
19756 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19757 static.
19758 * src/LR0.c (allocate_itemsets): The memory allocated to
19759 `symbol_count' was used for two different purpose: once to count
19760 the number of occurrences of each symbol, and later reassigned to
19761 `shift_symbol', containing the symbol that can be shifted from a
19762 given state.
19763 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19764 only, and...
19765 (new_itemsets): Allocate `shift_symbol' here.
19766 (allocate_itemsets): symbol_count includes useless nonterminals.
19767 Make room for them.
19768 (free_storage): Use `free', not `XFREE', for pointers that cannot
19769 be null.
19770
19771 2001-12-05 Akim Demaille <akim@epita.fr>
19772
19773 * src/nullable.c (set_nullable): Deobfuscate the handling of
19774 ritem.
19775 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19776
19777 2001-12-05 Akim Demaille <akim@epita.fr>
19778
19779 * src/gram.c, src/gram.h (ritem_print): New.
19780 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19781 (This useless function was defined only to work around VMS linkers
19782 that can't handle compilation units with variables only).
19783 * src/reduce.c (dump_grammar): Use it to trace the construction of
19784 ritem.
19785
19786 2001-12-04 Paul Eggert <eggert@twinsun.com>
19787
19788 * src/bison.simple (union yyalloc): Change member names
19789 to be the same as the stack names.
19790 (yyparse): yyptr is now union yyalloc *, not char *.
19791 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19792 and may generate better code on some machines.
19793 (yystpcpy): Use prototype if __STDC__ is defined, not just
19794 if __cplusplus is defined.
19795
19796 2001-11-30 Akim Demaille <akim@epita.fr>
19797
19798 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19799 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19800 Gettext doesn't compile cleanly, and dies with -Werror.
19801 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19802 Include WARNING_CFLAGS here.
19803 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19804 before being defined.
19805
19806 2001-11-27 Paul Eggert <eggert@twinsun.com>
19807
19808 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19809 First arg is int, not unsigned.
19810 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19811 (SIZE_MAX, UINT_MAX): New macros.
19812 (quotearg_n_options): Abort if N is negative.
19813 Avoid overflow check on hosts where size_t is 64 bits and int
19814 is 32 bits, as overflow is impossible there.
19815 Fix off-by-one typo that caused unnecessary reallocation.
19816
19817 2001-11-29 Paul Eggert <eggert@twinsun.com>
19818
19819 Name space cleanup in generated parser.
19820
19821 * doc/bison.texinfo (Bison Parser): Discuss system headers
19822 and their effect on the user name space.
19823
19824 * src/bison.simple:
19825 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19826 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19827 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19828
19829 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19830 on user names when possible.
19831
19832 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19833 Simplify test for whather <alloca.h> exists.
19834
19835 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19836
19837 (<stdio.h>): Include if YYDEBUG.
19838
19839 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19840 ! defined (yyoverflow) && ! defined (yymemcpy).
19841
19842 (yymemcpy, yyparse): Rename local variables as needed so that
19843 they all begin with 'yy'.
19844
19845 (yystrlen, yystpcpy): New functions.
19846
19847 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19848 All uses changed.
19849
19850 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19851 instead of relying on string.h functions. Use YYSTACK_ALLOC
19852 and YYSTACK_FREE instead of malloc and free.
19853
19854 2001-11-30 Akim Demaille <akim@epita.fr>
19855
19856 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19857 before their first uses.
19858 (YYBISON, YYPURE): Move to the top of the output.
19859
19860 2001-11-30 Akim Demaille <akim@epita.fr>
19861
19862 * tests/reduce.at (Useless Nonterminals): Fix.
19863
19864 2001-11-30 Akim Demaille <akim@epita.fr>
19865
19866 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19867 if body instead of `;' to pacify GCC's warnings.
19868
19869 2001-11-30 Akim Demaille <akim@epita.fr>
19870
19871 Instead of mapping the LHS of unused rules to -1, keep the LHS
19872 valid, but flag the rules as invalid.
19873
19874 * src/gram.h (rule_t): `useful' is a new member.
19875 * src/print.c (print_grammar): Adjust.
19876 * src/derives.c (set_derives): Likewise.
19877 * src/reader.c (packgram, reduce_output): Likewise.
19878 * src/reduce.c (reduce_grammar_tables): Likewise.
19879 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19880
19881 2001-11-30 Akim Demaille <akim@epita.fr>
19882
19883 * src/reduce.c (reduce_output): Formatting changes.
19884 * src/print.c (print_results, print_grammar): Likewise.
19885 * tests/regression.at (Rule Line Numbers)
19886 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19887
19888 2001-11-30 Akim Demaille <akim@epita.fr>
19889
19890 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19891 useless nonterminals, move them at the end of the symbol arrays.
19892 (reduce_output): Adjust.
19893 * tests/reduce.at (Useless Nonterminals): Adjust.
19894
19895 2001-11-30 Akim Demaille <akim@epita.fr>
19896
19897 * src/reduce.c: Various comment/formatting changes.
19898 (nonterminals_reduce): New, extracted from...
19899 (reduce_grammar_tables): here.
19900 (reduce_grammar): Call nonterminals_reduce.
19901
19902 2001-11-29 Paul Eggert <eggert@twinsun.com>
19903
19904 * src/bison.simple (YYSTACK_REALLOC): Remove.
19905 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19906 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19907 New macros.
19908 (union yyalloc): New type.
19909 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19910 an arbitrary restriction on hosts where size_t is wider than int.
19911
19912 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19913 a parser stack overflow. Allocate just one block of memory for all
19914 three stacks, instead of allocating three blocks; this typically is
19915 faster and reduces fragmentation.
19916
19917 Do not limit the number of items in the stack to a value that fits
19918 in 'int', as this is an arbitrary limit on hosts with 64-bit
19919 size_t and 32-bit int.
19920
19921 2001-11-29 Marc Autret <autret_m@epita.fr>
19922
19923 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19924 of defining YYERROR_VERBOSE.
19925 [AT_DATA]: $4 is now out of C declarations in the prologue.
19926
19927 2001-11-28 Marc Autret <autret_m@epita.fr>
19928
19929 * src/reader.c (parse_dquoted_param): New.
19930 (parse_skel_decl): Use it.
19931 * src/lex.h: Add its prototype.
19932 * src/lex.c (literalchar): Become not static.
19933
19934 2001-11-28 Marc Autret <autret_m@epita.fr>
19935
19936 * src/output.h: And put its extern declaration here.
19937 * src/output.c (error_verbose): Define here.
19938 (prepare): Echo name modification.
19939 * src/getargs.h: Clean its extern declaration.
19940 * src/getargs.c (error_verbose_flag): Remove.
19941 (getargs): Remove case 'e'.
19942 * src/options.c (option_table): 'error-verbose' is now seen as simple
19943 percent option.
19944 Include output.h.
19945
19946 * src/reader.c (read_declarations): Remove case tok_include.
19947 (parse_include_decl): Remove.
19948 * src/lex.h (token_t): Remove tok_include.
19949 * src/options.c (option_table): 'include' is now a simple command line
19950 option.
19951
19952 2001-11-28 Marc Autret <autret_m@epita.fr>
19953
19954 * src/bison.simple: Adjust muscle names.
19955 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19956 * src/output.c (prepare): s/_/-/ for the muscles names.
19957 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19958
19959 2001-11-28 Marc Autret <autret_m@epita.fr>
19960
19961 * src/bison.simple: Fix debug.
19962 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19963
19964 2001-11-28 Akim Demaille <akim@epita.fr>
19965
19966 * src/LR0.c (shifts_new): New.
19967 (save_shifts, insert_start_shift, augment_automaton): Use it.
19968
19969 2001-11-28 Akim Demaille <akim@epita.fr>
19970
19971 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19972 keep ruleno only.
19973
19974 2001-11-28 Akim Demaille <akim@epita.fr>
19975
19976 * src/closure.c (closure): Instead of looping over word in array
19977 then bits in words, loop over bits in array.
19978
19979 2001-11-28 Akim Demaille <akim@epita.fr>
19980
19981 * src/closure.c (closure): No longer optimize the special case
19982 where all the bits of `ruleset[r]' are set to 0, to make the code
19983 clearer.
19984
19985 2001-11-28 Akim Demaille <akim@epita.fr>
19986
19987 * src/closure.c (closure): `r' and `c' are new variables, used to
19988 de-obfuscate accesses to RULESET and CORE.
19989
19990 2001-11-28 Akim Demaille <akim@epita.fr>
19991
19992 * src/reduce.c (reduce_print): Use ngettext.
19993 (dump_grammar): Improve the trace accuracy.
19994
19995 2001-11-28 Akim Demaille <akim@epita.fr>
19996
19997 * src/reduce.c (dump_grammar): Don't translate trace messages.
19998
19999 2001-11-28 Akim Demaille <akim@epita.fr>
20000
20001 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20002 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20003 as all tags are free'ed afterwards.
20004 From Enrico Scholz.
20005
20006 2001-11-27 Paul Eggert <eggert@twinsun.com>
20007
20008 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20009 use alloca when we didn't want to, and vice versa.
20010
20011 2001-11-27 Marc Autret <autret_m@epita.fr>
20012
20013 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20014 initialization.
20015 * src/output.c (prepare): Remove its update.
20016
20017 2001-11-27 Marc Autret <autret_m@epita.fr>
20018
20019 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20020 Use %error-verbose.
20021
20022 2001-11-27 Marc Autret <autret_m@epita.fr>
20023
20024 * src/bison.simple: Remove YYERROR_VERBOSE using.
20025 Use %%error_verbose.
20026 (yyparse): Likewise.
20027 * src/output.c (prepare): Give its final value.
20028 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20029 * src/getargs.h: Add its extern declaration.
20030 * src/getargs.c (error_verbose_flag): New int.
20031 (getargs): Update to catch new case.
20032 * src/options.c (option_table): 'error-verbose' is a new option.
20033 (shortopts): Update.
20034
20035 2001-11-27 Akim Demaille <akim@epita.fr>
20036
20037 * src/system.h: Use intl/libgettext.h.
20038 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20039
20040 2001-11-27 Akim Demaille <akim@epita.fr>
20041
20042 * tests/torture.at (Exploding the Stack Size with Malloc):
20043 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20044
20045 2001-11-27 Akim Demaille <akim@epita.fr>
20046
20047 * src/files.c: Include error.h.
20048 Reported by Hans Aberg.
20049
20050 2001-11-26 Marc Autret <autret_m@epita.fr>
20051
20052 * src/reader.c (parse_include_decl): New, not yet implemented.
20053 (read_declarations): Add case tok_include.
20054 * src/getargs.h (include): Add its extern definition.
20055 * src/getargs.c (include): New const char *.
20056 (getargs): Add case '-I'.
20057 * src/options.c (option_table): Add include as command line and
20058 percent option.
20059 * src/lex.h (token_t): Add tok_include.
20060
20061 2001-11-26 Akim Demaille <akim@epita.fr>
20062
20063 * src/reader.c (readgram): Make sure rules for mid-rule actions
20064 have a lineno equal to that of their host rule.
20065 Reported by Hans Aberg.
20066 * tests/regression.at (Rule Line Numbers): New.
20067
20068 2001-11-26 Akim Demaille <akim@epita.fr>
20069
20070 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20071 size_ts.
20072
20073 2001-11-26 Akim Demaille <akim@epita.fr>
20074
20075 * src/complain.c, src/complain.h (error): Remove, provided by
20076 lib/error.[ch].
20077
20078 2001-11-26 Akim Demaille <akim@epita.fr>
20079
20080 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20081 issue an error message.
20082 * tests/regression.at (Invalid %directive): New.
20083 Reported by Hans Aberg.
20084
20085 2001-11-26 Akim Demaille <akim@epita.fr>
20086
20087 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20088 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20089
20090 2001-11-26 Akim Demaille <akim@epita.fr>
20091
20092 * src/conflicts.c (conflicts_print): Don't complain at all when
20093 there are no reduce/reduce conflicts, and as many shift/reduce
20094 conflicts as expected.
20095 * tests/regression.at (%expect right): Adjust.
20096
20097 2001-11-23 Akim Demaille <akim@epita.fr>
20098
20099 * lib/alloca.c: Update, from fileutils.
20100
20101 2001-11-23 Akim Demaille <akim@epita.fr>
20102
20103 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20104
20105 2001-11-23 Akim Demaille <akim@epita.fr>
20106
20107 * src/system.h: Include alloca.h.
20108 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20109
20110 2001-11-23 Akim Demaille <akim@epita.fr>
20111
20112 * src/print_graph.c (print_actions): Remove `rule', unused.
20113 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20114 pacify GCC's signed < unsigned warnings.
20115 * src/closure.c (itemsetsize): Likewise.
20116 * src/reader.c (symbol_list_new): Static.
20117
20118 2001-11-23 Akim Demaille <akim@epita.fr>
20119
20120 Attaching lineno to buckets is stupid, since only one copy of each
20121 symbol is kept, only the line of the first occurrence is kept too.
20122
20123 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20124 * src/reader.c (rline_allocated): Remove, unused.
20125 (symbol_list): Have a `line' member.
20126 (symbol_list_new): New.
20127 (readgram): Use it.
20128 * src/print.c (print_grammar): Output the rule line numbers.
20129 * tests/regression.at (Solved SR Conflicts)
20130 (Unresolved SR Conflicts): Adjust.
20131 Reported by Hans Aberg.
20132
20133 2001-11-22 Marc Autret <autret_m@epita.fr>
20134
20135 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20136
20137 2001-11-22 Marc Autret <autret_m@epita.fr>
20138
20139 * src/muscle_tab.c (muscle_init): Remove initialization of
20140 skeleton muscle.
20141 * src/output.c (output_master_parser): Do it here.
20142
20143 2001-11-20 Akim Demaille <akim@epita.fr>
20144
20145 * po/sv.po: New.
20146 * configure.in (ALL_LINGUAS): Adjust.
20147 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20148 longer contains strings to translate.
20149
20150 2001-11-19 Akim Demaille <akim@epita.fr>
20151
20152 * src/conflicts.c (conflicts_print): Add a missing \n.
20153
20154 2001-11-19 Akim Demaille <akim@epita.fr>
20155
20156 * src/nullable.c (nullable_print): New.
20157 (set_nullable): Call it when tracing.
20158 Better locality of variables.
20159
20160 2001-11-19 Akim Demaille <akim@epita.fr>
20161
20162 * src/print.c (print_actions): Better locality of variables.
20163
20164 2001-11-19 Akim Demaille <akim@epita.fr>
20165
20166 * src/derives.c (print_derives): Fix and enrich.
20167 * src/closure.c (print_fderives): Likewise.
20168
20169 2001-11-19 Akim Demaille <akim@epita.fr>
20170
20171 * src/closure.c (itemsetend): Remove, replaced with...
20172 (itemsetsize): new.
20173
20174 2001-11-19 Akim Demaille <akim@epita.fr>
20175
20176 * src/LR0.c (kernel_end): Remove, replaced with...
20177 (kernel_size): new.
20178
20179 2001-11-19 Akim Demaille <akim@epita.fr>
20180
20181 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20182 to clarify.
20183
20184 2001-11-19 Akim Demaille <akim@epita.fr>
20185
20186 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20187
20188 2001-11-19 Akim Demaille <akim@epita.fr>
20189
20190 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20191 trace messages.
20192 * src/LR0.c: Likewise.
20193 (allocate_itemsets): Use arrays instead of pointers to clarify.
20194
20195 2001-11-19 Akim Demaille <akim@epita.fr>
20196
20197 * src/getargs.c (statistics_flag): Replace with...
20198 (trace_flag): New.
20199 (longopts): Accept --trace instead of --statistics.
20200 * src/getargs.h, src/options.c: Adjust.
20201 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20202 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20203
20204 2001-11-19 Akim Demaille <akim@epita.fr>
20205
20206 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20207 pointers to clarify the code.
20208 (save_reductions, save_shifts): Factor common parts of alternatives.
20209
20210 2001-11-19 Akim Demaille <akim@epita.fr>
20211
20212 * src/LR0.c (new_state, get_state): Complete TRACE code.
20213 * src/closure.c: Include `reader.h' to get `tags', needed by the
20214 trace code.
20215 Rename the conditional DEBUG as TRACE.
20216 Output consistently TRACEs to stderr, not stdout.
20217 * src/derives.c: Likewise.
20218 * src/reduce.c: (inaccessable_symbols): Using if is better style
20219 than goto.
20220 Use `#if TRACE' instead of `#if 0' for tracing code.
20221
20222 2001-11-19 Akim Demaille <akim@epita.fr>
20223
20224 * src/system.h (LIST_FREE, shortcpy): New.
20225 * src/LR0.c: Use them.
20226 * src/output.c (free_itemsets, free_reductions, free_shifts):
20227 Remove, replaced by LIST_FREE.
20228
20229 2001-11-19 Akim Demaille <akim@epita.fr>
20230
20231 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20232 (REDUCTIONS_ALLOC): New.
20233 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20234 allocation.
20235
20236 2001-11-19 Akim Demaille <akim@epita.fr>
20237
20238 * src/LR0.c (new_state): Complete trace code.
20239 * src/nullable.c (set_nullable): Don't translate traces.
20240
20241 2001-11-19 Akim Demaille <akim@epita.fr>
20242
20243 * src/print_graph.c (print_core): Better locality of variables.
20244 * src/print.c (print_core): Likewise.
20245
20246 2001-11-19 Akim Demaille <akim@epita.fr>
20247
20248 * src/vcg.c: You do the output, so you are responsible of the
20249 handling of VCG syntax, in particular: use quotearg.
20250 * src/print_graph.c: Don't.
20251 (print_actions): Don't output the actions as part of the nodes,
20252 since that's the job of the edges.
20253 (print_state): Don't output by hand: fill the node description,
20254 and ask for its output.
20255
20256 2001-11-19 Akim Demaille <akim@epita.fr>
20257
20258 * src/bison.simple (yyparse): When verbosely reporting an error,
20259 no longer put additional quotes around token names.
20260 * tests/calc.at: Adjust.
20261
20262 2001-11-19 Akim Demaille <akim@epita.fr>
20263
20264 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20265 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20266 * src/output.c: Adjust.
20267
20268 2001-11-19 Akim Demaille <akim@epita.fr>
20269
20270 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20271 (rule_t): this.
20272 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20273
20274 2001-11-19 Akim Demaille <akim@epita.fr>
20275
20276 * src/gram.h (rule_t): New.
20277 (rule_table): New.
20278 (rrhs, rlhs): Remove, part of state_t.
20279 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20280 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20281 * src/reader.c, src/reduce.c: Adjust.
20282
20283 2001-11-19 Akim Demaille <akim@epita.fr>
20284
20285 * src/reader.c (symbols_output): New, extracted from...
20286 (packsymbols): Here.
20287 (reader): Call it.
20288
20289 2001-11-19 Akim Demaille <akim@epita.fr>
20290
20291 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20292 (maxrhs): this new function.
20293
20294 2001-11-19 Akim Demaille <akim@epita.fr>
20295
20296 * src/lalr.c (F): New macro to access the variable F.
20297 Adjust.
20298
20299 2001-11-19 Akim Demaille <akim@epita.fr>
20300
20301 * src/lalr.h (LA): New macro to access the variable LA.
20302 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20303 * src/lalr.c: Adjust.
20304
20305 2001-11-19 Akim Demaille <akim@epita.fr>
20306
20307 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20308 (set_state_table): handle the `lookaheads' members.
20309
20310 2001-11-19 Akim Demaille <akim@epita.fr>
20311
20312 * src/lalr.h (lookaheads): Removed array, whose contents is now
20313 a member of...
20314 (state_t): this structure.
20315 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20316 Adjust.
20317
20318 2001-11-19 Akim Demaille <akim@epita.fr>
20319
20320 * src/lalr.h (consistent): Removed array, whose contents is now
20321 a member of...
20322 (state_t): this structure.
20323 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20324 Adjust.
20325
20326 2001-11-19 Akim Demaille <akim@epita.fr>
20327
20328 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20329 contents are now members of...
20330 (state_t): this structure.
20331 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20332 Adjust.
20333
20334 2001-11-19 Akim Demaille <akim@epita.fr>
20335
20336 * src/lalr.h (state_t): New.
20337 (state_table): Be a state_t * instead of a core **.
20338 (accessing_symbol): Remove, part of state_t.
20339 * src/lalr.c: Adjust.
20340 (set_accessing_symbol): Merge into...
20341 (set_state_table): this.
20342 * src/print_graph.c, src/conflicts.c: Adjust.
20343
20344 2001-11-14 Akim Demaille <akim@epita.fr>
20345
20346 * tests/calc.at, tests/output.at, tests/regression.at,
20347 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20348 now the tests are run in private dirs, therefore AC_CLEANUP and
20349 family can be simplified to 0-ary.
20350 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20351 use abs. path to find config.h.
20352 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20353 stderr, there can be way too much random noise.
20354 Instead pass -Werror to GCC and rely on the exit status.
20355 Reported by Wolfram Wagner.
20356
20357 2001-11-14 Akim Demaille <akim@epita.fr>
20358
20359 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20360 defined only if yyoverflow is defined, to avoid `warning: unused
20361 variable `yyvs1''.
20362 Reported by The Test Suite.
20363
20364 2001-11-14 Akim Demaille <akim@epita.fr>
20365
20366 * src/print.c: Include reduce.h.
20367 Reported by Hans Aberg.
20368
20369 2001-11-14 Akim Demaille <akim@epita.fr>
20370
20371 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20372 Revert a previous patch: these are really const.
20373 * src/conflicts.c (conflict_report): Additional useless pair of
20374 braces to pacify GCC's warnings for `if () if () {} else {}'.
20375 * src/lex.c (parse_percent_token): Replace equal_offset with
20376 arg_offset.
20377 arg is const.
20378 Be sure to strdup `arg' when used, since there is no reason for
20379 token_buffer not to change.
20380
20381 2001-11-14 Akim Demaille <akim@epita.fr>
20382
20383 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20384 definition.
20385 * src/main.c (main): Use them.
20386 Suggested by Hans Aberg.
20387
20388 2001-11-12 Akim Demaille <akim@epita.fr>
20389
20390 * src/system.h (ngettext): Now that we use ngettext, be sure to
20391 provide a default definition when NLS are not used.
20392
20393 2001-11-12 Akim Demaille <akim@epita.fr>
20394
20395 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20396 Use @kbd to denote user input.
20397 (Language and Grammar): ANSIfy the example.
20398 Adjust its layout for info/notinfo.
20399 (Location Tracking Calc): Output error messages to stderr.
20400 Output locations in a more GNUtically correct way.
20401 Fix a couple of Englishos.
20402 Adjust @group/@end group pairs.
20403
20404 2001-11-12 Akim Demaille <akim@epita.fr>
20405
20406 %expect was not functioning at all.
20407
20408 * src/conflicts.c (expected_conflicts): Set to -1.
20409 (conflict_report): Use ngettext.
20410 (conflicts_print): Check %expect and make its violation an error.
20411 * doc/bison.texinfo (Expect Decl): Adjust.
20412 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20413 * tests/regression.at (%expect not enough, %expect right)
20414 (%expect too much): New.
20415
20416 2001-11-12 Akim Demaille <akim@epita.fr>
20417
20418 * tests/regression.at (Conflicts): Rename as...
20419 (Unresolved SR Conflicts): this.
20420 (Solved SR Conflicts): New.
20421
20422 2001-11-12 Akim Demaille <akim@epita.fr>
20423
20424 * src/reduce.c (print_results): Rename as...
20425 (reduce_output): This.
20426 Output to OUT, passed as argument, instead of output_obstack.
20427 (dump_grammar): Likewise.
20428 (reduce_free): New.
20429 Also free V1.
20430 (reduce_grammar): No longer call reduce_output, since...
20431 * src/print.c (print_results): do it.
20432 * src/main.c (main): Call reduce_free;
20433
20434 2001-11-12 Akim Demaille <akim@epita.fr>
20435
20436 * src/conflicts.c (print_reductions): Accept OUT as argument.
20437 Output to it, not to output_obstack.
20438 * src/print.c (print_actions): Adjust.
20439
20440 2001-11-12 Akim Demaille <akim@epita.fr>
20441
20442 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20443 the result instead of using...
20444 (src_total, rrc_total, src_count, rrc_count): Remove.
20445 (any_conflicts): Remove.
20446 (print_conflicts): Split into...
20447 (conflicts_print, conflicts_output): New.
20448 * src/conflicts.h: Adjust.
20449 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20450 * src/print.c (print_grammar): Issue `\n' between two rules.
20451 * tests/regression.at (Conflicts): New.
20452 Reported by Tom Lane.
20453
20454 2001-11-12 Akim Demaille <akim@epita.fr>
20455
20456 * tests/regression.at (Invalid input): Remove, duplicate with
20457 ``Invalid input: 1''.
20458
20459 2001-11-12 Akim Demaille <akim@epita.fr>
20460
20461 * tests/torture.at (AT_DATA_STACK_TORTURE)
20462 (Exploding the Stack Size with Alloca)
20463 (Exploding the Stack Size with Malloc): New.
20464
20465 2001-11-12 Akim Demaille <akim@epita.fr>
20466
20467 * src/bison.simple (YYSTACK_REALLOC): New.
20468 (yyparse) [!yyoverflow]: Use it and free the old stack.
20469 Reported by Per Allansson.
20470
20471 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20472
20473 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20474 define CPP macro, which substitute YYSTYPE by yystype.
20475 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20476 with yyltype/YYLTYPE. This allows inclusion of the generated
20477 header within the parser if the compiler, such as GGC, accepts
20478 multiple equivalent #defines.
20479 From Akim.
20480
20481 2001-11-05 Akim Demaille <akim@epita.fr>
20482
20483 * src/reader.c (symbols_output): New, extracted from...
20484 (packsymbols): here.
20485 (reader): Adjust.
20486
20487 2001-11-05 Akim Demaille <akim@epita.fr>
20488
20489 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20490
20491 2001-11-05 Akim Demaille <akim@epita.fr>
20492
20493 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20494 pattern.
20495
20496 2001-11-05 Akim Demaille <akim@epita.fr>
20497
20498 * src/options.h (struct option_table_struct): set_flags is void*.
20499 * src/options.c (longopts): Support `--output' and `%output'.
20500 (usage): Adjust.
20501 * src/lex.h (tok_setopt): Remove, replaced with...
20502 (tok_intopt, tok_stropt): these new guys.
20503 * src/lex.c (getopt.h): Not needed.
20504 (token_buffer, unlexed_token_buffer): Not const.
20505 (percent_table): Promote `-' over `_' in directive names.
20506 Active `%name-prefix', `file-prefix', and `output'.
20507 (parse_percent_token): Accept possible arguments to directives.
20508 Promote `-' over `_' in directive names.
20509
20510 2001-11-04 Akim Demaille <akim@epita.fr>
20511
20512 * doc/bison.texinfo (Decl Summary): Split the list into
20513 `directives for grammars' and `directives for bison'.
20514 Sort'em.
20515 Add description of `%name-prefix', `file-prefix', and `output'.
20516 Promote `-' over `_' in directive names.
20517 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20518 Simplify the description of `--name-prefix'.
20519 Promote `-' over `_' in directive names.
20520 Promote `--output' over `--output-file'.
20521 Fix the description of `--defines'.
20522 * tests/output.at: Exercise %file-prefix and %output.
20523
20524 2001-11-02 Akim Demaille <akim@epita.fr>
20525
20526 * doc/refcard.tex: Update.
20527
20528 2001-11-02 Akim Demaille <akim@epita.fr>
20529
20530 * src/symtab.h (SUNDEF): New.
20531 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20532 stand for `uninitialized', instead of 0.
20533 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20534 * src/lex.c (lex): Adjust.
20535
20536 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20537 Number it 0.
20538 Let yylex return it instead of a plain 0.
20539 Reported by Dick Streefland.
20540
20541 2001-11-02 Akim Demaille <akim@epita.fr>
20542
20543 * tests/regression.at (Mixing %token styles): New test.
20544
20545 2001-11-02 Akim Demaille <akim@epita.fr>
20546
20547 * src/reader.c (parse_thong_decl): Formatting changes.
20548 (token_translations_init): New, extracted from...
20549 (packsymbols): Here.
20550 Adjust.
20551
20552 2001-11-01 Akim Demaille <akim@epita.fr>
20553
20554 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20555 Check that `9foo.y' produces correct cpp guards.
20556 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20557 guards.
20558 Reported by Wwp.
20559
20560 2001-11-01 Akim Demaille <akim@epita.fr>
20561
20562 * tests/regression.at (Invalid input: 2): New.
20563 * src/lex.c (unlexed_token_buffer): New.
20564 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20565 too.
20566 Reported by Wwp.
20567
20568 2001-11-01 Akim Demaille <akim@epita.fr>
20569
20570 * tests/calc.at: Catch up with 1.30.
20571 * configure.in: Bump to 1.49a.
20572 Adjust to newer Autotest.
20573
20574 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
20575
20576 * src/conflicts.c: Move global variables rrc_total and src_total ...
20577 (print_conflicts): here.
20578 * src/output.c (output): Free global variable user_toknums.
20579 * src/lex.c (token_obstack): Become static.
20580
20581 2001-10-18 Akim Demaille <akim@epita.fr>
20582
20583 * tests/atlocal.in (GCC): Add.
20584 * tests/calc.at: s/m4_match/m4_bmatch/.
20585 s/m4_patsubst/m4_bpatsubst/.
20586 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20587 * configure.in: AC_SUBST(GCC).
20588
20589 2001-10-14 Marc Autret <autret_m@epita.fr>
20590
20591 * src/options.c (create_long_option_table): Fix.
20592
20593 2001-10-10 Akim Demaille <akim@epita.fr>
20594
20595 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20596
20597 2001-10-04 Akim Demaille <akim@epita.fr>
20598
20599 * src/reader.c (parse_union_decl): Push the caracters in
20600 union_obstack, not attrs_obstack.
20601
20602 2001-10-04 Akim Demaille <akim@epita.fr>
20603
20604 Merge in the branch 1.29.
20605
20606 * src/reader.c (packsymbols): Use a temporary obstack for
20607 `%%tokendef', since output_stack is already used elsewhere.
20608
20609 2001-10-02 Akim Demaille <akim@epita.fr>
20610
20611 Bump 1.29d.
20612
20613 2001-10-02 Akim Demaille <akim@epita.fr>
20614
20615 Version 1.29c.
20616
20617 2001-10-02 Akim Demaille <akim@epita.fr>
20618
20619 * tests/regression.at (Invalid CPP headers): New.
20620 From Alexander Belopolsky.
20621 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20622
20623 2001-10-02 Akim Demaille <akim@epita.fr>
20624
20625 * tests/regression.at (Invalid input): New.
20626 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20627 Reported by Shura.
20628
20629 2001-10-02 Akim Demaille <akim@epita.fr>
20630
20631 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20632
20633 2001-10-02 Akim Demaille <akim@epita.fr>
20634
20635 * src/output.c (output_parser): Assert `skeleton'.
20636 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20637 systems.
20638 From Shura.
20639
20640 2001-10-01 Marc Autret <autret_m@epita.fr>
20641
20642 * src/lex.h: Echo modifications.
20643 * src/lex.c (unlex): Parameter is now token_t.
20644 From Hans Aberg.
20645
20646 2001-10-01 Marc Autret <autret_m@epita.fr>
20647
20648 * src/main.c: Include lex.h.
20649 From Hans Aberg.
20650
20651 2001-09-29 Akim Demaille <akim@epita.fr>
20652
20653 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20654
20655 2001-09-28 Akim Demaille <akim@epita.fr>
20656
20657 * tests/testsuite.at: Update to newer Autotest.
20658 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20659
20660 2001-09-27 Akim Demaille <akim@epita.fr>
20661
20662 Position independent wrapper.
20663
20664 * tests/bison: Remove.
20665 * tests/bison.in: New.
20666 * configure.in: Adjust.
20667
20668 2001-09-27 Paul Eggert <eggert@twinsun.com>
20669
20670 Port quotearg fixes from tar 1.13.24.
20671
20672 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20673 tm to be declared.
20674 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20675 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20676
20677 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20678 * m4/mbrtowc.m4: New file.
20679 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20680 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20681
20682 2001-09-27 Akim Demaille <akim@epita.fr>
20683
20684 Bump to 1.29c.
20685
20686 2001-09-27 Akim Demaille <akim@epita.fr>
20687
20688 Version 1.29b.
20689
20690 2001-09-25 Akim Demaille <akim@epita.fr>
20691
20692 * src/system.h: Include `xalloc.h'.
20693 Remove it from the C files.
20694 * src/files.c (output_files): Free the obstacks.
20695 * src/lex.c (init_lex): Rename as...
20696 (lex_init): this.
20697 (lex_free): New.
20698 * src/main.c (main): Use it.
20699
20700 2001-09-24 Marc Autret <autret_m@epita.fr>
20701
20702 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20703 to output informations in fout (FILE*).
20704 (open_graph, close_graph): Likewise.
20705 (output_graph, output_edge, output_node): Likewise.
20706 * src/vcg.h: Update function prototypes.
20707 * src/print_graph.c (print_graph): Open output graph file.
20708 (print_actions): Adjust.
20709 * src/files.h: Remove extern declaration.
20710 * src/files.c: Remove graph_obstack declaration.
20711 (open_files): Remove graph_obstack initialization.
20712 (output_files): Remove graph_obstack saving.
20713
20714 2001-09-24 Marc Autret <autret_m@epita.fr>
20715
20716 * src/files.c (compute_output_file_names): Fix.
20717
20718 2001-09-24 Marc Autret <autret_m@epita.fr>,
20719 Akim Demaille <akim@epita.fr>
20720
20721 * src/reader.c (reader): Remove call to free_symtab ().
20722 * src/main.c (main): Call it here.
20723 Include symtab.h.
20724 * src/conflicts.c (initialize_conflicts): Rename as...
20725 (solve_conflicts): this.
20726 * src/print.c (print_core, print_actions, print_state)
20727 (print_grammar): Dump to a file instead a `output_obstack'.
20728 (print_results): Dump `output_obstack', and then proceed with the
20729 FILE *.
20730 * src/files.c (compute_output_file_names, close_files): New.
20731 (output_files): Adjust.
20732 * src/main.c (main): Adjust.
20733
20734 2001-09-23 Marc Autret <autret_m@epita.fr>
20735
20736 * src/files.c (compute_header_macro): Computes header macro name
20737 from spec_defines_file when given.
20738
20739 2001-09-23 Marc Autret <autret_m@epita.fr>
20740
20741 * src/files.c (output_files): Add default extensions.
20742
20743 2001-09-22 Akim Demaille <akim@epita.fr>
20744
20745 * src/conflicts.c (finalize_conflicts): Rename as...
20746 (free_conflicts): this.
20747
20748 2001-09-22 Akim Demaille <akim@epita.fr>
20749
20750 * src/gram.c (gram_free): Rename back as...
20751 (dummy): this.
20752 (output_token_translations): Free `token_translations'.
20753 * src/symtab.c (free_symtab): Free the tag field.
20754
20755 2001-09-22 Akim Demaille <akim@epita.fr>
20756
20757 Remove `translations' as it is always set to true.
20758
20759 * src/gram.h: Adjust.
20760 * src/reader.c (packsymbols, parse_token_decl): Adjust
20761 * src/print.c (print_grammar): Adjust.
20762 * src/output.c (output_token_translations): Adjust.
20763 * src/lex.c (lex): Adjust.
20764 * src/gram.c: Be sure the set pointers to NULL.
20765 (dummy): Rename as...
20766 (gram_free): this.
20767
20768 2001-09-22 Akim Demaille <akim@epita.fr>
20769
20770 * configure.in: Invoke AM_LIB_DMALLOC.
20771 * src/system.h: Use dmalloc.
20772 * src/LR0.c: Be sure to have pointers initialized to NULL.
20773 (allocate_itemsets): Allocate kernel_items only if needed.
20774
20775 2001-09-22 Akim Demaille <akim@epita.fr>
20776
20777 * configure.in: Bump to 1.29b.
20778 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20779 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20780 need xmalloc.c in calc.y.
20781 From Pascal Bart.
20782
20783 2001-09-21 Akim Demaille <akim@epita.fr>
20784
20785 Version 1.29a.
20786 * Makefile.maint, config/config.guess, config/config.sub,
20787 * config/missing: Update from masters.
20788 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20789 upon package.m4.
20790 * configure.in (ALL_LINGUAS): Add `tr'.
20791
20792 2001-09-21 Akim Demaille <akim@epita.fr>
20793
20794 * tests/Makefile.am (package.m4): Move to...
20795 ($(srcdir)/$(TESTSUITE)): here.
20796
20797 2001-09-20 Akim Demaille <akim@epita.fr>
20798
20799 * src/complain.c: No longer try to be standalone: use system.h.
20800 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20801 * src/complain.h: Likewise.
20802 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20803 Remove the unused variable `n'.
20804 From Albert Chin-A-Young.
20805
20806 2001-09-18 Marc Autret <autret_m@epita.fr>
20807
20808 * doc/bison.1: Update.
20809 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20810 descriptions.
20811 (Option Cross Key): Update.
20812 Add --graph.
20813
20814 2001-09-18 Marc Autret <autret_m@epita.fr>
20815
20816 * tests/regression.at: New test (comment in %union).
20817
20818 2001-09-18 Marc Autret <autret_m@epita.fr>
20819
20820 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20821 do that.
20822 Reported by Keith Browne.
20823
20824 2001-09-18 Marc Autret <autret_m@epita.fr>
20825
20826 * tests/output.at: Add tests for --defines and --graph.
20827
20828 2001-09-18 Marc Autret <autret_m@epita.fr>
20829
20830 * tests/output.at: Removes tests of %{header,src}_extension features.
20831
20832 2001-09-18 Akim Demaille <akim@epita.fr>
20833
20834 * tests/Makefile.am (package.m4): New.
20835 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20836 (_AT_CHECK_CALC_ERROR): Likewise.
20837 Factor the `, ' part of verbose error messages.
20838
20839 2001-09-18 Marc Autret <autret_m@epita.fr>
20840
20841 * src/getargs.c (longopts): Declare --defines and --graph as options
20842 with optional arguments.
20843 * src/files.h: Add extern declarations.
20844 * src/files.c (spec_graph_file, spec_defines_file): New.
20845 (output_files): Update.
20846 Remove CPP-outed code.
20847
20848 2001-09-18 Marc Autret <autret_m@epita.fr>
20849
20850 Turn off %{source,header}_extension feature.
20851
20852 * src/files.c (compute_exts_from_gf): Update.
20853 (compute_exts_from_src): Update.
20854 (output_files): CPP-out useless code.
20855 * src/files.h: Remove {header,source}_extension extern declarations.
20856 * src/reader.c (parse_dquoted_param): CPP-out.
20857 (parse_header_extension_decl): Remove.
20858 (parse_source_extension_decl): Remove.
20859 (read_declarations): Remove cases tok_{hdrext,srcext}.
20860 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20861 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20862
20863 2001-09-10 Akim Demaille <akim@epita.fr>
20864
20865 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20866 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20867 (AT_CHECK_OUTPUT): this.
20868 Merely check ls' exit status, its output is useless.
20869
20870 2001-09-10 Akim Demaille <akim@epita.fr>
20871
20872 * tests/calc.at: Use m4_match.
20873 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20874
20875 2001-09-10 Marc Autret <autret_m@epita.fr>,
20876 Akim Demaille <akim@epita.fr>
20877
20878 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20879 enum color_e.
20880 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20881 to `normal'.
20882 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20883 * src/lex.h: Adjust prototype.
20884 (token_t): Add `tok_undef'.
20885 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20886 (parse_percent_token): Now returns token_t.
20887 Add default statement in switch.
20888 (lex): Separate `c' as an input variable, from the token_t result
20889 part.
20890 (unlexed): Is a token_t.
20891
20892 2001-09-10 Akim Demaille <akim@epita.fr>
20893
20894 * configure.in: Bump to 1.29a.
20895
20896 2001-09-07 Akim Demaille <akim@epita.fr>
20897
20898 Version 1.29.
20899
20900 2001-08-30 Akim Demaille <akim@epita.fr>
20901
20902 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20903 * m4/atconfig.m4: Remove.
20904 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20905 * tests/bison: New.
20906 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20907 m4_if, m4_patsubst, and m4_regexp.
20908 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20909 `input' file instead of echo.
20910
20911 2001-08-29 Akim Demaille <akim@epita.fr>
20912
20913 Bump to 1.28e.
20914
20915 2001-08-29 Akim Demaille <akim@epita.fr>
20916
20917 Version 1.28d.
20918
20919 2001-08-29 Paul Eggert <eggert@twinsun.com>
20920
20921 * src/bison.simple (yyparse): Don't take the address of an
20922 item before the start of an array, as that doesn't conform to
20923 the C Standard.
20924
20925 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20926
20927 * doc/bison.texinfo (Location Tracking Calc): New node.
20928
20929 2001-08-29 Paul Eggert <eggert@twinsun.com>
20930
20931 * src/output.c (output): Do not define const, as this now
20932 causes more problems than it cures.
20933
20934 2001-08-29 Akim Demaille <akim@epita.fr>
20935
20936 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20937 the nodes.
20938 Be sure to tag the `detailmenu'.
20939
20940 2001-08-29 Akim Demaille <akim@epita.fr>
20941
20942 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20943 download in a tmp dir.
20944
20945 2001-08-28 Marc Autret <autret_m@epita.fr>
20946
20947 * config/depcomp: New file.
20948
20949 2001-08-28 Marc Autret <autret_m@epita.fr>
20950
20951 * doc/bison.1 (mandoc): Adjust.
20952 From Juan Manuel Guerrero.
20953
20954 2001-08-28 Marc Autret <autret_m@epita.fr>
20955
20956 * src/print_graph.c (print_state): Fix.
20957
20958 2001-08-27 Marc Autret <autret_m@epita.fr>
20959
20960 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20961 char * members.
20962 Echo modifications to the functions prototypes.
20963 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20964
20965 2001-08-27 Marc Autret <autret_m@epita.fr>
20966
20967 * src/vcg.c: Include `xalloc.h'.
20968 (add_colorentry): New.
20969 (add_classname): New.
20970 (add_infoname): New.
20971 * src/vcg.h: Add new prototypes.
20972
20973 2001-08-27 Akim Demaille <akim@epita.fr>
20974
20975 * Makefile.maint: Sync. again with CVS Autoconf.
20976
20977 2001-08-27 Akim Demaille <akim@epita.fr>
20978
20979 * Makefile.maint: Formatting changes.
20980 (po-update, cvs-update, update): New targets.
20981 (AMTAR): Remove.
20982
20983 2001-08-27 Akim Demaille <akim@epita.fr>
20984
20985 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20986 * Makefile.maint: Sync. with CVS Autoconf.
20987
20988 2001-08-27 Marc Autret <autret_m@epita.fr>
20989
20990 * src/vcg.h (struct infoname_s): New.
20991 (struct colorentry_s): New.
20992 (graph_s): New fields {vertical,horizontal}_order in structure.
20993 Add `infoname' field.
20994 Add `colorentry' field;
20995 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20996 (G_HORIZONTAL_ORDER): New.
20997 (G_INFONAME): New.
20998 (G_COLORENTRY): New.
20999 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21000 Add output of `infoname'.
21001 Add output of `colorentry'.
21002
21003 2001-08-27 Marc Autret <autret_m@epita.fr>
21004
21005 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21006 This one shadowed a global parameter.
21007
21008 2001-08-24 Marc Autret <autret_m@epita.fr>
21009
21010 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21011 instead of `unsigned'.
21012 (print_state): Do not call obstack_object_size () in obstack_grow ()
21013 to avoid macro variables shadowing.
21014
21015 2001-08-23 Marc Autret <autret_m@epita.fr>
21016
21017 * src/lex.c (percent_table): Typo: s/naem/name/.
21018 Add graph option.
21019 Normalize new options declarations.
21020
21021 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21022
21023 * tests/suite.at: Exercise %header_extension and %source_extension.
21024
21025 2001-08-16 Marc Autret <autret_m@epita.fr>
21026
21027 * src/reader.c (parse_dquoted_param): New.
21028 (parse_header_extension_decl): Use it.
21029 (parse_source_extension_decl): Likewise.
21030
21031 2001-08-16 Marc Autret <autret_m@epita.fr>
21032
21033 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21034 (get_xxxx_str): Use assert () instead of complain ().
21035 Remove return invokations in default cases.
21036 (get_decision_str): Modify default behaviour. Remove second argument.
21037 Echo modifications on calls.
21038 (output_graph): Fix.
21039
21040 2001-08-16 Marc Autret <autret_m@epita.fr>
21041
21042 * src/getargs.c (usage): Update with ``-g, --graph''.
21043
21044 2001-08-16 Marc Autret <autret_m@epita.fr>
21045
21046 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21047 (Option Cross Key): Likewise.
21048 * doc/bison.1: Update.
21049
21050 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
21051
21052 * src/output.c (output_master_parser): Don't finish action_obstack.
21053 (output_parser): Don't care about the muscle action, here.
21054 (prepare): Copy the action_obstack in the action muscle.
21055 (output): Free action_obstack.
21056
21057 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21058
21059 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21060 will contain `%union' declaration.
21061 (parse_union_decl): Delete #line directive output.
21062 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21063 informations about %union.
21064 (parse_union_decl): Copy the union_obstack in the muscle stype.
21065 * src/bison.simple: Add new #line directive.
21066 Add typdef %%stype YYSTYPE.
21067
21068 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21069
21070 * src/bison.simple: Add new `#line' directive.
21071
21072 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
21073
21074 * src/bison.simple: New `#line' directive.
21075 * src/output.c (output_parser): Support new dynamic muscle input_line.
21076
21077 2001-09-22 Marc Autret <autret_m@epita.fr>
21078
21079 * src/output.c (output_master_parser): New.
21080 (output_parser): Be more re-entrant.
21081
21082 2001-09-21 Marc Autret <autret_m@epita.fr>
21083
21084 * src/reader.c (copy_definition, parse_union_decl): Update and use
21085 `linef' muscle.
21086 (copy_action): Likewise.
21087 Use obstack_1grow ().
21088 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21089
21090 2001-09-21 Marc Autret <autret_m@epita.fr>
21091
21092 * src/options.c (option_table): Adjust.
21093 * src/lex.c (parse_percent_token): Fix.
21094
21095 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21096
21097 * src/options.c (symtab.h): Include it, need by lex.h.
21098
21099 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21100
21101 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21102 is now an option_table_struct*.
21103 (option_strcmp): New function option_strcmp.
21104 (parse_percent_token): Call option_strcmp.
21105 * src/getargs.c (xalloc.h, options.h): Include it.
21106 (getargs): Call create_long_option_table.
21107 (getargs): Free longopts at the end of the function.
21108 (shortopts): Move in options.c.
21109 * src/options.c (create_long_option_table): New function. Convert
21110 information from option_table to option structure.
21111 * src/reader.c (options.h): Include it.
21112
21113 * src/Makefile.am: Adjust.
21114 * src/options.c (option_table): Create from longopts and percent_table.
21115 * src/getargs.c (longopts): Delete.
21116 * src/lex.c (struct percent_table_struct): Delete.
21117 (percent_table): Delete.
21118 (options.h): Include it.
21119 * src/options.c: Create.
21120 * src/options.h: Create.
21121 Declare enum opt_access_e.
21122 Define struct option_table_struct.
21123
21124 2001-09-20 Marc Autret <autret_m@epita.fr>
21125
21126 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21127 sections of Bison.
21128
21129 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
21130
21131 * src/bison.simple: s/%%filename/%%skeleton.
21132 * src/muscle_tab.c (getargs.h): Include it.
21133 (muscle_init): Insert new muscle skeleton.
21134
21135 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
21136
21137 * src/output.c (output_parser): Delete unused variable actions_dumped.
21138
21139 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
21140
21141 * src/output.c (output): Delete call to reader_output_yylsp.
21142 * src/reader.c (reader): Likewise.
21143 * src/reader.h: Delete declaration of reader_output_yylsp.
21144
21145 2001-09-02 Marc Autret <autret_m@epita.fr>
21146
21147 * src/reader.c: Include muscle_tab.h.
21148 (parse_union_decl): Update.
21149 (parse_macro_decl): Rename parse_muscle_decl.
21150 Update to use renamed functions and variable.
21151 (read_declarations, copy_action, read_additionnal_code, : Updated
21152 with correct variables and functions names.
21153 (packsymbols, reader): Likewise.
21154
21155 * src/reader.h (muscle_obstack): Extern declaration update.
21156
21157 * src/output.c: Include muscle_tab.h
21158 In all functions using macro_insert, change by using muscle_insert ().
21159 (macro_obstack): Rename muscle_obstack.
21160 Echo modifications in the whole file.
21161 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21162 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21163 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21164
21165 * src/muscle_tab.h: Update double inclusion macros.
21166 (macro_entry_s): Rename muscle_entry_s.
21167 Update prototypes.
21168
21169 * src/muscle_tab.c: Include muscle_tab.h.
21170 Rename macro_tabble to muscle_table.
21171 (mhash1, mhash2, mcmp): Use muscle_entry.
21172 (macro_init): Rename muscle_init. Update.
21173 (macro_insert): Rename muscle_insert. Update.
21174 (macro_find): Rename muscle_find. Update.
21175
21176 * src/main.c: Include muscle_tab.h.
21177 (main): Call muscle_init ().
21178 * src/Makefile.am (bison_SOURCES): Echo modifications.
21179
21180 2001-09-02 Marc Autret <autret_m@epita.fr>
21181
21182 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21183
21184 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21185
21186 2001-09-02 Marc Autret <autret_m@epita.fr>
21187
21188 * src/macrotab.c, src/macrotab.h: Remove.
21189
21190 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
21191
21192 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21193 filename.
21194
21195 2001-09-01 Marc Autret <autret_m@epita.fr>
21196
21197 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21198 to an explicit value to activate the feature. We do it here.
21199
21200 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21201
21202 * src/output.c (prepare): Delete the `filename' muscule insertion.
21203 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21204 (parse_union_decl): Likewise.
21205 * src/macrotab.c (macro_init): Initialize filename by infile.
21206
21207 2001-08-31 Marc Autret <autret_m@epita.fr>
21208
21209 * src/bison.simple (YYLSP_NEEDED): New definition.
21210 * src/output.c (prepare): Add macro insertion of `locations_flag'
21211
21212 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21213
21214 * src/output.c (prepare): Delete insertion of previous muscles,
21215 and insert the `prefix' muscles.
21216 * src/macrotab.c (macro_init): Likewise.
21217 (macro_init): Initialization prefix directive by `yy'.
21218 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21219 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21220 yylval, yydebug, yyerror, yynerrs and yyparse.
21221 New directive `#define' to substitute yydebug, ... with option
21222 name_prefix.
21223
21224 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21225
21226 * src/main.c (main): Standardize.
21227 * src/output.c (output_table_data, output_parser): Likewise.
21228 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21229
21230 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21231
21232 * src/reader.c (read_additionnal_code): Rename %%user_code to
21233 %%epilogue.
21234 * src/output.c (output): Rename %%declarations to %%prologue.
21235 * src/bison.simple: Echo modifications.
21236
21237 2001-08-31 Marc Autret <autret_m@epita.fr>
21238
21239 * src/reader.c (readgram): CleanUp.
21240 (output_token_defines): Likewise.
21241 (packsymbols): Likewise.
21242 (reader): Likewise.
21243 * src/output.c (output): CPP-out useless code.
21244
21245 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21246
21247 * src/reader.c (reader): Delete obsolete call to function
21248 output_trailers and output_headers.
21249 * src/output.h: Remove obsolete functions prototypes of output_headers
21250 and output_trailers.
21251
21252 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
21253
21254 * src/main.c: Include macrotab.h.
21255 * src/macrotab.h (macro_entry_s): Constify fields.
21256 Adjust functions prototypes.
21257 * src/macrotab.c (macro_insert): Constify key and value.
21258 (macro_find): Constify key.
21259 (macro_insert): Include 'xalloc.h'
21260 (macro_insert): Use XMALLOC.
21261 (macro_find): Constify return value.
21262 * src/output.c (output_table_data): Rename table to table_data.
21263 (output_parser): Constify macro_key, macro_value.
21264
21265 2001-08-30 Marc Autret <autret_m@epita.fr>
21266
21267 * src/reader.c (parse_skel_decl): New.
21268 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21269 * src/lex.h (token_t): New token `tok_skel'.
21270 * src/lex.c (percent_table): Add skeleton option entry.
21271 Standardize.
21272
21273 2001-08-29 Marc Autret <autret_m@epita.fr>
21274
21275 * src/bison.simple: Add %%user_code directive at the end.
21276 * src/reader.c (read_additionnal_code): New.
21277 (reader): Use it.
21278 * src/output.c (output_program): Remove.
21279 (output): Update.
21280
21281 2001-08-28 Marc Autret <autret_m@epita.fr>
21282
21283 * src/output.c (output_actions): Clean up.
21284 (output_gram): CPP-out useless code.
21285 * src/reader.c (reader): Clean up, CPP-out useless code.
21286
21287 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
21288
21289 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21290 directive.
21291 * src/bison.simple: Add `%%definitions'.
21292
21293 2001-08-28 Marc Autret <autret_m@epita.fr>
21294
21295 * config/depcomp: New file.
21296
21297 2001-08-27 Paul Eggert <eggert@twinsun.com>
21298
21299 * src/bison.simple (yyparse): Don't take the address of an
21300 item before the start of an array, as that doesn't conform to
21301 the C Standard.
21302
21303 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21304
21305 * src/output.c (output): Remove the initialization of the macro
21306 obstack. It was done too late here.
21307
21308 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21309 completely wrong.
21310 (reader): Initialize the macro obstack here, since we need it to grow
21311 '%define' directives.
21312
21313 * src/reader.h: Declare the macro obstack as extern.
21314
21315 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21316
21317 * src/output.c (output_parser): Fix. Store single '%' characters in
21318 the output obstack instead of throwing them away.
21319
21320 2001-08-27 Akim Demaille <akim@epita.fr>
21321
21322 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21323
21324 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21325
21326 * lib/Makefile.am: Adjust.
21327
21328 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21329
21330 * src/bison.simple: Update and add '%%' directives.
21331
21332 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21333
21334 * src/reader.c (reader): Remove calls to 'output_headers' and
21335 'output_trailers'. Remove some C output.
21336 (readgram): Disable a piece of code that was writing a default
21337 definition for 'YYSTYPE'.
21338 (reader_output_yylsp): Remove.
21339 (packsymbols): Output token defintions to a macro.
21340 (copy_definition): Disable C output.
21341
21342 * src/reader.c (parse_macro_decl): New function used to parse macro
21343 declarations.
21344 (copy_string2): Put the body of copy_string into this new function.
21345 Add a parameter to let the caller choose whether he wants to copy the
21346 string delimiters or not.
21347 (copy_string): Be a simple call to copy_string2 with the last argument
21348 bound to true.
21349 (read_declarations): Add case for macro definition.
21350 (copy_identifier): New.
21351 (parse_macro_decl): Read macro identifiers using copy_identifier
21352 rather than lex.
21353
21354 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21355
21356 * src/output.c (prepare): Add prefixed names.
21357 (output_parser): Output semantic actions.
21358 (output_parser): Fix bug on '%%line' directives.
21359
21360 * src/output.c (output_headers): Remove. The C code printed by this
21361 function should now be in the skeletons.
21362 (output_trailers): Remove.
21363 (output): Disable call to 'reader_output_yylsp'.
21364 (output_rule_data): Do not output tables to the table obstack.
21365
21366 * src/output.c: Remove some C dedicated output.
21367 Improve the use of macro and output obstacks.
21368 (output_defines): Remove.
21369
21370 * src/output.c (output_token_translations): Associate 'translate'
21371 table with a macro. No output to the table obstack.
21372 (output_gram): Same for 'rhs' and 'prhs'.
21373 (output_stos): Same for 'stos'.
21374 (output_rule_data): Same for 'r1' and 'r2'.
21375 (token_actions): Same for 'defact'.
21376 (goto_actions): Same for 'defgoto'.
21377 (output_base): Same for 'pact' and 'pgoto'.
21378 (output_table): Same for 'table'.
21379 (output_check): Same for 'check'.
21380
21381 * src/output.c (output_table_data): New function.
21382 (output_short_table): Remove.
21383 (output_short_or_char_table): Remove.
21384
21385 * src/output.c (output_parser): Replace most of the skeleton copy code
21386 with something new. Skeletons are now processed character by character
21387 rather than line by line, and Bison looks for '%%' macros. This is the
21388 first step in making Bison's output process (a lot) more flexible.
21389 (output_parser): Use the macro table.
21390
21391 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21392
21393 * src/main.c (main): Initialize the macro table.
21394
21395 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21396
21397 * src/lex.c (percent_table): Add tok_define.
21398 * src/lex.h: Add tok_define.
21399
21400 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21401
21402 * src/macrotab.c: New file.
21403 * src/macrotab.h: New file.
21404 * src/Makefile.am: Update.
21405
21406 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21407
21408 * lib/hash.c: New file.
21409 * lib/hash.h: New file.
21410 * lib/Makefile.am: Update.
21411
21412 2001-08-15 Akim Demaille <akim@epita.fr>
21413
21414 Version 1.28c.
21415
21416 2001-08-15 Marc Autret <autret_m@epita.fr>
21417
21418 * src/reader.c (readgram): Indent output macro YYSTYPE.
21419 (packsymbols): Likewise.
21420 (output_token_defines): Likewise.
21421 * src/files.c: Standardize.
21422 (compute_header_macro): New.
21423 (defines_obstack_save): New. Use compute_header_macro.
21424 (output_files): Update. Use defines_obstack_save.
21425
21426 2001-08-15 Akim Demaille <akim@epita.fr>
21427
21428 * doc/bison.texinfo (Table of Symbols): Document
21429 YYSTACK_USE_ALLOCA.
21430
21431 2001-08-15 Akim Demaille <akim@epita.fr>
21432
21433 * missing: Update from CVS Automake.
21434 * config/config.guess, config/config.sub, config/texinfo.tex:
21435 Update from gnu.org.
21436
21437 2001-08-15 Akim Demaille <akim@epita.fr>
21438
21439 * Makefile.maint: Sync with CVS Autoconf.
21440
21441 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21442
21443 * doc/bison.texinfo: Include GNU Free Documentation License from
21444 `fdl.texi'.
21445 * doc/fdl.texi: Add to package.
21446
21447 2001-08-14 Marc Autret <autret_m@epita.fr>
21448
21449 Turn on %{source,header}_extension features.
21450
21451 * src/lex.c (percent_table): Un-CPP out header_extension and
21452 source_extension.
21453 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21454 (compute_exts_from_src): Remove conditions. It restores priorities
21455 between options.
21456
21457 2001-08-14 Marc Autret <autret_m@epita.fr>
21458
21459 * src/files.c (compute_base_names): Add extensions computing when
21460 `--file-prefix' used.
21461 Standardize function calls.
21462
21463 2001-08-13 Marc Autret <autret_m@epita.fr>
21464
21465 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21466 defining it (defined but null disables alloca).
21467
21468 2001-08-13 Marc Autret <autret_m@epita.fr>
21469
21470 * src/bison.simple (_yy_memcpy): CPP reformat.
21471
21472 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21473
21474 * tests/atconfig.in (CPPFLAGS): Fix.
21475
21476 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21477
21478 * doc/bison.texinfo: Include GNU General Public License from
21479 `gpl.texi'.
21480 * doc/gpl.texi: Add to package.
21481
21482 2001-08-10 Marc Autret <autret_m@epita.fr>
21483
21484 * src/print_graph.h: Fix.
21485 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21486
21487 2001-08-10 Akim Demaille <akim@epita.fr>
21488
21489 * src/system.h: Provide default declarations for stpcpy, strndup,
21490 and strnlen.
21491
21492 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21493
21494 * doc/bison.texinfo (Locations): Update @$ stuff.
21495
21496 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21497
21498 * src/bison.simple (YYLLOC_DEFAULT): Update.
21499 (yyparse): Adjust.
21500
21501 2001-08-08 Marc Autret <autret_m@epita.fr>
21502
21503 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21504 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21505 Reported by Fabrice Bauzac.
21506
21507 2001-08-08 Marc Autret <autret_m@epita.fr>
21508
21509 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21510 * src/vcg.c (output_node): Fix.
21511 * src/vcg.h: Cleanup.
21512 * src/print_graph.c: Add comments.
21513 (node_output_size): New global variable. Simplify the formatting of
21514 the VCG graph output.
21515 (print_actions): Unused code is now used. It notifies the final state
21516 and no action states in the VCG graph. It also give the reduce actions.
21517 The `shift and goto' edges are red and the `go to state' edges are
21518 blue.
21519 Get the current node name and node_obstack by argument.
21520 (node_obstack): New variable.
21521 (print_state): Manage node_obstack.
21522 (print_core): Use node_obstack given by argument.
21523 A node is not only computed here but in print_actions also.
21524 (print_graph): CPP out useless code instead of commenting it.
21525
21526 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
21527
21528 * tests/atconfig.in (CPPFLAGS): Fix.
21529
21530 2001-08-07 Akim Demaille <akim@epita.fr>
21531
21532 * src/print_graph.c (quote): New.
21533 (print_core): Use it.
21534
21535 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21536
21537 * src/vcg.c (complain.h): Include it.
21538 Unepitaize `return' invocations.
21539 [NDEBUG] (main): Remove.
21540 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21541 * src/files.c (open_files): Initialize graph_obstack.
21542 * src/print_graph.c (print_actions): CPP out useless code.
21543 (print_core): Don't output the last `\n' in labels.
21544 Use `quote'.
21545 * src/files.c (output_files): Output the VCG file.
21546 * src/main.c (main): Invoke print_graph ();
21547
21548 2001-08-06 Marc Autret <autret_m@epita.fr>
21549
21550 Automaton VCG graph output.
21551 Using option ``-g'' or long option ``--graph'', you can generate
21552 a gram_filename.vcg file containing a VCG description of the LALR (1)
21553 automaton of your grammar.
21554
21555 * src/main.c: Call to print_graph() function.
21556 * src/getargs.h: Update.
21557 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21558 (graph_flag): New flag.
21559 (longopts): Update.
21560 (getargs): Add case `g'.
21561 * src/files.c (graph_obstack): New obstack struct.
21562 (open_files): Initialize new obstack.
21563 (output_files): Saves graph_obstack if required.
21564 * src/files.h (graph_obstack): New extern declaration.
21565 * src/Makefile.am: Add new source files.
21566
21567 2001-08-06 Marc Autret <autret_m@epita.fr>
21568
21569 * src/print_graph.c, src/print_graph.h (graph): New.
21570 * src/vcg.h: New file.
21571 * src/vcg.c: New file, VCG graph handling.
21572
21573 2001-08-06 Marc Autret <autret_m@epita.fr>
21574
21575 Add of %source_extension and %header_extension which specify
21576 the source or/and the header output file extension.
21577
21578 * src/files.c (compute_base_names): Remove initialisation of
21579 src_extension and header_extension.
21580 (compute_exts_from_gf): Update.
21581 (compute_exts_from_src): Update.
21582 (output_files): Update.
21583 * src/reader.c (parse_header_extension_decl): New.
21584 (parse_source_extension_decl): New.
21585 (read_declarations): New case statements for the new tokens.
21586 * src/lex.c (percent_table): Add entries for %source_extension
21587 and %header_extension.
21588 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21589
21590 2001-08-06 Marc Autret <autret_m@epita.fr>
21591
21592 * configure.in: Bump to 1.28c.
21593 * doc/bison.texinfo: Texinfo thingies.
21594
21595 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
21596
21597 * tests/atconfig.in (CPPFLAGS): Add.
21598 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21599
21600 2001-08-03 Akim Demaille <akim@epita.fr>
21601
21602 Version 1.28b.
21603
21604 2001-08-03 Akim Demaille <akim@epita.fr>
21605
21606 * tests/Makefile.am (check-local): Ship testsuite.
21607 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21608 Include `string.h'.
21609
21610 2001-08-03 Akim Demaille <akim@epita.fr>
21611
21612 * configure.in: Try using -Wformat when compiling.
21613
21614 2001-08-03 Akim Demaille <akim@epita.fr>
21615
21616 * configure.in: Bump to 1.28b.
21617
21618 2001-08-03 Akim Demaille <akim@epita.fr>
21619
21620 * src/complain.c: Adjust strerror_r portability issues.
21621
21622 2001-08-03 Akim Demaille <akim@epita.fr>
21623
21624 Version 1.28a.
21625
21626 2001-08-03 Akim Demaille <akim@epita.fr>
21627
21628 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21629 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21630 * src/getargs.c: Include complain.h.
21631 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21632 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21633
21634 2001-08-03 Akim Demaille <akim@epita.fr>
21635
21636 * src/reader.c (readgram): Display hidden chars in error messages.
21637
21638 2001-08-03 Akim Demaille <akim@epita.fr>
21639
21640 Update to gettext 0.10.39.
21641
21642 2001-08-03 Akim Demaille <akim@epita.fr>
21643
21644 * lib/strspn.c: New.
21645
21646 2001-08-01 Marc Autret <autret_m@epita.fr>
21647
21648 * doc/bison.texinfo: Update.
21649 * doc/bison.1 (mandoc): Update.
21650 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21651 * src/files.c: Support output files extensions computing.
21652 (src_extension): New static variable.
21653 (header_extension): New static variable.
21654 (tr): New function.
21655 (get_extension_index): New function, gets the index of an extension
21656 filename in a string.
21657 (compute_exts_from_gf): New function, computes extensions from the
21658 grammar file extension.
21659 (compute_exts_from_src): New functions, computes extensions from the
21660 C source file extension, file given by ``-o'' option.
21661 (compute_base_names): Update.
21662 (output_files): Update.
21663
21664 2001-08-01 Robert Anisko <anisko_r@epita.fr>
21665
21666 * doc/bison.texi: Document @$.
21667 (Locations): New section.
21668
21669 2001-07-18 Akim Demaille <akim@epita.fr>
21670
21671 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21672 * config/prev-version.txt, config/move-if-change: New.
21673 * Makefile.am: Adjust.
21674
21675 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
21676
21677 * src/bison.simple (yyparse): Suppress warning `comparaison
21678 between signed and unsigned'.
21679
21680 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
21681
21682 * src/getargs.h (raw_flag): Remove.
21683 * src/getargs.c: Die on `-r'/`--raw'.
21684 * src/lex.c (parse_percent_token): Die on `%raw'.
21685 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21686 * tests/calc.at: Suppress test with option `--raw'.
21687
21688 2001-07-14 Akim Demaille <akim@epita.fr>
21689
21690 * config/: New.
21691 * configure.in: Require Autoconf 2.50.
21692 Update to gettext 0.10.38.
21693
21694 2001-03-16 Akim Demaille <akim@epita.fr>
21695
21696 * doc/bison.texinfo: ANSIfy the examples.
21697
21698 2001-03-16 Akim Demaille <akim@epita.fr>
21699
21700 * getargs.c (skeleton): New variable.
21701 (longopts): --skeleton is a new option.
21702 (shortopts, getargs): -S is a new option.
21703 * getargs.h: Declare skeleton.
21704 * output.c (output_parser): Use it.
21705
21706 2001-03-16 Akim Demaille <akim@epita.fr>
21707
21708 * m4/strerror_r.m4: New.
21709 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21710 * lib/error.h, lib/error.c: Update.
21711
21712 2001-03-16 Akim Demaille <akim@epita.fr>
21713
21714 * src/getargs.c (longopts): Clean up.
21715
21716 2001-02-21 Akim Demaille <akim@epita.fr>
21717
21718 * src/reader.c (gensym): `gensym_count' is your own.
21719 Use a static buf to create the symbol name, as token_buffer is no
21720 longer a buffer.
21721
21722 2001-02-08 Akim Demaille <akim@epita.fr>
21723
21724 * src/conflicts.c (conflict_report): Be sure not to append to res
21725 between two calls, which could happen if both first sprintf were
21726 skipped, but not the first cp += strlen.
21727
21728 2001-02-08 Akim Demaille <akim@epita.fr>
21729
21730 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21731 New, from fileutils 4.0.37.
21732 * configure.in: Require Autoconf 2.49c. I took some time before
21733 making this decision. This is the only way out for portability
21734 issues in Bison, it would mean way too much duplicate effort to
21735 import in Bison features implemented in 2.49c since 2.13.
21736 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21737
21738 2001-02-02 Akim Demaille <akim@epita.fr>
21739
21740 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
21741 * lib/xalloc.h, lib/xmalloc.c: Update.
21742
21743 2001-01-19 Akim Demaille <akim@epita.fr>
21744
21745 Get rid of the ad hoc handling of token_buffer in the scanner: use
21746 the obstacks.
21747
21748 * src/lex.c (token_obstack): New.
21749 (init_lex): Initialize it. No longer call...
21750 (grow_token_buffer): this. Remove it.
21751 Adjust all the places which used it to use the obstack.
21752
21753 2001-01-19 Akim Demaille <akim@epita.fr>
21754
21755 * src/lex.h: Rename all the tokens:
21756 s/\bENDFILE\b/tok_eof/g;
21757 s/\bIDENTIFIER\b/tok_identifier/g;
21758 etc.
21759 Let them be enums, not #define, to ease debugging.
21760 Adjust all the code.
21761
21762 2001-01-18 Akim Demaille <akim@epita.fr>
21763
21764 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21765 * src/lex.c (maxtoken, grow_token_buffer): Static.
21766
21767 2001-01-18 Akim Demaille <akim@epita.fr>
21768
21769 Since we now use obstacks, more % directives can be enabled.
21770
21771 * src/lex.c (percent_table): Also accept `%yacc',
21772 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21773 `%debug'.
21774 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21775 instead of returning a token.
21776 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21777 * src/reader.c (read_declarations): Adjust.
21778 * src/files.c (open_files): Don't call `compute_base_names', don't
21779 compute `attrsfile' since they depend upon data which might be
21780 *in* the input file now.
21781 (output_files): Do it here.
21782 * src/output.c (output_headers): Document the fact that this patch
21783 introduces a guaranteed SEGV for semantic parsers.
21784 * doc/bison.texinfo: Document them.
21785 * tests/suite.at: Exercise these %options.
21786
21787 2000-12-20 Akim Demaille <akim@epita.fr>
21788
21789 Also handle the output file (--verbose) with obstacks.
21790
21791 * files.c (foutput): Remove.
21792 (output_obstack): New.
21793 Adjust all dependencies.
21794 * src/conflicts.c: Return a string.
21795 * src/system.h (obstack_grow_string): Rename as...
21796 (obstack_sgrow): this. Be ready to work with non literals.
21797 (obstack_fgrow4): New.
21798
21799 2000-12-20 Akim Demaille <akim@epita.fr>
21800
21801 * src/files.c (open_files): Fix the computation of short_base_name
21802 in the case of `-o foo.tab.c'.
21803
21804 2000-12-20 Akim Demaille <akim@epita.fr>
21805
21806 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21807 (copy_dollar): Now that everything uses obstacks, get rid of the
21808 FILE * parameters.
21809
21810 2000-12-20 Akim Demaille <akim@epita.fr>
21811
21812 * src/files.c (open_files): Actually the `.output' file is based
21813 on the short_base_name, not base_name.
21814 * tests/suite.at (Checking output file names): Adjust.
21815
21816 2000-12-20 Akim Demaille <akim@epita.fr>
21817
21818 * src/bison.s1: Remove, we now use directly...
21819 * src/bison.simple: this.
21820 * src/Makefile.am: Use pkgdata instead of data.
21821
21822 2000-12-20 Akim Demaille <akim@epita.fr>
21823
21824 * src/files.c (guard_obstack): New.
21825 (open_files): Initialize it.
21826 (output_files): Dump it...
21827 * src/files.h: Export it.
21828 * src/reader.c (copy_guard): Use it.
21829
21830 2000-12-19 Akim Demaille <akim@epita.fr>
21831
21832 * src/files.c (outfile, defsfile, actfile): Removed as global
21833 vars.
21834 (open_files): Don't compute them.
21835 (output_files): Adjust.
21836 (base_name, short_base_name): Be global.
21837 Adjust dependencies.
21838
21839 2000-12-19 Akim Demaille <akim@epita.fr>
21840
21841 * src/files.c (strsuffix): New.
21842 (stringappend): Be just like strcat but allocate.
21843 (base_names): Eve out from open_files.
21844 Try to simplify the rather hairy computation of base_name and
21845 short_base_name.
21846 (open_files): Use it.
21847 * tests/suite.at (Checking output file names): New test.
21848
21849 2000-12-19 Akim Demaille <akim@epita.fr>
21850
21851 * src/system.h (obstack_grow_literal_string): Rename as...
21852 (obstack_grow_string): this.
21853 * src/output.c (output_parser): Recognize `%% actions' instead of
21854 `$'.
21855 * src/bison.s1: s/$/%% actions/.
21856 * src/bison.hairy: Likewise.
21857
21858 2000-12-19 Akim Demaille <akim@epita.fr>
21859
21860 * src/output.c (output_parser): Compute the `#line' lines when
21861 there are.
21862 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21863 Suggested by Hans Aberg.
21864
21865 2000-12-19 Akim Demaille <akim@epita.fr>
21866
21867 Let the handling of the skeleton files be local to the procedures
21868 that use it.
21869
21870 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21871 longer static.
21872 (fparser, open_extra_files): Remove.
21873 (open_files, output_files): Don't take care of fparser.
21874 * src/files.h: Adjust.
21875 * src/output.c (output_parser): Open and close the file to the
21876 skeleton.
21877 * src/reader.c (read_declarations): When %semantic_parser, open
21878 fguard.
21879
21880 2000-12-19 Akim Demaille <akim@epita.fr>
21881
21882 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21883 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21884
21885 2000-12-19 Akim Demaille <akim@epita.fr>
21886
21887 * src/files.c (open_files): Yipee! We no longer need all the code
21888 looking for `/tmp' since we have no tmp file.
21889
21890 2000-12-19 Akim Demaille <akim@epita.fr>
21891
21892 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21893 New macros.
21894 * src/files.c (open_files): Less dependency on MSDOS etc.
21895
21896 2000-12-14 Akim Demaille <akim@epita.fr>
21897
21898 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21899 Provide a default definition.
21900 Use it when executing the default @ action.
21901 * src/reader.c (reader_output_yylsp): No longer include
21902 `timestamp' and `text' in the default YYLTYPE.
21903
21904 2000-12-12 Akim Demaille <akim@epita.fr>
21905
21906 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21907 (copy_guard): Quote the file names.
21908 Reported by Laurent Mascherpa.
21909
21910 2000-12-12 Akim Demaille <akim@epita.fr>
21911
21912 * src/output.c (output_headers, output_program, output): Be sure
21913 to escape special characters when outputting filenames.
21914 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21915 (output_headers): Don't depend on them, Use ACTSTR.
21916
21917 2000-11-17 Akim Demaille <akim@epita.fr>
21918
21919 * lib/obstack.h: Formatting changes.
21920 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21921 prevents type checking.
21922 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21923 cast the value to (void *): assigning a `foo *' to a `void *'
21924 variable is valid.
21925 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21926 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21927 append characters.
21928
21929 2000-11-17 Akim Demaille <akim@epita.fr>
21930
21931 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21932 as...
21933 (suite.m4, regression.m4, calc.m4): these.
21934 * tests/atgeneral.m4: Update from CVS Autoconf.
21935
21936 2000-11-17 Akim Demaille <akim@epita.fr>
21937
21938 * tests/regression.m4 (%union and --defines): New test,
21939 demonstrating a current bug in the obstack implementation.
21940
21941 2000-11-17 Akim Demaille <akim@epita.fr>
21942
21943 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21944 macros.
21945 Use them to declare the variables which are global or local to
21946 `yyparse'.
21947
21948 2000-11-17 Akim Demaille <akim@epita.fr>
21949
21950 * acconfig.h: Remove, no longer used.
21951
21952 2000-11-07 Akim Demaille <akim@epita.fr>
21953
21954 * src: s/Copyright (C)/Copyright/g.
21955
21956 2000-11-07 Akim Demaille <akim@epita.fr>
21957
21958 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21959 defining.
21960 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21961
21962 2000-11-07 Akim Demaille <akim@epita.fr>
21963
21964 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21965 Merge in a single CPP if/else.
21966
21967 2000-11-07 Akim Demaille <akim@epita.fr>
21968
21969 * src/output.c (output): Remove useless variables.
21970 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21971 argument `data' for consistency with the prototypes.
21972 Qualify it `const'.
21973 (obstack_copy, obstack_copy0): Rename the second argument as
21974 `address' for consistency. Qualify it `const'.
21975 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21976 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21977 `const' their input argument (`data' or `address').
21978 Adjust the corresponding macros to include `const' in casts.
21979
21980 2000-11-03 Akim Demaille <akim@epita.fr>
21981
21982 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21983 s/PFILE1/BISON_HAIRY/.
21984 Adjust dependencies.
21985
21986 2000-11-03 Akim Demaille <akim@epita.fr>
21987
21988 For some reason, this was not applied.
21989
21990 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21991 `unlink': it's no longer used.
21992
21993 2000-11-03 Akim Demaille <akim@epita.fr>
21994
21995 * src/files.c (skeleton_find): New function, eved out of...
21996 (open_files, open_extra_files): here.
21997
21998 2000-11-03 Akim Demaille <akim@epita.fr>
21999
22000 Don't use `atexit'.
22001
22002 * src/files.c (obstack_save): New function.
22003 (done): Rename as...
22004 (output_files): this.
22005 Use `obstack_save'.
22006 * src/main.c (main): Don't use `atexit' to register `done', since
22007 it no longer has to remove tmp files, just call `output_files'
22008 when there are no errors.
22009
22010 2000-11-02 Akim Demaille <akim@epita.fr>
22011
22012 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22013 `unlink': it's no longer used.
22014 * src/files.h: Formatting changes.
22015
22016 2000-11-02 Akim Demaille <akim@epita.fr>
22017
22018 Remove the last uses of mktemp and unlink/delete.
22019
22020 * src/files.c (fdefines, ftable): Removed.
22021 (defines_ostack, table_obstack): New.
22022 Adjust dependencies of the former into uses of the latter.
22023 * src/output.c (output_short_or_char_table, output_short_table):
22024 Convert to using obstacks.
22025 * src/reader.c (copy_comment2): Accept one FILE * and two
22026 obstacks.
22027 (output_token_defines, reader_output_yylsp): Use obstacks.
22028 * src/system.h (obstack_fgrow3): New.
22029 * po/POTFILES.in: Adjust.
22030
22031 2000-11-01 Akim Demaille <akim@epita.fr>
22032
22033 Change each use of `fattrs' into a use of `attrs_obstack'.
22034
22035 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22036 * src/files.c (fattrs): Remove.
22037 (attrs_obstack): New.
22038 Adjust all dependencies.
22039 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22040
22041 2000-11-01 Akim Demaille <akim@epita.fr>
22042
22043 Introduce obstacks.
22044 Change each use of `faction' into a use of `action_obstack'.
22045
22046 * lib/obstack.h, lib/obstack.c: New files.
22047 * src/files.c (faction): Remove.
22048 (action_obstack): New.
22049 Adjust all dependencies.
22050
22051 2000-10-20 Akim Demaille <akim@epita.fr>
22052
22053 * lib/quote.h (PARAMS): New macro. Use it.
22054
22055 2000-10-16 Akim Demaille <akim@epita.fr>
22056
22057 * src/output.c (output_short_or_char_table): New function.
22058 (output_short_table, output_token_translations): Use it.
22059 (goto_actions): Use output_short_table.
22060
22061 2000-10-16 Akim Demaille <akim@epita.fr>
22062
22063 * src/symtab.c (bucket_new): New function.
22064 (getsym): Use it.
22065
22066 * src/output.c (output_short_table): New argument to display the
22067 comment associated with the table.
22068 Adjust dependencies.
22069 (output_gram): Use it.
22070 (output_rule_data): Nicer output layout for YYTNAME.
22071
22072 2000-10-16 Akim Demaille <akim@epita.fr>
22073
22074 * src/lex.c (read_typename): New function.
22075 (lex): Use it.
22076 * src/reader.c (copy_dollar): Likewise.
22077
22078 2000-10-16 Akim Demaille <akim@epita.fr>
22079
22080 * src/reader.c (copy_comment2): Expect the input stream to be on
22081 the `/' which is suspected to open a comment, instead of being
22082 called after `//' or `/*' was read.
22083 (copy_comment, copy_definition, parse_union_decl, copy_action)
22084 (copy_guard): Adjust.
22085
22086 2000-10-16 Akim Demaille <akim@epita.fr>
22087
22088 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22089 `read_signed_integer'.
22090
22091 2000-10-16 Akim Demaille <akim@epita.fr>
22092
22093 * src/reader.c (copy_dollar): New function.
22094 (copy_guard, copy_action): Use it.
22095
22096 2000-10-16 Akim Demaille <akim@epita.fr>
22097
22098 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22099 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22100 New files, from Fileutils 4.0.27.
22101 * src/main.c (printable_version): Remove.
22102 * src/lex.c, src/reader.c: Use `quote'.
22103
22104 2000-10-04 Akim Demaille <akim@epita.fr>
22105
22106 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22107
22108 2000-10-04 Akim Demaille <akim@epita.fr>
22109
22110 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22111
22112 2000-10-04 Akim Demaille <akim@epita.fr>
22113
22114 When a literal string is used to define two different tokens,
22115 `bison -v' segfaults.
22116 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22117
22118 * tests/regression.m4: New file.
22119 Include the core of the sample provided by Piotr Gackiewicz.
22120 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22121 properly.
22122
22123 2000-10-04 Akim Demaille <akim@epita.fr>
22124
22125 * src/reader.c (parse_expect_decl): Keep `count' within the size
22126 of `buffer'.
22127 From Neil Booth.
22128
22129 2000-10-02 Paul Eggert <eggert@twinsun.com>
22130
22131 * bison.s1 (yyparse): Assign the default value
22132 unconditionally, to avoid a GCC warning and make the parser a
22133 tad smaller.
22134
22135 2000-10-02 Akim Demaille <akim@epita.fr>
22136
22137 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22138 options.
22139
22140 2000-10-02 Akim Demaille <akim@epita.fr>
22141
22142 * src/derives.c, src/print.c, src/reduce.c: To ease the
22143 translation, move some `\n' out of the translated strings.
22144
22145 2000-10-02 Akim Demaille <akim@epita.fr>
22146
22147 The location tracking mechanism is precious for parse error
22148 messages. Nevertheless, it is enabled only when `@n' is used in
22149 the grammar, which is a different issue (you can use it in error
22150 message, but not in the grammar per se). Therefore, there should
22151 be another means to enable it.
22152
22153 * src/getargs.c (getargs): Support `--locations'.
22154 (usage): Report it.
22155 * src/getargs.h (locationsflag): Export it.
22156 * src/lex.c (percent_table): Support `%locations'.
22157 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22158 with `locationsflag'.
22159 * doc/bison.texinfo: Document `--locations' and `%locations'.
22160 Sort the options.
22161 * tests/calc.m4: Test it.
22162
22163 For regularity of the names, replace each
22164 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22165 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22166 In addition replace each `flag' with `_flag'.
22167
22168 2000-10-02 Akim Demaille <akim@epita.fr>
22169
22170 Also test parse error messages, including with YYERROR_VERBOSE.
22171
22172 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22173 associative).
22174 Use it to check the computations.
22175 Use it to check `nonassoc' is honored.
22176 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22177 `--yyerror-verbose'.
22178 (_AT_CHECK_CALC): Adjust to this option.
22179 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22180
22181 2000-10-02 Akim Demaille <akim@epita.fr>
22182
22183 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22184 the latter demonstrates a flaw in the handling of non debugging
22185 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22186 was used in order to simplify:
22187
22188 #if YYDEBUG
22189 if (yydebug)
22190 {
22191 ...
22192 }
22193 #endif
22194
22195 into
22196
22197 if (yydebug)
22198 {
22199 ...
22200 }
22201
22202 unfortunately this leads to a CPP conflict when
22203 `--name-prefix=foo' is used since it produces `#define yydebug
22204 foodebug'.
22205
22206 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22207 (YYDPRINTF): New macro.
22208 Spread its use.
22209 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22210 the bison options.
22211 Also test `--verbose', `--defines' and `--name-prefix'.
22212
22213 2000-10-02 Akim Demaille <akim@epita.fr>
22214
22215 Improve the readability of the produced parsers.
22216
22217 * src/bison.s1: Formatting changes.
22218 Improve the comment related to the `$' mark.
22219 (yydefault): Don't fall through to `yyresume': `goto' there.
22220 * src/output.c (output_parser): When the `$' is met, skip the end
22221 of its line.
22222 New variable, `number_of_dollar_signs', to check there's exactly
22223 one `$' in the parser skeleton.
22224
22225 2000-10-02 Akim Demaille <akim@epita.fr>
22226
22227 * lib/xstrdup.c: New file, from the fileutils.
22228 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22229 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22230 instead of strlen + xmalloc + strcpy.
22231 * src/symtab.c (copys): Remove, use xstrdup instead.
22232
22233 2000-10-02 Akim Demaille <akim@epita.fr>
22234
22235 * src/gram.h (associativity): New enum type which replaces the
22236 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22237 `right_assoc', `left_assoc' and `non_assoc'.
22238 Adjust all dependencies.
22239 * src/reader.c: Formatting changes.
22240 (LTYPESTR): Don't define it, use it as a literal in
22241 `reader_output_yylsp'.
22242 * src/symtab.h (symbol_class): New enum type which replaces the
22243 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22244 `sunknown', `stoken and `snterm'.
22245
22246 2000-10-02 Akim Demaille <akim@epita.fr>
22247
22248 * src/getargs.c (fixed_outfiles): Rename as...
22249 (yaccflag): for consistency and accuracy.
22250 Adjust dependencies.
22251
22252 2000-10-02 Akim Demaille <akim@epita.fr>
22253
22254 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22255 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22256 difficult and introduced a lot of core dump. It turns out that
22257 Bison used an implementation of `xmalloc' based on `calloc', and
22258 at various places it does depend upon the initialization to 0. I
22259 have not tried to isolate the pertinent places, and all the former
22260 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22261 someone should address this issue.
22262
22263 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22264 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22265 files.
22266 Adjust dependencies.
22267 * src/warshall.h: New file.
22268 Propagate.
22269
22270 2000-10-02 Akim Demaille <akim@epita.fr>
22271
22272 Various anti-`extern in *.c' changes.
22273
22274 * src/system.h: Include `assert.h'.
22275
22276 2000-10-02 Akim Demaille <akim@epita.fr>
22277
22278 * src/state.h (nstates, final_state, first_state, first_shift)
22279 (first_reduction): Move their exportation from here...
22280 * src/LR0.h: to here.
22281 Adjust dependencies.
22282 * src/getargs.c (statisticsflag): New variable.
22283 Add support for `--statistics'.
22284 Adjust dependencies.
22285
22286 Remove a lot of now useless `extern' statements in most files.
22287
22288 2000-10-02 Akim Demaille <akim@epita.fr>
22289
22290 * src/LR0.h: New file.
22291 Propagate its use.
22292
22293 2000-10-02 Akim Demaille <akim@epita.fr>
22294
22295 * src/print.h: New file.
22296 Propagate its use.
22297 * src/print.c: Formatting and ordering changes.
22298 (verbose, terse): Replace with...
22299 (print_results): this new function.
22300 Adjust dependencies.
22301
22302 2000-10-02 Akim Demaille <akim@epita.fr>
22303
22304 * src/conflicts.c (conflict_report): New function.
22305 (conflict_log, verbose_conflict_log): Replace with...
22306 (print_conflicts): this function.
22307 Adjust dependencies.
22308 * src/conflicts.h: New file.
22309 Propagate its inclusion.
22310
22311 2000-10-02 Akim Demaille <akim@epita.fr>
22312
22313 * src/nullable.h: New file.
22314 Propagate its inclusion.
22315 * src/nullable.c: Formatting changes.
22316
22317 2000-10-02 Akim Demaille <akim@epita.fr>
22318
22319 * src/reduce.h: New file.
22320 Propagate its inclusion.
22321 * src/reduce.c: Topological sort and other formatting changes.
22322 (bool, TRUE, FALSE): Move their definition to...
22323 * src/system.h: here.
22324
22325 2000-10-02 Akim Demaille <akim@epita.fr>
22326
22327 * src/files.c: Formatting changes.
22328 (tryopen, tryclose, openfiles): Rename as...
22329 (xfopen, xfclose, open_files): this.
22330 (stringappend): static.
22331 * src/files.h: Complete the list of exported symbols.
22332 Propagate its use.
22333
22334 2000-10-02 Akim Demaille <akim@epita.fr>
22335
22336 * src/reader.h: New file.
22337 Propagate its use instead of tedious list of `extern' and
22338 prototypes.
22339 * src/reader.c: Formatting changes, topological sort,
22340 s/register//.
22341
22342 2000-10-02 Akim Demaille <akim@epita.fr>
22343
22344 * src/lex.h: Prototype `lex.c' exported functions.
22345 * src/reader.c: Adjust.
22346 * src/lex.c: Formatting changes.
22347 (safegetc): Rename as...
22348 (xgetc): this.
22349
22350 2000-10-02 Akim Demaille <akim@epita.fr>
22351
22352 * src/lalr.h: New file.
22353 Propagate its inclusion instead of prototypes and `extern'.
22354 * src/lalr.c: Formatting changes, topological sorting etc.
22355
22356 2000-10-02 Akim Demaille <akim@epita.fr>
22357
22358 * src/output.c (token_actions): Introduce a temporary array,
22359 YYDEFACT, that makes it possible for this function to use
22360 output_short_table.
22361
22362 2000-10-02 Akim Demaille <akim@epita.fr>
22363
22364 `user_toknums' is output as a `short[]' in `output.c', while it is
22365 defined as a `int[]' in `reader.c'. For consistency with the
22366 other output tables, `user_toknums' is now defined as a table of
22367 shorts.
22368
22369 * src/reader.c (user_toknums): Be a short table instead of an int
22370 table.
22371 Adjust dependencies.
22372
22373 Factor the short table outputs.
22374
22375 * src/output.c (output_short_table): New function.
22376 * src/output.c (output_gram, output_stos, output_rule_data)
22377 (output_base, output_table, output_check): Use it.
22378
22379 2000-10-02 Akim Demaille <akim@epita.fr>
22380
22381 * src/output.c (output): Topological sort of the functions, in
22382 order to get rid of the `static' prototypes.
22383 No longer use `register'.
22384 * src/output.h: New file.
22385 Propagate its inclusion in files explicitly prototyping functions
22386 from output.c.
22387
22388 2000-09-21 Akim Demaille <akim@epita.fr>
22389
22390 * src/atgeneral.m4: Update from Autoconf.
22391
22392 2000-09-21 Akim Demaille <akim@epita.fr>
22393
22394 * src/closure.h: New file.
22395 * src/closure.c: Formatting changes, topological sort over the
22396 functions, use of closure.h.
22397 (initialize_closure, finalize_closure): Rename as...
22398 (new_closure, free_closure): these. Adjust dependencies.
22399 * src/LR0.c: Formatting changes, topological sort, use of
22400 cloture.h.
22401 (initialize_states): Rename as...
22402 (new_states): this.
22403 * src/Makefile.am (noinst_HEADERS): Adjust.
22404
22405 2000-09-20 Akim Demaille <akim@epita.fr>
22406
22407 * src/acconfig.h: Don't protect config.h against multiple
22408 inclusion.
22409 Don't define PARAMS.
22410 * src/system.h: Define PARAMS.
22411 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22412 purpose of config.h. system.h must not try to fix wrong
22413 definitions in config.h.
22414
22415 2000-09-20 Akim Demaille <akim@epita.fr>
22416
22417 * src/derives.h: New file.
22418 * src/main.c, src/derives.h: Use it.
22419 Formatting changes.
22420 * src/Makefile.am (noinst_HEADERS): Adjust.
22421
22422 2000-09-20 Akim Demaille <akim@epita.fr>
22423
22424 * tests/atgeneral.m4: Update from Autoconf.
22425 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22426 (AT_CHECK_CALC): New macros.
22427 Use these macros to test bison with options `', `--raw',
22428 `--debug', `--yacc', `--yacc --debug'.
22429
22430 2000-09-19 Akim Demaille <akim@epita.fr>
22431
22432 * src/output.c: Formatting changes.
22433 * src/machine.h: Remove, leaving its contents in...
22434 * src/system.h: here.
22435 Include stdio.h.
22436 Adjust all dependencies on stdio.h and machine.h.
22437 * src/getargs.h: New file.
22438 Let all `extern' declarations about getargs.c be replaced with
22439 inclusion of `getargs.h'.
22440 * src/Makefile.am (noinst_HEADERS): Adjust.
22441
22442 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22443 scope.
22444 (yyerror): Returns void, not int.
22445 * doc/bison.texinfo: Formatting changes.
22446
22447 2000-09-19 Akim Demaille <akim@epita.fr>
22448
22449 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22450 portable.
22451
22452 2000-09-18 Akim Demaille <akim@epita.fr>
22453
22454 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22455 * src/Makefile.am (INCLUDES): Don't.
22456 Be ready to fetch headers in lib/.
22457
22458 2000-09-18 Akim Demaille <akim@epita.fr>
22459
22460 * doc/bison.texinfo: Update the copyright.
22461 ANSIfy and GNUify the examples.
22462 Remove the old menu.
22463
22464 2000-09-18 Akim Demaille <akim@epita.fr>
22465
22466 First set of tests: use the `calc' example from the documentation.
22467
22468 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22469 is defined only when YYDEBUG is.
22470 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22471 * src/files.c (tryopen, tryclose): Formatting changes.
22472 Move to the top and be static.
22473 * src/reader.c (read_signed_integer): Likewise.
22474 * tests/calc.m4: New file.
22475 * Makefile.am, suite.m4: Adjust.
22476 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22477
22478 2000-09-18 Akim Demaille <akim@epita.fr>
22479
22480 Add support for an Autotest test suite for Bison.
22481
22482 * m4/m4.m4, m4/atconfig.m4: New files.
22483 * m4/Makefile.am (EXTRA_DIST): Adjust.
22484 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22485 files.
22486 * src/getargs.c: Display a more standard --version message.
22487 * src/reader.c (reader): Formatting changes.
22488 No longer depend upon VERSION_STRING.
22489 * configure.in: No longer use `dnl'.
22490 Set up the test suite and the new directory `tests/.
22491 (VERSION_STRING): Remove.
22492
22493 2000-04-14 Akim Demaille <akim@epita.fr>
22494
22495 * src/reader.c (copy_comment2): New function, same as former
22496 `copy_comment', but outputs into two FILE *.
22497 (copy_comment): Use it.
22498 (parse_union_decl): Use it.
22499 (get_type, parse_start_decl): Use the same `invalid' message.
22500 (parse_start_decl, parse_union_decl): Use the same `multiple'
22501 message.
22502 (parse_union_decl, copy_guard, copy_action): Use the same
22503 `unmatched' message.
22504 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22505
22506 2000-03-31 Akim Demaille <akim@epita.fr>
22507
22508 * src/files.c (tryopen, tryclose): Move to the top.
22509 Be static.
22510
22511 2000-03-31 Akim Demaille <akim@epita.fr>
22512
22513 * src/main.c (main): Don't call `done', exit does it.
22514
22515 2000-03-31 Akim Demaille <akim@epita.fr>
22516
22517 * allocate.c: s/return (foo)/return foo/.
22518 * lalr.c: Likewise.
22519 * LR0.c: Likewise.
22520 * output.c: Likewise.
22521 * reader.c: Likewise.
22522 * symtab.c: Likewise.
22523 * vmsgetargs.c: Likewise.
22524
22525 2000-03-31 Akim Demaille <akim@epita.fr>
22526
22527 Clean up the error reporting functions.
22528
22529 * src/report.c: New file.
22530 * src/report.h: Likewise.
22531 * src/Makefile.am: Adjust.
22532 * m4/error.m4: New file.
22533 * m4/Makefile.am: Adjust.
22534 * configure.in (jm_PREREQ_ERROR): Call it.
22535 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22536 Remove.
22537 (fatal, fatals): Remove. All callers use complain.c::fatal.
22538 (warn, warni, warns, warnss, warnss): Remove. All callers use
22539 complain.c::complain.
22540 (toomany): Remove, use fatal instead.
22541 * src/files.c (done): No argument, use complain_message_count.
22542 * src/main.c (main): Register `done' to `atexit'.
22543
22544 * src/getargs.c (usage): More `fputs', less `fprintf'.
22545
22546 2000-03-28 Akim Demaille <akim@epita.fr>
22547
22548 * lib/: New directory.
22549 * Makefile.am (SUBDIRS): Adjust.
22550 * configure.in: Adjust.
22551 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22552 useless.
22553 * src/alloca.c: Moved to lib/.
22554 * src/getopt.c: Likewise.
22555 * src/getopt1.c: Likewise.
22556 * src/getopt.h: Likewise.
22557 * src/ansi2knr.c: Likewise.
22558 * src/ansi2knr.1: Likewise.
22559 * src/Makefile.am: Adjust.
22560 * lib/Makefile.am: New file.
22561
22562 2000-03-28 Akim Demaille <akim@epita.fr>
22563
22564 * src/getargs.c (usage): Refresh the help message.
22565
22566 2000-03-17 Akim Demaille <akim@epita.fr>
22567
22568 * src/getopt1.c: Updated from textutils 2.0e
22569 * src/getopt.c: Likewise.
22570 * src/getopt.h: Likewise.
22571
22572 2000-03-17 Akim Demaille <akim@epita.fr>
22573
22574 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22575 the file name, not the whole `#line LINE FILE'.
22576
22577 2000-03-17 Akim Demaille <akim@epita.fr>
22578
22579 On syntax errors, report the token on which we choked.
22580
22581 * src/bison.s1 (yyparse): In the label yyerrlab, when
22582 YYERROR_VERBOSE, add yychar in msg.
22583
22584 2000-03-17 Akim Demaille <akim@epita.fr>
22585
22586 * src/reader.c (copy_at): New function.
22587 (copy_guard): Use it.
22588 (copy_action): Use it.
22589
22590 2000-03-17 Akim Demaille <akim@epita.fr>
22591
22592 Be kind to translators, save some useless translations.
22593
22594 * src/main.c (banner): New function.
22595 (fatal_banner): Use it.
22596 (warn_banner): Use it.
22597
22598 2000-03-17 Akim Demaille <akim@epita.fr>
22599
22600 * src/reader.c (copy_definition): Use copy_string and
22601 copy_comment. Removed now unused `match', `ended',
22602 `cplus_comment'.
22603 (copy_comment, copy_string): Moved, to be visible from
22604 copy_definition.
22605
22606 2000-03-17 Akim Demaille <akim@epita.fr>
22607
22608 * src/reader.c (copy_string): Declare `static inline'. No
22609 problems with inline, since it is checked by configure.
22610 (copy_comment): Likewise.
22611
22612 2000-03-17 Akim Demaille <akim@epita.fr>
22613
22614 * src/reader.c (packsymbols): Formatting changes.
22615
22616 2000-03-17 Akim Demaille <akim@epita.fr>
22617
22618 * src/reader.c (copy_comment): New function, factored out from:
22619 (copy_action): Use it. Removed now unused `match', `ended',
22620 `cplus_comment'.
22621 (copy_guard): Likewise.
22622
22623 2000-03-17 Akim Demaille <akim@epita.fr>
22624
22625 * src/reader.c (copy_string): New function, factored out from:
22626 (copy_action): Use it.
22627 (copy_guard): Likewise.
22628
22629 2000-03-17 Akim Demaille <akim@epita.fr>
22630
22631 Change the handling of @s so that they behave exactly like $s.
22632 There is now a pseudo variable @$ (readble and writable), location
22633 of the lhs of the rule (by default ranging from the location of
22634 the first symbol of the rhs, to the location of the last symbol,
22635 or, if the rhs is empty, YYLLOC).
22636
22637 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22638 yyval.
22639 (yyparse): When providing a default semantic action, provide a
22640 default location action.
22641 (after the $): No longer change `*YYLSP', just stack YYLOC the
22642 same way you stack YYVAL.
22643 * src/reader.c (read_declarations): Use warns.
22644 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22645 (copy_action, case '@'): Likewise.
22646 Use a standard error message, to save useless work from
22647 translators.
22648
22649 2000-03-17 Akim Demaille <akim@epita.fr>
22650
22651 * src/bison.s1: Formatting and cosmetics changes.
22652 * src/reader.c: Likewise.
22653 Update the Copyright notice.
22654
22655 2000-03-17 Akim Demaille <akim@epita.fr>
22656
22657 * src/bison.s1 (#line): All set to `#line' only, since the
22658 Makefile now handles them.
22659
22660 2000-03-16 Akim Demaille <akim@epita.fr>
22661
22662 * src/output.c (output_rule_data): Output the documentation of
22663 some of the tables.
22664 (Copyright notice): Update.
22665 Formatting changes.
22666
22667 2000-03-16 Akim Demaille <akim@epita.fr>
22668
22669 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22670 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22671 One `#if YYDEBUG' remains, since it uses variables which are
22672 defined only if `YYDEBUG != 0'.
22673
22674 2000-03-16 Akim Demaille <akim@epita.fr>
22675
22676 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22677 and related variables so that the similarities are highlighted.
22678
22679 2000-03-16 Akim Demaille <akim@epita.fr>
22680
22681 * src/bison.s1: Properly indent CPP directives.
22682
22683 2000-03-16 Akim Demaille <akim@epita.fr>
22684
22685 * src/bison.s1: Properly indent the `alloca' CPP section.
22686
22687 2000-03-16 Akim Demaille <akim@epita.fr>
22688
22689 Do not hard code values of directories in `configure.in'.
22690 Update the `configure' tool chain.
22691
22692 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22693 src/makefile.am.
22694 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22695 (AC_OUTPUT): Add m4/Makefile.
22696 Bump to bison 1.28a, 1.29 has never been released.
22697 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22698 handled via src/Makefile.am.
22699 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22700 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22701 autoheader.
22702 * Makefile.am (SUBDIRS): Add m4.
22703 (ACLOCAL_AM_FLAGS): New variable.
22704 (AUTOMAKE_OPTIONS): Add check-news.
22705 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22706 the proper line number and file name.
22707 (DEFS): Propagate the location of bison library files and of the
22708 locale files.
22709 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22710 builddir.
22711 * acinclude.m4: Remove, replaced by the directory m4.
22712 * m4/Makefile.am (EXTRA_DIST): New variable.
22713 * m4/gettext.m4: New file, from the fileutils.
22714 * m4/lcmessage.m4: Likewise
22715 * m4/progtest.m4: Likewise.
22716 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22717
22718 2000-03-10 Akim Demaille <akim@epita.fr>
22719
22720 * src/closure.c:
22721 Formatting changes of various comments.
22722 Respect the GNU coding standards at various places.
22723 Don't use `_()' when no translation is needed.
22724
22725 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22726
22727 * src/files.c:
22728 OS/2 honors TMPDIR environment variable.
22729
22730 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22731
22732 * doc/bison.texinfo: Tweaked spelling and grammar.
22733 Updated ISBN.
22734 Removed reference to price of printed copy.
22735 Mention BISON_SIMPLE and BISON_HAIRY.
22736
22737 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22738
22739 * configure.in, NEWS:
22740 Bison 1.29 released.
22741
22742 1999-10-27 Jesse Thilo <jthilo@gnu.org>
22743
22744 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22745 Added reference card.
22746
22747 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22748
22749 * po/ru.po: Added Russian translation.
22750
22751 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22752
22753 * configure.in: Added Russian translation.
22754
22755 1999-07-06 Jesse Thilo <jthilo@gnu.org>
22756
22757 * configure.in, NEWS, README:
22758 Released version 1.28.
22759
22760 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22761
22762 * src/system.h:
22763 Squashed redefinition warning on some systems.
22764
22765 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22766 Have configure build version string instead of relying on ANSI string
22767 concatentation.
22768
22769 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22770
22771 * po/POTFILES.in: Got rid of version.c.
22772
22773 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22774
22775 * acconfig.h, configure.in:
22776 Have configure build version string instead of relying on ANSI string
22777 concatentation.
22778
22779 1999-06-08 Jesse Thilo <jthilo@gnu.org>
22780
22781 * doc/bison.1:
22782 Dropped mention of `+' for long-named options.
22783
22784 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22785
22786 * src/files.c: Added <unistd.h> for unlink().
22787
22788 * src/Makefile.am, src/system.h:
22789 I18n fixes.
22790
22791 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22792
22793 * README: Added a FAQ list.
22794
22795 * configure.in, acconfig.h:
22796 I18n fixes.
22797
22798 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22799
22800 * doc/FAQ, doc/Makefile.am:
22801 Added a FAQ list.
22802
22803 1999-05-19 Jesse Thilo <jthilo@gnu.org>
22804
22805 * src/alloc.h, src/symtab.h, src/version.c:
22806 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22807
22808 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22809
22810 * src/.cvsignore, src/Makefile.am:
22811 Reorganized: sources in `src', documentation in `doc'.
22812
22813 * src/lex.c (literalchar):
22814 fixed the code for escaping double quotes (thanks
22815 Jonathan Czisny.)
22816
22817 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22818
22819 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22820 Adjusted paths to reflect directory reorganization.
22821
22822 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22823
22824 * doc/.cvsignore, doc/Makefile.am:
22825 Reorganized: sources in `src', documentation in `doc'.
22826
22827 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22828
22829 * configure.in:
22830 Updated AC_INIT file to reflect directory reorganization.
22831
22832 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22833 Reorganized: sources in `src', documentation in `doc'.
22834
22835 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22836
22837 * src/allocate.c:
22838 Don't declare calloc() and realloc() if not necessary.
22839
22840 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22841
22842 * configure.in, acconfig.h, acinclude.m4:
22843 Don't declare calloc() and realloc() if not necessary.
22844
22845 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22846
22847 * po/.cvsignore: Added i18n support.
22848
22849 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22850
22851 * acconfig.h, configure.in, Makefile.am:
22852 Added i18n support.
22853
22854 1999-03-22 Jesse Thilo <jthilo@gnu.org>
22855
22856 * src/bison.s1: Fixed #line numbers.
22857
22858 1999-03-15 Jesse Thilo <jthilo@gnu.org>
22859
22860 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22861 Added PO files from Translation Project.
22862
22863 1999-03-03 Jesse Thilo <jthilo@gnu.org>
22864
22865 * Makefile.am:
22866 Added support for non-ANSI compilers (ansi2knr).
22867
22868 1999-02-16 Jesse Thilo <jthilo@gnu.org>
22869
22870 * configure.in: Bumped version number to 1.27.
22871
22872 * Makefile.am:
22873 Added `bison.simple' to list of files removed by `make distclean'.
22874
22875 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22876
22877 * src/files.c, src/files.h:
22878 Defined locations of parser files in config.h instead of Makefile.
22879
22880 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22881
22882 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22883 Defined locations of parser files in config.h instead of Makefile.
22884
22885 1999-02-09 Jesse Thilo <jthilo@gnu.org>
22886
22887 * Makefile.am:
22888 Removed inappropriate use of $< macro.
22889
22890 1999-02-05 Jesse Thilo <jthilo@gnu.org>
22891
22892 * po/Makefile.in.in, po/POTFILES.in:
22893 Add `po' directory skeleton.
22894
22895 1999-01-27 Jesse Thilo <jthilo@gnu.org>
22896
22897 * README: Document help-bison list.
22898
22899 * configure.in: Add check for mkstemp().
22900
22901 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22902
22903 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22904 Hush a few compiler warnings.
22905
22906 * src/files.c:
22907 Add tryclose(), which verifies that fclose was successful.
22908 Hush a couple of compiler warnings.
22909
22910 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22911
22912 * Makefile.am, OChangeLog:
22913 ChangeLog is now automatically generated. Include the old version as
22914 OChangeLog.
22915
22916 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22917
22918 * 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:
22919 Update FSF address.
22920
22921 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22922
22923 * doc/bison.texinfo: Fix formatting glitch.
22924
22925 * doc/bison.texinfo: Update FSF address.
22926
22927 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22928
22929 * acconfig.h: Update FSF address.
22930
22931 1999-01-08 Jesse Thilo <jthilo@gnu.org>
22932
22933 * src/system.h:
22934 Don't define PACKAGE here, since config.h defines it.
22935
22936 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22937
22938 * src/reader.c: Update copyright date.
22939
22940 * src/main.c:
22941 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22942 favor of output directly to stderr (avoids buffer overruns).
22943
22944 * src/reader.c: Some checks for premature EOF.
22945
22946 * 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:
22947 Use prototypes if the compiler understands them.
22948
22949 * src/files.c: Honor TMPDIR on Unix hosts.
22950 Use prototypes if the compiler understands them.
22951
22952 * src/reader.c:
22953 Fix a couple of buffer overrun bugs.
22954 Use prototypes if the compiler understands them.
22955
22956 * src/system.h: Include unistd.h and ctype.h.
22957 Use #ifdef instead of #if for NLS symbols.
22958
22959 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22960
22961 * doc/bison.texinfo:
22962 Delete comment "consider using @set for edition number, etc..." since
22963 we now are doing so.
22964
22965 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22966
22967 * configure.in:
22968 Use prototypes if the compiler understands them.
22969
22970 * NEWS: Document 1.26 highlights.
22971
22972 * Makefile.am: Require Automake 1.3 or later.
22973
22974 * acconfig.h:
22975 Use prototypes if the compiler understands them.
22976
22977 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22978
22979 * src/version.c:
22980 Use VERSION symbol from automake for version number.
22981
22982 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22983
22984 * acconfig.h, configure.in, version.cin:
22985 Use VERSION symbol from automake for version number.
22986
22987 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22988
22989 * Makefile.am:
22990 Distribute original version of simple parser (bison.s1), not built
22991 version (bison.simple).
22992
22993 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22994
22995 * doc/bison.texinfo: Add info dir entry.
22996
22997 * doc/bison.texinfo:
22998 Let automake put version number into documentation.
22999
23000 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23001
23002 * src/bison.cld, src/build.com, src/vmshlp.mar:
23003 Add non-RCS files from /gd/gnu/bison.
23004
23005 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23006
23007 * doc/bison.1:
23008 Document the BISON_HAIRY and BISON_SIMPLE variables.
23009
23010 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23011
23012 * src/version.c: Build version.c automatically.
23013
23014 * src/reader.c:
23015 Fix token numbering (used to start at 258, not 257).
23016
23017 * src/system.h: Include config.h.
23018
23019 * src/getargs.c: Update bug report address.
23020
23021 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23022 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23023
23024 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23025
23026 * Makefile.am:
23027 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23028
23029 * configure.in, version.cin:
23030 Build version.c automatically.
23031
23032 * AUTHORS: Add AUTHORS file.
23033
23034 * README: Update bug report address.
23035
23036 * bison.simple:
23037 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23038
23039 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23040 Add automake stuff.
23041
23042 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23043
23044 * doc/bison.texinfo: Clean up some formatting.
23045
23046 1998-05-05 Richard Stallman <rms@gnu.org>
23047
23048 * doc/bison.texinfo:
23049 Explain better why to make a pure parser.
23050
23051 1998-01-05 Richard Stallman <rms@gnu.org>
23052
23053 * src/files.c (openfiles):
23054 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23055 find a temporary directory, if possible. Do not unlink files while
23056 they are open.
23057
23058 1997-08-25 Richard Stallman <rms@gnu.org>
23059
23060 * src/reader.c (stack_offset;):
23061 Change some warni to warns.
23062
23063 * src/lex.c (literalchar): Use warns, not warni.
23064
23065 1997-06-28 Richard Stallman <rms@gnu.org>
23066
23067 * src/bison.s1: Add a Bison version comment.
23068
23069 * src/main.c (fatal, warn, berror):
23070 Use program_name.
23071
23072 1997-06-28 Richard Stallman <rms@gnu.org>
23073
23074 * Makefile.in (bison_version): New variable.
23075 (dist): Use that variable.
23076 (bison.s1): Substitute the Bison version into bison.simple.
23077
23078 * bison.simple: Add a Bison version comment.
23079
23080 1997-06-18 Richard Stallman <rms@gnu.org>
23081
23082 * src/main.c (fatal, warn, berror):
23083 Make error messages standard.
23084 (toomany): Improve error message text.
23085
23086 * 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:
23087 new.h renamed to alloc.h.
23088
23089 1997-06-18 Richard Stallman <rms@gnu.org>
23090
23091 * Makefile.in: new.h renamed to alloc.h.
23092
23093 1997-05-24 Richard Stallman <rms@gnu.org>
23094
23095 * src/lex.c (literalchar):
23096 Fix the code for escaping \, " and '.
23097
23098 (lex): Avoid trouble when there are many chars
23099 to discard in a char literal with just several chars in it.
23100
23101 1997-05-17 Richard Stallman <rms@gnu.org>
23102
23103 * src/bison.s1:
23104 Use malloc, if using alloca is troublesome.
23105 (YYSTACK_USE_ALLOCA): New flag macro.
23106 Define it for some systems and compilers.
23107 (YYSTACK_ALLOC): New macro.
23108 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23109 If it was malloc'd, free it.
23110
23111 1997-05-17 Richard Stallman <rms@gnu.org>
23112
23113 * bison.simple:
23114 Use malloc, if using alloca is troublesome.
23115 (YYSTACK_USE_ALLOCA): New flag macro.
23116 Define it for some systems and compilers.
23117 (YYSTACK_ALLOC): New macro.
23118 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23119 If it was malloc'd, free it.
23120
23121 1997-04-23 Richard Stallman <rms@gnu.org>
23122
23123 * src/bison.s1:
23124 (alloca) [__hpux]: Always define as __builtin_alloca.
23125
23126 1997-04-23 Richard Stallman <rms@gnu.org>
23127
23128 * bison.simple:
23129 (alloca) [__hpux]: Always define as __builtin_alloca.
23130
23131 1997-04-22 Richard Stallman <rms@gnu.org>
23132
23133 * src/bison.s1:
23134 [__hpux]: Include alloca.h (right for HPUX 10)
23135 instead of declaring alloca (right for HPUX 9).
23136
23137 * src/bison.s1 (__yy_memcpy):
23138 Declare arg `count' as unsigned int.
23139 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23140
23141 1997-04-22 Richard Stallman <rms@gnu.org>
23142
23143 * bison.simple:
23144 [__hpux]: Include alloca.h (right for HPUX 10)
23145 instead of declaring alloca (right for HPUX 9).
23146
23147 * bison.simple (__yy_memcpy):
23148 Declare arg `count' as unsigned int.
23149 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23150
23151 1997-01-03 Richard Stallman <rms@gnu.org>
23152
23153 * src/allocate.c: [__STDC__ or _MSC_VER]:
23154 Declare calloc and realloc to return void *.
23155
23156 1997-01-02 Richard Stallman <rms@gnu.org>
23157
23158 * src/system.h:
23159 [_MSC_VER]: Include stdlib.h and process.h.
23160 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23161
23162 * src/main.c (main): Return FAILURE as a value.
23163 (printable_version): Declare arg as int, not char.
23164
23165 1997-01-02 Richard Stallman <rms@gnu.org>
23166
23167 * Makefile.in (dist):
23168 Explicitly check for symlinks, and copy them.
23169
23170 1996-12-19 Richard Stallman <rms@gnu.org>
23171
23172 * src/files.c:
23173 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23174
23175 1996-12-18 Paul Eggert <eggert@gnu.org>
23176
23177 * src/bison.s1 (yyparse):
23178 If __GNUC__ and YYPARSE_PARAM are both defined,
23179 declare yyparse to have a void * argument.
23180
23181 1996-12-18 Paul Eggert <eggert@gnu.org>
23182
23183 * bison.simple (yyparse):
23184 If __GNUC__ and YYPARSE_PARAM are both defined,
23185 declare yyparse to have a void * argument.
23186
23187 1996-12-17 Richard Stallman <rms@gnu.org>
23188
23189 * src/reduce.c (nbits): Add some casts.
23190
23191 1996-08-12 Richard Stallman <rms@gnu.org>
23192
23193 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23194
23195 1996-08-12 Richard Stallman <rms@gnu.org>
23196
23197 * bison.simple: Test _MSDOS as well as _MSDOS_.
23198
23199 1996-07-31 Richard Stallman <rms@gnu.org>
23200
23201 * src/bison.s1:
23202 [__sun && __i386]: Include alloca.h.
23203
23204 1996-07-31 Richard Stallman <rms@gnu.org>
23205
23206 * bison.simple:
23207 [__sun && __i386]: Include alloca.h.
23208
23209 1996-07-30 Richard Stallman <rms@gnu.org>
23210
23211 * src/bison.s1: Comment change.
23212
23213 * src/bison.s1: Test _MSDOS_, not MSDOS.
23214
23215 1996-07-30 Richard Stallman <rms@gnu.org>
23216
23217 * bison.simple: Comment change.
23218
23219 * bison.simple: Test _MSDOS_, not MSDOS.
23220
23221 1996-06-01 Richard Stallman <rms@gnu.org>
23222
23223 * 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:
23224 Insert `_' macro around many string constants.
23225
23226 * src/main.c:
23227 Insert `_' macro around many string constants.
23228
23229 (main): Call setlocale, bindtextdomain and textdomain.
23230
23231 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23232 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23233 [ENABLE_NLS]: Include libintl.h.
23234 [ENABLE_NLS] (gettext): Define.
23235 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23236 (N_, PACKAGE, LOCALEDIR): New macros.
23237
23238 1996-06-01 Richard Stallman <rms@gnu.org>
23239
23240 * POTFILES.in: New file.
23241
23242 * Makefile.in (allocate.o):
23243 Define target explicitly.
23244
23245 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23246 (LDFLAGS): Set to @LDFLAGS@.
23247 (configure): Run autoconf only if preceding `cd' succeeds.
23248 (bison.s1): Redirect output to temporary file then move the
23249 temporary to the target, rather than redirecting directly to bison.s1.
23250 (clean): Remove config.status and config.log.
23251 (distclean): Don't remove config.status here.
23252
23253 1996-05-12 Richard Stallman <rms@gnu.org>
23254
23255 * src/bison.s1:
23256 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23257
23258 1996-05-12 Richard Stallman <rms@gnu.org>
23259
23260 * bison.simple:
23261 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23262
23263 1996-05-11 Richard Stallman <rms@gnu.org>
23264
23265 * src/bison.s1 (__yy_memcpy):
23266 Really reorder the args, as was supposedly done on Feb 14 1995.
23267 (yyparse): Calls changed accordingly.
23268
23269 1996-05-11 Richard Stallman <rms@gnu.org>
23270
23271 * Makefile.in (dist): Don't use $(srcdir).
23272
23273 * bison.simple (__yy_memcpy):
23274 Really reorder the args, as was supposedly done on Feb 14 1995.
23275 (yyparse): Calls changed accordingly.
23276
23277 1996-01-27 Richard Stallman <rms@gnu.org>
23278
23279 * src/output.c (output_rule_data):
23280 Test YYERROR_VERBOSE in the conditional
23281 around the definition of ttyname.
23282
23283 1995-12-29 Richard Stallman <rms@gnu.org>
23284
23285 * src/bison.s1:
23286 Fix line numbers in #line commands.
23287
23288 1995-12-29 Richard Stallman <rms@gnu.org>
23289
23290 * bison.simple:
23291 Fix line numbers in #line commands.
23292
23293 1995-12-27 Richard Stallman <rms@gnu.org>
23294
23295 * src/bison.s1 (YYPARSE_PARAM_DECL):
23296 In C++, make it always null.
23297 (YYPARSE_PARAM_ARG): New macro.
23298 (yyparse): Use YYPARSE_PARAM_ARG.
23299
23300 1995-12-27 Richard Stallman <rms@gnu.org>
23301
23302 * bison.simple (YYPARSE_PARAM_DECL):
23303 In C++, make it always null.
23304 (YYPARSE_PARAM_ARG): New macro.
23305 (yyparse): Use YYPARSE_PARAM_ARG.
23306
23307 1995-11-29 Richard Stallman <rms@gnu.org>
23308
23309 * doc/bison.texinfo:
23310 Describe literal string tokens, %raw, %no_lines, %token_table.
23311
23312 1995-11-29 Daniel Hagerty <hag@gnu.org>
23313
23314 * doc/bison.texinfo: Fixed update date
23315
23316 1995-10-16 Richard Stallman <rms@gnu.org>
23317
23318 * src/version.c: Version 1.25.
23319
23320 1995-10-16 Richard Stallman <rms@gnu.org>
23321
23322 * NEWS: *** empty log message ***
23323
23324 1995-10-16 Richard Stallman <rms@gnu.org>
23325
23326 * doc/bison.1, doc/bison.rnh:
23327 Add new options.
23328
23329 1995-10-15 Richard Stallman <rms@gnu.org>
23330
23331 * src/vmsgetargs.c, src/getargs.c:
23332 Added -n, -k, and -raw switches.
23333 (noparserflag, toknumflag, rawtoknumflag): New variables.
23334
23335 * src/symtab.h (SALIAS):
23336 New #define for adding aliases to %token.
23337 (struct bucket): Added `alias' field.
23338
23339 * src/reduce.c (reduce_grammar):
23340 Revise error message.
23341 (print_notices): Remove final `.' from error message.
23342
23343 * src/reader.c (reader_output_yylsp):
23344 New function.
23345 (readgram): Use `#if 0' around code that accepted %command
23346 inside grammar rules: The documentation doesn't allow it,
23347 and it will fail since the %command processors scan for the next %.
23348 (parse_token_decl): Extended the %token
23349 declaration to allow a multi-character symbol as an alias.
23350 (parse_thong_decl): New function.
23351 (read_declarations): Added %thong declarations.
23352 (read_declarations): Handle NOOP to deal with allowing
23353 % declarations as another means to specify the flags.
23354 (readgram): Allow %prec prior to semantics embedded in a rule.
23355 (skip_to_char, read_declarations, copy_definition)
23356 (parse_token_decl, parse_start_decl, parse_type_decl)
23357 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23358 (get_type_name, copy_guard, copy_action, readgram)
23359 (get_type, packsymbols): Revised most error messages.
23360 Changed `fatal' to `warnxxx' to avoid aborting for error.
23361 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23362 (read_declarations): Improve the error message for
23363 an invalid character. Do not abort.
23364 (read_declarations, copy_guard, copy_action): Use
23365 printable_version to avoid unprintable characters in printed output.
23366 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23367 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23368 Allow the type of a non-terminal can be given
23369 more than once, as long as all specifications give the same type.
23370
23371 * src/output.c:
23372 (output_headers, output_trailers, output, output_gram)
23373 (output_rule_data): Implement noparserflag variable.
23374 Implement toknumflag variable.
23375 (output): Call reader_output_yylsp to output LTYPESTR.
23376
23377 * src/main.c (main):
23378 If reader sees an error, don't process the grammar.
23379 (fatals): Updated to not use VARARGS1.
23380 (printable_version, int_to_string, warn, warni, warns, warnss)
23381 (warnsss): New error reporting functions. Avoid abort for error.
23382
23383 * src/lex.h:
23384 Added THONG and NOOP for alias processing.
23385 Added SETOPT for the new code that allows setting options with %flags.
23386
23387 * src/lex.c:
23388 Include getopt.h. Add some extern decls.
23389 (safegetc): New function to deal with EOF gracefully.
23390 (literalchar); new function to deal with reading \ escapes.
23391 (lex): Use literalchar.
23392 (lex): Implemented "..." tokens.
23393 (literalchar, lex, parse_percent_token): Made tokenbuffer
23394 always contain the token. This includes growing the token
23395 buffer while reading an integer.
23396 (parse_percent_token): Replaced if-else statement with percent_table.
23397 (parse_percent_token): Added % declarations as another
23398 way to specify the flags -n, -l, and -r. Also added hooks for
23399 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23400 major changes to files.c.
23401 (lex) Retain in the incoming stream a character following
23402 an incorrect '/'.
23403 (skip_white_space, lex): Revised most error messages
23404 and changed fatal to warn to avoid aborting.
23405 (percent_table): Added %thong declarations.
23406
23407 * src/gram.h: Comment changes.
23408
23409 * src/files.c (openfiles, open_extra_files, done):
23410 Add faction flag
23411 and actfile file. Handle noparserflag. Both for -n switch.
23412
23413 * src/conflicts.c (resolve_sr_conflict):
23414 Remove use of alloca.
23415
23416 1995-06-01 Jim Meyering <meyering@gnu.org>
23417
23418 * doc/bison.texinfo: *** empty log message ***
23419
23420 1995-05-06 Richard Stallman <rms@gnu.org>
23421
23422 * src/bison.s1: Comment change.
23423
23424 1995-05-06 Richard Stallman <rms@gnu.org>
23425
23426 * bison.simple: Comment change.
23427
23428 1995-05-03 Richard Stallman <rms@gnu.org>
23429
23430 * src/version.c: Version now 1.24.
23431
23432 * src/bison.s1: Change distribution terms.
23433
23434 * src/version.c: Version now 1.23.
23435
23436 1995-05-03 Richard Stallman <rms@gnu.org>
23437
23438 * doc/bison.texinfo:
23439 Rewrite "Conditions for Using Bison".
23440 Update version to 1.24.
23441
23442 1995-05-03 Richard Stallman <rms@gnu.org>
23443
23444 * bison.simple: Change distribution terms.
23445
23446 1995-02-23 Richard Stallman <rms@gnu.org>
23447
23448 * src/files.c: Test __VMS_POSIX as well as VMS.
23449
23450 1995-02-14 Jim Meyering <meyering@gnu.org>
23451
23452 * src/bison.s1 (__yy_memcpy):
23453 Renamed from __yy_bcopy to avoid
23454 confusion. Reverse FROM and TO arguments to be consistent with
23455 those of memcpy.
23456
23457 1995-02-14 Jim Meyering <meyering@gnu.org>
23458
23459 * bison.simple (__yy_memcpy):
23460 Renamed from __yy_bcopy to avoid
23461 confusion. Reverse FROM and TO arguments to be consistent with
23462 those of memcpy.
23463
23464 1994-11-10 David J. MacKenzie <djm@gnu.org>
23465
23466 * NEWS: reformat
23467
23468 * NEWS: New file.
23469
23470 * Makefile.in (DISTFILES): Include NEWS.
23471
23472 * Makefile.in (DISTFILES):
23473 Include install-sh, not install.sh.
23474
23475 * configure.in: Update to Autoconf v2 macro names.
23476
23477 1994-10-05 David J. MacKenzie <djm@gnu.org>
23478
23479 * Makefile.in: fix typo
23480
23481 * Makefile.in (prefix, exec_prefix):
23482 Let configure set them.
23483
23484 1994-09-28 David J. MacKenzie <djm@gnu.org>
23485
23486 * Makefile.in: Set datadir to $(prefix)/share.
23487
23488 1994-09-15 Richard Stallman <rms@gnu.org>
23489
23490 * src/bison.s1:
23491 Update copyright notice and GPL version.
23492
23493 1994-09-15 Richard Stallman <rms@gnu.org>
23494
23495 * bison.simple:
23496 Update copyright notice and GPL version.
23497
23498 1994-07-12 Richard Stallman <rms@gnu.org>
23499
23500 * src/reduce.c, src/reader.c:
23501 entered into RCS
23502
23503 1994-05-05 David J. MacKenzie <djm@gnu.org>
23504
23505 * Makefile.in: entered into RCS
23506
23507 1994-03-26 Richard Stallman <rms@gnu.org>
23508
23509 * src/bison.s1: entered into RCS
23510
23511 1994-03-26 Richard Stallman <rms@gnu.org>
23512
23513 * bison.simple: entered into RCS
23514
23515 1994-03-25 Richard Stallman <rms@gnu.org>
23516
23517 * src/main.c: entered into RCS
23518
23519 1994-03-24 Richard Stallman <rms@gnu.org>
23520
23521 * src/conflicts.c: entered into RCS
23522
23523 1994-01-02 Richard Stallman <rms@gnu.org>
23524
23525 * Makefile.in: *** empty log message ***
23526
23527 1993-11-21 Richard Stallman <rms@gnu.org>
23528
23529 * src/bison.s1: *** empty log message ***
23530
23531 1993-11-21 Richard Stallman <rms@gnu.org>
23532
23533 * doc/bison.texinfo: entered into RCS
23534
23535 * doc/bison.texinfo: *** empty log message ***
23536
23537 1993-11-21 Richard Stallman <rms@gnu.org>
23538
23539 * bison.simple: *** empty log message ***
23540
23541 1993-10-25 David J. MacKenzie <djm@gnu.org>
23542
23543 * doc/bison.texinfo: *** empty log message ***
23544
23545 1993-10-19 Richard Stallman <rms@gnu.org>
23546
23547 * src/bison.s1: *** empty log message ***
23548
23549 1993-10-19 Richard Stallman <rms@gnu.org>
23550
23551 * bison.simple: *** empty log message ***
23552
23553 1993-10-14 Richard Stallman <rms@gnu.org>
23554
23555 * src/bison.s1: *** empty log message ***
23556
23557 1993-10-14 Richard Stallman <rms@gnu.org>
23558
23559 * bison.simple: *** empty log message ***
23560
23561 1993-09-14 David J. MacKenzie <djm@gnu.org>
23562
23563 * doc/bison.texinfo: *** empty log message ***
23564
23565 1993-09-13 Noah Friedman <friedman@gnu.org>
23566
23567 * Makefile.in: *** empty log message ***
23568
23569 1993-09-10 Richard Stallman <rms@gnu.org>
23570
23571 * src/conflicts.c: *** empty log message ***
23572
23573 * src/system.h: entered into RCS
23574
23575 1993-09-10 Richard Stallman <rms@gnu.org>
23576
23577 * doc/bison.1: entered into RCS
23578
23579 1993-09-06 Noah Friedman <friedman@gnu.org>
23580
23581 * src/version.c: entered into RCS
23582
23583 1993-09-06 Noah Friedman <friedman@gnu.org>
23584
23585 * Makefile.in: *** empty log message ***
23586
23587 1993-07-30 David J. MacKenzie <djm@gnu.org>
23588
23589 * Makefile.in: *** empty log message ***
23590
23591 1993-07-24 Richard Stallman <rms@gnu.org>
23592
23593 * src/bison.s1: *** empty log message ***
23594
23595 1993-07-24 Richard Stallman <rms@gnu.org>
23596
23597 * bison.simple: *** empty log message ***
23598
23599 1993-07-08 David J. MacKenzie <djm@gnu.org>
23600
23601 * Makefile.in: *** empty log message ***
23602
23603 1993-07-04 Richard Stallman <rms@gnu.org>
23604
23605 * src/bison.s1: *** empty log message ***
23606
23607 1993-07-04 Richard Stallman <rms@gnu.org>
23608
23609 * bison.simple: *** empty log message ***
23610
23611 1993-06-26 David J. MacKenzie <djm@gnu.org>
23612
23613 * src/getargs.c: entered into RCS
23614
23615 1993-06-26 David J. MacKenzie <djm@gnu.org>
23616
23617 * doc/bison.texinfo: *** empty log message ***
23618
23619 * doc/bison.1: New file.
23620
23621 1993-06-25 Richard Stallman <rms@gnu.org>
23622
23623 * src/getargs.c: New file.
23624
23625 1993-06-16 Richard Stallman <rms@gnu.org>
23626
23627 * src/bison.s1: *** empty log message ***
23628
23629 1993-06-16 Richard Stallman <rms@gnu.org>
23630
23631 * bison.simple: *** empty log message ***
23632
23633 1993-06-03 Richard Stallman <rms@gnu.org>
23634
23635 * src/bison.s1: New file.
23636
23637 1993-06-03 Richard Stallman <rms@gnu.org>
23638
23639 * doc/bison.texinfo: *** empty log message ***
23640
23641 1993-06-03 Richard Stallman <rms@gnu.org>
23642
23643 * bison.simple: New file.
23644
23645 1993-05-19 Richard Stallman <rms@gnu.org>
23646
23647 * doc/bison.texinfo: New file.
23648
23649 1993-05-07 Noah Friedman <friedman@gnu.org>
23650
23651 * Makefile.in: *** empty log message ***
23652
23653 1993-04-28 Noah Friedman <friedman@gnu.org>
23654
23655 * src/reader.c: *** empty log message ***
23656
23657 1993-04-23 Noah Friedman <friedman@gnu.org>
23658
23659 * src/alloc.h: entered into RCS
23660
23661 1993-04-20 David J. MacKenzie <djm@gnu.org>
23662
23663 * src/version.c: *** empty log message ***
23664
23665 * src/files.c, src/allocate.c:
23666 entered into RCS
23667
23668 * src/reader.c: *** empty log message ***
23669
23670 * src/lex.c: entered into RCS
23671
23672 * src/conflicts.c: New file.
23673
23674 * src/symtab.c: entered into RCS
23675
23676 * src/alloc.h: New file.
23677
23678 * src/LR0.c: entered into RCS
23679
23680 1993-04-18 Noah Friedman <friedman@gnu.org>
23681
23682 * src/reader.c: New file.
23683
23684 * src/version.c: *** empty log message ***
23685
23686 1993-04-18 Noah Friedman <friedman@gnu.org>
23687
23688 * Makefile.in: *** empty log message ***
23689
23690 1993-04-17 Noah Friedman <friedman@gnu.org>
23691
23692 * Makefile.in: *** empty log message ***
23693
23694 1993-04-15 Richard Stallman <rms@gnu.org>
23695
23696 * src/main.c, src/files.c:
23697 New file.
23698
23699 1993-04-15 Noah Friedman <friedman@gnu.org>
23700
23701 * configure.in: entered into RCS
23702
23703 * configure.in: *** empty log message ***
23704
23705 * configure.in: New file.
23706
23707 1993-04-14 Richard Stallman <rms@gnu.org>
23708
23709 * Makefile.in: New file.
23710
23711 1993-04-13 Richard Stallman <rms@gnu.org>
23712
23713 * src/version.c: New file.
23714
23715 1993-03-25 Richard Stallman <rms@gnu.org>
23716
23717 * src/output.c: entered into RCS
23718
23719 1992-09-25 Richard Stallman <rms@gnu.org>
23720
23721 * configure.bat: entered into RCS
23722
23723 1992-06-22 Richard Stallman <rms@gnu.org>
23724
23725 * src/vmsgetargs.c: entered into RCS
23726
23727 1992-06-22 Richard Stallman <rms@gnu.org>
23728
23729 * doc/bison.rnh: entered into RCS
23730
23731 1992-04-20 David J. MacKenzie <djm@gnu.org>
23732
23733 * README: entered into RCS
23734
23735 1992-01-22 Richard Stallman <rms@gnu.org>
23736
23737 * src/machine.h: entered into RCS
23738
23739 1991-12-21 Richard Stallman <rms@gnu.org>
23740
23741 * src/lalr.c, src/closure.c:
23742 entered into RCS
23743
23744 1991-12-20 Richard Stallman <rms@gnu.org>
23745
23746 * src/state.h: entered into RCS
23747
23748 1991-12-18 Richard Stallman <rms@gnu.org>
23749
23750 * src/print.c, src/nullable.c, src/derives.c:
23751 entered into RCS
23752
23753 1991-11-03 David J. MacKenzie <djm@gnu.org>
23754
23755 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23756 entered into RCS
23757
23758 1988-09-09 Richard Stallman <rms@gnu.org>
23759
23760 * src/bison.hairy: entered into RCS
23761
23762 1987-12-16 Richard Stallman <rms@gnu.org>
23763
23764 * REFERENCES: entered into RCS
23765
23766
23767 -----
23768
23769 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
23770 Inc.
23771
23772 Copying and distribution of this file, with or without
23773 modification, are permitted provided the copyright notice and this
23774 notice are preserved.